-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy path2445-520d15ac197a112a3ec1.js.map
1 lines (1 loc) · 388 KB
/
2445-520d15ac197a112a3ec1.js.map
1
{"version":3,"file":"2445-520d15ac197a112a3ec1.js","mappings":"0OACO,SAASA,IACd,OAAoB,gBAAoB,MAAO,CAC7CC,MAAO,KACPC,OAAQ,KACRC,UAAW,8BACG,gBAAoB,OAAQ,CAC1CC,EAAG,qSACHC,YAAa,MACbC,OAAQ,eACRC,KAAM,OACNC,cAAe,WAEnB,CCZO,SAASC,IACd,OAAoB,gBAAoB,MAAO,CAC7CR,MAAO,KACPC,OAAQ,KACRC,UAAW,wBACXO,QAAS,YACT,cAAe,QACD,gBAAoB,OAAQ,CAC1CN,EAAG,uMACHE,OAAQ,eACRC,KAAM,OACNI,SAAU,UACVH,cAAe,QACfI,eAAgB,UAEpB,CChBA,IAAIC,EAAY,CAAC,gBAEjB,SAASC,IAA2Q,OAA9PA,EAAWC,OAAOC,QAAU,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,EAAcN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,GAAU,CAAE,OAAOL,CAAQ,EAAUH,EAASY,MAAMC,KAAMR,UAAY,CAE5T,SAASS,EAAeC,EAAKX,GAAK,OAUlC,SAAyBW,GAAO,GAAIC,MAAMC,QAAQF,GAAM,OAAOA,CAAK,CAV3BG,CAAgBH,IAQzD,SAA+BA,EAAKX,GAAK,IAAIe,EAAY,MAAPJ,EAAc,KAAyB,oBAAXK,QAA0BL,EAAIK,OAAOC,WAAaN,EAAI,cAAe,GAAU,MAANI,EAAY,OAAQ,IAAkDG,EAAIC,EAAlDC,EAAO,GAAQC,GAAK,EAAUC,GAAK,EAAmB,IAAM,IAAKP,EAAKA,EAAGR,KAAKI,KAAQU,GAAM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/+B,EAAAA,EAAAA,YAAU,KACH6+B,EAAcj2B,SAAY81B,EAAyB91B,SACxDi2B,EAAcj2B,QAAQ22B,OAAO,GAC5B,KAEHv/B,EAAAA,EAAAA,YAAU,KACR,IAAKo/B,GAAAA,EAAW,OAChB,MAAM,KAAE/zB,GAASP,SAEX00B,EAAW,IAAIC,kBAAkBC,IACrCA,EAAUz7B,SAAS07B,IACjB,GAAsB,eAAlBA,EAASx/B,KAAuB,OAE6B,IAADy/B,EAAhE,IAAKv0B,EAAKssB,UAAUvf,SAASinB,GAAAA,EAAmBQ,eAE9C,YADsB,QAAtBD,EAAAhB,EAAeh2B,eAAO,IAAAg3B,GAAtBA,EAAAxjC,KAAAwiC,IAIF,MAAMr6B,EAAQ8G,EAAKyS,cAAc,IAAIuhB,GAAAA,EAAmBS,cACpDv7B,GAAO7C,YAAW,IAAO6C,EAA2BmN,SAAS,EAAE,GACnE,IASJ,OANA8tB,EAASO,QAAQ10B,EAAM,CACrB20B,YAAY,EACZC,WAAW,EACXC,SAAS,IAGJ,IAAMV,EAASW,YAAY,GACjC,KAEHngC,EAAAA,EAAAA,YAAU,KACR4+B,EAAeh2B,QAAUs2B,CAAW,GACnC,CAACA,IAGFkB,EAAAA,cAAAA,EAAAA,SAAA,KACEA,EAAAA,cAACpC,GAAY,CAACqC,iBAAkBlC,IAChCiC,EAAAA,cAAC7H,GAAS,CACRlyB,MAAOi6B,GAAAA,EAAsBC,OAC7Bz3B,UAAWw3B,GAAAA,EAAsBE,WACjCl6B,OAAQg6B,GAAAA,EAAsBG,UAE/B,C","sources":["webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/SearchIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/DocSearchButton.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/debounce.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/noop.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/createStore.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/flatten.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/reshape.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/resolve.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/onInput.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/version.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/metadata.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/constants.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/AlgoliaLogo.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/Footer.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/Hit.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/ErrorScreen.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/NoResultsScreen.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/SourceIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/SelectIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/Snippet.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/Results.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/ResultsScreen.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/RecentIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/StarIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/ResetIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/StartScreen.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/ScreenState.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/SearchBox.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/stored-searches.js","webpack://embla-carousel-docs/../../node_modules/algoliasearch/dist/algoliasearch-lite.esm.browser.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/version.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/utils/noop.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/utils/identity.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/utils/isModifierEvent.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/utils/groupBy.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/DocSearchModal.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/useSearchClient.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/useTouchEvents.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/useTrapFocus.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/DocSearch.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.js","webpack://embla-carousel-docs/./src/components/Search/SearchAlgolia.tsx","webpack://embla-carousel-docs/./src/utils/createPlaceholderStyles.ts"],"sourcesContent":["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}","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() {};","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 _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}","export function flatten(values) {\n return values.reduce(function (a, b) {\n return a.concat(b);\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}","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}","var autocompleteId = 0;\nexport function generateAutocompleteId() {\n return \"autocomplete-\".concat(autocompleteId++);\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}","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 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}","// 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}","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}","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); }\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}","export var version = '1.9.3';","import { version } from './version';\nexport var userAgents = [{\n segment: 'autocomplete-core',\n version: version\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}","/**\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 _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}","export var MAX_QUERY_SIZE = 64;","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 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';\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}","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}","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}","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 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}","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}","var regexHighlightTags = /(<mark>|<\\/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}","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 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 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}","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});","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}","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}","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.23.2';\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\nconst getRecommendations = base => {\r\n return (queries, requestOptions) => {\r\n const requests = queries.map(query => ({\r\n ...query,\r\n // The `threshold` param is required by the endpoint to make it easier\r\n // to provide a default value later, so we default it in the client\r\n // so that users don't have to provide a value.\r\n threshold: query.threshold || 0,\r\n }));\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: '1/indexes/*/recommendations',\r\n data: {\r\n requests,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\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 getRecommendations,\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';","export function noop() {}","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 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}","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: '<mark>',\n highlightPostTag: '</mark>',\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 React, { useCallback, useEffect, useRef } from 'react'\nimport { createGlobalStyle, css } from 'styled-components'\nimport { useAppDispatch, useAppSelector } from 'hooks/useRedux'\nimport { selectKeyNavigating } from 'components/KeyEvents/keyEventsReducer'\nimport { DocSearch } from '@docsearch/react'\nimport { buttonBareStyles } from 'components/Button/ButtonBare'\nimport { linkContentStyles } from 'components/Link/LinkContent'\nimport { createPlaceholderStyles } from 'utils/createPlaceholderStyles'\nimport { createSquareSizeStyles } from 'utils/createSquareSizeStyles'\nimport { BRAND_GRADIENT_BACKGROUND_STYLES } from 'consts/gradients'\nimport { BRAND_GRADIENT_TEXT_STYLES } from 'consts/gradients'\nimport { visuallyHiddenStyles } from 'utils/visuallyHiddenStyles'\nimport { ALGOLIA_CLASSNAMES, ALGOLIA_SEARCH_CONFIG } from 'consts/algoliaSearch'\nimport { MODALS } from 'consts/modal'\nimport { MEDIA } from 'consts/breakpoints'\nimport { LAYERS } from 'consts/layers'\nimport { SPACINGS } from 'consts/spacings'\nimport { THEME_KEYS, THEME_PREFIX, COLORS } from 'consts/themes'\nimport { FONT_SIZES, FONT_WEIGHTS } from 'consts/fontSizes'\nimport { BORDER_RADIUSES, BORDER_SIZES } from 'consts/border'\nimport { KEY_NAVIGATING_STYLES } from 'consts/keyEvents'\nimport { isBrowser } from 'utils/isBrowser'\nimport {\n selectIsModalOpen,\n setModalClosed,\n setModalOpen\n} from 'components/Modal/modalReducer'\nimport {\n searchButtonIconStyles,\n searchButtonStyles\n} from 'components/Search/SearchButton'\n\nconst MODAL_MAX_WIDTH = '56rem'\nconst INPUT_BORDER_SIZE = '0.2rem'\nconst SVG_STROKE_WIDTH = '0.14rem'\nconst INPUT_HEIGHT = SPACINGS.NINE\nconst BUTTON_WIDTH = SPACINGS.EIGHT\nconst DESKTOP_END_SPACING = SPACINGS.TEN\nconst EDGE_SPACING = SPACINGS.TWO\n\nconst modalStyles = css`\n .DocSearch-Container {\n z-index: ${LAYERS.SEARCH};\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n &:before {\n position: absolute;\n opacity: 0.9;\n background-color: ${COLORS.BACKGROUND_SITE};\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n content: '';\n display: flex;\n }\n }\n\n .DocSearch-Container a {\n text-decoration: none;\n }\n\n .DocSearch-Modal {\n padding: ${EDGE_SPACING};\n box-shadow: 0 0 0 ${BORDER_SIZES.DETAIL} ${COLORS.DETAIL_LOW_CONTRAST};\n background-color: ${COLORS.BACKGROUND_SITE};\n z-index: ${LAYERS.STEP};\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n height: 100vh;\n\n ${MEDIA.DESKTOP} {\n border-radius: ${BORDER_RADIUSES.SOFT};\n max-width: ${MODAL_MAX_WIDTH};\n margin: ${DESKTOP_END_SPACING} auto;\n height: calc(100vh - ${DESKTOP_END_SPACING} * 2);\n }\n }\n`\n\nconst headerStyles = css`\n .DocSearch-SearchBar {\n display: flex;\n flex: 0 0 auto;\n }\n\n .DocSearch-Form {\n padding: ${INPUT_BORDER_SIZE};\n position: relative;\n width: 100%;\n border-radius: ${BORDER_RADIUSES.BOX};\n ${BRAND_GRADIENT_BACKGROUND_STYLES};\n }\n`\n\nconst contentStyles = css`\n .DocSearch-NoResults,\n .DocSearch-StartScreen,\n .DocSearch-ErrorScreen {\n color: ${COLORS.TEXT_LOW_CONTRAST};\n padding: ${SPACINGS.SIX} 0;\n font-size: ${FONT_SIZES.COMPLEMENTARY};\n margin: 0 auto;\n text-align: center;\n width: 80%;\n }\n\n .DocSearch-Screen-Icon {\n color: ${COLORS.DETAIL_HIGH_CONTRAST};\n padding-bottom: ${EDGE_SPACING};\n\n > svg {\n ${createSquareSizeStyles('4rem')}\n }\n }\n\n .DocSearch-Title {\n color: ${COLORS.TEXT_HIGH_CONTRAST};\n margin-bottom: ${SPACINGS.THREE};\n font-size: ${FONT_SIZES.H4};\n }\n\n .DocSearch-Help a {\n ${linkContentStyles};\n ${KEY_NAVIGATING_STYLES};\n }\n\n .DocSearch-Dropdown {\n overflow-y: auto;\n overflow-x: hidden;\n flex: 1 1 0;\n }\n\n .DocSearch-Help {\n font-size: ${FONT_SIZES.COMPLEMENTARY};\n margin: 0;\n user-select: none;\n }\n\n .DocSearch-Hits mark {\n ${BRAND_GRADIENT_TEXT_STYLES};\n }\n\n .DocSearch-HitsFooter {\n color: ${COLORS.TEXT_LOW_CONTRAST};\n font-size: ${FONT_SIZES.COMPLEMENTARY};\n display: flex;\n justify-content: center;\n }\n\n .DocSearch-HitsFooter a {\n padding-top: ${EDGE_SPACING};\n margin-bottom: ${EDGE_SPACING};\n border-bottom: ${BORDER_SIZES.DETAIL} solid;\n color: inherit;\n display: inline-flex;\n }\n\n .DocSearch-Hit {\n padding-bottom: ${SPACINGS.CUSTOM(({ ONE }) => ONE - 0.2)};\n border-radius: ${BORDER_RADIUSES.BOX};\n display: flex;\n position: relative;\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n .DocSearch-Hit--deleting {\n transition: none;\n }\n }\n\n .DocSearch-Hit--deleting {\n opacity: 0;\n transition: all 250ms linear;\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n .DocSearch-Hit--favoriting {\n transition: none;\n }\n }\n\n .DocSearch-Hit--favoriting {\n transform: scale(0);\n transform-origin: top center;\n transition: all 250ms linear;\n transition-delay: 250ms;\n }\n\n .DocSearch-Hit a {\n ${KEY_NAVIGATING_STYLES};\n outline-offset: -${BORDER_SIZES.OUTLINE};\n background-color: ${COLORS.BACKGROUND_CODE};\n padding-left: ${EDGE_SPACING};\n border-radius: ${BORDER_RADIUSES.BOX};\n display: block;\n width: 100%;\n }\n\n .DocSearch-Hit-source {\n background-color: ${COLORS.BACKGROUND_SITE};\n color: ${COLORS.TEXT_HIGH_CONTRAST};\n margin: 0 -${SPACINGS.CUSTOM(({ ONE }) => ONE - 0.2)};\n padding: ${SPACINGS.CUSTOM(({ ONE }) => ONE + 0.2)}\n ${SPACINGS.CUSTOM(({ ONE }) => ONE - 0.2)} 0;\n font-size: ${FONT_SIZES.COMPLEMENTARY};\n font-weight: ${FONT_WEIGHTS.SEMI_BOLD};\n line-height: 3.2rem;\n position: sticky;\n top: 0;\n z-index: 10;\n }\n\n .DocSearch-Hit-Tree {\n ${MEDIA.COMPACT} {\n display: none;\n }\n ${MEDIA.DESKTOP} {\n color: ${COLORS.DETAIL_HIGH_CONTRAST};\n height: ${INPUT_HEIGHT};\n opacity: 0.5;\n stroke-width: ${SVG_STROKE_WIDTH};\n width: ${SPACINGS.FOUR};\n }\n }\n\n .DocSearch-Hit[aria-selected='true'] a {\n position: relative;\n display: block;\n\n &:before,\n &:after {\n content: '';\n position: absolute;\n pointer-events: none;\n top: 0;\n bottom: 0;\n left: 0;\n ${BRAND_GRADIENT_BACKGROUND_STYLES};\n }\n\n &:before {\n width: 0.4rem;\n }\n &:after {\n border-radius: ${BORDER_RADIUSES.BOX};\n right: 0;\n opacity: 0.07;\n }\n }\n\n .DocSearch-Hit-Container {\n color: ${COLORS.TEXT_MEDIUM_CONTRAST};\n height: ${INPUT_HEIGHT};\n padding: 0 ${EDGE_SPACING} 0 0;\n align-items: center;\n display: flex;\n flex-direction: row;\n }\n\n .DocSearch-Hit-icon {\n ${createSquareSizeStyles('2rem')}\n color: ${COLORS.DETAIL_HIGH_CONTRAST};\n stroke-width: ${SVG_STROKE_WIDTH};\n }\n\n .DocSearch-Hit-action {\n ${createSquareSizeStyles('2.2rem')};\n color: ${COLORS.DETAIL_HIGH_CONTRAST};\n stroke-width: ${SVG_STROKE_WIDTH};\n align-items: center;\n display: flex;\n\n > svg {\n ${createSquareSizeStyles('1.8rem')};\n display: block;\n }\n }\n\n .DocSearch-Hit-action + .DocSearch-Hit-action {\n margin-left: ${SPACINGS.ONE};\n }\n\n .DocSearch-Hit-action-button {\n ${buttonBareStyles};\n color: inherit;\n padding: ${SPACINGS.CUSTOM(({ ONE }) => ONE - 0.4)};\n }\n\n svg.DocSearch-Hit-Select-Icon {\n display: none;\n }\n\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-Select-Icon {\n display: block;\n }\n\n .DocSearch-Hit-action-button:hover path,\n .DocSearch-Hit-action-button:focus path {\n fill: ${COLORS.TEXT_MEDIUM_CONTRAST};\n }\n\n .DocSearch-Hit-content-wrapper {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n font-weight: ${FONT_WEIGHTS.MEDIUM};\n justify-content: center;\n line-height: 1.2em;\n margin: 0 ${SPACINGS.CUSTOM(({ ONE }) => ONE + 0.2)};\n overflow-x: hidden;\n position: relative;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 80%;\n }\n\n .DocSearch-Hit-title {\n font-size: ${FONT_SIZES.CUSTOM(\n ({ COMPLEMENTARY }) => COMPLEMENTARY + 0.04\n )};\n }\n\n .DocSearch-Hit-path {\n color: ${COLORS.TEXT_LOW_CONTRAST};\n font-size: ${FONT_SIZES.DETAIL};\n }\n\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-title,\n .DocSearch-Hit[aria-selected='true'] mark,\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-text,\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-path,\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-icon,\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-action,\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-Tree {\n color: ${COLORS.TEXT_HIGH_CONTRAST} !important;\n }\n\n .DocSearch-NoResults-Prefill-List {\n padding-bottom: ${SPACINGS.THREE};\n\n > ul {\n padding-top: ${SPACINGS.ONE};\n font-size: ${FONT_SIZES.COMPLEMENTARY};\n display: inline-block;\n }\n\n li {\n color: ${COLORS.TEXT_HIGH_CONTRAST};\n list-style-position: inside;\n list-style-type: '» ';\n text-align: left;\n }\n }\n\n .DocSearch-Prefill {\n ${buttonBareStyles};\n ${linkContentStyles};\n padding-top: ${SPACINGS.ONE};\n padding-bottom: ${SPACINGS.ONE};\n }\n`\n\nconst footerStyles = css`\n .DocSearch-Footer {\n flex: 0 0 auto;\n padding-top: ${EDGE_SPACING};\n display: flex;\n flex-direction: row-reverse;\n flex-shrink: 0;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n }\n\n .DocSearch-Logo a {\n ${KEY_NAVIGATING_STYLES};\n display: flex;\n }\n\n .DocSearch-Logo svg {\n color: #5468ff;\n margin-left: ${SPACINGS.CUSTOM(({ ONE }) => ONE + 0.2)};\n }\n\n .DocSearch-Label {\n color: ${COLORS.TEXT_LOW_CONTRAST};\n font-size: ${FONT_SIZES.DETAIL};\n line-height: 1.9rem;\n }\n\n .DocSearch-Commands {\n color: ${COLORS.TEXT_LOW_CONTRAST};\n display: flex;\n list-style: none;\n margin: 0;\n padding: 0;\n\n ${MEDIA.COMPACT} {\n display: none;\n }\n }\n\n .DocSearch-Commands li {\n align-items: center;\n display: flex;\n }\n\n .DocSearch-Commands li:not(:last-of-type) {\n margin-right: ${SPACINGS.CUSTOM(({ ONE }) => ONE + 0.2)};;\n }\n\n .DocSearch-Commands-Key {\n align-items: center;\n border-radius: ${BORDER_RADIUSES.LINE};\n background: linear-gradient(\n -225deg,\n ${COLORS.DETAIL_MEDIUM_CONTRAST} 0%,\n ${COLORS.DETAIL_HIGH_CONTRAST} 100%\n );\n box-shadow: inset 0 -0.2rem 0 0 ${COLORS.DETAIL_LOW_CONTRAST};,\n inset 0 0 0.1rem 0.1rem ${COLORS.DETAIL_MEDIUM_CONTRAST},\n 0 0.1rem 0.2rem 0.1rem rgba(${\n COLORS.DETAIL_HIGH_CONTRAST_RGB_VALUE\n }, 0.4);\n display: flex;\n height: 1.8rem;\n justify-content: center;\n margin-right: 0.4em;\n padding-bottom: 0.1rem;\n width: 2rem;\n }\n\n .${THEME_PREFIX}${THEME_KEYS.LIGHT} {\n .DocSearch-Commands-Key {\n background: linear-gradient(\n -225deg,\n ${COLORS.DETAIL_HIGH_CONTRAST} 0%,\n ${COLORS.DETAIL_MEDIUM_CONTRAST} 100%\n );\n box-shadow: inset 0 -0.2rem 0 0 ${COLORS.DETAIL_HIGH_CONTRAST},\n inset 0 0 0.1rem 0.1rem ${COLORS.DETAIL_MEDIUM_CONTRAST},\n 0 0.1rem 0.2rem 0.1rem rgba(${\n COLORS.DETAIL_LOW_CONTRAST_RGB_VALUE\n }, 0.4);\n }\n }\n .${THEME_PREFIX}${THEME_KEYS.DARK} {\n .DocSearch-Commands-Key {\n background: linear-gradient(\n -225deg,\n ${COLORS.DETAIL_MEDIUM_CONTRAST} 0%,\n ${COLORS.DETAIL_HIGH_CONTRAST} 100%\n );\n box-shadow: inset 0 -0.2rem 0 0 ${COLORS.DETAIL_LOW_CONTRAST};,\n inset 0 0 0.1rem 0.1rem ${COLORS.DETAIL_MEDIUM_CONTRAST},\n 0 0.1rem 0.2rem 0.1rem rgba(${\n COLORS.DETAIL_HIGH_CONTRAST_RGB_VALUE\n }, 0.4);\n }\n }\n`\n\nconst inputStyles = css`\n .DocSearch-Input {\n ${createPlaceholderStyles(COLORS.TEXT_LOW_CONTRAST)};\n ${KEY_NAVIGATING_STYLES};\n height: calc(${INPUT_HEIGHT} - (${INPUT_BORDER_SIZE} * 2));\n padding-left: ${BUTTON_WIDTH};\n padding-right: ${BUTTON_WIDTH};\n -webkit-appearance: none;\n appearance: none;\n border-radius: ${BORDER_RADIUSES.BOX};\n width: 100%;\n font-size: ${FONT_SIZES.H4};\n background-color: ${COLORS.BACKGROUND_SITE};\n color: ${COLORS.TEXT_BODY};\n border: 0;\n }\n\n .DocSearch-Input::-ms-clear {\n display: none;\n ${createSquareSizeStyles('0')};\n }\n .DocSearch-Input::-ms-reveal {\n display: none;\n ${createSquareSizeStyles('0')};\n }\n .DocSearch-Input::-webkit-search-decoration,\n .DocSearch-Input::-webkit-search-cancel-button,\n .DocSearch-Input::-webkit-search-results-button,\n .DocSearch-Input::-webkit-search-results-decoration {\n display: none;\n }\n\n .DocSearch-VisuallyHiddenForAccessibility {\n ${visuallyHiddenStyles};\n }\n`\n\nconst toggleButtonStyles = css`\n .DocSearch-Button {\n ${searchButtonStyles};\n\n &:hover {\n box-shadow: none;\n }\n }\n .DocSearch-Button-Placeholder,\n .DocSearch-Button-Keys {\n ${visuallyHiddenStyles}\n }\n .DocSearch-Search-Icon {\n ${searchButtonIconStyles};\n }\n`\n\nconst magnifyerButtonStyles = css`\n .DocSearch-MagnifierLabel {\n display: flex;\n width: ${BUTTON_WIDTH};\n top: ${INPUT_BORDER_SIZE};\n bottom: ${INPUT_BORDER_SIZE};\n position: absolute;\n align-items: center;\n justify-content: center;\n\n > svg {\n ${createSquareSizeStyles('2.35rem')};\n }\n }\n\n .DocSearch-Container--Stalled .DocSearch-MagnifierLabel {\n display: none;\n }\n`\n\nconst resetButtonStyles = css`\n .DocSearch-Reset {\n ${buttonBareStyles};\n width: ${BUTTON_WIDTH};\n top: ${INPUT_BORDER_SIZE};\n bottom: ${INPUT_BORDER_SIZE};\n right: ${INPUT_BORDER_SIZE};\n display: flex;\n position: absolute;\n align-items: center;\n justify-content: center;\n stroke-width: 0.2rem;\n color: ${COLORS.TEXT_HIGH_CONTRAST};\n\n > svg {\n ${createSquareSizeStyles('2.35rem')};\n }\n }\n\n .DocSearch-Reset[hidden] {\n display: none;\n }\n`\n\nconst cancelButtonStyles = css`\n .DocSearch-Cancel {\n ${buttonBareStyles};\n color: ${COLORS.TEXT_BODY};\n height: ${INPUT_HEIGHT};\n display: flex;\n align-items: center;\n margin-left: ${SPACINGS.CUSTOM(({ TWO }) => TWO - 0.2)};\n }\n`\n\nconst loadingIndicatorStyles = css`\n .DocSearch-LoadingIndicator {\n width: ${BUTTON_WIDTH};\n top: ${INPUT_BORDER_SIZE};\n bottom: ${INPUT_BORDER_SIZE};\n position: absolute;\n align-items: center;\n justify-content: center;\n color: ${COLORS.TEXT_HIGH_CONTRAST};\n display: none;\n\n > svg {\n ${createSquareSizeStyles('2.35rem')};\n }\n }\n\n .DocSearch-Container--Stalled .DocSearch-LoadingIndicator {\n display: flex;\n }\n`\n\nconst SearchStyles = createGlobalStyle<{ $isKeyNavigating: boolean }>`\n ${modalStyles};\n ${headerStyles};\n ${contentStyles};\n ${footerStyles};\n ${inputStyles};\n ${toggleButtonStyles};\n ${magnifyerButtonStyles};\n ${resetButtonStyles};\n ${cancelButtonStyles};\n ${loadingIndicatorStyles};\n`\n\nexport const SearchAlgolia = () => {\n const isKeyNavigating = useAppSelector(selectKeyNavigating)\n const isSearchOpen = useAppSelector(selectIsModalOpen(MODALS.SITE_SEARCH))\n const isSearchInitiallyOpenRef = useRef(isSearchOpen)\n const closeSearchRef = useRef<() => void>()\n const toggleElement = useRef<HTMLButtonElement | null>(null)\n const dispatch = useAppDispatch()\n\n const openSearch = useCallback(() => {\n dispatch(setModalOpen(MODALS.SITE_SEARCH))\n }, [dispatch])\n\n const closeSearch = useCallback(() => {\n dispatch(setModalClosed(MODALS.SITE_SEARCH))\n }, [dispatch])\n\n useEffect(() => {\n if (!isBrowser || toggleElement.current) return\n\n toggleElement.current = document.querySelector(\n `.${ALGOLIA_CLASSNAMES.SEARCH_TOGGLE_BUTTON}`\n )\n\n if (toggleElement.current) {\n toggleElement.current.addEventListener('click', openSearch)\n }\n\n return () => {\n if (toggleElement.current) {\n toggleElement.current.removeEventListener('click', openSearch)\n }\n }\n }, [openSearch])\n\n useEffect(() => {\n if (!toggleElement.current || !isSearchInitiallyOpenRef.current) return\n toggleElement.current.click()\n }, [])\n\n useEffect(() => {\n if (!isBrowser) return\n const { body } = document\n\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type !== 'attributes') return\n\n if (!body.classList.contains(ALGOLIA_CLASSNAMES.SEARCH_ACTIVE)) {\n closeSearchRef.current?.()\n return\n }\n\n const input = body.querySelector(`.${ALGOLIA_CLASSNAMES.SEARCH_INPUT}`)\n if (input) setTimeout(() => (input as HTMLInputElement).focus(), 0)\n })\n })\n\n observer.observe(body, {\n attributes: true,\n childList: false,\n subtree: false\n })\n\n return () => observer.disconnect()\n }, [])\n\n useEffect(() => {\n closeSearchRef.current = closeSearch\n }, [closeSearch])\n\n return (\n <>\n <SearchStyles $isKeyNavigating={isKeyNavigating} />\n <DocSearch\n appId={ALGOLIA_SEARCH_CONFIG.APP_ID}\n indexName={ALGOLIA_SEARCH_CONFIG.INDEX_NAME}\n apiKey={ALGOLIA_SEARCH_CONFIG.API_KEY}\n />\n </>\n )\n}\n","import { css, FlattenSimpleInterpolation } from 'styled-components'\n\nexport const createPlaceholderStyles = (\n color: string\n): FlattenSimpleInterpolation => css`\n ::-webkit-input-placeholder {\n color: ${color};\n }\n :-moz-placeholder {\n color: ${color};\n opacity: 1;\n }\n ::-moz-placeholder {\n color: ${color};\n opacity: 1;\n }\n :-ms-input-placeholder {\n color: ${color};\n }\n ::-ms-input-placeholder {\n color: ${color};\n }\n ::placeholder {\n color: ${color};\n }\n`\n"],"names":["ControlKeyIcon","width","height","className","d","strokeWidth","stroke","fill","strokeLinecap","SearchIcon","viewBox","fillRule","strokeLinejoin","_excluded","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_slicedToArray","arr","Array","isArray","_arrayWithHoles","_i","Symbol","iterator","_s","_e","_arr","_n","_d","next","done","push","value","err","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","len","arr2","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","ACTION_KEY_DEFAULT","DocSearchButton","_ref","ref","_ref$translations","translations","props","_translations$buttonT","buttonText","_translations$buttonA","buttonAriaLabel","_useState2","useState","setKey","useEffect","navigator","platform","type","DocSearchButtonKey","reactsToKey","_ref2","children","_useState4","isKeyDown","setIsKeyDown","window","addEventListener","handleKeyDown","handleKeyUp","removeEventListener","e","debounce","fn","time","timerId","undefined","_len","args","_key","clearTimeout","setTimeout","isPrimitive","obj","isEqual","first","second","_Object$keys","noop","createClickedEvent","item","items","index","__autocomplete_indexName","positions","findIndex","x","objectID","queryID","__autocomplete_queryID","algoliaSource","_x","_r","return","_excluded2","_typeof","_toConsumableArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","ownKeys","object","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","arg","input","hint","prim","toPrimitive","res","String","Number","_toPrimitive","_toPropertyKey","configurable","writable","mapToInsightsParamsApi","params","map","param","objectIDs","createSearchInsightsApi","searchInsights","_split$map2","major","minor","canSendHeaders","version","split","sendToInsights","method","payloads","_items$0$__autocomple","__autocomplete_algoliaCredentials","headers","appId","apiKey","concat","init","setUserToken","userToken","clickedObjectIDsAfterSearch","clickedObjectIDs","_len2","_key2","clickedFilters","_len3","_key3","convertedObjectIDsAfterSearch","_len4","_key4","convertedObjectIDs","_len5","_key5","convertedFilters","_len6","_key6","viewedObjectIDs","_len7","_key7","reduce","acc","_ref3","chunkSize","chunks","chunk","_ref4","payload","_ref5","viewedFilters","_len8","_key8","createViewedEvents","itemsByIndexName","current","_acc$current$__autoco","indexName","isAlgoliaInsightsHit","hit","ALGOLIA_INSIGHTS_VERSION","ALGOLIA_INSIGHTS_SRC","sendViewedObjectIDs","onItemsChange","insights","state","insightsEvents","event","eventName","createAlgoliaInsightsPlugin","options","_getOptions","_ref8","onSelect","_ref9","onActive","getOptions","providedInsightsClient","insightsClient","onSelectEvent","onActiveEvent","callback","safelyRunOnBrowser","pointer","AlgoliaAnalyticsObject","queue","environment","errorMessage","script","document","createElement","async","src","onerror","console","error","body","appendChild","cause","loadInsights","previousItems","debouncedOnStateChange","isOpen","collections","subscribe","setContext","algoliaInsightsPlugin","__algoliaSearchParameters","clickAnalytics","_ref6","onStateChange","_ref7","__autocomplete_pluginOptions","createStore","reducer","onStoreStateChange","list","initialState","getState","dispatch","action","prevState","pendingRequests","add","cancelablePromise","finally","cancelAll","promise","cancel","isEmpty","flatten","values","a","b","getItemsCount","sum","collection","autocompleteId","getDefaultProps","pluginSubscribers","_props$id","plugins","debug","openOnFocus","placeholder","autoFocus","defaultActiveItemId","stallThreshold","shouldPanelOpen","reshape","sources","id","activeItemId","query","completion","status","context","_props$onStateChange","_x$onStateChange","onSubmit","_props$onSubmit","_x$onSubmit","onReset","_props$onReset","_x$onReset","getSources","Promise","all","plugin","Boolean","seenSourceIds","resolve","then","maybeSource","sourceId","includes","Error","JSON","stringify","defaultSource","getItemInputValue","getItemUrl","setIsOpen","onResolve","__default","normalizedSource","getNormalizedSources","nested","_x$onSelect","_x$onActive","_x$onResolve","navigate","itemUrl","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","createInternalCancelablePromise","onfulfilled","onrejected","createCallback","catch","onfinally","onCancelList","isCanceled","callbacks","createCancelablePromise","executor","reject","cancelable","onResult","fallback","getActiveItem","collectionIndex","collectionsCount","nextValue","getCollectionFromActiveItemId","isOffsetFound","counter","previousItemsOffset","currentCollection","getRelativeActiveItemId","itemInputValue","reason","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","regex","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","getPropGetters","getAutocompleteId","instanceId","getEnvironmentProps","providedProps","inputElement","formElement","panelElement","onMouseDownOrTouchStart","some","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","onBlur","onClick","getPanelProps","onMouseLeave","getListProps","getItemProps","__autocomplete_id","onMouseMove","_item","_source","userAgents","segment","getMetadata","_","_options$__autocomple","_options$__autocomple2","_options$__autocomple3","optionsKey","__autocomplete_metadata","extraOptions","ua","getCompletion","_getActiveItem","getNextActiveItemId","moveAmount","baseIndex","itemCount","numericIndex","stateReducer","_nextState","createAutocomplete","subscribers","rawValue","baseItemId","getAutocompleteSetters","propGetters","Event","insightsParams","_plugin$subscribe","_environment$navigato","_environment$navigato2","metadata","metadataContainer","headRef","querySelector","content","injectMetadata","MAX_QUERY_SIZE","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","ErrorIcon","ErrorScreen","_translations$titleTe","titleText","_translations$helpTex","helpText","NoResultsIcon","NoResultsScreen","_translations$noResul","noResultsText","_translations$suggest","suggestedQueryText","_translations$reportM","reportMissingResultsText","_translations$reportM2","reportMissingResultsLinkText","searchSuggestions","search","toLowerCase","inputRef","getMissingResultsUrl","LvlIcon","SourceIcon","ContentIcon","AnchorIcon","SelectIcon","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","__docsearch_parent","onTransitionEnd","hierarchy","runDeleteTransition","cb","runFavoriteTransition","regexHighlightTags","regexHasHighlightTags","RegExp","removeHighlightTags","_internalDocSearchHit","_hit$_highlightResult","internalDocSearchHit","lvl0","replace","ResultsScreen","_collection$items","resultsFooterComponent","RecentIcon","StarIcon","ResetIcon","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","errorScreen","noResultsScreen","startScreen","_prevProps","nextProps","LoadingIcon","strokeOpacity","cx","cy","r","attributeName","to","dur","repeatCount","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","get","defaultValue","events","miss","timeToLive","filteredNamespaceWithoutOldFormattedCacheItems","fromEntries","entries","cacheItem","timestamp","filteredNamespaceWithoutExpiredItems","currentTimestamp","Date","getTime","removeOutdatedCacheItems","keyAsString","exists","set","clear","createFallbackableCache","caches","shift","delete","createInMemoryCache","serializable","cache","shuffle","array","c","Math","floor","random","addMethods","base","methods","encode","format","encodeURIComponent","AuthMode","WithinQueryParameters","WithinHeaders","createMappedRequestOptions","requestOptions","timeout","data","queryParameters","cacheable","CallEnum","Read","Write","Any","HostStatusEnum","Up","Down","Timeouted","EXPIRATION_DELAY","createStatefulHost","host","lastUpdate","now","createStatelessHost","protocol","accept","MethodEnum","Delete","Get","Post","Put","createRetryableOptions","hostsCache","statelessHosts","statelessHost","statefulHosts","hostsUp","isStatefulHostUp","hostsTimeouted","isStatefulHostTimeouted","hostsAvailable","statelessHostsAvailable","getTimeout","timeoutsCount","baseTimeout","retryDecision","outcomes","isTimedOut","isNetworkError","isRetryable","onRetry","isSuccess","onSuccess","onFail","retryableRequest","transporter","stackTrace","serializeData","serializedHeaders","header","serializeHeaders","dataQueryParameters","retry","hosts","pop","message","transporterStackTrace","stackTraceWithoutCredentials","serializeUrl","connectTimeout","timeouts","connect","responseTimeout","pushToStackTrace","stackFrame","triesLeft","decisions","createDeserializationError","deserializeSuccess","logger","info","stackFrameWithoutCredentials","createApiError","deserializeFailure","requester","send","reverse","createUserAgent","addedUserAgent","queryParametersAsString","serializeQueryParameters","charAt","substr","parameters","modifiedHeaders","createSearchClient","auth","authMode","credentials","createAuth","requestsCache","responsesCache","read","mappedRequestOptions","createRetryableRequest","write","createTransporter","addAlgoliaAgent","clearCache","customRequest","initIndex","multipleQueries","multipleSearchForFacetValues","facetName","facetQuery","searchForFacetValues","findAnswers","queryLanguages","LogLevelEnum","Debug","Info","getRecommendations","threshold","algoliasearch","commonOptions","baseRequester","XMLHttpRequest","setRequestHeader","createTimeout","abort","onreadystatechange","readyState","OPENED","responseText","onload","logLevel","identity","isModifierEvent","button","groupBy","predicate","maxResultsPerGroup","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","setState","containerRef","modalRef","formElementRef","dropdownRef","snippetLength","initialQueryFromSelection","getSelection","client","useSearchClient","saveRecentSearch","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","INPUT_BORDER_SIZE","SVG_STROKE_WIDTH","INPUT_HEIGHT","SPACINGS","NINE","BUTTON_WIDTH","EIGHT","DESKTOP_END_SPACING","TEN","EDGE_SPACING","TWO","modalStyles","css","LAYERS","SEARCH","COLORS","BACKGROUND_SITE","BORDER_SIZES","DETAIL","DETAIL_LOW_CONTRAST","STEP","MEDIA","DESKTOP","BORDER_RADIUSES","SOFT","headerStyles","BOX","BRAND_GRADIENT_BACKGROUND_STYLES","contentStyles","TEXT_LOW_CONTRAST","SIX","FONT_SIZES","COMPLEMENTARY","DETAIL_HIGH_CONTRAST","createSquareSizeStyles","TEXT_HIGH_CONTRAST","THREE","H4","linkContentStyles","KEY_NAVIGATING_STYLES","BRAND_GRADIENT_TEXT_STYLES","CUSTOM","ONE","OUTLINE","BACKGROUND_CODE","FONT_WEIGHTS","SEMI_BOLD","COMPACT","FOUR","TEXT_MEDIUM_CONTRAST","buttonBareStyles","MEDIUM","footerStyles","LINE","DETAIL_MEDIUM_CONTRAST","DETAIL_HIGH_CONTRAST_RGB_VALUE","THEME_PREFIX","THEME_KEYS","LIGHT","DETAIL_LOW_CONTRAST_RGB_VALUE","DARK","inputStyles","color","TEXT_BODY","visuallyHiddenStyles","toggleButtonStyles","searchButtonStyles","searchButtonIconStyles","magnifyerButtonStyles","resetButtonStyles","cancelButtonStyles","_ref10","loadingIndicatorStyles","SearchStyles","createGlobalStyle","SearchAlgolia","isKeyNavigating","useAppSelector","selectKeyNavigating","isSearchOpen","selectIsModalOpen","MODALS","SITE_SEARCH","isSearchInitiallyOpenRef","useRef","closeSearchRef","toggleElement","useAppDispatch","openSearch","useCallback","setModalOpen","closeSearch","setModalClosed","isBrowser","ALGOLIA_CLASSNAMES","SEARCH_TOGGLE_BUTTON","click","observer","MutationObserver","mutations","mutation","_closeSearchRef$curre","SEARCH_ACTIVE","SEARCH_INPUT","observe","attributes","childList","subtree","disconnect","React","$isKeyNavigating","ALGOLIA_SEARCH_CONFIG","APP_ID","INDEX_NAME","API_KEY"],"sourceRoot":""}