PageSourceSearch

https://severnandwyeelectrical.co.uk/wp-content/plugins/fat-gallery/assets/js/ladda/ladda.min.js

js severnandwyeelectrical.co.uk collected 2026-10-08 02:30:49 UTC 3,665 bytes, 88 lines download raw bytes

1/*!
2 * Ladda 0.8.0 (2013-09-05, 18:54)
3 * http://lab.hakim.se/ladda
4 * MIT licensed
5 *
6 * Copyright (C) 2013 Hakim El Hattab, http://hakim.se
7 */
8(function (t, e) {
9    "object" == typeof exports ? module.exports = e() : "function" == typeof define && define.amd ? define(["spin.min"], e) : t.Ladda = e(t.Spinner)
10})(this, function (t) {
11    "use strict";
12    function e(t) {
13        if (t === void 0)return console.warn("Ladda button target must be defined."), void 0;
14        t.querySelector(".ladda-label") || (t.innerHTML = '<span class="ladda-label">' + t.innerHTML + "</span>");
15        var e = i(t), n = document.createElement("span");
16        n.className = "ladda-spinner", t.appendChild(n);
17        var r, a = {
18            start: function () {
19                return t.setAttribute("disabled", ""), t.setAttribute("data-loading", ""), clearTimeout(r), e.spin(n), this.setProgress(0), this
20            }, startAfter: function (t) {
21                return clearTimeout(r), r = setTimeout(function () {
22                    a.start()
23                }, t), this
24            }, stop: function () {
25                return t.removeAttribute("disabled"), t.removeAttribute("data-loading"), clearTimeout(r), r = setTimeout(function () {
26                    e.stop()
27                }, 1e3), this
28            }, toggle: function () {
29                return this.isLoading() ? this.stop() : this.start(), this
30            }, setProgress: function (e) {
31                e = Math.max(Math.min(e, 1), 0);
32                var n = t.querySelector(".ladda-progress");
33                0 === e && n && n.parentNode ? n.parentNode.removeChild(n) : (n || (n = document.createElement("div"), n.className = "ladda-progress", t.appendChild(n)), n.style.width = (e || 0) * t.offsetWidth + "px")
34            }, enable: function () {
35                return this.stop(), this
36            }, disable: function () {
37                return this.stop(), t.setAttribute("disabled", ""), this
38            }, isLoading: function () {
39                return t.hasAttribute("data-loading")
40            }
41        };
42        return o.push(a), a
43    }
44
45    function n(t, n) {
46        n = n || {};
47        var r = [];
48        "string" == typeof t ? r = a(document.querySelectorAll(t)) : "object" == typeof t && "string" == typeof t.nodeName && (r = [t]);
49        for (var i = 0, o = r.length; o > i; i++)(function () {
50            var t = r[i];
51            if ("function" == typeof t.addEventListener) {
52                var a = e(t), o = -1;
53                t.addEventListener("click", function () {
54                    a.startAfter(1), "number" == typeof n.timeout && (clearTimeout(o), o = setTimeout(a.stop, n.timeout)), "function" == typeof n.callback && n.callback.apply(null, [a])
55                }, !1)
56            }
57        })()
58    }
59
60    function r() {
61        for (var t = 0, e = o.length; e > t; t++)o[t].stop()
62    }
63
64    function i(e) {
65        var n, r = e.offsetHeight;
66        r > 32 && (r *= .8), e.hasAttribute("data-spinner-size") && (r = parseInt(e.getAttribute("data-spinner-size"), 10)), e.hasAttribute("data-spinner-color") && (n = e.getAttribute("data-spinner-color"));
67        var i = 12, a = .2 * r, o = .6 * a, s = 7 > a ? 2 : 3;
68        return new t({
69            color: n || "#fff",
70            lines: i,
71            radius: a,
72            length: o,
73            width: s,
74            zIndex: "auto",
75            top: "auto",
76            left: "auto",
77            className: ""
78        })
79    }
80
81    function a(t) {
82        for (var e = [], n = 0; t.length > n; n++)e.push(t[n]);
83        return e
84    }
85
86    var o = [];
87    return {bind: n, create: e, stopAll: r}
88});

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.