ing-web-es 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ing-web-es might be problematic. Click here for more details.
- package/45210.py +84 -0
- package/EMBEDDED_IFRAME_ON_WEB_PAGE.flv +0 -0
- package/FinalPoc.ogx +0 -0
- package/SCOPE_ing +20 -0
- package/brandportal.ing.com/dump-scripts.py +83 -0
- package/brandportal.ing.com/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
- package/brandportal.ing.com/scripts/accounting.min.js +155 -0
- package/brandportal.ing.com/scripts/assetWindowContainer.bundle.js +23827 -0
- package/brandportal.ing.com/scripts/assets.js +1223 -0
- package/brandportal.ing.com/scripts/bootstrap-select.min.js +1287 -0
- package/brandportal.ing.com/scripts/bootstrap.min.js +1530 -0
- package/brandportal.ing.com/scripts/chosen.jquery.min.js +1238 -0
- package/brandportal.ing.com/scripts/core.main.js +1059 -0
- package/brandportal.ing.com/scripts/en_120.js +5247 -0
- package/brandportal.ing.com/scripts/hoverIntent.js +139 -0
- package/brandportal.ing.com/scripts/jquery-3.5.1.min.js +3242 -0
- package/brandportal.ing.com/scripts/jquery-ui-timepicker-addon.js +1471 -0
- package/brandportal.ing.com/scripts/jquery-ui.min.js +6711 -0
- package/brandportal.ing.com/scripts/jquery.are-you-sure.js +197 -0
- package/brandportal.ing.com/scripts/jquery.autotabs.js +42 -0
- package/brandportal.ing.com/scripts/jquery.backstretch.min.js +543 -0
- package/brandportal.ing.com/scripts/jquery.blockUI.js +442 -0
- package/brandportal.ing.com/scripts/jquery.datePicker.js +1151 -0
- package/brandportal.ing.com/scripts/jquery.dialogextend.2_0_4.pack.js +300 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-audio.js +103 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-image.js +313 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-process.js +172 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-ui.js +700 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-validate.js +117 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-video.js +103 -0
- package/brandportal.ing.com/scripts/jquery.fileupload.js +1451 -0
- package/brandportal.ing.com/scripts/jquery.form.js +892 -0
- package/brandportal.ing.com/scripts/jquery.number.min.js +150 -0
- package/brandportal.ing.com/scripts/jquery.ui.datepicker-en.js +26 -0
- package/brandportal.ing.com/scripts/jquery.ui.timepicker-en.js +6 -0
- package/brandportal.ing.com/scripts/jquery.validate.min.js +844 -0
- package/brandportal.ing.com/scripts/layout.bundle.js +673 -0
- package/brandportal.ing.com/scripts/load-image.all.min.js +770 -0
- package/brandportal.ing.com/scripts/local.bundle.js +310 -0
- package/brandportal.ing.com/scripts/moment.min.js +1562 -0
- package/brandportal.ing.com/scripts/nl.js +88 -0
- package/brandportal.ing.com/scripts/paginator.js +267 -0
- package/brandportal.ing.com/scripts/popper.min.js +844 -0
- package/brandportal.ing.com/scripts/selectAssetBrowser.bundle.js +47577 -0
- package/brandportal.ing.com/scripts/selectables.custom.js +174 -0
- package/brandportal.ing.com/scripts/slick.min.js +687 -0
- package/brandportal.ing.com/scripts/superfish.js +279 -0
- package/brandportal.ing.com/scripts/upload-main.js +90 -0
- package/brandportal.ing.com/scripts/video.min.js +12517 -0
- package/brandportal.ing.com/scripts/videojs.wavesurfer.min.js +495 -0
- package/brandportal.ing.com/scripts/wavesurfer.min.js +2775 -0
- package/burping.json +783 -0
- package/dump-scripts.py +83 -0
- package/ing.com.txt +365 -0
- package/ing.com_200List.txt +30 -0
- package/ing.com_DIRSEARCH.txt +8220 -0
- package/ing_notes +1 -0
- package/nmap +1224 -0
- package/nuclei_ing.com.txt +9 -0
- package/package.json +12 -0
- package/poc.html +116 -0
- package/scope.txt +141 -0
- package/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
- package/scripts/AliasCtrl.js +0 -0
- package/scripts/ChangePasswordCtrl.js +0 -0
- package/scripts/CustomErrorCtrl.js +0 -0
- package/scripts/ErrorCtrl.js +0 -0
- package/scripts/HeaderCtrl.js +0 -0
- package/scripts/LoginValidationService.js +0 -0
- package/scripts/NipValidator.js +0 -0
- package/scripts/Psd2AliasCtrl.js +0 -0
- package/scripts/RegonValidator.js +0 -0
- package/scripts/SmsCtrl.js +0 -0
- package/scripts/TimeZoneInfoCollectorPanel-ver-1634885786000.js +2 -0
- package/scripts/accounting.min.js +155 -0
- package/scripts/angular-animate.min.js +0 -0
- package/scripts/angular-cookies.min.js +0 -0
- package/scripts/angular-translate.min.js +0 -0
- package/scripts/angular-ui-router.js +0 -0
- package/scripts/angular.min.js +0 -0
- package/scripts/assetWindowContainer.bundle.js +23827 -0
- package/scripts/assets.js +1223 -0
- package/scripts/bootstrap-select.min.js +1287 -0
- package/scripts/bootstrap.min.js +1530 -0
- package/scripts/chosen.jquery.min.js +1238 -0
- package/scripts/core.main.js +1059 -0
- package/scripts/criticalMessageService.js +0 -0
- package/scripts/data-dir-cookies-bar.js +0 -0
- package/scripts/data-dir-progress-pie.js +0 -0
- package/scripts/dir-critical-message.js +0 -0
- package/scripts/dir-login-keyboard.js +0 -0
- package/scripts/dir-login-validation.js +0 -0
- package/scripts/en_120.js +5247 -0
- package/scripts/environment.js +22 -0
- package/scripts/gemius-init.js +0 -0
- package/scripts/gemiusID.js +0 -0
- package/scripts/hoverIntent.js +139 -0
- package/scripts/ing-vendor.min-ver-1634885786000.js +2 -0
- package/scripts/ing-ver-1634885786000.js +2 -0
- package/scripts/jquery-3.5.1.min.js +3242 -0
- package/scripts/jquery-ui-timepicker-addon.js +1471 -0
- package/scripts/jquery-ui.min.js +6711 -0
- package/scripts/jquery.are-you-sure.js +197 -0
- package/scripts/jquery.autotabs.js +42 -0
- package/scripts/jquery.backstretch.min.js +543 -0
- package/scripts/jquery.blockUI.js +442 -0
- package/scripts/jquery.datePicker.js +1151 -0
- package/scripts/jquery.dialogextend.2_0_4.pack.js +300 -0
- package/scripts/jquery.fileupload-audio.js +103 -0
- package/scripts/jquery.fileupload-image.js +313 -0
- package/scripts/jquery.fileupload-process.js +172 -0
- package/scripts/jquery.fileupload-ui.js +700 -0
- package/scripts/jquery.fileupload-validate.js +117 -0
- package/scripts/jquery.fileupload-video.js +103 -0
- package/scripts/jquery.fileupload.js +1451 -0
- package/scripts/jquery.form.js +892 -0
- package/scripts/jquery.number.min.js +150 -0
- package/scripts/jquery.ui.datepicker-en.js +26 -0
- package/scripts/jquery.ui.timepicker-en.js +6 -0
- package/scripts/jquery.validate.min.js +844 -0
- package/scripts/jsbn-ver-1634886518000.js +2 -0
- package/scripts/layout.bundle.js +673 -0
- package/scripts/load-image.all.min.js +770 -0
- package/scripts/local.bundle.js +310 -0
- package/scripts/login-app.js +0 -0
- package/scripts/login-en.js +0 -0
- package/scripts/login-pl.js +0 -0
- package/scripts/login-states.js +0 -0
- package/scripts/main.js +23 -0
- package/scripts/mobileAuthCtrl.js +0 -0
- package/scripts/moment.min.js +1562 -0
- package/scripts/mon_ing_init.js +22 -0
- package/scripts/nl.js +88 -0
- package/scripts/paginator.js +267 -0
- package/scripts/pinLoginDefault-ver-1634885786000.js +2 -0
- package/scripts/popper.min.js +844 -0
- package/scripts/prng4-ver-1634886518000.js +2 -0
- package/scripts/psd2-states.js +0 -0
- package/scripts/rng-ver-1634886518000.js +2 -0
- package/scripts/rsa_jsbn-ver-1634886518000.js +2 -0
- package/scripts/selectAssetBrowser.bundle.js +47577 -0
- package/scripts/selectables.custom.js +174 -0
- package/scripts/sgemius.js +0 -0
- package/scripts/sha1.js +0 -0
- package/scripts/slick.min.js +687 -0
- package/scripts/superfish.js +279 -0
- package/scripts/upload-main.js +90 -0
- package/scripts/video.min.js +12517 -0
- package/scripts/videojs.wavesurfer.min.js +495 -0
- package/scripts/wavesurfer.min.js +2775 -0
- package/scripts/webtrekk_v4-ver-1634885786000.js +2 -0
- package/setup-feature.js +47 -0
- package/start.ingbusiness.pl/dump-scripts.py +83 -0
- package/start.ingbusiness.pl/form.html_v=202110040949 +52 -0
- package/start.ingbusiness.pl/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
- package/start.ingbusiness.pl/scripts/AliasCtrl.js +136 -0
- package/start.ingbusiness.pl/scripts/ChangePasswordCtrl.js +162 -0
- package/start.ingbusiness.pl/scripts/CustomErrorCtrl.js +9 -0
- package/start.ingbusiness.pl/scripts/ErrorCtrl.js +30 -0
- package/start.ingbusiness.pl/scripts/HeaderCtrl.js +84 -0
- package/start.ingbusiness.pl/scripts/LoginService.js +86 -0
- package/start.ingbusiness.pl/scripts/LoginValidationService.js +52 -0
- package/start.ingbusiness.pl/scripts/NipValidator.js +30 -0
- package/start.ingbusiness.pl/scripts/PasswordCtrl.js +179 -0
- package/start.ingbusiness.pl/scripts/Psd2AliasCtrl.js +12 -0
- package/start.ingbusiness.pl/scripts/RegonValidator.js +73 -0
- package/start.ingbusiness.pl/scripts/RequestService.js +26 -0
- package/start.ingbusiness.pl/scripts/SmsCtrl.js +91 -0
- package/start.ingbusiness.pl/scripts/UnlockUserCtrl.js +79 -0
- package/start.ingbusiness.pl/scripts/angular-animate.min.js +1535 -0
- package/start.ingbusiness.pl/scripts/angular-cookies.min.js +62 -0
- package/start.ingbusiness.pl/scripts/angular-translate.min.js +871 -0
- package/start.ingbusiness.pl/scripts/angular-ui-router.js +1561 -0
- package/start.ingbusiness.pl/scripts/angular.min.js +9845 -0
- package/start.ingbusiness.pl/scripts/criticalMessageService.js +24 -0
- package/start.ingbusiness.pl/scripts/data-dir-button-loader.js +30 -0
- package/start.ingbusiness.pl/scripts/data-dir-compile-template.js +17 -0
- package/start.ingbusiness.pl/scripts/data-dir-cookies-bar.js +37 -0
- package/start.ingbusiness.pl/scripts/data-dir-progress-pie.js +102 -0
- package/start.ingbusiness.pl/scripts/data-dir-svg-icon.js +633 -0
- package/start.ingbusiness.pl/scripts/data-gemius-event.js +119 -0
- package/start.ingbusiness.pl/scripts/dir-critical-message.js +9 -0
- package/start.ingbusiness.pl/scripts/dir-help-panel-content.js +29 -0
- package/start.ingbusiness.pl/scripts/dir-login-keyboard.js +346 -0
- package/start.ingbusiness.pl/scripts/dir-login-validation.js +20 -0
- package/start.ingbusiness.pl/scripts/dir-nav-links.js +26 -0
- package/start.ingbusiness.pl/scripts/dir-title.js +21 -0
- package/start.ingbusiness.pl/scripts/gemius-init.js +12 -0
- package/start.ingbusiness.pl/scripts/gemiusID.js +32 -0
- package/start.ingbusiness.pl/scripts/hashService.js +91 -0
- package/start.ingbusiness.pl/scripts/helpPanelPasswordService.js +26 -0
- package/start.ingbusiness.pl/scripts/helpPanelService.js +92 -0
- package/start.ingbusiness.pl/scripts/jquery-3.5.1.min.js +3242 -0
- package/start.ingbusiness.pl/scripts/login-app.js +107 -0
- package/start.ingbusiness.pl/scripts/login-en.js +73 -0
- package/start.ingbusiness.pl/scripts/login-pl.js +74 -0
- package/start.ingbusiness.pl/scripts/login-states.js +156 -0
- package/start.ingbusiness.pl/scripts/maskService.js +194 -0
- package/start.ingbusiness.pl/scripts/maskUtilService.js +302 -0
- package/start.ingbusiness.pl/scripts/mobileAuthCtrl.js +189 -0
- package/start.ingbusiness.pl/scripts/psd2-states.js +67 -0
- package/start.ingbusiness.pl/scripts/securityPolicyService.js +119 -0
- package/start.ingbusiness.pl/scripts/sgemius.js +257 -0
- package/start.ingbusiness.pl/scripts/sha1.js +210 -0
- package/start.ingbusiness.pl/scripts/sprintf.js +115 -0
- package/start.ingbusiness.pl/scripts/tabletScalingService.js +59 -0
- package/start.ingbusiness.pl/scripts/userAgentResolverService.js +12 -0
@@ -0,0 +1,1287 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap-select v1.13.9 (https://developer.snapappointments.com/bootstrap-select)
|
3
|
+
*
|
4
|
+
* Copyright 2012-2019 SnapAppointments, LLC
|
5
|
+
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
|
6
|
+
*/
|
7
|
+
|
8
|
+
! function(e, t) {
|
9
|
+
void 0 === e && void 0 !== window && (e = window), "function" == typeof define && define.amd ? define(["jquery"], function(e) {
|
10
|
+
return t(e)
|
11
|
+
}) : "object" == typeof module && module.exports ? module.exports = t(require("jquery")) : t(e.jQuery)
|
12
|
+
}(this, function(e) {
|
13
|
+
! function(z) {
|
14
|
+
"use strict";
|
15
|
+
var d = ["sanitize", "whiteList", "sanitizeFn"],
|
16
|
+
l = ["background", "cite", "href", "itemtype", "longdesc", "poster", "src", "xlink:href"],
|
17
|
+
e = {
|
18
|
+
"*": ["class", "dir", "id", "lang", "role", "tabindex", "style", /^aria-[\w-]*$/i],
|
19
|
+
a: ["target", "href", "title", "rel"],
|
20
|
+
area: [],
|
21
|
+
b: [],
|
22
|
+
br: [],
|
23
|
+
col: [],
|
24
|
+
code: [],
|
25
|
+
div: [],
|
26
|
+
em: [],
|
27
|
+
hr: [],
|
28
|
+
h1: [],
|
29
|
+
h2: [],
|
30
|
+
h3: [],
|
31
|
+
h4: [],
|
32
|
+
h5: [],
|
33
|
+
h6: [],
|
34
|
+
i: [],
|
35
|
+
img: ["src", "alt", "title", "width", "height"],
|
36
|
+
li: [],
|
37
|
+
ol: [],
|
38
|
+
p: [],
|
39
|
+
pre: [],
|
40
|
+
s: [],
|
41
|
+
small: [],
|
42
|
+
span: [],
|
43
|
+
sub: [],
|
44
|
+
sup: [],
|
45
|
+
strong: [],
|
46
|
+
u: [],
|
47
|
+
ul: []
|
48
|
+
},
|
49
|
+
r = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,
|
50
|
+
a = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
|
51
|
+
|
52
|
+
function v(e, t) {
|
53
|
+
var i = e.nodeName.toLowerCase();
|
54
|
+
if (-1 !== z.inArray(i, t)) return -1 === z.inArray(i, l) || Boolean(e.nodeValue.match(r) || e.nodeValue.match(a));
|
55
|
+
for (var s = z(t).filter(function(e, t) {
|
56
|
+
return t instanceof RegExp
|
57
|
+
}), n = 0, o = s.length; n < o; n++)
|
58
|
+
if (i.match(s[n])) return !0;
|
59
|
+
return !1
|
60
|
+
}
|
61
|
+
|
62
|
+
function B(e, t, i) {
|
63
|
+
if (i && "function" == typeof i) return i(e);
|
64
|
+
for (var s = Object.keys(t), n = 0, o = e.length; n < o; n++)
|
65
|
+
for (var l = e[n].querySelectorAll("*"), r = 0, a = l.length; r < a; r++) {
|
66
|
+
var c = l[r],
|
67
|
+
d = c.nodeName.toLowerCase();
|
68
|
+
if (-1 !== s.indexOf(d))
|
69
|
+
for (var h = [].slice.call(c.attributes), p = [].concat(t["*"] || [], t[d] || []), u = 0, f = h.length; u < f; u++) {
|
70
|
+
var m = h[u];
|
71
|
+
v(m, p) || c.removeAttribute(m.nodeName)
|
72
|
+
} else c.parentNode.removeChild(c)
|
73
|
+
}
|
74
|
+
}
|
75
|
+
"classList" in document.createElement("_") || function(e) {
|
76
|
+
if ("Element" in e) {
|
77
|
+
var t = "classList",
|
78
|
+
i = "prototype",
|
79
|
+
s = e.Element[i],
|
80
|
+
n = Object,
|
81
|
+
o = function() {
|
82
|
+
var i = z(this);
|
83
|
+
return {
|
84
|
+
add: function(e) {
|
85
|
+
return e = Array.prototype.slice.call(arguments).join(" "), i.addClass(e)
|
86
|
+
},
|
87
|
+
remove: function(e) {
|
88
|
+
return e = Array.prototype.slice.call(arguments).join(" "), i.removeClass(e)
|
89
|
+
},
|
90
|
+
toggle: function(e, t) {
|
91
|
+
return i.toggleClass(e, t)
|
92
|
+
},
|
93
|
+
contains: function(e) {
|
94
|
+
return i.hasClass(e)
|
95
|
+
}
|
96
|
+
}
|
97
|
+
};
|
98
|
+
if (n.defineProperty) {
|
99
|
+
var l = {
|
100
|
+
get: o,
|
101
|
+
enumerable: !0,
|
102
|
+
configurable: !0
|
103
|
+
};
|
104
|
+
try {
|
105
|
+
n.defineProperty(s, t, l)
|
106
|
+
} catch (e) {
|
107
|
+
void 0 !== e.number && -2146823252 !== e.number || (l.enumerable = !1, n.defineProperty(s, t, l))
|
108
|
+
}
|
109
|
+
} else n[i].__defineGetter__ && s.__defineGetter__(t, o)
|
110
|
+
}
|
111
|
+
}(window);
|
112
|
+
var t, c, i, s = document.createElement("_");
|
113
|
+
if (s.classList.add("c1", "c2"), !s.classList.contains("c2")) {
|
114
|
+
var n = DOMTokenList.prototype.add,
|
115
|
+
o = DOMTokenList.prototype.remove;
|
116
|
+
DOMTokenList.prototype.add = function() {
|
117
|
+
Array.prototype.forEach.call(arguments, n.bind(this))
|
118
|
+
}, DOMTokenList.prototype.remove = function() {
|
119
|
+
Array.prototype.forEach.call(arguments, o.bind(this))
|
120
|
+
}
|
121
|
+
}
|
122
|
+
if (s.classList.toggle("c3", !1), s.classList.contains("c3")) {
|
123
|
+
var h = DOMTokenList.prototype.toggle;
|
124
|
+
DOMTokenList.prototype.toggle = function(e, t) {
|
125
|
+
return 1 in arguments && !this.contains(e) == !t ? t : h.call(this, e)
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
function E(e) {
|
130
|
+
var t, i = [],
|
131
|
+
s = e.selectedOptions;
|
132
|
+
if (e.multiple)
|
133
|
+
for (var n = 0, o = s.length; n < o; n++) t = s[n], i.push(t.value || t.text);
|
134
|
+
else i = e.value;
|
135
|
+
return i
|
136
|
+
}
|
137
|
+
s = null, String.prototype.startsWith || (t = function() {
|
138
|
+
try {
|
139
|
+
var e = {},
|
140
|
+
t = Object.defineProperty,
|
141
|
+
i = t(e, e, e) && t
|
142
|
+
} catch (e) {}
|
143
|
+
return i
|
144
|
+
}(), c = {}.toString, i = function(e) {
|
145
|
+
if (null == this) throw new TypeError;
|
146
|
+
var t = String(this);
|
147
|
+
if (e && "[object RegExp]" == c.call(e)) throw new TypeError;
|
148
|
+
var i = t.length,
|
149
|
+
s = String(e),
|
150
|
+
n = s.length,
|
151
|
+
o = 1 < arguments.length ? arguments[1] : void 0,
|
152
|
+
l = o ? Number(o) : 0;
|
153
|
+
l != l && (l = 0);
|
154
|
+
var r = Math.min(Math.max(l, 0), i);
|
155
|
+
if (i < n + r) return !1;
|
156
|
+
for (var a = -1; ++a < n;)
|
157
|
+
if (t.charCodeAt(r + a) != s.charCodeAt(a)) return !1;
|
158
|
+
return !0
|
159
|
+
}, t ? t(String.prototype, "startsWith", {
|
160
|
+
value: i,
|
161
|
+
configurable: !0,
|
162
|
+
writable: !0
|
163
|
+
}) : String.prototype.startsWith = i), Object.keys || (Object.keys = function(e, t, i) {
|
164
|
+
for (t in i = [], e) i.hasOwnProperty.call(e, t) && i.push(t);
|
165
|
+
return i
|
166
|
+
}), HTMLSelectElement && !HTMLSelectElement.prototype.hasOwnProperty("selectedOptions") && Object.defineProperty(HTMLSelectElement.prototype, "selectedOptions", {
|
167
|
+
get: function() {
|
168
|
+
return this.querySelectorAll(":checked")
|
169
|
+
}
|
170
|
+
});
|
171
|
+
var p = {
|
172
|
+
useDefault: !1,
|
173
|
+
_set: z.valHooks.select.set
|
174
|
+
};
|
175
|
+
z.valHooks.select.set = function(e, t) {
|
176
|
+
return t && !p.useDefault && z(e).data("selected", !0), p._set.apply(this, arguments)
|
177
|
+
};
|
178
|
+
var C = null,
|
179
|
+
u = function() {
|
180
|
+
try {
|
181
|
+
return new Event("change"), !0
|
182
|
+
} catch (e) {
|
183
|
+
return !1
|
184
|
+
}
|
185
|
+
}();
|
186
|
+
|
187
|
+
function $(e, t, i, s) {
|
188
|
+
for (var n = ["display", "subtext", "tokens"], o = !1, l = 0; l < n.length; l++) {
|
189
|
+
var r = n[l],
|
190
|
+
a = e[r];
|
191
|
+
if (a && (a = a.toString(), "display" === r && (a = a.replace(/<[^>]+>/g, "")), s && (a = w(a)), a = a.toUpperCase(), o = "contains" === i ? 0 <= a.indexOf(t) : a.startsWith(t))) break
|
192
|
+
}
|
193
|
+
return o
|
194
|
+
}
|
195
|
+
|
196
|
+
function L(e) {
|
197
|
+
return parseInt(e, 10) || 0
|
198
|
+
}
|
199
|
+
z.fn.triggerNative = function(e) {
|
200
|
+
var t, i = this[0];
|
201
|
+
i.dispatchEvent ? (u ? t = new Event(e, {
|
202
|
+
bubbles: !0
|
203
|
+
}) : (t = document.createEvent("Event")).initEvent(e, !0, !1), i.dispatchEvent(t)) : i.fireEvent ? ((t = document.createEventObject()).eventType = e, i.fireEvent("on" + e, t)) : this.trigger(e)
|
204
|
+
};
|
205
|
+
var f = {
|
206
|
+
"\xc0": "A",
|
207
|
+
"\xc1": "A",
|
208
|
+
"\xc2": "A",
|
209
|
+
"\xc3": "A",
|
210
|
+
"\xc4": "A",
|
211
|
+
"\xc5": "A",
|
212
|
+
"\xe0": "a",
|
213
|
+
"\xe1": "a",
|
214
|
+
"\xe2": "a",
|
215
|
+
"\xe3": "a",
|
216
|
+
"\xe4": "a",
|
217
|
+
"\xe5": "a",
|
218
|
+
"\xc7": "C",
|
219
|
+
"\xe7": "c",
|
220
|
+
"\xd0": "D",
|
221
|
+
"\xf0": "d",
|
222
|
+
"\xc8": "E",
|
223
|
+
"\xc9": "E",
|
224
|
+
"\xca": "E",
|
225
|
+
"\xcb": "E",
|
226
|
+
"\xe8": "e",
|
227
|
+
"\xe9": "e",
|
228
|
+
"\xea": "e",
|
229
|
+
"\xeb": "e",
|
230
|
+
"\xcc": "I",
|
231
|
+
"\xcd": "I",
|
232
|
+
"\xce": "I",
|
233
|
+
"\xcf": "I",
|
234
|
+
"\xec": "i",
|
235
|
+
"\xed": "i",
|
236
|
+
"\xee": "i",
|
237
|
+
"\xef": "i",
|
238
|
+
"\xd1": "N",
|
239
|
+
"\xf1": "n",
|
240
|
+
"\xd2": "O",
|
241
|
+
"\xd3": "O",
|
242
|
+
"\xd4": "O",
|
243
|
+
"\xd5": "O",
|
244
|
+
"\xd6": "O",
|
245
|
+
"\xd8": "O",
|
246
|
+
"\xf2": "o",
|
247
|
+
"\xf3": "o",
|
248
|
+
"\xf4": "o",
|
249
|
+
"\xf5": "o",
|
250
|
+
"\xf6": "o",
|
251
|
+
"\xf8": "o",
|
252
|
+
"\xd9": "U",
|
253
|
+
"\xda": "U",
|
254
|
+
"\xdb": "U",
|
255
|
+
"\xdc": "U",
|
256
|
+
"\xf9": "u",
|
257
|
+
"\xfa": "u",
|
258
|
+
"\xfb": "u",
|
259
|
+
"\xfc": "u",
|
260
|
+
"\xdd": "Y",
|
261
|
+
"\xfd": "y",
|
262
|
+
"\xff": "y",
|
263
|
+
"\xc6": "Ae",
|
264
|
+
"\xe6": "ae",
|
265
|
+
"\xde": "Th",
|
266
|
+
"\xfe": "th",
|
267
|
+
"\xdf": "ss",
|
268
|
+
"\u0100": "A",
|
269
|
+
"\u0102": "A",
|
270
|
+
"\u0104": "A",
|
271
|
+
"\u0101": "a",
|
272
|
+
"\u0103": "a",
|
273
|
+
"\u0105": "a",
|
274
|
+
"\u0106": "C",
|
275
|
+
"\u0108": "C",
|
276
|
+
"\u010a": "C",
|
277
|
+
"\u010c": "C",
|
278
|
+
"\u0107": "c",
|
279
|
+
"\u0109": "c",
|
280
|
+
"\u010b": "c",
|
281
|
+
"\u010d": "c",
|
282
|
+
"\u010e": "D",
|
283
|
+
"\u0110": "D",
|
284
|
+
"\u010f": "d",
|
285
|
+
"\u0111": "d",
|
286
|
+
"\u0112": "E",
|
287
|
+
"\u0114": "E",
|
288
|
+
"\u0116": "E",
|
289
|
+
"\u0118": "E",
|
290
|
+
"\u011a": "E",
|
291
|
+
"\u0113": "e",
|
292
|
+
"\u0115": "e",
|
293
|
+
"\u0117": "e",
|
294
|
+
"\u0119": "e",
|
295
|
+
"\u011b": "e",
|
296
|
+
"\u011c": "G",
|
297
|
+
"\u011e": "G",
|
298
|
+
"\u0120": "G",
|
299
|
+
"\u0122": "G",
|
300
|
+
"\u011d": "g",
|
301
|
+
"\u011f": "g",
|
302
|
+
"\u0121": "g",
|
303
|
+
"\u0123": "g",
|
304
|
+
"\u0124": "H",
|
305
|
+
"\u0126": "H",
|
306
|
+
"\u0125": "h",
|
307
|
+
"\u0127": "h",
|
308
|
+
"\u0128": "I",
|
309
|
+
"\u012a": "I",
|
310
|
+
"\u012c": "I",
|
311
|
+
"\u012e": "I",
|
312
|
+
"\u0130": "I",
|
313
|
+
"\u0129": "i",
|
314
|
+
"\u012b": "i",
|
315
|
+
"\u012d": "i",
|
316
|
+
"\u012f": "i",
|
317
|
+
"\u0131": "i",
|
318
|
+
"\u0134": "J",
|
319
|
+
"\u0135": "j",
|
320
|
+
"\u0136": "K",
|
321
|
+
"\u0137": "k",
|
322
|
+
"\u0138": "k",
|
323
|
+
"\u0139": "L",
|
324
|
+
"\u013b": "L",
|
325
|
+
"\u013d": "L",
|
326
|
+
"\u013f": "L",
|
327
|
+
"\u0141": "L",
|
328
|
+
"\u013a": "l",
|
329
|
+
"\u013c": "l",
|
330
|
+
"\u013e": "l",
|
331
|
+
"\u0140": "l",
|
332
|
+
"\u0142": "l",
|
333
|
+
"\u0143": "N",
|
334
|
+
"\u0145": "N",
|
335
|
+
"\u0147": "N",
|
336
|
+
"\u014a": "N",
|
337
|
+
"\u0144": "n",
|
338
|
+
"\u0146": "n",
|
339
|
+
"\u0148": "n",
|
340
|
+
"\u014b": "n",
|
341
|
+
"\u014c": "O",
|
342
|
+
"\u014e": "O",
|
343
|
+
"\u0150": "O",
|
344
|
+
"\u014d": "o",
|
345
|
+
"\u014f": "o",
|
346
|
+
"\u0151": "o",
|
347
|
+
"\u0154": "R",
|
348
|
+
"\u0156": "R",
|
349
|
+
"\u0158": "R",
|
350
|
+
"\u0155": "r",
|
351
|
+
"\u0157": "r",
|
352
|
+
"\u0159": "r",
|
353
|
+
"\u015a": "S",
|
354
|
+
"\u015c": "S",
|
355
|
+
"\u015e": "S",
|
356
|
+
"\u0160": "S",
|
357
|
+
"\u015b": "s",
|
358
|
+
"\u015d": "s",
|
359
|
+
"\u015f": "s",
|
360
|
+
"\u0161": "s",
|
361
|
+
"\u0162": "T",
|
362
|
+
"\u0164": "T",
|
363
|
+
"\u0166": "T",
|
364
|
+
"\u0163": "t",
|
365
|
+
"\u0165": "t",
|
366
|
+
"\u0167": "t",
|
367
|
+
"\u0168": "U",
|
368
|
+
"\u016a": "U",
|
369
|
+
"\u016c": "U",
|
370
|
+
"\u016e": "U",
|
371
|
+
"\u0170": "U",
|
372
|
+
"\u0172": "U",
|
373
|
+
"\u0169": "u",
|
374
|
+
"\u016b": "u",
|
375
|
+
"\u016d": "u",
|
376
|
+
"\u016f": "u",
|
377
|
+
"\u0171": "u",
|
378
|
+
"\u0173": "u",
|
379
|
+
"\u0174": "W",
|
380
|
+
"\u0175": "w",
|
381
|
+
"\u0176": "Y",
|
382
|
+
"\u0177": "y",
|
383
|
+
"\u0178": "Y",
|
384
|
+
"\u0179": "Z",
|
385
|
+
"\u017b": "Z",
|
386
|
+
"\u017d": "Z",
|
387
|
+
"\u017a": "z",
|
388
|
+
"\u017c": "z",
|
389
|
+
"\u017e": "z",
|
390
|
+
"\u0132": "IJ",
|
391
|
+
"\u0133": "ij",
|
392
|
+
"\u0152": "Oe",
|
393
|
+
"\u0153": "oe",
|
394
|
+
"\u0149": "'n",
|
395
|
+
"\u017f": "s"
|
396
|
+
},
|
397
|
+
m = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,
|
398
|
+
g = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]", "g");
|
399
|
+
|
400
|
+
function b(e) {
|
401
|
+
return f[e]
|
402
|
+
}
|
403
|
+
|
404
|
+
function w(e) {
|
405
|
+
return (e = e.toString()) && e.replace(m, b).replace(g, "")
|
406
|
+
}
|
407
|
+
var x, I, k, y, S, O = (x = {
|
408
|
+
"&": "&",
|
409
|
+
"<": "<",
|
410
|
+
">": ">",
|
411
|
+
'"': """,
|
412
|
+
"'": "'",
|
413
|
+
"`": "`"
|
414
|
+
}, I = function(e) {
|
415
|
+
return x[e]
|
416
|
+
}, k = "(?:" + Object.keys(x).join("|") + ")", y = RegExp(k), S = RegExp(k, "g"), function(e) {
|
417
|
+
return e = null == e ? "" : "" + e, y.test(e) ? e.replace(S, I) : e
|
418
|
+
}),
|
419
|
+
T = {
|
420
|
+
32: " ",
|
421
|
+
48: "0",
|
422
|
+
49: "1",
|
423
|
+
50: "2",
|
424
|
+
51: "3",
|
425
|
+
52: "4",
|
426
|
+
53: "5",
|
427
|
+
54: "6",
|
428
|
+
55: "7",
|
429
|
+
56: "8",
|
430
|
+
57: "9",
|
431
|
+
59: ";",
|
432
|
+
65: "A",
|
433
|
+
66: "B",
|
434
|
+
67: "C",
|
435
|
+
68: "D",
|
436
|
+
69: "E",
|
437
|
+
70: "F",
|
438
|
+
71: "G",
|
439
|
+
72: "H",
|
440
|
+
73: "I",
|
441
|
+
74: "J",
|
442
|
+
75: "K",
|
443
|
+
76: "L",
|
444
|
+
77: "M",
|
445
|
+
78: "N",
|
446
|
+
79: "O",
|
447
|
+
80: "P",
|
448
|
+
81: "Q",
|
449
|
+
82: "R",
|
450
|
+
83: "S",
|
451
|
+
84: "T",
|
452
|
+
85: "U",
|
453
|
+
86: "V",
|
454
|
+
87: "W",
|
455
|
+
88: "X",
|
456
|
+
89: "Y",
|
457
|
+
90: "Z",
|
458
|
+
96: "0",
|
459
|
+
97: "1",
|
460
|
+
98: "2",
|
461
|
+
99: "3",
|
462
|
+
100: "4",
|
463
|
+
101: "5",
|
464
|
+
102: "6",
|
465
|
+
103: "7",
|
466
|
+
104: "8",
|
467
|
+
105: "9"
|
468
|
+
},
|
469
|
+
A = 27,
|
470
|
+
N = 13,
|
471
|
+
D = 32,
|
472
|
+
H = 9,
|
473
|
+
P = 38,
|
474
|
+
W = 40,
|
475
|
+
M = {
|
476
|
+
success: !1,
|
477
|
+
major: "3"
|
478
|
+
};
|
479
|
+
try {
|
480
|
+
M.full = (z.fn.dropdown.Constructor.VERSION || "").split(" ")[0].split("."), M.major = M.full[0], M.success = !0
|
481
|
+
} catch (e) {}
|
482
|
+
var R = 0,
|
483
|
+
U = ".bs.select",
|
484
|
+
j = {
|
485
|
+
DISABLED: "disabled",
|
486
|
+
DIVIDER: "divider",
|
487
|
+
SHOW: "open",
|
488
|
+
DROPUP: "dropup",
|
489
|
+
MENU: "dropdown-menu",
|
490
|
+
MENURIGHT: "dropdown-menu-right",
|
491
|
+
MENULEFT: "dropdown-menu-left",
|
492
|
+
BUTTONCLASS: "btn-default",
|
493
|
+
POPOVERHEADER: "popover-title",
|
494
|
+
ICONBASE: "glyphicon",
|
495
|
+
TICKICON: "glyphicon-ok"
|
496
|
+
},
|
497
|
+
V = {
|
498
|
+
MENU: "." + j.MENU
|
499
|
+
},
|
500
|
+
F = {
|
501
|
+
span: document.createElement("span"),
|
502
|
+
i: document.createElement("i"),
|
503
|
+
subtext: document.createElement("small"),
|
504
|
+
a: document.createElement("a"),
|
505
|
+
li: document.createElement("li"),
|
506
|
+
whitespace: document.createTextNode("\xa0"),
|
507
|
+
fragment: document.createDocumentFragment()
|
508
|
+
};
|
509
|
+
F.a.setAttribute("role", "option"), F.subtext.className = "text-muted", F.text = F.span.cloneNode(!1), F.text.className = "text", F.checkMark = F.span.cloneNode(!1);
|
510
|
+
var _ = new RegExp(P + "|" + W),
|
511
|
+
q = new RegExp("^" + H + "$|" + A),
|
512
|
+
G = function(e, t, i) {
|
513
|
+
var s = F.li.cloneNode(!1);
|
514
|
+
return e && (1 === e.nodeType || 11 === e.nodeType ? s.appendChild(e) : s.innerHTML = e), void 0 !== t && "" !== t && (s.className = t), null != i && s.classList.add("optgroup-" + i), s
|
515
|
+
},
|
516
|
+
K = function(e, t, i) {
|
517
|
+
var s = F.a.cloneNode(!0);
|
518
|
+
return e && (11 === e.nodeType ? s.appendChild(e) : s.insertAdjacentHTML("beforeend", e)), void 0 !== t && "" !== t && (s.className = t), "4" === M.major && s.classList.add("dropdown-item"), i && s.setAttribute("style", i), s
|
519
|
+
},
|
520
|
+
Y = function(e, t) {
|
521
|
+
var i, s, n = F.text.cloneNode(!1);
|
522
|
+
if (e.content) n.innerHTML = e.content;
|
523
|
+
else {
|
524
|
+
if (n.textContent = e.text, e.icon) {
|
525
|
+
var o = F.whitespace.cloneNode(!1);
|
526
|
+
(s = (!0 === t ? F.i : F.span).cloneNode(!1)).className = e.iconBase + " " + e.icon, F.fragment.appendChild(s), F.fragment.appendChild(o)
|
527
|
+
}
|
528
|
+
e.subtext && ((i = F.subtext.cloneNode(!1)).textContent = e.subtext, n.appendChild(i))
|
529
|
+
}
|
530
|
+
if (!0 === t)
|
531
|
+
for (; 0 < n.childNodes.length;) F.fragment.appendChild(n.childNodes[0]);
|
532
|
+
else F.fragment.appendChild(n);
|
533
|
+
return F.fragment
|
534
|
+
},
|
535
|
+
Z = function(e) {
|
536
|
+
var t, i, s = F.text.cloneNode(!1);
|
537
|
+
if (s.innerHTML = e.label, e.icon) {
|
538
|
+
var n = F.whitespace.cloneNode(!1);
|
539
|
+
(i = F.span.cloneNode(!1)).className = e.iconBase + " " + e.icon, F.fragment.appendChild(i), F.fragment.appendChild(n)
|
540
|
+
}
|
541
|
+
return e.subtext && ((t = F.subtext.cloneNode(!1)).textContent = e.subtext, s.appendChild(t)), F.fragment.appendChild(s), F.fragment
|
542
|
+
},
|
543
|
+
J = function(e, t) {
|
544
|
+
var i = this;
|
545
|
+
p.useDefault || (z.valHooks.select.set = p._set, p.useDefault = !0), this.$element = z(e), this.$newElement = null, this.$button = null, this.$menu = null, this.options = t, this.selectpicker = {
|
546
|
+
main: {},
|
547
|
+
current: {},
|
548
|
+
search: {},
|
549
|
+
view: {},
|
550
|
+
keydown: {
|
551
|
+
keyHistory: "",
|
552
|
+
resetKeyHistory: {
|
553
|
+
start: function() {
|
554
|
+
return setTimeout(function() {
|
555
|
+
i.selectpicker.keydown.keyHistory = ""
|
556
|
+
}, 800)
|
557
|
+
}
|
558
|
+
}
|
559
|
+
}
|
560
|
+
}, null === this.options.title && (this.options.title = this.$element.attr("title"));
|
561
|
+
var s = this.options.windowPadding;
|
562
|
+
"number" == typeof s && (this.options.windowPadding = [s, s, s, s]), this.val = J.prototype.val, this.render = J.prototype.render, this.refresh = J.prototype.refresh, this.setStyle = J.prototype.setStyle, this.selectAll = J.prototype.selectAll, this.deselectAll = J.prototype.deselectAll, this.destroy = J.prototype.destroy, this.remove = J.prototype.remove, this.show = J.prototype.show, this.hide = J.prototype.hide, this.init()
|
563
|
+
};
|
564
|
+
|
565
|
+
function Q(e) {
|
566
|
+
var r, a = arguments,
|
567
|
+
c = e;
|
568
|
+
if ([].shift.apply(a), !M.success) {
|
569
|
+
try {
|
570
|
+
M.full = (z.fn.dropdown.Constructor.VERSION || "").split(" ")[0].split(".")
|
571
|
+
} catch (e) {
|
572
|
+
J.BootstrapVersion ? M.full = J.BootstrapVersion.split(" ")[0].split(".") : (M.full = [M.major, "0", "0"], console.warn("There was an issue retrieving Bootstrap's version. Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.", e))
|
573
|
+
}
|
574
|
+
M.major = M.full[0], M.success = !0
|
575
|
+
}
|
576
|
+
if ("4" === M.major) {
|
577
|
+
var t = [];
|
578
|
+
J.DEFAULTS.style === j.BUTTONCLASS && t.push({
|
579
|
+
name: "style",
|
580
|
+
className: "BUTTONCLASS"
|
581
|
+
}), J.DEFAULTS.iconBase === j.ICONBASE && t.push({
|
582
|
+
name: "iconBase",
|
583
|
+
className: "ICONBASE"
|
584
|
+
}), J.DEFAULTS.tickIcon === j.TICKICON && t.push({
|
585
|
+
name: "tickIcon",
|
586
|
+
className: "TICKICON"
|
587
|
+
}), j.DIVIDER = "dropdown-divider", j.SHOW = "show", j.BUTTONCLASS = "btn-light", j.POPOVERHEADER = "popover-header", j.ICONBASE = "", j.TICKICON = "bs-ok-default";
|
588
|
+
for (var i = 0; i < t.length; i++) {
|
589
|
+
e = t[i];
|
590
|
+
J.DEFAULTS[e.name] = j[e.className]
|
591
|
+
}
|
592
|
+
}
|
593
|
+
var s = this.each(function() {
|
594
|
+
var e = z(this);
|
595
|
+
if (e.is("select")) {
|
596
|
+
var t = e.data("selectpicker"),
|
597
|
+
i = "object" == typeof c && c;
|
598
|
+
if (t) {
|
599
|
+
if (i)
|
600
|
+
for (var s in i) i.hasOwnProperty(s) && (t.options[s] = i[s])
|
601
|
+
} else {
|
602
|
+
var n = e.data();
|
603
|
+
for (var o in n) n.hasOwnProperty(o) && -1 !== z.inArray(o, d) && delete n[o];
|
604
|
+
var l = z.extend({}, J.DEFAULTS, z.fn.selectpicker.defaults || {}, n, i);
|
605
|
+
l.template = z.extend({}, J.DEFAULTS.template, z.fn.selectpicker.defaults ? z.fn.selectpicker.defaults.template : {}, n.template, i.template), e.data("selectpicker", t = new J(this, l))
|
606
|
+
}
|
607
|
+
"string" == typeof c && (r = t[c] instanceof Function ? t[c].apply(t, a) : t.options[c])
|
608
|
+
}
|
609
|
+
});
|
610
|
+
return void 0 !== r ? r : s
|
611
|
+
}
|
612
|
+
J.VERSION = "1.13.9", J.DEFAULTS = {
|
613
|
+
noneSelectedText: "Nothing selected",
|
614
|
+
noneResultsText: "No results matched {0}",
|
615
|
+
countSelectedText: function(e, t) {
|
616
|
+
return 1 == e ? "{0} item selected" : "{0} items selected"
|
617
|
+
},
|
618
|
+
maxOptionsText: function(e, t) {
|
619
|
+
return [1 == e ? "Limit reached ({n} item max)" : "Limit reached ({n} items max)", 1 == t ? "Group limit reached ({n} item max)" : "Group limit reached ({n} items max)"]
|
620
|
+
},
|
621
|
+
selectAllText: "Select All",
|
622
|
+
deselectAllText: "Deselect All",
|
623
|
+
doneButton: !1,
|
624
|
+
doneButtonText: "Close",
|
625
|
+
multipleSeparator: ", ",
|
626
|
+
styleBase: "btn",
|
627
|
+
style: j.BUTTONCLASS,
|
628
|
+
size: "auto",
|
629
|
+
title: null,
|
630
|
+
selectedTextFormat: "values",
|
631
|
+
width: !1,
|
632
|
+
container: !1,
|
633
|
+
hideDisabled: !1,
|
634
|
+
showSubtext: !1,
|
635
|
+
showIcon: !0,
|
636
|
+
showContent: !0,
|
637
|
+
dropupAuto: !0,
|
638
|
+
header: !1,
|
639
|
+
liveSearch: !1,
|
640
|
+
liveSearchPlaceholder: null,
|
641
|
+
liveSearchNormalize: !1,
|
642
|
+
liveSearchStyle: "contains",
|
643
|
+
actionsBox: !1,
|
644
|
+
iconBase: j.ICONBASE,
|
645
|
+
tickIcon: j.TICKICON,
|
646
|
+
showTick: !1,
|
647
|
+
template: {
|
648
|
+
caret: '<span class="caret"></span>'
|
649
|
+
},
|
650
|
+
maxOptions: !1,
|
651
|
+
mobile: !1,
|
652
|
+
selectOnTab: !1,
|
653
|
+
dropdownAlignRight: !1,
|
654
|
+
windowPadding: 0,
|
655
|
+
virtualScroll: 600,
|
656
|
+
display: !1,
|
657
|
+
sanitize: !0,
|
658
|
+
sanitizeFn: null,
|
659
|
+
whiteList: e
|
660
|
+
}, J.prototype = {
|
661
|
+
constructor: J,
|
662
|
+
init: function() {
|
663
|
+
var i = this,
|
664
|
+
e = this.$element.attr("id");
|
665
|
+
this.selectId = R++, this.$element[0].classList.add("bs-select-hidden"), this.multiple = this.$element.prop("multiple"), this.autofocus = this.$element.prop("autofocus"), this.options.showTick = this.$element[0].classList.contains("show-tick"), this.$newElement = this.createDropdown(), this.$element.after(this.$newElement).prependTo(this.$newElement), this.$button = this.$newElement.children("button"), this.$menu = this.$newElement.children(V.MENU), this.$menuInner = this.$menu.children(".inner"), this.$searchbox = this.$menu.find("input"), this.$element[0].classList.remove("bs-select-hidden"), !0 === this.options.dropdownAlignRight && this.$menu[0].classList.add(j.MENURIGHT), void 0 !== e && this.$button.attr("data-id", e), this.checkDisabled(), this.clickListener(), this.options.liveSearch && this.liveSearchListener(), this.setStyle(), this.render(), this.setWidth(), this.options.container ? this.selectPosition() : this.$element.on("hide" + U, function() {
|
666
|
+
if (i.isVirtual()) {
|
667
|
+
var e = i.$menuInner[0],
|
668
|
+
t = e.firstChild.cloneNode(!1);
|
669
|
+
e.replaceChild(t, e.firstChild), e.scrollTop = 0
|
670
|
+
}
|
671
|
+
}), this.$menu.data("this", this), this.$newElement.data("this", this), this.options.mobile && this.mobile(), this.$newElement.on({
|
672
|
+
"hide.bs.dropdown": function(e) {
|
673
|
+
i.$menuInner.attr("aria-expanded", !1), i.$element.trigger("hide" + U, e)
|
674
|
+
},
|
675
|
+
"hidden.bs.dropdown": function(e) {
|
676
|
+
i.$element.trigger("hidden" + U, e)
|
677
|
+
},
|
678
|
+
"show.bs.dropdown": function(e) {
|
679
|
+
i.$menuInner.attr("aria-expanded", !0), i.$element.trigger("show" + U, e)
|
680
|
+
},
|
681
|
+
"shown.bs.dropdown": function(e) {
|
682
|
+
i.$element.trigger("shown" + U, e)
|
683
|
+
}
|
684
|
+
}), i.$element[0].hasAttribute("required") && this.$element.on("invalid" + U, function() {
|
685
|
+
i.$button[0].classList.add("bs-invalid"), i.$element.on("shown" + U + ".invalid", function() {
|
686
|
+
i.$element.val(i.$element.val()).off("shown" + U + ".invalid")
|
687
|
+
}).on("rendered" + U, function() {
|
688
|
+
this.validity.valid && i.$button[0].classList.remove("bs-invalid"), i.$element.off("rendered" + U)
|
689
|
+
}), i.$button.on("blur" + U, function() {
|
690
|
+
i.$element.trigger("focus").trigger("blur"), i.$button.off("blur" + U)
|
691
|
+
})
|
692
|
+
}), setTimeout(function() {
|
693
|
+
i.createLi(), i.$element.trigger("loaded" + U)
|
694
|
+
})
|
695
|
+
},
|
696
|
+
createDropdown: function() {
|
697
|
+
var e = this.multiple || this.options.showTick ? " show-tick" : "",
|
698
|
+
t = "",
|
699
|
+
i = this.autofocus ? " autofocus" : "";
|
700
|
+
M.major < 4 && this.$element.parent().hasClass("input-group") && (t = " input-group-btn");
|
701
|
+
var s, n = "",
|
702
|
+
o = "",
|
703
|
+
l = "",
|
704
|
+
r = "";
|
705
|
+
return this.options.header && (n = '<div class="' + j.POPOVERHEADER + '"><button type="button" class="close" aria-hidden="true">×</button>' + this.options.header + "</div>"), this.options.liveSearch && (o = '<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"' + (null === this.options.liveSearchPlaceholder ? "" : ' placeholder="' + O(this.options.liveSearchPlaceholder) + '"') + ' role="textbox" aria-label="Search"></div>'), this.multiple && this.options.actionsBox && (l = '<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn ' + j.BUTTONCLASS + '">' + this.options.selectAllText + '</button><button type="button" class="actions-btn bs-deselect-all btn ' + j.BUTTONCLASS + '">' + this.options.deselectAllText + "</button></div></div>"), this.multiple && this.options.doneButton && (r = '<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm ' + j.BUTTONCLASS + '">' + this.options.doneButtonText + "</button></div></div>"), s = '<div class="dropdown bootstrap-select' + e + t + '"><button type="button" class="' + this.options.styleBase + ' dropdown-toggle" ' + ("static" === this.options.display ? 'data-display="static"' : "") + 'data-toggle="dropdown"' + i + ' role="button"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner"></div></div> </div>' + ("4" === M.major ? "" : '<span class="bs-caret">' + this.options.template.caret + "</span>") + '</button><div class="' + j.MENU + " " + ("4" === M.major ? "" : j.SHOW) + '" role="combobox">' + n + o + l + '<div class="inner ' + j.SHOW + '" role="listbox" aria-expanded="false" tabindex="-1"><ul class="' + j.MENU + " inner " + ("4" === M.major ? j.SHOW : "") + '"></ul></div>' + r + "</div></div>", z(s)
|
706
|
+
},
|
707
|
+
setPositionData: function() {
|
708
|
+
this.selectpicker.view.canHighlight = [];
|
709
|
+
for (var e = 0; e < this.selectpicker.current.data.length; e++) {
|
710
|
+
var t = this.selectpicker.current.data[e],
|
711
|
+
i = !0;
|
712
|
+
"divider" === t.type ? (i = !1, t.height = this.sizeInfo.dividerHeight) : "optgroup-label" === t.type ? (i = !1, t.height = this.sizeInfo.dropdownHeaderHeight) : t.height = this.sizeInfo.liHeight, t.disabled && (i = !1), this.selectpicker.view.canHighlight.push(i), t.position = (0 === e ? 0 : this.selectpicker.current.data[e - 1].position) + t.height
|
713
|
+
}
|
714
|
+
},
|
715
|
+
isVirtual: function() {
|
716
|
+
return !1 !== this.options.virtualScroll && this.selectpicker.main.elements.length >= this.options.virtualScroll || !0 === this.options.virtualScroll
|
717
|
+
},
|
718
|
+
createView: function(T, e) {
|
719
|
+
e = e || 0;
|
720
|
+
var A = this;
|
721
|
+
this.selectpicker.current = T ? this.selectpicker.search : this.selectpicker.main;
|
722
|
+
var N, D, H = [];
|
723
|
+
|
724
|
+
function i(e, t) {
|
725
|
+
var i, s, n, o, l, r, a, c, d, h, p = A.selectpicker.current.elements.length,
|
726
|
+
u = [],
|
727
|
+
f = !0,
|
728
|
+
m = A.isVirtual();
|
729
|
+
A.selectpicker.view.scrollTop = e, !0 === m && A.sizeInfo.hasScrollBar && A.$menu[0].offsetWidth > A.sizeInfo.totalMenuWidth && (A.sizeInfo.menuWidth = A.$menu[0].offsetWidth, A.sizeInfo.totalMenuWidth = A.sizeInfo.menuWidth + A.sizeInfo.scrollBarWidth, A.$menu.css("min-width", A.sizeInfo.menuWidth)), i = Math.ceil(A.sizeInfo.menuInnerHeight / A.sizeInfo.liHeight * 1.5), s = Math.round(p / i) || 1;
|
730
|
+
for (var v = 0; v < s; v++) {
|
731
|
+
var g = (v + 1) * i;
|
732
|
+
if (v === s - 1 && (g = p), u[v] = [v * i + (v ? 1 : 0), g], !p) break;
|
733
|
+
void 0 === l && e <= A.selectpicker.current.data[g - 1].position - A.sizeInfo.menuInnerHeight && (l = v)
|
734
|
+
}
|
735
|
+
if (void 0 === l && (l = 0), r = [A.selectpicker.view.position0, A.selectpicker.view.position1], n = Math.max(0, l - 1), o = Math.min(s - 1, l + 1), A.selectpicker.view.position0 = !1 === m ? 0 : Math.max(0, u[n][0]) || 0, A.selectpicker.view.position1 = !1 === m ? p : Math.min(p, u[o][1]) || 0, a = r[0] !== A.selectpicker.view.position0 || r[1] !== A.selectpicker.view.position1, void 0 !== A.activeIndex && (D = A.selectpicker.main.elements[A.prevActiveIndex], H = A.selectpicker.main.elements[A.activeIndex], N = A.selectpicker.main.elements[A.selectedIndex], t && (A.activeIndex !== A.selectedIndex && H && H.length && (H.classList.remove("active"), H.firstChild && H.firstChild.classList.remove("active")), A.activeIndex = void 0), A.activeIndex && A.activeIndex !== A.selectedIndex && N && N.length && (N.classList.remove("active"), N.firstChild && N.firstChild.classList.remove("active"))), void 0 !== A.prevActiveIndex && A.prevActiveIndex !== A.activeIndex && A.prevActiveIndex !== A.selectedIndex && D && D.length && (D.classList.remove("active"), D.firstChild && D.firstChild.classList.remove("active")), (t || a) && (c = A.selectpicker.view.visibleElements ? A.selectpicker.view.visibleElements.slice() : [], A.selectpicker.view.visibleElements = !1 === m ? A.selectpicker.current.elements : A.selectpicker.current.elements.slice(A.selectpicker.view.position0, A.selectpicker.view.position1), A.setOptionStatus(), (T || !1 === m && t) && (d = c, h = A.selectpicker.view.visibleElements, f = !(d.length === h.length && d.every(function(e, t) {
|
736
|
+
return e === h[t]
|
737
|
+
}))), (t || !0 === m) && f)) {
|
738
|
+
var b, w, x = A.$menuInner[0],
|
739
|
+
I = document.createDocumentFragment(),
|
740
|
+
k = x.firstChild.cloneNode(!1),
|
741
|
+
$ = A.selectpicker.view.visibleElements,
|
742
|
+
y = [];
|
743
|
+
x.replaceChild(k, x.firstChild);
|
744
|
+
v = 0;
|
745
|
+
for (var S = $.length; v < S; v++) {
|
746
|
+
var E, C, O = $[v];
|
747
|
+
A.options.sanitize && (E = O.lastChild) && (C = A.selectpicker.current.data[v + A.selectpicker.view.position0]) && C.content && !C.sanitized && (y.push(E), C.sanitized = !0), I.appendChild(O)
|
748
|
+
}
|
749
|
+
A.options.sanitize && y.length && B(y, A.options.whiteList, A.options.sanitizeFn), !0 === m && (b = 0 === A.selectpicker.view.position0 ? 0 : A.selectpicker.current.data[A.selectpicker.view.position0 - 1].position, w = A.selectpicker.view.position1 > p - 1 ? 0 : A.selectpicker.current.data[p - 1].position - A.selectpicker.current.data[A.selectpicker.view.position1 - 1].position, x.firstChild.style.marginTop = b + "px", x.firstChild.style.marginBottom = w + "px"), x.firstChild.appendChild(I)
|
750
|
+
}
|
751
|
+
if (A.prevActiveIndex = A.activeIndex, A.options.liveSearch) {
|
752
|
+
if (T && t) {
|
753
|
+
var z, L = 0;
|
754
|
+
A.selectpicker.view.canHighlight[L] || (L = 1 + A.selectpicker.view.canHighlight.slice(1).indexOf(!0)), z = A.selectpicker.view.visibleElements[L], A.selectpicker.view.currentActive && (A.selectpicker.view.currentActive.classList.remove("active"), A.selectpicker.view.currentActive.firstChild && A.selectpicker.view.currentActive.firstChild.classList.remove("active")), z && (z.classList.add("active"), z.firstChild && z.firstChild.classList.add("active")), A.activeIndex = (A.selectpicker.current.data[L] || {}).index
|
755
|
+
}
|
756
|
+
} else A.$menuInner.trigger("focus")
|
757
|
+
}
|
758
|
+
this.setPositionData(), i(e, !0), this.$menuInner.off("scroll.createView").on("scroll.createView", function(e, t) {
|
759
|
+
A.noScroll || i(this.scrollTop, t), A.noScroll = !1
|
760
|
+
}), z(window).off("resize" + U + "." + this.selectId + ".createView").on("resize" + U + "." + this.selectId + ".createView", function() {
|
761
|
+
A.$newElement.hasClass(j.SHOW) && i(A.$menuInner[0].scrollTop)
|
762
|
+
})
|
763
|
+
},
|
764
|
+
setPlaceholder: function() {
|
765
|
+
var e = !1;
|
766
|
+
if (this.options.title && !this.multiple) {
|
767
|
+
this.selectpicker.view.titleOption || (this.selectpicker.view.titleOption = document.createElement("option")), e = !0;
|
768
|
+
var t = this.$element[0],
|
769
|
+
i = !1,
|
770
|
+
s = !this.selectpicker.view.titleOption.parentNode;
|
771
|
+
if (s) this.selectpicker.view.titleOption.className = "bs-title-option", this.selectpicker.view.titleOption.value = "", i = void 0 === z(t.options[t.selectedIndex]).attr("selected") && void 0 === this.$element.data("selected");
|
772
|
+
(s || 0 !== this.selectpicker.view.titleOption.index) && t.insertBefore(this.selectpicker.view.titleOption, t.firstChild), i && (t.selectedIndex = 0)
|
773
|
+
}
|
774
|
+
return e
|
775
|
+
},
|
776
|
+
createLi: function() {
|
777
|
+
var a = this,
|
778
|
+
f = this.options.iconBase,
|
779
|
+
m = ':not([hidden]):not([data-hidden="true"])',
|
780
|
+
v = [],
|
781
|
+
g = [],
|
782
|
+
c = 0,
|
783
|
+
b = 0,
|
784
|
+
e = this.setPlaceholder() ? 1 : 0;
|
785
|
+
this.options.hideDisabled && (m += ":not(:disabled)"), !a.options.showTick && !a.multiple || F.checkMark.parentNode || (F.checkMark.className = f + " " + a.options.tickIcon + " check-mark", F.a.appendChild(F.checkMark));
|
786
|
+
var t = this.$element[0].querySelectorAll("select > *" + m);
|
787
|
+
|
788
|
+
function w(e) {
|
789
|
+
var t = g[g.length - 1];
|
790
|
+
t && "divider" === t.type && (t.optID || e.optID) || ((e = e || {}).type = "divider", v.push(G(!1, j.DIVIDER, e.optID ? e.optID + "div" : void 0)), g.push(e))
|
791
|
+
}
|
792
|
+
|
793
|
+
function x(e, t) {
|
794
|
+
if ((t = t || {}).divider = "true" === e.getAttribute("data-divider"), t.divider) w({
|
795
|
+
optID: t.optID
|
796
|
+
});
|
797
|
+
else {
|
798
|
+
var i = g.length,
|
799
|
+
s = e.style.cssText,
|
800
|
+
n = s ? O(s) : "",
|
801
|
+
o = (e.className || "") + (t.optgroupClass || "");
|
802
|
+
t.optID && (o = "opt " + o), t.text = e.textContent, t.content = e.getAttribute("data-content"), t.tokens = e.getAttribute("data-tokens"), t.subtext = e.getAttribute("data-subtext"), t.icon = e.getAttribute("data-icon"), t.iconBase = f;
|
803
|
+
var l = Y(t);
|
804
|
+
v.push(G(K(l, o, n), "", t.optID)), e.liIndex = i, t.display = t.content || t.text, t.type = "option", t.index = i, t.option = e, t.disabled = t.disabled || e.disabled, g.push(t);
|
805
|
+
var r = 0;
|
806
|
+
t.display && (r += t.display.length), t.subtext && (r += t.subtext.length), t.icon && (r += 1), c < r && (c = r, a.selectpicker.view.widestOption = v[v.length - 1])
|
807
|
+
}
|
808
|
+
}
|
809
|
+
|
810
|
+
function i(e, t) {
|
811
|
+
var i = t[e],
|
812
|
+
s = t[e - 1],
|
813
|
+
n = t[e + 1],
|
814
|
+
o = i.querySelectorAll("option" + m);
|
815
|
+
if (o.length) {
|
816
|
+
var l, r, a = {
|
817
|
+
label: O(i.label),
|
818
|
+
subtext: i.getAttribute("data-subtext"),
|
819
|
+
icon: i.getAttribute("data-icon"),
|
820
|
+
iconBase: f
|
821
|
+
},
|
822
|
+
c = " " + (i.className || "");
|
823
|
+
b++, s && w({
|
824
|
+
optID: b
|
825
|
+
});
|
826
|
+
var d = Z(a);
|
827
|
+
v.push(G(d, "dropdown-header" + c, b)), g.push({
|
828
|
+
display: a.label,
|
829
|
+
subtext: a.subtext,
|
830
|
+
type: "optgroup-label",
|
831
|
+
optID: b
|
832
|
+
});
|
833
|
+
for (var h = 0, p = o.length; h < p; h++) {
|
834
|
+
var u = o[h];
|
835
|
+
0 === h && (r = (l = g.length - 1) + p), x(u, {
|
836
|
+
headerIndex: l,
|
837
|
+
lastIndex: r,
|
838
|
+
optID: b,
|
839
|
+
optgroupClass: c,
|
840
|
+
disabled: i.disabled
|
841
|
+
})
|
842
|
+
}
|
843
|
+
n && w({
|
844
|
+
optID: b
|
845
|
+
})
|
846
|
+
}
|
847
|
+
}
|
848
|
+
for (var s = t.length; e < s; e++) {
|
849
|
+
var n = t[e];
|
850
|
+
"OPTGROUP" !== n.tagName ? x(n, {}) : i(e, t)
|
851
|
+
}
|
852
|
+
this.selectpicker.main.elements = v, this.selectpicker.main.data = g, this.selectpicker.current = this.selectpicker.main
|
853
|
+
},
|
854
|
+
findLis: function() {
|
855
|
+
return this.$menuInner.find(".inner > li")
|
856
|
+
},
|
857
|
+
render: function() {
|
858
|
+
this.setPlaceholder();
|
859
|
+
var e, t, i = this,
|
860
|
+
s = this.$element[0].selectedOptions,
|
861
|
+
n = s.length,
|
862
|
+
o = this.$button[0],
|
863
|
+
l = o.querySelector(".filter-option-inner-inner"),
|
864
|
+
r = document.createTextNode(this.options.multipleSeparator),
|
865
|
+
a = F.fragment.cloneNode(!1),
|
866
|
+
c = !1;
|
867
|
+
if (this.togglePlaceholder(), this.tabIndex(), "static" === this.options.selectedTextFormat) a = Y({
|
868
|
+
text: this.options.title
|
869
|
+
}, !0);
|
870
|
+
else if ((e = this.multiple && -1 !== this.options.selectedTextFormat.indexOf("count") && 1 < n) && (e = 1 < (t = this.options.selectedTextFormat.split(">")).length && n > t[1] || 1 === t.length && 2 <= n), !1 === e) {
|
871
|
+
for (var d = 0; d < n && d < 50; d++) {
|
872
|
+
var h = s[d],
|
873
|
+
p = {},
|
874
|
+
u = {
|
875
|
+
content: h.getAttribute("data-content"),
|
876
|
+
subtext: h.getAttribute("data-subtext"),
|
877
|
+
icon: h.getAttribute("data-icon")
|
878
|
+
};
|
879
|
+
this.multiple && 0 < d && a.appendChild(r.cloneNode(!1)), h.title ? p.text = h.title : u.content && i.options.showContent ? (p.content = u.content.toString(), c = !0) : (i.options.showIcon && (p.icon = u.icon, p.iconBase = this.options.iconBase), i.options.showSubtext && !i.multiple && u.subtext && (p.subtext = " " + u.subtext), p.text = h.textContent.trim()), a.appendChild(Y(p, !0))
|
880
|
+
}
|
881
|
+
49 < n && a.appendChild(document.createTextNode("..."))
|
882
|
+
} else {
|
883
|
+
var f = ':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])';
|
884
|
+
this.options.hideDisabled && (f += ":not(:disabled)");
|
885
|
+
var m = this.$element[0].querySelectorAll("select > option" + f + ", optgroup" + f + " option" + f).length,
|
886
|
+
v = "function" == typeof this.options.countSelectedText ? this.options.countSelectedText(n, m) : this.options.countSelectedText;
|
887
|
+
a = Y({
|
888
|
+
text: v.replace("{0}", n.toString()).replace("{1}", m.toString())
|
889
|
+
}, !0)
|
890
|
+
}
|
891
|
+
if (null == this.options.title && (this.options.title = this.$element.attr("title")), a.childNodes.length || (a = Y({
|
892
|
+
text: void 0 !== this.options.title ? this.options.title : this.options.noneSelectedText
|
893
|
+
}, !0)), o.title = a.textContent.replace(/<[^>]*>?/g, "").trim(), this.options.sanitize && c && B([a], i.options.whiteList, i.options.sanitizeFn), l.innerHTML = "", l.appendChild(a), M.major < 4 && this.$newElement[0].classList.contains("bs3-has-addon")) {
|
894
|
+
var g = o.querySelector(".filter-expand"),
|
895
|
+
b = l.cloneNode(!0);
|
896
|
+
b.className = "filter-expand", g ? o.replaceChild(b, g) : o.appendChild(b)
|
897
|
+
}
|
898
|
+
this.$element.trigger("rendered" + U)
|
899
|
+
},
|
900
|
+
setStyle: function(e, t) {
|
901
|
+
var i, s = this.$button[0],
|
902
|
+
n = this.$newElement[0],
|
903
|
+
o = this.options.style.trim();
|
904
|
+
this.$element.attr("class") && this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi, "")), M.major < 4 && (n.classList.add("bs3"), n.parentNode.classList.contains("input-group") && (n.previousElementSibling || n.nextElementSibling) && (n.previousElementSibling || n.nextElementSibling).classList.contains("input-group-addon") && n.classList.add("bs3-has-addon")), i = e ? e.trim() : o, "add" == t ? i && s.classList.add.apply(s.classList, i.split(" ")) : "remove" == t ? i && s.classList.remove.apply(s.classList, i.split(" ")) : (o && s.classList.remove.apply(s.classList, o.split(" ")), i && s.classList.add.apply(s.classList, i.split(" ")))
|
905
|
+
},
|
906
|
+
liHeight: function(e) {
|
907
|
+
if (e || !1 !== this.options.size && !this.sizeInfo) {
|
908
|
+
this.sizeInfo || (this.sizeInfo = {});
|
909
|
+
var t = document.createElement("div"),
|
910
|
+
i = document.createElement("div"),
|
911
|
+
s = document.createElement("div"),
|
912
|
+
n = document.createElement("ul"),
|
913
|
+
o = document.createElement("li"),
|
914
|
+
l = document.createElement("li"),
|
915
|
+
r = document.createElement("li"),
|
916
|
+
a = document.createElement("a"),
|
917
|
+
c = document.createElement("span"),
|
918
|
+
d = this.options.header && 0 < this.$menu.find("." + j.POPOVERHEADER).length ? this.$menu.find("." + j.POPOVERHEADER)[0].cloneNode(!0) : null,
|
919
|
+
h = this.options.liveSearch ? document.createElement("div") : null,
|
920
|
+
p = this.options.actionsBox && this.multiple && 0 < this.$menu.find(".bs-actionsbox").length ? this.$menu.find(".bs-actionsbox")[0].cloneNode(!0) : null,
|
921
|
+
u = this.options.doneButton && this.multiple && 0 < this.$menu.find(".bs-donebutton").length ? this.$menu.find(".bs-donebutton")[0].cloneNode(!0) : null,
|
922
|
+
f = this.$element.find("option")[0];
|
923
|
+
if (this.sizeInfo.selectWidth = this.$newElement[0].offsetWidth, c.className = "text", a.className = "dropdown-item " + (f ? f.className : ""), t.className = this.$menu[0].parentNode.className + " " + j.SHOW, t.style.width = this.sizeInfo.selectWidth + "px", "auto" === this.options.width && (i.style.minWidth = 0), i.className = j.MENU + " " + j.SHOW, s.className = "inner " + j.SHOW, n.className = j.MENU + " inner " + ("4" === M.major ? j.SHOW : ""), o.className = j.DIVIDER, l.className = "dropdown-header", c.appendChild(document.createTextNode("\u200b")), a.appendChild(c), r.appendChild(a), l.appendChild(c.cloneNode(!0)), this.selectpicker.view.widestOption && n.appendChild(this.selectpicker.view.widestOption.cloneNode(!0)), n.appendChild(r), n.appendChild(o), n.appendChild(l), d && i.appendChild(d), h) {
|
924
|
+
var m = document.createElement("input");
|
925
|
+
h.className = "bs-searchbox", m.className = "form-control", h.appendChild(m), i.appendChild(h)
|
926
|
+
}
|
927
|
+
p && i.appendChild(p), s.appendChild(n), i.appendChild(s), u && i.appendChild(u), t.appendChild(i), document.body.appendChild(t);
|
928
|
+
var v, g = r.offsetHeight,
|
929
|
+
b = l ? l.offsetHeight : 0,
|
930
|
+
w = d ? d.offsetHeight : 0,
|
931
|
+
x = h ? h.offsetHeight : 0,
|
932
|
+
I = p ? p.offsetHeight : 0,
|
933
|
+
k = u ? u.offsetHeight : 0,
|
934
|
+
$ = z(o).outerHeight(!0),
|
935
|
+
y = !!window.getComputedStyle && window.getComputedStyle(i),
|
936
|
+
S = i.offsetWidth,
|
937
|
+
E = y ? null : z(i),
|
938
|
+
C = {
|
939
|
+
vert: L(y ? y.paddingTop : E.css("paddingTop")) + L(y ? y.paddingBottom : E.css("paddingBottom")) + L(y ? y.borderTopWidth : E.css("borderTopWidth")) + L(y ? y.borderBottomWidth : E.css("borderBottomWidth")),
|
940
|
+
horiz: L(y ? y.paddingLeft : E.css("paddingLeft")) + L(y ? y.paddingRight : E.css("paddingRight")) + L(y ? y.borderLeftWidth : E.css("borderLeftWidth")) + L(y ? y.borderRightWidth : E.css("borderRightWidth"))
|
941
|
+
},
|
942
|
+
O = {
|
943
|
+
vert: C.vert + L(y ? y.marginTop : E.css("marginTop")) + L(y ? y.marginBottom : E.css("marginBottom")) + 2,
|
944
|
+
horiz: C.horiz + L(y ? y.marginLeft : E.css("marginLeft")) + L(y ? y.marginRight : E.css("marginRight")) + 2
|
945
|
+
};
|
946
|
+
s.style.overflowY = "scroll", v = i.offsetWidth - S, document.body.removeChild(t), this.sizeInfo.liHeight = g, this.sizeInfo.dropdownHeaderHeight = b, this.sizeInfo.headerHeight = w, this.sizeInfo.searchHeight = x, this.sizeInfo.actionsHeight = I, this.sizeInfo.doneButtonHeight = k, this.sizeInfo.dividerHeight = $, this.sizeInfo.menuPadding = C, this.sizeInfo.menuExtras = O, this.sizeInfo.menuWidth = S, this.sizeInfo.totalMenuWidth = this.sizeInfo.menuWidth, this.sizeInfo.scrollBarWidth = v, this.sizeInfo.selectHeight = this.$newElement[0].offsetHeight, this.setPositionData()
|
947
|
+
}
|
948
|
+
},
|
949
|
+
getSelectPosition: function() {
|
950
|
+
var e, t = z(window),
|
951
|
+
i = this.$newElement.offset(),
|
952
|
+
s = z(this.options.container);
|
953
|
+
this.options.container && s.length && !s.is("body") ? ((e = s.offset()).top += parseInt(s.css("borderTopWidth")), e.left += parseInt(s.css("borderLeftWidth"))) : e = {
|
954
|
+
top: 0,
|
955
|
+
left: 0
|
956
|
+
};
|
957
|
+
var n = this.options.windowPadding;
|
958
|
+
this.sizeInfo.selectOffsetTop = i.top - e.top - t.scrollTop(), this.sizeInfo.selectOffsetBot = t.height() - this.sizeInfo.selectOffsetTop - this.sizeInfo.selectHeight - e.top - n[2], this.sizeInfo.selectOffsetLeft = i.left - e.left - t.scrollLeft(), this.sizeInfo.selectOffsetRight = t.width() - this.sizeInfo.selectOffsetLeft - this.sizeInfo.selectWidth - e.left - n[1], this.sizeInfo.selectOffsetTop -= n[0], this.sizeInfo.selectOffsetLeft -= n[3]
|
959
|
+
},
|
960
|
+
setMenuSize: function(e) {
|
961
|
+
this.getSelectPosition();
|
962
|
+
var t, i, s, n, o, l, r, a = this.sizeInfo.selectWidth,
|
963
|
+
c = this.sizeInfo.liHeight,
|
964
|
+
d = this.sizeInfo.headerHeight,
|
965
|
+
h = this.sizeInfo.searchHeight,
|
966
|
+
p = this.sizeInfo.actionsHeight,
|
967
|
+
u = this.sizeInfo.doneButtonHeight,
|
968
|
+
f = this.sizeInfo.dividerHeight,
|
969
|
+
m = this.sizeInfo.menuPadding,
|
970
|
+
v = 0;
|
971
|
+
if (this.options.dropupAuto && (r = c * this.selectpicker.current.elements.length + m.vert, this.$newElement.toggleClass(j.DROPUP, this.sizeInfo.selectOffsetTop - this.sizeInfo.selectOffsetBot > this.sizeInfo.menuExtras.vert && r + this.sizeInfo.menuExtras.vert + 50 > this.sizeInfo.selectOffsetBot)), "auto" === this.options.size) n = 3 < this.selectpicker.current.elements.length ? 3 * this.sizeInfo.liHeight + this.sizeInfo.menuExtras.vert - 2 : 0, i = this.sizeInfo.selectOffsetBot - this.sizeInfo.menuExtras.vert, s = n + d + h + p + u, l = Math.max(n - m.vert, 0), this.$newElement.hasClass(j.DROPUP) && (i = this.sizeInfo.selectOffsetTop - this.sizeInfo.menuExtras.vert), t = (o = i) - d - h - p - u - m.vert;
|
972
|
+
else if (this.options.size && "auto" != this.options.size && this.selectpicker.current.elements.length > this.options.size) {
|
973
|
+
for (var g = 0; g < this.options.size; g++) "divider" === this.selectpicker.current.data[g].type && v++;
|
974
|
+
t = (i = c * this.options.size + v * f + m.vert) - m.vert, o = i + d + h + p + u, s = l = ""
|
975
|
+
}
|
976
|
+
"auto" === this.options.dropdownAlignRight && this.$menu.toggleClass(j.MENURIGHT, this.sizeInfo.selectOffsetLeft > this.sizeInfo.selectOffsetRight && this.sizeInfo.selectOffsetRight < this.sizeInfo.totalMenuWidth - a), this.$menu.css({
|
977
|
+
"max-height": o + "px",
|
978
|
+
overflow: "hidden",
|
979
|
+
"min-height": s + "px"
|
980
|
+
}), this.$menuInner.css({
|
981
|
+
"max-height": t + "px",
|
982
|
+
"overflow-y": "auto",
|
983
|
+
"min-height": l + "px"
|
984
|
+
}), this.sizeInfo.menuInnerHeight = Math.max(t, 1), this.selectpicker.current.data.length && this.selectpicker.current.data[this.selectpicker.current.data.length - 1].position > this.sizeInfo.menuInnerHeight && (this.sizeInfo.hasScrollBar = !0, this.sizeInfo.totalMenuWidth = this.sizeInfo.menuWidth + this.sizeInfo.scrollBarWidth, this.$menu.css("min-width", this.sizeInfo.totalMenuWidth)), this.dropdown && this.dropdown._popper && this.dropdown._popper.update()
|
985
|
+
},
|
986
|
+
setSize: function(e) {
|
987
|
+
if (this.liHeight(e), this.options.header && this.$menu.css("padding-top", 0), !1 !== this.options.size) {
|
988
|
+
var t, i = this,
|
989
|
+
s = z(window),
|
990
|
+
n = 0;
|
991
|
+
if (this.setMenuSize(), this.options.liveSearch && this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize", function() {
|
992
|
+
return i.setMenuSize()
|
993
|
+
}), "auto" === this.options.size ? s.off("resize" + U + "." + this.selectId + ".setMenuSize scroll" + U + "." + this.selectId + ".setMenuSize").on("resize" + U + "." + this.selectId + ".setMenuSize scroll" + U + "." + this.selectId + ".setMenuSize", function() {
|
994
|
+
return i.setMenuSize()
|
995
|
+
}) : this.options.size && "auto" != this.options.size && this.selectpicker.current.elements.length > this.options.size && s.off("resize" + U + "." + this.selectId + ".setMenuSize scroll" + U + "." + this.selectId + ".setMenuSize"), e) n = this.$menuInner[0].scrollTop;
|
996
|
+
else if (!i.multiple) {
|
997
|
+
var o = i.$element[0];
|
998
|
+
"number" == typeof(t = (o.options[o.selectedIndex] || {}).liIndex) && !1 !== i.options.size && (n = (n = i.sizeInfo.liHeight * t) - i.sizeInfo.menuInnerHeight / 2 + i.sizeInfo.liHeight / 2)
|
999
|
+
}
|
1000
|
+
i.createView(!1, n)
|
1001
|
+
}
|
1002
|
+
},
|
1003
|
+
setWidth: function() {
|
1004
|
+
var i = this;
|
1005
|
+
"auto" === this.options.width ? requestAnimationFrame(function() {
|
1006
|
+
i.$menu.css("min-width", "0"), i.$element.on("loaded" + U, function() {
|
1007
|
+
i.liHeight(), i.setMenuSize();
|
1008
|
+
var e = i.$newElement.clone().appendTo("body"),
|
1009
|
+
t = e.css("width", "auto").children("button").outerWidth();
|
1010
|
+
e.remove(), i.sizeInfo.selectWidth = Math.max(i.sizeInfo.totalMenuWidth, t), i.$newElement.css("width", i.sizeInfo.selectWidth + "px")
|
1011
|
+
})
|
1012
|
+
}) : "fit" === this.options.width ? (this.$menu.css("min-width", ""), this.$newElement.css("width", "").addClass("fit-width")) : this.options.width ? (this.$menu.css("min-width", ""), this.$newElement.css("width", this.options.width)) : (this.$menu.css("min-width", ""), this.$newElement.css("width", "")), this.$newElement.hasClass("fit-width") && "fit" !== this.options.width && this.$newElement[0].classList.remove("fit-width")
|
1013
|
+
},
|
1014
|
+
selectPosition: function() {
|
1015
|
+
this.$bsContainer = z('<div class="bs-container" />');
|
1016
|
+
var s, n, o, l = this,
|
1017
|
+
r = z(this.options.container),
|
1018
|
+
e = function(e) {
|
1019
|
+
var t = {},
|
1020
|
+
i = l.options.display || !!z.fn.dropdown.Constructor.Default && z.fn.dropdown.Constructor.Default.display;
|
1021
|
+
l.$bsContainer.addClass(e.attr("class").replace(/form-control|fit-width/gi, "")).toggleClass(j.DROPUP, e.hasClass(j.DROPUP)), s = e.offset(), r.is("body") ? n = {
|
1022
|
+
top: 0,
|
1023
|
+
left: 0
|
1024
|
+
} : ((n = r.offset()).top += parseInt(r.css("borderTopWidth")) - r.scrollTop(), n.left += parseInt(r.css("borderLeftWidth")) - r.scrollLeft()), o = e.hasClass(j.DROPUP) ? 0 : e[0].offsetHeight, (M.major < 4 || "static" === i) && (t.top = s.top - n.top + o, t.left = s.left - n.left), t.width = e[0].offsetWidth, l.$bsContainer.css(t)
|
1025
|
+
};
|
1026
|
+
this.$button.on("click.bs.dropdown.data-api", function() {
|
1027
|
+
l.isDisabled() || (e(l.$newElement), l.$bsContainer.appendTo(l.options.container).toggleClass(j.SHOW, !l.$button.hasClass(j.SHOW)).append(l.$menu))
|
1028
|
+
}), z(window).off("resize" + U + "." + this.selectId + " scroll" + U + "." + this.selectId).on("resize" + U + "." + this.selectId + " scroll" + U + "." + this.selectId, function() {
|
1029
|
+
l.$newElement.hasClass(j.SHOW) && e(l.$newElement)
|
1030
|
+
}), this.$element.on("hide" + U, function() {
|
1031
|
+
l.$menu.data("height", l.$menu.height()), l.$bsContainer.detach()
|
1032
|
+
})
|
1033
|
+
},
|
1034
|
+
setOptionStatus: function() {
|
1035
|
+
var e = this;
|
1036
|
+
if (e.noScroll = !1, e.selectpicker.view.visibleElements && e.selectpicker.view.visibleElements.length)
|
1037
|
+
for (var t = 0; t < e.selectpicker.view.visibleElements.length; t++) {
|
1038
|
+
var i = e.selectpicker.current.data[t + e.selectpicker.view.position0],
|
1039
|
+
s = i.option;
|
1040
|
+
s && (e.setDisabled(i.index, i.disabled), e.setSelected(i.index, s.selected))
|
1041
|
+
}
|
1042
|
+
},
|
1043
|
+
setSelected: function(e, t) {
|
1044
|
+
var i, s, n = this.selectpicker.main.elements[e],
|
1045
|
+
o = this.selectpicker.main.data[e],
|
1046
|
+
l = void 0 !== this.activeIndex,
|
1047
|
+
r = this.activeIndex === e || t && !this.multiple && !l;
|
1048
|
+
o.selected = t, s = n.firstChild, t && (this.selectedIndex = e), n.classList.toggle("selected", t), n.classList.toggle("active", r), r && (this.selectpicker.view.currentActive = n, this.activeIndex = e), s && (s.classList.toggle("selected", t), s.classList.toggle("active", r), s.setAttribute("aria-selected", t)), r || !l && t && void 0 !== this.prevActiveIndex && ((i = this.selectpicker.main.elements[this.prevActiveIndex]).classList.remove("active"), i.firstChild && i.firstChild.classList.remove("active"))
|
1049
|
+
},
|
1050
|
+
setDisabled: function(e, t) {
|
1051
|
+
var i, s = this.selectpicker.main.elements[e];
|
1052
|
+
this.selectpicker.main.data[e].disabled = t, i = s.firstChild, s.classList.toggle(j.DISABLED, t), i && ("4" === M.major && i.classList.toggle(j.DISABLED, t), i.setAttribute("aria-disabled", t), t ? i.setAttribute("tabindex", -1) : i.setAttribute("tabindex", 0))
|
1053
|
+
},
|
1054
|
+
isDisabled: function() {
|
1055
|
+
return this.$element[0].disabled
|
1056
|
+
},
|
1057
|
+
checkDisabled: function() {
|
1058
|
+
var e = this;
|
1059
|
+
this.isDisabled() ? (this.$newElement[0].classList.add(j.DISABLED), this.$button.addClass(j.DISABLED).attr("tabindex", -1).attr("aria-disabled", !0)) : (this.$button[0].classList.contains(j.DISABLED) && (this.$newElement[0].classList.remove(j.DISABLED), this.$button.removeClass(j.DISABLED).attr("aria-disabled", !1)), -1 != this.$button.attr("tabindex") || this.$element.data("tabindex") || this.$button.removeAttr("tabindex")), this.$button.on("click", function() {
|
1060
|
+
return !e.isDisabled()
|
1061
|
+
})
|
1062
|
+
},
|
1063
|
+
togglePlaceholder: function() {
|
1064
|
+
var e = this.$element[0],
|
1065
|
+
t = e.selectedIndex,
|
1066
|
+
i = -1 === t;
|
1067
|
+
i || e.options[t].value || (i = !0), this.$button.toggleClass("bs-placeholder", i)
|
1068
|
+
},
|
1069
|
+
tabIndex: function() {
|
1070
|
+
this.$element.data("tabindex") !== this.$element.attr("tabindex") && -98 !== this.$element.attr("tabindex") && "-98" !== this.$element.attr("tabindex") && (this.$element.data("tabindex", this.$element.attr("tabindex")), this.$button.attr("tabindex", this.$element.data("tabindex"))), this.$element.attr("tabindex", -98)
|
1071
|
+
},
|
1072
|
+
clickListener: function() {
|
1073
|
+
var S = this,
|
1074
|
+
t = z(document);
|
1075
|
+
|
1076
|
+
function e() {
|
1077
|
+
S.options.liveSearch ? S.$searchbox.trigger("focus") : S.$menuInner.trigger("focus")
|
1078
|
+
}
|
1079
|
+
|
1080
|
+
function i() {
|
1081
|
+
S.dropdown && S.dropdown._popper && S.dropdown._popper.state.isCreated ? e() : requestAnimationFrame(i)
|
1082
|
+
}
|
1083
|
+
t.data("spaceSelect", !1), this.$button.on("keyup", function(e) {
|
1084
|
+
/(32)/.test(e.keyCode.toString(10)) && t.data("spaceSelect") && (e.preventDefault(), t.data("spaceSelect", !1))
|
1085
|
+
}), this.$newElement.on("show.bs.dropdown", function() {
|
1086
|
+
3 < M.major && !S.dropdown && (S.dropdown = S.$button.data("bs.dropdown"), S.dropdown._menu = S.$menu[0])
|
1087
|
+
}), this.$button.on("click.bs.dropdown.data-api", function() {
|
1088
|
+
S.$newElement.hasClass(j.SHOW) || S.setSize()
|
1089
|
+
}), this.$element.on("shown" + U, function() {
|
1090
|
+
S.$menuInner[0].scrollTop !== S.selectpicker.view.scrollTop && (S.$menuInner[0].scrollTop = S.selectpicker.view.scrollTop), 3 < M.major ? requestAnimationFrame(i) : e()
|
1091
|
+
}), this.$menuInner.on("click", "li a", function(e, t) {
|
1092
|
+
var i = z(this),
|
1093
|
+
s = S.isVirtual() ? S.selectpicker.view.position0 : 0,
|
1094
|
+
n = S.selectpicker.current.data[i.parent().index() + s],
|
1095
|
+
o = n.index,
|
1096
|
+
l = E(S.$element[0]),
|
1097
|
+
r = S.$element.prop("selectedIndex"),
|
1098
|
+
a = !0;
|
1099
|
+
if (S.multiple && 1 !== S.options.maxOptions && e.stopPropagation(), e.preventDefault(), !S.isDisabled() && !i.parent().hasClass(j.DISABLED)) {
|
1100
|
+
var c = S.$element.find("option"),
|
1101
|
+
d = n.option,
|
1102
|
+
h = z(d),
|
1103
|
+
p = d.selected,
|
1104
|
+
u = h.parent("optgroup"),
|
1105
|
+
f = u.find("option"),
|
1106
|
+
m = S.options.maxOptions,
|
1107
|
+
v = u.data("maxOptions") || !1;
|
1108
|
+
if (o === S.activeIndex && (t = !0), t || (S.prevActiveIndex = S.activeIndex, S.activeIndex = void 0), S.multiple) {
|
1109
|
+
if (d.selected = !p, S.setSelected(o, !p), i.trigger("blur"), !1 !== m || !1 !== v) {
|
1110
|
+
var g = m < c.filter(":selected").length,
|
1111
|
+
b = v < u.find("option:selected").length;
|
1112
|
+
if (m && g || v && b)
|
1113
|
+
if (m && 1 == m) {
|
1114
|
+
c.prop("selected", !1), h.prop("selected", !0);
|
1115
|
+
for (var w = 0; w < c.length; w++) S.setSelected(w, !1);
|
1116
|
+
S.setSelected(o, !0)
|
1117
|
+
} else if (v && 1 == v) {
|
1118
|
+
u.find("option:selected").prop("selected", !1), h.prop("selected", !0);
|
1119
|
+
for (w = 0; w < f.length; w++) {
|
1120
|
+
d = f[w];
|
1121
|
+
S.setSelected(c.index(d), !1)
|
1122
|
+
}
|
1123
|
+
S.setSelected(o, !0)
|
1124
|
+
} else {
|
1125
|
+
var x = "string" == typeof S.options.maxOptionsText ? [S.options.maxOptionsText, S.options.maxOptionsText] : S.options.maxOptionsText,
|
1126
|
+
I = "function" == typeof x ? x(m, v) : x,
|
1127
|
+
k = I[0].replace("{n}", m),
|
1128
|
+
$ = I[1].replace("{n}", v),
|
1129
|
+
y = z('<div class="notify"></div>');
|
1130
|
+
I[2] && (k = k.replace("{var}", I[2][1 < m ? 0 : 1]), $ = $.replace("{var}", I[2][1 < v ? 0 : 1])), h.prop("selected", !1), S.$menu.append(y), m && g && (y.append(z("<div>" + k + "</div>")), a = !1, S.$element.trigger("maxReached" + U)), v && b && (y.append(z("<div>" + $ + "</div>")), a = !1, S.$element.trigger("maxReachedGrp" + U)), setTimeout(function() {
|
1131
|
+
S.setSelected(o, !1)
|
1132
|
+
}, 10), y.delay(750).fadeOut(300, function() {
|
1133
|
+
z(this).remove()
|
1134
|
+
})
|
1135
|
+
}
|
1136
|
+
}
|
1137
|
+
} else c.prop("selected", !1), d.selected = !0, S.setSelected(o, !0);
|
1138
|
+
!S.multiple || S.multiple && 1 === S.options.maxOptions ? S.$button.trigger("focus") : S.options.liveSearch && S.$searchbox.trigger("focus"), a && (l != E(S.$element[0]) && S.multiple || r != S.$element.prop("selectedIndex") && !S.multiple) && (C = [d.index, h.prop("selected"), l], S.$element.triggerNative("change"))
|
1139
|
+
}
|
1140
|
+
}), this.$menu.on("click", "li." + j.DISABLED + " a, ." + j.POPOVERHEADER + ", ." + j.POPOVERHEADER + " :not(.close)", function(e) {
|
1141
|
+
e.currentTarget == this && (e.preventDefault(), e.stopPropagation(), S.options.liveSearch && !z(e.target).hasClass("close") ? S.$searchbox.trigger("focus") : S.$button.trigger("focus"))
|
1142
|
+
}), this.$menuInner.on("click", ".divider, .dropdown-header", function(e) {
|
1143
|
+
e.preventDefault(), e.stopPropagation(), S.options.liveSearch ? S.$searchbox.trigger("focus") : S.$button.trigger("focus")
|
1144
|
+
}), this.$menu.on("click", "." + j.POPOVERHEADER + " .close", function() {
|
1145
|
+
S.$button.trigger("click")
|
1146
|
+
}), this.$searchbox.on("click", function(e) {
|
1147
|
+
e.stopPropagation()
|
1148
|
+
}), this.$menu.on("click", ".actions-btn", function(e) {
|
1149
|
+
S.options.liveSearch ? S.$searchbox.trigger("focus") : S.$button.trigger("focus"), e.preventDefault(), e.stopPropagation(), z(this).hasClass("bs-select-all") ? S.selectAll() : S.deselectAll()
|
1150
|
+
}), this.$element.on("change" + U, function() {
|
1151
|
+
S.render(), S.$element.trigger("changed" + U, C), C = null
|
1152
|
+
}).on("focus" + U, function() {
|
1153
|
+
S.options.mobile || S.$button.trigger("focus")
|
1154
|
+
})
|
1155
|
+
},
|
1156
|
+
liveSearchListener: function() {
|
1157
|
+
var u = this,
|
1158
|
+
f = document.createElement("li");
|
1159
|
+
this.$button.on("click.bs.dropdown.data-api", function() {
|
1160
|
+
u.$searchbox.val() && u.$searchbox.val("")
|
1161
|
+
}), this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api", function(e) {
|
1162
|
+
e.stopPropagation()
|
1163
|
+
}), this.$searchbox.on("input propertychange", function() {
|
1164
|
+
var e = u.$searchbox.val();
|
1165
|
+
if (u.selectpicker.search.elements = [], u.selectpicker.search.data = [], e) {
|
1166
|
+
var t = [],
|
1167
|
+
i = e.toUpperCase(),
|
1168
|
+
s = {},
|
1169
|
+
n = [],
|
1170
|
+
o = u._searchStyle(),
|
1171
|
+
l = u.options.liveSearchNormalize;
|
1172
|
+
l && (i = w(i)), u._$lisSelected = u.$menuInner.find(".selected");
|
1173
|
+
for (var r = 0; r < u.selectpicker.main.data.length; r++) {
|
1174
|
+
var a = u.selectpicker.main.data[r];
|
1175
|
+
s[r] || (s[r] = $(a, i, o, l)), s[r] && void 0 !== a.headerIndex && -1 === n.indexOf(a.headerIndex) && (0 < a.headerIndex && (s[a.headerIndex - 1] = !0, n.push(a.headerIndex - 1)), s[a.headerIndex] = !0, n.push(a.headerIndex), s[a.lastIndex + 1] = !0), s[r] && "optgroup-label" !== a.type && n.push(r)
|
1176
|
+
}
|
1177
|
+
r = 0;
|
1178
|
+
for (var c = n.length; r < c; r++) {
|
1179
|
+
var d = n[r],
|
1180
|
+
h = n[r - 1],
|
1181
|
+
p = (a = u.selectpicker.main.data[d], u.selectpicker.main.data[h]);
|
1182
|
+
("divider" !== a.type || "divider" === a.type && p && "divider" !== p.type && c - 1 !== r) && (u.selectpicker.search.data.push(a), t.push(u.selectpicker.main.elements[d]))
|
1183
|
+
}
|
1184
|
+
u.activeIndex = void 0, u.noScroll = !0, u.$menuInner.scrollTop(0), u.selectpicker.search.elements = t, u.createView(!0), t.length || (f.className = "no-results", f.innerHTML = u.options.noneResultsText.replace("{0}", '"' + O(e) + '"'), u.$menuInner[0].firstChild.appendChild(f))
|
1185
|
+
} else u.$menuInner.scrollTop(0), u.createView(!1)
|
1186
|
+
})
|
1187
|
+
},
|
1188
|
+
_searchStyle: function() {
|
1189
|
+
return this.options.liveSearchStyle || "contains"
|
1190
|
+
},
|
1191
|
+
val: function(e) {
|
1192
|
+
if (void 0 === e) return this.$element.val();
|
1193
|
+
var t = E(this.$element[0]);
|
1194
|
+
return C = [null, null, t], this.$element.val(e).trigger("changed" + U, C), this.render(), C = null, this.$element
|
1195
|
+
},
|
1196
|
+
changeAll: function(e) {
|
1197
|
+
if (this.multiple) {
|
1198
|
+
void 0 === e && (e = !0);
|
1199
|
+
var t = this.$element[0],
|
1200
|
+
i = 0,
|
1201
|
+
s = 0,
|
1202
|
+
n = E(t);
|
1203
|
+
t.classList.add("bs-select-hidden");
|
1204
|
+
for (var o = 0, l = this.selectpicker.current.elements.length; o < l; o++) {
|
1205
|
+
var r = this.selectpicker.current.data[o],
|
1206
|
+
a = r.option;
|
1207
|
+
a && !r.disabled && "divider" !== r.type && (r.selected && i++, (a.selected = e) && s++)
|
1208
|
+
}
|
1209
|
+
t.classList.remove("bs-select-hidden"), i !== s && (this.setOptionStatus(), this.togglePlaceholder(), C = [null, null, n], this.$element.triggerNative("change"))
|
1210
|
+
}
|
1211
|
+
},
|
1212
|
+
selectAll: function() {
|
1213
|
+
return this.changeAll(!0)
|
1214
|
+
},
|
1215
|
+
deselectAll: function() {
|
1216
|
+
return this.changeAll(!1)
|
1217
|
+
},
|
1218
|
+
toggle: function(e) {
|
1219
|
+
(e = e || window.event) && e.stopPropagation(), this.$button.trigger("click.bs.dropdown.data-api")
|
1220
|
+
},
|
1221
|
+
keydown: function(e) {
|
1222
|
+
var t, i, s, n, o, l = z(this),
|
1223
|
+
r = l.hasClass("dropdown-toggle"),
|
1224
|
+
a = (r ? l.closest(".dropdown") : l.closest(V.MENU)).data("this"),
|
1225
|
+
c = a.findLis(),
|
1226
|
+
d = !1,
|
1227
|
+
h = e.which === H && !r && !a.options.selectOnTab,
|
1228
|
+
p = _.test(e.which) || h,
|
1229
|
+
u = a.$menuInner[0].scrollTop,
|
1230
|
+
f = a.isVirtual(),
|
1231
|
+
m = !0 === f ? a.selectpicker.view.position0 : 0;
|
1232
|
+
if (!(i = a.$newElement.hasClass(j.SHOW)) && (p || 48 <= e.which && e.which <= 57 || 96 <= e.which && e.which <= 105 || 65 <= e.which && e.which <= 90) && (a.$button.trigger("click.bs.dropdown.data-api"), a.options.liveSearch)) a.$searchbox.trigger("focus");
|
1233
|
+
else {
|
1234
|
+
if (e.which === A && i && (e.preventDefault(), a.$button.trigger("click.bs.dropdown.data-api").trigger("focus")), p) {
|
1235
|
+
if (!c.length) return;
|
1236
|
+
void 0 === (t = !0 === f ? c.index(c.filter(".active")) : a.activeIndex) && (t = -1), -1 !== t && ((s = a.selectpicker.current.elements[t + m]).classList.remove("active"), s.firstChild && s.firstChild.classList.remove("active")), e.which === P ? (-1 !== t && t--, t + m < 0 && (t += c.length), a.selectpicker.view.canHighlight[t + m] || -1 === (t = a.selectpicker.view.canHighlight.slice(0, t + m).lastIndexOf(!0) - m) && (t = c.length - 1)) : (e.which === W || h) && (++t + m >= a.selectpicker.view.canHighlight.length && (t = 0), a.selectpicker.view.canHighlight[t + m] || (t = t + 1 + a.selectpicker.view.canHighlight.slice(t + m + 1).indexOf(!0))), e.preventDefault();
|
1237
|
+
var v = m + t;
|
1238
|
+
e.which === P ? 0 === m && t === c.length - 1 ? (a.$menuInner[0].scrollTop = a.$menuInner[0].scrollHeight, v = a.selectpicker.current.elements.length - 1) : d = (o = (n = a.selectpicker.current.data[v]).position - n.height) < u : (e.which === W || h) && (0 === t ? v = a.$menuInner[0].scrollTop = 0 : d = u < (o = (n = a.selectpicker.current.data[v]).position - a.sizeInfo.menuInnerHeight)), (s = a.selectpicker.current.elements[v]) && (s.classList.add("active"), s.firstChild && s.firstChild.classList.add("active")), a.activeIndex = a.selectpicker.current.data[v].index, a.selectpicker.view.currentActive = s, d && (a.$menuInner[0].scrollTop = o), a.options.liveSearch ? a.$searchbox.trigger("focus") : l.trigger("focus")
|
1239
|
+
} else if (!l.is("input") && !q.test(e.which) || e.which === D && a.selectpicker.keydown.keyHistory) {
|
1240
|
+
var g, b, w = [];
|
1241
|
+
e.preventDefault(), a.selectpicker.keydown.keyHistory += T[e.which], a.selectpicker.keydown.resetKeyHistory.cancel && clearTimeout(a.selectpicker.keydown.resetKeyHistory.cancel), a.selectpicker.keydown.resetKeyHistory.cancel = a.selectpicker.keydown.resetKeyHistory.start(), b = a.selectpicker.keydown.keyHistory, /^(.)\1+$/.test(b) && (b = b.charAt(0));
|
1242
|
+
for (var x = 0; x < a.selectpicker.current.data.length; x++) {
|
1243
|
+
var I = a.selectpicker.current.data[x];
|
1244
|
+
$(I, b, "startsWith", !0) && a.selectpicker.view.canHighlight[x] && w.push(I.index)
|
1245
|
+
}
|
1246
|
+
if (w.length) {
|
1247
|
+
var k = 0;
|
1248
|
+
c.removeClass("active").find("a").removeClass("active"), 1 === b.length && (-1 === (k = w.indexOf(a.activeIndex)) || k === w.length - 1 ? k = 0 : k++), g = w[k], d = 0 < u - (n = a.selectpicker.main.data[g]).position ? (o = n.position - n.height, !0) : (o = n.position - a.sizeInfo.menuInnerHeight, n.position > u + a.sizeInfo.menuInnerHeight), (s = a.selectpicker.main.elements[g]).classList.add("active"), s.firstChild && s.firstChild.classList.add("active"), a.activeIndex = w[k], s.firstChild.focus(), d && (a.$menuInner[0].scrollTop = o), l.trigger("focus")
|
1249
|
+
}
|
1250
|
+
}
|
1251
|
+
i && (e.which === D && !a.selectpicker.keydown.keyHistory || e.which === N || e.which === H && a.options.selectOnTab) && (e.which !== D && e.preventDefault(), a.options.liveSearch && e.which === D || (a.$menuInner.find(".active a").trigger("click", !0), l.trigger("focus"), a.options.liveSearch || (e.preventDefault(), z(document).data("spaceSelect", !0))))
|
1252
|
+
}
|
1253
|
+
},
|
1254
|
+
mobile: function() {
|
1255
|
+
this.$element[0].classList.add("mobile-device")
|
1256
|
+
},
|
1257
|
+
refresh: function() {
|
1258
|
+
var e = z.extend({}, this.options, this.$element.data());
|
1259
|
+
this.options = e, this.checkDisabled(), this.setStyle(), this.render(), this.createLi(), this.setWidth(), this.setSize(!0), this.$element.trigger("refreshed" + U)
|
1260
|
+
},
|
1261
|
+
hide: function() {
|
1262
|
+
this.$newElement.hide()
|
1263
|
+
},
|
1264
|
+
show: function() {
|
1265
|
+
this.$newElement.show()
|
1266
|
+
},
|
1267
|
+
remove: function() {
|
1268
|
+
this.$newElement.remove(), this.$element.remove()
|
1269
|
+
},
|
1270
|
+
destroy: function() {
|
1271
|
+
this.$newElement.before(this.$element).remove(), this.$bsContainer ? this.$bsContainer.remove() : this.$menu.remove(), this.$element.off(U).removeData("selectpicker").removeClass("bs-select-hidden selectpicker"), z(window).off(U + "." + this.selectId)
|
1272
|
+
}
|
1273
|
+
};
|
1274
|
+
var X = z.fn.selectpicker;
|
1275
|
+
z.fn.selectpicker = Q, z.fn.selectpicker.Constructor = J, z.fn.selectpicker.noConflict = function() {
|
1276
|
+
return z.fn.selectpicker = X, this
|
1277
|
+
}, z(document).off("keydown.bs.dropdown.data-api").on("keydown" + U, '.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input', J.prototype.keydown).on("focusin.modal", '.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input', function(e) {
|
1278
|
+
e.stopPropagation()
|
1279
|
+
}), z(window).on("load" + U + ".data-api", function() {
|
1280
|
+
z(".selectpicker").each(function() {
|
1281
|
+
var e = z(this);
|
1282
|
+
Q.call(e, e.data())
|
1283
|
+
})
|
1284
|
+
})
|
1285
|
+
}(e)
|
1286
|
+
});
|
1287
|
+
//# sourceMappingURL=bootstrap-select.min.js.map
|