go-captcha-vue 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +141 -0
  2. package/dist/assets/icons/arrows-icon.vue.d.ts +4 -0
  3. package/dist/assets/icons/btn-default-icon.vue.d.ts +4 -0
  4. package/dist/assets/icons/btn-error-icon.vue.d.ts +4 -0
  5. package/dist/assets/icons/btn-success-icon.vue.d.ts +4 -0
  6. package/dist/assets/icons/btn-warn-icon.vue.d.ts +4 -0
  7. package/dist/assets/icons/close-icon.vue.d.ts +4 -0
  8. package/dist/assets/icons/loading-icon.vue.d.ts +4 -0
  9. package/dist/assets/icons/refresh-icon.vue.d.ts +4 -0
  10. package/dist/components/button/index.d.ts +2 -0
  11. package/dist/components/button/index.vue.d.ts +49 -0
  12. package/dist/components/button/meta/config.d.ts +12 -0
  13. package/dist/components/click/hooks/handler.d.ts +16 -0
  14. package/dist/components/click/index.d.ts +2 -0
  15. package/dist/components/click/index.vue.d.ts +42 -0
  16. package/dist/components/click/meta/config.d.ts +15 -0
  17. package/dist/components/click/meta/data.d.ts +15 -0
  18. package/dist/components/click/meta/event.d.ts +13 -0
  19. package/dist/components/rotate/hooks/handler.d.ts +12 -0
  20. package/dist/components/rotate/index.d.ts +2 -0
  21. package/dist/components/rotate/index.vue.d.ts +42 -0
  22. package/dist/components/rotate/meta/config.d.ts +14 -0
  23. package/dist/components/rotate/meta/data.d.ts +10 -0
  24. package/dist/components/rotate/meta/event.d.ts +11 -0
  25. package/dist/components/slide/hooks/handler.d.ts +12 -0
  26. package/dist/components/slide/index.d.ts +2 -0
  27. package/dist/components/slide/index.vue.d.ts +42 -0
  28. package/dist/components/slide/meta/config.d.ts +15 -0
  29. package/dist/components/slide/meta/data.d.ts +17 -0
  30. package/dist/components/slide/meta/event.d.ts +12 -0
  31. package/dist/components/slide-region/hooks/handler.d.ts +12 -0
  32. package/dist/components/slide-region/index.d.ts +2 -0
  33. package/dist/components/slide-region/index.vue.d.ts +42 -0
  34. package/dist/components/slide-region/meta/config.d.ts +13 -0
  35. package/dist/components/slide-region/meta/data.d.ts +17 -0
  36. package/dist/components/slide-region/meta/event.d.ts +12 -0
  37. package/dist/go-captcha-vue.es.js +1312 -0
  38. package/dist/go-captcha-vue.umd.js +39 -0
  39. package/dist/helper/helper.d.ts +10 -0
  40. package/dist/index.d.ts +5 -0
  41. package/dist/style.css +1 -0
  42. package/env.d.ts +16 -0
  43. package/package.json +62 -0
