{"version":3,"sources":["webpack:///41.1e4e69ef.bundle.js","webpack:///./src/js/components/global/ShareComponent.js"],"names":["webpackJsonp","257","module","exports","__webpack_require__","$","_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","obj","__esModule","default","_component","ShareComponent","el","config","_Component","this","dom","$container","$el","find","$factSheet","$shareThis","checkBannerHeroV2","moveDownloadLinks","checkShareCookie","document","querySelector","addClass","hasClass","cookieAccepted","cookies","cookie","split","shareCookie","includes","remove","each","index","element","append","Component"],"mappings":"AAAAA,cAAc,KAERC,IACA,SAAUC,EAAQC,EAASC,GAEjC,cAC4B,SAASC,GAcrC,QAASC,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,GAhBjeE,OAAOS,eAAexB,EAAS,cAC7BkB,OAAO,GAGT,IAAIO,GAAe,WAAc,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWZ,WAAaY,EAAWZ,aAAc,EAAOY,EAA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,GAAQsC,QCtCOE,IDuCc/B,KAAKT,EAASC,EAAoB","file":"41.1e4e69ef.bundle.js","sourcesContent":["webpackJsonp([41],{\n\n/***/ 257:\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\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 ShareComponent = function (_Component) {\n _inherits(ShareComponent, _Component);\n\n function ShareComponent(el, config) {\n _classCallCheck(this, ShareComponent);\n\n return _possibleConstructorReturn(this, (ShareComponent.__proto__ || Object.getPrototypeOf(ShareComponent)).call(this, el, config));\n }\n\n _createClass(ShareComponent, [{\n key: 'setupDefaults',\n value: function setupDefaults() {\n this.dom = {\n $container: this.$el.find('.share-component__wrapper--links'),\n $factSheet: $('.wh-banner-fact-sheet-links'),\n $shareThis: this.$el.find('.wh-sticky-header-sharethis')\n };\n\n this.checkBannerHeroV2();\n this.moveDownloadLinks();\n this.checkShareCookie();\n }\n }, {\n key: 'addListeners',\n value: function addListeners() {}\n }, {\n key: 'checkBannerHeroV2',\n value: function checkBannerHeroV2() {\n var bannerHeroV2 = document.querySelector('.wh-banner-hero-v2');\n\n if (bannerHeroV2) {\n this.$el.addClass('share-component--after-hero-v2');\n }\n }\n }, {\n key: 'checkShareCookie',\n value: function checkShareCookie() {\n if (this.$el.hasClass('share-component--bio-detail')) {\n var cookieAccepted = false;\n\n var cookies = document.cookie.split(';');\n var shareCookie = cookies.find(function (cookie) {\n return cookie.includes('social_share_cookie=');\n });\n\n if (shareCookie) {\n var cookieValue = shareCookie.split('=')[1];\n\n if (cookieValue === 'accepted') {\n cookieAccepted = true;\n }\n }\n\n if (!cookieAccepted) {\n this.dom.$shareThis.remove();\n }\n }\n }\n }, {\n key: 'moveDownloadLinks',\n value: function moveDownloadLinks() {\n var _this2 = this;\n\n if (this.dom.$factSheet.length === 0 || this.dom.$container.length === 0) return;\n\n this.dom.$factSheet.each(function (index, element) {\n _this2.dom.$container.append(element);\n });\n }\n }]);\n\n return ShareComponent;\n}(_component2.default);\n\nexports.default = ShareComponent;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// 41.1e4e69ef.bundle.js","import Component from 'component';\n\nclass ShareComponent extends Component {\n constructor(el, config) {\n super(el, config);\n }\n\n setupDefaults() {\n this.dom = {\n $container: this.$el.find('.share-component__wrapper--links'),\n $factSheet: $('.wh-banner-fact-sheet-links'),\n $shareThis: this.$el.find('.wh-sticky-header-sharethis')\n };\n\n this.checkBannerHeroV2();\n this.moveDownloadLinks();\n this.checkShareCookie();\n }\n\n addListeners() {}\n\n checkBannerHeroV2() {\n const bannerHeroV2 = document.querySelector('.wh-banner-hero-v2');\n\n if (bannerHeroV2) {\n this.$el.addClass('share-component--after-hero-v2');\n }\n }\n\n checkShareCookie() {\n if (this.$el.hasClass('share-component--bio-detail')) {\n let cookieAccepted = false;\n\n const cookies = document.cookie.split(';');\n const shareCookie = cookies.find(cookie =>\n cookie.includes('social_share_cookie=')\n );\n\n if (shareCookie) {\n const cookieValue = shareCookie.split('=')[1];\n\n if (cookieValue === 'accepted') {\n cookieAccepted = true;\n }\n }\n\n if (!cookieAccepted) {\n this.dom.$shareThis.remove();\n }\n }\n }\n\n moveDownloadLinks() {\n if (this.dom.$factSheet.length === 0 || this.dom.$container.length === 0)\n return;\n\n this.dom.$factSheet.each((index, element) => {\n this.dom.$container.append(element);\n });\n }\n}\n\nexport default ShareComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/components/global/ShareComponent.js"],"sourceRoot":""}