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,UAAAhE,EAAAiE,wBAAA,CAAAC,OAAA/D,IAAAgE,QAAA,CAAArE,EAAA,CAAAsE,SAAA,aAAAC,SAAA,oEAAAnE,GAAAoB,EAAApB,CAAAA,GAAAuD,CAAAA,EAAAnC,EAAA,GAAAjB,EAAAsD,IAAA,EAAArD,EAAA,CAAAgE,aAAA,GAAAN,UAAA,0DAAAO,iBAAArD,EAAAsD,IAAApE,EAAAwB,EAAA,CAAA6C,MAAA,CAAAC,UAAAtE,EAAAwB,EAAA,CAAA+C,SAAA,CAAAC,QAAAlB,EAAAG,SAAA,IAAAxD,EAAAyD,GAAA,EAAAnD,EAAA,CAAAkE,KAAA,gBAAA3E,EAAA,GAAAG,EAAAyD,GAAA,UAAAE,UAAA,iBAAAH,SAAA3D,CAAA,SAAAG,EAAAsD,IAAA,EAAArD,EAAA,CAAAgE,aAAA,GAAAN,UAAA,0DAAAO,iBAAArD,EAAAsD,IAAApE,EAAAwB,EAAA,CAAA6C,MAAA,CAAAG,QAAAlB,EAAAgB,UAAAtE,EAAAwB,EAAA,CAAA+C,SAAA,CAAAd,SAAA,IAAAxD,EAAAyD,GAAA,EAAAnD,EAAA,CAAAkE,KAAA,iBAAA3E,EAAA,GAAAG,EAAAyD,GAAA,UAAAE,UAAA,iBAAAH,SAAA3D,CAAA,OAAAuD,CAAA,KAAApD,EAAAsD,IAAA,SAAAE,SAAA,SAAA5D,EAAAc,CAAA,CAAAI,GAAA2D,oBAAA,CAAA3D,GAAA","sources":["webpack://_N_E/./components/HTMLBlock/HTMLBlock.js","webpack://_N_E/"],"sourcesContent":["import React, { useState, useEffect } from 'react'\nimport dynamic from 'next/dynamic'\nimport Block from '../../adapters/helpers/Block'\nimport DOMPurify from 'isomorphic-dompurify'\nimport { ProductHighlightsConstants } from '../../adapters/helpers/Constants'\nconst ObLink = dynamic(() => import('../ObLink/ObLink'))\nconst Icon = dynamic(() => import('../Icon/Icon'))\n\nfunction HTMLBlock(props) {\n const block = new Block(props)\n const id = block.getAnchorId()\n const className = 'ob-html-block ' + block.getFieldValue('classNames')\n const text = block.getFieldValue('text')\n const learnMoreCta = block.getFieldValue('learnMoreCta')\n const learnMoreDataActionDetail = block.getFieldValue('learnMoreDataActionDetail')\n const relatedBlocks = block.getFieldValue('relatedBlockContents')\n const [learnMore, setLearnMore] = useState(true)\n\n useEffect(() => {\n const hash = window?.location?.hash || null\n if (hash === ProductHighlightsConstants.whyOralBHash) {\n const ele = document.getElementById('wiesooralb')\n if (ele) {\n // eslint-disable-next-line prefer-const\n let bodyRect = document.body.getBoundingClientRect(),\n // eslint-disable-next-line prefer-const\n elemRect = ele.getBoundingClientRect(),\n offset = elemRect.top - bodyRect.top\n\n if (window.innerWidth > ProductHighlightsConstants.innerWidth_4600) {\n offset = ProductHighlightsConstants.offset_10000\n } else if (window.innerWidth > ProductHighlightsConstants.innerWidth_3000) {\n offset = ProductHighlightsConstants.offset_7100\n } else if (window.innerWidth > ProductHighlightsConstants.innerWidth_2300) {\n offset = ProductHighlightsConstants.offset_5600\n } else if (window.innerWidth > ProductHighlightsConstants.innerWidth_2000) {\n offset = ProductHighlightsConstants.offset_5100\n } else if (window.innerWidth > ProductHighlightsConstants.innerWidth_1900) {\n offset = ProductHighlightsConstants.offset_4800\n } else if (window.innerWidth > ProductHighlightsConstants.innerWidth_1700) {\n offset = ProductHighlightsConstants.offset_4500\n } else if (window.innerWidth > ProductHighlightsConstants.innerWidth_1500) {\n offset = ProductHighlightsConstants.offset_4200\n } else if (window.innerWidth > ProductHighlightsConstants.innerWidth_1200) {\n offset = ProductHighlightsConstants.offset_3700\n } else if (window.innerWidth > ProductHighlightsConstants.innerWidth_380) {\n offset = ProductHighlightsConstants.offset_5000\n }\n\n window.scrollTo({\n top: offset,\n left: 200,\n behavior: 'smooth',\n })\n setLearnMore(!learnMore)\n }\n }\n }, [])\n\n const learnMoreButton = () => {\n let button\n if (learnMoreCta) {\n if (learnMore) {\n button = (\n \n \n {learnMoreCta}\n {learnMoreCta}\n \n )\n } else {\n button = (\n \n \n {learnMoreCta}\n {learnMoreCta}\n \n )\n }\n }\n\n return button\n }\n\n const handleLearnMore = () => {\n setLearnMore(!learnMore)\n }\n\n return (\n <>\n
\n {learnMoreCta && learnMore ? learnMoreButton() :
{new Block(relatedBlocks).renderSpecifiedBlock(relatedBlocks)}
}\n \n )\n}\n\nHTMLBlock.propTypes = {\n\n};\n\nexport default HTMLBlock;\n\n","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2963],{42963:function(e,n,i){i.r(n);var t=i(67294),a=i(5152),r=i.n(a),l=i(40483),o=i(29238),d=i.n(o),s=i(24036),c=i(85893),h=r()((function(){return i.e(1769).then(i.bind(i,61769))}),{loadableGenerated:{webpack:function(){return[61769]}}}),u=r()((function(){return Promise.resolve().then(i.bind(i,80713))}),{loadableGenerated:{webpack:function(){return[80713]}}});n.default=function(e){var n=new l.Z(e),i=n.getAnchorId(),a=\"ob-html-block \"+n.getFieldValue(\"classNames\"),r=n.getFieldValue(\"text\"),o=n.getFieldValue(\"learnMoreCta\"),f=n.getFieldValue(\"learnMoreDataActionDetail\"),w=n.getFieldValue(\"relatedBlockContents\"),_=(0,t.useState)(!0),F=_[0],b=_[1];(0,t.useEffect)((function(){var e,n;if(((null==(e=window)||null==(n=e.location)?void 0:n.hash)||null)===s.F2.whyOralBHash){var i=document.getElementById(\"wiesooralb\");if(i){var t=document.body.getBoundingClientRect(),a=i.getBoundingClientRect().top-t.top;window.innerWidth>s.F2.innerWidth_4600?a=s.F2.offset_10000:window.innerWidth>s.F2.innerWidth_3000?a=s.F2.offset_7100:window.innerWidth>s.F2.innerWidth_2300?a=s.F2.offset_5600:window.innerWidth>s.F2.innerWidth_2000?a=s.F2.offset_5100:window.innerWidth>s.F2.innerWidth_1900?a=s.F2.offset_4800:window.innerWidth>s.F2.innerWidth_1700?a=s.F2.offset_4500:window.innerWidth>s.F2.innerWidth_1500?a=s.F2.offset_4200:window.innerWidth>s.F2.innerWidth_1200?a=s.F2.offset_3700:window.innerWidth>s.F2.innerWidth_380&&(a=s.F2.offset_5000),window.scrollTo({top:a,left:200,behavior:\"smooth\"}),b(!F)}}}),[]);var m,g=function(){b(!F)};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(\"div\",{id:i,className:a,dangerouslySetInnerHTML:{__html:d().sanitize(r,{ADD_TAGS:[\"iframe\"]},{ADD_ATTR:[\"allow\",\"allowfullscreen\",\"frameborder\",\"scrolling\",\"target\"]})}}),o&&F?(o&&(m=F?(0,c.jsxs)(h,{ariaExpanded:!0,className:\"primaryGrey ob-best-clean-learn-more event_button_click\",dataActionDetail:f,tag:s.F2.button,ariaLabel:s.F2.learnMore,onClick:g,children:[(0,c.jsx)(u,{name:\"chevronDown\"}),o,(0,c.jsx)(\"span\",{className:\"visuallyhidden\",children:o})]}):(0,c.jsxs)(h,{ariaExpanded:!1,className:\"primaryGrey ob-best-clean-learn-more event_button_click\",dataActionDetail:f,tag:s.F2.button,onClick:g,ariaLabel:s.F2.learnMore,children:[(0,c.jsx)(u,{name:\"chevronRight\"}),o,(0,c.jsx)(\"span\",{className:\"visuallyhidden\",children:o})]})),m):(0,c.jsxs)(\"div\",{children:[\" \",new l.Z(w).renderSpecifiedBlock(w),\" \"]})]})}}}]);"],"names":["self","webpackChunk_N_E","push","e","n","i","r","t","a","l","o","d","s","c","h","then","bind","loadableGenerated","webpack","u","Promise","resolve","default","Z","getAnchorId","getFieldValue","f","w","_","useState","F","b","useEffect","window","location","hash","F2","whyOralBHash","document","getElementById","body","getBoundingClientRect","top","innerWidth","innerWidth_4600","offset_10000","innerWidth_3000","offset_7100","innerWidth_2300","offset_5600","innerWidth_2000","offset_5100","innerWidth_1900","offset_4800","innerWidth_1700","offset_4500","innerWidth_1500","offset_4200","innerWidth_1200","offset_3700","innerWidth_380","offset_5000","scrollTo","left","behavior","m","g","jsxs","Fragment","children","jsx","id","className","dangerouslySetInnerHTML","__html","sanitize","ADD_TAGS","ADD_ATTR","ariaExpanded","dataActionDetail","tag","button","ariaLabel","learnMore","onClick","name","renderSpecifiedBlock"],"sourceRoot":""}