PageSourceSearch

https://www.niclatulippe.ca/static/_common/image_sets/imagesloaded…693bee744b84810aef3b2ea8d54e82a5572584db.js

js niclatulippe.ca collected 2026-10-06 20:42:22 UTC 7,954 bytes, 253 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 */
6
7
8!(function (e, t) {
9  "function" == typeof define && define.amd
10    ? define("ev-emitter/ev-emitter", t)
11    : "object" == typeof module && module.exports
12      ? (module.exports = t())
13      : (e.EvEmitter = t());
14})("undefined" != typeof window ? window : this, function () {
15  function e() {}
16  var t = e.prototype;
17  return (
18    (t.on = function (e, t) {
19      if (e && t) {
20        var i = (this._events = this._events || {}),
21          n = (i[e] = i[e] || []);
22        return n.indexOf(t) == -1 && n.push(t), this;
23      }
24    }),
25    (t.once = function (e, t) {
26      if (e && t) {
27        this.on(e, t);
28        var i = (this._onceEvents = this._onceEvents || {}),
29          n = (i[e] = i[e] || {});
30        return (n[t] = !0), this;
31      }
32    }),
33    (t.off = function (e, t) {
34      var i = this._events && this._events[e];
35      if (i && i.length) {
36        var n = i.indexOf(t);
37        return n != -1 && i.splice(n, 1), this;
38      }
39    }),
40    (t.emitEvent = function (e, t) {
41      var i = this._events && this._events[e];
42      if (i && i.length) {
43        (i = i.slice(0)), (t = t || []);
44        for (
45          var n = this._onceEvents && this._onceEvents[e], o = 0;
46          o < i.length;
47          o++
48        ) {
49          var r = i[o],
50            s = n && n[r];
51          s && (this.off(e, r), delete n[r]), r.apply(this, t);
52        }
53        return this;
54      }
55    }),
56    (t.allOff = function () {
57      delete this._events, delete this._onceEvents;
58    }),
59    e
60  );
61}),
62(function (e, t) {
63  "function" == typeof define && define.amd
64    ? define(["ev-emitter/ev-emitter"], function (i) {
65      return t(e, i);
66    })
67    : "object" == typeof module && module.exports
68      ? (module.exports = t(e, require("ev-emitter")))
69      : (e.imagesLoaded = t(e, e.EvEmitter));
70})("undefined" != typeof window ? window : this, function (e, t) {
71  function i(e, t) {
72    for (var i in t) e[i] = t[i];
73    return e;
74  }
75  function n(e) {
76    if (Array.isArray(e)) return e;
77    var t = "object" == typeof e && "number" == typeof e.length;
78    return t ? d.call(e) : [e];
79  }
80  function o(e, t, r) {
81    if (!(this instanceof o)) return new o(e, t, r);
82    var s = e;
83    return (
84      "string" == typeof e && (s = document.querySelectorAll(e)),
85      s
86        ? ((this.elements = n(s)),
87        (this.options = i({}, this.options)),
88        "function" == typeof t ? (r = t) : i(this.options, t),
89        r && this.on("always", r),
90        this.getImages(),
91        h && (this.jqDeferred = new h.Deferred()),
92        void setTimeout(this.check.bind(this)))
93        : void a.error("Bad element for imagesLoaded " + (s || e))
94    );
95  }
96  function r(e) {
97    this.img = e;
98  }
99  function s(e, t) {
100    (this.url = e), (this.element = t), (this.img = new Image());
101  }
102  var h = e.jQuery,
103    a = e.console,
104    d = Array.prototype.slice;
105  (o.prototype = Object.create(t.prototype)),
106  (o.prototype.options = {}),
107  (o.prototype.getImages = function () {
108    (this.images = []), this.elements.forEach(this.addElementImages, this);
109  }),
110  (o.prototype.addElementImages = function (e) {
111    "IMG" == e.nodeName && this.addImage(e),
112    this.options.background === !0 && this.addElementBackgroundImages(e);
113    var t = e.nodeType;
114    if (t && u[t]) {
115      for (var i = e.querySelectorAll("img"), n = 0; n < i.length; n++) {
116        var o = i[n];
117        this.addImage(o);
118      }
119      if ("string" == typeof this.options.background) {
120        var r = e.querySelectorAll(this.options.background);
121        for (n = 0; n < r.length; n++) {
122          var s = r[n];
123          this.addElementBackgroundImages(s);
124        }
125      }
126    }
127  });
128  var u = { 1: !0, 9: !0, 11: !0 };
129  return (
130    (o.prototype.addElementBackgroundImages = function (e) {
131      var t = getComputedStyle(e);
132      if (t)
133        for (
134          var i = /url\((['"])?(.*?)\1\)/gi, n = i.exec(t.backgroundImage);
135          null !== n;
136
137        ) {
138          var o = n && n[2];
139          o && this.addBackground(o, e), (n = i.exec(t.backgroundImage));
140        }
141    }),
142    (o.prototype.addImage = function (e) {
143      var t = new r(e);
144      this.images.push(t);
145    }),
146    (o.prototype.addBackground = function (e, t) {
147      var i = new s(e, t);
148      this.images.push(i);
149    }),
150    (o.prototype.check = function () {
151      function e(e, i, n) {
152        setTimeout(function () {
153          t.progress(e, i, n);
154        });
155      }
156      var t = this;
157      return (
158        (this.progressedCount = 0),
159        (this.hasAnyBroken = !1),
160        this.images.length
161          ? void this.images.forEach(function (t) {
162            t.once("progress", e), t.check();
163          })
164          : void this.complete()
165      );
166    }),
167    (o.prototype.progress = function (e, t, i) {
168      this.progressedCount++,
169      (this.hasAnyBroken = this.hasAnyBroken || !e.isLoaded),
170      this.emitEvent("progress", [this, e, t]),
171      this.jqDeferred &&
172        this.jqDeferred.notify &&
173        this.jqDeferred.notify(this, e),
174      this.progressedCount == this.images.length && this.complete(),
175      this.options.debug && a && a.log("progress: " + i, e, t);
176    }),
177    (o.prototype.complete = function () {
178      var e = this.hasAnyBroken ? "fail" : "done";
179      if (
180        ((this.isComplete = !0),
181        this.emitEvent(e, [this]),
182        this.emitEvent("always", [this]),
183        this.jqDeferred)
184      ) {
185        var t = this.hasAnyBroken ? "reject" : "resolve";
186        this.jqDeferred[t](this);
187      }
188    }),
189    (r.prototype = Object.create(t.prototype)),
190    (r.prototype.check = function () {
191      var e = this.getIsImageComplete();
192      return e
193        ? void this.confirm(0 !== this.img.naturalWidth, "naturalWidth")
194        : ((this.proxyImage = new Image()),
195        this.proxyImage.addEventListener("load", this),
196        this.proxyImage.addEventListener("error", this),
197        this.img.addEventListener("load", this),
198        this.img.addEventListener("error", this),
199        void (this.proxyImage.src = this.img.src));
200    }),
201    (r.prototype.getIsImageComplete = function () {
202      return this.img.complete && this.img.naturalWidth;
203    }),
204    (r.prototype.confirm = function (e, t) {
205      (this.isLoaded = e), this.emitEvent("progress", [this, this.img, t]);
206    }),
207    (r.prototype.handleEvent = function (e) {
208      var t = "on" + e.type;
209      this[t] && this[t](e);
210    }),
211    (r.prototype.onload = function () {
212      this.confirm(!0, "onload"), this.unbindEvents();
213    }),
214    (r.prototype.onerror = function () {
215      this.confirm(!1, "onerror"), this.unbindEvents();
216    }),
217    (r.prototype.unbindEvents = function () {
218      this.proxyImage.removeEventListener("load", this),
219      this.proxyImage.removeEventListener("error", this),
220      this.img.removeEventListener("load", this),
221      this.img.removeEventListener("error", this);
222    }),
223    (s.prototype = Object.create(r.prototype)),
224    (s.prototype.check = function () {
225      this.img.addEventListener("load", this),
226      this.img.addEventListener("error", this),
227      (this.img.src = this.url);
228      var e = this.getIsImageComplete();
229      e &&
230        (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"),
231        this.unbindEvents());
232    }),
233    (s.prototype.unbindEvents = function () {
234      this.img.removeEventListener("load", this),
235      this.img.removeEventListener("error", this);
236    }),
237    (s.prototype.confirm = function (e, t) {
238      (this.isLoaded = e),
239      this.emitEvent("progress", [this, this.element, t]);
240    }),
241    (o.makeJQueryPlugin = function (t) {
242      (t = t || e.jQuery),
243      t &&
244        ((h = t),
245        (h.fn.imagesLoaded = function (e, t) {
246          var i = new o(this, e, t);
247          return i.jqDeferred.promise(h(this));
248        }));
249    }),
250    o.makeJQueryPlugin(),
251    o
252  );
253});

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.