(window.webpackJsonp = window.webpackJsonp || []).push([ [ 40 ], { 358: function(e, f, d) { d.r(f); d(32); e = d(1); e = d.n(e); f = d(7); var g = d.n(f), h = d(3), k = d(28), l = d(73), m = function() { function d(d, a) { for (var c = 0; c < a.length; c++) { var b = a[c]; b.enumerable = b.enumerable || !1; b.configurable = !0; "value" in b && (b.writable = !0); Object.defineProperty(d, b.key, b); } } return function(b, a, c) { return a && d(b.prototype, a), c && d(b, c), b; }; }(); d = function(d) { function b(a) { if (!(this instanceof b)) throw new TypeError("Cannot call a class as a function"); !0; a = (b.__proto__ || Object.getPrototypeOf(b)).call(this, a); if (!this) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); a = !a || "object" != typeof a && "function" != typeof a ? this : a; return void 0 !== a.data.keyfactsAnimation && a.init(), a; } return function(a, c) { if ("function" != typeof c && null !== c) throw new TypeError("Super expression must either be null or a function, not " + typeof c); a.prototype = Object.create(c && c.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }); c && (Object.setPrototypeOf ? Object.setPrototypeOf(a, c) : a.__proto__ = c); }(b, g.a), m(b, [ { key: "init", value: function() { var a = this; this.animations = []; this.animatedNumbers = this.el.querySelectorAll(".keyfacts__number-placeholder"); this.animatedNumbers.forEach(function(c) { var b = c.getAttribute("data-animation-start-number"), d = c.getAttribute("data-animation-end-number"), e = +c.getAttribute("data-animation-duration"); // console.log(c); a.animations.push(Object(l.createAnimationCount)(c, b, d, e)); // console.log(Object(l.createAnimationCount)); }); this.setScrollHandler(); this.viewPortChecker(); this.$el.find(".keyfacts__text").each(function() { Object(k.shortenTextWithEllipsis)(this, 160); }); } }, { key: "setScrollHandler", value: function() { var a = this; window.addEventListener("scroll", function() { a.viewPortChecker(); }); } }, { key: "viewPortChecker", value: function() { Object(h.isElementInViewport)(this.el) ? this.runAnimation() : this.resetAnimation(); } }, { key: "runAnimation", value: function() { this.el.classList.add("references--animation-loaded"); this.animations.forEach(function(a) { a.start(); }); } }, { key: "resetAnimation", value: function() { this.el.classList.remove("references--animation-loaded"); this.animations.forEach(function(a) { a.reset(); }); } } ]), b; }(); e.a.register("references", d); } }, [ [ 358, 0 ] ] ]);