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anon>"],"sourcesContent":["import React, {useState, Suspense} from 'react';\nimport PropTypes from 'prop-types'\nimport {ParallaxProvider} from 'react-scroll-parallax';\nimport Block from '../../adapters/helpers/Block'\nimport { LayoutConstants } from '../../adapters/helpers/Constants'\nimport LayoutContext from './LayoutContext';\nimport Loader from '../../adapters/helpers/Loader';\n\nfunction Layout(props) {\n const block = new Block(props);\n const extraAttributes = props.extraAttributes || {};\n const [customEvent, setCustomEvent] = useState({\n event: {}\n });\n\n const hasSpotlightContestInChildren = () => {\n const doc = block.getDocument();\n let hasContestInChildren = false;\n \n if (doc.fields && doc.fields.blocks) {\n doc.fields.blocks.forEach(block => {\n if (block.fields.code === LayoutConstants.zoneContestCode || block.fields.code === LayoutConstants.zoneThankYouCode) {\n hasContestInChildren = true;\n }\n });\n }\n \n return hasContestInChildren;\n };\n \n const hasContestInChildren = hasSpotlightContestInChildren();\n const [isContestVisible, setIsContestVisible] = useState(hasContestInChildren);\n \n const onClickCallback = (event) => {\n if (event) {\n setCustomEvent({\n event: event.target\n });\n }\n };\n \n const layoutContextProvider = {\n onContestScrollDown: () => {\n setIsContestVisible(false);\n },\n onSliderScrollUpTop: () => {\n setIsContestVisible(true);\n },\n hasContestInChildren: hasContestInChildren,\n isContestVisible: isContestVisible,\n }; \n let layoutClass = 'layout '\n if(block.getFieldValue(LayoutConstants.classNames)){\n layoutClass = layoutClass + block.getFieldValue(LayoutConstants.classNames)\n }\n return (\n hasContestInChildren ?\n <div className={layoutClass}>\n <LayoutContext.Provider value={layoutContextProvider}>\n <Suspense fallback={<Loader />}>\n <ParallaxProvider>\n {block.renderChildBlocks({extraAttributes}, onClickCallback, customEvent)}\n </ParallaxProvider>\n </Suspense>\n </LayoutContext.Provider>\n </div>\n :\n <div className={layoutClass}>\n <Suspense fallback={<Loader />}>\n <ParallaxProvider>\n {block.renderChildBlocks({extraAttributes}, onClickCallback, customEvent)}\n </ParallaxProvider>\n </Suspense>\n </div>\n );\n}\n\nexport default Layout;\n\nLayout.propTypes = {\n extraAttributes: PropTypes.object,\n};\n","import React from 'react';\n\nconst LayoutContext = React.createContext();\n\nexport default LayoutContext;","\"use strict\";\n(self[\"webpackChunk_N_E\"] = self[\"webpackChunk_N_E\"] || []).push([[4484],{\n\n/***/ 94484:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(89554);\n/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41539);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54747);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67294);\n/* harmony import */ var react_scroll_parallax__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(77776);\n/* harmony import */ var _adapters_helpers_Block__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(40483);\n/* harmony import */ var _adapters_helpers_Constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(24036);\n/* harmony import */ var _LayoutContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(97537);\n/* harmony import */ var _adapters_helpers_Loader__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(47322);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(85893);\n\n\n\n\n\n\n\n\n\n\n\nfunction Layout(props) {\n var block = new _adapters_helpers_Block__WEBPACK_IMPORTED_MODULE_5__/* [\"default\"] */ .Z(props);\n var extraAttributes = props.extraAttributes || {};\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)({\n event: {}\n }),\n customEvent = _useState[0],\n setCustomEvent = _useState[1];\n\n var hasSpotlightContestInChildren = function hasSpotlightContestInChildren() {\n var doc = block.getDocument();\n var hasContestInChildren = false;\n\n if (doc.fields && doc.fields.blocks) {\n doc.fields.blocks.forEach(function (block) {\n if (block.fields.code === _adapters_helpers_Constants__WEBPACK_IMPORTED_MODULE_6__/* .LayoutConstants.zoneContestCode */ .GK.zoneContestCode || block.fields.code === _adapters_helpers_Constants__WEBPACK_IMPORTED_MODULE_6__/* .LayoutConstants.zoneThankYouCode */ .GK.zoneThankYouCode) {\n hasContestInChildren = true;\n }\n });\n }\n\n return hasContestInChildren;\n };\n\n var hasContestInChildren = hasSpotlightContestInChildren();\n\n var _useState2 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(hasContestInChildren),\n isContestVisible = _useState2[0],\n setIsContestVisible = _useState2[1];\n\n var onClickCallback = function onClickCallback(event) {\n if (event) {\n setCustomEvent({\n event: event.target\n });\n }\n };\n\n var layoutContextProvider = {\n onContestScrollDown: function onContestScrollDown() {\n setIsContestVisible(false);\n },\n onSliderScrollUpTop: function onSliderScrollUpTop() {\n setIsContestVisible(true);\n },\n hasContestInChildren: hasContestInChildren,\n isContestVisible: isContestVisible\n };\n var layoutClass = 'layout ';\n\n if (block.getFieldValue(_adapters_helpers_Constants__WEBPACK_IMPORTED_MODULE_6__/* .LayoutConstants.classNames */ .GK.classNames)) {\n layoutClass = layoutClass + block.getFieldValue(_adapters_helpers_Constants__WEBPACK_IMPORTED_MODULE_6__/* .LayoutConstants.classNames */ .GK.classNames);\n }\n\n return hasContestInChildren ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(\"div\", {\n className: layoutClass,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_LayoutContext__WEBPACK_IMPORTED_MODULE_7__/* [\"default\"].Provider */ .Z.Provider, {\n value: layoutContextProvider,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(react__WEBPACK_IMPORTED_MODULE_3__.Suspense, {\n fallback: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_adapters_helpers_Loader__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {}),\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(react_scroll_parallax__WEBPACK_IMPORTED_MODULE_4__/* .ParallaxProvider */ .Xu, {\n children: block.renderChildBlocks({\n extraAttributes: extraAttributes\n }, onClickCallback, customEvent)\n })\n })\n })\n }) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(\"div\", {\n className: layoutClass,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(react__WEBPACK_IMPORTED_MODULE_3__.Suspense, {\n fallback: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_adapters_helpers_Loader__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {}),\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(react_scroll_parallax__WEBPACK_IMPORTED_MODULE_4__/* .ParallaxProvider */ .Xu, {\n children: block.renderChildBlocks({\n extraAttributes: extraAttributes\n }, onClickCallback, customEvent)\n })\n })\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Layout);\n\n/***/ }),\n\n/***/ 97537:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67294);\n\nvar LayoutContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext();\n/* harmony default export */ __webpack_exports__[\"Z\"] = (LayoutContext);\n\n/***/ })\n\n}]);"],"names":["self","push","__unused_webpack_module","__webpack_exports__","__webpack_require__","r","react__WEBPACK_IMPORTED_MODULE_3__","react_scroll_parallax__WEBPACK_IMPORTED_MODULE_4__","_adapters_helpers_Block__WEBPACK_IMPORTED_MODULE_5__","_adapters_helpers_Constants__WEBPACK_IMPORTED_MODULE_6__","_LayoutContext__WEBPACK_IMPORTED_MODULE_7__","_adapters_helpers_Loader__WEBPACK_IMPORTED_MODULE_8__","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__","props","doc","hasContestInChildren","block","Z","extraAttributes","_useState","useState","event","customEvent","setCustomEvent","getDocument","fields","blocks","forEach","code","GK","zoneContestCode","zoneThankYouCode","_useState2","isContestVisible","setIsContestVisible","onClickCallback","target","layoutClass","getFieldValue","classNames","jsx","className","children","Provider","value","onContestScrollDown","onSliderScrollUpTop","Suspense","fallback","Xu","renderChildBlocks","LayoutContext","react__WEBPACK_IMPORTED_MODULE_0__","createContext"],"sourceRoot":""}