go-captcha-vue 2.0.6 → 2.0.7

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