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ADjBC,aAAAJ,QAGH,CAVI,CAWN,EAXH,IAauC,IACnCK,aAAW,SAAAC,KAAA,CAAAC,GAAA,EACPA,IADJ,GAAAnC,qDAEOoC,EAAA,EAAAD,MAEHtB,kBAAAqB,OACHhB,UAAA,IANL,EAcI,SAAAhB,+CAAAmC,IAAA,SAAuBC,IAAAnB,YAAvBoB,UAAA,oBACIb,MAAA,CAAAT,OAAA,WAAAuB,SAAK,CAAU,GAAAtC,+CAAfmC,IAAA,SAAyCE,UAAS,0BAAlDE,QALJ,WADJvB,UAAA,CAAAD,OAAA,EAOYuB,SAAA,IAAAtC,+CAAAwC,GAAA,UADJF,SAAA,IAEI,EAFJ9B,CAAAA,sBAEIzC,OAAA,CAAA2C,eAAA,EAAC,KAAD,QAAAD,CAAAA,uBAAAD,sBAAAiC,MAAA,SAAAhC,uBAAAiC,KAAA,GAAY,GAAA1C,+CAAAwC,GAAA,EAAAvC,KAAA,CAFhB0C,KAAA9C,yDAAA+C,EAAA,CAAAC,WAAA,GAIC,GACO9B,QAAU,GAAAf,+CAAdwC,GAAA,QAAAH,UACC,2BAAaC,SAAAvE,QAAA+E,GAAA,UAAAC,MAAA,CAAAf,KAAA,MAAAgB,gBACV,MAA2B,GAAAhD,+CAA3BwC,GAAA,QAA+DH,UAASN,eAAAC,MAAA,cAAAO,QAAA,eAAAU,eAAxE,OAAAlB,aAAAC,MAAAe,IAAA,EAAAA,OAAA,aAAAE,CAAAA,eAAAF,OAAAN,MAAA,SAAAQ,eAAAC,UAAA,GAAAZ,SADUS,IAAA,EAAAA,OAAA,aAAAC,CAAAA,gBAAAD,OAAAN,MAAA,SAAAO,gBAAAN,KAAA,EAAbV,MAPT,EADJ,KA9BJ,CAqDA","sources":["webpack://_N_E/./adapters/helpers/Scroll.js","webpack://_N_E/./components/DropDownSelector/DropDownSelector.js","webpack://_N_E/"],"sourcesContent":["let smoothScrollId = null;\nlet smoothScrollStartY = 0;\nlet smoothScrollDeltaY = 0;\nlet smoothScrollStartTime = 0;\nlet smoothScrollDuration = 400;\n\nexport function scrollIntoView(element, options = {}) {\n smoothScrollStartY = window.scrollY || window.pageYOffset || 0;\n smoothScrollDeltaY = element.getBoundingClientRect().top;\n\n const headerElement = document.querySelector('.zone-header');\n const productSubNavElement = document.querySelector('.ob-product-sub-nav');\n\n if (headerElement) {\n smoothScrollDeltaY -= headerElement.getBoundingClientRect().bottom;\n\n if (productSubNavElement) {\n smoothScrollDeltaY -= productSubNavElement.getBoundingClientRect().bottom;\n }\n }\n\n if (options.behavior === 'smooth' && typeof requestAnimationFrame !== 'undefined') {\n smoothScrollStartTime = Date.now();\n\n if (smoothScrollId == null) {\n smoothScrollStep();\n }\n } else {\n if (smoothScrollId != null) {\n cancelAnimationFrame(smoothScrollId);\n smoothScrollId = null;\n }\n\n window.scrollTo(window.scrollX, null);\n }\n}\n\nfunction smoothScrollStep() {\n const elapsed = Date.now() - smoothScrollStartTime;\n const t = elapsed / smoothScrollDuration;\n\n if (t < 1) {\n smoothScrollId = requestAnimationFrame(smoothScrollStep);\n window.scrollTo(window.scrollX, easeInOutQuad(t) * smoothScrollDeltaY + smoothScrollStartY);\n }\n else {\n smoothScrollId = null;\n window.scrollTo(window.scrollX, smoothScrollDeltaY + smoothScrollStartY);\n }\n}\n\nfunction easeInOutQuad(t) {\n return (t < 0.5) ? (2 * t * t) : ((4 - 2 * t) * t - 1);\n}\n","import React, { useState, useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport dynamic from 'next/dynamic';\nconst Icon = dynamic(() => import('../Icon/Icon'));\nimport { Constants } from '../../adapters/helpers/Constants';\nimport { redirectTo } from '../../adapters/helpers/Utils'\nimport { scrollIntoView } from '../../adapters/helpers/Scroll';\n\nconst DropDownSelector = ({options, selectedOption, handleOptionClick, anchorId}) => {\n const [isOpen, setIsOpen] = useState( false );\n const dropDownRef = useRef();\n\n useEffect(() => {\n if (window?.location?.hash === `#${anchorId}` && dropDownRef?.current) {\n let timeout = null;\n window.setTimeout(() => {\n timeout = scrollIntoView(dropDownRef.current, {behavior: 'smooth', block: 'nearest'});\n }, 250);\n\n return () => {\n clearTimeout(timeout);\n }\n }\n }, []);\n\n const selectOption = ( index, url ) => {\n if ( url ) {\n redirectTo( url );\n } else {\n handleOptionClick( index );\n setIsOpen( false );\n }\n }\n\n const toggleDropDown = () => {\n setIsOpen( !isOpen );\n }\n\n return (\n
\n
\n {options[selectedOption]?.fields?.label}\n \n
\n {isOpen && (\n \n )}\n
\n )\n}\n\nDropDownSelector.propTypes = {\n options: PropTypes.arrayOf( PropTypes.object ),\n selectedOption: PropTypes.number,\n handleOptionClick: PropTypes.func\n}\n\nexport default DropDownSelector;","\"use strict\";\n(self[\"webpackChunk_N_E\"] = self[\"webpackChunk_N_E\"] || []).push([[2535,7200],{\n\n/***/ 55891:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"z\": function() { return /* binding */ scrollIntoView; }\n/* harmony export */ });\nvar smoothScrollId = null;\nvar smoothScrollStartY = 0;\nvar smoothScrollDeltaY = 0;\nvar smoothScrollStartTime = 0;\nvar smoothScrollDuration = 400;\nfunction scrollIntoView(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n smoothScrollStartY = window.scrollY || window.pageYOffset || 0;\n smoothScrollDeltaY = element.getBoundingClientRect().top;\n var headerElement = document.querySelector('.zone-header');\n var productSubNavElement = document.querySelector('.ob-product-sub-nav');\n\n if (headerElement) {\n smoothScrollDeltaY -= headerElement.getBoundingClientRect().bottom;\n\n if (productSubNavElement) {\n smoothScrollDeltaY -= productSubNavElement.getBoundingClientRect().bottom;\n }\n }\n\n if (options.behavior === 'smooth' && typeof requestAnimationFrame !== 'undefined') {\n smoothScrollStartTime = Date.now();\n\n if (smoothScrollId == null) {\n smoothScrollStep();\n }\n } else {\n if (smoothScrollId != null) {\n cancelAnimationFrame(smoothScrollId);\n smoothScrollId = null;\n }\n\n window.scrollTo(window.scrollX, null);\n }\n}\n\nfunction smoothScrollStep() {\n var elapsed = Date.now() - smoothScrollStartTime;\n var t = elapsed / smoothScrollDuration;\n\n if (t < 1) {\n smoothScrollId = requestAnimationFrame(smoothScrollStep);\n window.scrollTo(window.scrollX, easeInOutQuad(t) * smoothScrollDeltaY + smoothScrollStartY);\n } else {\n smoothScrollId = null;\n window.scrollTo(window.scrollX, smoothScrollDeltaY + smoothScrollStartY);\n }\n}\n\nfunction easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : (4 - 2 * t) * t - 1;\n}\n\n/***/ }),\n\n/***/ 47200:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41539);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88674);\n/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21249);\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67294);\n/* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5152);\n/* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dynamic__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _adapters_helpers_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24036);\n/* harmony import */ var _adapters_helpers_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8996);\n/* harmony import */ var _adapters_helpers_Scroll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(55891);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(85893);\n\n\n\n\n\nvar Icon = next_dynamic__WEBPACK_IMPORTED_MODULE_4___default()(function () {\n return __webpack_require__.e(/* import() */ 713).then(__webpack_require__.bind(__webpack_require__, 80713));\n}, {\n loadableGenerated: {\n webpack: function webpack() {\n return [/*require.resolve*/(80713)];\n }\n }\n});\n\n\n\n\n\n\nvar DropDownSelector = function DropDownSelector(_ref) {\n var _options$selectedOpti, _options$selectedOpti2;\n\n var options = _ref.options,\n selectedOption = _ref.selectedOption,\n handleOptionClick = _ref.handleOptionClick,\n anchorId = _ref.anchorId;\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),\n isOpen = _useState[0],\n setIsOpen = _useState[1];\n\n var dropDownRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)();\n (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {\n var _window, _window$location;\n\n if (((_window = window) == null ? void 0 : (_window$location = _window.location) == null ? void 0 : _window$location.hash) === \"#\".concat(anchorId) && (dropDownRef == null ? void 0 : dropDownRef.current)) {\n var timeout = null;\n window.setTimeout(function () {\n timeout = (0,_adapters_helpers_Scroll__WEBPACK_IMPORTED_MODULE_8__/* .scrollIntoView */ .z)(dropDownRef.current, {\n behavior: 'smooth',\n block: 'nearest'\n });\n }, 250);\n return function () {\n clearTimeout(timeout);\n };\n }\n }, []);\n\n var selectOption = function selectOption(index, url) {\n if (url) {\n (0,_adapters_helpers_Utils__WEBPACK_IMPORTED_MODULE_6__/* .redirectTo */ .gB)(url);\n } else {\n handleOptionClick(index);\n setIsOpen(false);\n }\n };\n\n var toggleDropDown = function toggleDropDown() {\n setIsOpen(!isOpen);\n };\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"div\", {\n ref: dropDownRef,\n className: \"select-component \".concat(isOpen ? 'open' : ''),\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"div\", {\n className: \"select-component-header\",\n onClick: toggleDropDown,\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"span\", {\n children: (_options$selectedOpti = options[selectedOption]) == null ? void 0 : (_options$selectedOpti2 = _options$selectedOpti.fields) == null ? void 0 : _options$selectedOpti2.label\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(Icon, {\n name: _adapters_helpers_Constants__WEBPACK_IMPORTED_MODULE_5__/* .Constants.chevronDown */ .gT.chevronDown\n })]\n }), isOpen && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"ul\", {\n className: \"select-component-options\",\n children: options.map(function (option, index) {\n var _option$fields2;\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"li\", {\n className: selectOption === index ? 'selected' : '',\n onClick: function onClick() {\n var _option$fields;\n\n return selectOption(index, option == null ? void 0 : (_option$fields = option.fields) == null ? void 0 : _option$fields.tabPageUrl);\n },\n children: option == null ? void 0 : (_option$fields2 = option.fields) == null ? void 0 : _option$fields2.label\n }, index);\n })\n })]\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (DropDownSelector);\n\n/***/ })\n\n}]);"],"names":["self","push","__unused_webpack_module","__webpack_exports__","__webpack_require__","d","scrollIntoView","smoothScrollId","smoothScrollStartY","smoothScrollDeltaY","smoothScrollStartTime","element","options","arguments","length","undefined","window","scrollY","pageYOffset","getBoundingClientRect","top","headerElement","document","querySelector","productSubNavElement","bottom","behavior","requestAnimationFrame","Date","now","smoothScrollStep","t","elapsed","scrollTo","scrollX","easeInOutQuad","cancelAnimationFrame","r","react__WEBPACK_IMPORTED_MODULE_3__","next_dynamic__WEBPACK_IMPORTED_MODULE_4__","next_dynamic__WEBPACK_IMPORTED_MODULE_4___default","n","_adapters_helpers_Constants__WEBPACK_IMPORTED_MODULE_5__","_adapters_helpers_Utils__WEBPACK_IMPORTED_MODULE_6__","_adapters_helpers_Scroll__WEBPACK_IMPORTED_MODULE_8__","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__","Icon","e","then","bind","loadableGenerated","webpack","_ref","_options$selectedOpti","_options$selectedOpti2","selectedOption","handleOptionClick","anchorId","_useState","useState","isOpen","setIsOpen","dropDownRef","useRef","useEffect","_window","_window$location","location","hash","concat","current","timeout","setTimeout","z","block","clearTimeout","selectOption","index","url","gB","jsxs","ref","className","children","onClick","jsx","fields","label","name","gT","chevronDown","map","option","_option$fields2","_option$fields","tabPageUrl"],"sourceRoot":""}