@@ -0,0 +1,1312 @@
1
+ import { reactive, computed, ref, onMounted, toRefs } from "vue";
2
+ var gocaptcha = "";
3
+ const defaultConfig$4 = () => ({
4
+ width: 300,
5
+ height: 240,
6
+ thumbWidth: 150,
7
+ thumbHeight: 40,
8
+ verticalPadding: 16,
9
+ horizontalPadding: 12,
10
+ showTheme: true
11
+ });
12
+ const __sfc_main$c = {};
13
+ __sfc_main$c.setup = (__props, __ctx) => {
14
+ const emit = __ctx.emit;
15
+ function emitClickEvent(e) {
16
+ emit("click", e);
17
+ }
18
+ return {
19
+ emitClickEvent
20
+ };
21
+ };
22
+ var render$c = function() {
23
+ var _vm = this;
24
+ var _h = _vm.$createElement;
25
+ var _c = _vm._self._c || _h;
26
+ return _c("svg", _vm._b({ attrs: { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 200 200", "width": "20", "height": "20" }, on: { "click": _vm.emitClickEvent } }, "svg", _vm.$attrs, false), [_c("path", { attrs: { "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\n 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\n 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\n 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\n 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\n 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\n 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\n 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" } })]);
27
+ };
28
+ var staticRenderFns$c = [];
29
+ var closeIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
30
+ function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
31
+ var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
32
+ if (render2) {
33
+ options.render = render2;
34
+ options.staticRenderFns = staticRenderFns2;
35
+ options._compiled = true;
36
+ }
37
+ if (functionalTemplate) {
38
+ options.functional = true;
39
+ }
40
+ if (scopeId) {
41
+ options._scopeId = "data-v-" + scopeId;
42
+ }
43
+ var hook;
44
+ if (moduleIdentifier) {
45
+ hook = function(context) {
46
+ context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
47
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
48
+ context = __VUE_SSR_CONTEXT__;
49
+ }
50
+ if (injectStyles) {
51
+ injectStyles.call(this, context);
52
+ }
53
+ if (context && context._registeredComponents) {
54
+ context._registeredComponents.add(moduleIdentifier);
55
+ }
56
+ };
57
+ options._ssrRegister = hook;
58
+ } else if (injectStyles) {
59
+ hook = shadowMode ? function() {
60
+ injectStyles.call(
61
+ this,
62
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
63
+ );
64
+ } : injectStyles;
65
+ }
66
+ if (hook) {
67
+ if (options.functional) {
68
+ options._injectStyles = hook;
69
+ var originalRender = options.render;
70
+ options.render = function renderWithStyleInjection(h, context) {
71
+ hook.call(context);
72
+ return originalRender(h, context);
73
+ };
74
+ } else {
75
+ var existing = options.beforeCreate;
76
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
77
+ }
78
+ }
79
+ return {
80
+ exports: scriptExports,
81
+ options
82
+ };
83
+ }
84
+ const __cssModules$c = {};
85
+ var __component__$c = /* @__PURE__ */ normalizeComponent(
86
+ __sfc_main$c,
87
+ render$c,
88
+ staticRenderFns$c,
89
+ false,
90
+ __vue2_injectStyles$c,
91
+ "3972774c",
92
+ null,
93
+ null
94
+ );
95
+ function __vue2_injectStyles$c(context) {
96
+ for (let o in __cssModules$c) {
97
+ this[o] = __cssModules$c[o];
98
+ }
99
+ }
100
+ var CloseIcon = /* @__PURE__ */ function() {
101
+ return __component__$c.exports;
102
+ }();
103
+ const __sfc_main$b = {};
104
+ __sfc_main$b.setup = (__props, __ctx) => {
105
+ const emit = __ctx.emit;
106
+ function emitClickEvent(e) {
107
+ emit("click", e);
108
+ }
109
+ return {
110
+ emitClickEvent
111
+ };
112
+ };
113
+ var render$b = function() {
114
+ var _vm = this;
115
+ var _h = _vm.$createElement;
116
+ var _c = _vm._self._c || _h;
117
+ return _c("svg", _vm._b({ attrs: { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 200 200", "width": "20", "height": "20" }, on: { "click": _vm.emitClickEvent } }, "svg", _vm.$attrs, false), [_c("path", { attrs: { "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\n 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\n 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\n 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\n c-0.2-0.3-0.5-0.5-0.9-0.5c-0.4,0-0.7,0.2-0.9,0.5L3.8,97.3c-0.2,0.3-0.2,0.7,0,1.1c0.2,0.3,0.5,0.5,0.9,0.5h14.3\n c0,17.2,5.3,33.2,14.3,46.4c0.1,0.2,0.2,0.4,0.3,0.6c0.9,1.4,2,2.6,3,3.9c0.4,0.5,0.7,1,1.1,1.5c1.5,1.8,3,3.5,4.6,5.2\n c0.2,0.2,0.3,0.3,0.5,0.5c5.4,5.5,11.5,10.1,18.2,13.8c0.2,0.1,0.3,0.2,0.5,0.3c1.9,1,3.9,2,5.9,2.9c0.5,0.2,1,0.5,1.5,0.7\n c1.7,0.7,3.5,1.3,5.2,1.9c0.8,0.3,1.7,0.6,2.5,0.8c1.5,0.5,3.1,0.8,4.7,1.2c1.1,0.2,2.1,0.5,3.2,0.7c0.4,0.1,0.9,0.2,1.3,0.3\n c1.5,0.3,3,0.4,4.5,0.6c0.5,0.1,1.1,0.2,1.6,0.2c2.7,0.3,5.4,0.4,8.1,0.4c16.4,0,32.5-5.1,46.2-14.8c4.4-3.1,5.5-9.2,2.4-13.7\n C145.5,147.8,139.4,146.7,135,149.9 M180.6,98.9c0-17.2-5.3-33.1-14.2-46.3c-0.1-0.2-0.2-0.5-0.4-0.7c-1.1-1.6-2.3-3.1-3.5-4.6\n c-0.1-0.2-0.3-0.4-0.4-0.6c-8.2-10.1-18.5-17.9-30.2-23c-0.3-0.1-0.6-0.3-1-0.4c-1.9-0.8-3.8-1.5-5.7-2.1c-0.7-0.2-1.4-0.5-2.1-0.7\n c-1.7-0.5-3.4-0.9-5.1-1.3c-0.9-0.2-1.9-0.5-2.8-0.7c-0.5-0.1-0.9-0.2-1.4-0.3c-1.3-0.2-2.6-0.3-3.8-0.5c-0.9-0.1-1.8-0.3-2.6-0.3\n c-2.1-0.2-4.3-0.3-6.4-0.3c-0.4,0-0.8-0.1-1.2-0.1c-0.1,0-0.1,0-0.2,0c-16.4,0-32.4,5-46.2,14.8C49,35,48,41.1,51,45.6\n c3.1,4.4,9.1,5.5,13.5,2.4c10.6-7.5,23-11.3,35.7-11.2c1.8,0,3.6,0.1,5.4,0.3c0.6,0.1,1.1,0.1,1.6,0.2c1.5,0.2,2.9,0.4,4.3,0.7\n 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\n 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\n 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\n L180.6,98.9z" } })]);
118
+ };
119
+ var staticRenderFns$b = [];
120
+ var refreshIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
121
+ const __cssModules$b = {};
122
+ var __component__$b = /* @__PURE__ */ normalizeComponent(
123
+ __sfc_main$b,
124
+ render$b,
125
+ staticRenderFns$b,
126
+ false,
127
+ __vue2_injectStyles$b,
128
+ "1120f0d2",
129
+ null,
130
+ null
131
+ );
132
+ function __vue2_injectStyles$b(context) {
133
+ for (let o in __cssModules$b) {
134
+ this[o] = __cssModules$b[o];
135
+ }
136
+ }
137
+ var RefreshIcon = /* @__PURE__ */ function() {
138
+ return __component__$b.exports;
139
+ }();
140
+ const __sfc_main$a = {};
141
+ __sfc_main$a.setup = (__props, __ctx) => {
142
+ const emit = __ctx.emit;
143
+ function emitClickEvent(e) {
144
+ emit("click", e);
145
+ }
146
+ return {
147
+ emitClickEvent
148
+ };
149
+ };
150
+ var render$a = function() {
151
+ var _vm = this;
152
+ var _h = _vm.$createElement;
153
+ var _c = _vm._self._c || _h;
154
+ return _c("svg", _vm._b({ attrs: { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 100 100", "preserveAspectRatio": "xMidYMid", "width": "84", "height": "84" }, on: { "click": _vm.emitClickEvent } }, "svg", _vm.$attrs, false), [_c("circle", { attrs: { "cx": "50", "cy": "36.8101", "r": "10", "fill": "#3e7cff" } }, [_c("animate", { attrs: { "attributeName": "cy", "dur": "1s", "repeatCount": "indefinite", "calcMode": "spline", "keySplines": "0.45 0 0.9 0.55;0 0.45 0.55 0.9", "keyTimes": "0;0.5;1", "values": "23;77;23" } })])]);
155
+ };
156
+ var staticRenderFns$a = [];
157
+ var loadingIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
158
+ const __cssModules$a = {};
159
+ var __component__$a = /* @__PURE__ */ normalizeComponent(
160
+ __sfc_main$a,
161
+ render$a,
162
+ staticRenderFns$a,
163
+ false,
164
+ __vue2_injectStyles$a,
165
+ "93a01640",
166
+ null,
167
+ null
168
+ );
169
+ function __vue2_injectStyles$a(context) {
170
+ for (let o in __cssModules$a) {
171
+ this[o] = __cssModules$a[o];
172
+ }
173
+ }
174
+ var LoadingIcon = /* @__PURE__ */ function() {
175
+ return __component__$a.exports;
176
+ }();
177
+ function getDomXY(dom) {
178
+ let x = 0;
179
+ let y = 0;
180
+ if (dom.getBoundingClientRect) {
181
+ const box = dom.getBoundingClientRect();
182
+ const D = document.documentElement;
183
+ x = box.left + Math.max(D.scrollLeft, document.body.scrollLeft) - D.clientLeft;
184
+ y = box.top + Math.max(D.scrollTop, document.body.scrollTop) - D.clientTop;
185
+ } else {
186
+ while (dom !== document.body) {
187
+ x += dom.offsetLeft;
188
+ y += dom.offsetTop;
189
+ dom = dom.offsetParent;
190
+ }
191
+ }
192
+ return {
193
+ domX: x,
194
+ domY: y
195
+ };
196
+ }
197
+ function checkTargetFather(that, e) {
198
+ let parent = e.relatedTarget;
199
+ try {
200
+ while (parent && parent !== that) {
201
+ parent = parent.parentNode;
202
+ }
203
+ } catch (e2) {
204
+ console.warn(e2);
205
+ }
206
+ return parent !== that;
207
+ }
208
+ function useHandler$3(_data, event) {
209
+ const dots = reactive({ list: [] });
210
+ const clickEvent = (e) => {
211
+ const dom = e.currentTarget;
212
+ const xy = getDomXY(dom);
213
+ const mouseX = e.pageX || e.clientX;
214
+ const mouseY = e.pageY || e.clientY;
215
+ const domX = xy.domX;
216
+ const domY = xy.domY;
217
+ const xPos = mouseX - domX;
218
+ const yPos = mouseY - domY;
219
+ const xx = parseInt(xPos.toString());
220
+ const yy = parseInt(yPos.toString());
221
+ const date = new Date();
222
+ const index2 = dots.list.length;
223
+ dots.list.push({ key: date.getTime(), index: index2 + 1, x: xx, y: yy });
224
+ event.click && event.click(xx, yy);
225
+ e.cancelBubble = true;
226
+ e.preventDefault();
227
+ return false;
228
+ };
229
+ const confirmEvent = (e) => {
230
+ event.confirm && event.confirm(dots.list, () => {
231
+ dots.list = [];
232
+ });
233
+ e.cancelBubble = true;
234
+ e.preventDefault();
235
+ return false;
236
+ };
237
+ const closeEvent = (e) => {
238
+ event.close && event.close();
239
+ dots.list = [];
240
+ e.cancelBubble = true;
241
+ e.preventDefault();
242
+ return false;
243
+ };
244
+ const refreshEvent = (e) => {
245
+ event.refresh && event.refresh();
246
+ dots.list = [];
247
+ e.cancelBubble = true;
248
+ e.preventDefault();
249
+ return false;
250
+ };
251
+ return {
252
+ dots,
253
+ clickEvent,
254
+ confirmEvent,
255
+ closeEvent,
256
+ refreshEvent
257
+ };
258
+ }
259
+ const __sfc_main$9 = {};
260
+ __sfc_main$9.props = {
261
+ config: {
262
+ key: "config",
263
+ required: false,
264
+ type: null,
265
+ default: defaultConfig$4
266
+ },
267
+ events: {
268
+ key: "events",
269
+ required: false,
270
+ type: null,
271
+ default: () => ({})
272
+ },
273
+ data: {
274
+ key: "data",
275
+ required: false,
276
+ type: null,
277
+ default: () => ({})
278
+ }
279
+ };
280
+ __sfc_main$9.setup = (__props, __ctx) => {
281
+ const props = __props;
282
+ const {
283
+ config,
284
+ data,
285
+ events
286
+ } = props;
287
+ const handler = useHandler$3(data, events);
288
+ const hPadding = config.horizontalPadding || 0;
289
+ const vPadding = config.verticalPadding || 0;
290
+ const width = (config.width || 0) + vPadding * 2;
291
+ const dots = handler.dots;
292
+ const wrapperStyles = computed(() => {
293
+ return {
294
+ width: width + "px",
295
+ paddingLeft: vPadding + "px",
296
+ paddingRight: vPadding + "px",
297
+ paddingTop: hPadding + "px",
298
+ paddingBottom: hPadding + "px"
299
+ };
300
+ });
301
+ const thumbStyles = computed(() => {
302
+ return {
303
+ width: config.thumbWidth + "px",
304
+ height: config.thumbHeight + "px"
305
+ };
306
+ });
307
+ const imageStyles = computed(() => {
308
+ return {
309
+ width: config.width + "px",
310
+ height: config.height + "px"
311
+ };
312
+ });
313
+ return {
314
+ config,
315
+ data,
316
+ handler,
317
+ dots,
318
+ wrapperStyles,
319
+ thumbStyles,
320
+ imageStyles
321
+ };
322
+ };
323
+ __sfc_main$9.components = Object.assign({
324
+ LoadingIcon,
325
+ CloseIcon,
326
+ RefreshIcon
327
+ }, __sfc_main$9.components);
328
+ var render$9 = function() {
329
+ var _vm = this;
330
+ var _h = _vm.$createElement;
331
+ var _c = _vm._self._c || _h;
332
+ return _c("div", { class: "wrapper " + (_vm.config.showTheme && "theme"), style: _vm.wrapperStyles }, [_c("div", { staticClass: "header" }, [_vm._m(0), _c("img", { style: _vm.thumbStyles, attrs: { "src": _vm.data.thumb, "alt": "..." } })]), _c("div", { staticClass: "body" }, [_c("div", { staticClass: "loading" }, [_c("loading-icon")], 1), _c("img", { staticClass: "picture", style: _vm.imageStyles, attrs: { "src": _vm.data.image, "alt": "..." }, on: { "click": _vm.handler.clickEvent } }), _c("div", { staticClass: "dots" }, _vm._l(_vm.dots.list, function(dot) {
333
+ return _c("div", { key: dot.key + "-" + dot.index, staticClass: "dot", style: {
334
+ top: dot.y - 11 + "px",
335
+ left: dot.x - 11 + "px"
336
+ } }, [_vm._v(_vm._s(dot.index))]);
337
+ }), 0)]), _c("div", { staticClass: "footer" }, [_c("div", { staticClass: "iconBlock iconBlock2" }, [_c("close-icon", { attrs: { "width": 22, "height": 22 }, on: { "click": _vm.handler.closeEvent } }), _c("refresh-icon", { attrs: { "width": 22, "height": 22 }, on: { "click": _vm.handler.refreshEvent } })], 1), _c("div", { staticClass: "buttonBlock" }, [_c("button", { on: { "click": _vm.handler.confirmEvent } }, [_vm._v("\u786E\u8BA4")])])])]);
338
+ };
339
+ var staticRenderFns$9 = [function() {
340
+ var _vm = this;
341
+ var _h = _vm.$createElement;
342
+ var _c = _vm._self._c || _h;
343
+ return _c("span", [_vm._v("\u8BF7\u5728\u4E0B\u56FE"), _c("em", [_vm._v("\u4F9D\u6B21")]), _vm._v("\u70B9\u51FB\uFF1A")]);
344
+ }];
345
+ var index_vue_vue_type_style_index_0_scoped_true_lang$4 = "";
346
+ const __cssModules$9 = {};
347
+ var __component__$9 = /* @__PURE__ */ normalizeComponent(
348
+ __sfc_main$9,
349
+ render$9,
350
+ staticRenderFns$9,
351
+ false,
352
+ __vue2_injectStyles$9,
353
+ "bbb869ee",
354
+ null,
355
+ null
356
+ );
357
+ function __vue2_injectStyles$9(context) {
358
+ for (let o in __cssModules$9) {
359
+ this[o] = __cssModules$9[o];
360
+ }
361
+ }
362
+ var capt$4 = /* @__PURE__ */ function() {
363
+ return __component__$9.exports;
364
+ }();
365
+ capt$4.name = "goCaptchaClick";
366
+ capt$4.install = function(Vue) {
367
+ Vue.component("gocaptcha-click", capt$4);
368
+ };
369
+ const defaultConfig$3 = () => ({
370
+ width: 300,
371
+ height: 240,
372
+ thumbWidth: 150,
373
+ thumbHeight: 40,
374
+ verticalPadding: 16,
375
+ horizontalPadding: 12,
376
+ showTheme: true
377
+ });
378
+ const __sfc_main$8 = {};
379
+ __sfc_main$8.setup = (__props, __ctx) => {
380
+ const emit = __ctx.emit;
381
+ function emitClickEvent(e) {
382
+ emit("click", e);
383
+ }
384
+ return {
385
+ emitClickEvent
386
+ };
387
+ };
388
+ var render$8 = function() {
389
+ var _vm = this;
390
+ var _h = _vm.$createElement;
391
+ var _c = _vm._self._c || _h;
392
+ return _c("svg", _vm._b({ attrs: { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 200 200", "width": "20", "height": "20" }, on: { "click": _vm.emitClickEvent } }, "svg", _vm.$attrs, false), [_c("path", { attrs: { "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\n 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\n 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" } })]);
393
+ };
394
+ var staticRenderFns$8 = [];
395
+ var arrowsIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
396
+ const __cssModules$8 = {};
397
+ var __component__$8 = /* @__PURE__ */ normalizeComponent(
398
+ __sfc_main$8,
399
+ render$8,
400
+ staticRenderFns$8,
401
+ false,
402
+ __vue2_injectStyles$8,
403
+ "30853052",
404
+ null,
405
+ null
406
+ );
407
+ function __vue2_injectStyles$8(context) {
408
+ for (let o in __cssModules$8) {
409
+ this[o] = __cssModules$8[o];
410
+ }
411
+ }
412
+ var ArrowsIcon = /* @__PURE__ */ function() {
413
+ return __component__$8.exports;
414
+ }();
415
+ function useHandler$2(data, event, containerRef, tileRef, dragBlockRef, dragBarRef) {
416
+ const state = reactive({ dragLeft: 0, thumbLeft: data.thumbX || 0 });
417
+ const clear = () => {
418
+ state.dragLeft = 0;
419
+ state.thumbLeft = 0;
420
+ };
421
+ const dragEvent = (e) => {
422
+ const touch = e.touches && e.touches[0];
423
+ const offsetLeft = dragBlockRef.value.offsetLeft;
424
+ const width = containerRef.value.offsetWidth;
425
+ const blockWidth = dragBlockRef.value.offsetWidth;
426
+ const maxWidth = width - blockWidth;
427
+ const thumbX = data.thumbX || 0;
428
+ const tileWith = tileRef.value.offsetWidth;
429
+ const ad = blockWidth - tileWith;
430
+ const ratio = (maxWidth - thumbX + ad) / maxWidth;
431
+ let isMoving = false;
432
+ let startX = 0;
433
+ let currentThumbX = 0;
434
+ if (touch) {
435
+ startX = touch.pageX - offsetLeft;
436
+ } else {
437
+ startX = e.clientX - offsetLeft;
438
+ }
439
+ const moveEvent = (e2) => {
440
+ isMoving = true;
441
+ const mTouche = e2.touches && e2.touches[0];
442
+ let left = 0;
443
+ if (mTouche) {
444
+ left = mTouche.pageX - startX;
445
+ } else {
446
+ left = e2.clientX - startX;
447
+ }
448
+ if (left >= maxWidth) {
449
+ state.dragLeft = maxWidth;
450
+ return;
451
+ }
452
+ if (left <= 0) {
453
+ state.dragLeft = 0;
454
+ return;
455
+ }
456
+ state.dragLeft = left;
457
+ currentThumbX = thumbX + left * ratio;
458
+ state.thumbLeft = currentThumbX;
459
+ event.move && event.move(currentThumbX, data.thumbY || 0);
460
+ e2.cancelBubble = true;
461
+ e2.preventDefault();
462
+ };
463
+ const upEvent = (e2) => {
464
+ if (!checkTargetFather(dragBarRef.value, e2)) {
465
+ return;
466
+ }
467
+ if (!isMoving) {
468
+ return;
469
+ }
470
+ dragBarRef.value.removeEventListener("mousemove", moveEvent, false);
471
+ dragBarRef.value.removeEventListener("touchmove", moveEvent, { passive: false });
472
+ dragBarRef.value.removeEventListener("mouseup", upEvent, false);
473
+ dragBarRef.value.removeEventListener("mouseout", upEvent, false);
474
+ dragBarRef.value.removeEventListener("touchend", upEvent, false);
475
+ isMoving = false;
476
+ event.confirm && event.confirm({ x: parseInt(currentThumbX.toString()), y: data.thumbY || 0 }, () => {
477
+ clear();
478
+ });
479
+ e2.cancelBubble = true;
480
+ e2.preventDefault();
481
+ };
482
+ dragBarRef.value.addEventListener("mousemove", moveEvent, false);
483
+ dragBarRef.value.addEventListener("touchmove", moveEvent, { passive: false });
484
+ dragBarRef.value.addEventListener("mouseup", upEvent, false);
485
+ dragBarRef.value.addEventListener("mouseout", upEvent, false);
486
+ dragBarRef.value.addEventListener("touchend", upEvent, false);
487
+ };
488
+ const closeEvent = (e) => {
489
+ event && event.close && event.close();
490
+ clear();
491
+ e.cancelBubble = true;
492
+ e.preventDefault();
493
+ return false;
494
+ };
495
+ const refreshEvent = (e) => {
496
+ event && event.refresh && event.refresh();
497
+ clear();
498
+ e.cancelBubble = true;
499
+ e.preventDefault();
500
+ return false;
501
+ };
502
+ return {
503
+ state,
504
+ dragEvent,
505
+ closeEvent,
506
+ refreshEvent
507
+ };
508
+ }
509
+ const __sfc_main$7 = {};
510
+ __sfc_main$7.props = {
511
+ config: {
512
+ key: "config",
513
+ required: false,
514
+ type: null,
515
+ default: defaultConfig$3
516
+ },
517
+ events: {
518
+ key: "events",
519
+ required: false,
520
+ type: null,
521
+ default: () => ({})
522
+ },
523
+ data: {
524
+ key: "data",
525
+ required: false,
526
+ type: null,
527
+ default: () => ({})
528
+ }
529
+ };
530
+ __sfc_main$7.setup = (__props, __ctx) => {
531
+ const props = __props;
532
+ const {
533
+ config,
534
+ data,
535
+ events
536
+ } = props;
537
+ const dragBarRef = ref(null);
538
+ const containerRef = ref(null);
539
+ const dragBlockRef = ref(null);
540
+ const tileRef = ref(null);
541
+ const handler = useHandler$2(data, events, containerRef, tileRef, dragBlockRef, dragBarRef);
542
+ const hPadding = config.horizontalPadding || 0;
543
+ const vPadding = config.verticalPadding || 0;
544
+ const width = (config.width || 0) + vPadding * 2;
545
+ const wrapperStyles = computed(() => {
546
+ return {
547
+ width: width + "px",
548
+ paddingLeft: vPadding + "px",
549
+ paddingRight: vPadding + "px",
550
+ paddingTop: hPadding + "px",
551
+ paddingBottom: hPadding + "px"
552
+ };
553
+ });
554
+ const thumbStyles = computed(() => {
555
+ return {
556
+ width: data.thumbWidth + "px",
557
+ height: data.thumbHeight + "px",
558
+ top: data.thumbY + "px",
559
+ left: handler.state.thumbLeft + "px"
560
+ };
561
+ });
562
+ const imageStyles = computed(() => {
563
+ return {
564
+ width: config.width + "px",
565
+ height: config.height + "px"
566
+ };
567
+ });
568
+ return {
569
+ config,
570
+ data,
571
+ dragBarRef,
572
+ containerRef,
573
+ dragBlockRef,
574
+ tileRef,
575
+ handler,
576
+ wrapperStyles,
577
+ thumbStyles,
578
+ imageStyles
579
+ };
580
+ };
581
+ __sfc_main$7.components = Object.assign({
582
+ CloseIcon,
583
+ RefreshIcon,
584
+ LoadingIcon,
585
+ ArrowsIcon
586
+ }, __sfc_main$7.components);
587
+ var render$7 = function() {
588
+ var _vm = this;
589
+ var _h = _vm.$createElement;
590
+ var _c = _vm._self._c || _h;
591
+ return _c("div", { class: "wrapper " + (_vm.config.showTheme && "theme"), style: _vm.wrapperStyles }, [_c("div", { staticClass: "header" }, [_c("span", [_vm._v("\u8BF7\u62D6\u52A8\u6ED1\u5757\u5B8C\u6210\u62FC\u56FE")]), _c("div", { staticClass: "iconBlock" }, [_c("close-icon", { attrs: { "width": 22, "height": 22 }, on: { "click": _vm.handler.closeEvent } }), _c("refresh-icon", { attrs: { "width": 22, "height": 22 }, on: { "click": _vm.handler.refreshEvent } })], 1)]), _c("div", { ref: "containerRef", staticClass: "body" }, [_c("div", { staticClass: "loading" }, [_c("loading-icon")], 1), _c("img", { staticClass: "picture", style: _vm.imageStyles, attrs: { "src": _vm.data.image, "alt": "..." } }), _c("div", { ref: "tileRef", staticClass: "tile", style: _vm.thumbStyles }, [_c("img", { attrs: { "src": _vm.data.thumb, "alt": "..." } })])]), _c("div", { staticClass: "footer" }, [_c("div", { ref: "dragBarRef", staticClass: "dragSlideBar", on: { "mousedown": _vm.handler.dragEvent } }, [_c("div", { staticClass: "dragLine" }), _c("div", { ref: "dragBlockRef", staticClass: "dragBlock", style: { left: _vm.handler.state.dragLeft + "px" }, on: { "touchstart": _vm.handler.dragEvent } }, [_c("arrows-icon")], 1)])])]);
592
+ };
593
+ var staticRenderFns$7 = [];
594
+ var index_vue_vue_type_style_index_0_scoped_true_lang$3 = "";
595
+ const __cssModules$7 = {};
596
+ var __component__$7 = /* @__PURE__ */ normalizeComponent(
597
+ __sfc_main$7,
598
+ render$7,
599
+ staticRenderFns$7,
600
+ false,
601
+ __vue2_injectStyles$7,
602
+ "22e2084a",
603
+ null,
604
+ null
605
+ );
606
+ function __vue2_injectStyles$7(context) {
607
+ for (let o in __cssModules$7) {
608
+ this[o] = __cssModules$7[o];
609
+ }
610
+ }
611
+ var capt$3 = /* @__PURE__ */ function() {
612
+ return __component__$7.exports;
613
+ }();
614
+ capt$3.name = "goCaptchaSlide";
615
+ capt$3.install = function(Vue) {
616
+ Vue.component("gocaptcha-slide", capt$3);
617
+ };
618
+ const defaultConfig$2 = () => ({
619
+ width: 300,
620
+ height: 240,
621
+ verticalPadding: 16,
622
+ horizontalPadding: 12,
623
+ showTheme: true
624
+ });
625
+ function useHandler$1(data, event, containerRef, tileRef) {
626
+ const state = reactive({ x: data.thumbX || 0, y: data.thumbY || 0 });
627
+ const clear = () => {
628
+ state.x = data.thumbX || 0;
629
+ state.y = data.thumbY || 0;
630
+ };
631
+ const dragEvent = (e) => {
632
+ const touch = e.touches && e.touches[0];
633
+ const offsetLeft = tileRef.value.offsetLeft;
634
+ const offsetTop = tileRef.value.offsetTop;
635
+ const width = containerRef.value.offsetWidth;
636
+ const height = containerRef.value.offsetHeight;
637
+ const tileWidth = tileRef.value.offsetWidth;
638
+ const tileHeight = tileRef.value.offsetHeight;
639
+ const maxWidth = width - tileWidth;
640
+ const maxHeight = height - tileHeight;
641
+ let isMoving = false;
642
+ let startX = 0;
643
+ let startY = 0;
644
+ let tileLeft = 0;
645
+ let tileTop = 0;
646
+ if (touch) {
647
+ startX = touch.pageX - offsetLeft;
648
+ startY = touch.pageY - offsetTop;
649
+ } else {
650
+ startX = e.clientX - offsetLeft;
651
+ startY = e.clientY - offsetTop;
652
+ }
653
+ const moveEvent = (e2) => {
654
+ isMoving = true;
655
+ const mTouche = e2.touches && e2.touches[0];
656
+ let left = 0;
657
+ let top = 0;
658
+ if (mTouche) {
659
+ left = mTouche.pageX - startX;
660
+ top = mTouche.pageY - startY;
661
+ } else {
662
+ left = e2.clientX - startX;
663
+ top = e2.clientY - startY;
664
+ }
665
+ if (left <= 0) {
666
+ left = 0;
667
+ }
668
+ if (top <= 0) {
669
+ top = 0;
670
+ }
671
+ if (left >= maxWidth) {
672
+ left = maxWidth;
673
+ }
674
+ if (top >= maxHeight) {
675
+ top = maxHeight;
676
+ }
677
+ state.x = left;
678
+ state.y = top;
679
+ tileLeft = left;
680
+ tileTop = top;
681
+ event.move && event.move(left, top);
682
+ e2.cancelBubble = true;
683
+ e2.preventDefault();
684
+ };
685
+ const upEvent = (e2) => {
686
+ if (!checkTargetFather(containerRef.value, e2)) {
687
+ return;
688
+ }
689
+ if (!isMoving) {
690
+ return;
691
+ }
692
+ isMoving = false;
693
+ containerRef.value.removeEventListener("mousemove", moveEvent, false);
694
+ containerRef.value.removeEventListener("touchmove", moveEvent, { passive: false });
695
+ containerRef.value.removeEventListener("mouseup", upEvent, false);
696
+ containerRef.value.removeEventListener("mouseout", upEvent, false);
697
+ containerRef.value.removeEventListener("touchend", upEvent, false);
698
+ event.confirm && event.confirm({ x: tileLeft, y: tileTop }, () => {
699
+ clear();
700
+ });
701
+ e2.cancelBubble = true;
702
+ e2.preventDefault();
703
+ };
704
+ containerRef.value.addEventListener("mousemove", moveEvent, false);
705
+ containerRef.value.addEventListener("touchmove", moveEvent, { passive: false });
706
+ containerRef.value.addEventListener("mouseup", upEvent, false);
707
+ containerRef.value.addEventListener("mouseout", upEvent, false);
708
+ containerRef.value.addEventListener("touchend", upEvent, false);
709
+ };
710
+ const closeEvent = (e) => {
711
+ event && event.close && event.close();
712
+ clear();
713
+ e.cancelBubble = true;
714
+ e.preventDefault();
715
+ return false;
716
+ };
717
+ const refreshEvent = (e) => {
718
+ event && event.refresh && event.refresh();
719
+ clear();
720
+ e.cancelBubble = true;
721
+ e.preventDefault();
722
+ return false;
723
+ };
724
+ return {
725
+ state,
726
+ dragEvent,
727
+ closeEvent,
728
+ refreshEvent
729
+ };
730
+ }
731
+ const __sfc_main$6 = {};
732
+ __sfc_main$6.props = {
733
+ config: {
734
+ key: "config",
735
+ required: false,
736
+ type: null,
737
+ default: defaultConfig$2
738
+ },
739
+ events: {
740
+ key: "events",
741
+ required: false,
742
+ type: null,
743
+ default: () => ({})
744
+ },
745
+ data: {
746
+ key: "data",
747
+ required: false,
748
+ type: null,
749
+ default: () => ({})
750
+ }
751
+ };
752
+ __sfc_main$6.setup = (__props, __ctx) => {
753
+ const props = __props;
754
+ const {
755
+ config,
756
+ data,
757
+ events
758
+ } = props;
759
+ const containerRef = ref(null);
760
+ const tileRef = ref(null);
761
+ const handler = useHandler$1(data, events, containerRef, tileRef);
762
+ const hPadding = config.horizontalPadding || 0;
763
+ const vPadding = config.verticalPadding || 0;
764
+ const width = (config.width || 0) + vPadding * 2;
765
+ onMounted(() => {
766
+ tileRef.value.addEventListener("dragstart", (event) => event.preventDefault());
767
+ });
768
+ const wrapperStyles = computed(() => {
769
+ return {
770
+ width: width + "px",
771
+ paddingLeft: vPadding + "px",
772
+ paddingRight: vPadding + "px",
773
+ paddingTop: hPadding + "px",
774
+ paddingBottom: hPadding + "px"
775
+ };
776
+ });
777
+ const thumbStyles = computed(() => {
778
+ return {
779
+ width: data.thumbWidth + "px",
780
+ height: data.thumbHeight + "px",
781
+ top: handler.state.y + "px",
782
+ left: handler.state.x + "px"
783
+ };
784
+ });
785
+ const imageStyles = computed(() => {
786
+ return {
787
+ width: config.width + "px",
788
+ height: config.height + "px"
789
+ };
790
+ });
791
+ return {
792
+ config,
793
+ data,
794
+ containerRef,
795
+ tileRef,
796
+ handler,
797
+ wrapperStyles,
798
+ thumbStyles,
799
+ imageStyles
800
+ };
801
+ };
802
+ __sfc_main$6.components = Object.assign({
803
+ LoadingIcon,
804
+ CloseIcon,
805
+ RefreshIcon
806
+ }, __sfc_main$6.components);
807
+ var render$6 = function() {
808
+ var _vm = this;
809
+ var _h = _vm.$createElement;
810
+ var _c = _vm._self._c || _h;
811
+ return _c("div", { class: "wrapper " + (_vm.config.showTheme && "theme"), style: _vm.wrapperStyles }, [_vm._m(0), _c("div", { ref: "containerRef", staticClass: "body" }, [_c("div", { staticClass: "loading" }, [_c("loading-icon")], 1), _c("img", { staticClass: "picture", style: _vm.imageStyles, attrs: { "src": _vm.data.image, "alt": "..." } }), _c("div", { ref: "tileRef", staticClass: "tile", style: _vm.thumbStyles, on: { "mousedown": _vm.handler.dragEvent, "touchstart": _vm.handler.dragEvent } }, [_c("img", { attrs: { "src": _vm.data.thumb, "alt": "..." } })])]), _c("div", { staticClass: "footer" }, [_c("div", { staticClass: "iconBlock" }, [_c("close-icon", { attrs: { "width": 22, "height": 22 }, on: { "click": _vm.handler.closeEvent } }), _c("refresh-icon", { attrs: { "width": 22, "height": 22 }, on: { "click": _vm.handler.refreshEvent } })], 1)])]);
812
+ };
813
+ var staticRenderFns$6 = [function() {
814
+ var _vm = this;
815
+ var _h = _vm.$createElement;
816
+ var _c = _vm._self._c || _h;
817
+ return _c("div", { staticClass: "header" }, [_c("span", [_vm._v("\u8BF7\u62D6\u52A8\u6ED1\u5757\u5B8C\u6210\u62FC\u56FE")])]);
818
+ }];
819
+ var index_vue_vue_type_style_index_0_scoped_true_lang$2 = "";
820
+ const __cssModules$6 = {};
821
+ var __component__$6 = /* @__PURE__ */ normalizeComponent(
822
+ __sfc_main$6,
823
+ render$6,
824
+ staticRenderFns$6,
825
+ false,
826
+ __vue2_injectStyles$6,
827
+ "ae8e1660",
828
+ null,
829
+ null
830
+ );
831
+ function __vue2_injectStyles$6(context) {
832
+ for (let o in __cssModules$6) {
833
+ this[o] = __cssModules$6[o];
834
+ }
835
+ }
836
+ var capt$2 = /* @__PURE__ */ function() {
837
+ return __component__$6.exports;
838
+ }();
839
+ capt$2.name = "goCaptchaSlideRegion";
840
+ capt$2.install = function(Vue) {
841
+ Vue.component("gocaptcha-slide-region", capt$2);
842
+ };
843
+ const defaultConfig$1 = () => ({
844
+ width: 300,
845
+ height: 240,
846
+ size: 240,
847
+ verticalPadding: 16,
848
+ horizontalPadding: 12,
849
+ showTheme: true
850
+ });
851
+ function useHandler(data, event, dragBlockRef, dragBarRef) {
852
+ const state = reactive({ dragLeft: 0, thumbAngle: data.angle || 0 });
853
+ const clear = () => {
854
+ state.dragLeft = 0;
855
+ state.thumbAngle = 0;
856
+ };
857
+ const dragEvent = (e) => {
858
+ const touch = e.touches && e.touches[0];
859
+ const offsetLeft = dragBlockRef.value.offsetLeft;
860
+ const width = dragBarRef.value.offsetWidth;
861
+ const blockWidth = dragBlockRef.value.offsetWidth;
862
+ const maxWidth = width - blockWidth;
863
+ const p = 360 / maxWidth;
864
+ let angle = 0;
865
+ let isMoving = false;
866
+ let startX = 0;
867
+ if (touch) {
868
+ startX = touch.pageX - offsetLeft;
869
+ } else {
870
+ startX = e.clientX - offsetLeft;
871
+ }
872
+ const moveEvent = (e2) => {
873
+ isMoving = true;
874
+ const mTouche = e2.touches && e2.touches[0];
875
+ let left = 0;
876
+ if (mTouche) {
877
+ left = mTouche.pageX - startX;
878
+ } else {
879
+ left = e2.clientX - startX;
880
+ }
881
+ if (left >= maxWidth) {
882
+ state.dragLeft = maxWidth;
883
+ return;
884
+ }
885
+ if (left <= 0) {
886
+ state.dragLeft = 0;
887
+ return;
888
+ }
889
+ state.dragLeft = left;
890
+ angle = left * p;
891
+ state.thumbAngle = angle;
892
+ event.rotate && event.rotate(angle);
893
+ e2.cancelBubble = true;
894
+ e2.preventDefault();
895
+ };
896
+ const upEvent = (e2) => {
897
+ if (!checkTargetFather(dragBarRef.value, e2)) {
898
+ return;
899
+ }
900
+ if (!isMoving) {
901
+ return;
902
+ }
903
+ dragBarRef.value.removeEventListener("mousemove", moveEvent, false);
904
+ dragBarRef.value.removeEventListener("touchmove", moveEvent, { passive: false });
905
+ dragBarRef.value.removeEventListener("mouseup", upEvent, false);
906
+ dragBarRef.value.removeEventListener("mouseout", upEvent, false);
907
+ dragBarRef.value.removeEventListener("touchend", upEvent, false);
908
+ isMoving = false;
909
+ event.confirm && event.confirm(parseInt(angle.toString()), () => {
910
+ clear();
911
+ });
912
+ e2.cancelBubble = true;
913
+ e2.preventDefault();
914
+ };
915
+ dragBarRef.value.addEventListener("mousemove", moveEvent, false);
916
+ dragBarRef.value.addEventListener("touchmove", moveEvent, { passive: false });
917
+ dragBarRef.value.addEventListener("mouseup", upEvent, false);
918
+ dragBarRef.value.addEventListener("mouseout", upEvent, false);
919
+ dragBarRef.value.addEventListener("touchend", upEvent, false);
920
+ };
921
+ const closeEvent = (e) => {
922
+ event && event.close && event.close();
923
+ clear();
924
+ e.cancelBubble = true;
925
+ e.preventDefault();
926
+ return false;
927
+ };
928
+ const refreshEvent = (e) => {
929
+ event && event.refresh && event.refresh();
930
+ clear();
931
+ e.cancelBubble = true;
932
+ e.preventDefault();
933
+ return false;
934
+ };
935
+ return {
936
+ state,
937
+ dragEvent,
938
+ closeEvent,
939
+ refreshEvent
940
+ };
941
+ }
942
+ const __sfc_main$5 = {};
943
+ __sfc_main$5.props = {
944
+ config: {
945
+ key: "config",
946
+ required: false,
947
+ type: null,
948
+ default: defaultConfig$1
949
+ },
950
+ events: {
951
+ key: "events",
952
+ required: false,
953
+ type: null,
954
+ default: () => ({})
955
+ },
956
+ data: {
957
+ key: "data",
958
+ required: false,
959
+ type: null,
960
+ default: () => ({})
961
+ }
962
+ };
963
+ __sfc_main$5.setup = (__props, __ctx) => {
964
+ const props = __props;
965
+ const {
966
+ config,
967
+ data,
968
+ events
969
+ } = props;
970
+ console.log(props);
971
+ const dragBarRef = ref(null);
972
+ const dragBlockRef = ref(null);
973
+ const handler = useHandler(data, events, dragBlockRef, dragBarRef);
974
+ const wrapperStyles = computed(() => {
975
+ const hPadding = config.horizontalPadding || 0;
976
+ const vPadding = config.verticalPadding || 0;
977
+ const width = (config.width || 0) + vPadding * 2;
978
+ return {
979
+ width: width + "px",
980
+ paddingLeft: vPadding + "px",
981
+ paddingRight: vPadding + "px",
982
+ paddingTop: hPadding + "px",
983
+ paddingBottom: hPadding + "px"
984
+ };
985
+ });
986
+ const thumbStyles = computed(() => {
987
+ return {
988
+ transform: `rotate(${handler.state.thumbAngle}deg)`
989
+ };
990
+ });
991
+ const imageStyles = computed(() => {
992
+ return {
993
+ width: config.size + "px",
994
+ height: config.size + "px"
995
+ };
996
+ });
997
+ return {
998
+ config,
999
+ data,
1000
+ dragBarRef,
1001
+ dragBlockRef,
1002
+ handler,
1003
+ wrapperStyles,
1004
+ thumbStyles,
1005
+ imageStyles
1006
+ };
1007
+ };
1008
+ __sfc_main$5.components = Object.assign({
1009
+ CloseIcon,
1010
+ RefreshIcon,
1011
+ LoadingIcon,
1012
+ ArrowsIcon
1013
+ }, __sfc_main$5.components);
1014
+ var render$5 = function() {
1015
+ var _vm = this;
1016
+ var _h = _vm.$createElement;
1017
+ var _c = _vm._self._c || _h;
1018
+ return _c("div", { class: "wrapper " + (_vm.config.showTheme && "theme"), style: _vm.wrapperStyles }, [_c("div", { staticClass: "header" }, [_c("span", [_vm._v("\u8BF7\u62D6\u52A8\u6ED1\u5757\u5B8C\u6210\u62FC\u56FE")]), _c("div", { staticClass: "iconBlock" }, [_c("close-icon", { attrs: { "width": 22, "height": 22 }, on: { "click": _vm.handler.closeEvent } }), _c("refresh-icon", { attrs: { "width": 22, "height": 22 }, on: { "click": _vm.handler.refreshEvent } })], 1)]), _c("div", { ref: "containerRef", staticClass: "body body2" }, [_c("div", { staticClass: "loading" }, [_c("loading-icon")], 1), _c("div", { staticClass: "picture", style: _vm.imageStyles }, [_c("img", { attrs: { "src": _vm.data.image, "alt": "..." } }), _c("div", { staticClass: "round" })]), _c("div", { staticClass: "thumb" }, [_c("div", { staticClass: "thumbBlock", style: _vm.thumbStyles }, [_c("img", { attrs: { "src": _vm.data.thumb, "alt": "..." } })])])]), _c("div", { staticClass: "footer" }, [_c("div", { ref: "dragBarRef", staticClass: "dragSlideBar", on: { "mousedown": _vm.handler.dragEvent } }, [_c("div", { staticClass: "dragLine" }), _c("div", { ref: "dragBlockRef", staticClass: "dragBlock", style: { left: _vm.handler.state.dragLeft + "px" }, on: { "touchstart": _vm.handler.dragEvent } }, [_c("arrows-icon")], 1)])])]);
1019
+ };
1020
+ var staticRenderFns$5 = [];
1021
+ var index_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
1022
+ const __cssModules$5 = {};
1023
+ var __component__$5 = /* @__PURE__ */ normalizeComponent(
1024
+ __sfc_main$5,
1025
+ render$5,
1026
+ staticRenderFns$5,
1027
+ false,
1028
+ __vue2_injectStyles$5,
1029
+ "25e72324",
1030
+ null,
1031
+ null
1032
+ );
1033
+ function __vue2_injectStyles$5(context) {
1034
+ for (let o in __cssModules$5) {
1035
+ this[o] = __cssModules$5[o];
1036
+ }
1037
+ }
1038
+ var capt$1 = /* @__PURE__ */ function() {
1039
+ return __component__$5.exports;
1040
+ }();
1041
+ capt$1.name = "goCaptchaRotate";
1042
+ capt$1.install = function(Vue) {
1043
+ Vue.component("gocaptcha-rotate", capt$1);
1044
+ };
1045
+ const __sfc_main$4 = {};
1046
+ __sfc_main$4.setup = (__props, __ctx) => {
1047
+ const emit = __ctx.emit;
1048
+ function emitClickEvent(e) {
1049
+ emit("click", e);
1050
+ }
1051
+ return {
1052
+ emitClickEvent
1053
+ };
1054
+ };
1055
+ var render$4 = function() {
1056
+ var _vm = this;
1057
+ var _h = _vm.$createElement;
1058
+ var _c = _vm._self._c || _h;
1059
+ return _c("svg", _vm._b({ attrs: { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 200 200", "width": "20", "height": "20" }, on: { "click": _vm.emitClickEvent } }, "svg", _vm.$attrs, false), [_c("circle", { attrs: { "fill": "#3E7CFF", "cx": "100", "cy": "100", "r": "96.3" } }), _c("path", { attrs: { "fill": "#FFFFFF", "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\n 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" } })]);
1060
+ };
1061
+ var staticRenderFns$4 = [];
1062
+ var btnDefaultIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
1063
+ const __cssModules$4 = {};
1064
+ var __component__$4 = /* @__PURE__ */ normalizeComponent(
1065
+ __sfc_main$4,
1066
+ render$4,
1067
+ staticRenderFns$4,
1068
+ false,
1069
+ __vue2_injectStyles$4,
1070
+ "5511614f",
1071
+ null,
1072
+ null
1073
+ );
1074
+ function __vue2_injectStyles$4(context) {
1075
+ for (let o in __cssModules$4) {
1076
+ this[o] = __cssModules$4[o];
1077
+ }
1078
+ }
1079
+ var BtnDefaultIcon = /* @__PURE__ */ function() {
1080
+ return __component__$4.exports;
1081
+ }();
1082
+ const __sfc_main$3 = {};
1083
+ __sfc_main$3.setup = (__props, __ctx) => {
1084
+ const emit = __ctx.emit;
1085
+ function emitClickEvent(e) {
1086
+ emit("click", e);
1087
+ }
1088
+ return {
1089
+ emitClickEvent
1090
+ };
1091
+ };
1092
+ var render$3 = function() {
1093
+ var _vm = this;
1094
+ var _h = _vm.$createElement;
1095
+ var _c = _vm._self._c || _h;
1096
+ return _c("svg", _vm._b({ attrs: { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 200 200", "width": "20", "height": "20" }, on: { "click": _vm.emitClickEvent } }, "svg", _vm.$attrs, false), [_c("path", { attrs: { "fill": "#FFA000", "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\n 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\n 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\n 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\n z" } })]);
1097
+ };
1098
+ var staticRenderFns$3 = [];
1099
+ var btnWarnIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
1100
+ const __cssModules$3 = {};
1101
+ var __component__$3 = /* @__PURE__ */ normalizeComponent(
1102
+ __sfc_main$3,
1103
+ render$3,
1104
+ staticRenderFns$3,
1105
+ false,
1106
+ __vue2_injectStyles$3,
1107
+ "3fd7b394",
1108
+ null,
1109
+ null
1110
+ );
1111
+ function __vue2_injectStyles$3(context) {
1112
+ for (let o in __cssModules$3) {
1113
+ this[o] = __cssModules$3[o];
1114
+ }
1115
+ }
1116
+ var BtnWarnIcon = /* @__PURE__ */ function() {
1117
+ return __component__$3.exports;
1118
+ }();
1119
+ const __sfc_main$2 = {};
1120
+ __sfc_main$2.setup = (__props, __ctx) => {
1121
+ const emit = __ctx.emit;
1122
+ function emitClickEvent(e) {
1123
+ emit("click", e);
1124
+ }
1125
+ return {
1126
+ emitClickEvent
1127
+ };
1128
+ };
1129
+ var render$2 = function() {
1130
+ var _vm = this;
1131
+ var _h = _vm.$createElement;
1132
+ var _c = _vm._self._c || _h;
1133
+ return _c("svg", _vm._b({ attrs: { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 200 200", "width": "20", "height": "20" }, on: { "click": _vm.emitClickEvent } }, "svg", _vm.$attrs, false), [_c("path", { attrs: { "fill": "#ED4630", "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\n 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\n 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\n 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\n 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" } })]);
1134
+ };
1135
+ var staticRenderFns$2 = [];
1136
+ var btnErrorIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
1137
+ const __cssModules$2 = {};
1138
+ var __component__$2 = /* @__PURE__ */ normalizeComponent(
1139
+ __sfc_main$2,
1140
+ render$2,
1141
+ staticRenderFns$2,
1142
+ false,
1143
+ __vue2_injectStyles$2,
1144
+ "6c20e1c2",
1145
+ null,
1146
+ null
1147
+ );
1148
+ function __vue2_injectStyles$2(context) {
1149
+ for (let o in __cssModules$2) {
1150
+ this[o] = __cssModules$2[o];
1151
+ }
1152
+ }
1153
+ var BtnErrorIcon = /* @__PURE__ */ function() {
1154
+ return __component__$2.exports;
1155
+ }();
1156
+ const __sfc_main$1 = {};
1157
+ __sfc_main$1.setup = (__props, __ctx) => {
1158
+ const emit = __ctx.emit;
1159
+ function emitClickEvent(e) {
1160
+ emit("click", e);
1161
+ }
1162
+ return {
1163
+ emitClickEvent
1164
+ };
1165
+ };
1166
+ var render$1 = function() {
1167
+ var _vm = this;
1168
+ var _h = _vm.$createElement;
1169
+ var _c = _vm._self._c || _h;
1170
+ return _c("svg", _vm._b({ attrs: { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 200 200", "width": "20", "height": "20" }, on: { "click": _vm.emitClickEvent } }, "svg", _vm.$attrs, false), [_c("path", { attrs: { "fill": "#5EAA2F", "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\n 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\n 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\n 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" } })]);
1171
+ };
1172
+ var staticRenderFns$1 = [];
1173
+ var btnSuccessIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
1174
+ const __cssModules$1 = {};
1175
+ var __component__$1 = /* @__PURE__ */ normalizeComponent(
1176
+ __sfc_main$1,
1177
+ render$1,
1178
+ staticRenderFns$1,
1179
+ false,
1180
+ __vue2_injectStyles$1,
1181
+ "5a795cd4",
1182
+ null,
1183
+ null
1184
+ );
1185
+ function __vue2_injectStyles$1(context) {
1186
+ for (let o in __cssModules$1) {
1187
+ this[o] = __cssModules$1[o];
1188
+ }
1189
+ }
1190
+ var BtnSuccessIcon = /* @__PURE__ */ function() {
1191
+ return __component__$1.exports;
1192
+ }();
1193
+ const defaultConfig = () => ({
1194
+ width: 330,
1195
+ height: 44,
1196
+ verticalPadding: 12,
1197
+ horizontalPadding: 16
1198
+ });
1199
+ const __sfc_main = {};
1200
+ __sfc_main.props = {
1201
+ config: {
1202
+ key: "config",
1203
+ required: false,
1204
+ type: null,
1205
+ default: defaultConfig
1206
+ },
1207
+ clickEvent: {
1208
+ key: "clickEvent",
1209
+ required: false,
1210
+ type: Function
1211
+ },
1212
+ disabled: {
1213
+ key: "disabled",
1214
+ required: false,
1215
+ type: Boolean,
1216
+ default: false
1217
+ },
1218
+ type: {
1219
+ key: "type",
1220
+ required: false,
1221
+ type: String,
1222
+ default: "default"
1223
+ },
1224
+ title: {
1225
+ key: "title",
1226
+ required: false,
1227
+ type: String,
1228
+ default: "\u70B9\u51FB\u6309\u952E\u8FDB\u884C\u9A8C\u8BC1"
1229
+ }
1230
+ };
1231
+ __sfc_main.setup = (__props, __ctx) => {
1232
+ const props = __props;
1233
+ const {
1234
+ config
1235
+ } = props;
1236
+ const {
1237
+ type,
1238
+ title,
1239
+ disabled
1240
+ } = toRefs(props);
1241
+ const btnClass = computed(() => {
1242
+ return ["btnBlock", type.value, disabled.value && "disabled"];
1243
+ });
1244
+ const btnStyle = computed(() => {
1245
+ return {
1246
+ width: config.width + "px",
1247
+ height: config.height + "px",
1248
+ paddingLeft: config.verticalPadding + "px",
1249
+ paddingRight: config.verticalPadding + "px",
1250
+ paddingTop: config.verticalPadding + "px",
1251
+ paddingBottom: config.verticalPadding + "px"
1252
+ };
1253
+ });
1254
+ const emit = __ctx.emit;
1255
+ function emitClickEvent(e) {
1256
+ emit("click-event", e);
1257
+ }
1258
+ return {
1259
+ type,
1260
+ title,
1261
+ btnClass,
1262
+ btnStyle,
1263
+ emitClickEvent
1264
+ };
1265
+ };
1266
+ __sfc_main.components = Object.assign({
1267
+ BtnDefaultIcon,
1268
+ BtnWarnIcon,
1269
+ BtnErrorIcon,
1270
+ BtnSuccessIcon
1271
+ }, __sfc_main.components);
1272
+ var render = function() {
1273
+ var _vm = this;
1274
+ var _h = _vm.$createElement;
1275
+ var _c = _vm._self._c || _h;
1276
+ return _c("div", { class: _vm.btnClass, style: _vm.btnStyle, on: { "click": _vm.emitClickEvent } }, [_c("div", { class: _vm.type === "default" && "ripple" }, [_vm.type === "default" ? _c("btn-default-icon") : _vm.type === "warn" ? _c("btn-warn-icon") : _vm.type === "error" ? _c("btn-error-icon") : _vm.type === "success" ? _c("btn-success-icon") : _vm._e()], 1), _c("span", [_vm._v(_vm._s(_vm.title))])]);
1277
+ };
1278
+ var staticRenderFns = [];
1279
+ var index_vue_vue_type_style_index_0_scoped_true_lang = "";
1280
+ const __cssModules = {};
1281
+ var __component__ = /* @__PURE__ */ normalizeComponent(
1282
+ __sfc_main,
1283
+ render,
1284
+ staticRenderFns,
1285
+ false,
1286
+ __vue2_injectStyles,
1287
+ "2878e23a",
1288
+ null,
1289
+ null
1290
+ );
1291
+ function __vue2_injectStyles(context) {
1292
+ for (let o in __cssModules) {
1293
+ this[o] = __cssModules[o];
1294
+ }
1295
+ }
1296
+ var capt = /* @__PURE__ */ function() {
1297
+ return __component__.exports;
1298
+ }();
1299
+ capt.name = "goCaptchaButton";
1300
+ capt.install = function(Vue) {
1301
+ Vue.component("gocaptcha-button", capt);
1302
+ };
1303
+ var index = {
1304
+ install(vue) {
1305
+ capt$4.install(vue);
1306
+ capt$3.install(vue);
1307
+ capt$2.install(vue);
1308
+ capt$1.install(vue);
1309
+ capt.install(vue);
1310
+ }
1311
+ };
1312
+ export { index as default };