-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js.map
1 lines (1 loc) · 7.46 KB
/
main.js.map
1
{"version":3,"names":[],"mappings":"","sources":["main.js"],"sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/*!\n hey, [be]Lazy.js - v1.8.2 - 2016.10.25\n A fast, small and dependency free lazy load script (https://github.com/dinbror/blazy)\n (c) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy\n*/\n(function (q, m) {\n \"function\" === typeof define && define.amd ? define(m) : \"object\" === (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) ? module.exports = m() : q.Blazy = m();\n})(undefined, function () {\n function q(b) {\n var c = b._util;c.elements = E(b.options);c.count = c.elements.length;c.destroyed && (c.destroyed = !1, b.options.container && l(b.options.container, function (a) {\n n(a, \"scroll\", c.validateT);\n }), n(window, \"resize\", c.saveViewportOffsetT), n(window, \"resize\", c.validateT), n(window, \"scroll\", c.validateT));m(b);\n }function m(b) {\n for (var c = b._util, a = 0; a < c.count; a++) {\n var d = c.elements[a],\n e;a: {\n var g = d;e = b.options;var p = g.getBoundingClientRect();if (e.container && y && (g = g.closest(e.containerClass))) {\n g = g.getBoundingClientRect();e = r(g, f) ? r(p, { top: g.top - e.offset, right: g.right + e.offset, bottom: g.bottom + e.offset, left: g.left - e.offset }) : !1;break a;\n }e = r(p, f);\n }if (e || t(d, b.options.successClass)) b.load(d), c.elements.splice(a, 1), c.count--, a--;\n }0 === c.count && b.destroy();\n }function r(b, c) {\n return b.right >= c.left && b.bottom >= c.top && b.left <= c.right && b.top <= c.bottom;\n }function z(b, c, a) {\n if (!t(b, a.successClass) && (c || a.loadInvisible || 0 < b.offsetWidth && 0 < b.offsetHeight)) if (c = b.getAttribute(u) || b.getAttribute(a.src)) {\n c = c.split(a.separator);var d = c[A && 1 < c.length ? 1 : 0],\n e = b.getAttribute(a.srcset),\n g = \"img\" === b.nodeName.toLowerCase(),\n p = (c = b.parentNode) && \"picture\" === c.nodeName.toLowerCase();if (g || void 0 === b.src) {\n var h = new Image(),\n w = function w() {\n a.error && a.error(b, \"invalid\");v(b, a.errorClass);k(h, \"error\", w);k(h, \"load\", f);\n },\n f = function f() {\n g ? p || B(b, d, e) : b.style.backgroundImage = 'url(\"' + d + '\")';x(b, a);k(h, \"load\", f);k(h, \"error\", w);\n };p && (h = b, l(c.getElementsByTagName(\"source\"), function (b) {\n var c = a.srcset,\n e = b.getAttribute(c);e && (b.setAttribute(\"srcset\", e), b.removeAttribute(c));\n }));n(h, \"error\", w);n(h, \"load\", f);B(h, d, e);\n } else b.src = d, x(b, a);\n } else \"video\" === b.nodeName.toLowerCase() ? (l(b.getElementsByTagName(\"source\"), function (b) {\n var c = a.src,\n e = b.getAttribute(c);e && (b.setAttribute(\"src\", e), b.removeAttribute(c));\n }), b.load(), x(b, a)) : (a.error && a.error(b, \"missing\"), v(b, a.errorClass));\n }function x(b, c) {\n v(b, c.successClass);c.success && c.success(b);b.removeAttribute(c.src);b.removeAttribute(c.srcset);l(c.breakpoints, function (a) {\n b.removeAttribute(a.src);\n });\n }function B(b, c, a) {\n a && b.setAttribute(\"srcset\", a);b.src = c;\n }function t(b, c) {\n return -1 !== (\" \" + b.className + \" \").indexOf(\" \" + c + \" \");\n }function v(b, c) {\n t(b, c) || (b.className += \" \" + c);\n }function E(b) {\n var c = [];b = b.root.querySelectorAll(b.selector);for (var a = b.length; a--; c.unshift(b[a])) {}return c;\n }function C(b) {\n f.bottom = (window.innerHeight || document.documentElement.clientHeight) + b;f.right = (window.innerWidth || document.documentElement.clientWidth) + b;\n }function n(b, c, a) {\n b.attachEvent ? b.attachEvent && b.attachEvent(\"on\" + c, a) : b.addEventListener(c, a, { capture: !1, passive: !0 });\n }function k(b, c, a) {\n b.detachEvent ? b.detachEvent && b.detachEvent(\"on\" + c, a) : b.removeEventListener(c, a, { capture: !1, passive: !0 });\n }function l(b, c) {\n if (b && c) for (var a = b.length, d = 0; d < a && !1 !== c(b[d], d); d++) {}\n }function D(b, c, a) {\n var d = 0;return function () {\n var e = +new Date();e - d < c || (d = e, b.apply(a, arguments));\n };\n }var u, f, A, y;return function (b) {\n if (!document.querySelectorAll) {\n var c = document.createStyleSheet();document.querySelectorAll = function (a, b, d, h, f) {\n f = document.all;b = [];a = a.replace(/\\[for\\b/gi, \"[htmlFor\").split(\",\");for (d = a.length; d--;) {\n c.addRule(a[d], \"k:v\");for (h = f.length; h--;) {\n f[h].currentStyle.k && b.push(f[h]);\n }c.removeRule(0);\n }return b;\n };\n }var a = this,\n d = a._util = {};d.elements = [];d.destroyed = !0;a.options = b || {};a.options.error = a.options.error || !1;a.options.offset = a.options.offset || 100;a.options.root = a.options.root || document;a.options.success = a.options.success || !1;a.options.selector = a.options.selector || \".b-lazy\";a.options.separator = a.options.separator || \"|\";a.options.containerClass = a.options.container;a.options.container = a.options.containerClass ? document.querySelectorAll(a.options.containerClass) : !1;a.options.errorClass = a.options.errorClass || \"b-error\";a.options.breakpoints = a.options.breakpoints || !1;a.options.loadInvisible = a.options.loadInvisible || !1;a.options.successClass = a.options.successClass || \"b-loaded\";a.options.validateDelay = a.options.validateDelay || 25;a.options.saveViewportOffsetDelay = a.options.saveViewportOffsetDelay || 50;a.options.srcset = a.options.srcset || \"data-srcset\";a.options.src = u = a.options.src || \"data-src\";y = Element.prototype.closest;A = 1 < window.devicePixelRatio;f = {};f.top = 0 - a.options.offset;f.left = 0 - a.options.offset;a.revalidate = function () {\n q(a);\n };a.load = function (a, b) {\n var c = this.options;void 0 === a.length ? z(a, b, c) : l(a, function (a) {\n z(a, b, c);\n });\n };a.destroy = function () {\n var a = this._util;this.options.container && l(this.options.container, function (b) {\n k(b, \"scroll\", a.validateT);\n });k(window, \"scroll\", a.validateT);k(window, \"resize\", a.validateT);k(window, \"resize\", a.saveViewportOffsetT);a.count = 0;a.elements.length = 0;a.destroyed = !0;\n };d.validateT = D(function () {\n m(a);\n }, a.options.validateDelay, a);d.saveViewportOffsetT = D(function () {\n C(a.options.offset);\n }, a.options.saveViewportOffsetDelay, a);C(a.options.offset);l(a.options.breakpoints, function (a) {\n if (a.width >= window.screen.width) return u = a.src, !1;\n });setTimeout(function () {\n q(a);\n });\n };\n});\n\n},{}]},{},[1]);\n"],"file":"main.js"}