{"version":3,"file":"index.js","sources":["../../../../node_modules/preact/dist/preact.module.js","../../../../node_modules/preact/hooks/dist/hooks.module.js","../../../../node_modules/preact/compat/dist/compat.module.js","../../../docsearch-react/dist/esm/icons/ControlKeyIcon.js","../../../docsearch-react/dist/esm/icons/SearchIcon.js","../../../docsearch-react/dist/esm/DocSearchButton.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/debounce.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/flatten.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/noop.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/version.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/createStore.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/reshape.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/resolve.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/onInput.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/metadata.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js","../../../docsearch-react/dist/esm/AlgoliaLogo.js","../../../docsearch-react/dist/esm/Footer.js","../../../docsearch-react/dist/esm/Hit.js","../../../docsearch-react/dist/esm/icons/LoadingIcon.js","../../../docsearch-react/dist/esm/icons/RecentIcon.js","../../../docsearch-react/dist/esm/icons/ResetIcon.js","../../../docsearch-react/dist/esm/icons/SelectIcon.js","../../../docsearch-react/dist/esm/icons/SourceIcon.js","../../../docsearch-react/dist/esm/icons/StarIcon.js","../../../docsearch-react/dist/esm/icons/ErrorIcon.js","../../../docsearch-react/dist/esm/icons/NoResultsIcon.js","../../../docsearch-react/dist/esm/ErrorScreen.js","../../../docsearch-react/dist/esm/NoResultsScreen.js","../../../docsearch-react/dist/esm/Snippet.js","../../../docsearch-react/dist/esm/Results.js","../../../docsearch-react/dist/esm/utils/groupBy.js","../../../docsearch-react/dist/esm/utils/identity.js","../../../docsearch-react/dist/esm/utils/isModifierEvent.js","../../../docsearch-react/dist/esm/utils/noop.js","../../../docsearch-react/dist/esm/utils/removeHighlightTags.js","../../../docsearch-react/dist/esm/ResultsScreen.js","../../../docsearch-react/dist/esm/StartScreen.js","../../../docsearch-react/dist/esm/ScreenState.js","../../../docsearch-react/dist/esm/SearchBox.js","../../../docsearch-react/dist/esm/constants.js","../../../docsearch-react/dist/esm/stored-searches.js","../../../docsearch-react/node_modules/algoliasearch/dist/algoliasearch-lite.esm.browser.js","../../../docsearch-react/dist/esm/version.js","../../../docsearch-react/dist/esm/DocSearchModal.js","../../../docsearch-react/dist/esm/useSearchClient.js","../../../docsearch-react/dist/esm/useTouchEvents.js","../../../docsearch-react/dist/esm/useTrapFocus.js","../../../docsearch-react/dist/esm/DocSearch.js","../../../docsearch-react/dist/esm/useDocSearchKeyboardEvents.js","../../src/docsearch.tsx"],"sourcesContent":["var n,l,u,i,t,r,o={},f=[],e=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c(n,l){for(var u in l)n[u]=l[u];return n}function s(n){var l=n.parentNode;l&&l.removeChild(n)}function a(n,l,u){var i,t,r,o=arguments,f={};for(r in l)\"key\"==r?i=l[r]:\"ref\"==r?t=l[r]:f[r]=l[r];if(arguments.length>3)for(u=[u],r=3;r0?v(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(_=A[h])||_&&k.key==_.key&&k.type===_.type)A[h]=void 0;else for(p=0;p3)for(u=[u],r=3;r=i.__.length&&i.__.push({}),i.__[t]}function l(n){return o=1,p(w,n)}function p(n,r,o){var i=m(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):w(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=u),i.__}function y(r,o){var i=m(t++,3);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i))}function h(r,o){var i=m(t++,4);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i))}function s(n){return o=5,d(function(){return{current:n}},[])}function _(n,t,u){o=6,h(function(){\"function\"==typeof n?n(t()):n&&(n.current=t())},null==u?u:u.concat(n))}function d(n,u){var r=m(t++,7);return k(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function A(n,t){return o=8,d(function(){return n},t)}function F(n){var r=u.context[n.__c],o=m(t++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function T(t,u){n.useDebugValue&&n.useDebugValue(u?u(t):t)}function q(n){var r=m(t++,10),o=l();return r.__=n,u.componentDidCatch||(u.componentDidCatch=function(n){r.__&&r.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}function x(){i.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(g),t.__H.__h.forEach(j),t.__H.__h=[]}catch(u){t.__H.__h=[],n.__e(u,t.__v)}}),i=[]}n.__b=function(n){u=null,c&&c(n)},n.__r=function(n){f&&f(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(g),r.__h.forEach(j),r.__h=[])},n.diffed=function(t){e&&e(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i.push(o)&&r===n.requestAnimationFrame||((r=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(u,100);b&&(t=requestAnimationFrame(u))})(x)),u=void 0},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g),t.__h=t.__h.filter(function(n){return!n.__||j(n)})}catch(r){u.some(function(n){n.__h&&(n.__h=[])}),u=[],n.__e(r,t.__v)}}),a&&a(t,u)},n.unmount=function(t){v&&v(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(g)}catch(t){n.__e(t,u.__v)}};var b=\"function\"==typeof requestAnimationFrame;function g(n){var t=u;\"function\"==typeof n.__c&&n.__c(),u=t}function j(n){var t=u;n.__c=n.__(),u=t}function k(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function w(n,t){return\"function\"==typeof t?t(n):t}export{l as useState,p as useReducer,y as useEffect,h as useLayoutEffect,s as useRef,_ as useImperativeHandle,d as useMemo,A as useCallback,F as useContext,T as useDebugValue,q as useErrorBoundary};\n//# sourceMappingURL=hooks.module.js.map\n","import{useState as n,useReducer as t,useEffect as e,useLayoutEffect as r,useRef as u,useImperativeHandle as o,useMemo as i,useCallback as l,useContext as f,useDebugValue as c}from\"preact/hooks\";export*from\"preact/hooks\";import{Component as a,createElement as s,options as h,toChildArray as p,Fragment as v,render as d,hydrate as m,cloneElement as y,createRef as b,createContext as _}from\"preact\";export{createElement,createContext,createRef,Fragment,Component}from\"preact\";function C(n,t){for(var e in t)n[e]=t[e];return n}function S(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function E(n){this.props=n}function g(n,t){function e(n){var e=this.props.ref,r=e==n.ref;return!r&&e&&(e.call?e(null):e.current=null),t?!t(this.props,n)||!r:S(this.props,n)}function r(t){return this.shouldComponentUpdate=e,s(n,t)}return r.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",r.prototype.isReactComponent=!0,r.__f=!0,r}(E.prototype=new a).isPureReactComponent=!0,E.prototype.shouldComponentUpdate=function(n,t){return S(this.props,n)||S(this.state,t)};var w=h.__b;h.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),w&&w(n)};var R=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function x(n){function t(t,e){var r=C({},t);return delete r.ref,n(r,(e=t.ref||e)&&(\"object\"!=typeof e||\"current\"in e)?e:null)}return t.$$typeof=R,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var N=function(n,t){return null==n?null:p(p(n).map(t))},k={map:N,forEach:N,count:function(n){return n?p(n).length:0},only:function(n){var t=p(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:p},A=h.__e;function O(){this.__u=0,this.t=null,this.__b=null}function L(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function U(n){var t,e,r;function u(u){if(t||(t=n()).then(function(n){e=n.default||n},function(n){r=n}),r)throw r;if(!e)throw t;return s(e,u)}return u.displayName=\"Lazy\",u.__f=!0,u}function D(){this.u=null,this.o=null}h.__e=function(n,t,e){if(n.then)for(var r,u=t;u=u.__;)if((r=u.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t);A(n,t,e)},(O.prototype=new a).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=L(r.__v),o=!1,i=function(){o||(o=!0,e.componentWillUnmount=e.__c,u?u(l):l())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c()};var l=function(){if(!--r.__u){if(r.state.__e){var n=r.state.__e;r.__v.__k[0]=function n(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},f=!0===t.__h;r.__u++||f||r.setState({__e:r.__b=r.__v.__k[0]}),n.then(i,i)},O.prototype.componentWillUnmount=function(){this.t=[]},O.prototype.render=function(n,t){if(this.__b){if(this.__v.__k){var e=document.createElement(\"div\"),r=this.__v.__k[0].__c;this.__v.__k[0]=function n(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),t.__c.__H=null),null!=(t=C({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)})),t}(this.__b,e,r.__O=r.__P)}this.__b=null}var u=t.__e&&s(v,null,n.fallback);return u&&(u.__h=null),[s(v,null,t.__e?null:n.children),u]};var F=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]>>1,1),t.i.removeChild(n)}}),d(s(M,{context:t.context},n.__v),t.l)):t.l&&t.componentWillUnmount()}function j(n,t){return s(T,{__v:n,i:t})}(D.prototype=new a).__e=function(n){var t=this,e=L(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),F(t,n,r)):u()};e?e(o):o()}},D.prototype.render=function(n){this.u=null,this.o=new Map;var t=p(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},D.prototype.componentDidUpdate=D.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){F(n,e,t)})};var I=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,W=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,P=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function V(n,t,e){return null==t.__k&&(t.textContent=\"\"),d(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function z(n,t,e){return m(n,t),\"function\"==typeof e&&e(),n?n.__c:null}a.prototype.isReactComponent={},[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(n){Object.defineProperty(a.prototype,n,{configurable:!0,get:function(){return this[\"UNSAFE_\"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t})}})});var B=h.event;function H(){}function Z(){return this.cancelBubble}function Y(){return this.defaultPrevented}h.event=function(n){return B&&(n=B(n)),n.persist=H,n.isPropagationStopped=Z,n.isDefaultPrevented=Y,n.nativeEvent=n};var $,q={configurable:!0,get:function(){return this.class}},G=h.vnode;h.vnode=function(n){var t=n.type,e=n.props,r=e;if(\"string\"==typeof t){for(var u in r={},e){var o=e[u];\"value\"===u&&\"defaultValue\"in e&&null==o||(\"defaultValue\"===u&&\"value\"in e&&null==e.value?u=\"value\":\"download\"===u&&!0===o?o=\"\":/ondoubleclick/i.test(u)?u=\"ondblclick\":/^onchange(textarea|input)/i.test(u+t)&&!P(e.type)?u=\"oninput\":/^on(Ani|Tra|Tou|BeforeInp)/.test(u)?u=u.toLowerCase():W.test(u)?u=u.replace(/[A-Z0-9]/,\"-$&\").toLowerCase():null===o&&(o=void 0),r[u]=o)}\"select\"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=p(e.children).forEach(function(n){n.props.selected=-1!=r.value.indexOf(n.props.value)})),\"select\"==t&&null!=r.defaultValue&&(r.value=p(e.children).forEach(function(n){n.props.selected=r.multiple?-1!=r.defaultValue.indexOf(n.props.value):r.defaultValue==n.props.value})),n.props=r}t&&e.class!=e.className&&(q.enumerable=\"className\"in e,null!=e.className&&(r.class=e.className),Object.defineProperty(r,\"className\",q)),n.$$typeof=I,G&&G(n)};var J=h.__r;h.__r=function(n){J&&J(n),$=n.__c};var K={ReactCurrentDispatcher:{current:{readContext:function(n){return $.__n[n.__c].props.value}}}},Q=1,X=2,nn=3,tn=4,en=5;function rn(n,t){return t()}var un=\"object\"==typeof performance&&\"function\"==typeof performance.now?performance.now.bind(performance):function(){return Date.now()},on=\"16.8.0\";function ln(n){return s.bind(null,n)}function fn(n){return!!n&&n.$$typeof===I}function cn(n){return fn(n)?y.apply(null,arguments):n}function an(n){return!!n.__k&&(d(null,n),!0)}function sn(n){return n&&(n.base||1===n.nodeType&&n)||null}var hn=function(n,t){return n(t)},pn=v;export default{useState:n,useReducer:t,useEffect:e,useLayoutEffect:r,useRef:u,useImperativeHandle:o,useMemo:i,useCallback:l,useContext:f,useDebugValue:c,version:\"16.8.0\",Children:k,render:V,hydrate:z,unmountComponentAtNode:an,createPortal:j,createElement:s,createContext:_,createFactory:ln,cloneElement:cn,createRef:b,Fragment:v,isValidElement:fn,findDOMNode:sn,Component:a,PureComponent:E,memo:g,forwardRef:x,unstable_batchedUpdates:hn,StrictMode:v,Suspense:O,SuspenseList:D,lazy:U,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:K};export{on as version,k as Children,V as render,z as hydrate,an as unmountComponentAtNode,j as createPortal,ln as createFactory,cn as cloneElement,fn as isValidElement,sn as findDOMNode,E as PureComponent,g as memo,x as forwardRef,hn as unstable_batchedUpdates,pn as StrictMode,O as Suspense,D as SuspenseList,U as lazy,K as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Q as unstable_ImmediatePriority,X as unstable_UserBlockingPriority,nn as unstable_NormalPriority,tn as unstable_LowPriority,en as unstable_IdlePriority,rn as unstable_runWithPriority,un as unstable_now};\n//# sourceMappingURL=compat.module.js.map\n","import React from 'react';\nexport function ControlKeyIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"15\",\n height: \"15\",\n className: \"DocSearch-Control-Key-Icon\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953\",\n strokeWidth: \"1.2\",\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"square\"\n }));\n}","import React from 'react';\nexport function SearchIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n className: \"DocSearch-Search-Icon\",\n viewBox: \"0 0 20 20\",\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React, { useEffect, useState } from 'react';\nimport { ControlKeyIcon } from './icons/ControlKeyIcon';\nimport { SearchIcon } from './icons/SearchIcon';\nvar ACTION_KEY_DEFAULT = 'Ctrl';\nvar ACTION_KEY_APPLE = '⌘';\n\nfunction isAppleDevice() {\n return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);\n}\n\nexport var DocSearchButton = React.forwardRef(function (_ref, ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$buttonT = translations.buttonText,\n buttonText = _translations$buttonT === void 0 ? 'Search' : _translations$buttonT,\n _translations$buttonA = translations.buttonAriaLabel,\n buttonAriaLabel = _translations$buttonA === void 0 ? 'Search' : _translations$buttonA;\n\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n key = _useState2[0],\n setKey = _useState2[1];\n\n useEffect(function () {\n if (typeof navigator !== 'undefined') {\n isAppleDevice() ? setKey(ACTION_KEY_APPLE) : setKey(ACTION_KEY_DEFAULT);\n }\n }, []);\n return /*#__PURE__*/React.createElement(\"button\", _extends({\n type: \"button\",\n className: \"DocSearch DocSearch-Button\",\n \"aria-label\": buttonAriaLabel\n }, props, {\n ref: ref\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Button-Container\"\n }, /*#__PURE__*/React.createElement(SearchIcon, null), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Button-Placeholder\"\n }, buttonText)), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Button-Keys\"\n }, key !== null && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DocSearchButtonKey, {\n reactsToKey: key === ACTION_KEY_DEFAULT ? ACTION_KEY_DEFAULT : 'Meta'\n }, key === ACTION_KEY_DEFAULT ? /*#__PURE__*/React.createElement(ControlKeyIcon, null) : key), /*#__PURE__*/React.createElement(DocSearchButtonKey, {\n reactsToKey: \"k\"\n }, \"K\"))));\n});\n\nfunction DocSearchButtonKey(_ref2) {\n var reactsToKey = _ref2.reactsToKey,\n children = _ref2.children;\n\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n isKeyDown = _useState4[0],\n setIsKeyDown = _useState4[1];\n\n useEffect(function () {\n if (!reactsToKey) {\n return undefined;\n }\n\n function handleKeyDown(e) {\n if (e.key === reactsToKey) {\n setIsKeyDown(true);\n }\n }\n\n function handleKeyUp(e) {\n if (e.key === reactsToKey || // keyup doesn't fire when Command is held down,\n // workaround is to mark key as also released when Command is released\n // See https://stackoverflow.com/a/73419500\n e.key === 'Meta') {\n setIsKeyDown(false);\n }\n }\n\n window.addEventListener('keydown', handleKeyDown);\n window.addEventListener('keyup', handleKeyUp);\n return function () {\n window.removeEventListener('keydown', handleKeyDown);\n window.removeEventListener('keyup', handleKeyUp);\n };\n }, [reactsToKey]);\n return /*#__PURE__*/React.createElement(\"kbd\", {\n className: isKeyDown ? 'DocSearch-Button-Key DocSearch-Button-Key--pressed' : 'DocSearch-Button-Key'\n }, children);\n}","export function debounce(fn, time) {\n var timerId = undefined;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(function () {\n return fn.apply(void 0, args);\n }, time);\n };\n}","export function flatten(values) {\n return values.reduce(function (a, b) {\n return a.concat(b);\n }, []);\n}","var autocompleteId = 0;\nexport function generateAutocompleteId() {\n return \"autocomplete-\".concat(autocompleteId++);\n}","export function getItemsCount(state) {\n if (state.collections.length === 0) {\n return 0;\n }\n return state.collections.reduce(function (sum, collection) {\n return sum + collection.items.length;\n }, 0);\n}","function isPrimitive(obj) {\n return obj !== Object(obj);\n}\nexport function isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') {\n return first === second;\n }\n if (Object.keys(first).length !== Object.keys(second).length) {\n return false;\n }\n for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n if (!(key in second)) {\n return false;\n }\n if (!isEqual(first[key], second[key])) {\n return false;\n }\n }\n return true;\n}","export var noop = function noop() {};","import { version } from './version';\nexport var userAgents = [{\n segment: 'autocomplete-core',\n version: version\n}];","export var version = '1.9.3';","export function createClickedEvent(_ref) {\n var item = _ref.item,\n items = _ref.items;\n return {\n index: item.__autocomplete_indexName,\n items: [item],\n positions: [1 + items.findIndex(function (x) {\n return x.objectID === item.objectID;\n })],\n queryID: item.__autocomplete_queryID,\n algoliaSource: ['autocomplete']\n };\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n/**\n * Determines if a given insights `client` supports the optional call to `init`\n * and the ability to set credentials via extra parameters when sending events.\n */\nexport function isModernInsightsClient(client) {\n var _split$map = (client.version || '').split('.').map(Number),\n _split$map2 = _slicedToArray(_split$map, 2),\n major = _split$map2[0],\n minor = _split$map2[1];\n\n /* eslint-disable @typescript-eslint/camelcase */\n var v3 = major >= 3;\n var v2_4 = major === 2 && minor >= 4;\n var v1_10 = major === 1 && minor >= 10;\n return v3 || v2_4 || v1_10;\n /* eslint-enable @typescript-eslint/camelcase */\n}","var _excluded = [\"items\"],\n _excluded2 = [\"items\"];\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isModernInsightsClient } from './isModernInsightsClient';\nfunction chunk(item) {\n var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;\n var chunks = [];\n for (var i = 0; i < item.objectIDs.length; i += chunkSize) {\n chunks.push(_objectSpread(_objectSpread({}, item), {}, {\n objectIDs: item.objectIDs.slice(i, i + chunkSize)\n }));\n }\n return chunks;\n}\nfunction mapToInsightsParamsApi(params) {\n return params.map(function (_ref) {\n var items = _ref.items,\n param = _objectWithoutProperties(_ref, _excluded);\n return _objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref2) {\n var objectID = _ref2.objectID;\n return objectID;\n })) || param.objectIDs\n });\n });\n}\nexport function createSearchInsightsApi(searchInsights) {\n var canSendHeaders = isModernInsightsClient(searchInsights);\n function sendToInsights(method, payloads, items) {\n if (canSendHeaders && typeof items !== 'undefined') {\n var _items$0$__autocomple = items[0].__autocomplete_algoliaCredentials,\n appId = _items$0$__autocomple.appId,\n apiKey = _items$0$__autocomple.apiKey;\n var headers = {\n 'X-Algolia-Application-Id': appId,\n 'X-Algolia-API-Key': apiKey\n };\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads), [{\n headers: headers\n }]));\n } else {\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads)));\n }\n }\n return {\n /**\n * Initializes Insights with Algolia credentials.\n */\n init: function init(appId, apiKey) {\n searchInsights('init', {\n appId: appId,\n apiKey: apiKey\n });\n },\n /**\n * Sets the user token to attach to events.\n */\n setUserToken: function setUserToken(userToken) {\n searchInsights('setUserToken', userToken);\n },\n /**\n * Sends click events to capture a query and its clicked items and positions.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/\n */\n clickedObjectIDsAfterSearch: function clickedObjectIDsAfterSearch() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/\n */\n clickedObjectIDs: function clickedObjectIDs() {\n for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n params[_key2] = arguments[_key2];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture the filters a user clicks on.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/\n */\n clickedFilters: function clickedFilters() {\n for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n params[_key3] = arguments[_key3];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['clickedFilters'].concat(params));\n }\n },\n /**\n * Sends conversion events to capture a query and its clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/\n */\n convertedObjectIDsAfterSearch: function convertedObjectIDsAfterSearch() {\n for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n params[_key4] = arguments[_key4];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/\n */\n convertedObjectIDs: function convertedObjectIDs() {\n for (var _len5 = arguments.length, params = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n params[_key5] = arguments[_key5];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture the filters a user uses when converting.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/\n */\n convertedFilters: function convertedFilters() {\n for (var _len6 = arguments.length, params = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n params[_key6] = arguments[_key6];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['convertedFilters'].concat(params));\n }\n },\n /**\n * Sends view events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/\n */\n viewedObjectIDs: function viewedObjectIDs() {\n for (var _len7 = arguments.length, params = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n params[_key7] = arguments[_key7];\n }\n if (params.length > 0) {\n params.reduce(function (acc, _ref3) {\n var items = _ref3.items,\n param = _objectWithoutProperties(_ref3, _excluded2);\n return [].concat(_toConsumableArray(acc), _toConsumableArray(chunk(_objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref4) {\n var objectID = _ref4.objectID;\n return objectID;\n })) || param.objectIDs\n })).map(function (payload) {\n return {\n items: items,\n payload: payload\n };\n })));\n }, []).forEach(function (_ref5) {\n var items = _ref5.items,\n payload = _ref5.payload;\n return sendToInsights('viewedObjectIDs', [payload], items);\n });\n }\n },\n /**\n * Sends view events to capture the filters a user uses when viewing.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/\n */\n viewedFilters: function viewedFilters() {\n for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n params[_key8] = arguments[_key8];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['viewedFilters'].concat(params));\n }\n }\n };\n}","export function createViewedEvents(_ref) {\n var items = _ref.items;\n var itemsByIndexName = items.reduce(function (acc, current) {\n var _acc$current$__autoco;\n acc[current.__autocomplete_indexName] = ((_acc$current$__autoco = acc[current.__autocomplete_indexName]) !== null && _acc$current$__autoco !== void 0 ? _acc$current$__autoco : []).concat(current);\n return acc;\n }, {});\n return Object.keys(itemsByIndexName).map(function (indexName) {\n var items = itemsByIndexName[indexName];\n return {\n index: indexName,\n items: items,\n algoliaSource: ['autocomplete']\n };\n });\n}","export function isAlgoliaInsightsHit(hit) {\n return hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createRef, debounce, isEqual, noop, safelyRunOnBrowser } from '@algolia/autocomplete-shared';\nimport { createClickedEvent } from './createClickedEvent';\nimport { createSearchInsightsApi } from './createSearchInsightsApi';\nimport { createViewedEvents } from './createViewedEvents';\nimport { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit';\nvar VIEW_EVENT_DELAY = 400;\nvar ALGOLIA_INSIGHTS_VERSION = '2.6.0';\nvar ALGOLIA_INSIGHTS_SRC = \"https://cdn.jsdelivr.net/npm/search-insights@\".concat(ALGOLIA_INSIGHTS_VERSION, \"/dist/search-insights.min.js\");\nvar sendViewedObjectIDs = debounce(function (_ref) {\n var onItemsChange = _ref.onItemsChange,\n items = _ref.items,\n insights = _ref.insights,\n state = _ref.state;\n onItemsChange({\n insights: insights,\n insightsEvents: createViewedEvents({\n items: items\n }).map(function (event) {\n return _objectSpread({\n eventName: 'Items Viewed'\n }, event);\n }),\n state: state\n });\n}, VIEW_EVENT_DELAY);\nexport function createAlgoliaInsightsPlugin(options) {\n var _getOptions = getOptions(options),\n providedInsightsClient = _getOptions.insightsClient,\n onItemsChange = _getOptions.onItemsChange,\n onSelectEvent = _getOptions.onSelect,\n onActiveEvent = _getOptions.onActive;\n var insightsClient = providedInsightsClient;\n if (!providedInsightsClient) {\n safelyRunOnBrowser(function (_ref2) {\n var window = _ref2.window;\n var pointer = window.AlgoliaAnalyticsObject || 'aa';\n if (typeof pointer === 'string') {\n insightsClient = window[pointer];\n }\n if (!insightsClient) {\n window.AlgoliaAnalyticsObject = pointer;\n if (!window[pointer]) {\n window[pointer] = function () {\n if (!window[pointer].queue) {\n window[pointer].queue = [];\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n window[pointer].queue.push(args);\n };\n }\n window[pointer].version = ALGOLIA_INSIGHTS_VERSION;\n insightsClient = window[pointer];\n loadInsights(window);\n }\n });\n }\n var insights = createSearchInsightsApi(insightsClient);\n var previousItems = createRef([]);\n var debouncedOnStateChange = debounce(function (_ref3) {\n var state = _ref3.state;\n if (!state.isOpen) {\n return;\n }\n var items = state.collections.reduce(function (acc, current) {\n return [].concat(_toConsumableArray(acc), _toConsumableArray(current.items));\n }, []).filter(isAlgoliaInsightsHit);\n if (!isEqual(previousItems.current.map(function (x) {\n return x.objectID;\n }), items.map(function (x) {\n return x.objectID;\n }))) {\n previousItems.current = items;\n if (items.length > 0) {\n sendViewedObjectIDs({\n onItemsChange: onItemsChange,\n items: items,\n insights: insights,\n state: state\n });\n }\n }\n }, 0);\n return {\n name: 'aa.algoliaInsightsPlugin',\n subscribe: function subscribe(_ref4) {\n var setContext = _ref4.setContext,\n onSelect = _ref4.onSelect,\n onActive = _ref4.onActive;\n insightsClient('addAlgoliaAgent', 'insights-plugin');\n setContext({\n algoliaInsightsPlugin: {\n __algoliaSearchParameters: {\n clickAnalytics: true\n },\n insights: insights\n }\n });\n onSelect(function (_ref5) {\n var item = _ref5.item,\n state = _ref5.state,\n event = _ref5.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onSelectEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Selected'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n onActive(function (_ref6) {\n var item = _ref6.item,\n state = _ref6.state,\n event = _ref6.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onActiveEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Active'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n },\n onStateChange: function onStateChange(_ref7) {\n var state = _ref7.state;\n debouncedOnStateChange({\n state: state\n });\n },\n __autocomplete_pluginOptions: options\n };\n}\nfunction getOptions(options) {\n return _objectSpread({\n onItemsChange: function onItemsChange(_ref8) {\n var insights = _ref8.insights,\n insightsEvents = _ref8.insightsEvents;\n insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onSelect: function onSelect(_ref9) {\n var insights = _ref9.insights,\n insightsEvents = _ref9.insightsEvents;\n insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onActive: noop\n }, options);\n}\nfunction loadInsights(environment) {\n var errorMessage = \"[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete\";\n try {\n var script = environment.document.createElement('script');\n script.async = true;\n script.src = ALGOLIA_INSIGHTS_SRC;\n script.onerror = function () {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n };\n document.body.appendChild(script);\n } catch (cause) {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n }\n}","/**\n * Safely runs code meant for browser environments only.\n */\nexport function safelyRunOnBrowser(callback) {\n if (typeof window !== 'undefined') {\n return callback({\n window: window\n });\n }\n return undefined;\n}","export function createRef(initialValue) {\n return {\n current: initialValue\n };\n}","function createInternalCancelablePromise(promise, initialState) {\n var state = initialState;\n return {\n then: function then(onfulfilled, onrejected) {\n return createInternalCancelablePromise(promise.then(createCallback(onfulfilled, state, promise), createCallback(onrejected, state, promise)), state);\n },\n catch: function _catch(onrejected) {\n return createInternalCancelablePromise(promise.catch(createCallback(onrejected, state, promise)), state);\n },\n finally: function _finally(onfinally) {\n if (onfinally) {\n state.onCancelList.push(onfinally);\n }\n return createInternalCancelablePromise(promise.finally(createCallback(onfinally && function () {\n state.onCancelList = [];\n return onfinally();\n }, state, promise)), state);\n },\n cancel: function cancel() {\n state.isCanceled = true;\n var callbacks = state.onCancelList;\n state.onCancelList = [];\n callbacks.forEach(function (callback) {\n callback();\n });\n },\n isCanceled: function isCanceled() {\n return state.isCanceled === true;\n }\n };\n}\nexport function createCancelablePromise(executor) {\n return createInternalCancelablePromise(new Promise(function (resolve, reject) {\n return executor(resolve, reject);\n }), {\n isCanceled: false,\n onCancelList: []\n });\n}\ncreateCancelablePromise.resolve = function (value) {\n return cancelable(Promise.resolve(value));\n};\ncreateCancelablePromise.reject = function (reason) {\n return cancelable(Promise.reject(reason));\n};\nexport function cancelable(promise) {\n return createInternalCancelablePromise(promise, {\n isCanceled: false,\n onCancelList: []\n });\n}\nfunction createCallback(onResult, state, fallback) {\n if (!onResult) {\n return fallback;\n }\n return function callback(arg) {\n if (state.isCanceled) {\n return arg;\n }\n return onResult(arg);\n };\n}","/**\n * Returns the next active item ID from the current state.\n *\n * We allow circular keyboard navigation from the base index.\n * The base index can either be `null` (nothing is highlighted) or `0`\n * (the first item is highlighted).\n * The base index is allowed to get assigned `null` only if\n * `props.defaultActiveItemId` is `null`. This pattern allows to \"stop\"\n * by the actual query before navigating to other suggestions as seen on\n * Google or Amazon.\n *\n * @param moveAmount The offset to increment (or decrement) the last index\n * @param baseIndex The current index to compute the next index from\n * @param itemCount The number of items\n * @param defaultActiveItemId The default active index to fallback to\n */\nexport function getNextActiveItemId(moveAmount, baseIndex, itemCount, defaultActiveItemId) {\n if (!itemCount) {\n return null;\n }\n if (moveAmount < 0 && (baseIndex === null || defaultActiveItemId !== null && baseIndex === 0)) {\n return itemCount + moveAmount;\n }\n var numericIndex = (baseIndex === null ? -1 : baseIndex) + moveAmount;\n if (numericIndex <= -1 || numericIndex >= itemCount) {\n return defaultActiveItemId === null ? null : 0;\n }\n return numericIndex;\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport { invariant, decycle, noop } from '@algolia/autocomplete-shared';\nexport function getNormalizedSources(getSources, params) {\n var seenSourceIds = [];\n return Promise.resolve(getSources(params)).then(function (sources) {\n invariant(Array.isArray(sources), function () {\n return \"The `getSources` function must return an array of sources but returned type \".concat(JSON.stringify(_typeof(sources)), \":\\n\\n\").concat(JSON.stringify(decycle(sources), null, 2));\n });\n return Promise.all(sources\n // We allow `undefined` and `false` sources to allow users to use\n // `Boolean(query) && source` (=> `false`).\n // We need to remove these values at this point.\n .filter(function (maybeSource) {\n return Boolean(maybeSource);\n }).map(function (source) {\n invariant(typeof source.sourceId === 'string', 'A source must provide a `sourceId` string.');\n if (seenSourceIds.includes(source.sourceId)) {\n throw new Error(\"[Autocomplete] The `sourceId` \".concat(JSON.stringify(source.sourceId), \" is not unique.\"));\n }\n seenSourceIds.push(source.sourceId);\n var defaultSource = {\n getItemInputValue: function getItemInputValue(_ref) {\n var state = _ref.state;\n return state.query;\n },\n getItemUrl: function getItemUrl() {\n return undefined;\n },\n onSelect: function onSelect(_ref2) {\n var setIsOpen = _ref2.setIsOpen;\n setIsOpen(false);\n },\n onActive: noop,\n onResolve: noop\n };\n Object.keys(defaultSource).forEach(function (key) {\n defaultSource[key].__default = true;\n });\n var normalizedSource = _objectSpread(_objectSpread({}, defaultSource), source);\n return Promise.resolve(normalizedSource);\n }));\n });\n}","// We don't have access to the autocomplete source when we call `onKeyDown`\n// or `onClick` because those are native browser events.\n// However, we can get the source from the suggestion index.\nfunction getCollectionFromActiveItemId(state) {\n // Given 3 sources with respectively 1, 2 and 3 suggestions: [1, 2, 3]\n // We want to get the accumulated counts:\n // [1, 1 + 2, 1 + 2 + 3] = [1, 3, 3 + 3] = [1, 3, 6]\n var accumulatedCollectionsCount = state.collections.map(function (collections) {\n return collections.items.length;\n }).reduce(function (acc, collectionsCount, index) {\n var previousValue = acc[index - 1] || 0;\n var nextValue = previousValue + collectionsCount;\n acc.push(nextValue);\n return acc;\n }, []);\n\n // Based on the accumulated counts, we can infer the index of the suggestion.\n var collectionIndex = accumulatedCollectionsCount.reduce(function (acc, current) {\n if (current <= state.activeItemId) {\n return acc + 1;\n }\n return acc;\n }, 0);\n return state.collections[collectionIndex];\n}\n\n/**\n * Gets the highlighted index relative to a suggestion object (not the absolute\n * highlighted index).\n *\n * Example:\n * [['a', 'b'], ['c', 'd', 'e'], ['f']]\n * ↑\n * (absolute: 3, relative: 1)\n */\nfunction getRelativeActiveItemId(_ref) {\n var state = _ref.state,\n collection = _ref.collection;\n var isOffsetFound = false;\n var counter = 0;\n var previousItemsOffset = 0;\n while (isOffsetFound === false) {\n var currentCollection = state.collections[counter];\n if (currentCollection === collection) {\n isOffsetFound = true;\n break;\n }\n previousItemsOffset += currentCollection.items.length;\n counter++;\n }\n return state.activeItemId - previousItemsOffset;\n}\nexport function getActiveItem(state) {\n var collection = getCollectionFromActiveItemId(state);\n if (!collection) {\n return null;\n }\n var item = collection.items[getRelativeActiveItemId({\n state: state,\n collection: collection\n })];\n var source = collection.source;\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: state\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: state\n });\n return {\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n source: source\n };\n}","var regex = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;\nexport function isSamsung(userAgent) {\n return Boolean(userAgent && userAgent.match(regex));\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createCancelablePromiseList } from './utils';\nexport function createStore(reducer, props, onStoreStateChange) {\n var state = props.initialState;\n return {\n getState: function getState() {\n return state;\n },\n dispatch: function dispatch(action, payload) {\n var prevState = _objectSpread({}, state);\n state = reducer(state, {\n type: action,\n props: props,\n payload: payload\n });\n onStoreStateChange({\n state: state,\n prevState: prevState\n });\n },\n pendingRequests: createCancelablePromiseList()\n };\n}","export function createCancelablePromiseList() {\n var list = [];\n return {\n add: function add(cancelablePromise) {\n list.push(cancelablePromise);\n return cancelablePromise.finally(function () {\n list = list.filter(function (item) {\n return item !== cancelablePromise;\n });\n });\n },\n cancelAll: function cancelAll() {\n list.forEach(function (promise) {\n return promise.cancel();\n });\n },\n isEmpty: function isEmpty() {\n return list.length === 0;\n }\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { flatten } from '@algolia/autocomplete-shared';\nexport function getAutocompleteSetters(_ref) {\n var store = _ref.store;\n var setActiveItemId = function setActiveItemId(value) {\n store.dispatch('setActiveItemId', value);\n };\n var setQuery = function setQuery(value) {\n store.dispatch('setQuery', value);\n };\n var setCollections = function setCollections(rawValue) {\n var baseItemId = 0;\n var value = rawValue.map(function (collection) {\n return _objectSpread(_objectSpread({}, collection), {}, {\n // We flatten the stored items to support calling `getAlgoliaResults`\n // from the source itself.\n items: flatten(collection.items).map(function (item) {\n return _objectSpread(_objectSpread({}, item), {}, {\n __autocomplete_id: baseItemId++\n });\n })\n });\n });\n store.dispatch('setCollections', value);\n };\n var setIsOpen = function setIsOpen(value) {\n store.dispatch('setIsOpen', value);\n };\n var setStatus = function setStatus(value) {\n store.dispatch('setStatus', value);\n };\n var setContext = function setContext(value) {\n store.dispatch('setContext', value);\n };\n return {\n setActiveItemId: setActiveItemId,\n setQuery: setQuery,\n setCollections: setCollections,\n setIsOpen: setIsOpen,\n setStatus: setStatus,\n setContext: setContext\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, generateAutocompleteId, flatten } from '@algolia/autocomplete-shared';\nimport { getNormalizedSources } from './utils';\nexport function getDefaultProps(props, pluginSubscribers) {\n var _props$id;\n /* eslint-disable no-restricted-globals */\n var environment = typeof window !== 'undefined' ? window : {};\n /* eslint-enable no-restricted-globals */\n var plugins = props.plugins || [];\n return _objectSpread(_objectSpread({\n debug: false,\n openOnFocus: false,\n placeholder: '',\n autoFocus: false,\n defaultActiveItemId: null,\n stallThreshold: 300,\n insights: false,\n environment: environment,\n shouldPanelOpen: function shouldPanelOpen(_ref) {\n var state = _ref.state;\n return getItemsCount(state) > 0;\n },\n reshape: function reshape(_ref2) {\n var sources = _ref2.sources;\n return sources;\n }\n }, props), {}, {\n // Since `generateAutocompleteId` triggers a side effect (it increments\n // an internal counter), we don't want to execute it if unnecessary.\n id: (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : generateAutocompleteId(),\n plugins: plugins,\n // The following props need to be deeply defaulted.\n initialState: _objectSpread({\n activeItemId: null,\n query: '',\n completion: null,\n collections: [],\n isOpen: false,\n status: 'idle',\n context: {}\n }, props.initialState),\n onStateChange: function onStateChange(params) {\n var _props$onStateChange;\n (_props$onStateChange = props.onStateChange) === null || _props$onStateChange === void 0 ? void 0 : _props$onStateChange.call(props, params);\n plugins.forEach(function (x) {\n var _x$onStateChange;\n return (_x$onStateChange = x.onStateChange) === null || _x$onStateChange === void 0 ? void 0 : _x$onStateChange.call(x, params);\n });\n },\n onSubmit: function onSubmit(params) {\n var _props$onSubmit;\n (_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 ? void 0 : _props$onSubmit.call(props, params);\n plugins.forEach(function (x) {\n var _x$onSubmit;\n return (_x$onSubmit = x.onSubmit) === null || _x$onSubmit === void 0 ? void 0 : _x$onSubmit.call(x, params);\n });\n },\n onReset: function onReset(params) {\n var _props$onReset;\n (_props$onReset = props.onReset) === null || _props$onReset === void 0 ? void 0 : _props$onReset.call(props, params);\n plugins.forEach(function (x) {\n var _x$onReset;\n return (_x$onReset = x.onReset) === null || _x$onReset === void 0 ? void 0 : _x$onReset.call(x, params);\n });\n },\n getSources: function getSources(params) {\n return Promise.all([].concat(_toConsumableArray(plugins.map(function (plugin) {\n return plugin.getSources;\n })), [props.getSources]).filter(Boolean).map(function (getSources) {\n return getNormalizedSources(getSources, params);\n })).then(function (nested) {\n return flatten(nested);\n }).then(function (sources) {\n return sources.map(function (source) {\n return _objectSpread(_objectSpread({}, source), {}, {\n onSelect: function onSelect(params) {\n source.onSelect(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onSelect;\n return (_x$onSelect = x.onSelect) === null || _x$onSelect === void 0 ? void 0 : _x$onSelect.call(x, params);\n });\n },\n onActive: function onActive(params) {\n source.onActive(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onActive;\n return (_x$onActive = x.onActive) === null || _x$onActive === void 0 ? void 0 : _x$onActive.call(x, params);\n });\n },\n onResolve: function onResolve(params) {\n source.onResolve(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onResolve;\n return (_x$onResolve = x.onResolve) === null || _x$onResolve === void 0 ? void 0 : _x$onResolve.call(x, params);\n });\n }\n });\n });\n });\n },\n navigator: _objectSpread({\n navigate: function navigate(_ref3) {\n var itemUrl = _ref3.itemUrl;\n environment.location.assign(itemUrl);\n },\n navigateNewTab: function navigateNewTab(_ref4) {\n var itemUrl = _ref4.itemUrl;\n var windowReference = environment.open(itemUrl, '_blank', 'noopener');\n windowReference === null || windowReference === void 0 ? void 0 : windowReference.focus();\n },\n navigateNewWindow: function navigateNewWindow(_ref5) {\n var itemUrl = _ref5.itemUrl;\n environment.open(itemUrl, '_blank', 'noopener');\n }\n }, props.navigator)\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { flatten } from '@algolia/autocomplete-shared';\nexport function reshape(_ref) {\n var collections = _ref.collections,\n props = _ref.props,\n state = _ref.state;\n // Sources are grouped by `sourceId` to conveniently pick them via destructuring.\n // Example: `const { recentSearchesPlugin } = sourcesBySourceId`\n var originalSourcesBySourceId = collections.reduce(function (acc, collection) {\n return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, collection.source.sourceId, _objectSpread(_objectSpread({}, collection.source), {}, {\n getItems: function getItems() {\n // We provide the resolved items from the collection to the `reshape` prop.\n return flatten(collection.items);\n }\n })));\n }, {});\n var _props$plugins$reduce = props.plugins.reduce(function (acc, plugin) {\n if (plugin.reshape) {\n return plugin.reshape(acc);\n }\n return acc;\n }, {\n sourcesBySourceId: originalSourcesBySourceId,\n state: state\n }),\n sourcesBySourceId = _props$plugins$reduce.sourcesBySourceId;\n var reshapeSources = props.reshape({\n sourcesBySourceId: sourcesBySourceId,\n sources: Object.values(sourcesBySourceId),\n state: state\n });\n\n // We reconstruct the collections with the items modified by the `reshape` prop.\n return flatten(reshapeSources).filter(Boolean).map(function (source) {\n return {\n source: source,\n items: source.getItems()\n };\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { decycle, flatten, invariant } from '@algolia/autocomplete-shared';\nimport { mapToAlgoliaResponse } from './utils';\nfunction isDescription(item) {\n return Boolean(item.execute);\n}\nfunction isRequesterDescription(description) {\n return Boolean(description === null || description === void 0 ? void 0 : description.execute);\n}\nexport function preResolve(itemsOrDescription, sourceId, state) {\n if (isRequesterDescription(itemsOrDescription)) {\n var contextParameters = itemsOrDescription.requesterId === 'algolia' ? Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.keys(state.context).map(function (key) {\n var _state$context$key;\n return (_state$context$key = state.context[key]) === null || _state$context$key === void 0 ? void 0 : _state$context$key.__algoliaSearchParameters;\n })))) : {};\n return _objectSpread(_objectSpread({}, itemsOrDescription), {}, {\n requests: itemsOrDescription.queries.map(function (query) {\n return {\n query: itemsOrDescription.requesterId === 'algolia' ? _objectSpread(_objectSpread({}, query), {}, {\n params: _objectSpread(_objectSpread({}, contextParameters), query.params)\n }) : query,\n sourceId: sourceId,\n transformResponse: itemsOrDescription.transformResponse\n };\n })\n });\n }\n return {\n items: itemsOrDescription,\n sourceId: sourceId\n };\n}\nexport function resolve(items) {\n var packed = items.reduce(function (acc, current) {\n if (!isDescription(current)) {\n acc.push(current);\n return acc;\n }\n var searchClient = current.searchClient,\n execute = current.execute,\n requesterId = current.requesterId,\n requests = current.requests;\n var container = acc.find(function (item) {\n return isDescription(current) && isDescription(item) && item.searchClient === searchClient && Boolean(requesterId) && item.requesterId === requesterId;\n });\n if (container) {\n var _container$items;\n (_container$items = container.items).push.apply(_container$items, _toConsumableArray(requests));\n } else {\n var request = {\n execute: execute,\n requesterId: requesterId,\n items: requests,\n searchClient: searchClient\n };\n acc.push(request);\n }\n return acc;\n }, []);\n var values = packed.map(function (maybeDescription) {\n if (!isDescription(maybeDescription)) {\n return Promise.resolve(maybeDescription);\n }\n var _ref = maybeDescription,\n execute = _ref.execute,\n items = _ref.items,\n searchClient = _ref.searchClient;\n return execute({\n searchClient: searchClient,\n requests: items\n });\n });\n return Promise.all(values).then(function (responses) {\n return flatten(responses);\n });\n}\nexport function postResolve(responses, sources, store) {\n return sources.map(function (source) {\n var matches = responses.filter(function (response) {\n return response.sourceId === source.sourceId;\n });\n var results = matches.map(function (_ref2) {\n var items = _ref2.items;\n return items;\n });\n var transform = matches[0].transformResponse;\n var items = transform ? transform(mapToAlgoliaResponse(results)) : results;\n source.onResolve({\n source: source,\n results: results,\n items: items,\n state: store.getState()\n });\n invariant(Array.isArray(items), function () {\n return \"The `getItems` function from source \\\"\".concat(source.sourceId, \"\\\" must return an array of items but returned type \").concat(JSON.stringify(_typeof(items)), \":\\n\\n\").concat(JSON.stringify(decycle(items), null, 2), \".\\n\\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems\");\n });\n invariant(items.every(Boolean), \"The `getItems` function from source \\\"\".concat(source.sourceId, \"\\\" must return an array of items but returned \").concat(JSON.stringify(undefined), \".\\n\\nDid you forget to return items?\\n\\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems\"));\n return {\n source: source,\n items: items\n };\n });\n}","export function mapToAlgoliaResponse(rawResults) {\n return {\n results: rawResults,\n hits: rawResults.map(function (result) {\n return result.hits;\n }).filter(Boolean),\n facetHits: rawResults.map(function (result) {\n var _facetHits;\n return (_facetHits = result.facetHits) === null || _facetHits === void 0 ? void 0 : _facetHits.map(function (facetHit) {\n // Bring support for the highlighting components.\n return {\n label: facetHit.value,\n count: facetHit.count,\n _highlightResult: {\n label: {\n value: facetHit.highlighted\n }\n }\n };\n });\n }).filter(Boolean)\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"nextState\", \"props\", \"query\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { reshape } from './reshape';\nimport { preResolve, resolve, postResolve } from './resolve';\nimport { cancelable, createConcurrentSafePromise, getActiveItem } from './utils';\nvar lastStalledId = null;\nvar runConcurrentSafePromise = createConcurrentSafePromise();\nexport function onInput(_ref) {\n var event = _ref.event,\n _ref$nextState = _ref.nextState,\n nextState = _ref$nextState === void 0 ? {} : _ref$nextState,\n props = _ref.props,\n query = _ref.query,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n var setCollections = setters.setCollections,\n setIsOpen = setters.setIsOpen,\n setQuery = setters.setQuery,\n setActiveItemId = setters.setActiveItemId,\n setStatus = setters.setStatus;\n setQuery(query);\n setActiveItemId(props.defaultActiveItemId);\n if (!query && props.openOnFocus === false) {\n var _nextState$isOpen;\n var collections = store.getState().collections.map(function (collection) {\n return _objectSpread(_objectSpread({}, collection), {}, {\n items: []\n });\n });\n setStatus('idle');\n setCollections(collections);\n setIsOpen((_nextState$isOpen = nextState.isOpen) !== null && _nextState$isOpen !== void 0 ? _nextState$isOpen : props.shouldPanelOpen({\n state: store.getState()\n }));\n\n // We make sure to update the latest resolved value of the tracked\n // promises to keep late resolving promises from \"cancelling\" the state\n // updates performed in this code path.\n // We chain with a void promise to respect `onInput`'s expected return type.\n var _request = cancelable(runConcurrentSafePromise(collections).then(function () {\n return Promise.resolve();\n }));\n return store.pendingRequests.add(_request);\n }\n setStatus('loading');\n lastStalledId = props.environment.setTimeout(function () {\n setStatus('stalled');\n }, props.stallThreshold);\n\n // We track the entire promise chain triggered by `onInput` before mutating\n // the Autocomplete state to make sure that any state manipulation is based on\n // fresh data regardless of when promises individually resolve.\n // We don't track nested promises and only rely on the full chain resolution,\n // meaning we should only ever manipulate the state once this concurrent-safe\n // promise is resolved.\n var request = cancelable(runConcurrentSafePromise(props.getSources(_objectSpread({\n query: query,\n refresh: refresh,\n state: store.getState()\n }, setters)).then(function (sources) {\n return Promise.all(sources.map(function (source) {\n return Promise.resolve(source.getItems(_objectSpread({\n query: query,\n refresh: refresh,\n state: store.getState()\n }, setters))).then(function (itemsOrDescription) {\n return preResolve(itemsOrDescription, source.sourceId, store.getState());\n });\n })).then(resolve).then(function (responses) {\n return postResolve(responses, sources, store);\n }).then(function (collections) {\n return reshape({\n collections: collections,\n props: props,\n state: store.getState()\n });\n });\n }))).then(function (collections) {\n var _nextState$isOpen2;\n // Parameters passed to `onInput` could be stale when the following code\n // executes, because `onInput` calls may not resolve in order.\n // If it becomes a problem we'll need to save the last passed parameters.\n // See: https://codesandbox.io/s/agitated-cookies-y290z\n\n setStatus('idle');\n setCollections(collections);\n var isPanelOpen = props.shouldPanelOpen({\n state: store.getState()\n });\n setIsOpen((_nextState$isOpen2 = nextState.isOpen) !== null && _nextState$isOpen2 !== void 0 ? _nextState$isOpen2 : props.openOnFocus && !query && isPanelOpen || isPanelOpen);\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }).finally(function () {\n setStatus('idle');\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n });\n return store.pendingRequests.add(request);\n}","/**\n * Creates a runner that executes promises in a concurrent-safe way.\n *\n * This is useful to prevent older promises to resolve after a newer promise,\n * otherwise resulting in stale resolved values.\n */\nexport function createConcurrentSafePromise() {\n var basePromiseId = -1;\n var latestResolvedId = -1;\n var latestResolvedValue = undefined;\n return function runConcurrentSafePromise(promise) {\n basePromiseId++;\n var currentPromiseId = basePromiseId;\n return Promise.resolve(promise).then(function (x) {\n // The promise might take too long to resolve and get outdated. This would\n // result in resolving stale values.\n // When this happens, we ignore the promise value and return the one\n // coming from the latest resolved value.\n //\n // +----------------------------------+\n // | 100ms |\n // | run(1) +---> R1 |\n // | 300ms |\n // | run(2) +-------------> R2 (SKIP) |\n // | 200ms |\n // | run(3) +--------> R3 |\n // +----------------------------------+\n if (latestResolvedValue && currentPromiseId < latestResolvedId) {\n return latestResolvedValue;\n }\n latestResolvedId = currentPromiseId;\n latestResolvedValue = x;\n return x;\n });\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"props\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { onInput } from './onInput';\nimport { getActiveItem } from './utils';\nexport function onKeyDown(_ref) {\n var event = _ref.event,\n props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n // eslint-disable-next-line no-inner-declarations\n var triggerScrollIntoView = function triggerScrollIntoView() {\n var nodeItem = props.environment.document.getElementById(\"\".concat(props.id, \"-item-\").concat(store.getState().activeItemId));\n if (nodeItem) {\n if (nodeItem.scrollIntoViewIfNeeded) {\n nodeItem.scrollIntoViewIfNeeded(false);\n } else {\n nodeItem.scrollIntoView(false);\n }\n }\n }; // eslint-disable-next-line no-inner-declarations\n var triggerOnActive = function triggerOnActive() {\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }; // Default browser behavior changes the caret placement on ArrowUp and\n // ArrowDown.\n event.preventDefault();\n\n // When re-opening the panel, we need to split the logic to keep the actions\n // synchronized as `onInput` returns a promise.\n if (store.getState().isOpen === false && (props.openOnFocus || Boolean(store.getState().query))) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n store.dispatch(event.key, {\n nextActiveItemId: props.defaultActiveItemId\n });\n triggerOnActive();\n // Since we rely on the DOM, we need to wait for all the micro tasks to\n // finish (which include re-opening the panel) to make sure all the\n // elements are available.\n setTimeout(triggerScrollIntoView, 0);\n });\n } else {\n store.dispatch(event.key, {});\n triggerOnActive();\n triggerScrollIntoView();\n }\n } else if (event.key === 'Escape') {\n // This prevents the default browser behavior on `input[type=\"search\"]`\n // from removing the query right away because we first want to close the\n // panel.\n event.preventDefault();\n store.dispatch(event.key, null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Tab') {\n store.dispatch('blur', null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Enter') {\n // No active item, so we let the browser handle the native `onSubmit` form\n // event.\n if (store.getState().activeItemId === null || store.getState().collections.every(function (collection) {\n return collection.items.length === 0;\n })) {\n // If requests are still pending when the panel closes, they could reopen\n // the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n return;\n }\n\n // This prevents the `onSubmit` event to be sent because an item is\n // highlighted.\n event.preventDefault();\n var _ref2 = getActiveItem(store.getState()),\n item = _ref2.item,\n itemInputValue = _ref2.itemInputValue,\n itemUrl = _ref2.itemUrl,\n source = _ref2.source;\n if (event.metaKey || event.ctrlKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewTab({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.shiftKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewWindow({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.altKey) {\n // Keep native browser behavior\n } else {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigate({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n return;\n }\n onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"props\", \"refresh\", \"store\"],\n _excluded2 = [\"inputElement\", \"formElement\", \"panelElement\"],\n _excluded3 = [\"inputElement\"],\n _excluded4 = [\"inputElement\", \"maxLength\"],\n _excluded5 = [\"sourceIndex\"],\n _excluded6 = [\"sourceIndex\"],\n _excluded7 = [\"item\", \"source\", \"sourceIndex\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { noop } from '@algolia/autocomplete-shared';\nimport { onInput } from './onInput';\nimport { onKeyDown as _onKeyDown } from './onKeyDown';\nimport { getActiveItem, isOrContainsNode, isSamsung } from './utils';\nexport function getPropGetters(_ref) {\n var props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n var getEnvironmentProps = function getEnvironmentProps(providedProps) {\n var inputElement = providedProps.inputElement,\n formElement = providedProps.formElement,\n panelElement = providedProps.panelElement,\n rest = _objectWithoutProperties(providedProps, _excluded2);\n function onMouseDownOrTouchStart(event) {\n // The `onTouchStart`/`onMouseDown` events shouldn't trigger the `blur`\n // handler when it's not an interaction with Autocomplete.\n // We detect it with the following heuristics:\n // - the panel is closed AND there are no pending requests\n // (no interaction with the autocomplete, no future state updates)\n // - OR the touched target is the input element (should open the panel)\n var isAutocompleteInteraction = store.getState().isOpen || !store.pendingRequests.isEmpty();\n if (!isAutocompleteInteraction || event.target === inputElement) {\n return;\n }\n\n // @TODO: support cases where there are multiple Autocomplete instances.\n // Right now, a second instance makes this computation return false.\n var isTargetWithinAutocomplete = [formElement, panelElement].some(function (contextNode) {\n return isOrContainsNode(contextNode, event.target);\n });\n if (isTargetWithinAutocomplete === false) {\n store.dispatch('blur', null);\n\n // If requests are still pending when the user closes the panel, they\n // could reopen the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n }\n }\n return _objectSpread({\n // We do not rely on the native `blur` event of the input to close the\n // panel, but rather on a custom `touchstart`/`mousedown` event outside\n // of the autocomplete elements.\n // This ensures we don't mistakenly interpret interactions within the\n // autocomplete (but outside of the input) as a signal to close the panel.\n // For example, clicking reset button causes an input blur, but if\n // `openOnFocus=true`, it shouldn't close the panel.\n // On touch devices, scrolling results (`touchmove`) causes an input blur\n // but shouldn't close the panel.\n onTouchStart: onMouseDownOrTouchStart,\n onMouseDown: onMouseDownOrTouchStart,\n // When scrolling on touch devices (mobiles, tablets, etc.), we want to\n // mimic the native platform behavior where the input is blurred to\n // hide the virtual keyboard. This gives more vertical space to\n // discover all the suggestions showing up in the panel.\n onTouchMove: function onTouchMove(event) {\n if (store.getState().isOpen === false || inputElement !== props.environment.document.activeElement || event.target === inputElement) {\n return;\n }\n inputElement.blur();\n }\n }, rest);\n };\n var getRootProps = function getRootProps(rest) {\n return _objectSpread({\n role: 'combobox',\n 'aria-expanded': store.getState().isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-owns': store.getState().isOpen ? \"\".concat(props.id, \"-list\") : undefined,\n 'aria-labelledby': \"\".concat(props.id, \"-label\")\n }, rest);\n };\n var getFormProps = function getFormProps(providedProps) {\n var inputElement = providedProps.inputElement,\n rest = _objectWithoutProperties(providedProps, _excluded3);\n return _objectSpread({\n action: '',\n noValidate: true,\n role: 'search',\n onSubmit: function onSubmit(event) {\n var _providedProps$inputE;\n event.preventDefault();\n props.onSubmit(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('submit', null);\n (_providedProps$inputE = providedProps.inputElement) === null || _providedProps$inputE === void 0 ? void 0 : _providedProps$inputE.blur();\n },\n onReset: function onReset(event) {\n var _providedProps$inputE2;\n event.preventDefault();\n props.onReset(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('reset', null);\n (_providedProps$inputE2 = providedProps.inputElement) === null || _providedProps$inputE2 === void 0 ? void 0 : _providedProps$inputE2.focus();\n }\n }, rest);\n };\n var getInputProps = function getInputProps(providedProps) {\n var _props$environment$na;\n function onFocus(event) {\n // We want to trigger a query when `openOnFocus` is true\n // because the panel should open with the current query.\n if (props.openOnFocus || Boolean(store.getState().query)) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().completion || store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n store.dispatch('focus', null);\n }\n var _ref2 = providedProps || {},\n inputElement = _ref2.inputElement,\n _ref2$maxLength = _ref2.maxLength,\n maxLength = _ref2$maxLength === void 0 ? 512 : _ref2$maxLength,\n rest = _objectWithoutProperties(_ref2, _excluded4);\n var activeItem = getActiveItem(store.getState());\n var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || '';\n var shouldFallbackKeyHint = isSamsung(userAgent);\n var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';\n return _objectSpread({\n 'aria-autocomplete': 'both',\n 'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? \"\".concat(props.id, \"-item-\").concat(store.getState().activeItemId) : undefined,\n 'aria-controls': store.getState().isOpen ? \"\".concat(props.id, \"-list\") : undefined,\n 'aria-labelledby': \"\".concat(props.id, \"-label\"),\n value: store.getState().completion || store.getState().query,\n id: \"\".concat(props.id, \"-input\"),\n autoComplete: 'off',\n autoCorrect: 'off',\n autoCapitalize: 'off',\n enterKeyHint: enterKeyHint,\n spellCheck: 'false',\n autoFocus: props.autoFocus,\n placeholder: props.placeholder,\n maxLength: maxLength,\n type: 'search',\n onChange: function onChange(event) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: event.currentTarget.value.slice(0, maxLength),\n refresh: refresh,\n store: store\n }, setters));\n },\n onKeyDown: function onKeyDown(event) {\n _onKeyDown(_objectSpread({\n event: event,\n props: props,\n refresh: refresh,\n store: store\n }, setters));\n },\n onFocus: onFocus,\n // We don't rely on the `blur` event.\n // See explanation in `onTouchStart`/`onMouseDown`.\n // @MAJOR See if we need to keep this handler.\n onBlur: noop,\n onClick: function onClick(event) {\n // When the panel is closed and you click on the input while\n // the input is focused, the `onFocus` event is not triggered\n // (default browser behavior).\n // In an autocomplete context, it makes sense to open the panel in this\n // case.\n // We mimic this event by catching the `onClick` event which\n // triggers the `onFocus` for the panel to open.\n if (providedProps.inputElement === props.environment.document.activeElement && !store.getState().isOpen) {\n onFocus(event);\n }\n }\n }, rest);\n };\n var getAutocompleteId = function getAutocompleteId(instanceId, sourceId) {\n return typeof sourceId !== 'undefined' ? \"\".concat(instanceId, \"-\").concat(sourceId) : instanceId;\n };\n var getLabelProps = function getLabelProps(providedProps) {\n var _ref3 = providedProps || {},\n sourceIndex = _ref3.sourceIndex,\n rest = _objectWithoutProperties(_ref3, _excluded5);\n return _objectSpread({\n htmlFor: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-input\"),\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-label\")\n }, rest);\n };\n var getListProps = function getListProps(providedProps) {\n var _ref4 = providedProps || {},\n sourceIndex = _ref4.sourceIndex,\n rest = _objectWithoutProperties(_ref4, _excluded6);\n return _objectSpread({\n role: 'listbox',\n 'aria-labelledby': \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-label\"),\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-list\")\n }, rest);\n };\n var getPanelProps = function getPanelProps(rest) {\n return _objectSpread({\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the panel so\n // that the blur event is not triggered, otherwise it closes the\n // panel.\n event.preventDefault();\n },\n onMouseLeave: function onMouseLeave() {\n store.dispatch('mouseleave', null);\n }\n }, rest);\n };\n var getItemProps = function getItemProps(providedProps) {\n var item = providedProps.item,\n source = providedProps.source,\n sourceIndex = providedProps.sourceIndex,\n rest = _objectWithoutProperties(providedProps, _excluded7);\n return _objectSpread({\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-item-\").concat(item.__autocomplete_id),\n role: 'option',\n 'aria-selected': store.getState().activeItemId === item.__autocomplete_id,\n onMouseMove: function onMouseMove(event) {\n if (item.__autocomplete_id === store.getState().activeItemId) {\n return;\n }\n store.dispatch('mousemove', item.__autocomplete_id);\n var activeItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && activeItem) {\n var _item = activeItem.item,\n itemInputValue = activeItem.itemInputValue,\n itemUrl = activeItem.itemUrl,\n _source = activeItem.source;\n _source.onActive(_objectSpread({\n event: event,\n item: _item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: _source,\n state: store.getState()\n }, setters));\n }\n },\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the item so it\n // can remain with the current `activeElement`.\n event.preventDefault();\n },\n onClick: function onClick(event) {\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: store.getState()\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: store.getState()\n });\n\n // If `getItemUrl` is provided, it means that the suggestion\n // is a link, not plain text that aims at updating the query.\n // We can therefore skip the state change because it will update\n // the `activeItemId`, resulting in a UI flash, especially\n // noticeable on mobile.\n var runPreCommand = itemUrl ? Promise.resolve() : onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters));\n runPreCommand.then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }, rest);\n };\n return {\n getEnvironmentProps: getEnvironmentProps,\n getRootProps: getRootProps,\n getFormProps: getFormProps,\n getLabelProps: getLabelProps,\n getInputProps: getInputProps,\n getPanelProps: getPanelProps,\n getListProps: getListProps,\n getItemProps: getItemProps\n };\n}","export function isOrContainsNode(parent, child) {\n return parent === child || parent.contains(child);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { userAgents } from '@algolia/autocomplete-shared';\nexport function getMetadata(_ref) {\n var _, _options$__autocomple, _options$__autocomple2, _options$__autocomple3;\n var plugins = _ref.plugins,\n options = _ref.options;\n var optionsKey = (_ = (((_options$__autocomple = options.__autocomplete_metadata) === null || _options$__autocomple === void 0 ? void 0 : _options$__autocomple.userAgents) || [])[0]) === null || _ === void 0 ? void 0 : _.segment;\n var extraOptions = optionsKey ? _defineProperty({}, optionsKey, Object.keys(((_options$__autocomple2 = options.__autocomplete_metadata) === null || _options$__autocomple2 === void 0 ? void 0 : _options$__autocomple2.options) || {})) : {};\n return {\n plugins: plugins.map(function (plugin) {\n return {\n name: plugin.name,\n options: Object.keys(plugin.__autocomplete_pluginOptions || [])\n };\n }),\n options: _objectSpread({\n 'autocomplete-core': Object.keys(options)\n }, extraOptions),\n ua: userAgents.concat(((_options$__autocomple3 = options.__autocomplete_metadata) === null || _options$__autocomple3 === void 0 ? void 0 : _options$__autocomple3.userAgents) || [])\n };\n}\nexport function injectMetadata(_ref3) {\n var _environment$navigato, _environment$navigato2;\n var metadata = _ref3.metadata,\n environment = _ref3.environment;\n var isMetadataEnabled = (_environment$navigato = environment.navigator) === null || _environment$navigato === void 0 ? void 0 : (_environment$navigato2 = _environment$navigato.userAgent) === null || _environment$navigato2 === void 0 ? void 0 : _environment$navigato2.includes('Algolia Crawler');\n if (isMetadataEnabled) {\n var metadataContainer = environment.document.createElement('meta');\n var headRef = environment.document.querySelector('head');\n metadataContainer.name = 'algolia:metadata';\n setTimeout(function () {\n metadataContainer.content = JSON.stringify(metadata);\n headRef.appendChild(metadataContainer);\n }, 0);\n }\n}","import { getActiveItem } from './utils';\nexport function getCompletion(_ref) {\n var _getActiveItem;\n var state = _ref.state;\n if (state.isOpen === false || state.activeItemId === null) {\n return null;\n }\n return ((_getActiveItem = getActiveItem(state)) === null || _getActiveItem === void 0 ? void 0 : _getActiveItem.itemInputValue) || null;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, invariant } from '@algolia/autocomplete-shared';\nimport { getCompletion } from './getCompletion';\nimport { getNextActiveItemId } from './utils';\nexport var stateReducer = function stateReducer(state, action) {\n switch (action.type) {\n case 'setActiveItemId':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'setQuery':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n query: action.payload,\n completion: null\n });\n }\n case 'setCollections':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n collections: action.payload\n });\n }\n case 'setIsOpen':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: action.payload\n });\n }\n case 'setStatus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n status: action.payload\n });\n }\n case 'setContext':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n context: _objectSpread(_objectSpread({}, state.context), action.payload)\n });\n }\n case 'ArrowDown':\n {\n var nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload.hasOwnProperty('nextActiveItemId') ? action.payload.nextActiveItemId : getNextActiveItemId(1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, nextState), {}, {\n completion: getCompletion({\n state: nextState\n })\n });\n }\n case 'ArrowUp':\n {\n var _nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: getNextActiveItemId(-1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, _nextState), {}, {\n completion: getCompletion({\n state: _nextState\n })\n });\n }\n case 'Escape':\n {\n if (state.isOpen) {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n completion: null\n });\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n query: '',\n status: 'idle',\n collections: []\n });\n }\n case 'submit':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n status: 'idle'\n });\n }\n case 'reset':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId:\n // Since we open the panel on reset when openOnFocus=true\n // we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case)\n\n // Since we close the panel when openOnFocus=false\n // we lose track of the highlighted index. (Query-suggestions use-case)\n action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,\n status: 'idle',\n query: ''\n });\n }\n case 'focus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId,\n isOpen: (action.props.openOnFocus || Boolean(state.query)) && action.props.shouldPanelOpen({\n state: state\n })\n });\n }\n case 'blur':\n {\n if (action.props.debug) {\n return state;\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: false,\n activeItemId: null\n });\n }\n case 'mousemove':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'mouseleave':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId\n });\n }\n default:\n invariant(false, \"The reducer action \".concat(JSON.stringify(action.type), \" is not supported.\"));\n return state;\n }\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createAlgoliaInsightsPlugin } from '@algolia/autocomplete-plugin-algolia-insights';\nimport { checkOptions } from './checkOptions';\nimport { createStore } from './createStore';\nimport { getAutocompleteSetters } from './getAutocompleteSetters';\nimport { getDefaultProps } from './getDefaultProps';\nimport { getPropGetters } from './getPropGetters';\nimport { getMetadata, injectMetadata } from './metadata';\nimport { onInput } from './onInput';\nimport { stateReducer } from './stateReducer';\nexport function createAutocomplete(options) {\n checkOptions(options);\n var subscribers = [];\n var props = getDefaultProps(options, subscribers);\n var store = createStore(stateReducer, props, onStoreStateChange);\n var setters = getAutocompleteSetters({\n store: store\n });\n var propGetters = getPropGetters(_objectSpread({\n props: props,\n refresh: refresh,\n store: store,\n navigator: props.navigator\n }, setters));\n function onStoreStateChange(_ref) {\n var prevState = _ref.prevState,\n state = _ref.state;\n props.onStateChange(_objectSpread({\n prevState: prevState,\n state: state,\n refresh: refresh,\n navigator: props.navigator\n }, setters));\n }\n function refresh() {\n return onInput(_objectSpread({\n event: new Event('input'),\n nextState: {\n isOpen: store.getState().isOpen\n },\n props: props,\n navigator: props.navigator,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n if (options.insights && !props.plugins.some(function (plugin) {\n return plugin.name === 'aa.algoliaInsightsPlugin';\n })) {\n var insightsParams = typeof options.insights === 'boolean' ? {} : options.insights;\n props.plugins.push(createAlgoliaInsightsPlugin(insightsParams));\n }\n props.plugins.forEach(function (plugin) {\n var _plugin$subscribe;\n return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread(_objectSpread({}, setters), {}, {\n navigator: props.navigator,\n refresh: refresh,\n onSelect: function onSelect(fn) {\n subscribers.push({\n onSelect: fn\n });\n },\n onActive: function onActive(fn) {\n subscribers.push({\n onActive: fn\n });\n },\n onResolve: function onResolve(fn) {\n subscribers.push({\n onResolve: fn\n });\n }\n }));\n });\n injectMetadata({\n metadata: getMetadata({\n plugins: props.plugins,\n options: options\n }),\n environment: props.environment\n });\n return _objectSpread(_objectSpread({\n refresh: refresh,\n navigator: props.navigator\n }, propGetters), setters);\n}","import React from 'react';\nexport function AlgoliaLogo(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$searchB = translations.searchByText,\n searchByText = _translations$searchB === void 0 ? 'Search by' : _translations$searchB;\n return /*#__PURE__*/React.createElement(\"a\", {\n href: \"https://www.algolia.com/ref/docsearch/?utm_source=\".concat(window.location.hostname, \"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch\"),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, searchByText), /*#__PURE__*/React.createElement(\"svg\", {\n width: \"77\",\n height: \"19\",\n \"aria-label\": \"Algolia\",\n role: \"img\",\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 2196.2 500\"\n }, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"style\", null, \".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}\")), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z\"\n }), /*#__PURE__*/React.createElement(\"rect\", {\n className: \"cls-1\",\n x: \"1845.88\",\n y: \"104.73\",\n width: \"62.58\",\n height: \"277.9\",\n rx: \"5.9\",\n ry: \"5.9\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-1\",\n d: \"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z\"\n })));\n}","import React from 'react';\nimport { AlgoliaLogo } from './AlgoliaLogo';\n\nfunction CommandIcon(props) {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"15\",\n height: \"15\",\n \"aria-label\": props.ariaLabel,\n role: \"img\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: \"1.2\"\n }, props.children));\n}\n\nexport function Footer(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$selectT = translations.selectText,\n selectText = _translations$selectT === void 0 ? 'to select' : _translations$selectT,\n _translations$selectK = translations.selectKeyAriaLabel,\n selectKeyAriaLabel = _translations$selectK === void 0 ? 'Enter key' : _translations$selectK,\n _translations$navigat = translations.navigateText,\n navigateText = _translations$navigat === void 0 ? 'to navigate' : _translations$navigat,\n _translations$navigat2 = translations.navigateUpKeyAriaLabel,\n navigateUpKeyAriaLabel = _translations$navigat2 === void 0 ? 'Arrow up' : _translations$navigat2,\n _translations$navigat3 = translations.navigateDownKeyAriaLabel,\n navigateDownKeyAriaLabel = _translations$navigat3 === void 0 ? 'Arrow down' : _translations$navigat3,\n _translations$closeTe = translations.closeText,\n closeText = _translations$closeTe === void 0 ? 'to close' : _translations$closeTe,\n _translations$closeKe = translations.closeKeyAriaLabel,\n closeKeyAriaLabel = _translations$closeKe === void 0 ? 'Escape key' : _translations$closeKe,\n _translations$searchB = translations.searchByText,\n searchByText = _translations$searchB === void 0 ? 'Search by' : _translations$searchB;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Logo\"\n }, /*#__PURE__*/React.createElement(AlgoliaLogo, {\n translations: {\n searchByText: searchByText\n }\n })), /*#__PURE__*/React.createElement(\"ul\", {\n className: \"DocSearch-Commands\"\n }, /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: selectKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, selectText)), /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: navigateDownKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.5 3.5v8M10.5 8.5l-3 3-3-3\"\n }))), /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: navigateUpKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.5 11.5v-8M10.5 6.5l-3-3-3 3\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, navigateText)), /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: closeKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, closeText))));\n}","import React from 'react';\nexport function Hit(_ref) {\n var hit = _ref.hit,\n children = _ref.children;\n return /*#__PURE__*/React.createElement(\"a\", {\n href: hit.url\n }, children);\n}","import React from 'react';\nexport function LoadingIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n viewBox: \"0 0 38 38\",\n stroke: \"currentColor\",\n strokeOpacity: \".5\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(1 1)\",\n strokeWidth: \"2\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n strokeOpacity: \".3\",\n cx: \"18\",\n cy: \"18\",\n r: \"18\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36 18c0-9.94-8.06-18-18-18\"\n }, /*#__PURE__*/React.createElement(\"animateTransform\", {\n attributeName: \"transform\",\n type: \"rotate\",\n from: \"0 18 18\",\n to: \"360 18 18\",\n dur: \"1s\",\n repeatCount: \"indefinite\"\n })))));\n}","import React from 'react';\nexport function RecentIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13\"\n })));\n}","import React from 'react';\nexport function ResetIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function SelectIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n className: \"DocSearch-Hit-Select-Icon\",\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18 3v4c0 2-2 4-4 4H2\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 17l-6-6 6-6\"\n })));\n}","import React from 'react';\n\nvar LvlIcon = function LvlIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n};\n\nexport function SourceIcon(props) {\n switch (props.type) {\n case 'lvl1':\n return /*#__PURE__*/React.createElement(LvlIcon, null);\n\n case 'content':\n return /*#__PURE__*/React.createElement(ContentIcon, null);\n\n default:\n return /*#__PURE__*/React.createElement(AnchorIcon, null);\n }\n}\n\nfunction AnchorIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}\n\nfunction ContentIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 5H3h14zm0 5H3h14zm0 5H3h14z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function StarIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function ErrorIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"40\",\n height: \"40\",\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n fillRule: \"evenodd\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0\"\n }));\n}","import React from 'react';\nexport function NoResultsIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"40\",\n height: \"40\",\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n fillRule: \"evenodd\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2\"\n }));\n}","import React from 'react';\nimport { ErrorIcon } from './icons';\nexport function ErrorScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$titleTe = translations.titleText,\n titleText = _translations$titleTe === void 0 ? 'Unable to fetch results' : _translations$titleTe,\n _translations$helpTex = translations.helpText,\n helpText = _translations$helpTex === void 0 ? 'You might want to check your network connection.' : _translations$helpTex;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-ErrorScreen\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Screen-Icon\"\n }, /*#__PURE__*/React.createElement(ErrorIcon, null)), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Title\"\n }, titleText), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, helpText));\n}","var _excluded = [\"translations\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { NoResultsIcon } from './icons';\nexport function NoResultsScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$noResul = translations.noResultsText,\n noResultsText = _translations$noResul === void 0 ? 'No results for' : _translations$noResul,\n _translations$suggest = translations.suggestedQueryText,\n suggestedQueryText = _translations$suggest === void 0 ? 'Try searching for' : _translations$suggest,\n _translations$reportM = translations.reportMissingResultsText,\n reportMissingResultsText = _translations$reportM === void 0 ? 'Believe this query should return results?' : _translations$reportM,\n _translations$reportM2 = translations.reportMissingResultsLinkText,\n reportMissingResultsLinkText = _translations$reportM2 === void 0 ? 'Let us know.' : _translations$reportM2;\n var searchSuggestions = props.state.context.searchSuggestions;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-NoResults\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Screen-Icon\"\n }, /*#__PURE__*/React.createElement(NoResultsIcon, null)), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Title\"\n }, noResultsText, \" \\\"\", /*#__PURE__*/React.createElement(\"strong\", null, props.state.query), \"\\\"\"), searchSuggestions && searchSuggestions.length > 0 && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-NoResults-Prefill-List\"\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, suggestedQueryText, \":\"), /*#__PURE__*/React.createElement(\"ul\", null, searchSuggestions.slice(0, 3).reduce(function (acc, search) {\n return [].concat(_toConsumableArray(acc), [/*#__PURE__*/React.createElement(\"li\", {\n key: search\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Prefill\",\n key: search,\n type: \"button\",\n onClick: function onClick() {\n props.setQuery(search.toLowerCase() + ' ');\n props.refresh();\n props.inputRef.current.focus();\n }\n }, search))]);\n }, []))), props.getMissingResultsUrl && /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, \"\".concat(reportMissingResultsText, \" \"), /*#__PURE__*/React.createElement(\"a\", {\n href: props.getMissingResultsUrl({\n query: props.state.query\n }),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, reportMissingResultsLinkText)));\n}","var _excluded = [\"hit\", \"attribute\", \"tagName\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport { createElement } from 'react';\n\nfunction getPropertyByPath(object, path) {\n var parts = path.split('.');\n return parts.reduce(function (prev, current) {\n if (prev !== null && prev !== void 0 && prev[current]) return prev[current];\n return null;\n }, object);\n}\n\nexport function Snippet(_ref) {\n var hit = _ref.hit,\n attribute = _ref.attribute,\n _ref$tagName = _ref.tagName,\n tagName = _ref$tagName === void 0 ? 'span' : _ref$tagName,\n rest = _objectWithoutProperties(_ref, _excluded);\n\n return createElement(tagName, _objectSpread(_objectSpread({}, rest), {}, {\n dangerouslySetInnerHTML: {\n __html: getPropertyByPath(hit, \"_snippetResult.\".concat(attribute, \".value\")) || getPropertyByPath(hit, attribute)\n }\n }));\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport React from 'react';\nimport { Snippet } from './Snippet';\nexport function Results(props) {\n if (!props.collection || props.collection.items.length === 0) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"section\", {\n className: \"DocSearch-Hits\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-source\"\n }, props.title), /*#__PURE__*/React.createElement(\"ul\", props.getListProps(), props.collection.items.map(function (item, index) {\n return /*#__PURE__*/React.createElement(Result, _extends({\n key: [props.title, item.objectID].join(':'),\n item: item,\n index: index\n }, props));\n })));\n}\n\nfunction Result(_ref) {\n var item = _ref.item,\n index = _ref.index,\n renderIcon = _ref.renderIcon,\n renderAction = _ref.renderAction,\n getItemProps = _ref.getItemProps,\n onItemClick = _ref.onItemClick,\n collection = _ref.collection,\n hitComponent = _ref.hitComponent;\n\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n isDeleting = _React$useState2[0],\n setIsDeleting = _React$useState2[1];\n\n var _React$useState3 = React.useState(false),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n isFavoriting = _React$useState4[0],\n setIsFavoriting = _React$useState4[1];\n\n var action = React.useRef(null);\n var Hit = hitComponent;\n\n function runDeleteTransition(cb) {\n setIsDeleting(true);\n action.current = cb;\n }\n\n function runFavoriteTransition(cb) {\n setIsFavoriting(true);\n action.current = cb;\n }\n\n return /*#__PURE__*/React.createElement(\"li\", _extends({\n className: ['DocSearch-Hit', item.__docsearch_parent && 'DocSearch-Hit--Child', isDeleting && 'DocSearch-Hit--deleting', isFavoriting && 'DocSearch-Hit--favoriting'].filter(Boolean).join(' '),\n onTransitionEnd: function onTransitionEnd() {\n if (action.current) {\n action.current();\n }\n }\n }, getItemProps({\n item: item,\n source: collection.source,\n onClick: function onClick(event) {\n onItemClick(item, event);\n }\n })), /*#__PURE__*/React.createElement(Hit, {\n hit: item\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-Container\"\n }, renderIcon({\n item: item,\n index: index\n }), item.hierarchy[item.type] && item.type === 'lvl1' && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n }), item.content && /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"content\"\n })), item.hierarchy[item.type] && (item.type === 'lvl2' || item.type === 'lvl3' || item.type === 'lvl4' || item.type === 'lvl5' || item.type === 'lvl6') && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"hierarchy.\".concat(item.type)\n }), /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n })), item.type === 'content' && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"content\"\n }), /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n })), renderAction({\n item: item,\n runDeleteTransition: runDeleteTransition,\n runFavoriteTransition: runFavoriteTransition\n }))));\n}","export function groupBy(values, predicate, maxResultsPerGroup) {\n return values.reduce(function (acc, item) {\n var key = predicate(item);\n\n if (!acc.hasOwnProperty(key)) {\n acc[key] = [];\n } // We limit each section to show 5 hits maximum.\n // This acts as a frontend alternative to `distinct`.\n\n\n if (acc[key].length < (maxResultsPerGroup || 5)) {\n acc[key].push(item);\n }\n\n return acc;\n }, {});\n}","export function identity(x) {\n return x;\n}","/**\n * Detect when an event is modified with a special key to let the browser\n * trigger its default behavior.\n */\nexport function isModifierEvent(event) {\n var isMiddleClick = event.button === 1;\n return isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n}","export function noop() {}","var regexHighlightTags = /(|<\\/mark>)/g;\nvar regexHasHighlightTags = RegExp(regexHighlightTags.source);\nexport function removeHighlightTags(hit) {\n var _internalDocSearchHit, _hit$_highlightResult;\n\n var internalDocSearchHit = hit;\n\n if (!internalDocSearchHit.__docsearch_parent && !hit._highlightResult) {\n return hit.hierarchy.lvl0;\n }\n\n var _ref = (internalDocSearchHit.__docsearch_parent ? (_internalDocSearchHit = internalDocSearchHit.__docsearch_parent) === null || _internalDocSearchHit === void 0 || (_internalDocSearchHit = _internalDocSearchHit._highlightResult) === null || _internalDocSearchHit === void 0 || (_internalDocSearchHit = _internalDocSearchHit.hierarchy) === null || _internalDocSearchHit === void 0 ? void 0 : _internalDocSearchHit.lvl0 : (_hit$_highlightResult = hit._highlightResult) === null || _hit$_highlightResult === void 0 || (_hit$_highlightResult = _hit$_highlightResult.hierarchy) === null || _hit$_highlightResult === void 0 ? void 0 : _hit$_highlightResult.lvl0) || {},\n value = _ref.value;\n\n return value && regexHasHighlightTags.test(value) ? value.replace(regexHighlightTags, '') : value;\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport React from 'react';\nimport { SelectIcon, SourceIcon } from './icons';\nimport { Results } from './Results';\nimport { removeHighlightTags } from './utils';\nexport function ResultsScreen(props) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown-Container\"\n }, props.state.collections.map(function (collection) {\n if (collection.items.length === 0) {\n return null;\n }\n\n var title = removeHighlightTags(collection.items[0]);\n return /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n key: collection.source.sourceId,\n title: title,\n collection: collection,\n renderIcon: function renderIcon(_ref) {\n var _collection$items;\n\n var item = _ref.item,\n index = _ref.index;\n return /*#__PURE__*/React.createElement(React.Fragment, null, item.__docsearch_parent && /*#__PURE__*/React.createElement(\"svg\", {\n className: \"DocSearch-Hit-Tree\",\n viewBox: \"0 0 24 54\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, item.__docsearch_parent !== ((_collection$items = collection.items[index + 1]) === null || _collection$items === void 0 ? void 0 : _collection$items.__docsearch_parent) ? /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 6v21M20 27H8.3\"\n }) : /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 6v42M20 27H8.3\"\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(SourceIcon, {\n type: item.type\n })));\n },\n renderAction: function renderAction() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(SelectIcon, null));\n }\n }));\n }), props.resultsFooterComponent && /*#__PURE__*/React.createElement(\"section\", {\n className: \"DocSearch-HitsFooter\"\n }, /*#__PURE__*/React.createElement(props.resultsFooterComponent, {\n state: props.state\n })));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { RecentIcon, ResetIcon, StarIcon } from './icons';\nimport { Results } from './Results';\nexport function StartScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$recentS = translations.recentSearchesTitle,\n recentSearchesTitle = _translations$recentS === void 0 ? 'Recent' : _translations$recentS,\n _translations$noRecen = translations.noRecentSearchesText,\n noRecentSearchesText = _translations$noRecen === void 0 ? 'No recent searches' : _translations$noRecen,\n _translations$saveRec = translations.saveRecentSearchButtonTitle,\n saveRecentSearchButtonTitle = _translations$saveRec === void 0 ? 'Save this search' : _translations$saveRec,\n _translations$removeR = translations.removeRecentSearchButtonTitle,\n removeRecentSearchButtonTitle = _translations$removeR === void 0 ? 'Remove this search from history' : _translations$removeR,\n _translations$favorit = translations.favoriteSearchesTitle,\n favoriteSearchesTitle = _translations$favorit === void 0 ? 'Favorite' : _translations$favorit,\n _translations$removeF = translations.removeFavoriteSearchButtonTitle,\n removeFavoriteSearchButtonTitle = _translations$removeF === void 0 ? 'Remove this search from favorites' : _translations$removeF;\n\n if (props.state.status === 'idle' && props.hasCollections === false) {\n if (props.disableUserPersonalization) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-StartScreen\"\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, noRecentSearchesText));\n }\n\n if (props.hasCollections === false) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown-Container\"\n }, /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n title: recentSearchesTitle,\n collection: props.state.collections[0],\n renderIcon: function renderIcon() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(RecentIcon, null));\n },\n renderAction: function renderAction(_ref2) {\n var item = _ref2.item,\n runFavoriteTransition = _ref2.runFavoriteTransition,\n runDeleteTransition = _ref2.runDeleteTransition;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: saveRecentSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runFavoriteTransition(function () {\n props.favoriteSearches.add(item);\n props.recentSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(StarIcon, null))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: removeRecentSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runDeleteTransition(function () {\n props.recentSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(ResetIcon, null))));\n }\n })), /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n title: favoriteSearchesTitle,\n collection: props.state.collections[1],\n renderIcon: function renderIcon() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(StarIcon, null));\n },\n renderAction: function renderAction(_ref3) {\n var item = _ref3.item,\n runDeleteTransition = _ref3.runDeleteTransition;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: removeFavoriteSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runDeleteTransition(function () {\n props.favoriteSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(ResetIcon, null)));\n }\n })));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { ErrorScreen } from './ErrorScreen';\nimport { NoResultsScreen } from './NoResultsScreen';\nimport { ResultsScreen } from './ResultsScreen';\nimport { StartScreen } from './StartScreen';\nexport var ScreenState = React.memo(function (_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n if (props.state.status === 'error') {\n return /*#__PURE__*/React.createElement(ErrorScreen, {\n translations: translations === null || translations === void 0 ? void 0 : translations.errorScreen\n });\n }\n\n var hasCollections = props.state.collections.some(function (collection) {\n return collection.items.length > 0;\n });\n\n if (!props.state.query) {\n return /*#__PURE__*/React.createElement(StartScreen, _extends({}, props, {\n hasCollections: hasCollections,\n translations: translations === null || translations === void 0 ? void 0 : translations.startScreen\n }));\n }\n\n if (hasCollections === false) {\n return /*#__PURE__*/React.createElement(NoResultsScreen, _extends({}, props, {\n translations: translations === null || translations === void 0 ? void 0 : translations.noResultsScreen\n }));\n }\n\n return /*#__PURE__*/React.createElement(ResultsScreen, props);\n}, function areEqual(_prevProps, nextProps) {\n // We don't update the screen when Autocomplete is loading or stalled to\n // avoid UI flashes:\n // - Empty screen → Results screen\n // - NoResults screen → NoResults screen with another query\n return nextProps.state.status === 'loading' || nextProps.state.status === 'stalled';\n});","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { MAX_QUERY_SIZE } from './constants';\nimport { LoadingIcon } from './icons/LoadingIcon';\nimport { ResetIcon } from './icons/ResetIcon';\nimport { SearchIcon } from './icons/SearchIcon';\nexport function SearchBox(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$resetBu = translations.resetButtonTitle,\n resetButtonTitle = _translations$resetBu === void 0 ? 'Clear the query' : _translations$resetBu,\n _translations$resetBu2 = translations.resetButtonAriaLabel,\n resetButtonAriaLabel = _translations$resetBu2 === void 0 ? 'Clear the query' : _translations$resetBu2,\n _translations$cancelB = translations.cancelButtonText,\n cancelButtonText = _translations$cancelB === void 0 ? 'Cancel' : _translations$cancelB,\n _translations$cancelB2 = translations.cancelButtonAriaLabel,\n cancelButtonAriaLabel = _translations$cancelB2 === void 0 ? 'Cancel' : _translations$cancelB2,\n _translations$searchI = translations.searchInputLabel,\n searchInputLabel = _translations$searchI === void 0 ? 'Search' : _translations$searchI;\n\n var _props$getFormProps = props.getFormProps({\n inputElement: props.inputRef.current\n }),\n onReset = _props$getFormProps.onReset;\n\n React.useEffect(function () {\n if (props.autoFocus && props.inputRef.current) {\n props.inputRef.current.focus();\n }\n }, [props.autoFocus, props.inputRef]);\n React.useEffect(function () {\n if (props.isFromSelection && props.inputRef.current) {\n props.inputRef.current.select();\n }\n }, [props.isFromSelection, props.inputRef]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"form\", {\n className: \"DocSearch-Form\",\n onSubmit: function onSubmit(event) {\n event.preventDefault();\n },\n onReset: onReset\n }, /*#__PURE__*/React.createElement(\"label\", _extends({\n className: \"DocSearch-MagnifierLabel\"\n }, props.getLabelProps()), /*#__PURE__*/React.createElement(SearchIcon, null), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-VisuallyHiddenForAccessibility\"\n }, searchInputLabel)), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-LoadingIndicator\"\n }, /*#__PURE__*/React.createElement(LoadingIcon, null)), /*#__PURE__*/React.createElement(\"input\", _extends({\n className: \"DocSearch-Input\",\n ref: props.inputRef\n }, props.getInputProps({\n inputElement: props.inputRef.current,\n autoFocus: props.autoFocus,\n maxLength: MAX_QUERY_SIZE\n }))), /*#__PURE__*/React.createElement(\"button\", {\n type: \"reset\",\n title: resetButtonTitle,\n className: \"DocSearch-Reset\",\n \"aria-label\": resetButtonAriaLabel,\n hidden: !props.state.query\n }, /*#__PURE__*/React.createElement(ResetIcon, null))), /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Cancel\",\n type: \"reset\",\n \"aria-label\": cancelButtonAriaLabel,\n onClick: props.onClose\n }, cancelButtonText));\n}","export var MAX_QUERY_SIZE = 64;","var _excluded = [\"_highlightResult\", \"_snippetResult\"];\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction isLocalStorageSupported() {\n var key = '__TEST_KEY__';\n\n try {\n localStorage.setItem(key, '');\n localStorage.removeItem(key);\n return true;\n } catch (error) {\n return false;\n }\n}\n\nfunction createStorage(key) {\n if (isLocalStorageSupported() === false) {\n return {\n setItem: function setItem() {},\n getItem: function getItem() {\n return [];\n }\n };\n }\n\n return {\n setItem: function setItem(item) {\n return window.localStorage.setItem(key, JSON.stringify(item));\n },\n getItem: function getItem() {\n var item = window.localStorage.getItem(key);\n return item ? JSON.parse(item) : [];\n }\n };\n}\n\nexport function createStoredSearches(_ref) {\n var key = _ref.key,\n _ref$limit = _ref.limit,\n limit = _ref$limit === void 0 ? 5 : _ref$limit;\n var storage = createStorage(key);\n var items = storage.getItem().slice(0, limit);\n return {\n add: function add(item) {\n var _ref2 = item,\n _highlightResult = _ref2._highlightResult,\n _snippetResult = _ref2._snippetResult,\n hit = _objectWithoutProperties(_ref2, _excluded);\n\n var isQueryAlreadySaved = items.findIndex(function (x) {\n return x.objectID === hit.objectID;\n });\n\n if (isQueryAlreadySaved > -1) {\n items.splice(isQueryAlreadySaved, 1);\n }\n\n items.unshift(hit);\n items = items.slice(0, limit);\n storage.setItem(items);\n },\n remove: function remove(item) {\n items = items.filter(function (x) {\n return x.objectID !== item.objectID;\n });\n storage.setItem(items);\n },\n getAll: function getAll() {\n return items;\n }\n };\n}","function createBrowserLocalStorageCache(options) {\r\n const namespaceKey = `algoliasearch-client-js-${options.key}`;\r\n // eslint-disable-next-line functional/no-let\r\n let storage;\r\n const getStorage = () => {\r\n if (storage === undefined) {\r\n storage = options.localStorage || window.localStorage;\r\n }\r\n return storage;\r\n };\r\n const getNamespace = () => {\r\n return JSON.parse(getStorage().getItem(namespaceKey) || '{}');\r\n };\r\n const setNamespace = (namespace) => {\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n };\r\n const removeOutdatedCacheItems = () => {\r\n const timeToLive = options.timeToLive ? options.timeToLive * 1000 : null;\r\n const namespace = getNamespace();\r\n const filteredNamespaceWithoutOldFormattedCacheItems = Object.fromEntries(Object.entries(namespace).filter(([, cacheItem]) => {\r\n return cacheItem.timestamp !== undefined;\r\n }));\r\n setNamespace(filteredNamespaceWithoutOldFormattedCacheItems);\r\n if (!timeToLive)\r\n return;\r\n const filteredNamespaceWithoutExpiredItems = Object.fromEntries(Object.entries(filteredNamespaceWithoutOldFormattedCacheItems).filter(([, cacheItem]) => {\r\n const currentTimestamp = new Date().getTime();\r\n const isExpired = cacheItem.timestamp + timeToLive < currentTimestamp;\r\n return !isExpired;\r\n }));\r\n setNamespace(filteredNamespaceWithoutExpiredItems);\r\n };\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n return Promise.resolve()\r\n .then(() => {\r\n removeOutdatedCacheItems();\r\n const keyAsString = JSON.stringify(key);\r\n return getNamespace()[keyAsString];\r\n })\r\n .then(value => {\r\n return Promise.all([value ? value.value : defaultValue(), value !== undefined]);\r\n })\r\n .then(([value, exists]) => {\r\n return Promise.all([value, exists || events.miss(value)]);\r\n })\r\n .then(([value]) => value);\r\n },\r\n set(key, value) {\r\n return Promise.resolve().then(() => {\r\n const namespace = getNamespace();\r\n // eslint-disable-next-line functional/immutable-data\r\n namespace[JSON.stringify(key)] = {\r\n timestamp: new Date().getTime(),\r\n value,\r\n };\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n return value;\r\n });\r\n },\r\n delete(key) {\r\n return Promise.resolve().then(() => {\r\n const namespace = getNamespace();\r\n // eslint-disable-next-line functional/immutable-data\r\n delete namespace[JSON.stringify(key)];\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n });\r\n },\r\n clear() {\r\n return Promise.resolve().then(() => {\r\n getStorage().removeItem(namespaceKey);\r\n });\r\n },\r\n };\r\n}\n\n// @todo Add logger on options to debug when caches go wrong.\r\nfunction createFallbackableCache(options) {\r\n const caches = [...options.caches];\r\n const current = caches.shift(); // eslint-disable-line functional/immutable-data\r\n if (current === undefined) {\r\n return createNullCache();\r\n }\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n return current.get(key, defaultValue, events).catch(() => {\r\n return createFallbackableCache({ caches }).get(key, defaultValue, events);\r\n });\r\n },\r\n set(key, value) {\r\n return current.set(key, value).catch(() => {\r\n return createFallbackableCache({ caches }).set(key, value);\r\n });\r\n },\r\n delete(key) {\r\n return current.delete(key).catch(() => {\r\n return createFallbackableCache({ caches }).delete(key);\r\n });\r\n },\r\n clear() {\r\n return current.clear().catch(() => {\r\n return createFallbackableCache({ caches }).clear();\r\n });\r\n },\r\n };\r\n}\n\nfunction createNullCache() {\r\n return {\r\n get(_key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n const value = defaultValue();\r\n return value\r\n .then(result => Promise.all([result, events.miss(result)]))\r\n .then(([result]) => result);\r\n },\r\n set(_key, value) {\r\n return Promise.resolve(value);\r\n },\r\n delete(_key) {\r\n return Promise.resolve();\r\n },\r\n clear() {\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createInMemoryCache(options = { serializable: true }) {\r\n // eslint-disable-next-line functional/no-let\r\n let cache = {};\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n const keyAsString = JSON.stringify(key);\r\n if (keyAsString in cache) {\r\n return Promise.resolve(options.serializable ? JSON.parse(cache[keyAsString]) : cache[keyAsString]);\r\n }\r\n const promise = defaultValue();\r\n const miss = (events && events.miss) || (() => Promise.resolve());\r\n return promise.then((value) => miss(value)).then(() => promise);\r\n },\r\n set(key, value) {\r\n // eslint-disable-next-line functional/immutable-data\r\n cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value;\r\n return Promise.resolve(value);\r\n },\r\n delete(key) {\r\n // eslint-disable-next-line functional/immutable-data\r\n delete cache[JSON.stringify(key)];\r\n return Promise.resolve();\r\n },\r\n clear() {\r\n cache = {};\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createAuth(authMode, appId, apiKey) {\r\n const credentials = {\r\n 'x-algolia-api-key': apiKey,\r\n 'x-algolia-application-id': appId,\r\n };\r\n return {\r\n headers() {\r\n return authMode === AuthMode.WithinHeaders ? credentials : {};\r\n },\r\n queryParameters() {\r\n return authMode === AuthMode.WithinQueryParameters ? credentials : {};\r\n },\r\n };\r\n}\n\n// eslint-disable-next-line functional/prefer-readonly-type\r\nfunction shuffle(array) {\r\n let c = array.length - 1; // eslint-disable-line functional/no-let\r\n // eslint-disable-next-line functional/no-loop-statement\r\n for (c; c > 0; c--) {\r\n const b = Math.floor(Math.random() * (c + 1));\r\n const a = array[c];\r\n array[c] = array[b]; // eslint-disable-line functional/immutable-data, no-param-reassign\r\n array[b] = a; // eslint-disable-line functional/immutable-data, no-param-reassign\r\n }\r\n return array;\r\n}\r\nfunction addMethods(base, methods) {\r\n if (!methods) {\r\n return base;\r\n }\r\n Object.keys(methods).forEach(key => {\r\n // eslint-disable-next-line functional/immutable-data, no-param-reassign\r\n base[key] = methods[key](base);\r\n });\r\n return base;\r\n}\r\nfunction encode(format, ...args) {\r\n // eslint-disable-next-line functional/no-let\r\n let i = 0;\r\n return format.replace(/%s/g, () => encodeURIComponent(args[i++]));\r\n}\n\nconst version = '4.19.1';\n\nconst AuthMode = {\r\n /**\r\n * If auth credentials should be in query parameters.\r\n */\r\n WithinQueryParameters: 0,\r\n /**\r\n * If auth credentials should be in headers.\r\n */\r\n WithinHeaders: 1,\r\n};\n\nfunction createMappedRequestOptions(requestOptions, timeout) {\r\n const options = requestOptions || {};\r\n const data = options.data || {};\r\n Object.keys(options).forEach(key => {\r\n if (['timeout', 'headers', 'queryParameters', 'data', 'cacheable'].indexOf(key) === -1) {\r\n data[key] = options[key]; // eslint-disable-line functional/immutable-data\r\n }\r\n });\r\n return {\r\n data: Object.entries(data).length > 0 ? data : undefined,\r\n timeout: options.timeout || timeout,\r\n headers: options.headers || {},\r\n queryParameters: options.queryParameters || {},\r\n cacheable: options.cacheable,\r\n };\r\n}\n\nconst CallEnum = {\r\n /**\r\n * If the host is read only.\r\n */\r\n Read: 1,\r\n /**\r\n * If the host is write only.\r\n */\r\n Write: 2,\r\n /**\r\n * If the host is both read and write.\r\n */\r\n Any: 3,\r\n};\n\nconst HostStatusEnum = {\r\n Up: 1,\r\n Down: 2,\r\n Timeouted: 3,\r\n};\n\n// By default, API Clients at Algolia have expiration delay\r\n// of 5 mins. In the JavaScript client, we have 2 mins.\r\nconst EXPIRATION_DELAY = 2 * 60 * 1000;\r\nfunction createStatefulHost(host, status = HostStatusEnum.Up) {\r\n return {\r\n ...host,\r\n status,\r\n lastUpdate: Date.now(),\r\n };\r\n}\r\nfunction isStatefulHostUp(host) {\r\n return host.status === HostStatusEnum.Up || Date.now() - host.lastUpdate > EXPIRATION_DELAY;\r\n}\r\nfunction isStatefulHostTimeouted(host) {\r\n return (host.status === HostStatusEnum.Timeouted && Date.now() - host.lastUpdate <= EXPIRATION_DELAY);\r\n}\n\nfunction createStatelessHost(options) {\r\n if (typeof options === 'string') {\r\n return {\r\n protocol: 'https',\r\n url: options,\r\n accept: CallEnum.Any,\r\n };\r\n }\r\n return {\r\n protocol: options.protocol || 'https',\r\n url: options.url,\r\n accept: options.accept || CallEnum.Any,\r\n };\r\n}\n\nconst MethodEnum = {\r\n Delete: 'DELETE',\r\n Get: 'GET',\r\n Post: 'POST',\r\n Put: 'PUT',\r\n};\n\nfunction createRetryableOptions(hostsCache, statelessHosts) {\r\n return Promise.all(statelessHosts.map(statelessHost => {\r\n return hostsCache.get(statelessHost, () => {\r\n return Promise.resolve(createStatefulHost(statelessHost));\r\n });\r\n })).then(statefulHosts => {\r\n const hostsUp = statefulHosts.filter(host => isStatefulHostUp(host));\r\n const hostsTimeouted = statefulHosts.filter(host => isStatefulHostTimeouted(host));\r\n /**\r\n * Note, we put the hosts that previously timeouted on the end of the list.\r\n */\r\n const hostsAvailable = [...hostsUp, ...hostsTimeouted];\r\n const statelessHostsAvailable = hostsAvailable.length > 0\r\n ? hostsAvailable.map(host => createStatelessHost(host))\r\n : statelessHosts;\r\n return {\r\n getTimeout(timeoutsCount, baseTimeout) {\r\n /**\r\n * Imagine that you have 4 hosts, if timeouts will increase\r\n * on the following way: 1 (timeouted) > 4 (timeouted) > 5 (200)\r\n *\r\n * Note that, the very next request, we start from the previous timeout\r\n *\r\n * 5 (timeouted) > 6 (timeouted) > 7 ...\r\n *\r\n * This strategy may need to be reviewed, but is the strategy on the our\r\n * current v3 version.\r\n */\r\n const timeoutMultiplier = hostsTimeouted.length === 0 && timeoutsCount === 0\r\n ? 1\r\n : hostsTimeouted.length + 3 + timeoutsCount;\r\n return timeoutMultiplier * baseTimeout;\r\n },\r\n statelessHosts: statelessHostsAvailable,\r\n };\r\n });\r\n}\n\nconst isNetworkError = ({ isTimedOut, status }) => {\r\n return !isTimedOut && ~~status === 0;\r\n};\r\nconst isRetryable = (response) => {\r\n const status = response.status;\r\n const isTimedOut = response.isTimedOut;\r\n return (isTimedOut || isNetworkError(response) || (~~(status / 100) !== 2 && ~~(status / 100) !== 4));\r\n};\r\nconst isSuccess = ({ status }) => {\r\n return ~~(status / 100) === 2;\r\n};\r\nconst retryDecision = (response, outcomes) => {\r\n if (isRetryable(response)) {\r\n return outcomes.onRetry(response);\r\n }\r\n if (isSuccess(response)) {\r\n return outcomes.onSuccess(response);\r\n }\r\n return outcomes.onFail(response);\r\n};\n\nfunction retryableRequest(transporter, statelessHosts, request, requestOptions) {\r\n const stackTrace = []; // eslint-disable-line functional/prefer-readonly-type\r\n /**\r\n * First we prepare the payload that do not depend from hosts.\r\n */\r\n const data = serializeData(request, requestOptions);\r\n const headers = serializeHeaders(transporter, requestOptions);\r\n const method = request.method;\r\n // On `GET`, the data is proxied to query parameters.\r\n const dataQueryParameters = request.method !== MethodEnum.Get\r\n ? {}\r\n : {\r\n ...request.data,\r\n ...requestOptions.data,\r\n };\r\n const queryParameters = {\r\n 'x-algolia-agent': transporter.userAgent.value,\r\n ...transporter.queryParameters,\r\n ...dataQueryParameters,\r\n ...requestOptions.queryParameters,\r\n };\r\n let timeoutsCount = 0; // eslint-disable-line functional/no-let\r\n const retry = (hosts, // eslint-disable-line functional/prefer-readonly-type\r\n getTimeout) => {\r\n /**\r\n * We iterate on each host, until there is no host left.\r\n */\r\n const host = hosts.pop(); // eslint-disable-line functional/immutable-data\r\n if (host === undefined) {\r\n throw createRetryError(stackTraceWithoutCredentials(stackTrace));\r\n }\r\n const payload = {\r\n data,\r\n headers,\r\n method,\r\n url: serializeUrl(host, request.path, queryParameters),\r\n connectTimeout: getTimeout(timeoutsCount, transporter.timeouts.connect),\r\n responseTimeout: getTimeout(timeoutsCount, requestOptions.timeout),\r\n };\r\n /**\r\n * The stackFrame is pushed to the stackTrace so we\r\n * can have information about onRetry and onFailure\r\n * decisions.\r\n */\r\n const pushToStackTrace = (response) => {\r\n const stackFrame = {\r\n request: payload,\r\n response,\r\n host,\r\n triesLeft: hosts.length,\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n stackTrace.push(stackFrame);\r\n return stackFrame;\r\n };\r\n const decisions = {\r\n onSuccess: response => deserializeSuccess(response),\r\n onRetry(response) {\r\n const stackFrame = pushToStackTrace(response);\r\n /**\r\n * If response is a timeout, we increaset the number of\r\n * timeouts so we can increase the timeout later.\r\n */\r\n if (response.isTimedOut) {\r\n timeoutsCount++;\r\n }\r\n return Promise.all([\r\n /**\r\n * Failures are individually send the logger, allowing\r\n * the end user to debug / store stack frames even\r\n * when a retry error does not happen.\r\n */\r\n transporter.logger.info('Retryable failure', stackFrameWithoutCredentials(stackFrame)),\r\n /**\r\n * We also store the state of the host in failure cases. If the host, is\r\n * down it will remain down for the next 2 minutes. In a timeout situation,\r\n * this host will be added end of the list of hosts on the next request.\r\n */\r\n transporter.hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? HostStatusEnum.Timeouted : HostStatusEnum.Down)),\r\n ]).then(() => retry(hosts, getTimeout));\r\n },\r\n onFail(response) {\r\n pushToStackTrace(response);\r\n throw deserializeFailure(response, stackTraceWithoutCredentials(stackTrace));\r\n },\r\n };\r\n return transporter.requester.send(payload).then(response => {\r\n return retryDecision(response, decisions);\r\n });\r\n };\r\n /**\r\n * Finally, for each retryable host perform request until we got a non\r\n * retryable response. Some notes here:\r\n *\r\n * 1. The reverse here is applied so we can apply a `pop` later on => more performant.\r\n * 2. We also get from the retryable options a timeout multiplier that is tailored\r\n * for the current context.\r\n */\r\n return createRetryableOptions(transporter.hostsCache, statelessHosts).then(options => {\r\n return retry([...options.statelessHosts].reverse(), options.getTimeout);\r\n });\r\n}\n\nfunction createTransporter(options) {\r\n const { hostsCache, logger, requester, requestsCache, responsesCache, timeouts, userAgent, hosts, queryParameters, headers, } = options;\r\n const transporter = {\r\n hostsCache,\r\n logger,\r\n requester,\r\n requestsCache,\r\n responsesCache,\r\n timeouts,\r\n userAgent,\r\n headers,\r\n queryParameters,\r\n hosts: hosts.map(host => createStatelessHost(host)),\r\n read(request, requestOptions) {\r\n /**\r\n * First, we compute the user request options. Now, keep in mind,\r\n * that using request options the user is able to modified the intire\r\n * payload of the request. Such as headers, query parameters, and others.\r\n */\r\n const mappedRequestOptions = createMappedRequestOptions(requestOptions, transporter.timeouts.read);\r\n const createRetryableRequest = () => {\r\n /**\r\n * Then, we prepare a function factory that contains the construction of\r\n * the retryable request. At this point, we may *not* perform the actual\r\n * request. But we want to have the function factory ready.\r\n */\r\n return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Read) !== 0), request, mappedRequestOptions);\r\n };\r\n /**\r\n * Once we have the function factory ready, we need to determine of the\r\n * request is \"cacheable\" - should be cached. Note that, once again,\r\n * the user can force this option.\r\n */\r\n const cacheable = mappedRequestOptions.cacheable !== undefined\r\n ? mappedRequestOptions.cacheable\r\n : request.cacheable;\r\n /**\r\n * If is not \"cacheable\", we immediatly trigger the retryable request, no\r\n * need to check cache implementations.\r\n */\r\n if (cacheable !== true) {\r\n return createRetryableRequest();\r\n }\r\n /**\r\n * If the request is \"cacheable\", we need to first compute the key to ask\r\n * the cache implementations if this request is on progress or if the\r\n * response already exists on the cache.\r\n */\r\n const key = {\r\n request,\r\n mappedRequestOptions,\r\n transporter: {\r\n queryParameters: transporter.queryParameters,\r\n headers: transporter.headers,\r\n },\r\n };\r\n /**\r\n * With the computed key, we first ask the responses cache\r\n * implemention if this request was been resolved before.\r\n */\r\n return transporter.responsesCache.get(key, () => {\r\n /**\r\n * If the request has never resolved before, we actually ask if there\r\n * is a current request with the same key on progress.\r\n */\r\n return transporter.requestsCache.get(key, () => {\r\n return (transporter.requestsCache\r\n /**\r\n * Finally, if there is no request in progress with the same key,\r\n * this `createRetryableRequest()` will actually trigger the\r\n * retryable request.\r\n */\r\n .set(key, createRetryableRequest())\r\n .then(response => Promise.all([transporter.requestsCache.delete(key), response]), err => Promise.all([transporter.requestsCache.delete(key), Promise.reject(err)]))\r\n .then(([_, response]) => response));\r\n });\r\n }, {\r\n /**\r\n * Of course, once we get this response back from the server, we\r\n * tell response cache to actually store the received response\r\n * to be used later.\r\n */\r\n miss: response => transporter.responsesCache.set(key, response),\r\n });\r\n },\r\n write(request, requestOptions) {\r\n /**\r\n * On write requests, no cache mechanisms are applied, and we\r\n * proxy the request immediately to the requester.\r\n */\r\n return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Write) !== 0), request, createMappedRequestOptions(requestOptions, transporter.timeouts.write));\r\n },\r\n };\r\n return transporter;\r\n}\n\nfunction createUserAgent(version) {\r\n const userAgent = {\r\n value: `Algolia for JavaScript (${version})`,\r\n add(options) {\r\n const addedUserAgent = `; ${options.segment}${options.version !== undefined ? ` (${options.version})` : ''}`;\r\n if (userAgent.value.indexOf(addedUserAgent) === -1) {\r\n // eslint-disable-next-line functional/immutable-data\r\n userAgent.value = `${userAgent.value}${addedUserAgent}`;\r\n }\r\n return userAgent;\r\n },\r\n };\r\n return userAgent;\r\n}\n\nfunction deserializeSuccess(response) {\r\n // eslint-disable-next-line functional/no-try-statement\r\n try {\r\n return JSON.parse(response.content);\r\n }\r\n catch (e) {\r\n throw createDeserializationError(e.message, response);\r\n }\r\n}\r\nfunction deserializeFailure({ content, status }, stackFrame) {\r\n // eslint-disable-next-line functional/no-let\r\n let message = content;\r\n // eslint-disable-next-line functional/no-try-statement\r\n try {\r\n message = JSON.parse(content).message;\r\n }\r\n catch (e) {\r\n // ..\r\n }\r\n return createApiError(message, status, stackFrame);\r\n}\n\nfunction serializeUrl(host, path, queryParameters) {\r\n const queryParametersAsString = serializeQueryParameters(queryParameters);\r\n // eslint-disable-next-line functional/no-let\r\n let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`;\r\n if (queryParametersAsString.length) {\r\n url += `?${queryParametersAsString}`;\r\n }\r\n return url;\r\n}\r\nfunction serializeQueryParameters(parameters) {\r\n const isObjectOrArray = (value) => Object.prototype.toString.call(value) === '[object Object]' ||\r\n Object.prototype.toString.call(value) === '[object Array]';\r\n return Object.keys(parameters)\r\n .map(key => encode('%s=%s', key, isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]))\r\n .join('&');\r\n}\r\nfunction serializeData(request, requestOptions) {\r\n if (request.method === MethodEnum.Get ||\r\n (request.data === undefined && requestOptions.data === undefined)) {\r\n return undefined;\r\n }\r\n const data = Array.isArray(request.data)\r\n ? request.data\r\n : { ...request.data, ...requestOptions.data };\r\n return JSON.stringify(data);\r\n}\r\nfunction serializeHeaders(transporter, requestOptions) {\r\n const headers = {\r\n ...transporter.headers,\r\n ...requestOptions.headers,\r\n };\r\n const serializedHeaders = {};\r\n Object.keys(headers).forEach(header => {\r\n const value = headers[header];\r\n // @ts-ignore\r\n // eslint-disable-next-line functional/immutable-data\r\n serializedHeaders[header.toLowerCase()] = value;\r\n });\r\n return serializedHeaders;\r\n}\n\nfunction stackTraceWithoutCredentials(stackTrace) {\r\n return stackTrace.map(stackFrame => stackFrameWithoutCredentials(stackFrame));\r\n}\r\nfunction stackFrameWithoutCredentials(stackFrame) {\r\n const modifiedHeaders = stackFrame.request.headers['x-algolia-api-key']\r\n ? { 'x-algolia-api-key': '*****' }\r\n : {};\r\n return {\r\n ...stackFrame,\r\n request: {\r\n ...stackFrame.request,\r\n headers: {\r\n ...stackFrame.request.headers,\r\n ...modifiedHeaders,\r\n },\r\n },\r\n };\r\n}\n\nfunction createApiError(message, status, transporterStackTrace) {\r\n return {\r\n name: 'ApiError',\r\n message,\r\n status,\r\n transporterStackTrace,\r\n };\r\n}\n\nfunction createDeserializationError(message, response) {\r\n return {\r\n name: 'DeserializationError',\r\n message,\r\n response,\r\n };\r\n}\n\nfunction createRetryError(transporterStackTrace) {\r\n return {\r\n name: 'RetryError',\r\n message: 'Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.',\r\n transporterStackTrace,\r\n };\r\n}\n\nconst createSearchClient = options => {\r\n const appId = options.appId;\r\n const auth = createAuth(options.authMode !== undefined ? options.authMode : AuthMode.WithinHeaders, appId, options.apiKey);\r\n const transporter = createTransporter({\r\n hosts: [\r\n { url: `${appId}-dsn.algolia.net`, accept: CallEnum.Read },\r\n { url: `${appId}.algolia.net`, accept: CallEnum.Write },\r\n ].concat(shuffle([\r\n { url: `${appId}-1.algolianet.com` },\r\n { url: `${appId}-2.algolianet.com` },\r\n { url: `${appId}-3.algolianet.com` },\r\n ])),\r\n ...options,\r\n headers: {\r\n ...auth.headers(),\r\n ...{ 'content-type': 'application/x-www-form-urlencoded' },\r\n ...options.headers,\r\n },\r\n queryParameters: {\r\n ...auth.queryParameters(),\r\n ...options.queryParameters,\r\n },\r\n });\r\n const base = {\r\n transporter,\r\n appId,\r\n addAlgoliaAgent(segment, version) {\r\n transporter.userAgent.add({ segment, version });\r\n },\r\n clearCache() {\r\n return Promise.all([\r\n transporter.requestsCache.clear(),\r\n transporter.responsesCache.clear(),\r\n ]).then(() => undefined);\r\n },\r\n };\r\n return addMethods(base, options.methods);\r\n};\n\nconst customRequest = (base) => {\r\n return (request, requestOptions) => {\r\n if (request.method === MethodEnum.Get) {\r\n return base.transporter.read(request, requestOptions);\r\n }\r\n return base.transporter.write(request, requestOptions);\r\n };\r\n};\n\nconst initIndex = (base) => {\r\n return (indexName, options = {}) => {\r\n const searchIndex = {\r\n transporter: base.transporter,\r\n appId: base.appId,\r\n indexName,\r\n };\r\n return addMethods(searchIndex, options.methods);\r\n };\r\n};\n\nconst multipleQueries = (base) => {\r\n return (queries, requestOptions) => {\r\n const requests = queries.map(query => {\r\n return {\r\n ...query,\r\n params: serializeQueryParameters(query.params || {}),\r\n };\r\n });\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: '1/indexes/*/queries',\r\n data: {\r\n requests,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst multipleSearchForFacetValues = (base) => {\r\n return (queries, requestOptions) => {\r\n return Promise.all(queries.map(query => {\r\n const { facetName, facetQuery, ...params } = query.params;\r\n return initIndex(base)(query.indexName, {\r\n methods: { searchForFacetValues },\r\n }).searchForFacetValues(facetName, facetQuery, {\r\n ...requestOptions,\r\n ...params,\r\n });\r\n }));\r\n };\r\n};\n\nconst findAnswers = (base) => {\r\n return (query, queryLanguages, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/answers/%s/prediction', base.indexName),\r\n data: {\r\n query,\r\n queryLanguages,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst search = (base) => {\r\n return (query, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/indexes/%s/query', base.indexName),\r\n data: {\r\n query,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst searchForFacetValues = (base) => {\r\n return (facetName, facetQuery, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/indexes/%s/facets/%s/query', base.indexName, facetName),\r\n data: {\r\n facetQuery,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst LogLevelEnum = {\r\n Debug: 1,\r\n Info: 2,\r\n Error: 3,\r\n};\n\n/* eslint no-console: 0 */\r\nfunction createConsoleLogger(logLevel) {\r\n return {\r\n debug(message, args) {\r\n if (LogLevelEnum.Debug >= logLevel) {\r\n console.debug(message, args);\r\n }\r\n return Promise.resolve();\r\n },\r\n info(message, args) {\r\n if (LogLevelEnum.Info >= logLevel) {\r\n console.info(message, args);\r\n }\r\n return Promise.resolve();\r\n },\r\n error(message, args) {\r\n console.error(message, args);\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createBrowserXhrRequester() {\r\n return {\r\n send(request) {\r\n return new Promise((resolve) => {\r\n const baseRequester = new XMLHttpRequest();\r\n baseRequester.open(request.method, request.url, true);\r\n Object.keys(request.headers).forEach(key => baseRequester.setRequestHeader(key, request.headers[key]));\r\n const createTimeout = (timeout, content) => {\r\n return setTimeout(() => {\r\n baseRequester.abort();\r\n resolve({\r\n status: 0,\r\n content,\r\n isTimedOut: true,\r\n });\r\n }, timeout * 1000);\r\n };\r\n const connectTimeout = createTimeout(request.connectTimeout, 'Connection timeout');\r\n // eslint-disable-next-line functional/no-let\r\n let responseTimeout;\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onreadystatechange = () => {\r\n if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) {\r\n clearTimeout(connectTimeout);\r\n responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout');\r\n }\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onerror = () => {\r\n // istanbul ignore next\r\n if (baseRequester.status === 0) {\r\n clearTimeout(connectTimeout);\r\n clearTimeout(responseTimeout);\r\n resolve({\r\n content: baseRequester.responseText || 'Network request failed',\r\n status: baseRequester.status,\r\n isTimedOut: false,\r\n });\r\n }\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onload = () => {\r\n clearTimeout(connectTimeout);\r\n clearTimeout(responseTimeout);\r\n resolve({\r\n content: baseRequester.responseText,\r\n status: baseRequester.status,\r\n isTimedOut: false,\r\n });\r\n };\r\n baseRequester.send(request.data);\r\n });\r\n },\r\n };\r\n}\n\nfunction algoliasearch(appId, apiKey, options) {\r\n const commonOptions = {\r\n appId,\r\n apiKey,\r\n timeouts: {\r\n connect: 1,\r\n read: 2,\r\n write: 30,\r\n },\r\n requester: createBrowserXhrRequester(),\r\n logger: createConsoleLogger(LogLevelEnum.Error),\r\n responsesCache: createInMemoryCache(),\r\n requestsCache: createInMemoryCache({ serializable: false }),\r\n hostsCache: createFallbackableCache({\r\n caches: [\r\n createBrowserLocalStorageCache({ key: `${version}-${appId}` }),\r\n createInMemoryCache(),\r\n ],\r\n }),\r\n userAgent: createUserAgent(version).add({\r\n segment: 'Browser',\r\n version: 'lite',\r\n }),\r\n authMode: AuthMode.WithinQueryParameters,\r\n };\r\n return createSearchClient({\r\n ...commonOptions,\r\n ...options,\r\n methods: {\r\n search: multipleQueries,\r\n searchForFacetValues: multipleSearchForFacetValues,\r\n multipleQueries,\r\n multipleSearchForFacetValues,\r\n customRequest,\r\n initIndex: base => (indexName) => {\r\n return initIndex(base)(indexName, {\r\n methods: { search, searchForFacetValues, findAnswers },\r\n });\r\n },\r\n },\r\n });\r\n}\r\n// eslint-disable-next-line functional/immutable-data\r\nalgoliasearch.version = version;\n\nexport default algoliasearch;\n","export var version = '3.6.0';","var _excluded = [\"footer\", \"searchBox\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport { createAutocomplete } from '@algolia/autocomplete-core';\nimport React from 'react';\nimport { MAX_QUERY_SIZE } from './constants';\nimport { Footer } from './Footer';\nimport { Hit } from './Hit';\nimport { ScreenState } from './ScreenState';\nimport { SearchBox } from './SearchBox';\nimport { createStoredSearches } from './stored-searches';\nimport { useSearchClient } from './useSearchClient';\nimport { useTouchEvents } from './useTouchEvents';\nimport { useTrapFocus } from './useTrapFocus';\nimport { groupBy, identity, noop, removeHighlightTags, isModifierEvent } from './utils';\nexport function DocSearchModal(_ref) {\n var appId = _ref.appId,\n apiKey = _ref.apiKey,\n indexName = _ref.indexName,\n _ref$placeholder = _ref.placeholder,\n placeholder = _ref$placeholder === void 0 ? 'Search docs' : _ref$placeholder,\n searchParameters = _ref.searchParameters,\n maxResultsPerGroup = _ref.maxResultsPerGroup,\n _ref$onClose = _ref.onClose,\n onClose = _ref$onClose === void 0 ? noop : _ref$onClose,\n _ref$transformItems = _ref.transformItems,\n transformItems = _ref$transformItems === void 0 ? identity : _ref$transformItems,\n _ref$hitComponent = _ref.hitComponent,\n hitComponent = _ref$hitComponent === void 0 ? Hit : _ref$hitComponent,\n _ref$resultsFooterCom = _ref.resultsFooterComponent,\n resultsFooterComponent = _ref$resultsFooterCom === void 0 ? function () {\n return null;\n } : _ref$resultsFooterCom,\n navigator = _ref.navigator,\n _ref$initialScrollY = _ref.initialScrollY,\n initialScrollY = _ref$initialScrollY === void 0 ? 0 : _ref$initialScrollY,\n _ref$transformSearchC = _ref.transformSearchClient,\n transformSearchClient = _ref$transformSearchC === void 0 ? identity : _ref$transformSearchC,\n _ref$disableUserPerso = _ref.disableUserPersonalization,\n disableUserPersonalization = _ref$disableUserPerso === void 0 ? false : _ref$disableUserPerso,\n _ref$initialQuery = _ref.initialQuery,\n initialQueryFromProp = _ref$initialQuery === void 0 ? '' : _ref$initialQuery,\n _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n getMissingResultsUrl = _ref.getMissingResultsUrl,\n _ref$insights = _ref.insights,\n insights = _ref$insights === void 0 ? false : _ref$insights;\n\n var footerTranslations = translations.footer,\n searchBoxTranslations = translations.searchBox,\n screenStateTranslations = _objectWithoutProperties(translations, _excluded);\n\n var _React$useState = React.useState({\n query: '',\n collections: [],\n completion: null,\n context: {},\n isOpen: false,\n activeItemId: null,\n status: 'idle'\n }),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n state = _React$useState2[0],\n setState = _React$useState2[1];\n\n var containerRef = React.useRef(null);\n var modalRef = React.useRef(null);\n var formElementRef = React.useRef(null);\n var dropdownRef = React.useRef(null);\n var inputRef = React.useRef(null);\n var snippetLength = React.useRef(10);\n var initialQueryFromSelection = React.useRef(typeof window !== 'undefined' ? window.getSelection().toString().slice(0, MAX_QUERY_SIZE) : '').current;\n var initialQuery = React.useRef(initialQueryFromProp || initialQueryFromSelection).current;\n var searchClient = useSearchClient(appId, apiKey, transformSearchClient);\n var favoriteSearches = React.useRef(createStoredSearches({\n key: \"__DOCSEARCH_FAVORITE_SEARCHES__\".concat(indexName),\n limit: 10\n })).current;\n var recentSearches = React.useRef(createStoredSearches({\n key: \"__DOCSEARCH_RECENT_SEARCHES__\".concat(indexName),\n // We display 7 recent searches and there's no favorites, but only\n // 4 when there are favorites.\n limit: favoriteSearches.getAll().length === 0 ? 7 : 4\n })).current;\n var saveRecentSearch = React.useCallback(function saveRecentSearch(item) {\n if (disableUserPersonalization) {\n return;\n } // We don't store `content` record, but their parent if available.\n\n\n var search = item.type === 'content' ? item.__docsearch_parent : item; // We save the recent search only if it's not favorited.\n\n if (search && favoriteSearches.getAll().findIndex(function (x) {\n return x.objectID === search.objectID;\n }) === -1) {\n recentSearches.add(search);\n }\n }, [favoriteSearches, recentSearches, disableUserPersonalization]);\n var sendItemClickEvent = React.useCallback(function (item) {\n if (!state.context.algoliaInsightsPlugin || !item.__autocomplete_id) return;\n var insightsItem = item;\n var insightsClickParams = {\n eventName: 'Item Selected',\n index: insightsItem.__autocomplete_indexName,\n items: [insightsItem],\n positions: [item.__autocomplete_id],\n queryID: insightsItem.__autocomplete_queryID\n };\n state.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(insightsClickParams);\n }, [state.context.algoliaInsightsPlugin]);\n var autocomplete = React.useMemo(function () {\n return createAutocomplete({\n id: 'docsearch',\n defaultActiveItemId: 0,\n placeholder: placeholder,\n openOnFocus: true,\n initialState: {\n query: initialQuery,\n context: {\n searchSuggestions: []\n }\n },\n insights: insights,\n navigator: navigator,\n onStateChange: function onStateChange(props) {\n setState(props.state);\n },\n getSources: function getSources(_ref2) {\n var query = _ref2.query,\n sourcesState = _ref2.state,\n setContext = _ref2.setContext,\n setStatus = _ref2.setStatus;\n\n if (!query) {\n if (disableUserPersonalization) {\n return [];\n }\n\n return [{\n sourceId: 'recentSearches',\n onSelect: function onSelect(_ref3) {\n var item = _ref3.item,\n event = _ref3.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref4) {\n var item = _ref4.item;\n return item.url;\n },\n getItems: function getItems() {\n return recentSearches.getAll();\n }\n }, {\n sourceId: 'favoriteSearches',\n onSelect: function onSelect(_ref5) {\n var item = _ref5.item,\n event = _ref5.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref6) {\n var item = _ref6.item;\n return item.url;\n },\n getItems: function getItems() {\n return favoriteSearches.getAll();\n }\n }];\n }\n\n var insightsActive = Boolean(insights);\n return searchClient.search([{\n query: query,\n indexName: indexName,\n params: _objectSpread({\n attributesToRetrieve: ['hierarchy.lvl0', 'hierarchy.lvl1', 'hierarchy.lvl2', 'hierarchy.lvl3', 'hierarchy.lvl4', 'hierarchy.lvl5', 'hierarchy.lvl6', 'content', 'type', 'url'],\n attributesToSnippet: [\"hierarchy.lvl1:\".concat(snippetLength.current), \"hierarchy.lvl2:\".concat(snippetLength.current), \"hierarchy.lvl3:\".concat(snippetLength.current), \"hierarchy.lvl4:\".concat(snippetLength.current), \"hierarchy.lvl5:\".concat(snippetLength.current), \"hierarchy.lvl6:\".concat(snippetLength.current), \"content:\".concat(snippetLength.current)],\n snippetEllipsisText: '…',\n highlightPreTag: '',\n highlightPostTag: '',\n hitsPerPage: 20,\n clickAnalytics: insightsActive\n }, searchParameters)\n }]).catch(function (error) {\n // The Algolia `RetryError` happens when all the servers have\n // failed, meaning that there's no chance the response comes\n // back. This is the right time to display an error.\n // See https://github.com/algolia/algoliasearch-client-javascript/blob/2ffddf59bc765cd1b664ee0346b28f00229d6e12/packages/transporter/src/errors/createRetryError.ts#L5\n if (error.name === 'RetryError') {\n setStatus('error');\n }\n\n throw error;\n }).then(function (_ref7) {\n var results = _ref7.results;\n var firstResult = results[0];\n var hits = firstResult.hits,\n nbHits = firstResult.nbHits;\n var sources = groupBy(hits, function (hit) {\n return removeHighlightTags(hit);\n }, maxResultsPerGroup); // We store the `lvl0`s to display them as search suggestions\n // in the \"no results\" screen.\n\n if (sourcesState.context.searchSuggestions.length < Object.keys(sources).length) {\n setContext({\n searchSuggestions: Object.keys(sources)\n });\n }\n\n setContext({\n nbHits: nbHits\n });\n var insightsParams = {};\n\n if (insightsActive) {\n insightsParams = {\n __autocomplete_indexName: indexName,\n __autocomplete_queryID: firstResult.queryID,\n __autocomplete_algoliaCredentials: {\n appId: appId,\n apiKey: apiKey\n }\n };\n }\n\n return Object.values(sources).map(function (items, index) {\n return {\n sourceId: \"hits\".concat(index),\n onSelect: function onSelect(_ref8) {\n var item = _ref8.item,\n event = _ref8.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref9) {\n var item = _ref9.item;\n return item.url;\n },\n getItems: function getItems() {\n return Object.values(groupBy(items, function (item) {\n return item.hierarchy.lvl1;\n }, maxResultsPerGroup)).map(transformItems).map(function (groupedHits) {\n return groupedHits.map(function (item) {\n var parent = null;\n var potentialParent = groupedHits.find(function (siblingItem) {\n return siblingItem.type === 'lvl1' && siblingItem.hierarchy.lvl1 === item.hierarchy.lvl1;\n });\n\n if (item.type !== 'lvl1' && potentialParent) {\n parent = potentialParent;\n }\n\n return _objectSpread(_objectSpread({}, item), {}, {\n __docsearch_parent: parent\n }, insightsParams);\n });\n }).flat();\n }\n };\n });\n });\n }\n });\n }, [indexName, searchParameters, maxResultsPerGroup, searchClient, onClose, recentSearches, favoriteSearches, saveRecentSearch, initialQuery, placeholder, navigator, transformItems, disableUserPersonalization, insights, appId, apiKey]);\n var getEnvironmentProps = autocomplete.getEnvironmentProps,\n getRootProps = autocomplete.getRootProps,\n refresh = autocomplete.refresh;\n useTouchEvents({\n getEnvironmentProps: getEnvironmentProps,\n panelElement: dropdownRef.current,\n formElement: formElementRef.current,\n inputElement: inputRef.current\n });\n useTrapFocus({\n container: containerRef.current\n });\n React.useEffect(function () {\n document.body.classList.add('DocSearch--active');\n return function () {\n var _window$scrollTo, _window;\n\n document.body.classList.remove('DocSearch--active'); // IE11 doesn't support `scrollTo` so we check that the method exists\n // first.\n\n (_window$scrollTo = (_window = window).scrollTo) === null || _window$scrollTo === void 0 || _window$scrollTo.call(_window, 0, initialScrollY);\n }; // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(function () {\n var isMobileMediaQuery = window.matchMedia('(max-width: 768px)');\n\n if (isMobileMediaQuery.matches) {\n snippetLength.current = 5;\n }\n }, []);\n React.useEffect(function () {\n if (dropdownRef.current) {\n dropdownRef.current.scrollTop = 0;\n }\n }, [state.query]); // We don't focus the input when there's an initial query (i.e. Selection\n // Search) because users rather want to see the results directly, without the\n // keyboard appearing.\n // We therefore need to refresh the autocomplete instance to load all the\n // results, which is usually triggered on focus.\n\n React.useEffect(function () {\n if (initialQuery.length > 0) {\n refresh();\n\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }\n }, [initialQuery, refresh]); // We rely on a CSS property to set the modal height to the full viewport height\n // because all mobile browsers don't compute their height the same way.\n // See https://css-tricks.com/the-trick-to-viewport-units-on-mobile/\n\n React.useEffect(function () {\n function setFullViewportHeight() {\n if (modalRef.current) {\n var vh = window.innerHeight * 0.01;\n modalRef.current.style.setProperty('--docsearch-vh', \"\".concat(vh, \"px\"));\n }\n }\n\n setFullViewportHeight();\n window.addEventListener('resize', setFullViewportHeight);\n return function () {\n window.removeEventListener('resize', setFullViewportHeight);\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: containerRef\n }, getRootProps({\n 'aria-expanded': true\n }), {\n className: ['DocSearch', 'DocSearch-Container', state.status === 'stalled' && 'DocSearch-Container--Stalled', state.status === 'error' && 'DocSearch-Container--Errored'].filter(Boolean).join(' '),\n role: \"button\",\n tabIndex: 0,\n onMouseDown: function onMouseDown(event) {\n if (event.target === event.currentTarget) {\n onClose();\n }\n }\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Modal\",\n ref: modalRef\n }, /*#__PURE__*/React.createElement(\"header\", {\n className: \"DocSearch-SearchBar\",\n ref: formElementRef\n }, /*#__PURE__*/React.createElement(SearchBox, _extends({}, autocomplete, {\n state: state,\n autoFocus: initialQuery.length === 0,\n inputRef: inputRef,\n isFromSelection: Boolean(initialQuery) && initialQuery === initialQueryFromSelection,\n translations: searchBoxTranslations,\n onClose: onClose\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown\",\n ref: dropdownRef\n }, /*#__PURE__*/React.createElement(ScreenState, _extends({}, autocomplete, {\n indexName: indexName,\n state: state,\n hitComponent: hitComponent,\n resultsFooterComponent: resultsFooterComponent,\n disableUserPersonalization: disableUserPersonalization,\n recentSearches: recentSearches,\n favoriteSearches: favoriteSearches,\n inputRef: inputRef,\n translations: screenStateTranslations,\n getMissingResultsUrl: getMissingResultsUrl,\n onItemClick: function onItemClick(item, event) {\n // If insights is active, send insights click event\n sendItemClickEvent(item);\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n }\n }))), /*#__PURE__*/React.createElement(\"footer\", {\n className: \"DocSearch-Footer\"\n }, /*#__PURE__*/React.createElement(Footer, {\n translations: footerTranslations\n }))));\n}","import algoliasearch from 'algoliasearch/dist/algoliasearch-lite.esm.browser';\nimport React from 'react';\nimport { version } from './version';\nexport function useSearchClient(appId, apiKey, transformSearchClient) {\n var searchClient = React.useMemo(function () {\n var client = algoliasearch(appId, apiKey);\n client.addAlgoliaAgent('docsearch', version); // Since DocSearch.js relies on DocSearch React with an alias to Preact,\n // we cannot add the `docsearch-react` user agent by default, otherwise\n // it would also be sent on a DocSearch.js integration.\n // We therefore only add the `docsearch-react` user agent if `docsearch.js`\n // is not present.\n\n if (/docsearch.js \\(.*\\)/.test(client.transporter.userAgent.value) === false) {\n client.addAlgoliaAgent('docsearch-react', version);\n }\n\n return transformSearchClient(client);\n }, [appId, apiKey, transformSearchClient]);\n return searchClient;\n}","import React from 'react';\nexport function useTouchEvents(_ref) {\n var getEnvironmentProps = _ref.getEnvironmentProps,\n panelElement = _ref.panelElement,\n formElement = _ref.formElement,\n inputElement = _ref.inputElement;\n React.useEffect(function () {\n if (!(panelElement && formElement && inputElement)) {\n return undefined;\n }\n\n var _getEnvironmentProps = getEnvironmentProps({\n panelElement: panelElement,\n formElement: formElement,\n inputElement: inputElement\n }),\n onTouchStart = _getEnvironmentProps.onTouchStart,\n onTouchMove = _getEnvironmentProps.onTouchMove;\n\n window.addEventListener('touchstart', onTouchStart);\n window.addEventListener('touchmove', onTouchMove);\n return function () {\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchmove', onTouchMove);\n };\n }, [getEnvironmentProps, panelElement, formElement, inputElement]);\n}","import React from 'react';\nexport function useTrapFocus(_ref) {\n var container = _ref.container;\n React.useEffect(function () {\n if (!container) {\n return undefined;\n }\n\n var focusableElements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), input:not([disabled])');\n var firstElement = focusableElements[0];\n var lastElement = focusableElements[focusableElements.length - 1];\n\n function trapFocus(event) {\n if (event.key !== 'Tab') {\n return;\n }\n\n if (event.shiftKey) {\n if (document.activeElement === firstElement) {\n event.preventDefault();\n lastElement.focus();\n }\n } else if (document.activeElement === lastElement) {\n event.preventDefault();\n firstElement.focus();\n }\n }\n\n container.addEventListener('keydown', trapFocus);\n return function () {\n container.removeEventListener('keydown', trapFocus);\n };\n }, [container]);\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport React from 'react';\nimport { createPortal } from 'react-dom';\nimport { DocSearchButton } from './DocSearchButton';\nimport { DocSearchModal } from './DocSearchModal';\nimport { useDocSearchKeyboardEvents } from './useDocSearchKeyboardEvents';\nexport function DocSearch(props) {\n var _props$translations, _props$translations2;\n\n var searchButtonRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n isOpen = _React$useState2[0],\n setIsOpen = _React$useState2[1];\n\n var _React$useState3 = React.useState((props === null || props === void 0 ? void 0 : props.initialQuery) || undefined),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n initialQuery = _React$useState4[0],\n setInitialQuery = _React$useState4[1];\n\n var onOpen = React.useCallback(function () {\n setIsOpen(true);\n }, [setIsOpen]);\n var onClose = React.useCallback(function () {\n setIsOpen(false);\n }, [setIsOpen]);\n var onInput = React.useCallback(function (event) {\n setIsOpen(true);\n setInitialQuery(event.key);\n }, [setIsOpen, setInitialQuery]);\n useDocSearchKeyboardEvents({\n isOpen: isOpen,\n onOpen: onOpen,\n onClose: onClose,\n onInput: onInput,\n searchButtonRef: searchButtonRef\n });\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DocSearchButton, {\n ref: searchButtonRef,\n translations: props === null || props === void 0 || (_props$translations = props.translations) === null || _props$translations === void 0 ? void 0 : _props$translations.button,\n onClick: onOpen\n }), isOpen && createPortal( /*#__PURE__*/React.createElement(DocSearchModal, _extends({}, props, {\n initialScrollY: window.scrollY,\n initialQuery: initialQuery,\n translations: props === null || props === void 0 || (_props$translations2 = props.translations) === null || _props$translations2 === void 0 ? void 0 : _props$translations2.modal,\n onClose: onClose\n })), document.body));\n}","import React from 'react';\n\nfunction isEditingContent(event) {\n var element = event.target;\n var tagName = element.tagName;\n return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';\n}\n\nexport function useDocSearchKeyboardEvents(_ref) {\n var isOpen = _ref.isOpen,\n onOpen = _ref.onOpen,\n onClose = _ref.onClose,\n onInput = _ref.onInput,\n searchButtonRef = _ref.searchButtonRef;\n React.useEffect(function () {\n function onKeyDown(event) {\n var _event$key;\n\n function open() {\n // We check that no other DocSearch modal is showing before opening\n // another one.\n if (!document.body.classList.contains('DocSearch--active')) {\n onOpen();\n }\n }\n\n if (event.keyCode === 27 && isOpen || // The `Cmd+K` shortcut both opens and closes the modal.\n // We need to check for `event.key` because it can be `undefined` with\n // Chrome's autofill feature.\n // See https://github.com/paperjs/paper.js/issues/1398\n ((_event$key = event.key) === null || _event$key === void 0 ? void 0 : _event$key.toLowerCase()) === 'k' && (event.metaKey || event.ctrlKey) || // The `/` shortcut opens but doesn't close the modal because it's\n // a character.\n !isEditingContent(event) && event.key === '/' && !isOpen) {\n event.preventDefault();\n\n if (isOpen) {\n onClose();\n } else if (!document.body.classList.contains('DocSearch--active')) {\n open();\n }\n }\n\n if (searchButtonRef && searchButtonRef.current === document.activeElement && onInput) {\n if (/[a-zA-Z0-9]/.test(String.fromCharCode(event.keyCode))) {\n onInput(event);\n }\n }\n }\n\n window.addEventListener('keydown', onKeyDown);\n return function () {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [isOpen, onOpen, onClose, onInput, searchButtonRef]);\n}","import type { DocSearchProps as DocSearchComponentProps } from '@docsearch/react';\nimport { DocSearch, version } from '@docsearch/react';\nimport React, { render } from 'preact/compat';\n\nfunction getHTMLElement(\n value: HTMLElement | string,\n environment: DocSearchProps['environment'] = window\n): HTMLElement {\n if (typeof value === 'string') {\n return environment.document.querySelector(value)!;\n }\n\n return value;\n}\n\ninterface DocSearchProps extends DocSearchComponentProps {\n container: HTMLElement | string;\n environment?: typeof window;\n}\n\nexport function docsearch(props: DocSearchProps) {\n render(\n {\n searchClient.addAlgoliaAgent('docsearch.js', version);\n\n return props.transformSearchClient\n ? props.transformSearchClient(searchClient)\n : searchClient;\n }}\n />,\n getHTMLElement(props.container, props.environment)\n );\n}\n"],"names":["EMPTY_OBJ","EMPTY_ARR","IS_NON_DIMENSIONAL","currentIndex","currentComponent","prevRaf","currentHook","afterPaintEffects","oldBeforeDiff","options","oldBeforeRender","oldAfterDiff","diffed","oldCommit","oldBeforeUnmount","unmount","getHookState","index","type","hooks","__","__h","length","push","useState","initialState","useReducer","invokeOrReturn","reducer","init","hookState","_reducer","n","nextValue","action","setState","useEffect","callback","args","state","argsChanged","useLayoutEffect","useMemo","factory","flushAfterPaintEffects","forEach","t","component","invokeCleanup","invokeEffect","e","vnode","c","requestAnimationFrame","raf","done","clearTimeout","timeout","HAS_RAF","cancelAnimationFrame","setTimeout","commitQueue","some","filter","cb","hook","comp","oldArgs","newArgs","arg","f","assign","obj","props","i","shallowDiffers","a","b","initialValue","current","ref","createHandle","concat","context","provider","sub","value","formatter","useDebugValue","ControlKeyIcon","React","createElement","width","height","className","d","strokeWidth","stroke","fill","strokeLinecap","SearchIcon","viewBox","fillRule","strokeLinejoin","_excluded","_extends","Object","target","arguments","source","key","prototype","hasOwnProperty","call","apply","this","_slicedToArray","arr","Array","isArray","_arrayWithHoles","_i","Symbol","iterator","_s","_e","_arr","_n","_d","next","err","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","len","arr2","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","ACTION_KEY_DEFAULT","DocSearchButton","forwardRef","_ref","_ref$translations","translations","_translations$buttonT","buttonText","_translations$buttonA","buttonAriaLabel","_useState2","setKey","navigator","platform","Fragment","DocSearchButtonKey","reactsToKey","_ref2","children","_useState4","isKeyDown","setIsKeyDown","window","addEventListener","handleKeyDown","handleKeyUp","removeEventListener","debounce","fn","time","timerId","undefined","_len","_key","flatten","values","reduce","autocompleteId","getItemsCount","collections","sum","collection","items","isPrimitive","isEqual","first","second","_Object$keys","noop","userAgents","segment","version","createClickedEvent","item","__autocomplete_indexName","positions","findIndex","x","objectID","queryID","__autocomplete_queryID","algoliaSource","_x","_r","return","_excluded2","_typeof","_toConsumableArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","ownKeys","object","enumerableOnly","symbols","sym","getOwnPropertyDescriptor","enumerable","_objectSpread","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","input","hint","prim","toPrimitive","res","String","Number","_toPrimitive","_toPropertyKey","configurable","writable","chunk","chunkSize","chunks","objectIDs","mapToInsightsParamsApi","params","map","param","createSearchInsightsApi","searchInsights","_split$map2","major","minor","canSendHeaders","split","sendToInsights","method","payloads","_items$0$__autocomple","__autocomplete_algoliaCredentials","headers","appId","apiKey","setUserToken","userToken","clickedObjectIDsAfterSearch","clickedObjectIDs","_len2","_key2","clickedFilters","_len3","_key3","convertedObjectIDsAfterSearch","_len4","_key4","convertedObjectIDs","_len5","_key5","convertedFilters","_len6","_key6","viewedObjectIDs","_len7","_key7","acc","_ref3","_ref4","payload","_ref5","viewedFilters","_len8","_key8","createViewedEvents","itemsByIndexName","_acc$current$__autoco","indexName","isAlgoliaInsightsHit","hit","ALGOLIA_INSIGHTS_VERSION","ALGOLIA_INSIGHTS_SRC","sendViewedObjectIDs","onItemsChange","insights","insightsEvents","event","eventName","createAlgoliaInsightsPlugin","_getOptions","_ref8","onSelect","_ref9","onActive","getOptions","providedInsightsClient","insightsClient","onSelectEvent","onActiveEvent","safelyRunOnBrowser","pointer","AlgoliaAnalyticsObject","queue","environment","errorMessage","script","document","async","src","onerror","console","error","body","appendChild","cause","loadInsights","previousItems","debouncedOnStateChange","isOpen","subscribe","setContext","algoliaInsightsPlugin","__algoliaSearchParameters","clickAnalytics","_ref6","onStateChange","_ref7","__autocomplete_pluginOptions","createInternalCancelablePromise","promise","then","onfulfilled","onrejected","createCallback","catch","finally","onfinally","onCancelList","cancel","isCanceled","callbacks","cancelable","onResult","fallback","getNextActiveItemId","moveAmount","baseIndex","itemCount","defaultActiveItemId","numericIndex","getActiveItem","collectionIndex","collectionsCount","activeItemId","getCollectionFromActiveItemId","isOffsetFound","counter","previousItemsOffset","currentCollection","getRelativeActiveItemId","itemInputValue","getItemInputValue","itemUrl","getItemUrl","regex","createStore","onStoreStateChange","list","getState","dispatch","prevState","pendingRequests","add","cancelablePromise","cancelAll","isEmpty","getDefaultProps","pluginSubscribers","_props$id","plugins","debug","openOnFocus","placeholder","autoFocus","stallThreshold","shouldPanelOpen","reshape","sources","id","query","completion","status","_props$onStateChange","_x$onStateChange","onSubmit","_props$onSubmit","_x$onSubmit","onReset","_props$onReset","_x$onReset","getSources","Promise","all","plugin","Boolean","seenSourceIds","resolve","maybeSource","sourceId","includes","Error","JSON","stringify","defaultSource","setIsOpen","onResolve","__default","normalizedSource","getNormalizedSources","nested","_x$onSelect","_x$onActive","_x$onResolve","navigate","location","navigateNewTab","windowReference","open","focus","navigateNewWindow","isDescription","execute","preResolve","itemsOrDescription","description","contextParameters","requesterId","_state$context$key","requests","queries","transformResponse","searchClient","container","find","_container$items","request","maybeDescription","responses","postResolve","store","rawResults","matches","response","results","transform","hits","result","facetHits","_facetHits","facetHit","label","count","_highlightResult","highlighted","every","basePromiseId","latestResolvedId","latestResolvedValue","lastStalledId","runConcurrentSafePromise","currentPromiseId","onInput","_ref$nextState","nextState","refresh","setters","setCollections","setQuery","setActiveItemId","setStatus","_nextState$isOpen","_request","getItems","originalSourcesBySourceId","sourcesBySourceId","_nextState$isOpen2","isPanelOpen","highlightedItem","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","getPropGetters","getAutocompleteId","instanceId","getEnvironmentProps","providedProps","inputElement","formElement","panelElement","onMouseDownOrTouchStart","contextNode","parent","child","contains","onTouchStart","onMouseDown","onTouchMove","activeElement","blur","getRootProps","rest","role","getFormProps","noValidate","_providedProps$inputE","preventDefault","_providedProps$inputE2","getLabelProps","sourceIndex","htmlFor","getInputProps","_props$environment$na","onFocus","_ref2$maxLength","maxLength","activeItem","shouldFallbackKeyHint","userAgent","match","isSamsung","enterKeyHint","autoComplete","autoCorrect","autoCapitalize","spellCheck","onChange","currentTarget","onKeyDown","triggerScrollIntoView","nodeItem","getElementById","scrollIntoViewIfNeeded","scrollIntoView","triggerOnActive","nextActiveItemId","metaKey","ctrlKey","shiftKey","altKey","_onKeyDown","onBlur","onClick","getPanelProps","onMouseLeave","getListProps","getItemProps","__autocomplete_id","onMouseMove","_item","_source","getMetadata","_","_options$__autocomple","_options$__autocomple2","_options$__autocomple3","optionsKey","__autocomplete_metadata","extraOptions","ua","getCompletion","_getActiveItem","stateReducer","_nextState","createAutocomplete","subscribers","rawValue","baseItemId","getAutocompleteSetters","propGetters","Event","insightsParams","_plugin$subscribe","_environment$navigato","_environment$navigato2","metadata","metadataContainer","headRef","querySelector","content","injectMetadata","AlgoliaLogo","_translations$searchB","searchByText","href","hostname","rel","xmlns","y","rx","ry","CommandIcon","ariaLabel","Footer","_translations$selectT","selectText","_translations$selectK","selectKeyAriaLabel","_translations$navigat","navigateText","_translations$navigat2","navigateUpKeyAriaLabel","_translations$navigat3","navigateDownKeyAriaLabel","_translations$closeTe","closeText","_translations$closeKe","closeKeyAriaLabel","Hit","url","LoadingIcon","strokeOpacity","cx","cy","r","attributeName","to","dur","repeatCount","RecentIcon","ResetIcon","SelectIcon","LvlIcon","SourceIcon","ContentIcon","AnchorIcon","StarIcon","ErrorIcon","NoResultsIcon","ErrorScreen","_translations$titleTe","titleText","_translations$helpTex","helpText","NoResultsScreen","_translations$noResul","noResultsText","_translations$suggest","suggestedQueryText","_translations$reportM","reportMissingResultsText","_translations$reportM2","reportMissingResultsLinkText","searchSuggestions","search","toLowerCase","inputRef","getMissingResultsUrl","getPropertyByPath","path","prev","Snippet","attribute","_ref$tagName","tagName","dangerouslySetInnerHTML","__html","Results","title","Result","join","renderIcon","renderAction","onItemClick","hitComponent","_React$useState2","isDeleting","setIsDeleting","_React$useState4","isFavoriting","setIsFavoriting","useRef","__docsearch_parent","onTransitionEnd","hierarchy","runDeleteTransition","runFavoriteTransition","groupBy","predicate","maxResultsPerGroup","identity","isModifierEvent","button","regexHighlightTags","regexHasHighlightTags","RegExp","removeHighlightTags","_internalDocSearchHit","_hit$_highlightResult","internalDocSearchHit","lvl0","replace","ResultsScreen","_collection$items","resultsFooterComponent","StartScreen","_translations$recentS","recentSearchesTitle","_translations$noRecen","noRecentSearchesText","_translations$saveRec","saveRecentSearchButtonTitle","_translations$removeR","removeRecentSearchButtonTitle","_translations$favorit","favoriteSearchesTitle","_translations$removeF","removeFavoriteSearchButtonTitle","hasCollections","disableUserPersonalization","stopPropagation","favoriteSearches","recentSearches","remove","ScreenState","memo","errorScreen","noResultsScreen","startScreen","_prevProps","nextProps","SearchBox","_translations$resetBu","resetButtonTitle","_translations$resetBu2","resetButtonAriaLabel","_translations$cancelB","cancelButtonText","_translations$cancelB2","cancelButtonAriaLabel","_translations$searchI","searchInputLabel","isFromSelection","select","hidden","onClose","createStorage","localStorage","setItem","removeItem","isLocalStorageSupported","getItem","parse","createStoredSearches","_ref$limit","limit","storage","_snippetResult","isQueryAlreadySaved","splice","unshift","getAll","createBrowserLocalStorageCache","namespaceKey","getStorage","getNamespace","setNamespace","namespace","removeOutdatedCacheItems","timeToLive","filteredNamespaceWithoutOldFormattedCacheItems","fromEntries","entries","timestamp","filteredNamespaceWithoutExpiredItems","cacheItem","currentTimestamp","Date","getTime","get","defaultValue","events","miss","keyAsString","exists","set","delete","clear","createFallbackableCache","caches","shift","createInMemoryCache","serializable","cache","shuffle","array","Math","floor","random","addMethods","base","methods","encode","format","encodeURIComponent","AuthMode","WithinQueryParameters","WithinHeaders","createMappedRequestOptions","requestOptions","data","queryParameters","cacheable","CallEnum","Read","Write","Any","HostStatusEnum","EXPIRATION_DELAY","createStatefulHost","host","lastUpdate","now","createStatelessHost","protocol","accept","MethodEnum","createRetryableOptions","hostsCache","statelessHosts","statelessHost","statefulHosts","hostsUp","isStatefulHostUp","hostsTimeouted","isStatefulHostTimeouted","hostsAvailable","getTimeout","timeoutsCount","baseTimeout","retryableRequest","transporter","stackTrace","serializeData","serializedHeaders","header","serializeHeaders","dataQueryParameters","retry","hosts","pop","message","transporterStackTrace","stackTraceWithoutCredentials","serializeUrl","connectTimeout","timeouts","connect","responseTimeout","pushToStackTrace","stackFrame","triesLeft","decisions","onSuccess","createDeserializationError","deserializeSuccess","onRetry","isTimedOut","logger","info","stackFrameWithoutCredentials","onFail","createApiError","deserializeFailure","requester","send","outcomes","isNetworkError","isRetryable","retryDecision","reverse","createUserAgent","addedUserAgent","queryParametersAsString","serializeQueryParameters","charAt","substr","parameters","modifiedHeaders","createSearchClient","auth","authMode","credentials","createAuth","requestsCache","responsesCache","read","mappedRequestOptions","createRetryableRequest","reject","write","createTransporter","addAlgoliaAgent","clearCache","customRequest","initIndex","searchIndex","multipleQueries","multipleSearchForFacetValues","facetName","facetQuery","searchForFacetValues","findAnswers","queryLanguages","LogLevelEnum","algoliasearch","logLevel","commonOptions","baseRequester","XMLHttpRequest","setRequestHeader","createTimeout","abort","onreadystatechange","readyState","OPENED","responseText","onload","DocSearchModal","_ref$placeholder","searchParameters","_ref$onClose","_ref$transformItems","transformItems","_ref$hitComponent","_ref$resultsFooterCom","_ref$initialScrollY","initialScrollY","_ref$transformSearchC","transformSearchClient","_ref$disableUserPerso","_ref$initialQuery","initialQuery","initialQueryFromProp","_ref$insights","footerTranslations","footer","searchBoxTranslations","searchBox","screenStateTranslations","containerRef","modalRef","formElementRef","dropdownRef","snippetLength","initialQueryFromSelection","getSelection","client","useSearchClient","saveRecentSearch","useCallback","sendItemClickEvent","insightsItem","insightsClickParams","autocomplete","sourcesState","insightsActive","attributesToRetrieve","attributesToSnippet","snippetEllipsisText","highlightPreTag","highlightPostTag","hitsPerPage","firstResult","nbHits","lvl1","groupedHits","potentialParent","siblingItem","flat","_getEnvironmentProps","useTouchEvents","focusableElements","querySelectorAll","firstElement","lastElement","trapFocus","useTrapFocus","classList","_window$scrollTo","_window","scrollTo","matchMedia","scrollTop","setFullViewportHeight","vh","innerHeight","style","setProperty","tabIndex","DocSearch","_props$translations","_props$translations2","searchButtonRef","setInitialQuery","onOpen","_event$key","keyCode","element","isContentEditable","isEditingContent","fromCharCode","useDocSearchKeyboardEvents","createPortal","scrollY","modal","render","getHTMLElement"],"mappings":";g+FAAaA,EAAY,GACZC,EAAY,GACZC,EAAqB,6+RCClC,IAAIC,EAGAC,EAsBAC,EAZAC,EAAc,EAGdC,EAAoB,GAEpBC,EAAgBC,EAAAA,IAChBC,EAAkBD,EAAAA,IAClBE,EAAeF,EAAQG,OACvBC,EAAYJ,EAAAA,IACZK,GAAmBL,EAAQM,QAwE/B,SAASC,GAAaC,EAAOC,GACxBT,EAAAA,KACHA,EAAAA,IAAcL,EAAkBa,EAAOX,GAAeY,GAEvDZ,EAAc,MAORa,EACLf,EAAAA,MACCA,EAAAA,IAA2B,CAAAgB,GACpB,GAAAC,IACU,YAGfJ,GAASE,EAAAA,GAAYG,QACxBH,EAAAA,GAAYI,KAAK,IAEXJ,EAAAA,GAAYF,GAMb,SAASO,GAASC,UACxBnB,EAAc,EACPoB,GAAWC,GAAgBF,GASnC,SAAgBC,GAAWE,EAASH,EAAcI,OAE3CC,EAAYd,GAAab,IAAgB,UAC/C2B,EAAUC,EAAWH,EAChBE,EAAAA,MACJA,EAAAA,GAAmB,CACjBD,EAAiDA,EAAKJ,GAA/CE,QAAAA,EAA0BF,GAElC,SAAAO,OACOC,EAAYH,EAAUC,EAASD,EAAAA,GAAiB,GAAII,GACtDJ,EAAAA,GAAiB,KAAOG,IAC3BH,EAAAA,GAAmB,CAACG,EAAWH,EAAAA,GAAiB,IAChDA,EAAAA,IAAqBK,SAAS,OAKjCL,EAAAA,IAAuB1B,GAGjB0B,EAAAA,GAOD,SAASM,GAAUC,EAAUC,OAE7BC,EAAQvB,GAAab,IAAgB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