go-captcha-vue 2.0.3 → 2.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.
@@ -1,5 +1,5 @@
1
- import { defineComponent as U, openBlock as z, createElementBlock as Y, mergeProps as oe, createElementVNode as o, reactive as B, toRaw as I, watch as F, computed as x, withDirectives as K, normalizeClass as se, normalizeStyle as D, toDisplayString as ie, vShow as Q, createVNode as A, unref as v, Fragment as De, renderList as $e, ref as ee, onMounted as pe, nextTick as _e, toRefs as ze, createBlock as ae, createCommentVNode as Ce } from "vue";
2
- const we = () => ({
1
+ import { defineComponent as q, openBlock as z, createElementBlock as H, mergeProps as oe, createElementVNode as o, reactive as T, toRaw as V, watch as F, computed as L, withDirectives as K, normalizeClass as se, normalizeStyle as D, toDisplayString as ie, vShow as Q, createVNode as I, unref as v, Fragment as $e, renderList as ze, ref as ee, onMounted as _e, nextTick as be, onUnmounted as we, toRefs as Ce, createBlock as le, createCommentVNode as Se } from "vue";
2
+ const Ee = () => ({
3
3
  width: 300,
4
4
  height: 220,
5
5
  thumbWidth: 150,
@@ -11,31 +11,31 @@ const we = () => ({
11
11
  buttonText: "确认",
12
12
  iconSize: 22,
13
13
  dotSize: 24
14
- }), Se = /* @__PURE__ */ o("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
14
+ }), Be = /* @__PURE__ */ o("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
15
15
  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
16
16
  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
17
17
  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
18
18
  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
19
19
  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
20
20
  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
21
- 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), Be = [
22
- Se
23
- ], ge = /* @__PURE__ */ U({
21
+ 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), Te = [
22
+ Be
23
+ ], fe = /* @__PURE__ */ q({
24
24
  __name: "close-icon",
25
25
  emits: ["click"],
26
- setup(n, { emit: t }) {
26
+ setup(s, { emit: t }) {
27
27
  const a = t;
28
28
  function r(i) {
29
29
  a("click", i);
30
30
  }
31
- return (i, m) => (z(), Y("svg", oe({
31
+ return (i, m) => (z(), H("svg", oe({
32
32
  xmlns: "http://www.w3.org/2000/svg",
33
33
  viewBox: "0 0 200 200",
34
34
  width: "20",
35
35
  height: "20"
36
- }, i.$attrs, { onClick: r }), Be, 16));
36
+ }, i.$attrs, { onClick: r }), Te, 16));
37
37
  }
38
- }), Te = /* @__PURE__ */ o("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
38
+ }), Pe = /* @__PURE__ */ o("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
39
39
  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
40
40
  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
41
41
  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
@@ -52,24 +52,24 @@ const we = () => ({
52
52
  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
53
53
  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
54
54
  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
55
- L180.6,98.9z` }, null, -1), Pe = [
56
- Te
57
- ], fe = /* @__PURE__ */ U({
55
+ L180.6,98.9z` }, null, -1), Xe = [
56
+ Pe
57
+ ], ve = /* @__PURE__ */ q({
58
58
  __name: "refresh-icon",
59
59
  emits: ["click"],
60
- setup(n, { emit: t }) {
60
+ setup(s, { emit: t }) {
61
61
  const a = t;
62
62
  function r(i) {
63
63
  a("click", i);
64
64
  }
65
- return (i, m) => (z(), Y("svg", oe({
65
+ return (i, m) => (z(), H("svg", oe({
66
66
  xmlns: "http://www.w3.org/2000/svg",
67
67
  viewBox: "0 0 200 200",
68
68
  width: "20",
69
69
  height: "20"
70
- }, i.$attrs, { onClick: r }), Pe, 16));
70
+ }, i.$attrs, { onClick: r }), Xe, 16));
71
71
  }
72
- }), Xe = /* @__PURE__ */ o("circle", {
72
+ }), We = /* @__PURE__ */ o("circle", {
73
73
  cx: "50",
74
74
  cy: "36.8101",
75
75
  r: "10"
@@ -83,55 +83,55 @@ const we = () => ({
83
83
  keyTimes: "0;0.5;1",
84
84
  values: "23;77;23"
85
85
  })
86
- ], -1), We = [
87
- Xe
88
- ], ve = /* @__PURE__ */ U({
86
+ ], -1), Me = [
87
+ We
88
+ ], me = /* @__PURE__ */ q({
89
89
  __name: "loading-icon",
90
90
  emits: ["click"],
91
- setup(n, { emit: t }) {
91
+ setup(s, { emit: t }) {
92
92
  const a = t;
93
93
  function r(i) {
94
94
  a("click", i);
95
95
  }
96
- return (i, m) => (z(), Y("svg", oe({
96
+ return (i, m) => (z(), H("svg", oe({
97
97
  xmlns: "http://www.w3.org/2000/svg",
98
98
  viewBox: "0 0 100 100",
99
99
  preserveAspectRatio: "xMidYMid",
100
100
  width: "84",
101
101
  height: "84"
102
- }, i.$attrs, { onClick: r }), We, 16));
102
+ }, i.$attrs, { onClick: r }), Me, 16));
103
103
  }
104
104
  });
105
- function Me(n) {
105
+ function Fe(s) {
106
106
  let t = 0, a = 0;
107
- if (n.getBoundingClientRect) {
108
- const r = n.getBoundingClientRect(), i = document.documentElement;
107
+ if (s.getBoundingClientRect) {
108
+ const r = s.getBoundingClientRect(), i = document.documentElement;
109
109
  t = r.left + Math.max(i.scrollLeft, document.body.scrollLeft) - i.clientLeft, a = r.top + Math.max(i.scrollTop, document.body.scrollTop) - i.clientTop;
110
110
  } else
111
- for (; n !== document.body; )
112
- t += n.offsetLeft, a += n.offsetTop, n = n.offsetParent;
111
+ for (; s !== document.body; )
112
+ t += s.offsetLeft, a += s.offsetTop, s = s.offsetParent;
113
113
  return {
114
114
  domX: t,
115
115
  domY: a
116
116
  };
117
117
  }
118
- function be(n, t) {
118
+ function ae(s, t) {
119
119
  let a = t.relatedTarget;
120
120
  try {
121
- for (; a && a !== n; )
121
+ for (; a && a !== s; )
122
122
  a = a.parentNode;
123
123
  } catch (r) {
124
124
  console.warn(r);
125
125
  }
126
- return a !== n;
126
+ return a !== s;
127
127
  }
128
- function Fe(n, t, a) {
129
- const r = B({ list: [] }), i = (s) => {
130
- const p = s.currentTarget, b = Me(p), l = s.pageX || s.clientX, _ = s.pageY || s.clientY, g = b.domX, S = b.domY, L = l - g, h = _ - S, f = parseInt(L.toString()), w = parseInt(h.toString()), T = /* @__PURE__ */ new Date(), q = r.list.length;
131
- return r.list.push({ key: T.getTime(), index: q + 1, x: f, y: w }), t.click && t.click(f, w), s.cancelBubble = !0, s.preventDefault(), !1;
132
- }, m = (s) => (t.confirm && t.confirm(I(r.list), () => {
128
+ function Ye(s, t, a) {
129
+ const r = T({ list: [] }), i = (n) => {
130
+ const _ = n.currentTarget, x = Fe(_), l = n.pageX || n.clientX, b = n.pageY || n.clientY, h = x.domX, S = x.domY, Y = l - h, w = b - S, g = parseInt(Y.toString()), f = parseInt(w.toString()), E = /* @__PURE__ */ new Date(), B = r.list.length;
131
+ return r.list.push({ key: E.getTime(), index: B + 1, x: g, y: f }), t.click && t.click(g, f), n.cancelBubble = !0, n.preventDefault(), !1;
132
+ }, m = (n) => (t.confirm && t.confirm(V(r.list), () => {
133
133
  y();
134
- }), s.cancelBubble = !0, s.preventDefault(), !1), c = (s) => (e(), s.cancelBubble = !0, s.preventDefault(), !1), u = (s) => (d(), s.cancelBubble = !0, s.preventDefault(), !1), e = () => {
134
+ }), n.cancelBubble = !0, n.preventDefault(), !1), c = (n) => (e(), n.cancelBubble = !0, n.preventDefault(), !1), u = (n) => (d(), n.cancelBubble = !0, n.preventDefault(), !1), e = () => {
135
135
  t.close && t.close(), y();
136
136
  }, d = () => {
137
137
  t.refresh && t.refresh(), y();
@@ -152,119 +152,119 @@ function Fe(n, t, a) {
152
152
  close: e
153
153
  };
154
154
  }
155
- const Re = { class: "gc-header" }, Ye = ["src"], He = { class: "gc-loading" }, Oe = ["src"], je = { class: "gc-dots" }, Ae = { class: "gc-footer" }, Ie = { class: "gc-icon-block gc-icon-block2" }, Ve = { class: "gc-button-block" }, le = /* @__PURE__ */ U({
155
+ const Re = { class: "gc-header" }, He = ["src"], Oe = { class: "gc-loading" }, je = ["src"], Ae = { class: "gc-dots" }, Ie = { class: "gc-footer" }, Ve = { class: "gc-icon-block gc-icon-block2" }, Ne = { class: "gc-button-block" }, re = /* @__PURE__ */ q({
156
156
  __name: "index",
157
157
  props: {
158
- config: { default: we },
158
+ config: { default: Ee },
159
159
  events: { default: () => ({}) },
160
160
  data: { default: () => ({}) }
161
161
  },
162
- setup(n, { expose: t }) {
163
- const a = n, { data: r, events: i, config: m } = a, c = B({ ...I(r) }), u = B({ ...I(i) }), e = B({ ...we(), ...I(m) });
164
- F(() => a.data, (l, _) => {
162
+ setup(s, { expose: t }) {
163
+ const a = s, { data: r, events: i, config: m } = a, c = T({ ...V(r) }), u = T({ ...V(i) }), e = T({ ...Ee(), ...V(m) });
164
+ F(() => a.data, (l, b) => {
165
165
  Object.assign(c, l);
166
- }, { deep: !0 }), F(() => a.events, (l, _) => {
166
+ }, { deep: !0 }), F(() => a.events, (l, b) => {
167
167
  Object.assign(u, l);
168
- }, { deep: !0 }), F(() => a.config, (l, _) => {
168
+ }, { deep: !0 }), F(() => a.config, (l, b) => {
169
169
  Object.assign(e, l);
170
170
  }, { deep: !0 });
171
- const d = Fe(c, u, () => {
171
+ const d = Ye(c, u, () => {
172
172
  c.thumb = "", c.image = "";
173
- }), y = x(() => {
174
- const l = e.horizontalPadding || 0, _ = e.verticalPadding || 0;
173
+ }), y = L(() => {
174
+ const l = e.horizontalPadding || 0, b = e.verticalPadding || 0;
175
175
  return {
176
176
  width: (e.width || 0) + l * 2 + (e.showTheme ? 2 : 0) + "px",
177
177
  paddingLeft: l + "px",
178
178
  paddingRight: l + "px",
179
- paddingTop: _ + "px",
180
- paddingBottom: _ + "px"
179
+ paddingTop: b + "px",
180
+ paddingBottom: b + "px"
181
181
  };
182
- }), E = x(() => ({
182
+ }), p = L(() => ({
183
183
  width: e.thumbWidth + "px",
184
184
  height: e.thumbHeight + "px"
185
- })), s = x(() => ({
185
+ })), n = L(() => ({
186
186
  width: e.width + "px",
187
187
  height: e.height + "px"
188
- })), p = x(() => c.image != "" || c.thumb != ""), b = x(() => (e.width || 0) > 0 || (e.height || 0) > 0);
188
+ })), _ = L(() => c.image != "" || c.thumb != ""), x = L(() => (e.width || 0) > 0 || (e.height || 0) > 0);
189
189
  return t({
190
190
  reset: d.resetData,
191
191
  clear: d.clearData,
192
192
  refresh: d.refresh,
193
193
  close: d.close
194
- }), (l, _) => K((z(), Y("div", {
194
+ }), (l, b) => K((z(), H("div", {
195
195
  class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
196
196
  style: D(y.value)
197
197
  }, [
198
198
  o("div", Re, [
199
199
  o("span", null, ie(e.title), 1),
200
200
  K(o("img", {
201
- style: D(E.value),
201
+ style: D(p.value),
202
202
  src: c.thumb,
203
203
  alt: ""
204
- }, null, 12, Ye), [
205
- [Q, p.value]
204
+ }, null, 12, He), [
205
+ [Q, _.value]
206
206
  ])
207
207
  ]),
208
208
  o("div", {
209
209
  class: "gc-body",
210
- style: D(s.value)
210
+ style: D(n.value)
211
211
  }, [
212
- o("div", He, [
213
- A(ve)
212
+ o("div", Oe, [
213
+ I(me)
214
214
  ]),
215
215
  K(o("img", {
216
- style: D(s.value),
216
+ style: D(n.value),
217
217
  class: "gc-picture",
218
218
  src: c.image,
219
- onClick: _[0] || (_[0] = //@ts-ignore
220
- (...g) => v(d).clickEvent && v(d).clickEvent(...g)),
219
+ onClick: b[0] || (b[0] = //@ts-ignore
220
+ (...h) => v(d).clickEvent && v(d).clickEvent(...h)),
221
221
  alt: ""
222
- }, null, 12, Oe), [
223
- [Q, p.value]
222
+ }, null, 12, je), [
223
+ [Q, _.value]
224
224
  ]),
225
- o("div", je, [
226
- (z(!0), Y(De, null, $e(v(d).dots.list, (g) => (z(), Y("div", {
225
+ o("div", Ae, [
226
+ (z(!0), H($e, null, ze(v(d).dots.list, (h) => (z(), H("div", {
227
227
  class: "gc-dot",
228
- key: `${g.key + "-" + g.index}`,
228
+ key: `${h.key + "-" + h.index}`,
229
229
  style: D({
230
230
  width: e.dotSize + "px",
231
231
  height: e.dotSize + "px",
232
232
  borderRadius: e.dotSize + "px",
233
- top: g.y - (e.dotSize || 1) / 2 - 1 + "px",
234
- left: g.x - (e.dotSize || 1) / 2 - 1 + "px"
233
+ top: h.y - (e.dotSize || 1) / 2 - 1 + "px",
234
+ left: h.x - (e.dotSize || 1) / 2 - 1 + "px"
235
235
  })
236
- }, ie(g.index), 5))), 128))
236
+ }, ie(h.index), 5))), 128))
237
237
  ])
238
238
  ], 4),
239
- o("div", Ae, [
240
- o("div", Ie, [
241
- A(ge, {
239
+ o("div", Ie, [
240
+ o("div", Ve, [
241
+ I(fe, {
242
242
  width: e.iconSize,
243
243
  height: e.iconSize,
244
244
  onClick: v(d).closeEvent
245
245
  }, null, 8, ["width", "height", "onClick"]),
246
- A(fe, {
246
+ I(ve, {
247
247
  width: e.iconSize,
248
248
  height: e.iconSize,
249
249
  onClick: v(d).refreshEvent
250
250
  }, null, 8, ["width", "height", "onClick"])
251
251
  ]),
252
- o("div", Ve, [
252
+ o("div", Ne, [
253
253
  o("button", {
254
- class: se(!p.value && "disabled"),
255
- onClick: _[1] || (_[1] = //@ts-ignore
256
- (...g) => v(d).confirmEvent && v(d).confirmEvent(...g))
254
+ class: se(!_.value && "disabled"),
255
+ onClick: b[1] || (b[1] = //@ts-ignore
256
+ (...h) => v(d).confirmEvent && v(d).confirmEvent(...h))
257
257
  }, ie(e.buttonText), 3)
258
258
  ])
259
259
  ])
260
260
  ], 6)), [
261
- [Q, b.value]
261
+ [Q, x.value]
262
262
  ]);
263
263
  }
264
264
  });
265
- le.name = "gocaptcha-click";
266
- le.install = function(n) {
267
- n.component("gocaptcha-click", le);
265
+ re.name = "gocaptcha-click";
266
+ re.install = function(s) {
267
+ s.component("gocaptcha-click", re);
268
268
  };
269
269
  const xe = () => ({
270
270
  width: 300,
@@ -277,26 +277,26 @@ const xe = () => ({
277
277
  title: "请拖动滑块完成拼图",
278
278
  iconSize: 22,
279
279
  scope: !0
280
- }), Ne = /* @__PURE__ */ o("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
280
+ }), Ue = /* @__PURE__ */ o("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
281
281
  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
282
- 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), Ue = [
283
- Ne
284
- ], ye = /* @__PURE__ */ U({
282
+ 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), qe = [
283
+ Ue
284
+ ], ke = /* @__PURE__ */ q({
285
285
  __name: "arrows-icon",
286
286
  emits: ["click"],
287
- setup(n, { emit: t }) {
287
+ setup(s, { emit: t }) {
288
288
  const a = t;
289
289
  function r(i) {
290
290
  a("click", i);
291
291
  }
292
- return (i, m) => (z(), Y("svg", oe({
292
+ return (i, m) => (z(), H("svg", oe({
293
293
  xmlns: "http://www.w3.org/2000/svg",
294
294
  viewBox: "0 0 200 200",
295
295
  width: "20",
296
296
  height: "20"
297
- }, i.$attrs, { onClick: r }), Ue, 16));
297
+ }, i.$attrs, { onClick: r }), qe, 16));
298
298
  }
299
- }), qe = () => ({
299
+ }), Ge = () => ({
300
300
  thumbX: 0,
301
301
  thumbY: 0,
302
302
  thumbWidth: 0,
@@ -304,204 +304,208 @@ const xe = () => ({
304
304
  image: "",
305
305
  thumb: ""
306
306
  });
307
- function Ge(n, t, a, r, i, m, c, u, e) {
308
- const d = B({ dragLeft: 0, thumbLeft: n.thumbX || 0, isFreeze: !1 });
309
- F(() => n, (g, S) => {
310
- d.isFreeze || (d.thumbLeft = g.thumbX || 0);
307
+ function Je(s, t, a, r, i, m, c, u, e) {
308
+ const d = T({ dragLeft: 0, thumbLeft: s.thumbX || 0, isFreeze: !1 });
309
+ F(() => s, (h, S) => {
310
+ d.isFreeze || (d.thumbLeft = h.thumbX || 0);
311
311
  }, { deep: !0 });
312
- const y = (g) => {
313
- const S = g.touches && g.touches[0], L = c.value.offsetLeft, h = i.value.offsetWidth, f = c.value.offsetWidth, w = h - f, T = m.value.offsetWidth, q = m.value.offsetLeft, te = h - T, G = (h - (T + q)) / w;
314
- let V = !1, P = null, Z = 0, H = 0;
315
- S ? Z = S.pageX - L : Z = g.clientX - L;
312
+ const y = (h) => {
313
+ if (!ae(u.value, h))
314
+ return;
315
+ const S = h.touches && h.touches[0], Y = c.value.offsetLeft, w = i.value.offsetWidth, g = c.value.offsetWidth, f = w - g, E = m.value.offsetWidth, B = m.value.offsetLeft, te = w - E, G = (w - (E + B)) / f;
316
+ let N = !1, P = null, Z = 0, O = 0;
317
+ S ? Z = S.pageX - Y : Z = h.clientX - Y;
316
318
  const R = (W) => {
317
- V = !0;
319
+ N = !0;
318
320
  const J = W.touches && W.touches[0];
319
321
  let M = 0;
320
322
  J ? M = J.pageX - Z : M = W.clientX - Z;
321
- let ke = q + M * G;
322
- if (M >= w) {
323
- d.dragLeft = w, d.thumbLeft = H = te;
323
+ let De = B + M * G;
324
+ if (M >= f) {
325
+ d.dragLeft = f, d.thumbLeft = O = te;
324
326
  return;
325
327
  }
326
328
  if (M <= 0) {
327
- d.dragLeft = 0, d.thumbLeft = H = q;
329
+ d.dragLeft = 0, d.thumbLeft = O = B;
328
330
  return;
329
331
  }
330
- d.dragLeft = M, d.thumbLeft = H = ke, t.move && t.move(H, n.thumbY || 0), W.cancelBubble = !0, W.preventDefault();
331
- }, N = (W) => {
332
- be(u.value, W) && V && (X(), !(H < 0) && (V = !1, t.confirm && t.confirm({ x: parseInt(H.toString()), y: n.thumbY || 0 }, () => {
332
+ d.dragLeft = M, d.thumbLeft = O = De, t.move && t.move(O, s.thumbY || 0), W.cancelBubble = !0, W.preventDefault();
333
+ }, U = (W) => {
334
+ ae(u.value, W) && (X(), N && (N = !1, !(O < 0) && (t.confirm && t.confirm({ x: parseInt(O.toString()), y: s.thumbY || 0 }, () => {
333
335
  l();
334
- }), W.cancelBubble = !0, W.preventDefault()));
335
- }, O = (W) => {
336
+ }), W.cancelBubble = !0, W.preventDefault())));
337
+ }, j = (W) => {
336
338
  P = W;
337
- }, j = () => {
339
+ }, A = () => {
338
340
  P = null;
339
341
  }, ce = (W) => {
340
- P && (N(P), X());
342
+ P && (U(P), X());
341
343
  }, k = a.scope, $ = k ? r.value : u.value, C = k ? r.value : document.body, X = () => {
342
- C.removeEventListener("mousemove", R, !1), C.removeEventListener("touchmove", R, { passive: !1 }), $.removeEventListener("mouseup", N, !1), $.removeEventListener("mouseenter", j, !1), $.removeEventListener("mouseleave", O, !1), $.removeEventListener("touchend", N, !1), C.removeEventListener("mouseleave", N, !1), C.removeEventListener("mouseup", ce, !1), d.isFreeze = !1;
344
+ C.removeEventListener("mousemove", R, !1), C.removeEventListener("touchmove", R, { passive: !1 }), $.removeEventListener("mouseup", U, !1), $.removeEventListener("mouseenter", A, !1), $.removeEventListener("mouseleave", j, !1), $.removeEventListener("touchend", U, !1), C.removeEventListener("mouseleave", U, !1), C.removeEventListener("mouseup", ce, !1), d.isFreeze = !1;
343
345
  };
344
- d.isFreeze = !0, C.addEventListener("mousemove", R, !1), C.addEventListener("touchmove", R, { passive: !1 }), $.addEventListener("mouseup", N, !1), $.addEventListener("mouseenter", j, !1), $.addEventListener("mouseleave", O, !1), $.addEventListener("touchend", N, !1), C.addEventListener("mouseleave", N, !1), C.addEventListener("mouseup", ce, !1);
345
- }, E = (g) => (p(), g.cancelBubble = !0, g.preventDefault(), !1), s = (g) => (b(), g.cancelBubble = !0, g.preventDefault(), !1), p = () => {
346
+ d.isFreeze = !0, C.addEventListener("mousemove", R, !1), C.addEventListener("touchmove", R, { passive: !1 }), $.addEventListener("mouseup", U, !1), $.addEventListener("mouseenter", A, !1), $.addEventListener("mouseleave", j, !1), $.addEventListener("touchend", U, !1), C.addEventListener("mouseleave", U, !1), C.addEventListener("mouseup", ce, !1);
347
+ }, p = (h) => (_(), h.cancelBubble = !0, h.preventDefault(), !1), n = (h) => (x(), h.cancelBubble = !0, h.preventDefault(), !1), _ = () => {
346
348
  t && t.close && t.close(), l();
347
- }, b = () => {
349
+ }, x = () => {
348
350
  t && t.refresh && t.refresh(), l();
349
351
  }, l = () => {
350
- d.dragLeft = 0, d.thumbLeft = n.thumbX || 0;
352
+ d.dragLeft = 0, d.thumbLeft = s.thumbX || 0;
351
353
  };
352
354
  return {
353
355
  state: d,
354
356
  dragEvent: y,
355
- closeEvent: E,
356
- refreshEvent: s,
357
+ closeEvent: p,
358
+ refreshEvent: n,
357
359
  resetData: l,
358
360
  clearData: () => {
359
361
  e && e(), l();
360
362
  },
361
- refresh: b,
362
- close: p
363
+ refresh: x,
364
+ close: _
363
365
  };
364
366
  }
365
- const Je = { class: "gc-header" }, Ke = { class: "gc-icon-block" }, Qe = { class: "gc-loading" }, Ze = ["src"], et = ["src"], tt = { class: "gc-footer" }, nt = /* @__PURE__ */ o("div", { class: "gc-drag-line" }, null, -1), re = /* @__PURE__ */ U({
367
+ const Ke = { class: "gc-header" }, Qe = { class: "gc-icon-block" }, Ze = { class: "gc-loading" }, et = ["src"], tt = ["src"], nt = { class: "gc-footer" }, st = /* @__PURE__ */ o("div", { class: "gc-drag-line" }, null, -1), ue = /* @__PURE__ */ q({
366
368
  __name: "index",
367
369
  props: {
368
370
  config: { default: xe },
369
371
  events: { default: () => ({}) },
370
372
  data: { default: () => ({}) }
371
373
  },
372
- setup(n, { expose: t }) {
373
- const a = n, { data: r, events: i, config: m } = a, c = B({ ...qe(), ...I(r) }), u = B({ ...I(i) }), e = B({ ...xe(), ...I(m) });
374
- F(() => a.data, (f, w) => {
374
+ setup(s, { expose: t }) {
375
+ const a = s, { data: r, events: i, config: m } = a, c = T({ ...Ge(), ...V(r) }), u = T({ ...V(i) }), e = T({ ...xe(), ...V(m) });
376
+ F(() => a.data, (f, E) => {
375
377
  Object.assign(c, f);
376
- }, { deep: !0 }), F(() => a.events, (f, w) => {
378
+ }, { deep: !0 }), F(() => a.events, (f, E) => {
377
379
  Object.assign(u, f);
378
- }, { deep: !0 }), F(() => a.config, (f, w) => {
380
+ }, { deep: !0 }), F(() => a.config, (f, E) => {
379
381
  Object.assign(e, f);
380
382
  }, { deep: !0 });
381
- const d = ee(null), y = ee(null), E = ee(null), s = ee(null), p = ee(null), b = Ge(
383
+ const d = ee(null), y = ee(null), p = ee(null), n = ee(null), _ = ee(null), x = Je(
382
384
  c,
383
385
  u,
384
386
  e,
385
387
  d,
386
- E,
387
388
  p,
388
- s,
389
+ _,
390
+ n,
389
391
  y,
390
392
  () => {
391
393
  c.thumb = "", c.image = "", c.thumbX = 0, c.thumbY = 0, c.thumbWidth = 0, c.thumbHeight = 0;
392
394
  }
393
- ), l = x(() => {
394
- const f = e.horizontalPadding || 0, w = e.verticalPadding || 0;
395
+ ), l = L(() => {
396
+ const f = e.horizontalPadding || 0, E = e.verticalPadding || 0;
395
397
  return {
396
398
  width: (e.width || 0) + f * 2 + (e.showTheme ? 2 : 0) + "px",
397
399
  paddingLeft: f + "px",
398
400
  paddingRight: f + "px",
399
- paddingTop: w + "px",
400
- paddingBottom: w + "px"
401
+ paddingTop: E + "px",
402
+ paddingBottom: E + "px"
401
403
  };
402
- }), _ = x(() => ({
404
+ }), b = L(() => ({
403
405
  width: c.thumbWidth + "px",
404
406
  height: c.thumbHeight + "px",
405
407
  top: c.thumbY + "px",
406
- left: b.state.thumbLeft + "px"
407
- })), g = x(() => ({
408
+ left: x.state.thumbLeft + "px"
409
+ })), h = L(() => ({
408
410
  width: e.width + "px",
409
411
  height: e.height + "px"
410
- })), S = x(() => c.image != ""), L = x(() => c.thumb != ""), h = x(() => (e.width || 0) > 0 || (e.height || 0) > 0);
411
- return pe(async () => {
412
- await _e(), s.value && s.value.addEventListener("dragstart", (f) => f.preventDefault());
412
+ })), S = L(() => c.image != ""), Y = L(() => c.thumb != ""), w = L(() => (e.width || 0) > 0 || (e.height || 0) > 0), g = (f) => f.preventDefault();
413
+ return _e(async () => {
414
+ await be(), n.value && n.value.addEventListener("dragstart", g);
415
+ }), we(() => {
416
+ n.value && n.value.removeEventListener("dragstart", g);
413
417
  }), t({
414
- reset: b.resetData,
415
- clear: b.clearData,
416
- refresh: b.refresh,
417
- close: b.close
418
- }), (f, w) => K((z(), Y("div", {
418
+ reset: x.resetData,
419
+ clear: x.clearData,
420
+ refresh: x.refresh,
421
+ close: x.close
422
+ }), (f, E) => K((z(), H("div", {
419
423
  class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
420
424
  style: D(l.value),
421
425
  ref_key: "rootRef",
422
426
  ref: d
423
427
  }, [
424
- o("div", Je, [
428
+ o("div", Ke, [
425
429
  o("span", null, ie(e.title), 1),
426
- o("div", Ke, [
427
- A(ge, {
430
+ o("div", Qe, [
431
+ I(fe, {
428
432
  width: e.iconSize,
429
433
  height: e.iconSize,
430
- onClick: v(b).closeEvent
434
+ onClick: v(x).closeEvent
431
435
  }, null, 8, ["width", "height", "onClick"]),
432
- A(fe, {
436
+ I(ve, {
433
437
  width: e.iconSize,
434
438
  height: e.iconSize,
435
- onClick: v(b).refreshEvent
439
+ onClick: v(x).refreshEvent
436
440
  }, null, 8, ["width", "height", "onClick"])
437
441
  ])
438
442
  ]),
439
443
  o("div", {
440
444
  class: "gc-body",
441
445
  ref_key: "containerRef",
442
- ref: E,
443
- style: D(g.value)
446
+ ref: p,
447
+ style: D(h.value)
444
448
  }, [
445
- o("div", Qe, [
446
- A(ve)
449
+ o("div", Ze, [
450
+ I(me)
447
451
  ]),
448
452
  K(o("img", {
449
453
  class: "gc-picture",
450
- style: D(g.value),
454
+ style: D(h.value),
451
455
  src: c.image,
452
456
  alt: ""
453
- }, null, 12, Ze), [
457
+ }, null, 12, et), [
454
458
  [Q, S.value]
455
459
  ]),
456
460
  o("div", {
457
461
  class: "gc-tile",
458
462
  ref_key: "tileRef",
459
- ref: p,
460
- style: D(_.value)
463
+ ref: _,
464
+ style: D(b.value)
461
465
  }, [
462
466
  K(o("img", {
463
467
  src: c.thumb,
464
468
  alt: ""
465
- }, null, 8, et), [
466
- [Q, L.value]
469
+ }, null, 8, tt), [
470
+ [Q, Y.value]
467
471
  ])
468
472
  ], 4)
469
473
  ], 4),
470
- o("div", tt, [
474
+ o("div", nt, [
471
475
  o("div", {
472
476
  class: "gc-drag-slide-bar",
473
477
  ref_key: "dragBarRef",
474
478
  ref: y
475
479
  }, [
476
- nt,
480
+ st,
477
481
  o("div", {
478
482
  class: se(["gc-drag-block", !S.value && "disabled"]),
479
483
  ref_key: "dragBlockRef",
480
- ref: s,
481
- onMousedown: w[1] || (w[1] = //@ts-ignore
482
- (...T) => v(b).dragEvent && v(b).dragEvent(...T)),
483
- style: D({ left: v(b).state.dragLeft + "px" })
484
+ ref: n,
485
+ onMousedown: E[1] || (E[1] = //@ts-ignore
486
+ (...B) => v(x).dragEvent && v(x).dragEvent(...B)),
487
+ style: D({ left: v(x).state.dragLeft + "px" })
484
488
  }, [
485
489
  o("div", {
486
490
  class: "gc-drag-block-inline",
487
- onTouchstart: w[0] || (w[0] = //@ts-ignore
488
- (...T) => v(b).dragEvent && v(b).dragEvent(...T))
491
+ onTouchstart: E[0] || (E[0] = //@ts-ignore
492
+ (...B) => v(x).dragEvent && v(x).dragEvent(...B))
489
493
  }, [
490
- A(ye)
494
+ I(ke)
491
495
  ], 32)
492
496
  ], 38)
493
497
  ], 512)
494
498
  ])
495
499
  ], 6)), [
496
- [Q, h.value]
500
+ [Q, w.value]
497
501
  ]);
498
502
  }
499
503
  });
500
- re.name = "gocaptcha-slide";
501
- re.install = function(n) {
502
- n.component("gocaptcha-slide", re);
504
+ ue.name = "gocaptcha-slide";
505
+ ue.install = function(s) {
506
+ s.component("gocaptcha-slide", ue);
503
507
  };
504
- const Ee = () => ({
508
+ const Le = () => ({
505
509
  width: 300,
506
510
  height: 220,
507
511
  verticalPadding: 16,
@@ -510,7 +514,7 @@ const Ee = () => ({
510
514
  title: "请拖拽贴图完成拼图",
511
515
  iconSize: 22,
512
516
  scope: !0
513
- }), st = () => ({
517
+ }), ct = () => ({
514
518
  thumbX: 0,
515
519
  thumbY: 0,
516
520
  thumbWidth: 0,
@@ -518,112 +522,116 @@ const Ee = () => ({
518
522
  image: "",
519
523
  thumb: ""
520
524
  });
521
- function ct(n, t, a, r, i, m, c) {
522
- const u = B({ x: n.thumbX || 0, y: n.thumbY || 0, isFreeze: !1 });
523
- F(() => n, (l, _) => {
525
+ function ot(s, t, a, r, i, m, c) {
526
+ const u = T({ x: s.thumbX || 0, y: s.thumbY || 0, isFreeze: !1 });
527
+ F(() => s, (l, b) => {
524
528
  u.isFreeze || (u.x = l.thumbX || 0, u.y = l.thumbY || 0);
525
529
  }, { deep: !0 });
526
530
  const e = (l) => {
527
- const _ = l.touches && l.touches[0], g = m.value.offsetLeft, S = m.value.offsetTop, L = i.value.offsetWidth, h = i.value.offsetHeight, f = m.value.offsetWidth, w = m.value.offsetHeight, T = L - f, q = h - w;
528
- let te = !1, ne = null, G = 0, V = 0, P = 0, Z = 0;
529
- _ ? (G = _.pageX - g, V = _.pageY - S) : (G = l.clientX - g, V = l.clientY - S);
530
- const H = (X) => {
531
+ if (!ae(i.value, l))
532
+ return;
533
+ const b = l.touches && l.touches[0], h = m.value.offsetLeft, S = m.value.offsetTop, Y = i.value.offsetWidth, w = i.value.offsetHeight, g = m.value.offsetWidth, f = m.value.offsetHeight, E = Y - g, B = w - f;
534
+ let te = !1, ne = null, G = 0, N = 0, P = 0, Z = 0;
535
+ b ? (G = b.pageX - h, N = b.pageY - S) : (G = l.clientX - h, N = l.clientY - S);
536
+ const O = (X) => {
531
537
  te = !0;
532
538
  const W = X.touches && X.touches[0];
533
539
  let J = 0, M = 0;
534
- W ? (J = W.pageX - G, M = W.pageY - V) : (J = X.clientX - G, M = X.clientY - V), J <= 0 && (J = 0), M <= 0 && (M = 0), J >= T && (J = T), M >= q && (M = q), u.x = J, u.y = M, P = J, Z = M, t.move && t.move(J, M), X.cancelBubble = !0, X.preventDefault();
540
+ W ? (J = W.pageX - G, M = W.pageY - N) : (J = X.clientX - G, M = X.clientY - N), J <= 0 && (J = 0), M <= 0 && (M = 0), J >= E && (J = E), M >= B && (M = B), u.x = J, u.y = M, P = J, Z = M, t.move && t.move(J, M), X.cancelBubble = !0, X.preventDefault();
535
541
  }, R = (X) => {
536
- be(i.value, X) && te && (te = !1, C(), !(P < 0 || Z < 0) && (t.confirm && t.confirm({ x: P, y: Z }, () => {
537
- p();
538
- }), X.cancelBubble = !0, X.preventDefault()));
539
- }, N = (X) => {
542
+ ae(i.value, X) && (C(), te && (te = !1, !(P < 0 || Z < 0) && (t.confirm && t.confirm({ x: P, y: Z }, () => {
543
+ _();
544
+ }), X.cancelBubble = !0, X.preventDefault())));
545
+ }, U = (X) => {
540
546
  ne = X;
541
- }, O = () => {
547
+ }, j = () => {
542
548
  ne = null;
543
- }, j = (X) => {
549
+ }, A = (X) => {
544
550
  ne && (R(ne), C());
545
551
  }, ce = a.scope, k = ce ? r.value : i.value, $ = ce ? r.value : document.body, C = () => {
546
- $.removeEventListener("mousemove", H, !1), $.removeEventListener("touchmove", H, { passive: !1 }), k.removeEventListener("mouseup", R, !1), k.removeEventListener("mouseenter", O, !1), k.removeEventListener("mouseleave", N, !1), k.removeEventListener("touchend", R, !1), $.removeEventListener("mouseleave", R, !1), $.removeEventListener("mouseup", j, !1), u.isFreeze = !1;
552
+ $.removeEventListener("mousemove", O, !1), $.removeEventListener("touchmove", O, { passive: !1 }), k.removeEventListener("mouseup", R, !1), k.removeEventListener("mouseenter", j, !1), k.removeEventListener("mouseleave", U, !1), k.removeEventListener("touchend", R, !1), $.removeEventListener("mouseleave", R, !1), $.removeEventListener("mouseup", A, !1), u.isFreeze = !1;
547
553
  };
548
- u.isFreeze = !0, $.addEventListener("mousemove", H, !1), $.addEventListener("touchmove", H, { passive: !1 }), k.addEventListener("mouseup", R, !1), k.addEventListener("mouseenter", O, !1), k.addEventListener("mouseleave", N, !1), k.addEventListener("touchend", R, !1), $.addEventListener("mouseleave", R, !1), $.addEventListener("mouseup", j, !1);
549
- }, d = (l) => (E(), l.cancelBubble = !0, l.preventDefault(), !1), y = (l) => (s(), l.cancelBubble = !0, l.preventDefault(), !1), E = () => {
550
- t && t.close && t.close(), p();
551
- }, s = () => {
552
- t && t.refresh && t.refresh(), p();
553
- }, p = () => {
554
- u.x = n.thumbX || 0, u.y = n.thumbY || 0;
554
+ u.isFreeze = !0, $.addEventListener("mousemove", O, !1), $.addEventListener("touchmove", O, { passive: !1 }), k.addEventListener("mouseup", R, !1), k.addEventListener("mouseenter", j, !1), k.addEventListener("mouseleave", U, !1), k.addEventListener("touchend", R, !1), $.addEventListener("mouseleave", R, !1), $.addEventListener("mouseup", A, !1);
555
+ }, d = (l) => (p(), l.cancelBubble = !0, l.preventDefault(), !1), y = (l) => (n(), l.cancelBubble = !0, l.preventDefault(), !1), p = () => {
556
+ t && t.close && t.close(), _();
557
+ }, n = () => {
558
+ t && t.refresh && t.refresh(), _();
559
+ }, _ = () => {
560
+ u.x = s.thumbX || 0, u.y = s.thumbY || 0;
555
561
  };
556
562
  return {
557
563
  state: u,
558
564
  dragEvent: e,
559
565
  closeEvent: d,
560
566
  refreshEvent: y,
561
- resetData: p,
567
+ resetData: _,
562
568
  clearData: () => {
563
- c && c(), p();
569
+ c && c(), _();
564
570
  },
565
- refresh: s,
566
- close: E
571
+ refresh: n,
572
+ close: p
567
573
  };
568
574
  }
569
- const ot = { class: "gc-header gc-header2" }, it = { class: "gc-loading" }, at = ["src"], lt = ["src"], rt = { class: "gc-footer" }, ut = { class: "gc-icon-block" }, ue = /* @__PURE__ */ U({
575
+ const it = { class: "gc-header gc-header2" }, at = { class: "gc-loading" }, lt = ["src"], rt = ["src"], ut = { class: "gc-footer" }, dt = { class: "gc-icon-block" }, de = /* @__PURE__ */ q({
570
576
  __name: "index",
571
577
  props: {
572
- config: { default: Ee },
578
+ config: { default: Le },
573
579
  events: { default: () => ({}) },
574
580
  data: { default: () => ({}) }
575
581
  },
576
- setup(n, { expose: t }) {
577
- const a = n, { data: r, events: i, config: m } = a, c = B({ ...st(), ...I(r) }), u = B({ ...I(i) }), e = B({ ...Ee(), ...I(m) });
578
- F(() => a.data, (L, h) => {
579
- Object.assign(c, L);
580
- }, { deep: !0 }), F(() => a.events, (L, h) => {
581
- Object.assign(u, L);
582
- }, { deep: !0 }), F(() => a.config, (L, h) => {
583
- Object.assign(e, L);
582
+ setup(s, { expose: t }) {
583
+ const a = s, { data: r, events: i, config: m } = a, c = T({ ...ct(), ...V(r) }), u = T({ ...V(i) }), e = T({ ...Le(), ...V(m) });
584
+ F(() => a.data, (w, g) => {
585
+ Object.assign(c, w);
586
+ }, { deep: !0 }), F(() => a.events, (w, g) => {
587
+ Object.assign(u, w);
588
+ }, { deep: !0 }), F(() => a.config, (w, g) => {
589
+ Object.assign(e, w);
584
590
  }, { deep: !0 });
585
- const d = ee(null), y = ee(null), E = ee(null), s = ct(
591
+ const d = ee(null), y = ee(null), p = ee(null), n = ot(
586
592
  c,
587
593
  u,
588
594
  e,
589
595
  d,
590
596
  y,
591
- E,
597
+ p,
592
598
  () => {
593
599
  c.thumb = "", c.image = "", c.thumbX = 0, c.thumbY = 0, c.thumbWidth = 0, c.thumbHeight = 0;
594
600
  }
595
- ), p = x(() => {
596
- const L = e.horizontalPadding || 0, h = e.verticalPadding || 0;
601
+ ), _ = L(() => {
602
+ const w = e.horizontalPadding || 0, g = e.verticalPadding || 0;
597
603
  return {
598
- width: (e.width || 0) + L * 2 + (e.showTheme ? 2 : 0) + "px",
599
- paddingLeft: L + "px",
600
- paddingRight: L + "px",
601
- paddingTop: h + "px",
602
- paddingBottom: h + "px"
604
+ width: (e.width || 0) + w * 2 + (e.showTheme ? 2 : 0) + "px",
605
+ paddingLeft: w + "px",
606
+ paddingRight: w + "px",
607
+ paddingTop: g + "px",
608
+ paddingBottom: g + "px"
603
609
  };
604
- }), b = x(() => ({
610
+ }), x = L(() => ({
605
611
  width: c.thumbWidth + "px",
606
612
  height: c.thumbHeight + "px",
607
- top: s.state.y + "px",
608
- left: s.state.x + "px"
609
- })), l = x(() => ({
613
+ top: n.state.y + "px",
614
+ left: n.state.x + "px"
615
+ })), l = L(() => ({
610
616
  width: e.width + "px",
611
617
  height: e.height + "px"
612
- })), _ = x(() => c.image != ""), g = x(() => c.thumb != ""), S = x(() => (e.width || 0) > 0 || (e.height || 0) > 0);
613
- return pe(async () => {
614
- await _e(), E.value && E.value.addEventListener("dragstart", (L) => L.preventDefault());
618
+ })), b = L(() => c.image != ""), h = L(() => c.thumb != ""), S = L(() => (e.width || 0) > 0 || (e.height || 0) > 0), Y = (w) => w.preventDefault();
619
+ return _e(async () => {
620
+ await be(), p.value && p.value.addEventListener("dragstart", Y);
621
+ }), we(() => {
622
+ p.value && p.value.removeEventListener("dragstart", Y);
615
623
  }), t({
616
- reset: s.resetData,
617
- clear: s.clearData,
618
- refresh: s.refresh,
619
- close: s.close
620
- }), (L, h) => K((z(), Y("div", {
624
+ reset: n.resetData,
625
+ clear: n.clearData,
626
+ refresh: n.refresh,
627
+ close: n.close
628
+ }), (w, g) => K((z(), H("div", {
621
629
  class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
622
- style: D(p.value),
630
+ style: D(_.value),
623
631
  ref_key: "rootRef",
624
632
  ref: d
625
633
  }, [
626
- o("div", ot, [
634
+ o("div", it, [
627
635
  o("span", null, ie(e.title), 1)
628
636
  ]),
629
637
  o("div", {
@@ -632,46 +640,46 @@ const ot = { class: "gc-header gc-header2" }, it = { class: "gc-loading" }, at =
632
640
  ref: y,
633
641
  style: D(l.value)
634
642
  }, [
635
- o("div", it, [
636
- A(ve)
643
+ o("div", at, [
644
+ I(me)
637
645
  ]),
638
646
  K(o("img", {
639
647
  class: "gc-picture",
640
648
  style: D(l.value),
641
649
  src: c.image,
642
650
  alt: ""
643
- }, null, 12, at), [
644
- [Q, _.value]
651
+ }, null, 12, lt), [
652
+ [Q, b.value]
645
653
  ]),
646
654
  o("div", {
647
655
  class: "gc-tile",
648
656
  ref_key: "tileRef",
649
- ref: E,
650
- style: D(b.value),
651
- onMousedown: h[0] || (h[0] = //@ts-ignore
652
- (...f) => v(s).dragEvent && v(s).dragEvent(...f)),
653
- onTouchstart: h[1] || (h[1] = //@ts-ignore
654
- (...f) => v(s).dragEvent && v(s).dragEvent(...f))
657
+ ref: p,
658
+ style: D(x.value),
659
+ onMousedown: g[0] || (g[0] = //@ts-ignore
660
+ (...f) => v(n).dragEvent && v(n).dragEvent(...f)),
661
+ onTouchstart: g[1] || (g[1] = //@ts-ignore
662
+ (...f) => v(n).dragEvent && v(n).dragEvent(...f))
655
663
  }, [
656
664
  K(o("img", {
657
665
  src: c.thumb,
658
666
  alt: ""
659
- }, null, 8, lt), [
660
- [Q, g.value]
667
+ }, null, 8, rt), [
668
+ [Q, h.value]
661
669
  ])
662
670
  ], 36)
663
671
  ], 4),
664
- o("div", rt, [
665
- o("div", ut, [
666
- A(ge, {
672
+ o("div", ut, [
673
+ o("div", dt, [
674
+ I(fe, {
667
675
  width: e.iconSize,
668
676
  height: e.iconSize,
669
- onClick: v(s).closeEvent
677
+ onClick: v(n).closeEvent
670
678
  }, null, 8, ["width", "height", "onClick"]),
671
- A(fe, {
679
+ I(ve, {
672
680
  width: e.iconSize,
673
681
  height: e.iconSize,
674
- onClick: v(s).refreshEvent
682
+ onClick: v(n).refreshEvent
675
683
  }, null, 8, ["width", "height", "onClick"])
676
684
  ])
677
685
  ])
@@ -680,11 +688,11 @@ const ot = { class: "gc-header gc-header2" }, it = { class: "gc-loading" }, at =
680
688
  ]);
681
689
  }
682
690
  });
683
- ue.name = "gocaptcha-slide-region";
684
- ue.install = function(n) {
685
- n.component("gocaptcha-slide-region", ue);
691
+ de.name = "gocaptcha-slide-region";
692
+ de.install = function(s) {
693
+ s.component("gocaptcha-slide-region", de);
686
694
  };
687
- const me = () => ({
695
+ const pe = () => ({
688
696
  width: 300,
689
697
  height: 220,
690
698
  size: 220,
@@ -694,139 +702,143 @@ const me = () => ({
694
702
  title: "请拖动滑块完成拼图",
695
703
  iconSize: 22,
696
704
  scope: !0
697
- }), dt = () => ({
705
+ }), ht = () => ({
698
706
  angle: 0,
699
707
  image: "",
700
708
  thumb: ""
701
709
  });
702
- function ht(n, t, a, r, i, m, c) {
703
- const u = B({ dragLeft: 0, thumbAngle: n.angle || 0, isFreeze: !1 });
704
- F(() => n, (l, _) => {
710
+ function gt(s, t, a, r, i, m, c) {
711
+ const u = T({ dragLeft: 0, thumbAngle: s.angle || 0, isFreeze: !1 });
712
+ F(() => s, (l, b) => {
705
713
  u.isFreeze || (u.thumbAngle = l.angle || 0);
706
714
  }, { deep: !0 });
707
715
  const e = (l) => {
708
- const _ = l.touches && l.touches[0], g = i.value.offsetLeft, S = m.value.offsetWidth, L = i.value.offsetWidth, h = S - L, f = 360, w = (f - n.angle) / h;
709
- let T = 0, q = !1, te = null, ne = 0, G = 0;
710
- _ ? ne = _.pageX - g : ne = l.clientX - g;
711
- const V = (k) => {
712
- q = !0;
716
+ if (!ae(m.value, l))
717
+ return;
718
+ const b = l.touches && l.touches[0], h = i.value.offsetLeft, S = m.value.offsetWidth, Y = i.value.offsetWidth, w = S - Y, g = 360, f = (g - s.angle) / w;
719
+ let E = 0, B = !1, te = null, ne = 0, G = 0;
720
+ b ? ne = b.pageX - h : ne = l.clientX - h;
721
+ const N = (k) => {
722
+ B = !0;
713
723
  const $ = k.touches && k.touches[0];
714
724
  let C = 0;
715
- if ($ ? C = $.pageX - ne : C = k.clientX - ne, T = n.angle + C * w, C >= h) {
716
- u.dragLeft = h, u.thumbAngle = G = f;
725
+ if ($ ? C = $.pageX - ne : C = k.clientX - ne, E = s.angle + C * f, C >= w) {
726
+ u.dragLeft = w, u.thumbAngle = G = g;
717
727
  return;
718
728
  }
719
729
  if (C <= 0) {
720
- u.dragLeft = 0, u.thumbAngle = G = n.angle;
730
+ u.dragLeft = 0, u.thumbAngle = G = s.angle;
721
731
  return;
722
732
  }
723
- u.dragLeft = C, u.thumbAngle = G = T, t.rotate && t.rotate(T), k.cancelBubble = !0, k.preventDefault();
733
+ u.dragLeft = C, u.thumbAngle = G = E, t.rotate && t.rotate(E), k.cancelBubble = !0, k.preventDefault();
724
734
  }, P = (k) => {
725
- be(m.value, k) && q && (ce(), !(G < 0) && (q = !1, t.confirm && t.confirm(parseInt(G.toString()), () => {
726
- p();
727
- }), k.cancelBubble = !0, k.preventDefault()));
735
+ ae(m.value, k) && (ce(), B && (B = !1, !(G < 0) && (t.confirm && t.confirm(parseInt(G.toString()), () => {
736
+ _();
737
+ }), k.cancelBubble = !0, k.preventDefault())));
728
738
  }, Z = (k) => {
729
739
  te = k;
730
- }, H = () => {
740
+ }, O = () => {
731
741
  te = null;
732
742
  }, R = (k) => {
733
743
  te && (P(te), ce());
734
- }, N = a.scope, O = N ? r.value : m.value, j = N ? r.value : document.body, ce = () => {
735
- j.removeEventListener("mousemove", V, !1), j.removeEventListener("touchmove", V, { passive: !1 }), O.removeEventListener("mouseup", P, !1), O.removeEventListener("mouseenter", H, !1), O.removeEventListener("mouseleave", Z, !1), O.removeEventListener("touchend", P, !1), j.removeEventListener("mouseleave", P, !1), j.removeEventListener("mouseup", R, !1), u.isFreeze = !1;
744
+ }, U = a.scope, j = U ? r.value : m.value, A = U ? r.value : document.body, ce = () => {
745
+ A.removeEventListener("mousemove", N, !1), A.removeEventListener("touchmove", N, { passive: !1 }), j.removeEventListener("mouseup", P, !1), j.removeEventListener("mouseenter", O, !1), j.removeEventListener("mouseleave", Z, !1), j.removeEventListener("touchend", P, !1), A.removeEventListener("mouseleave", P, !1), A.removeEventListener("mouseup", R, !1), u.isFreeze = !1;
736
746
  };
737
- u.isFreeze = !0, j.addEventListener("mousemove", V, !1), j.addEventListener("touchmove", V, { passive: !1 }), O.addEventListener("mouseup", P, !1), O.addEventListener("mouseenter", H, !1), O.addEventListener("mouseleave", Z, !1), O.addEventListener("touchend", P, !1), j.addEventListener("mouseleave", P, !1), j.addEventListener("mouseup", R, !1);
738
- }, d = (l) => (E(), l.cancelBubble = !0, l.preventDefault(), !1), y = (l) => (s(), l.cancelBubble = !0, l.preventDefault(), !1), E = () => {
739
- t && t.close && t.close(), p();
740
- }, s = () => {
741
- t && t.refresh && t.refresh(), p();
742
- }, p = () => {
743
- u.dragLeft = 0, u.thumbAngle = n.angle;
747
+ u.isFreeze = !0, A.addEventListener("mousemove", N, !1), A.addEventListener("touchmove", N, { passive: !1 }), j.addEventListener("mouseup", P, !1), j.addEventListener("mouseenter", O, !1), j.addEventListener("mouseleave", Z, !1), j.addEventListener("touchend", P, !1), A.addEventListener("mouseleave", P, !1), A.addEventListener("mouseup", R, !1);
748
+ }, d = (l) => (p(), l.cancelBubble = !0, l.preventDefault(), !1), y = (l) => (n(), l.cancelBubble = !0, l.preventDefault(), !1), p = () => {
749
+ t && t.close && t.close(), _();
750
+ }, n = () => {
751
+ t && t.refresh && t.refresh(), _();
752
+ }, _ = () => {
753
+ u.dragLeft = 0, u.thumbAngle = s.angle;
744
754
  };
745
755
  return {
746
756
  state: u,
747
757
  dragEvent: e,
748
758
  closeEvent: d,
749
759
  refreshEvent: y,
750
- resetData: p,
760
+ resetData: _,
751
761
  clearData: () => {
752
- c && c(), p();
762
+ c && c(), _();
753
763
  },
754
- refresh: s,
755
- close: E
764
+ refresh: n,
765
+ close: p
756
766
  };
757
767
  }
758
- const gt = { class: "gc-header" }, ft = { class: "gc-icon-block" }, vt = { class: "gc-loading" }, mt = ["src"], pt = /* @__PURE__ */ o("div", { class: "gc-round" }, null, -1), _t = { class: "gc-thumb gc-rotate-thumb" }, bt = ["src"], wt = { class: "gc-footer" }, xt = /* @__PURE__ */ o("div", { class: "gc-drag-line" }, null, -1), de = /* @__PURE__ */ U({
768
+ const ft = { class: "gc-header" }, vt = { class: "gc-icon-block" }, mt = { class: "gc-loading" }, pt = ["src"], _t = /* @__PURE__ */ o("div", { class: "gc-round" }, null, -1), bt = { class: "gc-thumb gc-rotate-thumb" }, wt = ["src"], Et = { class: "gc-footer" }, xt = /* @__PURE__ */ o("div", { class: "gc-drag-line" }, null, -1), he = /* @__PURE__ */ q({
759
769
  __name: "index",
760
770
  props: {
761
- config: { default: me },
771
+ config: { default: pe },
762
772
  events: { default: () => ({}) },
763
773
  data: { default: () => ({}) }
764
774
  },
765
- setup(n, { expose: t }) {
766
- const a = n, { data: r, events: i, config: m } = a, c = B({ ...dt(), ...I(r) }), u = B({ ...I(i) }), e = B({ ...me(), ...I(m) });
767
- F(() => a.data, (h, f) => {
768
- Object.assign(c, h);
769
- }, { deep: !0 }), F(() => a.events, (h, f) => {
770
- Object.assign(u, h);
771
- }, { deep: !0 }), F(() => a.config, (h, f) => {
772
- Object.assign(e, h);
775
+ setup(s, { expose: t }) {
776
+ const a = s, { data: r, events: i, config: m } = a, c = T({ ...ht(), ...V(r) }), u = T({ ...V(i) }), e = T({ ...pe(), ...V(m) });
777
+ F(() => a.data, (g, f) => {
778
+ Object.assign(c, g);
779
+ }, { deep: !0 }), F(() => a.events, (g, f) => {
780
+ Object.assign(u, g);
781
+ }, { deep: !0 }), F(() => a.config, (g, f) => {
782
+ Object.assign(e, g);
773
783
  }, { deep: !0 });
774
- const d = ee(null), y = ee(null), E = ee(null), s = ht(
784
+ const d = ee(null), y = ee(null), p = ee(null), n = gt(
775
785
  c,
776
786
  u,
777
787
  e,
778
788
  d,
779
- E,
789
+ p,
780
790
  y,
781
791
  () => {
782
792
  c.thumb = "", c.image = "", c.angle = 0;
783
793
  }
784
- ), p = x(() => {
785
- const h = e.horizontalPadding || 0, f = e.verticalPadding || 0;
794
+ ), _ = L(() => {
795
+ const g = e.horizontalPadding || 0, f = e.verticalPadding || 0;
786
796
  return {
787
- width: (e.width || 0) + h * 2 + (e.showTheme ? 2 : 0) + "px",
788
- paddingLeft: h + "px",
789
- paddingRight: h + "px",
797
+ width: (e.width || 0) + g * 2 + (e.showTheme ? 2 : 0) + "px",
798
+ paddingLeft: g + "px",
799
+ paddingRight: g + "px",
790
800
  paddingTop: f + "px",
791
801
  paddingBottom: f + "px"
792
802
  };
793
- }), b = x(() => ({
794
- transform: `rotate(${s.state.thumbAngle}deg)`
795
- })), l = x(() => ({
803
+ }), x = L(() => ({
804
+ transform: `rotate(${n.state.thumbAngle}deg)`
805
+ })), l = L(() => ({
796
806
  width: e.width + "px",
797
807
  height: e.height + "px"
798
- })), _ = x(() => {
799
- const h = (e.size || 0) > 0 ? e.size : me().size;
808
+ })), b = L(() => {
809
+ const g = (e.size || 0) > 0 ? e.size : pe().size;
800
810
  return {
801
- width: h + "px",
802
- height: h + "px"
811
+ width: g + "px",
812
+ height: g + "px"
803
813
  };
804
- }), g = x(() => c.image != ""), S = x(() => c.thumb != ""), L = x(() => (e.width || 0) > 0 || (e.height || 0) > 0);
805
- return pe(async () => {
806
- await _e(), E.value && E.value.addEventListener("dragstart", (h) => h.preventDefault());
814
+ }), h = L(() => c.image != ""), S = L(() => c.thumb != ""), Y = L(() => (e.width || 0) > 0 || (e.height || 0) > 0), w = (g) => g.preventDefault();
815
+ return _e(async () => {
816
+ await be(), p.value && p.value.addEventListener("dragstart", w);
817
+ }), we(() => {
818
+ p.value && p.value.removeEventListener("dragstart", w);
807
819
  }), t({
808
- reset: s.resetData,
809
- clear: s.clearData,
810
- refresh: s.refresh,
811
- close: s.close
812
- }), (h, f) => K((z(), Y("div", {
820
+ reset: n.resetData,
821
+ clear: n.clearData,
822
+ refresh: n.refresh,
823
+ close: n.close
824
+ }), (g, f) => K((z(), H("div", {
813
825
  class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
814
- style: D(p.value),
826
+ style: D(_.value),
815
827
  ref_key: "rootRef",
816
828
  ref: d
817
829
  }, [
818
- o("div", gt, [
830
+ o("div", ft, [
819
831
  o("span", null, ie(e.title), 1),
820
- o("div", ft, [
821
- A(ge, {
832
+ o("div", vt, [
833
+ I(fe, {
822
834
  width: e.iconSize,
823
835
  height: e.iconSize,
824
- onClick: v(s).closeEvent
836
+ onClick: v(n).closeEvent
825
837
  }, null, 8, ["width", "height", "onClick"]),
826
- A(fe, {
838
+ I(ve, {
827
839
  width: e.iconSize,
828
840
  height: e.iconSize,
829
- onClick: v(s).refreshEvent
841
+ onClick: v(n).refreshEvent
830
842
  }, null, 8, ["width", "height", "onClick"])
831
843
  ])
832
844
  ]),
@@ -837,39 +849,39 @@ const gt = { class: "gc-header" }, ft = { class: "gc-icon-block" }, vt = { class
837
849
  }, [
838
850
  o("div", {
839
851
  class: "gc-body-inner",
840
- style: D(_.value)
852
+ style: D(b.value)
841
853
  }, [
842
- o("div", vt, [
843
- A(ve)
854
+ o("div", mt, [
855
+ I(me)
844
856
  ]),
845
857
  o("div", {
846
858
  class: "gc-picture gc-rotate-picture",
847
- style: D(_.value)
859
+ style: D(b.value)
848
860
  }, [
849
861
  K(o("img", {
850
862
  src: c.image,
851
863
  alt: ""
852
- }, null, 8, mt), [
853
- [Q, g.value]
864
+ }, null, 8, pt), [
865
+ [Q, h.value]
854
866
  ]),
855
- pt
867
+ _t
856
868
  ], 4),
857
- o("div", _t, [
869
+ o("div", bt, [
858
870
  o("div", {
859
871
  class: "gc-rotate-thumb-block",
860
- style: D(b.value)
872
+ style: D(x.value)
861
873
  }, [
862
874
  K(o("img", {
863
875
  src: c.thumb,
864
876
  alt: ""
865
- }, null, 8, bt), [
877
+ }, null, 8, wt), [
866
878
  [Q, S.value]
867
879
  ])
868
880
  ], 4)
869
881
  ])
870
882
  ], 4)
871
883
  ], 4),
872
- o("div", wt, [
884
+ o("div", Et, [
873
885
  o("div", {
874
886
  class: "gc-drag-slide-bar",
875
887
  ref_key: "dragBarRef",
@@ -877,151 +889,151 @@ const gt = { class: "gc-header" }, ft = { class: "gc-icon-block" }, vt = { class
877
889
  }, [
878
890
  xt,
879
891
  o("div", {
880
- class: se(["gc-drag-block", !g.value && "disabled"]),
892
+ class: se(["gc-drag-block", !h.value && "disabled"]),
881
893
  ref_key: "dragBlockRef",
882
- ref: E,
894
+ ref: p,
883
895
  onMousedown: f[1] || (f[1] = //@ts-ignore
884
- (...w) => v(s).dragEvent && v(s).dragEvent(...w)),
885
- style: D({ left: v(s).state.dragLeft + "px" })
896
+ (...E) => v(n).dragEvent && v(n).dragEvent(...E)),
897
+ style: D({ left: v(n).state.dragLeft + "px" })
886
898
  }, [
887
899
  o("div", {
888
900
  class: "gc-drag-block-inline",
889
901
  onTouchstart: f[0] || (f[0] = //@ts-ignore
890
- (...w) => v(s).dragEvent && v(s).dragEvent(...w))
902
+ (...E) => v(n).dragEvent && v(n).dragEvent(...E))
891
903
  }, [
892
- A(ye)
904
+ I(ke)
893
905
  ], 32)
894
906
  ], 38)
895
907
  ], 512)
896
908
  ])
897
909
  ], 6)), [
898
- [Q, L.value]
910
+ [Q, Y.value]
899
911
  ]);
900
912
  }
901
913
  });
902
- de.name = "gocaptcha-rotate";
903
- de.install = function(n) {
904
- n.component("gocaptcha-rotate", de);
914
+ he.name = "gocaptcha-rotate";
915
+ he.install = function(s) {
916
+ s.component("gocaptcha-rotate", he);
905
917
  };
906
- const Et = /* @__PURE__ */ o("circle", {
918
+ const Lt = /* @__PURE__ */ o("circle", {
907
919
  fill: "#3E7CFF",
908
920
  cx: "100",
909
921
  cy: "100",
910
922
  r: "96.3"
911
- }, null, -1), Lt = /* @__PURE__ */ o("path", {
923
+ }, null, -1), yt = /* @__PURE__ */ o("path", {
912
924
  fill: "#FFFFFF",
913
925
  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
914
926
  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`
915
- }, null, -1), yt = [
916
- Et,
917
- Lt
918
- ], kt = /* @__PURE__ */ U({
927
+ }, null, -1), kt = [
928
+ Lt,
929
+ yt
930
+ ], Dt = /* @__PURE__ */ q({
919
931
  __name: "btn-default-icon",
920
932
  emits: ["click"],
921
- setup(n, { emit: t }) {
933
+ setup(s, { emit: t }) {
922
934
  const a = t;
923
935
  function r(i) {
924
936
  a("click", i);
925
937
  }
926
- return (i, m) => (z(), Y("svg", oe({
938
+ return (i, m) => (z(), H("svg", oe({
927
939
  xmlns: "http://www.w3.org/2000/svg",
928
940
  viewBox: "0 0 200 200",
929
941
  width: "20",
930
942
  height: "20"
931
- }, i.$attrs, { onClick: r }), yt, 16));
943
+ }, i.$attrs, { onClick: r }), kt, 16));
932
944
  }
933
- }), Dt = /* @__PURE__ */ o("path", {
945
+ }), $t = /* @__PURE__ */ o("path", {
934
946
  fill: "#FFA000",
935
947
  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
936
948
  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
937
949
  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
938
950
  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
939
951
  z`
940
- }, null, -1), $t = [
941
- Dt
942
- ], zt = /* @__PURE__ */ U({
952
+ }, null, -1), zt = [
953
+ $t
954
+ ], Ct = /* @__PURE__ */ q({
943
955
  __name: "btn-warn-icon",
944
956
  emits: ["click"],
945
- setup(n, { emit: t }) {
957
+ setup(s, { emit: t }) {
946
958
  const a = t;
947
959
  function r(i) {
948
960
  a("click", i);
949
961
  }
950
- return (i, m) => (z(), Y("svg", oe({
962
+ return (i, m) => (z(), H("svg", oe({
951
963
  xmlns: "http://www.w3.org/2000/svg",
952
964
  viewBox: "0 0 200 200",
953
965
  width: "20",
954
966
  height: "20"
955
- }, i.$attrs, { onClick: r }), $t, 16));
967
+ }, i.$attrs, { onClick: r }), zt, 16));
956
968
  }
957
- }), Ct = /* @__PURE__ */ o("path", {
969
+ }), St = /* @__PURE__ */ o("path", {
958
970
  fill: "#ED4630",
959
971
  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
960
972
  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
961
973
  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
962
974
  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
963
975
  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`
964
- }, null, -1), St = [
965
- Ct
966
- ], Bt = /* @__PURE__ */ U({
976
+ }, null, -1), Bt = [
977
+ St
978
+ ], Tt = /* @__PURE__ */ q({
967
979
  __name: "btn-error-icon",
968
980
  emits: ["click"],
969
- setup(n, { emit: t }) {
981
+ setup(s, { emit: t }) {
970
982
  const a = t;
971
983
  function r(i) {
972
984
  a("click", i);
973
985
  }
974
- return (i, m) => (z(), Y("svg", oe({
986
+ return (i, m) => (z(), H("svg", oe({
975
987
  xmlns: "http://www.w3.org/2000/svg",
976
988
  viewBox: "0 0 200 200",
977
989
  width: "20",
978
990
  height: "20"
979
- }, i.$attrs, { onClick: r }), St, 16));
991
+ }, i.$attrs, { onClick: r }), Bt, 16));
980
992
  }
981
- }), Tt = /* @__PURE__ */ o("path", {
993
+ }), Pt = /* @__PURE__ */ o("path", {
982
994
  fill: "#5EAA2F",
983
995
  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
984
996
  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
985
997
  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
986
998
  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`
987
- }, null, -1), Pt = [
988
- Tt
989
- ], Xt = /* @__PURE__ */ U({
999
+ }, null, -1), Xt = [
1000
+ Pt
1001
+ ], Wt = /* @__PURE__ */ q({
990
1002
  __name: "btn-success-icon",
991
1003
  emits: ["click"],
992
- setup(n, { emit: t }) {
1004
+ setup(s, { emit: t }) {
993
1005
  const a = t;
994
1006
  function r(i) {
995
1007
  a("click", i);
996
1008
  }
997
- return (i, m) => (z(), Y("svg", oe({
1009
+ return (i, m) => (z(), H("svg", oe({
998
1010
  xmlns: "http://www.w3.org/2000/svg",
999
1011
  viewBox: "0 0 200 200",
1000
1012
  width: "20",
1001
1013
  height: "20"
1002
- }, i.$attrs, { onClick: r }), Pt, 16));
1014
+ }, i.$attrs, { onClick: r }), Xt, 16));
1003
1015
  }
1004
- }), Le = () => ({
1016
+ }), ye = () => ({
1005
1017
  width: 330,
1006
1018
  height: 44,
1007
1019
  verticalPadding: 12,
1008
1020
  horizontalPadding: 16
1009
- }), he = /* @__PURE__ */ U({
1021
+ }), ge = /* @__PURE__ */ q({
1010
1022
  __name: "index",
1011
1023
  props: {
1012
- config: { default: Le },
1024
+ config: { default: ye },
1013
1025
  clickEvent: {},
1014
1026
  disabled: { type: Boolean, default: !1 },
1015
1027
  type: { default: "default" },
1016
1028
  title: { default: "点击按键进行验证" }
1017
1029
  },
1018
1030
  emits: ["click-event"],
1019
- setup(n, { emit: t }) {
1020
- const a = n, { type: r, title: i, disabled: m, config: c } = ze(a), u = B({ ...Le(), ...I(c) });
1021
- F(() => a.config, (s, p) => {
1022
- Object.assign(u, s);
1031
+ setup(s, { emit: t }) {
1032
+ const a = s, { type: r, title: i, disabled: m, config: c } = Ce(a), u = T({ ...ye(), ...V(c) });
1033
+ F(() => a.config, (n, _) => {
1034
+ Object.assign(u, n);
1023
1035
  }, { deep: !0 });
1024
- const e = x(() => ["go-captcha", "gc-btn-block", `gc-${r.value}`, m.value ? "gc-disabled" : ""]), d = x(() => ({
1036
+ const e = L(() => ["go-captcha", "gc-btn-block", `gc-${r.value}`, m.value ? "gc-disabled" : ""]), d = L(() => ({
1025
1037
  width: u.width + "px",
1026
1038
  height: u.height + "px",
1027
1039
  paddingLeft: u.horizontalPadding + "px",
@@ -1029,37 +1041,37 @@ const Et = /* @__PURE__ */ o("circle", {
1029
1041
  paddingTop: u.verticalPadding + "px",
1030
1042
  paddingBottom: u.verticalPadding + "px"
1031
1043
  })), y = t;
1032
- function E(s) {
1033
- y("click-event", s);
1044
+ function p(n) {
1045
+ y("click-event", n);
1034
1046
  }
1035
- return (s, p) => (z(), Y("div", {
1047
+ return (n, _) => (z(), H("div", {
1036
1048
  class: se(e.value),
1037
1049
  style: D(d.value),
1038
- onClick: E
1050
+ onClick: p
1039
1051
  }, [
1040
1052
  o("div", {
1041
1053
  class: se(v(r) === "default" ? "gc-ripple" : "")
1042
1054
  }, [
1043
- v(r) === "default" ? (z(), ae(kt, { key: 0 })) : v(r) === "warn" ? (z(), ae(zt, { key: 1 })) : v(r) === "error" ? (z(), ae(Bt, { key: 2 })) : v(r) === "success" ? (z(), ae(Xt, { key: 3 })) : Ce("", !0)
1055
+ v(r) === "default" ? (z(), le(Dt, { key: 0 })) : v(r) === "warn" ? (z(), le(Ct, { key: 1 })) : v(r) === "error" ? (z(), le(Tt, { key: 2 })) : v(r) === "success" ? (z(), le(Wt, { key: 3 })) : Se("", !0)
1044
1056
  ], 2),
1045
1057
  o("span", null, ie(v(i)), 1)
1046
1058
  ], 6));
1047
1059
  }
1048
1060
  });
1049
- he.name = "gocaptcha-button";
1050
- he.install = function(n) {
1051
- n.component("gocaptcha-button", he);
1061
+ ge.name = "gocaptcha-button";
1062
+ ge.install = function(s) {
1063
+ s.component("gocaptcha-button", ge);
1052
1064
  };
1053
- const Mt = {
1054
- install(n) {
1055
- le.install(n), re.install(n), ue.install(n), de.install(n), he.install(n);
1065
+ const Ft = {
1066
+ install(s) {
1067
+ re.install(s), ue.install(s), de.install(s), he.install(s), ge.install(s);
1056
1068
  }
1057
1069
  };
1058
1070
  export {
1059
- he as Button,
1060
- le as Click,
1061
- de as Rotate,
1062
- re as Slide,
1063
- ue as SlideRegion,
1064
- Mt as default
1071
+ ge as Button,
1072
+ re as Click,
1073
+ he as Rotate,
1074
+ ue as Slide,
1075
+ de as SlideRegion,
1076
+ Ft as default
1065
1077
  };