go-captcha-vue 2.0.0 → 2.0.1
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 +11 -4
- package/dist/go-captcha-vue.es.js +299 -301
- package/dist/go-captcha-vue.umd.js +8 -8
- package/dist/index.d.ts +2 -4
- package/package.json +14 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as M, openBlock as b, createElementBlock as C, mergeProps as A, createElementVNode as c, reactive as U, toRaw as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as M, openBlock as b, createElementBlock as C, mergeProps as A, createElementVNode as c, reactive as U, toRaw as re, ref as D, watch as j, computed as z, normalizeClass as I, normalizeStyle as m, toDisplayString as V, withDirectives as H, unref as i, vShow as F, createVNode as P, Fragment as de, renderList as he, onMounted as ne, nextTick as ce, toRefs as ve, createBlock as q, createCommentVNode as ge } from "vue";
|
|
2
|
+
const le = () => ({
|
|
3
3
|
width: 300,
|
|
4
4
|
height: 220,
|
|
5
5
|
thumbWidth: 150,
|
|
@@ -9,31 +9,31 @@ const lt = () => ({
|
|
|
9
9
|
showTheme: !0,
|
|
10
10
|
title: "请在下图依次点击",
|
|
11
11
|
buttonText: "确认"
|
|
12
|
-
}),
|
|
12
|
+
}), fe = /* @__PURE__ */ c("path", { d: `M100.1,189.9C100.1,189.9,100,189.9,100.1,189.9c-49.7,0-90-40.4-90-89.9c0-49.6,40.4-89.9,89.9-89.9
|
|
13
13
|
c49.6,0,89.9,40.4,89.9,89.9c0,18.2-5.4,35.7-15.6,50.7c-1.5,2.1-3.6,3.4-6.1,3.9c-2.5,0.4-5-0.1-7-1.6c-4.2-3-5.3-8.6-2.4-12.9
|
|
14
14
|
c8.1-11.9,12.4-25.7,12.4-40.1c0-39.2-31.9-71.1-71.1-71.1c-39.2,0-71.1,31.9-71.1,71.1c0,39.2,31.9,71.1,71.1,71.1
|
|
15
15
|
c7.7,0,15.3-1.2,22.6-3.6c2.4-0.8,4.9-0.6,7.2,0.5c2.2,1.1,3.9,3.1,4.7,5.5c1.6,4.9-1,10.2-5.9,11.9
|
|
16
16
|
C119.3,188.4,109.8,189.9,100.1,189.9z M73,136.4C73,136.4,73,136.4,73,136.4c-2.5,0-4.9-1-6.7-2.8c-3.7-3.7-3.7-9.6,0-13.3
|
|
17
17
|
L86.7,100L66.4,79.7c-3.7-3.7-3.7-9.6,0-13.3c3.7-3.7,9.6-3.7,13.3,0L100,86.7l20.3-20.3c1.8-1.8,4.1-2.8,6.7-2.8c0,0,0,0,0,0
|
|
18
18
|
c2.5,0,4.9,1,6.7,2.8c1.8,1.8,2.8,4.1,2.8,6.7c0,2.5-1,4.9-2.8,6.7L113.3,100l20.3,20.3c3.7,3.7,3.7,9.6,0,13.3
|
|
19
|
-
c-3.7,3.7-9.6,3.7-13.3,0L100,113.3l-20.3,20.3C77.9,135.4,75.5,136.4,73,136.4z` }, null, -1),
|
|
20
|
-
|
|
19
|
+
c-3.7,3.7-9.6,3.7-13.3,0L100,113.3l-20.3,20.3C77.9,135.4,75.5,136.4,73,136.4z` }, null, -1), pe = [
|
|
20
|
+
fe
|
|
21
21
|
], Z = /* @__PURE__ */ M({
|
|
22
22
|
__name: "close-icon",
|
|
23
23
|
emits: ["click"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
|
|
24
|
+
setup(l, { emit: t }) {
|
|
25
|
+
const n = t;
|
|
26
|
+
function s(e) {
|
|
27
|
+
n("click", e);
|
|
28
28
|
}
|
|
29
|
-
return (
|
|
29
|
+
return (e, a) => (b(), C("svg", A({
|
|
30
30
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31
31
|
viewBox: "0 0 200 200",
|
|
32
32
|
width: "20",
|
|
33
33
|
height: "20"
|
|
34
|
-
},
|
|
34
|
+
}, e.$attrs, { onClick: s }), pe, 16));
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
36
|
+
}), me = /* @__PURE__ */ c("path", { d: `M135,149.9c-10.7,7.6-23.2,11.4-36,11.2c-1.7,0-3.4-0.1-5-0.3c-0.7-0.1-1.4-0.2-2-0.3c-1.3-0.2-2.6-0.4-3.9-0.6
|
|
37
37
|
c-0.8-0.2-1.6-0.4-2.3-0.5c-1.2-0.3-2.5-0.6-3.7-1c-0.6-0.2-1.2-0.4-1.7-0.6c-1.4-0.5-2.8-1-4.2-1.5c-0.3-0.1-0.6-0.3-0.9-0.4
|
|
38
38
|
c-1.6-0.7-3.2-1.4-4.7-2.3c-0.1,0-0.1-0.1-0.2-0.1c-5.1-2.9-9.8-6.4-14-10.6c-0.1-0.1-0.1-0.1-0.2-0.2c-1.3-1.3-2.5-2.7-3.7-4.1
|
|
39
39
|
c-0.2-0.3-0.5-0.6-0.7-0.9c-8.4-10.6-13.5-24.1-13.5-38.8h14.3c0.4,0,0.7-0.2,0.9-0.5c0.2-0.3,0.2-0.8,0-1.1L29.5,60.9
|
|
@@ -50,24 +50,24 @@ const lt = () => ({
|
|
|
50
50
|
c0.6,0.1,1.3,0.3,1.9,0.4c1.4,0.3,2.8,0.7,4.2,1.1c0.4,0.1,0.9,0.3,1.3,0.4c1.6,0.5,3.1,1.1,4.6,1.7c0.2,0.1,0.3,0.1,0.5,0.2
|
|
51
51
|
c9,3.9,17,10,23.2,17.6c0,0,0.1,0.1,0.1,0.2c8.7,10.7,14,24.5,14,39.4H147c-0.4,0-0.7,0.2-0.9,0.5c-0.2,0.3-0.2,0.8,0,1.1l24,36.4
|
|
52
52
|
c0.2,0.3,0.5,0.5,0.9,0.5c0.4,0,0.7-0.2,0.9-0.5l23.9-36.4c0.2-0.3,0.2-0.7,0-1.1c-0.2-0.3-0.5-0.5-0.9-0.5L180.6,98.9L180.6,98.9
|
|
53
|
-
L180.6,98.9z` }, null, -1),
|
|
54
|
-
|
|
53
|
+
L180.6,98.9z` }, null, -1), _e = [
|
|
54
|
+
me
|
|
55
55
|
], R = /* @__PURE__ */ M({
|
|
56
56
|
__name: "refresh-icon",
|
|
57
57
|
emits: ["click"],
|
|
58
|
-
setup(
|
|
59
|
-
const
|
|
60
|
-
function
|
|
61
|
-
|
|
58
|
+
setup(l, { emit: t }) {
|
|
59
|
+
const n = t;
|
|
60
|
+
function s(e) {
|
|
61
|
+
n("click", e);
|
|
62
62
|
}
|
|
63
|
-
return (
|
|
63
|
+
return (e, a) => (b(), C("svg", A({
|
|
64
64
|
xmlns: "http://www.w3.org/2000/svg",
|
|
65
65
|
viewBox: "0 0 200 200",
|
|
66
66
|
width: "20",
|
|
67
67
|
height: "20"
|
|
68
|
-
},
|
|
68
|
+
}, e.$attrs, { onClick: s }), _e, 16));
|
|
69
69
|
}
|
|
70
|
-
}),
|
|
70
|
+
}), we = /* @__PURE__ */ c("circle", {
|
|
71
71
|
cx: "50",
|
|
72
72
|
cy: "36.8101",
|
|
73
73
|
r: "10"
|
|
@@ -81,127 +81,127 @@ const lt = () => ({
|
|
|
81
81
|
keyTimes: "0;0.5;1",
|
|
82
82
|
values: "23;77;23"
|
|
83
83
|
})
|
|
84
|
-
], -1),
|
|
85
|
-
|
|
86
|
-
],
|
|
84
|
+
], -1), be = [
|
|
85
|
+
we
|
|
86
|
+
], ee = /* @__PURE__ */ M({
|
|
87
87
|
__name: "loading-icon",
|
|
88
88
|
emits: ["click"],
|
|
89
|
-
setup(
|
|
90
|
-
const
|
|
91
|
-
function
|
|
92
|
-
|
|
89
|
+
setup(l, { emit: t }) {
|
|
90
|
+
const n = t;
|
|
91
|
+
function s(e) {
|
|
92
|
+
n("click", e);
|
|
93
93
|
}
|
|
94
|
-
return (
|
|
94
|
+
return (e, a) => (b(), C("svg", A({
|
|
95
95
|
xmlns: "http://www.w3.org/2000/svg",
|
|
96
96
|
viewBox: "0 0 100 100",
|
|
97
97
|
preserveAspectRatio: "xMidYMid",
|
|
98
98
|
width: "84",
|
|
99
99
|
height: "84"
|
|
100
|
-
},
|
|
100
|
+
}, e.$attrs, { onClick: s }), be, 16));
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
-
function
|
|
104
|
-
let
|
|
105
|
-
if (
|
|
106
|
-
const
|
|
107
|
-
|
|
103
|
+
function xe(l) {
|
|
104
|
+
let t = 0, n = 0;
|
|
105
|
+
if (l.getBoundingClientRect) {
|
|
106
|
+
const s = l.getBoundingClientRect(), e = document.documentElement;
|
|
107
|
+
t = s.left + Math.max(e.scrollLeft, document.body.scrollLeft) - e.clientLeft, n = s.top + Math.max(e.scrollTop, document.body.scrollTop) - e.clientTop;
|
|
108
108
|
} else
|
|
109
|
-
for (;
|
|
110
|
-
|
|
109
|
+
for (; l !== document.body; )
|
|
110
|
+
t += l.offsetLeft, n += l.offsetTop, l = l.offsetParent;
|
|
111
111
|
return {
|
|
112
|
-
domX:
|
|
113
|
-
domY:
|
|
112
|
+
domX: t,
|
|
113
|
+
domY: n
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
let
|
|
116
|
+
function se(l, t) {
|
|
117
|
+
let n = t.relatedTarget;
|
|
118
118
|
try {
|
|
119
|
-
for (;
|
|
120
|
-
|
|
121
|
-
} catch (
|
|
122
|
-
console.warn(
|
|
119
|
+
for (; n && n !== l; )
|
|
120
|
+
n = n.parentNode;
|
|
121
|
+
} catch (s) {
|
|
122
|
+
console.warn(s);
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return n !== l;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
const
|
|
126
|
+
function Ee(l, t) {
|
|
127
|
+
const n = U({ list: [] });
|
|
128
128
|
return {
|
|
129
|
-
dots:
|
|
129
|
+
dots: n,
|
|
130
130
|
clickEvent: (o) => {
|
|
131
|
-
const E = o.currentTarget, u =
|
|
132
|
-
return y.push({ key: $.getTime(), index: S + 1, x: f, y: k }),
|
|
131
|
+
const E = o.currentTarget, u = xe(E), g = o.pageX || o.clientX, r = o.pageY || o.clientY, h = u.domX, _ = u.domY, w = g - h, v = r - _, f = parseInt(w.toString()), k = parseInt(v.toString()), $ = /* @__PURE__ */ new Date(), S = n.list.length, y = n.list;
|
|
132
|
+
return y.push({ key: $.getTime(), index: S + 1, x: f, y: k }), n.list = y, t.click && t.click(f, k), o.cancelBubble = !0, o.preventDefault(), !1;
|
|
133
133
|
},
|
|
134
|
-
confirmEvent: (o) => (
|
|
135
|
-
|
|
134
|
+
confirmEvent: (o) => (t.confirm && t.confirm(re(n.list), () => {
|
|
135
|
+
n.list = [];
|
|
136
136
|
}), o.cancelBubble = !0, o.preventDefault(), !1),
|
|
137
|
-
closeEvent: (o) => (
|
|
138
|
-
refreshEvent: (o) => (
|
|
137
|
+
closeEvent: (o) => (t.close && t.close(), n.list = [], o.cancelBubble = !0, o.preventDefault(), !1),
|
|
138
|
+
refreshEvent: (o) => (t.refresh && t.refresh(), n.list = [], o.cancelBubble = !0, o.preventDefault(), !1)
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const ke = { class: "gc-header" }, ye = ["src"], Le = { class: "gc-loading" }, $e = ["src"], Ce = { class: "gc-dots" }, Te = { class: "gc-footer" }, Pe = { class: "gc-icon-block gc-icon-block2" }, ze = { class: "gc-button-block" }, G = /* @__PURE__ */ M({
|
|
142
142
|
__name: "index",
|
|
143
143
|
props: {
|
|
144
|
-
config: { default:
|
|
144
|
+
config: { default: le },
|
|
145
145
|
events: { default: () => ({}) },
|
|
146
146
|
data: { default: () => ({}) }
|
|
147
147
|
},
|
|
148
|
-
setup(
|
|
149
|
-
const
|
|
150
|
-
...
|
|
151
|
-
...
|
|
148
|
+
setup(l) {
|
|
149
|
+
const t = l, { data: n, events: s } = t, e = D({
|
|
150
|
+
...le(),
|
|
151
|
+
...t.config
|
|
152
152
|
});
|
|
153
|
-
j(() =>
|
|
154
|
-
|
|
155
|
-
...
|
|
156
|
-
...
|
|
153
|
+
j(() => t.config, () => {
|
|
154
|
+
e.value = {
|
|
155
|
+
...e.value,
|
|
156
|
+
...t.config
|
|
157
157
|
};
|
|
158
158
|
});
|
|
159
|
-
const a =
|
|
159
|
+
const a = Ee(n, s), d = e.value.horizontalPadding || 0, o = e.value.verticalPadding || 0, E = (e.value.width || 0) + d * 2 + (e.value.showTheme ? 2 : 0), u = a.dots, g = z(() => ({
|
|
160
160
|
width: E + "px",
|
|
161
161
|
paddingLeft: d + "px",
|
|
162
162
|
paddingRight: d + "px",
|
|
163
163
|
paddingTop: o + "px",
|
|
164
164
|
paddingBottom: o + "px"
|
|
165
165
|
})), r = z(() => ({
|
|
166
|
-
width:
|
|
167
|
-
height:
|
|
166
|
+
width: e.value.thumbWidth + "px",
|
|
167
|
+
height: e.value.thumbHeight + "px"
|
|
168
168
|
})), h = z(() => ({
|
|
169
|
-
width:
|
|
170
|
-
height:
|
|
169
|
+
width: e.value.width + "px",
|
|
170
|
+
height: e.value.height + "px"
|
|
171
171
|
}));
|
|
172
172
|
return (_, w) => (b(), C("div", {
|
|
173
|
-
class: I(`go-captcha gc-wrapper ${
|
|
173
|
+
class: I(`go-captcha gc-wrapper ${e.value.showTheme ? "gc-theme" : ""}`),
|
|
174
174
|
style: m(g.value)
|
|
175
175
|
}, [
|
|
176
|
-
c("div",
|
|
177
|
-
c("span", null, V(
|
|
176
|
+
c("div", ke, [
|
|
177
|
+
c("span", null, V(e.value.title), 1),
|
|
178
178
|
H(c("img", {
|
|
179
179
|
style: m(r.value),
|
|
180
|
-
src: i(
|
|
180
|
+
src: i(n).thumb,
|
|
181
181
|
alt: "..."
|
|
182
|
-
}, null, 12,
|
|
183
|
-
[F, i(
|
|
182
|
+
}, null, 12, ye), [
|
|
183
|
+
[F, i(n).thumb !== ""]
|
|
184
184
|
])
|
|
185
185
|
]),
|
|
186
186
|
c("div", {
|
|
187
187
|
class: "gc-body",
|
|
188
188
|
style: m(h.value)
|
|
189
189
|
}, [
|
|
190
|
-
c("div",
|
|
191
|
-
P(
|
|
190
|
+
c("div", Le, [
|
|
191
|
+
P(ee)
|
|
192
192
|
]),
|
|
193
193
|
H(c("img", {
|
|
194
194
|
style: m(h.value),
|
|
195
195
|
class: "gc-picture",
|
|
196
|
-
src: i(
|
|
196
|
+
src: i(n).image,
|
|
197
197
|
alt: "...",
|
|
198
198
|
onClick: w[0] || (w[0] = //@ts-ignore
|
|
199
199
|
(...v) => i(a).clickEvent && i(a).clickEvent(...v))
|
|
200
|
-
}, null, 12, $
|
|
201
|
-
[F, i(
|
|
200
|
+
}, null, 12, $e), [
|
|
201
|
+
[F, i(n).image !== ""]
|
|
202
202
|
]),
|
|
203
|
-
c("div",
|
|
204
|
-
(b(!0), C(
|
|
203
|
+
c("div", Ce, [
|
|
204
|
+
(b(!0), C(de, null, he(i(u).list, (v) => (b(), C("div", {
|
|
205
205
|
class: "gc-dot",
|
|
206
206
|
key: `${v.key + "-" + v.index}`,
|
|
207
207
|
style: m({
|
|
@@ -211,8 +211,8 @@ const kt = { class: "gc-header" }, yt = ["src"], Lt = { class: "gc-loading" }, $
|
|
|
211
211
|
}, V(v.index), 5))), 128))
|
|
212
212
|
])
|
|
213
213
|
], 4),
|
|
214
|
-
c("div",
|
|
215
|
-
c("div",
|
|
214
|
+
c("div", Te, [
|
|
215
|
+
c("div", Pe, [
|
|
216
216
|
P(Z, {
|
|
217
217
|
width: 22,
|
|
218
218
|
height: 22,
|
|
@@ -224,21 +224,21 @@ const kt = { class: "gc-header" }, yt = ["src"], Lt = { class: "gc-loading" }, $
|
|
|
224
224
|
onClick: i(a).refreshEvent
|
|
225
225
|
}, null, 8, ["onClick"])
|
|
226
226
|
]),
|
|
227
|
-
c("div",
|
|
227
|
+
c("div", ze, [
|
|
228
228
|
c("button", {
|
|
229
229
|
onClick: w[1] || (w[1] = //@ts-ignore
|
|
230
230
|
(...v) => i(a).confirmEvent && i(a).confirmEvent(...v))
|
|
231
|
-
}, V(
|
|
231
|
+
}, V(e.value.buttonText), 1)
|
|
232
232
|
])
|
|
233
233
|
])
|
|
234
234
|
], 6));
|
|
235
235
|
}
|
|
236
236
|
});
|
|
237
|
-
G.name = "
|
|
238
|
-
G.install = function(
|
|
239
|
-
|
|
237
|
+
G.name = "gocaptcha-click";
|
|
238
|
+
G.install = function(l) {
|
|
239
|
+
l.component("gocaptcha-click", G);
|
|
240
240
|
};
|
|
241
|
-
const
|
|
241
|
+
const oe = () => ({
|
|
242
242
|
width: 300,
|
|
243
243
|
height: 220,
|
|
244
244
|
thumbWidth: 150,
|
|
@@ -247,34 +247,34 @@ const ot = () => ({
|
|
|
247
247
|
horizontalPadding: 12,
|
|
248
248
|
showTheme: !0,
|
|
249
249
|
title: "请拖动滑块完成拼图"
|
|
250
|
-
}),
|
|
250
|
+
}), Xe = /* @__PURE__ */ c("path", { d: `M131.6,116.3c0,0-75.6,0-109.7,0c-9.1,0-16.2-7.4-16.2-16.2c0-9.1,7.4-16.2,16.2-16.2c28.7,0,109.7,0,109.7,0
|
|
251
251
|
s-5.4-5.4-30.4-30.7c-6.4-6.4-6.4-16.7,0-23.1s16.7-6.4,23.1,0l58.4,58.4c6.4,6.4,6.4,16.7,0,23.1c0,0-32.9,32.9-57.9,57.9
|
|
252
|
-
c-6.4,6.4-16.7,6.4-23.1,0c-6.4-6.4-6.4-16.7,0-23.1C121.8,126.2,131.6,116.3,131.6,116.3z` }, null, -1),
|
|
253
|
-
|
|
254
|
-
],
|
|
252
|
+
c-6.4,6.4-16.7,6.4-23.1,0c-6.4-6.4-6.4-16.7,0-23.1C121.8,126.2,131.6,116.3,131.6,116.3z` }, null, -1), De = [
|
|
253
|
+
Xe
|
|
254
|
+
], ue = /* @__PURE__ */ M({
|
|
255
255
|
__name: "arrows-icon",
|
|
256
256
|
emits: ["click"],
|
|
257
|
-
setup(
|
|
258
|
-
const
|
|
259
|
-
function
|
|
260
|
-
|
|
257
|
+
setup(l, { emit: t }) {
|
|
258
|
+
const n = t;
|
|
259
|
+
function s(e) {
|
|
260
|
+
n("click", e);
|
|
261
261
|
}
|
|
262
|
-
return (
|
|
262
|
+
return (e, a) => (b(), C("svg", A({
|
|
263
263
|
xmlns: "http://www.w3.org/2000/svg",
|
|
264
264
|
viewBox: "0 0 200 200",
|
|
265
265
|
width: "20",
|
|
266
266
|
height: "20"
|
|
267
|
-
},
|
|
267
|
+
}, e.$attrs, { onClick: s }), De, 16));
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
|
-
function
|
|
271
|
-
const d = U({ dragLeft: 0, thumbLeft:
|
|
270
|
+
function Me(l, t, n, s, e, a) {
|
|
271
|
+
const d = U({ dragLeft: 0, thumbLeft: l.thumbX || 0 }), o = () => {
|
|
272
272
|
d.dragLeft = 0, d.thumbLeft = 0;
|
|
273
273
|
};
|
|
274
274
|
return {
|
|
275
275
|
state: d,
|
|
276
276
|
dragEvent: (r) => {
|
|
277
|
-
const h = r.touches && r.touches[0], _ =
|
|
277
|
+
const h = r.touches && r.touches[0], _ = e.value.offsetLeft, w = n.value.offsetWidth, v = e.value.offsetWidth, f = w - v, k = l.thumbX || 0, $ = s.value.offsetWidth, S = v - $, y = (f - k + S) / f;
|
|
278
278
|
let x = !1, B = 0, T = 0;
|
|
279
279
|
h ? B = h.pageX - _ : B = r.clientX - _;
|
|
280
280
|
const W = (p) => {
|
|
@@ -289,60 +289,60 @@ function Mt(s, n, e, l, t, a) {
|
|
|
289
289
|
d.dragLeft = 0;
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
|
-
d.dragLeft = L, T = k + L * y, d.thumbLeft = T,
|
|
292
|
+
d.dragLeft = L, T = k + L * y, d.thumbLeft = T, t.move && t.move(T, l.thumbY || 0), p.cancelBubble = !0, p.preventDefault();
|
|
293
293
|
}, X = (p) => {
|
|
294
|
-
|
|
294
|
+
se(a.value, p) && x && (a.value.removeEventListener("mousemove", W, !1), a.value.removeEventListener("touchmove", W, { passive: !1 }), a.value.removeEventListener("mouseup", X, !1), a.value.removeEventListener("mouseout", X, !1), a.value.removeEventListener("touchend", X, !1), x = !1, t.confirm && t.confirm({ x: parseInt(T.toString()), y: l.thumbY || 0 }, () => {
|
|
295
295
|
o();
|
|
296
296
|
}), p.cancelBubble = !0, p.preventDefault());
|
|
297
297
|
};
|
|
298
298
|
a.value.addEventListener("mousemove", W, !1), a.value.addEventListener("touchmove", W, { passive: !1 }), a.value.addEventListener("mouseup", X, !1), a.value.addEventListener("mouseout", X, !1), a.value.addEventListener("touchend", X, !1);
|
|
299
299
|
},
|
|
300
|
-
closeEvent: (r) => (
|
|
301
|
-
refreshEvent: (r) => (
|
|
300
|
+
closeEvent: (r) => (t && t.close && t.close(), o(), r.cancelBubble = !0, r.preventDefault(), !1),
|
|
301
|
+
refreshEvent: (r) => (t && t.refresh && t.refresh(), o(), r.cancelBubble = !0, r.preventDefault(), !1)
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
const
|
|
304
|
+
const Se = { class: "gc-header" }, Be = { class: "gc-icon-block" }, We = { class: "gc-loading" }, Ye = ["src"], He = ["src"], Fe = { class: "gc-footer" }, Ae = /* @__PURE__ */ c("div", { class: "gc-drag-line" }, null, -1), J = /* @__PURE__ */ M({
|
|
305
305
|
__name: "index",
|
|
306
306
|
props: {
|
|
307
|
-
config: { default:
|
|
307
|
+
config: { default: oe },
|
|
308
308
|
events: { default: () => ({}) },
|
|
309
309
|
data: { default: () => ({}) }
|
|
310
310
|
},
|
|
311
|
-
setup(
|
|
312
|
-
const
|
|
313
|
-
...
|
|
314
|
-
...
|
|
311
|
+
setup(l) {
|
|
312
|
+
const t = l, { data: n, events: s } = t, e = D({
|
|
313
|
+
...oe(),
|
|
314
|
+
...t.config
|
|
315
315
|
});
|
|
316
|
-
j(() =>
|
|
317
|
-
|
|
318
|
-
...
|
|
319
|
-
...
|
|
316
|
+
j(() => t.config, () => {
|
|
317
|
+
e.value = {
|
|
318
|
+
...e.value,
|
|
319
|
+
...t.config
|
|
320
320
|
};
|
|
321
321
|
});
|
|
322
|
-
const a = D(null), d = D(null), o = D(null), E = D(null), u =
|
|
322
|
+
const a = D(null), d = D(null), o = D(null), E = D(null), u = Me(n, s, d, E, o, a), g = e.value.horizontalPadding || 0, r = e.value.verticalPadding || 0, h = (e.value.width || 0) + g * 2 + (e.value.showTheme ? 2 : 0), _ = z(() => ({
|
|
323
323
|
width: h + "px",
|
|
324
324
|
paddingLeft: g + "px",
|
|
325
325
|
paddingRight: g + "px",
|
|
326
326
|
paddingTop: r + "px",
|
|
327
327
|
paddingBottom: r + "px"
|
|
328
328
|
})), w = z(() => ({
|
|
329
|
-
width:
|
|
330
|
-
height:
|
|
331
|
-
top:
|
|
329
|
+
width: n.thumbWidth + "px",
|
|
330
|
+
height: n.thumbHeight + "px",
|
|
331
|
+
top: n.thumbY + "px",
|
|
332
332
|
left: u.state.thumbLeft + "px"
|
|
333
333
|
})), v = z(() => ({
|
|
334
|
-
width:
|
|
335
|
-
height:
|
|
334
|
+
width: e.value.width + "px",
|
|
335
|
+
height: e.value.height + "px"
|
|
336
336
|
}));
|
|
337
|
-
return
|
|
338
|
-
await
|
|
337
|
+
return ne(async () => {
|
|
338
|
+
await ce(), o.value && o.value.addEventListener("dragstart", (f) => f.preventDefault());
|
|
339
339
|
}), (f, k) => (b(), C("div", {
|
|
340
|
-
class: I(`go-captcha gc-wrapper ${
|
|
340
|
+
class: I(`go-captcha gc-wrapper ${e.value.showTheme ? "gc-theme" : ""}`),
|
|
341
341
|
style: m(_.value)
|
|
342
342
|
}, [
|
|
343
|
-
c("div",
|
|
344
|
-
c("span", null, V(
|
|
345
|
-
c("div",
|
|
343
|
+
c("div", Se, [
|
|
344
|
+
c("span", null, V(e.value.title), 1),
|
|
345
|
+
c("div", Be, [
|
|
346
346
|
P(Z, {
|
|
347
347
|
width: 22,
|
|
348
348
|
height: 22,
|
|
@@ -361,16 +361,16 @@ const St = { class: "gc-header" }, Bt = { class: "gc-icon-block" }, Wt = { class
|
|
|
361
361
|
ref: d,
|
|
362
362
|
style: m(v.value)
|
|
363
363
|
}, [
|
|
364
|
-
c("div",
|
|
365
|
-
P(
|
|
364
|
+
c("div", We, [
|
|
365
|
+
P(ee)
|
|
366
366
|
]),
|
|
367
367
|
H(c("img", {
|
|
368
368
|
class: "gc-picture",
|
|
369
369
|
style: m(v.value),
|
|
370
|
-
src: i(
|
|
370
|
+
src: i(n).image,
|
|
371
371
|
alt: "..."
|
|
372
|
-
}, null, 12,
|
|
373
|
-
[F, i(
|
|
372
|
+
}, null, 12, Ye), [
|
|
373
|
+
[F, i(n).image !== ""]
|
|
374
374
|
]),
|
|
375
375
|
c("div", {
|
|
376
376
|
class: "gc-tile",
|
|
@@ -379,14 +379,14 @@ const St = { class: "gc-header" }, Bt = { class: "gc-icon-block" }, Wt = { class
|
|
|
379
379
|
style: m(w.value)
|
|
380
380
|
}, [
|
|
381
381
|
H(c("img", {
|
|
382
|
-
src: i(
|
|
382
|
+
src: i(n).thumb,
|
|
383
383
|
alt: "..."
|
|
384
|
-
}, null, 8,
|
|
385
|
-
[F, i(
|
|
384
|
+
}, null, 8, He), [
|
|
385
|
+
[F, i(n).thumb !== ""]
|
|
386
386
|
])
|
|
387
387
|
], 4)
|
|
388
388
|
], 4),
|
|
389
|
-
c("div",
|
|
389
|
+
c("div", Fe, [
|
|
390
390
|
c("div", {
|
|
391
391
|
class: "gc-drag-slide-bar",
|
|
392
392
|
ref_key: "dragBarRef",
|
|
@@ -394,7 +394,7 @@ const St = { class: "gc-header" }, Bt = { class: "gc-icon-block" }, Wt = { class
|
|
|
394
394
|
onMousedown: k[1] || (k[1] = //@ts-ignore
|
|
395
395
|
(...$) => i(u).dragEvent && i(u).dragEvent(...$))
|
|
396
396
|
}, [
|
|
397
|
-
|
|
397
|
+
Ae,
|
|
398
398
|
c("div", {
|
|
399
399
|
class: "gc-drag-block",
|
|
400
400
|
ref_key: "dragBlockRef",
|
|
@@ -403,18 +403,18 @@ const St = { class: "gc-header" }, Bt = { class: "gc-icon-block" }, Wt = { class
|
|
|
403
403
|
(...$) => i(u).dragEvent && i(u).dragEvent(...$)),
|
|
404
404
|
style: m({ left: i(u).state.dragLeft + "px" })
|
|
405
405
|
}, [
|
|
406
|
-
P(
|
|
406
|
+
P(ue)
|
|
407
407
|
], 36)
|
|
408
408
|
], 544)
|
|
409
409
|
])
|
|
410
410
|
], 6));
|
|
411
411
|
}
|
|
412
412
|
});
|
|
413
|
-
J.name = "
|
|
414
|
-
J.install = function(
|
|
415
|
-
|
|
413
|
+
J.name = "gocaptcha-slide";
|
|
414
|
+
J.install = function(l) {
|
|
415
|
+
l.component("gocaptcha-slide", J);
|
|
416
416
|
};
|
|
417
|
-
const
|
|
417
|
+
const ie = () => ({
|
|
418
418
|
width: 300,
|
|
419
419
|
height: 220,
|
|
420
420
|
verticalPadding: 16,
|
|
@@ -422,52 +422,52 @@ const it = () => ({
|
|
|
422
422
|
showTheme: !0,
|
|
423
423
|
title: "请拖拽贴图完成拼图"
|
|
424
424
|
});
|
|
425
|
-
function
|
|
426
|
-
const
|
|
427
|
-
|
|
425
|
+
function Ve(l, t, n, s) {
|
|
426
|
+
const e = U({ x: l.thumbX || 0, y: l.thumbY || 0 }), a = () => {
|
|
427
|
+
e.x = l.thumbX || 0, e.y = l.thumbY || 0;
|
|
428
428
|
};
|
|
429
429
|
return {
|
|
430
|
-
state:
|
|
430
|
+
state: e,
|
|
431
431
|
dragEvent: (u) => {
|
|
432
|
-
const g = u.touches && u.touches[0], r =
|
|
432
|
+
const g = u.touches && u.touches[0], r = s.value.offsetLeft, h = s.value.offsetTop, _ = n.value.offsetWidth, w = n.value.offsetHeight, v = s.value.offsetWidth, f = s.value.offsetHeight, k = _ - v, $ = w - f;
|
|
433
433
|
let S = !1, y = 0, x = 0, B = 0, T = 0;
|
|
434
434
|
g ? (y = g.pageX - r, x = g.pageY - h) : (y = u.clientX - r, x = u.clientY - h);
|
|
435
435
|
const W = (p) => {
|
|
436
436
|
S = !0;
|
|
437
437
|
const N = p.touches && p.touches[0];
|
|
438
438
|
let L = 0, Y = 0;
|
|
439
|
-
N ? (L = N.pageX - y, Y = N.pageY - x) : (L = p.clientX - y, Y = p.clientY - x), L <= 0 && (L = 0), Y <= 0 && (Y = 0), L >= k && (L = k), Y >= $ && (Y = $),
|
|
439
|
+
N ? (L = N.pageX - y, Y = N.pageY - x) : (L = p.clientX - y, Y = p.clientY - x), L <= 0 && (L = 0), Y <= 0 && (Y = 0), L >= k && (L = k), Y >= $ && (Y = $), e.x = L, e.y = Y, B = L, T = Y, t.move && t.move(L, Y), p.cancelBubble = !0, p.preventDefault();
|
|
440
440
|
}, X = (p) => {
|
|
441
|
-
|
|
441
|
+
se(n.value, p) && S && (S = !1, n.value.removeEventListener("mousemove", W, !1), n.value.removeEventListener("touchmove", W, { passive: !1 }), n.value.removeEventListener("mouseup", X, !1), n.value.removeEventListener("mouseout", X, !1), n.value.removeEventListener("touchend", X, !1), t.confirm && t.confirm({ x: B, y: T }, () => {
|
|
442
442
|
a();
|
|
443
443
|
}), p.cancelBubble = !0, p.preventDefault());
|
|
444
444
|
};
|
|
445
|
-
|
|
445
|
+
n.value.addEventListener("mousemove", W, !1), n.value.addEventListener("touchmove", W, { passive: !1 }), n.value.addEventListener("mouseup", X, !1), n.value.addEventListener("mouseout", X, !1), n.value.addEventListener("touchend", X, !1);
|
|
446
446
|
},
|
|
447
|
-
closeEvent: (u) => (
|
|
448
|
-
refreshEvent: (u) => (
|
|
447
|
+
closeEvent: (u) => (t && t.close && t.close(), a(), u.cancelBubble = !0, u.preventDefault(), !1),
|
|
448
|
+
refreshEvent: (u) => (t && t.refresh && t.refresh(), a(), u.cancelBubble = !0, u.preventDefault(), !1)
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
|
-
const
|
|
451
|
+
const Ne = { class: "gc-header gc-header2" }, Ie = { class: "gc-loading" }, je = ["src"], qe = ["src"], Ge = { class: "gc-footer" }, Je = { class: "gc-icon-block" }, K = /* @__PURE__ */ M({
|
|
452
452
|
__name: "index",
|
|
453
453
|
props: {
|
|
454
|
-
config: { default:
|
|
454
|
+
config: { default: ie },
|
|
455
455
|
events: { default: () => ({}) },
|
|
456
456
|
data: { default: () => ({}) }
|
|
457
457
|
},
|
|
458
|
-
setup(
|
|
459
|
-
const
|
|
460
|
-
...
|
|
461
|
-
...
|
|
458
|
+
setup(l) {
|
|
459
|
+
const t = l, { data: n, events: s } = t, e = D({
|
|
460
|
+
...ie(),
|
|
461
|
+
...t.config
|
|
462
462
|
});
|
|
463
|
-
j(() =>
|
|
464
|
-
|
|
465
|
-
...
|
|
466
|
-
...
|
|
463
|
+
j(() => t.config, () => {
|
|
464
|
+
e.value = {
|
|
465
|
+
...e.value,
|
|
466
|
+
...t.config
|
|
467
467
|
};
|
|
468
468
|
});
|
|
469
|
-
const a = D(null), d = D(null), o =
|
|
470
|
-
let g = (
|
|
469
|
+
const a = D(null), d = D(null), o = Ve(n, s, a, d), E = e.value.horizontalPadding || 0, u = e.value.verticalPadding || 0;
|
|
470
|
+
let g = (e.value.width || 0) + E * 2 + (e.value.showTheme ? 2 : 0);
|
|
471
471
|
const r = z(() => ({
|
|
472
472
|
width: g + "px",
|
|
473
473
|
paddingLeft: E + "px",
|
|
@@ -475,22 +475,22 @@ const Nt = { class: "gc-header gc-header2" }, It = { class: "gc-loading" }, jt =
|
|
|
475
475
|
paddingTop: u + "px",
|
|
476
476
|
paddingBottom: u + "px"
|
|
477
477
|
})), h = z(() => ({
|
|
478
|
-
width:
|
|
479
|
-
height:
|
|
478
|
+
width: n.thumbWidth + "px",
|
|
479
|
+
height: n.thumbHeight + "px",
|
|
480
480
|
top: o.state.y + "px",
|
|
481
481
|
left: o.state.x + "px"
|
|
482
482
|
})), _ = z(() => ({
|
|
483
|
-
width:
|
|
484
|
-
height:
|
|
483
|
+
width: e.value.width + "px",
|
|
484
|
+
height: e.value.height + "px"
|
|
485
485
|
}));
|
|
486
|
-
return
|
|
487
|
-
await
|
|
486
|
+
return ne(async () => {
|
|
487
|
+
await ce(), d.value && d.value.addEventListener("dragstart", (w) => w.preventDefault());
|
|
488
488
|
}), (w, v) => (b(), C("div", {
|
|
489
|
-
class: I(`go-captcha gc-wrapper ${
|
|
489
|
+
class: I(`go-captcha gc-wrapper ${e.value.showTheme ? "gc-theme" : ""}`),
|
|
490
490
|
style: m(r.value)
|
|
491
491
|
}, [
|
|
492
|
-
c("div",
|
|
493
|
-
c("span", null, V(
|
|
492
|
+
c("div", Ne, [
|
|
493
|
+
c("span", null, V(e.value.title), 1)
|
|
494
494
|
]),
|
|
495
495
|
c("div", {
|
|
496
496
|
class: "gc-body",
|
|
@@ -498,16 +498,16 @@ const Nt = { class: "gc-header gc-header2" }, It = { class: "gc-loading" }, jt =
|
|
|
498
498
|
ref: a,
|
|
499
499
|
style: m(_.value)
|
|
500
500
|
}, [
|
|
501
|
-
c("div",
|
|
502
|
-
P(
|
|
501
|
+
c("div", Ie, [
|
|
502
|
+
P(ee)
|
|
503
503
|
]),
|
|
504
504
|
H(c("img", {
|
|
505
505
|
class: "gc-picture",
|
|
506
506
|
style: m(_.value),
|
|
507
|
-
src: i(
|
|
507
|
+
src: i(n).image,
|
|
508
508
|
alt: "..."
|
|
509
|
-
}, null, 12,
|
|
510
|
-
[F, i(
|
|
509
|
+
}, null, 12, je), [
|
|
510
|
+
[F, i(n).image !== ""]
|
|
511
511
|
]),
|
|
512
512
|
c("div", {
|
|
513
513
|
class: "gc-tile",
|
|
@@ -520,15 +520,15 @@ const Nt = { class: "gc-header gc-header2" }, It = { class: "gc-loading" }, jt =
|
|
|
520
520
|
(...f) => i(o).dragEvent && i(o).dragEvent(...f))
|
|
521
521
|
}, [
|
|
522
522
|
H(c("img", {
|
|
523
|
-
src: i(
|
|
523
|
+
src: i(n).thumb,
|
|
524
524
|
alt: "..."
|
|
525
|
-
}, null, 8,
|
|
526
|
-
[F, i(
|
|
525
|
+
}, null, 8, qe), [
|
|
526
|
+
[F, i(n).thumb !== ""]
|
|
527
527
|
])
|
|
528
528
|
], 36)
|
|
529
529
|
], 4),
|
|
530
|
-
c("div",
|
|
531
|
-
c("div",
|
|
530
|
+
c("div", Ge, [
|
|
531
|
+
c("div", Je, [
|
|
532
532
|
P(Z, {
|
|
533
533
|
width: 22,
|
|
534
534
|
height: 22,
|
|
@@ -544,11 +544,11 @@ const Nt = { class: "gc-header gc-header2" }, It = { class: "gc-loading" }, jt =
|
|
|
544
544
|
], 6));
|
|
545
545
|
}
|
|
546
546
|
});
|
|
547
|
-
K.name = "
|
|
548
|
-
K.install = function(
|
|
549
|
-
|
|
547
|
+
K.name = "gocaptcha-slide-region";
|
|
548
|
+
K.install = function(l) {
|
|
549
|
+
l.component("gocaptcha-slide-region", K);
|
|
550
550
|
};
|
|
551
|
-
const
|
|
551
|
+
const te = () => ({
|
|
552
552
|
width: 300,
|
|
553
553
|
height: 220,
|
|
554
554
|
size: 220,
|
|
@@ -557,14 +557,14 @@ const et = () => ({
|
|
|
557
557
|
showTheme: !0,
|
|
558
558
|
title: "请拖动滑块完成拼图"
|
|
559
559
|
});
|
|
560
|
-
function
|
|
561
|
-
const
|
|
562
|
-
|
|
560
|
+
function Ke(l, t, n, s) {
|
|
561
|
+
const e = U({ dragLeft: 0, thumbAngle: l.angle || 0 }), a = () => {
|
|
562
|
+
e.dragLeft = 0, e.thumbAngle = 0;
|
|
563
563
|
};
|
|
564
564
|
return {
|
|
565
|
-
state:
|
|
565
|
+
state: e,
|
|
566
566
|
dragEvent: (u) => {
|
|
567
|
-
const g = u.touches && u.touches[0], r =
|
|
567
|
+
const g = u.touches && u.touches[0], r = n.value.offsetLeft, h = s.value.offsetWidth, _ = n.value.offsetWidth, w = h - _, v = 360 / w;
|
|
568
568
|
let f = 0, k = !1, $ = 0;
|
|
569
569
|
g ? $ = g.pageX - r : $ = u.clientX - r;
|
|
570
570
|
const S = (x) => {
|
|
@@ -572,47 +572,47 @@ function Kt(s, n, e, l) {
|
|
|
572
572
|
const B = x.touches && x.touches[0];
|
|
573
573
|
let T = 0;
|
|
574
574
|
if (B ? T = B.pageX - $ : T = x.clientX - $, T >= w) {
|
|
575
|
-
|
|
575
|
+
e.dragLeft = w;
|
|
576
576
|
return;
|
|
577
577
|
}
|
|
578
578
|
if (T <= 0) {
|
|
579
|
-
|
|
579
|
+
e.dragLeft = 0;
|
|
580
580
|
return;
|
|
581
581
|
}
|
|
582
|
-
|
|
582
|
+
e.dragLeft = T, f = T * v, e.thumbAngle = f, t.rotate && t.rotate(f), x.cancelBubble = !0, x.preventDefault();
|
|
583
583
|
}, y = (x) => {
|
|
584
|
-
|
|
584
|
+
se(s.value, x) && k && (s.value.removeEventListener("mousemove", S, !1), s.value.removeEventListener("touchmove", S, { passive: !1 }), s.value.removeEventListener("mouseup", y, !1), s.value.removeEventListener("mouseout", y, !1), s.value.removeEventListener("touchend", y, !1), k = !1, t.confirm && t.confirm(parseInt(f.toString()), () => {
|
|
585
585
|
a();
|
|
586
586
|
}), x.cancelBubble = !0, x.preventDefault());
|
|
587
587
|
};
|
|
588
|
-
|
|
588
|
+
s.value.addEventListener("mousemove", S, !1), s.value.addEventListener("touchmove", S, { passive: !1 }), s.value.addEventListener("mouseup", y, !1), s.value.addEventListener("mouseout", y, !1), s.value.addEventListener("touchend", y, !1);
|
|
589
589
|
},
|
|
590
|
-
closeEvent: (u) => (
|
|
591
|
-
refreshEvent: (u) => (
|
|
590
|
+
closeEvent: (u) => (t && t.close && t.close(), a(), u.cancelBubble = !0, u.preventDefault(), !1),
|
|
591
|
+
refreshEvent: (u) => (t && t.refresh && t.refresh(), a(), u.cancelBubble = !0, u.preventDefault(), !1)
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const Oe = { class: "gc-header" }, Qe = { class: "gc-icon-block" }, Ue = { class: "gc-loading" }, Ze = ["src"], Re = /* @__PURE__ */ c("div", { class: "gc-round" }, null, -1), et = { class: "gc-thumb gc-rotate-thumb" }, tt = ["src"], nt = { class: "gc-footer" }, ct = /* @__PURE__ */ c("div", { class: "gc-drag-line" }, null, -1), O = /* @__PURE__ */ M({
|
|
595
595
|
__name: "index",
|
|
596
596
|
props: {
|
|
597
|
-
config: { default:
|
|
597
|
+
config: { default: te },
|
|
598
598
|
events: { default: () => ({}) },
|
|
599
599
|
data: { default: () => ({}) }
|
|
600
600
|
},
|
|
601
|
-
setup(
|
|
602
|
-
const
|
|
603
|
-
...
|
|
604
|
-
...
|
|
601
|
+
setup(l) {
|
|
602
|
+
const t = l, { data: n, events: s } = t, e = D({
|
|
603
|
+
...te(),
|
|
604
|
+
...t.config
|
|
605
605
|
});
|
|
606
|
-
j(() =>
|
|
607
|
-
|
|
608
|
-
...
|
|
609
|
-
...
|
|
606
|
+
j(() => t.config, () => {
|
|
607
|
+
e.value = {
|
|
608
|
+
...e.value,
|
|
609
|
+
...t.config
|
|
610
610
|
};
|
|
611
611
|
});
|
|
612
|
-
const a = D(null), d = D(null), o =
|
|
613
|
-
const r =
|
|
612
|
+
const a = D(null), d = D(null), o = Ke(n, s, d, a), E = z(() => {
|
|
613
|
+
const r = e.value.horizontalPadding || 0, h = e.value.verticalPadding || 0;
|
|
614
614
|
return {
|
|
615
|
-
width: (
|
|
615
|
+
width: (e.value.width || 0) + r * 2 + (e.value.showTheme ? 2 : 0) + "px",
|
|
616
616
|
paddingLeft: r + "px",
|
|
617
617
|
paddingRight: r + "px",
|
|
618
618
|
paddingTop: h + "px",
|
|
@@ -622,21 +622,21 @@ const Ot = { class: "gc-header" }, Qt = { class: "gc-icon-block" }, Ut = { class
|
|
|
622
622
|
transform: `rotate(${o.state.thumbAngle}deg)`
|
|
623
623
|
})), g = z(() => {
|
|
624
624
|
var h;
|
|
625
|
-
const r = (((h =
|
|
625
|
+
const r = (((h = e.value) == null ? void 0 : h.size) || 0) > 0 ? e.value.size : te().size;
|
|
626
626
|
return {
|
|
627
627
|
width: r + "px",
|
|
628
628
|
height: r + "px"
|
|
629
629
|
};
|
|
630
630
|
});
|
|
631
|
-
return
|
|
632
|
-
await
|
|
631
|
+
return ne(async () => {
|
|
632
|
+
await ce(), d.value && d.value.addEventListener("dragstart", (r) => r.preventDefault());
|
|
633
633
|
}), (r, h) => (b(), C("div", {
|
|
634
|
-
class: I(`go-captcha gc-wrapper ${
|
|
634
|
+
class: I(`go-captcha gc-wrapper ${e.value.showTheme ? "gc-theme" : ""}`),
|
|
635
635
|
style: m(E.value)
|
|
636
636
|
}, [
|
|
637
|
-
c("div",
|
|
638
|
-
c("span", null, V(
|
|
639
|
-
c("div",
|
|
637
|
+
c("div", Oe, [
|
|
638
|
+
c("span", null, V(e.value.title), 1),
|
|
639
|
+
c("div", Qe, [
|
|
640
640
|
P(Z, {
|
|
641
641
|
width: 22,
|
|
642
642
|
height: 22,
|
|
@@ -654,36 +654,36 @@ const Ot = { class: "gc-header" }, Qt = { class: "gc-icon-block" }, Ut = { class
|
|
|
654
654
|
ref: "containerRef",
|
|
655
655
|
style: m(g.value)
|
|
656
656
|
}, [
|
|
657
|
-
c("div",
|
|
658
|
-
P(
|
|
657
|
+
c("div", Ue, [
|
|
658
|
+
P(ee)
|
|
659
659
|
]),
|
|
660
660
|
c("div", {
|
|
661
661
|
class: "gc-picture gc-rotate-picture",
|
|
662
662
|
style: m(g.value)
|
|
663
663
|
}, [
|
|
664
664
|
H(c("img", {
|
|
665
|
-
src: i(
|
|
665
|
+
src: i(n).image,
|
|
666
666
|
alt: "..."
|
|
667
|
-
}, null, 8,
|
|
668
|
-
[F, i(
|
|
667
|
+
}, null, 8, Ze), [
|
|
668
|
+
[F, i(n).image !== ""]
|
|
669
669
|
]),
|
|
670
|
-
|
|
670
|
+
Re
|
|
671
671
|
], 4),
|
|
672
|
-
c("div",
|
|
672
|
+
c("div", et, [
|
|
673
673
|
c("div", {
|
|
674
674
|
class: "gc-rotate-thumb-block",
|
|
675
675
|
style: m(u.value)
|
|
676
676
|
}, [
|
|
677
677
|
H(c("img", {
|
|
678
|
-
src: i(
|
|
678
|
+
src: i(n).thumb,
|
|
679
679
|
alt: "..."
|
|
680
|
-
}, null, 8,
|
|
681
|
-
[F, i(
|
|
680
|
+
}, null, 8, tt), [
|
|
681
|
+
[F, i(n).thumb !== ""]
|
|
682
682
|
])
|
|
683
683
|
], 4)
|
|
684
684
|
])
|
|
685
685
|
], 4),
|
|
686
|
-
c("div",
|
|
686
|
+
c("div", nt, [
|
|
687
687
|
c("div", {
|
|
688
688
|
class: "gc-drag-slide-bar",
|
|
689
689
|
ref_key: "dragBarRef",
|
|
@@ -691,7 +691,7 @@ const Ot = { class: "gc-header" }, Qt = { class: "gc-icon-block" }, Ut = { class
|
|
|
691
691
|
onMousedown: h[1] || (h[1] = //@ts-ignore
|
|
692
692
|
(..._) => i(o).dragEvent && i(o).dragEvent(..._))
|
|
693
693
|
}, [
|
|
694
|
-
|
|
694
|
+
ct,
|
|
695
695
|
c("div", {
|
|
696
696
|
class: "gc-drag-block",
|
|
697
697
|
ref_key: "dragBlockRef",
|
|
@@ -700,116 +700,116 @@ const Ot = { class: "gc-header" }, Qt = { class: "gc-icon-block" }, Ut = { class
|
|
|
700
700
|
(..._) => i(o).dragEvent && i(o).dragEvent(..._)),
|
|
701
701
|
style: m({ left: i(o).state.dragLeft + "px" })
|
|
702
702
|
}, [
|
|
703
|
-
P(
|
|
703
|
+
P(ue)
|
|
704
704
|
], 36)
|
|
705
705
|
], 544)
|
|
706
706
|
])
|
|
707
707
|
], 6));
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
|
-
O.name = "
|
|
711
|
-
O.install = function(
|
|
712
|
-
|
|
710
|
+
O.name = "gocaptcha-rotate";
|
|
711
|
+
O.install = function(l) {
|
|
712
|
+
l.component("gocaptcha-rotate", O);
|
|
713
713
|
};
|
|
714
|
-
const
|
|
714
|
+
const st = /* @__PURE__ */ c("circle", {
|
|
715
715
|
fill: "#3E7CFF",
|
|
716
716
|
cx: "100",
|
|
717
717
|
cy: "100",
|
|
718
718
|
r: "96.3"
|
|
719
|
-
}, null, -1),
|
|
719
|
+
}, null, -1), lt = /* @__PURE__ */ c("path", {
|
|
720
720
|
fill: "#FFFFFF",
|
|
721
721
|
d: `M140.8,64.4l-39.6-11.9h-2.4L59.2,64.4c-1.6,0.8-2.8,2.4-2.8,4v24.1c0,25.3,15.8,45.9,42.3,54.6
|
|
722
722
|
c0.4,0,0.8,0.4,1.2,0.4c0.4,0,0.8,0,1.2-0.4c26.5-8.7,42.3-28.9,42.3-54.6V68.3C143.5,66.8,142.3,65.2,140.8,64.4z`
|
|
723
|
-
}, null, -1),
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
],
|
|
723
|
+
}, null, -1), ot = [
|
|
724
|
+
st,
|
|
725
|
+
lt
|
|
726
|
+
], it = /* @__PURE__ */ M({
|
|
727
727
|
__name: "btn-default-icon",
|
|
728
728
|
emits: ["click"],
|
|
729
|
-
setup(
|
|
730
|
-
const
|
|
731
|
-
function
|
|
732
|
-
|
|
729
|
+
setup(l, { emit: t }) {
|
|
730
|
+
const n = t;
|
|
731
|
+
function s(e) {
|
|
732
|
+
n("click", e);
|
|
733
733
|
}
|
|
734
|
-
return (
|
|
734
|
+
return (e, a) => (b(), C("svg", A({
|
|
735
735
|
xmlns: "http://www.w3.org/2000/svg",
|
|
736
736
|
viewBox: "0 0 200 200",
|
|
737
737
|
width: "20",
|
|
738
738
|
height: "20"
|
|
739
|
-
},
|
|
739
|
+
}, e.$attrs, { onClick: s }), ot, 16));
|
|
740
740
|
}
|
|
741
|
-
}),
|
|
741
|
+
}), at = /* @__PURE__ */ c("path", {
|
|
742
742
|
fill: "#FFA000",
|
|
743
743
|
d: `M184,26.6L102.4,2.1h-4.9L16,26.6c-3.3,1.6-5.7,4.9-5.7,8.2v49.8c0,52.2,32.6,94.7,87.3,112.6
|
|
744
744
|
c0.8,0,1.6,0.8,2.4,0.8s1.6,0,2.4-0.8c54.7-18,87.3-59.6,87.3-112.6V34.7C189.8,31.5,187.3,28.2,184,26.6z M107.3,109.1
|
|
745
745
|
c-0.5,5.4-3.9,7.9-7.3,7.9c-2.5,0,0,0,0,0c-3.2-0.6-5.7-2-6.8-7.4l-4.4-50.9c0-5.1,6.2-9.7,11.5-9.7c5.3,0,11,4.7,11,9.9
|
|
746
746
|
L107.3,109.1z M109.3,133.3c0,5.1-4.2,9.3-9.3,9.3c-5.1,0-9.3-4.2-9.3-9.3c0-5.1,4.2-9.3,9.3-9.3C105.1,124,109.3,128.1,109.3,133.3
|
|
747
747
|
z`
|
|
748
|
-
}, null, -1),
|
|
749
|
-
|
|
750
|
-
],
|
|
748
|
+
}, null, -1), ut = [
|
|
749
|
+
at
|
|
750
|
+
], rt = /* @__PURE__ */ M({
|
|
751
751
|
__name: "btn-warn-icon",
|
|
752
752
|
emits: ["click"],
|
|
753
|
-
setup(
|
|
754
|
-
const
|
|
755
|
-
function
|
|
756
|
-
|
|
753
|
+
setup(l, { emit: t }) {
|
|
754
|
+
const n = t;
|
|
755
|
+
function s(e) {
|
|
756
|
+
n("click", e);
|
|
757
757
|
}
|
|
758
|
-
return (
|
|
758
|
+
return (e, a) => (b(), C("svg", A({
|
|
759
759
|
xmlns: "http://www.w3.org/2000/svg",
|
|
760
760
|
viewBox: "0 0 200 200",
|
|
761
761
|
width: "20",
|
|
762
762
|
height: "20"
|
|
763
|
-
},
|
|
763
|
+
}, e.$attrs, { onClick: s }), ut, 16));
|
|
764
764
|
}
|
|
765
|
-
}),
|
|
765
|
+
}), dt = /* @__PURE__ */ c("path", {
|
|
766
766
|
fill: "#ED4630",
|
|
767
767
|
d: `M184,26.6L102.4,2.1h-4.9L16,26.6c-3.3,1.6-5.7,4.9-5.7,8.2v49.8c0,52.2,32.6,94.7,87.3,112.6
|
|
768
768
|
c0.8,0,1.6,0.8,2.4,0.8s1.6,0,2.4-0.8c54.7-18,87.3-59.6,87.3-112.6V34.7C189.8,31.5,187.3,28.2,184,26.6z M134.5,123.1
|
|
769
769
|
c3.1,3.1,3.1,8.2,0,11.3c-1.6,1.6-3.6,2.3-5.7,2.3s-4.1-0.8-5.7-2.3L100,111.3l-23.1,23.1c-1.6,1.6-3.6,2.3-5.7,2.3
|
|
770
770
|
c-2,0-4.1-0.8-5.7-2.3c-3.1-3.1-3.1-8.2,0-11.3L88.7,100L65.5,76.9c-3.1-3.1-3.1-8.2,0-11.3c3.1-3.1,8.2-3.1,11.3,0L100,88.7
|
|
771
771
|
l23.1-23.1c3.1-3.1,8.2-3.1,11.3,0c3.1,3.1,3.1,8.2,0,11.3L111.3,100L134.5,123.1z`
|
|
772
|
-
}, null, -1),
|
|
773
|
-
|
|
774
|
-
],
|
|
772
|
+
}, null, -1), ht = [
|
|
773
|
+
dt
|
|
774
|
+
], vt = /* @__PURE__ */ M({
|
|
775
775
|
__name: "btn-error-icon",
|
|
776
776
|
emits: ["click"],
|
|
777
|
-
setup(
|
|
778
|
-
const
|
|
779
|
-
function
|
|
780
|
-
|
|
777
|
+
setup(l, { emit: t }) {
|
|
778
|
+
const n = t;
|
|
779
|
+
function s(e) {
|
|
780
|
+
n("click", e);
|
|
781
781
|
}
|
|
782
|
-
return (
|
|
782
|
+
return (e, a) => (b(), C("svg", A({
|
|
783
783
|
xmlns: "http://www.w3.org/2000/svg",
|
|
784
784
|
viewBox: "0 0 200 200",
|
|
785
785
|
width: "20",
|
|
786
786
|
height: "20"
|
|
787
|
-
},
|
|
787
|
+
}, e.$attrs, { onClick: s }), ht, 16));
|
|
788
788
|
}
|
|
789
|
-
}),
|
|
789
|
+
}), gt = /* @__PURE__ */ c("path", {
|
|
790
790
|
fill: "#5EAA2F",
|
|
791
791
|
d: `M183.3,27.2L102.4,2.9h-4.9L16.7,27.2C13.4,28.8,11,32,11,35.3v49.4c0,51.8,32.4,93.9,86.6,111.7
|
|
792
792
|
c0.8,0,1.6,0.8,2.4,0.8c0.8,0,1.6,0,2.4-0.8c54.2-17.8,86.6-59.1,86.6-111.7V35.3C189,32,186.6,28.8,183.3,27.2z M146.1,81.4
|
|
793
793
|
l-48.5,48.5c-1.6,1.6-3.2,2.4-5.7,2.4c-2.4,0-4-0.8-5.7-2.4L62,105.7c-3.2-3.2-3.2-8.1,0-11.3c3.2-3.2,8.1-3.2,11.3,0l18.6,18.6
|
|
794
794
|
l42.9-42.9c3.2-3.2,8.1-3.2,11.3,0C149.4,73.3,149.4,78.2,146.1,81.4L146.1,81.4z`
|
|
795
|
-
}, null, -1),
|
|
796
|
-
|
|
797
|
-
],
|
|
795
|
+
}, null, -1), ft = [
|
|
796
|
+
gt
|
|
797
|
+
], pt = /* @__PURE__ */ M({
|
|
798
798
|
__name: "btn-success-icon",
|
|
799
799
|
emits: ["click"],
|
|
800
|
-
setup(
|
|
801
|
-
const
|
|
802
|
-
function
|
|
803
|
-
|
|
800
|
+
setup(l, { emit: t }) {
|
|
801
|
+
const n = t;
|
|
802
|
+
function s(e) {
|
|
803
|
+
n("click", e);
|
|
804
804
|
}
|
|
805
|
-
return (
|
|
805
|
+
return (e, a) => (b(), C("svg", A({
|
|
806
806
|
xmlns: "http://www.w3.org/2000/svg",
|
|
807
807
|
viewBox: "0 0 200 200",
|
|
808
808
|
width: "20",
|
|
809
809
|
height: "20"
|
|
810
|
-
},
|
|
810
|
+
}, e.$attrs, { onClick: s }), ft, 16));
|
|
811
811
|
}
|
|
812
|
-
}),
|
|
812
|
+
}), ae = () => ({
|
|
813
813
|
width: 330,
|
|
814
814
|
height: 44,
|
|
815
815
|
verticalPadding: 12,
|
|
@@ -817,32 +817,32 @@ const se = /* @__PURE__ */ c("circle", {
|
|
|
817
817
|
}), Q = /* @__PURE__ */ M({
|
|
818
818
|
__name: "index",
|
|
819
819
|
props: {
|
|
820
|
-
config: { default:
|
|
820
|
+
config: { default: ae },
|
|
821
821
|
clickEvent: {},
|
|
822
822
|
disabled: { type: Boolean, default: !1 },
|
|
823
823
|
type: { default: "default" },
|
|
824
824
|
title: { default: "点击按键进行验证" }
|
|
825
825
|
},
|
|
826
826
|
emits: ["click-event"],
|
|
827
|
-
setup(
|
|
828
|
-
const
|
|
829
|
-
...
|
|
830
|
-
...
|
|
827
|
+
setup(l, { emit: t }) {
|
|
828
|
+
const n = l, { type: s, title: e, disabled: a } = ve(n), d = D({
|
|
829
|
+
...ae(),
|
|
830
|
+
...n.config
|
|
831
831
|
});
|
|
832
|
-
j(() =>
|
|
832
|
+
j(() => n.config, () => {
|
|
833
833
|
d.value = {
|
|
834
834
|
...d.value,
|
|
835
|
-
...
|
|
835
|
+
...n.config
|
|
836
836
|
};
|
|
837
837
|
});
|
|
838
|
-
const o = z(() => ["go-captcha", "gc-btn-block", `gc-${
|
|
838
|
+
const o = z(() => ["go-captcha", "gc-btn-block", `gc-${s.value}`, a.value ? "gc-disabled" : ""]), E = z(() => ({
|
|
839
839
|
width: d.value.width + "px",
|
|
840
840
|
height: d.value.height + "px",
|
|
841
841
|
paddingLeft: d.value.horizontalPadding + "px",
|
|
842
842
|
paddingRight: d.value.horizontalPadding + "px",
|
|
843
843
|
paddingTop: d.value.verticalPadding + "px",
|
|
844
844
|
paddingBottom: d.value.verticalPadding + "px"
|
|
845
|
-
})), u =
|
|
845
|
+
})), u = t;
|
|
846
846
|
function g(r) {
|
|
847
847
|
u("click-event", r);
|
|
848
848
|
}
|
|
@@ -852,22 +852,20 @@ const se = /* @__PURE__ */ c("circle", {
|
|
|
852
852
|
onClick: g
|
|
853
853
|
}, [
|
|
854
854
|
c("div", {
|
|
855
|
-
class: I(i(
|
|
855
|
+
class: I(i(s) === "default" ? "gc-ripple" : "")
|
|
856
856
|
}, [
|
|
857
|
-
i(
|
|
857
|
+
i(s) === "default" ? (b(), q(it, { key: 0 })) : i(s) === "warn" ? (b(), q(rt, { key: 1 })) : i(s) === "error" ? (b(), q(vt, { key: 2 })) : i(s) === "success" ? (b(), q(pt, { key: 3 })) : ge("", !0)
|
|
858
858
|
], 2),
|
|
859
|
-
c("span", null, V(i(
|
|
859
|
+
c("span", null, V(i(e)), 1)
|
|
860
860
|
], 6));
|
|
861
861
|
}
|
|
862
862
|
});
|
|
863
|
-
Q.name = "
|
|
864
|
-
Q.install = function(
|
|
865
|
-
|
|
863
|
+
Q.name = "gocaptcha-button";
|
|
864
|
+
Q.install = function(l) {
|
|
865
|
+
l.component("gocaptcha-button", Q);
|
|
866
866
|
};
|
|
867
|
-
const
|
|
868
|
-
|
|
869
|
-
G.install(s), J.install(s), K.install(s), O.install(s), Q.install(s);
|
|
870
|
-
}
|
|
867
|
+
const _t = (l) => {
|
|
868
|
+
l.installed || (l.installed = !0, [G, J, K, O, Q].map((t) => l.use(t)));
|
|
871
869
|
};
|
|
872
870
|
export {
|
|
873
871
|
Q as Button,
|
|
@@ -875,5 +873,5 @@ export {
|
|
|
875
873
|
O as Rotate,
|
|
876
874
|
J as Slide,
|
|
877
875
|
K as SlideRegion,
|
|
878
|
-
|
|
876
|
+
_t as default
|
|
879
877
|
};
|