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AAqC,GAAA,SAAAI,IAAAtD,EAAA4D,UAAAtD,EAAAqB,GAAAD,GAAA,UAAAJ,EAAAA,EAAA,mBAAAM,EAAA,cAAArB,EAAAkB,KAAAH,EAAA+B,SAAArB,CAAA,YAAAX,EAAAxB,CAAA,MAAAC,EAAAc,EAAAY,EAAA,CAAAqC,IAAA,CAAA9D,EAAAF,EAAA0B,aAAA,CAAAX,EAAAY,EAAA,CAAAiB,UAAA,SAAA1C,GAAAD,CAAAA,GAAAC,CAAAA,EAAAD,CAAA","sources":["webpack://_N_E/./components/Layout/LayoutContext.js","webpack://_N_E/./components/Zone/Zone.js","webpack://_N_E/"],"sourcesContent":["import React from 'react';\n\nconst LayoutContext = React.createContext();\n\nexport default LayoutContext;","import dynamic from 'next/dynamic';\nimport LayoutContext from '../Layout/LayoutContext';\nimport PropTypes from 'prop-types';\nimport React, {useContext, useEffect, useLayoutEffect, useRef, Suspense} from 'react';\nimport LazyLoad from 'react-lazyload';\nimport Loader from '../../adapters/helpers/Loader';\nimport Block from '../../adapters/helpers/Block';\nimport {enableDisableFocusOnElements} from '../../adapters/helpers/Utils';\nimport {ZoneConstants} from '../../adapters/helpers/Constants';\nconst Image = dynamic(() => import('../Image/Image'));\n\n\nexport default function Zone(props) {\n const block = new Block(props);\n const extraAttributes = props.extraAttributes || {};\n const zoneRef = useRef();\n\n let ariaHidden = false;\n let className = getClassNames(block);\n const role = block.getFieldValue(ZoneConstants.role);\n const id = block.getFieldValue(ZoneConstants.id);\n const ariaLabel = block.getFieldValue(ZoneConstants.ariaLabel);\n const backgroundImage = block.getFieldValue(ZoneConstants.backgroundImage);\n\n const children = block.renderChildBlocks({ extraAttributes }, props.onClickCallback, props.customEvent);\n\n const layoutContext = useContext(LayoutContext);\n const { isContestVisible } = (layoutContext ? layoutContext : {isContestVisible: false});\n\n const hideZonesIfContestVisible = () => {\n if (block.getFieldValue(ZoneConstants.classNames) === ZoneConstants.zoneSpotlightSliderBodyClassname && isContestVisible) {\n className += ' zoneHidden';\n \n }\n if (block.getFieldValue(ZoneConstants.classNames) === ZoneConstants.zoneSpotlightContestClassname && !isContestVisible) {\n className += ' zoneHidden';\n }\n ariaHidden = className.indexOf('zoneHidden') !== -1;\n \n };\n\n hideZonesIfContestVisible();\n \n useLayoutEffect(() => {\n setTimeout(() => {\n enableDisableFocusOnElements(zoneRef.current, !ariaHidden);\n \n }, 1);\n \n });\n \n useEffect(() => {\n className = getClassNames(block);\n hideZonesIfContestVisible();\n enableDisableFocusOnElements(zoneRef.current, !ariaHidden);\n\n }, [isContestVisible]);\n\n return (backgroundImage ? (\n }>\n
\n \n {children}\n \n
\n
\n ) : (\n id === 'footer' ?\n \n <>\n
\n {children}\n
\n \n
:\n
\n {children}\n
\n ));\n}\n\nfunction getClassNames(block) {\n let classNames = ZoneConstants.zone;\n const zoneClassNames = block.getFieldValue(ZoneConstants.classNames);\n if(zoneClassNames) {\n classNames += zoneClassNames;\n }\n\n return classNames;\n}\n\nZone.propTypes = {\n className: PropTypes.string,\n backgroundImage: PropTypes.object,\n extraAttributes: PropTypes.object,\n onClickCallback: PropTypes.func,\n customEvent: PropTypes.object\n};\n","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6577],{97537:function(e,n,a){var t=a(67294).createContext();n.Z=t},36577:function(e,n,a){a.r(n),a.d(n,{default:function(){return h}});var t=a(5152),i=a.n(t),l=a(97537),r=a(67294),s=a(1216),d=a(47322),u=a(40483),o=a(8996),c=a(24036),f=a(85893),j=i()((function(){return a.e(8084).then(a.bind(a,48084))}),{loadableGenerated:{webpack:function(){return[48084]}}});function h(e){var n=new u.Z(e),a=e.extraAttributes||{},t=(0,r.useRef)(),i=!1,h=b(n),m=n.getFieldValue(c.j0.role),g=n.getFieldValue(c.j0.id),x=n.getFieldValue(c.j0.ariaLabel),C=n.getFieldValue(c.j0.backgroundImage),k=n.renderChildBlocks({extraAttributes:a},e.onClickCallback,e.customEvent),V=(0,r.useContext)(l.Z),v=(V||{isContestVisible:!1}).isContestVisible,F=function(){n.getFieldValue(c.j0.classNames)===c.j0.zoneSpotlightSliderBodyClassname&&v&&(h+=\" zoneHidden\"),n.getFieldValue(c.j0.classNames)!==c.j0.zoneSpotlightContestClassname||v||(h+=\" zoneHidden\"),i=-1!==h.indexOf(\"zoneHidden\")};return F(),(0,r.useLayoutEffect)((function(){setTimeout((function(){(0,o.MX)(t.current,!i)}),1)})),(0,r.useEffect)((function(){h=b(n),F(),(0,o.MX)(t.current,!i)}),[v]),C?(0,f.jsx)(r.Suspense,{fallback:(0,f.jsx)(d.default,{}),children:(0,f.jsx)(\"div\",{ref:t,children:(0,f.jsx)(j,{image:C,zoneClassName:h,ariaHidden:i,children:k})})}):\"footer\"===g?(0,f.jsx)(s.default,{offset:10,children:(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(\"div\",{ref:t,className:h,id:g||(\"main\"===m?m:null),\"aria-label\":x,\"aria-hidden\":i,role:m,children:k})})}):(0,f.jsx)(\"div\",{ref:t,className:h,id:g||(\"main\"===m?m:null),\"aria-label\":x,\"aria-hidden\":i,role:m,children:k})}function b(e){var n=c.j0.zone,a=e.getFieldValue(c.j0.classNames);return a&&(n+=a),n}}}]);"],"names":["self","webpackChunk_N_E","push","e","n","a","t","createContext","Z","r","d","default","h","i","l","s","u","o","c","f","j","then","bind","loadableGenerated","webpack","extraAttributes","useRef","b","m","getFieldValue","j0","role","g","id","x","ariaLabel","C","backgroundImage","k","renderChildBlocks","onClickCallback","customEvent","v","V","useContext","isContestVisible","F","classNames","zoneSpotlightSliderBodyClassname","zoneSpotlightContestClassname","indexOf","useLayoutEffect","setTimeout","MX","current","useEffect","jsx","Suspense","fallback","children","ref","image","zoneClassName","ariaHidden","offset","Fragment","className","zone"],"sourceRoot":""}