slide-vue3 1.0.2

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.
@@ -0,0 +1,2618 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["index"] = factory();
8
+ else
9
+ root["index"] = factory();
10
+ })((typeof self !== 'undefined' ? self : this), function() {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+ /******/
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId]) {
20
+ /******/ return installedModules[moduleId].exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ i: moduleId,
25
+ /******/ l: false,
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+ /******/
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.l = true;
34
+ /******/
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+ /******/
39
+ /******/
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+ /******/
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+ /******/
46
+ /******/ // define getter function for harmony exports
47
+ /******/ __webpack_require__.d = function(exports, name, getter) {
48
+ /******/ if(!__webpack_require__.o(exports, name)) {
49
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50
+ /******/ }
51
+ /******/ };
52
+ /******/
53
+ /******/ // define __esModule on exports
54
+ /******/ __webpack_require__.r = function(exports) {
55
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57
+ /******/ }
58
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
59
+ /******/ };
60
+ /******/
61
+ /******/ // create a fake namespace object
62
+ /******/ // mode & 1: value is a module id, require it
63
+ /******/ // mode & 2: merge all properties of value into the ns
64
+ /******/ // mode & 4: return value when already ns object
65
+ /******/ // mode & 8|1: behave like require
66
+ /******/ __webpack_require__.t = function(value, mode) {
67
+ /******/ if(mode & 1) value = __webpack_require__(value);
68
+ /******/ if(mode & 8) return value;
69
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70
+ /******/ var ns = Object.create(null);
71
+ /******/ __webpack_require__.r(ns);
72
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74
+ /******/ return ns;
75
+ /******/ };
76
+ /******/
77
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
78
+ /******/ __webpack_require__.n = function(module) {
79
+ /******/ var getter = module && module.__esModule ?
80
+ /******/ function getDefault() { return module['default']; } :
81
+ /******/ function getModuleExports() { return module; };
82
+ /******/ __webpack_require__.d(getter, 'a', getter);
83
+ /******/ return getter;
84
+ /******/ };
85
+ /******/
86
+ /******/ // Object.prototype.hasOwnProperty.call
87
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88
+ /******/
89
+ /******/ // __webpack_public_path__
90
+ /******/ __webpack_require__.p = "";
91
+ /******/
92
+ /******/
93
+ /******/ // Load entry module and return exports
94
+ /******/ return __webpack_require__(__webpack_require__.s = "2b1f");
95
+ /******/ })
96
+ /************************************************************************/
97
+ /******/ ({
98
+
99
+ /***/ "0997":
100
+ /***/ (function(module, exports, __webpack_require__) {
101
+
102
+ "use strict";
103
+
104
+
105
+ var utils = __webpack_require__("3d1e");
106
+ var buildURL = __webpack_require__("85b5");
107
+ var InterceptorManager = __webpack_require__("f80f");
108
+ var dispatchRequest = __webpack_require__("ab31");
109
+ var mergeConfig = __webpack_require__("9f97");
110
+
111
+ /**
112
+ * Create a new instance of Axios
113
+ *
114
+ * @param {Object} instanceConfig The default config for the instance
115
+ */
116
+ function Axios(instanceConfig) {
117
+ this.defaults = instanceConfig;
118
+ this.interceptors = {
119
+ request: new InterceptorManager(),
120
+ response: new InterceptorManager()
121
+ };
122
+ }
123
+
124
+ /**
125
+ * Dispatch a request
126
+ *
127
+ * @param {Object} config The config specific for this request (merged with this.defaults)
128
+ */
129
+ Axios.prototype.request = function request(config) {
130
+ /*eslint no-param-reassign:0*/
131
+ // Allow for axios('example/url'[, config]) a la fetch API
132
+ if (typeof config === 'string') {
133
+ config = arguments[1] || {};
134
+ config.url = arguments[0];
135
+ } else {
136
+ config = config || {};
137
+ }
138
+
139
+ config = mergeConfig(this.defaults, config);
140
+
141
+ // Set config.method
142
+ if (config.method) {
143
+ config.method = config.method.toLowerCase();
144
+ } else if (this.defaults.method) {
145
+ config.method = this.defaults.method.toLowerCase();
146
+ } else {
147
+ config.method = 'get';
148
+ }
149
+
150
+ // Hook up interceptors middleware
151
+ var chain = [dispatchRequest, undefined];
152
+ var promise = Promise.resolve(config);
153
+
154
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
155
+ chain.unshift(interceptor.fulfilled, interceptor.rejected);
156
+ });
157
+
158
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
159
+ chain.push(interceptor.fulfilled, interceptor.rejected);
160
+ });
161
+
162
+ while (chain.length) {
163
+ promise = promise.then(chain.shift(), chain.shift());
164
+ }
165
+
166
+ return promise;
167
+ };
168
+
169
+ Axios.prototype.getUri = function getUri(config) {
170
+ config = mergeConfig(this.defaults, config);
171
+ return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
172
+ };
173
+
174
+ // Provide aliases for supported request methods
175
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
176
+ /*eslint func-names:0*/
177
+ Axios.prototype[method] = function(url, config) {
178
+ return this.request(mergeConfig(config || {}, {
179
+ method: method,
180
+ url: url
181
+ }));
182
+ };
183
+ });
184
+
185
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
186
+ /*eslint func-names:0*/
187
+ Axios.prototype[method] = function(url, data, config) {
188
+ return this.request(mergeConfig(config || {}, {
189
+ method: method,
190
+ url: url,
191
+ data: data
192
+ }));
193
+ };
194
+ });
195
+
196
+ module.exports = Axios;
197
+
198
+
199
+ /***/ }),
200
+
201
+ /***/ "0cc7":
202
+ /***/ (function(module, exports, __webpack_require__) {
203
+
204
+ "use strict";
205
+
206
+
207
+ var utils = __webpack_require__("3d1e");
208
+
209
+ module.exports = function normalizeHeaderName(headers, normalizedName) {
210
+ utils.forEach(headers, function processHeader(value, name) {
211
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
212
+ headers[normalizedName] = value;
213
+ delete headers[name];
214
+ }
215
+ });
216
+ };
217
+
218
+
219
+ /***/ }),
220
+
221
+ /***/ "26af":
222
+ /***/ (function(module, exports, __webpack_require__) {
223
+
224
+ "use strict";
225
+
226
+
227
+ /**
228
+ * Creates a new URL by combining the specified URLs
229
+ *
230
+ * @param {string} baseURL The base URL
231
+ * @param {string} relativeURL The relative URL
232
+ * @returns {string} The combined URL
233
+ */
234
+ module.exports = function combineURLs(baseURL, relativeURL) {
235
+ return relativeURL
236
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
237
+ : baseURL;
238
+ };
239
+
240
+
241
+ /***/ }),
242
+
243
+ /***/ "2a78":
244
+ /***/ (function(module, exports, __webpack_require__) {
245
+
246
+ "use strict";
247
+
248
+
249
+ var createError = __webpack_require__("6c70");
250
+
251
+ /**
252
+ * Resolve or reject a Promise based on response status.
253
+ *
254
+ * @param {Function} resolve A function that resolves the promise.
255
+ * @param {Function} reject A function that rejects the promise.
256
+ * @param {object} response The response.
257
+ */
258
+ module.exports = function settle(resolve, reject, response) {
259
+ var validateStatus = response.config.validateStatus;
260
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
261
+ resolve(response);
262
+ } else {
263
+ reject(createError(
264
+ 'Request failed with status code ' + response.status,
265
+ response.config,
266
+ null,
267
+ response.request,
268
+ response
269
+ ));
270
+ }
271
+ };
272
+
273
+
274
+ /***/ }),
275
+
276
+ /***/ "2b1f":
277
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
278
+
279
+ "use strict";
280
+ // ESM COMPAT FLAG
281
+ __webpack_require__.r(__webpack_exports__);
282
+
283
+ // CONCATENATED MODULE: ./node_modules/_@vue_cli-service@4.5.19@@vue/cli-service/lib/commands/build/setPublicPath.js
284
+ // This file is imported into lib/wc client bundles.
285
+
286
+ if (typeof window !== 'undefined') {
287
+ var currentScript = window.document.currentScript
288
+ if (false) { var getCurrentScript; }
289
+
290
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
291
+ if (src) {
292
+ __webpack_require__.p = src[1] // eslint-disable-line
293
+ }
294
+ }
295
+
296
+ // Indicate to webpack that this file can be concatenated
297
+ /* harmony default export */ var setPublicPath = (null);
298
+
299
+ // EXTERNAL MODULE: ./node_modules/_axios@0.20.0@axios/index.js
300
+ var _axios_0_20_0_axios = __webpack_require__("5976");
301
+ var _axios_0_20_0_axios_default = /*#__PURE__*/__webpack_require__.n(_axios_0_20_0_axios);
302
+
303
+ // CONCATENATED MODULE: ./packages/slidecode/js/utils.js
304
+ const isMobile = () => {
305
+ var sUserAgent = navigator.userAgent.toLowerCase();
306
+ var bIsIpad = sUserAgent.match(/ipad/i) == 'ipad';
307
+ var bIsIphoneOs = sUserAgent.match(/iphone os/i) == 'iphone os';
308
+ var bIsMidp = sUserAgent.match(/midp/i) == 'midp';
309
+ var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == 'rv:1.2.3.4';
310
+ var bIsUc = sUserAgent.match(/ucweb/i) == 'ucweb';
311
+ var bIsAndroid = sUserAgent.match(/android/i) == 'android';
312
+ var bIsCE = sUserAgent.match(/windows ce/i) == 'windows ce';
313
+ var bIsWM = sUserAgent.match(/windows mobile/i) == 'windows mobile';
314
+
315
+ if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
316
+ return true;
317
+ }
318
+
319
+ return false;
320
+ };
321
+
322
+
323
+ // EXTERNAL MODULE: ./packages/slidecode/css/slide.css
324
+ var slide = __webpack_require__("cdfd");
325
+
326
+ // CONCATENATED MODULE: ./packages/index.js
327
+ /* eslint-disable no-param-reassign */
328
+
329
+
330
+ // import SlideCode from'./slidecode/js/slidecode'
331
+
332
+ let SlideCode = __webpack_require__("9e42").default;
333
+
334
+ if (isMobile()) {
335
+ SlideCode = __webpack_require__("4554").default;
336
+ }
337
+
338
+ const packages_plugin = {
339
+ install: app => {
340
+ app.config.globalProperties.$getImg = (url, cb) => {
341
+ const service = _axios_0_20_0_axios_default.a.create();
342
+ service({
343
+ url,
344
+ method: 'get'
345
+ }).then(({
346
+ data
347
+ }) => {
348
+ if (data) {
349
+ const slide = new SlideCode({
350
+ frontimg: `data:image/png;base64,${data.slidingImage}`,
351
+ backimg: `data:image/png;base64,${data.backImage}`,
352
+ yHeight: data.yHeight,
353
+ capcode: data.capcode,
354
+
355
+ refreshcallback(bool) {
356
+ switch (bool) {
357
+ case true:
358
+ slide.showTips(true);
359
+ setTimeout(() => {
360
+ slide.destory();
361
+ }, 500);
362
+ break;
363
+
364
+ case false:
365
+ slide.showTips(false);
366
+ setTimeout(() => {
367
+ app.config.globalProperties.$getImg(url, cb);
368
+ }, 500);
369
+ break;
370
+
371
+ default:
372
+ app.config.globalProperties.$getImg(url, cb);
373
+ }
374
+ },
375
+
376
+ callback(result) {
377
+ cb({
378
+ data: result,
379
+ that: this
380
+ });
381
+ }
382
+
383
+ });
384
+ }
385
+ });
386
+ };
387
+ }
388
+ };
389
+ /* harmony default export */ var packages_0 = (packages_plugin);
390
+ // CONCATENATED MODULE: ./node_modules/_@vue_cli-service@4.5.19@@vue/cli-service/lib/commands/build/entry-lib.js
391
+
392
+
393
+ /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (packages_0);
394
+
395
+
396
+
397
+ /***/ }),
398
+
399
+ /***/ "3d1e":
400
+ /***/ (function(module, exports, __webpack_require__) {
401
+
402
+ "use strict";
403
+
404
+
405
+ var bind = __webpack_require__("efe0");
406
+
407
+ /*global toString:true*/
408
+
409
+ // utils is a library of generic helper functions non-specific to axios
410
+
411
+ var toString = Object.prototype.toString;
412
+
413
+ /**
414
+ * Determine if a value is an Array
415
+ *
416
+ * @param {Object} val The value to test
417
+ * @returns {boolean} True if value is an Array, otherwise false
418
+ */
419
+ function isArray(val) {
420
+ return toString.call(val) === '[object Array]';
421
+ }
422
+
423
+ /**
424
+ * Determine if a value is undefined
425
+ *
426
+ * @param {Object} val The value to test
427
+ * @returns {boolean} True if the value is undefined, otherwise false
428
+ */
429
+ function isUndefined(val) {
430
+ return typeof val === 'undefined';
431
+ }
432
+
433
+ /**
434
+ * Determine if a value is a Buffer
435
+ *
436
+ * @param {Object} val The value to test
437
+ * @returns {boolean} True if value is a Buffer, otherwise false
438
+ */
439
+ function isBuffer(val) {
440
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
441
+ && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
442
+ }
443
+
444
+ /**
445
+ * Determine if a value is an ArrayBuffer
446
+ *
447
+ * @param {Object} val The value to test
448
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
449
+ */
450
+ function isArrayBuffer(val) {
451
+ return toString.call(val) === '[object ArrayBuffer]';
452
+ }
453
+
454
+ /**
455
+ * Determine if a value is a FormData
456
+ *
457
+ * @param {Object} val The value to test
458
+ * @returns {boolean} True if value is an FormData, otherwise false
459
+ */
460
+ function isFormData(val) {
461
+ return (typeof FormData !== 'undefined') && (val instanceof FormData);
462
+ }
463
+
464
+ /**
465
+ * Determine if a value is a view on an ArrayBuffer
466
+ *
467
+ * @param {Object} val The value to test
468
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
469
+ */
470
+ function isArrayBufferView(val) {
471
+ var result;
472
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
473
+ result = ArrayBuffer.isView(val);
474
+ } else {
475
+ result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
476
+ }
477
+ return result;
478
+ }
479
+
480
+ /**
481
+ * Determine if a value is a String
482
+ *
483
+ * @param {Object} val The value to test
484
+ * @returns {boolean} True if value is a String, otherwise false
485
+ */
486
+ function isString(val) {
487
+ return typeof val === 'string';
488
+ }
489
+
490
+ /**
491
+ * Determine if a value is a Number
492
+ *
493
+ * @param {Object} val The value to test
494
+ * @returns {boolean} True if value is a Number, otherwise false
495
+ */
496
+ function isNumber(val) {
497
+ return typeof val === 'number';
498
+ }
499
+
500
+ /**
501
+ * Determine if a value is an Object
502
+ *
503
+ * @param {Object} val The value to test
504
+ * @returns {boolean} True if value is an Object, otherwise false
505
+ */
506
+ function isObject(val) {
507
+ return val !== null && typeof val === 'object';
508
+ }
509
+
510
+ /**
511
+ * Determine if a value is a plain Object
512
+ *
513
+ * @param {Object} val The value to test
514
+ * @return {boolean} True if value is a plain Object, otherwise false
515
+ */
516
+ function isPlainObject(val) {
517
+ if (toString.call(val) !== '[object Object]') {
518
+ return false;
519
+ }
520
+
521
+ var prototype = Object.getPrototypeOf(val);
522
+ return prototype === null || prototype === Object.prototype;
523
+ }
524
+
525
+ /**
526
+ * Determine if a value is a Date
527
+ *
528
+ * @param {Object} val The value to test
529
+ * @returns {boolean} True if value is a Date, otherwise false
530
+ */
531
+ function isDate(val) {
532
+ return toString.call(val) === '[object Date]';
533
+ }
534
+
535
+ /**
536
+ * Determine if a value is a File
537
+ *
538
+ * @param {Object} val The value to test
539
+ * @returns {boolean} True if value is a File, otherwise false
540
+ */
541
+ function isFile(val) {
542
+ return toString.call(val) === '[object File]';
543
+ }
544
+
545
+ /**
546
+ * Determine if a value is a Blob
547
+ *
548
+ * @param {Object} val The value to test
549
+ * @returns {boolean} True if value is a Blob, otherwise false
550
+ */
551
+ function isBlob(val) {
552
+ return toString.call(val) === '[object Blob]';
553
+ }
554
+
555
+ /**
556
+ * Determine if a value is a Function
557
+ *
558
+ * @param {Object} val The value to test
559
+ * @returns {boolean} True if value is a Function, otherwise false
560
+ */
561
+ function isFunction(val) {
562
+ return toString.call(val) === '[object Function]';
563
+ }
564
+
565
+ /**
566
+ * Determine if a value is a Stream
567
+ *
568
+ * @param {Object} val The value to test
569
+ * @returns {boolean} True if value is a Stream, otherwise false
570
+ */
571
+ function isStream(val) {
572
+ return isObject(val) && isFunction(val.pipe);
573
+ }
574
+
575
+ /**
576
+ * Determine if a value is a URLSearchParams object
577
+ *
578
+ * @param {Object} val The value to test
579
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
580
+ */
581
+ function isURLSearchParams(val) {
582
+ return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
583
+ }
584
+
585
+ /**
586
+ * Trim excess whitespace off the beginning and end of a string
587
+ *
588
+ * @param {String} str The String to trim
589
+ * @returns {String} The String freed of excess whitespace
590
+ */
591
+ function trim(str) {
592
+ return str.replace(/^\s*/, '').replace(/\s*$/, '');
593
+ }
594
+
595
+ /**
596
+ * Determine if we're running in a standard browser environment
597
+ *
598
+ * This allows axios to run in a web worker, and react-native.
599
+ * Both environments support XMLHttpRequest, but not fully standard globals.
600
+ *
601
+ * web workers:
602
+ * typeof window -> undefined
603
+ * typeof document -> undefined
604
+ *
605
+ * react-native:
606
+ * navigator.product -> 'ReactNative'
607
+ * nativescript
608
+ * navigator.product -> 'NativeScript' or 'NS'
609
+ */
610
+ function isStandardBrowserEnv() {
611
+ if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
612
+ navigator.product === 'NativeScript' ||
613
+ navigator.product === 'NS')) {
614
+ return false;
615
+ }
616
+ return (
617
+ typeof window !== 'undefined' &&
618
+ typeof document !== 'undefined'
619
+ );
620
+ }
621
+
622
+ /**
623
+ * Iterate over an Array or an Object invoking a function for each item.
624
+ *
625
+ * If `obj` is an Array callback will be called passing
626
+ * the value, index, and complete array for each item.
627
+ *
628
+ * If 'obj' is an Object callback will be called passing
629
+ * the value, key, and complete object for each property.
630
+ *
631
+ * @param {Object|Array} obj The object to iterate
632
+ * @param {Function} fn The callback to invoke for each item
633
+ */
634
+ function forEach(obj, fn) {
635
+ // Don't bother if no value provided
636
+ if (obj === null || typeof obj === 'undefined') {
637
+ return;
638
+ }
639
+
640
+ // Force an array if not already something iterable
641
+ if (typeof obj !== 'object') {
642
+ /*eslint no-param-reassign:0*/
643
+ obj = [obj];
644
+ }
645
+
646
+ if (isArray(obj)) {
647
+ // Iterate over array values
648
+ for (var i = 0, l = obj.length; i < l; i++) {
649
+ fn.call(null, obj[i], i, obj);
650
+ }
651
+ } else {
652
+ // Iterate over object keys
653
+ for (var key in obj) {
654
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
655
+ fn.call(null, obj[key], key, obj);
656
+ }
657
+ }
658
+ }
659
+ }
660
+
661
+ /**
662
+ * Accepts varargs expecting each argument to be an object, then
663
+ * immutably merges the properties of each object and returns result.
664
+ *
665
+ * When multiple objects contain the same key the later object in
666
+ * the arguments list will take precedence.
667
+ *
668
+ * Example:
669
+ *
670
+ * ```js
671
+ * var result = merge({foo: 123}, {foo: 456});
672
+ * console.log(result.foo); // outputs 456
673
+ * ```
674
+ *
675
+ * @param {Object} obj1 Object to merge
676
+ * @returns {Object} Result of all merge properties
677
+ */
678
+ function merge(/* obj1, obj2, obj3, ... */) {
679
+ var result = {};
680
+ function assignValue(val, key) {
681
+ if (isPlainObject(result[key]) && isPlainObject(val)) {
682
+ result[key] = merge(result[key], val);
683
+ } else if (isPlainObject(val)) {
684
+ result[key] = merge({}, val);
685
+ } else if (isArray(val)) {
686
+ result[key] = val.slice();
687
+ } else {
688
+ result[key] = val;
689
+ }
690
+ }
691
+
692
+ for (var i = 0, l = arguments.length; i < l; i++) {
693
+ forEach(arguments[i], assignValue);
694
+ }
695
+ return result;
696
+ }
697
+
698
+ /**
699
+ * Extends object a by mutably adding to it the properties of object b.
700
+ *
701
+ * @param {Object} a The object to be extended
702
+ * @param {Object} b The object to copy properties from
703
+ * @param {Object} thisArg The object to bind function to
704
+ * @return {Object} The resulting value of object a
705
+ */
706
+ function extend(a, b, thisArg) {
707
+ forEach(b, function assignValue(val, key) {
708
+ if (thisArg && typeof val === 'function') {
709
+ a[key] = bind(val, thisArg);
710
+ } else {
711
+ a[key] = val;
712
+ }
713
+ });
714
+ return a;
715
+ }
716
+
717
+ /**
718
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
719
+ *
720
+ * @param {string} content with BOM
721
+ * @return {string} content value without BOM
722
+ */
723
+ function stripBOM(content) {
724
+ if (content.charCodeAt(0) === 0xFEFF) {
725
+ content = content.slice(1);
726
+ }
727
+ return content;
728
+ }
729
+
730
+ module.exports = {
731
+ isArray: isArray,
732
+ isArrayBuffer: isArrayBuffer,
733
+ isBuffer: isBuffer,
734
+ isFormData: isFormData,
735
+ isArrayBufferView: isArrayBufferView,
736
+ isString: isString,
737
+ isNumber: isNumber,
738
+ isObject: isObject,
739
+ isPlainObject: isPlainObject,
740
+ isUndefined: isUndefined,
741
+ isDate: isDate,
742
+ isFile: isFile,
743
+ isBlob: isBlob,
744
+ isFunction: isFunction,
745
+ isStream: isStream,
746
+ isURLSearchParams: isURLSearchParams,
747
+ isStandardBrowserEnv: isStandardBrowserEnv,
748
+ forEach: forEach,
749
+ merge: merge,
750
+ extend: extend,
751
+ trim: trim,
752
+ stripBOM: stripBOM
753
+ };
754
+
755
+
756
+ /***/ }),
757
+
758
+ /***/ "4554":
759
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
760
+
761
+ "use strict";
762
+ __webpack_require__.r(__webpack_exports__);
763
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SlideCode; });
764
+ class SlideCode {
765
+ constructor(options) {
766
+ const defaults = {
767
+ frontimg: '',
768
+ backimg: '',
769
+ callback: '',
770
+ refreshcallback: '',
771
+ yHeight: 1
772
+ };
773
+ this.opts = { ...defaults,
774
+ ...options
775
+ };
776
+ this.offset = {
777
+ x: 0,
778
+ y: 0
779
+ };
780
+ this.disX = 0;
781
+ this.moving = false;
782
+ this.init();
783
+ }
784
+
785
+ init() {
786
+ const html = `
787
+ <div class="code-k-div">
788
+ <div class="code_bg"></div>
789
+ <div class="code-con">
790
+ <div class="code-img">
791
+ <div class="code-img-con">
792
+ <div class="code-mask" style="margin-top:${this.opts.yHeight}px"><img class="code-front-img" src="${this.opts.frontimg}"></div>
793
+ <img class="code-back-img" src="${this.opts.backimg}">
794
+ </div>
795
+ <div class="code-push"><i class="icon-login-bg icon-w-25 icon-push">刷新</i><span class="code-tip"></span></div>
796
+ </div>
797
+ <div class="code-btn">
798
+ <div class="code-btn-img code-btn-m"></div>
799
+ <span class="code-span">按住滑块,拖动完成上方拼图</span>
800
+ </div>
801
+ </div>
802
+ </div>`;
803
+ this.destory();
804
+ const div = document.createElement('div');
805
+ div.className = 'slide-container';
806
+ div.innerHTML = html;
807
+ document.body.appendChild(div);
808
+ this.maskDom = document.querySelector('.code-mask');
809
+ this.moveBtnDom = document.querySelector('.code-btn-m');
810
+ this.moveWrapDom = document.querySelector('.code-btn');
811
+ this.refreshDom = document.querySelector('.code-push');
812
+ this.tipDom = document.querySelector('.code-tip');
813
+ this.bgDom = document.querySelector('.code_bg');
814
+ this.initEvent();
815
+ }
816
+
817
+ initEvent() {
818
+ this.refreshDom.addEventListener('click', () => {
819
+ this.opts.refreshcallback();
820
+ });
821
+ this.moveBtnDom.addEventListener('touchstart', event => {
822
+ let e = event || window.event;
823
+ e = e.targetTouches[0];
824
+ this.offset = {
825
+ x: e.pageX,
826
+ y: e.pageY
827
+ };
828
+ this.moving = true;
829
+ this.moveBtnDom.className += ' active';
830
+ });
831
+ this.moveBtnDom.addEventListener('touchmove', event => {
832
+ if (!this.moving) {
833
+ return;
834
+ }
835
+
836
+ let e = event || window.event;
837
+ e = e.targetTouches[0];
838
+ let disX = e.pageX - this.offset.x;
839
+
840
+ if (disX < 0) {
841
+ disX = 0;
842
+ } else if (disX > 245) {
843
+ disX = 245;
844
+ }
845
+
846
+ this.disX = disX;
847
+ this.moveBtnDom.style.left = `${disX + 10}px`;
848
+ this.maskDom.style.left = `${disX}px`;
849
+ });
850
+ this.moveBtnDom.addEventListener('touchend', event => {
851
+ this.moveEnd(event);
852
+ });
853
+ this.moveWrapDom.addEventListener('mouseleave', event => {
854
+ this.moveEnd(event);
855
+ });
856
+ this.bgDom.addEventListener('click', () => {
857
+ if (this.moving) {
858
+ return;
859
+ }
860
+
861
+ this.destory();
862
+ });
863
+ }
864
+
865
+ moveEnd() {
866
+ if (!this.moving) {
867
+ return;
868
+ }
869
+
870
+ this.offset = {
871
+ x: 0,
872
+ y: 0
873
+ };
874
+ this.moving = false;
875
+ this.moveBtnDom.className = this.moveBtnDom.className.replace(' active', '');
876
+ this.moveBtnDom.removeEventListener('mousemove', () => {});
877
+ this.opts.callback({
878
+ xpos: parseInt(this.disX),
879
+ capcode: this.opts.capcode,
880
+ image_valid_type: 'slide_image'
881
+ });
882
+ }
883
+
884
+ showTips(bool) {
885
+ const obj = {
886
+ true: {
887
+ name: '验证通过',
888
+ color: 'green'
889
+ },
890
+ false: {
891
+ name: '验证不通过',
892
+ color: 'red'
893
+ }
894
+ };
895
+ this.tipDom.innerHTML = obj[bool].name;
896
+ this.tipDom.style.color = obj[bool].color;
897
+ }
898
+
899
+ destory() {
900
+ if (document.querySelector('.slide-container')) {
901
+ document.body.removeChild(document.querySelector('.slide-container'));
902
+ }
903
+ }
904
+
905
+ }
906
+
907
+ /***/ }),
908
+
909
+ /***/ "4a94":
910
+ /***/ (function(module, exports, __webpack_require__) {
911
+
912
+ "use strict";
913
+
914
+
915
+ var utils = __webpack_require__("3d1e");
916
+ var settle = __webpack_require__("2a78");
917
+ var cookies = __webpack_require__("a74f");
918
+ var buildURL = __webpack_require__("85b5");
919
+ var buildFullPath = __webpack_require__("d547");
920
+ var parseHeaders = __webpack_require__("ce40");
921
+ var isURLSameOrigin = __webpack_require__("d5f5");
922
+ var createError = __webpack_require__("6c70");
923
+
924
+ module.exports = function xhrAdapter(config) {
925
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
926
+ var requestData = config.data;
927
+ var requestHeaders = config.headers;
928
+
929
+ if (utils.isFormData(requestData)) {
930
+ delete requestHeaders['Content-Type']; // Let the browser set it
931
+ }
932
+
933
+ if (
934
+ (utils.isBlob(requestData) || utils.isFile(requestData)) &&
935
+ requestData.type
936
+ ) {
937
+ delete requestHeaders['Content-Type']; // Let the browser set it
938
+ }
939
+
940
+ var request = new XMLHttpRequest();
941
+
942
+ // HTTP basic authentication
943
+ if (config.auth) {
944
+ var username = config.auth.username || '';
945
+ var password = unescape(encodeURIComponent(config.auth.password)) || '';
946
+ requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
947
+ }
948
+
949
+ var fullPath = buildFullPath(config.baseURL, config.url);
950
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
951
+
952
+ // Set the request timeout in MS
953
+ request.timeout = config.timeout;
954
+
955
+ // Listen for ready state
956
+ request.onreadystatechange = function handleLoad() {
957
+ if (!request || request.readyState !== 4) {
958
+ return;
959
+ }
960
+
961
+ // The request errored out and we didn't get a response, this will be
962
+ // handled by onerror instead
963
+ // With one exception: request that using file: protocol, most browsers
964
+ // will return status as 0 even though it's a successful request
965
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
966
+ return;
967
+ }
968
+
969
+ // Prepare the response
970
+ var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
971
+ var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
972
+ var response = {
973
+ data: responseData,
974
+ status: request.status,
975
+ statusText: request.statusText,
976
+ headers: responseHeaders,
977
+ config: config,
978
+ request: request
979
+ };
980
+
981
+ settle(resolve, reject, response);
982
+
983
+ // Clean up request
984
+ request = null;
985
+ };
986
+
987
+ // Handle browser request cancellation (as opposed to a manual cancellation)
988
+ request.onabort = function handleAbort() {
989
+ if (!request) {
990
+ return;
991
+ }
992
+
993
+ reject(createError('Request aborted', config, 'ECONNABORTED', request));
994
+
995
+ // Clean up request
996
+ request = null;
997
+ };
998
+
999
+ // Handle low level network errors
1000
+ request.onerror = function handleError() {
1001
+ // Real errors are hidden from us by the browser
1002
+ // onerror should only fire if it's a network error
1003
+ reject(createError('Network Error', config, null, request));
1004
+
1005
+ // Clean up request
1006
+ request = null;
1007
+ };
1008
+
1009
+ // Handle timeout
1010
+ request.ontimeout = function handleTimeout() {
1011
+ var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
1012
+ if (config.timeoutErrorMessage) {
1013
+ timeoutErrorMessage = config.timeoutErrorMessage;
1014
+ }
1015
+ reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
1016
+ request));
1017
+
1018
+ // Clean up request
1019
+ request = null;
1020
+ };
1021
+
1022
+ // Add xsrf header
1023
+ // This is only done if running in a standard browser environment.
1024
+ // Specifically not if we're in a web worker, or react-native.
1025
+ if (utils.isStandardBrowserEnv()) {
1026
+ // Add xsrf header
1027
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
1028
+ cookies.read(config.xsrfCookieName) :
1029
+ undefined;
1030
+
1031
+ if (xsrfValue) {
1032
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
1033
+ }
1034
+ }
1035
+
1036
+ // Add headers to the request
1037
+ if ('setRequestHeader' in request) {
1038
+ utils.forEach(requestHeaders, function setRequestHeader(val, key) {
1039
+ if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
1040
+ // Remove Content-Type if data is undefined
1041
+ delete requestHeaders[key];
1042
+ } else {
1043
+ // Otherwise add header to the request
1044
+ request.setRequestHeader(key, val);
1045
+ }
1046
+ });
1047
+ }
1048
+
1049
+ // Add withCredentials to request if needed
1050
+ if (!utils.isUndefined(config.withCredentials)) {
1051
+ request.withCredentials = !!config.withCredentials;
1052
+ }
1053
+
1054
+ // Add responseType to request if needed
1055
+ if (config.responseType) {
1056
+ try {
1057
+ request.responseType = config.responseType;
1058
+ } catch (e) {
1059
+ // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
1060
+ // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
1061
+ if (config.responseType !== 'json') {
1062
+ throw e;
1063
+ }
1064
+ }
1065
+ }
1066
+
1067
+ // Handle progress if needed
1068
+ if (typeof config.onDownloadProgress === 'function') {
1069
+ request.addEventListener('progress', config.onDownloadProgress);
1070
+ }
1071
+
1072
+ // Not all browsers support upload events
1073
+ if (typeof config.onUploadProgress === 'function' && request.upload) {
1074
+ request.upload.addEventListener('progress', config.onUploadProgress);
1075
+ }
1076
+
1077
+ if (config.cancelToken) {
1078
+ // Handle cancellation
1079
+ config.cancelToken.promise.then(function onCanceled(cancel) {
1080
+ if (!request) {
1081
+ return;
1082
+ }
1083
+
1084
+ request.abort();
1085
+ reject(cancel);
1086
+ // Clean up request
1087
+ request = null;
1088
+ });
1089
+ }
1090
+
1091
+ if (!requestData) {
1092
+ requestData = null;
1093
+ }
1094
+
1095
+ // Send the request
1096
+ request.send(requestData);
1097
+ });
1098
+ };
1099
+
1100
+
1101
+ /***/ }),
1102
+
1103
+ /***/ "50ca":
1104
+ /***/ (function(module, exports, __webpack_require__) {
1105
+
1106
+ "use strict";
1107
+
1108
+
1109
+ var utils = __webpack_require__("3d1e");
1110
+
1111
+ /**
1112
+ * Transform the data for a request or a response
1113
+ *
1114
+ * @param {Object|String} data The data to be transformed
1115
+ * @param {Array} headers The headers for the request or response
1116
+ * @param {Array|Function} fns A single function or Array of functions
1117
+ * @returns {*} The resulting transformed data
1118
+ */
1119
+ module.exports = function transformData(data, headers, fns) {
1120
+ /*eslint no-param-reassign:0*/
1121
+ utils.forEach(fns, function transform(fn) {
1122
+ data = fn(data, headers);
1123
+ });
1124
+
1125
+ return data;
1126
+ };
1127
+
1128
+
1129
+ /***/ }),
1130
+
1131
+ /***/ "5976":
1132
+ /***/ (function(module, exports, __webpack_require__) {
1133
+
1134
+ module.exports = __webpack_require__("cf08");
1135
+
1136
+ /***/ }),
1137
+
1138
+ /***/ "61f6":
1139
+ /***/ (function(module, exports, __webpack_require__) {
1140
+
1141
+ "use strict";
1142
+
1143
+
1144
+ /**
1145
+ * Update an Error with the specified config, error code, and response.
1146
+ *
1147
+ * @param {Error} error The error to update.
1148
+ * @param {Object} config The config.
1149
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
1150
+ * @param {Object} [request] The request.
1151
+ * @param {Object} [response] The response.
1152
+ * @returns {Error} The error.
1153
+ */
1154
+ module.exports = function enhanceError(error, config, code, request, response) {
1155
+ error.config = config;
1156
+ if (code) {
1157
+ error.code = code;
1158
+ }
1159
+
1160
+ error.request = request;
1161
+ error.response = response;
1162
+ error.isAxiosError = true;
1163
+
1164
+ error.toJSON = function toJSON() {
1165
+ return {
1166
+ // Standard
1167
+ message: this.message,
1168
+ name: this.name,
1169
+ // Microsoft
1170
+ description: this.description,
1171
+ number: this.number,
1172
+ // Mozilla
1173
+ fileName: this.fileName,
1174
+ lineNumber: this.lineNumber,
1175
+ columnNumber: this.columnNumber,
1176
+ stack: this.stack,
1177
+ // Axios
1178
+ config: this.config,
1179
+ code: this.code
1180
+ };
1181
+ };
1182
+ return error;
1183
+ };
1184
+
1185
+
1186
+ /***/ }),
1187
+
1188
+ /***/ "6266":
1189
+ /***/ (function(module, exports, __webpack_require__) {
1190
+
1191
+ /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
1192
+ // backported and transplited with Babel, with backwards-compat fixes
1193
+
1194
+ // Copyright Joyent, Inc. and other Node contributors.
1195
+ //
1196
+ // Permission is hereby granted, free of charge, to any person obtaining a
1197
+ // copy of this software and associated documentation files (the
1198
+ // "Software"), to deal in the Software without restriction, including
1199
+ // without limitation the rights to use, copy, modify, merge, publish,
1200
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
1201
+ // persons to whom the Software is furnished to do so, subject to the
1202
+ // following conditions:
1203
+ //
1204
+ // The above copyright notice and this permission notice shall be included
1205
+ // in all copies or substantial portions of the Software.
1206
+ //
1207
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1208
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1209
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
1210
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
1211
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1212
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
1213
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
1214
+
1215
+ // resolves . and .. elements in a path array with directory names there
1216
+ // must be no slashes, empty elements, or device names (c:\) in the array
1217
+ // (so also no leading and trailing slashes - it does not distinguish
1218
+ // relative and absolute paths)
1219
+ function normalizeArray(parts, allowAboveRoot) {
1220
+ // if the path tries to go above the root, `up` ends up > 0
1221
+ var up = 0;
1222
+ for (var i = parts.length - 1; i >= 0; i--) {
1223
+ var last = parts[i];
1224
+ if (last === '.') {
1225
+ parts.splice(i, 1);
1226
+ } else if (last === '..') {
1227
+ parts.splice(i, 1);
1228
+ up++;
1229
+ } else if (up) {
1230
+ parts.splice(i, 1);
1231
+ up--;
1232
+ }
1233
+ }
1234
+
1235
+ // if the path is allowed to go above the root, restore leading ..s
1236
+ if (allowAboveRoot) {
1237
+ for (; up--; up) {
1238
+ parts.unshift('..');
1239
+ }
1240
+ }
1241
+
1242
+ return parts;
1243
+ }
1244
+
1245
+ // path.resolve([from ...], to)
1246
+ // posix version
1247
+ exports.resolve = function() {
1248
+ var resolvedPath = '',
1249
+ resolvedAbsolute = false;
1250
+
1251
+ for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
1252
+ var path = (i >= 0) ? arguments[i] : process.cwd();
1253
+
1254
+ // Skip empty and invalid entries
1255
+ if (typeof path !== 'string') {
1256
+ throw new TypeError('Arguments to path.resolve must be strings');
1257
+ } else if (!path) {
1258
+ continue;
1259
+ }
1260
+
1261
+ resolvedPath = path + '/' + resolvedPath;
1262
+ resolvedAbsolute = path.charAt(0) === '/';
1263
+ }
1264
+
1265
+ // At this point the path should be resolved to a full absolute path, but
1266
+ // handle relative paths to be safe (might happen when process.cwd() fails)
1267
+
1268
+ // Normalize the path
1269
+ resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
1270
+ return !!p;
1271
+ }), !resolvedAbsolute).join('/');
1272
+
1273
+ return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
1274
+ };
1275
+
1276
+ // path.normalize(path)
1277
+ // posix version
1278
+ exports.normalize = function(path) {
1279
+ var isAbsolute = exports.isAbsolute(path),
1280
+ trailingSlash = substr(path, -1) === '/';
1281
+
1282
+ // Normalize the path
1283
+ path = normalizeArray(filter(path.split('/'), function(p) {
1284
+ return !!p;
1285
+ }), !isAbsolute).join('/');
1286
+
1287
+ if (!path && !isAbsolute) {
1288
+ path = '.';
1289
+ }
1290
+ if (path && trailingSlash) {
1291
+ path += '/';
1292
+ }
1293
+
1294
+ return (isAbsolute ? '/' : '') + path;
1295
+ };
1296
+
1297
+ // posix version
1298
+ exports.isAbsolute = function(path) {
1299
+ return path.charAt(0) === '/';
1300
+ };
1301
+
1302
+ // posix version
1303
+ exports.join = function() {
1304
+ var paths = Array.prototype.slice.call(arguments, 0);
1305
+ return exports.normalize(filter(paths, function(p, index) {
1306
+ if (typeof p !== 'string') {
1307
+ throw new TypeError('Arguments to path.join must be strings');
1308
+ }
1309
+ return p;
1310
+ }).join('/'));
1311
+ };
1312
+
1313
+
1314
+ // path.relative(from, to)
1315
+ // posix version
1316
+ exports.relative = function(from, to) {
1317
+ from = exports.resolve(from).substr(1);
1318
+ to = exports.resolve(to).substr(1);
1319
+
1320
+ function trim(arr) {
1321
+ var start = 0;
1322
+ for (; start < arr.length; start++) {
1323
+ if (arr[start] !== '') break;
1324
+ }
1325
+
1326
+ var end = arr.length - 1;
1327
+ for (; end >= 0; end--) {
1328
+ if (arr[end] !== '') break;
1329
+ }
1330
+
1331
+ if (start > end) return [];
1332
+ return arr.slice(start, end - start + 1);
1333
+ }
1334
+
1335
+ var fromParts = trim(from.split('/'));
1336
+ var toParts = trim(to.split('/'));
1337
+
1338
+ var length = Math.min(fromParts.length, toParts.length);
1339
+ var samePartsLength = length;
1340
+ for (var i = 0; i < length; i++) {
1341
+ if (fromParts[i] !== toParts[i]) {
1342
+ samePartsLength = i;
1343
+ break;
1344
+ }
1345
+ }
1346
+
1347
+ var outputParts = [];
1348
+ for (var i = samePartsLength; i < fromParts.length; i++) {
1349
+ outputParts.push('..');
1350
+ }
1351
+
1352
+ outputParts = outputParts.concat(toParts.slice(samePartsLength));
1353
+
1354
+ return outputParts.join('/');
1355
+ };
1356
+
1357
+ exports.sep = '/';
1358
+ exports.delimiter = ':';
1359
+
1360
+ exports.dirname = function (path) {
1361
+ if (typeof path !== 'string') path = path + '';
1362
+ if (path.length === 0) return '.';
1363
+ var code = path.charCodeAt(0);
1364
+ var hasRoot = code === 47 /*/*/;
1365
+ var end = -1;
1366
+ var matchedSlash = true;
1367
+ for (var i = path.length - 1; i >= 1; --i) {
1368
+ code = path.charCodeAt(i);
1369
+ if (code === 47 /*/*/) {
1370
+ if (!matchedSlash) {
1371
+ end = i;
1372
+ break;
1373
+ }
1374
+ } else {
1375
+ // We saw the first non-path separator
1376
+ matchedSlash = false;
1377
+ }
1378
+ }
1379
+
1380
+ if (end === -1) return hasRoot ? '/' : '.';
1381
+ if (hasRoot && end === 1) {
1382
+ // return '//';
1383
+ // Backwards-compat fix:
1384
+ return '/';
1385
+ }
1386
+ return path.slice(0, end);
1387
+ };
1388
+
1389
+ function basename(path) {
1390
+ if (typeof path !== 'string') path = path + '';
1391
+
1392
+ var start = 0;
1393
+ var end = -1;
1394
+ var matchedSlash = true;
1395
+ var i;
1396
+
1397
+ for (i = path.length - 1; i >= 0; --i) {
1398
+ if (path.charCodeAt(i) === 47 /*/*/) {
1399
+ // If we reached a path separator that was not part of a set of path
1400
+ // separators at the end of the string, stop now
1401
+ if (!matchedSlash) {
1402
+ start = i + 1;
1403
+ break;
1404
+ }
1405
+ } else if (end === -1) {
1406
+ // We saw the first non-path separator, mark this as the end of our
1407
+ // path component
1408
+ matchedSlash = false;
1409
+ end = i + 1;
1410
+ }
1411
+ }
1412
+
1413
+ if (end === -1) return '';
1414
+ return path.slice(start, end);
1415
+ }
1416
+
1417
+ // Uses a mixed approach for backwards-compatibility, as ext behavior changed
1418
+ // in new Node.js versions, so only basename() above is backported here
1419
+ exports.basename = function (path, ext) {
1420
+ var f = basename(path);
1421
+ if (ext && f.substr(-1 * ext.length) === ext) {
1422
+ f = f.substr(0, f.length - ext.length);
1423
+ }
1424
+ return f;
1425
+ };
1426
+
1427
+ exports.extname = function (path) {
1428
+ if (typeof path !== 'string') path = path + '';
1429
+ var startDot = -1;
1430
+ var startPart = 0;
1431
+ var end = -1;
1432
+ var matchedSlash = true;
1433
+ // Track the state of characters (if any) we see before our first dot and
1434
+ // after any path separator we find
1435
+ var preDotState = 0;
1436
+ for (var i = path.length - 1; i >= 0; --i) {
1437
+ var code = path.charCodeAt(i);
1438
+ if (code === 47 /*/*/) {
1439
+ // If we reached a path separator that was not part of a set of path
1440
+ // separators at the end of the string, stop now
1441
+ if (!matchedSlash) {
1442
+ startPart = i + 1;
1443
+ break;
1444
+ }
1445
+ continue;
1446
+ }
1447
+ if (end === -1) {
1448
+ // We saw the first non-path separator, mark this as the end of our
1449
+ // extension
1450
+ matchedSlash = false;
1451
+ end = i + 1;
1452
+ }
1453
+ if (code === 46 /*.*/) {
1454
+ // If this is our first dot, mark it as the start of our extension
1455
+ if (startDot === -1)
1456
+ startDot = i;
1457
+ else if (preDotState !== 1)
1458
+ preDotState = 1;
1459
+ } else if (startDot !== -1) {
1460
+ // We saw a non-dot and non-path separator before our dot, so we should
1461
+ // have a good chance at having a non-empty extension
1462
+ preDotState = -1;
1463
+ }
1464
+ }
1465
+
1466
+ if (startDot === -1 || end === -1 ||
1467
+ // We saw a non-dot character immediately before the dot
1468
+ preDotState === 0 ||
1469
+ // The (right-most) trimmed path component is exactly '..'
1470
+ preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
1471
+ return '';
1472
+ }
1473
+ return path.slice(startDot, end);
1474
+ };
1475
+
1476
+ function filter (xs, f) {
1477
+ if (xs.filter) return xs.filter(f);
1478
+ var res = [];
1479
+ for (var i = 0; i < xs.length; i++) {
1480
+ if (f(xs[i], i, xs)) res.push(xs[i]);
1481
+ }
1482
+ return res;
1483
+ }
1484
+
1485
+ // String.prototype.substr - negative index don't work in IE8
1486
+ var substr = 'ab'.substr(-1) === 'b'
1487
+ ? function (str, start, len) { return str.substr(start, len) }
1488
+ : function (str, start, len) {
1489
+ if (start < 0) start = str.length + start;
1490
+ return str.substr(start, len);
1491
+ }
1492
+ ;
1493
+
1494
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("eef6")))
1495
+
1496
+ /***/ }),
1497
+
1498
+ /***/ "6c70":
1499
+ /***/ (function(module, exports, __webpack_require__) {
1500
+
1501
+ "use strict";
1502
+
1503
+
1504
+ var enhanceError = __webpack_require__("61f6");
1505
+
1506
+ /**
1507
+ * Create an Error with the specified message, config, error code, request and response.
1508
+ *
1509
+ * @param {string} message The error message.
1510
+ * @param {Object} config The config.
1511
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
1512
+ * @param {Object} [request] The request.
1513
+ * @param {Object} [response] The response.
1514
+ * @returns {Error} The created error.
1515
+ */
1516
+ module.exports = function createError(message, config, code, request, response) {
1517
+ var error = new Error(message);
1518
+ return enhanceError(error, config, code, request, response);
1519
+ };
1520
+
1521
+
1522
+ /***/ }),
1523
+
1524
+ /***/ "85b5":
1525
+ /***/ (function(module, exports, __webpack_require__) {
1526
+
1527
+ "use strict";
1528
+
1529
+
1530
+ var utils = __webpack_require__("3d1e");
1531
+
1532
+ function encode(val) {
1533
+ return encodeURIComponent(val).
1534
+ replace(/%3A/gi, ':').
1535
+ replace(/%24/g, '$').
1536
+ replace(/%2C/gi, ',').
1537
+ replace(/%20/g, '+').
1538
+ replace(/%5B/gi, '[').
1539
+ replace(/%5D/gi, ']');
1540
+ }
1541
+
1542
+ /**
1543
+ * Build a URL by appending params to the end
1544
+ *
1545
+ * @param {string} url The base of the url (e.g., http://www.google.com)
1546
+ * @param {object} [params] The params to be appended
1547
+ * @returns {string} The formatted url
1548
+ */
1549
+ module.exports = function buildURL(url, params, paramsSerializer) {
1550
+ /*eslint no-param-reassign:0*/
1551
+ if (!params) {
1552
+ return url;
1553
+ }
1554
+
1555
+ var serializedParams;
1556
+ if (paramsSerializer) {
1557
+ serializedParams = paramsSerializer(params);
1558
+ } else if (utils.isURLSearchParams(params)) {
1559
+ serializedParams = params.toString();
1560
+ } else {
1561
+ var parts = [];
1562
+
1563
+ utils.forEach(params, function serialize(val, key) {
1564
+ if (val === null || typeof val === 'undefined') {
1565
+ return;
1566
+ }
1567
+
1568
+ if (utils.isArray(val)) {
1569
+ key = key + '[]';
1570
+ } else {
1571
+ val = [val];
1572
+ }
1573
+
1574
+ utils.forEach(val, function parseValue(v) {
1575
+ if (utils.isDate(v)) {
1576
+ v = v.toISOString();
1577
+ } else if (utils.isObject(v)) {
1578
+ v = JSON.stringify(v);
1579
+ }
1580
+ parts.push(encode(key) + '=' + encode(v));
1581
+ });
1582
+ });
1583
+
1584
+ serializedParams = parts.join('&');
1585
+ }
1586
+
1587
+ if (serializedParams) {
1588
+ var hashmarkIndex = url.indexOf('#');
1589
+ if (hashmarkIndex !== -1) {
1590
+ url = url.slice(0, hashmarkIndex);
1591
+ }
1592
+
1593
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1594
+ }
1595
+
1596
+ return url;
1597
+ };
1598
+
1599
+
1600
+ /***/ }),
1601
+
1602
+ /***/ "9147":
1603
+ /***/ (function(module, exports, __webpack_require__) {
1604
+
1605
+ "use strict";
1606
+
1607
+
1608
+ /**
1609
+ * A `Cancel` is an object that is thrown when an operation is canceled.
1610
+ *
1611
+ * @class
1612
+ * @param {string=} message The message.
1613
+ */
1614
+ function Cancel(message) {
1615
+ this.message = message;
1616
+ }
1617
+
1618
+ Cancel.prototype.toString = function toString() {
1619
+ return 'Cancel' + (this.message ? ': ' + this.message : '');
1620
+ };
1621
+
1622
+ Cancel.prototype.__CANCEL__ = true;
1623
+
1624
+ module.exports = Cancel;
1625
+
1626
+
1627
+ /***/ }),
1628
+
1629
+ /***/ "9e42":
1630
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1631
+
1632
+ "use strict";
1633
+ __webpack_require__.r(__webpack_exports__);
1634
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SlideCode; });
1635
+ class SlideCode {
1636
+ constructor(options) {
1637
+ const defaults = {
1638
+ frontimg: '',
1639
+ backimg: '',
1640
+ callback: '',
1641
+ refreshcallback: '',
1642
+ yHeight: 1
1643
+ };
1644
+ this.opts = { ...defaults,
1645
+ ...options
1646
+ };
1647
+ this.offset = {
1648
+ x: 0,
1649
+ y: 0
1650
+ };
1651
+ this.disX = 0;
1652
+ this.moving = false;
1653
+ this.init();
1654
+ }
1655
+
1656
+ init() {
1657
+ const html = `
1658
+ <div class="code-k-div">
1659
+ <div class="code_bg"></div>
1660
+ <div class="code-con">
1661
+ <div class="code-img">
1662
+ <div class="code-img-con">
1663
+ <div class="code-mask" style="margin-top:${this.opts.yHeight}px"><img class="code-front-img" src="${this.opts.frontimg}"></div>
1664
+ <img class="code-back-img" src="${this.opts.backimg}">
1665
+ </div>
1666
+ <div class="code-push"><i class="icon-login-bg icon-w-25 icon-push">刷新</i><span class="code-tip"></span></div>
1667
+ </div>
1668
+ <div class="code-btn">
1669
+ <div class="code-btn-img code-btn-m"></div>
1670
+ <span class="code-span">按住滑块,拖动完成上方拼图</span>
1671
+ </div>
1672
+ </div>
1673
+ </div>`;
1674
+ this.destory();
1675
+ const div = document.createElement('div');
1676
+ div.className = 'slide-container';
1677
+ div.innerHTML = html;
1678
+ document.body.appendChild(div);
1679
+ this.maskDom = document.querySelector('.code-mask');
1680
+ this.moveBtnDom = document.querySelector('.code-btn-m');
1681
+ this.moveWrapDom = document.querySelector('.code-btn');
1682
+ this.refreshDom = document.querySelector('.code-push');
1683
+ this.tipDom = document.querySelector('.code-tip');
1684
+ this.bgDom = document.querySelector('.code_bg');
1685
+ this.body = document.body;
1686
+ this.initEvent();
1687
+ }
1688
+
1689
+ initEvent() {
1690
+ this.refreshDom.addEventListener('click', () => {
1691
+ this.opts.refreshcallback();
1692
+ });
1693
+ this.moveBtnDom.addEventListener('mousedown', event => {
1694
+ const e = event || window.event;
1695
+ this.offset = {
1696
+ x: e.pageX,
1697
+ y: e.pageY
1698
+ };
1699
+ this.moving = true;
1700
+ this.moveBtnDom.className += ' active';
1701
+ });
1702
+ this.body.addEventListener('mousemove', event => {
1703
+ if (!this.moving) {
1704
+ return;
1705
+ }
1706
+
1707
+ const e = event || window.event;
1708
+ let disX = e.pageX - this.offset.x;
1709
+
1710
+ if (disX < 0) {
1711
+ disX = 0;
1712
+ } else if (disX > 245) {
1713
+ disX = 245;
1714
+ }
1715
+
1716
+ this.disX = disX;
1717
+ this.moveBtnDom.style.left = `${disX + 10}px`;
1718
+ this.maskDom.style.left = `${disX}px`;
1719
+ });
1720
+ this.body.addEventListener('mouseup', event => {
1721
+ this.moveEnd(event);
1722
+ }); // this.moveWrapDom.addEventListener('mouseleave', (event) => {
1723
+ // this.moveEnd(event);
1724
+ // });
1725
+
1726
+ this.bgDom.addEventListener('click', () => {
1727
+ if (this.moving) {
1728
+ return;
1729
+ }
1730
+
1731
+ this.destory();
1732
+ });
1733
+ }
1734
+
1735
+ moveEnd() {
1736
+ if (!this.moving) {
1737
+ return;
1738
+ }
1739
+
1740
+ this.offset = {
1741
+ x: 0,
1742
+ y: 0
1743
+ };
1744
+ this.moving = false;
1745
+ this.moveBtnDom.className = this.moveBtnDom.className.replace(' active', '');
1746
+ this.moveBtnDom.removeEventListener('mousemove', () => {});
1747
+ this.opts.callback({
1748
+ xpos: parseInt(this.disX),
1749
+ capcode: this.opts.capcode,
1750
+ image_valid_type: 'slide_image'
1751
+ });
1752
+ }
1753
+
1754
+ showTips(bool) {
1755
+ const obj = {
1756
+ true: {
1757
+ name: '验证通过',
1758
+ color: 'green'
1759
+ },
1760
+ false: {
1761
+ name: '验证不通过',
1762
+ color: 'red'
1763
+ }
1764
+ };
1765
+ this.tipDom.innerHTML = obj[bool].name;
1766
+ this.tipDom.style.color = obj[bool].color;
1767
+ }
1768
+
1769
+ destory() {
1770
+ if (document.querySelector('.slide-container')) {
1771
+ document.body.removeChild(document.querySelector('.slide-container'));
1772
+ }
1773
+ }
1774
+
1775
+ }
1776
+
1777
+ /***/ }),
1778
+
1779
+ /***/ "9f97":
1780
+ /***/ (function(module, exports, __webpack_require__) {
1781
+
1782
+ "use strict";
1783
+
1784
+
1785
+ var utils = __webpack_require__("3d1e");
1786
+
1787
+ /**
1788
+ * Config-specific merge-function which creates a new config-object
1789
+ * by merging two configuration objects together.
1790
+ *
1791
+ * @param {Object} config1
1792
+ * @param {Object} config2
1793
+ * @returns {Object} New object resulting from merging config2 to config1
1794
+ */
1795
+ module.exports = function mergeConfig(config1, config2) {
1796
+ // eslint-disable-next-line no-param-reassign
1797
+ config2 = config2 || {};
1798
+ var config = {};
1799
+
1800
+ var valueFromConfig2Keys = ['url', 'method', 'data'];
1801
+ var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
1802
+ var defaultToConfig2Keys = [
1803
+ 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
1804
+ 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
1805
+ 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
1806
+ 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
1807
+ 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
1808
+ ];
1809
+ var directMergeKeys = ['validateStatus'];
1810
+
1811
+ function getMergedValue(target, source) {
1812
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
1813
+ return utils.merge(target, source);
1814
+ } else if (utils.isPlainObject(source)) {
1815
+ return utils.merge({}, source);
1816
+ } else if (utils.isArray(source)) {
1817
+ return source.slice();
1818
+ }
1819
+ return source;
1820
+ }
1821
+
1822
+ function mergeDeepProperties(prop) {
1823
+ if (!utils.isUndefined(config2[prop])) {
1824
+ config[prop] = getMergedValue(config1[prop], config2[prop]);
1825
+ } else if (!utils.isUndefined(config1[prop])) {
1826
+ config[prop] = getMergedValue(undefined, config1[prop]);
1827
+ }
1828
+ }
1829
+
1830
+ utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
1831
+ if (!utils.isUndefined(config2[prop])) {
1832
+ config[prop] = getMergedValue(undefined, config2[prop]);
1833
+ }
1834
+ });
1835
+
1836
+ utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
1837
+
1838
+ utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
1839
+ if (!utils.isUndefined(config2[prop])) {
1840
+ config[prop] = getMergedValue(undefined, config2[prop]);
1841
+ } else if (!utils.isUndefined(config1[prop])) {
1842
+ config[prop] = getMergedValue(undefined, config1[prop]);
1843
+ }
1844
+ });
1845
+
1846
+ utils.forEach(directMergeKeys, function merge(prop) {
1847
+ if (prop in config2) {
1848
+ config[prop] = getMergedValue(config1[prop], config2[prop]);
1849
+ } else if (prop in config1) {
1850
+ config[prop] = getMergedValue(undefined, config1[prop]);
1851
+ }
1852
+ });
1853
+
1854
+ var axiosKeys = valueFromConfig2Keys
1855
+ .concat(mergeDeepPropertiesKeys)
1856
+ .concat(defaultToConfig2Keys)
1857
+ .concat(directMergeKeys);
1858
+
1859
+ var otherKeys = Object
1860
+ .keys(config1)
1861
+ .concat(Object.keys(config2))
1862
+ .filter(function filterAxiosKeys(key) {
1863
+ return axiosKeys.indexOf(key) === -1;
1864
+ });
1865
+
1866
+ utils.forEach(otherKeys, mergeDeepProperties);
1867
+
1868
+ return config;
1869
+ };
1870
+
1871
+
1872
+ /***/ }),
1873
+
1874
+ /***/ "a620":
1875
+ /***/ (function(module, exports, __webpack_require__) {
1876
+
1877
+ "use strict";
1878
+
1879
+
1880
+ var Cancel = __webpack_require__("9147");
1881
+
1882
+ /**
1883
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
1884
+ *
1885
+ * @class
1886
+ * @param {Function} executor The executor function.
1887
+ */
1888
+ function CancelToken(executor) {
1889
+ if (typeof executor !== 'function') {
1890
+ throw new TypeError('executor must be a function.');
1891
+ }
1892
+
1893
+ var resolvePromise;
1894
+ this.promise = new Promise(function promiseExecutor(resolve) {
1895
+ resolvePromise = resolve;
1896
+ });
1897
+
1898
+ var token = this;
1899
+ executor(function cancel(message) {
1900
+ if (token.reason) {
1901
+ // Cancellation has already been requested
1902
+ return;
1903
+ }
1904
+
1905
+ token.reason = new Cancel(message);
1906
+ resolvePromise(token.reason);
1907
+ });
1908
+ }
1909
+
1910
+ /**
1911
+ * Throws a `Cancel` if cancellation has been requested.
1912
+ */
1913
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
1914
+ if (this.reason) {
1915
+ throw this.reason;
1916
+ }
1917
+ };
1918
+
1919
+ /**
1920
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1921
+ * cancels the `CancelToken`.
1922
+ */
1923
+ CancelToken.source = function source() {
1924
+ var cancel;
1925
+ var token = new CancelToken(function executor(c) {
1926
+ cancel = c;
1927
+ });
1928
+ return {
1929
+ token: token,
1930
+ cancel: cancel
1931
+ };
1932
+ };
1933
+
1934
+ module.exports = CancelToken;
1935
+
1936
+
1937
+ /***/ }),
1938
+
1939
+ /***/ "a74f":
1940
+ /***/ (function(module, exports, __webpack_require__) {
1941
+
1942
+ "use strict";
1943
+
1944
+
1945
+ var utils = __webpack_require__("3d1e");
1946
+
1947
+ module.exports = (
1948
+ utils.isStandardBrowserEnv() ?
1949
+
1950
+ // Standard browser envs support document.cookie
1951
+ (function standardBrowserEnv() {
1952
+ return {
1953
+ write: function write(name, value, expires, path, domain, secure) {
1954
+ var cookie = [];
1955
+ cookie.push(name + '=' + encodeURIComponent(value));
1956
+
1957
+ if (utils.isNumber(expires)) {
1958
+ cookie.push('expires=' + new Date(expires).toGMTString());
1959
+ }
1960
+
1961
+ if (utils.isString(path)) {
1962
+ cookie.push('path=' + path);
1963
+ }
1964
+
1965
+ if (utils.isString(domain)) {
1966
+ cookie.push('domain=' + domain);
1967
+ }
1968
+
1969
+ if (secure === true) {
1970
+ cookie.push('secure');
1971
+ }
1972
+
1973
+ document.cookie = cookie.join('; ');
1974
+ },
1975
+
1976
+ read: function read(name) {
1977
+ var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1978
+ return (match ? decodeURIComponent(match[3]) : null);
1979
+ },
1980
+
1981
+ remove: function remove(name) {
1982
+ this.write(name, '', Date.now() - 86400000);
1983
+ }
1984
+ };
1985
+ })() :
1986
+
1987
+ // Non standard browser env (web workers, react-native) lack needed support.
1988
+ (function nonStandardBrowserEnv() {
1989
+ return {
1990
+ write: function write() {},
1991
+ read: function read() { return null; },
1992
+ remove: function remove() {}
1993
+ };
1994
+ })()
1995
+ );
1996
+
1997
+
1998
+ /***/ }),
1999
+
2000
+ /***/ "ab31":
2001
+ /***/ (function(module, exports, __webpack_require__) {
2002
+
2003
+ "use strict";
2004
+
2005
+
2006
+ var utils = __webpack_require__("3d1e");
2007
+ var transformData = __webpack_require__("50ca");
2008
+ var isCancel = __webpack_require__("af9d");
2009
+ var defaults = __webpack_require__("fb04");
2010
+
2011
+ /**
2012
+ * Throws a `Cancel` if cancellation has been requested.
2013
+ */
2014
+ function throwIfCancellationRequested(config) {
2015
+ if (config.cancelToken) {
2016
+ config.cancelToken.throwIfRequested();
2017
+ }
2018
+ }
2019
+
2020
+ /**
2021
+ * Dispatch a request to the server using the configured adapter.
2022
+ *
2023
+ * @param {object} config The config that is to be used for the request
2024
+ * @returns {Promise} The Promise to be fulfilled
2025
+ */
2026
+ module.exports = function dispatchRequest(config) {
2027
+ throwIfCancellationRequested(config);
2028
+
2029
+ // Ensure headers exist
2030
+ config.headers = config.headers || {};
2031
+
2032
+ // Transform request data
2033
+ config.data = transformData(
2034
+ config.data,
2035
+ config.headers,
2036
+ config.transformRequest
2037
+ );
2038
+
2039
+ // Flatten headers
2040
+ config.headers = utils.merge(
2041
+ config.headers.common || {},
2042
+ config.headers[config.method] || {},
2043
+ config.headers
2044
+ );
2045
+
2046
+ utils.forEach(
2047
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
2048
+ function cleanHeaderConfig(method) {
2049
+ delete config.headers[method];
2050
+ }
2051
+ );
2052
+
2053
+ var adapter = config.adapter || defaults.adapter;
2054
+
2055
+ return adapter(config).then(function onAdapterResolution(response) {
2056
+ throwIfCancellationRequested(config);
2057
+
2058
+ // Transform response data
2059
+ response.data = transformData(
2060
+ response.data,
2061
+ response.headers,
2062
+ config.transformResponse
2063
+ );
2064
+
2065
+ return response;
2066
+ }, function onAdapterRejection(reason) {
2067
+ if (!isCancel(reason)) {
2068
+ throwIfCancellationRequested(config);
2069
+
2070
+ // Transform response data
2071
+ if (reason && reason.response) {
2072
+ reason.response.data = transformData(
2073
+ reason.response.data,
2074
+ reason.response.headers,
2075
+ config.transformResponse
2076
+ );
2077
+ }
2078
+ }
2079
+
2080
+ return Promise.reject(reason);
2081
+ });
2082
+ };
2083
+
2084
+
2085
+ /***/ }),
2086
+
2087
+ /***/ "af9d":
2088
+ /***/ (function(module, exports, __webpack_require__) {
2089
+
2090
+ "use strict";
2091
+
2092
+
2093
+ module.exports = function isCancel(value) {
2094
+ return !!(value && value.__CANCEL__);
2095
+ };
2096
+
2097
+
2098
+ /***/ }),
2099
+
2100
+ /***/ "cdfd":
2101
+ /***/ (function(module, exports, __webpack_require__) {
2102
+
2103
+ // extracted by mini-css-extract-plugin
2104
+
2105
+ /***/ }),
2106
+
2107
+ /***/ "ce40":
2108
+ /***/ (function(module, exports, __webpack_require__) {
2109
+
2110
+ "use strict";
2111
+
2112
+
2113
+ var utils = __webpack_require__("3d1e");
2114
+
2115
+ // Headers whose duplicates are ignored by node
2116
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
2117
+ var ignoreDuplicateOf = [
2118
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
2119
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
2120
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
2121
+ 'referer', 'retry-after', 'user-agent'
2122
+ ];
2123
+
2124
+ /**
2125
+ * Parse headers into an object
2126
+ *
2127
+ * ```
2128
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
2129
+ * Content-Type: application/json
2130
+ * Connection: keep-alive
2131
+ * Transfer-Encoding: chunked
2132
+ * ```
2133
+ *
2134
+ * @param {String} headers Headers needing to be parsed
2135
+ * @returns {Object} Headers parsed into an object
2136
+ */
2137
+ module.exports = function parseHeaders(headers) {
2138
+ var parsed = {};
2139
+ var key;
2140
+ var val;
2141
+ var i;
2142
+
2143
+ if (!headers) { return parsed; }
2144
+
2145
+ utils.forEach(headers.split('\n'), function parser(line) {
2146
+ i = line.indexOf(':');
2147
+ key = utils.trim(line.substr(0, i)).toLowerCase();
2148
+ val = utils.trim(line.substr(i + 1));
2149
+
2150
+ if (key) {
2151
+ if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
2152
+ return;
2153
+ }
2154
+ if (key === 'set-cookie') {
2155
+ parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
2156
+ } else {
2157
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
2158
+ }
2159
+ }
2160
+ });
2161
+
2162
+ return parsed;
2163
+ };
2164
+
2165
+
2166
+ /***/ }),
2167
+
2168
+ /***/ "cf08":
2169
+ /***/ (function(module, exports, __webpack_require__) {
2170
+
2171
+ "use strict";
2172
+
2173
+
2174
+ var utils = __webpack_require__("3d1e");
2175
+ var bind = __webpack_require__("efe0");
2176
+ var Axios = __webpack_require__("0997");
2177
+ var mergeConfig = __webpack_require__("9f97");
2178
+ var defaults = __webpack_require__("fb04");
2179
+
2180
+ /**
2181
+ * Create an instance of Axios
2182
+ *
2183
+ * @param {Object} defaultConfig The default config for the instance
2184
+ * @return {Axios} A new instance of Axios
2185
+ */
2186
+ function createInstance(defaultConfig) {
2187
+ var context = new Axios(defaultConfig);
2188
+ var instance = bind(Axios.prototype.request, context);
2189
+
2190
+ // Copy axios.prototype to instance
2191
+ utils.extend(instance, Axios.prototype, context);
2192
+
2193
+ // Copy context to instance
2194
+ utils.extend(instance, context);
2195
+
2196
+ return instance;
2197
+ }
2198
+
2199
+ // Create the default instance to be exported
2200
+ var axios = createInstance(defaults);
2201
+
2202
+ // Expose Axios class to allow class inheritance
2203
+ axios.Axios = Axios;
2204
+
2205
+ // Factory for creating new instances
2206
+ axios.create = function create(instanceConfig) {
2207
+ return createInstance(mergeConfig(axios.defaults, instanceConfig));
2208
+ };
2209
+
2210
+ // Expose Cancel & CancelToken
2211
+ axios.Cancel = __webpack_require__("9147");
2212
+ axios.CancelToken = __webpack_require__("a620");
2213
+ axios.isCancel = __webpack_require__("af9d");
2214
+
2215
+ // Expose all/spread
2216
+ axios.all = function all(promises) {
2217
+ return Promise.all(promises);
2218
+ };
2219
+ axios.spread = __webpack_require__("ee08");
2220
+
2221
+ module.exports = axios;
2222
+
2223
+ // Allow use of default import syntax in TypeScript
2224
+ module.exports.default = axios;
2225
+
2226
+
2227
+ /***/ }),
2228
+
2229
+ /***/ "d547":
2230
+ /***/ (function(module, exports, __webpack_require__) {
2231
+
2232
+ "use strict";
2233
+
2234
+
2235
+ var isAbsoluteURL = __webpack_require__("da4a");
2236
+ var combineURLs = __webpack_require__("26af");
2237
+
2238
+ /**
2239
+ * Creates a new URL by combining the baseURL with the requestedURL,
2240
+ * only when the requestedURL is not already an absolute URL.
2241
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
2242
+ *
2243
+ * @param {string} baseURL The base URL
2244
+ * @param {string} requestedURL Absolute or relative URL to combine
2245
+ * @returns {string} The combined full path
2246
+ */
2247
+ module.exports = function buildFullPath(baseURL, requestedURL) {
2248
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
2249
+ return combineURLs(baseURL, requestedURL);
2250
+ }
2251
+ return requestedURL;
2252
+ };
2253
+
2254
+
2255
+ /***/ }),
2256
+
2257
+ /***/ "d5f5":
2258
+ /***/ (function(module, exports, __webpack_require__) {
2259
+
2260
+ "use strict";
2261
+
2262
+
2263
+ var utils = __webpack_require__("3d1e");
2264
+
2265
+ module.exports = (
2266
+ utils.isStandardBrowserEnv() ?
2267
+
2268
+ // Standard browser envs have full support of the APIs needed to test
2269
+ // whether the request URL is of the same origin as current location.
2270
+ (function standardBrowserEnv() {
2271
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
2272
+ var urlParsingNode = document.createElement('a');
2273
+ var originURL;
2274
+
2275
+ /**
2276
+ * Parse a URL to discover it's components
2277
+ *
2278
+ * @param {String} url The URL to be parsed
2279
+ * @returns {Object}
2280
+ */
2281
+ function resolveURL(url) {
2282
+ var href = url;
2283
+
2284
+ if (msie) {
2285
+ // IE needs attribute set twice to normalize properties
2286
+ urlParsingNode.setAttribute('href', href);
2287
+ href = urlParsingNode.href;
2288
+ }
2289
+
2290
+ urlParsingNode.setAttribute('href', href);
2291
+
2292
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
2293
+ return {
2294
+ href: urlParsingNode.href,
2295
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
2296
+ host: urlParsingNode.host,
2297
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
2298
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
2299
+ hostname: urlParsingNode.hostname,
2300
+ port: urlParsingNode.port,
2301
+ pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
2302
+ urlParsingNode.pathname :
2303
+ '/' + urlParsingNode.pathname
2304
+ };
2305
+ }
2306
+
2307
+ originURL = resolveURL(window.location.href);
2308
+
2309
+ /**
2310
+ * Determine if a URL shares the same origin as the current location
2311
+ *
2312
+ * @param {String} requestURL The URL to test
2313
+ * @returns {boolean} True if URL shares the same origin, otherwise false
2314
+ */
2315
+ return function isURLSameOrigin(requestURL) {
2316
+ var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2317
+ return (parsed.protocol === originURL.protocol &&
2318
+ parsed.host === originURL.host);
2319
+ };
2320
+ })() :
2321
+
2322
+ // Non standard browser envs (web workers, react-native) lack needed support.
2323
+ (function nonStandardBrowserEnv() {
2324
+ return function isURLSameOrigin() {
2325
+ return true;
2326
+ };
2327
+ })()
2328
+ );
2329
+
2330
+
2331
+ /***/ }),
2332
+
2333
+ /***/ "da4a":
2334
+ /***/ (function(module, exports, __webpack_require__) {
2335
+
2336
+ "use strict";
2337
+
2338
+
2339
+ /**
2340
+ * Determines whether the specified URL is absolute
2341
+ *
2342
+ * @param {string} url The URL to test
2343
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
2344
+ */
2345
+ module.exports = function isAbsoluteURL(url) {
2346
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2347
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2348
+ // by any combination of letters, digits, plus, period, or hyphen.
2349
+ return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
2350
+ };
2351
+
2352
+
2353
+ /***/ }),
2354
+
2355
+ /***/ "ee08":
2356
+ /***/ (function(module, exports, __webpack_require__) {
2357
+
2358
+ "use strict";
2359
+
2360
+
2361
+ /**
2362
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
2363
+ *
2364
+ * Common use case would be to use `Function.prototype.apply`.
2365
+ *
2366
+ * ```js
2367
+ * function f(x, y, z) {}
2368
+ * var args = [1, 2, 3];
2369
+ * f.apply(null, args);
2370
+ * ```
2371
+ *
2372
+ * With `spread` this example can be re-written.
2373
+ *
2374
+ * ```js
2375
+ * spread(function(x, y, z) {})([1, 2, 3]);
2376
+ * ```
2377
+ *
2378
+ * @param {Function} callback
2379
+ * @returns {Function}
2380
+ */
2381
+ module.exports = function spread(callback) {
2382
+ return function wrap(arr) {
2383
+ return callback.apply(null, arr);
2384
+ };
2385
+ };
2386
+
2387
+
2388
+ /***/ }),
2389
+
2390
+ /***/ "eef6":
2391
+ /***/ (function(module, exports, __webpack_require__) {
2392
+
2393
+ exports.nextTick = function nextTick(fn) {
2394
+ var args = Array.prototype.slice.call(arguments);
2395
+ args.shift();
2396
+ setTimeout(function () {
2397
+ fn.apply(null, args);
2398
+ }, 0);
2399
+ };
2400
+
2401
+ exports.platform = exports.arch =
2402
+ exports.execPath = exports.title = 'browser';
2403
+ exports.pid = 1;
2404
+ exports.browser = true;
2405
+ exports.env = {};
2406
+ exports.argv = [];
2407
+
2408
+ exports.binding = function (name) {
2409
+ throw new Error('No such module. (Possibly not yet loaded)')
2410
+ };
2411
+
2412
+ (function () {
2413
+ var cwd = '/';
2414
+ var path;
2415
+ exports.cwd = function () { return cwd };
2416
+ exports.chdir = function (dir) {
2417
+ if (!path) path = __webpack_require__("6266");
2418
+ cwd = path.resolve(dir, cwd);
2419
+ };
2420
+ })();
2421
+
2422
+ exports.exit = exports.kill =
2423
+ exports.umask = exports.dlopen =
2424
+ exports.uptime = exports.memoryUsage =
2425
+ exports.uvCounters = function() {};
2426
+ exports.features = {};
2427
+
2428
+
2429
+ /***/ }),
2430
+
2431
+ /***/ "efe0":
2432
+ /***/ (function(module, exports, __webpack_require__) {
2433
+
2434
+ "use strict";
2435
+
2436
+
2437
+ module.exports = function bind(fn, thisArg) {
2438
+ return function wrap() {
2439
+ var args = new Array(arguments.length);
2440
+ for (var i = 0; i < args.length; i++) {
2441
+ args[i] = arguments[i];
2442
+ }
2443
+ return fn.apply(thisArg, args);
2444
+ };
2445
+ };
2446
+
2447
+
2448
+ /***/ }),
2449
+
2450
+ /***/ "f80f":
2451
+ /***/ (function(module, exports, __webpack_require__) {
2452
+
2453
+ "use strict";
2454
+
2455
+
2456
+ var utils = __webpack_require__("3d1e");
2457
+
2458
+ function InterceptorManager() {
2459
+ this.handlers = [];
2460
+ }
2461
+
2462
+ /**
2463
+ * Add a new interceptor to the stack
2464
+ *
2465
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
2466
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
2467
+ *
2468
+ * @return {Number} An ID used to remove interceptor later
2469
+ */
2470
+ InterceptorManager.prototype.use = function use(fulfilled, rejected) {
2471
+ this.handlers.push({
2472
+ fulfilled: fulfilled,
2473
+ rejected: rejected
2474
+ });
2475
+ return this.handlers.length - 1;
2476
+ };
2477
+
2478
+ /**
2479
+ * Remove an interceptor from the stack
2480
+ *
2481
+ * @param {Number} id The ID that was returned by `use`
2482
+ */
2483
+ InterceptorManager.prototype.eject = function eject(id) {
2484
+ if (this.handlers[id]) {
2485
+ this.handlers[id] = null;
2486
+ }
2487
+ };
2488
+
2489
+ /**
2490
+ * Iterate over all the registered interceptors
2491
+ *
2492
+ * This method is particularly useful for skipping over any
2493
+ * interceptors that may have become `null` calling `eject`.
2494
+ *
2495
+ * @param {Function} fn The function to call for each interceptor
2496
+ */
2497
+ InterceptorManager.prototype.forEach = function forEach(fn) {
2498
+ utils.forEach(this.handlers, function forEachHandler(h) {
2499
+ if (h !== null) {
2500
+ fn(h);
2501
+ }
2502
+ });
2503
+ };
2504
+
2505
+ module.exports = InterceptorManager;
2506
+
2507
+
2508
+ /***/ }),
2509
+
2510
+ /***/ "fb04":
2511
+ /***/ (function(module, exports, __webpack_require__) {
2512
+
2513
+ "use strict";
2514
+ /* WEBPACK VAR INJECTION */(function(process) {
2515
+
2516
+ var utils = __webpack_require__("3d1e");
2517
+ var normalizeHeaderName = __webpack_require__("0cc7");
2518
+
2519
+ var DEFAULT_CONTENT_TYPE = {
2520
+ 'Content-Type': 'application/x-www-form-urlencoded'
2521
+ };
2522
+
2523
+ function setContentTypeIfUnset(headers, value) {
2524
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
2525
+ headers['Content-Type'] = value;
2526
+ }
2527
+ }
2528
+
2529
+ function getDefaultAdapter() {
2530
+ var adapter;
2531
+ if (typeof XMLHttpRequest !== 'undefined') {
2532
+ // For browsers use XHR adapter
2533
+ adapter = __webpack_require__("4a94");
2534
+ } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
2535
+ // For node use HTTP adapter
2536
+ adapter = __webpack_require__("4a94");
2537
+ }
2538
+ return adapter;
2539
+ }
2540
+
2541
+ var defaults = {
2542
+ adapter: getDefaultAdapter(),
2543
+
2544
+ transformRequest: [function transformRequest(data, headers) {
2545
+ normalizeHeaderName(headers, 'Accept');
2546
+ normalizeHeaderName(headers, 'Content-Type');
2547
+ if (utils.isFormData(data) ||
2548
+ utils.isArrayBuffer(data) ||
2549
+ utils.isBuffer(data) ||
2550
+ utils.isStream(data) ||
2551
+ utils.isFile(data) ||
2552
+ utils.isBlob(data)
2553
+ ) {
2554
+ return data;
2555
+ }
2556
+ if (utils.isArrayBufferView(data)) {
2557
+ return data.buffer;
2558
+ }
2559
+ if (utils.isURLSearchParams(data)) {
2560
+ setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
2561
+ return data.toString();
2562
+ }
2563
+ if (utils.isObject(data)) {
2564
+ setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
2565
+ return JSON.stringify(data);
2566
+ }
2567
+ return data;
2568
+ }],
2569
+
2570
+ transformResponse: [function transformResponse(data) {
2571
+ /*eslint no-param-reassign:0*/
2572
+ if (typeof data === 'string') {
2573
+ try {
2574
+ data = JSON.parse(data);
2575
+ } catch (e) { /* Ignore */ }
2576
+ }
2577
+ return data;
2578
+ }],
2579
+
2580
+ /**
2581
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
2582
+ * timeout is not created.
2583
+ */
2584
+ timeout: 0,
2585
+
2586
+ xsrfCookieName: 'XSRF-TOKEN',
2587
+ xsrfHeaderName: 'X-XSRF-TOKEN',
2588
+
2589
+ maxContentLength: -1,
2590
+ maxBodyLength: -1,
2591
+
2592
+ validateStatus: function validateStatus(status) {
2593
+ return status >= 200 && status < 300;
2594
+ }
2595
+ };
2596
+
2597
+ defaults.headers = {
2598
+ common: {
2599
+ 'Accept': 'application/json, text/plain, */*'
2600
+ }
2601
+ };
2602
+
2603
+ utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
2604
+ defaults.headers[method] = {};
2605
+ });
2606
+
2607
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
2608
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
2609
+ });
2610
+
2611
+ module.exports = defaults;
2612
+
2613
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("eef6")))
2614
+
2615
+ /***/ })
2616
+
2617
+ /******/ });
2618
+ });