LocalCDN-Firefox-Chrome-Brave/resources/instantsearch.js/4.52.0/instantsearch.production.mi...

4 lines
275 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! InstantSearch.js 4.52.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch.js */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).instantsearch=t()}(this,function(){"use strict";function o(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){F(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$(r.key),r)}}function W(e,t,n){t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1})}function F(e,t,n){return(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function D(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function U(e,t){return(U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=B(n),t=(e=r?(e=B(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return b(t)}}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}(e,t)||Q(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){return function(e){if(Array.isArray(e))return V(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){var n;if(e)return"string"==typeof e?V(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $(e){e=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==typeof e?e:String(e)}function v(){}function K(e,t){return e}function f(e,t){if(void 0===e||"function"!=typeof e)throw new Error("The render function is not valid (received type ".concat(Object.prototype.toString.call(e).slice(8,-1),").\n\n").concat(t))}function z(e){var t=e.helper,e=e.attributesToClear,e=void 0===e?[]:e,n=t.state.setPage(0),n=e.reduce(function(e,t){return n.isNumericRefined(t)?e.removeNumericRefinement(t):n.isHierarchicalFacet(t)?e.removeHierarchicalFacetRefinement(t):n.isDisjunctiveFacet(t)?e.removeDisjunctiveFacetRefinement(t):n.isConjunctiveFacet(t)?e.removeFacetRefinement(t):e},n);return n=-1!==e.indexOf("query")?n.setQuery(""):n}var J={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Z=/[&<>"']/g,Y=RegExp(Z.source);var X={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},G=/&(amp|quot|lt|gt|#39);/g,ee=RegExp(G.source);function te(e){return e&&ee.test(e)?e.replace(G,function(e){return X[e]}):e}function ne(e){if("object"===y(t=e)&&null!==t&&"[object Object]"===(null===(t=e)?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t))){var t;if(null===Object.getPrototypeOf(e))return 1;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}}var re={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},u={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function ie(e){return((e=e)&&Y.test(e)?e.replace(Z,function(e){return J[e]}):e).replace(new RegExp(re.highlightPreTag,"g"),u.highlightPreTag).replace(new RegExp(re.highlightPostTag,"g"),u.highlightPostTag)}function ae(n){return ne(n)&&"string"!=typeof n.value?Object.keys(n).reduce(function(e,t){return C(C({},e),{},F({},t,ae(n[t])))},{}):Array.isArray(n)?n.map(ae):C(C({},n),{},{value:ie(n.value)})}function se(e){return void 0===e.__escaped&&((e=e.map(function(e){e=h({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return e._highlightResult&&(e._highlightResult=ae(e._highlightResult)),e._snippetResult&&(e._snippetResult=ae(e._snippetResult)),e})).__escaped=!0),e}function oe(e){var t=u.highlightPreTag,n=u.highlightPostTag;return e.map(function(e){return e.isHighlighted?t+e.value+n:e.value}).join("")}function ce(e){var l=e.instantSearchInstance,d=e.helper,h=e.attribute,f=e.widgetType;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i,a,s=t[0],o=t[1],c=t[2],c=void 0===c?"Filter Applied":c,u="string"==typeof h?h:h(o);1===t.length&&"object"===y(t[0])?l.sendEventToInsights(t[0]):"click"!==s||2!==t.length&&3!==t.length||(i=u,a=o,(r=d).state.isHierarchicalFacet(i)?r.state.isHierarchicalFacetRefined(i,a):r.state.isConjunctiveFacet(i)?r.state.isFacetRefined(i,a):r.state.isDisjunctiveFacetRefined(i,a))||l.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:f,eventType:s,payload:{eventName:c,index:d.getIndex(),filters:["".concat(u,":").concat(o)]},attribute:u})}}function ue(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function le(e){return JSON.parse(decodeURIComponent(atob(e)))}var de=function(e){var n,r,i,t,a,s,o=e.index,c=e.widgetType,u=(e.methodName,e.args),e=e.instantSearchInstance;return 1===u.length&&"object"===y(u[0])?[u[0]]:(n=u[0],t=u[1],r=u[2],!t||!("click"!==n&&"conversion"!==n||r)||0===(u=Array.isArray(t)?t:[t]).length?[]:(i=u[0].__queryID,t=function(e,t){for(var n=1<arguments.length&&void 0!==t?t:20,r=[],i=0;i<Math.ceil(e.length/n);i++)r.push(e.slice(i*n,(i+1)*n));return r}(u),a=t.map(function(e){return e.map(function(e){return e.objectID})}),s=t.map(function(e){return e.map(function(e){return e.__position})}),"view"===n?"idle"!==e.status?[]:t.map(function(e,t){return{insightsMethod:"viewedObjectIDs",widgetType:c,eventType:n,payload:{eventName:r||"Hits Viewed",index:o,objectIDs:a[t]},hits:e}}):"click"===n?t.map(function(e,t){return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:c,eventType:n,payload:{eventName:r,index:o,queryID:i,objectIDs:a[t],positions:s[t]},hits:e}}):"conversion"===n?t.map(function(e,t){return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:c,eventType:n,payload:{eventName:r,index:o,queryID:i,objectIDs:a[t]},hits:e}}):[]))};function he(e){var r=e.instantSearchInstance,i=e.index,a=e.widgetType;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];de({widgetType:a,index:i,methodName:"sendEvent",args:t,instantSearchInstance:r}).forEach(function(e){return r.sendEventToInsights(e)})}}function fe(e){var i=e.index,a=e.widgetType,s=e.instantSearchInstance;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=de({widgetType:a,index:i,methodName:"bindEvent",args:t,instantSearchInstance:s});return r.length?"data-insights-event=".concat(ue(r)):""}}function me(e){return"ais.index"===e.$$type}function pe(t,e){var n=t[e.getIndexId()]||{};e.getHelper().setState(e.getWidgetSearchParameters(e.getHelper().state,{uiState:n})),e.getWidgets().filter(me).forEach(function(e){return pe(t,e)})}function ge(r,i){var a=null;return function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return new Promise(function(e,t){a&&clearTimeout(a),a=setTimeout(function(){a=null,Promise.resolve(r.apply(void 0,n)).then(e).catch(t)},i)})}}var ve=Promise.resolve();function ye(r){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null===i&&(i=ve.then(function(){i=null,a?a=!1:r.apply(void 0,t)}))}var i=null,a=!1;return e.wait=function(){if(null===i)throw new Error("The deferred function should be called before calling `wait()`");return i},e.cancel=function(){null!==i&&(a=!0)},e}function l(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map(function(e){return t=(e=e).name,e=e.connector,["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",void 0!==e&&e?"#connector":""].join("");var t}).join(", ");return function(e){return[e,"See documentation: ".concat(r)].filter(Boolean).join("\n\n")}}function be(e){return"number"==typeof e&&e<0||"string"==typeof e?String(e).replace(/^-/,"\\-"):e}function Re(e,t){for(var n,r=0;r<e.length;r++)if(t(n=e[r],r,e))return n}var Se=/^(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)$/;function _e(e){if(Array.isArray(e)){var t=e,n=k(t,1)[0],r=(n=k(void 0===n?[void 0,void 0,void 0,void 0]:n,4))[0],i=n[1],a=n[2],n=n[3];if(r&&i&&a&&n)return{northEast:{lat:r,lng:i},southWest:{lat:a,lng:n}};throw new Error('Invalid value for "insideBoundingBox" parameter: ['.concat(t,"]"))}r=e,a=(i=k(r.split(",").map(parseFloat),4))[0],n=i[1],t=i[2],i=i[3];if(a&&n&&t&&i)return{northEast:{lat:a,lng:n},southWest:{lat:t,lng:i}};throw new Error('Invalid value for "insideBoundingBox" parameter: "'.concat(r,'"'))}function P(e){var t,n="string"==typeof e,r=n?document.querySelector(e):e;if((t=r)instanceof HTMLElement||Boolean(t)&&0<t.nodeType)return r;throw t="Container must be `string` or `HTMLElement`.",n&&(t+=" Unable to find ".concat(e)),new Error(t)}function we(e){var t=u.highlightPostTag,n=u.highlightPreTag,e=e.split(n),n=e.shift(),r=n?[{value:n,isHighlighted:!1}]:[];return e.forEach(function(e){e=e.split(t);r.push({value:e[0],isHighlighted:!0}),""!==e[1]&&r.push({value:e[1],isHighlighted:!1})}),r}var Pe=new RegExp(/\w/i);function Ne(e,t){return(Array.isArray(t)?t:t.split(".")).reduce(function(e,t){return e&&e[t]},e)}function xe(e,t,n,r,i){var a,i=4<arguments.length&&void 0!==i?i:[],s={type:t,attribute:n,name:r,escapedValue:be(r)},o=Re(i,function(e){return e.name===n});if("hierarchical"===t){for(var i=e.getHierarchicalFacetByName(n),c=r.split(i.separator),u=0;void 0!==o&&u<c.length;++u)!function(t){var n;o=o&&o.data&&Re(Object.keys(o.data).map((n=o.data,function(e){return n[e]})),function(e){return e.name===c[t]})}(u);a=o&&o.count}else a=o&&o.data&&o.data[s.name];return void 0!==a&&(s.count=a),o&&void 0!==o.exhaustive&&(s.exhaustive=o.exhaustive),s}function Ie(n,r,e){var e=2<arguments.length&&void 0!==e&&e,i=[],t=r.facetsRefinements,a=void 0===t?{}:t,t=r.facetsExcludes,s=void 0===t?{}:t,t=r.disjunctiveFacetsRefinements,o=void 0===t?{}:t,t=r.hierarchicalFacetsRefinements,c=void 0===t?{}:t,t=r.numericRefinements,u=void 0===t?{}:t,t=r.tagRefinements,t=void 0===t?[]:t;return Object.keys(a).forEach(function(t){a[t].forEach(function(e){i.push(xe(r,"facet",t,e,n.facets))})}),Object.keys(s).forEach(function(t){s[t].forEach(function(e){i.push({type:"exclude",attribute:t,name:e,exclude:!0})})}),Object.keys(o).forEach(function(t){o[t].forEach(function(e){i.push(xe(r,"disjunctive",t,"string"==typeof(e=e)?e.replace(/^\\-/,"-"):e,n.disjunctiveFacets))})}),Object.keys(c).forEach(function(t){c[t].forEach(function(e){i.push(xe(r,"hierarchical",t,e,n.hierarchicalFacets))})}),Object.keys(u).forEach(function(n){var r=u[n];Object.keys(r).forEach(function(e){var t=e,e=r[t];(Array.isArray(e)?e:[e]).forEach(function(e){i.push({type:"numeric",attribute:n,name:"".concat(e),numericValue:e,operator:t})})})}),t.forEach(function(e){i.push({type:"tag",attribute:"_tags",name:e})}),e&&r.query&&r.query.trim()&&i.push({attribute:"query",type:"query",name:r.query,query:r.query}),i}function Te(e,t){var n=null==(n=e.getWidgetRenderState)?void 0:n.call(e,t),t=null;if(n&&n.widgetParams&&((n=n.widgetParams).attribute?t=n.attribute:Array.isArray(n.attributes)&&(t=n.attributes[0])),"string"!=typeof t)throw new Error("Could not find the attribute of the widget:\n\n".concat(JSON.stringify(e),"\n\nPlease check whether the widget's getWidgetRenderState returns widgetParams.attribute correctly."));return t}function Fe(e,n,r){return e.map(function(e,t){return C(C({},e),{},{__position:r*n+t+1})})}function Ce(e,t){return t?e.map(function(e){return C(C({},e),{},{__queryID:t})}):e}function Ee(e){return e!==Object(e)}function ke(e,t){if(e===t)return 1;if(Ee(e)||Ee(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length===Object.keys(t).length){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!(i in t))return;if(!ke(e[i],t[i]))return}return 1}}function R(e){return"number"==typeof e&&isFinite(e)}function je(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function Le(e){return e.filter(function(e,t,n){return n.indexOf(e)===t})}var Me=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"],Oe=function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;t=E(t,Me);return e.setQueryParameters(t)},He=function(e,t){return t.facets.reduce(function(e,t){return e.addFacet(t)},e)},Ae=function(e,t){return t.disjunctiveFacets.reduce(function(e,t){return e.addDisjunctiveFacet(t)},e)},We=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce(function(e,t){var n=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(e,function(e){return e.name===t.name});return-1===n?e.concat(t):((e=e.slice()).splice(n,1,t),e)},e.hierarchicalFacets)})},De=function(e,t){return t.tagRefinements.reduce(function(e,t){return e.addTagRefinement(t)},e)},Be=function(e,t){return e.setQueryParameters({facetsRefinements:C(C({},e.facetsRefinements),t.facetsRefinements)})},Ue=function(e,t){return e.setQueryParameters({facetsExcludes:C(C({},e.facetsExcludes),t.facetsExcludes)})},qe=function(e,t){return e.setQueryParameters({disjunctiveFacetsRefinements:C(C({},e.disjunctiveFacetsRefinements),t.disjunctiveFacetsRefinements)})},Qe=function(e,t){return e.setQueryParameters({numericRefinements:C(C({},e.numericRefinements),t.numericRefinements)})},Ve=function(e,t){return e.setQueryParameters({hierarchicalFacetsRefinements:C(C({},e.hierarchicalFacetsRefinements),t.hierarchicalFacetsRefinements)})},$e=function(e,t){t=Le([].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean));return 0<t.length?e.setQueryParameters({ruleContexts:t}):e},Ke=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){e=Ve(e,t),e=We(e,t),e=De(e,t),e=Qe(e,t),e=qe(e,t),e=Ue(e,t),e=Be(e,t),e=Ae(e,t),e=$e(e,t),e=He(e,t);return Oe(e,t)})};function ze(n,r){return null==n?n:Object.keys(n).reduce(function(e,t){return 0<=r.indexOf(t)||(e[t]=n[t]),e},{})}function Je(e){var t=e.start,n=void 0===t?0:t,t=e.end,e=e.step,e=void 0===e?1:e,r=0===e?1:e,e=Math.round((t-n)/r);return w(Array(e)).map(function(e,t){return n+t*r})}function Ze(e,t,n){var r=t.getHelper();return{uiState:n,helper:r,parent:t,instantSearchInstance:e,state:r.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function Ye(e,t){var n=t.getResults();return{helper:t.getHelper(),parent:t,instantSearchInstance:e,results:n,scopedResults:t.getScopedResults(),state:n._state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function Xe(i){return i.some(function(e){return e.isHighlighted})?i.map(function(e,t){return C(C({},e),{},{isHighlighted:(n=(e=i)[t=t],r=(null==(r=i[t+1])?void 0:r.isHighlighted)||!0,t=(null==(e=i[t-1])?void 0:e.isHighlighted)||!0,!(Pe.test(te(n.value))||t!==r?n.isHighlighted:t))});var n,r}):i.map(function(e){return C(C({},e),{},{isHighlighted:!1})})}function Ge(e,t){t=(1<arguments.length&&void 0!==t?t:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window:window})}function et(e){return Array.isArray(e)?e:[e]}function tt(y){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(y,it()),function(e){var r,n,i,a,s,o,c,u,t=e||{},l=t.queryLanguages,d=t.attributesForPrediction,h=t.nbHits,f=void 0===h?1:h,h=t.renderDebounceTime,m=t.searchDebounceTime,p=void 0===m?100:m,m=t.escapeHTML,g=void 0===m||m,m=t.extraParameters,v=void 0===m?{}:m;if(l&&0!==l.length)return r=function(e){var t=++n;return Promise.resolve(e).then(function(e){return a&&t<i?a:(i=t,a=e)})},s=[],o=!(i=n=-1),c=ge(y,(a=void 0)===h?100:h),{$$type:"ais.answers",init:function(e){var t=e.state,t=e.instantSearchInstance.client.initIndex(t.index);if("function"!=typeof t.findAnswers)throw new Error(it("`algoliasearch` >= 4.8.0 required."));u=ge(t.findAnswers,p),y(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(t){var n=this,e=t.state.query;e?(s=[],o=!0,y(C(C({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1),r(u(e,l,C(C({},v),{},{nbHits:f,attributesForPrediction:d}))).then(function(e){e&&(g&&0<e.hits.length&&(e.hits=se(e.hits)),e=Ce(Fe(e.hits,0,f),e.queryID),s=e,o=!1,c(C(C({},n.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1))})):(o=!(s=[]),y(C(C({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1))},getRenderState:function(e,t){return C(C({},e),{},{answers:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{hits:s,isLoading:o,widgetParams:e}},dispose:function(e){e=e.state;return b(),e},getWidgetSearchParameters:function(e){return e}};throw new Error(it("The `queryLanguages` expects an array of strings."))}}function nt(u){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(u,at()),function(n){var o,e=n.widgets,t=n.maxValuesPerFacet,r=void 0===t?20:t,t=n.facets,i=void 0===t?["*"]:t,t=n.transformItems,a=void 0===t?function(e){return e}:t,c=n.fallbackWidget;if(!(e&&Array.isArray(e)&&e.every(function(e){return"object"===y(e)})))throw new Error(at("The `widgets` option expects an array of widgets."));if(Array.isArray(i)&&i.length<=1&&("*"===i[0]||void 0===i[0]))return o=new Map,{$$type:"ais.dynamicWidgets",init:function(n){e.forEach(function(e){var t=Te(e,n);o.set(t,{widget:e,isMounted:!1})}),u(C(C({},this.getWidgetRenderState(n)),{},{instantSearchInstance:n.instantSearchInstance}),!0)},render:function(e){var t=e.parent,i=this.getWidgetRenderState(e),a=[],s=[];c&&i.attributesToRender.forEach(function(e){var t;o.has(e)||(t=c({attribute:e}),o.set(e,{widget:t,isMounted:!1}))}),o.forEach(function(e,t){var n=e.widget,e=e.isMounted,r=-1<i.attributesToRender.indexOf(t);!e&&r?(s.push(n),o.set(t,{widget:n,isMounted:!0})):e&&!r&&(a.push(n),o.set(t,{widget:n,isMounted:!1}))}),t.addWidgets(s),setTimeout(function(){return t.removeWidgets(a)},0),u(C(C({},i),{},{instantSearchInstance:e.instantSearchInstance}),!1)},dispose:function(e){var e=e.parent,n=[];o.forEach(function(e){var t=e.widget;e.isMounted&&n.push(t)}),e.removeWidgets(n),s()},getWidgetSearchParameters:function(e){return i.reduce(function(e,t){return e.addFacet(t)},e.setQueryParameters({maxValuesPerFacet:Math.max(r||0,e.maxValuesPerFacet||0)}))},getRenderState:function(e,t){return C(C({},e),{},{dynamicWidgets:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results;e.state;if(!t)return{attributesToRender:[],widgetParams:n};e=a(null!=(e=null==(e=t.renderingContent)||null==(e=e.facetOrdering)||null==(e=e.facets)?void 0:e.order)?e:[],{results:t});if(Array.isArray(e))return{attributesToRender:e,widgetParams:n};throw new Error(at("The `transformItems` option expects a function that returns an Array."))}};throw new Error(at('The `facets` option only accepts [] or ["*"], you passed '.concat(JSON.stringify(i))))}}function rt(n){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,st()),function(r){var e=r||{},t=e.includedAttributes,o=void 0===t?[]:t,t=e.excludedAttributes,c=void 0===t?["query"]:t,t=e.transformItems,u=void 0===t?function(e){return e}:t;if(r&&r.includedAttributes&&r.excludedAttributes)throw new Error(st("The options `includedAttributes` and `excludedAttributes` cannot be used together."));function i(){return l.refine()}function a(){return l.createURL()}var l={refine:v,createURL:function(){return""},attributesToClear:[]};return{$$type:"ais.clearRefinements",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){s()},getRenderState:function(e,t){return C(C({},e),{},{clearRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.createURL,n=e.scopedResults,s=e.results,e=(l.attributesToClear=n.reduce(function(e,t){return e.concat((t=(e={scopedResult:t,includedAttributes:o,excludedAttributes:c,transformItems:u,results:s}).scopedResult,n=e.includedAttributes,r=e.excludedAttributes,i=e.transformItems,e=e.results,a=-1!==n.indexOf("query")||-1===r.indexOf("query"),{helper:t.helper,items:i(Le(Ie(t.results,t.helper.state,a).map(function(e){return e.attribute}).filter(function(e){return 0===n.length||-1!==n.indexOf(e)}).filter(function(e){return"query"===e&&a||-1===r.indexOf(e)})),{results:e})}));var n,r,i,a},[]),l.refine=function(){l.attributesToClear.forEach(function(e){var t=e.helper,e=e.items;t.setState(z({helper:t,attributesToClear:e})).search()})},l.createURL=function(){return t(Ke.apply(void 0,w(l.attributesToClear.map(function(e){return z({helper:e.helper,attributesToClear:e.items})}))))},l.attributesToClear.some(function(e){return 0<e.items.length}));return{canRefine:e,hasRefinements:e,refine:i,createURL:a,widgetParams:r}}}}}var it=l({name:"answers",connector:!0}),at=l({name:"dynamic-widgets",connector:!0}),st=l({name:"clear-refinements",connector:!0});function ot(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,ct()),function(a){if((a||{}).includedAttributes&&(a||{}).excludedAttributes)throw new Error(ct("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var e=a||{},s=e.includedAttributes,t=e.excludedAttributes,o=void 0===t?["query"]:t,t=e.transformItems,c=void 0===t?function(e){return e}:t;return{$$type:"ais.currentRefinements",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){r()},getRenderState:function(e,t){return C(C({},e),{},{currentRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var n=e.results,t=e.scopedResults,r=e.createURL,i=e.helper;e=n?t.reduce(function(e,t){return e.concat(c(ut({results:t.results,helper:t.helper,includedAttributes:s,excludedAttributes:o}),{results:n}))},[]):c(ut({results:{},helper:i,includedAttributes:s,excludedAttributes:o}),{results:n});return{items:e,canRefine:0<e.length,refine:function(e){return dt(i,e)},createURL:function(e){return r(lt(i.state,e))},widgetParams:a}}}}}var ct=l({name:"current-refinements",connector:!0});function ut(e){var t=e.results,n=e.helper,r=e.includedAttributes,i=e.excludedAttributes,e=-1!==(r||[]).indexOf("query")||-1===(i||[]).indexOf("query"),a=r?function(e){return-1!==r.indexOf(e.attribute)}:function(e){return-1===i.indexOf(e.attribute)},s=Ie(t,n.state,e).map(ht).filter(a);return s.reduce(function(e,t){return[].concat(w(e.filter(function(e){return e.attribute!==t.attribute})),[{indexName:n.state.index,attribute:t.attribute,label:t.attribute,refinements:s.filter(function(e){return e.attribute===t.attribute}).sort(function(e,t){return"numeric"===e.type?e.value-t.value:0}),refine:function(e){return dt(n,e)}}])},[])}function lt(e,t){switch(e=e.resetPage(),t.type){case"facet":return e.removeFacetRefinement(t.attribute,String(t.value));case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attribute,String(t.value));case"hierarchical":return e.removeHierarchicalFacetRefinement(t.attribute);case"exclude":return e.removeExcludeRefinement(t.attribute,String(t.value));case"numeric":return e.removeNumericRefinement(t.attribute,t.operator,String(t.value));case"tag":return e.removeTagRefinement(String(t.value));case"query":return e.setQueryParameter("query","");default:return e}}function dt(e,t){e.setState(lt(e.state,t)).search()}function ht(e){var t=function(e){if("numeric"===e.type)return Number(e.name);if("escapedValue"in e)return e.escapedValue;return e.name}(e),n=e.operator?"".concat(function(e){switch(e){case">=":return"≥";case"<=":return"≤";default:return e}}(e.operator)," ").concat(e.name):e.name,t={attribute:e.attribute,type:e.type,value:t,label:n};return void 0!==e.operator&&(t.operator=e.operator),void 0!==e.count&&(t.count=e.count),void 0!==e.exhaustive&&(t.exhaustive=e.exhaustive),t}function ft(R){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(R,gt()),function(c){var e=c||{},u=e.attributes,t=e.separator,l=void 0===t?" > ":t,t=e.rootPath,r=void 0===t?null:t,t=e.showParentLevel,i=void 0===t||t,t=e.limit,a=void 0===t?10:t,t=e.showMore,d=void 0!==t&&t,t=e.showMoreLimit,s=void 0===t?20:t,t=e.sortBy,h=void 0===t?vt:t,t=e.transformItems,f=void 0===t?function(e){return e}:t;if(!u||!Array.isArray(u)||0===u.length)throw new Error(gt("The `attributes` option expects an array of strings."));if(!0===d&&s<=a)throw new Error(gt("The `showMoreLimit` option must be greater than `limit`."));var m,p,g=k(u,1)[0],o=function(){};function v(){o()}var y=!1;function b(){return y?s:a}return{$$type:"ais.hierarchicalMenu",init:function(e){var t=e.instantSearchInstance;R(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t,n,r=e.instantSearchInstance;t=e,o=function(){y=!y,n.render(t)},R(C(C({},(n=this).getWidgetRenderState(e)),{},{instantSearchInstance:r}),!1)},dispose:function(e){e=e.state;return n(),e.removeHierarchicalFacet(g).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return C(C({},e),{},{hierarchicalMenu:C(C({},e.hierarchicalMenu),{},F({},g,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n=e.results,r=e.state,i=e.createURL,a=e.instantSearchInstance,s=e.helper,e=[],o=!1;return m=m||ce({instantSearchInstance:a,helper:s,attribute:function(e){e=e.split(l).length-1;return u[e]},widgetType:this.$$type}),p=p||function(e){m("click",e),s.toggleFacetRefinement(g,e).search()},n&&(a=(a=n.getFacetValues(g,{sortBy:h,facetOrdering:h===vt}))&&!Array.isArray(a)&&a.data?a.data:[],t=(r.maxValuesPerFacet||0)>b()?a.length<=b():a.length<b(),o=d&&(y||!t),e=f(function i(e){return e.slice(0,b()).map(function(e){var t=e.name,n=e.escapedValue,r=e.data,e=(e.path,C(C({},E(e,pt)),{},{value:n,label:t,data:null}));return Array.isArray(r)&&(e.data=i(r)),e})}(a),{results:n})),{items:e,refine:p,canRefine:0<e.length,createURL:function(e){return i(r.resetPage().toggleFacetRefinement(g,e))},sendEvent:m,widgetParams:c,isShowingMore:y,toggleShowMore:v,canToggleShowMore:o}},getWidgetUiState:function(e,t){t=t.searchParameters.getHierarchicalFacetBreadcrumb(g);return t.length?C(C({},e),{},{hierarchicalMenu:C(C({},e.hierarchicalMenu),{},F({},g,t))}):e},getWidgetSearchParameters:function(e,t){var t=t.uiState,t=t.hierarchicalMenu&&t.hierarchicalMenu[g],e=(e.isHierarchicalFacet(g)&&e.getHierarchicalFacetByName(g),e.removeHierarchicalFacet(g).addHierarchicalFacet({name:g,attributes:u,separator:l,rootPath:r,showParentLevel:i})),n=e.maxValuesPerFacet||0,n=Math.max(n,d?s:a),e=e.setQueryParameter("maxValuesPerFacet",n);return t?e.addHierarchicalFacetRefinement(g,t.join(l)):e.setQueryParameters({hierarchicalFacetsRefinements:C(C({},e.hierarchicalFacetsRefinements),{},F({},g,[]))})}}}}function mt(n){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,yt()),function(r){var i,a,e=r||{},t=e.escapeHTML,s=void 0===t||t,t=e.transformItems,o=void 0===t?function(e){return e}:t;return{$$type:"ais.hits",init:function(e){n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=this.getWidgetRenderState(e);n(C(C({},t),{},{instantSearchInstance:e.instantSearchInstance}),!1),t.sendEvent("view",t.hits)},getRenderState:function(e,t){return C(C({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper,e=e.instantSearchInstance;if(i=i||he({instantSearchInstance:e,index:n.getIndex(),widgetType:this.$$type}),a=a||fe({index:n.getIndex(),widgetType:this.$$type,instantSearchInstance:e}),!t)return{hits:[],results:void 0,sendEvent:i,bindEvent:a,widgetParams:r};s&&0<t.hits.length&&(t.hits=se(t.hits));n=Ce(Fe(t.hits,t.page,t.hitsPerPage),t.queryID);return{hits:o(n,{results:t}),results:t,sendEvent:i,bindEvent:a,widgetParams:r}},dispose:function(e){e=e.state;return c(),s?e.setQueryParameters(Object.keys(re).reduce(function(e,t){return C(C({},e),{},F({},t,void 0))},{})):e},getWidgetSearchParameters:function(e){return s?e.setQueryParameters(re):e}}}}var pt=["name","escapedValue","data","path"],gt=l({name:"hierarchical-menu",connector:!0}),vt=["name:asc"],yt=l({name:"hits",connector:!0}),bt=function(e){var n,t=e.method,r=e.results,i=e.hits,a=e.objectIDs,s=r.index,o=(n=i,a.map(function(t){var e=Re(n,function(e){return e.objectID===t});if(void 0===e)throw new Error('Could not find objectID "'.concat(t,'" passed to `clickedObjectIDsAfterSearch` in the returned hits. This is necessary to infer the absolute position and the query ID.'));return e})),c=function(e){e=Le(e.map(function(e){return e.__queryID}));if(1<e.length)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");e=e[0];if("string"!=typeof e)throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");return e}(o);switch(t){case"clickedObjectIDsAfterSearch":return{index:s,queryID:c,objectIDs:a,positions:o.map(function(e){return e.__position})};case"convertedObjectIDsAfterSearch":return{index:s,queryID:c,objectIDs:a};default:throw new Error('Unsupported method passed to insights: "'.concat(t,'".'))}};function Rt(t){return function(a,e){return t(function(e,t){var s,o,c,n=e.results,r=e.hits,i=e.instantSearchInstance;return n&&r&&i?(s=i.insightsClient,o=n,c=r,i=function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0];if(!s)throw a=l({name:"instantsearch"}),new Error(a("The `insightsClient` option has not been provided to `instantsearch`."));if(!Array.isArray(i.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var a=bt({method:e,results:o,hits:c,objectIDs:i.objectIDs});s(e,C(C({},a),i))},a(C(C({},e),{},{insights:i}),t)):a(e,t)},e)}}var St,N,_t,wt,Pt,Nt={},xt=[],It=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Tt(e,t){for(var n in t)e[n]=t[n];return e}function Ft(e){var t=e.parentNode;t&&t.removeChild(e)}function j(e,t,n){var r,i,a,s={};for(a in t)"key"==a?r=t[a]:"ref"==a?i=t[a]:s[a]=t[a];if(2<arguments.length&&(s.children=3<arguments.length?St.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return Ct(e,s,r,i,null)}function Ct(e,t,n,r,i){e={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++_t:i};return null==i&&null!=N.vnode&&N.vnode(e),e}function Et(){return{current:null}}function kt(e){return e.children}function jt(e,t){this.props=e,this.context=t}function Lt(e,t){if(null==t)return e.__?Lt(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Lt(e):null}function Mt(e){(e.__d||(e.__d=!0,!wt.push(e))||Ot.__r++)&&Pt===N.debounceRendering||((Pt=N.debounceRendering)||setTimeout)(Ot)}function Ot(){for(var e;Ot.__r=wt.length;)e=wt.sort(function(e,t){return e.__v.__b-t.__v.__b}),wt=[],e.some(function(e){var t,n,r,i,a;e.__d&&(i=(r=(e=e).__v).__e,a=e.__P)&&(t=[],(n=Tt({},r)).__v=r.__v+1,qt(a,r,n,e.__n,void 0!==a.ownerSVGElement,null!=r.__h?[i]:null,t,null==i?Lt(r):i,r.__h),Qt(t,r),r.__e!=i)&&function e(t){var n,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if(null!=(r=t.__k[n])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return e(t)}}(r)})}function Ht(e,t,n,r,i,a,s,o,c,u){var l,d,h,f,m,p,g,v=r&&r.__k||xt,y=v.length;for(n.__k=[],l=0;l<t.length;l++)if(null!=(f=n.__k[l]=null==(f=t[l])||"boolean"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?Ct(null,f,null,null,f):Array.isArray(f)?Ct(kt,{children:f},null,null,null):0<f.__b?Ct(f.type,f.props,f.key,f.ref||null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(h=v[l])||h&&f.key==h.key&&f.type===h.type)v[l]=void 0;else for(d=0;d<y;d++){if((h=v[d])&&f.key==h.key&&f.type===h.type){v[d]=void 0;break}h=null}qt(e,f,h=h||Nt,i,a,s,o,c,u),m=f.__e,(d=f.ref)&&h.ref!=d&&(g=g||[],h.ref&&g.push(h.ref,null,f),g.push(d,f.__c||m,f)),null!=m?(null==p&&(p=m),"function"==typeof f.type&&f.__k===h.__k?f.__d=c=function e(t,n,r){for(var i,a=t.__k,s=0;a&&s<a.length;s++)(i=a[s])&&(i.__=t,n="function"==typeof i.type?e(i,n,r):At(r,i,i,a,i.__e,n));return n}(f,c,e):c=At(e,f,h,v,m,c),"function"==typeof n.type&&(n.__d=c)):c&&h.__e==c&&c.parentNode!=e&&(c=Lt(h))}for(n.__e=p,l=y;l--;)null!=v[l]&&("function"==typeof n.type&&null!=v[l].__e&&v[l].__e==n.__d&&(n.__d=Lt(r,l+1)),function e(t,n,r){var i,a;if(N.unmount&&N.unmount(t),!(i=t.ref)||i.current&&i.current!==t.__e||Vt(i,null,n),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){N.__e(t,n)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(a=0;a<i.length;a++)i[a]&&e(i[a],n,"function"!=typeof t.type);r||null==t.__e||Ft(t.__e),t.__=t.__e=t.__d=void 0}(v[l],v[l]));if(g)for(l=0;l<g.length;l++)Vt(g[l],g[++l],g[++l])}function At(e,t,n,r,i,a){var s,o,c;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=a||null==i.parentNode)e:if(null==a||a.parentNode!==e)e.appendChild(i),s=null;else{for(o=a,c=0;(o=o.nextSibling)&&c<r.length;c+=2)if(o==i)break e;e.insertBefore(i,a),s=a}return void 0!==s?s:i.nextSibling}function Wt(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||It.test(t)?n:n+"px"}function Dt(e,t,n,r,i){var a;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Wt(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Wt(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])a=t!==(t=t.replace(/Capture$/,"")),t=(t.toLowerCase()in e?t.toLowerCase():t).slice(2),e.l||(e.l={}),(e.l[t+a]=n)?r||e.addEventListener(t,a?Ut:Bt,a):e.removeEventListener(t,a?Ut:Bt,a);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"!=typeof n&&(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function Bt(e){this.l[e.type+!1](N.event?N.event(e):e)}function Ut(e){this.l[e.type+!0](N.event?N.event(e):e)}function qt(e,t,n,r,i,a,s,o,c){var u,l,d,h,f,m,p,g,v,y,b,R,S,_=t.type;if(void 0===t.constructor){null!=n.__h&&(c=n.__h,o=t.__e=n.__e,t.__h=null,a=[o]),(u=N.__b)&&u(t);try{e:if("function"==typeof _){if(g=t.props,v=(u=_.contextType)&&r[u.__c],y=u?v?v.props.value:u.__:r,n.__c?p=(l=t.__c=n.__c).__=l.__E:("prototype"in _&&_.prototype.render?t.__c=l=new _(g,y):(t.__c=l=new jt(g,y),l.constructor=_,l.render=$t),v&&v.sub(l),l.props=g,l.state||(l.state={}),l.context=y,l.__n=r,d=l.__d=!0,l.__h=[]),null==l.__s&&(l.__s=l.state),null!=_.getDerivedStateFromProps&&(l.__s==l.state&&(l.__s=Tt({},l.__s)),Tt(l.__s,_.getDerivedStateFromProps(g,l.__s))),h=l.props,f=l.state,d)null==_.getDerivedStateFromProps&&null!=l.componentWillMount&&l.componentWillMount(),null!=l.componentDidMount&&l.__h.push(l.componentDidMount);else{if(null==_.getDerivedStateFromProps&&g!==h&&null!=l.componentWillReceiveProps&&l.componentWillReceiveProps(g,y),!l.__e&&null!=l.shouldComponentUpdate&&!1===l.shouldComponentUpdate(g,l.__s,y)||t.__v===n.__v){l.props=g,l.state=l.__s,t.__v!==n.__v&&(l.__d=!1),(l.__v=t).__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),l.__h.length&&s.push(l);break e}null!=l.componentWillUpdate&&l.componentWillUpdate(g,l.__s,y),null!=l.componentDidUpdate&&l.__h.push(function(){l.componentDidUpdate(h,f,m)})}if(l.context=y,l.props=g,l.__v=t,l.__P=e,b=N.__r,R=0,"prototype"in _&&_.prototype.render)l.state=l.__s,l.__d=!1,b&&b(t),u=l.render(l.props,l.state,l.context);else for(;l.__d=!1,b&&b(t),u=l.render(l.props,l.state,l.context),l.state=l.__s,l.__d&&++R<25;);l.state=l.__s,null!=l.getChildContext&&(r=Tt(Tt({},r),l.getChildContext())),d||null==l.getSnapshotBeforeUpdate||(m=l.getSnapshotBeforeUpdate(h,f)),S=null!=u&&u.type===kt&&null==u.key?u.props.children:u,Ht(e,Array.isArray(S)?S:[S],t,n,r,i,a,s,o,c),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),p&&(l.__E=l.__=null),l.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,a,s,o){var c,u,l,d=n.props,h=t.props,f=t.type,m=0;if("svg"===f&&(i=!0),null!=a)for(;m<a.length;m++)if((c=a[m])&&"setAttribute"in c==!!f&&(f?c.localName===f:3===c.nodeType)){e=c,a[m]=null;break}if(null==e){if(null===f)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,h.is&&h),a=null,o=!1}if(null===f)d===h||o&&e.data===h||(e.data=h);else{if(a=a&&St.call(e.childNodes),u=(d=n.props||Nt).dangerouslySetInnerHTML,l=h.dangerouslySetInnerHTML,!o){if(null!=a)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;!l&&!u||l&&(u&&l.__html==u.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||"")}if(function(e,t,n,r,i){for(var a in n)"children"===a||"key"===a||a in t||Dt(e,a,null,n[a],r);for(a in t)i&&"function"!=typeof t[a]||"children"===a||"key"===a||"value"===a||"checked"===a||n[a]===t[a]||Dt(e,a,t[a],n[a],r)}(e,h,d,i,o),l)t.__k=[];else if(m=t.props.children,Ht(e,Array.isArray(m)?m:[m],t,n,r,i&&"foreignObject"!==f,a,s,a?a[0]:n.__k&&Lt(n,0),o),null!=a)for(m=a.length;m--;)null!=a[m]&&Ft(a[m]);o||("value"in h&&void 0!==(m=h.value)&&(m!==e.value||"progress"===f&&!m||"option"===f&&m!==d.value)&&Dt(e,"value",m,d.value,!1),"checked"in h&&void 0!==(m=h.checked)&&m!==e.checked&&Dt(e,"checked",m,d.checked,!1))}return e}(n.__e,t,n,r,i,a,s,c);(u=N.diffed)&&u(t)}catch(e){t.__v=null,!c&&null==a||(t.__e=o,t.__h=!!c,a[a.indexOf(o)]=null),N.__e(e,t,n)}}}function Qt(e,t){N.__c&&N.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){N.__e(e,t.__v)}})}function Vt(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){N.__e(e,n)}}function $t(e,t,n){return this.constructor(e,n)}function L(e,t,n){var r,i,a;N.__&&N.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],qt(t,e=(!r&&n||t).__k=j(kt,null,[e]),i||Nt,Nt,void 0!==t.ownerSVGElement,!r&&n?[n]:!i&&t.firstChild?St.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r),Qt(a,e)}function Kt(e,t){var n,e={method:e,payload:t},t=e.method;if("object"!==y(e=e.payload))throw new Error("The insights helper expects the payload to be an object.");try{n=ue(e)}catch(e){throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(t,'" data-insights-payload="').concat(n,'"')}St=xt.slice,N={__e:function(e,t,n,r){for(var i,a,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&null!=a.getDerivedStateFromError&&(i.setState(a.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},_t=0,jt.prototype.setState=function(e,t){var n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Tt({},this.state);(e="function"==typeof e?e(Tt({},n),this.props):e)&&Tt(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),Mt(this))},jt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Mt(this))},jt.prototype.render=kt,wt=[],Ot.__r=0;function zt(e,t,n){for(var r=e;r&&!n(r);){if(r===t)return null;r=r.parentElement}return r}function Jt(e){return function(n){return j("div",{onClick:function(e){n.sendEvent&&(t=zt(e.target,e.currentTarget,function(e){return e.hasAttribute("data-insights-event")}))&&function(e){e=e.getAttribute("data-insights-event");if("string"!=typeof e)throw new Error("The insights middleware expects `data-insights-event` to be a base64-encoded JSON string.");try{return le(e)}catch(e){throw new Error("The insights middleware was unable to parse `data-insights-event`.")}}(t).forEach(function(e){return n.sendEvent(e)});var t=zt(e.target,e.currentTarget,function(e){return e.hasAttribute("data-insights-method")});t&&(t=(e=function(e){var t=e.getAttribute("data-insights-method");if("string"!=typeof(e=e.getAttribute("data-insights-payload")))throw new Error("The insights helper expects `data-insights-payload` to be a base64-encoded JSON string.");try{return{method:t,payload:le(e)}}catch(e){throw new Error("The insights helper was unable to parse `data-insights-payload`.")}}(t)).method,e=e.payload,n.insights(t,e))}},j(e,n))}}function Zt(r){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(r,Xt()),function(s){var e=s||{},t=e.items,e=e.transformItems,o=void 0===e?function(e){return e}:e;if(!Array.isArray(t))throw new Error(Xt("The `items` option expects an array of objects."));var c=t,e=c.filter(function(e){return!0===e.default});if(0===e.length)throw new Error(Xt("A default value must be specified in `items`."));if(1<e.length)throw new Error(Xt("More than one default value is specified in `items`."));var n=e[0],u=function(t){return function(e){return(e||0===e?t.setQueryParameter("hitsPerPage",e):t.setQueryParameter("hitsPerPage",void 0)).search()}},l=function(e){var t=e.state,n=e.createURL;return function(e){return n(t.resetPage().setQueryParameter("hitsPerPage",e||0===e?e:void 0))}};return{$$type:"ais.hitsPerPage",init:function(e){var t=e.state,n=e.instantSearchInstance;c.some(function(e){return Number(t.hitsPerPage)===Number(e.value)})||(c=[{value:"",label:""}].concat(w(c))),r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:n}),!0)},render:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return i(),e.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(e,t){return C(C({},e),{},{hitsPerPage:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,n=e.state,r=e.results,i=e.createURL,e=e.helper,a=!!r&&0<r.nbHits;return{items:o((t=n.hitsPerPage,c.map(function(e){return C(C({},e),{},{isRefined:Number(e.value)===Number(t)})})),{results:r}),refine:u(e),createURL:l({state:n,createURL:i}),hasNoResults:!a,canRefine:a,widgetParams:s}},getWidgetUiState:function(e,t){t=t.searchParameters.hitsPerPage;return void 0===t||t===n.value?e:C(C({},e),{},{hitsPerPage:t})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameters({hitsPerPage:t.hitsPerPage||n.value})}}}}var Yt=Rt(mt),Xt=l({name:"hits-per-page",connector:!0}),Gt=["page"],en=l({name:"infinite-hits",connector:!0});function tn(e){e=e||{};e.page;return E(e,Gt)}function nn(i){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(i,en()),function(d){var n,r,h,f,m,p,e=d||{},t=e.escapeHTML,g=void 0===t||t,t=e.transformItems,v=void 0===t?function(e){return e}:t,t=e.cache,y=void 0===t?(r=n=null,{read:function(e){e=e.state;return ke(r,tn(e))?n:null},write:function(e){var t=e.state,e=e.hits;r=tn(t),n=e}}):t,b=function(e,t){e=e.page,e=void 0===e?0:e,t=Object.keys(t).map(Number);return 0===t.length?e:Math.min.apply(Math,[e].concat(w(t)))},R=function(e,t){e=e.page,e=void 0===e?0:e,t=Object.keys(t).map(Number);return 0===t.length?e:Math.max.apply(Math,[e].concat(w(t)))};return{$$type:"ais.infiniteHits",init:function(e){i(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=e.instantSearchInstance,e=this.getWidgetRenderState(e);i(C(C({},e),{},{instantSearchInstance:t}),!1),m("view",e.currentPageHits)},getRenderState:function(e,t){return C(C({},e),{},{infiniteHits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,n,r,i=e.results,a=e.helper,s=e.parent,o=e.state,e=e.instantSearchInstance,c=[],s=s.getPreviousState()||o,o=y.read({state:s})||{},u=i?(u=void 0===(u=s.page)?0:u,g&&0<i.hits.length&&(i.hits=se(i.hits)),l=Ce(Fe(i.hits,i.page,i.hitsPerPage),i.queryID),l=v(l,{results:i}),void 0!==o[u]||i.__isArtificial||"idle"!==e.status||(o[u]=l,y.write({state:s,hits:o})),c=l,0===b(s,o)):(h=function(){n.overrideStateWithoutTriggeringChangeEvent(C(C({},n.state),{},{page:b(n.state,y.read({state:n.state})||{})-1})).searchWithoutTriggeringOnStateChange()},f=function(){t.setPage(R(t.state,y.read({state:t.state})||{})+1).search()},m=he({instantSearchInstance:e,index:(t=n=a).getIndex(),widgetType:this.$$type}),p=fe({index:a.getIndex(),widgetType:this.$$type,instantSearchInstance:e}),void 0===s.page||0===b(s,o)),l=(r=o,Object.keys(r).map(Number).sort(function(e,t){return e-t}).reduce(function(e,t){return e.concat(r[t])},[])),a=!i||i.nbPages<=R(s,o)+1;return{hits:l,currentPageHits:c,sendEvent:m,bindEvent:p,results:i,showPrevious:h,showMore:f,isFirstPage:u,isLastPage:a,widgetParams:d}},dispose:function(e){e=e.state,a(),e=e.setQueryParameter("page",void 0);return g?e.setQueryParameters(Object.keys(re).reduce(function(e,t){return C(C({},e),{},F({},t,void 0))},{})):e},getWidgetUiState:function(e,t){t=t.searchParameters.page||0;return t?C(C({},e),{},{page:t+1}):e},getWidgetSearchParameters:function(e,t){var t=t.uiState,n=e,e=(g&&(n=e.setQueryParameters(re)),t.page?t.page-1:0);return n.setQueryParameter("page",e)}}}}function rn(n){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,cn()),function(u){var l,d,h,e=u||{},f=e.attribute,t=e.limit,r=void 0===t?10:t,t=e.showMore,m=void 0!==t&&t,t=e.showMoreLimit,i=void 0===t?20:t,t=e.sortBy,p=void 0===t?un:t,t=e.transformItems,g=void 0===t?function(e){return e}:t;if(!f)throw new Error(cn("The `attribute` option is required."));if(!0===m&&i<=r)throw new Error(cn("The `showMoreLimit` option must be greater than `limit`."));var v=!1,y=function(){};function b(){y()}function R(){return v?i:r}return{$$type:"ais.menu",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return a(),e.removeHierarchicalFacet(f).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return C(C({},e),{},{menu:C(C({},e.menu),{},F({},f,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n,r=e.results,i=e.createURL,a=e.instantSearchInstance,s=e.helper,o=[],c=!1;return l=l||ce({instantSearchInstance:a,helper:s,attribute:f,widgetType:this.$$type}),d=d||function(e){return i(s.state.resetPage().toggleFacetRefinement(f,e))},h=h||function(e){var t=k(s.getHierarchicalFacetBreadcrumb(f),1)[0];l("click",e||t),s.toggleFacetRefinement(f,e||t).search()},e.results&&(t=e,n=this,y=function(){v=!v,n.render(t)}),r&&(e=(a=r.getFacetValues(f,{sortBy:p,facetOrdering:p===un}))&&!Array.isArray(a)&&a.data?a.data:[],c=m&&(v||e.length>R()),o=g(e.slice(0,R()).map(function(e){var t=e.name,n=e.escapedValue;e.path;return C(C({},E(e,on)),{},{label:t,value:n})}),{results:r})),{items:o,createURL:d,refine:h,sendEvent:l,canRefine:0<o.length,widgetParams:u,isShowingMore:v,toggleShowMore:b,canToggleShowMore:c}},getWidgetUiState:function(e,t){t=k(t.searchParameters.getHierarchicalFacetBreadcrumb(f),1)[0];return t?C(C({},e),{},{menu:C(C({},e.menu),{},F({},f,t))}):e},getWidgetSearchParameters:function(e,t){var t=t.uiState,t=t.menu&&t.menu[f],e=e.removeHierarchicalFacet(f).addHierarchicalFacet({name:f,attributes:[f]}),n=e.maxValuesPerFacet||0,n=Math.max(n,m?i:r),e=e.setQueryParameter("maxValuesPerFacet",n);return t?e.addHierarchicalFacetRefinement(f,t):e.setQueryParameters({hierarchicalFacetsRefinements:C(C({},e.hierarchicalFacetsRefinements),{},F({},f,[]))})}}}}function an(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,ln()),function(h){var f,e=h||{},t=e.attribute,m=void 0===t?"":t,t=e.items,p=void 0===t?[]:t,t=e.transformItems,g=void 0===t?function(e){return e}:t;if(""===m)throw new Error(ln("The `attribute` option is required."));if(p&&0!==p.length)return f={},{$$type:"ais.numericMenu",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return r(),e.clearRefinements(m)},getWidgetUiState:function(e,t){var t=t.searchParameters.getNumericRefinements(m),n=t["="]&&t["="][0];return n||0===n?C(C({},e),{},{numericMenu:C(C({},e.numericMenu),{},F({},m,"".concat(t["="])))}):(n=t[">="]&&t[">="][0]||"",t=t["<="]&&t["<="][0]||"",""===n&&""===t?e:C(C({},e),{},{numericMenu:C(C({},e.numericMenu),{},F({},m,"".concat(n,":").concat(t)))}))},getWidgetSearchParameters:function(e,t){var n,t=t.uiState,t=t.numericMenu&&t.numericMenu[m],e=e.clearRefinements(m);return t?-1===t.indexOf(":")?e.addNumericRefinement(m,"=",Number(t)):(n=(t=k(t.split(":").map(parseFloat),2))[0],t=t[1],n=R(n)?e.addNumericRefinement(m,">=",n):e,R(t)?n.addNumericRefinement(m,"<=",t):n):e.setQueryParameters({numericRefinements:C(C({},e.numericRefinements),{},F({},m,{}))})},getRenderState:function(e,t){return C(C({},e),{},{numericMenu:C(C({},e.numericMenu),{},F({},m,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,r,n,i=e.results,a=e.state,s=e.instantSearchInstance,o=e.helper,c=e.createURL,e=(f.refine||(f.refine=function(e){var t=hn(o.state,m,e);f.sendEvent("click",e),o.setState(t).search()}),f.createURL||(f.createURL=function(t){return function(e){return c(hn(t,m,e))}}),f.sendEvent||(f.sendEvent=(t={instantSearchInstance:s}.instantSearchInstance,function(){1===arguments.length&&t.sendEventToInsights(arguments.length<=0?void 0:arguments[0])})),!i||0===i.nbHits),s=(r=a,p.map(function(e){var t=e.start,n=e.end,e=e.label;return{label:e,value:encodeURI(JSON.stringify({start:t,end:n})),isRefined:dn(r,m,{start:t,end:n,label:e})}})),u=!0,l=function(e,t){var n,r,i,a,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return r=!(n=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==s.return||s.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(s=Q(e))||t&&e&&"number"==typeof e.length)return s&&(e=s),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(s);try{for(l.s();!(n=l.n()).done;){var d=n.value;if(d.isRefined&&"{}"!==decodeURI(d.value)){u=!1;break}}}catch(e){l.e(e)}finally{l.f()}return{createURL:f.createURL(a),items:g(s,{results:i}),hasNoResults:e,canRefine:!(e&&u),refine:f.refine,sendEvent:f.sendEvent,widgetParams:h}}};throw new Error(ln("The `items` option expects an array of objects."))}}var sn=Rt(nn),on=["name","escapedValue","path"],cn=l({name:"menu",connector:!0}),un=["isRefined","name:asc"],ln=l({name:"numeric-menu",connector:!0});function dn(e,t,n){var r=e.getNumericRefinements(t);return void 0!==n.start&&void 0!==n.end?n.start===n.end?fn(r,"=",n.start):fn(r,">=",n.start)&&fn(r,"<=",n.end):void 0!==n.start?fn(r,">=",n.start):void 0!==n.end?fn(r,"<=",n.end):void 0===n.start&&void 0===n.end&&Object.keys(r).every(function(e){return 0===(r[e]||[]).length})}function hn(e,t,n){var n=JSON.parse(decodeURI(n)),r=e.getNumericRefinements(t);if(void 0===n.start&&void 0===n.end)return e.removeNumericRefinement(t);if(dn(e,t,n)||(e=e.removeNumericRefinement(t)),void 0!==n.start&&void 0!==n.end){if(n.start>n.end)throw new Error("option.start should be > to option.end");if(n.start===n.end)return e=fn(r,"=",n.start)?e.removeNumericRefinement(t,"=",n.start):e.addNumericRefinement(t,"=",n.start)}return void 0!==n.start&&(e=(e=fn(r,">=",n.start)?e.removeNumericRefinement(t,">=",n.start):e).addNumericRefinement(t,">=",n.start)),"number"==typeof(e=void 0!==n.end?(e=fn(r,"<=",n.end)?e.removeNumericRefinement(t,"<=",n.end):e).addNumericRefinement(t,"<=",n.end):e).page&&(e.page=0),e}function fn(e,t,n){return void 0!==e[t]&&e[t].includes(n)}function mn(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,gn()),function(s){var e=s||{},o=e.totalPages,e=e.padding,c=new pn({currentPage:0,total:0,padding:void 0===e?3:e}),u={};return{$$type:"ais.pagination",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),e.setQueryParameter("page",void 0)},getWidgetUiState:function(e,t){t=t.searchParameters.page||0;return t?C(C({},e),{},{page:t+1}):e},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.page?t.page-1:0;return e.setQueryParameter("page",t)},getWidgetRenderState:function(e){var t=e.results,n=e.helper,r=e.state,i=e.createURL,e=(u.refine||(u.refine=function(e){n.setPage(e),n.search()}),u.createURL||(u.createURL=function(t){return function(e){return i(t.setPage(e))}}),r.page||0),a=(a=(a=t||{nbPages:0}).nbPages,void 0!==o?Math.min(o,a):a);return c.currentPage=e,c.total=a,{createURL:u.createURL(r),refine:u.refine,canRefine:1<a,currentRefinement:e,nbHits:(null==t?void 0:t.nbHits)||0,nbPages:a,pages:t?c.pages():[],isFirstPage:c.isFirstPage(),isLastPage:c.isLastPage(),widgetParams:s}},getRenderState:function(e,t){return C(C({},e),{},{pagination:this.getWidgetRenderState(t)})}}}}var pn=function(){function t(e){A(this,t),F(this,"currentPage",void 0),F(this,"total",void 0),F(this,"padding",void 0),this.currentPage=e.currentPage,this.total=e.total,this.padding=e.padding}return W(t,[{key:"pages",value:function(){var e,t=this.total,n=this.currentPage,r=this.padding;return 0===t?[0]:Je((e=this.nbPagesDisplayed(r,t))===t?{end:t}:{start:n-(r=this.calculatePaddingLeft(n,r,t,e)),end:n+(e-r)})}},{key:"nbPagesDisplayed",value:function(e,t){return Math.min(2*e+1,t)}},{key:"calculatePaddingLeft",value:function(e,t,n,r){return e<=t?e:n-t<=e?r-(n-e):t}},{key:"isLastPage",value:function(){return this.currentPage===this.total-1||0===this.total}},{key:"isFirstPage",value:function(){return 0===this.currentPage}}]),t}(),gn=l({name:"pagination",connector:!0}),vn=l({name:"range-input",connector:!0},{name:"range-slider",connector:!0});function yn(e){var t=e.min,n=e.max,e=e.precision,e=Math.pow(10,e);return{min:t&&Math.floor(t*e)/e,max:n&&Math.ceil(n*e)/e}}function bn(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,vn()),function(o){var e=o||{},t=e.attribute,u=void 0===t?"":t,l=e.min,d=e.max,t=e.precision,h=void 0===t?0:t;if(!u)throw new Error(vn("The `attribute` option is required."));if(R(l)&&R(d)&&d<l)throw new Error(vn("The `max` option can't be lower than `min`."));var c={from:function(e){return e.toLocaleString()},to:function(e){return Number(Number(e).toFixed(h)).toLocaleString()}},i=function(e,t,n,r){var e=e.state,i=t.min,t=t.max,a=k(e.getNumericRefinement(u,">=")||[],1)[0],s=k(e.getNumericRefinement(u,"<=")||[],1)[0],o=void 0===n||""===n,c=void 0===r||""===r,n=yn({min:o?void 0:parseFloat(n),max:c?void 0:parseFloat(r),precision:h}),r=n.min,n=n.max,o=R(l)||i!==r?R(l)&&o?l:r:void 0,r=R(d)||t!==n?R(d)&&c?d:n:void 0,c=void 0===o,n=R(i)&&i<=o,c=c||R(o)&&(!R(i)||n),i=void 0===r,n=R(r)&&r<=t,i=i||R(r)&&(!R(t)||n);return(a!==o||s!==r)&&c&&i?(e=e.removeNumericRefinement(u),R(o)&&(e=e.addNumericRefinement(u,">=",o)),(e=R(r)?e.addNumericRefinement(u,"<=",r):e).resetPage()):null};function f(n,r){return function(){var e=k(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[void 0,void 0],2),t=e[0],e=e[1],t=i(n,r,t,e);t&&n.setState(t).search()}}return{$$type:"ais.range",init:function(e){n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return C(C({},e),{},{range:C(C({},e.range),{},F({},u,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n=e.results,r=e.helper,e=e.instantSearchInstance,i=Re(n&&n.disjunctiveFacets||[],function(e){return e.name===u}),i=i&&i.stats||{min:void 0,max:void 0},a=(i=i,a=R(l)?l:R(i.min)?i.min:0,i=R(d)?d:R(i.max)?i.max:0,yn({min:a,max:i,precision:h})),s=(s=k((i=r).getNumericRefinement(u,">=")||[],1)[0],i=k(i.getNumericRefinement(u,"<=")||[],1)[0],[R(s)?s:-1/0,R(i)?i:1/0]),i=f(r,n?a:{min:void 0,max:void 0});return{refine:i,canRefine:a.min!==a.max,format:c,range:a,sendEvent:(t=e,function(){1===arguments.length&&t.sendEventToInsights(arguments.length<=0?void 0:arguments[0])}),widgetParams:C(C({},o),{},{precision:h}),start:s}},dispose:function(e){e=e.state;return r(),e.removeDisjunctiveFacet(u).removeNumericRefinement(u)},getWidgetUiState:function(e,t){var t=t.searchParameters.getNumericRefinements(u),n=t[">="],n=void 0===n?[]:n,t=t["<="],t=void 0===t?[]:t;return 0===n.length&&0===t.length?e:C(C({},e),{},{range:C(C({},e.range),{},F({},u,"".concat(n,":").concat(t)))})},getWidgetSearchParameters:function(e,t){var n,t=t.uiState,e=e.addDisjunctiveFacet(u).setQueryParameters({numericRefinements:C(C({},e.numericRefinements),{},F({},u,{}))}),t=(R(l)&&(e=e.addNumericRefinement(u,">=",l)),R(d)&&(e=e.addNumericRefinement(u,"<=",d)),t.range&&t.range[u]);return e=t&&-1!==t.indexOf(":")&&(n=(t=k(t.split(":").map(parseFloat),2))[0],t=t[1],R(n)&&(!R(l)||l<n)&&(e=(e=e.removeNumericRefinement(u,">=")).addNumericRefinement(u,">=",n)),R(t))&&(!R(d)||t<d)?(e=e.removeNumericRefinement(u,"<=")).addNumericRefinement(u,"<=",t):e}}}}function Rn(c){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(c,Cn()),function(d){var e=d||{},h=e.attribute,t=e.operator,i=void 0===t?"or":t,t=e.limit,f=void 0===t?10:t,t=e.showMore,m=void 0!==t&&t,t=e.showMoreLimit,a=void 0===t?20:t,t=e.sortBy,p=void 0===t?En:t,t=e.escapeFacetValues,o=void 0===t||t,t=e.transformItems,g=void 0===t?function(e){return e}:t;if(!h)throw new Error(Cn("The `attribute` option is required."));if(!/^(and|or)$/.test(i))throw new Error(Cn('The `operator` must one of: `"and"`, `"or"` (got "'.concat(i,'").')));if(!0===m&&a<=f)throw new Error(Cn("`showMoreLimit` should be greater than `limit`."));function v(e){var t=e.name,n=e.escapedValue;return C(C({},E(e,Tn)),{},{value:n,label:t,highlighted:t})}var y,b,R,S=[],_=!0,w=!1,P=function(){};function N(){P()}function x(){return w?a:f}function I(a,s){return function(i){return function(e){var t,n=i.instantSearchInstance,r=i.results;""===e&&S?c(C(C({},s.getWidgetRenderState(C(C({},i),{},{results:y}))),{},{instantSearchInstance:n}),!1):(t={highlightPreTag:(o?re:u).highlightPreTag,highlightPostTag:(o?re:u).highlightPostTag},a.searchForFacetValues(h,e,Math.min(x(),100),t).then(function(e){e=o?e.facetHits.map(function(e){return C(C({},e),{},{highlighted:ie(e.highlighted)})}):e.facetHits,e=g(e.map(function(e){var t=e.escapedValue,n=e.value;return C(C({},E(e,Fn)),{},{value:t,label:n})}),{results:r});c(C(C({},s.getWidgetRenderState(C(C({},i),{},{results:y}))),{},{items:e,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:n}),!1)}))}}}var T=function(){return function(){}};return{$$type:"ais.refinementList",init:function(e){c(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){c(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return C(C({},e),{},{refinementList:C(C({},e.refinementList),{},F({},h,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n,r=e.results,i=e.state,a=e.createURL,s=e.instantSearchInstance,o=e.helper,c=[],u=[],s=(R&&b&&T||(R=ce({instantSearchInstance:s,helper:o,attribute:h,widgetType:this.$$type}),b=function(e){R("click",e),o.toggleFacetRefinement(h,e).search()},T=I(o,this)),r&&(u=(s=r.getFacetValues(h,{sortBy:p,facetOrdering:p===En}))&&Array.isArray(s)?s:[],c=g(u.slice(0,x()).map(v),{results:r}),s=i.maxValuesPerFacet,l=x(),_=l<s?u.length<=l:u.length<l,y=r,S=c,e.results)&&(t=e,n=this,P=function(){w=!w,n.render(t)}),T&&T(e)),u=w&&S.length>f,l=m&&!_;return{createURL:function(e){return a(i.resetPage().toggleFacetRefinement(h,e))},items:c,refine:b,searchForItems:s,isFromSearch:!1,canRefine:0<c.length,widgetParams:d,isShowingMore:w,canToggleShowMore:u||l,toggleShowMore:N,sendEvent:R,hasExhaustiveItems:_}},dispose:function(e){e=e.state,n(),e=e.setQueryParameter("maxValuesPerFacet",void 0);return"and"===i?e.removeFacet(h):e.removeDisjunctiveFacet(h)},getWidgetUiState:function(e,t){t=t.searchParameters,t="or"===i?t.getDisjunctiveRefinements(h):t.getConjunctiveRefinements(h);return t.length?C(C({},e),{},{refinementList:C(C({},e.refinementList),{},F({},h,t))}):e},getWidgetSearchParameters:function(e,t){var t=t.uiState,n="or"===i,t=t.refinementList&&t.refinementList[h],e=e.clearRefinements(h),e=n?e.addDisjunctiveFacet(h):e.addFacet(h),r=e.maxValuesPerFacet||0,r=Math.max(r,m?a:f),e=e.setQueryParameter("maxValuesPerFacet",r);return t?t.reduce(function(e,t){return n?e.addDisjunctiveFacetRefinement(h,t):e.addFacetRefinement(h,t)},e):e.setQueryParameters(F({},r=n?"disjunctiveFacetsRefinements":"facetsRefinements",C(C({},e[r]),{},F({},h,[]))))}}}}function Sn(e,t){return t(e)}function _n(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,kn()),function(r){var i,a,e=(r||{}).queryHook,s=void 0===e?Sn:e;return{$$type:"ais.searchBox",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),e.setQueryParameter("query",void 0)},getRenderState:function(e,t){return C(C({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,n=e.searchMetadata,e=e.state;return i||(i=function(e){s(e,function(e){return t.setQuery(e).search()})},a=function(){t.setQuery("").search()}),{query:e.query||"",refine:i,clear:a,widgetParams:r,isSearchStalled:n.isSearchStalled}},getWidgetUiState:function(e,t){t=t.searchParameters.query||"";return""===t||e&&e.query===t?e:C(C({},e),{},{query:t})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameter("query",t.query||"")}}}}function wn(r){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v,o=(f(r,jn()),{});return function(i){var e=i||{},a=e.items,e=e.transformItems,s=void 0===e?function(e){return e}:e;if(Array.isArray(a))return{$$type:"ais.sortBy",init:function(e){var t=e.instantSearchInstance,e=this.getWidgetRenderState(e),n=e.currentRefinement;Re(a,function(e){return e.value===n});r(C(C({},e),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),o.initialIndex?e.setIndex(o.initialIndex):e},getRenderState:function(e,t){return C(C({},e),{},{sortBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper,r=e.state,e=e.parent,e=(!o.initialIndex&&e&&(o.initialIndex=e.getIndexName()),o.setIndex||(o.setIndex=function(e){n.setIndex(e).search()}),!t||0===t.nbHits);return{currentRefinement:r.index,options:s(a,{results:t}),refine:o.setIndex,hasNoResults:e,canRefine:!e&&0<a.length,widgetParams:i}},getWidgetUiState:function(e,t){t=t.searchParameters.index;return C(C({},e),{},{sortBy:t!==o.initialIndex?t:void 0})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameter("index",t.sortBy||o.initialIndex||e.index)}};throw new Error(jn("The `items` option expects an array of objects."))}}function Pn(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,Ln()),function(g){var v,y,b,R,e=g||{},S=e.attribute,e=e.max,_=void 0===e?5:e;if(S)return y=function(e){var t,e=e.getNumericRefinements(S);if(null!=(t=e[">="])&&t.length)return e[">="][0]},b=function(e){return function(e,t){v("click",t),e.setState(r(e.state,t)).search()}.bind(null,e)},R=function(e){var t=e.state,n=e.createURL;return function(e){return n(r(t,e))}},{$$type:Mn,init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return C(C({},e),{},{ratingMenu:C(C({},e.ratingMenu),{},F({},S,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var s,o,c,u,t,n=e.helper,r=e.results,i=e.state,a=e.instantSearchInstance,e=e.createURL,l=[],d=(v||(s=(a={instantSearchInstance:a,helper:n,getRefinedStar:function(){return y(n.state)},attribute:S}).instantSearchInstance,o=a.helper,c=a.getRefinedStar,u=a.attribute,v=function(){for(var e,t,n,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];1===i.length?s.sendEventToInsights(i[0]):(e=i[0],t=i[1],n=void 0===(n=i[2])?"Filter Applied":n,"click"===e&&c()!==Number(t)&&s.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:Mn,eventType:e,payload:{eventName:n,index:o.getIndex(),filters:["".concat(u,">=").concat(t)]},attribute:u}))}),!1),h=0,f=null==r?void 0:r.getFacetValues(S,{});if(r&&f){f.length,t=0,f.forEach(function(e){e=k(e.name.split("."),2)[1];t=Math.max(t,(void 0===e?"":e).length)});for(var m=y(i),p=1;p<_;p+=1)(function(n){var e=m===n,t=(d=d||e,f.filter(function(e){return Number(e.name)>=n&&Number(e.name)<=_}).map(function(e){return e.count}).reduce(function(e,t){return e+t},0));if(h+=t,m&&!e&&0===t)return;var r=w(new Array(Math.floor(+_))).map(function(e,t){return+t<n});l.push({stars:r,name:String(n),label:String(n),value:String(n),count:t,isRefined:e})})(p)}l=l.reverse(),a=!r||0===r.nbHits;return{items:l,hasNoResults:a,canRefine:(!a||d)&&0<h,refine:b(n),sendEvent:v,createURL:R({state:i,createURL:e}),widgetParams:g}},dispose:function(e){e=e.state;return t(),e.removeNumericRefinement(S)},getWidgetUiState:function(e,t){t=t.searchParameters,t=y(t);return"number"!=typeof t?e:C(C({},e),{},{ratingMenu:C(C({},e.ratingMenu),{},F({},S,t))})},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.ratingMenu&&t.ratingMenu[S],e=e.clearRefinements(S).addDisjunctiveFacet(S);return t?e.addNumericRefinement(S,"<=",_).addNumericRefinement(S,">=",t):e.setQueryParameters({numericRefinements:C(C({},e.numericRefinements),{},F({},S,{}))})}};throw new Error(Ln("The `attribute` option is required."));function r(e,t){var n=y(e)===Number(t),e=e.resetPage().removeNumericRefinement(S);return n?e:e.addNumericRefinement(S,"<=",_).addNumericRefinement(S,">=",Number(t))}}}function Nn(r){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(r,On()),function(n){return{$$type:"ais.stats",init:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){e()},getRenderState:function(e,t){return C(C({},e),{},{stats:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,e=e.state;return t?{hitsPerPage:t.hitsPerPage,nbHits:t.nbHits,nbSortedHits:t.nbSortedHits,areHitsSorted:void 0!==t.appliedRelevancyStrictness&&0<t.appliedRelevancyStrictness&&t.nbSortedHits!==t.nbHits,nbPages:t.nbPages,page:t.page,processingTimeMS:t.processingTimeMS,query:t.query,widgetParams:n}:{hitsPerPage:e.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:e.page||0,processingTimeMS:-1,query:e.query||"",widgetParams:n}}}}}function xn(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,Hn()),function(g){var v,y,b,R,S,e=g||{},_=e.attribute,t=e.on,e=e.off;if(_)return v=void 0!==e,y=et(void 0===t||t).map(be),b=v?et(e).map(be):void 0,S=function(t,e){var n=e.state,r=e.createURL;return function(){n=n.resetPage();var e=t?y:b,e=(e&&e.forEach(function(e){n=n.removeDisjunctiveFacetRefinement(_,e)}),t?b:y);return e&&e.forEach(function(e){n=n.addDisjunctiveFacetRefinement(_,e)}),r(n)}},{$$type:An,init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return r(),e.removeDisjunctiveFacet(_)},getRenderState:function(e,t){return C(C({},e),{},{toggleRefinement:C(C({},e.toggleRefinement),{},F({},_,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var n,t,s,o,c,u,r,i=e.state,a=e.helper,l=e.results,d=e.createURL,e=e.instantSearchInstance,h=l?y.every(function(e){return i.isDisjunctiveFacetRefined(_,e)}):y.every(function(e){return i.isDisjunctiveFacetRefined(_,e)}),f={isRefined:h,count:0},m={isRefined:v&&!h,count:0},p=(l&&(p=et(b||!1),n=l.getFacetValues(_,{})||[],t=y.map(function(t){return Re(n,function(e){return e.escapedValue===be(String(t))})}).filter(function(e){return void 0!==e}),p=v?p.map(function(t){return Re(n,function(e){return e.escapedValue===be(String(t))})}).filter(function(e){return void 0!==e}):[],f={isRefined:!!t.length&&t.every(function(e){return e.isRefined}),count:t.reduce(function(e,t){return e+t.count},0)||null},m={isRefined:!!p.length&&p.every(function(e){return e.isRefined}),count:p.reduce(function(e,t){return e+t.count},0)||n.reduce(function(e,t){return e+t.count},0)}),R||(s=(t={instantSearchInstance:e,attribute:_,on:y,helper:a}).instantSearchInstance,o=t.helper,c=t.attribute,u=t.on,R=function(){for(var e,t,n,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];1===i.length?s.sendEventToInsights(i[0]):(e=i[0],t=i[1],n=i[2],"click"!==e||void 0===u||t||s.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:An,eventType:e,payload:{eventName:void 0===n?"Filter Applied":n,index:o.getIndex(),filters:u.map(function(e){return"".concat(c,":").concat(e)})},attribute:c}))}),h?m:f);return{value:{name:_,isRefined:h,count:l?p.count:null,onFacetValue:f,offFacetValue:m},createURL:S(h,{state:i,createURL:d}),sendEvent:R,canRefine:Boolean(l?p.count:null),refine:(r=a,function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{isRefined:!1}).isRefined;e?(y.forEach(function(e){return r.removeDisjunctiveFacetRefinement(_,e)}),v&&b.forEach(function(e){return r.addDisjunctiveFacetRefinement(_,e)})):(R("click",e),v&&b.forEach(function(e){return r.removeDisjunctiveFacetRefinement(_,e)}),y.forEach(function(e){return r.addDisjunctiveFacetRefinement(_,e)})),r.search()}),widgetParams:g}},getWidgetUiState:function(e,t){var n=t.searchParameters,t=y&&y.every(function(e){return n.isDisjunctiveFacetRefined(_,e)});return t?C(C({},e),{},{toggle:C(C({},e.toggle),{},F({},_,t))}):e},getWidgetSearchParameters:function(e,t){var t=t.uiState,n=e.clearRefinements(_).addDisjunctiveFacet(_);return Boolean(t.toggle&&t.toggle[_])?(y&&y.forEach(function(e){n=n.addDisjunctiveFacetRefinement(_,e)}),n):v?(b&&b.forEach(function(e){n=n.addDisjunctiveFacetRefinement(_,e)}),n):n.setQueryParameters({disjunctiveFacetsRefinements:C(C({},e.disjunctiveFacetsRefinements),{},F({},_,[]))})}};throw new Error(Hn("The `attribute` option is required."))}}function In(u){var l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v,d=(f(u,Wn()),{});return function(a){var n,e=a||{},t=e.attributes,r=e.separator,i=void 0===r?" > ":r,r=e.rootPath,s=void 0===r?null:r,r=e.transformItems,o=void 0===r?function(e){return e}:r;if(t&&Array.isArray(t)&&0!==t.length)return n=k(t,1)[0],{$$type:"ais.breadcrumb",init:function(e){u(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){u(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},dispose:function(){l()},getRenderState:function(e,t){return C(C({},e),{},{breadcrumb:C(C({},e.breadcrumb),{},F({},n,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.helper,n=e.createURL,r=e.results,e=e.state;var i,e=r&&0!==e.hierarchicalFacets.length?(e=k(e.hierarchicalFacets,1)[0].name,e=(e=r.getFacetValues(e,{}))&&!Array.isArray(e)&&e.data?e.data:[],o((i=function n(e){return e.reduce(function(e,t){return e=t.isRefined&&(e.push({label:t.name,value:t.escapedValue}),Array.isArray(t.data))?e.concat(n(t.data)):e},[])}(e)).map(function(e,t){return{label:e.label,value:t+1===i.length?null:i[t+1].value}}),{results:r})):[];return d.createURL||(d.createURL=function(e){return n(c(t.state,e))}),d.refine||(d.refine=function(e){t.setState(c(t.state,e)).search()}),{canRefine:0<e.length,createURL:d.createURL,items:e,refine:d.refine,widgetParams:a}},getWidgetSearchParameters:function(e){return e.isHierarchicalFacet(n)?(e.getHierarchicalFacetByName(n),e):e.addHierarchicalFacet({name:n,attributes:t,separator:i,rootPath:s})}};throw new Error(Wn("The `attributes` option expects an array of strings."));function c(e,t){return t?e.resetPage().toggleFacetRefinement(n,t):0===(t=e.getHierarchicalFacetBreadcrumb(n)).length?e:e.resetPage().toggleFacetRefinement(n,t[0])}}}var Tn=["name","escapedValue"],Fn=["escapedValue","value"],Cn=l({name:"refinement-list",connector:!0}),En=["isRefined","count:desc","name:asc"],kn=l({name:"search-box",connector:!0}),jn=l({name:"sort-by",connector:!0}),Ln=l({name:"rating-menu",connector:!0}),Mn="ais.ratingMenu",On=l({name:"stats",connector:!0}),Hn=l({name:"toggle-refinement",connector:!0}),An="ais.toggleRefinement",Wn=l({name:"breadcrumb",connector:!0});var Dn=l({name:"geo-search",connector:!0});function Bn(e){return e.insideBoundingBox||""}function Un(e,t){return e.setQueryParameter("insideBoundingBox",t)}function qn(g){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(g,Dn()),function(o){function c(e){if(e.aroundLatLng){var e=e.aroundLatLng,t=e.match(Se);if(t)return{lat:parseFloat(t[1]),lng:parseFloat(t[2])};throw new Error('Invalid value for "aroundLatLng" parameter: "'.concat(e,'"'))}}function u(){return p.internalToggleRefineOnMapMove()}function a(e,t){return function(){p.isRefineOnMapMove=!p.isRefineOnMapMove,t(e)}}function l(){return p.isRefineOnMapMove}function d(){return p.internalSetMapMoveSinceLastRefine()}function s(t,n){return function(){var e=!0!==p.hasMapMoveSinceLastRefine;p.hasMapMoveSinceLastRefine=!0,e&&n(t)}}function h(){return p.hasMapMoveSinceLastRefine}var f,e=o||{},t=e.enableRefineOnMapMove,e=e.transformItems,m=void 0===e?function(e){return e}:e,p={isRefineOnMapMove:void 0===t||t,hasMapMoveSinceLastRefine:!1,lastRefinePosition:"",lastRefineBoundingBox:"",internalToggleRefineOnMapMove:v,internalSetMapMoveSinceLastRefine:v};return{$$type:Vn,init:function(e){var t=e.instantSearchInstance;p.internalToggleRefineOnMapMove=a(e,v),p.internalSetMapMoveSinceLastRefine=s(e,v),g(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.helper,n=e.instantSearchInstance,t=t.state,r=Boolean(t.aroundLatLng)&&Boolean(p.lastRefinePosition)&&t.aroundLatLng!==p.lastRefinePosition,i=!t.insideBoundingBox&&Boolean(p.lastRefineBoundingBox)&&t.insideBoundingBox!==p.lastRefineBoundingBox,r=((r||i)&&(p.hasMapMoveSinceLastRefine=!1),p.lastRefinePosition=t.aroundLatLng||"",p.lastRefineBoundingBox=Bn(t),p.internalToggleRefineOnMapMove=a(e,this.render.bind(this)),p.internalSetMapMoveSinceLastRefine=s(e,this.render.bind(this)),this.getWidgetRenderState(e));f("view",r.items),g(C(C({},r),{},{instantSearchInstance:n}),!1)},getWidgetRenderState:function(e){var t,n,r,i=e.helper,a=e.results,e=e.instantSearchInstance,s=i.state,a=a?m(a.hits.filter(function(e){return e._geoloc}),{results:a}):[];return f=f||he({instantSearchInstance:e,index:i.getIndex(),widgetType:Vn}),{items:a,position:c(s),currentRefinement:(e=s).insideBoundingBox&&_e(e.insideBoundingBox),refine:function(e){var t=e.northEast,e=e.southWest,t=[t.lat,t.lng,e.lat,e.lng].join();r.setState(Un(r.state,t).resetPage()).search(),p.hasMapMoveSinceLastRefine=!1,p.lastRefineBoundingBox=t},sendEvent:f,clearMapRefinement:(n=r=i,function(){n.setQueryParameter("insideBoundingBox",void 0).search()}),isRefinedWithMap:(t=s,function(){return Boolean(t.insideBoundingBox)}),toggleRefineOnMapMove:u,isRefineOnMapMove:l,setMapMoveSinceLastRefine:d,hasMapMoveSinceLastRefine:h,widgetParams:o}},getRenderState:function(e,t){return C(C({},e),{},{geoSearch:this.getWidgetRenderState(t)})},dispose:function(e){e=e.state;return n(),e.setQueryParameter("insideBoundingBox",void 0)},getWidgetUiState:function(e,t){t=Bn(t.searchParameters);return!t||e&&e.geoSearch&&e.geoSearch.boundingBox===t?e:C(C({},e),{},{geoSearch:{boundingBox:t}})},getWidgetSearchParameters:function(e,t){t=t.uiState;return t&&t.geoSearch?Un(e,t.geoSearch.boundingBox):e.setQueryParameter("insideBoundingBox",void 0)}}}}function Qn(r){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v,a=(f(r,$n()),"https://www.algolia.com/?utm_source=instantsearch.js&utm_medium=website&"+"utm_content=".concat(Ge(function(e){return(null==(e=e.window.location)?void 0:e.hostname)||""},{fallback:function(){return""}}),"&")+"utm_campaign=poweredby");return function(e){var t=(e||{}).url,n=void 0===t?a:t;return{$$type:"ais.poweredBy",init:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return C(C({},e),{},{poweredBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{url:n,widgetParams:e}},dispose:function(){i()}}}}var Vn="ais.geoSearch",$n=l({name:"powered-by",connector:!0});function Kn(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function zn(e,t){var n,r;if(e!==t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&"__proto__"!==i&&"constructor"!==i&&(n=t[i],void 0!==(r=e[i])&&void 0===n||(Kn(r)&&Kn(n)?e[i]=zn(r,n):e[i]="object"==typeof(r=n)&&null!==r?zn(Array.isArray(r)?[]:{},r):r));return e}function Jn(){return Array.prototype.slice.call(arguments).reduceRight(function(t,n){return Object.keys(Object(n)).forEach(function(e){void 0!==n[e]&&(void 0!==t[e]&&delete t[e],t[e]=n[e])}),t},{})}var Zn=function(e){Kn(e)||(e={});for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];Kn(r)&&zn(e,r)}return e};var Yn=function(n,r){return n.filter(function(e,t){return-1<r.indexOf(e)&&n.indexOf(e)===t})},p=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]};var Xn=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")};var Gn=function(e,t){if(null===e)return{};for(var n,r={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(r[n]=e[n]);return r};var er=function(e){return e&&0<Object.keys(e).length},tr={addRefinement:function(e,t,n){var r;return tr.isRefined(e,t,n)?e:(n=""+n,n=e[t]?e[t].concat(n):[n],(r={})[t]=n,Jn({},r,e))},removeRefinement:function(e,n,t){var r;return void 0===t?tr.clearRefinement(e,function(e,t){return n===t}):(r=""+t,tr.clearRefinement(e,function(e,t){return n===t&&r===e}))},toggleRefinement:function(e,t,n){if(void 0===n)throw new Error("toggleRefinement should be used with a value");return tr.isRefined(e,t,n)?tr.removeRefinement(e,t,n):tr.addRefinement(e,t,n)},clearRefinement:function(i,a,s){var o,e;return void 0===a?er(i)?{}:i:"string"==typeof a?Gn(i,[a]):"function"==typeof a?(o=!1,e=Object.keys(i).reduce(function(e,t){var n=i[t]||[],r=n.filter(function(e){return!a(e,t,s)});return r.length!==n.length&&(o=!0),e[t]=r,e},{}),o?e:i):void 0},isRefined:function(e,t,n){var r=!!e[t]&&0<e[t].length;return void 0!==n&&r?-1!==e[t].indexOf(""+n):r}},n=tr;function nr(e,n){return Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every(function(e,t){return nr(n[t],e)}):e===n}function s(e){var r=e?s._parseNumbers(e):{},i=(void 0===r.userToken||null!==(e=r.userToken)&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=r.facets||[],this.disjunctiveFacets=r.disjunctiveFacets||[],this.hierarchicalFacets=r.hierarchicalFacets||[],this.facetsRefinements=r.facetsRefinements||{},this.facetsExcludes=r.facetsExcludes||{},this.disjunctiveFacetsRefinements=r.disjunctiveFacetsRefinements||{},this.numericRefinements=r.numericRefinements||{},this.tagRefinements=r.tagRefinements||[],this.hierarchicalFacetsRefinements=r.hierarchicalFacetsRefinements||{},this);Object.keys(r).forEach(function(e){var t=-1!==s.PARAMETERS.indexOf(e),n=void 0!==r[e];!t&&n&&(i[e]=r[e])})}s.PARAMETERS=Object.keys(new s),s._parseNumbers=function(i){var r,a;return i instanceof s?i:(r={},["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(e){var t,n=i[e];"string"==typeof n&&(t=parseFloat(n),r[e]=isNaN(t)?n:t)}),Array.isArray(i.insideBoundingBox)&&(r.insideBoundingBox=i.insideBoundingBox.map(function(e){return Array.isArray(e)?e.map(function(e){return parseFloat(e)}):e})),i.numericRefinements&&(a={},Object.keys(i.numericRefinements).forEach(function(n){var r=i.numericRefinements[n]||{};a[n]={},Object.keys(r).forEach(function(e){var t=r[e].map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?parseFloat(e):e}):"string"==typeof e?parseFloat(e):e});a[n][e]=t})}),r.numericRefinements=a),Zn({},i,r))},s.make=function(e){var n=new s(e);return(e.hierarchicalFacets||[]).forEach(function(e){var t;e.rootPath&&0===(t=(n=0<(t=n.getHierarchicalRefinement(e.name)).length&&0!==t[0].indexOf(e.rootPath)?n.clearRefinements(e.name):n).getHierarchicalRefinement(e.name)).length&&(n=n.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}),n},s.validate=function(e,t){t=t||{};return e.tagFilters&&t.tagRefinements&&0<t.tagRefinements.length?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):0<e.tagRefinements.length&&t.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&t.numericRefinements&&er(t.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):er(e.numericRefinements)&&t.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},s.prototype={constructor:s,clearRefinements:function(e){e={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:n.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:n.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:n.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:n.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return e.numericRefinements===this.numericRefinements&&e.facetsRefinements===this.facetsRefinements&&e.facetsExcludes===this.facetsExcludes&&e.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&e.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(e)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,n){var r,n=Xn(n);return this.isNumericRefined(e,t,n)?this:((r=Zn({},this.numericRefinements))[e]=Zn({},r[e]),r[e][t]?(r[e][t]=r[e][t].slice(),r[e][t].push(n)):r[e][t]=[n],this.setQueryParameters({numericRefinements:r}))},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(n,r,i){return void 0!==i?this.isNumericRefined(n,r,i)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n&&e.op===r&&nr(e.val,Xn(i))})}):this:void 0!==r?this.isNumericRefined(n,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n&&e.op===r})}):this:this.isNumericRefined(n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(s){var o,t,e;return void 0===s?er(this.numericRefinements)?{}:this.numericRefinements:"string"==typeof s?Gn(this.numericRefinements,[s]):"function"==typeof s?(o=!1,t=this.numericRefinements,e=Object.keys(t).reduce(function(e,r){var i=t[r],a={},i=i||{};return Object.keys(i).forEach(function(t){var e=i[t]||[],n=[];e.forEach(function(e){s({val:e,op:t},r,"numeric")||n.push(e)}),n.length!==e.length&&(o=!0),a[t]=n}),e[r]=a,e},{}),o?e:this.numericRefinements):void 0},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:n.addRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:n.addRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return n.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:n.addRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},addTagRefinement:function(e){return this.isTagRefined(e)?this:(e={tagRefinements:this.tagRefinements.concat(e)},this.setQueryParameters(e))},removeFacet:function(t){return this.isConjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({facets:this.facets.filter(function(e){return e!==t})}):this},removeDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(e){return e!==t})}):this},removeHierarchicalFacet:function(t){return this.isHierarchicalFacet(t)?this.clearRefinements(t).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(e){return e.name!==t})}):this},removeFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:n.removeRefinement(this.facetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:n.removeRefinement(this.facetsExcludes,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return n.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:n.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},removeTagRefinement:function(t){var e;return this.isTagRefined(t)?(e={tagRefinements:this.tagRefinements.filter(function(e){return e!==t})},this.setQueryParameters(e)):this},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return this.setQueryParameters({facetsRefinements:n.toggleRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleExcludeFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return this.setQueryParameters({facetsExcludes:n.toggleRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return this.setQueryParameters({disjunctiveFacetsRefinements:n.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},toggleHierarchicalFacetRefinement:function(e,t){var n,r;if(this.isHierarchicalFacet(e))return n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={},void 0!==this.hierarchicalFacetsRefinements[e]&&0<this.hierarchicalFacetsRefinements[e].length&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+n))?-1===t.indexOf(n)?r[e]=[]:r[e]=[t.slice(0,t.lastIndexOf(n))]:r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:Jn({},r,this.hierarchicalFacetsRefinements)});throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration")},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");var n;if(this.isHierarchicalFacet(e))return(n={})[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:Jn({},n,this.hierarchicalFacetsRefinements)});throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.")},removeHierarchicalFacetRefinement:function(e){var t;return this.isHierarchicalFacetRefined(e)?((t={})[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:Jn({},t,this.hierarchicalFacetsRefinements)})):this},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return-1<this.disjunctiveFacets.indexOf(e)},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return-1<this.facets.indexOf(e)},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&n.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&n.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&n.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){return!!this.isHierarchicalFacet(e)&&(e=this.getHierarchicalRefinement(e),t?-1!==e.indexOf(t):0<e.length)},isNumericRefined:function(e,t,n){var r,i;return void 0===n&&void 0===t?!!this.numericRefinements[e]:(r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t],void 0!==n&&r?(n=Xn(n),t=void 0!==(e=this.numericRefinements[e][t],i=n,p(e,function(e){return nr(e,i)})),r&&t):r)},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var t=this,e=Yn(Object.keys(this.numericRefinements).filter(function(e){return 0<Object.keys(t.numericRefinements[e]).length}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(e){return 0<t.disjunctiveFacetsRefinements[e].length}).concat(e).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var t=this;return Yn(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(e){return 0<t.hierarchicalFacetsRefinements[e].length}))},getUnrefinedDisjunctiveFacets:function(){var t=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(e){return-1===t.indexOf(e)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var n=this.managedParameters,r={},i=this;return Object.keys(this).forEach(function(e){var t=i[e];-1===n.indexOf(e)&&void 0!==t&&(r[e]=t)}),r},setQueryParameter:function(e,t){var n;return this[e]===t?this:((n={})[e]=t,this.setQueryParameters(n))},setQueryParameters:function(e){if(!e)return this;var t=s.validate(this,e);if(t)throw t;var n=this,i=s._parseNumbers(e),t=Object.keys(this).reduce(function(e,t){return e[t]=n[t],e},{}),e=Object.keys(i).reduce(function(e,t){var n=void 0!==e[t],r=void 0!==i[t];return n&&!r?Gn(e,[t]):(r&&(e[t]=i[t]),e)},t);return new this.constructor(e)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(t){return p(this.hierarchicalFacets,function(e){return e.name===t})},getHierarchicalFacetBreadcrumb:function(e){var t;return this.isHierarchicalFacet(e)&&(t=this.getHierarchicalRefinement(e)[0])?(e=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),t.split(e).map(function(e){return e.trim()})):[]},toString:function(){return JSON.stringify(this,null,2)}};var rr=s;function ir(e){return Array.isArray(e)?e.filter(Boolean):[]}function ar(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function sr(e,t){var r=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var n=t.split(":"),t=p(r,function(e){return e[0]===n[0]});return 1<n.length||!t?(e[0].push(n[0]),e[1].push(n[1])):(e[0].push(t[0]),e[1].push(t[1])),e},[[],[]])}var or=function(e,n,i){return Array.isArray(e)?(Array.isArray(i)||(i=[]),(e=e.map(function(t,e){return{criteria:n.map(function(e){return t[e]}),index:e,value:t}})).sort(function(e,t){for(var n=-1;++n<e.criteria.length;){var r=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=void 0!==t,a=null===t;if(!a&&t<e||r&&i||!n)return 1;if(!r&&e<t||a&&n||!i)return-1}return 0}(e.criteria[n],t.criteria[n]);if(r)return!(n>=i.length)&&"desc"===i[n]?-r:r}return e.index-t.index}),e.map(function(e){return e.value})):[]};var cr=function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},e=function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")},ur=function(m){return function(e,t){function n(e,s,t){var n,o=e;if(0<t){var r=0;for(o=e;r<t;){var i=o&&Array.isArray(o.data)?o.data:[],o=p(i,function(e){return e.isRefined});r++}}return o&&(n=Object.keys(s.data).map(function(e){return[e,s.data[e]]}).filter(function(e){var t,n,r,i,a,e=e[0];return e=e,t=o.path||u,n=d,r=c,a=l,(!(i=u)||0===e.indexOf(i)&&i!==e)&&(!i&&-1===e.indexOf(r)||i&&e.split(r).length-i.split(r).length==1||-1===e.indexOf(r)&&-1===n.indexOf(r)||0===n.indexOf(e)||0===e.indexOf(t+r)&&(a||0===e.indexOf(n)))}),o.data=or(n.map(function(e){var t,n,r,i,a=e[0],e=e[1];return e=e,a=a,t=c,n=dr(d),r=s.exhaustive,{name:(i=a.split(t))[i.length-1].trim(),path:a,escapedValue:lr(a),count:e,isRefined:n===a||0===n.indexOf(a+t),exhaustive:r,data:null}}),a[0],a[1])),e}var a,c,u,l,d,r=m.hierarchicalFacets[t],i=m.hierarchicalFacetsRefinements[r.name]&&m.hierarchicalFacetsRefinements[r.name][0]||"",s=m._getHierarchicalFacetSeparator(r),o=m._getHierarchicalRootPath(r),h=m._getHierarchicalShowParentLevel(r),r=sr(m._getHierarchicalFacetSortBy(r)),f=e.every(function(e){return e.exhaustive}),r=(a=r,c=s,l=h,d=i,e);return(r=(u=o)?e.slice(o.split(s).length):r).reduce(n,{name:m.hierarchicalFacets[t].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:f,data:null})}},lr=cr,dr=e;var hr=cr,fr=e;function mr(e){var n={};return e.forEach(function(e,t){n[e]=t}),n}function pr(e,t,n){t&&t[n]&&(e.stats=t[n])}function gr(l,t,n){var o=t[0],d=(this._rawResults=t,this),e=(Object.keys(o).forEach(function(e){d[e]=o[e]}),Object.keys(n||{}).forEach(function(e){d[e]=n[e]}),this.processingTimeMS=t.reduce(function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=l.hierarchicalFacets.map(function(){return[]}),this.facets=[],l.getRefinedDisjunctiveFacets()),c=mr(l.facets),u=mr(l.disjunctiveFacets),r=1,h=o.facets||{};Object.keys(h).forEach(function(e){var t,n,r,i,a=h[e],s=(r=l.hierarchicalFacets,t=e,p(r,function(e){return-1<(e.attributes||[]).indexOf(t)}));s?(r=s.attributes.indexOf(e),n=ar(l.hierarchicalFacets,function(e){return e.name===s.name}),d.hierarchicalFacets[n][r]={attribute:e,data:a,exhaustive:o.exhaustiveFacetsCount}):(n=-1!==l.disjunctiveFacets.indexOf(e),r=-1!==l.facets.indexOf(e),n&&(i=u[e],d.disjunctiveFacets[i]={name:e,data:a,exhaustive:o.exhaustiveFacetsCount},pr(d.disjunctiveFacets[i],o.facets_stats,e)),r&&(i=c[e],d.facets[i]={name:e,data:a,exhaustive:o.exhaustiveFacetsCount},pr(d.facets[i],o.facets_stats,e)))}),this.hierarchicalFacets=ir(this.hierarchicalFacets),e.forEach(function(e){var i=t[r],a=i&&i.facets?i.facets:{},s=l.getHierarchicalFacetByName(e);Object.keys(a).forEach(function(t){var n,e,r=a[t];s?(n=ar(l.hierarchicalFacets,function(e){return e.name===s.name}),-1!==(e=ar(d.hierarchicalFacets[n],function(e){return e.attribute===t}))&&(d.hierarchicalFacets[n][e].data=Zn({},d.hierarchicalFacets[n][e].data,r))):(n=u[t],e=o.facets&&o.facets[t]||{},d.disjunctiveFacets[n]={name:t,data:Jn({},r,e),exhaustive:i.exhaustiveFacetsCount},pr(d.disjunctiveFacets[n],i.facets_stats,t),l.disjunctiveFacetsRefinements[t]&&l.disjunctiveFacetsRefinements[t].forEach(function(e){!d.disjunctiveFacets[n].data[e]&&-1<l.disjunctiveFacetsRefinements[t].indexOf(fr(e))&&(d.disjunctiveFacets[n].data[e]=0)}))}),r++}),l.getRefinedHierarchicalFacets().forEach(function(e){var o=l.getHierarchicalFacetByName(e),c=l._getHierarchicalFacetSeparator(o),u=l.getHierarchicalRefinement(e);0===u.length||u[0].split(c).length<2||t.slice(r).forEach(function(e){var s=e&&e.facets?e.facets:{};Object.keys(s).forEach(function(t){var e,n,r=s[t],i=ar(l.hierarchicalFacets,function(e){return e.name===o.name}),a=ar(d.hierarchicalFacets[i],function(e){return e.attribute===t});-1!==a&&(e={},0<u.length&&(e[n=u[0].split(c)[0]]=d.hierarchicalFacets[i][a].data[n]),d.hierarchicalFacets[i][a].data=Jn(e,r,d.hierarchicalFacets[i][a].data))}),r++})}),Object.keys(l.facetsExcludes).forEach(function(t){var e=l.facetsExcludes[t],n=c[t];d.facets[n]={name:t,data:o.facets[t],exhaustive:o.exhaustiveFacetsCount},e.forEach(function(e){d.facets[n]=d.facets[n]||{name:t},d.facets[n].data=d.facets[n].data||{},d.facets[n].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(ur(l)),this.facets=ir(this.facets),this.disjunctiveFacets=ir(this.disjunctiveFacets),this._state=l}function vr(n,r){function e(e){return e.name===r}var i,a,t,s;return n._state.isConjunctiveFacet(r)?(i=p(n.facets,e))?Object.keys(i.data).map(function(e){var t=hr(e);return{name:e,escapedValue:t,count:i.data[e],isRefined:n._state.isFacetRefined(r,t),isExcluded:n._state.isExcludeRefined(r,e)}}):[]:n._state.isDisjunctiveFacet(r)?(a=p(n.disjunctiveFacets,e))?Object.keys(a.data).map(function(e){var t=hr(e);return{name:e,escapedValue:t,count:a.data[e],isRefined:n._state.isDisjunctiveFacetRefined(r,t)}}):[]:n._state.isHierarchicalFacet(r)?((t=p(n.hierarchicalFacets,e))&&(s=n._state.getHierarchicalFacetByName(r),(s=fr(n._state.getHierarchicalRefinement(r)[0]||"").split(n._state._getHierarchicalFacetSeparator(s))).unshift(r),function t(e,n,r){e.isRefined=e.name===n[r];e.data&&e.data.forEach(function(e){t(e,n,r+1)})}(t,s,0)),t):void 0}function yr(e,t){e=p(e,function(e){return e.name===t});return e&&e.stats}function br(e,t,n,r,i){var i=p(i,function(e){return e.name===n}),a=i&&i.data&&i.data[r]?i.data[r]:0,i=i&&i.exhaustive||!1;return{type:t,attributeName:n,name:r,count:a,exhaustive:i}}gr.prototype.getFacetByName=function(t){function e(e){return e.name===t}return p(this.facets,e)||p(this.disjunctiveFacets,e)||p(this.hierarchicalFacets,e)},gr.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],gr.prototype.getFacetValues=function(e,t){var s,o,n=vr(this,e);if(n)return s=Jn({},t,{sortBy:gr.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),o=this,function t(n,e,r,i){var a;return i=i||0,Array.isArray(e)?n(e,r[i]):e.data&&0!==e.data.length?(a=e.data.map(function(e){return t(n,e,r,i+1)}),a=n(a,r[i]),Jn({data:a},e)):e}(function(e,t){if(s.facetOrdering){t=t;a=(a=o).renderingContent&&a.renderingContent.facetOrdering&&a.renderingContent.facetOrdering.values&&a.renderingContent.facetOrdering.values[t];if(Boolean(a))return t=e,n=[],r=[],i=((a=a).order||[]).reduce(function(e,t,n){return e[t]=n,e},{}),t.forEach(function(e){var t=e.path||e.name;void 0!==i[t]?n[i[t]]=e:r.push(e)}),n=n.filter(function(e){return e}),"hidden"===(t=a.sortRemainingBy)?n:n.concat(or(r,(a="alpha"===t?[["path","name"],["asc","asc"]]:[["count"],["desc"]])[0],a[1]))}var n,r,i,a;if(Array.isArray(s.sortBy))return t=sr(s.sortBy,gr.DEFAULT_SORT),or(e,t[0],t[1]);if("function"==typeof s.sortBy)return a=s.sortBy,e.sort(a);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},n,Array.isArray(n)?[e]:o._state.getHierarchicalFacetByName(n.name).attributes)},gr.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?yr(this.facets,e):this._state.isDisjunctiveFacet(e)?yr(this.disjunctiveFacets,e):void 0},gr.prototype.getRefinements=function(){var s=this._state,o=this,c=[];return Object.keys(s.facetsRefinements).forEach(function(t){s.facetsRefinements[t].forEach(function(e){c.push(br(0,"facet",t,e,o.facets))})}),Object.keys(s.facetsExcludes).forEach(function(t){s.facetsExcludes[t].forEach(function(e){c.push(br(0,"exclude",t,e,o.facets))})}),Object.keys(s.disjunctiveFacetsRefinements).forEach(function(t){s.disjunctiveFacetsRefinements[t].forEach(function(e){c.push(br(0,"disjunctive",t,e,o.disjunctiveFacets))})}),Object.keys(s.hierarchicalFacetsRefinements).forEach(function(a){s.hierarchicalFacetsRefinements[a].forEach(function(e){var t,n,r,i;c.push((t=s,n=a,e=e,r=o.hierarchicalFacets,i=t.getHierarchicalFacetByName(n),t=t._getHierarchicalFacetSeparator(i),i=e.split(t),e=p(r,function(e){return e.name===n}),t=i.reduce(function(e,t){var n=e&&p(e.data,function(e){return e.name===t});return void 0!==n?n:e},e),r=t&&t.count||0,i=t&&t.exhaustive||!1,e=t&&t.path||"",{type:"hierarchical",attributeName:n,name:e,count:r,exhaustive:i}))})}),Object.keys(s.numericRefinements).forEach(function(n){var e=s.numericRefinements[n];Object.keys(e).forEach(function(t){e[t].forEach(function(e){c.push({type:"numeric",attributeName:n,name:e,numericValue:e,operator:t})})})}),s.tagRefinements.forEach(function(e){c.push({type:"tag",attributeName:"_tags",name:e})}),c};var Rr=gr;function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var Sr=r;function _r(e){return"function"==typeof e}function wr(e){return"object"==typeof e&&null!==e}function Pr(e){return void 0===e}r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,i,a,s,o;if((this._events||(this._events={}),"error"===e)&&(!this._events.error||wr(this._events.error)&&!this._events.error.length))throw(o=arguments[1])instanceof Error?o:((s=new Error('Uncaught, unspecified "error" event. ('+o+")")).context=o,s);if(Pr(t=this._events[e]))return!1;if(_r(t))switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:r=Array.prototype.slice.call(arguments,1),t.apply(this,r)}else if(wr(t))for(r=Array.prototype.slice.call(arguments,1),n=(a=t.slice()).length,i=0;i<n;i++)a[i].apply(this,r);return!0},r.prototype.on=r.prototype.addListener=function(e,t){if(_r(t))return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,_r(t.listener)?t.listener:t),this._events[e]?wr(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,wr(this._events[e])&&!this._events[e].warned&&(t=Pr(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&0<t&&this._events[e].length>t&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace)&&console.trace(),this;throw TypeError("listener must be a function")},r.prototype.once=function(e,t){var n;if(_r(t))return n=!1,r.listener=t,this.on(e,r),this;throw TypeError("listener must be a function");function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}},r.prototype.removeListener=function(e,t){var n,r,i,a;if(!_r(t))throw TypeError("listener must be a function");if(this._events&&this._events[e])if(i=(n=this._events[e]).length,r=-1,n===t||_r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(wr(n)){for(a=i;0<a--;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(this._events)if(this._events.removeListener)if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);this.removeAllListeners("removeListener"),this._events={}}else{if(_r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);delete this._events[e]}else 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e];return this},r.prototype.listeners=function(e){e=this._events&&this._events[e]?_r(this._events[e])?[this._events[e]]:this._events[e].slice():[];return e},r.prototype.listenerCount=function(e){if(this._events){e=this._events[e];if(_r(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)};e=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})};function Nr(e,t){this.main=e,this.fn=t,this.lastResults=null}e(Nr,Sr),Nr.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},Nr.prototype.getModifiedState=function(e){return this.fn(e)};var xr=Nr;function Ir(n){return Object.keys(n).sort(function(e,t){return e.localeCompare(t)}).reduce(function(e,t){return e[t]=n[t],e},{})}var d={_getQueries:function(o,c){var u=[];return u.push({indexName:o,params:d._getHitsSearchParams(c)}),c.getRefinedDisjunctiveFacets().forEach(function(e){u.push({indexName:o,params:d._getDisjunctiveFacetSearchParams(c,e)})}),c.getRefinedHierarchicalFacets().forEach(function(e){var a,s=c.getHierarchicalFacetByName(e),e=c.getHierarchicalRefinement(e),r=c._getHierarchicalFacetSeparator(s);0<e.length&&1<e[0].split(r).length&&(a=e[0].split(r).slice(0,-1).reduce(function(e,t,n){return e.concat({attribute:s.attributes[n],value:0===n?t:[e[e.length-1].value,t].join(r)})},[])).forEach(function(e,t){e=d._getDisjunctiveFacetSearchParams(c,e.attribute,0===t);function r(t){return s.attributes.some(function(e){return e===t.split(":")[0]})}var n=(e.facetFilters||[]).reduce(function(e,t){var n;return Array.isArray(t)&&0<(n=t.filter(function(e){return!r(e)})).length&&e.push(n),"string"!=typeof t||r(t)||e.push(t),e},[]),i=a[t-1];e.facetFilters=0<t?n.concat(i.attribute+":"+i.value):0<n.length?n:void 0,u.push({indexName:o,params:e})})}),u},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(d._getHitsHierarchicalFacetsAttributes(e)),n=d._getFacetFilters(e),r=d._getNumericFilters(e),i=d._getTagFilters(e),t={facets:-1<t.indexOf("*")?["*"]:t,tagFilters:i};return 0<n.length&&(t.facetFilters=n),0<r.length&&(t.numericFilters=r),Ir(Zn({},e.getQueryParams(),t))},_getDisjunctiveFacetSearchParams:function(e,t,n){var r=d._getFacetFilters(e,t,n),i=d._getNumericFilters(e,t),a=d._getTagFilters(e),s={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1},a=(0<a.length&&(s.tagFilters=a),e.getHierarchicalFacetByName(t));return s.facets=a?d._getDisjunctiveHierarchicalFacetAttribute(e,a,n):t,0<i.length&&(s.numericFilters=i),0<r.length&&(s.facetFilters=r),Ir(Zn({},e.getQueryParams(),s))},_getNumericFilters:function(e,i){var a;return e.numericFilters||(a=[],Object.keys(e.numericRefinements).forEach(function(r){var t=e.numericRefinements[r]||{};Object.keys(t).forEach(function(n){var e=t[n]||[];i!==r&&e.forEach(function(e){var t;Array.isArray(e)?(t=e.map(function(e){return r+n+e}),a.push(t)):a.push(r+n+e)})})}),a)},_getTagFilters:function(e){return e.tagFilters||e.tagRefinements.join(",")},_getFacetFilters:function(s,o,c){var u=[],e=s.facetsRefinements||{},n=(Object.keys(e).forEach(function(t){(e[t]||[]).forEach(function(e){u.push(t+":"+e)})}),s.facetsExcludes||{}),r=(Object.keys(n).forEach(function(t){(n[t]||[]).forEach(function(e){u.push(t+":-"+e)})}),s.disjunctiveFacetsRefinements||{}),l=(Object.keys(r).forEach(function(t){var n,e=r[t]||[];t!==o&&e&&0!==e.length&&(n=[],e.forEach(function(e){n.push(t+":"+e)}),u.push(n))}),s.hierarchicalFacetsRefinements||{});return Object.keys(l).forEach(function(e){var t=(l[e]||[])[0];if(void 0!==t){var n,r=s.getHierarchicalFacetByName(e),i=s._getHierarchicalFacetSeparator(r),a=s._getHierarchicalRootPath(r);if(o===e){if(-1===t.indexOf(i)||!a&&!0===c||a&&a.split(i).length===t.split(i).length)return;t=a?(n=a.split(i).length-1,a):(n=t.split(i).length-2,t.slice(0,t.lastIndexOf(i)))}else n=t.split(i).length-1;(e=r.attributes[n])&&u.push([e+":"+t])}}),u},_getHitsHierarchicalFacetsAttributes:function(i){return i.hierarchicalFacets.reduce(function(e,t){var n,r=i.getHierarchicalRefinement(t.name)[0];return r?(n=i._getHierarchicalFacetSeparator(t),r=r.split(n).length,n=t.attributes.slice(0,r+1),e.concat(n)):(e.push(t.attributes[0]),e)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r,i=e._getHierarchicalFacetSeparator(t);return!0===n?(n=0,(r=e._getHierarchicalRootPath(t))&&(n=r.split(i).length),[t.attributes[n]]):(r=(e.getHierarchicalRefinement(t.name)[0]||"").split(i).length-1,t.attributes.slice(0,1+r))},getSearchForFacetQuery:function(e,t,n,r){r=r.isDisjunctiveFacet(e)?r.clearRefinements(e):r,t={facetQuery:t,facetName:e};return"number"==typeof n&&(t.maxFacetHits=n),Ir(Zn({},d._getHitsSearchParams(r),t))}},Tr=d,Fr="3.11.3",Cr=cr;function t(e,t,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.11.3)"),this.setClient(e);e=n||{};e.index=t,this.state=rr.make(e),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function Er(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function kr(){return this.state.page}e(t,Sr),t.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},t.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},t.prototype.getQuery=function(){var e=this.state;return Tr._getHitsSearchParams(e)},t.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,e=Tr._getQueries(n.index,n),r=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:n}),!t)return this.client.search(e).then(function(e){return r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),{content:new Rr(n,e.results),state:n,_originalResponse:e}},function(e){throw r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),e});this.client.search(e).then(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(null,new Rr(n,e.results),n)}).catch(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(e,null,n)})},t.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,n=this.derivedHelpers[0];if(!n)return Promise.resolve([]);var n=n.getModifiedState(t),t=Zn({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:Gn(Tr._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),r="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(r);var i=this.client.initIndex(n.index);if("function"!=typeof i.findAnswers)throw new Error(r);return i.findAnswers(n.query,e.queryLanguages,t)},t.prototype.searchForFacetValues=function(t,e,n,r){var i,a,s,o="function"==typeof this.client.searchForFacetValues,c="function"==typeof this.client.initIndex;if(o||c||"function"==typeof this.client.search)return i=this.state.setQueryParameters(r||{}),a=i.isDisjunctiveFacet(t),r=Tr.getSearchForFacetQuery(t,e,n,i),this._currentNbQueries++,s=this,n=o?this.client.searchForFacetValues([{indexName:i.index,params:r}]):c?this.client.initIndex(i.index).searchForFacetValues(r):(delete r.facetName,this.client.search([{type:"facet",facet:t,indexName:i.index,params:r}]).then(function(e){return e.results[0]})),this.emit("searchForFacetValues",{state:i,facet:t,query:e}),n.then(function(e){return s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),(e=Array.isArray(e)?e[0]:e).facetHits.forEach(function(e){e.escapedValue=Cr(e.value),e.isRefined=a?i.isDisjunctiveFacetRefined(t,e.escapedValue):i.isFacetRefined(t,e.escapedValue)}),e},function(e){throw s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),e});throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues")},t.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},t.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},t.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},t.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},t.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},t.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},t.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},t.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},t.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},t.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},t.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},t.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},t.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},t.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},t.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},t.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},t.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},t.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},t.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},t.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},t.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},t.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},t.prototype.setCurrentPage=Er,t.prototype.setPage=Er,t.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},t.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},t.prototype.setState=function(e){return this._change({state:rr.make(e),isPageReset:!1}),this},t.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new rr(e),this},t.prototype.hasRefinements=function(e){return!!er(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},t.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},t.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},t.prototype.hasTag=function(e){return this.state.isTagRefined(e)},t.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},t.prototype.getIndex=function(){return this.state.index},t.prototype.getCurrentPage=kr,t.prototype.getPage=kr,t.prototype.getTags=function(){return this.state.tagRefinements},t.prototype.getRefinements=function(e){var n=[],r=(this.state.isConjunctiveFacet(e)?(this.state.getConjunctiveRefinements(e).forEach(function(e){n.push({value:e,type:"conjunctive"})}),this.state.getExcludeRefinements(e).forEach(function(e){n.push({value:e,type:"exclude"})})):this.state.isDisjunctiveFacet(e)&&this.state.getDisjunctiveRefinements(e).forEach(function(e){n.push({value:e,type:"disjunctive"})}),this.state.getNumericRefinements(e));return Object.keys(r).forEach(function(e){var t=r[e];n.push({value:t,operator:e,type:"numeric"})}),n},t.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},t.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},t.prototype._search=function(e){var r=this.state,i=[],t=[],e=(e.onlyWithDerivedHelpers||(t=Tr._getQueries(r.index,r),i.push({state:r,queriesCount:t.length,helper:this}),this.emit("search",{state:r,results:this.lastResults})),this.derivedHelpers.map(function(e){var t=e.getModifiedState(r),n=Tr._getQueries(t.index,t);return i.push({state:t,queriesCount:n.length,helper:e}),e.emit("search",{state:t,results:e.lastResults}),n})),t=Array.prototype.concat.apply(t,e),e=this._queryId++;this._currentNbQueries++;try{this.client.search(t).then(this._dispatchAlgoliaResponse.bind(this,i,e)).catch(this._dispatchAlgoliaError.bind(this,e))}catch(e){this.emit("error",{error:e})}},t.prototype._dispatchAlgoliaResponse=function(e,t,n){var r;t<this._lastQueryIdReceived||(this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty"),r=n.results.slice(),e.forEach(function(e){var t=e.state,n=e.queriesCount,e=e.helper,n=r.splice(0,n),n=e.lastResults=new Rr(t,n);e.emit("result",{results:n,state:t})}))},t.prototype._dispatchAlgoliaError=function(e,t){e<this._lastQueryIdReceived||(this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this.emit("error",{error:t}),0===this._currentNbQueries&&this.emit("searchQueueEmpty"))},t.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},t.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&0<this.state.disjunctiveRefinements[e].length},t.prototype._change=function(e){var t=e.state,e=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:e}))},t.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},t.prototype.setClient=function(e){return this.client!==e&&("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.11.3)"),this.client=e),this},t.prototype.getClient=function(){return this.client},t.prototype.derive=function(e){e=new xr(this,e);return this.derivedHelpers.push(e),e},t.prototype.detachDerivedHelper=function(e){e=this.derivedHelpers.indexOf(e);if(-1===e)throw new Error("Derived helper already detached");this.derivedHelpers.splice(e,1)},t.prototype.hasPendingRequests=function(){return 0<this._currentNbQueries};var jr=t;function Lr(e,t,n){return new jr(e,t,n)}Lr.version=Fr,Lr.AlgoliaSearchHelper=jr,Lr.SearchParameters=rr,Lr.SearchResults=Rr;var Mr=Lr,Or=l({name:"configure",connector:!0});function Hr(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(e,t){return C(C({},e),{},F({},t,void 0))},{}))}function Ar(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:v,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return function(r){var t;if(r&&ne(r.searchParameters))return t={},{$$type:"ais.configure",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return i(),Hr(e,r)},getRenderState:function(e,t){t=this.getWidgetRenderState(t);return C(C({},e),{},{configure:C(C({},t),{},{widgetParams:C(C({},t.widgetParams),{},{searchParameters:Ke(new Mr.SearchParameters(null==(e=e.configure)?void 0:e.widgetParams.searchParameters),new Mr.SearchParameters(t.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var n,e=e.helper;return t.refine||(t.refine=(n=e,function(e){var t=Hr(n.state,r),t=Ke(t,new Mr.SearchParameters(e));r.searchParameters=e,n.setState(t).search()})),{refine:t.refine,widgetParams:r}},getWidgetSearchParameters:function(e,t){t=t.uiState;return Ke(e,new Mr.SearchParameters(C(C({},t.configure),r.searchParameters)))},getWidgetUiState:function(e){return C(C({},e),{},{configure:C(C({},e.configure),r.searchParameters)})}};throw new Error(Or("The `searchParameters` option expects an object."))}}var Wr=l({name:"configure-related-items",connector:!0});function Dr(e){var t=e.attributeName,n=e.attributeValue,e=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(e||1,">")}function Br(n,r){return function(e){var t,e=e||{},a=e.hit,s=e.matchingPatterns,e=e.transformSearchParameters,e=void 0===e?function(e){return e}:e;if(!a)throw new Error(Wr("The `hit` option is required."));if(s)return t=Object.keys(s).reduce(function(e,t){var n=s[t],r=Ne(a,t),i=n.score;return Array.isArray(r)?[].concat(w(e),[r.map(function(e){return Dr({attributeName:t,attributeValue:e,attributeScore:i})})]):"string"==typeof r?[].concat(w(e),[Dr({attributeName:t,attributeValue:r,attributeScore:i})]):e},[]),e=C({},e(new Mr.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(a.objectID)],optionalFilters:t}))),C(C({},Ar(n,r)({searchParameters:e})),{},{$$type:"ais.configureRelatedItems"});throw new Error(Wr("The `matchingPatterns` option is required."))}}var Ur=l({name:"autocomplete",connector:!0}),qr=l({name:"query-rules",connector:!0});function Qr(e){var i,a,s,t=this.helper,n=this.initialRuleContexts,r=this.trackedFilters,o=this.transformRuleContexts,e=e.state,c=e.ruleContexts||[],r=(i=(r={helper:t,sharedHelperState:e,trackedFilters:r}).helper,a=r.sharedHelperState,s=r.trackedFilters,Object.keys(s).reduce(function(e,t){var n=Ie(i.lastResults||{},a,!0).filter(function(e){return e.attribute===t}).map(function(e){return e.numericValue||e.name}),r=(0,s[t])(n);return[].concat(w(e),w(n.filter(function(e){return r.includes(e)}).map(function(e){return"ais-".concat(t,"-").concat(e).replace(/[^a-z0-9-_]+/gi,"_")})))},[])),o=o([].concat(w(n),w(r))).slice(0,10);ke(c,o)||t.overrideStateWithoutTriggeringChangeEvent(C(C({},e),{},{ruleContexts:o}))}function Vr(l){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(l,qr()),function(i){var a,e=i||{},t=e.trackedFilters,s=void 0===t?{}:t,t=e.transformRuleContexts,o=void 0===t?function(e){return e}:t,t=e.transformItems,n=void 0===t?function(e){return e}:t,c=(Object.keys(s).forEach(function(e){if("function"!=typeof s[e])throw new Error(qr("'The \"".concat(e,'" filter value in the `trackedFilters` option expects a function.')))}),0<Object.keys(s).length),u=[];return{$$type:"ais.queryRules",init:function(e){var t=e.helper,n=e.state,r=e.instantSearchInstance;u=n.ruleContexts||[],a=Qr.bind({helper:t,initialRuleContexts:u,trackedFilters:s,transformRuleContexts:o}),c&&(([n.disjunctiveFacetsRefinements,n.facetsRefinements,n.hierarchicalFacetsRefinements,n.numericRefinements].some(function(e){return Boolean(e&&0<Object.keys(e).length)})||Boolean(i.transformRuleContexts))&&a({state:n}),t.on("change",a)),l(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:r}),!0)},render:function(e){var t=e.instantSearchInstance;l(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getWidgetRenderState:function(e){var e=e.results,t=(e||{}).userData;return{items:n(void 0===t?[]:t,{results:e}),widgetParams:i}},getRenderState:function(e,t){return C(C({},e),{},{queryRules:this.getWidgetRenderState(t)})},dispose:function(e){var t=e.helper,e=e.state;return r(),c?(t.removeListener("change",a),e.setQueryParameter("ruleContexts",u)):e}}}}function $r(e){function t(){d(u(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"initial"))}function n(){r&&(r.stop(),r.removeEventListener("start",h),r.removeEventListener("error",f),r.removeEventListener("result",m),r.removeEventListener("end",p),r=void 0)}var r,i=e.searchAsYouSpeak,a=e.language,s=e.onQueryChange,o=e.onStateChange,c=window.webkitSpeechRecognition||window.SpeechRecognition,u=function(e){return{status:e,transcript:"",isSpeechFinal:!1,errorCode:void 0}},l=u("initial"),d=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};l=C(C({},l),e),o()},h=function(){d({status:"waiting"})},f=function(e){d({status:"error",errorCode:e.error})},m=function(e){d({status:"recognizing",transcript:e.results[0]&&e.results[0][0]&&e.results[0][0].transcript||"",isSpeechFinal:e.results[0]&&e.results[0].isFinal}),i&&l.transcript&&s(l.transcript)},p=function(){l.errorCode||!l.transcript||i||s(l.transcript),"error"!==l.status&&d({status:"finished"})};return{getState:function(){return l},isBrowserSupported:function(){return Boolean(c)},isListening:function(){return"askingPermission"===l.status||"waiting"===l.status||"recognizing"===l.status},startListening:function(){(r=new c)&&(t("askingPermission"),r.interimResults=!0,a&&(r.lang=a),r.addEventListener("start",h),r.addEventListener("error",f),r.addEventListener("result",m),r.addEventListener("end",p),r.start())},stopListening:function(){n(),t("finished")},dispose:n}}function Kr(m){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(m,Jr()),function(u){var e=u.searchAsYouSpeak,l=void 0!==e&&e,d=u.language,h=u.additionalQueryParameters,e=u.createVoiceSearchHelper,f=void 0===e?$r:e;return{$$type:"ais.voiceSearch",init:function(e){var t=e.instantSearchInstance;m(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;m(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return C(C({},e),{},{voiceSearch:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=this,n=e.helper,r=e.instantSearchInstance,i=(this._refine||(this._refine=function(e){var t;e!==n.state.query&&(t=d?[d.split("-")[0]]:void 0,n.setQueryParameter("queryLanguages",t),"function"==typeof h&&n.setState(n.state.setQueryParameters(C({ignorePlurals:!0,removeStopWords:!0,optionalWords:e},h({query:e})))),n.setQuery(e).search())}),this._voiceSearchHelper||(this._voiceSearchHelper=f({searchAsYouSpeak:l,language:d,onQueryChange:function(e){return t._refine(e)},onStateChange:function(){m(C(C({},t.getWidgetRenderState(e)),{},{instantSearchInstance:r}),!1)}})),this._voiceSearchHelper),a=i.isBrowserSupported,s=i.isListening,o=i.startListening,c=i.stopListening,i=i.getState;return{isBrowserSupported:a(),isListening:s(),toggleListening:function(){a()&&(s()?c:o)()},voiceListeningState:i(),widgetParams:u}},dispose:function(e){var t,e=e.state,n=(this._voiceSearchHelper.dispose(),r(),e);return"function"==typeof h&&(t=(t=h({query:""}))?Object.keys(t).reduce(function(e,t){return e[t]=void 0,e},{}):{},n=e.setQueryParameters(C({queryLanguages:void 0,ignorePlurals:void 0,removeStopWords:void 0,optionalWords:void 0},t))),n.setQueryParameter("query",void 0)},getWidgetUiState:function(e,t){t=t.searchParameters.query||"";return t?C(C({},e),{},{query:t}):e},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameter("query",t.query||"")}}}}function zr(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:v,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return function(r){var i={};return{$$type:"ais.relevantSort",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),e.setQueryParameter("relevancyStrictness",void 0)},getRenderState:function(e,t){return C(C({},e),{},{relevantSort:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper;i.refine||(i.refine=function(e){n.setQueryParameter("relevancyStrictness",e).search()});e=(t||{}).appliedRelevancyStrictness,t=void 0!==e;return{isRelevantSorted:void 0!==e&&0<e,isVirtualReplica:t,canRefine:t,refine:i.refine,widgetParams:r}},getWidgetSearchParameters:function(e,t){var t=t.uiState;return e.setQueryParameter("relevancyStrictness",null!=(t=t.relevantSort)?t:e.relevancyStrictness)},getWidgetUiState:function(e,t){t=t.searchParameters;return C(C({},e),{},{relevantSort:t.relevancyStrictness||e.relevantSort})}}}}function i(n){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.descendantName,e=e.modifierName,t=t?"-".concat(t):"",e=e?"--".concat(e):"";return"".concat("ais","-").concat(n).concat(t).concat(e)}}var Jr=l({name:"voice-search",connector:!0}),cr=K(tt),e=K(nt),Fr=Object.freeze({__proto__:null,EXPERIMENTAL_connectAnswers:cr,EXPERIMENTAL_connectDynamicWidgets:e,connectDynamicWidgets:nt,connectClearRefinements:rt,connectCurrentRefinements:ot,connectHierarchicalMenu:ft,connectHits:mt,connectHitsWithInsights:Yt,connectHitsPerPage:Zt,connectInfiniteHits:nn,connectInfiniteHitsWithInsights:sn,connectMenu:rn,connectNumericMenu:an,connectPagination:mn,connectRange:bn,connectRefinementList:Rn,connectSearchBox:_n,connectSortBy:wn,connectRatingMenu:Pn,connectStats:Nn,connectToggleRefinement:xn,connectBreadcrumb:In,connectGeoSearch:qn,connectPoweredBy:Qn,connectConfigure:Ar,EXPERIMENTAL_connectConfigureRelatedItems:Br,connectAutocomplete:function(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return f(n,Ur()),function(s){var e=(s||{}).escapeHTML,o=void 0===e||e,c={};return{$$type:"ais.autocomplete",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance,e=this.getWidgetRenderState(e);e.indices.forEach(function(e){(0,e.sendEvent)("view",e.hits)}),n(C(C({},e),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return C(C({},e),{},{autocomplete:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var n=this,t=e.helper,r=e.state,i=e.scopedResults,a=e.instantSearchInstance,e=(c.refine||(c.refine=function(e){t.setQuery(e).search()}),i.map(function(e){e.results.hits=o?se(e.results.hits):e.results.hits;var t=he({instantSearchInstance:a,index:e.results.index,widgetType:n.$$type});return{indexId:e.indexId,indexName:e.results.index,hits:e.results.hits,results:e.results,sendEvent:t}}));return{currentRefinement:r.query||"",indices:e,refine:c.refine,widgetParams:s}},getWidgetUiState:function(e,t){t=t.searchParameters.query||"";return""===t||e&&e.query===t?e:C(C({},e),{},{query:t})},getWidgetSearchParameters:function(e,t){t={query:t.uiState.query||""};return o?e.setQueryParameters(C(C({},t),re)):e.setQueryParameters(t)},dispose:function(e){e=e.state,t(),e=e.setQueryParameter("query",void 0);return o?e.setQueryParameters(Object.keys(re).reduce(function(e,t){return C(C({},e),{},F({},t,void 0))},{})):e}}}},connectQueryRules:Vr,connectVoiceSearch:Kr,connectRelevantSort:zr}),Zr=i("Highlight");function Yr(e){var t=e.attribute,n=e.highlightedTagName,n=void 0===n?"mark":n,r=e.hit,e=e.cssClasses,e=void 0===e?{}:e,r=(Ne(r._highlightResult,t)||{}).value,t=void 0===r?"":r,r=Zr({descendantName:"highlighted"})+(e.highlighted?" ".concat(e.highlighted):"");return t.replace(new RegExp(u.highlightPreTag,"g"),"<".concat(n,' class="').concat(r,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(n,">"))}var Xr=i("ReverseHighlight");function Gr(e){var t=e.attribute,n=e.highlightedTagName,n=void 0===n?"mark":n,r=e.hit,e=e.cssClasses,e=void 0===e?{}:e,r=(Ne(r._highlightResult,t)||{}).value,t=void 0===r?"":r,r=Xr({descendantName:"highlighted"})+(e.highlighted?" ".concat(e.highlighted):"");return oe(Xe(we(t))).replace(new RegExp(u.highlightPreTag,"g"),"<".concat(n,' class="').concat(r,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(n,">"))}var ei=i("Snippet");function ti(e){var t=e.attribute,n=e.highlightedTagName,n=void 0===n?"mark":n,r=e.hit,e=e.cssClasses,e=void 0===e?{}:e,r=(Ne(r._snippetResult,t)||{}).value,t=void 0===r?"":r,r=ei({descendantName:"highlighted"})+(e.highlighted?" ".concat(e.highlighted):"");return t.replace(new RegExp(u.highlightPreTag,"g"),"<".concat(n,' class="').concat(r,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(n,">"))}var ni=i("ReverseSnippet");function ri(e){var t=e.attribute,n=e.highlightedTagName,n=void 0===n?"mark":n,r=e.hit,e=e.cssClasses,e=void 0===e?{}:e,r=(Ne(r._snippetResult,t)||{}).value,t=void 0===r?"":r,r=ni({descendantName:"highlighted"})+(e.highlighted?" ".concat(e.highlighted):"");return oe(Xe(we(t))).replace(new RegExp(u.highlightPreTag,"g"),"<".concat(n,' class="').concat(r,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(n,">"))}var ii="_ALGOLIA";function ai(){var e=ii;if("object"===("undefined"==typeof document?"undefined":y(document))&&"string"==typeof document.cookie)for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}}var si=["page"];function oi(e){e=e||{};e.page;return E(e,si)}var ci="ais.infiniteHits";function ui(){return Ge(function(e){return-1<(null==(e=e.window.navigator)||null==(e=e.userAgent)?void 0:e.indexOf("Algolia Crawler"))},{fallback:function(){return!1}})}function li(){return function(e){var t=e.instantSearchInstance,n={widgets:[]},r=document.createElement("meta"),i=document.querySelector("head");return r.name="instantsearch:widgets",{onStateChange:function(){},subscribe:function(){setTimeout(function(){var e=t.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,function r(e,i,a){var s=Ze(i,i.mainIndex,i._initialUiState);e.forEach(function(e){var t={},n=(e.getWidgetRenderState&&(n=e.getWidgetRenderState(s))&&n.widgetParams&&(t=n.widgetParams),Object.keys(t).filter(function(e){return void 0!==t[e]}));a.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:n}),"ais.index"===e.$$type&&r(e.getWidgets(),i,a)})}(t.mainIndex.getWidgets(),t,n),r.content=JSON.stringify(n),i.appendChild(r)},0)},started:function(){},unsubscribe:function(){r.remove()}}}}function di(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n}function hi(e,t,n,r,i,a,s,o,c,u,l,d,h,f){var m=e;if("function"==typeof s?m=s(t,m):m instanceof Date?m=u(m):"comma"===n&&wi(m)&&(m=Ri.maybeMap(m,function(e){return e instanceof Date?u(e):e})),null===m){if(r)return a&&!h?a(t,x.encoder,f,"key",l):t;m=""}if(Ti(m)||Ri.isBuffer(m)){if(a){e=h?t:a(t,x.encoder,f,"key",l);if("comma"===n&&h){for(var p=Pi.call(String(m),","),g="",v=0;v<p.length;++v)g+=(0===v?"":",")+d(a(p[v],x.encoder,f,"value",l));return[d(e)+"="+g]}return[d(e)+"="+d(a(m,x.encoder,f,"value",l))]}return[d(t)+"="+d(String(m))]}var y,b=[];if(void 0!==m){y="comma"===n&&wi(m)?[{value:0<m.length?m.join(",")||null:void 0}]:wi(s)?s:(e=Object.keys(m),o?e.sort(o):e);for(var R=0;R<y.length;++R){var S=y[R],_="object"==typeof S&&void 0!==S.value?S.value:m[S];i&&null===_||(S=wi(m)?"function"==typeof n?n(t,S):t:t+(c?"."+S:"["+S+"]"),xi(b,hi(_,S,n,r,i,a,s,o,c,u,l,d,h,f)))}}return b}function fi(e){e&&(window.document.title=e)}var mi=String.prototype.replace,pi=/%20/g,cr="RFC3986",gi={default:cr,formatters:{RFC1738:function(e){return mi.call(e,pi,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:cr},vi=Object.prototype.hasOwnProperty,yi=Array.isArray,bi=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Ri={arrayToObject:di,assign:function(e,n){return Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),o=0;o<s.length;++o){var c=s[o],u=a[c];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:a,prop:c}),n.push(u))}for(var l=t;1<l.length;){var d=l.pop(),h=d.obj[d.prop];if(yi(h)){for(var f=[],m=0;m<h.length;++m)void 0!==h[m]&&f.push(h[m]);d.obj[d.prop]=f}}return e},decode:function(t,e,n){t=t.replace(/\+/g," ");if("iso-8859-1"===n)return t.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(t)}catch(e){return t}},encode:function(e,t,n,r,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var s="",o=0;o<a.length;++o){var c=a.charCodeAt(o);45===c||46===c||95===c||126===c||48<=c&&c<=57||65<=c&&c<=90||97<=c&&c<=122||i===gi.RFC1738&&(40===c||41===c)?s+=a.charAt(o):c<128?s+=bi[c]:c<2048?s+=bi[192|c>>6]+bi[128|63&c]:c<55296||57344<=c?s+=bi[224|c>>12]+bi[128|c>>6&63]+bi[128|63&c]:(o+=1,c=65536+((1023&c)<<10|1023&a.charCodeAt(o)),s+=bi[240|c>>18]+bi[128|c>>12&63]+bi[128|c>>6&63]+bi[128|63&c])}return s},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(yi(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function r(i,a,s){if(!a)return i;if("object"!=typeof a){if(yi(i))i.push(a);else{if(!i||"object"!=typeof i)return[i,a];(s&&(s.plainObjects||s.allowPrototypes)||!vi.call(Object.prototype,a))&&(i[a]=!0)}return i}var e;return i&&"object"==typeof i?(yi(e=i)&&!yi(a)&&(e=di(i,s)),yi(i)&&yi(a)?(a.forEach(function(e,t){var n;vi.call(i,t)?(n=i[t])&&"object"==typeof n&&e&&"object"==typeof e?i[t]=r(n,e,s):i.push(e):i[t]=e}),i):Object.keys(a).reduce(function(e,t){var n=a[t];return vi.call(e,t)?e[t]=r(e[t],n,s):e[t]=n,e},e)):[i].concat(a)}},Si=Object.prototype.hasOwnProperty,_i={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},wi=Array.isArray,Pi=String.prototype.split,Ni=Array.prototype.push,xi=function(e,t){Ni.apply(e,wi(t)?t:[t])},Ii=Date.prototype.toISOString,e=gi.default,x={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ri.encode,encodeValuesOnly:!1,format:e,formatter:gi.formatters[e],indices:!1,serializeDate:function(e){return Ii.call(e)},skipNulls:!1,strictNullHandling:!1},Ti=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},Fi=Object.prototype.hasOwnProperty,Ci=Array.isArray,m={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ri.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Ei=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},ki=function(e,t){return e&&"string"==typeof e&&t.comma&&-1<e.indexOf(",")?e.split(","):e},ji="utf8=%26%2310003%3B",Li="utf8=%E2%9C%93",Mi=function(e,t,n,r){for(var i=r?t:ki(t,n),a=e.length-1;0<=a;--a){var s,o,c,u=e[a];"[]"===u&&n.parseArrays?s=[].concat(i):(s=n.plainObjects?Object.create(null):{},o="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,c=parseInt(o,10),n.parseArrays||""!==o?!isNaN(c)&&u!==o&&String(c)===o&&0<=c&&n.parseArrays&&c<=n.arrayLimit?(s=[])[c]=i:"__proto__"!==o&&(s[o]=i):s={0:i}),i=s}return i},Oi={formats:gi,parse:function(e,t){var n=function(e){if(!e)return m;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=(void 0===e.charset?m:e).charset;return{allowDots:void 0===e.allowDots?m.allowDots:!!e.allowDots,allowPrototypes:("boolean"==typeof e.allowPrototypes?e:m).allowPrototypes,arrayLimit:("number"==typeof e.arrayLimit?e:m).arrayLimit,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:m).charsetSentinel,comma:("boolean"==typeof e.comma?e:m).comma,decoder:("function"==typeof e.decoder?e:m).decoder,delimiter:("string"==typeof e.delimiter||Ri.isRegExp(e.delimiter)?e:m).delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:m.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:("boolean"==typeof e.interpretNumericEntities?e:m).interpretNumericEntities,parameterLimit:("number"==typeof e.parameterLimit?e:m).parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:("boolean"==typeof e.plainObjects?e:m).plainObjects,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:m).strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r,i,a,s={},e=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,c=e.split(t.delimiter,o),u=-1,l=t.charset;if(t.charsetSentinel)for(n=0;n<c.length;++n)0===c[n].indexOf("utf8=")&&(c[n]===Li?l="utf-8":c[n]===ji&&(l="iso-8859-1"),u=n,n=c.length);for(n=0;n<c.length;++n)n!==u&&((a=-1===(a=-1===(a=(r=c[n]).indexOf("]="))?r.indexOf("="):a+1)?(i=t.decoder(r,m.decoder,l,"key"),t.strictNullHandling?null:""):(i=t.decoder(r.slice(0,a),m.decoder,l,"key"),Ri.maybeMap(ki(r.slice(a+1),t),function(e){return t.decoder(e,m.decoder,l,"value")})))&&t.interpretNumericEntities&&"iso-8859-1"===l&&(a=Ei(a)),-1<r.indexOf("[]=")&&(a=Ci(a)?[a]:a),Fi.call(s,i)?s[i]=Ri.combine(s[i],a):s[i]=a);return s}(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),s=0;s<a.length;++s)var o=a[s],o=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=0<n.depth&&/(\[[^[\]]*])/.exec(i),e=s?i.slice(0,s.index):i,o=[];if(e){if(!n.plainObjects&&Fi.call(Object.prototype,e)&&!n.allowPrototypes)return;o.push(e)}for(var c=0;0<n.depth&&null!==(s=a.exec(i))&&c<n.depth;){if(c+=1,!n.plainObjects&&Fi.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;o.push(s[1])}return s&&o.push("["+i.slice(s.index)+"]"),Mi(o,t,n,r)}}(o,r[o],n,"string"==typeof e),i=Ri.merge(i,o,n);return Ri.compact(i)},stringify:function(e,t){var n=e,r=function(e){if(!e)return x;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||x.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=gi.default;if(void 0!==e.format){if(!Si.call(gi.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=gi.formatters[n],i=x.filter;return"function"!=typeof e.filter&&!wi(e.filter)||(i=e.filter),{addQueryPrefix:("boolean"==typeof e.addQueryPrefix?e:x).addQueryPrefix,allowDots:void 0===e.allowDots?x.allowDots:!!e.allowDots,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:x).charsetSentinel,delimiter:(void 0===e.delimiter?x:e).delimiter,encode:("boolean"==typeof e.encode?e:x).encode,encoder:("function"==typeof e.encoder?e:x).encoder,encodeValuesOnly:("boolean"==typeof e.encodeValuesOnly?e:x).encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:("function"==typeof e.serializeDate?e:x).serializeDate,skipNulls:("boolean"==typeof e.skipNulls?e:x).skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:x).strictNullHandling}}(t),i=("function"==typeof r.filter?n=(0,r.filter)("",n):wi(r.filter)&&(s=r.filter),[]);if("object"!=typeof n||null===n)return"";var e=t&&t.arrayFormat in _i?t.arrayFormat:!(t&&"indices"in t)||t.indices?"indices":"repeat",a=_i[e],s=s||Object.keys(n);r.sort&&s.sort(r.sort);for(var o=0;o<s.length;++o){var c=s[o];r.skipNulls&&null===n[c]||xi(i,hi(n[c],c,a,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset))}t=i.join(r.delimiter),e=!0===r.addQueryPrefix?"?":"";return r.charsetSentinel&&("iso-8859-1"===r.charset?e+="utf8=%26%2310003%3B&":e+="utf8=%E2%9C%93&"),0<t.length?e+t:""}},Hi=function(){function u(e){var n=this,t=e.windowTitle,r=e.writeDelay,r=void 0===r?400:r,i=e.createURL,a=e.parseURL,s=e.getLocation,o=e.start,c=e.dispose,e=e.push;A(this,u),F(this,"windowTitle",void 0),F(this,"writeDelay",void 0),F(this,"_createURL",void 0),F(this,"parseURL",void 0),F(this,"getLocation",void 0),F(this,"writeTimer",void 0),F(this,"inPopState",!1),F(this,"isDisposed",!1),F(this,"latestAcknowledgedHistory",0),F(this,"_start",void 0),F(this,"_dispose",void 0),F(this,"_push",void 0),this.windowTitle=t,this.writeTimer=void 0,this.writeDelay=r,this._createURL=i,this.parseURL=a,this.getLocation=s,this._start=o,this._dispose=c,this._push=e,Ge(function(e){var e=e.window,t=n.windowTitle&&n.windowTitle(n.read());fi(t),n.latestAcknowledgedHistory=e.history.length})}return W(u,[{key:"read",value:function(){return this.parseURL({qsModule:Oi,location:this.getLocation()})}},{key:"write",value:function(i){var a=this;Ge(function(e){var t=e.window,n=a.createURL(i),r=a.windowTitle&&a.windowTitle(i);a.writeTimer&&clearTimeout(a.writeTimer),a.writeTimer=setTimeout(function(){fi(r),a.shouldWrite(n)&&(a._push?a._push(n):t.history.pushState(i,r||"",n),a.latestAcknowledgedHistory=t.history.length),a.inPopState=!1,a.writeTimer=void 0},a.writeDelay)})}},{key:"onUpdate",value:function(e){var t=this;this._start&&this._start(function(){e(t.read())}),this._onPopState=function(){t.writeTimer&&(clearTimeout(t.writeTimer),t.writeTimer=void 0),t.inPopState=!0,e(t.read())},Ge(function(e){e.window.addEventListener("popstate",t._onPopState)})}},{key:"createURL",value:function(e){return this._createURL({qsModule:Oi,routeState:e,location:this.getLocation()})}},{key:"dispose",value:function(){var t=this;this._dispose&&this._dispose(),this.isDisposed=!0,Ge(function(e){e=e.window;t._onPopState&&e.removeEventListener("popstate",t._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(n){var r=this;return Ge(function(e){var e=e.window,t=!(r.isDisposed&&r.latestAcknowledgedHistory!==e.history.length);return!r.inPopState&&t&&n!==e.location.href})}}]),u}();function Ai(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,n=e.parseURL,r=e.writeDelay,i=e.windowTitle,a=e.getLocation,s=e.start,o=e.dispose,e=e.push;return new Hi({createURL:void 0===t?function(e){var t=e.qsModule,n=e.routeState,e=e.location,r=e.protocol,i=e.hostname,a=e.port,a=void 0===a?"":a,s=e.pathname,e=e.hash,t=t.stringify(n),n=""===a?"":":".concat(a);return(t?"".concat(r,"//").concat(i).concat(n).concat(s,"?").concat(t):"".concat(r,"//").concat(i).concat(n).concat(s)).concat(e)}:t,parseURL:void 0===n?function(e){var t=e.qsModule,e=e.location;return t.parse(e.search.slice(1),{arrayLimit:99})}:n,writeDelay:void 0===r?400:r,windowTitle:i,getLocation:void 0===a?function(){return Ge(function(e){return e.window.location},{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:a,start:s,dispose:o,push:e})}var Wi=["configure"];function Di(e){e.configure;return E(e,Wi)}function Bi(){return{stateToRoute:function(n){return Object.keys(n).reduce(function(e,t){return C(C({},e),{},F({},t,Di(n[t])))},{})},routeToState:function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(n).reduce(function(e,t){return C(C({},e),{},F({},t,Di(n[t])))},{})}}}function Ui(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.router,i=void 0===t?Ai():t,a=void 0===(t=e.stateMapping)?Bi():t;return function(e){var t=e.instantSearchInstance;t._createURL=function(n){var e=Object.keys(n).reduce(function(e,t){return C(C({},e),{},F({},t,n[t]))},t.mainIndex.getWidgetUiState({})),e=a.stateToRoute(e);return i.createURL(e)};var n=void 0,r=t._initialUiState;return{onStateChange:function(e){e=e.uiState,e=a.stateToRoute(e);void 0!==n&&ke(n,e)||(i.write(e),n=e)},subscribe:function(){t._initialUiState=C(C({},r),a.routeToState(i.read())),i.onUpdate(function(e){t.setUiState(a.routeToState(e))})},started:function(){var e;null!=(e=i.start)&&e.call(i)},unsubscribe:function(){i.dispose()}}}}var qi=["initialSearchParameters"],Qi=l({name:"index-widget"});function Vi(e,t){var n=t.state,r=t.isPageReset,t=t._uiState;n!==e.state&&(e.state=n,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:r,_uiState:t}))}function $i(e,n,t){return e.reduce(function(e,t){return!me(t)&&(t.getWidgetUiState||t.getWidgetState)?t.getWidgetUiState?t.getWidgetUiState(e,n):t.getWidgetState(e,n):e},2<arguments.length&&void 0!==t?t:{})}function Ki(e,t){var n=t.initialSearchParameters,r=E(t,qi);return e.filter(function(e){return!me(e)}).reduce(function(e,t){return t.getWidgetSearchParameters?t.getWidgetSearchParameters(e,r):e},n)}function zi(e){if(void 0===e||void 0===e.indexName)throw new Error(Qi("The `indexName` option is required."));var s=e.indexName,o=void 0===(e=e.indexId)?s:e,c=[],u={},l=null,d=null,h=null,f=null,m=null;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return s},getIndexId:function(){return o},getHelper:function(){return h},getResults:function(){var e;return null!=(e=f)&&e.lastResults?(f.lastResults._state=h.state,f.lastResults):null},getPreviousState:function(){return m},getScopedResults:function(){var e=this.getParent();return function n(e){return e.filter(me).reduce(function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(w(n(t.getWidgets()))))},[])}(e?e.getWidgets():[this])},getParent:function(){return d},createURL:function(e){return l._createURL(F({},o,$i(c,{searchParameters:e,helper:h})))},getWidgets:function(){return c},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Qi("The `addWidgets` method expects an array of widgets."));if(e.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw new Error(Qi("The widget definition expects a `render` and/or an `init` method."));return c=c.concat(e),l&&Boolean(e.length)&&(Vi(h,{state:Ki(c,{uiState:u,initialSearchParameters:h.state}),_uiState:u}),e.forEach(function(e){e.getRenderState&&Ji({renderState:e.getRenderState(l.renderState[t.getIndexId()]||{},Ze(l,t,l._initialUiState)),instantSearchInstance:l,parent:t})}),e.forEach(function(e){e.init&&e.init(Ze(l,t,l._initialUiState))}),l.scheduleSearch()),this},removeWidgets:function(t){var e,n=this;if(!Array.isArray(t))throw new Error(Qi("The `removeWidgets` method expects an array of widgets."));if(t.some(function(e){return"function"!=typeof e.dispose}))throw new Error(Qi("The widget definition expects a `dispose` method."));return c=c.filter(function(e){return-1===t.indexOf(e)}),l&&Boolean(t.length)&&(e=t.reduce(function(e,t){return t.dispose({helper:h,state:e,parent:n})||e},h.state),u=$i(c,{searchParameters:e,helper:h}),h.setState(Ki(c,{uiState:u,initialSearchParameters:e})),c.length)&&l.scheduleSearch(),this},init:function(e){var i,t=this,n=e.instantSearchInstance,r=e.parent,a=e.uiState;null===h&&(l=n,d=r,u=a[o]||{},i=n.mainHelper,e=Ki(c,{uiState:u,initialSearchParameters:new Mr.SearchParameters({index:s})}),(h=Mr({},e.index,e)).search=function(){return n.onStateChange?(n.onStateChange({uiState:n.mainIndex.getWidgetUiState({}),setUiState:function(e){return n.setUiState(e,!1)}}),i):i.search()},h.searchWithoutTriggeringOnStateChange=function(){return i.search()},h.searchForFacetValues=function(e,t,n,r){r=h.state.setQueryParameters(r);return i.searchForFacetValues(e,t,n,r)},f=i.derive(function(){return Ke.apply(void 0,w(function(e){for(var t=e.getParent(),n=[e.getHelper().state];null!==t;)n=[t.getHelper().state].concat(n),t=t.getParent();return n}(t)))}),(e=null==(r=n._initialResults)?void 0:r[this.getIndexId()])&&(r=new Mr.SearchResults(new Mr.SearchParameters(e.state),e.results),f.lastResults=r,h.lastResults=r),h.on("change",function(e){e.isPageReset&&!function n(e){e=e.filter(me);0!==e.length&&e.forEach(function(e){var t=e.getHelper();Vi(t,{state:t.state.resetPage(),isPageReset:!0}),n(e.getWidgets())})}(c)}),f.on("search",function(){n.scheduleStalledRender()}),f.on("result",function(e){e=e.results;n.scheduleRender(),h.lastResults=e,m=e._state}),c.forEach(function(e){e.getRenderState&&Ji({renderState:e.getRenderState(n.renderState[t.getIndexId()]||{},Ze(n,t,a)),instantSearchInstance:n,parent:t})}),c.forEach(function(e){e.init&&e.init(Ze(n,t,a))}),h.on("change",function(e){var t=e.state,e=e._uiState;u=$i(c,{searchParameters:t,helper:h},e||{}),n.onStateChange||n.onInternalStateChange()}),e)&&n.scheduleRender()},render:function(e){var t=this,n=e.instantSearchInstance;this.getResults()&&("error"!==n.status||n.mainHelper.hasPendingRequests()||h.setState(m),c.forEach(function(e){e.getRenderState&&Ji({renderState:e.getRenderState(n.renderState[t.getIndexId()]||{},Ye(n,t)),instantSearchInstance:n,parent:t})}),c.forEach(function(e){e.render&&e.render(Ye(n,t))}))},dispose:function(){var e,t=this;c.forEach(function(e){e.dispose&&e.dispose({helper:h,state:h.state,parent:t})}),(d=l=null)!=(e=h)&&e.removeAllListeners(),(h=null)!=(e=f)&&e.detach(),f=null},getWidgetUiState:function(e){return c.filter(me).reduce(function(e,t){return t.getWidgetUiState(e)},C(C({},e),{},F({},o,C(C({},e[o]),u))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){t=t.uiState;return Ki(c,{uiState:t,initialSearchParameters:e})},refreshUiState:function(){u=$i(c,{searchParameters:this.getHelper().state,helper:this.getHelper()},u)},setIndexUiState:function(e){var t="function"==typeof e?e(u):e;l.setUiState(function(e){return C(C({},e),{},F({},o,t))})}}}function Ji(e){var t=e.renderState,n=e.instantSearchInstance,e=e.parent,e=(e||n.mainIndex).getIndexId();n.renderState=C(C({},n.renderState),{},F({},e,C(C({},n.renderState[e]),t)))}function Zi(e,t){return e.toLocaleString(t)}var Yi=l({name:"instantsearch"});function Xi(){return"#"}var Gi=function(){D(h,Sr);var d=q(h);function h(e){A(this,h),F(b(n=d.call(this)),"client",void 0),F(b(n),"indexName",void 0),F(b(n),"insightsClient",void 0),F(b(n),"onStateChange",null),F(b(n),"helper",void 0),F(b(n),"mainHelper",void 0),F(b(n),"mainIndex",void 0),F(b(n),"started",void 0),F(b(n),"templatesConfig",void 0),F(b(n),"renderState",{}),F(b(n),"_stalledSearchDelay",void 0),F(b(n),"_searchStalledTimer",void 0),F(b(n),"_initialUiState",void 0),F(b(n),"_initialResults",void 0),F(b(n),"_createURL",void 0),F(b(n),"_searchFunction",void 0),F(b(n),"_mainHelperSearch",void 0),F(b(n),"middleware",[]),F(b(n),"sendEventToInsights",void 0),F(b(n),"status","idle"),F(b(n),"error",void 0),F(b(n),"scheduleSearch",ye(function(){n.started&&n.mainHelper.search()})),F(b(n),"scheduleRender",ye(function(){var e,t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];null!=(e=n.mainHelper)&&e.hasPendingRequests()||(clearTimeout(n._searchStalledTimer),n._searchStalledTimer=null,t&&(n.status="idle",n.error=void 0)),n.mainIndex.render({instantSearchInstance:b(n)}),n.emit("render")})),F(b(n),"onInternalStateChange",ye(function(){var t=n.mainIndex.getWidgetUiState({});n.middleware.forEach(function(e){e.instance.onStateChange({uiState:t})})})),n.setMaxListeners(100);var n,r,t=e.indexName,t=void 0===t?null:t,i=e.numberLocale,a=e.initialUiState,a=void 0===a?{}:a,s=e.routing,s=void 0===s?null:s,o=e.searchFunction,c=e.stalledSearchDelay,c=void 0===c?200:c,u=e.searchClient,u=void 0===u?null:u,l=e.insightsClient,l=void 0===l?null:l,e=e.onStateChange,e=void 0===e?null:e;if(null===t)throw new Error(Yi("The `indexName` option is required."));if(null===u)throw new Error(Yi("The `searchClient` option is required."));if("function"!=typeof u.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"==typeof u.addAlgoliaAgent&&u.addAlgoliaAgent("instantsearch.js (".concat("4.52.0",")")),l&&"function"!=typeof l)throw new Error(Yi("The `insightsClient` option should be a function."));return n.client=u,n.insightsClient=l,n.indexName=t,n.helper=null,n.mainHelper=null,n.mainIndex=zi({indexName:t}),n.onStateChange=e,n.started=!1,n.templatesConfig={helpers:(r={numberLocale:i}.numberLocale,{formatNumber:function(e,t){return Zi(Number(t(e)),r)},highlight:function(e,t){try{return t(Yr(C(C({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{return t(Gr(C(C({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{return t(ti(C(C({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{return t(ri(C(C({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var n=JSON.parse(e),r=n.method,i=n.payload;return t(Kt(r,C({objectIDs:[this.objectID]},i)))}catch(e){throw new Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}}),compileOptions:{}},n._stalledSearchDelay=c,n._searchStalledTimer=null,n._createURL=Xi,n._initialUiState=a,n._initialResults=null,o&&(n._searchFunction=o),n.sendEventToInsights=v,s&&n.use(Ui("boolean"==typeof s?void 0:s)),ui()&&n.use(li()),n}return W(h,[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var n=this,e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=t.map(function(e){var t=C({subscribe:v,started:v,unsubscribe:v,onStateChange:v},e({instantSearchInstance:n}));return n.middleware.push({creator:e,instance:t}),t});return this.started&&i.forEach(function(e){e.subscribe(),e.started()}),this}},{key:"unuse",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.middleware.filter(function(e){return t.includes(e.creator)}).forEach(function(e){return e.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(e){return!t.includes(e.creator)}),this}},{key:"EXPERIMENTAL_use",value:function(){return this.use.apply(this,arguments)}},{key:"addWidget",value:function(e){return this.addWidgets([e])}},{key:"addWidgets",value:function(e){if(!Array.isArray(e))throw new Error(Yi("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(e.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw new Error(Yi("The widget definition expects a `render` and/or an `init` method."));return this.mainIndex.addWidgets(e),this}},{key:"removeWidget",value:function(e){return this.removeWidgets([e])}},{key:"removeWidgets",value:function(e){if(!Array.isArray(e))throw new Error(Yi("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));if(e.some(function(e){return"function"!=typeof e.dispose}))throw new Error(Yi("The widget definition expects a `dispose` method."));return this.mainIndex.removeWidgets(e),this}},{key:"start",value:function(){var r=this;if(this.started)throw new Error(Yi("The `start` method has already been called once."));var n,e,i=this.mainHelper||Mr(this.client,this.indexName);i.search=function(){return r.status="loading",r.scheduleRender(!1),i.searchOnlyWithDerivedHelpers()},this._searchFunction&&(n={search:function(){return new Promise(v)}},this._mainHelperSearch=i.search.bind(i),i.search=function(){var t=r.mainIndex.getHelper(),e=Mr(n,t.state.index,t.state);return e.once("search",function(e){e=e.state;t.overrideStateWithoutTriggeringChangeEvent(e),r._mainHelperSearch()}),e.on("change",function(e){e=e.state;t.setState(e)}),r._searchFunction(e),i}),i.on("error",function(e){var n,e=e.error;e instanceof Error||(n=e,e=Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},new Error(n.message))),e.error=e,r.error=e,r.status="error",r.scheduleRender(!1),r.emit("error",e)}),this.mainHelper=i,this.middleware.forEach(function(e){e.instance.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults?(e=this.scheduleSearch,this.scheduleSearch=ye(v),ye(function(){r.scheduleSearch=e})()):0<this.mainIndex.getWidgets().length&&this.scheduleSearch(),this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(e){e.instance.started()})}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null!=(e=this.mainHelper)&&e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(e){e.instance.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){e.status="stalled",e.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(Yi("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var r="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&n?this.onStateChange({uiState:r,setUiState:function(e){pe("function"==typeof e?e(r):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(pe(r,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){if(this.started)return this._createURL(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});throw new Error(Yi("The `start` method needs to be called before `createURL`."))}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(Yi("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),h}(),Yt=Object.freeze({__proto__:null,history:Ai}),ea=["configure"];function ta(e){e.configure;return E(e,ea)}sn=Object.freeze({__proto__:null,simple:Bi,singleIndex:function(t){return{stateToRoute:function(e){return ta(e[t]||{})},routeToState:function(){return F({},t,ta(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}))}}}});cr=Object.freeze({__proto__:null,createInsightsMiddleware:function(e){var u,l,d=(e=e||{}).insightsClient,h=e.insightsInitParams,f=e.onEvent;if(null===d||d)return u=Boolean(d),l=null===d?v:d,function(e){var n,r,i=e.instantSearchInstance,t=k((e=i.client).transporter?(t=(a=e.transporter).headers,a=a.queryParameters,[t[s="x-algolia-application-id"]||a[s],t[s="x-algolia-api-key"]||a[s]]):[e.applicationID,e.apiKey],2),a=t[0],s=t[1],o=void 0,c=void 0;return Array.isArray(l.queue)&&(e=Re(l.queue.slice().reverse(),function(e){return"setUserToken"===k(e,1)[0]})||[],o=k(e,2)[1]),l("getUserToken",null,function(e,t){c=t}),l("init",C({appId:a,apiKey:s},h)),{onStateChange:function(){},subscribe:function(){},started:function(){l("addAlgoliaAgent","insights-middleware"),r=i.helper,n={userToken:r.state.userToken,clickAnalytics:r.state.clickAnalytics},r.overrideStateWithoutTriggeringChangeEvent(C(C({},r.state),{},{clickAnalytics:!0})),i.scheduleSearch();function e(e){r.overrideStateWithoutTriggeringChangeEvent(C(C({},r.state),{},{userToken:e})),i.scheduleSearch()}var t=ai();u&&t&&e(t),c?l("setUserToken",c):o&&l("setUserToken",o),l("onUserTokenChange",e,{immediate:!0}),i.sendEventToInsights=function(e){f?f(e,d):e.insightsMethod&&Boolean(r.state.userToken)&&l(e.insightsMethod,e.payload)}},unsubscribe:function(){l("onUserTokenChange",void 0),i.sendEventToInsights=v,r&&n&&(r.setState(C(C({},r.state),n)),i.scheduleSearch())}}};throw new Error("The `insightsClient` option is required. To disable, set it to `null`.")},createRouterMiddleware:Ui,isMetadataEnabled:ui,createMetadataMiddleware:li});function I(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){return Array.isArray(t)?e.concat(t):e.concat([t])},[]).filter(Boolean).join(" ")}function M(e){var t=e.defaultTemplates,n=e.templates;return C({templatesConfig:e.templatesConfig},function(a,e){var s=1<arguments.length&&void 0!==e?e:{};return Le([].concat(w(Object.keys(a||{})),w(Object.keys(s)))).reduce(function(e,t){var n=a?a[t]:void 0,r=s[t],i=void 0!==r&&r!==n;return e.templates[t]=i?r:n,e.useCustomCompileOptions[t]=i,e},{templates:{},useCustomCompileOptions:{}})}(t,n))}function na(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ra(e,t){return e(t={exports:{}},t.exports),t.exports}var e=ra(function(e,t){function b(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function R(e,t,n){if(t.charAt(n)==e.charAt(0)){for(var r=1,i=e.length;r<i;r++)if(t.charAt(n+r)!=e.charAt(r))return;return 1}}function c(e,t,n,r){for(var i=[],a=null,s=null,o=n[n.length-1];0<e.length;){if(s=e.shift(),o&&"<"==o.tag&&!(s.tag in p))throw new Error("Illegal content in < super tag.");if(S.tags[s.tag]<=S.tags.$||function(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].o==e.n)return e.tag="#"}(s,r))n.push(s),s.nodes=c(e,s.tag,n,r);else{if("/"==s.tag){if(0===n.length)throw new Error("Closing tag without opener: /"+s.n);if(a=n.pop(),s.n==a.n||function(e,t,n){for(var r=0,i=n.length;r<i;r++)if(n[r].c==e&&n[r].o==t)return 1}(s.n,a.n,r))return a.end=s.i,i;throw new Error("Nesting error: "+a.n+" vs. "+s.n)}"\n"==s.tag&&(s.last=0==e.length||"\n"==e[0].tag)}i.push(s)}if(0<n.length)throw new Error("missing closing tag: "+n.pop().n);return i}function r(e){var t,n=[];for(t in e.partials)n.push('"'+i(t)+'":{name:"'+i(e.partials[t].name)+'", '+r(e.partials[t])+"}");return"partials: {"+n.join(",")+"}, subs: "+function(e){var t,n=[];for(t in e)n.push('"'+i(t)+'": function(c,p,t,i) {'+e[t]+"}");return"{ "+n.join(",")+" }"}(e.subs)}function i(e){return e.replace(h,"\\\\").replace(u,'\\"').replace(l,"\\n").replace(d,"\\r").replace(f,"\\u2028").replace(m,"\\u2029")}function n(e){return~e.indexOf(".")?"d":"f"}function a(e,t){var n="<"+(t.prefix||"")+e.n+g++;return t.partials[n]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+i(n)+'",c,p,"'+(e.indent||"")+'"));',n}function s(e,t){t.code+="t.b(t.t(t."+n(e.n)+'("'+i(e.n)+'",c,p,0)));'}function o(e){return"t.b("+e+");"}var S,_,u,l,d,h,f,m,p,g;_=/\S/,u=/\"/g,l=/\n/g,d=/\r/g,h=/\\/g,f=/\u2028/,m=/\u2029/,(S=t).tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},S.scan=function(e,t){var n,r,i,a,s,o=e.length,c=0,u=null,l="",d=[],h=!1,f=0,m=0,p="{{",g="}}";function v(){0<l.length&&(d.push({tag:"_t",text:new String(l)}),l="")}function y(e,t){if(v(),e&&function(){for(var e=!0,t=m;t<d.length;t++)if(!(e=S.tags[d[t].tag]<S.tags._v||"_t"==d[t].tag&&null===d[t].text.match(_)))return;return e}())for(var n,r=m;r<d.length;r++)d[r].text&&((n=d[r+1])&&">"==n.tag&&(n.indent=d[r].text.toString()),d.splice(r,1));else t||d.push({tag:"\n"});h=!1,m=d.length}for(t&&(t=t.split(" "),p=t[0],g=t[1]),f=0;f<o;f++)0==c?R(p,e,f)?(--f,v(),c=1):"\n"==e.charAt(f)?y(h):l+=e.charAt(f):1==c?(f+=p.length-1,c="="==(u=(n=S.tags[e.charAt(f+1)])?e.charAt(f+1):"_v")?(i=f,s=a=void 0,a="="+g,s=(r=e).indexOf(a,i),r=b(r.substring(r.indexOf("=",i)+1,s)).split(" "),p=r[0],g=r[r.length-1],f=s+a.length-1,0):(n&&f++,2),h=f):R(g,e,f)?(d.push({tag:u,n:b(l),otag:p,ctag:g,i:"/"==u?h-p.length:f+g.length}),l="",f+=g.length-1,c=0,"{"==u&&("}}"==g?f++:"}"===(i=d[d.length-1]).n.substr(i.n.length-1)&&(i.n=i.n.substring(0,i.n.length-1)))):l+=e.charAt(f);return y(h,!0),d},p={_t:!0,"\n":!0,$:!0,"/":!0},S.stringify=function(e,t,n){return"{code: function (c,p,i) { "+S.wrapMain(e.code)+" },"+r(e)+"}"},g=0,S.generate=function(e,t,n){g=0;var r={code:"",subs:{},partials:{}};return S.walk(e,r),n.asString?this.stringify(r,t,n):this.makeTemplate(r,t,n)},S.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},S.template=S.Template,S.makeTemplate=function(e,t,n){var r=this.makePartials(e);return r.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(r,t,this,n)},S.makePartials=function(e){var t,n={subs:{},partials:e.partials,name:e.name};for(t in n.partials)n.partials[t]=this.makePartials(n.partials[t]);for(t in e.subs)n.subs[t]=new Function("c","p","t","i",e.subs[t]);return n},S.codegen={"#":function(e,t){t.code+="if(t.s(t."+n(e.n)+'("'+i(e.n)+'",c,p,1),c,p,0,'+e.i+","+e.end+',"'+e.otag+" "+e.ctag+'")){t.rs(c,p,function(c,p,t){',S.walk(e.nodes,t),t.code+="});c.pop();}"},"^":function(e,t){t.code+="if(!t.s(t."+n(e.n)+'("'+i(e.n)+'",c,p,1),c,p,1,0,0,"")){',S.walk(e.nodes,t),t.code+="};"},">":a,"<":function(e,t){var n={partials:{},code:"",subs:{},inPartial:!0},e=(S.walk(e.nodes,n),t.partials[a(e,t)]);e.subs=n.subs,e.partials=n.partials},$:function(e,t){var n={subs:{},code:"",partials:t.partials,prefix:e.n};S.walk(e.nodes,n),t.subs[e.n]=n.code,t.inPartial||(t.code+='t.sub("'+i(e.n)+'",c,p,i);')},"\n":function(e,t){t.code+=o('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+n(e.n)+'("'+i(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=o('"'+i(e.text)+'"')},"{":s,"&":s},S.walk=function(e,t){for(var n,r=0,i=e.length;r<i;r++)(n=S.codegen[e[r].tag])&&n(e[r],t);return t},S.parse=function(e,t,n){return c(e,0,[],(n=n||{}).sectionTags||[])},S.cache={},S.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},S.compile=function(e,t){var n=S.cacheKey(e,t=t||{}),r=this.cache[n];if(r){var i,a=r.partials;for(i in a)delete a[i].instance;return r}return r=this.generate(this.parse(this.scan(e,t.delimiters),e,t),e,t),this.cache[n]=r}}),ia=ra(function(e,t){function l(e,t,n){var r;return t&&"object"==typeof t&&(void 0!==t[e]?r=t[e]:n&&t.get&&"function"==typeof t.get&&(r=t.get(e))),r}function s(e){return String(null==e?"":e)}var n,r,i,a,o,c,d;(t=t).Template=function(e,t,n,r){this.r=(e=e||{}).code||this.r,this.c=n,this.options=r||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},t.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=s(e),c.test(e)?e.replace(n,"&amp;").replace(r,"&lt;").replace(i,"&gt;").replace(a,"&#39;").replace(o,"&quot;"):e},t:s,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var n=this.partials[e],r=t[n.name];if(n.instance&&n.base==r)return n.instance;if("string"==typeof r){if(!this.c)throw new Error("No compiler available.");r=this.c.compile(r,this.options)}if(!r)return null;if(this.partials[e].base=r,n.subs){for(key in t.stackText||(t.stackText={}),n.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);r=function(e,t,n,r,i,a){function s(){}function o(){}o.prototype=(s.prototype=e).subs;var c,u=new s;for(c in u.subs=new o,u.subsText={},u.buf="",r=r||{},u.stackSubs=r,u.subsText=a,t)r[c]||(r[c]=t[c]);for(c in r)u.subs[c]=r[c];for(c in i=i||{},u.stackPartials=i,n)i[c]||(i[c]=n[c]);for(c in i)u.partials[c]=i[c];return u}(r,n.subs,n.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=r},rp:function(e,t,n,r){e=this.ep(e,n);return e?e.ri(t,n,r):""},rs:function(e,t,n){var r=e[e.length-1];if(d(r))for(var i=0;i<r.length;i++)e.push(r[i]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,r,i,a,s){return(!d(e)||0!==e.length)&&(n=!!(e="function"==typeof e?this.ms(e,t,n,r,i,a,s):e),!r&&n&&t&&t.push("object"==typeof e?e:t[t.length-1]),n)},d:function(e,t,n,r){var i,a=e.split("."),s=this.f(a[0],t,n,r),o=this.options.modelGet,c=null;if("."===e&&d(t[t.length-2]))s=t[t.length-1];else for(var u=1;u<a.length;u++)s=void 0!==(i=l(a[u],s,o))?(c=s,i):"";return!(r&&!s)&&(r||"function"!=typeof s||(t.push(c),s=this.mv(s,t,n),t.pop()),s)},f:function(e,t,n,r){for(var i=!1,a=!1,s=this.options.modelGet,o=t.length-1;0<=o;o--)if(void 0!==(i=l(e,t[o],s))){a=!0;break}return a?r||"function"!=typeof i?i:this.mv(i,t,n):!r&&""},ls:function(e,t,n,r,i){var a=this.options.delimiters;return this.options.delimiters=i,this.b(this.ct(s(e.call(t,r)),t,n)),this.options.delimiters=a,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,r,i,a,s){t=t[t.length-1],e=e.call(t);return"function"==typeof e?!!r||(r=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(e,t,n,r.substring(i,a),s)):e},mv:function(e,t,n){t=t[t.length-1],e=e.call(t);return"function"==typeof e?this.ct(s(e.call(t)),t,n):e},sub:function(e,t,n,r){var i=this.subs[e];i&&(this.activeSub=e,i(t,n,this,r),this.activeSub=!1)}},n=/&/g,r=/</g,i=/>/g,a=/\'/g,o=/\"/g,c=/[&<>\"\']/,d=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}),aa=(e.Template=ia.Template,e.template=e.Template,e),sa=function(e,t,n,r){t[0]=0;for(var i=1;i<t.length;i++){var a=t[i++],s=t[i]?(t[0]|=a?1:2,n[t[i++]]):t[++i];3===a?r[0]=s:4===a?r[1]=Object.assign(r[1]||{},s):5===a?(r[1]=r[1]||{})[t[++i]]=s:6===a?r[1][t[++i]]+=s+"":a?(a=e.apply(s,sa(e,s,n,["",null])),r.push(a),s[0]?t[0]|=2:(t[i-2]=0,t[i]=a)):r.push(s)}return r},oa=new Map;var ca=function(e){var t=oa.get(this);return t||(t=new Map,oa.set(this,t)),1<(t=sa(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,r=1,i="",a="",s=[0],o=function(e){1===r&&(e||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,e,i):3===r&&(e||i)?(s.push(3,e,i),r=2):2===r&&"..."===i&&e?s.push(4,e,0):2===r&&i&&!e?s.push(5,0,!0,i):5<=r&&((i||!e&&5===r)&&(s.push(r,0,i,n),r=6),e)&&(s.push(r,e,0,n),r=6),i=""},c=0;c<e.length;c++){c&&(1===r&&o(),o(c));for(var u=0;u<e[c].length;u++)t=e[c][u],1===r?"<"===t?(o(),s=[s],r=3):i+=t:4===r?i="--"===i&&">"===t?(r=1,""):t+i[0]:a?t===a?a="":i+=t:'"'===t||"'"===t?a=t:">"===t?(o(),r=1):r&&("="===t?(r=5,n=i,i=""):"/"===t&&(r<5||">"===e[c][u+1])?(o(),3===r&&(s=s[0]),(s=(r=s)[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(o(),r=2):i+=t),3===r&&"!--"===i&&(r=4,s=s[0])}return o(),s}(e)),t),arguments,[])).length?t:t[0]}.bind(j),ua=na(ra(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),la=ra(function(e){e.exports=function(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(r[n]=e[n]);return r},e.exports.__esModule=!0,e.exports.default=e.exports}),ia=(na(la),ra(function(e){e.exports=function(e,t){if(null==e)return{};var n,r=la(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r},e.exports.__esModule=!0,e.exports.default=e.exports})),da=na(ia),ha=["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"];ma=(e={createElement:j,Fragment:kt}).createElement,pa=e.Fragment,fa={createElement:ma,Fragment:pa}.createElement;var fa,ma,pa,ga=function(e){var r=e.parts,t=e.highlightedTagName,i=void 0===t?"mark":t,t=e.nonHighlightedTagName,a=void 0===t?"span":t,t=e.separator,s=void 0===t?", ":t,t=e.className,n=e.classNames,o=void 0===n?{}:n,n=da(e,ha);return ma("span",ua({},n,{className:I(o.root,t)}),r.map(function(e,t){var n=t===r.length-1;return ma(pa,{key:t},e.map(function(e,t){return ma(va,{key:t,classNames:o,highlightedTagName:i,nonHighlightedTagName:a,isHighlighted:e.isHighlighted},e.value)}),!n&&ma("span",{className:o.separator},s))}))};function va(e){var t=e.classNames,n=e.children,r=e.highlightedTagName,i=e.isHighlighted,e=e.nonHighlightedTagName;return fa(i?r:e,{className:i?t.highlighted:t.nonHighlighted},n)}var ya=["classNames"];function ba(e){var t=e.classNames,t=void 0===t?{}:t,e=E(e,ya);return j(ga,h({classNames:{root:I("ais-Highlight",t.root),highlighted:I("ais-Highlight-highlighted",t.highlighted),nonHighlighted:I("ais-Highlight-nonHighlighted",t.nonHighlighted),separator:I("ais-Highlight-separator",t.separator)}},e))}var Ra=["hit","attribute","cssClasses"];function Sa(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return j(ba,h({},E(e,Ra),{parts:et(Ne(t._highlightResult,n)||[]).map(function(e){return we(te(e.value||""))}),classNames:r}))}var _a=["classNames"];function wa(e){var t=e.classNames,t=void 0===t?{}:t,e=E(e,_a);return j(ga,h({classNames:{root:I("ais-ReverseHighlight",t.root),highlighted:I("ais-ReverseHighlight-highlighted",t.highlighted),nonHighlighted:I("ais-ReverseHighlight-nonHighlighted",t.nonHighlighted),separator:I("ais-ReverseHighlight-separator",t.separator)}},e))}var Pa=["hit","attribute","cssClasses"],Na=["isHighlighted"];function xa(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return j(wa,h({},E(e,Pa),{parts:et(Ne(t._highlightResult,n)||[]).map(function(e){return we(te(e.value||"")).map(function(e){var t=e.isHighlighted;return C(C({},E(e,Na)),{},{isHighlighted:!t})})}),classNames:r}))}var Ia=["classNames"];function Ta(e){var t=e.classNames,t=void 0===t?{}:t,e=E(e,Ia);return j(ga,h({classNames:{root:I("ais-ReverseSnippet",t.root),highlighted:I("ais-ReverseSnippet-highlighted",t.highlighted),nonHighlighted:I("ais-ReverseSnippet-nonHighlighted",t.nonHighlighted),separator:I("ais-ReverseSnippet-separator",t.separator)}},e))}var Fa=["hit","attribute","cssClasses"],Ca=["isHighlighted"];function Ea(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return j(Ta,h({},E(e,Fa),{parts:et(Ne(t._snippetResult,n)||[]).map(function(e){return we(te(e.value||"")).map(function(e){var t=e.isHighlighted;return C(C({},E(e,Ca)),{},{isHighlighted:!t})})}),classNames:r}))}var ka=["classNames"];function ja(e){var t=e.classNames,t=void 0===t?{}:t,e=E(e,ka);return j(ga,h({classNames:{root:I("ais-Snippet",t.root),highlighted:I("ais-Snippet-highlighted",t.highlighted),nonHighlighted:I("ais-Snippet-nonHighlighted",t.nonHighlighted),separator:I("ais-Snippet-separator",t.separator)}},e))}var La=["hit","attribute","cssClasses"];function Ma(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return j(ja,h({},E(e,La),{parts:et(Ne(t._snippetResult,n)||[]).map(function(e){return we(te(e.value||""))}),classNames:r}))}function Oa(e){var t=e.templates,n=e.templateKey,r=e.compileOptions,i=e.helpers,a=e.data,s=e.bindEvent,e=e.sendEvent,t=t[n];if("string"!=typeof t&&"function"!=typeof t)throw new Error("Template must be 'string' or 'function', was '".concat(y(t),"' (key: ").concat(n,")"));return"function"==typeof t?((n=s||{}).html=ca,n.sendEvent=e,n.components={Highlight:Sa,ReverseHighlight:xa,Snippet:Ma,ReverseSnippet:Ea},t(a,n)):(s=function(e,t,n){var r=0<arguments.length&&void 0!==e?e:{},i=1<arguments.length?t:void 0,a=2<arguments.length?n:void 0;return Object.keys(r).reduce(function(e,n){return C(C({},e),{},F({},n,function(){var t=this;return function(e){return r[n].call(a,e,function(e){return aa.compile(e,i).render(t)})}}))},{})}(i,r,a),aa.compile(t,r).render(C(C({},a),{},{helpers:s})).replace(/[ \n\r\t\f\xA0]+/g,function(e){return e.replace(/(^|\xA0+)[^\xA0]+/g,"$1 ")}).trim())}var g=function(){D(t,jt);var e=q(t);function t(){return A(this,t),e.apply(this,arguments)}return W(t,[{key:"shouldComponentUpdate",value:function(e){return!ke(this.props.data,e.data)||this.props.templateKey!==e.templateKey||!ke(this.props.rootProps,e.rootProps)}},{key:"render",value:function(){var e=this.props.rootTagName,t=this.props.useCustomCompileOptions[this.props.templateKey]?this.props.templatesConfig.compileOptions:{},t=Oa({templates:this.props.templates,templateKey:this.props.templateKey,compileOptions:t,helpers:this.props.templatesConfig.helpers,data:this.props.data,bindEvent:this.props.bindEvent,sendEvent:this.props.sendEvent});return null===t?null:"object"===y(t)?j(e,this.props.rootProps,t):j(e,h({},this.props.rootProps,{dangerouslySetInnerHTML:{__html:t}}))}}]),t}(),Ha=(F(g,"defaultProps",{data:{},rootTagName:"div",useCustomCompileOptions:{},templates:{},templatesConfig:{}}),function(e){var t=e.hits,n=e.isLoading,r=e.cssClasses,i=e.templateProps;return j("div",{className:I(r.root,0===t.length&&r.emptyRoot)},j(g,h({},i,{templateKey:"header",rootProps:{className:r.header},data:{hits:t,isLoading:n}})),n?j(g,h({},i,{templateKey:"loader",rootProps:{className:r.loader}})):j("ul",{className:r.list},t.map(function(e,t){return j(g,h({},i,{templateKey:"item",rootTagName:"li",rootProps:{className:r.item},key:e.objectID,data:C(C({},e),{},{get __hitIndex(){return t}})}))})))}),Aa={header:function(){return""},loader:function(){return""},item:function(e){return JSON.stringify(e)}},Wa=l({name:"answers"}),Da=i("Answers"),Ba=["container","widgets","fallbackWidget"],Ua=l({name:"dynamic-widgets"}),qa=i("DynamicWidgets");function Qa(e){var t=document.createElement("div");return t.className=qa({descendantName:"widget"}),e.appendChild(t),t}function Va(e){var n,i,a,s,t,r=(e=e||{}).container,o=e.widgets,c=e.fallbackWidget,e=E(e,Ba);if(!r)throw new Error(Ua("The `container` option is required."));if(o&&Array.isArray(o)&&o.every(function(e){return"function"==typeof e}))return n=P(r),(i=document.createElement("div")).className=qa(),a=new Map,s=[],t=nt(function(e,t){e=e.attributesToRender;t&&n.appendChild(i),e.forEach(function(e){a.has(e)&&(e=a.get(e),i.appendChild(e))})},function(){n.removeChild(i)})(C(C({},e),{},{widgets:s,fallbackWidget:"function"==typeof c?function(e){var e=e.attribute,t=Qa(i);return a.set(e,t),c({attribute:e,container:t})}:void 0})),C(C({},t),{},{init:function(r){o.forEach(function(e){var t=Qa(i),e=e(t),n=Te(e,r);a.set(n,t),s.push(e)}),t.init(r)},$$widgetType:"ais.dynamicWidgets"});throw new Error(Ua("The `widgets` option expects an array of callbacks."))}function $a(e,t){var n=e.items,r=e.widgetParams,e=e.canRefine;t||(t=r.container,r=r.cssClasses,L(j(as,{cssClasses:r,items:n,canRefine:e}),t))}function Ka(e){var t=e.className,n=e.disabled;return j("button",{className:t,onClick:e.onClick,disabled:void 0!==n&&n},e.children)}function za(e){var t=e.classNameLabel,n=e.classNameInput,r=e.checked,i=e.onToggle,e=e.children;return j("label",{className:t},j("input",{className:n,type:"checkbox",checked:r,onChange:i}),e)}function Ja(e,t){var n,r,i,a,s=e.items,o=e.position,c=e.currentRefinement,u=e.refine,l=e.clearMapRefinement,d=e.toggleRefineOnMapMove,h=e.isRefineOnMapMove,f=e.setMapMoveSinceLastRefine,m=e.hasMapMoveSinceLastRefine,p=e.isRefinedWithMap,g=e.widgetParams,e=e.instantSearchInstance,v=g.container,y=g.googleReference,b=g.cssClasses,R=g.templates,S=g.initialZoom,_=g.initialPosition,w=g.enableRefine,P=g.enableClearMapRefinement,N=g.enableRefineControl,x=g.mapOptions,I=g.createMarker,T=g.markerOptions,F=g.renderState;t?(F.isUserInteraction=!0,F.isPendingRefine=!1,F.markers=[],(g=document.createElement("div")).className=b.root,v.appendChild(g),(t=document.createElement("div")).className=b.map,g.appendChild(t),(n=document.createElement("div")).className=b.tree,g.appendChild(n),F.mapInstance=new y.maps.Map(t,C({mapTypeControl:!1,fullscreenControl:!1,streetViewControl:!1,clickableIcons:!1,zoomControlOptions:{position:y.maps.ControlPosition.LEFT_TOP}},x)),y.maps.event.addListenerOnce(F.mapInstance,"idle",function(){function e(){F.isUserInteraction&&w&&(f(),h())&&(F.isPendingRefine=!0)}F.mapInstance.addListener("center_changed",e),F.mapInstance.addListener("zoom_changed",e),F.mapInstance.addListener("dragstart",e),F.mapInstance.addListener("idle",function(){F.isUserInteraction&&F.isPendingRefine&&(F.isPendingRefine=!1,ds({mapInstance:F.mapInstance,refine:u}))})}),F.templateProps=M({templatesConfig:e.templatesConfig,templates:R})):(g=s.map(function(e){return e.objectID}),t=(n=k(hs(F.markers,g),2))[0],x=n[1],r=t.map(function(e){return e.__id}),e=s.filter(function(e){return!r.includes(e.objectID)}),x.forEach(function(e){return e.setMap(null)}),F.markers=t.concat(e.map(function(n){var r=I({map:F.mapInstance,item:n});return Object.keys(T.events).forEach(function(t){r.addListener(t,function(e){T.events[t]({map:F.mapInstance,event:e,item:n,marker:r})})}),r})),R=!m(),i=c?0:null,(a=!c&&Boolean(F.markers.length)?fs(y,F.markers):c)&&R?ms(F,function(){F.mapInstance.fitBounds(new y.maps.LatLngBounds(a.southWest,a.northEast),i)}):R&&ms(F,function(){F.mapInstance.setCenter(o||_),F.mapInstance.setZoom(S)}),L(j(ls,{cssClasses:b,enableRefine:w,enableRefineControl:N,enableClearMapRefinement:P,isRefineOnMapMove:h(),isRefinedWithMap:p(),hasMapMoveSinceLastRefine:m(),onRefineToggle:d,onRefineClick:function(){return ds({mapInstance:F.mapInstance,refine:u})},onClearClick:l,templateProps:F.templateProps}),v.querySelector(".".concat(b.tree))))}var Za=l({name:"analytics"}),Ya=function(e){var r=e.items,i=e.cssClasses,a=e.templateProps,s=e.createURL,o=e.refine;return j("div",{className:I(i.root,0===r.length&&i.noRefinementRoot)},j("ul",{className:i.list},j("li",{className:I(i.item,0===r.length&&i.selectedItem)},j(g,h({},a,{templateKey:"home",rootTagName:"a",rootProps:{className:i.link,href:s(void 0),onClick:function(e){e.preventDefault(),o(void 0)}}}))),r.map(function(t,e){var n=e===r.length-1;return j("li",{key:t.label+e,className:I(i.item,n&&i.selectedItem)},j(g,h({},a,{templateKey:"separator",rootTagName:"span",rootProps:{className:i.separator,"aria-hidden":!0}})),n?t.label:j("a",{className:i.link,href:s(t.value),onClick:function(e){e.preventDefault(),o(t.value)}},t.label))})))},Xa={home:function(){return"Home"},separator:function(){return">"}},Ga=l({name:"breadcrumb"}),es=i("Breadcrumb"),ts=function(e){var t=e.hasRefinements,n=e.refine,r=e.cssClasses,e=e.templateProps;return j("div",{className:r.root},j(g,h({},e,{templateKey:"resetLabel",rootTagName:"button",rootProps:{className:I(r.button,!t&&r.disabledButton),onClick:n,disabled:!t},data:{hasRefinements:t}})))},ns={resetLabel:function(){return"Clear refinements"}},rs=l({name:"clear-refinements"}),is=i("ClearRefinements"),as=function(e){var t=e.items,a=e.cssClasses,e=e.canRefine;return j("div",{className:I(a.root,!e&&a.noRefinementRoot)},j("ul",{className:a.list},t.map(function(i,e){return j("li",{key:"".concat(i.indexName,"-").concat(i.attribute,"-").concat(e),className:a.item},j("span",{className:a.label},(e=i.label).toString().charAt(0).toUpperCase()+e.toString().slice(1),":"),i.refinements.map(function(e){return j("span",{key:(n=e.attribute,r=e.value,[n,e.type,r,e.operator].map(function(e){return e}).filter(Boolean).join(":")),className:a.category},j("span",{className:a.categoryLabel},"query"===e.attribute?j("q",null,e.label):e.label),j("button",{className:a.delete,onClick:(t=i.refine.bind(null,e),function(e){je(e)||(e.preventDefault(),t())})},"✕"));var t,n,r}))})))},ss=l({name:"current-refinements"}),os=i("CurrentRefinements"),cs=j("p",null,"Your custom HTML Marker"),us={HTMLMarker:function(){return cs},reset:function(){return"Clear the map refinement"},toggle:function(){return"Search as I move the map"},redo:function(){return"Redo search here"}},ls=function(e){var t=e.cssClasses,n=e.enableRefine,r=e.enableRefineControl,i=e.enableClearMapRefinement,a=e.isRefineOnMapMove,s=e.isRefinedWithMap,o=e.hasMapMoveSinceLastRefine,c=e.onRefineToggle,u=e.onRefineClick,l=e.onClearClick,e=e.templateProps;return j(kt,null,n&&j("div",null,r&&j("div",{className:t.control},a||!o?j(za,{classNameLabel:I(t.label,a&&t.selectedLabel),classNameInput:t.input,checked:a,onToggle:c},j(g,h({},e,{templateKey:"toggle",rootTagName:"span"}))):j(Ka,{className:t.redo,disabled:!o,onClick:u},j(g,h({},e,{templateKey:"redo",rootTagName:"span"})))),!r&&!a&&j("div",{className:t.control},j(Ka,{className:I(t.redo,!o&&t.disabledRedo),disabled:!o,onClick:u},j(g,h({},e,{templateKey:"redo",rootTagName:"span"})))),i&&s&&j(Ka,{className:t.reset,onClick:l},j(g,h({},e,{templateKey:"reset",rootTagName:"span"})))))},ds=function(e){var t=e.refine,e=e.mapInstance;return t({northEast:e.getBounds().getNorthEast().toJSON(),southWest:e.getBounds().getSouthWest().toJSON()})},hs=function(e,r){return e.reduce(function(e,t){var e=k(e,2),n=e[0],e=e[1];return r.includes(t.__id)?[n.concat(t),e]:[n,e.concat(t)]},[[],[]])},fs=function(e,t){t=t.reduce(function(e,t){return e.extend(t.getPosition())},new e.maps.LatLngBounds);return{northEast:t.getNorthEast().toJSON(),southWest:t.getSouthWest().toJSON()}},ms=function(e,t){e.isUserInteraction=!1,t(),e.isUserInteraction=!0},ps=["initialZoom","initialPosition","templates","cssClasses","builtInMarker","customHTMLMarker","enableRefine","enableClearMapRefinement","enableRefineControl","container","googleReference"],gs=["item"],vs=["item"],ys=l({name:"geo-search"}),bs=i("GeoSearch"),ia={query:"",showSubmit:!0,showReset:!0,showLoadingIndicator:!0,autofocus:!1,searchAsYouType:!0,isSearchStalled:!1,disabled:!1,onChange:v,onSubmit:v,onReset:v,refine:v},Rs=function(){D(i,jt);var r=q(i);function i(){var a;A(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return F(b(a=r.call.apply(r,[this].concat(t))),"state",{query:a.props.query,focused:!1}),F(b(a),"input",Et()),F(b(a),"onInput",function(e){var t=a.props,n=t.searchAsYouType,r=t.refine,t=t.onChange,i=e.target.value;n&&r(i),a.setState({query:i}),t(e)}),F(b(a),"onSubmit",function(e){var t=a.props,n=t.searchAsYouType,r=t.refine,t=t.onSubmit;return e.preventDefault(),e.stopPropagation(),a.input.current&&a.input.current.blur(),n||r(a.state.query),t(e),!1}),F(b(a),"onReset",function(e){var t=a.props,n=t.refine,t=t.onReset;a.input.current&&a.input.current.focus(),n(""),a.setState({query:""}),t(e)}),F(b(a),"onBlur",function(){a.setState({focused:!1})}),F(b(a),"onFocus",function(){a.setState({focused:!0})}),a}return W(i,[{key:"resetInput",value:function(){this.setState({query:""})}},{key:"componentWillReceiveProps",value:function(e){this.state.focused||e.query===this.state.query||this.setState({query:e.query})}},{key:"render",value:function(){var e=this.props,t=e.cssClasses,n=e.placeholder,r=e.autofocus,i=e.showSubmit,a=e.showReset,s=e.showLoadingIndicator,o=e.templates,e=e.isSearchStalled;return j("div",{className:t.root},j("form",{action:"",role:"search",className:t.form,noValidate:!0,onSubmit:this.onSubmit,onReset:this.onReset},j("input",{ref:this.input,value:this.state.query,disabled:this.props.disabled,className:t.input,type:"search",placeholder:n,autoFocus:r,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",maxLength:512,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus}),j(g,{templateKey:"submit",rootTagName:"button",rootProps:{className:t.submit,type:"submit",title:"Submit the search query.",hidden:!i},templates:o,data:{cssClasses:t}}),j(g,{templateKey:"reset",rootTagName:"button",rootProps:{className:t.reset,type:"reset",title:"Clear the search query.",hidden:!(a&&this.state.query.trim()&&!e)},templates:o,data:{cssClasses:t}}),s&&j(g,{templateKey:"loadingIndicator",rootTagName:"span",rootProps:{className:t.loadingIndicator,hidden:!e},templates:o,data:{cssClasses:t}})))}}]),i}();function Ss(e){var t=e.className,n=e.handleClick,r=e.facetValueToRefine,i=e.isRefined,a=e.templateProps,s=e.templateKey,o=e.templateData,e=e.subItems;return j("li",{className:t,onClick:function(e){n({facetValueToRefine:r,isRefined:i,originalEvent:e})}},j(g,h({},a,{templateKey:s,data:o})),e)}F(Rs,"defaultProps",ia);var _s=["root"];function ws(e){return void 0!==e.data}var Ps=function(){D(a,jt);var t=q(a);function a(e){return A(this,a),F(b(e=t.call(this,e)),"searchBox",Et()),e.handleItemClick=e.handleItemClick.bind(b(e)),e}return W(a,[{key:"shouldComponentUpdate",value:function(e){return!ke(this.props.facetValues,e.facetValues)}},{key:"refine",value:function(e){this.props.toggleRefinement(e)}},{key:"_generateFacetItem",value:function(e){ws(e)&&Array.isArray(e.data)&&0<e.data.length&&((t=this.props.cssClasses).root,t=E(t,_s),t=j(a,h({},this.props,{cssClasses:t,depth:this.props.depth+1,facetValues:e.data,showMore:!1,className:this.props.cssClasses.childList})));var t,n=this.props.createURL(e.value),n=C(C({},e),{},{url:n,attribute:this.props.attribute,cssClasses:this.props.cssClasses,isFromSearch:this.props.isFromSearch}),r=e.value,i=(void 0!==e.isRefined&&(r+="/".concat(e.isRefined)),void 0!==e.count&&(r+="/".concat(e.count)),I(this.props.cssClasses.item,e.isRefined&&this.props.cssClasses.selectedItem,!e.count&&this.props.cssClasses.disabledItem,Boolean(ws(e)&&Array.isArray(e.data)&&0<e.data.length)&&this.props.cssClasses.parentItem));return j(Ss,{templateKey:"item",key:r,facetValueToRefine:e.value,handleClick:this.handleItemClick,isRefined:e.isRefined,className:i,subItems:t,templateData:n,templateProps:this.props.templateProps})}},{key:"handleItemClick",value:function(e){var t=e.facetValueToRefine,n=e.isRefined,r=e.originalEvent;if(!je(r)&&r.target instanceof HTMLElement&&r.target.parentNode instanceof HTMLElement&&(!n||!r.target.parentNode.querySelector('input[type="radio"]:checked'))){if("INPUT"!==r.target.tagName){for(var i=r.target;i!==r.currentTarget;){if("LABEL"===i.tagName&&(i.querySelector('input[type="checkbox"]')||i.querySelector('input[type="radio"]')))return;"A"===i.tagName&&i.href&&r.preventDefault(),i=i.parentNode}r.stopPropagation()}this.refine(t)}}},{key:"componentWillReceiveProps",value:function(e){this.searchBox.current&&!e.isFromSearch&&this.searchBox.current.resetInput()}},{key:"refineFirstValue",value:function(){var e=this.props.facetValues&&this.props.facetValues[0];e&&(e=e.value,this.props.toggleRefinement(e))}},{key:"render",value:function(){var t=this,e=I(this.props.cssClasses.showMore,!(!0===this.props.showMore&&this.props.canToggleShowMore)&&this.props.cssClasses.disabledShowMore),e=!0===this.props.showMore&&j(g,h({},this.props.templateProps,{templateKey:"showMoreText",rootTagName:"button",rootProps:{className:e,disabled:!this.props.canToggleShowMore,onClick:this.props.toggleShowMore},data:{isShowingMore:this.props.isShowingMore}})),n=!0!==this.props.searchIsAlwaysActive&&!(this.props.isFromSearch||!this.props.hasExhaustiveItems),n=this.props.searchFacetValues&&j("div",{className:this.props.cssClasses.searchBox},j(Rs,{ref:this.searchBox,placeholder:this.props.searchPlaceholder,disabled:n,cssClasses:this.props.cssClasses.searchable,templates:this.props.searchBoxTemplateProps.templates,onChange:function(e){return t.props.searchFacetValues(e.target.value)},onReset:function(){return t.props.searchFacetValues("")},onSubmit:function(){return t.refineFirstValue()},searchAsYouType:!1})),r=this.props.facetValues&&0<this.props.facetValues.length&&j("ul",{className:this.props.cssClasses.list},this.props.facetValues.map(this._generateFacetItem,this)),i=this.props.searchFacetValues&&this.props.isFromSearch&&(!this.props.facetValues||0===this.props.facetValues.length)&&j(g,h({},this.props.templateProps,{templateKey:"searchableNoResults",rootProps:{className:this.props.cssClasses.noResults}}));return j("div",{className:I(this.props.cssClasses.root,(!this.props.facetValues||0===this.props.facetValues.length)&&this.props.cssClasses.noRefinementRoot,this.props.className)},this.props.children,n,r,i,e)}}]),a}(),Ns=(F(Ps,"defaultProps",{cssClasses:{},depth:0}),{item:function(e){var t=e.url,n=e.label,r=e.count,i=e.cssClasses,e=e.isRefined;return j("a",{className:I(I(i.link),I(e?i.selectedItemLink:void 0)),href:t},j("span",{className:I(i.label)},n),j("span",{className:I(i.count)},Zi(r)))},showMoreText:function(e){return e.isShowingMore?"Show less":"Show more"}}),xs=l({name:"hierarchical-menu"}),S=i("HierarchicalMenu"),Is={empty:function(){return"No results"},item:function(e){return JSON.stringify(ze(e,["__hitIndex"]),null,2)}},Ts=l({name:"hits"}),Fs=i("Hits"),Cs=Jt(function(e){var t=e.results,n=e.hits,r=e.bindEvent,i=e.sendEvent,a=e.cssClasses,s=e.templateProps;return 0===t.hits.length?j(g,h({},s,{templateKey:"empty",rootProps:{className:I(a.root,a.emptyRoot)},data:t})):j("div",{className:a.root},j("ol",{className:a.list},n.map(function(e,t){return j(g,h({},s,{templateKey:"item",rootTagName:"li",rootProps:{className:a.item},key:e.objectID,data:C(C({},e),{},{get __hitIndex(){return t}}),bindEvent:r,sendEvent:i}))})))});function Es(e){var t=e.currentValue,n=e.options,r=e.cssClasses,i=e.setValue;return j("select",{className:I(r.select),onChange:function(e){return i(e.target.value)},value:"".concat(t)},n.map(function(e){return j("option",{className:I(r.option),key:e.label+e.value,value:"".concat(e.value)},e.label)}))}var ks=l({name:"hits-per-page"}),js=i("HitsPerPage"),Ls={empty:function(){return"No results"},showPreviousText:function(){return"Show previous results"},showMoreText:function(){return"Show more results"},item:function(e){return JSON.stringify(ze(e,["__hitIndex"]),null,2)}},Ms=l({name:"infinite-hits"}),Os=i("InfiniteHits"),Hs=Jt(function(e){var t=e.results,n=e.hits,r=e.bindEvent,i=e.sendEvent,a=e.hasShowPrevious,s=e.showPrevious,o=e.showMore,c=e.isFirstPage,u=e.isLastPage,l=e.cssClasses,d=e.templateProps;return 0===t.hits.length?j(g,h({},d,{templateKey:"empty",rootProps:{className:I(l.root,l.emptyRoot)},data:t})):j("div",{className:l.root},a&&j(g,h({},d,{templateKey:"showPreviousText",rootTagName:"button",rootProps:{className:I(l.loadPrevious,c&&l.disabledLoadPrevious),disabled:c,onClick:s}})),j("ol",{className:l.list},n.map(function(e,t){return j(g,h({},d,{templateKey:"item",rootTagName:"li",rootProps:{className:l.item},key:e.objectID,data:C(C({},e),{},{get __hitIndex(){return t}}),bindEvent:r,sendEvent:i}))})),j(g,h({},d,{templateKey:"showMoreText",rootTagName:"button",rootProps:{className:I(l.loadMore,u&&l.disabledLoadMore),disabled:u,onClick:o}})))}),As={item:function(e){var t=e.cssClasses,n=e.url,r=e.label,e=e.count;return j("a",{className:I(t.link),href:n},j("span",{className:I(t.label)},r),j("span",{className:I(t.count)},Zi(e)))},showMoreText:function(e){return e.isShowingMore?"Show less":"Show more"}},Ws=l({name:"menu"}),Ds=i("Menu");function Bs(e){var t=e.cssClasses,n=e.templateProps,r=e.items,i=e.refine,e=(Re(r,function(e){return e.isRefined})||{value:""}).value;return j("div",{className:I(t.root,0===r.length&&t.noRefinementRoot)},j("select",{className:t.select,value:e,onChange:function(e){i(e.target.value)}},j(g,h({},n,{templateKey:"defaultOption",rootTagName:"option",rootProps:{value:"",className:t.option}})),r.map(function(e){return j(g,h({},n,{templateKey:"item",rootTagName:"option",rootProps:{value:e.value,className:t.option},key:e.value,data:e}))})))}var Us={item:function(e){var t=e.label,e=e.count;return"".concat(t," (").concat(Zi(e),")")},defaultOption:function(){return"See all"}},qs=l({name:"menu-select"}),Qs=i("MenuSelect"),Vs={item:function(e){var t=e.cssClasses,n=e.attribute,r=e.label,e=e.isRefined;return j("label",{className:t.label},j("input",{type:"radio",className:t.radio,name:n,defaultChecked:e}),j("span",{className:t.labelText},r))}},$s=l({name:"numeric-menu"}),Ks=i("NumericMenu");function zs(n){function t(t){return function(e){je(e)||(e.preventDefault(),n.setCurrentPage(t))}}return j("div",{className:I(n.cssClasses.root,n.nbPages<=1&&n.cssClasses.noRefinementRoot)},j("ul",{className:n.cssClasses.list},n.showFirst&&j(Js,{ariaLabel:"First",className:n.cssClasses.firstPageItem,isDisabled:n.isFirstPage,label:n.templates.first,pageNumber:0,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t}),n.showPrevious&&j(Js,{ariaLabel:"Previous",className:n.cssClasses.previousPageItem,isDisabled:n.isFirstPage,label:n.templates.previous,pageNumber:n.currentPage-1,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t}),n.pages.map(function(e){return j(Js,{key:e,ariaLabel:"Page ".concat(e+1),className:n.cssClasses.pageItem,isSelected:e===n.currentPage,label:"".concat(e+1),pageNumber:e,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t})}),n.showNext&&j(Js,{ariaLabel:"Next",className:n.cssClasses.nextPageItem,isDisabled:n.isLastPage,label:n.templates.next,pageNumber:n.currentPage+1,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t}),n.showLast&&j(Js,{ariaLabel:"Last",className:n.cssClasses.lastPageItem,isDisabled:n.isLastPage,label:n.templates.last,pageNumber:n.nbPages-1,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t})))}function Js(e){var t=e.label,n=e.ariaLabel,r=e.pageNumber,i=e.className,a=e.isDisabled,a=void 0!==a&&a,s=e.isSelected,o=e.cssClasses,c=e.createURL,e=e.createClickHandler;return j("li",{className:I(o.item,i,a&&o.disabledItem,void 0!==s&&s&&o.selectedItem)},a?j("span",{className:o.link,dangerouslySetInnerHTML:{__html:t}}):j("a",{className:o.link,"aria-label":n,href:c(r),onClick:e(r),dangerouslySetInnerHTML:{__html:t}}))}var Zs,_,Ys,Xs,T=i("Pagination"),Gs=l({name:"pagination"}),eo={previous:"",next:"",first:"«",last:"»"},to=0,no=[],ro=[],io=N.__b,ao=N.__r,so=N.diffed,oo=N.__c,co=N.unmount;function uo(e,t){N.__h&&N.__h(_,e,to||t),to=0;t=_.__H||(_.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:ro}),t.__[e]}function lo(e){to=1;var a,t=yo,n=void 0,s=uo(Zs++,2);return s.t=t,s.__c||(s.__=[n?n(e):yo(void 0,e),function(e){var t=(s.__N||s.__)[0],e=s.t(t,e);t!==e&&(s.__N=[e,s.__[1]],s.__c.setState({}))}],(s.__c=_).u)||(_.u=!0,a=_.shouldComponentUpdate,_.shouldComponentUpdate=function(e,t,n){var r,i;return!s.__c.__H||((r=s.__c.__H.__.filter(function(e){return e.__c})).every(function(e){return!e.__N})||(i=!1,r.forEach(function(e){var t;e.__N&&(t=e.__[0],e.__=e.__N,e.__N=void 0,t!==e.__[0])&&(i=!0)}),!!i))&&(!a||a.call(this,e,t,n))}),s.__N||s.__}function ho(e){return to=5,t=function(){return{current:e}},n=[],vo((r=uo(Zs++,7)).__H,n)?(r.__V=t(),r.i=n,r.__h=t,r.__V):r.__;var t,n,r}function fo(){for(var t;t=no.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(po),t.__H.__h.forEach(go),t.__H.__h=[]}catch(e){t.__H.__h=[],N.__e(e,t.__v)}}N.__b=function(e){"function"!=typeof e.type||e.o||e.type===kt?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),_=null,io&&io(e)},N.__r=function(e){ao&&ao(e),Zs=0;e=(_=e.__c).__H;e&&(Ys===_?(e.__h=[],_.__h=[],e.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=ro,e.__N=e.i=void 0})):(e.__h.forEach(po),e.__h.forEach(go),e.__h=[])),Ys=_},N.diffed=function(e){so&&so(e);e=e.__c;e&&e.__H&&(!e.__H.__h.length||1!==no.push(e)&&Xs===N.requestAnimationFrame||((Xs=N.requestAnimationFrame)||function(e){function t(){clearTimeout(r),mo&&cancelAnimationFrame(n),setTimeout(e)}var n,r=setTimeout(t,100);mo&&(n=requestAnimationFrame(t))})(fo),e.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==ro&&(e.__=e.__V),e.i=void 0,e.__V=ro})),Ys=_=null},N.__c=function(e,n){n.some(function(t){try{t.__h.forEach(po),t.__h=t.__h.filter(function(e){return!e.__||go(e)})}catch(e){n.some(function(e){e.__h&&(e.__h=[])}),n=[],N.__e(e,t.__v)}}),oo&&oo(e,n)},N.unmount=function(e){co&&co(e);var t,e=e.__c;e&&e.__H&&(e.__H.__.forEach(function(e){try{po(e)}catch(e){t=e}}),e.__H=void 0,t)&&N.__e(t,e.__v)};var mo="function"==typeof requestAnimationFrame;function po(e){var t=_,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),_=t}function go(e){var t=_;e.__c=e.__(),_=t}function vo(n,e){return!n||n.length!==e.length||e.some(function(e,t){return e!==n[t]})}function yo(e,t){return"function"==typeof t?t(e):t}function bo(t){var e,n,r=k(lo(t.isCollapsed),2),i=r[0],a=r[1],r=k(lo(!1),2),s=r[0],o=r[1],c=ho(null);return r=function(){var e=c.current;if(e)return e.appendChild(t.bodyElement),function(){e.removeChild(t.bodyElement)}},e=[c,t.bodyElement],n=uo(Zs++,3),!N.__s&&vo(n.__H,e)&&(n.__=r,n.i=e,_.__H.__h.push(n)),s||t.isCollapsed===i||a(t.isCollapsed),j("div",{className:I(t.cssClasses.root,t.hidden&&t.cssClasses.noRefinementRoot,t.collapsible&&t.cssClasses.collapsibleRoot,i&&t.cssClasses.collapsedRoot),hidden:t.hidden},t.templates.header&&j("div",{className:t.cssClasses.header},j(g,{templates:t.templates,templateKey:"header",rootTagName:"span",data:t.data}),t.collapsible&&j("button",{className:t.cssClasses.collapseButton,"aria-expanded":!i,onClick:function(e){e.preventDefault(),o(!0),a(function(e){return!e})}},j(g,{templates:t.templates,templateKey:"collapseButtonText",rootTagName:"span",data:{collapsed:i}}))),j("div",{className:t.cssClasses.body,ref:c}),t.templates.footer&&j(g,{templates:t.templates,templateKey:"footer",rootProps:{className:t.cssClasses.footer},data:t.data}))}function Ro(e){var t=e.style,e=e.children,n=Math.round(parseFloat(t.left)),r=[0,50,100].includes(n),e=Math.round(100*parseInt(e,10))/100;return j("div",{style:C(C({},t),{},{marginLeft:100===n?"-2px":0}),className:I("rheostat-marker","rheostat-marker-horizontal",r&&"rheostat-marker-large")},r&&j("div",{className:"rheostat-value"},e))}var So=l({name:"panel"}),_o=i("Panel"),wo=["placesReference","defaultPosition"],Po=["places"],No=function(e){var t=e.url,n=e.theme,e=e.cssClasses;return j("div",{className:e.root},j("a",{href:t,target:"_blank",className:e.link,"aria-label":"Search by Algolia",rel:"noopener noreferrer"},j("svg",{height:"1.2em",className:e.logo,viewBox:"0 0 572 64",style:{width:"auto"}},j("path",{fill:"dark"===n?"#FFF":"#36395A",d:"M16 48.3c-3.4 0-6.3-.6-8.7-1.7A12.4 12.4 0 0 1 1.9 42C.6 40 0 38 0 35.4h6.5a6.7 6.7 0 0 0 3.9 6c1.4.7 3.3 1.1 5.6 1.1 2.2 0 4-.3 5.4-1a7 7 0 0 0 3-2.4 6 6 0 0 0 1-3.4c0-1.5-.6-2.8-1.9-3.7-1.3-1-3.3-1.6-5.9-1.8l-4-.4c-3.7-.3-6.6-1.4-8.8-3.4a10 10 0 0 1-3.3-7.9c0-2.4.6-4.6 1.8-6.4a12 12 0 0 1 5-4.3c2.2-1 4.7-1.6 7.5-1.6s5.5.5 7.6 1.6a12 12 0 0 1 5 4.4c1.2 1.8 1.8 4 1.8 6.7h-6.5a6.4 6.4 0 0 0-3.5-5.9c-1-.6-2.6-1-4.4-1s-3.2.3-4.4 1c-1.1.6-2 1.4-2.6 2.4-.5 1-.8 2-.8 3.1a5 5 0 0 0 1.5 3.6c1 1 2.6 1.7 4.7 1.9l4 .3c2.8.2 5.2.8 7.2 1.8 2.1 1 3.7 2.2 4.9 3.8a9.7 9.7 0 0 1 1.7 5.8c0 2.5-.7 4.7-2 6.6a13 13 0 0 1-5.6 4.4c-2.4 1-5.2 1.6-8.4 1.6Zm35.6 0c-2.6 0-4.8-.4-6.7-1.3a13 13 0 0 1-4.7-3.5 17.1 17.1 0 0 1-3.6-10.4v-1c0-2 .3-3.8 1-5.6a13 13 0 0 1 7.3-8.3 15 15 0 0 1 6.3-1.4A13.2 13.2 0 0 1 64 24.3c1 2.2 1.6 4.6 1.6 7.2V34H39.4v-4.3h21.8l-1.8 2.2c0-2-.3-3.7-.9-5.1a7.3 7.3 0 0 0-2.7-3.4c-1.2-.7-2.7-1.1-4.6-1.1s-3.4.4-4.7 1.3a8 8 0 0 0-2.9 3.6c-.6 1.5-.9 3.3-.9 5.4 0 2 .3 3.7 1 5.3a7.9 7.9 0 0 0 2.8 3.7c1.3.8 3 1.3 5 1.3s3.8-.5 5.1-1.3c1.3-1 2.1-2 2.4-3.2h6a11.8 11.8 0 0 1-7 8.7 16 16 0 0 1-6.4 1.2ZM80 48c-2.2 0-4-.3-5.7-1a8.4 8.4 0 0 1-3.7-3.3 9.7 9.7 0 0 1-1.3-5.2c0-2 .5-3.8 1.5-5.2a9 9 0 0 1 4.3-3.1c1.8-.7 4-1 6.7-1H89v4.1h-7.5c-2 0-3.4.5-4.4 1.4-1 1-1.6 2.1-1.6 3.6s.5 2.7 1.6 3.6c1 1 2.5 1.4 4.4 1.4 1.1 0 2.2-.2 3.2-.7 1-.4 1.9-1 2.6-2 .6-1 1-2.4 1-4.2l1.7 2.1c-.2 2-.7 3.8-1.5 5.2a9 9 0 0 1-3.4 3.3 12 12 0 0 1-5.3 1Zm9.5-.7v-8.8h-1v-10c0-1.8-.5-3.2-1.4-4.1-1-1-2.4-1.4-4.2-1.4a142.9 142.9 0 0 0-10.2.4v-5.6a74.8 74.8 0 0 1 8.6-.4c3 0 5.5.4 7.5 1.2s3.4 2 4.4 3.6c1 1.7 1.4 4 1.4 6.7v18.4h-5Zm12.9 0V17.8h5v12.3h-.2c0-4.2 1-7.4 2.8-9.5a11 11 0 0 1 8.3-3.1h1v5.6h-2a9 9 0 0 0-6.3 2.2c-1.5 1.5-2.2 3.6-2.2 6.4v15.6h-6.4Zm34.4 1a15 15 0 0 1-6.6-1.3c-1.9-.9-3.4-2-4.7-3.5a15.5 15.5 0 0 1-2.7-5c-.6-1.7-1-3.6-1-5.4v-1c0-2 .4-3.8 1-5.6a15 15 0 0 1 2.8-4.9c1.3-1.5 2.8-2.6 4.6-3.5a16.4 16.4 0 0 1 13.3.2c2 1 3.5 2.3 4.8 4a12 12 0 0 1 2 6H144c-.2-1.6-1-3-2.2-4.1a7.5 7.5 0 0 0-5.2-1.7 8 8 0 0 0-4.7 1.3 8 8 0 0 0-2.8 3.6 13.8 13.8 0 0 0 0 10.3c.6 1.5 1.5 2.7 2.8 3.6s2.8 1.3 4.8 1.3c1.5 0 2.7-.2 3.8-.8a7 7 0 0 0 2.6-2c.7-1 1-2 1.2-3.2h6.2a11 11 0 0 1-2 6.2 15.1 15.1 0 0 1-11.8 5.5Zm19.7-1v-40h6.4V31h-1.3c0-3 .4-5.5 1.1-7.6a9.7 9.7 0 0 1 3.5-4.8A9.9 9.9 0 0 1 172 17h.3c3.5 0 6 1.1 7.9 3.5 1.7 2.3 2.6 5.7 2.6 10v16.8h-6.4V29.6c0-2.1-.6-3.8-1.8-5a6.4 6.4 0 0 0-4.8-1.8c-2 0-3.7.7-5 2a7.8 7.8 0 0 0-1.9 5.5v17h-6.4Zm63.8 1a12.2 12.2 0 0 1-10.9-6.2 19 19 0 0 1-1.8-7.3h1.4v12.5h-5.1v-40h6.4v19.8l-2 3.5c.2-3.1.8-5.7 1.9-7.7a11 11 0 0 1 4.4-4.5c1.8-1 3.9-1.5 6.1-1.5a13.4 13.4 0 0 1 12.8 9.1c.7 1.9 1 3.8 1 6v1c0 2.2-.3 4.1-1 6a13.6 13.6 0 0 1-13.2 9.4Zm-1.2-5.5a8.4 8.4 0 0 0 7.9-5c.7-1.5 1.1-3.3 1.1-5.3s-.4-3.8-1.1-5.3a8.7 8.7 0 0 0-3.2-3.6 9.6 9.6 0 0 0-9.2-.2 8.5 8.5 0 0 0-3.3 3.2c-.8 1.4-1.3 3-1.3 5v2.3a9 9 0 0 0 1.3 4.8 9 9 0 0 0 3.4 3c1.4.7 2.8 1 4.4 1Zm27.3 3.9-10-28.9h6.5l9.5 28.9h-6Zm-7.5 12.2v-5.7h4.9c1 0 2-.1 2.9-.4a4 4 0 0 0 2-1.4c.4-.7.9-1.6 1.2-2.7l8.6-30.9h6.2l-9.3 32.4a14 14 0 0 1-2.5 5 8.9 8.9 0 0 1-4 2.8c-1.5.6-3.4.9-5.6.9h-4.4Zm9-12.2v-5.2h6.4v5.2H248Z"}),j("path",{fill:"dark"===n?"#FFF":"#003DFF",d:"M534.4 9.1H528a.8.8 0 0 1-.7-.7V1.8c0-.4.2-.7.6-.8l6.5-1c.4 0 .8.2.9.6v7.8c0 .4-.4.7-.8.7zM428 35.2V.8c0-.5-.3-.8-.7-.8h-.2l-6.4 1c-.4 0-.7.4-.7.8v35c0 1.6 0 11.8 12.3 12.2.5 0 .8-.4.8-.8V43c0-.4-.3-.7-.6-.8-4.5-.5-4.5-6-4.5-7zm106.5-21.8H528c-.4 0-.7.4-.7.8v34c0 .4.3.8.7.8h6.5c.4 0 .8-.4.8-.8v-34c0-.5-.4-.8-.8-.8zm-17.7 21.8V.8c0-.5-.3-.8-.8-.8l-6.5 1c-.4 0-.7.4-.7.8v35c0 1.6 0 11.8 12.3 12.2.4 0 .8-.4.8-.8V43c0-.4-.3-.7-.7-.8-4.4-.5-4.4-6-4.4-7zm-22.2-20.6a16.5 16.5 0 0 1 8.6 9.3c.8 2.2 1.3 4.8 1.3 7.5a19.4 19.4 0 0 1-4.6 12.6 14.8 14.8 0 0 1-5.2 3.6c-2 .9-5.2 1.4-6.8 1.4a21 21 0 0 1-6.7-1.4 15.4 15.4 0 0 1-8.6-9.3 21.3 21.3 0 0 1 0-14.4 15.2 15.2 0 0 1 8.6-9.3c2-.8 4.3-1.2 6.7-1.2s4.6.4 6.7 1.2zm-6.7 27.6c2.7 0 4.7-1 6.2-3s2.2-4.3 2.2-7.8-.7-6.3-2.2-8.3-3.5-3-6.2-3-4.7 1-6.1 3c-1.5 2-2.2 4.8-2.2 8.3s.7 5.8 2.2 7.8 3.5 3 6.2 3zm-88.8-28.8c-6.2 0-11.7 3.3-14.8 8.2a18.6 18.6 0 0 0 4.8 25.2c1.8 1.2 4 1.8 6.2 1.7s.1 0 .1 0h.9c4.2-.7 8-4 9.1-8.1v7.4c0 .4.3.7.8.7h6.4a.7.7 0 0 0 .7-.7V14.2c0-.5-.3-.8-.7-.8h-13.5zm6.3 26.5a9.8 9.8 0 0 1-5.7 2h-.5a10 10 0 0 1-9.2-14c1.4-3.7 5-6.3 9-6.3h6.4v18.3zm152.3-26.5h13.5c.5 0 .8.3.8.7v33.7c0 .4-.3.7-.8.7h-6.4a.7.7 0 0 1-.8-.7v-7.4c-1.2 4-4.8 7.4-9 8h-.1a4.2 4.2 0 0 1-.5.1h-.9a10.3 10.3 0 0 1-7-2.6c-4-3.3-6.5-8.4-6.5-14.2 0-3.7 1-7.2 3-10 3-5 8.5-8.3 14.7-8.3zm.6 28.4c2.2-.1 4.2-.6 5.7-2V21.7h-6.3a9.8 9.8 0 0 0-9 6.4 10.2 10.2 0 0 0 9.1 13.9h.5zM452.8 13.4c-6.2 0-11.7 3.3-14.8 8.2a18.5 18.5 0 0 0 3.6 24.3 10.4 10.4 0 0 0 13 .6c2.2-1.5 3.8-3.7 4.5-6.1v7.8c0 2.8-.8 5-2.2 6.3-1.5 1.5-4 2.2-7.5 2.2l-6-.3c-.3 0-.7.2-.8.5l-1.6 5.5c-.1.4.1.8.5 1h.1c2.8.4 5.5.6 7 .6 6.3 0 11-1.4 14-4.1 2.7-2.5 4.2-6.3 4.5-11.4V14.2c0-.5-.4-.8-.8-.8h-13.5zm6.3 8.2v18.3a9.6 9.6 0 0 1-5.6 2h-1a10.3 10.3 0 0 1-8.8-14c1.4-3.7 5-6.3 9-6.3h6.4zM291 31.5A32 32 0 0 1 322.8 0h30.8c.6 0 1.2.5 1.2 1.2v61.5c0 1.1-1.3 1.7-2.2 1l-19.2-17a18 18 0 0 1-11 3.4 18.1 18.1 0 1 1 18.2-14.8c-.1.4-.5.7-.9.6-.1 0-.3 0-.4-.2l-3.8-3.4c-.4-.3-.6-.8-.7-1.4a12 12 0 1 0-2.4 8.3c.4-.4 1-.5 1.6-.2l14.7 13.1v-46H323a26 26 0 1 0 10 49.7c.8-.4 1.6-.2 2.3.3l3 2.7c.3.2.3.7 0 1l-.2.2a32 32 0 0 1-47.2-28.6z"}))))},xo=i("PoweredBy"),Io=l({name:"powered-by"}),To=l({name:"query-rule-context"}),Fo=function(e){var t=e.cssClasses,n=e.templates,e=e.items;return j(g,{templateKey:"default",templates:n,rootProps:{className:t.root},data:{items:e}})},Co={default:function(e){e=e.items;return JSON.stringify(e,null,2)}},Eo=l({name:"query-rule-custom-data"}),ko=i("QueryRuleCustomData"),jo=function(){D(a,jt);var i=q(a);function a(){var n;A(this,a);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return F(b(n=i.call.apply(i,[this].concat(t))),"state",{min:n.props.values.min,max:n.props.values.max}),F(b(n),"onInput",function(t){return function(e){e=e.currentTarget.value;n.setState(F({},t,Number(e)))}}),F(b(n),"onSubmit",function(e){e.preventDefault(),n.props.refine([n.state.min,n.state.max])}),n}return W(a,[{key:"componentWillReceiveProps",value:function(e){this.setState({min:e.values.min,max:e.values.max})}},{key:"render",value:function(){var e=this.state,t=e.min,e=e.max,n=this.props,r=n.min,i=n.max,a=n.step,s=n.cssClasses,n=n.templateProps,o=!(!r||!i)&&i<=r,c=Boolean(t||e);return j("div",{className:I(s.root,!c&&s.noRefinement)},j("form",{className:s.form,onSubmit:this.onSubmit},j("label",{className:s.label},j("input",{className:I(s.input,s.inputMin),type:"number",min:r,max:i,step:a,value:null!=t?t:"",onInput:this.onInput("min"),placeholder:null==r?void 0:r.toString(),disabled:o})),j(g,h({},n,{templateKey:"separatorText",rootTagName:"span",rootProps:{className:s.separator}})),j("label",{className:s.label},j("input",{className:I(s.input,s.inputMax),type:"number",min:r,max:i,step:a,value:null!=e?e:"",onInput:this.onInput("max"),placeholder:null==i?void 0:i.toString(),disabled:o})),j(g,h({},n,{templateKey:"submitText",rootTagName:"button",rootProps:{type:"submit",className:s.submit,disabled:o}}))))}}]),a}(),Lo=l({name:"range-input"}),Mo=i("RangeInput"),Oo={separatorText:function(){return"to"},submitText:function(){return"Go"}},Ho=40,Ao=35,Wo=27,Do=36,Bo=37,Uo=34,qo=33,Qo=39,Vo=38,$o=100;function Ko(e,t,n){return(e-t)/(n-t)*100}function zo(e,t,n){return 0===e?t:100===e?n:Math.round((n-t)*(e/100)+t)}function Jo(e){return["rheostat","vertical"===e.orientation?"rheostat-vertical":"rheostat-horizontal"].concat(e.className.split(" ")).join(" ")}function Zo(e){return Number(e.currentTarget.getAttribute("data-handle-key"))}function Yo(e){e.stopPropagation(),e.preventDefault()}var Xo=j("div",{className:"rheostat-background"}),Go=function(){D(r,jt);var n=q(r);function r(e){var t;return A(this,r),F(b(t=n.call(this,e)),"state",{className:Jo(t.props),handlePos:t.props.values.map(function(e){return Ko(e,t.props.min,t.props.max)}),handleDimensions:0,mousePos:null,sliderBox:{},slidingIndex:null,values:t.props.values}),F(b(t),"rheostat",Et()),t.getPublicState=t.getPublicState.bind(b(t)),t.getSliderBoundingBox=t.getSliderBoundingBox.bind(b(t)),t.getProgressStyle=t.getProgressStyle.bind(b(t)),t.getMinValue=t.getMinValue.bind(b(t)),t.getMaxValue=t.getMaxValue.bind(b(t)),t.getHandleDimensions=t.getHandleDimensions.bind(b(t)),t.getClosestSnapPoint=t.getClosestSnapPoint.bind(b(t)),t.getSnapPosition=t.getSnapPosition.bind(b(t)),t.getNextPositionForKey=t.getNextPositionForKey.bind(b(t)),t.getNextState=t.getNextState.bind(b(t)),t.handleClick=t.handleClick.bind(b(t)),t.getClosestHandle=t.getClosestHandle.bind(b(t)),t.setStartSlide=t.setStartSlide.bind(b(t)),t.startMouseSlide=t.startMouseSlide.bind(b(t)),t.startTouchSlide=t.startTouchSlide.bind(b(t)),t.handleMouseSlide=t.handleMouseSlide.bind(b(t)),t.handleTouchSlide=t.handleTouchSlide.bind(b(t)),t.handleSlide=t.handleSlide.bind(b(t)),t.endSlide=t.endSlide.bind(b(t)),t.handleKeydown=t.handleKeydown.bind(b(t)),t.validatePosition=t.validatePosition.bind(b(t)),t.validateValues=t.validateValues.bind(b(t)),t.canMove=t.canMove.bind(b(t)),t.fireChangeEvent=t.fireChangeEvent.bind(b(t)),t.slideTo=t.slideTo.bind(b(t)),t.updateNewValues=t.updateNewValues.bind(b(t)),t}return W(r,[{key:"componentWillReceiveProps",value:function(n){var e=this.props,t=e.className,r=e.disabled,i=e.min,a=e.max,e=e.orientation,s=this.state,o=s.values,s=s.slidingIndex,i=n.min!==i||n.max!==a,a=o.length!==n.values.length||o.some(function(e,t){return n.values[t]!==e}),o=n.className!==t||n.orientation!==e,t=n.disabled&&!r;o&&this.setState({className:Jo(n)}),(i||a)&&this.updateNewValues(n),t&&null!==s&&this.endSlide()}},{key:"getPublicState",value:function(){var e=this.props,t=e.min;return{max:e.max,min:t,values:this.state.values}}},{key:"getSliderBoundingBox",value:function(){var e=this.rheostat.current,t=e.getBoundingClientRect();return{height:t.height||e.clientHeight,left:t.left,top:t.top,width:t.width||e.clientWidth}}},{key:"getProgressStyle",value:function(e){var t=this.state.handlePos,n=t[e];return 0===e?"vertical"===this.props.orientation?{height:"".concat(n,"%"),top:0}:{left:0,width:"".concat(n,"%")}:(t=n-(n=t[e-1]),"vertical"===this.props.orientation?{height:"".concat(t,"%"),top:"".concat(n,"%")}:{left:"".concat(n,"%"),width:"".concat(t,"%")})}},{key:"getMinValue",value:function(e){return this.state.values[e-1]?Math.max(this.props.min,this.state.values[e-1]):this.props.min}},{key:"getMaxValue",value:function(e){return this.state.values[e+1]?Math.min(this.props.max,this.state.values[e+1]):this.props.max}},{key:"getHandleDimensions",value:function(e,t){e=e.currentTarget||null;return e?"vertical"===this.props.orientation?e.clientHeight/t.height*$o/2:e.clientWidth/t.width*$o/2:0}},{key:"getClosestSnapPoint",value:function(n){return this.props.snapPoints.length?this.props.snapPoints.reduce(function(e,t){return Math.abs(e-n)<Math.abs(t-n)?e:t}):n}},{key:"getSnapPosition",value:function(e){var t,n,r;return this.props.snap?(t=(n=this.props).max,r=zo(e,n=n.min,t),Ko(this.getClosestSnapPoint(r),n,t)):e}},{key:"getNextPositionForKey",value:function(e,t){var n=this.state,r=n.handlePos,n=n.values,i=this.props,a=i.max,s=i.min,i=i.snapPoints,o=this.props.snap,c=n[e],r=r[e],u=r,l=1,d=(100<=a?r=Math.round(r):l=100/(a-s),null),e=(o&&(d=i.indexOf(this.getClosestSnapPoint(n[e]))),F(n={},Bo,function(e){return-1*e}),F(n,Qo,function(e){return e}),F(n,Vo,function(e){return e}),F(n,Ho,function(e){return-1*e}),F(n,Uo,function(e){return 1<e?-e:-10*e}),F(n,qo,function(e){return 1<e?e:10*e}),n);if(Object.prototype.hasOwnProperty.call(e,t))r+=e[t](l),o&&d&&(u<r?d<i.length-1&&(c=i[d+1]):0<d&&(c=i[d-1]));else if(t===Do)r=0,o&&(c=i[0]);else{if(t!==Ao)return null;r=$o,o&&(c=i[i.length-1])}return o?Ko(c,s,a):r}},{key:"getNextState",value:function(n,e){var t=this.state.handlePos,r=this.props,i=r.max,a=r.min,s=this.validatePosition(n,e),r=t.map(function(e,t){return t===n?s:e});return{handlePos:r,values:r.map(function(e){return zo(e,a,i)})}}},{key:"getClosestHandle",value:function(r){var i=this.state.handlePos;return i.reduce(function(e,t,n){return Math.abs(i[n]-r)<Math.abs(i[e]-r)?n:e},0)}},{key:"setStartSlide",value:function(e,t,n){var r=this.getSliderBoundingBox();this.setState({handleDimensions:this.getHandleDimensions(e,r),mousePos:{x:t,y:n},sliderBox:r,slidingIndex:Zo(e)})}},{key:"startMouseSlide",value:function(e){this.setStartSlide(e,e.clientX,e.clientY),document.addEventListener("mousemove",this.handleMouseSlide,!1),document.addEventListener("mouseup",this.endSlide,!1),Yo(e)}},{key:"startTouchSlide",value:function(e){var t;1<e.changedTouches.length||(t=e.changedTouches[0],this.setStartSlide(e,t.clientX,t.clientY),document.addEventListener("touchmove",this.handleTouchSlide,!1),document.addEventListener("touchend",this.endSlide,!1),this.props.onSliderDragStart&&this.props.onSliderDragStart(),Yo(e))}},{key:"handleMouseSlide",value:function(e){null!==this.state.slidingIndex&&(this.handleSlide(e.clientX,e.clientY),Yo(e))}},{key:"handleTouchSlide",value:function(e){var t;null!==this.state.slidingIndex&&(1<e.changedTouches.length?this.endSlide():(t=e.changedTouches[0],this.handleSlide(t.clientX,t.clientY),Yo(e)))}},{key:"handleSlide",value:function(e,t){var n=this.state,r=n.slidingIndex,n=n.sliderBox,n="vertical"===this.props.orientation?(t-n.top)/n.height*$o:(e-n.left)/n.width*$o;this.slideTo(r,n),this.canMove(r,n)&&(this.setState({mousePos:{x:e,y:t}}),this.props.onSliderDragMove)&&this.props.onSliderDragMove()}},{key:"endSlide",value:function(){var e,t=this,n=this.state.slidingIndex;this.setState({slidingIndex:null}),document.removeEventListener("mouseup",this.endSlide,!1),document.removeEventListener("touchend",this.endSlide,!1),document.removeEventListener("touchmove",this.handleTouchSlide,!1),document.removeEventListener("mousemove",this.handleMouseSlide,!1),this.props.onSliderDragEnd&&this.props.onSliderDragEnd(),this.props.snap?(e=this.getSnapPosition(this.state.handlePos[n]),this.slideTo(n,e,function(){return t.fireChangeEvent()})):this.fireChangeEvent()}},{key:"handleClick",value:function(e){var t,n=this;e.target.getAttribute("data-handle-key")||(t=this.getSliderBoundingBox(),e=("vertical"===this.props.orientation?(e.clientY-t.top)/t.height:(e.clientX-t.left)/t.width)*$o,t=this.getClosestHandle(e),e=this.getSnapPosition(e),this.slideTo(t,e,function(){return n.fireChangeEvent()}),this.props.onClick&&this.props.onClick())}},{key:"handleKeydown",value:function(e){var t,n=this,r=Zo(e);e.keyCode===Wo?e.currentTarget.blur():null!==(t=this.getNextPositionForKey(r,e.keyCode))&&(this.canMove(r,t)&&(this.slideTo(r,t,function(){return n.fireChangeEvent()}),this.props.onKeyPress)&&this.props.onKeyPress(),Yo(e))}},{key:"validatePosition",value:function(e,t){var n=this.state,r=n.handlePos,n=n.handleDimensions;return Math.max(Math.min(t,void 0!==r[e+1]?r[e+1]-n:$o),void 0!==r[e-1]?r[e-1]+n:0)}},{key:"validateValues",value:function(e,t){var t=t||this.props,r=t.max,i=t.min;return e.map(function(e,t,n){e=Math.max(Math.min(e,r),i);return n.length&&e<n[t-1]?n[t-1]:e})}},{key:"canMove",value:function(e,t){var n=this.state,r=n.handlePos,n=n.handleDimensions;return!(t<0||$o<t||(void 0!==r[e+1]?r[e+1]-n:1/0)<t||t<(void 0!==r[e-1]?r[e-1]+n:-1/0))}},{key:"fireChangeEvent",value:function(){var e=this.props.onChange;e&&e(this.getPublicState())}},{key:"slideTo",value:function(e,t,n){var r=this,e=this.getNextState(e,t);this.setState(e,function(){var e=r.props.onValuesUpdated;e&&e(r.getPublicState()),n&&n()})}},{key:"updateNewValues",value:function(e){var t,n,r,i=this;null===this.state.slidingIndex&&(t=e.max,n=e.min,r=e.values,r=this.validateValues(r,e),this.setState({handlePos:r.map(function(e){return Ko(e,n,t)}),values:r},function(){return i.fireChangeEvent()}))}},{key:"render",value:function(){var r=this,e=this.props,t=e.children,n=e.disabled,i=e.handle,a=e.max,s=e.min,o=e.orientation,c=e.pitComponent,u=e.pitPoints,l=e.progressBar,e=this.state,d=e.className,h=e.handlePos,f=e.values;return j("div",{className:d,ref:this.rheostat,onClick:n?void 0:this.handleClick,style:{position:"relative"}},Xo,h.map(function(e,t){e="vertical"===o?{top:"".concat(e,"%"),position:"absolute"}:{left:"".concat(e,"%"),position:"absolute"};return j(i,{"aria-valuemax":r.getMaxValue(t),"aria-valuemin":r.getMinValue(t),"aria-valuenow":f[t],"aria-disabled":n,"data-handle-key":t,className:"rheostat-handle",key:"handle-".concat(t),onClick:Yo,onKeyDown:n?void 0:r.handleKeydown,onMouseDown:n?void 0:r.startMouseSlide,onTouchStart:n?void 0:r.startTouchSlide,role:"slider",style:e,tabIndex:0})}),h.map(function(e,t,n){return 0===t&&1<n.length?null:j(l,{className:"rheostat-progress",key:"progress-bar-".concat(t),style:r.getProgressStyle(t)})}),c&&u.map(function(e){var t=Ko(e,s,a),t="vertical"===o?{top:"".concat(t,"%"),position:"absolute"}:{left:"".concat(t,"%"),position:"absolute"};return j(c,{key:"pit-".concat(e),style:t},e)}),t)}}]),r}(),ec=(F(Go,"defaultProps",{className:"",children:null,disabled:!1,handle:function(e){return j("button",h({},e,{type:"button"}))},max:$o,min:0,onClick:null,onChange:null,onKeyPress:null,onSliderDragEnd:null,onSliderDragMove:null,onSliderDragStart:null,onValuesUpdated:null,orientation:"horizontal",pitComponent:null,pitPoints:[],progressBar:"div",snap:!1,snapPoints:[],values:[0]}),function(){D(a,jt);var i=q(a);function a(){var t;A(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return F(b(t=i.call.apply(i,[this].concat(n))),"handleChange",function(e){e=e.values;t.isDisabled||t.props.refine(e)}),F(b(t),"createHandleComponent",function(n){return function(e){var t=Math.round(100*parseFloat(e["aria-valuenow"]))/100,t="object"===y(n)&&n.format?n.format(t):t;return j("div",h({},e,{className:I(e.className,0===e["data-handle-key"]&&"rheostat-handle-lower",1===e["data-handle-key"]&&"rheostat-handle-upper")}),n&&j("div",{className:"rheostat-tooltip"},t))}}),t}return W(a,[{key:"isDisabled",get:function(){return this.props.min>=this.props.max}},{key:"computeDefaultPitPoints",value:function(e){var t=e.min,e=e.max,n=(e-t)/34;return[t].concat(w(Je({end:33}).map(function(e){return t+n*(e+1)})),[e])}},{key:"computeSnapPoints",value:function(e){var t=e.min,n=e.max,e=e.step;if(e)return[].concat(w(Je({start:t,end:n,step:e})),[n])}},{key:"render",value:function(){var e=this.props,t=e.tooltips,n=e.step,r=e.pips,i=e.values,e=e.cssClasses,a=this.isDisabled?{min:this.props.min,max:this.props.max+.001}:this.props,s=a.min,a=a.max,n=this.computeSnapPoints({min:s,max:a,step:n}),r=!1===r?[]:this.computeDefaultPitPoints({min:s,max:a});return j("div",{className:I(e.root,this.isDisabled&&e.disabledRoot)},j(Go,{handle:this.createHandleComponent(t),onChange:this.handleChange,min:s,max:a,pitComponent:Ro,pitPoints:r,snap:!0,snapPoints:n,values:this.isDisabled?[s,a]:i,disabled:this.isDisabled}))}}]),a}()),tc=l({name:"range-slider"}),nc=i("RangeSlider");function rc(e){var t=e.children,n=e.count,r=e.value,i=e.url,e=e.cssClasses;return n?j("a",{className:I(e.link),"aria-label":"".concat(r," & up"),href:i},t):j("div",{className:I(e.link),"aria-label":"".concat(r," & up"),disabled:!0},t)}var ic={item:function(e){var t=e.count,n=e.value,r=e.url,i=e.stars,a=e.cssClasses;return j(rc,{count:t,value:n,url:r,cssClasses:a},i.map(function(e,t){return j("svg",{key:t,className:I(a.starIcon,e?a.fullStarIcon:a.emptyStarIcon),"aria-hidden":"true",width:"24",height:"24"},j("use",{xlinkHref:e?"#ais-RatingMenu-starSymbol":"#ais-RatingMenu-starEmptySymbol"}))}),j("span",{className:I(a.label)},"& Up"),t&&j("span",{className:I(a.count)},Zi(t)))}},ac=l({name:"rating-menu"}),O=i("RatingMenu"),sc=j("path",{d:"M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"}),oc=j("path",{d:"M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"}),cc=j("path",{d:"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"}),uc=j("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"}),lc=j("g",{fill:"none",fillRule:"evenodd"},j("g",{transform:"translate(1 1)",strokeWidth:"2"},j("circle",{strokeOpacity:".5",cx:"18",cy:"18",r:"18"}),j("path",{d:"M36 18c0-9.94-8.06-18-18-18"},j("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))),dc={reset:function(e){return j("svg",{className:e.cssClasses.resetIcon,viewBox:"0 0 20 20",width:"10",height:"10"},cc)},submit:function(e){return j("svg",{className:e.cssClasses.submitIcon,width:"10",height:"10",viewBox:"0 0 40 40"},uc)},loadingIndicator:function(e){return j("svg",{className:e.cssClasses.loadingIcon,width:"16",height:"16",viewBox:"0 0 38 38",stroke:"#444"},lc)}},hc={item:function(e){var t=e.cssClasses,n=e.count,r=e.value,i=e.highlighted,a=e.isRefined,e=e.isFromSearch;return j("label",{className:I(t.label)},j("input",{type:"checkbox",className:I(t.checkbox),value:r,defaultChecked:a}),j("span",{className:I(t.labelText),dangerouslySetInnerHTML:e?{__html:i}:void 0},!e&&i),j("span",{className:I(t.count)},Zi(n)))},showMoreText:function(e){return e.isShowingMore?"Show less":"Show more"},searchableNoResults:function(){return"No results"}},fc=l({name:"refinement-list"}),H=i("RefinementList"),mc=i("SearchBox"),pc=function(e){var t=e.cssClasses,n=e.templates,r=e.isRelevantSorted,i=e.isVirtualReplica,a=e.refine;return i?j("div",{className:t.root},j(g,{templateKey:"text",templates:n,rootProps:{className:t.text},data:{isRelevantSorted:r}}),j("button",{type:"button",className:t.button,onClick:function(){a(r?0:void 0)}},j(g,{rootTagName:"span",templateKey:"button",templates:n,data:{isRelevantSorted:r}}))):null},gc={text:function(){return""},button:function(e){return e.isRelevantSorted?"See all results":"See relevant results"}},vc=l({name:"relevant-sort"}),yc=i("RelevantSort"),bc=l({name:"search-box"}),Rc=i("SearchBox"),Sc=l({name:"sort-by"}),_c=i("SortBy"),wc=["nbHits","nbSortedHits","cssClasses","templateProps"],Pc=function(e){var t=e.nbHits,n=e.nbSortedHits,r=e.cssClasses,i=e.templateProps,e=E(e,wc);return j("div",{className:I(r.root)},j(g,h({},i,{templateKey:"text",rootTagName:"span",rootProps:{className:r.text},data:C({hasManySortedResults:n&&1<n,hasNoSortedResults:0===n,hasOneSortedResults:1===n,hasManyResults:1<t,hasNoResults:0===t,hasOneResult:1===t,nbHits:t,nbSortedHits:n,cssClasses:r},e)})))},Nc=l({name:"stats"}),xc=i("Stats"),Ic={text:function(e){return"".concat((e.areHitsSorted?function(e){var t=e.nbHits,n=e.hasNoSortedResults,r=e.hasOneSortedResults,i=e.hasManySortedResults,e=e.nbSortedHits,t="sorted out of ".concat(Zi(t));if(n)return"No relevant results ".concat(t);if(r)return"1 relevant result ".concat(t);if(i)return"".concat(Zi(e||0)," relevant results ").concat(t);return""}:function(e){var t=e.nbHits,n=e.hasNoResults,r=e.hasOneResult,e=e.hasManyResults;if(n)return"No results";if(r)return"1 result";if(e)return"".concat(Zi(t)," results");return""})(e)," found in ").concat(e.processingTimeMS,"ms")}};function Tc(e){var t=e.status,n=e.errorCode,e=e.isListening;return"error"===t&&"not-allowed"===n?Lc:j(kt,null,j("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",fill:e?"currentColor":"none"}),Mc,Oc,Hc)}function a(e){return new Gi(e)}var Fc=function(e){var t=e.currentRefinement,n=e.refine,r=e.cssClasses,e=e.templateProps;return j("div",{className:r.root},j("label",{className:r.label},j("input",{className:r.checkbox,type:"checkbox",checked:t.isRefined,onChange:function(e){return n({isRefined:!e.target.checked})}}),j(g,h({},e,{rootTagName:"span",rootProps:{className:r.labelText},templateKey:"labelText",data:t}))))},Cc={labelText:function(e){return e.name}},Ec=l({name:"toggle-refinement"}),kc=i("ToggleRefinement"),jc=function(e){var t=e.cssClasses,n=e.isBrowserSupported,r=e.isListening,i=e.toggleListening,a=e.voiceListeningState,e=e.templates,s=a.status,o=a.transcript,c=a.isSpeechFinal,a=a.errorCode;return j("div",{className:t.root},j(g,{templateKey:"buttonText",rootTagName:"button",rootProps:{className:t.button,type:"button",title:"Search by voice".concat(n?"":" (not supported on this browser)"),onClick:function(e){e.currentTarget instanceof HTMLElement&&e.currentTarget.blur(),i()},disabled:!n},data:{status:s,errorCode:a,isListening:r,transcript:o,isSpeechFinal:c,isBrowserSupported:n},templates:e}),j(g,{templateKey:"status",rootProps:{className:t.status},data:{status:s,errorCode:a,isListening:r,transcript:o,isSpeechFinal:c,isBrowserSupported:n},templates:e}))},Lc=j(kt,null,j("line",{x1:"1",y1:"1",x2:"23",y2:"23"}),j("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"}),j("path",{d:"M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"}),j("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),j("line",{x1:"8",y1:"23",x2:"16",y2:"23"})),Mc=j("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),Oc=j("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),Hc=j("line",{x1:"8",y1:"23",x2:"16",y2:"23"}),Ac={buttonText:function(e){var t=e.status,n=e.errorCode,e=e.isListening;return j("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},j(Tc,{status:t,errorCode:n,isListening:e}))},status:function(e){return j("p",null,e.transcript)}},Wc=l({name:"voice-search"}),Dc=i("VoiceSearch"),e=K(function(e){var t,i,a,s,o,e=e||{},n=e.container,r=e.attributesForPrediction,c=e.queryLanguages,u=e.nbHits,l=e.searchDebounceTime,d=e.renderDebounceTime,h=e.escapeHTML,f=e.extraParameters,m=e.templates,m=void 0===m?{}:m,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(Da(),e.root),emptyRoot:I(Da({modifierName:"empty"}),e.emptyRoot),header:I(Da({descendantName:"header"}),e.header),loader:I(Da({descendantName:"loader"}),e.loader),list:I(Da({descendantName:"list"}),e.list),item:I(Da({descendantName:"item"}),e.item)},i=(e={containerNode:t,cssClasses:n,templates:m,renderState:{}}).containerNode,a=e.cssClasses,s=e.renderState,o=e.templates,C(C({},tt(function(e,t){var n=e.hits,r=e.isLoading,e=e.instantSearchInstance;t?s.templateProps=M({defaultTemplates:Aa,templatesConfig:e.templatesConfig,templates:o}):L(j(Ha,{cssClasses:a,hits:n,isLoading:r,templateProps:s.templateProps}),i)},function(){return L(null,t)})({attributesForPrediction:r,queryLanguages:c,nbHits:u,searchDebounceTime:l,renderDebounceTime:d,escapeHTML:h,extraParameters:f})),{},{$$widgetType:"ais.answers"});throw new Error(Wa("The `container` option is required."))}),ia=K(Va),e=Object.freeze({__proto__:null,EXPERIMENTAL_answers:e,EXPERIMENTAL_dynamicWidgets:ia,dynamicWidgets:Va,analytics:function(e){var n,i,a,s,r,o,c,t,u,l=e||{},d=l.pushFunction,h=l.delay,f=void 0===h?3e3:h,h=l.triggerOnUIInteraction,m=void 0!==h&&h,h=l.pushInitialSearch,l=l.pushPagination,p=void 0!==l&&l;if(d)return n=null,i=function(e){var t,n,r=[];for(t in e)e.hasOwnProperty(t)&&(n=e[t].join("+"),r.push("".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(t),"_").concat(encodeURIComponent(n))));return r.join("&")},a=function(e){var t,n=[];for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(r.hasOwnProperty(">=")&&r.hasOwnProperty("<="))r[">="]&&r[">="][0]===r["<="]&&r["<="][0]?n.push("".concat(t,"=").concat(t,"_").concat(r[">="])):n.push("".concat(t,"=").concat(t,"_").concat(r[">="],"to").concat(r["<="]));else if(r.hasOwnProperty(">="))n.push("".concat(t,"=").concat(t,"_from").concat(r[">="]));else if(r.hasOwnProperty("<="))n.push("".concat(t,"=").concat(t,"_to").concat(r["<="]));else if(r.hasOwnProperty("=")){var i,a=[];for(i in r["="])r["="].hasOwnProperty(i)&&a.push(r["="][i]);n.push("".concat(t,"=").concat(t,"_").concat(a.join("-")))}}return n.join("&")},r=function(e){var t,n,r;null!==e&&(t=[],n=i(C(C(C({},e.state.disjunctiveFacetsRefinements),e.state.facetsRefinements),e.state.hierarchicalFacetsRefinements)),r=a(e.state.numericRefinements),""!==n&&t.push(n),""!==r&&t.push(r),n=t.join("&"),r="Query: ".concat(e.state.query||"",", ").concat(n),!0===p&&(r+=", Page: ".concat(e.state.page||0)),s!==r)&&(d(n,e.state,e.results),s=r)},c=!(s="")===(void 0===h||h)?!1:!0,t=function(){r(n)},u=function(){r(n)},{$$type:"ais.analytics",$$widgetType:"ais.analytics",init:function(){!0===m&&(document.addEventListener("click",t),window.addEventListener("beforeunload",u))},render:function(e){var t=e.results,e=e.state;!0===c?c=!1:(n={results:t,state:e},o&&clearTimeout(o),o=window.setTimeout(function(){return r(n)},f))},dispose:function(){!0===m&&(document.removeEventListener("click",t),window.removeEventListener("beforeunload",u))},getRenderState:function(e,t){return C(C({},e),{},{analytics:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{widgetParams:e}}};throw new Error(Za("The `pushFunction` option is required."))},breadcrumb:function(e){var t,s,o,c,u,e=e||{},n=e.container,r=e.attributes,i=e.separator,a=e.rootPath,l=e.transformItems,d=e.templates,d=void 0===d?{}:d,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(es(),e.root),noRefinementRoot:I(es({modifierName:"noRefinement"}),e.noRefinementRoot),list:I(es({descendantName:"list"}),e.list),item:I(es({descendantName:"item"}),e.item),selectedItem:I(es({descendantName:"item",modifierName:"selected"}),e.selectedItem),separator:I(es({descendantName:"separator"}),e.separator),link:I(es({descendantName:"link"}),e.link)},s=(e={containerNode:t,cssClasses:n,renderState:{},templates:d}).containerNode,o=e.cssClasses,c=e.renderState,u=e.templates,C(C({},In(function(e,t){var n=e.canRefine,r=e.createURL,i=e.instantSearchInstance,a=e.items,e=e.refine;t?c.templateProps=M({defaultTemplates:Xa,templatesConfig:i.templatesConfig,templates:u}):L(j(Ya,{canRefine:n,cssClasses:o,createURL:r,items:a,refine:e,templateProps:c.templateProps}),s)},function(){return L(null,t)})({attributes:r,separator:i,rootPath:a,transformItems:l})),{},{$$widgetType:"ais.breadcrumb"});throw new Error(Ga("The `container` option is required."))},clearRefinements:function(e){var t,i,a,s,o,e=e||{},n=e.container,r=e.templates,r=void 0===r?{}:r,c=e.includedAttributes,u=e.excludedAttributes,l=e.transformItems,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(is(),e.root),button:I(is({descendantName:"button"}),e.button),disabledButton:I(is({descendantName:"button",modifierName:"disabled"}),e.disabledButton)},i=(e={containerNode:t,cssClasses:n,renderState:{},templates:r}).containerNode,a=e.cssClasses,s=e.renderState,o=e.templates,C(C({},rt(function(e,t){var n=e.refine,r=e.canRefine,e=e.instantSearchInstance;t?s.templateProps=M({defaultTemplates:ns,templatesConfig:e.templatesConfig,templates:o}):L(j(ts,{refine:n,cssClasses:a,hasRefinements:r,templateProps:s.templateProps}),i)},function(){return L(null,t)})({includedAttributes:c,excludedAttributes:u,transformItems:l})),{},{$$widgetType:"ais.clearRefinements"});throw new Error(rs("The `container` option is required."))},configure:function(e){return C(C({},Ar(v)({searchParameters:e})),{},{$$widgetType:"ais.configure"})},currentRefinements:function(e){var t,e=e||{},n=e.container,r=e.includedAttributes,i=e.excludedAttributes,a=e.cssClasses,a=void 0===a?{}:a,e=e.transformItems;if(n)return t=P(n),n={root:I(os(),a.root),noRefinementRoot:I(os({modifierName:"noRefinement"}),a.noRefinementRoot),list:I(os({descendantName:"list"}),a.list),item:I(os({descendantName:"item"}),a.item),label:I(os({descendantName:"label"}),a.label),category:I(os({descendantName:"category"}),a.category),categoryLabel:I(os({descendantName:"categoryLabel"}),a.categoryLabel),delete:I(os({descendantName:"delete"}),a.delete)},C(C({},ot($a,function(){return L(null,t)})({container:t,cssClasses:n,includedAttributes:r,excludedAttributes:i,transformItems:e})),{},{$$widgetType:"ais.currentRefinements"});throw new Error(ss("The `container` option is required."))},EXPERIMENTAL_configureRelatedItems:function(e){return C(C({},Br(v)(e)),{},{$$widgetType:"ais.configureRelatedItems"})},geoSearch:function(e){var t,n,r,i,a,u,e=e||{},s=e.initialZoom,s=void 0===s?1:s,o=e.initialPosition,o=void 0===o?{lat:0,lng:0}:o,c=e.templates,c=void 0===c?{}:c,l=e.cssClasses,l=void 0===l?{}:l,d=e.builtInMarker,d=void 0===d?{}:d,h=e.customHTMLMarker,f=e.enableRefine,f=void 0===f||f,m=e.enableClearMapRefinement,m=void 0===m||m,p=e.enableRefineControl,p=void 0===p||p,g=e.container,v=e.googleReference,e=E(e,ps);if(!g)throw new Error(ys("The `container` option is required."));if(v)return t=P(g),g={root:I(bs(),l.root),tree:bs({descendantName:"tree"}),map:I(bs({descendantName:"map"}),l.map),control:I(bs({descendantName:"control"}),l.control),label:I(bs({descendantName:"label"}),l.label),selectedLabel:I(bs({descendantName:"label",modifierName:"selected"}),l.selectedLabel),input:I(bs({descendantName:"input"}),l.input),redo:I(bs({descendantName:"redo"}),l.redo),disabledRedo:I(bs({descendantName:"redo",modifierName:"disabled"}),l.disabledRedo),reset:I(bs({descendantName:"reset"}),l.reset)},n=C(C({},us),c),r=C(C({},{createOptions:function(){return{}},events:{}}),d),i=(Boolean(h)||Boolean(c.HTMLMarker))&&C(C({},{createOptions:function(){return{}},events:{}}),h),u=v,a=function(){D(c,u.maps.OverlayView);var o=q(c);function c(e){var t,n=e.__id,r=e.position,i=e.map,a=e.template,s=e.className,e=e.anchor,e=void 0===e?{x:0,y:0}:e;return A(this,c),F(b(t=o.call(this)),"__id",void 0),F(b(t),"anchor",void 0),F(b(t),"offset",void 0),F(b(t),"listeners",void 0),F(b(t),"latLng",void 0),F(b(t),"element",void 0),t.__id=n,t.anchor=e,t.listeners={},t.latLng=new u.maps.LatLng(r),t.element=document.createElement("div"),t.element.className=s,t.element.style.position="absolute","object"===y(a)?L(a,t.element):t.element.innerHTML=a,t.setMap(i),t}return W(c,[{key:"onAdd",value:function(){this.getPanes().overlayMouseTarget.appendChild(this.element);var e=this.element.getBoundingClientRect();this.offset={x:this.anchor.x+e.width/2,y:this.anchor.y+e.height},this.element.style.width="".concat(e.width,"px")}},{key:"draw",value:function(){var e=this.getProjection().fromLatLngToDivPixel(this.latLng);this.element.style.left="".concat(Math.round(e.x-this.offset.x),"px"),this.element.style.top="".concat(Math.round(e.y-this.offset.y),"px"),this.element.style.zIndex=String(parseInt(this.element.style.top,10))}},{key:"onRemove",value:function(){var t=this;this.element&&(this.element.parentNode.removeChild(this.element),Object.keys(this.listeners).forEach(function(e){t.element.removeEventListener(e,t.listeners[e])}),delete this.element,delete this.listeners)}},{key:"addListener",value:function(e,t){this.listeners[e]=t;var n=this.element;return n.addEventListener(e,t),{remove:function(){return n.removeEventListener(e,t)}}}},{key:"getPosition",value:function(){return this.latLng}}]),c}(),l=i?function(e){var t=e.item,e=E(e,vs);return new a(C(C(C({},i.createOptions(t)),e),{},{__id:t.objectID,position:t._geoloc,className:I(bs({descendantName:"marker"})),template:Oa({templateKey:"HTMLMarker",templates:n,data:t})}))}:function(e){var t=e.item,e=E(e,gs);return new v.maps.Marker(C(C(C({},r.createOptions(t)),e),{},{__id:t.objectID,position:t._geoloc}))},d=i||r,C(C({},qn(Ja,function(){return L(null,t)})(C(C({},e),{},{renderState:{},container:t,googleReference:v,initialZoom:s,initialPosition:o,templates:n,cssClasses:g,createMarker:l,markerOptions:d,enableRefine:f,enableClearMapRefinement:m,enableRefineControl:p}))),{},{$$widgetType:"ais.geoSearch"});throw new Error(ys("The `googleReference` option is required."))},hierarchicalMenu:function(e){var t,c,u,l,d,h,e=e||{},n=e.container,r=e.attributes,i=e.separator,a=e.rootPath,s=e.showParentLevel,o=e.limit,f=e.showMore,f=void 0!==f&&f,m=e.showMoreLimit,p=e.sortBy,g=e.transformItems,v=e.templates,v=void 0===v?{}:v,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(S(),e.root),noRefinementRoot:I(S({modifierName:"noRefinement"}),e.noRefinementRoot),list:I(S({descendantName:"list"}),e.list),childList:I(S({descendantName:"list",modifierName:"child"}),e.childList),item:I(S({descendantName:"item"}),e.item),selectedItem:I(S({descendantName:"item",modifierName:"selected"}),e.selectedItem),parentItem:I(S({descendantName:"item",modifierName:"parent"}),e.parentItem),link:I(S({descendantName:"link"}),e.link),selectedItemLink:I(S({descendantName:"link",modifierName:"selected"}),e.selectedItemLink),label:I(S({descendantName:"label"}),e.label),count:I(S({descendantName:"count"}),e.count),showMore:I(S({descendantName:"showMore"}),e.showMore),disabledShowMore:I(S({descendantName:"showMore",modifierName:"disabled"}),e.disabledShowMore)},c=(e={cssClasses:n,containerNode:t,templates:v,showMore:f,renderState:{}}).cssClasses,u=e.containerNode,l=e.showMore,d=e.templates,h=e.renderState,C(C({},ft(function(e,t){var n=e.createURL,r=e.items,i=e.refine,a=e.instantSearchInstance,s=e.isShowingMore,o=e.toggleShowMore,e=e.canToggleShowMore;t?h.templateProps=M({defaultTemplates:Ns,templatesConfig:a.templatesConfig,templates:d}):L(j(Ps,{createURL:n,cssClasses:c,facetValues:r,templateProps:h.templateProps,toggleRefinement:i,showMore:l,toggleShowMore:o,isShowingMore:s,canToggleShowMore:e}),u)},function(){return L(null,t)})({attributes:r,separator:i,rootPath:a,showParentLevel:s,limit:o,showMore:f,showMoreLimit:m,sortBy:p,transformItems:g})),{},{$$widgetType:"ais.hierarchicalMenu"});throw new Error(xs("The `container` option is required."))},hits:function(e){var t,o,c,u,l,e=e||{},n=e.container,r=e.escapeHTML,i=e.transformItems,a=e.templates,a=void 0===a?{}:a,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(Fs(),e.root),emptyRoot:I(Fs({modifierName:"empty"}),e.emptyRoot),list:I(Fs({descendantName:"list"}),e.list),item:I(Fs({descendantName:"item"}),e.item)},o=(e={containerNode:t,cssClasses:n,renderState:{},templates:a}).renderState,c=e.cssClasses,u=e.containerNode,l=e.templates,C(C({},Rt(mt)(function(e,t){var n=e.hits,r=e.results,i=e.instantSearchInstance,a=e.insights,s=e.bindEvent,e=e.sendEvent;t?o.templateProps=M({defaultTemplates:Is,templatesConfig:i.templatesConfig,templates:l}):L(j(Cs,{cssClasses:c,hits:n,results:r,templateProps:o.templateProps,insights:a,sendEvent:e,bindEvent:s}),u)},function(){return L(null,t)})({escapeHTML:r,transformItems:i})),{},{$$widgetType:"ais.hits"});throw new Error(Ts("The `container` option is required."))},hitsPerPage:function(e){var t,r,i,e=e||{},n=e.container,a=e.items,s=e.cssClasses,s=void 0===s?{}:s,e=e.transformItems;if(n)return t=P(n),n={root:I(js(),s.root),select:I(js({descendantName:"select"}),s.select),option:I(js({descendantName:"option"}),s.option)},r=(s={containerNode:t,cssClasses:n}).containerNode,i=s.cssClasses,C(C({},Zt(function(e,t){var n=e.items,e=e.refine;t||(t=(Re(n,function(e){return e.isRefined})||{}).value,L(j("div",{className:i.root},j(Es,{cssClasses:i,currentValue:t,options:n,setValue:e})),r))},function(){return L(null,t)})({items:a,transformItems:e})),{},{$$widgetType:"ais.hitsPerPage"});throw new Error(ks("The `container` option is required."))},index:zi,infiniteHits:function(e){var t,d,h,f,m,p,e=e||{},n=e.container,r=e.escapeHTML,i=e.transformItems,a=e.templates,a=void 0===a?{}:a,s=e.cssClasses,s=void 0===s?{}:s,o=e.showPrevious,e=e.cache;if(n)return t=P(n),n={root:I(Os(),s.root),emptyRoot:I(Os({modifierName:"empty"}),s.emptyRoot),item:I(Os({descendantName:"item"}),s.item),list:I(Os({descendantName:"list"}),s.list),loadPrevious:I(Os({descendantName:"loadPrevious"}),s.loadPrevious),disabledLoadPrevious:I(Os({descendantName:"loadPrevious",modifierName:"disabled"}),s.disabledLoadPrevious),loadMore:I(Os({descendantName:"loadMore"}),s.loadMore),disabledLoadMore:I(Os({descendantName:"loadMore",modifierName:"disabled"}),s.disabledLoadMore)},d=(s={containerNode:t,cssClasses:n,templates:a,showPrevious:o,renderState:{}}).containerNode,h=s.cssClasses,f=s.renderState,m=s.templates,p=s.showPrevious,C(C({},Rt(nn)(function(e,t){var n=e.hits,r=e.results,i=e.showMore,a=e.showPrevious,s=e.isFirstPage,o=e.isLastPage,c=e.instantSearchInstance,u=e.insights,l=e.bindEvent,e=e.sendEvent;t?f.templateProps=M({defaultTemplates:Ls,templatesConfig:c.templatesConfig,templates:m}):L(j(Hs,{cssClasses:h,hits:n,results:r,hasShowPrevious:p,showPrevious:a,showMore:i,templateProps:f.templateProps,isFirstPage:s,isLastPage:o,insights:u,sendEvent:e,bindEvent:l}),d)},function(){return L(null,t)})({escapeHTML:r,transformItems:i,showPrevious:o,cache:e})),{},{$$widgetType:"ais.infiniteHits"});throw new Error(Ms("The `container` option is required."))},menu:function(e){var t,c,u,l,d,h,e=e||{},n=e.container,r=e.attribute,i=e.sortBy,a=e.limit,s=e.showMore,o=e.showMoreLimit,f=e.cssClasses,f=void 0===f?{}:f,m=e.templates,m=void 0===m?{}:m,e=e.transformItems;if(n)return t=P(n),n={root:I(Ds(),f.root),noRefinementRoot:I(Ds({modifierName:"noRefinement"}),f.noRefinementRoot),list:I(Ds({descendantName:"list"}),f.list),item:I(Ds({descendantName:"item"}),f.item),selectedItem:I(Ds({descendantName:"item",modifierName:"selected"}),f.selectedItem),link:I(Ds({descendantName:"link"}),f.link),label:I(Ds({descendantName:"label"}),f.label),count:I(Ds({descendantName:"count"}),f.count),showMore:I(Ds({descendantName:"showMore"}),f.showMore),disabledShowMore:I(Ds({descendantName:"showMore",modifierName:"disabled"}),f.disabledShowMore)},c=(f={containerNode:t,cssClasses:n,renderState:{},templates:m,showMore:s}).containerNode,u=f.cssClasses,l=f.renderState,d=f.templates,h=f.showMore,C(C({},rn(function(e,t){var n=e.refine,r=e.items,i=e.createURL,a=e.instantSearchInstance,s=e.isShowingMore,o=e.toggleShowMore,e=e.canToggleShowMore;t?l.templateProps=M({defaultTemplates:As,templatesConfig:a.templatesConfig,templates:d}):(t=r.map(function(e){return C(C({},e),{},{url:i(e.value)})}),L(j(Ps,{createURL:i,cssClasses:u,facetValues:t,showMore:h,templateProps:l.templateProps,toggleRefinement:n,toggleShowMore:o,isShowingMore:s,canToggleShowMore:e}),c))},function(){return L(null,t)})({attribute:r,limit:a,showMore:s,showMoreLimit:o,sortBy:i,transformItems:e})),{},{$$widgetType:"ais.menu"});throw new Error(Ws("The `container` option is required."))},menuSelect:function(e){var t,i,a,s,o,e=e||{},n=e.container,r=e.attribute,c=e.sortBy,c=void 0===c?["name:asc"]:c,u=e.limit,u=void 0===u?10:u,l=e.cssClasses,l=void 0===l?{}:l,d=e.templates,d=void 0===d?{}:d,e=e.transformItems;if(n)return t=P(n),n={root:I(Qs(),l.root),noRefinementRoot:I(Qs({modifierName:"noRefinement"}),l.noRefinementRoot),select:I(Qs({descendantName:"select"}),l.select),option:I(Qs({descendantName:"option"}),l.option)},i=(l={containerNode:t,cssClasses:n,renderState:{},templates:d}).containerNode,a=l.cssClasses,s=l.renderState,o=l.templates,C(C({},rn(function(e,t){var n=e.refine,r=e.items,e=e.instantSearchInstance;t?s.templateProps=M({defaultTemplates:Us,templatesConfig:e.templatesConfig,templates:o}):L(j(Bs,{cssClasses:a,items:r,refine:n,templateProps:s.templateProps}),i)},function(){return L(null,t)})({attribute:r,limit:u,sortBy:c,transformItems:e})),{},{$$widgetType:"ais.menuSelect"});throw new Error(qs("The `container` option is required."))},numericMenu:function(e){var t,a,s,o,c,u,e=e||{},n=e.container,r=e.attribute,i=e.items,l=e.cssClasses,l=void 0===l?{}:l,d=e.templates,d=void 0===d?{}:d,e=e.transformItems;if(n)return t=P(n),n={root:I(Ks(),l.root),noRefinementRoot:I(Ks({modifierName:"noRefinement"}),l.noRefinementRoot),list:I(Ks({descendantName:"list"}),l.list),item:I(Ks({descendantName:"item"}),l.item),selectedItem:I(Ks({descendantName:"item",modifierName:"selected"}),l.selectedItem),label:I(Ks({descendantName:"label"}),l.label),radio:I(Ks({descendantName:"radio"}),l.radio),labelText:I(Ks({descendantName:"labelText"}),l.labelText)},a=(l={containerNode:t,attribute:r,cssClasses:n,renderState:{},templates:d}).containerNode,s=l.attribute,o=l.cssClasses,c=l.renderState,u=l.templates,C(C({},an(function(e,t){var n=e.createURL,r=e.instantSearchInstance,i=e.refine,e=e.items;t?c.templateProps=M({defaultTemplates:Vs,templatesConfig:r.templatesConfig,templates:u}):L(j(Ps,{createURL:n,cssClasses:o,facetValues:e,templateProps:c.templateProps,toggleRefinement:i,attribute:s}),a)},function(){return L(null,t)})({attribute:r,items:i,transformItems:e})),{},{$$widgetType:"ais.numericMenu"});throw new Error($s("The `container` option is required."))},pagination:function(e){var t,u,l,d,h,f,m,p,g,e=e||{},n=e.container,r=e.templates,r=void 0===r?{}:r,i=e.cssClasses,i=void 0===i?{}:i,a=e.totalPages,s=e.padding,o=e.showFirst,o=void 0===o||o,c=e.showLast,c=void 0===c||c,v=e.showPrevious,v=void 0===v||v,y=e.showNext,y=void 0===y||y,e=e.scrollTo,e=void 0===e?"body":e;if(n)return t=P(n),e=!1!==(n=!0===e?"body":e)&&P(n),n={root:I(T(),i.root),noRefinementRoot:I(T({modifierName:"noRefinement"}),i.noRefinementRoot),list:I(T({descendantName:"list"}),i.list),item:I(T({descendantName:"item"}),i.item),firstPageItem:I(T({descendantName:"item",modifierName:"firstPage"}),i.firstPageItem),lastPageItem:I(T({descendantName:"item",modifierName:"lastPage"}),i.lastPageItem),previousPageItem:I(T({descendantName:"item",modifierName:"previousPage"}),i.previousPageItem),nextPageItem:I(T({descendantName:"item",modifierName:"nextPage"}),i.nextPageItem),pageItem:I(T({descendantName:"item",modifierName:"page"}),i.pageItem),selectedItem:I(T({descendantName:"item",modifierName:"selected"}),i.selectedItem),disabledItem:I(T({descendantName:"item",modifierName:"disabled"}),i.disabledItem),link:I(T({descendantName:"link"}),i.link)},i=C(C({},eo),r),u=(r={containerNode:t,cssClasses:n,templates:i,showFirst:o,showLast:c,showPrevious:v,showNext:y,scrollToNode:e}).containerNode,l=r.cssClasses,d=r.templates,h=r.showFirst,f=r.showLast,m=r.showPrevious,p=r.showNext,g=r.scrollToNode,C(C({},mn(function(e,t){var n=e.createURL,r=e.currentRefinement,i=e.nbPages,a=e.pages,s=e.isFirstPage,o=e.isLastPage,c=e.refine;t||L(j(zs,{createURL:n,cssClasses:l,currentPage:r,templates:d,nbPages:i,pages:a,isFirstPage:s,isLastPage:o,setCurrentPage:function(e){c(e),!1!==g&&g.scrollIntoView()},showFirst:h,showLast:f,showPrevious:m,showNext:p}),u)},function(){return L(null,t)})({totalPages:a,padding:s})),{},{$$widgetType:"ais.pagination"});throw new Error(Gs("The `container` option is required."))},panel:function(e){var e=e||{},t=e.templates,r=void 0===t?{}:t,t=e.hidden,d=void 0===t?function(){return!1}:t,t=e.collapsed,e=e.cssClasses,e=void 0===e?{}:e,h=document.createElement("div"),f=Boolean(t),m="function"==typeof t?t:function(){return!1},p={root:I(_o(),e.root),noRefinementRoot:I(_o({modifierName:"noRefinement"}),e.noRefinementRoot),collapsibleRoot:I(_o({modifierName:"collapsible"}),e.collapsibleRoot),collapsedRoot:I(_o({modifierName:"collapsed"}),e.collapsedRoot),collapseButton:I(_o({descendantName:"collapseButton"}),e.collapseButton),collapseIcon:I(_o({descendantName:"collapseIcon"}),e.collapseIcon),body:I(_o({descendantName:"body"}),e.body),header:I(_o({descendantName:"header"}),e.header),footer:I(_o({descendantName:"footer"}),e.footer)};return function(n){return function(e){var i,a,t,s,o,c,u,l;if(e&&e.container)return i=P(e.container),t={containerNode:i,bodyContainerNode:h,cssClasses:p,templates:C(C({},{header:"",footer:"",collapseButtonText:function(e){e=e.collapsed;return'<svg\n class="'.concat(p.collapseIcon,'"\n width="1em"\n height="1em"\n viewBox="0 0 500 500"\n >\n <path d="').concat(e?"M100 250l300-150v300z":"M250 400l150-300H100z",'" fill="currentColor" />\n </svg>')}}),r)},s=t.containerNode,o=t.bodyContainerNode,c=t.cssClasses,u=t.templates,a=function(e){var t=e.options,n=e.hidden,r=e.collapsible,e=e.collapsed;L(j(bo,{cssClasses:c,hidden:n,collapsible:r,isCollapsed:e,templates:u,data:t,bodyElement:o}),s)},l=n(C(C({},e),{},{container:h})),C(C({},l),{},{init:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],r=C(C({},l.getWidgetRenderState?l.getWidgetRenderState(r):{}),r);a({options:r,hidden:!0,collapsible:f,collapsed:!1}),"function"==typeof l.init&&(r=l.init).call.apply(r,[this].concat(t))},render:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],r=C(C({},l.getWidgetRenderState?l.getWidgetRenderState(r):{}),r);a({options:r,hidden:Boolean(d(r)),collapsible:f,collapsed:Boolean(m(r))}),"function"==typeof l.render&&(r=l.render).call.apply(r,[this].concat(t))},dispose:function(){if(L(null,i),"function"==typeof l.dispose){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=l.dispose).call.apply(e,[this].concat(n))}}});throw new Error(So("The `container` option is required in the widget within the panel."))}}},places:function(e){var t=e||{},n=t.placesReference,r=t.defaultPosition,i=void 0===r?[]:r,r=E(t,wo);if("function"!=typeof n)throw new Error("The `placesReference` option requires a valid Places.js reference.");var a=n(r),s={query:"",initialLatLngViaIP:void 0,isInitialLatLngViaIPSet:!1};return{$$type:"ais.places",$$widgetType:"ais.places",init:function(e){var r=e.helper;a.on("change",function(e){var e=e.suggestion,t=e.value,e=e.latlng,n=e.lat,e=e.lng;s.query=t,r.setQueryParameter("insideBoundingBox",void 0).setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng","".concat(n,",").concat(e)).search()}),a.on("clear",function(){s.query="",r.setQueryParameter("insideBoundingBox",void 0),1<i.length?r.setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng",i.join(",")):r.setQueryParameter("aroundLatLngViaIP",s.initialLatLngViaIP).setQueryParameter("aroundLatLng",void 0),r.search()})},getWidgetUiState:function(e,t){t=t.searchParameters.aroundLatLng||i.join(",");return t!==i.join(",")||s.query?C(C({},e),{},{places:{query:s.query,position:t}}):(e.places,E(e,Po))},getWidgetSearchParameters:function(e,t){var t=t.uiState.places||{},n=t.query,n=void 0===n?"":n,t=t.position,t=void 0===t?i.join(","):t;return s.query=n,s.isInitialLatLngViaIPSet||(s.isInitialLatLngViaIPSet=!0,s.initialLatLngViaIP=e.aroundLatLngViaIP),a.setVal(n),a.close(),e.setQueryParameter("insideBoundingBox",void 0).setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng",t||void 0)},getRenderState:function(e,t){return C(C({},e),{},{places:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{widgetParams:e}}}},poweredBy:function(e){var t,r,i,e=e||{},n=e.container,a=e.cssClasses,a=void 0===a?{}:a,e=e.theme,e=void 0===e?"light":e;if(n)return t=P(n),n={root:I(xo(),xo({modifierName:"dark"===e?"dark":"light"}),a.root),link:I(xo({descendantName:"link"}),a.link),logo:I(xo({descendantName:"logo"}),a.logo)},r=(a={containerNode:t,cssClasses:n}).containerNode,i=a.cssClasses,C(C({},Qn(function(e,t){var n=e.url,e=e.widgetParams;t&&(t=e.theme,L(j(No,{cssClasses:i,url:n,theme:void 0===t?"light":t}),r))},function(){return L(null,t)})({theme:e})),{},{$$widgetType:"ais.poweredBy"});throw new Error(Io("The `container` option is required."))},queryRuleContext:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(e.trackedFilters)return C(C({},Vr(v)(e)),{},{$$widgetType:"ais.queryRuleContext"});throw new Error(To("The `trackedFilters` option is required."))},queryRuleCustomData:function(e){var t,n,r,i,e=e||{},a=e.container,s=e.cssClasses,s=void 0===s?{}:s,o=e.templates,o=void 0===o?{}:o,e=e.transformItems,e=void 0===e?function(e){return e}:e;if(a)return s={root:I(ko(),s.root)},t=P(a),a=C(C({},Co),o),n=(o={containerNode:t,cssClasses:s,renderState:{},templates:a}).containerNode,r=o.cssClasses,i=o.templates,C(C({},Vr(function(e){e=e.items;L(j(Fo,{cssClasses:r,templates:i,items:e}),n)},function(){L(null,t)})({transformItems:e})),{},{$$widgetType:"ais.queryRuleCustomData"});throw new Error(Eo("The `container` option is required."))},rangeInput:function(e){var t,s,o,c,u,e=e||{},n=e.container,r=e.attribute,i=e.min,a=e.max,l=e.precision,l=void 0===l?0:l,d=e.cssClasses,d=void 0===d?{}:d,e=e.templates,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(Mo(),d.root),noRefinement:I(Mo({modifierName:"noRefinement"})),form:I(Mo({descendantName:"form"}),d.form),label:I(Mo({descendantName:"label"}),d.label),input:I(Mo({descendantName:"input"}),d.input),inputMin:I(Mo({descendantName:"input",modifierName:"min"}),d.inputMin),inputMax:I(Mo({descendantName:"input",modifierName:"max"}),d.inputMax),separator:I(Mo({descendantName:"separator"}),d.separator),submit:I(Mo({descendantName:"submit"}),d.submit)},s=(d={containerNode:t,cssClasses:n,templates:e,renderState:{}}).containerNode,o=d.cssClasses,c=d.renderState,u=d.templates,C(C({},bn(function(e,t){var n=e.refine,r=e.range,i=e.start,a=e.widgetParams,e=e.instantSearchInstance;t?c.templateProps=M({defaultTemplates:Oo,templatesConfig:e.templatesConfig,templates:u}):(t=r.min,e=r.max,i=(r=k(i,2))[0],r=r[1],a=1/Math.pow(10,a.precision||0),L(j(jo,{min:t,max:e,step:a,values:{min:i!==-1/0&&i!==t?i:void 0,max:r!==1/0&&r!==e?r:void 0},cssClasses:o,refine:n,templateProps:c.templateProps}),s))},function(){return L(null,t)})({attribute:r,min:i,max:a,precision:l})),{},{$$type:"ais.rangeInput",$$widgetType:"ais.rangeInput"});throw new Error(Lo("The `container` option is required."))},rangeSlider:function(e){var t,a,s,o,c,u,e=e||{},n=e.container,r=e.attribute,i=e.min,l=e.max,d=e.cssClasses,d=void 0===d?{}:d,h=e.step,f=e.pips,f=void 0===f||f,m=e.precision,m=void 0===m?0:m,e=e.tooltips,e=void 0===e||e;if(n)return t=P(n),n={root:I(nc(),d.root),disabledRoot:I(nc({modifierName:"disabled"}),d.disabledRoot)},a=(d={containerNode:t,step:h,pips:f,tooltips:e,cssClasses:n}).containerNode,s=d.cssClasses,o=d.pips,c=d.step,u=d.tooltips,C(C({},bn(function(e,t){var n,r=e.refine,i=e.range,e=e.start;t||(t=i.min,i=i.max,n=(e=k(e,2))[0],e=e[1],L(j(ec,{cssClasses:s,refine:r,min:t,max:i,values:[i<(r=n===-1/0?t:n)?i:r,(n=e===1/0?i:e)<t?t:n],tooltips:u,step:c,pips:o}),a))},function(){return L(null,t)})({attribute:r,min:i,max:l,precision:m})),{},{$$type:"ais.rangeSlider",$$widgetType:"ais.rangeSlider"});throw new Error(tc("The `container` option is required."))},ratingMenu:function(e){var t,a,s,o,c,e=e||{},n=e.container,r=e.attribute,i=e.max,i=void 0===i?5:i,u=e.cssClasses,u=void 0===u?{}:u,e=e.templates,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(O(),u.root),noRefinementRoot:I(O({modifierName:"noRefinement"}),u.noRefinementRoot),list:I(O({descendantName:"list"}),u.list),item:I(O({descendantName:"item"}),u.item),selectedItem:I(O({descendantName:"item",modifierName:"selected"}),u.selectedItem),disabledItem:I(O({descendantName:"item",modifierName:"disabled"}),u.disabledItem),link:I(O({descendantName:"link"}),u.link),starIcon:I(O({descendantName:"starIcon"}),u.starIcon),fullStarIcon:I(O({descendantName:"starIcon",modifierName:"full"}),u.fullStarIcon),emptyStarIcon:I(O({descendantName:"starIcon",modifierName:"empty"}),u.emptyStarIcon),label:I(O({descendantName:"label"}),u.label),count:I(O({descendantName:"count"}),u.count)},a=(u={containerNode:t,cssClasses:n,renderState:{},templates:e}).containerNode,s=u.cssClasses,o=u.templates,c=u.renderState,C(C({},Pn(function(e,t){var n=e.refine,r=e.items,i=e.createURL,e=e.instantSearchInstance;t?c.templateProps=M({defaultTemplates:ic,templatesConfig:e.templatesConfig,templates:o}):L(j(Ps,{createURL:i,cssClasses:s,facetValues:r,templateProps:c.templateProps,toggleRefinement:n},j("svg",{style:"display:none;"},j("symbol",{id:O({descendantName:"starSymbol"}),viewBox:"0 0 24 24"},sc),j("symbol",{id:O({descendantName:"starEmptySymbol"}),viewBox:"0 0 24 24"},oc))),a)},function(){return L(null,t)})({attribute:r,max:i})),{},{$$widgetType:"ais.ratingMenu"});throw new Error(ac("The `container` option is required."))},refinementList:function(e){var t,d,h,f,m,p,g,v,y,b,e=e||{},n=e.container,r=e.attribute,i=e.operator,a=e.sortBy,s=e.limit,o=e.showMore,c=e.showMoreLimit,u=e.searchable,u=void 0!==u&&u,l=e.searchablePlaceholder,l=void 0===l?"Search...":l,R=e.searchableEscapeFacetValues,S=e.searchableIsAlwaysActive,S=void 0===S||S,_=e.cssClasses,_=void 0===_?{}:_,w=e.templates,w=void 0===w?{}:w,e=e.transformItems;if(n)return R=!!u&&Boolean(void 0===R||R),t=P(n),n={root:I(H(),_.root),noRefinementRoot:I(H({modifierName:"noRefinement"}),_.noRefinementRoot),list:I(H({descendantName:"list"}),_.list),item:I(H({descendantName:"item"}),_.item),selectedItem:I(H({descendantName:"item",modifierName:"selected"}),_.selectedItem),searchBox:I(H({descendantName:"searchBox"}),_.searchBox),label:I(H({descendantName:"label"}),_.label),checkbox:I(H({descendantName:"checkbox"}),_.checkbox),labelText:I(H({descendantName:"labelText"}),_.labelText),count:I(H({descendantName:"count"}),_.count),noResults:I(H({descendantName:"noResults"}),_.noResults),showMore:I(H({descendantName:"showMore"}),_.showMore),disabledShowMore:I(H({descendantName:"showMore",modifierName:"disabled"}),_.disabledShowMore),searchable:{root:I(mc(),_.searchableRoot),form:I(mc({descendantName:"form"}),_.searchableForm),input:I(mc({descendantName:"input"}),_.searchableInput),submit:I(mc({descendantName:"submit"}),_.searchableSubmit),submitIcon:I(mc({descendantName:"submitIcon"}),_.searchableSubmitIcon),reset:I(mc({descendantName:"reset"}),_.searchableReset),resetIcon:I(mc({descendantName:"resetIcon"}),_.searchableResetIcon),loadingIndicator:I(mc({descendantName:"loadingIndicator"}),_.searchableLoadingIndicator),loadingIcon:I(mc({descendantName:"loadingIcon"}),_.searchableLoadingIcon)}},_={containerNode:t,cssClasses:n,templates:w,searchBoxTemplates:{submit:w.searchableSubmit,reset:w.searchableReset,loadingIndicator:w.searchableLoadingIndicator},renderState:{},searchable:u,searchablePlaceholder:l,searchableIsAlwaysActive:S,showMore:o},d=_.containerNode,h=_.cssClasses,f=_.templates,m=_.searchBoxTemplates,p=_.renderState,g=_.showMore,v=_.searchable,y=_.searchablePlaceholder,b=_.searchableIsAlwaysActive,C(C({},Rn(function(e,t){var n=e.refine,r=e.items,i=e.createURL,a=e.searchForItems,s=e.isFromSearch,o=e.instantSearchInstance,c=e.toggleShowMore,u=e.isShowingMore,l=e.hasExhaustiveItems,e=e.canToggleShowMore;t?(p.templateProps=M({defaultTemplates:hc,templatesConfig:o.templatesConfig,templates:f}),p.searchBoxTemplateProps=M({defaultTemplates:dc,templatesConfig:o.templatesConfig,templates:m})):L(j(Ps,{createURL:i,cssClasses:h,facetValues:r,templateProps:p.templateProps,searchBoxTemplateProps:p.searchBoxTemplateProps,toggleRefinement:n,searchFacetValues:v?a:void 0,searchPlaceholder:y,searchIsAlwaysActive:b,isFromSearch:s,showMore:g&&!s&&0<r.length,toggleShowMore:c,isShowingMore:u,hasExhaustiveItems:l,canToggleShowMore:e}),d)},function(){return L(null,t)})({attribute:r,operator:i,limit:s,showMore:o,showMoreLimit:c,sortBy:a,escapeFacetValues:R,transformItems:e})),{},{$$widgetType:"ais.refinementList"});throw new Error(fc("The `container` option is required."))},relevantSort:function(e){var t,r,i,a,n=e.container,s=e.templates,s=void 0===s?{}:s,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(yc(),e.root),text:I(yc({descendantName:"text"}),e.text),button:I(yc({descendantName:"button"}),e.button)},e=C(C({},gc),s),r=(s={containerNode:t,cssClasses:n,renderState:{},templates:e}).containerNode,i=s.cssClasses,a=s.templates,C(C({},zr(function(e){var t=e.isRelevantSorted,n=e.isVirtualReplica,e=e.refine;L(j(pc,{cssClasses:i,templates:a,isRelevantSorted:t,isVirtualReplica:n,refine:e}),r)},function(){L(null,t)})({})),{},{$$widgetType:"ais.relevantSort"});throw new Error(vc("The `container` option is required."))},searchBox:function(e){var t,r,i,a,s,o,c,u,l,d,e=e||{},n=e.container,h=e.placeholder,h=void 0===h?"":h,f=e.cssClasses,f=void 0===f?{}:f,m=e.autofocus,m=void 0!==m&&m,p=e.searchAsYouType,p=void 0===p||p,g=e.showReset,g=void 0===g||g,v=e.showSubmit,v=void 0===v||v,y=e.showLoadingIndicator,y=void 0===y||y,b=e.queryHook,e=e.templates,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(Rc(),f.root),form:I(Rc({descendantName:"form"}),f.form),input:I(Rc({descendantName:"input"}),f.input),submit:I(Rc({descendantName:"submit"}),f.submit),submitIcon:I(Rc({descendantName:"submitIcon"}),f.submitIcon),reset:I(Rc({descendantName:"reset"}),f.reset),resetIcon:I(Rc({descendantName:"resetIcon"}),f.resetIcon),loadingIndicator:I(Rc({descendantName:"loadingIndicator"}),f.loadingIndicator),loadingIcon:I(Rc({descendantName:"loadingIcon"}),f.loadingIcon)},f=C(C({},dc),e),r=(e={containerNode:t,cssClasses:n,placeholder:h,templates:f,autofocus:m,searchAsYouType:p,showReset:g,showSubmit:v,showLoadingIndicator:y}).containerNode,i=e.cssClasses,a=e.placeholder,s=e.templates,o=e.autofocus,c=e.searchAsYouType,u=e.showReset,l=e.showSubmit,d=e.showLoadingIndicator,C(C({},_n(function(e){var t=e.refine,n=e.query,e=e.isSearchStalled;L(j(Rs,{query:n,placeholder:a,autofocus:o,refine:t,searchAsYouType:c,templates:s,showSubmit:l,showReset:u,showLoadingIndicator:d,isSearchStalled:e,cssClasses:i}),r)},function(){return L(null,t)})({queryHook:b})),{},{$$widgetType:"ais.searchBox"});throw new Error(bc("The `container` option is required."))},sortBy:function(e){var t,i,a,e=e||{},n=e.container,r=e.items,s=e.cssClasses,s=void 0===s?{}:s,e=e.transformItems;if(n)return t=P(n),n={root:I(_c(),s.root),select:I(_c({descendantName:"select"}),s.select),option:I(_c({descendantName:"option"}),s.option)},i=(s={containerNode:t,cssClasses:n}).containerNode,a=s.cssClasses,C(C({},wn(function(e,t){var n=e.currentRefinement,r=e.options,e=e.refine;t||L(j("div",{className:a.root},j(Es,{cssClasses:a,currentValue:n,options:r,setValue:e})),i)},function(){return L(null,t)})({container:t,items:r,transformItems:e})),{},{$$widgetType:"ais.sortBy"});throw new Error(Sc("The `container` option is required."))},stats:function(e){var t,l,d,h,f,e=e||{},n=e.container,r=e.cssClasses,r=void 0===r?{}:r,e=e.templates,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(xc(),r.root),text:I(xc({descendantName:"text"}),r.text)},l=(r={containerNode:t,cssClasses:n,templates:e,renderState:{}}).renderState,d=r.cssClasses,h=r.containerNode,f=r.templates,C(C({},Nn(function(e,t){var n=e.hitsPerPage,r=e.nbHits,i=e.nbSortedHits,a=e.areHitsSorted,s=e.nbPages,o=e.page,c=e.processingTimeMS,u=e.query,e=e.instantSearchInstance;t?l.templateProps=M({defaultTemplates:Ic,templatesConfig:e.templatesConfig,templates:f}):L(j(Pc,{cssClasses:d,hitsPerPage:n,nbHits:r,nbSortedHits:i,areHitsSorted:a,nbPages:s,page:o,processingTimeMS:c,query:u,templateProps:l.templateProps}),h)},function(){return L(null,t)})({})),{},{$$widgetType:"ais.stats"});throw new Error(Nc("The `container` option is required."))},toggleRefinement:function(e){var t,i,a,s,o,e=e||{},n=e.container,r=e.attribute,c=e.cssClasses,c=void 0===c?{}:c,u=e.templates,u=void 0===u?{}:u,l=e.on,l=void 0===l||l,e=e.off;if(n)return t=P(n),n={root:I(kc(),c.root),label:I(kc({descendantName:"label"}),c.label),checkbox:I(kc({descendantName:"checkbox"}),c.checkbox),labelText:I(kc({descendantName:"labelText"}),c.labelText)},i=(c={containerNode:t,cssClasses:n,renderState:{},templates:u}).containerNode,a=c.cssClasses,s=c.renderState,o=c.templates,C(C({},xn(function(e,t){var n=e.value,r=e.refine,e=e.instantSearchInstance;t?s.templateProps=M({defaultTemplates:Cc,templatesConfig:e.templatesConfig,templates:o}):L(j(Fc,{cssClasses:a,currentRefinement:n,templateProps:s.templateProps,refine:r}),i)},function(){return L(null,t)})({attribute:r,on:l,off:e})),{},{$$widgetType:"ais.toggleRefinement"});throw new Error(Ec("The `container` option is required."))},voiceSearch:function(e){var t,i,a,s,e=e||{},n=e.container,r=e.cssClasses,r=void 0===r?{}:r,o=e.templates,o=void 0===o?{}:o,c=e.searchAsYouSpeak,c=void 0!==c&&c,u=e.language,l=e.additionalQueryParameters,e=e.createVoiceSearchHelper;if(n)return t=P(n),n={root:I(Dc(),r.root),button:I(Dc({descendantName:"button"}),r.button),status:I(Dc({descendantName:"status"}),r.status)},r=C(C({},Ac),o),i=(o={containerNode:t,cssClasses:n,templates:r}).containerNode,a=o.cssClasses,s=o.templates,C(C({},Kr(function(e){var t=e.isBrowserSupported,n=e.isListening,r=e.toggleListening,e=e.voiceListeningState;L(j(jc,{cssClasses:a,templates:s,isBrowserSupported:t,isListening:n,toggleListening:r,voiceListeningState:e}),i)},function(){return L(null,t)})({container:t,cssClasses:n,templates:r,searchAsYouSpeak:c,language:u,additionalQueryParameters:l,createVoiceSearchHelper:e})),{},{$$widgetType:"ais.voiceSearch"});throw new Error(Wc("The `container` option is required."))}});return a.version="4.52.0",a.connectors=Fr,a.widgets=e,a.middlewares=cr,a.routers=Yt,a.stateMappings=sn,a.createInfiniteHitsSessionStorageCache=function(){return{read:function(e){var e=e.state,t=Ge(function(e){return e.window.sessionStorage});if(!t)return null;try{var n=JSON.parse(t.getItem(ci));return n&&ke(n.state,oi(e))?n.hits:null}catch(e){if(e instanceof SyntaxError)try{t.removeItem(ci)}catch(e){}return null}},write:function(e){var t=e.state,e=e.hits,n=Ge(function(e){return e.window.sessionStorage});if(n)try{n.setItem(ci,JSON.stringify({state:oi(t),hits:e}))}catch(e){}}}},a.highlight=Yr,a.reverseHighlight=Gr,a.snippet=ti,a.reverseSnippet=ri,a.insights=Kt,a});
//# sourceMappingURL=instantsearch.production.min.js.map