PageSourceSearch

https://www.protiq.com/out/phoenix/src/js/dropkick.js?1713770805

js protiq.com collected 2026-09-25 04:41:09 UTC 19,677 bytes, 268 lines download raw bytes

1!function () {
2    function e(e, t) {
3        t = t || {bubbles: !1, cancelable: !1, detail: void 0};
4        var s = document.createEvent("CustomEvent");
5        return s.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), s
6    }
7
8    if (Array.prototype.indexOf || (Array.prototype.indexOf = function (e, t) {
9        var s, i, a = t ? t : 0;
10        if (!this) throw new TypeError;
11        if (i = this.length, 0 === i || a >= i) return -1;
12        for (0 > a && (a = i - Math.abs(a)), s = a; i > s; s++) if (this[s] === e) return s;
13        return -1
14    }), Array.prototype.forEach || (Array.prototype.forEach = function (e) {
15        if (void 0 === this || null === this) throw new TypeError;
16        var t = Object(this), s = t.length >>> 0;
17        if ("function" != typeof e) throw new TypeError;
18        for (var i = arguments.length >= 2 ? arguments[1] : void 0, a = 0; s > a; a++) a in t && e.call(i, t[a], a, t)
19    }), Event.prototype.preventDefault || (Event.prototype.preventDefault = function () {
20        this.returnValue = !1
21    }), Event.prototype.stopPropagation || (Event.prototype.stopPropagation = function () {
22        this.cancelBubble = !0
23    }), !Element.prototype.addEventListener) {
24        var t = [], s = function (e, s) {
25            var i = this, a = function (e) {
26                e.target = e.srcElement, e.currentTarget = i, s.handleEvent ? s.handleEvent(e) : s.call(i, e)
27            };
28            if ("DOMContentLoaded" == e) {
29                var n = function (e) {
30                    "complete" == document.readyState && a(e)
31                };
32                if (document.attachEvent("onreadystatechange", n), t.push({
33                    object: this,
34                    type: e,
35                    listener: s,
36                    wrapper: n
37                }), "complete" == document.readyState) {
38                    var o = new Event;
39                    o.srcElement = window, n(o)
40                }
41            } else this.attachEvent("on" + e, a), t.push({object: this, type: e, listener: s, wrapper: a})
42        }, i = function (e, s) {
43            for (var i = 0; i < t.length;) {
44                var a = t[i];
45                if (a.object == this && a.type == e && a.listener == s) {
46                    "DOMContentLoaded" == e ? this.detachEvent("onreadystatechange", a.wrapper) : this.detachEvent("on" + e, a.wrapper);
47                    break
48                }
49                ++i
50            }
51        };
52        Element.prototype.addEventListener = s, Element.prototype.removeEventListener = i, HTMLDocument && (HTMLDocument.prototype.addEventListener = s, HTMLDocument.prototype.removeEventListener = i), Window && (Window.prototype.addEventListener = s, Window.prototype.removeEventListener = i)
53    }
54    e.prototype = window.Event.prototype, window.CustomEvent = e
55}(), function (e, t, s) {
56    var i = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
57        a = e.parent != e.self && location.host === parent.location.host,
58        n = -1 != navigator.appVersion.indexOf("MSIE"), o = function (s, a) {
59            var n;
60            return i && a && !a.mobile ? !1 : this === e ? new o(s, a) : ("string" == typeof s && "#" === s[0] && (s = t.getElementById(s.substr(1))), (n = s.getAttribute("data-dkcacheid")) ? (d.extend(o.cache[n].data.settings, a), o.cache[n]) : "SELECT" === s.nodeName ? this.init(s, a) : void 0)
61        }, l = function () {
62        }, r = {initialize: l, change: l, open: l, close: l, search: "strict"}, d = {
63            hasClass: function (e, t) {
64                var s = new RegExp("(^|\\s+)" + t + "(\\s+|$)");
65                return e && s.test(e.className)
66            }, addClass: function (e, t) {
67                e && !d.hasClass(e, t) && (e.className += " " + t)
68            }, removeClass: function (e, t) {
69                var s = new RegExp("(^|\\s+)" + t + "(\\s+|$)");
70                e && (e.className = e.className.replace(s, " "))
71            }, toggleClass: function (e, t) {
72                var s = d.hasClass(e, t) ? "remove" : "add";
73                d[s + "Class"](e, t)
74            }, extend: function (e) {
75                return Array.prototype.slice.call(arguments, 1).forEac
75h(function (t) {
76                    if (t) for (var s in t) e[s] = t[s]
77                }), e
78            }, offset: function (s) {
79                var i = s.getBoundingClientRect() || {top: 0, left: 0}, a = t.documentElement,
80                    o = n ? a.scrollTop : e.pageYOffset, l = n ? a.scrollLeft : e.pageXOffset;
81                return {top: i.top + o - a.clientTop, left: i.left + l - a.clientLeft}
82            }, position: function (e, t) {
83                for (var s = {top: 0, left: 0}; e !== t;) s.top += e.offsetTop, s.left += e.offsetLeft, e = e.parentNode;
84                return s
85            }, closest: function (e, t) {
86                for (; e;) {
87                    if (e === t) return e;
88                    e = e.parentNode
89                }
90                return !1
91            }, create: function (e, s) {
92                var i, a = t.createElement(e);
93                s || (s = {});
94                for (i in s) s.hasOwnProperty(i) && ("innerHTML" == i ? a.innerHTML = s[i] : a.setAttribute(i, s[i]));
95                return a
96            }
97        };
98    o.cache = {}, o.uid = 0, o.prototype = {
99        add: function (e, s) {
100            var i, a, n;
101            "string" == typeof e && (i = e, e = t.createElement("option"), e.text = i), "OPTION" === e.nodeName && (a = d.create("li", {
102                "class": "dk-option",
103                "data-value": e.value,
104                innerHTML: e.text,
105                role: "option",
106                "aria-selected": "false",
107                id: "dk" + this.data.cacheID + "-" + (e.id || e.value.replace(" ", "-"))
108            }), d.addClass(a, e.className), this.length += 1, e.disabled && (d.addClass(a, "dk-option-disabled"), a.setAttribute("aria-disabled", "true")), this.data.select.add(e, s), "number" == typeof s && (s = this.item(s)), this.options.indexOf(s) > -1 ? s.parentNode.insertBefore(a, s) : this.data.elem.lastChild.appendChild(a), a.addEventListener("mouseover", this), n = this.options.indexOf(s), this.options.splice(n, 0, a), e.selected && this.select(n))
109        }, item: function (e) {
110            return e = 0 > e ? this.options.length + e : e, this.options[e] || null
111        }, remove: function (e) {
112            var t = this.item(e);
113            t.parentNode.removeChild(t), this.options.splice(e, 1), this.data.select.remove(e), this.select(this.data.select.selectedIndex), this.length -= 1
114        }, init: function (e, s) {
115            var i, n = o.build(e, "dk" + o.uid);
116            if (this.data = {}, this.data.select = e, this.data.elem = n.elem, this.data.settings = d.extend({}, r, s), this.disabled = e.disabled, this.form = e.form, this.length = e.length, this.multiple = e.multiple, this.options = n.options.slice(0), this.selectedIndex = e.selectedIndex, this.selectedOptions = n.selected.slice(0), this.value = e.value, e.parentNode.insertBefore(this.data.elem, e), this.data.elem.addEventListener("click", this), this.data.elem.addEventListener("keydown", this), this.data.elem.addEventListener("keypress", this), this.form && this.form.addEventListener("reset", this), !this.multiple) for (i = 0; i < this.options.length; i++) this.options[i].addEventListener("mouseover", this);
117            return 0 === o.uid && (t.addEventListener("click", o.onDocClick), a && parent.document.addEventListener("click", o.onDocClick)), this._changeListener || (e.addEventListener("change", this), this._changeListener = !0), this.data.cacheID = o.uid, e.setAttribute("data-dkCacheId", this.data.cacheID), o.cache[this.data.cacheID] = this, this.data.settings.initialize.call(this), o.uid += 1, this
118        }, close: function () {
119            var e, t = this.data.elem;
120            if (!this.isOpen || this.multiple) return !1;
121            for (e = 0; e < this.options.length; e++) d.removeClass(this.options[e], "dk-option-highlight");
122            t.lastChild.setAttribute("aria-expanded", "false"), d.removeClass(t.lastChild, "dk-select-options-highlight"), d.removeClass(t, "dk-select-open-(up|down)"), this.isOpen = !1, this.data.settings.close.call(this)
123        }, open: function () {
124            var s, i, a, o, l, r, h = this.data.elem, c = h.lastChild;
125            return l = n ? d.offset(h).top - t.documentElement.scrollTop : d.offset(h).top - e.scrollY, r = e.innerHe
125ight - (l + h.offsetHeight), this.isOpen || this.multiple ? !1 : (c.style.display = "block", s = c.offsetHeight, c.style.display = "", i = l > s, a = r > s, o = i && !a ? "-up" : "-down", this.isOpen = !0, d.addClass(h, "dk-select-open" + o), c.setAttribute("aria-expanded", "true"), this._scrollTo(this.options.length - 1), this._scrollTo(this.selectedIndex), this.data.settings.open.call(this), void 0)
126        }, disable: function (e, t) {
127            var i = "dk-option-disabled";
128            (0 === arguments.length || "boolean" == typeof e) && (t = e === s ? !0 : !1, e = this.data.elem, i = "dk-select-disabled", this.disabled = t), t === s && (t = !0), "number" == typeof e && (e = this.item(e)), d[t ? "addClass" : "removeClass"](e, i)
129        }, select: function (e, t) {
130            var s, i, a, n, o = this.data.select;
131            if ("number" == typeof e && (e = this.item(e)), "string" == typeof e) for (s = 0; s < this.length; s++) this.options[s].getAttribute("data-value") == e && (e = this.options[s]);
132            return !e || "string" == typeof e || !t && d.hasClass(e, "dk-option-disabled") ? !1 : d.hasClass(e, "dk-option") ? (i = this.options.indexOf(e), a = o.options[i], this.multiple ? (d.toggleClass(e, "dk-option-selected"), a.selected = !a.selected, d.hasClass(e, "dk-option-selected") ? (e.setAttribute("aria-selected", "true"), this.selectedOptions.push(e)) : (e.setAttribute("aria-selected", "false"), i = this.selectedOptions.indexOf(e), this.selectedOptions.splice(i, 1))) : (n = this.data.elem.firstChild, this.selectedOptions.length && (d.removeClass(this.selectedOptions[0], "dk-option-selected"), this.selectedOptions[0].setAttribute("aria-selected", "false")), d.addClass(e, "dk-option-selected"), e.setAttribute("aria-selected", "true"), n.setAttribute("aria-activedescendant", e.id), n.className = "dk-selected " + a.className, n.innerHTML = a.text, this.selectedOptions[0] = e, a.selected = !0), this.selectedIndex = o.selectedIndex, this.value = o.value, t || this.data.select.dispatchEvent(new CustomEvent("change")), e) : void 0
133        }, selectOne: function (e, t) {
134            return this.reset(!0), this._scrollTo(e), this.select(e, t)
135        }, search: function (e, t) {
136            var s, i, a, n, o, l, r, d, h = this.data.select.options, c = [];
137            if (!e) return this.options;
138            for (t = t ? t.toLowerCase() : "strict", t = "fuzzy" == t ? 2 : "partial" == t ? 1 : 0, d = new RegExp((t ? "" : "^") + e, "i"), s = 0; s < h.length; s++) if (a = h[s].text.toLowerCase(), 2 == t) {
139                for (i = e.toLowerCase().split(""), n = o = l = r = 0; o < a.length;) a[o] === i[n] ? (l += 1 + l, n++) : l = 0, r += l, o++;
140                n == i.length && c.push({e: this.options[s], s: r, i: s})
141            } else d.test(a) && c.push(this.options[s]);
142            return 2 == t && (c = c.sort(function (e, t) {
143                return t.s - e.s || e.i - t.i
144            }).reduce(function (e, t) {
145                return e[e.length] = t.e, e
146            }, [])), c
147        }, focus: function () {
148            this.disabled || (this.multiple ? this.data.elem : this.data.elem.children[0]).focus()
149        }, reset: function (e) {
150            var t, s = this.data.select;
151            for (this.selectedOptions.length = 0, t = 0; t < s.options.length; t++) s.options[t].selected = !1, d.removeClass(this.options[t], "dk-option-selected"), this.options[t].setAttribute("aria-selected", "false"), !e && s.options[t].defaultSelected && this.select(t, !0);
152            this.selectedOptions.length || this.multiple || this.select(0, !0)
153        }, refresh: function () {
154            this.dispose().init(this.data.select, this.data.settings)
155        }, dispose: function () {
156            return delete o.cache[this.data.cacheID], this.data.elem.parentNode.removeChild(this.data.elem), this.data.select.removeAttribute("data-dkCacheId"), this
157        }, handleEvent: function (e) {
158            if (!this.disabled) switch (e.type) {
159                case"click":
160                    this._delegate(e);
161                    break;
162                case"keydown":
163                    this._keyHandler(e);
164                    break;
165                case"keypress":
166                    this._searchOptions(e);
167                    break;
168                case"mouseover":
169                    this._highlight(e);
170                    break;
171                case"reset":
172                    this.reset();
173                    break;
174                case"change":
175                    this.data.settings.change.call(this)
176            }
177        }, _delegate: function (t) {
178            var s, i, a, n, o = t.target;
179            if (d.hasClass(o, "dk-option-disabled")) return !1;
180            if (this.multiple) {
181                if (d.hasClass(o, "dk-option")) if (s = e.getSelection(), "Range" == s.type && s.collapseToStart(), t.shiftKey) if (a = this.options.indexOf(this.selectedOptions[0]), n = this.options.indexOf(this.selectedOptions[this.selectedOptions.length - 1]), i = this.options.indexOf(o), i > a && n > i && (i = a), i > n && n > a && (n = a), this.reset(!0), n > i) for (; n + 1 > i;) this.select(i++); else for (; i > n - 1;) this.select(i--); else t.ctrlKey || t.metaKey ? this.select(o) : (this.reset(!0), this.select(o))
182            } else this[this.isOpen ? "close" : "open"](), d.hasClass(o, "dk-option") && this.select(o)
183        }, _highlight: function (e) {
184            var t, s = e.target;
185            if (!this.multiple) {
186                for (t = 0; t < this.options.length; t++) d.removeClass(this.options[t], "dk-option-highlight");
187                d.addClass(this.data.elem.lastChild, "dk-select-options-highlight"), d.addClass(s, "dk-option-highlight")
188            }
189        }, _keyHandler: function (e) {
190            var t, s, i = this.selectedOptions, a = this.options, n = 1,
191                o = {tab: 9, enter: 13, esc: 27, space: 32, up: 38, down: 40};
192            switch (e.keyCode) {
193                case o.up:
194                    n = -1;
195                case o.down:
196                    if (e.preventDefault(), t = i[i.length - 1], d.hasClass(this.data.elem.lastChild, "dk-select-options-highlight")) for (d.removeClass(this.data.elem.lastChild, "dk-select-options-highlight"), s = 0; s < a.length; s++) d.hasClass(a[s], "dk-option-highlight") && (d.removeClass(a[s], "dk-option-highlight"), t = a[s]);
197                    n = a.indexOf(t) + n, n > a.length - 1 ? n = a.length - 1 : 0 > n && (n = 0), this.data.select.options[n].disabled || (this.reset(!0), this.select(n), this._scrollTo(n));
198                    break;
199                case o.space:
200                    if (!this.isOpen) {
201                        e.preventDefault(), this.open();
202                        break
203                    }
204                case o.tab:
205                case o.enter:
206                    for (n = 0; n < a.length; n++) d.hasClass(a[n], "dk-option-highlight") && this.select(n);
207                case o.esc:
208                    this.isOpen && (e.preventDefault(), this.close())
209            }
210        }, _searchOptions: function (e) {
211            var t, i = this, a = String.fromCharCode(e.keyCode || e.which), n = function () {
212                i.data.searchTimeout && clearTimeout(i.data.searchTimeout), i.data.searchTimeout = setTimeout(function () {
213                    i.data.searchString = ""
214                }, 1e3)
215            };
216            this.data.searchString === s && (this.data.searchString = ""), n(), this.data.searchString += a, t = this.search(this.data.searchString, this.data.settings.search), t.length && (d.hasClass(t[0], "dk-option-disabled") || this.selectOne(t[0]))
217        }, _scrollTo: function (e) {
218            var t, s, i, a = this.data.elem.lastChild;
219            return -1 === e || "number" != typeof e && !e || !this.isOpen && !this.multiple ? !1 : ("number" == typeof e && (e = this.item(e)), t = d.position(e, a).top, s = t - a.scrollTop, i = s + e.offsetHeight, i > a.offsetHeight ? (t += e.offsetHeight, a.scrollTop = t - a.offsetHeight) : 0 > s && (a.scrollTop = t), void 0)
220        }
221    }, o.build = function (e, t) {
222        var s, i, a, n = [], o = {elem: null, options: [], selected: []}, l = function (e) {
223            var s, i, a, n, r = [];
224            switch (e.nodeName) {
225                case"OPTION":
226                    s = d.create("li", {
227                        "class": "dk-option ",
228                        "data-value": e.value,
229                        innerHTML: e.text,
230                        role: "option",
231                        "aria-selected": "false",
232                        id: t + "-" + (e.id || e.value.replace(" ", "-"))
233                    }), d.addClass(s, e.className), e.disabled && (d.addClass(s, "dk-option-disabled"), s.setAttribute("aria-disabled", "true")), e.selected && (d.addClass(s, "dk-option-selected"), s.setAttribute("aria-selected", "true"), o.selected.push(s)), o.options.push(this.appendChild(s));
234                    break;
235                case"OPTGROUP":
236                    for (i = d.create("li", {"class": "dk-optgroup"}), e.label && i.appendChild(d.create("div", {
237                        "class": "dk-optgroup-label",
238                        innerHTML: e.label
239                    })), a = d.create("ul", {"class": "dk-optgroup-options"}), n = e.children.length; n--; r.unshift(e.children[n])) ;
240                    r.forEach(l, a), this.appendChild(i).appendChild(a)
241            }
242        };
243        for (o.elem = d.create("div", {"class": "dk-select" + (e.multiple ? "-multi" : "")}), i = d.create("ul", {
244            "class": "dk-select-options",
245            id: t + "-listbox",
246            role: "listbox"
247        }), e.disabled && d.addClass(o.elem, "dk-select-disabled"), o.elem.id = t + (e.id ? "-" + e.id : ""), d.addClass(o.elem, e.className), e.multiple ? (o.elem.setAttribute("tabindex", e.getAttribute("tabindex") || "0"), i.setAttribute("aria-multiselectable", "true")) : (s = e.options[e.selectedIndex], o.elem.appendChild(d.create("div", {
248            "class": "dk-selected " + s.className,
249            tabindex: e.tabindex || 0,
250            innerHTML: s ? s.text : "&nbsp;",
251            id: t + "-combobox",
252            "aria-live": "assertive",
253            "aria-owns": i.id,
254            role: "combobox"
255        })), i.setAttribute("aria-expanded", "false")), a = e.children.length; a--; n.unshift(e.children[a])) ;
256        return n.forEach(l, o.elem.appendChild(i)), o
257    }, o.onDocClick = function (e) {
258        var t, s;
259        if (1 !== e.target.nodeType) return !1;
260        null !== (t = e.target.getAttribute("data-dkcacheid")) && o.cache[t].focus();
261        for (s in o.cache) d.closest(e.target, o.cache[s].data.elem) || s === t || o.cache[s].disabled || o.cache[s].close()
262    }, e.Dropkick = o, e.jQuery !== s && (e.jQuery.fn.dropkick = function () {
263        var t = Array.prototype.slice.call(arguments);
264        return e.jQuery(this).each(function () {
265            t[0] && "object" != typeof t[0] ? "string" == typeof t[0] && o.prototype[t[0]].apply(new o(this), t.slice(1)) : new o(this, t[0] || {})
266        })
267    })
268}(window, document);

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.