{"version":3,"sources":["webpack:///44.ee81dfcc.bundle.js","webpack:///./src/js/components/article/ArticleFootnotes.js"],"names":["webpackJsonp","243","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","ArticleFootnotes","el","_Component","this","dom","$link","$el","find","$body","offset","outerHeight","createLink","on","gotoAnchor","each","index","str","text","replaceWith","e","preventDefault","currentTarget","attr","$tab","parents","hasClass","click","animate","scrollTop","top","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,EAAWV,cAAe,E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le.js","sourcesContent":["webpackJsonp([44],{\n\n/***/ 243:\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 ArticleFootnotes = function (_Component) {\n _inherits(ArticleFootnotes, _Component);\n\n function ArticleFootnotes(el) {\n _classCallCheck(this, ArticleFootnotes);\n\n return _possibleConstructorReturn(this, (ArticleFootnotes.__proto__ || Object.getPrototypeOf(ArticleFootnotes)).call(this, el));\n }\n\n _createClass(ArticleFootnotes, [{\n key: 'setupDefaults',\n value: function setupDefaults() {\n this.dom = {\n $link: this.$el.find('span[data-ref=\"footnote\"]'),\n $body: $('html, body')\n };\n this.offset = $('.wh-sticky-header').length ? $('.wh-sticky-header__wrapper').outerHeight() + 15 : 0;\n\n this.createLink();\n }\n }, {\n key: 'addListeners',\n value: function addListeners() {\n this.$el.on('click touch', '.footnote', this.gotoAnchor.bind(this));\n }\n }, {\n key: 'createLink',\n value: function createLink() {\n this.dom.$link.each(function (index, el) {\n var str = $(el).text();\n if (str) {\n $(el).replaceWith('' + str + '');\n }\n });\n }\n }, {\n key: 'gotoAnchor',\n value: function gotoAnchor(e) {\n e.preventDefault();\n var target = $(e.currentTarget).attr('href');\n var $tab = $(target).parents('.wh-accordion-item');\n\n if (!$tab.hasClass('wh-accordion-item--open')) {\n $tab.find('.wh-accordion-item__tab').click();\n }\n\n $('html, body').animate({\n scrollTop: $(target).offset().top - this.offset\n }, 1200);\n }\n }]);\n\n return ArticleFootnotes;\n}(_component2.default);\n\nexports.default = ArticleFootnotes;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// 44.ee81dfcc.bundle.js","import Component from 'component';\n\nclass ArticleFootnotes extends Component {\n constructor(el) {\n super(el);\n }\n\n setupDefaults() {\n this.dom = {\n $link: this.$el.find('span[data-ref=\"footnote\"]'),\n $body: $('html, body')\n };\n this.offset = $('.wh-sticky-header').length ? $('.wh-sticky-header__wrapper').outerHeight() + 15 : 0;\n\n this.createLink();\n }\n\n addListeners() {\n this.$el.on('click touch', '.footnote', ::this.gotoAnchor);\n }\n\n createLink() {\n this.dom.$link.each((index, el) => {\n const str = $(el).text();\n if (str) {\n $(el).replaceWith(`${str}`);\n }\n })\n }\n\n gotoAnchor(e) {\n e.preventDefault();\n const target = $(e.currentTarget).attr('href');\n const $tab = $(target).parents('.wh-accordion-item');\n\n if (!$tab.hasClass('wh-accordion-item--open')) {\n $tab.find('.wh-accordion-item__tab').click();\n }\n\n $('html, body').animate({\n scrollTop: $(target).offset().top - this.offset\n }, 1200);\n }\n}\n\nexport default ArticleFootnotes;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/components/article/ArticleFootnotes.js"],"sourceRoot":""}