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,eAAA,GAAAjE,IAAAQ,GAAA,GAAAL,EAAAiD,IAAA,SAAAC,UAAA,kDAAAtD,EAAA0D,MAAA,CAAAmB,SAAA,CAAAzB,SAAA,IAAAhD,EAAA6C,GAAA,EAAA9B,EAAA,CAAAkD,IAAA,KAAAjB,SAAApD,EAAA0D,MAAA,CAAAY,KAAA,MAAAlE,EAAA6C,GAAA,OAAAK,UAAA,4BAAAF,SAAApD,EAAA0D,MAAA,CAAAa,QAAA,MAAAnE,EAAA6C,GAAA,OAAAK,UAAA,+BAAAkB,wBAAA,CAAAC,OAAA5D,IAAA6D,QAAA,CAAA1E,EAAA0D,MAAA,CAAAiB,WAAA,iCAAA/B,MAAA,CAAA3C,GAAA","sources":["webpack://_N_E/./components/FeaturesTabBlock/FeaturesTabBlock.js","webpack://_N_E/"],"sourcesContent":["import React, { useState, useEffect, useRef, Suspense } from 'react';\nimport dynamic from 'next/dynamic';\nimport Block from '../../adapters/helpers/Block';\nconst Image = dynamic(() => import('../Image/Image'));\nconst Heading = dynamic(() => import('../Heading/Heading'));\nconst Icon = dynamic(()=> import('../Icon/Icon'));\nimport {smoothVerticalScroll} from '../../adapters/helpers/Utils';\nimport Loader from '../../adapters/helpers/Loader';\nimport DOMPurify from 'isomorphic-dompurify';\n\nexport default function FeaturesTab(props) {\n const { extraAttributes } = props;\n\n return extraAttributes?.entity?.featuresTab ? renderFeaturesTabBlock(extraAttributes.entity.featuresTab) : '';\n}\n\nfunction renderFeaturesTabBlock(featuresTab) {\n\n const block = new Block(featuresTab);\n\n const value = name => {\n return block.getFieldValue(name);\n };\n\n const [activeTab, setActiveTab] = useState(0);\n const featureRef = useRef(null);\n\n useEffect(() => {\n if (window) {\n window.addEventListener('hashchange', selectFeatureFromUrl);\n return () => {\n window.removeEventListener('hashchange', selectFeatureFromUrl);\n }\n }\n });\n\n const selectFeatureFromUrl = () => {\n const hashIndex = parseInt(location.hash.substring(location.hash.length - 1), 10);\n if (!isNaN(hashIndex) && hashIndex <= (features.length - 1)) {\n if (featureRef?.current) {\n scrollToTab(hashIndex, `#${anchorId}`);\n }\n }\n };\n\n const scrollToTab = (featureIndex, elemSelector) => {\n setActiveTab(featureIndex);\n const targetElement = document.querySelector(elemSelector);\n const subNav = document.querySelector('.ob-product-sub-nav__container');\n const subNavHeight = subNav?.offsetHeight ? subNav.offsetHeight : 0;\n smoothVerticalScroll(targetElement, 'top', subNavHeight);\n };\n\n let className = 'ob-features-tab ' + block.getFieldValue('classNames');\n\n const features = value('features');\n const anchorId = value('anchorId');\n\n return (\n }>\n
\n {/* START MOBILE LAYOUT */}\n
    \n {\n features.map((feature, featureIndex) => (\n
  • \n scrollToTab(featureIndex,'.ob-features-tab__item.is-active .ob-features-tab__tabs-button')}\n className={`event_button_click ob-features-tab__tabs-button ${featureIndex === activeTab ? 'is-active' : ''}`}\n data-action-detail={feature.fields.shortTitle}\n id={`accordion-control-${featureIndex}`}\n aria-expanded={featureIndex === activeTab}\n aria-disabled={featureIndex === activeTab}\n aria-controls={`features-tab-content-${featureIndex}`}\n >\n \n {feature.fields.shortTitle}\n \n \n {featureIndex === activeTab ? () : ()}\n \n \n \n }>\n \n {featureIndex === activeTab &&\n
    \n {feature.fields.title}\n

    {feature.fields.subtitle}

    \n

    \n
    \n }\n \n
    \n
\n \n ))\n }\n \n {/* END MOBILE LAYOUT */}\n\n {/* START DESKTOP LAYOUT */}\n
\n
\n {\n features.map((feature, featureIndex) => (\n
\n setActiveTab(featureIndex)}\n className={`event_button_click ob-features-tab__tabs-button ${featureIndex === activeTab ? 'is-active' : ''}`}\n data-action-detail={feature.fields.shortTitle}\n role=\"tab\"\n aria-selected={featureIndex === activeTab}\n aria-controls={`feature-tab-content-${featureIndex}`}\n id={`feature-tab-${featureIndex}`}\n >\n {feature.fields.shortTitle}\n \n
\n ))\n }\n
\n
\n {\n features.map((feature, featureIndex) => (\n \n \n {featureIndex === activeTab &&\n
\n {feature.fields.title}\n

{feature.fields.subtitle}

\n

\n
\n }\n
\n ))\n }\n
\n \n {/* END DESKTOP LAYOUT */}\n \n
\n );\n}\n","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1668],{41668:function(e,t,a){a.r(t),a.d(t,{default:function(){return _}});var n=a(67294),s=a(5152),i=a.n(s),c=a(40483),r=a(8996),o=a(47322),l=a(29238),u=a.n(l),d=a(85893),b=i()((function(){return a.e(8084).then(a.bind(a,48084))}),{loadableGenerated:{webpack:function(){return[48084]}}}),f=i()((function(){return a.e(2116).then(a.bind(a,92116))}),{loadableGenerated:{webpack:function(){return[92116]}}}),h=i()((function(){return a.e(713).then(a.bind(a,80713))}),{loadableGenerated:{webpack:function(){return[80713]}}});function _(e){var t,a=e.extraAttributes;return(null==a||null==(t=a.entity)?void 0:t.featuresTab)?function(e){var t=new c.Z(e),a=function(e){return t.getFieldValue(e)},s=(0,n.useState)(0),i=s[0],l=s[1],_=(0,n.useRef)(null);(0,n.useEffect)((function(){if(window)return window.addEventListener(\"hashchange\",x),function(){window.removeEventListener(\"hashchange\",x)}}));var x=function(){var e=parseInt(location.hash.substring(location.hash.length-1),10);!isNaN(e)&&e<=p.length-1&&(null==_?void 0:_.current)&&m(e,\"#\".concat(j))},m=function(e,t){l(e);var a=document.querySelector(t),n=document.querySelector(\".ob-product-sub-nav__container\"),s=(null==n?void 0:n.offsetHeight)?n.offsetHeight:0;(0,r.L3)(a,\"top\",s)},v=\"ob-features-tab \"+t.getFieldValue(\"classNames\"),p=a(\"features\"),j=a(\"anchorId\");return(0,d.jsx)(n.Suspense,{fallback:(0,d.jsx)(o.default,{}),children:(0,d.jsxs)(\"div\",{className:v,id:j,ref:_,children:[(0,d.jsx)(\"ul\",{className:\"ob-features-tab__wrapper ob-features-tab--mobile\",children:p.map((function(e,t){var a;return(0,d.jsxs)(\"li\",{className:\"ob-features-tab__item \".concat(null==e||null==(a=e.fields)?void 0:a.classNames,\" \").concat(t===i?\"is-active\":\"\"),children:[(0,d.jsxs)(\"button\",{onClick:function(){return m(t,\".ob-features-tab__item.is-active .ob-features-tab__tabs-button\")},className:\"event_button_click ob-features-tab__tabs-button \".concat(t===i?\"is-active\":\"\"),\"data-action-detail\":e.fields.shortTitle,id:\"accordion-control-\".concat(t),\"aria-expanded\":t===i,\"aria-disabled\":t===i,\"aria-controls\":\"features-tab-content-\".concat(t),children:[(0,d.jsx)(\"span\",{children:e.fields.shortTitle}),(0,d.jsx)(\"span\",{className:\"ob-features-tab__tabs-button-icon\",\"aria-hidden\":\"true\",children:t===i?(0,d.jsx)(h,{name:\"chevronTop\"}):(0,d.jsx)(h,{name:\"chevronDown\"})})]}),(0,d.jsx)(\"div\",{className:\"ob-features-tab__content-text \".concat(t===i?\"is-active\":\"\"),id:\"features-tab-content-\".concat(t),\"aria-labelledby\":\"accordion-control-\".concat(t),\"aria-hidden\":t!==i,role:\"region\",children:(0,d.jsx)(n.Suspense,{fallback:(0,d.jsx)(o.default,{}),children:(0,d.jsx)(b,{image:e.fields.mobileBackgroundAsset?e.fields.mobileBackgroundAsset:e.fields.backgroundAsset,children:t===i&&(0,d.jsxs)(\"div\",{className:\"ob-features-tab__text\",\"data-white-text\":e.fields.hasWhiteText.toString(),children:[(0,d.jsx)(f,{tag:\"h2\",children:e.fields.title}),(0,d.jsx)(\"p\",{className:\"ob-features-tab__subtitle\",children:e.fields.subtitle}),(0,d.jsx)(\"p\",{className:\"ob-features-tab__description\",dangerouslySetInnerHTML:{__html:u().sanitize(e.fields.description)}})]})})})})]},\"feature-tab-content-\".concat(t))}))}),(0,d.jsxs)(\"div\",{className:\"ob-features-tab--desktop\",children:[(0,d.jsx)(\"div\",{className:\"ob-features-tab__tabs-wrapper\",role:\"tablist\",children:p.map((function(e,t){return(0,d.jsx)(\"div\",{className:\"ob-features-tab__tabs-item\",children:(0,d.jsx)(\"button\",{onClick:function(){return l(t)},className:\"event_button_click ob-features-tab__tabs-button \".concat(t===i?\"is-active\":\"\"),\"data-action-detail\":e.fields.shortTitle,role:\"tab\",\"aria-selected\":t===i,\"aria-controls\":\"feature-tab-content-\".concat(t),id:\"feature-tab-\".concat(t),children:e.fields.shortTitle})},\"feature-tab-\".concat(t))}))}),(0,d.jsx)(\"div\",{className:\"ob-features-tab__content-wrapper\",children:p.map((function(e,t){var a;return(0,d.jsxs)(\"div\",{className:\"ob-features-tab__content-item \".concat(null==e||null==(a=e.fields)?void 0:a.classNames,\" \").concat(t===i?\"is-active\":\"\"),\"data-white-text\":e.fields.hasWhiteText.toString(),id:\"feature-tab-content-\".concat(t),role:\"tabpanel\",\"aria-hidden\":t!==i,\"aria-labelledby\":\"feature-tab-\".concat(t),tabIndex:t===i?0:-1,children:[(0,d.jsx)(b,{image:e.fields.backgroundAsset}),t===i&&(0,d.jsxs)(\"div\",{className:\"ob-features-tab__content-text\",\"data-text-align\":e.fields.textAlign,children:[(0,d.jsx)(f,{tag:\"h2\",children:e.fields.title}),(0,d.jsx)(\"p\",{className:\"ob-features-tab__subtitle\",children:e.fields.subtitle}),(0,d.jsx)(\"p\",{className:\"ob-features-tab__description\",dangerouslySetInnerHTML:{__html:u().sanitize(e.fields.description)}})]})]},\"feature-tab-content-\".concat(t))}))})]})]})})}(a.entity.featuresTab):\"\"}}}]);"],"names":["self","webpackChunk_N_E","push","e","t","a","r","d","default","_","n","s","i","c","o","l","u","b","then","bind","loadableGenerated","webpack","f","h","x","m","v","p","j","extraAttributes","entity","featuresTab","Z","getFieldValue","useState","useRef","useEffect","window","addEventListener","removeEventListener","parseInt","location","hash","substring","length","isNaN","current","concat","document","querySelector","offsetHeight","L3","jsx","Suspense","fallback","children","jsxs","className","id","ref","map","fields","classNames","onClick","shortTitle","name","role","image","mobileBackgroundAsset","backgroundAsset","hasWhiteText","toString","tag","title","subtitle","dangerouslySetInnerHTML","__html","sanitize","description","tabIndex","textAlign"],"sourceRoot":""}