domquery-com 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/domquery.js +216 -209
- package/domquery.min.js +59 -57
- package/package.json +1 -1
- package/src/select.js +1406 -1367
- package/src_min/select.min.js +180 -177
package/src/select.js
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
function rgbToRgba(
|
|
2
|
-
if (!
|
|
3
|
-
var
|
|
4
|
-
if (
|
|
5
|
-
const [,
|
|
6
|
-
return `rgba(${
|
|
1
|
+
function rgbToRgba(w, l = .5) {
|
|
2
|
+
if (!w || w.startsWith("rgba")) return w;
|
|
3
|
+
var H = w.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
|
|
4
|
+
if (H) {
|
|
5
|
+
const [, m, A, p] = H;
|
|
6
|
+
return `rgba(${m}, ${A}, ${p}, ${l})`
|
|
7
7
|
}
|
|
8
|
-
if (
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return `rgba(${
|
|
8
|
+
if (H = w.match(/^#([a-fA-F0-9]{6})$/)) {
|
|
9
|
+
var x = H[1];
|
|
10
|
+
w = parseInt(x.substr(0, 2), 16);
|
|
11
|
+
H = parseInt(x.substr(2, 2), 16);
|
|
12
|
+
x = parseInt(x.substr(4, 2), 16);
|
|
13
|
+
return `rgba(${w}, ${H}, ${x}, ${l})`
|
|
14
14
|
}
|
|
15
|
-
return (
|
|
15
|
+
return (H = w.match(/^#([a-fA-F0-9]{3})$/)) ? (x = H[1], w = parseInt(x[0] + x[0], 16), H = parseInt(x[1] + x[1], 16), x = parseInt(x[2] + x[2], 16), `rgba(${w}, ${H}, ${x}, ${l})`) : w
|
|
16
16
|
}
|
|
17
|
-
$.select = function(
|
|
18
|
-
function
|
|
17
|
+
$.select = function(w, l, H) {
|
|
18
|
+
function x(g, B) {
|
|
19
|
+
let z;
|
|
20
|
+
return function() {
|
|
21
|
+
const q = arguments;
|
|
22
|
+
z || (g.apply(this, q), z = !0, setTimeout(() => z = !1, B))
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function m() {
|
|
19
27
|
var g = "undefined" !== typeof $ && $.isMobile ? $.isMobile() : {
|
|
20
28
|
isMobile: !1,
|
|
21
29
|
isTablet: !1,
|
|
@@ -24,63 +32,64 @@ $.select = function(x, l, I) {
|
|
|
24
32
|
return !0 === g.isMobile
|
|
25
33
|
}
|
|
26
34
|
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
return
|
|
35
|
+
function A(g) {
|
|
36
|
+
const B = document.createElement("div");
|
|
37
|
+
B.innerHTML = g;
|
|
38
|
+
return B.textContent || B.innerText || ""
|
|
31
39
|
}
|
|
32
40
|
|
|
33
|
-
function
|
|
34
|
-
return 1 ===
|
|
41
|
+
function p(g, B = 0) {
|
|
42
|
+
return 1 === B ? g.replace(/\x3c!--(.*?)--\x3e/g, "$1").replace(/<[^>]*>/g, "") : g.replace(/\x3c!--(.*?)--\x3e/g, "$1")
|
|
35
43
|
}
|
|
36
44
|
|
|
37
|
-
function
|
|
45
|
+
function R(g,
|
|
46
|
+
B) {
|
|
38
47
|
g = $(g);
|
|
39
|
-
|
|
40
|
-
if (!
|
|
48
|
+
B = g.find("option, li").eq(B);
|
|
49
|
+
if (!B.length) return {
|
|
41
50
|
text: g.find("option, li").first().text().trim(),
|
|
42
51
|
tag: null
|
|
43
52
|
};
|
|
44
|
-
var
|
|
45
|
-
const
|
|
46
|
-
var G =
|
|
47
|
-
for (
|
|
53
|
+
var z = B.html().replace(/\x3c!--(.*?)--\x3e/g, "$1").trim();
|
|
54
|
+
const q = [];
|
|
55
|
+
var G = B;
|
|
56
|
+
for (q.unshift(z); G.length;) {
|
|
48
57
|
var e = G.attr("class")?.split(" ") || [];
|
|
49
|
-
|
|
50
|
-
for (const
|
|
51
|
-
if (e = g.find(`[group="${
|
|
58
|
+
z = !1;
|
|
59
|
+
for (const S of e)
|
|
60
|
+
if (e = g.find(`[group="${S}"]`), e.length) {
|
|
52
61
|
G = e.html().replace(/\x3c!--(.*?)--\x3e/g, "$1").trim();
|
|
53
|
-
|
|
62
|
+
q.unshift(G);
|
|
54
63
|
G = e;
|
|
55
|
-
|
|
64
|
+
z = !0;
|
|
56
65
|
break
|
|
57
|
-
} if (!
|
|
66
|
+
} if (!z) break
|
|
58
67
|
}
|
|
59
68
|
return {
|
|
60
|
-
text:
|
|
61
|
-
tag:
|
|
69
|
+
text: q.join(" > "),
|
|
70
|
+
tag: B.attr("tag")
|
|
62
71
|
}
|
|
63
72
|
}
|
|
64
73
|
|
|
65
|
-
function O(g,
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
function O(g, B) {
|
|
75
|
+
B = parseInt(B?.radioSize ||
|
|
76
|
+
"16") / 2;
|
|
77
|
+
return `<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${B}px; height: ${B}px; background-color: ${g}; border-radius: 50%;"></div>`
|
|
68
78
|
}
|
|
69
79
|
|
|
70
|
-
function
|
|
80
|
+
function E(g) {
|
|
71
81
|
g = parseInt(g);
|
|
72
82
|
return `<span style="\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\twidth: ${.3*g}px;\n\t\t\theight: ${.6*g}px;\n\t\t\tborder: solid white;\n\t\t\tborder-width: 0 ${.12*g}px ${.12*g}px 0;\n\t\t\ttransform: translate(-50%, -65%) rotate(45deg);\n\t\t\tdisplay: block;\n\t\t"></span>`
|
|
73
83
|
}
|
|
74
84
|
|
|
75
|
-
function
|
|
76
|
-
return `<div style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: ${Math.max(.7*
|
|
77
|
-
parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webkit-font-smoothing: antialiased; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-tap-highlight-color: transparent;">${g}</div>`
|
|
85
|
+
function ja(g, B = "16px") {
|
|
86
|
+
return `<div style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: ${Math.max(.7*parseInt(B),10)}px; font-weight: bold; line-height: 1; text-align: center; -webkit-font-smoothing: antialiased; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-tap-highlight-color: transparent;">${g}</div>`
|
|
78
87
|
}
|
|
79
88
|
|
|
80
|
-
function
|
|
89
|
+
function W(g = "50%", B = "10px") {
|
|
81
90
|
return {
|
|
82
91
|
position: "absolute",
|
|
83
|
-
right:
|
|
92
|
+
right: B,
|
|
84
93
|
top: g,
|
|
85
94
|
transform: "translateY(-50%)",
|
|
86
95
|
width: "16px",
|
|
@@ -88,25 +97,25 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
88
97
|
}
|
|
89
98
|
}
|
|
90
99
|
|
|
91
|
-
function
|
|
92
|
-
let
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if ("checkbox" ===
|
|
96
|
-
g.pointer || g.pointer?.startsWith("checkbox_")) {
|
|
100
|
+
function aa(g) {
|
|
101
|
+
let B = g.groupArrowStyle?.size || g.arrowSize,
|
|
102
|
+
z = g.arrowRight || W().right,
|
|
103
|
+
q = g.groupArrowColor || g.arrowColor;
|
|
104
|
+
if ("checkbox" === g.pointer || g.pointer?.startsWith("checkbox_")) {
|
|
97
105
|
if (!g.groupArrowStyle?.size && g.checkboxSize) {
|
|
98
106
|
var G = parseFloat(g.checkboxSize);
|
|
99
|
-
isNaN(G) || (
|
|
100
|
-
}!g.groupArrowColor && g.checkboxColor && (
|
|
101
|
-
} else "radio" === g.pointer ? (!g.groupArrowStyle?.size && g.radioSize && (G = parseFloat(g.radioSize),
|
|
107
|
+
isNaN(G) || (B = `${.6*G}px`)
|
|
108
|
+
}!g.groupArrowColor && g.checkboxColor && (q = g.checkboxColor)
|
|
109
|
+
} else "radio" === g.pointer ? (!g.groupArrowStyle?.size && g.radioSize && (G = parseFloat(g.radioSize),
|
|
110
|
+
isNaN(G) || (B = `${.6*G}px`)), !g.groupArrowColor && g.radioColor && (q = g.radioColor)) : g.pointer && g.pointer.startsWith("question_") && !g.groupArrowColor && g.questionColor && (q = g.questionColor);
|
|
102
111
|
return {
|
|
103
|
-
arrowSizeValue:
|
|
104
|
-
arrowRightValue:
|
|
105
|
-
arrowColorValue:
|
|
112
|
+
arrowSizeValue: B,
|
|
113
|
+
arrowRightValue: z,
|
|
114
|
+
arrowColorValue: q
|
|
106
115
|
}
|
|
107
116
|
}
|
|
108
117
|
|
|
109
|
-
function
|
|
118
|
+
function T(g) {
|
|
110
119
|
return {
|
|
111
120
|
wrapperClass: g + "-wrapper",
|
|
112
121
|
triggerClass: g + "-trigger",
|
|
@@ -116,76 +125,75 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
116
125
|
}
|
|
117
126
|
}
|
|
118
127
|
|
|
119
|
-
function
|
|
128
|
+
function Y(g) {
|
|
120
129
|
return {
|
|
121
130
|
border: `2px solid ${g||"#ccc"}`,
|
|
122
131
|
backgroundColor: "#fff"
|
|
123
132
|
}
|
|
124
133
|
}
|
|
125
134
|
|
|
126
|
-
function
|
|
127
|
-
wa && ((g = g.find("select").first()[0]) &&
|
|
135
|
+
function y(g) {
|
|
136
|
+
wa && ((g = g.find("select").first()[0]) &&
|
|
137
|
+
g._selectId && (g = window._gong_tea_yun_0.get(g._selectId + "_close")) && g.call(this, wa), wa = 0)
|
|
128
138
|
}
|
|
129
139
|
|
|
130
|
-
function
|
|
131
|
-
const
|
|
140
|
+
function M(g, B, z) {
|
|
141
|
+
const q = g.closest('[class*="-wrapper"]');
|
|
132
142
|
g.find("div").first().css({
|
|
133
|
-
"background-color":
|
|
134
|
-
"#fff"
|
|
143
|
+
"background-color": z.optionsStyle.background || "#fff"
|
|
135
144
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
easing:
|
|
145
|
+
y(q);
|
|
146
|
+
B ? (z.slideToggle ? g.css("opacity", z.opacity || 0) : g.css("opacity", ""), g.slideUp(B, {
|
|
147
|
+
easing: z.easing,
|
|
139
148
|
complete: domqueryFocus
|
|
140
149
|
})) : (g.hide(), domqueryFocus())
|
|
141
150
|
}
|
|
142
151
|
|
|
143
|
-
function
|
|
144
|
-
if (!
|
|
145
|
-
|
|
152
|
+
function I(g, B, z, q) {
|
|
153
|
+
if (!ya) {
|
|
154
|
+
ya = !0;
|
|
146
155
|
var G = g.closest('[class*="-wrapper"]');
|
|
147
|
-
|
|
148
|
-
|
|
156
|
+
y(G);
|
|
157
|
+
z.css({
|
|
149
158
|
"background-color": "rgba(0, 0, 0, 0)"
|
|
150
159
|
});
|
|
151
160
|
var e = G.find("select").first()[0]._selectId;
|
|
152
161
|
setTimeout(() => {
|
|
153
162
|
e && domquery(this).historyOff("select-" + e);
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
g.slideUp(
|
|
157
|
-
easing:
|
|
163
|
+
ya = !1
|
|
164
|
+
}, B + 300);
|
|
165
|
+
g.slideUp(B, {
|
|
166
|
+
easing: q.easing,
|
|
158
167
|
complete: function() {
|
|
159
|
-
|
|
168
|
+
z.hide();
|
|
160
169
|
domqueryFocus()
|
|
161
170
|
}
|
|
162
171
|
})
|
|
163
172
|
}
|
|
164
173
|
}
|
|
165
174
|
|
|
166
|
-
function
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
A.css({
|
|
175
|
+
function U(g, B, z, q, G) {
|
|
176
|
+
if (!ya) {
|
|
177
|
+
ya = !0;
|
|
178
|
+
y(q);
|
|
179
|
+
q.data("upHTMe10Running", !0);
|
|
180
|
+
z.css({
|
|
173
181
|
"background-color": "rgba(0, 0, 0, 0)",
|
|
174
182
|
opacity: ""
|
|
175
183
|
});
|
|
176
|
-
var e =
|
|
184
|
+
var e = q.find("select").first()[0]._selectId;
|
|
177
185
|
setTimeout(() => {
|
|
178
|
-
!
|
|
179
|
-
|
|
180
|
-
},
|
|
181
|
-
g.css("opacity", "").slideUp(
|
|
186
|
+
!q.data("groupClicked") && e && domquery(this).historyOff("select-" + e);
|
|
187
|
+
ya = !1
|
|
188
|
+
}, B + 300);
|
|
189
|
+
g.css("opacity", "").slideUp(B, {
|
|
182
190
|
easing: G.easing,
|
|
183
191
|
complete: function() {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
192
|
+
z.css("pointer-events", "none").hide();
|
|
193
|
+
q.removeClass(G.openClass);
|
|
194
|
+
q.attr("data-state", "closed");
|
|
187
195
|
setTimeout(() => {
|
|
188
|
-
|
|
196
|
+
z.css("pointer-events", "")
|
|
189
197
|
}, 100);
|
|
190
198
|
domqueryFocus()
|
|
191
199
|
}
|
|
@@ -193,28 +201,27 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
193
201
|
}
|
|
194
202
|
}
|
|
195
203
|
|
|
196
|
-
function
|
|
197
|
-
var
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
if (!A) {
|
|
204
|
+
function Z(g, B) {
|
|
205
|
+
var z = m(),
|
|
206
|
+
q = g.data("settings");
|
|
207
|
+
if (!z) {
|
|
201
208
|
const G = g[0].getBoundingClientRect(),
|
|
202
209
|
e = window.innerHeight;
|
|
203
|
-
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
if (
|
|
210
|
+
B = B.find("div").first();
|
|
211
|
+
const S = q && q.height,
|
|
212
|
+
V = S || `${.6*e}px`;
|
|
213
|
+
z = e - G.bottom;
|
|
214
|
+
const ca = G.top;
|
|
215
|
+
if (q.parentView) return g = {
|
|
209
216
|
position: "fixed",
|
|
210
217
|
left: G.left + "px",
|
|
211
218
|
width: G.width + "px",
|
|
212
219
|
zIndex: 1E3,
|
|
213
|
-
height:
|
|
220
|
+
height: V,
|
|
214
221
|
overflowY: "auto",
|
|
215
222
|
overflowX: "hidden"
|
|
216
|
-
},
|
|
217
|
-
if (
|
|
223
|
+
}, ca > z && z < B[0].scrollHeight ? (g.bottom = e - G.top + "px", g.top = "auto", g.borderRadius = "4px 4px 0 0") : (g.top = G.bottom + "px", g.bottom = "auto", g.borderRadius = "0 0 4px 4px"), g;
|
|
224
|
+
if (S) return {
|
|
218
225
|
top: "100%",
|
|
219
226
|
bottom: "auto",
|
|
220
227
|
borderRadius: "0 0 4px 4px",
|
|
@@ -222,28 +229,29 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
222
229
|
borderBottom: "1px solid #ccc"
|
|
223
230
|
};
|
|
224
231
|
g = g.find("select").first();
|
|
225
|
-
g = (g.length ? parseInt(g.height() || g.css("height")) : null) ||
|
|
226
|
-
|
|
232
|
+
g = (g.length ? parseInt(g.height() || g.css("height")) : null) || B[0].scrollHeight;
|
|
233
|
+
q = {
|
|
227
234
|
top: "100%",
|
|
228
235
|
bottom: "auto",
|
|
229
236
|
borderRadius: "0 0 4px 4px",
|
|
230
237
|
borderTop: "none",
|
|
231
238
|
borderBottom: "1px solid #ccc"
|
|
232
239
|
};
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
240
|
+
z < g &&
|
|
241
|
+
ca > z ? (q = {
|
|
242
|
+
top: "auto",
|
|
243
|
+
bottom: "100%",
|
|
244
|
+
borderRadius: "4px 4px 0 0",
|
|
245
|
+
borderBottom: "1px solid #ccc",
|
|
246
|
+
borderTop: "none"
|
|
247
|
+
}, ca < g && B.css({
|
|
248
|
+
maxHeight: `${ca-10}px`,
|
|
249
|
+
overflowY: "auto"
|
|
250
|
+
})) : z < g && B.css({
|
|
251
|
+
maxHeight: `${z-10}px`,
|
|
252
|
+
overflowY: "auto"
|
|
253
|
+
});
|
|
254
|
+
return q
|
|
247
255
|
}
|
|
248
256
|
return {
|
|
249
257
|
position: "fixed",
|
|
@@ -251,52 +259,51 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
251
259
|
right: "0",
|
|
252
260
|
bottom: "0",
|
|
253
261
|
top: "auto",
|
|
254
|
-
borderRadius:
|
|
262
|
+
borderRadius: q.MborderRadius || "4px 4px 0 0",
|
|
255
263
|
width: "100%",
|
|
256
|
-
Mheight:
|
|
257
|
-
height:
|
|
258
|
-
minHeight:
|
|
259
|
-
maxHeight:
|
|
264
|
+
Mheight: q.Mheight || "60vh",
|
|
265
|
+
height: q.height || "auto",
|
|
266
|
+
minHeight: q.minHeight || "auto",
|
|
267
|
+
maxHeight: q.maxHeight || (z ? q.Mheight || "60vh" : q.height || "300px"),
|
|
260
268
|
overflowY: "auto",
|
|
261
269
|
zIndex: "1000"
|
|
262
270
|
}
|
|
263
271
|
}
|
|
264
272
|
|
|
265
|
-
function
|
|
273
|
+
function ma(g) {
|
|
266
274
|
g.css({
|
|
267
275
|
"pointer-events": "none",
|
|
268
276
|
opacity: "0.6"
|
|
269
277
|
})
|
|
270
278
|
}
|
|
271
279
|
|
|
272
|
-
function
|
|
273
|
-
|
|
280
|
+
function fa(g, B) {
|
|
281
|
+
B && g && Object.entries(B).forEach(([z, q]) => {
|
|
274
282
|
try {
|
|
275
|
-
g.style[
|
|
283
|
+
g.style[z] = q
|
|
276
284
|
} catch (G) {
|
|
277
|
-
console.warn("Style application failed for property:",
|
|
278
|
-
A)
|
|
285
|
+
console.warn("Style application failed for property:", z)
|
|
279
286
|
}
|
|
280
287
|
})
|
|
281
288
|
}
|
|
282
289
|
|
|
283
|
-
function
|
|
284
|
-
if (
|
|
290
|
+
function Ba(g, B) {
|
|
291
|
+
if (B.scrollColor) try {
|
|
285
292
|
g.find('[class*="-options"]');
|
|
286
|
-
const
|
|
287
|
-
|
|
293
|
+
const z = B.optionsStyle.background || "#fff",
|
|
294
|
+
q = B.optionStyle.borderBottomColor || "#ddd",
|
|
288
295
|
G = `scrollbar-${g.attr("id")||Math.random().toString(36).substr(2,9)}`;
|
|
289
296
|
$(`#${G}`).remove();
|
|
290
297
|
const e = document.createElement("style");
|
|
291
298
|
e.id = G;
|
|
292
|
-
e.textContent = `\n\t\t\t\t#${g.attr("id")} .${
|
|
299
|
+
e.textContent = `\n\t\t\t\t#${g.attr("id")} .${B.optionsClass}::-webkit-scrollbar,\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} div::-webkit-scrollbar {\n\t\t\t\t\twidth: 8px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${B.optionsClass}::-webkit-scrollbar-track,\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} div::-webkit-scrollbar-track {\n\t\t\t\t\tbackground: ${z};\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${B.optionsClass}::-webkit-scrollbar-thumb,\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} div::-webkit-scrollbar-thumb {\n\t\t\t\t\tbackground: ${q};\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\tborder: 1px solid ${z};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${B.optionsClass}::-webkit-scrollbar-thumb:hover,\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} div::-webkit-scrollbar-thumb:hover {\n\t\t\t\t\tbackground: ${q};\n\t\t\t\t\topacity: 0.8;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} {\n\t\t\t\t\tscrollbar-width: thin;\n\t\t\t\t\tscrollbar-color: ${q} ${z};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} div {\n\t\t\t\t\tscrollbar-width: thin;\n\t\t\t\t\tscrollbar-color: ${q} ${z};\n\t\t\t\t}\n\t\t\t`;
|
|
293
300
|
document.head.appendChild(e);
|
|
294
301
|
g.data("scrollbarStyleId", G)
|
|
295
|
-
} catch (
|
|
296
|
-
console.warn("\uc2a4\ud06c\ub864\ubc14 \uc0c9\uc0c1 \uc801\uc6a9 \uc911 \uc624\ub958:",
|
|
302
|
+
} catch (z) {
|
|
303
|
+
console.warn("\uc2a4\ud06c\ub864\ubc14 \uc0c9\uc0c1 \uc801\uc6a9 \uc911 \uc624\ub958:", z)
|
|
297
304
|
}
|
|
298
305
|
}
|
|
299
|
-
let
|
|
306
|
+
let ya = !1,
|
|
300
307
|
wa = 0;
|
|
301
308
|
window._isMouseDown_gong = !1;
|
|
302
309
|
window._isGroupClick = !1;
|
|
@@ -306,7 +313,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
306
313
|
g.tagName && "TEXTAREA" !== g.tagName && "true" !== g.getAttribute("contenteditable") || (window._selectPreviousFocus = g, void 0 !== g.selectionStart && (window._selectPreviousFocusPosition = g.selectionStart))
|
|
307
314
|
});
|
|
308
315
|
window.domqueryFocus = function() {
|
|
309
|
-
if (
|
|
316
|
+
if (m()) try {
|
|
310
317
|
window._selectPreviousFocus && document.body.contains(window._selectPreviousFocus) ? setTimeout(() => {
|
|
311
318
|
try {
|
|
312
319
|
if (window._selectPreviousFocus.focus(), "INPUT" === window._selectPreviousFocus.tagName || "TEXTAREA" === window._selectPreviousFocus.tagName) {
|
|
@@ -328,26 +335,26 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
328
335
|
g.textContent = "\n\t\t\t.group-option {\n\t\t\t\tposition: relative;\n\t\t\t\tpadding-right: 30px !important;\n\t\t\t\tfont-style: italic;\n\t\t\t\tcolor: #666;\n\t\t\t\tfont-weight: bold;\n\t\t\t}\n\t\t\t.child-option {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t\n\t\t";
|
|
329
336
|
document.head.appendChild(g)
|
|
330
337
|
}
|
|
331
|
-
"function" === typeof
|
|
338
|
+
"function" === typeof w ? (H = w, l = {}, w = 0) : "function" === typeof l ? "object" === typeof w ? (H = l, l = w, w = 0) : (H = l, l = {}) : "object" === typeof w && (l = w, w = 0);
|
|
332
339
|
l = l || {};
|
|
333
|
-
|
|
340
|
+
w = parseInt(w) || 0;
|
|
334
341
|
this.elements.forEach(g => {
|
|
335
|
-
function
|
|
342
|
+
function B(c) {
|
|
336
343
|
if (!c) return "10px";
|
|
337
344
|
c = c.split(" ").filter(b => b.trim());
|
|
338
345
|
return 1 === c.length ? c[0] : 2 === c.length ? c[1] : 4 === c.length ? c[3] : "10px"
|
|
339
346
|
}
|
|
340
347
|
if (g._selectId) {
|
|
341
|
-
var
|
|
342
|
-
if (
|
|
348
|
+
var z = $(g).parent();
|
|
349
|
+
if (z.length && z[0].className && "string" === typeof z[0].className && z[0].className.includes("-wrapper")) return
|
|
343
350
|
}
|
|
344
|
-
var
|
|
351
|
+
var q = Math.random().toString(36).substr(2,
|
|
345
352
|
9);
|
|
346
|
-
|
|
347
|
-
var G =
|
|
353
|
+
z = T("select-" + q);
|
|
354
|
+
var G = m();
|
|
348
355
|
G = "auto" === l.slideToggle ? G ? !1 : !0 : l.slideToggle || !1;
|
|
349
356
|
let e = {
|
|
350
|
-
...
|
|
357
|
+
...z,
|
|
351
358
|
height: l.height,
|
|
352
359
|
defaultText: "Select an option",
|
|
353
360
|
allowHTML: !0,
|
|
@@ -433,6 +440,9 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
433
440
|
borderRadius: "0 0 4px 4px",
|
|
434
441
|
boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
|
|
435
442
|
zIndex: "1",
|
|
443
|
+
maxHeight: "280px",
|
|
444
|
+
overflowY: "auto",
|
|
445
|
+
overflowX: "hidden",
|
|
436
446
|
WebkitOverflowScrolling: "touch",
|
|
437
447
|
WebkitTapHighlightColor: "transparent",
|
|
438
448
|
touchAction: "manipulation"
|
|
@@ -462,8 +472,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
462
472
|
textDecoration: "line-through"
|
|
463
473
|
},
|
|
464
474
|
questionStyle: {
|
|
465
|
-
...
|
|
466
|
-
...
|
|
475
|
+
...W(),
|
|
476
|
+
...Y(l.buttonColor),
|
|
467
477
|
borderRadius: "50%",
|
|
468
478
|
display: "flex",
|
|
469
479
|
alignItems: "center",
|
|
@@ -475,8 +485,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
475
485
|
height: l.questionSize || "16px"
|
|
476
486
|
},
|
|
477
487
|
checkboxStyle: {
|
|
478
|
-
...
|
|
479
|
-
...
|
|
488
|
+
...W(),
|
|
489
|
+
...Y(l.buttonColor),
|
|
480
490
|
borderRadius: "3px",
|
|
481
491
|
zIndex: "1",
|
|
482
492
|
display: "block"
|
|
@@ -498,8 +508,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
498
508
|
}
|
|
499
509
|
},
|
|
500
510
|
radioStyle: {
|
|
501
|
-
...
|
|
502
|
-
...
|
|
511
|
+
...W(),
|
|
512
|
+
...Y(l.buttonColor),
|
|
503
513
|
borderRadius: "50%"
|
|
504
514
|
},
|
|
505
515
|
radioSelectedStyle: {
|
|
@@ -542,8 +552,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
542
552
|
defaultColor: "#333333",
|
|
543
553
|
defaultBorderColor: "#cccccc",
|
|
544
554
|
triggerHoverBgColor: l.triggerHoverBgColor || "#f5f5f5",
|
|
545
|
-
triggerHoverColor: l.triggerHoverColor ||
|
|
546
|
-
"#000000",
|
|
555
|
+
triggerHoverColor: l.triggerHoverColor || "#000000",
|
|
547
556
|
triggerHoverBorderColor: l.triggerHoverBorderColor || "#999999",
|
|
548
557
|
radioColor: l.radioColor || "#007bff",
|
|
549
558
|
checkboxColor: l.checkboxColor || "#007bff",
|
|
@@ -551,13 +560,14 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
551
560
|
buttonColor: l.buttonColor || "#ccc",
|
|
552
561
|
dotColor: l.dotColor || "#007bff",
|
|
553
562
|
...l,
|
|
554
|
-
...
|
|
563
|
+
...z,
|
|
555
564
|
slideToggle: G
|
|
556
565
|
};
|
|
557
566
|
("checkbox" === e.pointer || e.pointer?.startsWith("checkbox_")) && setTimeout(() => {
|
|
558
567
|
const c = $(g),
|
|
559
568
|
b = c.find("option[selected]").filter(function() {
|
|
560
|
-
return "" !==
|
|
569
|
+
return "" !==
|
|
570
|
+
$(this).val().trim() && !$(this).is(":disabled")
|
|
561
571
|
}).map(function() {
|
|
562
572
|
return {
|
|
563
573
|
value: $(this).val(),
|
|
@@ -574,83 +584,84 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
574
584
|
width: e.checkboxSize,
|
|
575
585
|
height: e.checkboxSize
|
|
576
586
|
});
|
|
577
|
-
0 < b && h.html(
|
|
587
|
+
0 < b && h.html(ja(b, e.checkboxSize));
|
|
578
588
|
a.find('[class*="-option"]').each(function() {
|
|
579
|
-
const d =
|
|
589
|
+
const d =
|
|
590
|
+
$(this);
|
|
580
591
|
var k = d.attr("data-value"),
|
|
581
|
-
|
|
582
|
-
k =
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
m.length && (m.css({
|
|
592
|
+
u = c.find(`option[value="${k}"]`);
|
|
593
|
+
k = u.is("[selected]") && "" !== k.trim();
|
|
594
|
+
u = u.is(":disabled");
|
|
595
|
+
const n = d.find(".custom-checkbox");
|
|
596
|
+
n.length && (n.css({
|
|
587
597
|
border: `2px solid ${k?e.checkboxColor:e.buttonColor}`,
|
|
588
|
-
backgroundColor: k ? e.checkboxColor :
|
|
598
|
+
backgroundColor: k ? e.checkboxColor : u ? "#f5f5f5" : "#fff",
|
|
589
599
|
width: e.checkboxSize,
|
|
590
600
|
height: e.checkboxSize
|
|
591
|
-
}), k &&
|
|
601
|
+
}), k && n.html(E(e.checkboxSize)), d.attr("data-checked", k ? "true" : "false"))
|
|
592
602
|
})
|
|
593
603
|
}, 0);
|
|
594
|
-
g._selectId || (g._selectId =
|
|
595
|
-
|
|
596
|
-
l.onSelect &&
|
|
597
|
-
|
|
598
|
-
|
|
604
|
+
g._selectId || (g._selectId = q);
|
|
605
|
+
H && window._gong_tea_yun_0.set(g._selectId + "_callback", H);
|
|
606
|
+
l.onSelect &&
|
|
607
|
+
window._gong_tea_yun_0.set(g._selectId + "_onSelect", l.onSelect);
|
|
608
|
+
l.open && window._gong_tea_yun_0.set(g._selectId + "_open", l.open);
|
|
599
609
|
l.close && window._gong_tea_yun_0.set(g._selectId + "_close", l.close);
|
|
600
|
-
|
|
610
|
+
z = "select" === g.tagName.toLowerCase();
|
|
601
611
|
G = "ul" === g.tagName.toLowerCase();
|
|
602
|
-
if (
|
|
612
|
+
if (z || G) {
|
|
603
613
|
if (G) {
|
|
604
|
-
var
|
|
605
|
-
|
|
606
|
-
(
|
|
614
|
+
var S = document.createElement("select");
|
|
615
|
+
S.className = g.className;
|
|
616
|
+
(z = g.getAttribute("onchange")) && S.setAttribute("onchange", z);
|
|
607
617
|
const c = new Set;
|
|
608
618
|
|
|
609
619
|
function b(a, h = 0) {
|
|
610
620
|
Array.from(a).forEach(d => {
|
|
611
621
|
if (!c.has(d))
|
|
612
622
|
if (c.add(d), d.hasAttribute("group")) {
|
|
613
|
-
var k =
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
d.className && (
|
|
621
|
-
|
|
622
|
-
const
|
|
623
|
-
d = Array.from(g.children).filter(L => L.classList.contains(
|
|
623
|
+
var k =
|
|
624
|
+
d.getAttribute("group");
|
|
625
|
+
const u = document.createElement("option");
|
|
626
|
+
u.innerHTML = d.innerHTML;
|
|
627
|
+
u.setAttribute("group", k);
|
|
628
|
+
u.setAttribute("data-is-group", "true");
|
|
629
|
+
u.setAttribute("data-level", h);
|
|
630
|
+
d.className && (u.className = d.className);
|
|
631
|
+
S.appendChild(u);
|
|
632
|
+
const n = d.getAttribute("group");
|
|
633
|
+
d = Array.from(g.children).filter(L => L.classList.contains(n));
|
|
624
634
|
b(d, h + 1)
|
|
625
|
-
} else k = document.createElement("option"), k.value = d.getAttribute("value") || "", k.innerHTML = d.innerHTML, d.hasAttribute("img") && k.setAttribute("img", d.getAttribute("img")),
|
|
635
|
+
} else k = document.createElement("option"), k.value = d.getAttribute("value") || "", k.innerHTML = d.innerHTML, d.hasAttribute("img") && k.setAttribute("img", d.getAttribute("img")),
|
|
636
|
+
d.getAttribute("tag") && k.setAttribute("tag", d.getAttribute("tag")), d.hasAttribute("disabled") && (k.disabled = !0), d.hasAttribute("selected") && (k.selected = !0), d.className && (k.className = d.className), k.setAttribute("data-level", h), S.appendChild(k)
|
|
626
637
|
})
|
|
627
638
|
}
|
|
628
639
|
b(g.children);
|
|
629
|
-
g.parentNode.replaceChild(
|
|
630
|
-
} else
|
|
631
|
-
|
|
632
|
-
var
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
(
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
var
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
640
|
+
g.parentNode.replaceChild(S, g)
|
|
641
|
+
} else S = g;
|
|
642
|
+
S._selectId = g._selectId;
|
|
643
|
+
var V = document.createElement("div");
|
|
644
|
+
V.className = e.wrapperClass;
|
|
645
|
+
V.setAttribute("data-state", "closed");
|
|
646
|
+
V.setAttribute("tabindex", "0");
|
|
647
|
+
V.setAttribute("data-selected-index", "-1");
|
|
648
|
+
V.setAttribute("data-previous-index",
|
|
649
|
+
"-1");
|
|
650
|
+
$(V).data("settings", e);
|
|
651
|
+
l.width && (V.style.width = l.width, V.style.boxSizing = "border-box");
|
|
652
|
+
(z = S.querySelector("option:checked")) && z.value && (V.setAttribute("data-selected-value", z.value), z = Array.from(S.options).indexOf(z), V.setAttribute("data-selected-index", z));
|
|
653
|
+
fa(V, e.wrapperStyle);
|
|
654
|
+
z = document.createElement("div");
|
|
655
|
+
z.style.position = "relative";
|
|
656
|
+
var ca = document.createElement("div");
|
|
657
|
+
ca.className = e.triggerClass;
|
|
658
|
+
ca.setAttribute("tabindex", "-1");
|
|
659
|
+
fa(ca, {
|
|
649
660
|
padding: e.defaultPadding || "10px",
|
|
650
|
-
paddingRight: e.defaultPaddingRight ||
|
|
661
|
+
paddingRight: e.defaultPaddingRight ||
|
|
662
|
+
"40px",
|
|
651
663
|
margin: e.defaultMargin || "0",
|
|
652
|
-
border: `${e.defaultBorderWidth||
|
|
653
|
-
"1px"} solid ${e.defaultBorderColor||"#ccc"}`,
|
|
664
|
+
border: `${e.defaultBorderWidth||"1px"} solid ${e.defaultBorderColor||"#ccc"}`,
|
|
654
665
|
borderRadius: e.defaultBorderRadius || "4px",
|
|
655
666
|
cursor: "pointer",
|
|
656
667
|
backgroundColor: e.defaultBgColor,
|
|
@@ -659,77 +670,79 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
659
670
|
width: "100%",
|
|
660
671
|
boxSizing: "border-box"
|
|
661
672
|
});
|
|
662
|
-
$(
|
|
673
|
+
$(ca).on({
|
|
663
674
|
mouseenter: function(c) {
|
|
664
|
-
window._isMouseDown_gong || (c = $(this).closest(`.${e.wrapperClass}`).data("settings")) && c.triggerHoverBgColor && (this.style.backgroundColor = c.triggerHoverBgColor, this.style.color = c.triggerHoverColor ||
|
|
665
|
-
c.defaultBorderColor)
|
|
675
|
+
window._isMouseDown_gong || (c = $(this).closest(`.${e.wrapperClass}`).data("settings")) && c.triggerHoverBgColor && (this.style.backgroundColor = c.triggerHoverBgColor, this.style.color = c.triggerHoverColor ||
|
|
676
|
+
c.defaultColor, this.style.borderColor = c.triggerHoverBorderColor || c.defaultBorderColor)
|
|
666
677
|
},
|
|
667
678
|
mouseleave: function() {
|
|
668
679
|
const c = $(this).closest(`.${e.wrapperClass}`).data("settings");
|
|
669
680
|
c && (this.style.backgroundColor = c.defaultBgColor, this.style.color = c.defaultColor, this.style.borderColor = c.defaultBorderColor)
|
|
670
681
|
}
|
|
671
682
|
});
|
|
672
|
-
var
|
|
673
|
-
e.triggerStyle && (e.triggerStyle.width ? G = e.triggerStyle.width : e.triggerStyle.maxWidth ? G = e.triggerStyle.maxWidth : e.triggerStyle.minWidth && (G = e.triggerStyle.minWidth), e.triggerStyle.height ?
|
|
674
|
-
e.triggerStyle.minHeight && (
|
|
675
|
-
G || (G =
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
+
var pa = G = null;
|
|
684
|
+
e.triggerStyle && (e.triggerStyle.width ? G = e.triggerStyle.width : e.triggerStyle.maxWidth ? G = e.triggerStyle.maxWidth : e.triggerStyle.minWidth && (G = e.triggerStyle.minWidth), e.triggerStyle.height ?
|
|
685
|
+
pa = e.triggerStyle.height : e.triggerStyle.maxHeight ? pa = e.triggerStyle.maxHeight : e.triggerStyle.minHeight && (pa = e.triggerStyle.minHeight));
|
|
686
|
+
G || (G = S.style.width, !G && S.style.maxWidth && (G = S.style.maxWidth), !G && S.style.minWidth && (G = S.style.minWidth));
|
|
687
|
+
pa || (pa = S.style.height, !pa && S.style.maxHeight && (pa = S.style.maxHeight), !pa && S.style.minHeight && (pa = S.style.minHeight));
|
|
688
|
+
fa(ca, e.triggerStyle);
|
|
689
|
+
ca.style.whiteSpace = "nowrap";
|
|
690
|
+
ca.style.overflow = "hidden";
|
|
691
|
+
ca.style.textOverflow = "ellipsis";
|
|
692
|
+
ca.style.paddingRight = e.defaultPaddingRight ||
|
|
693
|
+
"40px";
|
|
694
|
+
ca.style.height = "auto";
|
|
683
695
|
var ha = e.defaultText,
|
|
684
|
-
za =
|
|
696
|
+
za = S.querySelector("option:checked");
|
|
685
697
|
if (za) {
|
|
686
|
-
var
|
|
687
|
-
"checkbox" === e.pointer || e.pointer?.startsWith("checkbox_") ? (
|
|
688
|
-
}!e.showArrow || "radio" === e.pointer || "checkbox" === e.pointer || e.pointer && (e.pointer.startsWith("question_") || e.pointer.startsWith("checkbox_")) || (
|
|
689
|
-
document.
|
|
698
|
+
var da = Array.from(S.options);
|
|
699
|
+
"checkbox" === e.pointer || e.pointer?.startsWith("checkbox_") ? (da = da.find(c => "" === c.value)) && (ha = e.allowHTML ? da.innerHTML : da.textContent) : (ha = da.indexOf(za), ha = R(S, ha).text, S._needsExpandGroup = !0)
|
|
700
|
+
}!e.showArrow || "radio" === e.pointer || "checkbox" === e.pointer || e.pointer && (e.pointer.startsWith("question_") || e.pointer.startsWith("checkbox_")) || (q = "custom-select-arrow-style-" + q, document.getElementById(q) ||
|
|
701
|
+
(da = document.createElement("style"), da.id = q, da.textContent = `\n\t\t\t\t\t.${e.triggerClass}::after {\n\t\t\t\t\t content: '';\n\t\t\t\t\t position: absolute;\n\t\t\t\t\t right: ${e.arrowRight};\n\t\t\t\t\t top: ${e.arrowTop}; \n\t\t\t\t\t transform: translateY(-50%);\n\t\t\t\t\t width: 0;\n\t\t\t\t\t height: 0;\n\t\t\t\t\t border-left: ${e.arrowSize} solid transparent;\n\t\t\t\t\t border-right: ${e.arrowSize} solid transparent;\n\t\t\t\t\t border-top: ${e.arrowSize} solid ${e.arrowColor};\n\t\t\t\t\t transition: transform 0.3s ease;\n\t\t\t\t\t z-index: 1;\n\t\t\t\t\t}\n\t\t\t\t\t.${e.wrapperClass}.${e.openClass} .${e.triggerClass}::after {\n\t\t\t\t\t transform: translateY(-50%) rotate(180deg);\n\t\t\t\t\t z-index: 1; \n\t\t\t\t\t}\n\t\t\t\t\t.${e.triggerClass} {\n\t\t\t\t\t position: relative;\n\t\t\t\t\t z-index: 0;\n\t\t\t\t\t}\n\t\t\t\t`,
|
|
702
|
+
document.head.appendChild(da)));
|
|
690
703
|
if (e.allowHTML) {
|
|
691
|
-
|
|
692
|
-
if (!e.pointer?.startsWith("question_") && !e.pointer?.startsWith("checkbox_") && "checkbox" !== e.pointer && (
|
|
693
|
-
|
|
704
|
+
ca.innerHTML = ha;
|
|
705
|
+
if (!e.pointer?.startsWith("question_") && !e.pointer?.startsWith("checkbox_") && "checkbox" !== e.pointer && (q = S.querySelector("option:checked"), !0 === e.tag && q && q.getAttribute("tag"))) {
|
|
706
|
+
q = q.getAttribute("tag");
|
|
694
707
|
ha = document.createElement("span");
|
|
695
|
-
|
|
708
|
+
da = e.tagStyle || {};
|
|
696
709
|
var na = e.tagMap || {},
|
|
697
|
-
|
|
710
|
+
ka = {
|
|
698
711
|
position: "absolute",
|
|
699
712
|
right: "radio" === e.pointer ? "40px" : "30px",
|
|
700
713
|
top: "50%",
|
|
701
714
|
transform: "translateY(-50%)",
|
|
702
|
-
color:
|
|
703
|
-
fontSize:
|
|
715
|
+
color: da.color || e.tagColor || "#666",
|
|
716
|
+
fontSize: da.fontSize || "12px",
|
|
704
717
|
margin: e.tagMargin
|
|
705
718
|
};
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
na[
|
|
710
|
-
Object.assign(ha.style,
|
|
711
|
-
ha.innerHTML =
|
|
712
|
-
|
|
719
|
+
da.padding && (ka.padding = da.padding);
|
|
720
|
+
da.borderRadius && (ka.borderRadius = da.borderRadius);
|
|
721
|
+
da.fontWeight && (ka.fontWeight = da.fontWeight);
|
|
722
|
+
na[q] && (ka.backgroundColor = na[q]);
|
|
723
|
+
Object.assign(ha.style, ka);
|
|
724
|
+
ha.innerHTML = q;
|
|
725
|
+
ca.appendChild(ha)
|
|
713
726
|
}
|
|
714
727
|
if (e.pointer && e.pointer.startsWith("question_")) {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
Object.assign(
|
|
728
|
+
q = document.createElement("div");
|
|
729
|
+
q.className = "custom-question trigger-question";
|
|
730
|
+
Object.assign(q.style, {
|
|
718
731
|
...e.questionStyle,
|
|
719
732
|
width: e.questionSize,
|
|
720
733
|
height: e.questionSize
|
|
721
734
|
});
|
|
722
|
-
if (ha =
|
|
723
|
-
Object.assign(
|
|
735
|
+
if (ha = S.querySelector("option[selected]")) {
|
|
736
|
+
Object.assign(q.style, {
|
|
724
737
|
border: `2px solid ${e.questionColor}`,
|
|
725
738
|
backgroundColor: e.questionColor
|
|
726
739
|
});
|
|
727
|
-
|
|
740
|
+
q.innerHTML = `<span style="color: white; font-size: calc(${e.questionSize} * 0.6);">\u2713</span>`;
|
|
728
741
|
ha = ha.getAttribute("tag");
|
|
729
742
|
if (!0 === e.tag && ha) {
|
|
730
|
-
|
|
743
|
+
da = document.createElement("span");
|
|
731
744
|
na = e.tagStyle || {};
|
|
732
|
-
|
|
745
|
+
ka = e.tagMap || {};
|
|
733
746
|
const c = {
|
|
734
747
|
position: "absolute",
|
|
735
748
|
right: "40px",
|
|
@@ -741,17 +754,17 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
741
754
|
na.padding && (c.padding = na.padding);
|
|
742
755
|
na.borderRadius && (c.borderRadius = na.borderRadius);
|
|
743
756
|
na.fontWeight && (c.fontWeight = na.fontWeight);
|
|
744
|
-
|
|
745
|
-
Object.assign(
|
|
746
|
-
|
|
747
|
-
|
|
757
|
+
ka[ha] && (c.backgroundColor = ka[ha]);
|
|
758
|
+
Object.assign(da.style, c);
|
|
759
|
+
da.textContent = ha;
|
|
760
|
+
ca.appendChild(da)
|
|
748
761
|
}
|
|
749
|
-
|
|
750
|
-
} else
|
|
751
|
-
|
|
762
|
+
V.setAttribute("data-aun", "true")
|
|
763
|
+
} else q.innerHTML = `<span style="font-size: calc(${e.questionSize} * 0.6);">?</span>`;
|
|
764
|
+
ca.appendChild(q)
|
|
752
765
|
}
|
|
753
|
-
if ("checkbox" === e.pointer || e.pointer?.startsWith("checkbox_"))
|
|
754
|
-
...
|
|
766
|
+
if ("checkbox" === e.pointer || e.pointer?.startsWith("checkbox_")) ca.style.position = "relative", ca.style.paddingRight = "40px", q = document.createElement("div"), q.className = "custom-checkbox trigger-checkbox", Object.assign(q.style, {
|
|
767
|
+
...W(),
|
|
755
768
|
border: `2px solid ${e.buttonColor}`,
|
|
756
769
|
borderRadius: "3px",
|
|
757
770
|
backgroundColor: "#fff",
|
|
@@ -759,55 +772,55 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
759
772
|
display: "block",
|
|
760
773
|
width: e.checkboxSize,
|
|
761
774
|
height: e.checkboxSize
|
|
762
|
-
}),
|
|
763
|
-
"radio" === e.pointer && (
|
|
764
|
-
...
|
|
775
|
+
}), ca.appendChild(q);
|
|
776
|
+
"radio" === e.pointer && (ca.style.position = "relative", ca.style.paddingRight = "40px", q = document.createElement("div"), q.className = "custom-radio trigger-radio", Object.assign(q.style, {
|
|
777
|
+
...W(),
|
|
765
778
|
border: `2px solid ${e.buttonColor}`,
|
|
766
779
|
borderRadius: "50%",
|
|
767
780
|
backgroundColor: "#fff",
|
|
768
781
|
width: e.radioSize,
|
|
769
782
|
height: e.radioSize
|
|
770
|
-
}), (ha =
|
|
771
|
-
ha.value && "" !== ha.value && (Object.assign(
|
|
783
|
+
}), (ha = S.querySelector("option:checked")) &&
|
|
784
|
+
ha.value && "" !== ha.value && (Object.assign(q.style, {
|
|
772
785
|
border: `2px solid ${e.radioColor}`
|
|
773
|
-
}),
|
|
774
|
-
} else
|
|
786
|
+
}), q.innerHTML = O(e.radioColor, e)), ca.appendChild(q))
|
|
787
|
+
} else ca.textContent = ha, e.pointer?.startsWith("question_") || e.pointer?.startsWith("checkbox_") || "checkbox" === e.pointer || (q = S.querySelector("option:checked"), !0 === e.tag && q && q.getAttribute("tag") && (q = q.getAttribute("tag"), ha = document.createElement("span"), da = e.tagStyle || {}, na = e.tagMap || {}, ka = {
|
|
775
788
|
position: "absolute",
|
|
776
789
|
right: "radio" === e.pointer ? "40px" : "30px",
|
|
777
790
|
top: "50%",
|
|
778
791
|
transform: "translateY(-50%)",
|
|
779
|
-
color:
|
|
780
|
-
fontSize:
|
|
792
|
+
color: da.color || e.tagColor || "#666",
|
|
793
|
+
fontSize: da.fontSize || "12px",
|
|
781
794
|
margin: e.tagMargin
|
|
782
|
-
},
|
|
783
|
-
var ra = document.createElement("div");
|
|
784
|
-
ra.className = e.optionsClass;
|
|
785
|
-
ra.style.display = "none";
|
|
786
|
-
ra.style.width = "100%";
|
|
787
|
-
ra.style.boxSizing = "border-box";
|
|
788
|
-
"100%" === G ? (U.style.width = G, U.style.boxSizing =
|
|
789
|
-
"border-box", setTimeout(() => {
|
|
790
|
-
const c = parseInt(window.getComputedStyle(U).paddingLeft) + parseInt(window.getComputedStyle(U).paddingRight);
|
|
791
|
-
aa.style.width = `calc(100% - ${c}px)`;
|
|
792
|
-
ra.style.width = `calc(100% - ${c}px)`
|
|
793
|
-
}, 0)) : G && (U.style.width = G);
|
|
795
|
+
}, da.padding && (ka.padding = da.padding), da.borderRadius && (ka.borderRadius = da.borderRadius), da.fontWeight && (ka.fontWeight = da.fontWeight), na[q] && (ka.backgroundColor = na[q]), Object.assign(ha.style, ka), ha.textContent = q, ca.appendChild(ha)));
|
|
794
796
|
var sa = document.createElement("div");
|
|
795
|
-
sa.
|
|
796
|
-
sa.style.
|
|
797
|
+
sa.className = e.optionsClass;
|
|
798
|
+
sa.style.display = "none";
|
|
797
799
|
sa.style.width = "100%";
|
|
798
|
-
sa.
|
|
800
|
+
sa.style.boxSizing = "border-box";
|
|
801
|
+
"100%" === G ? (V.style.width = G, V.style.boxSizing =
|
|
802
|
+
"border-box", setTimeout(() => {
|
|
803
|
+
const c = parseInt(window.getComputedStyle(V).paddingLeft) + parseInt(window.getComputedStyle(V).paddingRight);
|
|
804
|
+
ca.style.width = `calc(100% - ${c}px)`;
|
|
805
|
+
sa.style.width = `calc(100% - ${c}px)`
|
|
806
|
+
}, 0)) : G && (V.style.width = G);
|
|
807
|
+
var ta = document.createElement("div");
|
|
808
|
+
ta.style.overflowY = "auto";
|
|
809
|
+
ta.style.overflowX = "hidden";
|
|
810
|
+
ta.style.width = "100%";
|
|
811
|
+
ta.addEventListener("touchmove", function(c) {
|
|
799
812
|
c.stopPropagation()
|
|
800
813
|
}, {
|
|
801
814
|
passive: !0
|
|
802
815
|
});
|
|
803
|
-
Object.assign(
|
|
816
|
+
Object.assign(ta.style, {
|
|
804
817
|
userSelect: "none",
|
|
805
818
|
webkitUserSelect: "none",
|
|
806
819
|
mozUserSelect: "none",
|
|
807
820
|
msUserSelect: "none",
|
|
808
821
|
WebkitTouchCallout: "none"
|
|
809
822
|
});
|
|
810
|
-
Object.assign(
|
|
823
|
+
Object.assign(ca.style, {
|
|
811
824
|
whiteSpace: "nowrap",
|
|
812
825
|
overflow: "hidden",
|
|
813
826
|
textOverflow: "ellipsis",
|
|
@@ -819,37 +832,40 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
819
832
|
msUserSelect: "none",
|
|
820
833
|
WebkitTouchCallout: "none"
|
|
821
834
|
});
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
G =
|
|
825
|
-
|
|
835
|
+
pa && (ta.style.maxHeight = pa);
|
|
836
|
+
sa.appendChild(ta);
|
|
837
|
+
G = m() && !e.slideToggle;
|
|
838
|
+
pa = e.slideToggle ? {} : {
|
|
839
|
+
top: "-9999px",
|
|
840
|
+
left: "-9999px",
|
|
841
|
+
visibility: "hidden"
|
|
842
|
+
};
|
|
843
|
+
e._hasBeenShown = !1;
|
|
844
|
+
fa(sa, {
|
|
826
845
|
...e.optionsStyle,
|
|
827
|
-
position: e.slideToggle ?
|
|
846
|
+
position: e.slideToggle ?
|
|
847
|
+
"static" : "absolute",
|
|
828
848
|
zIndex: G ? "10000" : "1000",
|
|
829
|
-
...
|
|
830
|
-
top: "-9999px",
|
|
831
|
-
left: "-9999px",
|
|
832
|
-
visibility: "hidden"
|
|
833
|
-
})
|
|
849
|
+
...pa
|
|
834
850
|
});
|
|
835
851
|
var ua = {},
|
|
836
|
-
f = e.optionStyle?.padding ?
|
|
837
|
-
Array.from(
|
|
852
|
+
f = e.optionStyle?.padding ? B(e.optionStyle.padding) : "10px";
|
|
853
|
+
Array.from(S.options || g.children).forEach((c, b) => {
|
|
838
854
|
const a = document.createElement("div");
|
|
839
855
|
a.className = e.optionClass;
|
|
840
|
-
var h = function(
|
|
856
|
+
var h = function(n) {
|
|
841
857
|
let L = 0;
|
|
842
|
-
const J =
|
|
858
|
+
const J = n.className ? n.className.split(" ") : [];
|
|
843
859
|
if (0 === J.length) return L;
|
|
844
|
-
let
|
|
860
|
+
let D = J[0],
|
|
845
861
|
r = !0;
|
|
846
|
-
for (; r;) r = !1, Array.from(
|
|
847
|
-
F.hasAttribute("group") && F.getAttribute("group") ===
|
|
862
|
+
for (; r;) r = !1, Array.from(S.options || n.children).forEach(F => {
|
|
863
|
+
F.hasAttribute("group") && F.getAttribute("group") === D && (L++, F.className && (D = F.className.split(" ")[0],
|
|
864
|
+
r = !0))
|
|
848
865
|
});
|
|
849
866
|
return L
|
|
850
867
|
}(c);
|
|
851
|
-
a.setAttribute("data-level",
|
|
852
|
-
h);
|
|
868
|
+
a.setAttribute("data-level", h);
|
|
853
869
|
h = c.getAttribute("group");
|
|
854
870
|
var d = c.className;
|
|
855
871
|
if (c.hasAttribute("group") || "true" === c.getAttribute("data-is-group")) {
|
|
@@ -857,15 +873,15 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
857
873
|
a.setAttribute("data-group", h);
|
|
858
874
|
var k = f;
|
|
859
875
|
if (d) {
|
|
860
|
-
var
|
|
861
|
-
ua[
|
|
876
|
+
var u = d.split(" ")[0];
|
|
877
|
+
ua[u] && (u = parseFloat(ua[u]), isNaN(u) || (k = u + 10 + "px"))
|
|
862
878
|
}
|
|
863
879
|
h && (ua[h] = k);
|
|
864
880
|
k = document.createElement("div");
|
|
865
881
|
k.className = "custom-group-arrow";
|
|
866
|
-
|
|
867
|
-
let
|
|
868
|
-
L =
|
|
882
|
+
u = aa(e);
|
|
883
|
+
let n = u.arrowSizeValue,
|
|
884
|
+
L = u.arrowRightValue;
|
|
869
885
|
Object.assign(k.style, {
|
|
870
886
|
position: "absolute",
|
|
871
887
|
right: L,
|
|
@@ -873,16 +889,16 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
873
889
|
transform: "translateY(-50%) rotate(0deg)",
|
|
874
890
|
width: "0",
|
|
875
891
|
height: "0",
|
|
876
|
-
borderLeft: `${
|
|
877
|
-
borderRight: `${
|
|
878
|
-
borderTop: `${
|
|
892
|
+
borderLeft: `${n} solid transparent`,
|
|
893
|
+
borderRight: `${n} solid transparent`,
|
|
894
|
+
borderTop: `${n} solid ${u.arrowColorValue}`,
|
|
879
895
|
transition: "all 0.3s ease"
|
|
880
896
|
});
|
|
881
897
|
a.appendChild(k);
|
|
882
898
|
k = () => {
|
|
883
|
-
const J = parseFloat(
|
|
884
|
-
|
|
885
|
-
isNaN(J) || isNaN(
|
|
899
|
+
const J = parseFloat(n),
|
|
900
|
+
D = parseFloat(L);
|
|
901
|
+
isNaN(J) || isNaN(D) || a.style.setProperty("padding-right", `${2*J+D+10}px`, "important")
|
|
886
902
|
};
|
|
887
903
|
k();
|
|
888
904
|
a._updateGroupPadding = k;
|
|
@@ -890,52 +906,52 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
890
906
|
a.style.overflow = "hidden";
|
|
891
907
|
a.style.textOverflow = "ellipsis"
|
|
892
908
|
}
|
|
893
|
-
d && d.split(" ").forEach(
|
|
894
|
-
|
|
895
|
-
a.classList.add(
|
|
909
|
+
d && d.split(" ").forEach(n => {
|
|
910
|
+
n &&
|
|
911
|
+
n.trim() && (a.classList.add("child-option"), a.classList.add(n))
|
|
896
912
|
});
|
|
897
913
|
a.setAttribute("data-value", c.value || c.getAttribute("value") || "");
|
|
898
914
|
k = {
|
|
899
915
|
...e.optionStyle
|
|
900
916
|
};
|
|
901
|
-
if ((
|
|
902
|
-
const
|
|
903
|
-
2 ===
|
|
917
|
+
if ((u = a.classList.contains("child-option")) && k.padding) {
|
|
918
|
+
const n = k.padding.split(" ");
|
|
919
|
+
2 === n.length ? (k.paddingTop = n[0], k.paddingBottom = n[0], k.paddingRight = n[1], delete k.padding) : 4 === n.length && (k.paddingTop = n[0], k.paddingRight = n[1], k.paddingBottom = n[2], delete k.padding)
|
|
904
920
|
}
|
|
905
|
-
|
|
921
|
+
fa(a, {
|
|
906
922
|
...k,
|
|
907
923
|
position: "relative",
|
|
908
924
|
paddingRight: c.getAttribute("tag") ? "100px" : "40px"
|
|
909
925
|
});
|
|
910
|
-
a.classList.contains("group-option") && h &&
|
|
911
|
-
|
|
912
|
-
v && !a.classList.contains("group-option") && d && (k = d.split(" ")[0], d = f, ua[k] && (k = parseFloat(ua[k]), isNaN(k) || (d = k + 10 + "px")), a.style.setProperty("padding-left", d, "important"));
|
|
926
|
+
a.classList.contains("group-option") && h && ua[h] && a.style.setProperty("padding-left", ua[h], "important");
|
|
927
|
+
u && !a.classList.contains("group-option") && d && (k = d.split(" ")[0], d = f, ua[k] && (k = parseFloat(ua[k]), isNaN(k) || (d = k + 10 + "px")), a.style.setProperty("padding-left", d, "important"));
|
|
913
928
|
a.classList.contains("group-option") && a._updateGroupPadding && a._updateGroupPadding();
|
|
914
929
|
a.style.whiteSpace = "nowrap";
|
|
915
930
|
a.style.overflow = "hidden";
|
|
916
931
|
a.style.textOverflow = "ellipsis";
|
|
917
|
-
b ===
|
|
918
|
-
!e.dot ||
|
|
919
|
-
c.hasAttribute("group") || c.getAttribute("data-is-group") || a.querySelector(".custom-dot") || (b = document.createElement("div"), b.className = "custom-dot", Object.assign(b.style, e.dotStyle), (c.selected || c.hasAttribute("selected")) && Object.assign(b.style, e.dotSelectedStyle), e.pointer && (b.style.right = "40px"), a.appendChild(b));
|
|
932
|
+
b === S.options.length - 1 && (a.style.borderBottom = "none");
|
|
933
|
+
!e.dot ||
|
|
934
|
+
e.pointer?.startsWith("question_") || c.hasAttribute("group") || c.getAttribute("data-is-group") || a.querySelector(".custom-dot") || (b = document.createElement("div"), b.className = "custom-dot", Object.assign(b.style, e.dotStyle), (c.selected || c.hasAttribute("selected")) && Object.assign(b.style, e.dotSelectedStyle), e.pointer && (b.style.right = "40px"), a.appendChild(b));
|
|
920
935
|
c.hasAttribute("img") && (b = c.getAttribute("img"), Object.assign(a.style, {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
936
|
+
backgroundImage: `url(${b})`,
|
|
937
|
+
backgroundRepeat: "no-repeat"
|
|
938
|
+
}), b = new ResizeObserver(n => {
|
|
939
|
+
const L = n[0].contentRect.height;
|
|
940
|
+
if (0 < L) {
|
|
941
|
+
var J = $(n[0].target);
|
|
942
|
+
J.hasClass("child-option") ? (J = 20 * (parseInt(J.attr("data-level")) || 1), n[0].target.style.setProperty("--image-size", L + 8 + "px"), Object.assign(n[0].target.style, {
|
|
943
|
+
backgroundSize: `${L}px`,
|
|
944
|
+
backgroundPosition: `${J}px center`,
|
|
945
|
+
paddingLeft: `${J+1.5*L}px`
|
|
946
|
+
})) : Object.assign(n[0].target.style, {
|
|
947
|
+
backgroundSize: `${L}px`,
|
|
948
|
+
backgroundPosition: "15px center",
|
|
949
|
+
paddingLeft: `${2*L}px`
|
|
950
|
+
})
|
|
951
|
+
}
|
|
952
|
+
}), b.observe(a), window._resizeObservers || (window._resizeObservers = new WeakMap),
|
|
953
|
+
window._resizeObservers.set(a, b));
|
|
954
|
+
if (b = c.getAttribute("tag")) d = e.tagStyle || {}, k = e.tagMap || {}, u = {
|
|
939
955
|
position: "absolute",
|
|
940
956
|
right: e.pointer ? "40px" : "30px",
|
|
941
957
|
top: "50%",
|
|
@@ -943,91 +959,92 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
943
959
|
color: d.color || e.tagColor || "#666",
|
|
944
960
|
fontSize: d.fontSize || "12px",
|
|
945
961
|
margin: e.tagMargin
|
|
946
|
-
}, d.padding && (
|
|
947
|
-
"checkbox" !==
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
display: "block",
|
|
955
|
-
width: e.checkboxSize,
|
|
956
|
-
height: e.checkboxSize
|
|
957
|
-
}), b && (d.innerHTML = V(e.checkboxSize)), a.appendChild(d));
|
|
958
|
-
"radio" !== e.pointer || h || (a.style.position = "relative", a.style.paddingRight = "40px", b = document.createElement("div"), b.className = "custom-radio", Object.assign(b.style, {
|
|
959
|
-
...da(),
|
|
960
|
-
border: `2px solid ${e.buttonColor}`,
|
|
961
|
-
borderRadius: "50%",
|
|
962
|
-
backgroundColor: "#fff",
|
|
962
|
+
}, d.padding && (u.padding = d.padding), d.borderRadius && (u.borderRadius = d.borderRadius), d.fontWeight && (u.fontWeight = d.fontWeight), k[b] && (u.backgroundColor = k[b]), d = $("<span>").css(u), e.allowHTML ? d.html(b) : d.text(b), a.appendChild(d[0]);
|
|
963
|
+
"checkbox" !==
|
|
964
|
+
e.pointer && !e.pointer?.startsWith("checkbox_") || c.hasAttribute("group") || "true" === c.getAttribute("data-is-group") || a.classList.contains("group-option") || (a.style.position = "relative", a.style.paddingRight = "40px", b = c.selected || c.hasAttribute("selected"), a.setAttribute("data-checked", b ? "true" : "false"), d = document.createElement("div"), d.className = "custom-checkbox option-checkbox", Object.assign(d.style, {
|
|
965
|
+
...W(),
|
|
966
|
+
border: b ? `2px solid ${e.checkboxColor}` : `2px solid ${e.buttonColor}`,
|
|
967
|
+
borderRadius: "3px",
|
|
968
|
+
backgroundColor: b ?
|
|
969
|
+
e.checkboxColor : "#fff",
|
|
963
970
|
zIndex: "2",
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
971
|
+
display: "block",
|
|
972
|
+
width: e.checkboxSize,
|
|
973
|
+
height: e.checkboxSize
|
|
974
|
+
}), b && (d.innerHTML = E(e.checkboxSize)), a.appendChild(d));
|
|
975
|
+
"radio" !== e.pointer || h || (a.style.position = "relative", a.style.paddingRight = "40px", b = document.createElement("div"), b.className = "custom-radio", Object.assign(b.style, {
|
|
976
|
+
...W(),
|
|
977
|
+
border: `2px solid ${e.buttonColor}`,
|
|
978
|
+
borderRadius: "50%",
|
|
979
|
+
backgroundColor: "#fff",
|
|
980
|
+
zIndex: "2",
|
|
981
|
+
width: e.radioSize,
|
|
982
|
+
height: e.radioSize
|
|
983
|
+
}), (c.selected || c.hasAttribute("selected")) && (c.value || c.getAttribute("value")) &&
|
|
984
|
+
(Object.assign(b.style, {
|
|
967
985
|
border: `2px solid ${e.radioColor}`
|
|
968
|
-
}),
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
}), a.appendChild(b));
|
|
986
|
+
}), b.innerHTML = O(e.radioColor, e)), (c.disabled || c.hasAttribute("disabled")) && Object.assign(b.style, {
|
|
987
|
+
border: `2px solid ${e.buttonColor}`,
|
|
988
|
+
backgroundColor: "#f5f5f5",
|
|
989
|
+
cursor: "not-allowed"
|
|
990
|
+
}), a.appendChild(b));
|
|
974
991
|
e.pointer && e.pointer.startsWith("question_") && !h && (b = document.createElement("div"), b.className = "custom-question option-question", Object.assign(b.style, e.questionStyle), b.innerHTML = "?", a.appendChild(b));
|
|
975
|
-
e.allowHTML ? (b = c.innerHTML, b = b.replace(/\x3c!--([\s\S]*?)--\x3e/g,
|
|
976
|
-
b)) : a.insertAdjacentText("afterbegin", c.textContent);
|
|
977
|
-
!c.disabled && !c.hasAttribute("disabled") || h || (a.classList.add("disabled"),
|
|
978
|
-
!c.selected && !c.hasAttribute("selected") || h || (a.classList.add("selected"),
|
|
979
|
-
|
|
992
|
+
e.allowHTML ? (b = c.innerHTML, b = b.replace(/\x3c!--([\s\S]*?)--\x3e/g,
|
|
993
|
+
(n, L) => L.trim()), a.insertAdjacentHTML("afterbegin", b)) : a.insertAdjacentText("afterbegin", c.textContent);
|
|
994
|
+
!c.disabled && !c.hasAttribute("disabled") || h || (a.classList.add("disabled"), fa(a, e.disabledStyle));
|
|
995
|
+
!c.selected && !c.hasAttribute("selected") || h || (a.classList.add("selected"), fa(a, e.selectedOptionStyle));
|
|
996
|
+
ta.appendChild(a)
|
|
980
997
|
});
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
e.scrollColor && (
|
|
985
|
-
|
|
986
|
-
G =
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
G ?
|
|
990
|
-
|
|
991
|
-
if ($(
|
|
998
|
+
z.appendChild(ca);
|
|
999
|
+
V.appendChild(z);
|
|
1000
|
+
V.appendChild(sa);
|
|
1001
|
+
e.scrollColor && (V.id || (V.id = "select-scroll-" + Math.random().toString(36).substr(2, 9)), Ba($(V), e));
|
|
1002
|
+
z = S.parentNode;
|
|
1003
|
+
G = S.nextSibling;
|
|
1004
|
+
S.style.display = "none";
|
|
1005
|
+
V.insertBefore(S, V.firstChild);
|
|
1006
|
+
G ? z.insertBefore(V, G) : z.appendChild(V);
|
|
1007
|
+
S._needsExpandGroup && (setTimeout(() => {
|
|
1008
|
+
if ($(V).find(`[class*="-option"][data-value="${za.value}"]`).length) {
|
|
992
1009
|
const c = za.className?.split(" ") || [],
|
|
993
1010
|
b = new Set;
|
|
994
1011
|
|
|
995
1012
|
function a(h) {
|
|
996
1013
|
if (h && !b.has(h)) {
|
|
997
1014
|
b.add(h);
|
|
998
|
-
var d = $(
|
|
999
|
-
d.length && (d.addClass("expanded"), d.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), $(
|
|
1015
|
+
var d = $(V).find(`[data-group="${h}"]`);
|
|
1016
|
+
d.length && (d.addClass("expanded"), d.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), $(V).find(`.${h}`).show(), (d.attr("class")?.split(" ") || []).forEach(k => {
|
|
1000
1017
|
"group-option" !== k && "expanded" !== k && a(k)
|
|
1001
1018
|
}))
|
|
1002
1019
|
}
|
|
1003
1020
|
}
|
|
1004
1021
|
c.forEach(h => a(h))
|
|
1005
1022
|
}
|
|
1006
|
-
}, 0), delete
|
|
1007
|
-
$(
|
|
1023
|
+
}, 0), delete S._needsExpandGroup);
|
|
1024
|
+
$(V).data("isTriggeredOnce", !1);
|
|
1008
1025
|
!0 === e.onclick && setTimeout(() => {
|
|
1009
|
-
const c = $(
|
|
1010
|
-
$(
|
|
1026
|
+
const c = $(V).find(`.${e.triggerClass}`);
|
|
1027
|
+
$(V).data("isInitialOpen", !0);
|
|
1011
1028
|
c.trigger("click")
|
|
1012
1029
|
}, 0);
|
|
1013
|
-
|
|
1014
|
-
|
|
1030
|
+
V.setAttribute("data-duration", w);
|
|
1031
|
+
V.setAttribute("data-slide-toggle", e.slideToggle)
|
|
1015
1032
|
}
|
|
1016
1033
|
});
|
|
1017
1034
|
if (!window._gong_tea_yun_2) {
|
|
1018
1035
|
window._gong_tea_yun_2 = !0;
|
|
1019
1036
|
let g = !1,
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1037
|
+
B = !1,
|
|
1038
|
+
z = !1,
|
|
1039
|
+
q = !1,
|
|
1023
1040
|
G = null,
|
|
1024
1041
|
e = !1,
|
|
1025
|
-
|
|
1042
|
+
S = !1;
|
|
1026
1043
|
$(document).on("mousedown", '[class*="-wrapper"], [class*="-trigger"], [class*="-options"], [class*="-option"]',
|
|
1027
1044
|
function(f) {
|
|
1028
1045
|
f.stopPropagation();
|
|
1029
|
-
|
|
1030
|
-
|
|
1046
|
+
z = B = !0;
|
|
1047
|
+
V = !1;
|
|
1031
1048
|
e = !0;
|
|
1032
1049
|
window._isMouseDown_gong = !0;
|
|
1033
1050
|
f = $(this).closest('[class*="-wrapper"]');
|
|
@@ -1035,13 +1052,13 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1035
1052
|
});
|
|
1036
1053
|
$(document).on("mouseup", function(f) {
|
|
1037
1054
|
window._isMouseDown_gong = !1;
|
|
1038
|
-
if (
|
|
1039
|
-
var c =
|
|
1055
|
+
if (B) {
|
|
1056
|
+
var c = z,
|
|
1040
1057
|
b = 0 < $(f.target).closest('[class*="-wrapper"]').length;
|
|
1041
|
-
|
|
1042
|
-
c &&
|
|
1058
|
+
z = B = !1;
|
|
1059
|
+
c && S && b && (f.stopPropagation(), f.preventDefault(), $(f.target).closest('[class*="-wrapper"]'));
|
|
1043
1060
|
window._gong_tea_yun_3 = null;
|
|
1044
|
-
|
|
1061
|
+
S = !1;
|
|
1045
1062
|
setTimeout(() => {
|
|
1046
1063
|
e = !1
|
|
1047
1064
|
}, 300)
|
|
@@ -1082,12 +1099,12 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1082
1099
|
k.outerHeight();
|
|
1083
1100
|
c.find(`.${b.optionClass}`).removeClass(b.highlightedClass);
|
|
1084
1101
|
c.find(`.${b.optionClass}`).each(function() {
|
|
1085
|
-
const
|
|
1086
|
-
if (
|
|
1087
|
-
var
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
} else
|
|
1102
|
+
const u = $(this);
|
|
1103
|
+
if (u.hasClass("selected") && b.selectedBg) {
|
|
1104
|
+
var n = !0 === b.selectedBg ? rgbToRgba(b.activeBackground, .5) : b.selectedBg;
|
|
1105
|
+
u.attr("style", (u.attr("style") || "") + `; background-color: ${n} !important;`);
|
|
1106
|
+
u.css("opacity", "1")
|
|
1107
|
+
} else n = (u.attr("style") || "").replace(/background-color:[^;]+;?/g, ""), u.attr("style", n)
|
|
1091
1108
|
});
|
|
1092
1109
|
k.length ? (c = d.index(k),
|
|
1093
1110
|
k = f ? d.eq(Math.max(0, c - 1)) : c < d.length - 1 ? d.eq(c + 1) : k) : k = d.first();
|
|
@@ -1128,15 +1145,15 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1128
1145
|
}, 0)))
|
|
1129
1146
|
}
|
|
1130
1147
|
});
|
|
1131
|
-
let
|
|
1148
|
+
let V = !1;
|
|
1132
1149
|
$(document).on("mousemove", '[class*="-wrapper"]', function(f) {
|
|
1133
|
-
|
|
1150
|
+
B && z && (V = !0)
|
|
1134
1151
|
});
|
|
1135
|
-
let
|
|
1152
|
+
let ca = null;
|
|
1136
1153
|
$(document).on("touchstart", '[class*="-option"]', function(f) {
|
|
1137
|
-
|
|
1154
|
+
ca && clearTimeout(ca);
|
|
1138
1155
|
const c = $(this);
|
|
1139
|
-
|
|
1156
|
+
q = !0;
|
|
1140
1157
|
if (c.hasClass("disabled")) G = null;
|
|
1141
1158
|
else {
|
|
1142
1159
|
var b = c.closest('[class*="-wrapper"]'),
|
|
@@ -1148,7 +1165,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1148
1165
|
var d = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg;
|
|
1149
1166
|
h.attr("style", (h.attr("style") || "") + `; background-color: ${d} !important;`)
|
|
1150
1167
|
} else d = (h.attr("style") || "").replace(/background-color:[^;]+;?/g, ""), h.attr("style", d)
|
|
1151
|
-
}),
|
|
1168
|
+
}), ca = setTimeout(() => {
|
|
1152
1169
|
if (G === this)
|
|
1153
1170
|
if (c.hasClass("selected") && a.selectedBg) c.css("opacity", "0.7");
|
|
1154
1171
|
else if (c.addClass(a.highlightedClass),
|
|
@@ -1160,7 +1177,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1160
1177
|
}
|
|
1161
1178
|
});
|
|
1162
1179
|
$(document).on("touchend", function() {
|
|
1163
|
-
if (
|
|
1180
|
+
if (q) {
|
|
1164
1181
|
if (G) {
|
|
1165
1182
|
const f = $(G).closest('[class*="-wrapper"]'),
|
|
1166
1183
|
c = f.data("settings");
|
|
@@ -1173,7 +1190,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1173
1190
|
} else a = (b.attr("style") || "").replace(/background-color:[^;]+;?/g, ""), b.attr("style", a)
|
|
1174
1191
|
}))
|
|
1175
1192
|
}
|
|
1176
|
-
|
|
1193
|
+
q = !1;
|
|
1177
1194
|
G = null
|
|
1178
1195
|
}
|
|
1179
1196
|
});
|
|
@@ -1183,18 +1200,18 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1183
1200
|
});
|
|
1184
1201
|
$(document).on("click", "[data-group]", function(f) {
|
|
1185
1202
|
function c(r) {
|
|
1186
|
-
function F(
|
|
1203
|
+
function F(v) {
|
|
1187
1204
|
a.find("." +
|
|
1188
|
-
|
|
1189
|
-
var
|
|
1190
|
-
|
|
1191
|
-
if (
|
|
1205
|
+
v).each(function() {
|
|
1206
|
+
var C = $(this);
|
|
1207
|
+
t.add(this);
|
|
1208
|
+
if (C.attr("group") || C.data("group")) C = C.attr("group") || C.data("group"), F(C)
|
|
1192
1209
|
})
|
|
1193
1210
|
}
|
|
1194
|
-
const
|
|
1211
|
+
const t = new Set;
|
|
1195
1212
|
r = r.data("group");
|
|
1196
1213
|
F(r);
|
|
1197
|
-
return
|
|
1214
|
+
return t
|
|
1198
1215
|
}
|
|
1199
1216
|
f.preventDefault();
|
|
1200
1217
|
f.stopPropagation();
|
|
@@ -1204,8 +1221,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1204
1221
|
h = a.find("div").first(),
|
|
1205
1222
|
d = b.data("settings"),
|
|
1206
1223
|
k = parseInt(b.attr("data-duration")),
|
|
1207
|
-
|
|
1208
|
-
|
|
1224
|
+
u = m() ? a : h,
|
|
1225
|
+
n = m() ? u.scrollTop() : null,
|
|
1209
1226
|
L = () => {
|
|
1210
1227
|
window._heightCache || (window._heightCache = new Map);
|
|
1211
1228
|
let r = 0;
|
|
@@ -1213,25 +1230,25 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1213
1230
|
a.find("li, option").each(function() {
|
|
1214
1231
|
"none" !== $(this).css("display") && F.push(this)
|
|
1215
1232
|
});
|
|
1216
|
-
F.forEach(
|
|
1217
|
-
const
|
|
1218
|
-
var
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
r +=
|
|
1233
|
+
F.forEach(t => {
|
|
1234
|
+
const v = $(t);
|
|
1235
|
+
var C = t.id || v.data("height-id");
|
|
1236
|
+
t = window._heightCache.get(C);
|
|
1237
|
+
t || (t = v.outerHeight(!0), C ? window._heightCache.set(C, t) : (C = "height-" + Math.random().toString(36).substr(2, 9), v.data("height-id", C), window._heightCache.set(C, t)));
|
|
1238
|
+
r += t
|
|
1222
1239
|
});
|
|
1223
1240
|
requestAnimationFrame(() => {
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1241
|
+
const t = Math.min(r, d.Mheight),
|
|
1242
|
+
v = d.optionsStyle.background || "#fff";
|
|
1226
1243
|
h.css({
|
|
1227
|
-
height:
|
|
1244
|
+
height: t,
|
|
1228
1245
|
overflowY: "auto",
|
|
1229
1246
|
WebkitOverflowScrolling: "touch",
|
|
1230
|
-
backgroundColor:
|
|
1247
|
+
backgroundColor: v
|
|
1231
1248
|
});
|
|
1232
1249
|
a.css({
|
|
1233
|
-
height:
|
|
1234
|
-
backgroundColor:
|
|
1250
|
+
height: t,
|
|
1251
|
+
backgroundColor: v
|
|
1235
1252
|
})
|
|
1236
1253
|
});
|
|
1237
1254
|
1E3 < window._heightCache.size && window._heightCache.clear()
|
|
@@ -1239,39 +1256,39 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1239
1256
|
J = $(this).data("group");
|
|
1240
1257
|
f = $(this).hasClass("expanded");
|
|
1241
1258
|
$(this).toggleClass("expanded");
|
|
1242
|
-
var
|
|
1259
|
+
var D = $(this).find(".custom-group-arrow");
|
|
1243
1260
|
if (f) {
|
|
1244
|
-
|
|
1261
|
+
D.css("transform", "translateY(-50%) rotate(0deg)");
|
|
1245
1262
|
f = c($(this));
|
|
1246
1263
|
const r = {};
|
|
1247
|
-
f.forEach(
|
|
1248
|
-
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1264
|
+
f.forEach(v => {
|
|
1265
|
+
v = $(v);
|
|
1266
|
+
const C = v.attr("group") || v.data("group");
|
|
1267
|
+
C && C !== J && (r[C] = v.hasClass("expanded"))
|
|
1251
1268
|
});
|
|
1252
1269
|
$(this).data("childStates", r);
|
|
1253
1270
|
const F = new Set(f);
|
|
1254
|
-
f.forEach(
|
|
1255
|
-
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1258
|
-
const
|
|
1259
|
-
return (
|
|
1271
|
+
f.forEach(v => {
|
|
1272
|
+
v = $(v);
|
|
1273
|
+
const C = v.attr("group") || v.data("group");
|
|
1274
|
+
C && C !== J && a.find("." + C).filter(function() {
|
|
1275
|
+
const ba = $(this);
|
|
1276
|
+
return (ba.attr("group") || ba.data("group")) !== C
|
|
1260
1277
|
}).each(function() {
|
|
1261
1278
|
F.add(this)
|
|
1262
1279
|
})
|
|
1263
1280
|
});
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
if (
|
|
1268
|
-
|
|
1281
|
+
const t = Array.from(F);
|
|
1282
|
+
t.forEach(v => {
|
|
1283
|
+
v = $(v);
|
|
1284
|
+
if (v.attr("group") || v.data("group")) v.removeClass("expanded"), v.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(0deg)");
|
|
1285
|
+
v.css("opacity", "0.1")
|
|
1269
1286
|
});
|
|
1270
|
-
0 <
|
|
1287
|
+
0 < t.length && $(t).slideUp(k, {
|
|
1271
1288
|
useQueue: !1
|
|
1272
1289
|
}, function() {
|
|
1273
|
-
|
|
1274
|
-
$(
|
|
1290
|
+
t.forEach(v => {
|
|
1291
|
+
$(v).css({
|
|
1275
1292
|
opacity: "1",
|
|
1276
1293
|
display: "none"
|
|
1277
1294
|
})
|
|
@@ -1279,30 +1296,30 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1279
1296
|
L()
|
|
1280
1297
|
})
|
|
1281
1298
|
} else {
|
|
1282
|
-
|
|
1299
|
+
D.css("transform",
|
|
1283
1300
|
"translateY(-50%) rotate(180deg)");
|
|
1284
|
-
|
|
1301
|
+
D = a.find("." + J);
|
|
1285
1302
|
f = !$(this).closest("li").hasClass(J);
|
|
1286
1303
|
const r = $(this).data("childStates"),
|
|
1287
1304
|
F = [];
|
|
1288
|
-
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1291
|
-
return
|
|
1292
|
-
$element:
|
|
1293
|
-
groupName:
|
|
1294
|
-
wasExpanded: r && r[
|
|
1305
|
+
D = D.filter(function() {
|
|
1306
|
+
const t = $(this),
|
|
1307
|
+
v = t.attr("group") || t.data("group");
|
|
1308
|
+
return v && v !== J ? (F.push({
|
|
1309
|
+
$element: t,
|
|
1310
|
+
groupName: v,
|
|
1311
|
+
wasExpanded: r && r[v] || !1
|
|
1295
1312
|
}), !1) : !0
|
|
1296
1313
|
});
|
|
1297
|
-
F.forEach(function(
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1314
|
+
F.forEach(function(t) {
|
|
1315
|
+
t = t.$element;
|
|
1316
|
+
t.show();
|
|
1317
|
+
t.css("opacity", "1");
|
|
1318
|
+
t[0] && t[0].style && t[0].style.setProperty("opacity", "1", "important")
|
|
1302
1319
|
});
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
0 <
|
|
1320
|
+
D.show();
|
|
1321
|
+
D.hide();
|
|
1322
|
+
0 < D.length && D.css("opacity", "0.1").slideDown(k, {
|
|
1306
1323
|
useQueue: !1
|
|
1307
1324
|
}, function() {
|
|
1308
1325
|
$(this).css("opacity",
|
|
@@ -1310,32 +1327,33 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1310
1327
|
this.style && this.style.setProperty("opacity", "1", "important");
|
|
1311
1328
|
L()
|
|
1312
1329
|
});
|
|
1313
|
-
f && !
|
|
1330
|
+
f && !m() ? (f = 0 < D.length ? D.first().outerHeight() : 0, D = u[0] || u, u.animate && "function" === typeof u.animate ? u.animate({
|
|
1314
1331
|
scrollTop: f
|
|
1315
|
-
}, k) :
|
|
1332
|
+
}, k) : D && "function" === typeof D.scrollTo ? D.scrollTo({
|
|
1316
1333
|
top: f,
|
|
1317
1334
|
behavior: "smooth"
|
|
1318
|
-
}) :
|
|
1319
|
-
|
|
1335
|
+
}) : D && (D.scrollTop = f)) : f && m() && null !== n && setTimeout(() => {
|
|
1336
|
+
u.scrollTop(n)
|
|
1320
1337
|
}, k + 50);
|
|
1321
|
-
F.forEach(function(
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
const
|
|
1329
|
-
return (
|
|
1338
|
+
F.forEach(function(t) {
|
|
1339
|
+
const v = t.$element,
|
|
1340
|
+
C = t.groupName;
|
|
1341
|
+
t = t.wasExpanded;
|
|
1342
|
+
v.css("opacity", "1");
|
|
1343
|
+
v[0] && v[0].style && v[0].style.setProperty("opacity", "1", "important");
|
|
1344
|
+
t ? (v.addClass("expanded").find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), a.find("." + C).filter(function() {
|
|
1345
|
+
const ba = $(this);
|
|
1346
|
+
return (ba.attr("group") || ba.data("group")) !== C
|
|
1330
1347
|
}).css("opacity", "0.1").slideDown(k, {
|
|
1331
1348
|
useQueue: !1
|
|
1332
1349
|
}, function() {
|
|
1333
1350
|
$(this).css("opacity", "1");
|
|
1334
1351
|
this.style && this.style.setProperty("opacity", "1", "important");
|
|
1335
1352
|
L()
|
|
1336
|
-
})) : (
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1353
|
+
})) : (v.removeClass("expanded").find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(0deg)"), a.find("." + C).filter(function() {
|
|
1354
|
+
const ba =
|
|
1355
|
+
$(this);
|
|
1356
|
+
return (ba.attr("group") || ba.data("group")) !== C
|
|
1339
1357
|
}).hide())
|
|
1340
1358
|
})
|
|
1341
1359
|
}
|
|
@@ -1346,7 +1364,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1346
1364
|
return !1
|
|
1347
1365
|
});
|
|
1348
1366
|
|
|
1349
|
-
function
|
|
1367
|
+
function pa(f, c, b, a) {
|
|
1350
1368
|
const h = b.pointer.split("_")[1],
|
|
1351
1369
|
d = h + "_return";
|
|
1352
1370
|
if ("function" === typeof window[h]) {
|
|
@@ -1354,76 +1372,76 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1354
1372
|
a = f.find("select, ul").first();
|
|
1355
1373
|
c = c.index();
|
|
1356
1374
|
var k = a.find("option").eq(c);
|
|
1357
|
-
const
|
|
1358
|
-
|
|
1359
|
-
L =
|
|
1375
|
+
const u = k.val(),
|
|
1376
|
+
n = p(k.html(), 1),
|
|
1377
|
+
L = p(k.html());
|
|
1360
1378
|
k = k.attr("tag");
|
|
1361
|
-
a =
|
|
1379
|
+
a = A(R(a[0], c).text);
|
|
1362
1380
|
window[h]({
|
|
1363
|
-
value:
|
|
1364
|
-
text:
|
|
1381
|
+
value: u,
|
|
1382
|
+
text: n,
|
|
1365
1383
|
html: L,
|
|
1366
1384
|
tag: k,
|
|
1367
1385
|
group: a,
|
|
1368
1386
|
index: c
|
|
1369
1387
|
});
|
|
1370
|
-
window[h + "_close"] =
|
|
1371
|
-
function() {
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
window[d] = function(J,
|
|
1388
|
+
window[h + "_close"] = function() {
|
|
1389
|
+
const J = $('[data-state="opened"][data-aun="true"]').filter(function() {
|
|
1390
|
+
const C = $(this).data("settings");
|
|
1391
|
+
return C && C.pointer === `question_${h}`
|
|
1392
|
+
});
|
|
1393
|
+
if (!J.length) return !1;
|
|
1394
|
+
const D = J.data("settings"),
|
|
1395
|
+
r = J.find(`.${D.optionsClass}`),
|
|
1396
|
+
F = parseInt(J.attr("data-duration")),
|
|
1397
|
+
t = m(),
|
|
1398
|
+
v = $(".select-overlay");
|
|
1399
|
+
v.css("background-color", "rgba(0, 0, 0, 0)");
|
|
1400
|
+
setTimeout(() => {
|
|
1401
|
+
v.hide()
|
|
1402
|
+
}, F);
|
|
1403
|
+
J[0].removeAttribute("data-aun");
|
|
1404
|
+
J.removeClass(D.openClass);
|
|
1405
|
+
J.attr("data-state", "closed");
|
|
1406
|
+
t && !D.slideToggle ? I(r,
|
|
1407
|
+
F, v, D) : M(r, F, D);
|
|
1408
|
+
return !0
|
|
1409
|
+
};
|
|
1410
|
+
window[d] = function(J, D, r) {
|
|
1393
1411
|
f.data("forcedClose", !0);
|
|
1394
1412
|
const F = f.find(`.${b.triggerClass}`),
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1413
|
+
t = f.find(`.${b.optionsClass}`),
|
|
1414
|
+
v = parseInt(f.attr("data-duration")),
|
|
1415
|
+
C = m(),
|
|
1416
|
+
ba = $(".select-overlay");
|
|
1417
|
+
ba.css("background-color", "rgba(0, 0, 0, 0)");
|
|
1400
1418
|
setTimeout(() => {
|
|
1401
|
-
|
|
1402
|
-
},
|
|
1419
|
+
ba.hide()
|
|
1420
|
+
}, v);
|
|
1403
1421
|
var K = "";
|
|
1404
|
-
let
|
|
1405
|
-
"function" === typeof
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
K = K ||
|
|
1422
|
+
let P = null;
|
|
1423
|
+
"function" === typeof D ? P = D : (K = D, P = r);
|
|
1424
|
+
D = J.split(": ")[1];
|
|
1425
|
+
D = f.find("select, ul").first().find(`option[value="${D}"]`);
|
|
1426
|
+
K = K || D.attr("tag");
|
|
1409
1427
|
if (b.allowHTML)
|
|
1410
1428
|
if (!0 === b.tag && K) {
|
|
1411
|
-
|
|
1429
|
+
D = b.tagStyle || {};
|
|
1412
1430
|
r = b.tagMap || {};
|
|
1413
|
-
const
|
|
1431
|
+
const qa = {
|
|
1414
1432
|
position: "absolute",
|
|
1415
1433
|
top: "50%",
|
|
1416
1434
|
transform: "translateY(-50%)",
|
|
1417
|
-
color:
|
|
1418
|
-
fontSize:
|
|
1435
|
+
color: D.color || b.tagColor || "#666",
|
|
1436
|
+
fontSize: D.fontSize || "12px",
|
|
1419
1437
|
right: "radio" === b.pointer || b.pointer.includes("question_") ? "40px" : "30px",
|
|
1420
1438
|
margin: b.tagMargin
|
|
1421
1439
|
};
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
r[K] && (
|
|
1426
|
-
K = $("<span>").css(
|
|
1440
|
+
D.padding && (qa.padding = D.padding);
|
|
1441
|
+
D.borderRadius && (qa.borderRadius = D.borderRadius);
|
|
1442
|
+
D.fontWeight && (qa.fontWeight = D.fontWeight);
|
|
1443
|
+
r[K] && (qa.backgroundColor = r[K]);
|
|
1444
|
+
K = $("<span>").css(qa).html(K);
|
|
1427
1445
|
F.html(J).append(K)
|
|
1428
1446
|
} else F.html(J);
|
|
1429
1447
|
else F.text(J);
|
|
@@ -1438,10 +1456,10 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1438
1456
|
F.append(J);
|
|
1439
1457
|
f.removeClass(b.openClass);
|
|
1440
1458
|
f.attr("data-state", "closed");
|
|
1441
|
-
|
|
1459
|
+
C && !b.slideToggle ? I(t, v, ba, b) : t.slideUp(v, {
|
|
1442
1460
|
easing: b.easing
|
|
1443
1461
|
});
|
|
1444
|
-
"function" === typeof
|
|
1462
|
+
"function" === typeof P && P();
|
|
1445
1463
|
delete window[d];
|
|
1446
1464
|
return !0
|
|
1447
1465
|
}
|
|
@@ -1459,55 +1477,55 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1459
1477
|
let h = c.find(".custom-checkbox");
|
|
1460
1478
|
const d = c[0].getBoundingClientRect(),
|
|
1461
1479
|
k = a.clientX || a.originalEvent?.touches?.[0]?.clientX,
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
if (!(h.length && h[0] ||
|
|
1480
|
+
u = a.clientY || a.originalEvent?.touches?.[0]?.clientY,
|
|
1481
|
+
n = c.hasClass("group-option") || c.attr("data-group") || c.data("group");
|
|
1482
|
+
if (!(h.length && h[0] || n)) {
|
|
1465
1483
|
c.css({
|
|
1466
1484
|
position: "relative",
|
|
1467
1485
|
paddingRight: "40px"
|
|
1468
1486
|
});
|
|
1469
1487
|
const K = document.createElement("div");
|
|
1470
1488
|
K.className = "custom-checkbox option-checkbox";
|
|
1471
|
-
const
|
|
1489
|
+
const P = "true" === c.attr("data-checked");
|
|
1472
1490
|
Object.assign(K.style, {
|
|
1473
|
-
...
|
|
1474
|
-
border:
|
|
1491
|
+
...W(),
|
|
1492
|
+
border: P ? `2px solid ${b.checkboxColor}` : `2px solid ${b.buttonColor}`,
|
|
1475
1493
|
borderRadius: "3px",
|
|
1476
|
-
backgroundColor:
|
|
1494
|
+
backgroundColor: P ? b.checkboxColor : "#fff",
|
|
1477
1495
|
zIndex: "2",
|
|
1478
1496
|
display: "block",
|
|
1479
1497
|
width: b.checkboxSize,
|
|
1480
1498
|
height: b.checkboxSize
|
|
1481
1499
|
});
|
|
1482
|
-
|
|
1500
|
+
P && (K.innerHTML = E(b.checkboxSize));
|
|
1483
1501
|
c.append(K);
|
|
1484
1502
|
h = c.find(".custom-checkbox")
|
|
1485
1503
|
}
|
|
1486
|
-
if (!(k >= d.left - 1 && k <= d.right + 1 &&
|
|
1504
|
+
if (!(k >= d.left - 1 && k <= d.right + 1 && u >= d.top - 1 && u <= d.bottom + 1)) return c.data("processing", !1), !1;
|
|
1487
1505
|
const L = "true" === c.attr("data-checked"),
|
|
1488
1506
|
J = f.find('[data-checked="true"]').get(),
|
|
1489
|
-
|
|
1507
|
+
D = (a = !L) ? J.length + 1 : J.length - 1,
|
|
1490
1508
|
r = f.find("select").first(),
|
|
1491
1509
|
F = c.index(),
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
value:
|
|
1495
|
-
text:
|
|
1496
|
-
html:
|
|
1497
|
-
tag:
|
|
1510
|
+
t = r.find("option").eq(F),
|
|
1511
|
+
v = {
|
|
1512
|
+
value: t.val(),
|
|
1513
|
+
text: p(t.html(), 1),
|
|
1514
|
+
html: p(t.html()),
|
|
1515
|
+
tag: t.attr("tag"),
|
|
1498
1516
|
checked: a,
|
|
1499
1517
|
index: F,
|
|
1500
|
-
count:
|
|
1501
|
-
group:
|
|
1518
|
+
count: D,
|
|
1519
|
+
group: A(R(r[0], F).text)
|
|
1502
1520
|
};
|
|
1503
1521
|
if (b.pointer?.startsWith("checkbox_")) {
|
|
1504
1522
|
const K = b.pointer.split("checkbox_")[1];
|
|
1505
|
-
if ("function" === typeof window[K] && !1 === window[K](
|
|
1523
|
+
if ("function" === typeof window[K] && !1 === window[K](v)) return c.data("processing", !1), !1
|
|
1506
1524
|
}
|
|
1507
1525
|
c.attr("data-checked", a.toString());
|
|
1508
|
-
f.attr("data-check-count",
|
|
1526
|
+
f.attr("data-check-count", D);
|
|
1509
1527
|
|
|
1510
|
-
function
|
|
1528
|
+
function C(K, P, qa) {
|
|
1511
1529
|
return {
|
|
1512
1530
|
position: "absolute",
|
|
1513
1531
|
right: "10px",
|
|
@@ -1516,8 +1534,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1516
1534
|
width: `calc(${K} + ${4}px)`,
|
|
1517
1535
|
height: `calc(${K} + ${4}px)`,
|
|
1518
1536
|
borderRadius: "3px",
|
|
1519
|
-
border: `${2}px solid ${
|
|
1520
|
-
backgroundColor:
|
|
1537
|
+
border: `${2}px solid ${qa?P:b.buttonColor}`,
|
|
1538
|
+
backgroundColor: qa ? P : "#fff",
|
|
1521
1539
|
WebkitTapHighlightColor: "transparent",
|
|
1522
1540
|
display: "block",
|
|
1523
1541
|
zIndex: "2",
|
|
@@ -1525,7 +1543,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1525
1543
|
padding: "0"
|
|
1526
1544
|
}
|
|
1527
1545
|
}
|
|
1528
|
-
if (!(h.length && h[0] ||
|
|
1546
|
+
if (!(h.length && h[0] || n)) {
|
|
1529
1547
|
c.css({
|
|
1530
1548
|
position: "relative",
|
|
1531
1549
|
paddingRight: "40px"
|
|
@@ -1533,7 +1551,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1533
1551
|
const K = document.createElement("div");
|
|
1534
1552
|
K.className = "custom-checkbox option-checkbox";
|
|
1535
1553
|
Object.assign(K.style, {
|
|
1536
|
-
...
|
|
1554
|
+
...W(),
|
|
1537
1555
|
borderRadius: "3px",
|
|
1538
1556
|
zIndex: "2",
|
|
1539
1557
|
display: "block",
|
|
@@ -1543,19 +1561,18 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1543
1561
|
c.append(K);
|
|
1544
1562
|
h = c.find(".custom-checkbox")
|
|
1545
1563
|
}
|
|
1546
|
-
const
|
|
1547
|
-
a ? (h.css(
|
|
1564
|
+
const ba = f.find(`.${b.triggerClass}`).find(".custom-checkbox");
|
|
1565
|
+
a ? (h.css(C(b.checkboxSize, b.checkboxColor, !0)).html(E(b.checkboxSize)), 0 < D && ba.css(C(b.checkboxSize, b.checkboxColor, !0)).html(ja(D, b.checkboxSize))) : (h.css(C(b.checkboxSize, b.buttonColor, !1)).empty(), 0 === D ? ba.css(C(b.checkboxSize, b.buttonColor, !1)).empty() : ba.css(C(b.checkboxSize, b.checkboxColor, !0)).html(ja(D, b.checkboxSize)));
|
|
1548
1566
|
if (b.selectedBg) {
|
|
1549
|
-
const K = !0 === b.selectedBg ? rgbToRgba(b.activeBackground, .5) :
|
|
1550
|
-
b.selectedBg;
|
|
1567
|
+
const K = !0 === b.selectedBg ? rgbToRgba(b.activeBackground, .5) : b.selectedBg;
|
|
1551
1568
|
$("#dynamic-selected-bg-style").length || $("head").append(`<style id="dynamic-selected-bg-style">.selected-bg-active { background-color: ${K} !important; }</style>`);
|
|
1552
1569
|
f.find(`.${b.optionClass}`).each(function() {
|
|
1553
|
-
const
|
|
1554
|
-
"true" ===
|
|
1555
|
-
|
|
1556
|
-
"normal")
|
|
1570
|
+
const P = $(this);
|
|
1571
|
+
"true" === P.attr("data-checked") ? (P.addClass("selected").addClass("selected-bg-active"), P[0].style.setProperty("background-color", K, "important")) : (P.removeClass("selected").removeClass("selected-bg-active"), P[0].style.removeProperty("background-color"));
|
|
1572
|
+
P.css("font-weight", "normal")
|
|
1557
1573
|
})
|
|
1558
|
-
} else a ?
|
|
1574
|
+
} else a ?
|
|
1575
|
+
(c.addClass("selected"), c.css("font-weight", "bold")) : (c.removeClass("selected"), c.css("font-weight", "normal"));
|
|
1559
1576
|
if (b.closeBox) {
|
|
1560
1577
|
const K = $(".select-overlay");
|
|
1561
1578
|
K.css("pointer-events", "none").hide();
|
|
@@ -1565,18 +1582,18 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1565
1582
|
}, 50)
|
|
1566
1583
|
} else {
|
|
1567
1584
|
const K = parseInt(f.attr("data-duration")),
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1585
|
+
P = f.find(`.${b.optionsClass}`),
|
|
1586
|
+
qa = m(),
|
|
1587
|
+
xa = $(".select-overlay");
|
|
1588
|
+
qa && !b.slideToggle ? U(P, K, xa, f, b) : (f.removeClass(b.openClass), xa.css("pointer-events", "none").hide(), K ? P.slideUp(K, {
|
|
1572
1589
|
easing: b.easing,
|
|
1573
1590
|
complete: () => {
|
|
1574
1591
|
setTimeout(() => {
|
|
1575
|
-
|
|
1592
|
+
xa.css("pointer-events", "");
|
|
1576
1593
|
c.data("processing", !1)
|
|
1577
1594
|
}, 50)
|
|
1578
1595
|
}
|
|
1579
|
-
}) : (
|
|
1596
|
+
}) : (P.hide(), xa.css("pointer-events", ""), setTimeout(() => {
|
|
1580
1597
|
c.data("processing", !1)
|
|
1581
1598
|
}, 50)))
|
|
1582
1599
|
}
|
|
@@ -1591,13 +1608,12 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1591
1608
|
}
|
|
1592
1609
|
|
|
1593
1610
|
function za(f, c, b) {
|
|
1594
|
-
const a =
|
|
1595
|
-
f.find(`.${b.triggerClass}`),
|
|
1611
|
+
const a = f.find(`.${b.triggerClass}`),
|
|
1596
1612
|
h = parseInt(f.attr("data-selected-index"));
|
|
1597
1613
|
let d = a.find(".custom-radio");
|
|
1598
1614
|
d.length ? d = d[0] : (d = document.createElement("div"), d.className = "custom-radio trigger-radio");
|
|
1599
1615
|
Object.assign(d.style, {
|
|
1600
|
-
...
|
|
1616
|
+
...W(),
|
|
1601
1617
|
border: void 0 !== c ? `2px solid ${b.radioColor}` : `2px solid ${b.buttonColor}`,
|
|
1602
1618
|
borderRadius: "50%",
|
|
1603
1619
|
backgroundColor: "#fff",
|
|
@@ -1606,26 +1622,26 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1606
1622
|
});
|
|
1607
1623
|
d.innerHTML = void 0 !== c ? O(b.radioColor, b) : "";
|
|
1608
1624
|
f.find(".custom-radio").not(".trigger-radio").each(function() {
|
|
1609
|
-
const
|
|
1610
|
-
var
|
|
1611
|
-
const L =
|
|
1612
|
-
|
|
1625
|
+
const u = $(this).closest('[class*="-option"]');
|
|
1626
|
+
var n = u.attr("data-value");
|
|
1627
|
+
const L = u.index();
|
|
1628
|
+
n = n === c && L === h;
|
|
1613
1629
|
Object.assign(this.style, {
|
|
1614
|
-
border:
|
|
1630
|
+
border: n ? `2px solid ${b.radioColor}` : `2px solid ${b.buttonColor}`,
|
|
1615
1631
|
backgroundColor: "#fff"
|
|
1616
1632
|
});
|
|
1617
|
-
|
|
1633
|
+
n ? (this.innerHTML = O(b.radioColor, b), u.addClass("selected"), b.selectedBg || u.css("font-weight", "bold")) : (this.innerHTML = "", u.removeClass("selected").css("font-weight", "normal"))
|
|
1618
1634
|
});
|
|
1619
1635
|
a.find(".custom-radio").remove();
|
|
1620
1636
|
a.append(d);
|
|
1621
1637
|
var k = f.find("select").first();
|
|
1622
1638
|
f = k.find("option").eq(h);
|
|
1623
|
-
f.length && (k =
|
|
1639
|
+
f.length && (k = R(k[0], h), f.html().replace(/\x3c!--(.*?)--\x3e/g,
|
|
1624
1640
|
"$1").trim(), a.html(k.text + d.outerHTML));
|
|
1625
1641
|
domqueryFocus()
|
|
1626
1642
|
}
|
|
1627
1643
|
|
|
1628
|
-
function
|
|
1644
|
+
function da(f, c) {
|
|
1629
1645
|
f.attr("data-selected-value", "");
|
|
1630
1646
|
f.attr("data-selected-index", "-1");
|
|
1631
1647
|
const b = f.find(`.${c.triggerClass}`),
|
|
@@ -1636,7 +1652,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1636
1652
|
const d = document.createElement("div");
|
|
1637
1653
|
d.className = "custom-radio trigger-radio";
|
|
1638
1654
|
Object.assign(d.style, {
|
|
1639
|
-
...
|
|
1655
|
+
...W(),
|
|
1640
1656
|
border: `2px solid ${c.buttonColor}`,
|
|
1641
1657
|
borderRadius: "50%",
|
|
1642
1658
|
backgroundColor: "#fff",
|
|
@@ -1654,7 +1670,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1654
1670
|
c.selectedBg && k.removeClass("selected-bg-active").css("background-color", "")
|
|
1655
1671
|
});
|
|
1656
1672
|
a.find("option").prop("selected", !1);
|
|
1657
|
-
|
|
1673
|
+
ka(f)
|
|
1658
1674
|
}
|
|
1659
1675
|
|
|
1660
1676
|
function na(f, c) {
|
|
@@ -1672,10 +1688,10 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1672
1688
|
}).empty();
|
|
1673
1689
|
c.selectedBg && b.removeClass("selected-bg-active").css("background-color", "")
|
|
1674
1690
|
});
|
|
1675
|
-
|
|
1691
|
+
ka(f)
|
|
1676
1692
|
}
|
|
1677
1693
|
|
|
1678
|
-
function
|
|
1694
|
+
function ka(f) {
|
|
1679
1695
|
const c = f.find('[class*="-options"]');
|
|
1680
1696
|
parseInt(f.attr("data-duration"));
|
|
1681
1697
|
c.find("[data-group]").each(function() {
|
|
@@ -1691,7 +1707,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1691
1707
|
})
|
|
1692
1708
|
}
|
|
1693
1709
|
|
|
1694
|
-
function
|
|
1710
|
+
function sa(f, c) {
|
|
1695
1711
|
const b = ["custom-checkbox", "custom-radio", "custom-question", "custom-dot"];
|
|
1696
1712
|
Array.from(f.childNodes).forEach(h => {
|
|
1697
1713
|
(h.nodeType === Node.TEXT_NODE || h.nodeType === Node.ELEMENT_NODE &&
|
|
@@ -1702,7 +1718,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1702
1718
|
a ? f.insertBefore(c, a) : f.appendChild(c)
|
|
1703
1719
|
}
|
|
1704
1720
|
|
|
1705
|
-
function
|
|
1721
|
+
function ta(f, c) {
|
|
1706
1722
|
const b = f.find(`.${c.triggerClass}`),
|
|
1707
1723
|
a = f.find("select, ul").first().find("li, option").first().html(),
|
|
1708
1724
|
h = "checkbox" === c.pointer || c.pointer?.startsWith("checkbox_");
|
|
@@ -1719,11 +1735,11 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1719
1735
|
const d = window._triggerResizeObservers.get(b[0]);
|
|
1720
1736
|
d && (d.disconnect(), window._triggerResizeObservers.delete(b[0]))
|
|
1721
1737
|
}
|
|
1722
|
-
h ?
|
|
1738
|
+
h ? sa(b[0], a) : b.html(a);
|
|
1723
1739
|
c.selectedBg && f.find(`.${c.optionClass}`).each(function() {
|
|
1724
1740
|
$(this).removeClass("selected-bg-active").css("background-color", "")
|
|
1725
1741
|
});
|
|
1726
|
-
|
|
1742
|
+
ka(f)
|
|
1727
1743
|
}
|
|
1728
1744
|
|
|
1729
1745
|
function ua(f, c, b) {
|
|
@@ -1735,7 +1751,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1735
1751
|
else {
|
|
1736
1752
|
b = f.attr("data-selected-value");
|
|
1737
1753
|
const h = parseInt(f.attr("data-selected-index"));
|
|
1738
|
-
0 < a.find("option[group]").length ? -1 === h && void 0 === b || 0 === h && (!b || "" === b) ? (c.hide(),
|
|
1754
|
+
0 < a.find("option[group]").length ? -1 === h && void 0 === b || 0 === h && (!b || "" === b) ? (c.hide(), ka(f)) : c.show() : (-1 !== h || b && "" !== b) && (0 !== h || b && "" !== b) ? c.show() : c.hide()
|
|
1739
1755
|
}
|
|
1740
1756
|
}
|
|
1741
1757
|
$(document).on("click", '[class*="-option"]', function(f) {
|
|
@@ -1758,24 +1774,24 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1758
1774
|
b.attr("data-current-index", k);
|
|
1759
1775
|
if ((c.attr("group") || c.attr("data-group")) && !c.attr("value")) return f.preventDefault(), b.data("groupClicked", !0), !1;
|
|
1760
1776
|
b.data("groupClicked", !1);
|
|
1761
|
-
"undefined" !== typeof
|
|
1762
|
-
|
|
1777
|
+
"undefined" !== typeof V && V && (V = !1);
|
|
1778
|
+
V = !1;
|
|
1763
1779
|
if ("undefined" !== typeof g && g) f.preventDefault(), f.stopPropagation(), b.removeData("optionClickProcessing");
|
|
1764
1780
|
else {
|
|
1765
1781
|
if (c.hasClass("disabled")) return f.preventDefault(),
|
|
1766
1782
|
b.removeData("optionClickProcessing"), !1;
|
|
1767
|
-
if (a.pointer && a.pointer.startsWith("question_") && (f.preventDefault(), f.stopPropagation(), !1 ===
|
|
1783
|
+
if (a.pointer && a.pointer.startsWith("question_") && (f.preventDefault(), f.stopPropagation(), !1 === pa(b, c, a, f))) return b.removeData("optionClickProcessing"), !1;
|
|
1768
1784
|
if (0 === c.index() || "" === c.attr("data-value") || !c.attr("data-value")) switch (a.pointer) {
|
|
1769
1785
|
case "radio":
|
|
1770
|
-
|
|
1786
|
+
da(b, a);
|
|
1771
1787
|
break;
|
|
1772
1788
|
case "checkbox":
|
|
1773
1789
|
na(b, a);
|
|
1774
1790
|
break;
|
|
1775
1791
|
default:
|
|
1776
|
-
|
|
1792
|
+
ta(b, a)
|
|
1777
1793
|
}
|
|
1778
|
-
0 < h.find("option[group]").length && 0 === k && (!d || "" === d) &&
|
|
1794
|
+
0 < h.find("option[group]").length && 0 === k && (!d || "" === d) && ka(b);
|
|
1779
1795
|
if ("radio" !== a.pointer || 0 !== k && d && "" !== d) {
|
|
1780
1796
|
if ("checkbox" === a.pointer || a.pointer?.startsWith("checkbox_")) return f.preventDefault(),
|
|
1781
1797
|
f.stopPropagation(), f.stopImmediatePropagation(), d = ha(b, c, a, f), b.removeData("optionClickProcessing"), d;
|
|
@@ -1785,16 +1801,16 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1785
1801
|
try {
|
|
1786
1802
|
b.attr("data-selected-value", "");
|
|
1787
1803
|
b.attr("data-selected-index", "-1");
|
|
1788
|
-
var
|
|
1789
|
-
const
|
|
1790
|
-
var
|
|
1791
|
-
const
|
|
1804
|
+
var u = h[0];
|
|
1805
|
+
const C = h.find("li, option").first().html();
|
|
1806
|
+
var n = h.find("option").eq(0);
|
|
1807
|
+
const ba = b.find(`.${a.triggerClass}`);
|
|
1792
1808
|
if ("checkbox" === a.pointer || a.pointer?.startsWith("checkbox_")) {
|
|
1793
|
-
const K = a.allowHTML ?
|
|
1794
|
-
|
|
1795
|
-
} else a.allowHTML ?
|
|
1809
|
+
const K = a.allowHTML ? C : h.find("li, option").first().text();
|
|
1810
|
+
sa(ba[0], K)
|
|
1811
|
+
} else a.allowHTML ? ba.html(C) : ba.text(h.find("li, option").first().text());
|
|
1796
1812
|
h.find("option, li").prop("selected", !1);
|
|
1797
|
-
|
|
1813
|
+
C && h.find("option").eq(0).prop("selected", !0);
|
|
1798
1814
|
b.find('[class*="-option"]').removeClass("selected").removeClass(a.highlightedClass).css("font-weight", "normal");
|
|
1799
1815
|
a.dot && b.find(".custom-dot").each(function() {
|
|
1800
1816
|
Object.assign(this.style, {
|
|
@@ -1803,16 +1819,15 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1803
1819
|
backgroundColor: "#fff"
|
|
1804
1820
|
})
|
|
1805
1821
|
});
|
|
1806
|
-
if (
|
|
1807
|
-
|
|
1808
|
-
k = function(K,
|
|
1809
|
-
|
|
1810
|
-
return 1 === Q ? K.replace(/\x3c!--(.*?)--\x3e/g, "$1").replace(/<[^>]*>/g, "") : K.replace(/\x3c!--(.*?)--\x3e/g, "$1")
|
|
1822
|
+
if (u._selectId) {
|
|
1823
|
+
n.html().replace(/\x3c!--(.*?)--\x3e/g, "$1").trim();
|
|
1824
|
+
k = function(K, P = 0) {
|
|
1825
|
+
return 1 === P ? K.replace(/\x3c!--(.*?)--\x3e/g, "$1").replace(/<[^>]*>/g, "") : K.replace(/\x3c!--(.*?)--\x3e/g, "$1")
|
|
1811
1826
|
};
|
|
1812
1827
|
d = "";
|
|
1813
1828
|
try {
|
|
1814
|
-
if ("function" === typeof
|
|
1815
|
-
const K =
|
|
1829
|
+
if ("function" === typeof R) {
|
|
1830
|
+
const K = R(u, 0);
|
|
1816
1831
|
K && (d = K.text)
|
|
1817
1832
|
}
|
|
1818
1833
|
} catch (K) {
|
|
@@ -1820,27 +1835,28 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1820
1835
|
}
|
|
1821
1836
|
var L = {
|
|
1822
1837
|
value: "",
|
|
1823
|
-
text: k(
|
|
1824
|
-
html: k(
|
|
1825
|
-
tag:
|
|
1826
|
-
element:
|
|
1827
|
-
select:
|
|
1838
|
+
text: k(n.html(), 1),
|
|
1839
|
+
html: k(n.html()),
|
|
1840
|
+
tag: n.attr("tag"),
|
|
1841
|
+
element: n[0],
|
|
1842
|
+
select: u,
|
|
1828
1843
|
index: 0,
|
|
1829
1844
|
group: function(K) {
|
|
1830
|
-
const
|
|
1831
|
-
|
|
1832
|
-
return
|
|
1845
|
+
const P = document.createElement("div");
|
|
1846
|
+
P.innerHTML = K;
|
|
1847
|
+
return P.textContent || P.innerText || ""
|
|
1833
1848
|
}(d)
|
|
1834
1849
|
},
|
|
1835
|
-
J = window._gong_tea_yun_0.get(
|
|
1850
|
+
J = window._gong_tea_yun_0.get(u._selectId +
|
|
1851
|
+
"_callback");
|
|
1836
1852
|
J && J.call(this, L);
|
|
1837
|
-
var
|
|
1838
|
-
|
|
1853
|
+
var D = window._gong_tea_yun_0.get(u._selectId + "_onSelect");
|
|
1854
|
+
D && D.call(this, L);
|
|
1839
1855
|
h.trigger("change")
|
|
1840
1856
|
}
|
|
1841
1857
|
var r = parseInt(b.attr("data-duration")) || 0,
|
|
1842
1858
|
F = b.find(`.${a.optionsClass}`);
|
|
1843
|
-
|
|
1859
|
+
m() && !a.slideToggle ? U(F, r, $(".select-overlay"), b, a) : (b.removeClass(a.openClass), b.attr("data-state", "closed"), F.slideUp(r, {
|
|
1844
1860
|
easing: a.easing,
|
|
1845
1861
|
complete: function() {
|
|
1846
1862
|
setTimeout(() => {
|
|
@@ -1848,27 +1864,28 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1848
1864
|
}, 100)
|
|
1849
1865
|
}
|
|
1850
1866
|
}))
|
|
1851
|
-
} catch (
|
|
1852
|
-
console.error("Reset error:",
|
|
1867
|
+
} catch (C) {
|
|
1868
|
+
console.error("Reset error:", C), b.removeData("processingReset")
|
|
1853
1869
|
}
|
|
1854
1870
|
return !1
|
|
1855
1871
|
}
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1872
|
+
u =
|
|
1873
|
+
b.find("select").first()[0];
|
|
1874
|
+
b.find('[class*="-option"]').each(function(C) {
|
|
1875
|
+
C = $(this);
|
|
1876
|
+
C.removeClass("selected").removeClass(a.highlightedClass).removeClass("selected-bg-active").css("font-weight", "normal");
|
|
1860
1877
|
this.classList.remove("selected");
|
|
1861
1878
|
this.classList.remove(a.highlightedClass);
|
|
1862
1879
|
this.classList.remove("selected-bg-active");
|
|
1863
1880
|
a.selectedBg && this.style.removeProperty("background-color");
|
|
1864
|
-
"radio" === a.pointer &&
|
|
1881
|
+
"radio" === a.pointer && C.find(".custom-radio").removeClass("selected")
|
|
1865
1882
|
});
|
|
1866
1883
|
c.addClass("selected").addClass(a.highlightedClass);
|
|
1867
|
-
a.selectedBg ? (c.addClass("selected-bg-active"),
|
|
1868
|
-
m = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg, $("#dynamic-selected-bg-style").length || $("head").append(`<style id="dynamic-selected-bg-style">.selected-bg-active { background-color: ${m} !important; }</style>`), c[0].style.setProperty("background-color", m, "important"), c.css("font-weight", "normal")) : c.css("font-weight", "bold");
|
|
1884
|
+
a.selectedBg ? (c.addClass("selected-bg-active"), n = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg, $("#dynamic-selected-bg-style").length || $("head").append(`<style id="dynamic-selected-bg-style">.selected-bg-active { background-color: ${n} !important; }</style>`), c[0].style.setProperty("background-color", n, "important"), c.css("font-weight", "normal")) : c.css("font-weight", "bold");
|
|
1869
1885
|
"radio" === a.pointer && c.find(".custom-radio").addClass("selected");
|
|
1870
1886
|
a.dot && (b.find(".custom-dot").each(function() {
|
|
1871
|
-
Object.assign(this.style,
|
|
1887
|
+
Object.assign(this.style,
|
|
1888
|
+
a.dotStyle)
|
|
1872
1889
|
}), c.find(".custom-dot").css(a.dotSelectedStyle));
|
|
1873
1890
|
(d || "" === d) && b.attr({
|
|
1874
1891
|
"data-selected-value": d,
|
|
@@ -1877,81 +1894,82 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1877
1894
|
h.find("option").prop("selected", !1);
|
|
1878
1895
|
h.find("option").eq(k).prop("selected", !0);
|
|
1879
1896
|
h.trigger("change");
|
|
1880
|
-
if (
|
|
1897
|
+
if (u._selectId) {
|
|
1881
1898
|
h = h.find("option").eq(k);
|
|
1882
|
-
c =
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
if (h.attr("img")) r = h.attr("img"), Object.assign(
|
|
1899
|
+
c = R(u, k);
|
|
1900
|
+
n = b.find(`.${a.triggerClass}`);
|
|
1901
|
+
n.empty();
|
|
1902
|
+
if (h.attr("img")) r = h.attr("img"), Object.assign(n[0].style, {
|
|
1886
1903
|
backgroundImage: `url(${r})`,
|
|
1887
1904
|
backgroundRepeat: "no-repeat"
|
|
1888
|
-
}), r = new ResizeObserver(
|
|
1889
|
-
const
|
|
1890
|
-
0 <
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
2}px center`,
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
}), r.observe(
|
|
1897
|
-
else if (Object.assign(
|
|
1905
|
+
}), r = new ResizeObserver(C => {
|
|
1906
|
+
const ba = C[0].contentRect.height;
|
|
1907
|
+
0 <
|
|
1908
|
+
ba && Object.assign(C[0].target.style, {
|
|
1909
|
+
backgroundSize: `${ba}px`,
|
|
1910
|
+
backgroundPosition: `${ba/2}px center`,
|
|
1911
|
+
paddingLeft: `calc(${2*ba}px)`
|
|
1912
|
+
})
|
|
1913
|
+
}), r.observe(n[0]), window._triggerResizeObservers || (window._triggerResizeObservers = new WeakMap), (F = window._triggerResizeObservers.get(n[0])) && F.disconnect(), window._triggerResizeObservers.set(n[0], r);
|
|
1914
|
+
else if (Object.assign(n[0].style, {
|
|
1898
1915
|
backgroundImage: "none",
|
|
1899
1916
|
backgroundPosition: "initial",
|
|
1900
1917
|
backgroundSize: "initial",
|
|
1901
1918
|
paddingLeft: a.defaultPadding || "10px"
|
|
1902
|
-
}), window._triggerResizeObservers &&
|
|
1903
|
-
|
|
1919
|
+
}), window._triggerResizeObservers &&
|
|
1920
|
+
(r = window._triggerResizeObservers.get(n[0]))) r.disconnect(), window._triggerResizeObservers.delete(n[0]);
|
|
1921
|
+
a.allowHTML ? n.html(c.text) : n.text(c.text);
|
|
1904
1922
|
"radio" === a.pointer && (b.attr({
|
|
1905
1923
|
"data-selected-value": d,
|
|
1906
1924
|
"data-selected-index": k
|
|
1907
1925
|
}), za(b, d, a));
|
|
1908
1926
|
r = h.attr("tag") || "";
|
|
1909
|
-
!0 === a.tag && r && (F = document.createElement("span"), L = a.tagStyle || {}, J = a.tagMap || {},
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
(E.fontWeight = L.fontWeight), J[r] && (E.backgroundColor = J[r]), Object.assign(F.style, E), a.allowHTML ? F.innerHTML = r : F.textContent = r, m.append(F));
|
|
1927
|
+
!0 === a.tag && r && (F = document.createElement("span"), L = a.tagStyle || {}, J = a.tagMap || {}, D = {
|
|
1928
|
+
position: "absolute",
|
|
1929
|
+
top: "50%",
|
|
1930
|
+
transform: "translateY(-50%)",
|
|
1931
|
+
color: L.color || a.tagColor || "#666",
|
|
1932
|
+
fontSize: L.fontSize || "12px",
|
|
1933
|
+
right: "radio" === a.pointer ? "40px" : "30px",
|
|
1934
|
+
margin: a.tagMargin
|
|
1935
|
+
}, L.padding && (D.padding = L.padding), L.borderRadius && (D.borderRadius = L.borderRadius), L.fontWeight && (D.fontWeight = L.fontWeight), J[r] && (D.backgroundColor = J[r]), Object.assign(F.style, D), a.allowHTML ? F.innerHTML = r : F.textContent = r, n.append(F));
|
|
1919
1936
|
d = {
|
|
1920
1937
|
value: d,
|
|
1921
|
-
text:
|
|
1922
|
-
html:
|
|
1938
|
+
text: p(h.html(), 1),
|
|
1939
|
+
html: p(h.html()),
|
|
1923
1940
|
tag: r,
|
|
1924
1941
|
element: h[0],
|
|
1925
|
-
select:
|
|
1942
|
+
select: u,
|
|
1926
1943
|
index: k,
|
|
1927
|
-
group:
|
|
1944
|
+
group: A(c.text)
|
|
1928
1945
|
};
|
|
1929
|
-
(k = window._gong_tea_yun_0.get(
|
|
1930
|
-
(k = window._gong_tea_yun_0.get(
|
|
1946
|
+
(k = window._gong_tea_yun_0.get(u._selectId + "_callback")) && k.call(this, d);
|
|
1947
|
+
(k = window._gong_tea_yun_0.get(u._selectId + "_onSelect")) && k.call(this, d)
|
|
1931
1948
|
}
|
|
1932
1949
|
b.removeData("optionClickProcessing");
|
|
1933
1950
|
d = parseInt(b.attr("data-duration")) || 0;
|
|
1934
1951
|
k = b.find(`.${a.optionsClass}`);
|
|
1935
|
-
var
|
|
1936
|
-
|
|
1952
|
+
var t = $(".select-overlay"),
|
|
1953
|
+
v = function() {
|
|
1937
1954
|
b.find('[class*="-option"]').removeClass("selected");
|
|
1938
|
-
[50, 100, 200].forEach(
|
|
1955
|
+
[50, 100, 200].forEach(C => {
|
|
1939
1956
|
setTimeout(() => {
|
|
1940
|
-
const
|
|
1941
|
-
0 <
|
|
1942
|
-
},
|
|
1957
|
+
const ba = b.find('[class*="-option"].selected');
|
|
1958
|
+
0 < ba.length && ba.removeClass("selected")
|
|
1959
|
+
}, C)
|
|
1943
1960
|
})
|
|
1944
1961
|
};
|
|
1945
|
-
|
|
1962
|
+
m() && !a.slideToggle ? (U(k, d, t, b, a), v()) : (b.removeClass(a.openClass), b.attr("data-state", "closed"), t.css("background-color", "rgba(0, 0, 0, 0)"), a.slideToggle && void 0 !== a.opacity ? k.css("opacity", a.opacity ||
|
|
1963
|
+
0) : k.css("opacity", ""), k.slideUp(d, {
|
|
1946
1964
|
easing: a.easing,
|
|
1947
1965
|
complete: function() {
|
|
1948
|
-
|
|
1949
|
-
|
|
1966
|
+
t.hide();
|
|
1967
|
+
y(b);
|
|
1950
1968
|
domqueryFocus();
|
|
1951
|
-
|
|
1969
|
+
v()
|
|
1952
1970
|
}
|
|
1953
1971
|
}))
|
|
1954
|
-
} else
|
|
1972
|
+
} else da(b, a), d = parseInt(b.attr("data-duration")) || 0, k = b.find(`.${a.optionsClass}`), m() && !a.slideToggle ? U(k, d, $(".select-overlay"), b, a) : (b.removeClass(a.openClass), k.slideUp(d, {
|
|
1955
1973
|
easing: a.easing
|
|
1956
1974
|
})), b.removeData("optionClickProcessing")
|
|
1957
1975
|
}
|
|
@@ -1960,184 +1978,190 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
1960
1978
|
$(document).on("click", '[class*="-trigger"]', function(f) {
|
|
1961
1979
|
function c(r) {
|
|
1962
1980
|
function F() {
|
|
1963
|
-
|
|
1964
|
-
b.data("isTriggeredOnce", !0)))
|
|
1981
|
+
D || (D = !0, b.data("isInitialOpen") && b.removeData("isInitialOpen"), a.trigger &&
|
|
1982
|
+
domquery(a.trigger).trigger("click"), a.triggerOnce && !b.data("isTriggeredOnce") && (domquery(a.triggerOnce).trigger("click"), b.data("isTriggeredOnce", !0)))
|
|
1965
1983
|
}
|
|
1966
|
-
r =
|
|
1967
|
-
var
|
|
1968
|
-
|
|
1984
|
+
r = m();
|
|
1985
|
+
var t = b.find("select").first()[0];
|
|
1986
|
+
t._selectId && (t = window._gong_tea_yun_0.get(t._selectId + "_open")) && t.call(this);
|
|
1969
1987
|
ua(b, d, a);
|
|
1970
|
-
const
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
let
|
|
1988
|
+
const v = parseInt(b.attr("data-selected-index")),
|
|
1989
|
+
C = b.attr("data-selected-value");
|
|
1990
|
+
t = C;
|
|
1991
|
+
let ba = v;
|
|
1974
1992
|
const K = b.find('[class*="-option"].selected').first();
|
|
1975
|
-
K.length && !
|
|
1976
|
-
if (0 <
|
|
1977
|
-
var
|
|
1978
|
-
|
|
1979
|
-
if (
|
|
1980
|
-
(Q = (Q.attr("class")?.split(" ") || []).filter(N => N !== a.optionClass && "selected" !== N && N !== a.highlightedClass), 0 < Q.length)) {
|
|
1993
|
+
K.length && !t && 0 >= ba && (t = K.attr("value") || K.attr("data-value"), ba = K.index());
|
|
1994
|
+
if (0 < ba || t) {
|
|
1995
|
+
var P;
|
|
1996
|
+
t ? P = d.find(`[value="${t}"], [data-value="${t}"]`) : 0 < ba && (P = d.find(`.${a.optionClass}`).eq(ba));
|
|
1997
|
+
if (P && P.length && (P = (P.attr("class")?.split(" ") || []).filter(N => N !== a.optionClass && "selected" !== N && N !== a.highlightedClass), 0 < P.length)) {
|
|
1981
1998
|
const N = new Set,
|
|
1982
|
-
|
|
1983
|
-
if (
|
|
1984
|
-
N.add(
|
|
1985
|
-
var
|
|
1986
|
-
|
|
1987
|
-
"group-option" !==
|
|
1999
|
+
Q = ea => {
|
|
2000
|
+
if (ea && !N.has(ea)) {
|
|
2001
|
+
N.add(ea);
|
|
2002
|
+
var X = d.find(`[data-group="${ea}"]`);
|
|
2003
|
+
X.length && (X.addClass("expanded"), X.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), d.find(`.${ea}`).show(), (X.attr("class")?.split(" ") || []).forEach(oa => {
|
|
2004
|
+
"group-option" !== oa && "expanded" !== oa && Q(oa)
|
|
1988
2005
|
}))
|
|
1989
2006
|
}
|
|
1990
2007
|
};
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
d.css("display",
|
|
1994
|
-
"block");
|
|
2008
|
+
P.forEach(ea => Q(ea));
|
|
2009
|
+
P = d.css("display");
|
|
2010
|
+
d.css("display", "block");
|
|
1995
2011
|
d.outerHeight(!0);
|
|
1996
|
-
d.css("display",
|
|
2012
|
+
d.css("display", P)
|
|
1997
2013
|
}
|
|
1998
2014
|
}
|
|
1999
|
-
const
|
|
2015
|
+
const qa = () => {
|
|
2000
2016
|
if (("checkbox" === a.pointer || a.pointer?.startsWith("checkbox_")) && a.selectedBg) {
|
|
2001
2017
|
const N = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg;
|
|
2002
2018
|
$("#dynamic-selected-bg-style").length || $("head").append(`<style id="dynamic-selected-bg-style">.selected-bg-active { background-color: ${N} !important; }</style>`);
|
|
2003
2019
|
b.find('[data-checked="true"]').each(function() {
|
|
2004
|
-
const
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2020
|
+
const Q =
|
|
2021
|
+
$(this);
|
|
2022
|
+
Q.addClass("selected").addClass("selected-bg-active");
|
|
2023
|
+
Q[0].style.setProperty("background-color", N, "important");
|
|
2024
|
+
Q.css("font-weight", "normal")
|
|
2009
2025
|
});
|
|
2010
2026
|
b.find(`.${a.optionClass}`).not('[data-checked="true"]').each(function() {
|
|
2011
|
-
const
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2027
|
+
const Q = $(this);
|
|
2028
|
+
Q.removeClass("selected").removeClass("selected-bg-active");
|
|
2029
|
+
Q[0].style.removeProperty("background-color");
|
|
2030
|
+
Q.css("font-weight", "normal")
|
|
2015
2031
|
})
|
|
2016
2032
|
}
|
|
2017
2033
|
},
|
|
2018
|
-
|
|
2019
|
-
var N =
|
|
2020
|
-
let
|
|
2021
|
-
const
|
|
2022
|
-
|
|
2023
|
-
"data-
|
|
2024
|
-
|
|
2025
|
-
|
|
2034
|
+
xa = () => {
|
|
2035
|
+
var N = C;
|
|
2036
|
+
let Q = v;
|
|
2037
|
+
const ea = b.find('[class*="-option"].selected').first();
|
|
2038
|
+
ea.length && !N && 0 >= Q && (N = ea.attr("value") ||
|
|
2039
|
+
ea.attr("data-value"), Q = ea.index(), (N || 0 < Q) && b.attr({
|
|
2040
|
+
"data-selected-value": N || "",
|
|
2041
|
+
"data-selected-index": Q
|
|
2042
|
+
}));
|
|
2026
2043
|
b.find('[class*="-option"]').each(function() {
|
|
2027
|
-
const
|
|
2028
|
-
|
|
2029
|
-
a.selectedBg &&
|
|
2044
|
+
const X = $(this);
|
|
2045
|
+
X.removeClass("selected").removeClass(a.highlightedClass).removeClass("selected-bg-active").css("font-weight", "normal");
|
|
2046
|
+
a.selectedBg && X[0].style.removeProperty("background-color");
|
|
2030
2047
|
this.classList.remove("selected");
|
|
2031
2048
|
this.classList.remove(a.highlightedClass);
|
|
2032
2049
|
this.classList.remove("selected-bg-active")
|
|
2033
2050
|
});
|
|
2034
|
-
if (0 <
|
|
2035
|
-
let
|
|
2036
|
-
N ?
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2051
|
+
if (0 < Q || N) {
|
|
2052
|
+
let X;
|
|
2053
|
+
N ? X = d.find(`[value="${N}"], [data-value="${N}"]`) :
|
|
2054
|
+
0 < Q && (X = d.find(`.${a.optionClass}`).eq(Q));
|
|
2055
|
+
if (X && X.length) {
|
|
2056
|
+
N = (X.attr("class")?.split(" ") || []).filter(ia => ia !== a.optionClass && "selected" !== ia && ia !== a.highlightedClass);
|
|
2057
|
+
const oa = new Set,
|
|
2040
2058
|
Aa = ia => {
|
|
2041
|
-
if (ia && !
|
|
2042
|
-
|
|
2059
|
+
if (ia && !oa.has(ia)) {
|
|
2060
|
+
oa.add(ia);
|
|
2043
2061
|
var va = d.find(`[data-group="${ia}"]`);
|
|
2044
|
-
va.length && (va.addClass("expanded"), va.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), d.find(`.${ia}`).show(), (va.attr("class")?.split(" ") || []).forEach(
|
|
2045
|
-
"group-option" !==
|
|
2062
|
+
va.length && (va.addClass("expanded"), va.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), d.find(`.${ia}`).show(), (va.attr("class")?.split(" ") || []).forEach(la => {
|
|
2063
|
+
"group-option" !== la && "expanded" !== la && Aa(la)
|
|
2046
2064
|
}))
|
|
2047
2065
|
}
|
|
2048
2066
|
};
|
|
2049
2067
|
N.forEach(ia => Aa(ia));
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
a.selectedBg ? (N = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg,
|
|
2068
|
+
X.addClass("selected").addClass(a.highlightedClass);
|
|
2069
|
+
X[0].classList.add("selected");
|
|
2070
|
+
X[0].classList.add(a.highlightedClass);
|
|
2071
|
+
a.selectedBg ? (N = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg, X.attr("style", (X.attr("style") || "") + `; background-color: ${N} !important;`)) : X.css("font-weight", "bold");
|
|
2054
2072
|
if (a.selectedBg) {
|
|
2055
2073
|
const ia = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg;
|
|
2056
2074
|
setTimeout(() => {
|
|
2057
|
-
|
|
2058
|
-
}, 50);
|
|
2059
|
-
setTimeout(() => {
|
|
2060
|
-
ca.attr("style", (ca.attr("style") || "") + `; background-color: ${ia} !important;`)
|
|
2075
|
+
X.attr("style", (X.attr("style") || "") + `; background-color: ${ia} !important;`)
|
|
2061
2076
|
},
|
|
2062
|
-
|
|
2077
|
+
50);
|
|
2078
|
+
setTimeout(() => {
|
|
2079
|
+
X.attr("style", (X.attr("style") || "") + `; background-color: ${ia} !important;`)
|
|
2080
|
+
}, 200)
|
|
2063
2081
|
}
|
|
2064
2082
|
void 0 !== a.autoScrollToSelected && a.autoScrollToSelected && (N = parseInt(b.attr("data-duration")) || 300, setTimeout(() => {
|
|
2065
|
-
d.find("div").first().length &&
|
|
2083
|
+
d.find("div").first().length && X.length && X[0] && "function" === typeof X[0].scrollIntoView && X[0].scrollIntoView({
|
|
2066
2084
|
block: "center",
|
|
2067
2085
|
behavior: "smooth"
|
|
2068
2086
|
})
|
|
2069
2087
|
}, N))
|
|
2070
|
-
} else
|
|
2088
|
+
} else qa()
|
|
2071
2089
|
}
|
|
2072
|
-
|
|
2090
|
+
qa()
|
|
2073
2091
|
};
|
|
2074
2092
|
window.requestAnimationFrame ? requestAnimationFrame(() => {
|
|
2075
|
-
requestAnimationFrame(
|
|
2076
|
-
}) : setTimeout(
|
|
2077
|
-
"radio" === a.pointer &&
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2093
|
+
requestAnimationFrame(xa)
|
|
2094
|
+
}) : setTimeout(xa, 0);
|
|
2095
|
+
"radio" === a.pointer &&
|
|
2096
|
+
(P = b.find(".trigger-radio"), P.length && (Object.assign(P[0].style, {
|
|
2097
|
+
border: `2px solid ${a.buttonColor}`,
|
|
2098
|
+
backgroundColor: "#fff",
|
|
2099
|
+
width: a.radioSize,
|
|
2100
|
+
height: a.radioSize
|
|
2101
|
+
}), P[0].innerHTML = ""));
|
|
2083
2102
|
$('[class*="-wrapper"]').not(b).each(function() {
|
|
2084
2103
|
const N = $(this),
|
|
2085
|
-
|
|
2086
|
-
if (
|
|
2087
|
-
if (
|
|
2088
|
-
var
|
|
2089
|
-
if ("function" === typeof window[
|
|
2104
|
+
Q = N.data("settings");
|
|
2105
|
+
if (Q) {
|
|
2106
|
+
if (Q.pointer && Q.pointer.startsWith("question_") && "true" === N.attr("data-aun")) {
|
|
2107
|
+
var ea = Q.pointer.split("_")[1];
|
|
2108
|
+
if ("function" === typeof window[ea + "_close"]) return window[ea + "_close"](), domqueryFocus(), !1
|
|
2090
2109
|
}
|
|
2091
|
-
|
|
2092
|
-
if (
|
|
2093
|
-
const
|
|
2094
|
-
N.removeClass(
|
|
2095
|
-
|
|
2096
|
-
ca ? S.slideToggle ? fa.css("opacity", S.opacity || 0).slideUp(ca, {
|
|
2110
|
+
ea = N.find(`.${Q.optionsClass}`);
|
|
2111
|
+
if (ea.is(":visible")) {
|
|
2112
|
+
const X = parseInt(N.attr("data-duration"));
|
|
2113
|
+
N.removeClass(Q.openClass).attr("data-state", "closed");
|
|
2114
|
+
X ? Q.slideToggle ? ea.css("opacity", Q.opacity || 0).slideUp(X, {
|
|
2097
2115
|
easing: a.easing
|
|
2098
|
-
}) :
|
|
2116
|
+
}) : ea.slideUp(X, {
|
|
2099
2117
|
easing: a.easing
|
|
2100
|
-
}) : (
|
|
2118
|
+
}) : (Q.slideToggle && ea.css("opacity", Q.opacity || 0), ea.hide())
|
|
2101
2119
|
}
|
|
2102
2120
|
}
|
|
2103
2121
|
});
|
|
2104
2122
|
b.addClass(a.openClass);
|
|
2105
2123
|
b.attr("data-state", "opened");
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
if (!
|
|
2124
|
+
ma(b.find('[class*="-option"]'));
|
|
2125
|
+
P = !0 === a.slideToggle;
|
|
2126
|
+
if (!P && (t = Z(b, d), d.css(t), a._hasBeenShown = !0, !r)) {
|
|
2109
2127
|
let N = null;
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
d.
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2128
|
+
const Q = "scroll.select-" + (b.find("select").first()[0]._selectId ||
|
|
2129
|
+
"default"),
|
|
2130
|
+
ea = x(function() {
|
|
2131
|
+
d.is(":visible") ? (N && cancelAnimationFrame(N), N = requestAnimationFrame(function() {
|
|
2132
|
+
const X = Z(b, d),
|
|
2133
|
+
oa = {};
|
|
2134
|
+
void 0 !== X.top && (oa.top = X.top);
|
|
2135
|
+
void 0 !== X.bottom && (oa.bottom = X.bottom);
|
|
2136
|
+
void 0 !== X.left && (oa.left = X.left);
|
|
2137
|
+
0 < Object.keys(oa).length && d.css(oa)
|
|
2138
|
+
})) : (N && (cancelAnimationFrame(N), N = null), ea.cancel && ea.cancel(), $(window).off(Q))
|
|
2139
|
+
}, 16);
|
|
2140
|
+
$(window).off(Q).on(Q, ea)
|
|
2120
2141
|
}
|
|
2121
|
-
|
|
2142
|
+
P ? (r = a.optionStyle.backgroundColor || a.optionsStyle.background, d.css({
|
|
2122
2143
|
opacity: a.opacity || 0,
|
|
2123
2144
|
"background-color": r
|
|
2124
|
-
}), d.find("div").first().css("background-color",
|
|
2145
|
+
}), d.find("div").first().css("background-color",
|
|
2146
|
+
r), d.find(`.${a.optionClass}`).css("background-color", r), d.css("will-change", "height, opacity"), d.slideDown(k, {
|
|
2125
2147
|
easing: a.easing,
|
|
2126
|
-
complete:
|
|
2148
|
+
complete: function() {
|
|
2149
|
+
d.css("will-change", "");
|
|
2150
|
+
F()
|
|
2151
|
+
}
|
|
2127
2152
|
})) : (() => new Promise(N => {
|
|
2128
|
-
const
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
}, 0))
|
|
2153
|
+
const Q = b.parent();
|
|
2154
|
+
Q.find(".select-overlay").length ? N(Q.find(".select-overlay")) : (Q.append('<div class="select-overlay"></div>'), setTimeout(() => {
|
|
2155
|
+
const ea = Q.find(".select-overlay");
|
|
2156
|
+
N(ea)
|
|
2157
|
+
}, 0))
|
|
2134
2158
|
}))().then(N => {
|
|
2135
2159
|
window._selectCloseTimer && clearTimeout(window._selectCloseTimer);
|
|
2136
2160
|
g = !0;
|
|
2137
2161
|
N.off("click.selectOverlay");
|
|
2138
2162
|
if (!b.data("groupClicked")) {
|
|
2139
|
-
var
|
|
2140
|
-
|
|
2163
|
+
var Q = b.find("select, ul").first()[0]._selectId;
|
|
2164
|
+
Q && m() && !a.slideToggle && domquery(this).historyOn("select-" + Q, ia => {
|
|
2141
2165
|
wa = 2;
|
|
2142
2166
|
if (0 === ia) {
|
|
2143
2167
|
wa = 1;
|
|
@@ -2145,38 +2169,37 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2145
2169
|
isMobile: !1
|
|
2146
2170
|
};
|
|
2147
2171
|
ia = $('[class*="-wrapper"][class*="open"]').filter(function() {
|
|
2148
|
-
const
|
|
2149
|
-
return
|
|
2172
|
+
const la = $(this).data("settings");
|
|
2173
|
+
return la && !la.slideToggle && !0 === va.isMobile
|
|
2150
2174
|
});
|
|
2151
2175
|
ia.length && ia.each(function() {
|
|
2152
|
-
const
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
if ("radio" ===
|
|
2159
|
-
const
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
void 0 !==
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
Ca.html(O(qa.radioColor, qa)))
|
|
2176
|
+
const la = $(this),
|
|
2177
|
+
ra = la.data("settings"),
|
|
2178
|
+
Ea = la.find(`.${ra.optionsClass}`),
|
|
2179
|
+
Fa = parseInt(la.attr("data-duration")),
|
|
2180
|
+
Ca = $(".select-overlay");
|
|
2181
|
+
y(la);
|
|
2182
|
+
if ("radio" === ra.pointer) {
|
|
2183
|
+
const Ga = la.attr("data-selected-value"),
|
|
2184
|
+
Ha = parseInt(la.attr("data-selected-index")),
|
|
2185
|
+
Da = la.find(".trigger-radio");
|
|
2186
|
+
void 0 !== Ga && 0 <= Ha && (Object.assign(Da[0].style, {
|
|
2187
|
+
border: `2px solid ${ra.radioColor}`,
|
|
2188
|
+
backgroundColor: "#fff",
|
|
2189
|
+
width: ra.radioSize,
|
|
2190
|
+
height: ra.radioSize
|
|
2191
|
+
}), Da.html(O(ra.radioColor, ra)))
|
|
2169
2192
|
}
|
|
2170
|
-
|
|
2193
|
+
Ca.css({
|
|
2171
2194
|
"background-color": "rgba(0, 0, 0, 0)"
|
|
2172
2195
|
});
|
|
2173
|
-
|
|
2174
|
-
easing:
|
|
2196
|
+
Ea.slideUp(Fa, {
|
|
2197
|
+
easing: ra.easing,
|
|
2175
2198
|
complete: function() {
|
|
2176
|
-
|
|
2199
|
+
Ca.hide();
|
|
2177
2200
|
domqueryFocus();
|
|
2178
|
-
|
|
2179
|
-
|
|
2201
|
+
la.removeClass(ra.openClass);
|
|
2202
|
+
la.attr("data-state", "closed")
|
|
2180
2203
|
}
|
|
2181
2204
|
})
|
|
2182
2205
|
})
|
|
@@ -2187,8 +2210,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2187
2210
|
visibility: "visible",
|
|
2188
2211
|
opacity: 0
|
|
2189
2212
|
});
|
|
2190
|
-
var
|
|
2191
|
-
|
|
2213
|
+
var ea = Z(b, d);
|
|
2214
|
+
Q = a.optionsStyle.background || "#fff";
|
|
2192
2215
|
N.css({
|
|
2193
2216
|
position: "fixed",
|
|
2194
2217
|
top: 0,
|
|
@@ -2207,28 +2230,28 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2207
2230
|
WebkitUserSelect: "none",
|
|
2208
2231
|
userSelect: "none"
|
|
2209
2232
|
});
|
|
2210
|
-
const
|
|
2211
|
-
|
|
2212
|
-
...
|
|
2233
|
+
const X = g && !a.slideToggle ? 1E4 : 1E3;
|
|
2234
|
+
ea = {
|
|
2235
|
+
...ea
|
|
2213
2236
|
};
|
|
2214
|
-
|
|
2237
|
+
ea.hasOwnProperty("left") || (ea.left =
|
|
2238
|
+
"");
|
|
2215
2239
|
d.css({
|
|
2216
|
-
...
|
|
2240
|
+
...ea,
|
|
2217
2241
|
opacity: 1,
|
|
2218
2242
|
display: "none",
|
|
2219
|
-
backgroundColor:
|
|
2243
|
+
backgroundColor: Q,
|
|
2220
2244
|
height: a.height || "auto",
|
|
2221
2245
|
Mheight: a.Mheight || "60vh",
|
|
2222
2246
|
minHeight: a.minHeight || "auto",
|
|
2223
2247
|
maxHeight: a.maxHeight || (g ? a.Mheight || "60vh" : a.height || "300px"),
|
|
2224
2248
|
overflowY: "auto",
|
|
2225
|
-
zIndex:
|
|
2249
|
+
zIndex: X
|
|
2226
2250
|
});
|
|
2227
|
-
"" ===
|
|
2228
|
-
d.find("div").first().css("background-color",
|
|
2229
|
-
d.find(`.${a.optionClass}`).css("background-color",
|
|
2230
|
-
|
|
2231
|
-
let ta = !1,
|
|
2251
|
+
"" === ea.left && d.css("left", "");
|
|
2252
|
+
d.find("div").first().css("background-color", Q);
|
|
2253
|
+
d.find(`.${a.optionClass}`).css("background-color", Q);
|
|
2254
|
+
let oa = !1,
|
|
2232
2255
|
Aa = !0;
|
|
2233
2256
|
domquery(d).slideDown(k, {
|
|
2234
2257
|
easing: a.easing,
|
|
@@ -2238,28 +2261,29 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2238
2261
|
}
|
|
2239
2262
|
});
|
|
2240
2263
|
setTimeout(() => {
|
|
2241
|
-
|
|
2242
|
-
|
|
2264
|
+
N.css("background-color", "rgba(0, 0, 0, 0)")
|
|
2265
|
+
},
|
|
2266
|
+
0);
|
|
2243
2267
|
N.on("click.selectOverlay", function(ia) {
|
|
2244
|
-
if (
|
|
2268
|
+
if (oa || Aa) return !1;
|
|
2245
2269
|
wa = 2;
|
|
2246
2270
|
const va = b.find(`.${a.triggerClass}`);
|
|
2247
2271
|
va.css("pointer-events", "none");
|
|
2248
|
-
|
|
2272
|
+
oa = !0;
|
|
2249
2273
|
ia.preventDefault();
|
|
2250
2274
|
ia.stopPropagation();
|
|
2251
2275
|
N.off("click.selectOverlay");
|
|
2252
2276
|
if ("radio" === a.pointer) {
|
|
2253
2277
|
ia = b.attr("data-selected-value");
|
|
2254
|
-
const
|
|
2255
|
-
|
|
2256
|
-
void 0 ===
|
|
2257
|
-
ia && -1 === ma ? qa.css({
|
|
2278
|
+
const la = parseInt(b.attr("data-selected-index")),
|
|
2279
|
+
ra = b.find(".trigger-radio");
|
|
2280
|
+
void 0 === ia && -1 === la ? ra.css({
|
|
2258
2281
|
border: `2px solid ${a.buttonColor}`,
|
|
2259
2282
|
backgroundColor: "#fff",
|
|
2260
2283
|
width: a.radioSize,
|
|
2261
2284
|
height: a.radioSize
|
|
2262
|
-
}).html("") : void 0 !== ia && 0 <=
|
|
2285
|
+
}).html("") : void 0 !== ia && 0 <= la &&
|
|
2286
|
+
ra.css({
|
|
2263
2287
|
border: `2px solid ${a.radioColor}`,
|
|
2264
2288
|
backgroundColor: "#fff",
|
|
2265
2289
|
width: a.radioSize,
|
|
@@ -2278,7 +2302,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2278
2302
|
b.removeClass(a.openClass);
|
|
2279
2303
|
b.attr("data-state", "closed");
|
|
2280
2304
|
b.data("groupClicked", !1);
|
|
2281
|
-
e =
|
|
2305
|
+
e = oa = g = !1;
|
|
2282
2306
|
setTimeout(() => {
|
|
2283
2307
|
va.css("pointer-events", "auto")
|
|
2284
2308
|
}, 0)
|
|
@@ -2289,7 +2313,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2289
2313
|
}, k)
|
|
2290
2314
|
});
|
|
2291
2315
|
setTimeout(function() {
|
|
2292
|
-
|
|
2316
|
+
u.css({
|
|
2293
2317
|
"pointer-events": "",
|
|
2294
2318
|
opacity: ""
|
|
2295
2319
|
})
|
|
@@ -2304,128 +2328,137 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2304
2328
|
var d = b.find(`.${a.optionsClass}`),
|
|
2305
2329
|
k = parseInt(b.attr("data-duration"));
|
|
2306
2330
|
h = d.is(":visible");
|
|
2307
|
-
var
|
|
2308
|
-
|
|
2331
|
+
var u = $('[class*="-option"]'),
|
|
2332
|
+
n = $('[class*="-wrapper"]').not(b).filter(function() {
|
|
2309
2333
|
return $(this).find('[class*="-options"]').is(":visible")
|
|
2310
2334
|
});
|
|
2311
2335
|
if (h && !a.offclick) {
|
|
2312
|
-
h =
|
|
2336
|
+
h =
|
|
2337
|
+
parseInt(b.attr("data-duration"));
|
|
2313
2338
|
if ("radio" === a.pointer) {
|
|
2314
|
-
|
|
2339
|
+
n = b.attr("data-selected-value");
|
|
2315
2340
|
var L = parseInt(b.attr("data-selected-index")),
|
|
2316
2341
|
J = b.find(".trigger-radio");
|
|
2317
|
-
void 0 !==
|
|
2342
|
+
void 0 !== n && 0 <= L && (Object.assign(J[0].style, {
|
|
2318
2343
|
border: `2px solid ${a.radioColor}`,
|
|
2319
2344
|
backgroundColor: "#fff",
|
|
2320
2345
|
width: a.radioSize,
|
|
2321
2346
|
height: a.radioSize
|
|
2322
2347
|
}), J.html(O(a.radioColor, a)))
|
|
2323
2348
|
}
|
|
2324
|
-
|
|
2325
|
-
|
|
2349
|
+
m() && !a.slideToggle ? U(d, h, $(".select-overlay"), b, a) : (b.removeClass(a.openClass), b.attr("data-state", "closed"), h ? a.slideToggle ? d.css({
|
|
2350
|
+
opacity: a.opacity || 0,
|
|
2351
|
+
"will-change": "height, opacity"
|
|
2352
|
+
}).slideUp(h, {
|
|
2326
2353
|
easing: a.easing,
|
|
2327
|
-
complete:
|
|
2328
|
-
|
|
2354
|
+
complete: function() {
|
|
2355
|
+
d.css("will-change", "");
|
|
2356
|
+
domqueryFocus()
|
|
2357
|
+
}
|
|
2358
|
+
}) : d.css("will-change", "height, opacity").slideUp(h, {
|
|
2329
2359
|
easing: a.easing,
|
|
2330
|
-
complete:
|
|
2360
|
+
complete: function() {
|
|
2361
|
+
d.css("will-change", "");
|
|
2362
|
+
domqueryFocus()
|
|
2363
|
+
}
|
|
2331
2364
|
}) : (d.hide(), domqueryFocus()));
|
|
2332
2365
|
return !1
|
|
2333
2366
|
}
|
|
2334
|
-
if (0 <
|
|
2367
|
+
if (0 < n.length) return n.each(function() {
|
|
2335
2368
|
const r = $(this),
|
|
2336
2369
|
F = r.data("settings");
|
|
2337
2370
|
if (F) {
|
|
2338
|
-
var
|
|
2339
|
-
|
|
2371
|
+
var t = r.find(`.${F.optionsClass}`),
|
|
2372
|
+
v = parseInt(r.attr("data-duration"));
|
|
2340
2373
|
r.removeClass(F.openClass).attr("data-state", "closed");
|
|
2341
|
-
|
|
2342
|
-
r, F) :
|
|
2374
|
+
m() && !F.slideToggle ? U(t, v || 0, $(".select-overlay"),
|
|
2375
|
+
r, F) : v ? F.slideToggle ? t.css("opacity", F.opacity || 0).slideUp(v, {
|
|
2343
2376
|
easing: F.easing
|
|
2344
|
-
}) :
|
|
2377
|
+
}) : t.slideUp(v, {
|
|
2345
2378
|
easing: F.easing
|
|
2346
|
-
}) :
|
|
2379
|
+
}) : t.hide()
|
|
2347
2380
|
}
|
|
2348
2381
|
}), !1;
|
|
2349
2382
|
if (a.pointer && a.pointer.startsWith("question_")) {
|
|
2350
|
-
|
|
2383
|
+
n = a.pointer.split("_")[1];
|
|
2351
2384
|
L = b[0].hasAttribute("data-aun");
|
|
2352
2385
|
J = b.find("select").first();
|
|
2353
2386
|
const r = parseInt(b.attr("data-current-index")),
|
|
2354
2387
|
F = J.find("option").eq(r);
|
|
2355
2388
|
J = {
|
|
2356
2389
|
value: F.val(),
|
|
2357
|
-
text:
|
|
2358
|
-
html:
|
|
2390
|
+
text: p(F.html(), 1),
|
|
2391
|
+
html: p(F.html()),
|
|
2359
2392
|
tag: F.attr("tag"),
|
|
2360
|
-
group:
|
|
2393
|
+
group: A(R(J[0], r).text),
|
|
2361
2394
|
index: r
|
|
2362
2395
|
};
|
|
2363
|
-
if (L && (f.preventDefault(), f.stopPropagation(), "function" === typeof window[
|
|
2364
|
-
"_cancel"])) return window[
|
|
2365
|
-
const
|
|
2366
|
-
var
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
Object.assign(
|
|
2396
|
+
if (L && (f.preventDefault(), f.stopPropagation(), "function" === typeof window[n +
|
|
2397
|
+
"_cancel"])) return window[n + "_reset"] = function() {
|
|
2398
|
+
const t = b.find(`.${a.triggerClass}`);
|
|
2399
|
+
var v = b.find("select, ul").first();
|
|
2400
|
+
v.find("option, li").first().prop("selected", !0);
|
|
2401
|
+
v = v.find("option, li").first().text();
|
|
2402
|
+
t.text(v);
|
|
2403
|
+
v = document.createElement("div");
|
|
2404
|
+
v.className = "custom-question trigger-question";
|
|
2405
|
+
Object.assign(v.style, {
|
|
2373
2406
|
...a.questionStyle,
|
|
2374
2407
|
width: a.questionSize,
|
|
2375
2408
|
height: a.questionSize,
|
|
2376
2409
|
fontSize: `calc(${a.questionSize} * 0.6)`
|
|
2377
2410
|
});
|
|
2378
|
-
|
|
2379
|
-
|
|
2411
|
+
v.innerHTML = "?";
|
|
2412
|
+
t.append(v);
|
|
2380
2413
|
b.removeClass(a.openClass);
|
|
2381
2414
|
b[0].removeAttribute("data-aun")
|
|
2382
2415
|
},
|
|
2383
|
-
window[
|
|
2416
|
+
window[n + "_cancel"](J), !1;
|
|
2384
2417
|
b.find(`.${a.optionClass}`).each(function() {
|
|
2385
|
-
const
|
|
2386
|
-
|
|
2387
|
-
if (
|
|
2388
|
-
var
|
|
2389
|
-
|
|
2390
|
-
const
|
|
2391
|
-
let K =
|
|
2392
|
-
var
|
|
2393
|
-
Object.assign(
|
|
2418
|
+
const t = $(this);
|
|
2419
|
+
t.find(".custom-question, .custom-group-arrow").remove();
|
|
2420
|
+
if (t.hasClass("group-option")) {
|
|
2421
|
+
var v = document.createElement("div");
|
|
2422
|
+
v.className = "custom-group-arrow";
|
|
2423
|
+
const ba = aa(a);
|
|
2424
|
+
let K = ba.arrowSizeValue;
|
|
2425
|
+
var C = ba.arrowRightValue;
|
|
2426
|
+
Object.assign(v.style, {
|
|
2394
2427
|
position: "absolute",
|
|
2395
|
-
right:
|
|
2428
|
+
right: C,
|
|
2396
2429
|
top: "50%",
|
|
2397
2430
|
transform: "translateY(-50%) rotate(0deg)",
|
|
2398
2431
|
width: "0",
|
|
2399
2432
|
height: "0",
|
|
2400
2433
|
borderLeft: `${K} solid transparent`,
|
|
2401
2434
|
borderRight: `${K} solid transparent`,
|
|
2402
|
-
borderTop: `${K} solid ${
|
|
2435
|
+
borderTop: `${K} solid ${ba.arrowColorValue}`,
|
|
2403
2436
|
transition: "all 0.3s ease"
|
|
2404
2437
|
});
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
isNaN(
|
|
2409
|
-
} else
|
|
2438
|
+
t.append(v);
|
|
2439
|
+
v = parseFloat(K);
|
|
2440
|
+
C = parseFloat(C);
|
|
2441
|
+
isNaN(v) || isNaN(C) || t[0].style.setProperty("padding-right", `${2*v+C+10}px`, "important")
|
|
2442
|
+
} else C = document.createElement("div"), C.className = "custom-question option-question", Object.assign(C.style, a.questionStyle), C.innerHTML = `<span style="font-size: calc(${a.questionSize} * 0.6);">?</span>`, t.append(C)
|
|
2410
2443
|
})
|
|
2411
2444
|
}
|
|
2412
|
-
|
|
2445
|
+
n = $('[class*="-wrapper"][class*="open"]').filter(function() {
|
|
2413
2446
|
const r = $(this).data("settings");
|
|
2414
2447
|
return r && r.pointer && r.pointer.startsWith("question_") && "true" === $(this).attr("data-aun")
|
|
2415
2448
|
});
|
|
2416
|
-
if (
|
|
2449
|
+
if (n.length) h = n.data("settings").pointer.split("_")[1], "function" === typeof window[h + "_close"] && (window[h + "_close"](), domqueryFocus());
|
|
2417
2450
|
else {
|
|
2418
|
-
if ("checkbox" === a.pointer || a.pointer?.startsWith("checkbox_"))
|
|
2451
|
+
if ("checkbox" === a.pointer || a.pointer?.startsWith("checkbox_")) n = b.find(`.${a.triggerClass}`), b.find(`.${a.optionClass}`).each(function() {
|
|
2419
2452
|
const r = $(this);
|
|
2420
2453
|
if (r.hasClass("group-option") || r.attr("data-group") || r.data("group")) r.find(".custom-checkbox").remove();
|
|
2421
2454
|
else {
|
|
2422
2455
|
var F = "true" ===
|
|
2423
2456
|
r.attr("data-checked");
|
|
2424
2457
|
r.find(".custom-checkbox").remove();
|
|
2425
|
-
const
|
|
2426
|
-
|
|
2427
|
-
Object.assign(
|
|
2428
|
-
...
|
|
2458
|
+
const t = document.createElement("div");
|
|
2459
|
+
t.className = "custom-checkbox option-checkbox";
|
|
2460
|
+
Object.assign(t.style, {
|
|
2461
|
+
...W(),
|
|
2429
2462
|
border: F ? `2px solid ${a.checkboxColor}` : `2px solid ${a.buttonColor}`,
|
|
2430
2463
|
borderRadius: "3px",
|
|
2431
2464
|
backgroundColor: F ? a.checkboxColor : "#fff",
|
|
@@ -2434,12 +2467,12 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2434
2467
|
width: a.checkboxSize,
|
|
2435
2468
|
height: a.checkboxSize
|
|
2436
2469
|
});
|
|
2437
|
-
F ? (
|
|
2470
|
+
F ? (t.innerHTML = E(a.checkboxSize), a.selectedBg && (F = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg, r.addClass("selected").addClass("selected-bg-active"),
|
|
2438
2471
|
r[0].style.setProperty("background-color", F, "important"), r.css("font-weight", "normal"))) : a.selectedBg && (r.removeClass("selected").removeClass("selected-bg-active"), r[0].style.removeProperty("background-color"), r.css("font-weight", "normal"));
|
|
2439
|
-
r.append(
|
|
2472
|
+
r.append(t)
|
|
2440
2473
|
}
|
|
2441
|
-
}),
|
|
2442
|
-
...
|
|
2474
|
+
}), n.find(".custom-checkbox").length || (L = document.createElement("div"), L.className = "custom-checkbox trigger-checkbox", J = parseInt(b.attr("data-check-count")) || 0, Object.assign(L.style, {
|
|
2475
|
+
...W(),
|
|
2443
2476
|
position: "absolute",
|
|
2444
2477
|
right: "10px",
|
|
2445
2478
|
top: "50%",
|
|
@@ -2451,24 +2484,24 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2451
2484
|
display: "block",
|
|
2452
2485
|
width: a.checkboxSize,
|
|
2453
2486
|
height: a.checkboxSize
|
|
2454
|
-
}), 0 < J && (L.innerHTML =
|
|
2487
|
+
}), 0 < J && (L.innerHTML = ja(J, a.checkboxSize)), n.append(L));
|
|
2455
2488
|
if (!a.offclick || !b.hasClass(a.openClass)) {
|
|
2456
|
-
var
|
|
2457
|
-
if (h) b.removeClass(a.openClass), b.attr("data-state", "closed"),
|
|
2489
|
+
var D = !1;
|
|
2490
|
+
if (h) b.removeClass(a.openClass), b.attr("data-state", "closed"), ma(u), u.removeClass(a.highlightedClass), u.each(function() {
|
|
2458
2491
|
const r = $(this);
|
|
2459
2492
|
r.hasClass("selected") && a.selectedBg ? (r.addClass("selected-bg-active"),
|
|
2460
2493
|
r.css("opacity", "1")) : r.removeClass("selected-bg-active")
|
|
2461
|
-
}), "radio" === a.pointer && (h = b.attr("data-selected-value"),
|
|
2494
|
+
}), "radio" === a.pointer && (h = b.attr("data-selected-value"), n = b.find(".trigger-radio"), n.length && (void 0 !== h ? (Object.assign(n[0].style, {
|
|
2462
2495
|
border: `2px solid ${a.radioColor}`,
|
|
2463
2496
|
backgroundColor: "#fff",
|
|
2464
2497
|
width: a.radioSize,
|
|
2465
2498
|
height: a.radioSize
|
|
2466
|
-
}),
|
|
2499
|
+
}), n[0].innerHTML = void 0 !== h ? O(a.radioColor, a) : "") : (Object.assign(n[0].style, {
|
|
2467
2500
|
border: `2px solid ${a.buttonColor}`,
|
|
2468
2501
|
backgroundColor: "#fff",
|
|
2469
2502
|
width: a.radioSize,
|
|
2470
2503
|
height: a.radioSize
|
|
2471
|
-
}),
|
|
2504
|
+
}), n[0].innerHTML = ""))), M(d, k, a);
|
|
2472
2505
|
else {
|
|
2473
2506
|
if (a.delay &&
|
|
2474
2507
|
0 < parseInt(a.delay)) {
|
|
@@ -2502,25 +2535,25 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2502
2535
|
if (h && !0 !== h.offclick && (!h.pointer || !h.pointer.startsWith("question_") || "true" !== a.attr("data-aun"))) {
|
|
2503
2536
|
var d = a.find(`.${h.optionsClass}`),
|
|
2504
2537
|
k = parseInt(a.attr("data-duration")),
|
|
2505
|
-
|
|
2538
|
+
u = function() {
|
|
2506
2539
|
a.find('[class*="-option"]').removeClass("selected");
|
|
2507
|
-
[50, 100, 200].forEach(
|
|
2540
|
+
[50, 100, 200].forEach(n => {
|
|
2508
2541
|
setTimeout(() => {
|
|
2509
2542
|
const L = a.find('[class*="-option"].selected');
|
|
2510
2543
|
0 < L.length && L.removeClass("selected")
|
|
2511
|
-
},
|
|
2544
|
+
}, n)
|
|
2512
2545
|
})
|
|
2513
2546
|
};
|
|
2514
|
-
if (
|
|
2515
|
-
k, $(".select-overlay"), a, h),
|
|
2547
|
+
if (m() && !h.slideToggle) U(d,
|
|
2548
|
+
k, $(".select-overlay"), a, h), u();
|
|
2516
2549
|
else {
|
|
2517
2550
|
a.removeClass(h.openClass);
|
|
2518
2551
|
a.attr("data-state", "closed");
|
|
2519
2552
|
if ("radio" === h.pointer) {
|
|
2520
|
-
const
|
|
2553
|
+
const n = a.attr("data-selected-value"),
|
|
2521
2554
|
L = parseInt(a.attr("data-selected-index")),
|
|
2522
2555
|
J = a.find(".trigger-radio");
|
|
2523
|
-
void 0 !==
|
|
2556
|
+
void 0 !== n && 0 <= L && (Object.assign(J[0].style, {
|
|
2524
2557
|
border: `2px solid ${h.radioColor}`,
|
|
2525
2558
|
backgroundColor: "#fff",
|
|
2526
2559
|
width: h.radioSize,
|
|
@@ -2530,12 +2563,12 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2530
2563
|
k ? (h.slideToggle && d.css("opacity", h.opacity || 0), d.slideUp(k, {
|
|
2531
2564
|
easing: h.easing,
|
|
2532
2565
|
complete: function() {
|
|
2533
|
-
|
|
2534
|
-
|
|
2566
|
+
y(a);
|
|
2567
|
+
u();
|
|
2535
2568
|
domqueryFocus()
|
|
2536
2569
|
}
|
|
2537
2570
|
})) :
|
|
2538
|
-
(
|
|
2571
|
+
(u(), d.hide(), y(a), domqueryFocus())
|
|
2539
2572
|
}
|
|
2540
2573
|
}
|
|
2541
2574
|
}))
|
|
@@ -2551,34 +2584,40 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2551
2584
|
if (a && !0 !== a.offclick && (!a.pointer || !a.pointer.startsWith("question_") || "true" !== b.attr("data-aun"))) {
|
|
2552
2585
|
var h = b.find(`.${a.optionsClass}`),
|
|
2553
2586
|
d = parseInt(b.attr("data-duration"));
|
|
2554
|
-
if (
|
|
2587
|
+
if (m() && !a.slideToggle) U(h, d, $(".select-overlay"), b, a);
|
|
2555
2588
|
else {
|
|
2556
2589
|
b.removeClass(a.openClass);
|
|
2557
2590
|
b.attr("data-state", "closed");
|
|
2558
2591
|
if ("radio" === a.pointer) {
|
|
2559
2592
|
const k = b.attr("data-selected-value"),
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
void 0 !== k && 0 <=
|
|
2593
|
+
u = parseInt(b.attr("data-selected-index")),
|
|
2594
|
+
n = b.find(".trigger-radio");
|
|
2595
|
+
void 0 !== k && 0 <= u && (Object.assign(n[0].style, {
|
|
2563
2596
|
border: `2px solid ${a.radioColor}`,
|
|
2564
2597
|
backgroundColor: "#fff",
|
|
2565
2598
|
width: a.radioSize,
|
|
2566
2599
|
height: a.radioSize
|
|
2567
|
-
}),
|
|
2600
|
+
}), n.html(O(a.radioColor, a)))
|
|
2568
2601
|
}
|
|
2569
|
-
d ? a.slideToggle ? h.css(
|
|
2602
|
+
d ? a.slideToggle ? h.css({
|
|
2603
|
+
opacity: a.opacity || 0,
|
|
2604
|
+
"will-change": "height, opacity"
|
|
2605
|
+
}).slideUp(d, {
|
|
2570
2606
|
easing: a.easing,
|
|
2571
2607
|
complete: function() {
|
|
2572
|
-
|
|
2608
|
+
h.css("will-change",
|
|
2609
|
+
"");
|
|
2610
|
+
y(b);
|
|
2573
2611
|
domqueryFocus()
|
|
2574
2612
|
}
|
|
2575
|
-
}) : h.slideUp(d, {
|
|
2613
|
+
}) : h.css("will-change", "height, opacity").slideUp(d, {
|
|
2576
2614
|
easing: a.easing,
|
|
2577
2615
|
complete: function() {
|
|
2578
|
-
|
|
2616
|
+
h.css("will-change", "");
|
|
2617
|
+
y(b);
|
|
2579
2618
|
domqueryFocus()
|
|
2580
2619
|
}
|
|
2581
|
-
}) : (h.hide(),
|
|
2620
|
+
}) : (h.hide(), y(b), domqueryFocus())
|
|
2582
2621
|
}
|
|
2583
2622
|
}
|
|
2584
2623
|
}
|
|
@@ -2588,24 +2627,25 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2588
2627
|
const c = $(this),
|
|
2589
2628
|
b = c.data("settings");
|
|
2590
2629
|
b && !0 !== b.offclick && setTimeout(() => {
|
|
2591
|
-
if ($('[class*="-wrapper"][class*="open"]').length && !(0 < $(document.activeElement).closest('[class*="-wrapper"]').length || b.pointer && b.pointer.startsWith("question_") && "true" ===
|
|
2630
|
+
if ($('[class*="-wrapper"][class*="open"]').length && !(0 < $(document.activeElement).closest('[class*="-wrapper"]').length || b.pointer && b.pointer.startsWith("question_") && "true" ===
|
|
2631
|
+
c.attr("data-aun"))) {
|
|
2592
2632
|
var a = c.find(`.${b.optionsClass}`),
|
|
2593
2633
|
h = parseInt(c.attr("data-duration"));
|
|
2594
|
-
if (
|
|
2595
|
-
h, $(".select-overlay"), c, b);
|
|
2634
|
+
if (m() && !b.slideToggle) U(a, h, $(".select-overlay"), c, b);
|
|
2596
2635
|
else {
|
|
2597
2636
|
c.removeClass(b.openClass);
|
|
2598
2637
|
c.attr("data-state", "closed");
|
|
2599
2638
|
if ("radio" === b.pointer) {
|
|
2600
2639
|
const d = c.attr("data-selected-value"),
|
|
2601
2640
|
k = parseInt(c.attr("data-selected-index")),
|
|
2602
|
-
|
|
2603
|
-
void 0 !== d && 0 <= k && (Object.assign(
|
|
2641
|
+
u = c.find(".trigger-radio");
|
|
2642
|
+
void 0 !== d && 0 <= k && (Object.assign(u[0].style, {
|
|
2604
2643
|
border: `2px solid ${b.radioColor}`,
|
|
2605
2644
|
backgroundColor: "#fff",
|
|
2606
2645
|
width: b.radioSize,
|
|
2607
2646
|
height: b.radioSize
|
|
2608
|
-
}),
|
|
2647
|
+
}), u.html(O(b.radioColor,
|
|
2648
|
+
b)))
|
|
2609
2649
|
}
|
|
2610
2650
|
h ? (b.slideToggle && a.css("opacity", b.opacity || 0), a.slideUp(h, {
|
|
2611
2651
|
easing: b.easing
|
|
@@ -2614,579 +2654,578 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
|
|
|
2614
2654
|
}
|
|
2615
2655
|
}, 0)
|
|
2616
2656
|
});
|
|
2617
|
-
$(window).on("resize",
|
|
2618
|
-
function() {
|
|
2619
|
-
$(
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
c && !0 !== c.slideToggle && (c = f.find(`.${c.optionsClass}`), f = W(f, c), c.css(f))
|
|
2623
|
-
})
|
|
2657
|
+
$(window).on("resize", function() {
|
|
2658
|
+
$('[class*="-wrapper"][class*="open"]').each(function() {
|
|
2659
|
+
var f = $(this),
|
|
2660
|
+
c = f.data("settings");
|
|
2661
|
+
c && !0 !== c.slideToggle && (c = f.find(`.${c.optionsClass}`), f = Z(f, c), c.css(f))
|
|
2624
2662
|
})
|
|
2663
|
+
})
|
|
2625
2664
|
}
|
|
2626
2665
|
return this
|
|
2627
2666
|
};
|
|
2628
|
-
$.fn.select = function(
|
|
2629
|
-
const
|
|
2630
|
-
if (
|
|
2631
|
-
var
|
|
2632
|
-
|
|
2633
|
-
const
|
|
2667
|
+
$.fn.select = function(w, l, H) {
|
|
2668
|
+
const x = function(m, A, p) {
|
|
2669
|
+
if (p) {
|
|
2670
|
+
var R = A.val();
|
|
2671
|
+
p.pointer ? "radio" === p.pointer ? m.find(".custom-radio").each(function() {
|
|
2672
|
+
const O = $(this).closest('[class*="-option"]').attr("data-value") === R;
|
|
2634
2673
|
$(this).css({
|
|
2635
|
-
border:
|
|
2674
|
+
border: O ? `2px solid ${p.radioColor}` : `2px solid ${p.buttonColor}`,
|
|
2636
2675
|
backgroundColor: "#fff"
|
|
2637
|
-
}).html(
|
|
2638
|
-
}) : "checkbox" ===
|
|
2639
|
-
const
|
|
2640
|
-
|
|
2676
|
+
}).html(O ? upHTMe(p.radioColor, p) : "")
|
|
2677
|
+
}) : "checkbox" === p.pointer ? m.find(".custom-checkbox").each(function() {
|
|
2678
|
+
const O = $(this).closest('[class*="-option"]').attr("data-value") === R,
|
|
2679
|
+
E = p.checkboxColor ||
|
|
2641
2680
|
"#2196F3",
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
border: `2px solid ${
|
|
2645
|
-
backgroundColor:
|
|
2646
|
-
}).html(upHTMe2(
|
|
2647
|
-
border: `2px solid ${
|
|
2681
|
+
ja = p.checkboxSize || "16px";
|
|
2682
|
+
O ? $(this).css({
|
|
2683
|
+
border: `2px solid ${E}`,
|
|
2684
|
+
backgroundColor: E
|
|
2685
|
+
}).html(upHTMe2(ja)) : $(this).css({
|
|
2686
|
+
border: `2px solid ${p.buttonColor||"#ccc"}`,
|
|
2648
2687
|
backgroundColor: "#fff"
|
|
2649
2688
|
}).html("")
|
|
2650
|
-
}) :
|
|
2651
|
-
$(this).closest('[class*="-option"]').attr("data-value") ===
|
|
2652
|
-
}) :
|
|
2689
|
+
}) : p.pointer.startsWith("question_") && m.find(".custom-question").each(function() {
|
|
2690
|
+
$(this).closest('[class*="-option"]').attr("data-value") === R ? $(this).addClass("active") : $(this).removeClass("active")
|
|
2691
|
+
}) : p.dot && m.find(".custom-dot").each(function() {
|
|
2653
2692
|
$(this).closest('[class*="-option"]').attr("data-value") ===
|
|
2654
|
-
|
|
2693
|
+
R ? $(this).css(p.dotSelectedStyle || {}) : $(this).css(p.dotStyle || {})
|
|
2655
2694
|
})
|
|
2656
2695
|
}
|
|
2657
2696
|
};
|
|
2658
|
-
if ("string" === typeof
|
|
2659
|
-
if ("value" ===
|
|
2660
|
-
const
|
|
2661
|
-
if (
|
|
2697
|
+
if ("string" === typeof w) {
|
|
2698
|
+
if ("value" === w) return "" === l || null === l || void 0 === l ? this.each(function() {
|
|
2699
|
+
const m = $(this).find('option[value=""]');
|
|
2700
|
+
if (m.length) return $(this).select("index", m.index())
|
|
2662
2701
|
}) : this.each(function() {
|
|
2663
|
-
const
|
|
2702
|
+
const m = $(this);
|
|
2664
2703
|
if (this._selectId) {
|
|
2665
|
-
var
|
|
2666
|
-
if (
|
|
2667
|
-
var
|
|
2668
|
-
const
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
"data-selected-value":
|
|
2673
|
-
"data-selected-index":
|
|
2704
|
+
var A = m.find(`option[value="${l}"]`);
|
|
2705
|
+
if (A.length) {
|
|
2706
|
+
var p = $(".select-" + (this._selectId + "-wrapper"));
|
|
2707
|
+
const O = p.data("settings");
|
|
2708
|
+
m.find("option").prop("selected", !1);
|
|
2709
|
+
A.prop("selected", !0);
|
|
2710
|
+
p.attr({
|
|
2711
|
+
"data-selected-value": A.val(),
|
|
2712
|
+
"data-selected-index": A.index()
|
|
2674
2713
|
});
|
|
2675
|
-
var
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
const
|
|
2679
|
-
|
|
2680
|
-
|
|
2714
|
+
var R = p.find('[class*="-option"]');
|
|
2715
|
+
R.removeClass("selected").removeClass("selected-bg-active").css("font-weight", "normal");
|
|
2716
|
+
O.selectedBg && R.each(function() {
|
|
2717
|
+
const aa = $(this),
|
|
2718
|
+
T = (aa.attr("style") || "").replace(/background-color:[^;]+;?/g, "");
|
|
2719
|
+
aa.attr("style", T)
|
|
2681
2720
|
});
|
|
2682
|
-
const
|
|
2683
|
-
if (
|
|
2721
|
+
const E = p.find(`[data-value="${A.val()}"]`);
|
|
2722
|
+
if (E.length) {
|
|
2684
2723
|
setTimeout(() => {
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
!0 ===
|
|
2724
|
+
E.addClass("selected");
|
|
2725
|
+
O.selectedBg ? (E.addClass("selected-bg-active"), E[0].style.setProperty("background-color",
|
|
2726
|
+
!0 === O.selectedBg ? rgbToRgba(O.activeBackground, .5) : O.selectedBg, "important"), E.css("font-weight", "normal")) : E.css("font-weight", "bold")
|
|
2688
2727
|
}, 300);
|
|
2689
|
-
const
|
|
2690
|
-
if (
|
|
2691
|
-
|
|
2692
|
-
if (0 <
|
|
2693
|
-
const
|
|
2694
|
-
|
|
2695
|
-
if (
|
|
2696
|
-
|
|
2697
|
-
var M =
|
|
2728
|
+
const aa = p.find('[class*="-options"]');
|
|
2729
|
+
if (aa.length) {
|
|
2730
|
+
R = (E.attr("class")?.split(" ") || []).filter(T => T !== O.optionClass && "selected" !== T && T !== O.highlightedClass && !T.includes("wrapper") && !T.includes("options"));
|
|
2731
|
+
if (0 < R.length) {
|
|
2732
|
+
const T = new Set,
|
|
2733
|
+
Y = y => {
|
|
2734
|
+
if (y && !T.has(y)) {
|
|
2735
|
+
T.add(y);
|
|
2736
|
+
var M = aa.find(`[data-group="${y}"]`);
|
|
2698
2737
|
M.length && (M.addClass("expanded"), M.find(".custom-group-arrow").css("transform",
|
|
2699
|
-
"translateY(-50%) rotate(180deg)"),
|
|
2700
|
-
"group-option" !==
|
|
2738
|
+
"translateY(-50%) rotate(180deg)"), aa.find(`.${y}`).show(), (M.attr("class")?.split(" ") || []).forEach(I => {
|
|
2739
|
+
"group-option" !== I && "expanded" !== I && Y(I)
|
|
2701
2740
|
}))
|
|
2702
2741
|
}
|
|
2703
2742
|
};
|
|
2704
|
-
|
|
2743
|
+
R.forEach(y => Y(y))
|
|
2705
2744
|
}
|
|
2706
|
-
void 0 !==
|
|
2707
|
-
|
|
2745
|
+
void 0 !== O.autoScrollToSelected && O.autoScrollToSelected && (R = parseInt(p.attr("data-duration")) || 300, setTimeout(() => {
|
|
2746
|
+
aa.find("div").first().length && E.length && E[0] && "function" === typeof E[0].scrollIntoView && E[0].scrollIntoView({
|
|
2708
2747
|
block: "center",
|
|
2709
2748
|
behavior: "smooth"
|
|
2710
2749
|
})
|
|
2711
|
-
},
|
|
2750
|
+
}, R))
|
|
2712
2751
|
}
|
|
2713
2752
|
}
|
|
2714
|
-
p
|
|
2715
|
-
|
|
2753
|
+
x(p, A, O);
|
|
2754
|
+
p = p.find('[class*="-trigger"]');
|
|
2716
2755
|
|
|
2717
|
-
function
|
|
2718
|
-
var
|
|
2719
|
-
if (!
|
|
2720
|
-
const
|
|
2721
|
-
|
|
2722
|
-
for (let
|
|
2723
|
-
var M =
|
|
2724
|
-
if (M.length && (
|
|
2756
|
+
function ja(aa, T) {
|
|
2757
|
+
var Y = T.attr("class");
|
|
2758
|
+
if (!Y) return T.text();
|
|
2759
|
+
const y = [];
|
|
2760
|
+
Y = Y.split(" ");
|
|
2761
|
+
for (let I = 0; I < Y.length; I++) {
|
|
2762
|
+
var M = aa.find(`option[group="${Y[I]}"]`);
|
|
2763
|
+
if (M.length && (y.push(M.text()), M = M.attr("class"))) {
|
|
2725
2764
|
M = M.split(" ");
|
|
2726
|
-
for (let
|
|
2727
|
-
const Z =
|
|
2728
|
-
Z.length &&
|
|
2765
|
+
for (let U = 0; U < M.length; U++) {
|
|
2766
|
+
const Z = aa.find(`option[group="${M[U]}"]`);
|
|
2767
|
+
Z.length && y.unshift(Z.text())
|
|
2729
2768
|
}
|
|
2730
2769
|
}
|
|
2731
2770
|
}
|
|
2732
|
-
|
|
2733
|
-
return [...(new Set(
|
|
2771
|
+
y.push(T.text());
|
|
2772
|
+
return [...(new Set(y))].join(" > ")
|
|
2734
2773
|
}
|
|
2735
|
-
let
|
|
2736
|
-
if (
|
|
2737
|
-
|
|
2738
|
-
} catch (
|
|
2774
|
+
let W;
|
|
2775
|
+
if (m.find("option[group]").length) try {
|
|
2776
|
+
W = "function" === typeof findGroupPath ? findGroupPath(this, A.index()).text : ja(m, A)
|
|
2777
|
+
} catch (aa) {
|
|
2739
2778
|
console.warn("\uadf8\ub8f9 \uacbd\ub85c \uad6c\uc131 \uc911 \uc624\ub958 \ubc1c\uc0dd:",
|
|
2740
|
-
|
|
2741
|
-
} else
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2779
|
+
aa), W = A.text()
|
|
2780
|
+
} else W = A.text();
|
|
2781
|
+
A = p.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
|
|
2782
|
+
R = p.find('span[style*="position: absolute"]').clone();
|
|
2783
|
+
O && O.allowHTML ? p.html(W) : p.text(W);
|
|
2784
|
+
A.length && p.append(A);
|
|
2785
|
+
R.length && p.append(R);
|
|
2786
|
+
m.val(l)
|
|
2748
2787
|
}
|
|
2749
2788
|
} else console.warn("Select element was not initialized with $.select() method")
|
|
2750
2789
|
});
|
|
2751
|
-
if ("index" ===
|
|
2752
|
-
var
|
|
2790
|
+
if ("index" === w && "number" === typeof l) return this.each(function() {
|
|
2791
|
+
var m = $(this);
|
|
2753
2792
|
if (this._selectId) {
|
|
2754
|
-
var
|
|
2755
|
-
if (
|
|
2756
|
-
var
|
|
2793
|
+
var A = m.find("option").eq(l);
|
|
2794
|
+
if (A.length) {
|
|
2795
|
+
var p = $(".select-" + (this._selectId +
|
|
2757
2796
|
"-wrapper"));
|
|
2758
|
-
const
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
"data-selected-value":
|
|
2797
|
+
const O = p.data("settings");
|
|
2798
|
+
m.find("option").prop("selected", !1);
|
|
2799
|
+
A.prop("selected", !0);
|
|
2800
|
+
p.attr({
|
|
2801
|
+
"data-selected-value": A.val(),
|
|
2763
2802
|
"data-selected-index": l
|
|
2764
2803
|
});
|
|
2765
|
-
var
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
const
|
|
2769
|
-
|
|
2770
|
-
|
|
2804
|
+
var R = p.find('[class*="-option"]');
|
|
2805
|
+
R.removeClass("selected").removeClass("selected-bg-active").css("font-weight", "normal");
|
|
2806
|
+
O.selectedBg && R.each(function() {
|
|
2807
|
+
const aa = $(this),
|
|
2808
|
+
T = (aa.attr("style") || "").replace(/background-color:[^;]+;?/g, "");
|
|
2809
|
+
aa.attr("style", T)
|
|
2771
2810
|
});
|
|
2772
|
-
const
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2811
|
+
const E = p.find(`[data-value="${A.val()}"]`);
|
|
2812
|
+
E.length && setTimeout(() => {
|
|
2813
|
+
E.addClass("selected");
|
|
2814
|
+
O.selectedBg ? (E.addClass("selected-bg-active"), E[0].style.setProperty("background-color", O.selectedBg, "important"), E.css("font-weight", "normal")) : E.css("font-weight", "bold")
|
|
2776
2815
|
}, 300);
|
|
2777
|
-
p
|
|
2778
|
-
|
|
2816
|
+
x(p, A, O);
|
|
2817
|
+
p = p.find('[class*="-trigger"]');
|
|
2779
2818
|
|
|
2780
|
-
function
|
|
2781
|
-
var
|
|
2782
|
-
if (!
|
|
2783
|
-
const
|
|
2784
|
-
|
|
2785
|
-
for (let
|
|
2786
|
-
var M =
|
|
2787
|
-
if (M.length && (
|
|
2819
|
+
function ja(aa, T) {
|
|
2820
|
+
var Y = T.attr("class");
|
|
2821
|
+
if (!Y) return T.text();
|
|
2822
|
+
const y = [];
|
|
2823
|
+
Y = Y.split(" ");
|
|
2824
|
+
for (let I = 0; I < Y.length; I++) {
|
|
2825
|
+
var M = aa.find(`option[group="${Y[I]}"]`);
|
|
2826
|
+
if (M.length && (y.push(M.text()), M = M.attr("class"))) {
|
|
2788
2827
|
M = M.split(" ");
|
|
2789
|
-
for (let
|
|
2790
|
-
const Z =
|
|
2791
|
-
Z.length &&
|
|
2828
|
+
for (let U = 0; U < M.length; U++) {
|
|
2829
|
+
const Z = aa.find(`option[group="${M[U]}"]`);
|
|
2830
|
+
Z.length && y.unshift(Z.text())
|
|
2792
2831
|
}
|
|
2793
2832
|
}
|
|
2794
2833
|
}
|
|
2795
|
-
|
|
2796
|
-
return [...(new Set(
|
|
2834
|
+
y.push(T.text());
|
|
2835
|
+
return [...(new Set(y))].join(" > ")
|
|
2797
2836
|
}
|
|
2798
|
-
let
|
|
2799
|
-
if (
|
|
2800
|
-
|
|
2801
|
-
} catch (
|
|
2802
|
-
console.warn("\uadf8\ub8f9 \uacbd\ub85c \uad6c\uc131 \uc911 \uc624\ub958 \ubc1c\uc0dd:",
|
|
2803
|
-
} else
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
"function" === typeof
|
|
2837
|
+
let W;
|
|
2838
|
+
if (m.find("option[group]").length) try {
|
|
2839
|
+
W = "function" === typeof findGroupPath ? findGroupPath(this, l).text : ja(m, A)
|
|
2840
|
+
} catch (aa) {
|
|
2841
|
+
console.warn("\uadf8\ub8f9 \uacbd\ub85c \uad6c\uc131 \uc911 \uc624\ub958 \ubc1c\uc0dd:", aa), W = A.text()
|
|
2842
|
+
} else W = A.text();
|
|
2843
|
+
m = p.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
|
|
2844
|
+
R = p.find('span[style*="position: absolute"]').clone();
|
|
2845
|
+
O && O.allowHTML ? p.html(W) : p.text(W);
|
|
2846
|
+
m.length && p.append(m);
|
|
2847
|
+
R.length && p.append(R);
|
|
2848
|
+
"function" === typeof H && H.call(this, {
|
|
2810
2849
|
index: l,
|
|
2811
|
-
value:
|
|
2812
|
-
text:
|
|
2813
|
-
path:
|
|
2850
|
+
value: A.val(),
|
|
2851
|
+
text: A.text(),
|
|
2852
|
+
path: W
|
|
2814
2853
|
})
|
|
2815
2854
|
}
|
|
2816
2855
|
} else console.warn("Select element was not initialized with $.select() method")
|
|
2817
2856
|
});
|
|
2818
|
-
if ("value" ===
|
|
2819
|
-
var
|
|
2857
|
+
if ("value" === w) return this.each(function() {
|
|
2858
|
+
var m = $(this);
|
|
2820
2859
|
if (this._selectId) {
|
|
2821
|
-
var
|
|
2822
|
-
if (
|
|
2823
|
-
var
|
|
2824
|
-
const
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2860
|
+
var A = m.find(`option[value="${l}"]`);
|
|
2861
|
+
if (A.length) {
|
|
2862
|
+
var p = $(".select-" + (this._selectId + "-wrapper"));
|
|
2863
|
+
const O = A.index(),
|
|
2864
|
+
E = p.data("settings");
|
|
2865
|
+
m.find("option").prop("selected", !1);
|
|
2866
|
+
A.prop("selected", !0);
|
|
2867
|
+
p.attr({
|
|
2829
2868
|
"data-selected-value": l,
|
|
2830
|
-
"data-selected-index":
|
|
2869
|
+
"data-selected-index": O
|
|
2831
2870
|
});
|
|
2832
|
-
var
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
const
|
|
2836
|
-
|
|
2837
|
-
|
|
2871
|
+
var R = p.find('[class*="-option"]');
|
|
2872
|
+
R.removeClass("selected").removeClass("selected-bg-active").css("font-weight", "normal");
|
|
2873
|
+
E.selectedBg && R.each(function() {
|
|
2874
|
+
const T = $(this),
|
|
2875
|
+
Y = (T.attr("style") || "").replace(/background-color:[^;]+;?/g, "");
|
|
2876
|
+
T.attr("style", Y)
|
|
2838
2877
|
});
|
|
2839
|
-
const
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
"normal")) :
|
|
2878
|
+
const ja = p.find(`[data-value="${l}"]`);
|
|
2879
|
+
ja.length && setTimeout(() => {
|
|
2880
|
+
ja.addClass("selected");
|
|
2881
|
+
E.selectedBg ? (ja.addClass("selected-bg-active"), ja[0].style.setProperty("background-color", E.selectedBg, "important"), ja.css("font-weight",
|
|
2882
|
+
"normal")) : ja.css("font-weight", "bold")
|
|
2844
2883
|
}, 300);
|
|
2845
|
-
|
|
2846
|
-
const
|
|
2884
|
+
E && E.pointer ? "radio" === E.pointer ? p.find(".custom-radio").each(function() {
|
|
2885
|
+
const T = $(this).closest('[class*="-option"]').attr("data-value") === l;
|
|
2847
2886
|
$(this).css({
|
|
2848
|
-
border:
|
|
2887
|
+
border: T ? `2px solid ${E.radioColor}` : `2px solid ${E.buttonColor}`,
|
|
2849
2888
|
backgroundColor: "#fff"
|
|
2850
|
-
}).html(
|
|
2889
|
+
}).html(T ? `<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${parseInt(E.radioSize)/2}px; height: ${parseInt(E.radioSize)/2}px; background-color: ${E.radioColor}; border-radius: 50%;"></div>` :
|
|
2851
2890
|
"")
|
|
2852
|
-
}) : "checkbox" ===
|
|
2853
|
-
const
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
border: `2px solid ${
|
|
2857
|
-
backgroundColor:
|
|
2891
|
+
}) : "checkbox" === E.pointer ? p.find(".custom-checkbox").each(function() {
|
|
2892
|
+
const T = $(this).closest('[class*="-option"]').attr("data-value") === l,
|
|
2893
|
+
Y = E.checkboxColor || "#2196F3";
|
|
2894
|
+
T ? $(this).css({
|
|
2895
|
+
border: `2px solid ${Y}`,
|
|
2896
|
+
backgroundColor: Y
|
|
2858
2897
|
}).html('<svg viewBox="0 0 24 24" style="fill: white; width: 90%; height: 90%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path></svg>') : $(this).css({
|
|
2859
|
-
border: `2px solid ${
|
|
2898
|
+
border: `2px solid ${E.buttonColor||
|
|
2860
2899
|
"#ccc"}`,
|
|
2861
2900
|
backgroundColor: "#fff"
|
|
2862
2901
|
}).html("")
|
|
2863
|
-
}) :
|
|
2902
|
+
}) : E.pointer.startsWith("question_") && p.find(".custom-question").each(function() {
|
|
2864
2903
|
$(this).closest('[class*="-option"]').attr("data-value") === l ? $(this).addClass("active") : $(this).removeClass("active")
|
|
2865
|
-
}) :
|
|
2866
|
-
const
|
|
2904
|
+
}) : E && E.dot && p.find(".custom-dot").each(function() {
|
|
2905
|
+
const T = $(this).closest('[class*="-option"]').attr("data-value") === l;
|
|
2867
2906
|
$(this).css({
|
|
2868
|
-
border:
|
|
2869
|
-
backgroundColor:
|
|
2907
|
+
border: T ? `2px solid ${E.dotColor}` : `2px solid ${E.buttonColor}`,
|
|
2908
|
+
backgroundColor: T ? E.dotColor : "#fff"
|
|
2870
2909
|
})
|
|
2871
2910
|
});
|
|
2872
|
-
|
|
2911
|
+
p = p.find('[class*="-trigger"]');
|
|
2873
2912
|
|
|
2874
|
-
function
|
|
2875
|
-
var
|
|
2876
|
-
if (!
|
|
2913
|
+
function W(T, Y) {
|
|
2914
|
+
var y = Y.attr("class");
|
|
2915
|
+
if (!y) return Y.text();
|
|
2877
2916
|
const M = [];
|
|
2878
|
-
|
|
2879
|
-
for (let
|
|
2880
|
-
var
|
|
2881
|
-
if (
|
|
2882
|
-
|
|
2883
|
-
for (let Z = 0; Z <
|
|
2884
|
-
const
|
|
2885
|
-
|
|
2917
|
+
y = y.split(" ");
|
|
2918
|
+
for (let U = 0; U < y.length; U++) {
|
|
2919
|
+
var I = T.find(`option[group="${y[U]}"]`);
|
|
2920
|
+
if (I.length && (M.push(I.text()), I = I.attr("class"))) {
|
|
2921
|
+
I = I.split(" ");
|
|
2922
|
+
for (let Z = 0; Z < I.length; Z++) {
|
|
2923
|
+
const ma = T.find(`option[group="${I[Z]}"]`);
|
|
2924
|
+
ma.length && M.unshift(ma.text())
|
|
2886
2925
|
}
|
|
2887
2926
|
}
|
|
2888
2927
|
}
|
|
2889
|
-
M.push(
|
|
2928
|
+
M.push(Y.text());
|
|
2890
2929
|
return [...(new Set(M))].join(" > ")
|
|
2891
2930
|
}
|
|
2892
|
-
let
|
|
2893
|
-
if (
|
|
2894
|
-
|
|
2895
|
-
} catch (
|
|
2931
|
+
let aa;
|
|
2932
|
+
if (m.find("option[group]").length) try {
|
|
2933
|
+
aa = "function" === typeof findGroupPath ? findGroupPath(this, O).text : W(m, A)
|
|
2934
|
+
} catch (T) {
|
|
2896
2935
|
console.warn("\uadf8\ub8f9 \uacbd\ub85c \uad6c\uc131 \uc911 \uc624\ub958 \ubc1c\uc0dd:",
|
|
2897
|
-
|
|
2898
|
-
} else
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
"function" === typeof
|
|
2905
|
-
index:
|
|
2936
|
+
T), aa = A.text()
|
|
2937
|
+
} else aa = A.text();
|
|
2938
|
+
m = p.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
|
|
2939
|
+
R = p.find('span[style*="position: absolute"]').clone();
|
|
2940
|
+
E && E.allowHTML ? p.html(aa) : p.text(aa);
|
|
2941
|
+
m.length && p.append(m);
|
|
2942
|
+
R.length && p.append(R);
|
|
2943
|
+
"function" === typeof H && H.call(this, {
|
|
2944
|
+
index: O,
|
|
2906
2945
|
value: l,
|
|
2907
|
-
text:
|
|
2908
|
-
path:
|
|
2946
|
+
text: A.text(),
|
|
2947
|
+
path: aa
|
|
2909
2948
|
})
|
|
2910
2949
|
}
|
|
2911
2950
|
} else console.warn("Select element was not initialized with $.select() method")
|
|
2912
2951
|
})
|
|
2913
2952
|
}
|
|
2914
|
-
return $.select.call(this,
|
|
2953
|
+
return $.select.call(this, w, l, H)
|
|
2915
2954
|
};
|
|
2916
|
-
$.fn.selectSet = function(
|
|
2955
|
+
$.fn.selectSet = function(w, l, H) {
|
|
2917
2956
|
return this.each(function() {
|
|
2918
|
-
function
|
|
2919
|
-
const [
|
|
2920
|
-
if ("selected" ===
|
|
2921
|
-
else if ("val" ===
|
|
2922
|
-
if (M =
|
|
2923
|
-
const
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
$(this).removeClass(
|
|
2957
|
+
function x(y, M, I) {
|
|
2958
|
+
const [U, Z] = M.split(":");
|
|
2959
|
+
if ("selected" === U) "selected" === Z && (m.find("option").prop("selected", !1), y.prop("selected", !0), R(E, m, y), m.trigger("change"));
|
|
2960
|
+
else if ("val" === U)
|
|
2961
|
+
if (M = y.val(), y.val(Z), I) {
|
|
2962
|
+
const fa = y.attr("group");
|
|
2963
|
+
y.attr("group", Z);
|
|
2964
|
+
m.find(`option.${fa}`).each(function() {
|
|
2965
|
+
$(this).removeClass(fa).addClass(Z)
|
|
2927
2966
|
});
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
$(this).removeClass(
|
|
2967
|
+
y = E.find(`[data-group="${fa}"]`);
|
|
2968
|
+
y.length && (y.attr("data-group", Z), E.find(`.${fa}`).each(function() {
|
|
2969
|
+
$(this).removeClass(fa).addClass(Z)
|
|
2931
2970
|
}))
|
|
2932
|
-
} else
|
|
2933
|
-
|
|
2934
|
-
else if ("text" ===
|
|
2935
|
-
if (
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
if (
|
|
2939
|
-
M =
|
|
2940
|
-
var
|
|
2971
|
+
} else I =
|
|
2972
|
+
E.find(`[data-value="${M}"]`), I.length && I.attr("data-value", Z), y.prop("selected") && O(E, A);
|
|
2973
|
+
else if ("text" === U)
|
|
2974
|
+
if (y.text(Z), I) {
|
|
2975
|
+
I = y.attr("group");
|
|
2976
|
+
I = E.find(`[data-group="${I}"]`);
|
|
2977
|
+
if (I.length) {
|
|
2978
|
+
M = I.find(".custom-group-arrow").clone();
|
|
2979
|
+
var ma = I.contents().filter(function() {
|
|
2941
2980
|
return 3 === this.nodeType
|
|
2942
2981
|
});
|
|
2943
|
-
|
|
2982
|
+
ma.length ? ma[0].nodeValue = Z : (ja && ja.allowHTML ? I.html(Z) : I.text(Z), M.length && I.append(M))
|
|
2944
2983
|
}
|
|
2945
|
-
|
|
2946
|
-
|
|
2984
|
+
y = y.attr("group");
|
|
2985
|
+
m.find(`option.${y}`).filter(function() {
|
|
2947
2986
|
return $(this).prop("selected")
|
|
2948
|
-
}).length &&
|
|
2987
|
+
}).length && O(E, A)
|
|
2949
2988
|
} else {
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
if (
|
|
2953
|
-
M =
|
|
2954
|
-
|
|
2955
|
-
let
|
|
2989
|
+
I = y.val();
|
|
2990
|
+
I = E.find(`[data-value="${I}"]`);
|
|
2991
|
+
if (I.length) {
|
|
2992
|
+
M = I.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot, .custom-group-arrow").clone();
|
|
2993
|
+
ma = I.find('span[style*="position: absolute"]').clone();
|
|
2994
|
+
let fa = I.contents().filter(function() {
|
|
2956
2995
|
return 3 === this.nodeType
|
|
2957
2996
|
});
|
|
2958
|
-
|
|
2997
|
+
fa.length ? fa[0].nodeValue = Z : (ja && ja.allowHTML ? I.html(Z) : I.text(Z), M.length && I.append(M), ma.length && I.append(ma))
|
|
2959
2998
|
}
|
|
2960
|
-
|
|
2999
|
+
y.prop("selected") && O(E, A)
|
|
2961
3000
|
}
|
|
2962
3001
|
}
|
|
2963
|
-
const
|
|
2964
|
-
|
|
2965
|
-
var
|
|
2966
|
-
if (
|
|
2967
|
-
var
|
|
2968
|
-
const
|
|
2969
|
-
Z =
|
|
2970
|
-
|
|
2971
|
-
|
|
3002
|
+
const m = $(this),
|
|
3003
|
+
A = this;
|
|
3004
|
+
var p = this._selectId;
|
|
3005
|
+
if (p) {
|
|
3006
|
+
var R = function(y, M, I) {
|
|
3007
|
+
const U = y.data("settings"),
|
|
3008
|
+
Z = I.val();
|
|
3009
|
+
I = I.index();
|
|
3010
|
+
y.attr({
|
|
2972
3011
|
"data-selected-value": Z,
|
|
2973
|
-
"data-selected-index":
|
|
3012
|
+
"data-selected-index": I
|
|
2974
3013
|
});
|
|
2975
|
-
|
|
2976
|
-
const
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
3014
|
+
y.find('[class*="-option"]').removeClass("selected").css("font-weight", "normal");
|
|
3015
|
+
const ma = y.find(`[data-value="${Z}"]`);
|
|
3016
|
+
ma.length && setTimeout(() => {
|
|
3017
|
+
ma.addClass("selected");
|
|
3018
|
+
U.selectedBg || ma.css("font-weight", "bold")
|
|
2980
3019
|
}, 300);
|
|
2981
|
-
"radio" ===
|
|
2982
|
-
const
|
|
3020
|
+
"radio" === U.pointer ? y.find(".custom-radio").each(function() {
|
|
3021
|
+
const fa = $(this).closest('[class*="-option"]').attr("data-value") === Z;
|
|
2983
3022
|
$(this).css({
|
|
2984
|
-
border:
|
|
3023
|
+
border: fa ? `2px solid ${U.radioColor}` : `2px solid ${U.buttonColor}`,
|
|
2985
3024
|
backgroundColor: "#fff"
|
|
2986
|
-
}).html(
|
|
2987
|
-
}) :
|
|
2988
|
-
const
|
|
3025
|
+
}).html(fa ? `<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${parseInt(U.radioSize)/2}px; height: ${parseInt(U.radioSize)/2}px; background-color: ${U.radioColor}; border-radius: 50%;"></div>` : "")
|
|
3026
|
+
}) : U.dot && y.find(".custom-dot").each(function() {
|
|
3027
|
+
const fa = $(this).closest('[class*="-option"]').attr("data-value") === Z;
|
|
2989
3028
|
$(this).css({
|
|
2990
|
-
border:
|
|
2991
|
-
backgroundColor:
|
|
3029
|
+
border: fa ? `2px solid ${U.dotColor}` : `2px solid ${U.buttonColor}`,
|
|
3030
|
+
backgroundColor: fa ? U.dotColor : "#fff"
|
|
2992
3031
|
})
|
|
2993
3032
|
});
|
|
2994
|
-
|
|
3033
|
+
O(y,
|
|
2995
3034
|
M[0])
|
|
2996
3035
|
},
|
|
2997
|
-
|
|
2998
|
-
const
|
|
2999
|
-
|
|
3000
|
-
var
|
|
3001
|
-
const Z =
|
|
3036
|
+
O = function(y, M) {
|
|
3037
|
+
const I = y.data("settings");
|
|
3038
|
+
y = y.find('[class*="-trigger"]');
|
|
3039
|
+
var U = $(M);
|
|
3040
|
+
const Z = U.find("option:selected");
|
|
3002
3041
|
if (Z.length) {
|
|
3003
|
-
var
|
|
3004
|
-
if (
|
|
3005
|
-
var
|
|
3006
|
-
} catch (
|
|
3007
|
-
console.warn("Error getting group path:",
|
|
3008
|
-
} else
|
|
3009
|
-
M =
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
M.length &&
|
|
3014
|
-
|
|
3015
|
-
"radio" ===
|
|
3016
|
-
border: `2px solid ${
|
|
3042
|
+
var ma = Z.index();
|
|
3043
|
+
if (U.find("option[group]").length && "function" === typeof findGroupPath) try {
|
|
3044
|
+
var fa = findGroupPath(M, ma).text
|
|
3045
|
+
} catch (Ba) {
|
|
3046
|
+
console.warn("Error getting group path:", Ba), fa = Z.text()
|
|
3047
|
+
} else fa = Z.text();
|
|
3048
|
+
M = y.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
|
|
3049
|
+
U = y.find('span[style*="position: absolute"]').clone();
|
|
3050
|
+
I && I.allowHTML ? y.html(fa) :
|
|
3051
|
+
y.text(fa);
|
|
3052
|
+
M.length && y.append(M);
|
|
3053
|
+
U.length && y.append(U);
|
|
3054
|
+
"radio" === I.pointer && (fa = y.find(".custom-radio"), fa.length && fa.css({
|
|
3055
|
+
border: `2px solid ${I.radioColor}`,
|
|
3017
3056
|
backgroundColor: "#fff"
|
|
3018
|
-
}).html(`<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${parseInt(
|
|
3057
|
+
}).html(`<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${parseInt(I.radioSize)/2}px; height: ${parseInt(I.radioSize)/2}px; background-color: ${I.radioColor}; border-radius: 50%;"></div>`))
|
|
3019
3058
|
}
|
|
3020
3059
|
},
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
if ("string" === typeof
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
var
|
|
3028
|
-
|
|
3029
|
-
} else "number" !== typeof
|
|
3030
|
-
if (
|
|
3060
|
+
E = $(".select-" + (p + "-wrapper")),
|
|
3061
|
+
ja = E.data("settings");
|
|
3062
|
+
p = !1;
|
|
3063
|
+
if ("string" === typeof w &&
|
|
3064
|
+
w.startsWith("group:")) {
|
|
3065
|
+
p = !0;
|
|
3066
|
+
var W = w.substring(6);
|
|
3067
|
+
W = m.find(`option[group="${W}"]`)
|
|
3068
|
+
} else "number" !== typeof w && isNaN(parseInt(w)) ? "string" === typeof w && (W = m.find(`option[value="${w}"]`)) : (W = parseInt(w), W = m.find("option").eq(W), W.attr("group") && (p = !0));
|
|
3069
|
+
if (W.length) {
|
|
3031
3070
|
if ("string" === typeof l && l.startsWith("{") && l.endsWith("}")) {
|
|
3032
|
-
var
|
|
3033
|
-
if (
|
|
3034
|
-
for (var
|
|
3035
|
-
} else "string" === typeof l &&
|
|
3036
|
-
if ("function" === typeof
|
|
3037
|
-
var
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
if (
|
|
3043
|
-
|
|
3044
|
-
for (const
|
|
3045
|
-
if (
|
|
3046
|
-
|
|
3071
|
+
var aa = l.match(/\{([^}]+)\}/g);
|
|
3072
|
+
if (aa)
|
|
3073
|
+
for (var T of aa) aa = T.substring(1, T.length - 1), x(W, aa, p)
|
|
3074
|
+
} else "string" === typeof l && x(W, l, p);
|
|
3075
|
+
if ("function" === typeof H) {
|
|
3076
|
+
var Y = m.find("option:selected");
|
|
3077
|
+
T = Y.index();
|
|
3078
|
+
p = Y.val();
|
|
3079
|
+
W = Y.text();
|
|
3080
|
+
aa = "";
|
|
3081
|
+
if (Y.length && Y.attr("class")) {
|
|
3082
|
+
Y = Y.attr("class").split(" ");
|
|
3083
|
+
for (const y of Y)
|
|
3084
|
+
if (Y = m.find(`option[group="${y}"]`), Y.length) {
|
|
3085
|
+
aa = Y.text();
|
|
3047
3086
|
break
|
|
3048
3087
|
}
|
|
3049
3088
|
}
|
|
3050
|
-
|
|
3051
|
-
index:
|
|
3052
|
-
value:
|
|
3053
|
-
text:
|
|
3054
|
-
group:
|
|
3089
|
+
H.call(this, {
|
|
3090
|
+
index: T,
|
|
3091
|
+
value: p,
|
|
3092
|
+
text: W,
|
|
3093
|
+
group: aa
|
|
3055
3094
|
})
|
|
3056
3095
|
}
|
|
3057
|
-
} else console.warn(`Target option not found: ${
|
|
3096
|
+
} else console.warn(`Target option not found: ${w}`)
|
|
3058
3097
|
} else console.warn("Select element was not initialized with $.select() method")
|
|
3059
3098
|
})
|
|
3060
3099
|
};
|
|
3061
|
-
$.fn.selectGet = function(
|
|
3100
|
+
$.fn.selectGet = function(w) {
|
|
3062
3101
|
var l = $(this);
|
|
3063
|
-
if ("number" === typeof
|
|
3064
|
-
if ("string" === typeof
|
|
3065
|
-
var
|
|
3066
|
-
if (
|
|
3102
|
+
if ("number" === typeof w) return l = l.find("option").eq(w), l.length ? l : $();
|
|
3103
|
+
if ("string" === typeof w && !["val", "value", "text", "index", "group"].includes(w)) {
|
|
3104
|
+
var H = l.find(`option[value="${w}"]`);
|
|
3105
|
+
if (H.length) return H;
|
|
3067
3106
|
l = l.find("option").filter(function() {
|
|
3068
|
-
return $(this).text() ===
|
|
3107
|
+
return $(this).text() === w
|
|
3069
3108
|
});
|
|
3070
3109
|
return l.length ? l : $()
|
|
3071
3110
|
}
|
|
3072
|
-
var
|
|
3073
|
-
if (!
|
|
3074
|
-
if (
|
|
3075
|
-
if ("text" ===
|
|
3076
|
-
if ("index" ===
|
|
3077
|
-
if ("group" ===
|
|
3078
|
-
|
|
3111
|
+
var x = l.find("option:selected");
|
|
3112
|
+
if (!x.length) return $();
|
|
3113
|
+
if (w && "val" !== w && "value" !== w) {
|
|
3114
|
+
if ("text" === w) return x.text();
|
|
3115
|
+
if ("index" === w) return x.index();
|
|
3116
|
+
if ("group" === w) {
|
|
3117
|
+
H = "";
|
|
3079
3118
|
try {
|
|
3080
|
-
if (
|
|
3081
|
-
const
|
|
3082
|
-
|
|
3083
|
-
for (const
|
|
3084
|
-
const
|
|
3085
|
-
if (
|
|
3086
|
-
const
|
|
3087
|
-
for (const
|
|
3088
|
-
const
|
|
3089
|
-
|
|
3119
|
+
if (x.attr("class")) {
|
|
3120
|
+
const m = x.attr("class").split(" ");
|
|
3121
|
+
x = [];
|
|
3122
|
+
for (const A of m) {
|
|
3123
|
+
const p = l.find(`option[group="${A}"]`);
|
|
3124
|
+
if (p.length && (x.unshift(p.text()), p.attr("class"))) {
|
|
3125
|
+
const R = p.attr("class").split(" ");
|
|
3126
|
+
for (const O of R) {
|
|
3127
|
+
const E = l.find(`option[group="${O}"]`);
|
|
3128
|
+
E.length && x.unshift(E.text())
|
|
3090
3129
|
}
|
|
3091
3130
|
}
|
|
3092
3131
|
}
|
|
3093
|
-
|
|
3132
|
+
H = x.join(" > ")
|
|
3094
3133
|
}
|
|
3095
|
-
} catch (
|
|
3096
|
-
console.warn("Error finding group path:",
|
|
3134
|
+
} catch (m) {
|
|
3135
|
+
console.warn("Error finding group path:", m)
|
|
3097
3136
|
}
|
|
3098
|
-
return
|
|
3137
|
+
return H
|
|
3099
3138
|
}
|
|
3100
|
-
} else return
|
|
3101
|
-
return
|
|
3139
|
+
} else return x.val();
|
|
3140
|
+
return x
|
|
3102
3141
|
};
|
|
3103
3142
|
|
|
3104
|
-
function createParser(
|
|
3143
|
+
function createParser(w, l, H, x = {}) {
|
|
3105
3144
|
return {
|
|
3106
|
-
prefix:
|
|
3145
|
+
prefix: w,
|
|
3107
3146
|
minParts: l,
|
|
3108
|
-
fields:
|
|
3109
|
-
optionalFields:
|
|
3110
|
-
parse: function(
|
|
3111
|
-
if (
|
|
3112
|
-
const
|
|
3113
|
-
this.fields.forEach((
|
|
3114
|
-
|
|
3147
|
+
fields: H,
|
|
3148
|
+
optionalFields: x,
|
|
3149
|
+
parse: function(m) {
|
|
3150
|
+
if (m.length < this.minParts) return null;
|
|
3151
|
+
const A = {};
|
|
3152
|
+
this.fields.forEach((p, R) => {
|
|
3153
|
+
A[p] = m[R + 1] || ""
|
|
3115
3154
|
});
|
|
3116
|
-
Object.entries(this.optionalFields).forEach(([
|
|
3117
|
-
|
|
3118
|
-
|
|
3155
|
+
Object.entries(this.optionalFields).forEach(([p, R]) => {
|
|
3156
|
+
p = parseInt(p);
|
|
3157
|
+
m[p] && m[p].trim() && (A[R] = m[p])
|
|
3119
3158
|
});
|
|
3120
|
-
return
|
|
3159
|
+
return A
|
|
3121
3160
|
}
|
|
3122
3161
|
}
|
|
3123
3162
|
}
|
|
3124
|
-
$.fn.selectAdd = function(
|
|
3163
|
+
$.fn.selectAdd = function(w, l) {
|
|
3125
3164
|
return this.each(function() {
|
|
3126
|
-
const
|
|
3165
|
+
const H = $(this);
|
|
3127
3166
|
if (this._selectId) {
|
|
3128
|
-
var
|
|
3129
|
-
if ("string" === typeof
|
|
3167
|
+
var x;
|
|
3168
|
+
if ("string" === typeof w) {
|
|
3130
3169
|
window._selectParsers || (window._selectParsers = [], window._selectParsers.push(createParser("group:", 3, ["group", "text"])), window._selectParsers.push(createParser("option:", 4, ["value", "text", "groupClass"], {
|
|
3131
3170
|
4: "tag",
|
|
3132
3171
|
5: "img"
|
|
3133
3172
|
})));
|
|
3134
|
-
var
|
|
3135
|
-
|
|
3136
|
-
(
|
|
3137
|
-
|
|
3138
|
-
} else
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
refreshSelectUI(
|
|
3173
|
+
var m = window._selectParsers,
|
|
3174
|
+
A = w.split(":");
|
|
3175
|
+
(m = m.find(p => w.startsWith(p.prefix))) && (x = m.parse(A));
|
|
3176
|
+
x || (x = w)
|
|
3177
|
+
} else x = w;
|
|
3178
|
+
x.group ? (A = document.createElement("option"),
|
|
3179
|
+
A.setAttribute("group", x.group), A.textContent = x.text || "", x.parentGroup && (A.className = x.parentGroup), H[0].appendChild(A)) : (A = document.createElement("option"), A.value = x.value || "", A.textContent = x.text || "", x.groupClass && (A.className = x.groupClass), x.tag && A.setAttribute("tag", x.tag), x.img && A.setAttribute("img", x.img), x.groupClass ? (m = Array.from(H[0].querySelectorAll(`.${x.groupClass}`)), 0 < m.length ? (m = m[m.length - 1], m.nextSibling ? H[0].insertBefore(A, m.nextSibling) : H[0].appendChild(A)) : (m = H[0].querySelector(`option[group="${x.groupClass}"]`)) &&
|
|
3180
|
+
m.nextSibling ? H[0].insertBefore(A, m.nextSibling) : H[0].appendChild(A)) : H[0].appendChild(A));
|
|
3181
|
+
refreshSelectUI(H);
|
|
3143
3182
|
"function" === typeof l && l.call(this, {
|
|
3144
|
-
type:
|
|
3145
|
-
group:
|
|
3146
|
-
value:
|
|
3147
|
-
text:
|
|
3183
|
+
type: x.group ? "group" : "option",
|
|
3184
|
+
group: x.group || x.groupClass,
|
|
3185
|
+
value: x.value,
|
|
3186
|
+
text: x.text
|
|
3148
3187
|
})
|
|
3149
3188
|
} else console.warn("Select element was not initialized with $.select() method")
|
|
3150
3189
|
})
|
|
3151
3190
|
};
|
|
3152
3191
|
|
|
3153
|
-
function refreshSelectUI(
|
|
3154
|
-
var l =
|
|
3155
|
-
let
|
|
3156
|
-
l.length && (
|
|
3192
|
+
function refreshSelectUI(w) {
|
|
3193
|
+
var l = w.closest('[class*="-wrapper"]');
|
|
3194
|
+
let H = null;
|
|
3195
|
+
l.length && (H = l.data("settings"));
|
|
3157
3196
|
if (l.length) {
|
|
3158
|
-
const
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3197
|
+
const x = l[0].parentNode,
|
|
3198
|
+
m = l[0].nextSibling;
|
|
3199
|
+
w[0].style.display = "";
|
|
3200
|
+
m ? x.insertBefore(w[0], m) : x.appendChild(w[0]);
|
|
3162
3201
|
l.remove()
|
|
3163
3202
|
}
|
|
3164
3203
|
l = {
|
|
3165
3204
|
duration: 300,
|
|
3166
3205
|
opacity: 1
|
|
3167
3206
|
};
|
|
3168
|
-
|
|
3169
|
-
|
|
3207
|
+
H ? (void 0 !== H.slideToggle && (l.slideToggle = H.slideToggle), void 0 !== H.width && (l.width = H.width), void 0 !== H.defaultBgColor && (l.defaultBgColor = H.defaultBgColor), void 0 !== H.defaultColor && (l.defaultColor = H.defaultColor)) : l.slideToggle = !0;
|
|
3208
|
+
w.select(300, l)
|
|
3170
3209
|
}
|
|
3171
|
-
$.fn.selectAdd.registerParser = function(
|
|
3210
|
+
$.fn.selectAdd.registerParser = function(w, l, H, x) {
|
|
3172
3211
|
window._selectParsers || (window._selectParsers = []);
|
|
3173
|
-
window._selectParsers.push(createParser(
|
|
3212
|
+
window._selectParsers.push(createParser(w, l, H, x))
|
|
3174
3213
|
};
|
|
3175
|
-
$.fn.selectRemove = function(
|
|
3214
|
+
$.fn.selectRemove = function(w, l) {
|
|
3176
3215
|
return this.each(function() {
|
|
3177
|
-
const
|
|
3216
|
+
const H = $(this);
|
|
3178
3217
|
if (this._selectId) {
|
|
3179
|
-
var
|
|
3180
|
-
if ("string" === typeof
|
|
3181
|
-
if (
|
|
3182
|
-
var
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
} else
|
|
3186
|
-
|
|
3187
|
-
type:
|
|
3188
|
-
count:
|
|
3189
|
-
items:
|
|
3218
|
+
var x = "";
|
|
3219
|
+
if ("string" === typeof w)
|
|
3220
|
+
if (w.startsWith("group:")) {
|
|
3221
|
+
var m = w.substring(6);
|
|
3222
|
+
m = H.find(`option[group="${m}"], option.${m}`);
|
|
3223
|
+
x = "group"
|
|
3224
|
+
} else w.startsWith("value:") ? (m = w.substring(6), m = H.find(`option[value="${m}"]`)) : w.startsWith("index:") ? (m = parseInt(w.substring(6)), m = H.find("option").eq(m)) : m = H.find(`option[value="${w}"]`), x = "option";
|
|
3225
|
+
m && 0 < m.length && (x = {
|
|
3226
|
+
type: x,
|
|
3227
|
+
count: m.length,
|
|
3228
|
+
items: m.map(function() {
|
|
3190
3229
|
return {
|
|
3191
3230
|
value: $(this).val(),
|
|
3192
3231
|
text: $(this).text(),
|
|
@@ -3194,7 +3233,7 @@ $.fn.selectRemove = function(x, l) {
|
|
|
3194
3233
|
groupName: $(this).attr("group") || $(this).attr("class")
|
|
3195
3234
|
}
|
|
3196
3235
|
}).get()
|
|
3197
|
-
},
|
|
3236
|
+
}, m.remove(), refreshSelectUI(H), "function" === typeof l && l.call(this, x))
|
|
3198
3237
|
} else console.warn("Select element was not initialized with $.select() method")
|
|
3199
3238
|
})
|
|
3200
3239
|
};
|