-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.47b9b384.js
35 lines (35 loc) · 237 KB
/
index.47b9b384.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function e(e){return e&&e.__esModule?e.default:e}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r={},n={},i=t.parcelRequire1e8d;null==i&&((i=function(e){if(e in r)return r[e].exports;if(e in n){var t=n[e];delete n[e];var i={id:e,exports:{}};return r[e]=i,t.call(i.exports,i,i.exports),i.exports}var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}).register=function(e,t){n[e]=t},t.parcelRequire1e8d=i),i.register("4kbyH",(function(e,t){e.exports="3.14.1"})),i.register("kBwwM",(function(e,t){!function(e){function t(e,t,r){var n;return t&&"object"==typeof t&&(void 0!==t[e]?n=t[e]:r&&t.get&&"function"==typeof t.get&&(n=t.get(e))),n}e.Template=function(e,t,r,n){e=e||{},this.r=e.code||this.r,this.c=r,this.options=n||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,r){return""},v:function(e){return e=c(e),s.test(e)?e.replace(r,"&").replace(n,"<").replace(i,">").replace(a,"'").replace(o,"""):e},t:c,render:function(e,t,r){return this.ri([e],t||{},r)},ri:function(e,t,r){return this.r(e,t,r)},ep:function(e,t){var r=this.partials[e],n=t[r.name];if(r.instance&&r.base==n)return r.instance;if("string"==typeof n){if(!this.c)throw new Error("No compiler available.");n=this.c.compile(n,this.options)}if(!n)return null;if(this.partials[e].base=n,r.subs){for(key in t.stackText||(t.stackText={}),r.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);n=function(e,t,r,n,i,a){function o(){}function s(){}var c;o.prototype=e,s.prototype=e.subs;var u=new o;for(c in u.subs=new s,u.subsText={},u.buf="",n=n||{},u.stackSubs=n,u.subsText=a,t)n[c]||(n[c]=t[c]);for(c in n)u.subs[c]=n[c];for(c in i=i||{},u.stackPartials=i,r)i[c]||(i[c]=r[c]);for(c in i)u.partials[c]=i[c];return u}(n,r.subs,r.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=n,n},rp:function(e,t,r,n){var i=this.ep(e,r);return i?i.ri(t,r,n):""},rs:function(e,t,r){var n=e[e.length-1];if(u(n))for(var i=0;i<n.length;i++)e.push(n[i]),r(e,t,this),e.pop();else r(e,t,this)},s:function(e,t,r,n,i,a,o){var s;return(!u(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,r,n,i,a,o)),s=!!e,!n&&s&&t&&t.push("object"==typeof e?e:t[t.length-1]),s)},d:function(e,r,n,i){var a,o=e.split("."),s=this.f(o[0],r,n,i),c=this.options.modelGet,l=null;if("."===e&&u(r[r.length-2]))s=r[r.length-1];else for(var f=1;f<o.length;f++)void 0!==(a=t(o[f],s,c))?(l=s,s=a):s="";return!(i&&!s)&&(i||"function"!=typeof s||(r.push(l),s=this.mv(s,r,n),r.pop()),s)},f:function(e,r,n,i){for(var a=!1,o=!1,s=this.options.modelGet,c=r.length-1;c>=0;c--)if(void 0!==(a=t(e,r[c],s))){o=!0;break}return o?(i||"function"!=typeof a||(a=this.mv(a,r,n)),a):!i&&""},ls:function(e,t,r,n,i){var a=this.options.delimiters;return this.options.delimiters=i,this.b(this.ct(c(e.call(t,n)),t,r)),this.options.delimiters=a,!1},ct:function(e,t,r){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,r)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,r,n,i,a,o){var s,c=t[t.length-1],u=e.call(c);return"function"==typeof u?!!n||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(u,c,r,s.substring(i,a),o)):u},mv:function(e,t,r){var n=t[t.length-1],i=e.call(n);return"function"==typeof i?this.ct(c(i.call(n)),n,r):i},sub:function(e,t,r,n){var i=this.subs[e];i&&(this.activeSub=e,i(t,r,this,n),this.activeSub=!1)}};var r=/&/g,n=/</g,i=/>/g,a=/\'/g,o=/\"/g,s=/[&<>\"\']/;function c(e){return String(null==e?"":e)}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(e.exports)}));var a={};
/*! algoliasearch-lite.umd.js | 4.14.3 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */function o(e){return o="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},o(e)}a=function(){function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){e(r,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}function n(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(e){var t,r="algoliasearch-client-js-".concat(e.key),n=function(){return void 0===t&&(t=e.localStorage||window.localStorage),t},a=function(){return JSON.parse(n().getItem(r)||"{}")};return{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var r=JSON.stringify(e),n=a()[r];return Promise.all([n||t(),void 0!==n])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]=t,n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function s(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return s({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return s({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return s({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return s({caches:t}).clear()}))}}}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var o=n(),s=i&&i.miss||function(){return Promise.resolve()};return o.then((function(e){return s(e)})).then((function(){return o}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function l(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0;return e.replace(/%s/g,(function(){return encodeURIComponent(r[i++])}))}var h={WithinQueryParameters:0,WithinHeaders:1};function p(e,t){var r=e||{},n=r.data||{};return Object.keys(r).forEach((function(e){-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},m=1,y=2,g=3;function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function b(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var O="GET",w="POST";function _(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(v(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===m||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return b(e)})):t}}))}function S(e,t,n,i){var o=[],s=function(e,t){if(e.method!==O&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),c=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,l=n.method!==O?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),l),i.queryParameters),h=0,p=function t(r,a){var l=r.pop();if(void 0===l)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:E(o)};var p={data:s,headers:c,method:u,url:P(l,n.path,f),connectTimeout:a(h,e.timeouts.connect),responseTimeout:a(h,i.timeout)},d=function(e){var t={request:p,response:e,host:l,triesLeft:r.length};return o.push(t),t},m={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&h++,Promise.all([e.logger.info("Retryable failure",x(i)),e.hostsCache.set(l,v(l,n.isTimedOut?g:y))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,E(o))}};return e.requester.send(p).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,m)}))};return _(e.hostsCache,t).then((function(e){return p(a(e.statelessHosts).reverse(),e.getTimeout)}))}function j(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function P(e,t,r){var n=R(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function R(e){return Object.keys(e).map((function(t){var r;return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]))})).join("&")}function E(e){return e.map((function(e){return x(e)}))}function x(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var F=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===h.WithinHeaders?n:{}},queryParameters:function(){return e===h.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:h.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,o=e.responsesCache,s=e.timeouts,c=e.userAgent,u=e.hosts,l=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:o,timeouts:s,userAgent:c,headers:e.headers,queryParameters:l,hosts:u.map((function(e){return b(e)})),read:function(e,t){var r=p(t,f.timeouts.read),n=function(){return S(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return S(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,p(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return l({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},T=function(e){return function(t,r){return t.method===O?e.transporter.read(t,r):e.transporter.write(t,r)}},N=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},k=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:R(e.params||{})})}));return e.transporter.read({method:w,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},I=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,o=a.facetName,s=a.facetQuery,c=n(a,["facetName","facetQuery"]);return N(e)(t.indexName,{methods:{searchForFacetValues:D}}).searchForFacetValues(o,s,r(r({},i),c))})))}},C=function(e){return function(t,r,n){return e.transporter.read({method:w,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},A=function(e){return function(t,r){return e.transporter.read({method:w,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},D=function(e){return function(t,r,n){return e.transporter.read({method:w,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},H=1,L=2,U=3;function M(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=U,{debug:function(e,t){return H>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return L>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:s({caches:[o({key:"".concat("4.14.3","-").concat(e)}),c()]}),userAgent:j("4.14.3").add({segment:"Browser",version:"lite"}),authMode:h.WithinQueryParameters};return F(r(r(r({},a),n),{},{methods:{search:k,searchForFacetValues:I,multipleQueries:k,multipleSearchForFacetValues:I,customRequest:T,initIndex:function(e){return function(t){return N(e)(t,{methods:{search:A,searchForFacetValues:D,findAnswers:C}})}}}}))}return M.version="4.14.3",M}();var s="_ALGOLIA";function c(){return function(e){if("object"===("undefined"==typeof document?"undefined":o(document))&&"string"==typeof document.cookie)for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}}(s)}var u=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.descendantName,n=t.modifierName,i=r?"-".concat(r):"",a=n?"--".concat(n):"";return"".concat("ais","-").concat(e).concat(i).concat(a)}};function l(e,t){return(Array.isArray(t)?t:t.split(".")).reduce((function(e,t){return e&&e[t]}),e)}var f={"&":"&","<":"<",">":">",'"':""","'":"'"},h=/[&<>"']/g,p=RegExp(h.source);function d(e){return e&&p.test(e)?e.replace(h,(function(e){return f[e]})):e}var m={"&":"&","<":"<",">":">",""":'"',"'":"'"},y=/&(amp|quot|lt|gt|#39);/g,g=RegExp(y.source);function v(e){return e&&g.test(e)?e.replace(y,(function(e){return m[e]})):e}function b(e){return b="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},b(e)}function O(e){if(!function(e){return"object"===b(e)&&null!==e}(e)||"[object Object]"!==function(e){return null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function w(e){return w="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},w(e)}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_.apply(this,arguments)}function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){P(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==w(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===w(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var R={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},E={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function x(e){return d(e).replace(new RegExp(R.highlightPreTag,"g"),E.highlightPreTag).replace(new RegExp(R.highlightPostTag,"g"),E.highlightPostTag)}function F(e){return O(e)&&"string"!=typeof e.value?Object.keys(e).reduce((function(t,r){return j(j({},t),{},P({},r,F(e[r])))}),{}):Array.isArray(e)?e.map(F):j(j({},e),{},{value:x(e.value)})}function T(e){return void 0===e.__escaped&&((e=e.map((function(e){var t=_({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return t._highlightResult&&(t._highlightResult=F(t._highlightResult)),t._snippetResult&&(t._snippetResult=F(t._snippetResult)),t}))).__escaped=!0),e}var N=u("Highlight");function k(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,a=e.cssClasses,o=void 0===a?{}:a,s=(l(i._highlightResult,t)||{}).value,c=void 0===s?"":s,u=N({descendantName:"highlighted"})+(o.highlighted?" ".concat(o.highlighted):"");return c.replace(new RegExp(E.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(E.highlightPostTag,"g"),"</".concat(n,">"))}function I(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function C(e){return JSON.parse(decodeURIComponent(atob(e)))}function A(e){return A="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},A(e)}function D(e){var t=e.getAttribute("data-insights-method"),r=e.getAttribute("data-insights-payload");if("string"!=typeof r)throw new Error("The insights helper expects `data-insights-payload` to be a base64-encoded JSON string.");try{return{method:t,payload:C(r)}}catch(e){throw new Error("The insights helper was unable to parse `data-insights-payload`.")}}function H(e,t){return function(e){var t,r=e.method,n=e.payload;if("object"!==A(n))throw new Error("The insights helper expects the payload to be an object.");try{t=I(n)}catch(e){throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(r,'" data-insights-payload="').concat(t,'"')}({method:e,payload:t})}function L(e){var t=E.highlightPreTag,r=E.highlightPostTag;return e.map((function(e){return e.isHighlighted?t+e.value+r:e.value})).join("")}function U(e){var t=E.highlightPostTag,r=E.highlightPreTag,n=e.split(r),i=n.shift(),a=i?[{value:i,isHighlighted:!1}]:[];return n.forEach((function(e){var r=e.split(t);a.push({value:r[0],isHighlighted:!0}),""!==r[1]&&a.push({value:r[1],isHighlighted:!1})})),a}var M=new RegExp(/\w/i);function q(e,t){var r,n,i=e[t],a=(null===(r=e[t+1])||void 0===r?void 0:r.isHighlighted)||!0,o=(null===(n=e[t-1])||void 0===n?void 0:n.isHighlighted)||!0;return M.test(v(i.value))||o!==a?i.isHighlighted:o}function Q(e){return Q="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},Q(e)}function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?W(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Q(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Q(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V(e){return e.some((function(e){return e.isHighlighted}))?e.map((function(t,r){return $($({},t),{},{isHighlighted:!q(e,r)})})):e.map((function(e){return $($({},e),{},{isHighlighted:!1})}))}var K=u("ReverseHighlight");function J(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,a=e.cssClasses,o=void 0===a?{}:a,s=(l(i._highlightResult,t)||{}).value,c=void 0===s?"":s,u=K({descendantName:"highlighted"})+(o.highlighted?" ".concat(o.highlighted):"");return L(V(U(c))).replace(new RegExp(E.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(E.highlightPostTag,"g"),"</".concat(n,">"))}var z=u("ReverseSnippet");function Y(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,a=e.cssClasses,o=void 0===a?{}:a,s=(l(i._snippetResult,t)||{}).value,c=void 0===s?"":s,u=z({descendantName:"highlighted"})+(o.highlighted?" ".concat(o.highlighted):"");return L(V(U(c))).replace(new RegExp(E.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(E.highlightPostTag,"g"),"</".concat(n,">"))}var G=u("Snippet");function X(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,a=e.cssClasses,o=void 0===a?{}:a,s=(l(i._snippetResult,t)||{}).value,c=void 0===s?"":s,u=G({descendantName:"highlighted"})+(o.highlighted?" ".concat(o.highlighted):"");return c.replace(new RegExp(E.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(E.highlightPostTag,"g"),"</".concat(n,">"))}function Z(e){return e!==Object(e)}function ee(e,t){if(e===t)return!0;if(Z(e)||Z(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(!(i in t))return!1;if(!ee(e[i],t[i]))return!1}return!0}function te(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window:window})}var re=["page"];function ne(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ie(e){var t=e||{};t.page;return ne(t,re)}var ae="ais.infiniteHits";var oe;function se(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function ce(e){return"function"==typeof e}function ue(e){return"object"==typeof e&&null!==e}function le(e){return void 0===e}oe=se,se.prototype._events=void 0,se.prototype._maxListeners=void 0,se.defaultMaxListeners=10,se.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},se.prototype.emit=function(e){var t,r,n,i,a,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||ue(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var s=new Error('Uncaught, unspecified "error" event. ('+t+")");throw s.context=t,s}if(le(r=this._events[e]))return!1;if(ce(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),r.apply(this,i)}else if(ue(r))for(i=Array.prototype.slice.call(arguments,1),n=(o=r.slice()).length,a=0;a<n;a++)o[a].apply(this,i);return!0},se.prototype.addListener=function(e,t){var r;if(!ce(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,ce(t.listener)?t.listener:t),this._events[e]?ue(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,ue(this._events[e])&&!this._events[e].warned&&(r=le(this._maxListeners)?se.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(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},se.prototype.on=se.prototype.addListener,se.prototype.once=function(e,t){if(!ce(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},se.prototype.removeListener=function(e,t){var r,n,i,a;if(!ce(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(r=this._events[e]).length,n=-1,r===t||ce(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(ue(r)){for(a=i;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},se.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(ce(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},se.prototype.listeners=function(e){return this._events&&this._events[e]?ce(this._events[e])?[this._events[e]]:this._events[e].slice():[]},se.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(ce(t))return 1;if(t)return t.length}return 0},se.listenerCount=function(e,t){return e.listenerCount(t)};var fe,he={},pe={},de={};function me(e,t){this.main=e,this.fn=t,this.lastResults=null}(de=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})})(me,oe),me.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},me.prototype.getModifiedState=function(e){return this.fn(e)},pe=me;var ye;var ge=(ye={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}).escapeFacetValue,ve={};function be(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function Oe(e,t){if(e===t)return e;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&"__proto__"!==r&&"constructor"!==r){var n=t[r],i=e[r];void 0!==i&&void 0===n||(be(i)&&be(n)?e[r]=Oe(i,n):e[r]="object"==typeof(a=n)&&null!==a?Oe(Array.isArray(a)?[]:{},a):a)}var a;return e}ve=function(e){be(e)||(e={});for(var t=1,r=arguments.length;t<r;t++){var n=arguments[t];be(n)&&Oe(e,n)}return e};var we={};we=function(e){return e&&Object.keys(e).length>0};var _e={};_e=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i};var Se={};function je(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var Pe={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:Pe._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:Pe._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),o=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(o).length>1){var s=a[0].split(o).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(o)})}),[]);s.forEach((function(n,a){var o=Pe._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function c(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var u=(o.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!c(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||c(t)||e.push(t),e}),[]),l=s[a-1];o.facetFilters=a>0?u.concat(l.attribute+":"+l.value):u.length>0?u:void 0,r.push({indexName:e,params:o})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(Pe._getHitsHierarchicalFacetsAttributes(e)).sort(),r=Pe._getFacetFilters(e),n=Pe._getNumericFilters(e),i=Pe._getTagFilters(e),a={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:i};return r.length>0&&(a.facetFilters=r),n.length>0&&(a.numericFilters=n),je(ve({},e.getQueryParams(),a))},_getDisjunctiveFacetSearchParams:function(e,t,r){var n=Pe._getFacetFilters(e,t,r),i=Pe._getNumericFilters(e,t),a=Pe._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};a.length>0&&(o.tagFilters=a);var s=e.getHierarchicalFacetByName(t);return o.facets=s?Pe._getDisjunctiveHierarchicalFacetAttribute(e,s,r):t,i.length>0&&(o.numericFilters=i),n.length>0&&(o.facetFilters=n),je(ve({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).sort().forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).sort().forEach((function(e){(a[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var o=e.disjunctiveFacetsRefinements||{};Object.keys(o).sort().forEach((function(e){var r=o[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var s=e.hierarchicalFacetsRefinements||{};return Object.keys(s).sort().forEach((function(i){var a=(s[i]||[])[0];if(void 0!==a){var o,c,u=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);if(t===i){if(-1===a.indexOf(l)||!f&&!0===r||f&&f.split(l).length===a.split(l).length)return;f?(c=f.split(l).length-1,a=f):(c=a.split(l).length-2,a=a.slice(0,a.lastIndexOf(l))),o=u.attributes[c]}else c=a.split(l).length-1,o=u.attributes[c];o&&n.push([o+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,o=r.attributes.slice(0,a+1);return t.concat(o)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var o=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,o+1)},getSearchForFacetQuery:function(e,t,r,n){var i=n.isDisjunctiveFacet(e)?n.clearRefinements(e):n,a={facetQuery:t,facetName:e};return"number"==typeof r&&(a.maxFacetHits=r),je(ve({},Pe._getHitsSearchParams(i),a))}};Se=Pe;var Re,Ee={};Re=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})};var xe={};xe=function(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)if(t(e[r]))return e[r]};var Fe={};Fe=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))};var Te={};Te=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 Ne;Ne=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)};var ke={},Ie={addRefinement:function(e,t,r){if(Ie.isRefined(e,t,r))return e;var n=""+r,i=e[t]?e[t].concat(n):[n],a={};return a[t]=i,Re({},a,e)},removeRefinement:function(e,t,r){if(void 0===r)return Ie.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return Ie.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return Ie.isRefined(e,t,r)?Ie.removeRefinement(e,t,r):Ie.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return we(e)?{}:e;if("string"==typeof t)return _e(e,[t]);if("function"==typeof t){var n=!1,i=Object.keys(e).reduce((function(i,a){var o=e[a]||[],s=o.filter((function(e){return!t(e,a,r)}));return s.length!==o.length&&(n=!0),i[a]=s,i}),{});return n?i:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};function Ce(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return Ce(t[r],e)})):e===t}function Ae(e){var t=e?Ae._parseNumbers(e):{};void 0===t.userToken||Ne(t.userToken)||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=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==Ae.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}ke=Ie,Ae.PARAMETERS=Object.keys(new Ae),Ae._parseNumbers=function(e){if(e instanceof Ae)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[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}));r[t][e]=i}))})),t.numericRefinements=r}return ve({},e,t)},Ae.make=function(e){var t=new Ae(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},Ae.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?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."):e.tagRefinements.length>0&&r.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&&r.numericRefinements&&we(r.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."):we(e.numericRefinements)&&r.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},Ae.prototype={constructor:Ae,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:ke.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:ke.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:ke.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:ke.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},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,r){var n=Te(r);if(this.isNumericRefined(e,t,n))return this;var i=ve({},this.numericRefinements);return i[e]=ve({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},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(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&Ce(r.val,Te(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return we(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return _e(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],o={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],s=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||s.push(t)})),s.length!==n.length&&(t=!0),o[r]=s})),n[i]=o,n}),{});return t?n:this.numericRefinements}},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))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return ke.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:ke.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return ke.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:ke.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return ke.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:ke.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return ke.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:ke.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return ke.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:ke.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return ke.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:ke.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},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))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:ke.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:ke.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:ke.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:Re({},n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:Re({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:Re({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&ke.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&ke.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&ke.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var i,a,o=Te(r),s=void 0!==(i=this.numericRefinements[e][t],a=o,xe(i,(function(e){return Ce(e,a)})));return n&&s},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=Fe(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return Fe(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=Ae.validate(this,e);if(t)throw t;var r=this,n=Ae._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?_e(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},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(e){return xe(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},Ee=Ae;var De,He={};De=function(e){return Array.isArray(e)?e.filter(Boolean):[]};var Le;Le=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1};var Ue;Ue=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var n=t.split(":"),i=xe(r,(function(e){return e[0]===n[0]}));return n.length>1||!i?(e[0].push(n[0]),e[1].push(n[1]),e):(e[0].push(i[0]),e[1].push(i[1]),e)}),[[],[]])};var Me={};function qe(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e<t||a&&r||!i)return-1}return 0}Me=function(e,t,r){if(!Array.isArray(e))return[];Array.isArray(r)||(r=[]);var n=e.map((function(e,r){return{criteria:t.map((function(t){return e[t]})),index:r,value:e}}));return n.sort((function(e,t){for(var n=-1;++n<e.criteria.length;){var i=qe(e.criteria[n],t.criteria[n]);if(i)return n>=r.length?i:"desc"===r[n]?-i:i}return e.index-t.index})),n.map((function(e){return e.value}))};var Qe=ye.escapeFacetValue,We=ye.unescapeFacetValue,$e={};$e=function(e){return function(t,r){var n=e.hierarchicalFacets[r],i=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",a=e._getHierarchicalFacetSeparator(n),o=e._getHierarchicalRootPath(n),s=e._getHierarchicalShowParentLevel(n),c=Ue(e._getHierarchicalFacetSortBy(n)),u=t.every((function(e){return e.exhaustive})),l=function(e,t,r,n,i){return function(a,o,s){var c=a;if(s>0){var u=0;for(c=a;u<s;){var l=c&&Array.isArray(c.data)?c.data:[];c=xe(l,(function(e){return e.isRefined})),u++}}if(c){var f=Object.keys(o.data).map((function(e){return[e,o.data[e]]})).filter((function(e){return function(e,t,r,n,i,a){return(!i||0===e.indexOf(i)&&i!==e)&&(!i&&-1===e.indexOf(n)||i&&e.split(n).length-i.split(n).length==1||-1===e.indexOf(n)&&-1===r.indexOf(n)||0===r.indexOf(e)||0===e.indexOf(t+n)&&(a||0===e.indexOf(r)))}(e[0],c.path||r,i,t,r,n)}));c.data=Me(f.map((function(e){var r=e[0];return function(e,t,r,n,i){var a=t.split(r);return{name:a[a.length-1].trim(),path:t,escapedValue:Be(t),count:e,isRefined:n===t||0===n.indexOf(t+r),exhaustive:i,data:null}}(e[1],r,t,Ve(i),o.exhaustive)})),e[0],e[1])}return a}}(c,a,o,s,i),f=t;return o&&(f=t.slice(o.split(a).length)),f.reduce(l,{name:e.hierarchicalFacets[r].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:u,data:null})}};var Be=ye.escapeFacetValue,Ve=ye.unescapeFacetValue;function Ke(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function Je(e,t,r){t&&t[r]&&(e.stats=t[r])}function ze(e,t,r){var n=t[0];this._rawResults=t;var i=this;Object.keys(n).forEach((function(e){i[e]=n[e]})),Object.keys(r||{}).forEach((function(e){i[e]=r[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var a=e.getRefinedDisjunctiveFacets(),o=Ke(e.facets),s=Ke(e.disjunctiveFacets),c=1,u=n.facets||{};Object.keys(u).forEach((function(t){var r,a,c=u[t],l=(r=e.hierarchicalFacets,a=t,xe(r,(function(e){return(e.attributes||[]).indexOf(a)>-1})));if(l){var f=l.attributes.indexOf(t),h=Le(e.hierarchicalFacets,(function(e){return e.name===l.name}));i.hierarchicalFacets[h][f]={attribute:t,data:c,exhaustive:n.exhaustiveFacetsCount}}else{var p,d=-1!==e.disjunctiveFacets.indexOf(t),m=-1!==e.facets.indexOf(t);d&&(p=s[t],i.disjunctiveFacets[p]={name:t,data:c,exhaustive:n.exhaustiveFacetsCount},Je(i.disjunctiveFacets[p],n.facets_stats,t)),m&&(p=o[t],i.facets[p]={name:t,data:c,exhaustive:n.exhaustiveFacetsCount},Je(i.facets[p],n.facets_stats,t))}})),this.hierarchicalFacets=De(this.hierarchicalFacets),a.forEach((function(r){var a=t[c],o=a&&a.facets?a.facets:{},u=e.getHierarchicalFacetByName(r);Object.keys(o).forEach((function(t){var r,c=o[t];if(u){r=Le(e.hierarchicalFacets,(function(e){return e.name===u.name}));var l=Le(i.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===l)return;i.hierarchicalFacets[r][l].data=ve({},i.hierarchicalFacets[r][l].data,c)}else{r=s[t];var f=n.facets&&n.facets[t]||{};i.disjunctiveFacets[r]={name:t,data:Re({},c,f),exhaustive:a.exhaustiveFacetsCount},Je(i.disjunctiveFacets[r],a.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!i.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(We(n))>-1&&(i.disjunctiveFacets[r].data[n]=0)}))}})),c++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),o=e.getHierarchicalRefinement(r);0===o.length||o[0].split(a).length<2||t.slice(c).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var s=r[t],c=Le(e.hierarchicalFacets,(function(e){return e.name===n.name})),u=Le(i.hierarchicalFacets[c],(function(e){return e.attribute===t}));if(-1!==u){var l={};if(o.length>0){var f=o[0].split(a)[0];l[f]=i.hierarchicalFacets[c][u].data[f]}i.hierarchicalFacets[c][u].data=Re(l,s,i.hierarchicalFacets[c][u].data)}})),c++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],a=o[t];i.facets[a]={name:t,data:u[t],exhaustive:n.exhaustiveFacetsCount},r.forEach((function(e){i.facets[a]=i.facets[a]||{name:t},i.facets[a].data=i.facets[a].data||{},i.facets[a].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map($e(e)),this.facets=De(this.facets),this.disjunctiveFacets=De(this.disjunctiveFacets),this._state=e}function Ye(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=xe(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=Qe(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=xe(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=Qe(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var a=xe(e.hierarchicalFacets,r);if(!a)return a;var o=e._state.getHierarchicalFacetByName(t),s=e._state._getHierarchicalFacetSeparator(o),c=We(e._state.getHierarchicalRefinement(t)[0]||"");0===c.indexOf(o.rootPath)&&(c=c.replace(o.rootPath+s,""));var u=c.split(s);return u.unshift(t),Ge(a,u,0),a}}function Ge(e,t,r){e.isRefined=e.name===t[r],e.data&&e.data.forEach((function(e){Ge(e,t,r+1)}))}function Xe(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var i=t.data.map((function(t){return Xe(e,t,r,n+1)})),a=e(i,r[n]);return Re({data:a},t)}function Ze(e,t){var r=xe(e,(function(e){return e.name===t}));return r&&r.stats}function et(e,t,r,n,i){var a=xe(i,(function(e){return e.name===r})),o=a&&a.data&&a.data[n]?a.data[n]:0,s=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:o,exhaustive:s}}ze.prototype.getFacetByName=function(e){function t(t){return t.name===e}return xe(this.facets,t)||xe(this.disjunctiveFacets,t)||xe(this.hierarchicalFacets,t)},ze.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],ze.prototype.getFacetValues=function(e,t){var r=Ye(this,e);if(r){var n,i=Re({},t,{sortBy:ze.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))n=[e];else n=a._state.getHierarchicalFacetByName(r.name).attributes;return Xe((function(e,t){if(i.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(r)return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var a,o=t.sortRemainingBy;return"hidden"===o?r:(a="alpha"===o?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(Me(n,a[0],a[1])))}(e,r)}if(Array.isArray(i.sortBy)){var n=Ue(i.sortBy,ze.DEFAULT_SORT);return Me(e,n[0],n[1])}if("function"==typeof i.sortBy)return function(e,t){return t.sort(e)}(i.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},ze.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?Ze(this.facets,e):this._state.isDisjunctiveFacet(e)?Ze(this.disjunctiveFacets,e):void 0},ze.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(et(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(et(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(et(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),o=r.split(a),s=xe(n,(function(e){return e.name===t})),c=o.reduce((function(e,t){var r=e&&xe(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),s),u=c&&c.count||0,l=c&&c.exhaustive||!1,f=c&&c.path||"";return{type:"hierarchical",attributeName:t,name:f,count:u,exhaustive:l}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},He=ze;var tt=i("4kbyH");function rt(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+tt+")"),this.setClient(e);var n=r||{};n.index=t,this.state=Ee.make(n),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function nt(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function it(){return this.state.page}function at(e,t,r){return new he(e,t,r)}function ot(e,t){for(var r,n=0;n<e.length;n++)if(t(r=e[n],n,e))return r}function st(e){if(e.transporter){var t=e.transporter,r=t.headers,n=t.queryParameters,i="x-algolia-application-id",a="x-algolia-api-key";return[r[i]||n[i],r[a]||n[a]]}return[e.applicationID,e.apiKey]}function ct(){}function ut(e){return ut="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},ut(e)}function lt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(r),!0).forEach((function(t){ht(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ht(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==ut(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ut(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||mt(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 dt(e){return function(e){if(Array.isArray(e))return yt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mt(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 mt(e,t){if(e){if("string"==typeof e)return yt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yt(e,t):void 0}}function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}de(rt,oe),rt.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},rt.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},rt.prototype.getQuery=function(){var e=this.state;return Se._getHitsSearchParams(e)},rt.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=Se._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new He(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new He(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},rt.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=ve({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:_e(Se._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="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(a);var o=this.client.initIndex(n.index);if("function"!=typeof o.findAnswers)throw new Error(a);return o.findAnswers(n.query,e.queryLanguages,i)},rt.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)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");var o=this.state.setQueryParameters(n||{}),s=o.isDisjunctiveFacet(e),c=Se.getSearchForFacetQuery(e,t,r,o);this._currentNbQueries++;var u,l=this;return i?u=this.client.searchForFacetValues([{indexName:o.index,params:c}]):a?u=this.client.initIndex(o.index).searchForFacetValues(c):(delete c.facetName,u=this.client.search([{type:"facet",facet:e,indexName:o.index,params:c}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:o,facet:e,query:t}),u.then((function(t){return l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=ge(t.value),t.isRefined=s?o.isDisjunctiveFacetRefined(e,t.escapedValue):o.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),e}))},rt.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},rt.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},rt.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},rt.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},rt.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},rt.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},rt.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},rt.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},rt.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},rt.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},rt.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},rt.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},rt.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},rt.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},rt.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},rt.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},rt.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},rt.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},rt.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},rt.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},rt.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},rt.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},rt.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},rt.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},rt.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},rt.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},rt.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},rt.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},rt.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},rt.prototype.setCurrentPage=nt,rt.prototype.setPage=nt,rt.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},rt.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},rt.prototype.setState=function(e){return this._change({state:Ee.make(e),isPageReset:!1}),this},rt.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new Ee(e),this},rt.prototype.hasRefinements=function(e){return!!we(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))},rt.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},rt.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},rt.prototype.hasTag=function(e){return this.state.isTagRefined(e)},rt.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},rt.prototype.getIndex=function(){return this.state.index},rt.prototype.getCurrentPage=it,rt.prototype.getPage=it,rt.prototype.getTags=function(){return this.state.tagRefinements},rt.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},rt.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},rt.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},rt.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=Se._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?Se._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),o=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,o));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,o)).catch(this._dispatchAlgoliaError.bind(this,o))}catch(e){this.emit("error",{error:e})}},rt.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t<this._lastQueryIdReceived)){this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty");var n=r.results.slice();e.forEach((function(e){var t=e.state,r=e.queriesCount,i=e.helper,a=n.splice(0,r);t.index?(i.lastResults=new He(t,a),i.emit("result",{results:i.lastResults,state:t})):i.emit("result",{results:null,state:t})}))}},rt.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"))},rt.prototype.containsRefinement=function(e,t,r,n){return e||0!==t.length||0!==r.length||0!==n.length},rt.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&this.state.disjunctiveRefinements[e].length>0},rt.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},rt.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},rt.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+tt+")"),this.client=e),this},rt.prototype.getClient=function(){return this.client},rt.prototype.derive=function(e){var t=new pe(this,e);return this.derivedHelpers.push(t),t},rt.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},rt.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},he=rt,at.version=i("4kbyH"),at.AlgoliaSearchHelper=he,at.SearchParameters=Ee,at.SearchResults=He,fe=at;var gt="2.6.0",vt="https://cdn.jsdelivr.net/npm/search-insights@".concat(gt,"/dist/search-insights.min.js");function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,i=e.$$internal,a=void 0!==i&&i,o=t;t||null===t||te((function(e){var t=e.window,r=t.AlgoliaAnalyticsObject||"aa";"string"==typeof r&&(o=t[r]),o||(t.AlgoliaAnalyticsObject=r,t[r]||(t[r]=function(){t[r].queue||(t[r].queue=[]);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];t[r].queue.push(n)},t[r].version=gt,t[r].shouldAddScript=!0),o=t[r])}));var s=o||ct;return function(e){var t=e.instantSearchInstance,i=t.middleware.filter((function(e){return"ais.insights"===e.instance.$$type&&e.instance.$$internal})).map((function(e){return e.creator}));t.unuse.apply(t,dt(i));var o,u,l=pt(st(t.client),2),f=l[0],h=l[1],p=void 0,d=void 0;if(Array.isArray(s.queue)){var m=ot(s.queue.slice().reverse(),(function(e){return"setUserToken"===pt(e,1)[0]}))||[],y=pt(m,2);p=y[1]}return s("getUserToken",null,(function(e,t){d=t})),!r&&Ot(s)||s("init",ft({appId:f,apiKey:h,partial:!0},r)),{$$type:"ais.insights",$$internal:a,onStateChange:function(){},subscribe:function(){if(s.shouldAddScript){var e="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var r=document.createElement("script");r.async=!0,r.src=vt,r.onerror=function(){t.emit("error",new Error(e))},document.body.appendChild(r),s.shouldAddScript=!1}catch(r){s.shouldAddScript=!1,t.emit("error",new Error(e))}}},started:function(){s("addAlgoliaAgent","insights-middleware"),u=t.helper,o={userToken:u.state.userToken,clickAnalytics:u.state.clickAnalytics},u.overrideStateWithoutTriggeringChangeEvent(ft(ft({},u.state),{},{clickAnalytics:!0})),a||t.scheduleSearch();var e=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var n=u.state.userToken;r?i():setTimeout(i,0)}function i(){u.overrideStateWithoutTriggeringChangeEvent(ft(ft({},u.state),{},{userToken:e})),n&&n!==e&&t.scheduleSearch()}},r=c();r&&e(r,!0),d?(e(d,!0),s("setUserToken",d)):p&&(e(p,!0),s("setUserToken",p)),s("onUserTokenChange",e,{immediate:!0});var i=s;Ot(s)&&(i=function(e,t){return s(e,t,{headers:{"X-Algolia-Application-Id":f,"X-Algolia-API-Key":h}})}),t.sendEventToInsights=function(e){n?n(e,i):e.insightsMethod&&(e.payload.algoliaSource=["instantsearch"],"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),i(e.insightsMethod,e.payload))}},unsubscribe:function(){s("onUserTokenChange",void 0),t.sendEventToInsights=ct,u&&o&&(u.overrideStateWithoutTriggeringChangeEvent(ft(ft({},u.state),o)),t.scheduleSearch())}}}}function Ot(e){var t=pt((e.version||"").split(".").map(Number),2),r=t[0],n=t[1];return r>=3||2===r&&n>=6||1===r&&n>=10}function wt(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function _t(e,t){var r=t.getResults(),n=t.getHelper();return{helper:n,parent:t,instantSearchInstance:e,results:r,scopedResults:t.getScopedResults(),state:r?r._state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function St(e,t,r){var n=wt(t,t.mainIndex,t._initialUiState);e.forEach((function(e){var i={};if(e.getWidgetRenderState){var a=e.getWidgetRenderState(n);a&&a.widgetParams&&(i=a.widgetParams)}var o=Object.keys(i).filter((function(e){return void 0!==i[e]}));r.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:o}),"ais.index"===e.$$type&&St(e.getWidgets(),t,r)}))}function jt(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).$$internal,t=void 0!==e&&e;return function(e){var r=e.instantSearchInstance,n={widgets:[]},i=document.createElement("meta"),a=document.querySelector("head");return i.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:t,onStateChange:function(){},subscribe:function(){setTimeout((function(){var e=r.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,St(r.mainIndex.getWidgets(),r,n),r.middleware.forEach((function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})})),i.content=JSON.stringify(n),a.appendChild(i)}),0)},started:function(){},unsubscribe:function(){i.remove()}}}}var Pt,Rt,Et,xt,Ft=String.prototype.replace,Tt=/%20/g,Nt="RFC3986";xt={default:Nt,formatters:{RFC1738:function(e){return Ft.call(e,Tt,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Nt};var kt=Object.prototype.hasOwnProperty,It=Array.isArray,Ct=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),At=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};Et={arrayToObject:At,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],a=i.obj[i.prop],o=Object.keys(a),s=0;s<o.length;++s){var c=o[s],u=a[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:a,prop:c}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(It(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,n,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"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",s=0;s<a.length;++s){var c=a.charCodeAt(s);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===xt.RFC1738&&(40===c||41===c)?o+=a.charAt(s):c<128?o+=Ct[c]:c<2048?o+=Ct[192|c>>6]+Ct[128|63&c]:c<55296||c>=57344?o+=Ct[224|c>>12]+Ct[128|c>>6&63]+Ct[128|63&c]:(s+=1,c=65536+((1023&c)<<10|1023&a.charCodeAt(s)),o+=Ct[240|c>>18]+Ct[128|c>>12&63]+Ct[128|c>>6&63]+Ct[128|63&c])}return o},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(It(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(It(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!kt.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var i=t;return It(t)&&!It(r)&&(i=At(t,n)),It(t)&&It(r)?(r.forEach((function(r,i){if(kt.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var a=r[i];return kt.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t}),i)}};var Dt=Object.prototype.hasOwnProperty,Ht={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Lt=Array.isArray,Ut=String.prototype.split,Mt=Array.prototype.push,qt=function(e,t){Mt.apply(e,Lt(t)?t:[t])},Qt=Date.prototype.toISOString,Wt=xt.default,$t={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Et.encode,encodeValuesOnly:!1,format:Wt,formatter:xt.formatters[Wt],indices:!1,serializeDate:function(e){return Qt.call(e)},skipNulls:!1,strictNullHandling:!1},Bt=function e(t,r,n,i,a,o,s,c,u,l,f,h,p,d){var m,y=t;if("function"==typeof s?y=s(r,y):y instanceof Date?y=l(y):"comma"===n&&Lt(y)&&(y=Et.maybeMap(y,(function(e){return e instanceof Date?l(e):e}))),null===y){if(i)return o&&!p?o(r,$t.encoder,d,"key",f):r;y=""}if("string"==typeof(m=y)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||Et.isBuffer(y)){if(o){var g=p?r:o(r,$t.encoder,d,"key",f);if("comma"===n&&p){for(var v=Ut.call(String(y),","),b="",O=0;O<v.length;++O)b+=(0===O?"":",")+h(o(v[O],$t.encoder,d,"value",f));return[h(g)+"="+b]}return[h(g)+"="+h(o(y,$t.encoder,d,"value",f))]}return[h(r)+"="+h(String(y))]}var w,_=[];if(void 0===y)return _;if("comma"===n&&Lt(y))w=[{value:y.length>0?y.join(",")||null:void 0}];else if(Lt(s))w=s;else{var S=Object.keys(y);w=c?S.sort(c):S}for(var j=0;j<w.length;++j){var P=w[j],R="object"==typeof P&&void 0!==P.value?P.value:y[P];if(!a||null!==R){var E=Lt(y)?"function"==typeof n?n(r,P):r:r+(u?"."+P:"["+P+"]");qt(_,e(R,E,n,i,a,o,s,c,u,l,f,h,p,d))}}return _};Rt=function(e,t){var r,n=e,i=function(e){if(!e)return $t;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||$t.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 r=xt.default;if(void 0!==e.format){if(!Dt.call(xt.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=xt.formatters[r],i=$t.filter;return("function"==typeof e.filter||Lt(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:$t.addQueryPrefix,allowDots:void 0===e.allowDots?$t.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:$t.charsetSentinel,delimiter:void 0===e.delimiter?$t.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:$t.encode,encoder:"function"==typeof e.encoder?e.encoder:$t.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:$t.encodeValuesOnly,filter:i,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:$t.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:$t.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:$t.strictNullHandling}}(t);"function"==typeof i.filter?n=(0,i.filter)("",n):Lt(i.filter)&&(r=i.filter);var a,o=[];if("object"!=typeof n||null===n)return"";a=t&&t.arrayFormat in Ht?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=Ht[a];r||(r=Object.keys(n)),i.sort&&r.sort(i.sort);for(var c=0;c<r.length;++c){var u=r[c];i.skipNulls&&null===n[u]||qt(o,Bt(n[u],u,s,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset))}var l=o.join(i.delimiter),f=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&("iso-8859-1"===i.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),l.length>0?f+l:""};var Vt,Kt=Object.prototype.hasOwnProperty,Jt=Array.isArray,zt={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Et.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Yt=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},Gt=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Xt=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,o=r.depth>0&&/(\[[^[\]]*])/.exec(i),s=o?i.slice(0,o.index):i,c=[];if(s){if(!r.plainObjects&&Kt.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var u=0;r.depth>0&&null!==(o=a.exec(i))&&u<r.depth;){if(u+=1,!r.plainObjects&&Kt.call(Object.prototype,o[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(o[1])}return o&&c.push("["+i.slice(o.index)+"]"),function(e,t,r,n){for(var i=n?t:Gt(t,r),a=e.length-1;a>=0;--a){var o,s=e[a];if("[]"===s&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(o=[])[u]=i:"__proto__"!==c&&(o[c]=i):o={0:i}}i=o}return i}(c,t,r,n)}};function Zt(e){return Zt="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},Zt(e)}function er(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,rr(n.key),n)}}function tr(e,t,r){return(t=rr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rr(e){var t=function(e,t){if("object"!==Zt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Zt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Zt(t)?t:String(t)}Vt=function(e,t){var r=function(e){if(!e)return zt;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?zt.charset:e.charset;return{allowDots:void 0===e.allowDots?zt.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:zt.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:zt.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:zt.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:zt.comma,decoder:"function"==typeof e.decoder?e.decoder:zt.decoder,delimiter:"string"==typeof e.delimiter||Et.isRegExp(e.delimiter)?e.delimiter:zt.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:zt.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:zt.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:zt.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:zt.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:zt.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,a),s=-1,c=t.charset;if(t.charsetSentinel)for(r=0;r<o.length;++r)0===o[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===o[r]?c="utf-8":"utf8=%26%2310003%3B"===o[r]&&(c="iso-8859-1"),s=r,r=o.length);for(r=0;r<o.length;++r)if(r!==s){var u,l,f=o[r],h=f.indexOf("]="),p=-1===h?f.indexOf("="):h+1;-1===p?(u=t.decoder(f,zt.decoder,c,"key"),l=t.strictNullHandling?null:""):(u=t.decoder(f.slice(0,p),zt.decoder,c,"key"),l=Et.maybeMap(Gt(f.slice(p+1),t),(function(e){return t.decoder(e,zt.decoder,c,"value")}))),l&&t.interpretNumericEntities&&"iso-8859-1"===c&&(l=Yt(l)),f.indexOf("[]=")>-1&&(l=Jt(l)?[l]:l),Kt.call(n,u)?n[u]=Et.combine(n[u],l):n[u]=l}return n}(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var s=a[o],c=Xt(s,n[s],r,"string"==typeof e);i=Et.merge(i,c,r)}return Et.compact(i)},Pt={formats:xt,parse:Vt,stringify:Rt};var nr=function(e){e&&(window.document.title=e)},ir=function(){function t(e){var r=this,n=e.windowTitle,i=e.writeDelay,a=void 0===i?400:i,o=e.createURL,s=e.parseURL,c=e.getLocation,u=e.start,l=e.dispose,f=e.push;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),tr(this,"$$type","ais.browser"),tr(this,"windowTitle",void 0),tr(this,"writeDelay",void 0),tr(this,"_createURL",void 0),tr(this,"parseURL",void 0),tr(this,"getLocation",void 0),tr(this,"writeTimer",void 0),tr(this,"_onPopState",void 0),tr(this,"inPopState",!1),tr(this,"isDisposed",!1),tr(this,"latestAcknowledgedHistory",0),tr(this,"_start",void 0),tr(this,"_dispose",void 0),tr(this,"_push",void 0),this.windowTitle=n,this.writeTimer=void 0,this.writeDelay=a,this._createURL=o,this.parseURL=s,this.getLocation=c,this._start=u,this._dispose=l,this._push=f,te((function(e){var t=e.window,n=r.windowTitle&&r.windowTitle(r.read());nr(n),r.latestAcknowledgedHistory=t.history.length}))}var r,n,i;return r=t,(n=[{key:"read",value:function(){return this.parseURL({qsModule:e(Pt),location:this.getLocation()})}},{key:"write",value:function(e){var t=this;te((function(r){var n=r.window,i=t.createURL(e),a=t.windowTitle&&t.windowTitle(e);t.writeTimer&&clearTimeout(t.writeTimer),t.writeTimer=setTimeout((function(){nr(a),t.shouldWrite(i)&&(t._push?t._push(i):n.history.pushState(e,a||"",i),t.latestAcknowledgedHistory=n.history.length),t.inPopState=!1,t.writeTimer=void 0}),t.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())},te((function(e){e.window.addEventListener("popstate",t._onPopState)}))}},{key:"createURL",value:function(t){return this._createURL({qsModule:e(Pt),routeState:t,location:this.getLocation()})}},{key:"dispose",value:function(){var e=this;this._dispose&&this._dispose(),this.isDisposed=!0,te((function(t){var r=t.window;e._onPopState&&r.removeEventListener("popstate",e._onPopState)})),this.writeTimer&&clearTimeout(this.writeTimer),this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(e){var t=this;return te((function(r){var n=r.window,i=!(t.isDisposed&&t.latestAcknowledgedHistory!==n.history.length);return!t.inPopState&&i&&e!==n.location.href}))}}])&&er(r.prototype,n),i&&er(r,i),Object.defineProperty(r,"prototype",{writable:!1}),t}();function ar(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,r=void 0===t?function(e){var t=e.qsModule,r=e.routeState,n=e.location,i=n.protocol,a=n.hostname,o=n.port,s=void 0===o?"":o,c=n.pathname,u=n.hash,l=t.stringify(r),f=""===s?"":":".concat(s);return l?"".concat(i,"//").concat(a).concat(f).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(a).concat(f).concat(c).concat(u)}:t,n=e.parseURL,i=void 0===n?function(e){var t=e.qsModule,r=e.location;return t.parse(r.search.slice(1),{arrayLimit:99})}:n,a=e.writeDelay,o=void 0===a?400:a,s=e.windowTitle,c=e.getLocation,u=void 0===c?function(){return te((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.")}})}:c,l=e.start,f=e.dispose,h=e.push;return new ir({createURL:r,parseURL:i,writeDelay:o,windowTitle:s,getLocation:u,start:l,dispose:f,push:h})}function or(e){return or="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},or(e)}var sr=["configure"];function cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ur(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(r),!0).forEach((function(t){lr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function lr(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==or(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===or(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fr(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function hr(e){e.configure;return fr(e,sr)}function pr(e){return pr="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},pr(e)}function dr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(r),!0).forEach((function(t){yr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function yr(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==pr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==pr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===pr(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var gr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,r=void 0===t?ar():t,n=e.stateMapping,i=void 0===n?{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce((function(t,r){return ur(ur({},t),{},lr({},r,hr(e[r])))}),{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){return ur(ur({},t),{},lr({},r,hr(e[r])))}),{})}}:n,a=e.$$internal,o=void 0!==a&&a;return function(e){var t=e.instantSearchInstance;t._createURL=function(e){var n=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),a=Object.keys(e).reduce((function(t,r){return mr(mr({},t),{},yr({},r,e[r]))}),n),o=i.stateToRoute(a);return r.createURL(o)};var n=void 0,a=t._initialUiState;return{$$type:"ais.router({router:".concat(r.$$type||"__unknown__",", stateMapping:").concat(i.$$type||"__unknown__","})"),$$internal:o,onStateChange:function(e){var t=e.uiState,a=i.stateToRoute(t);void 0!==n&&ee(n,a)||(r.write(a),n=a)},subscribe:function(){t._initialUiState=mr(mr({},a),i.routeToState(r.read())),r.onUpdate((function(e){t.mainIndex.getWidgets().length>0&&t.setUiState(i.routeToState(e))}))},started:function(){var e;null===(e=r.start)||void 0===e||e.call(r)},unsubscribe:function(){r.dispose()}}}};function vr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.map((function(e){return r=(t=e).name,n=t.connector,["https://www.algolia.com/doc/api-reference/widgets/",r,"/js/",void 0!==n&&n?"#connector":""].join("");var t,r,n})).join(", ");return function(e){return[e,"See documentation: ".concat(n)].filter(Boolean).join("\n\n")}}function br(e){return"ais.index"===e.$$type}function Or(e,t){if(!Array.isArray(e))return-1;for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1}function wr(e){return e.filter((function(e,t,r){return r.indexOf(e)===t}))}function _r(e){return _r="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},_r(e)}var Sr=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function jr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jr(Object(r),!0).forEach((function(t){Rr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Rr(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==_r(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===_r(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Er(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var xr=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce((function(e,t){var r=Or(e,(function(e){return e.name===t.name}));if(-1===r)return e.concat(t);var n=e.slice();return n.splice(r,1,t),n}),e.hierarchicalFacets)})},Fr=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t){var r=function(e,t){return e.setQueryParameters({hierarchicalFacetsRefinements:Pr(Pr({},e.hierarchicalFacetsRefinements),t.hierarchicalFacetsRefinements)})}(e,t),n=function(e,t){return t.tagRefinements.reduce((function(e,t){return e.addTagRefinement(t)}),e)}(xr(r,t),t),i=function(e,t){return e.setQueryParameters({numericRefinements:Pr(Pr({},e.numericRefinements),t.numericRefinements)})}(n,t),a=function(e,t){return e.setQueryParameters({disjunctiveFacetsRefinements:Pr(Pr({},e.disjunctiveFacetsRefinements),t.disjunctiveFacetsRefinements)})}(i,t),o=function(e,t){return e.setQueryParameters({facetsExcludes:Pr(Pr({},e.facetsExcludes),t.facetsExcludes)})}(a,t),s=function(e,t){return e.setQueryParameters({facetsRefinements:Pr(Pr({},e.facetsRefinements),t.facetsRefinements)})}(o,t),c=function(e,t){return t.disjunctiveFacets.reduce((function(e,t){return e.addDisjunctiveFacet(t)}),e)}(s,t),u=function(e,t){var r=wr([].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean));return r.length>0?e.setQueryParameters({ruleContexts:r}):e}(c,t),l=function(e,t){return t.facets.reduce((function(e,t){return e.addFacet(t)}),e)}(u,t);return function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var r=Er(t,Sr);return e.setQueryParameters(r)}(l,t)}))};function Tr(e){for(var t=e.getParent(),r=[e.getHelper().state];null!==t;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}function Nr(e){return Nr="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},Nr(e)}var kr=["initialSearchParameters"];function Ir(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Cr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ir(Object(r),!0).forEach((function(t){Ar(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ar(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Nr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Nr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Nr(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dr(e){return function(e){if(Array.isArray(e))return Hr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Hr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hr(e,t)}(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 Hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Lr(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Ur=vr({name:"index-widget"});function Mr(e,t){var r=t.state,n=t.isPageReset,i=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:n,_uiState:i}))}function qr(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce((function(e,r){return br(r)?e:r.getWidgetUiState||r.getWidgetState?r.getWidgetUiState?r.getWidgetUiState(e,t):r.getWidgetState(e,t):e}),r)}function Qr(e,t){var r=t.initialSearchParameters,n=Lr(t,kr);return e.filter((function(e){return!br(e)})).reduce((function(e,t){return t.getWidgetSearchParameters?t.getWidgetSearchParameters(e,n):e}),r)}function Wr(e){var t=e.filter(br);0!==t.length&&t.forEach((function(e){var t=e.getHelper();Mr(t,{state:t.state.resetPage(),isPageReset:!0}),Wr(e.getWidgets())}))}function $r(e){return e.filter(br).reduce((function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(Dr($r(t.getWidgets()))))}),[])}var Br=function(t){if(void 0===t||void 0===t.indexName)throw new Error(Ur("The `indexName` option is required."));var r=t.indexName,n=t.indexId,i=void 0===n?r:n,a=[],o={},s=null,c=null,u=null,l=null,f=null;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return r},getIndexId:function(){return i},getHelper:function(){return u},getResults:function(){var e;return null!==(e=l)&&void 0!==e&&e.lastResults?(l.lastResults._state=u.state,l.lastResults):null},getPreviousState:function(){return f},getScopedResults:function(){var e=this.getParent();return $r(e?e.getWidgets():[this])},getParent:function(){return c},createURL:function(e){return"function"==typeof e?s._createURL(Ar({},i,e(o))):s._createURL(Ar({},i,qr(a,{searchParameters:e,helper:u})))},getWidgets:function(){return a},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Ur("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(Ur("The widget definition expects a `render` and/or an `init` method."));return a=a.concat(e),s&&Boolean(e.length)&&(Mr(u,{state:Qr(a,{uiState:o,initialSearchParameters:u.state}),_uiState:o}),e.forEach((function(e){e.getRenderState&&Vr({renderState:e.getRenderState(s.renderState[t.getIndexId()]||{},wt(s,t,s._initialUiState)),instantSearchInstance:s,parent:t})})),e.forEach((function(e){e.init&&e.init(wt(s,t,s._initialUiState))})),s.scheduleSearch()),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Ur("The `removeWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.dispose})))throw new Error(Ur("The widget definition expects a `dispose` method."));if(a=a.filter((function(t){return-1===e.indexOf(t)})),s&&Boolean(e.length)){var r=e.reduce((function(e,r){return r.dispose({helper:u,state:e,parent:t})||e}),u.state);o=qr(a,{searchParameters:r,helper:u}),u.setState(Qr(a,{uiState:o,initialSearchParameters:r})),a.length&&s.scheduleSearch()}return this},init:function(t){var n,h=this,p=t.instantSearchInstance,d=t.parent,m=t.uiState;if(null===u){s=p,c=d,o=m[i]||{};var y=p.mainHelper,g=Qr(a,{uiState:o,initialSearchParameters:new(e(fe).SearchParameters)({index:r})});(u=e(fe)({},g.index,g)).search=function(){return p.onStateChange?(p.onStateChange({uiState:p.mainIndex.getWidgetUiState({}),setUiState:function(e){return p.setUiState(e,!1)}}),y):y.search()},u.searchWithoutTriggeringOnStateChange=function(){return y.search()},u.searchForFacetValues=function(e,t,r,n){var i=u.state.setQueryParameters(n);return y.searchForFacetValues(e,t,r,i)},l=y.derive((function(){return Fr.apply(void 0,Dr(Tr(h)))}));var v=null===(n=p._initialResults)||void 0===n?void 0:n[this.getIndexId()];if(v){var b=new(e(fe).SearchResults)(new(e(fe).SearchParameters)(v.state),v.results);l.lastResults=b,u.lastResults=b}u.on("change",(function(e){e.isPageReset&&Wr(a)})),l.on("search",(function(){p.scheduleStalledRender()})),l.on("result",(function(e){var t=e.results;p.scheduleRender(),u.lastResults=t,f=null==t?void 0:t._state})),a.forEach((function(e){e.getRenderState&&Vr({renderState:e.getRenderState(p.renderState[h.getIndexId()]||{},wt(p,h,m)),instantSearchInstance:p,parent:h})})),a.forEach((function(e){e.init&&e.init(wt(p,h,m))})),u.on("change",(function(e){var t=e.state,r=e._uiState;o=qr(a,{searchParameters:t,helper:u},r||{}),p.onStateChange||p.onInternalStateChange()})),v&&p.scheduleRender()}},render:function(e){var t=this,r=e.instantSearchInstance;"error"===r.status&&!r.mainHelper.hasPendingRequests()&&f&&u.setState(f);var n=this.getResults()?a:a.filter(br);n.forEach((function(e){e.getRenderState&&Vr({renderState:e.getRenderState(r.renderState[t.getIndexId()]||{},_t(r,t)),instantSearchInstance:r,parent:t})})),n.forEach((function(e){e.render&&e.render(_t(r,t))}))},dispose:function(){var e,t,r=this;a.forEach((function(e){e.dispose&&e.dispose({helper:u,state:u.state,parent:r})})),s=null,c=null,null===(e=u)||void 0===e||e.removeAllListeners(),u=null,null===(t=l)||void 0===t||t.detach(),l=null},getWidgetUiState:function(e){return a.filter(br).reduce((function(e,t){return t.getWidgetUiState(e)}),Cr(Cr({},e),{},Ar({},i,Cr(Cr({},e[i]),o))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var r=t.uiState;return Qr(a,{uiState:r,initialSearchParameters:e})},refreshUiState:function(){o=qr(a,{searchParameters:this.getHelper().state,helper:this.getHelper()},o)},setIndexUiState:function(e){var t="function"==typeof e?e(o):e;s.setUiState((function(e){return Cr(Cr({},e),{},Ar({},i,t))}))}}};function Vr(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=Cr(Cr({},r.renderState),{},Ar({},i,Cr(Cr({},r.renderState[i]),t)))}function Kr(e,t){return e.toLocaleString(t)}function Jr(e){return Jr="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},Jr(e)}function zr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zr(Object(r),!0).forEach((function(t){Gr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Gr(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Jr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Jr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Jr(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xr(e){var t=e.numberLocale;return{formatNumber:function(e,r){return Kr(Number(r(e)),t)},highlight:function(e,t){try{return t(k(Yr(Yr({},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(J(Yr(Yr({},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(X(Yr(Yr({},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(Y(Yr(Yr({},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 r=JSON.parse(e),n=r.method,i=r.payload;return t(H(n,Yr({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" } }')}}}}var Zr=Promise.resolve();function en(e){var t=null,r=!1,n=function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];null===t&&(t=Zr.then((function(){t=null,r?r=!1:e.apply(void 0,i)})))};return n.wait=function(){if(null===t)throw new Error("The deferred function should be called before calling `wait()`");return t},n.cancel=function(){null!==t&&(r=!0)},n}function tn(e,t){var r=e[t.getIndexId()]||{};t.getHelper().setState(t.getWidgetSearchParameters(t.getHelper().state,{uiState:r})),t.getWidgets().filter(br).forEach((function(t){return tn(e,t)}))}var rn="4.56.11";function nn(e){return nn="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},nn(e)}function an(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function on(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hn(n.key),n)}}function sn(e,t){return sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sn(e,t)}function cn(e){var t=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 r,n=ln(e);if(t){var i=ln(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return un(e)}(this,r)}}function un(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ln(e){return ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ln(e)}function fn(e,t,r){return(t=hn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hn(e){var t=function(e,t){if("object"!==nn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===nn(t)?t:String(t)}var pn=vr({name:"instantsearch"});function dn(){return"#"}var mn=function(t){!function(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&&sn(e,t)}(o,(0,e(oe)));var r,n,i,a=cn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),fn(un(t=a.call(this)),"client",void 0),fn(un(t),"indexName",void 0),fn(un(t),"insightsClient",void 0),fn(un(t),"onStateChange",null),fn(un(t),"helper",void 0),fn(un(t),"mainHelper",void 0),fn(un(t),"mainIndex",void 0),fn(un(t),"started",void 0),fn(un(t),"templatesConfig",void 0),fn(un(t),"renderState",{}),fn(un(t),"_stalledSearchDelay",void 0),fn(un(t),"_searchStalledTimer",void 0),fn(un(t),"_initialUiState",void 0),fn(un(t),"_initialResults",void 0),fn(un(t),"_createURL",void 0),fn(un(t),"_searchFunction",void 0),fn(un(t),"_mainHelperSearch",void 0),fn(un(t),"middleware",[]),fn(un(t),"sendEventToInsights",void 0),fn(un(t),"status","idle"),fn(un(t),"error",void 0),fn(un(t),"scheduleSearch",en((function(){t.started&&t.mainHelper.search()}))),fn(un(t),"scheduleRender",en((function(){var e,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];null!==(e=t.mainHelper)&&void 0!==e&&e.hasPendingRequests()||(clearTimeout(t._searchStalledTimer),t._searchStalledTimer=null,r&&(t.status="idle",t.error=void 0)),t.mainIndex.render({instantSearchInstance:un(t)}),t.emit("render")}))),fn(un(t),"onInternalStateChange",en((function(){var e=t.mainIndex.getWidgetUiState({});t.middleware.forEach((function(t){t.instance.onStateChange({uiState:e})}))}))),t.setMaxListeners(100);var r=e.indexName,n=void 0===r?"":r,i=e.numberLocale,s=e.initialUiState,c=void 0===s?{}:s,u=e.routing,l=void 0===u?null:u,f=e.insights,h=void 0!==f&&f,p=e.searchFunction,d=e.stalledSearchDelay,m=void 0===d?200:d,y=e.searchClient,g=void 0===y?null:y,v=e.insightsClient,b=void 0===v?null:v,O=e.onStateChange,w=void 0===O?null:O;if(null===g)throw new Error(pn("The `searchClient` option is required."));if("function"!=typeof g.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 g.addAlgoliaAgent&&g.addAlgoliaAgent("instantsearch.js (".concat(rn,")")),b&&"function"!=typeof b)throw new Error(pn("The `insightsClient` option should be a function."));if(t.client=g,t.insightsClient=b,t.indexName=n,t.helper=null,t.mainHelper=null,t.mainIndex=Br({indexName:n}),t.onStateChange=w,t.started=!1,t.templatesConfig={helpers:Xr({numberLocale:i}),compileOptions:{}},t._stalledSearchDelay=m,t._searchStalledTimer=null,t._createURL=dn,t._initialUiState=c,t._initialResults=null,p&&(t._searchFunction=p),t.sendEventToInsights=ct,l){var _="boolean"==typeof l?{}:l;_.$$internal=!0,t.use(gr(_))}if(h){var S="boolean"==typeof h?{}:h;S.$$internal=!0,t.use(bt(S))}return te((function(e){var t,r;return(null===(t=e.window.navigator)||void 0===t||null===(r=t.userAgent)||void 0===r?void 0:r.indexOf("Algolia Crawler"))>-1}),{fallback:function(){return!1}})&&t.use(jt({$$internal:!0})),t}return r=o,n=[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.map((function(t){var r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?an(Object(r),!0).forEach((function(t){fn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):an(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({$$type:"__unknown__",$$internal:!1,subscribe:ct,started:ct,unsubscribe:ct,onStateChange:ct},t({instantSearchInstance:e}));return e.middleware.push({creator:t,instance:r}),r}));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),r=0;r<e;r++)t[r]=arguments[r];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(pn("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(pn("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(pn("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));if(e.some((function(e){return"function"!=typeof e.dispose})))throw new Error(pn("The widget definition expects a `dispose` method."));return this.mainIndex.removeWidgets(e),this}},{key:"start",value:function(){var t=this;if(this.started)throw new Error(pn("The `start` method has already been called once."));var r=this.mainHelper||e(fe)(this.client,this.indexName);if(r.search=function(){return t.status="loading",t.scheduleRender(!1),r.searchOnlyWithDerivedHelpers()},this._searchFunction){var n={search:function(){return new Promise(ct)}};this._mainHelperSearch=r.search.bind(r),r.search=function(){var i=t.mainIndex.getHelper(),a=e(fe)(n,i.state.index,i.state);return a.once("search",(function(e){var r=e.state;i.overrideStateWithoutTriggeringChangeEvent(r),t._mainHelperSearch()})),a.on("change",(function(e){var t=e.state;i.setState(t)})),t._searchFunction(a),r}}if(r.on("error",(function(e){var r=e.error;if(!(r instanceof Error)){var n=r;r=Object.keys(n).reduce((function(e,t){return e[t]=n[t],e}),new Error(n.message))}r.error=r,t.error=r,t.status="error",t.scheduleRender(!1),t.emit("error",r)})),this.mainHelper=r,this.middleware.forEach((function(e){e.instance.subscribe()})),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){var i=this.scheduleSearch;this.scheduleSearch=en(ct),en((function(){t.scheduleSearch=i}))()}else this.mainIndex.getWidgets().length>0&&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)||void 0===e||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,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(pn("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&r?this.onStateChange({uiState:n,setUiState:function(e){tn("function"==typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(tn(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw new Error(pn("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(pn("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}],n&&on(r.prototype,n),i&&on(r,i),Object.defineProperty(r,"prototype",{writable:!1}),o}(),yn=mn,gn=function(e,t){return e},vn=function(e){return new yn(e)};vn.version=rn,vn.createInfiniteHitsSessionStorageCache=gn((function(){return{read:function(e){var t=e.state,r=te((function(e){return e.window.sessionStorage}));if(!r)return null;try{var n=JSON.parse(r.getItem(ae));return n&&ee(n.state,ie(t))?n.hits:null}catch(e){if(e instanceof SyntaxError)try{r.removeItem(ae)}catch(e){}return null}},write:function(e){var t=e.state,r=e.hits,n=te((function(e){return e.window.sessionStorage}));if(n)try{n.setItem(ae,JSON.stringify({state:ie(t),hits:r}))}catch(e){}}}})),vn.highlight=gn(k),vn.reverseHighlight=gn(J),vn.snippet=gn(X),vn.reverseSnippet=gn(Y),vn.insights=H,vn.getInsightsAnonymousUserToken=function(){return c()},Object.defineProperty(vn,"widgets",{get:function(){throw new ReferenceError("\"instantsearch.widgets\" are not available from the ES build.\n\nTo import the widgets:\n\nimport { searchBox } from 'instantsearch.js/es/widgets'")}}),Object.defineProperty(vn,"connectors",{get:function(){throw new ReferenceError("\"instantsearch.connectors\" are not available from the ES build.\n\nTo import the connectors:\n\nimport { connectSearchBox } from 'instantsearch.js/es/connectors'")}});function bn(e){return bn="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},bn(e)}function On(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?On(Object(r),!0).forEach((function(t){_n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):On(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==bn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===bn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Sn=vr({name:"configure",connector:!0});function jn(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce((function(e,t){return wn(wn({},e),{},_n({},t,void 0))}),{}))}var Pn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct;return function(n){if(!n||!O(n.searchParameters))throw new Error(Sn("The `searchParameters` option expects an object."));var i={};return{$$type:"ais.configure",init:function(e){var r=e.instantSearchInstance;t(wn(wn({},this.getWidgetRenderState(e)),{},{instantSearchInstance:r}),!0)},render:function(e){var r=e.instantSearchInstance;t(wn(wn({},this.getWidgetRenderState(e)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var t=e.state;return r(),jn(t,n)},getRenderState:function(t,r){var n,i=this.getWidgetRenderState(r);return wn(wn({},t),{},{configure:wn(wn({},i),{},{widgetParams:wn(wn({},i.widgetParams),{},{searchParameters:Fr(new(e(fe).SearchParameters)(null===(n=t.configure)||void 0===n?void 0:n.widgetParams.searchParameters),new(e(fe).SearchParameters)(i.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(t){var r=t.helper;return i.refine||(i.refine=function(t){return function(r){var i=jn(t.state,n),a=Fr(i,new(e(fe).SearchParameters)(r));n.searchParameters=r,t.setState(a).search()}}(r)),{refine:i.refine,widgetParams:n}},getWidgetSearchParameters:function(t,r){var i=r.uiState;return Fr(t,new(e(fe).SearchParameters)(wn(wn({},i.configure),n.searchParameters)))},getWidgetUiState:function(e){return wn(wn({},e),{},{configure:wn(wn({},e.configure),n.searchParameters)})}}}};function Rn(e){return Rn="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},Rn(e)}function En(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?En(Object(r),!0).forEach((function(t){Fn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):En(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Fn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Rn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Rn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t){return Array.isArray(t)?e.concat(t):e.concat([t])}),[]).filter(Boolean).join(" ")}var Nn,kn,In,Cn,An,Dn,Hn,Ln={},Un=[],Mn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,qn=Array.isArray;function Qn(e,t){for(var r in t)e[r]=t[r];return e}function Wn(e){var t=e.parentNode;t&&t.removeChild(e)}function $n(e,t,r){var n,i,a,o={};for(a in t)"key"==a?n=t[a]:"ref"==a?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Nn.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===o[a]&&(o[a]=e.defaultProps[a]);return Bn(e,o,n,i,null)}function Bn(e,t,r,n,i){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++In:i};return null==i&&null!=kn.vnode&&kn.vnode(a),a}function Vn(e){return e.children}function Kn(e,t){this.props=e,this.context=t}function Jn(e,t){if(null==t)return e.__?Jn(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?Jn(e):null}function zn(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return zn(e)}}function Yn(e){(!e.__d&&(e.__d=!0)&&Cn.push(e)&&!Gn.__r++||An!==kn.debounceRendering)&&((An=kn.debounceRendering)||Dn)(Gn)}function Gn(){var e,t,r,n,i,a,o,s,c;for(Cn.sort(Hn);e=Cn.shift();)e.__d&&(t=Cn.length,n=void 0,i=void 0,a=void 0,s=(o=(r=e).__v).__e,(c=r.__P)&&(n=[],i=[],(a=Qn({},o)).__v=o.__v+1,oi(c,o,a,r.__n,void 0!==c.ownerSVGElement,null!=o.__h?[s]:null,n,null==s?Jn(o):s,o.__h,i),si(n,o,i),o.__e!=s&&zn(o)),Cn.length>t&&Cn.sort(Hn));Gn.__r=0}function Xn(e,t,r,n,i,a,o,s,c,u,l){var f,h,p,d,m,y,g,v,b,O=0,w=n&&n.__k||Un,_=w.length,S=_,j=t.length;for(r.__k=[],f=0;f<j;f++)null!=(d=r.__k[f]=null==(d=t[f])||"boolean"==typeof d||"function"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?Bn(null,d,null,null,d):qn(d)?Bn(Vn,{children:d},null,null,null):d.__b>0?Bn(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)?(d.__=r,d.__b=r.__b+1,-1===(v=ti(d,w,g=f+O,S))?p=Ln:(p=w[v]||Ln,w[v]=void 0,S--),oi(e,d,p,i,a,o,s,c,u,l),m=d.__e,(h=d.ref)&&p.ref!=h&&(p.ref&&ci(p.ref,null,d),l.push(h,d.__c||m,d)),null!=m&&(null==y&&(y=m),(b=p===Ln||null===p.__v)?-1==v&&O--:v!==g&&(v===g+1?O++:v>g?S>j-g?O+=v-g:O--:O=v<g&&v==g-1?v-g:0),g=f+O,"function"!=typeof d.type||v===g&&p.__k!==d.__k?"function"==typeof d.type||v===g&&!b?void 0!==d.__d?(c=d.__d,d.__d=void 0):c=m.nextSibling:c=ei(e,m,c):c=Zn(d,c,e),"function"==typeof r.type&&(r.__d=c))):(p=w[f])&&null==p.key&&p.__e&&(p.__e==c&&(c=Jn(p)),ui(p,p,!1),w[f]=null);for(r.__e=y,f=_;f--;)null!=w[f]&&("function"==typeof r.type&&null!=w[f].__e&&w[f].__e==r.__d&&(r.__d=w[f].__e.nextSibling),ui(w[f],w[f]))}function Zn(e,t,r){for(var n,i=e.__k,a=0;i&&a<i.length;a++)(n=i[a])&&(n.__=e,t="function"==typeof n.type?Zn(n,t,r):ei(r,n.__e,t));return t}function ei(e,t,r){return null==r||r.parentNode!==e?e.insertBefore(t,null):t==r&&null!=t.parentNode||e.insertBefore(t,r),t.nextSibling}function ti(e,t,r,n){var i=e.key,a=e.type,o=r-1,s=r+1,c=t[r];if(null===c||c&&i==c.key&&a===c.type)return r;if(n>(null!=c?1:0))for(;o>=0||s<t.length;){if(o>=0){if((c=t[o])&&i==c.key&&a===c.type)return o;o--}if(s<t.length){if((c=t[s])&&i==c.key&&a===c.type)return s;s++}}return-1}function ri(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||Mn.test(t)?r:r+"px"}function ni(e,t,r,n,i){var a;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||ri(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||ri(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])a=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?n||e.addEventListener(t,a?ai:ii,a):e.removeEventListener(t,a?ai:ii,a);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function ii(e){return this.l[e.type+!1](kn.event?kn.event(e):e)}function ai(e){return this.l[e.type+!0](kn.event?kn.event(e):e)}function oi(e,t,r,n,i,a,o,s,c,u){var l,f,h,p,d,m,y,g,v,b,O,w,_,S,j,P=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(c=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(l=kn.__b)&&l(t);e:if("function"==typeof P)try{if(g=t.props,v=(l=P.contextType)&&n[l.__c],b=l?v?v.props.value:l.__:n,r.__c?y=(f=t.__c=r.__c).__=f.__E:("prototype"in P&&P.prototype.render?t.__c=f=new P(g,b):(t.__c=f=new Kn(g,b),f.constructor=P,f.render=li),v&&v.sub(f),f.props=g,f.state||(f.state={}),f.context=b,f.__n=n,h=f.__d=!0,f.__h=[],f._sb=[]),null==f.__s&&(f.__s=f.state),null!=P.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=Qn({},f.__s)),Qn(f.__s,P.getDerivedStateFromProps(g,f.__s))),p=f.props,d=f.state,f.__v=t,h)null==P.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==P.getDerivedStateFromProps&&g!==p&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(g,b),!f.__e&&(null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(g,f.__s,b)||t.__v===r.__v)){for(t.__v!==r.__v&&(f.props=g,f.state=f.__s,f.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),O=0;O<f._sb.length;O++)f.__h.push(f._sb[O]);f._sb=[],f.__h.length&&o.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(g,f.__s,b),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(p,d,m)}))}if(f.context=b,f.props=g,f.__P=e,f.__e=!1,w=kn.__r,_=0,"prototype"in P&&P.prototype.render){for(f.state=f.__s,f.__d=!1,w&&w(t),l=f.render(f.props,f.state,f.context),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[]}else do{f.__d=!1,w&&w(t),l=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++_<25);f.state=f.__s,null!=f.getChildContext&&(n=Qn(Qn({},n),f.getChildContext())),h||null==f.getSnapshotBeforeUpdate||(m=f.getSnapshotBeforeUpdate(p,d)),Xn(e,qn(j=null!=l&&l.type===Vn&&null==l.key?l.props.children:l)?j:[j],t,r,n,i,a,o,s,c,u),f.base=t.__e,t.__h=null,f.__h.length&&o.push(f),y&&(f.__E=f.__=null)}catch(e){t.__v=null,(c||null!=a)&&(t.__e=s,t.__h=!!c,a[a.indexOf(s)]=null),kn.__e(e,t,r)}else null==a&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,n,i,a,o,s,c){var u,l,f,h=r.props,p=t.props,d=t.type,m=0;if("svg"===d&&(i=!0),null!=a)for(;m<a.length;m++)if((u=a[m])&&"setAttribute"in u==!!d&&(d?u.localName===d:3===u.nodeType)){e=u,a[m]=null;break}if(null==e){if(null===d)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),a=null,s=!1}if(null===d)h===p||s&&e.data===p||(e.data=p);else{if(a=a&&Nn.call(e.childNodes),l=(h=r.props||Ln).dangerouslySetInnerHTML,f=p.dangerouslySetInnerHTML,!s){if(null!=a)for(h={},m=0;m<e.attributes.length;m++)h[e.attributes[m].name]=e.attributes[m].value;(f||l)&&(f&&(l&&f.__html==l.__html||f.__html===e.innerHTML)||(e.innerHTML=f&&f.__html||""))}if(function(e,t,r,n,i){var a;for(a in r)"children"===a||"key"===a||a in t||ni(e,a,null,r[a],n);for(a in t)i&&"function"!=typeof t[a]||"children"===a||"key"===a||"value"===a||"checked"===a||r[a]===t[a]||ni(e,a,t[a],r[a],n)}(e,p,h,i,s),f)t.__k=[];else if(Xn(e,qn(m=t.props.children)?m:[m],t,r,n,i&&"foreignObject"!==d,a,o,a?a[0]:r.__k&&Jn(r,0),s,c),null!=a)for(m=a.length;m--;)null!=a[m]&&Wn(a[m]);s||("value"in p&&void 0!==(m=p.value)&&(m!==e.value||"progress"===d&&!m||"option"===d&&m!==h.value)&&ni(e,"value",m,h.value,!1),"checked"in p&&void 0!==(m=p.checked)&&m!==e.checked&&ni(e,"checked",m,h.checked,!1))}return e}(r.__e,t,r,n,i,a,o,c,u);(l=kn.diffed)&&l(t)}function si(e,t,r){for(var n=0;n<r.length;n++)ci(r[n],r[++n],r[++n]);kn.__c&&kn.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){kn.__e(e,t.__v)}}))}function ci(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){kn.__e(e,r)}}function ui(e,t,r){var n,i;if(kn.unmount&&kn.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||ci(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){kn.__e(e,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&ui(n[i],t,r||"function"!=typeof e.type);r||null==e.__e||Wn(e.__e),e.__=e.__e=e.__d=void 0}function li(e,t,r){return this.constructor(e,r)}function fi(e,t,r){var n,i,a,o;kn.__&&kn.__(e,t),i=(n="function"==typeof r)?null:r&&r.__k||t.__k,a=[],o=[],oi(t,e=(!n&&r||t).__k=$n(Vn,null,[e]),i||Ln,Ln,void 0!==t.ownerSVGElement,!n&&r?[r]:i?null:t.firstChild?Nn.call(t.childNodes):null,a,!n&&r?r:i?i.__e:t.firstChild,n,o),si(a,e,o)}Nn=Un.slice,kn={__e:function(e,t,r,n){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&null!=a.getDerivedStateFromError&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},In=0,Kn.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Qn({},this.state),"function"==typeof e&&(e=e(Qn({},r),this.props)),e&&Qn(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),Yn(this))},Kn.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Yn(this))},Kn.prototype.render=Vn,Cn=[],Dn="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Hn=function(e,t){return e.__v.__b-t.__v.__b},Gn.__r=0;var hi=function(e){var t=e.insights,r=e.sendEvent;return function(e){var n=pi(e.target,e.currentTarget,(function(e){return e.hasAttribute("data-insights-event")}));n&&function(e){var t=e.getAttribute("data-insights-event");if("string"!=typeof t)throw new Error("The insights middleware expects `data-insights-event` to be a base64-encoded JSON string.");try{return C(t)}catch(e){throw new Error("The insights middleware was unable to parse `data-insights-event`.")}}(n).forEach((function(e){return r(e)}));var i=pi(e.target,e.currentTarget,(function(e){return e.hasAttribute("data-insights-method")&&e.hasAttribute("data-insights-payload")}));if(i){var a=D(i),o=a.method,s=a.payload;t(o,s)}}};function pi(e,t,r){for(var n=e;n&&!r(n);){if(n===t)return null;n=n.parentElement}return n}var di={},mi={};!function(e){var t=/\S/,r=/\"/g,n=/\n/g,i=/\r/g,a=/\\/g,o=/\u2028/,s=/\u2029/;function c(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function u(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function l(e,t,r){if(t.charAt(r)!=e.charAt(0))return!1;for(var n=1,i=e.length;n<i;n++)if(t.charAt(r+n)!=e.charAt(n))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(r,n){var i=r.length,a=0,o=null,s=null,f="",h=[],p=!1,d=0,m=0,y="{{",g="}}";function v(){f.length>0&&(h.push({tag:"_t",text:new String(f)}),f="")}function b(r,n){if(v(),r&&function(){for(var r=!0,n=m;n<h.length;n++)if(!(r=e.tags[h[n].tag]<e.tags._v||"_t"==h[n].tag&&null===h[n].text.match(t)))return!1;return r}())for(var i,a=m;a<h.length;a++)h[a].text&&((i=h[a+1])&&">"==i.tag&&(i.indent=h[a].text.toString()),h.splice(a,1));else n||h.push({tag:"\n"});p=!1,m=h.length}function O(e,t){var r="="+g,n=e.indexOf(r,t),i=u(e.substring(e.indexOf("=",t)+1,n)).split(" ");return y=i[0],g=i[i.length-1],n+r.length-1}for(n&&(n=n.split(" "),y=n[0],g=n[1]),d=0;d<i;d++)0==a?l(y,r,d)?(--d,v(),a=1):"\n"==r.charAt(d)?b(p):f+=r.charAt(d):1==a?(d+=y.length-1,"="==(o=(s=e.tags[r.charAt(d+1)])?r.charAt(d+1):"_v")?(d=O(r,d),a=0):(s&&d++,a=2),p=d):l(g,r,d)?(h.push({tag:o,n:u(f),otag:y,ctag:g,i:"/"==o?p-y.length:d+g.length}),f="",d+=g.length-1,a=0,"{"==o&&("}}"==g?d++:c(h[h.length-1]))):f+=r.charAt(d);return b(p,!0),h};var f={_t:!0,"\n":!0,$:!0,"/":!0};function h(t,r,n,i){var a,o=[],s=null,c=null;for(a=n[n.length-1];t.length>0;){if(c=t.shift(),a&&"<"==a.tag&&!(c.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[c.tag]<=e.tags.$||p(c,i))n.push(c),c.nodes=h(t,c.tag,n,i);else{if("/"==c.tag){if(0===n.length)throw new Error("Closing tag without opener: /"+c.n);if(s=n.pop(),c.n!=s.n&&!d(c.n,s.n,i))throw new Error("Nesting error: "+s.n+" vs. "+c.n);return s.end=c.i,o}"\n"==c.tag&&(c.last=0==t.length||"\n"==t[0].tag)}o.push(c)}if(n.length>0)throw new Error("missing closing tag: "+n.pop().n);return o}function p(e,t){for(var r=0,n=t.length;r<n;r++)if(t[r].o==e.n)return e.tag="#",!0}function d(e,t,r){for(var n=0,i=r.length;n<i;n++)if(r[n].c==e&&r[n].o==t)return!0}function m(e){var t=[];for(var r in e.partials)t.push('"'+g(r)+'":{name:"'+g(e.partials[r].name)+'", '+m(e.partials[r])+"}");return"partials: {"+t.join(",")+"}, subs: "+function(e){var t=[];for(var r in e)t.push('"'+g(r)+'": function(c,p,t,i) {'+e[r]+"}");return"{ "+t.join(",")+" }"}(e.subs)}e.stringify=function(t,r,n){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+m(t)+"}"};var y=0;function g(e){return e.replace(a,"\\\\").replace(r,'\\"').replace(n,"\\n").replace(i,"\\r").replace(o,"\\u2028").replace(s,"\\u2029")}function v(e){return~e.indexOf(".")?"d":"f"}function b(e,t){var r="<"+(t.prefix||"")+e.n+y++;return t.partials[r]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+g(r)+'",c,p,"'+(e.indent||"")+'"));',r}function O(e,t){t.code+="t.b(t.t(t."+v(e.n)+'("'+g(e.n)+'",c,p,0)));'}function w(e){return"t.b("+e+");"}e.generate=function(t,r,n){y=0;var i={code:"",subs:{},partials:{}};return e.walk(t,i),n.asString?this.stringify(i,r,n):this.makeTemplate(i,r,n)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,r){var n=this.makePartials(e);return n.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(n,t,this,r)},e.makePartials=function(e){var t,r={subs:{},partials:e.partials,name:e.name};for(t in r.partials)r.partials[t]=this.makePartials(r.partials[t]);for(t in e.subs)r.subs[t]=new Function("c","p","t","i",e.subs[t]);return r},e.codegen={"#":function(t,r){r.code+="if(t.s(t."+v(t.n)+'("'+g(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,r),r.code+="});c.pop();}"},"^":function(t,r){r.code+="if(!t.s(t."+v(t.n)+'("'+g(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,r),r.code+="};"},">":b,"<":function(t,r){var n={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,n);var i=r.partials[b(t,r)];i.subs=n.subs,i.partials=n.partials},$:function(t,r){var n={subs:{},code:"",partials:r.partials,prefix:t.n};e.walk(t.nodes,n),r.subs[t.n]=n.code,r.inPartial||(r.code+='t.sub("'+g(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=w('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+v(e.n)+'("'+g(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=w('"'+g(e.text)+'"')},"{":O,"&":O},e.walk=function(t,r){for(var n,i=0,a=t.length;i<a;i++)(n=e.codegen[t[i].tag])&&n(t[i],r);return r},e.parse=function(e,t,r){return h(e,0,[],(r=r||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,r){r=r||{};var n=e.cacheKey(t,r),i=this.cache[n];if(i){var a=i.partials;for(var o in a)delete a[o].instance;return i}return i=this.generate(this.parse(this.scan(t,r.delimiters),t,r),t,r),this.cache[n]=i}}(mi),mi.Template=i("kBwwM").Template,mi.template=mi.Template,di=mi;var yi=function(e,t,r,n){var i;t[0]=0;for(var a=1;a<t.length;a++){var o=t[a++],s=t[a]?(t[0]|=o?1:2,r[t[a++]]):t[++a];3===o?n[0]=s:4===o?n[1]=Object.assign(n[1]||{},s):5===o?(n[1]=n[1]||{})[t[++a]]=s:6===o?n[1][t[++a]]+=s+"":o?(i=e.apply(s,yi(e,s,r,["",null])),n.push(i),s[0]?t[0]|=2:(t[a-2]=0,t[a]=i)):n.push(s)}return n},gi=new Map;var vi=function(e){var t=gi.get(this);return t||(t=new Map,gi.set(this,t)),(t=yi(this,t.get(e)||(t.set(e,t=function(e){for(var t,r,n=1,i="",a="",o=[0],s=function(e){1===n&&(e||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?o.push(0,e,i):3===n&&(e||i)?(o.push(3,e,i),n=2):2===n&&"..."===i&&e?o.push(4,e,0):2===n&&i&&!e?o.push(5,0,!0,i):n>=5&&((i||!e&&5===n)&&(o.push(n,0,i,r),n=6),e&&(o.push(n,e,0,r),n=6)),i=""},c=0;c<e.length;c++){c&&(1===n&&s(),s(c));for(var u=0;u<e[c].length;u++)t=e[c][u],1===n?"<"===t?(s(),o=[o],n=3):i+=t:4===n?"--"===i&&">"===t?(n=1,i=""):i=t+i[0]:a?t===a?a="":i+=t:'"'===t||"'"===t?a=t:">"===t?(s(),n=1):n&&("="===t?(n=5,r=i,i=""):"/"===t&&(n<5||">"===e[c][u+1])?(s(),3===n&&(o=o[0]),n=o,(o=o[0]).push(2,0,n),n=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),n=2):i+=t),3===n&&"!--"===i&&(n=4,o=o[0])}return s(),o}(e)),t),arguments,[])).length>1?t:t[0]}.bind($n),bi={};function Oi(){return bi=Oi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bi.__esModule=!0,bi.default=bi,Oi.apply(this,arguments)}(bi=Oi).__esModule=!0,bi.default=bi;var wi={},_i={};(_i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}).__esModule=!0,_i.default=_i,(wi=function(e,t){if(null==e)return{};var r,n,i=_i(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}).__esModule=!0,wi.default=wi;var Si=["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"];var ji,Pi,Ri,Ei,xi=(Pi=(ji={createElement:$n,Fragment:Vn}).createElement,Ri=ji.Fragment,Ei=function(e){var t=e.createElement;return function(e){var r=e.classNames,n=e.children,i=e.highlightedTagName,a=e.isHighlighted,o=e.nonHighlightedTagName;return t(a?i:o,{className:a?r.highlighted:r.nonHighlighted},n)}}({createElement:Pi,Fragment:Ri}),function(t){var r=t.parts,n=t.highlightedTagName,i=void 0===n?"mark":n,a=t.nonHighlightedTagName,o=void 0===a?"span":a,s=t.separator,c=void 0===s?", ":s,u=t.className,l=t.classNames,f=void 0===l?{}:l,h=e(wi)(t,Si);return Pi("span",e(bi)({},h,{className:Tn(f.root,u)}),r.map((function(e,t){var n=t===r.length-1;return Pi(Ri,{key:t},e.map((function(e,t){return Pi(Ei,{key:t,classNames:f,highlightedTagName:i,nonHighlightedTagName:o,isHighlighted:e.isHighlighted},e.value)})),!n&&Pi("span",{className:f.separator},c))})))}),Fi=["classNames"];function Ti(){return Ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ti.apply(this,arguments)}function Ni(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ki(e){var t=e.classNames,r=void 0===t?{}:t,n=Ni(e,Fi);return $n(xi,Ti({classNames:{root:Tn("ais-Highlight",r.root),highlighted:Tn("ais-Highlight-highlighted",r.highlighted),nonHighlighted:Tn("ais-Highlight-nonHighlighted",r.nonHighlighted),separator:Tn("ais-Highlight-separator",r.separator)}},n))}function Ii(e){return Array.isArray(e)?e:[e]}var Ci=["hit","attribute","cssClasses"];function Ai(){return Ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ai.apply(this,arguments)}function Di(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Hi(e){var t=e.hit,r=e.attribute,n=e.cssClasses;return $n(ki,Ai({},Di(e,Ci),{parts:Ii(l(t._highlightResult,r)||[]).map((function(e){return U(v(e.value||""))})),classNames:n}))}var Li=["classNames"];function Ui(){return Ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ui.apply(this,arguments)}function Mi(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function qi(e){var t=e.classNames,r=void 0===t?{}:t,n=Mi(e,Li);return $n(xi,Ui({classNames:{root:Tn("ais-ReverseHighlight",r.root),highlighted:Tn("ais-ReverseHighlight-highlighted",r.highlighted),nonHighlighted:Tn("ais-ReverseHighlight-nonHighlighted",r.nonHighlighted),separator:Tn("ais-ReverseHighlight-separator",r.separator)}},n))}function Qi(e){return Qi="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},Qi(e)}var Wi=["hit","attribute","cssClasses"],$i=["isHighlighted"];function Bi(){return Bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bi.apply(this,arguments)}function Vi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ki(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vi(Object(r),!0).forEach((function(t){Ji(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ji(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Qi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Qi(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zi(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Yi(e){var t=e.hit,r=e.attribute,n=e.cssClasses,i=zi(e,Wi),a=Ii(l(t._highlightResult,r)||[]).map((function(e){return U(v(e.value||"")).map((function(e){var t=e.isHighlighted;return Ki(Ki({},zi(e,$i)),{},{isHighlighted:!t})}))}));return $n(qi,Bi({},i,{parts:a,classNames:n}))}var Gi=["classNames"];function Xi(){return Xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xi.apply(this,arguments)}function Zi(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ea(e){var t=e.classNames,r=void 0===t?{}:t,n=Zi(e,Gi);return $n(xi,Xi({classNames:{root:Tn("ais-ReverseSnippet",r.root),highlighted:Tn("ais-ReverseSnippet-highlighted",r.highlighted),nonHighlighted:Tn("ais-ReverseSnippet-nonHighlighted",r.nonHighlighted),separator:Tn("ais-ReverseSnippet-separator",r.separator)}},n))}function ta(e){return ta="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},ta(e)}var ra=["hit","attribute","cssClasses"],na=["isHighlighted"];function ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ia.apply(this,arguments)}function aa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function oa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?aa(Object(r),!0).forEach((function(t){sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function sa(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==ta(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ta(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ta(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ca(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ua(e){var t=e.hit,r=e.attribute,n=e.cssClasses,i=ca(e,ra),a=Ii(l(t._snippetResult,r)||[]).map((function(e){return U(v(e.value||"")).map((function(e){var t=e.isHighlighted;return oa(oa({},ca(e,na)),{},{isHighlighted:!t})}))}));return $n(ea,ia({},i,{parts:a,classNames:n}))}var la=["classNames"];function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fa.apply(this,arguments)}function ha(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function pa(e){var t=e.classNames,r=void 0===t?{}:t,n=ha(e,la);return $n(xi,fa({classNames:{root:Tn("ais-Snippet",r.root),highlighted:Tn("ais-Snippet-highlighted",r.highlighted),nonHighlighted:Tn("ais-Snippet-nonHighlighted",r.nonHighlighted),separator:Tn("ais-Snippet-separator",r.separator)}},n))}var da=["hit","attribute","cssClasses"];function ma(){return ma=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ma.apply(this,arguments)}function ya(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ga(e){var t=e.hit,r=e.attribute,n=e.cssClasses;return $n(pa,ma({},ya(e,da),{parts:Ii(l(t._snippetResult,r)||[]).map((function(e){return U(v(e.value||""))})),classNames:n}))}function va(e){return va="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},va(e)}function ba(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ba(Object(r),!0).forEach((function(t){wa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ba(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wa(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==va(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==va(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===va(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _a(t){var r=t.templates,n=t.templateKey,i=t.compileOptions,a=t.helpers,o=t.data,s=t.bindEvent,c=t.sendEvent,u=r[n];if("string"!=typeof u&&"function"!=typeof u)throw new Error("Template must be 'string' or 'function', was '".concat(va(u),"' (key: ").concat(n,")"));if("function"==typeof u){var l=s||{};return l.html=vi,l.sendEvent=c,l.components={Highlight:Hi,ReverseHighlight:Yi,Snippet:ga,ReverseSnippet:ua},u(o,l)}var f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return Object.keys(t).reduce((function(i,a){return Oa(Oa({},i),{},wa({},a,(function(){var i=this;return function(o){return t[a].call(n,o,(function(t){return e(di).compile(t,r).render(i)}))}})))}),{})}(a,i,o);return e(di).compile(u,i).render(Oa(Oa({},o),{},{helpers:f})).replace(/[ \n\r\t\f\xA0]+/g,(function(e){return e.replace(/(^|\xA0+)[^\xA0]+/g,"$1 ")})).trim()}function Sa(){return Sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sa.apply(this,arguments)}function ja(e){return ja="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},ja(e)}function Pa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Fa(n.key),n)}}function Ra(e,t){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ra(e,t)}function Ea(e){var t=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 r,n=xa(e);if(t){var i=xa(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===ja(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function xa(e){return xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xa(e)}function Fa(e){var t=function(e,t){if("object"!==ja(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ja(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ja(t)?t:String(t)}var Ta=function(e){!function(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&&Ra(e,t)}(a,(0,Kn));var t,r,n,i=Ea(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,(r=[{key:"shouldComponentUpdate",value:function(e){return!ee(this.props.data,e.data)||this.props.templateKey!==e.templateKey||!ee(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:{},r=_a({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===r?null:"object"===ja(r)?$n(e,this.props.rootProps,r):$n(e,Sa({},this.props.rootProps,{dangerouslySetInnerHTML:{__html:r}}))}}])&&Pa(t.prototype,r),n&&Pa(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}();!function(e,t,r){(t=Fa(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(Ta,"defaultProps",{data:{},rootTagName:"div",useCustomCompileOptions:{},templates:{},templatesConfig:{}});var Na=Ta;function ka(e){return ka="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},ka(e)}function Ia(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ca(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ia(Object(r),!0).forEach((function(t){Aa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ia(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Aa(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==ka(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ka(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ka(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Da(){return Da=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Da.apply(this,arguments)}function Ha(e){var t=e.results,r=e.hits,n=e.insights,i=e.bindEvent,a=e.sendEvent,o=e.cssClasses,s=e.templateProps,c=hi({insights:n,sendEvent:a});return 0===t.hits.length?$n(Na,Da({},s,{templateKey:"empty",rootProps:{className:Tn(o.root,o.emptyRoot),onClick:c},data:t})):$n("div",{className:o.root},$n("ol",{className:o.list},r.map((function(e,t){return $n(Na,Da({},s,{templateKey:"item",rootTagName:"li",rootProps:{className:o.item,onClick:function(t){c(t),a("click:internal",e,"Hit Clicked")},onAuxClick:function(t){c(t),a("click:internal",e,"Hit Clicked")}},key:e.objectID,data:Ca(Ca({},e),{},{get __hitIndex(){return t}}),bindEvent:i,sendEvent:a}))}))))}function La(e){return La="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},La(e)}function Ua(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ma(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ua(Object(r),!0).forEach((function(t){qa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ua(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qa(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==La(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==La(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===La(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qa(e){return Qa="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},Qa(e)}function Wa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wa(Object(r),!0).forEach((function(t){Ba(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ba(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Qa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Qa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Qa(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Va(e,t){return t?e.map((function(e){return $a($a({},e),{},{__queryID:t})})):e}function Ka(e,t){if(void 0===e||"function"!=typeof e)throw new Error("The render function is not valid (received type ".concat((r=e,Object.prototype.toString.call(r).slice(8,-1)),").\n\n").concat(t));var r}function Ja(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return za(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return za(e,t)}(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 za(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ya(e){return Ya="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},Ya(e)}function Ga(e){var t=e.index,r=e.widgetType,n=(e.methodName,e.args),i=e.instantSearchInstance;if(1===n.length&&"object"===Ya(n[0]))return[n[0]];var a=Ja(n[0].split(":"),2),o=a[0],s=a[1],c=n[1],u=n[2];if(!c)return[];if(("click"===o||"conversion"===o)&&!u)return[];var l=Array.isArray(c)?c:[c];if(0===l.length)return[];var f=l[0].__queryID,h=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n<Math.ceil(e.length/t);n++)r.push(e.slice(n*t,(n+1)*t));return r}(l),p=h.map((function(e){return e.map((function(e){return e.objectID}))})),d=h.map((function(e){return e.map((function(e){return e.__position}))}));return"view"===o?"idle"!==i.status?[]:h.map((function(e,n){return{insightsMethod:"viewedObjectIDs",widgetType:r,eventType:o,payload:{eventName:u||"Hits Viewed",index:t,objectIDs:p[n]},hits:e,eventModifier:s}})):"click"===o?h.map((function(e,n){return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:r,eventType:o,payload:{eventName:u||"Hit Clicked",index:t,queryID:f,objectIDs:p[n],positions:d[n]},hits:e,eventModifier:s}})):"conversion"===o?h.map((function(e,n){return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:r,eventType:o,payload:{eventName:u||"Hit Converted",index:t,queryID:f,objectIDs:p[n]},hits:e,eventModifier:s}})):[]}function Xa(e){var t=e.instantSearchInstance,r=e.index,n=e.widgetType,i={},a=void 0;return function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];Ga({widgetType:n,index:r,methodName:"sendEvent",args:o,instantSearchInstance:t}).forEach((function(e){"click"===e.eventType&&"internal"===e.eventModifier&&i[e.eventType]||(i[e.eventType]=!0,t.sendEventToInsights(e))})),clearTimeout(a),a=setTimeout((function(){i={}}),0)}}function Za(e){var t=e.index,r=e.widgetType,n=e.instantSearchInstance;return function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];var o=Ga({widgetType:r,index:t,methodName:"bindEvent",args:i,instantSearchInstance:n});return o.length?"data-insights-event=".concat(I(o)):""}}function eo(e){return eo="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},eo(e)}function to(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ro(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?to(Object(r),!0).forEach((function(t){no(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):to(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function no(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==eo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==eo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===eo(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var io=vr({name:"hits",connector:!0}),ao=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct;return Ka(e,io()),function(r){var n,i,a=r||{},o=a.escapeHTML,s=void 0===o||o,c=a.transformItems,u=void 0===c?function(e){return e}:c;return{$$type:"ais.hits",init:function(t){e(ro(ro({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var r=this.getWidgetRenderState(t);e(ro(ro({},r),{},{instantSearchInstance:t.instantSearchInstance}),!1),r.sendEvent("view:internal",r.hits)},getRenderState:function(e,t){return ro(ro({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,a=e.helper,o=e.instantSearchInstance;if(n||(n=Xa({instantSearchInstance:o,index:a.getIndex(),widgetType:this.$$type})),i||(i=Za({index:a.getIndex(),widgetType:this.$$type,instantSearchInstance:o})),!t)return{hits:[],results:void 0,sendEvent:n,bindEvent:i,widgetParams:r};s&&t.hits.length>0&&(t.hits=T(t.hits));var c,l,f,h=Va((c=t.hits,l=t.page,f=t.hitsPerPage,c.map((function(e,t){return Ma(Ma({},e),{},{__position:f*l+t+1})}))),t.queryID);return{hits:u(h,{results:t}),results:t,sendEvent:n,bindEvent:i,widgetParams:r}},dispose:function(e){var r=e.state;return t(),s?r.setQueryParameters(Object.keys(R).reduce((function(e,t){return ro(ro({},e),{},no({},t,void 0))}),{})):r},getWidgetSearchParameters:function(e){return s?e.setQueryParameters(R):e}}}};function oo(e){return oo="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},oo(e)}function so(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function co(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?so(Object(r),!0).forEach((function(t){uo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):so(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function uo(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==oo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==oo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===oo(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var lo=function(e){var t=e.method,r=e.results,n=e.hits,i=e.objectIDs,a=r.index,o=function(e,t){return t.map((function(t){var r=ot(e,(function(e){return e.objectID===t}));if(void 0===r)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 r}))}(n,i),s=function(e){var t=wr(e.map((function(e){return e.__queryID})));if(t.length>1)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");var r=t[0];if("string"!=typeof r)throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");return r}(o);switch(t){case"clickedObjectIDsAfterSearch":var c=function(e){return e.map((function(e){return e.__position}))}(o);return{index:a,queryID:s,objectIDs:i,positions:c};case"convertedObjectIDsAfterSearch":return{index:a,queryID:s,objectIDs:i};default:throw new Error('Unsupported method passed to insights: "'.concat(t,'".'))}};function fo(e){return function(t,r){return e((function(e,r){var n=e.results,i=e.hits,a=e.instantSearchInstance;if(n&&i&&a){var o=function(e,t,r){return function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];var s=a[0];if(!e){var c=vr({name:"instantsearch"});throw new Error(c("The `insightsClient` option has not been provided to `instantsearch`."))}if(!Array.isArray(s.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var u=lo({method:n,results:t,hits:r,objectIDs:s.objectIDs});e(n,co(co({},u),s))}}(a.insightsClient,n,i);return t(co(co({},e),{},{insights:o}),r)}return t(e,r)}),r)}}function ho(e){return ho="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},ho(e)}function po(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mo(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==ho(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ho(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ho(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yo(e){return function(e){if(Array.isArray(e))return go(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return go(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return go(e,t)}(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 go(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vo(e){var t=e.defaultTemplates,r=e.templates,n=e.templatesConfig,i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return wr([].concat(yo(Object.keys(e||{})),yo(Object.keys(t)))).reduce((function(r,n){var i=e?e[n]:void 0,a=t[n],o=void 0!==a&&a!==i;return r.templates[n]=o?a:i,r.useCustomCompileOptions[n]=o,r}),{templates:{},useCustomCompileOptions:{}})}(t,r);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?po(Object(r),!0).forEach((function(t){mo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):po(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({templatesConfig:n},i)}function bo(e){var t,r="string"==typeof e,n=r?document.querySelector(e):e;if(!((t=n)instanceof HTMLElement||Boolean(t)&&t.nodeType>0)){var i="Container must be `string` or `HTMLElement`.";throw r&&(i+=" Unable to find ".concat(e)),new Error(i)}return n}var Oo={empty:function(){return"No results"},item:function(e){return JSON.stringify((r=["__hitIndex"],null==(t=e)?t:Object.keys(t).reduce((function(e,n){if(r.indexOf(n)>=0)return e;var i=n;return e[i]=t[i],e}),{})),null,2);var t,r}};function wo(e){return wo="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},wo(e)}function _o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function So(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_o(Object(r),!0).forEach((function(t){jo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function jo(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==wo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==wo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wo(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Po=vr({name:"hits"}),Ro=u("Hits"),Eo=function(e){var t=e||{},r=t.container,n=t.escapeHTML,i=t.transformItems,a=t.templates,o=void 0===a?{}:a,s=t.cssClasses,c=void 0===s?{}:s;if(!r)throw new Error(Po("The `container` option is required."));var u=bo(r),l={root:Tn(Ro(),c.root),emptyRoot:Tn(Ro({modifierName:"empty"}),c.emptyRoot),list:Tn(Ro({descendantName:"list"}),c.list),item:Tn(Ro({descendantName:"item"}),c.item)},f=function(e){var t=e.renderState,r=e.cssClasses,n=e.containerNode,i=e.templates;return function(e,a){var o=e.hits,s=e.results,c=e.instantSearchInstance,u=e.insights,l=e.bindEvent,f=e.sendEvent;a?t.templateProps=vo({defaultTemplates:Oo,templatesConfig:c.templatesConfig,templates:i}):fi($n(Ha,{cssClasses:r,hits:o,results:s,templateProps:t.templateProps,insights:u,sendEvent:f,bindEvent:l}),n)}}({containerNode:u,cssClasses:l,renderState:{},templates:o});return So(So({},fo(ao)(f,(function(){return fi(null,u)}))({escapeHTML:n,transformItems:i})),{},{$$widgetType:"ais.hits"})};function xo(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function Fo(e){var t=e.templates,r=e.templateKey,n=e.ariaLabel,i=e.pageNumber,a=e.className,o=e.isDisabled,s=void 0!==o&&o,c=e.isSelected,u=void 0!==c&&c,l=e.cssClasses,f=e.createURL,h=e.createClickHandler;return $n("li",{className:Tn(l.item,s&&l.disabledItem,a,u&&l.selectedItem)},$n(Na,s?{rootTagName:"span",rootProps:{className:l.link,"aria-label":n},templateKey:r,templates:t,data:{page:i+1}}:{rootTagName:"a",rootProps:{className:l.link,"aria-label":n,href:f(i),onClick:h(i)},templateKey:r,templates:t,data:{page:i+1}}))}var To=function(e){function t(t){return function(r){xo(r)||(r.preventDefault(),e.setCurrentPage(t))}}return $n("div",{className:Tn(e.cssClasses.root,e.nbPages<=1&&e.cssClasses.noRefinementRoot)},$n("ul",{className:e.cssClasses.list},e.showFirst&&$n(Fo,{ariaLabel:"First",className:e.cssClasses.firstPageItem,isDisabled:e.isFirstPage,templates:e.templates,templateKey:"first",pageNumber:0,createURL:e.createURL,cssClasses:e.cssClasses,createClickHandler:t}),e.showPrevious&&$n(Fo,{ariaLabel:"Previous",className:e.cssClasses.previousPageItem,isDisabled:e.isFirstPage,templates:e.templates,templateKey:"previous",pageNumber:e.currentPage-1,createURL:e.createURL,cssClasses:e.cssClasses,createClickHandler:t}),e.pages.map((function(r){return $n(Fo,{key:r,ariaLabel:"Page ".concat(r+1),className:e.cssClasses.pageItem,isSelected:r===e.currentPage,templates:e.templates,templateKey:"page",pageNumber:r,createURL:e.createURL,cssClasses:e.cssClasses,createClickHandler:t})})),e.showNext&&$n(Fo,{ariaLabel:"Next",className:e.cssClasses.nextPageItem,isDisabled:e.isLastPage,templates:e.templates,templateKey:"next",pageNumber:e.currentPage+1,createURL:e.createURL,cssClasses:e.cssClasses,createClickHandler:t}),e.showLast&&$n(Fo,{ariaLabel:"Last",className:e.cssClasses.lastPageItem,isDisabled:e.isLastPage,templates:e.templates,templateKey:"last",pageNumber:e.nbPages-1,createURL:e.createURL,cssClasses:e.cssClasses,createClickHandler:t})))};function No(e){return function(e){if(Array.isArray(e))return ko(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ko(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ko(e,t)}(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 ko(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Io(e){var t=e.start,r=void 0===t?0:t,n=e.end,i=e.step,a=void 0===i?1:i,o=0===a?1:a,s=Math.round((n-r)/o);return No(Array(s)).map((function(e,t){return r+t*o}))}function Co(e){return Co="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},Co(e)}function Ao(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ho(n.key),n)}}function Do(e,t,r){return(t=Ho(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ho(e){var t=function(e,t){if("object"!==Co(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Co(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Co(t)?t:String(t)}var Lo=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Do(this,"currentPage",void 0),Do(this,"total",void 0),Do(this,"padding",void 0),this.currentPage=t.currentPage,this.total=t.total,this.padding=t.padding}var t,r,n;return t=e,(r=[{key:"pages",value:function(){var e=this.total,t=this.currentPage,r=this.padding;if(0===e)return[0];var n=this.nbPagesDisplayed(r,e);if(n===e)return Io({end:e});var i=this.calculatePaddingLeft(t,r,e,n);return Io({start:t-i,end:t+(n-i)})}},{key:"nbPagesDisplayed",value:function(e,t){return Math.min(2*e+1,t)}},{key:"calculatePaddingLeft",value:function(e,t,r,n){return e<=t?e:e>=r-t?n-(r-e):t}},{key:"isLastPage",value:function(){return this.currentPage===this.total-1||0===this.total}},{key:"isFirstPage",value:function(){return 0===this.currentPage}}])&&Ao(t.prototype,r),n&&Ao(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Uo(e){return Uo="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},Uo(e)}function Mo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(r),!0).forEach((function(t){Qo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Qo(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Uo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Uo(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Wo=vr({name:"pagination",connector:!0}),$o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct;return Ka(e,Wo()),function(r){var n=r||{},i=n.totalPages,a=n.padding,o=new Lo({currentPage:0,total:0,padding:void 0===a?3:a}),s={};return{$$type:"ais.pagination",init:function(t){var r=t.instantSearchInstance;e(qo(qo({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(qo(qo({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var r=e.state;return t(),r.setQueryParameter("page",void 0)},getWidgetUiState:function(e,t){var r=t.searchParameters.page||0;return r?qo(qo({},e),{},{page:r+1}):e},getWidgetSearchParameters:function(e,t){var r=t.uiState,n=r.page?r.page-1:0;return e.setQueryParameter("page",n)},getWidgetRenderState:function(e){var t=e.results,n=e.helper,a=e.state,c=e.createURL;s.refine||(s.refine=function(e){n.setPage(e),n.search()}),s.createURL||(s.createURL=function(e){return c((function(t){return qo(qo({},t),{},{page:e+1})}))});var u=a.page||0,l=function(e){var t=e.nbPages;return void 0!==i?Math.min(i,t):t}(t||{nbPages:0});return o.currentPage=u,o.total=l,{createURL:s.createURL,refine:s.refine,canRefine:l>1,currentRefinement:u,nbHits:(null==t?void 0:t.nbHits)||0,nbPages:l,pages:t?o.pages():[],isFirstPage:o.isFirstPage(),isLastPage:o.isLastPage(),widgetParams:r}},getRenderState:function(e,t){return qo(qo({},e),{},{pagination:this.getWidgetRenderState(t)})}}}};function Bo(e){return Bo="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},Bo(e)}function Vo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ko(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vo(Object(r),!0).forEach((function(t){Jo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jo(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Bo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Bo(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zo,Yo,Go,Xo,Zo=u("Pagination"),es=vr({name:"pagination"}),ts={previous:function(){return"‹"},next:function(){return"›"},page:function(e){var t=e.page;return"".concat(t)},first:function(){return"«"},last:function(){return"»"}},rs=function(e){var t=e||{},r=t.container,n=t.templates,i=void 0===n?{}:n,a=t.cssClasses,o=void 0===a?{}:a,s=t.totalPages,c=t.padding,u=t.showFirst,l=void 0===u||u,f=t.showLast,h=void 0===f||f,p=t.showPrevious,d=void 0===p||p,m=t.showNext,y=void 0===m||m,g=t.scrollTo,v=void 0===g?"body":g;if(!r)throw new Error(es("The `container` option is required."));var b=bo(r),O=!0===v?"body":v,w=!1!==O&&bo(O),_={root:Tn(Zo(),o.root),noRefinementRoot:Tn(Zo({modifierName:"noRefinement"}),o.noRefinementRoot),list:Tn(Zo({descendantName:"list"}),o.list),item:Tn(Zo({descendantName:"item"}),o.item),firstPageItem:Tn(Zo({descendantName:"item",modifierName:"firstPage"}),o.firstPageItem),lastPageItem:Tn(Zo({descendantName:"item",modifierName:"lastPage"}),o.lastPageItem),previousPageItem:Tn(Zo({descendantName:"item",modifierName:"previousPage"}),o.previousPageItem),nextPageItem:Tn(Zo({descendantName:"item",modifierName:"nextPage"}),o.nextPageItem),pageItem:Tn(Zo({descendantName:"item",modifierName:"page"}),o.pageItem),selectedItem:Tn(Zo({descendantName:"item",modifierName:"selected"}),o.selectedItem),disabledItem:Tn(Zo({descendantName:"item",modifierName:"disabled"}),o.disabledItem),link:Tn(Zo({descendantName:"link"}),o.link)},S=Ko(Ko({},ts),i),j=function(e){var t=e.containerNode,r=e.cssClasses,n=e.templates,i=e.showFirst,a=e.showLast,o=e.showPrevious,s=e.showNext,c=e.scrollToNode;return function(e,u){var l=e.createURL,f=e.currentRefinement,h=e.nbPages,p=e.pages,d=e.isFirstPage,m=e.isLastPage,y=e.refine;u||fi($n(To,{createURL:l,cssClasses:r,currentPage:f,templates:n,nbPages:h,pages:p,isFirstPage:d,isLastPage:m,setCurrentPage:function(e){y(e),!1!==c&&c.scrollIntoView()},showFirst:i,showLast:a,showPrevious:o,showNext:s}),t)}}({containerNode:b,cssClasses:_,templates:S,showFirst:l,showLast:h,showPrevious:d,showNext:y,scrollToNode:w});return Ko(Ko({},$o(j,(function(){return fi(null,b)}))({totalPages:s,padding:c})),{},{$$widgetType:"ais.pagination"})},ns=0,is=[],as=[],os=kn.__b,ss=kn.__r,cs=kn.diffed,us=kn.__c,ls=kn.unmount;function fs(e,t){kn.__h&&kn.__h(Yo,e,ns||t),ns=0;var r=Yo.__H||(Yo.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:as}),r.__[e]}function hs(e){return ns=1,function(e,t,r){var n=fs(zo++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Os(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=Yo,!Yo.u)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!a||a.call(this,e,t,r);var o=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&n.__c.props===e)&&(!a||a.call(this,e,t,r))};Yo.u=!0;var a=Yo.shouldComponentUpdate,o=Yo.componentWillUpdate;Yo.componentWillUpdate=function(e,t,r){if(this.__e){var n=a;a=void 0,i(e,t,r),a=n}o&&o.call(this,e,t,r)},Yo.shouldComponentUpdate=i}return n.__N||n.__}(Os,e)}function ps(e,t){var r=fs(zo++,7);return bs(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ds(){for(var e;e=is.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(gs),e.__H.__h.forEach(vs),e.__H.__h=[]}catch(t){e.__H.__h=[],kn.__e(t,e.__v)}}kn.__b=function(e){Yo=null,os&&os(e)},kn.__r=function(e){ss&&ss(e),zo=0;var t=(Yo=e.__c).__H;t&&(Go===Yo?(t.__h=[],Yo.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=as,e.__N=e.i=void 0}))):(t.__h.forEach(gs),t.__h.forEach(vs),t.__h=[],zo=0)),Go=Yo},kn.diffed=function(e){cs&&cs(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==is.push(t)&&Xo===kn.requestAnimationFrame||((Xo=kn.requestAnimationFrame)||ys)(ds)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==as&&(e.__=e.__V),e.i=void 0,e.__V=as}))),Go=Yo=null},kn.__c=function(e,t){t.some((function(e){try{e.__h.forEach(gs),e.__h=e.__h.filter((function(e){return!e.__||vs(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],kn.__e(r,e.__v)}})),us&&us(e,t)},kn.unmount=function(e){ls&&ls(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{gs(e)}catch(e){t=e}})),r.__H=void 0,t&&kn.__e(t,r.__v))};var ms="function"==typeof requestAnimationFrame;function ys(e){var t,r=function(){clearTimeout(n),ms&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ms&&(t=requestAnimationFrame(r))}function gs(e){var t=Yo,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),Yo=t}function vs(e){var t=Yo;e.__c=e.__(),Yo=t}function bs(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function Os(e,t){return"function"==typeof t?t(e):t}function ws(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _s(e,t)}(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 _s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ss=function(e){var t,r,n,i,a=ws(hs(e.isCollapsed),2),o=a[0],s=a[1],c=ws(hs(!1),2),u=c[0],l=c[1],f=(t=null,ns=5,ps((function(){return{current:t}}),[]));return r=function(){var t=f.current;if(t)return t.appendChild(e.bodyElement),function(){t.removeChild(e.bodyElement)}},n=[f,e.bodyElement],i=fs(zo++,3),!kn.__s&&bs(i.__H,n)&&(i.__=r,i.i=n,Yo.__H.__h.push(i)),u||e.isCollapsed===o||s(e.isCollapsed),$n("div",{className:Tn(e.cssClasses.root,e.hidden&&e.cssClasses.noRefinementRoot,e.collapsible&&e.cssClasses.collapsibleRoot,o&&e.cssClasses.collapsedRoot),hidden:e.hidden},e.templates.header&&$n("div",{className:e.cssClasses.header},$n(Na,{templates:e.templates,templateKey:"header",rootTagName:"span",data:e.data}),e.collapsible&&$n("button",{className:e.cssClasses.collapseButton,"aria-expanded":!o,onClick:function(e){e.preventDefault(),l(!0),s((function(e){return!e}))}},$n(Na,{templates:e.templates,templateKey:"collapseButtonText",rootTagName:"span",data:{collapsed:o}}))),$n("div",{className:e.cssClasses.body,ref:f}),e.templates.footer&&$n(Na,{templates:e.templates,templateKey:"footer",rootProps:{className:e.cssClasses.footer},data:e.data}))};function js(e){return js="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},js(e)}function Ps(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Rs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ps(Object(r),!0).forEach((function(t){Es(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ps(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Es(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==js(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==js(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===js(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var xs=vr({name:"panel"}),Fs=u("Panel"),Ts=function(e){var t=e||{},r=t.templates,n=void 0===r?{}:r,i=t.hidden,a=void 0===i?function(){return!1}:i,o=t.collapsed,s=t.cssClasses,c=void 0===s?{}:s,u=document.createElement("div"),l=Boolean(o),f="function"==typeof o?o:function(){return!1},h={root:Tn(Fs(),c.root),noRefinementRoot:Tn(Fs({modifierName:"noRefinement"}),c.noRefinementRoot),collapsibleRoot:Tn(Fs({modifierName:"collapsible"}),c.collapsibleRoot),collapsedRoot:Tn(Fs({modifierName:"collapsed"}),c.collapsedRoot),collapseButton:Tn(Fs({descendantName:"collapseButton"}),c.collapseButton),collapseIcon:Tn(Fs({descendantName:"collapseIcon"}),c.collapseIcon),body:Tn(Fs({descendantName:"body"}),c.body),header:Tn(Fs({descendantName:"header"}),c.header),footer:Tn(Fs({descendantName:"footer"}),c.footer)};return function(e){return function(t){if(!t||!t.container)throw new Error(xs("The `container` option is required in the widget within the panel."));var r=bo(t.container),i=function(e){var t=e.containerNode,r=e.bodyContainerNode,n=e.cssClasses,i=e.templates;return function(e){var a=e.options,o=e.hidden,s=e.collapsible,c=e.collapsed;fi($n(Ss,{cssClasses:n,hidden:o,collapsible:s,isCollapsed:c,templates:i,data:a,bodyElement:r}),t)}}({containerNode:r,bodyContainerNode:u,cssClasses:h,templates:Rs(Rs({},{collapseButtonText:function(e){var t=e.collapsed;return'<svg\n class="'.concat(h.collapseIcon,'"\n style="width: 1em; height: 1em;"\n viewBox="0 0 500 500"\n >\n <path d="').concat(t?"M100 250l300-150v300z":"M250 400l150-300H100z",'" fill="currentColor" />\n </svg>')}}),n)}),o=e(Rs(Rs({},t),{},{container:u}));return Rs(Rs({},o),{},{init:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,a=t[0],s=Rs(Rs({},o.getWidgetRenderState?o.getWidgetRenderState(a):{}),a);(i({options:s,hidden:!0,collapsible:l,collapsed:!1}),"function"==typeof o.init)&&(n=o.init).call.apply(n,[this].concat(t))},render:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,s=t[0],c=Rs(Rs({},o.getWidgetRenderState?o.getWidgetRenderState(s):{}),s);(i({options:c,hidden:Boolean(a(c)),collapsible:l,collapsed:Boolean(f(c))}),"function"==typeof o.render)&&(n=o.render).call.apply(n,[this].concat(t))},dispose:function(){if(fi(null,r),"function"==typeof o.dispose){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=o.dispose).call.apply(e,[this].concat(n))}}})}}};function Ns(e){return Ns="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},Ns(e)}function ks(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ls(n.key),n)}}function Is(e,t){return Is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Is(e,t)}function Cs(e){var t=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 r,n=Ds(e);if(t){var i=Ds(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Ns(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return As(e)}(this,r)}}function As(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ds(e){return Ds=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ds(e)}function Hs(e,t,r){return(t=Ls(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ls(e){var t=function(e,t){if("object"!==Ns(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ns(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ns(t)?t:String(t)}var Us={query:"",showSubmit:!0,showReset:!0,showLoadingIndicator:!0,autofocus:!1,searchAsYouType:!0,isSearchStalled:!1,disabled:!1,onChange:ct,onSubmit:ct,onReset:ct,refine:ct},Ms=function(e){!function(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&&Is(e,t)}(a,(0,Kn));var t,r,n,i=Cs(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hs(As(e=i.call.apply(i,[this].concat(r))),"state",{query:e.props.query,focused:!1}),Hs(As(e),"input",{current:null}),Hs(As(e),"onInput",(function(t){var r=e.props,n=r.searchAsYouType,i=r.refine,a=r.onChange,o=t.target.value;n&&i(o),e.setState({query:o}),a(t)})),Hs(As(e),"onSubmit",(function(t){var r=e.props,n=r.searchAsYouType,i=r.refine,a=r.onSubmit;return t.preventDefault(),t.stopPropagation(),e.input.current&&e.input.current.blur(),n||i(e.state.query),a(t),!1})),Hs(As(e),"onReset",(function(t){var r=e.props,n=r.refine,i=r.onReset;e.input.current&&e.input.current.focus(),n(""),e.setState({query:""}),i(t)})),Hs(As(e),"onBlur",(function(){e.setState({focused:!1})})),Hs(As(e),"onFocus",(function(){e.setState({focused:!0})})),e}return t=a,(r=[{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,r=e.placeholder,n=e.autofocus,i=e.showSubmit,a=e.showReset,o=e.showLoadingIndicator,s=e.templates,c=e.isSearchStalled;return $n("div",{className:t.root},$n("form",{action:"",role:"search",className:t.form,noValidate:!0,onSubmit:this.onSubmit,onReset:this.onReset},$n("input",{ref:this.input,value:this.state.query,disabled:this.props.disabled,className:t.input,type:"search",placeholder:r,autoFocus:n,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",maxLength:512,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus}),$n(Na,{templateKey:"submit",rootTagName:"button",rootProps:{className:t.submit,type:"submit",title:"Submit the search query.",hidden:!i},templates:s,data:{cssClasses:t}}),$n(Na,{templateKey:"reset",rootTagName:"button",rootProps:{className:t.reset,type:"reset",title:"Clear the search query.",hidden:!(a&&this.state.query.trim()&&!c)},templates:s,data:{cssClasses:t}}),o&&$n(Na,{templateKey:"loadingIndicator",rootTagName:"span",rootProps:{className:t.loadingIndicator,hidden:!c},templates:s,data:{cssClasses:t}})))}}])&&ks(t.prototype,r),n&&ks(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}();Hs(Ms,"defaultProps",Us);var qs=Ms;function Qs(){return Qs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qs.apply(this,arguments)}var Ws=function(e){var t=e.className,r=e.handleClick,n=e.facetValueToRefine,i=e.isRefined,a=e.templateProps,o=e.templateKey,s=e.templateData,c=e.subItems;return $n("li",{className:t,onClick:function(e){r({facetValueToRefine:n,isRefined:i,originalEvent:e})}},$n(Na,Qs({},a,{templateKey:o,data:s})),c)},$s=["root"];function Bs(e){return Bs="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},Bs(e)}function Vs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ks(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vs(Object(r),!0).forEach((function(t){tc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vs(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Js(){return Js=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Js.apply(this,arguments)}function zs(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ys(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,rc(n.key),n)}}function Gs(e,t){return Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gs(e,t)}function Xs(e){var t=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 r,n=ec(e);if(t){var i=ec(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Bs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Zs(e)}(this,r)}}function Zs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ec(e){return ec=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ec(e)}function tc(e,t,r){return(t=rc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rc(e){var t=function(e,t){if("object"!==Bs(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Bs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Bs(t)?t:String(t)}function nc(e){return void 0!==e.data}var ic=function(e){!function(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&&Gs(e,t)}(a,(0,Kn));var t,r,n,i=Xs(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tc(Zs(e=i.call.apply(i,[this].concat(r))),"searchBox",{current:null}),tc(Zs(e),"_generateFacetItem",(function(t){var r;if(nc(t)&&Array.isArray(t.data)&&t.data.length>0){var n=e.props.cssClasses,i=(n.root,zs(n,$s));r=$n(a,Js({},e.props,{cssClasses:i,depth:e.props.depth+1,facetValues:t.data,showMore:!1,className:e.props.cssClasses.childList}))}var o=e.props.createURL(t.value),s=Ks(Ks({},t),{},{url:o,attribute:e.props.attribute,cssClasses:e.props.cssClasses,isFromSearch:e.props.isFromSearch}),c=t.value;void 0!==t.isRefined&&(c+="/".concat(t.isRefined)),void 0!==t.count&&(c+="/".concat(t.count));var u=Tn(e.props.cssClasses.item,t.isRefined&&e.props.cssClasses.selectedItem,!t.count&&e.props.cssClasses.disabledItem,Boolean(nc(t)&&Array.isArray(t.data)&&t.data.length>0)&&e.props.cssClasses.parentItem);return $n(Ws,{templateKey:"item",key:c,facetValueToRefine:t.value,handleClick:e.handleItemClick,isRefined:t.isRefined,className:u,subItems:r,templateData:s,templateProps:e.props.templateProps})})),tc(Zs(e),"handleItemClick",(function(t){var r=t.facetValueToRefine,n=t.isRefined,i=t.originalEvent;if(!xo(i)&&i.target instanceof HTMLElement&&i.target.parentNode instanceof HTMLElement&&(!n||!i.target.parentNode.querySelector('input[type="radio"]:checked')))if("INPUT"!==i.target.tagName){for(var a=i.target;a!==i.currentTarget;){if("LABEL"===a.tagName&&(a.querySelector('input[type="checkbox"]')||a.querySelector('input[type="radio"]')))return;"A"===a.tagName&&a.href&&i.preventDefault(),a=a.parentNode}i.stopPropagation(),e.refine(r)}else e.refine(r)})),e}return t=a,(r=[{key:"shouldComponentUpdate",value:function(e){return!ee(this.props.facetValues,e.facetValues)}},{key:"refine",value:function(e){this.props.toggleRefinement(e)}},{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];if(e){var t=e.value;this.props.toggleRefinement(t)}}},{key:"render",value:function(){var e=this,t=Tn(this.props.cssClasses.showMore,!(!0===this.props.showMore&&this.props.canToggleShowMore)&&this.props.cssClasses.disabledShowMore),r=!0===this.props.showMore&&$n(Na,Js({},this.props.templateProps,{templateKey:"showMoreText",rootTagName:"button",rootProps:{className:t,disabled:!this.props.canToggleShowMore,onClick:this.props.toggleShowMore},data:{isShowingMore:this.props.isShowingMore}})),n=!0!==this.props.searchIsAlwaysActive&&!(this.props.isFromSearch||!this.props.hasExhaustiveItems),i=this.props.searchFacetValues&&$n("div",{className:this.props.cssClasses.searchBox},$n(qs,{ref:this.searchBox,placeholder:this.props.searchPlaceholder,disabled:n,cssClasses:this.props.cssClasses.searchable,templates:this.props.searchBoxTemplateProps.templates,onChange:function(t){return e.props.searchFacetValues(t.target.value)},onReset:function(){return e.props.searchFacetValues("")},onSubmit:function(){return e.refineFirstValue()},searchAsYouType:!1})),a=this.props.facetValues&&this.props.facetValues.length>0&&$n("ul",{className:this.props.cssClasses.list},this.props.facetValues.map(this._generateFacetItem,this)),o=this.props.searchFacetValues&&this.props.isFromSearch&&(!this.props.facetValues||0===this.props.facetValues.length)&&$n(Na,Js({},this.props.templateProps,{templateKey:"searchableNoResults",rootProps:{className:this.props.cssClasses.noResults}}));return $n("div",{className:Tn(this.props.cssClasses.root,(!this.props.facetValues||0===this.props.facetValues.length)&&this.props.cssClasses.noRefinementRoot,this.props.className)},this.props.children,i,a,o,r)}}])&&Ys(t.prototype,r),n&&Ys(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}();tc(ic,"defaultProps",{cssClasses:{},depth:0});var ac=ic;function oc(e,t,r){return e.state.isHierarchicalFacet(t)?e.state.isHierarchicalFacetRefined(t,r):e.state.isConjunctiveFacet(t)?e.state.isFacetRefined(t,r):e.state.isDisjunctiveFacetRefined(t,r)}function sc(e){return sc="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},sc(e)}function cc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return uc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uc(e,t)}(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 uc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lc(e){var t=e.instantSearchInstance,r=e.helper,n=e.attribute,i=e.widgetType;return function(){for(var e=arguments.length,a=new Array(e),o=0;o<e;o++)a[o]=arguments[o];var s=a[1],c=a[2],u=void 0===c?"Filter Applied":c,l=cc(a[0].split(":"),2),f=l[0],h=l[1],p="string"==typeof n?n:n(s);1===a.length&&"object"===sc(a[0])?t.sendEventToInsights(a[0]):"click"!==f||2!==a.length&&3!==a.length||oc(r,p,s)||t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:i,eventType:f,eventModifier:h,payload:{eventName:u,index:r.getIndex(),filters:["".concat(p,":").concat(s)]},attribute:p})}}function fc(e){return fc="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},fc(e)}var hc=["name","escapedValue"],pc=["escapedValue","value"];function dc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dc(Object(r),!0).forEach((function(t){yc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function yc(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==fc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==fc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===fc(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gc(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var vc=vr({name:"refinement-list",connector:!0}),bc=["isRefined","count:desc","name:asc"],Oc=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct;return Ka(e,vc()),function(r){var n=r||{},i=n.attribute,a=n.operator,o=void 0===a?"or":a,s=n.limit,c=void 0===s?10:s,u=n.showMore,l=void 0!==u&&u,f=n.showMoreLimit,h=void 0===f?20:f,p=n.sortBy,d=void 0===p?bc:p,m=n.escapeFacetValues,y=void 0===m||m,g=n.transformItems,v=void 0===g?function(e){return e}:g;if(!i)throw new Error(vc("The `attribute` option is required."));if(!/^(and|or)$/.test(o))throw new Error(vc('The `operator` must one of: `"and"`, `"or"` (got "'.concat(o,'").')));if(!0===l&&h<=c)throw new Error(vc("`showMoreLimit` should be greater than `limit`."));var b,O,w,_=function(e){var t=e.name,r=e.escapedValue;return mc(mc({},gc(e,hc)),{},{value:r,label:t,highlighted:t})},S=[],P=!0,F=!1,T=function(){};function N(){T()}function k(){return F?h:c}var I=function(){return function(){}},C=function(t,r){return function(n){return function(a){var o=n.instantSearchInstance,s=n.results;if(""===a&&S)e(mc(mc({},r.getWidgetRenderState(mc(mc({},n),{},{results:b}))),{},{instantSearchInstance:o}),!1);else{var c={highlightPreTag:y?R.highlightPreTag:E.highlightPreTag,highlightPostTag:y?R.highlightPostTag:E.highlightPostTag};t.searchForFacetValues(i,a,Math.min(k(),100),c).then((function(t){var i=y?t.facetHits.map((function(e){return j(j({},e),{},{highlighted:x(e.highlighted)})})):t.facetHits,a=v(i.map((function(e){var t=e.escapedValue,r=e.value;return mc(mc({},gc(e,pc)),{},{value:t,label:r})})),{results:s});e(mc(mc({},r.getWidgetRenderState(mc(mc({},n),{},{results:b}))),{},{items:a,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:o}),!1)}))}}}};return{$$type:"ais.refinementList",init:function(t){e(mc(mc({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(mc(mc({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return mc(mc({},e),{},{refinementList:mc(mc({},e.refinementList),{},yc({},i,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,n=e.results,a=e.state,o=e.createURL,s=e.instantSearchInstance,u=e.helper,f=[],h=[];if(w&&O&&I||(w=lc({instantSearchInstance:s,helper:u,attribute:i,widgetType:this.$$type}),O=function(e){w("click:internal",e),u.toggleFacetRefinement(i,e).search()},I=C(u,this)),n){var p=n.getFacetValues(i,{sortBy:d,facetOrdering:d===bc});h=p&&Array.isArray(p)?p:[],f=v(h.slice(0,k()).map(_),{results:n});var m=a.maxValuesPerFacet,y=k();P=m>y?h.length<=y:h.length<y,b=n,S=f,e.results&&(T=function(e,t){return function(){F=!F,t.render(e)}}(e,this))}var g=I&&I(e),j=F&&S.length>c||l&&!P;return{createURL:function(e){return o((function(r){return t.getWidgetUiState(r,{searchParameters:a.resetPage().toggleFacetRefinement(i,e),helper:u})}))},items:f,refine:O,searchForItems:g,isFromSearch:!1,canRefine:f.length>0,widgetParams:r,isShowingMore:F,canToggleShowMore:j,toggleShowMore:N,sendEvent:w,hasExhaustiveItems:P}},dispose:function(e){var r=e.state;t();var n=r.setQueryParameter("maxValuesPerFacet",void 0);return"and"===o?n.removeFacet(i):n.removeDisjunctiveFacet(i)},getWidgetUiState:function(e,t){var r=t.searchParameters,n="or"===o?r.getDisjunctiveRefinements(i):r.getConjunctiveRefinements(i);return n.length?mc(mc({},e),{},{refinementList:mc(mc({},e.refinementList),{},yc({},i,n))}):e},getWidgetSearchParameters:function(e,t){var r=t.uiState,n="or"===o;if(e.isHierarchicalFacet(i))return e;if(n&&e.isConjunctiveFacet(i)||!n&&e.isDisjunctiveFacet(i))return e;var a=r.refinementList&&r.refinementList[i],s=e.clearRefinements(i),u=n?s.addDisjunctiveFacet(i):s.addFacet(i),f=u.maxValuesPerFacet||0,p=Math.max(f,l?h:c),d=u.setQueryParameter("maxValuesPerFacet",p);if(!a){var m=n?"disjunctiveFacetsRefinements":"facetsRefinements";return d.setQueryParameters(yc({},m,mc(mc({},d[m]),{},yc({},i,[]))))}return a.reduce((function(e,t){return n?e.addDisjunctiveFacetRefinement(i,t):e.addFacetRefinement(i,t)}),d)}}}},wc=$n("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"}),_c=$n("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"}),Sc=$n("g",{fill:"none",fillRule:"evenodd"},$n("g",{transform:"translate(1 1)",strokeWidth:"2"},$n("circle",{strokeOpacity:".5",cx:"18",cy:"18",r:"18"}),$n("path",{d:"M36 18c0-9.94-8.06-18-18-18"},$n("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))),jc={reset:function(e){return $n("svg",{className:e.cssClasses.resetIcon,viewBox:"0 0 20 20",width:"10",height:"10","aria-hidden":"true"},wc)},submit:function(e){return $n("svg",{className:e.cssClasses.submitIcon,width:"10",height:"10",viewBox:"0 0 40 40","aria-hidden":"true"},_c)},loadingIndicator:function(e){return $n("svg",{className:e.cssClasses.loadingIcon,width:"16",height:"16",viewBox:"0 0 38 38",stroke:"#444","aria-hidden":"true"},Sc)}},Pc=jc,Rc={item:function(e){var t=e.cssClasses,r=e.count,n=e.value,i=e.highlighted,a=e.isRefined,o=e.isFromSearch;return $n("label",{className:Tn(t.label)},$n("input",{type:"checkbox",className:Tn(t.checkbox),value:n,defaultChecked:a}),$n("span",{className:Tn(t.labelText),dangerouslySetInnerHTML:o?{__html:i}:void 0},!o&&i),$n("span",{className:Tn(t.count)},Kr(r)))},showMoreText:function(e){return e.isShowingMore?"Show less":"Show more"},searchableNoResults:function(){return"No results"}};function Ec(e){return Ec="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},Ec(e)}function xc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xc(Object(r),!0).forEach((function(t){Tc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Tc(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Ec(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ec(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ec(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Nc=vr({name:"refinement-list"}),kc=u("RefinementList"),Ic=u("SearchBox"),Cc=function(e){var t=e||{},r=t.container,n=t.attribute,i=t.operator,a=t.sortBy,o=t.limit,s=t.showMore,c=t.showMoreLimit,u=t.searchable,l=void 0!==u&&u,f=t.searchablePlaceholder,h=void 0===f?"Search...":f,p=t.searchableEscapeFacetValues,d=void 0===p||p,m=t.searchableIsAlwaysActive,y=void 0===m||m,g=t.cssClasses,v=void 0===g?{}:g,b=t.templates,O=void 0===b?{}:b,w=t.transformItems;if(!r)throw new Error(Nc("The `container` option is required."));var _=!!l&&Boolean(d),S=bo(r),j={root:Tn(kc(),v.root),noRefinementRoot:Tn(kc({modifierName:"noRefinement"}),v.noRefinementRoot),list:Tn(kc({descendantName:"list"}),v.list),item:Tn(kc({descendantName:"item"}),v.item),selectedItem:Tn(kc({descendantName:"item",modifierName:"selected"}),v.selectedItem),searchBox:Tn(kc({descendantName:"searchBox"}),v.searchBox),label:Tn(kc({descendantName:"label"}),v.label),checkbox:Tn(kc({descendantName:"checkbox"}),v.checkbox),labelText:Tn(kc({descendantName:"labelText"}),v.labelText),count:Tn(kc({descendantName:"count"}),v.count),noResults:Tn(kc({descendantName:"noResults"}),v.noResults),showMore:Tn(kc({descendantName:"showMore"}),v.showMore),disabledShowMore:Tn(kc({descendantName:"showMore",modifierName:"disabled"}),v.disabledShowMore),searchable:{root:Tn(Ic(),v.searchableRoot),form:Tn(Ic({descendantName:"form"}),v.searchableForm),input:Tn(Ic({descendantName:"input"}),v.searchableInput),submit:Tn(Ic({descendantName:"submit"}),v.searchableSubmit),submitIcon:Tn(Ic({descendantName:"submitIcon"}),v.searchableSubmitIcon),reset:Tn(Ic({descendantName:"reset"}),v.searchableReset),resetIcon:Tn(Ic({descendantName:"resetIcon"}),v.searchableResetIcon),loadingIndicator:Tn(Ic({descendantName:"loadingIndicator"}),v.searchableLoadingIndicator),loadingIcon:Tn(Ic({descendantName:"loadingIcon"}),v.searchableLoadingIcon)}},P=function(e){var t=e.containerNode,r=e.cssClasses,n=e.templates,i=e.searchBoxTemplates,a=e.renderState,o=e.showMore,s=e.searchable,c=e.searchablePlaceholder,u=e.searchableIsAlwaysActive;return function(e,l){var f=e.refine,h=e.items,p=e.createURL,d=e.searchForItems,m=e.isFromSearch,y=e.instantSearchInstance,g=e.toggleShowMore,v=e.isShowingMore,b=e.hasExhaustiveItems,O=e.canToggleShowMore;if(l)return a.templateProps=vo({defaultTemplates:Rc,templatesConfig:y.templatesConfig,templates:n}),void(a.searchBoxTemplateProps=vo({defaultTemplates:Pc,templatesConfig:y.templatesConfig,templates:i}));fi($n(ac,{createURL:p,cssClasses:r,facetValues:h,templateProps:a.templateProps,searchBoxTemplateProps:a.searchBoxTemplateProps,toggleRefinement:f,searchFacetValues:s?d:void 0,searchPlaceholder:c,searchIsAlwaysActive:u,isFromSearch:m,showMore:o&&!m&&h.length>0,toggleShowMore:g,isShowingMore:v,hasExhaustiveItems:b,canToggleShowMore:O}),t)}}({containerNode:S,cssClasses:j,templates:O,searchBoxTemplates:{submit:O.searchableSubmit,reset:O.searchableReset,loadingIndicator:O.searchableLoadingIndicator},renderState:{},searchable:l,searchablePlaceholder:h,searchableIsAlwaysActive:y,showMore:s});return Fc(Fc({},Oc(P,(function(){return fi(null,S)}))({attribute:n,operator:i,limit:o,showMore:s,showMoreLimit:c,sortBy:a,escapeFacetValues:_,transformItems:w})),{},{$$widgetType:"ais.refinementList"})};function Ac(e){return Ac="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},Ac(e)}function Dc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Hc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dc(Object(r),!0).forEach((function(t){Lc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Lc(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Ac(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ac(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Uc=vr({name:"search-box",connector:!0}),Mc=function(e,t){return t(e)},qc=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct;return Ka(e,Uc()),function(r){var n,i,a=(r||{}).queryHook,o=void 0===a?Mc:a;return{$$type:"ais.searchBox",init:function(t){var r=t.instantSearchInstance;e(Hc(Hc({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(Hc(Hc({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var r=e.state;return t(),r.setQueryParameter("query",void 0)},getRenderState:function(e,t){return Hc(Hc({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,a=e.searchMetadata,s=e.state;return n||(n=function(e){o(e,(function(e){return t.setQuery(e).search()}))},i=function(){t.setQuery("").search()}),{query:s.query||"",refine:n,clear:i,widgetParams:r,isSearchStalled:a.isSearchStalled}},getWidgetUiState:function(e,t){var r=t.searchParameters.query||"";return""===r||e&&e.query===r?e:Hc(Hc({},e),{},{query:r})},getWidgetSearchParameters:function(e,t){var r=t.uiState;return e.setQueryParameter("query",r.query||"")}}}};function Qc(e){return Qc="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},Qc(e)}function Wc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wc(Object(r),!0).forEach((function(t){Bc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Bc(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Qc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Qc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Qc(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Vc=vr({name:"search-box"}),Kc=u("SearchBox"),Jc=function(e){var t=e||{},r=t.container,n=t.placeholder,i=void 0===n?"":n,a=t.cssClasses,o=void 0===a?{}:a,s=t.autofocus,c=void 0!==s&&s,u=t.searchAsYouType,l=void 0===u||u,f=t.showReset,h=void 0===f||f,p=t.showSubmit,d=void 0===p||p,m=t.showLoadingIndicator,y=void 0===m||m,g=t.queryHook,v=t.templates,b=void 0===v?{}:v;if(!r)throw new Error(Vc("The `container` option is required."));var O=bo(r),w={root:Tn(Kc(),o.root),form:Tn(Kc({descendantName:"form"}),o.form),input:Tn(Kc({descendantName:"input"}),o.input),submit:Tn(Kc({descendantName:"submit"}),o.submit),submitIcon:Tn(Kc({descendantName:"submitIcon"}),o.submitIcon),reset:Tn(Kc({descendantName:"reset"}),o.reset),resetIcon:Tn(Kc({descendantName:"resetIcon"}),o.resetIcon),loadingIndicator:Tn(Kc({descendantName:"loadingIndicator"}),o.loadingIndicator),loadingIcon:Tn(Kc({descendantName:"loadingIcon"}),o.loadingIcon)},_=$c($c({},Pc),b),S=function(e){var t=e.containerNode,r=e.cssClasses,n=e.placeholder,i=e.templates,a=e.autofocus,o=e.searchAsYouType,s=e.showReset,c=e.showSubmit,u=e.showLoadingIndicator;return function(e){var l=e.refine,f=e.query,h=e.isSearchStalled;fi($n(qs,{query:f,placeholder:n,autofocus:a,refine:l,searchAsYouType:o,templates:i,showSubmit:c,showReset:s,showLoadingIndicator:u,isSearchStalled:h,cssClasses:r}),t)}}({containerNode:O,cssClasses:w,placeholder:i,templates:_,autofocus:c,searchAsYouType:l,showReset:h,showSubmit:d,showLoadingIndicator:y});return $c($c({},qc(S,(function(){return fi(null,O)}))({queryHook:g})),{},{$$widgetType:"ais.searchBox"})};const zc=e(a)("950FKJKDEB","a751cfb6edbb86ff4f5f3416b51253c0"),Yc=new yn(Gc={indexName:"prod_freepythoncourse",searchClient:zc});var Gc,Xc;Yc.addWidgets([Jc({container:"#searchbox"}),Eo({container:"#hits",templates:{item:(e,{html:t,components:r})=>t`
<article class="search-hit">
<header class="search-hit-header">
<img src="https://forums.pythonic.guru${e.avatar_template.replace("{size}","40")}" alt="${e.display_username}'s avatar" class="search-hit-avatar" />
<div class="search-hit-info">
<h2 class="search-hit-title">
<a href="${e.url}" class="search-hit-link">
${r.Highlight({hit:e,attribute:"topic_title"})}
</a>
</h2>
<p class="search-hit-meta">
${e.display_username&&t`פורסם על־ידי ${e.display_username} `}
בתאריך ${e.created_at}
</p>
</div>
</header>
<section class="search-hit-content">
<p class="search-hit-text">${r.Snippet({hit:e,attribute:"cooked"})}</p>
</section>
<footer class="search-hit-footer">
<div class="search-hit-category">קטגוריה: ${e.category_name}</div>
${e.tags.length>0&&t`
<div class="search-hit-tags">תגיות: ${" "} ${e.tags.map(((r,n)=>t`
<a class="tag-link" href="https://forums.pythonic.guru/t/${r}.html">${r}</a>
${n<e.tags.length-1?", ":""}`))}
</div>
`}
<div class="search-hit-read-more">
<a href="${e.url}" class="search-hit-link">לפורום</a>
</div>
</footer>
</article>
`}}),(Xc={hitsPerPage:8},xn(xn({},Pn(ct)({searchParameters:Xc})),{},{$$widgetType:"ais.configure"})),Ts({templates:{header:"תגיות"}})(Cc)({container:"#tags-list",attribute:"tags"}),Ts({templates:{header:"קטגוריות"}})(Cc)({container:"#category_name-list",attribute:"category_name"}),rs({container:"#pagination"})]),Yc.start();
//# sourceMappingURL=index.47b9b384.js.map