{"version":3,"sources":["webpack:///39.1e4e69ef.bundle.js","webpack:///./src/js/components/global/TwoColumns.js"],"names":["webpackJsonp","260","module","exports","__webpack_require__","$","_interopRequireDefault","obj","__esModule","default","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","call","ReferenceError","_inherits","subClass","superClass","prototype","Object","create","constructor","value","enumerable","writable","configurable","setPrototypeOf","__proto__","defineProperty","_createClass","defineProperties","target","props","i","length","descriptor","key","protoProps","staticProps","_component2","_component","_debounce3","_debounce2","TwoColumns","el","checkWidth","setWaypoints","_Component","this","dom","$container","$el","$left","find","$right","$rightTop","first","$rightBottom","last","$sticky","$stickyContent","$stickyBottom","$carousel","$carouselItems","window","on","width","adjustLayout","addClass","leftHeight","height","rightTopHeight","rightBottomHeight","rightTotal","targetHeight","css","children","hasClass","waypoint","direction","removeClass","offset","toggleClass","parents","outerHeight","Component"],"mappings":"AAAAA,cAAc,KAERC,IACA,SAAUC,EAAQC,EAASC,GAEjC,cAC4B,SAASC,GAgBrC,QAASC,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,GAEvF,QAASG,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAEhH,QAASC,GAA2BC,EAAMC,GAAQ,IAAKD,EAAQ,KAAM,IAAIE,gBAAe,4DAAgE,QAAOD,GAAyB,gBAATA,IAAqC,kBAATA,GAA8BD,EAAPC,EAElO,QAASE,GAAUC,EAAUC,GAAc,GAA0B,kBAAfA,IAA4C,OAAfA,EAAuB,KAAM,IAAIP,WAAU,iEAAoEO,GAAeD,GAASE,UAAYC,OAAOC,OAAOH,GAAcA,EAAWC,WAAaG,aAAeC,MAAON,EAAUO,YAAY,EAAOC,UAAU,EAAMC,cAAc,KAAeR,IAAYE,OAAOO,eAAiBP,OAAOO,eAAeV,EAAUC,GAAcD,EAASW,UAAYV,GApBjeE,OAAOS,eAAe5B,EAAS,cAC7BsB,OAAO,GAGT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UAAUM,SAAS,aAG9B,IAAMC,GAAarB,KAAKC,IAAIG,MAAMkB,SAC5BC,EAAiBvB,KAAKC,IAAIM,UAAUe,SACpCE,EAAoBxB,KAAKC,IAAIQ,aAAaa,SAC1CG,EAAaF,EAAiBC,EAEhCE,EAAeL,EAAaE,CAE5BvB,MAAKC,IAAIK,OAAOpB,QAAU,IAC5BwC,EAAeL,GAGbA,EAAaI,EACfzB,KAAKC,IAAIQ,aAAakB,IAAI,SAAUD,IAEpC1B,KAAKC,IAAIQ,aAAakB,IAAI,SAAUH,GACpCxB,KAAKC,IAAIQ,aAAaW,SAAS,iBD0CjChC,IAAK,eACLd,MAAO,WCvCK,UACsC,KAA9C0B,KAAKC,IAAIW,eAAegB,WAAW1C,QAAgBc,KAAKC,IAAIQ,aAAaoB,SAAS,cAElF3E,EAAE8D,QAAQE,SAAW,OACvBlB,KAAKC,IAAIU,QAAQmB,SAAS,SAAAC,GACN,SAAdA,EACF,EAAK9B,IAAIU,QAAQS,SAAS,SAE1B,EAAKnB,IAAIU,QAAQqB,YAAY,WAE5BC,OAAO,UAEZjC,KAAKC,IAAIY,cAAciB,SAAS,SAAAC,GAC9B,EAAK9B,IAAIU,QAAQuB,YAAY,QAAuB,OAAdH,GACtC,EAAK9B,IAAIU,QAAQwB,QAAQ,WAAWD,YAAY,mBAAkC,SAAdH,KACjEE,OAAQ,WACX,MAAO,GAAKhC,IAAIW,eAAewB,cAAgB,YD+C9CzC,GC1HgB0C,UD6HzBrF,GAAQM,QC5COqC,ID6Cc9B,KAAKb,EAASC,EAAoB","file":"39.1e4e69ef.bundle.js","sourcesContent":["webpackJsonp([39],{\n\n/***/ 260:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function($) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _component = __webpack_require__(33);\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _debounce2 = __webpack_require__(206);\n\nvar _debounce3 = _interopRequireDefault(_debounce2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TwoColumns = function (_Component) {\n _inherits(TwoColumns, _Component);\n\n function TwoColumns(el) {\n _classCallCheck(this, TwoColumns);\n\n var _this = _possibleConstructorReturn(this, (TwoColumns.__proto__ || Object.getPrototypeOf(TwoColumns)).call(this, el));\n\n _this.checkWidth().setWaypoints();\n return _this;\n }\n\n _createClass(TwoColumns, [{\n key: 'setupDefaults',\n value: function setupDefaults() {\n this.dom = {\n $container: this.$el,\n $left: this.$el.find('.col-70'),\n $right: this.$el.find('.col-30'),\n $rightTop: this.$el.find('.col-30').first(),\n $rightBottom: this.$el.find('.col-30').last(),\n $sticky: this.$el.find('.col-30 .wh-sticky'),\n $stickyContent: this.$el.find('.wh-sticky__wrapper'),\n $stickyBottom: this.$el.find('.col-30--bottom'),\n $carousel: $('.featured-content-carousel__list--main'),\n $carouselItems: $('.featured-content-carousel__list--main .featured-content-carousel-item')\n };\n }\n }, {\n key: 'addListeners',\n value: function addListeners() {\n var _this2 = this;\n\n $(window).on('resize', (0, _debounce3.default)(function () {\n _this2.checkWidth();\n }, 500));\n }\n }, {\n key: 'checkWidth',\n value: function checkWidth() {\n if ($(window).width() >= 1024) this.adjustLayout();\n\n return this;\n }\n }, {\n key: 'adjustLayout',\n value: function adjustLayout() {\n if (this.dom.$carouselItems.length === 1) {\n this.dom.$carousel.addClass('full-width');\n }\n\n var leftHeight = this.dom.$left.height();\n var rightTopHeight = this.dom.$rightTop.height();\n var rightBottomHeight = this.dom.$rightBottom.height();\n var rightTotal = rightTopHeight + rightBottomHeight;\n\n var targetHeight = leftHeight - rightTopHeight;\n\n if (this.dom.$right.length <= 1) {\n targetHeight = leftHeight;\n }\n\n if (leftHeight > rightTotal) {\n this.dom.$rightBottom.css('height', targetHeight);\n } else {\n this.dom.$rightBottom.css('height', rightBottomHeight);\n this.dom.$rightBottom.addClass('no-sticky');\n }\n }\n }, {\n key: 'setWaypoints',\n value: function setWaypoints() {\n var _this3 = this;\n\n if (this.dom.$stickyContent.children().length === 0 || this.dom.$rightBottom.hasClass('no-sticky')) return;\n // Right col sticky setup\n if ($(window).width() >= 1024) {\n this.dom.$sticky.waypoint(function (direction) {\n if (direction === 'down') {\n _this3.dom.$sticky.addClass('stuck');\n } else {\n _this3.dom.$sticky.removeClass('stuck');\n }\n }, { offset: '120px' });\n\n this.dom.$stickyBottom.waypoint(function (direction) {\n _this3.dom.$sticky.toggleClass('stuck', direction === 'up');\n _this3.dom.$sticky.parents('.col-30').toggleClass('sticky-surpassed', direction === 'down');\n }, { offset: function offset() {\n return _this3.dom.$stickyContent.outerHeight() + 120;\n } });\n }\n }\n }]);\n\n return TwoColumns;\n}(_component2.default);\n\nexports.default = TwoColumns;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// 39.1e4e69ef.bundle.js","import Component from 'component';\nimport _debounce from 'lodash/debounce';\n\nclass TwoColumns extends Component{\n constructor(el){\n super(el);\n\n this.checkWidth()\n .setWaypoints();\n }\n\n setupDefaults(){\n this.dom = {\n $container: this.$el,\n $left: this.$el.find('.col-70'),\n $right: this.$el.find('.col-30'),\n $rightTop: this.$el.find('.col-30').first(),\n $rightBottom: this.$el.find('.col-30').last(),\n $sticky: this.$el.find('.col-30 .wh-sticky'),\n $stickyContent: this.$el.find('.wh-sticky__wrapper'),\n $stickyBottom: this.$el.find('.col-30--bottom'),\n $carousel: $('.featured-content-carousel__list--main'),\n $carouselItems: $('.featured-content-carousel__list--main .featured-content-carousel-item')\n };\n }\n\n addListeners(){\n $(window).on('resize', _debounce(() => {\n this.checkWidth();\n }, 500));\n }\n\n checkWidth(){\n if ($(window).width() >= 1024) this.adjustLayout();\n\n return this;\n }\n\n adjustLayout(){\n if (this.dom.$carouselItems.length === 1) {\n this.dom.$carousel.addClass('full-width');\n }\n\n const leftHeight = this.dom.$left.height();\n const rightTopHeight = this.dom.$rightTop.height();\n const rightBottomHeight = this.dom.$rightBottom.height();\n const rightTotal = rightTopHeight + rightBottomHeight;\n\n let targetHeight = leftHeight - rightTopHeight;\n\n if (this.dom.$right.length <= 1) {\n targetHeight = leftHeight;\n }\n\n if (leftHeight > rightTotal) {\n this.dom.$rightBottom.css('height', targetHeight);\n } else {\n this.dom.$rightBottom.css('height', rightBottomHeight);\n this.dom.$rightBottom.addClass('no-sticky');\n }\n }\n\n setWaypoints(){\n if (this.dom.$stickyContent.children().length === 0 || this.dom.$rightBottom.hasClass('no-sticky')) return;\n // Right col sticky setup\n if ($(window).width() >= 1024) {\n this.dom.$sticky.waypoint(direction => {\n if (direction === 'down') {\n this.dom.$sticky.addClass('stuck');\n } else {\n this.dom.$sticky.removeClass('stuck');\n }\n }, { offset:'120px' });\n\n this.dom.$stickyBottom.waypoint(direction => {\n this.dom.$sticky.toggleClass('stuck', direction === 'up');\n this.dom.$sticky.parents('.col-30').toggleClass('sticky-surpassed', direction === 'down');\n }, { offset: () => {\n return this.dom.$stickyContent.outerHeight() + 120;\n } });\n }\n }\n}\n\nexport default TwoColumns;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/components/global/TwoColumns.js"],"sourceRoot":""}