PageSourceSearch

https://mbclub.ru/js/8wayrun/porta/images.min.js?_v=62529aa8

js mbclub.ru collected 2026-09-24 23:38:49 UTC 5,526 bytes, 19 lines download raw bytes

1/*
2 imagesLoaded PACKAGED v4.1.4
3 JavaScript is all like "You images are done yet or what?"
4 MIT License
5 imagesLoaded v4.1.4
6 JavaScript is all like "You images are done yet or what?"
7 MIT License
8*/
9'use strict';(function(h,g){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",g):"object"==typeof module&&module.exports?module.exports=g():h.EvEmitter=g()})("undefined"!=typeof window?window:this,function(){function h(){}var g=h.prototype;g.on=function(d,c){if(d&&c){var e=this._events=this._events||{};d=e[d]=e[d]||[];-1==d.indexOf(c)&&d.push(c);return this}};g.once=function(d,c){if(d&&c){this.on(d,c);var e=this._onceEvents=this._onceEvents||{};(e[d]=e[d]||{})[c]=!0;return this}};
10g.off=function(d,c){if((d=this._events&&this._events[d])&&d.length)return c=d.indexOf(c),-1!=c&&d.splice(c,1),this};g.emitEvent=function(d,c){var e=this._events&&this._events[d];if(e&&e.length){e=e.slice(0);c=c||[];for(var l=this._onceEvents&&this._onceEvents[d],m=0;m<e.length;m++){var n=e[m];l&&l[n]&&(this.off(d,n),delete l[n]);n.apply(this,c)}return this}};g.allOff=function(){delete this._events;delete this._onceEvents};return h});
11(function(h,g){"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(d){return g(h,d)}):"object"==typeof module&&module.exports?module.exports=g(h,require("ev-emitter")):h.imagesLoaded=g(h,h.EvEmitter)})("undefined"!==typeof window?window:this,function(h,g){function d(a,b){for(var f in b)a[f]=b[f];return a}function c(a,b,f){if(!(this instanceof c))return new c(a,b,f);var k=a;"string"==typeof a&&(k=document.querySelectorAll(a));if(k){a=k;a=Array.isArray(a)?a:"object"==typeof a&&
12"number"==typeof a.length?p.call(a):[a];this.elements=a;this.options=d({},this.options);"function"==typeof b?f=b:d(this.options,b);if(f)this.on("always",f);this.getImages();m&&(this.jqDeferred=new m.Deferred);setTimeout(this.check.bind(this))}else n.error("Bad element for imagesLoaded "+(k||a))}function e(a){this.img=a}function l(a,b){this.url=a;this.element=b;this.img=new Image}var m=h.jQuery,n=h.console,p=Array.prototype.slice;c.prototype=Object.create(g.prototype);c.prototype.options={};c.prototype.getImages=
13function(){this.images=[];this.elements.forEach(this.addElementImages,this)};c.prototype.addElementImages=function(a){"IMG"==a.nodeName&&this.addImage(a);!0===this.options.background&&this.addElementBackgroundImages(a);var b=a.nodeType;if(b&&q[b]){var f=a.querySelectorAll("img");for(b=0;b<f.length;b++)this.addImage(f[b]);if("string"==typeof this.options.background)for(a=a.querySelectorAll(this.options.background),b=0;b<a.length;b++)this.addElementBackgroundImages(a[b])}};var q={1:!0,9:!0,11:!0};c.prototype.addElementBackgroundImages=
14function(a){var b=getComputedStyle(a);if(b)for(var f=/url\((['"])?(.*?)\1\)/gi,k=f.exec(b.backgroundImage);null!==k;)(k=k&&k[2])&&this.addBackground(k,a),k=f.exec(b.backgroundImage)};c.prototype.addImage=function(a){a=new e(a);this.images.push(a)};c.prototype.addBackground=function(a,b){a=new l(a,b);this.images.push(a)};c.prototype.check=function(){function a(f,k,r){setTimeout(function(){b.progress(f,k,r)})}var b=this;this.progressedCount=0;this.hasAnyBroken=!1;this.images.length?this.images.forEach(function(f){f.once("progress",
15a);f.check()}):this.complete()};c.prototype.progress=function(a,b,f){this.progressedCount++;this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded;this.emitEvent("progress",[this,a,b]);this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,a);this.progressedCount==this.images.length&&this.complete();this.options.debug&&n&&n.log("progress: "+f,a,b)};c.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";this.isComplete=!0;this.emitEvent(a,[this]);this.emitEvent("always",[this]);
16if(this.jqDeferred)this.jqDeferred[this.hasAnyBroken?"reject":"resolve"](this)};e.prototype=Object.create(g.prototype);e.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src)};e.prototype.getIsImageComplete=function(){return this.img.complete&&
17this.img.naturalWidth};e.prototype.confirm=function(a,b){this.isLoaded=a;this.emitEvent("progress",[this,this.img,b])};e.prototype.handleEvent=function(a){var b="on"+a.type;if(this[b])this[b](a)};e.prototype.onload=function(){this.confirm(!0,"onload");this.unbindEvents()};e.prototype.onerror=function(){this.confirm(!1,"onerror");this.unbindEvents()};e.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this);this.proxyImage.removeEventListener("error",this);this.img.removeEventListener("load",
18this);this.img.removeEventListener("error",this)};l.prototype=Object.create(e.prototype);l.prototype.check=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);this.img.src=this.url;this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())};l.prototype.unbindEvents=function(){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)};l.prototype.confirm=function(a,b){this.isLoaded=a;this.emitEvent("progress",
19[this,this.element,b])};c.makeJQueryPlugin=function(a){if(a=a||h.jQuery)m=a,m.fn.imagesLoaded=function(b,f){return(new c(this,b,f)).jqDeferred.promise(m(this))}};c.makeJQueryPlugin();return c});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.