orion-design 0.1.31 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. package/README.md +5 -5
  2. package/dist/Throne/index.js +14 -30
  3. package/dist/Throne/index.js.map +1 -1
  4. package/dist/components/Button/index.js +33 -40
  5. package/dist/components/Button/index.js.map +1 -1
  6. package/dist/components/Flex/index.js +89 -122
  7. package/dist/components/Flex/index.js.map +1 -1
  8. package/dist/components/Form/Form.js +2 -2
  9. package/dist/components/Form/Form.js.map +1 -1
  10. package/dist/components/Form/LovInput/LovInput.js +2 -2
  11. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  12. package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
  13. package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
  14. package/dist/components/Form/LovInput/index.js +4 -4
  15. package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
  16. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
  17. package/dist/components/Form/hooks/index.js +68 -127
  18. package/dist/components/Form/hooks/index.js.map +1 -1
  19. package/dist/components/Form/index.js +656 -836
  20. package/dist/components/Form/index.js.map +1 -1
  21. package/dist/components/Form/utils/index.js +18 -30
  22. package/dist/components/Form/utils/index.js.map +1 -1
  23. package/dist/components/LovTable/LovPagetable.vue.d.ts +492 -0
  24. package/dist/components/LovTable/index.d.ts +246 -0
  25. package/dist/components/LovTable/index.js +106 -179
  26. package/dist/components/LovTable/index.js.map +1 -1
  27. package/dist/components/Modal/index.js +56 -111
  28. package/dist/components/Modal/index.js.map +1 -1
  29. package/dist/components/Modal/types.d.ts +1 -1
  30. package/dist/components/Modal/types.js +3 -4
  31. package/dist/components/Modal/types.js.map +1 -1
  32. package/dist/components/Modal/useModal.js +5 -5
  33. package/dist/components/Modal/useModal.js.map +1 -1
  34. package/dist/components/Pagetable/Pagetable.d.ts +92 -1
  35. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +13 -0
  36. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +13 -0
  37. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +13 -0
  38. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +13 -0
  39. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +13 -0
  40. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +13 -0
  41. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +13 -0
  42. package/dist/components/Pagetable/hooks/useColumns.js +85 -88
  43. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  44. package/dist/components/Pagetable/index.d.ts +155 -0
  45. package/dist/components/Pagetable/index.js +596 -683
  46. package/dist/components/Pagetable/index.js.map +1 -1
  47. package/dist/components/Pagetable/utils/index.js +54 -92
  48. package/dist/components/Pagetable/utils/index.js.map +1 -1
  49. package/dist/components/Querytable/hooks/useColumns.js +74 -82
  50. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  51. package/dist/components/Querytable/index.js +469 -579
  52. package/dist/components/Querytable/index.js.map +1 -1
  53. package/dist/components/Querytable/utils/index.js +54 -92
  54. package/dist/components/Querytable/utils/index.js.map +1 -1
  55. package/dist/components/RichTextEditor/index.js +74 -100
  56. package/dist/components/RichTextEditor/index.js.map +1 -1
  57. package/dist/components/Tabs/constants.js +2 -2
  58. package/dist/components/Tabs/constants.js.map +1 -1
  59. package/dist/components/Tabs/index.js +358 -603
  60. package/dist/components/Tabs/index.js.map +1 -1
  61. package/dist/components/Tabs/tab-bar.js +6 -6
  62. package/dist/components/Tabs/tab-bar.js.map +1 -1
  63. package/dist/components/Tabs/tab-pane.js +3 -3
  64. package/dist/components/Tabs/tab-pane.js.map +1 -1
  65. package/dist/components/_constants/aria.js +2 -2
  66. package/dist/components/_constants/aria.js.map +1 -1
  67. package/dist/components/_constants/event.js +4 -6
  68. package/dist/components/_constants/event.js.map +1 -1
  69. package/dist/components/_constants/index.js +6 -6
  70. package/dist/components/_hooks/index.js +7 -7
  71. package/dist/components/_hooks/use-namespace/index.js +39 -74
  72. package/dist/components/_hooks/use-namespace/index.js.map +1 -1
  73. package/dist/components/_hooks/use-ordered-children/index.js +19 -29
  74. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
  75. package/dist/components/_util/arrays.js +5 -9
  76. package/dist/components/_util/arrays.js.map +1 -1
  77. package/dist/components/_util/browser.js +6 -6
  78. package/dist/components/_util/browser.js.map +1 -1
  79. package/dist/components/_util/classNames.js +17 -22
  80. package/dist/components/_util/classNames.js.map +1 -1
  81. package/dist/components/_util/dom/aria.js +39 -74
  82. package/dist/components/_util/dom/aria.js.map +1 -1
  83. package/dist/components/_util/dom/element.js +8 -9
  84. package/dist/components/_util/dom/element.js.map +1 -1
  85. package/dist/components/_util/dom/event.js +7 -14
  86. package/dist/components/_util/dom/event.js.map +1 -1
  87. package/dist/components/_util/dom/index.js +36 -36
  88. package/dist/components/_util/dom/position.js +25 -49
  89. package/dist/components/_util/dom/position.js.map +1 -1
  90. package/dist/components/_util/dom/scroll.js +61 -103
  91. package/dist/components/_util/dom/scroll.js.map +1 -1
  92. package/dist/components/_util/dom/style.js +50 -65
  93. package/dist/components/_util/dom/style.js.map +1 -1
  94. package/dist/components/_util/easings.js +4 -8
  95. package/dist/components/_util/easings.js.map +1 -1
  96. package/dist/components/_util/error.js +11 -12
  97. package/dist/components/_util/error.js.map +1 -1
  98. package/dist/components/_util/functions.js +3 -3
  99. package/dist/components/_util/i18n.js +2 -2
  100. package/dist/components/_util/i18n.js.map +1 -1
  101. package/dist/components/_util/index.js +137 -137
  102. package/dist/components/_util/isValid.js +2 -4
  103. package/dist/components/_util/isValid.js.map +1 -1
  104. package/dist/components/_util/objects.js +14 -18
  105. package/dist/components/_util/objects.js.map +1 -1
  106. package/dist/components/_util/props-util/index.js +20 -46
  107. package/dist/components/_util/props-util/index.js.map +1 -1
  108. package/dist/components/_util/props-util/initDefaultProps.js +10 -18
  109. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
  110. package/dist/components/_util/raf.js +4 -5
  111. package/dist/components/_util/raf.js.map +1 -1
  112. package/dist/components/_util/rand.js +3 -4
  113. package/dist/components/_util/rand.js.map +1 -1
  114. package/dist/components/_util/strings.js +8 -9
  115. package/dist/components/_util/strings.js.map +1 -1
  116. package/dist/components/_util/throttleByRaf.js +10 -16
  117. package/dist/components/_util/throttleByRaf.js.map +1 -1
  118. package/dist/components/_util/type.js +38 -41
  119. package/dist/components/_util/type.js.map +1 -1
  120. package/dist/components/_util/types.js +22 -41
  121. package/dist/components/_util/types.js.map +1 -1
  122. package/dist/components/_util/typescript.js +2 -2
  123. package/dist/components/_util/typescript.js.map +1 -1
  124. package/dist/components/_util/util.js +43 -85
  125. package/dist/components/_util/util.js.map +1 -1
  126. package/dist/components/_util/vue/global-node.js +15 -27
  127. package/dist/components/_util/vue/global-node.js.map +1 -1
  128. package/dist/components/_util/vue/icon.js +25 -29
  129. package/dist/components/_util/vue/icon.js.map +1 -1
  130. package/dist/components/_util/vue/index.js +41 -41
  131. package/dist/components/_util/vue/install.js +18 -35
  132. package/dist/components/_util/vue/install.js.map +1 -1
  133. package/dist/components/_util/vue/props/index.js +6 -6
  134. package/dist/components/_util/vue/props/runtime.js +30 -46
  135. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  136. package/dist/components/_util/vue/refs.js +6 -12
  137. package/dist/components/_util/vue/refs.js.map +1 -1
  138. package/dist/components/_util/vue/size.js +3 -5
  139. package/dist/components/_util/vue/size.js.map +1 -1
  140. package/dist/components/_util/vue/validator.js +4 -5
  141. package/dist/components/_util/vue/validator.js.map +1 -1
  142. package/dist/components/_util/vue/vnode.js +54 -100
  143. package/dist/components/_util/vue/vnode.js.map +1 -1
  144. package/dist/components/_util/vue-types/index.js +220 -231
  145. package/dist/components/_util/vue-types/index.js.map +1 -1
  146. package/dist/components/components.js +20 -20
  147. package/dist/components/index.js +35 -38
  148. package/dist/components/index.js.map +1 -1
  149. package/dist/error/OrionError.js +4 -8
  150. package/dist/error/OrionError.js.map +1 -1
  151. package/dist/index.css +1 -797
  152. package/dist/index.js +36 -36
  153. package/dist/print/LodopFuncs.js +43 -101
  154. package/dist/print/LodopFuncs.js.map +1 -1
  155. package/dist/print/index.js +108 -200
  156. package/dist/print/index.js.map +1 -1
  157. package/dist/request/ErrorHandlerChain.js +14 -17
  158. package/dist/request/ErrorHandlerChain.js.map +1 -1
  159. package/dist/request/RequestFilterChain.js +13 -16
  160. package/dist/request/RequestFilterChain.js.map +1 -1
  161. package/dist/request/ResponseParserChain.js +14 -17
  162. package/dist/request/ResponseParserChain.js.map +1 -1
  163. package/dist/request/disivion/DateSerializer.js +22 -47
  164. package/dist/request/disivion/DateSerializer.js.map +1 -1
  165. package/dist/request/disivion/DivisionErrorHandler.js +25 -40
  166. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
  167. package/dist/request/disivion/DivisionResponseParser.js +10 -16
  168. package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
  169. package/dist/request/disivion/index.js +201 -305
  170. package/dist/request/disivion/index.js.map +1 -1
  171. package/dist/request/error/BizExceptionResponseError.js +5 -11
  172. package/dist/request/error/BizExceptionResponseError.js.map +1 -1
  173. package/dist/request/error/ExceptionResponseError.js +5 -11
  174. package/dist/request/error/ExceptionResponseError.js.map +1 -1
  175. package/dist/request/error/ResponseError.js +4 -9
  176. package/dist/request/error/ResponseError.js.map +1 -1
  177. package/dist/request/error/SessionExceptionResponseError.js +5 -11
  178. package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
  179. package/dist/request/index.js +11 -11
  180. package/dist/utils/DateUtil.js +33 -48
  181. package/dist/utils/DateUtil.js.map +1 -1
  182. package/dist/utils/NumberUtil.js +6 -6
  183. package/dist/utils/NumberUtil.js.map +1 -1
  184. package/dist/utils/cloneDeep.js +2 -2
  185. package/dist/utils/delay.js +3 -3
  186. package/dist/utils/delay.js.map +1 -1
  187. package/dist/utils/functions.js +3 -3
  188. package/dist/utils/index.js +12 -12
  189. package/dist/utils/md5.js +93 -191
  190. package/dist/utils/md5.js.map +1 -1
  191. package/dist/utils/uuid.js +25 -35
  192. package/dist/utils/uuid.js.map +1 -1
  193. package/dist/version/index.js +2 -2
  194. package/dist/version/version.d.ts +1 -1
  195. package/dist/version/version.js +2 -2
  196. package/dist/version/version.js.map +1 -1
  197. package/package.json +1 -1
  198. package/dist/_commonjsHelpers-DWwsNxpa.js +0 -9
  199. package/dist/_commonjsHelpers-DWwsNxpa.js.map +0 -1
  200. package/dist/components-B3d9m_tn.js +0 -27
  201. package/dist/components-B3d9m_tn.js.map +0 -1
  202. package/dist/functions-BeMkokbY.js +0 -63
  203. package/dist/functions-BeMkokbY.js.map +0 -1
  204. package/dist/index-BOKLZnqH.js +0 -54
  205. package/dist/index-BOKLZnqH.js.map +0 -1
  206. package/dist/index-D1m0KTpK.js +0 -69
  207. package/dist/index-D1m0KTpK.js.map +0 -1
  208. package/dist/index-DR5ZP7mD.js +0 -160
  209. package/dist/index-DR5ZP7mD.js.map +0 -1
  210. package/dist/index-DkwIULcN.js +0 -200
  211. package/dist/index-DkwIULcN.js.map +0 -1
@@ -1,354 +1,250 @@
1
- import axios from "axios";
2
- import { cloneDeep } from "lodash-es";
1
+ import Q from "axios";
2
+ import { cloneDeep as $ } from "lodash-es";
3
3
  import "dayjs";
4
4
  import "../../utils/md5.js";
5
5
  import "decimal.js";
6
- import ResponseParserChain from "../ResponseParserChain.js";
7
- import ErrorHandlerChain from "../ErrorHandlerChain.js";
8
- import RequestFilterChain from "../RequestFilterChain.js";
9
- import DateSerializer from "./DateSerializer.js";
10
- import DivisionResponseParser from "./DivisionResponseParser.js";
11
- import DivisionErrorHandler from "./DivisionErrorHandler.js";
12
- import { ElLoading } from "element-plus";
13
- import ResponseError from "../error/ResponseError.js";
14
- const version = "3.7.7";
15
- const VERSION = version;
16
- const _hasBuffer = typeof Buffer === "function";
17
- const _TD = typeof TextDecoder === "function" ? new TextDecoder() : void 0;
18
- const _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
19
- const b64ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
20
- const b64chs = Array.prototype.slice.call(b64ch);
21
- const b64tab = ((a) => {
22
- let tab = {};
23
- a.forEach((c, i) => tab[c] = i);
24
- return tab;
25
- })(b64chs);
26
- const b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
27
- const _fromCC = String.fromCharCode.bind(String);
28
- const _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
29
- const _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
30
- const _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
31
- const btoaPolyfill = (bin) => {
32
- let u32, c0, c1, c2, asc = "";
33
- const pad = bin.length % 3;
34
- for (let i = 0; i < bin.length; ) {
35
- if ((c0 = bin.charCodeAt(i++)) > 255 || (c1 = bin.charCodeAt(i++)) > 255 || (c2 = bin.charCodeAt(i++)) > 255)
6
+ import G from "../ResponseParserChain.js";
7
+ import S from "../ErrorHandlerChain.js";
8
+ import K from "../RequestFilterChain.js";
9
+ import W from "./DateSerializer.js";
10
+ import X from "./DivisionResponseParser.js";
11
+ import ee from "./DivisionErrorHandler.js";
12
+ import { ElLoading as v } from "element-plus";
13
+ import te from "../error/ResponseError.js";
14
+ const O = "3.7.7", re = O, h = typeof Buffer == "function", B = typeof TextDecoder == "function" ? new TextDecoder() : void 0, E = typeof TextEncoder == "function" ? new TextEncoder() : void 0, oe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", m = Array.prototype.slice.call(oe), x = ((e) => {
15
+ let t = {};
16
+ return e.forEach((o, r) => t[o] = r), t;
17
+ })(m), ne = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, a = String.fromCharCode.bind(String), R = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), T = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "_"), P = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), k = (e) => {
18
+ let t, o, r, n, s = "";
19
+ const i = e.length % 3;
20
+ for (let l = 0; l < e.length; ) {
21
+ if ((o = e.charCodeAt(l++)) > 255 || (r = e.charCodeAt(l++)) > 255 || (n = e.charCodeAt(l++)) > 255)
36
22
  throw new TypeError("invalid character found");
37
- u32 = c0 << 16 | c1 << 8 | c2;
38
- asc += b64chs[u32 >> 18 & 63] + b64chs[u32 >> 12 & 63] + b64chs[u32 >> 6 & 63] + b64chs[u32 & 63];
23
+ t = o << 16 | r << 8 | n, s += m[t >> 18 & 63] + m[t >> 12 & 63] + m[t >> 6 & 63] + m[t & 63];
39
24
  }
40
- return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
41
- };
42
- const _btoa = typeof btoa === "function" ? (bin) => btoa(bin) : _hasBuffer ? (bin) => Buffer.from(bin, "binary").toString("base64") : btoaPolyfill;
43
- const _fromUint8Array = _hasBuffer ? (u8a) => Buffer.from(u8a).toString("base64") : (u8a) => {
44
- const maxargs = 4096;
45
- let strs = [];
46
- for (let i = 0, l = u8a.length; i < l; i += maxargs) {
47
- strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
48
- }
49
- return _btoa(strs.join(""));
50
- };
51
- const fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);
52
- const cb_utob = (c) => {
53
- if (c.length < 2) {
54
- var cc = c.charCodeAt(0);
55
- return cc < 128 ? c : cc < 2048 ? _fromCC(192 | cc >>> 6) + _fromCC(128 | cc & 63) : _fromCC(224 | cc >>> 12 & 15) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
25
+ return i ? s.slice(0, i - 3) + "===".substring(i) : s;
26
+ }, w = typeof btoa == "function" ? (e) => btoa(e) : h ? (e) => Buffer.from(e, "binary").toString("base64") : k, y = h ? (e) => Buffer.from(e).toString("base64") : (e) => {
27
+ let o = [];
28
+ for (let r = 0, n = e.length; r < n; r += 4096)
29
+ o.push(a.apply(null, e.subarray(r, r + 4096)));
30
+ return w(o.join(""));
31
+ }, b = (e, t = !1) => t ? T(y(e)) : y(e), se = (e) => {
32
+ if (e.length < 2) {
33
+ var t = e.charCodeAt(0);
34
+ return t < 128 ? e : t < 2048 ? a(192 | t >>> 6) + a(128 | t & 63) : a(224 | t >>> 12 & 15) + a(128 | t >>> 6 & 63) + a(128 | t & 63);
56
35
  } else {
57
- var cc = 65536 + (c.charCodeAt(0) - 55296) * 1024 + (c.charCodeAt(1) - 56320);
58
- return _fromCC(240 | cc >>> 18 & 7) + _fromCC(128 | cc >>> 12 & 63) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
36
+ var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
37
+ return a(240 | t >>> 18 & 7) + a(128 | t >>> 12 & 63) + a(128 | t >>> 6 & 63) + a(128 | t & 63);
59
38
  }
60
- };
61
- const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
62
- const utob = (u) => u.replace(re_utob, cb_utob);
63
- const _encode = _hasBuffer ? (s) => Buffer.from(s, "utf8").toString("base64") : _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s));
64
- const encode = (src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src);
65
- const encodeURI = (src) => encode(src, true);
66
- const re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
67
- const cb_btou = (cccc) => {
68
- switch (cccc.length) {
39
+ }, ae = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, L = (e) => e.replace(ae, se), _ = h ? (e) => Buffer.from(e, "utf8").toString("base64") : E ? (e) => y(E.encode(e)) : (e) => w(L(e)), d = (e, t = !1) => t ? T(_(e)) : _(e), D = (e) => d(e, !0), ie = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, le = (e) => {
40
+ switch (e.length) {
69
41
  case 4:
70
- var cp = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset = cp - 65536;
71
- return _fromCC((offset >>> 10) + 55296) + _fromCC((offset & 1023) + 56320);
42
+ var t = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3), o = t - 65536;
43
+ return a((o >>> 10) + 55296) + a((o & 1023) + 56320);
72
44
  case 3:
73
- return _fromCC((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2));
45
+ return a((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
74
46
  default:
75
- return _fromCC((31 & cccc.charCodeAt(0)) << 6 | 63 & cccc.charCodeAt(1));
47
+ return a((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1));
76
48
  }
77
- };
78
- const btou = (b) => b.replace(re_btou, cb_btou);
79
- const atobPolyfill = (asc) => {
80
- asc = asc.replace(/\s+/g, "");
81
- if (!b64re.test(asc))
49
+ }, j = (e) => e.replace(ie, le), q = (e) => {
50
+ if (e = e.replace(/\s+/g, ""), !ne.test(e))
82
51
  throw new TypeError("malformed base64.");
83
- asc += "==".slice(2 - (asc.length & 3));
84
- let u24, bin = "", r1, r2;
85
- for (let i = 0; i < asc.length; ) {
86
- u24 = b64tab[asc.charAt(i++)] << 18 | b64tab[asc.charAt(i++)] << 12 | (r1 = b64tab[asc.charAt(i++)]) << 6 | (r2 = b64tab[asc.charAt(i++)]);
87
- bin += r1 === 64 ? _fromCC(u24 >> 16 & 255) : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255) : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);
88
- }
89
- return bin;
90
- };
91
- const _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill;
92
- const _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
93
- const toUint8Array = (a) => _toUint8Array(_unURI(a));
94
- const _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
95
- const _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/"));
96
- const decode = (src) => _decode(_unURI(src));
97
- const isValid = (src) => {
98
- if (typeof src !== "string")
99
- return false;
100
- const s = src.replace(/\s+/g, "").replace(/={0,2}$/, "");
101
- return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
102
- };
103
- const _noEnum = (v) => {
104
- return {
105
- value: v,
106
- enumerable: false,
107
- writable: true,
108
- configurable: true
109
- };
110
- };
111
- const extendString = function() {
112
- const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));
113
- _add("fromBase64", function() {
114
- return decode(this);
115
- });
116
- _add("toBase64", function(urlsafe) {
117
- return encode(this, urlsafe);
118
- });
119
- _add("toBase64URI", function() {
120
- return encode(this, true);
121
- });
122
- _add("toBase64URL", function() {
123
- return encode(this, true);
124
- });
125
- _add("toUint8Array", function() {
126
- return toUint8Array(this);
127
- });
128
- };
129
- const extendUint8Array = function() {
130
- const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
131
- _add("toBase64", function(urlsafe) {
132
- return fromUint8Array(this, urlsafe);
133
- });
134
- _add("toBase64URI", function() {
135
- return fromUint8Array(this, true);
52
+ e += "==".slice(2 - (e.length & 3));
53
+ let t, o = "", r, n;
54
+ for (let s = 0; s < e.length; )
55
+ t = x[e.charAt(s++)] << 18 | x[e.charAt(s++)] << 12 | (r = x[e.charAt(s++)]) << 6 | (n = x[e.charAt(s++)]), o += r === 64 ? a(t >> 16 & 255) : n === 64 ? a(t >> 16 & 255, t >> 8 & 255) : a(t >> 16 & 255, t >> 8 & 255, t & 255);
56
+ return o;
57
+ }, U = typeof atob == "function" ? (e) => atob(P(e)) : h ? (e) => Buffer.from(e, "base64").toString("binary") : q, I = h ? (e) => R(Buffer.from(e, "base64")) : (e) => R(U(e).split("").map((t) => t.charCodeAt(0))), z = (e) => I(H(e)), fe = h ? (e) => Buffer.from(e, "base64").toString("utf8") : B ? (e) => B.decode(I(e)) : (e) => j(U(e)), H = (e) => P(e.replace(/[-_]/g, (t) => t == "-" ? "+" : "/")), A = (e) => fe(H(e)), ue = (e) => {
58
+ if (typeof e != "string")
59
+ return !1;
60
+ const t = e.replace(/\s+/g, "").replace(/={0,2}$/, "");
61
+ return !/[^\s0-9a-zA-Z\+/]/.test(t) || !/[^\s0-9a-zA-Z\-_]/.test(t);
62
+ }, Z = (e) => ({
63
+ value: e,
64
+ enumerable: !1,
65
+ writable: !0,
66
+ configurable: !0
67
+ }), N = function() {
68
+ const e = (t, o) => Object.defineProperty(String.prototype, t, Z(o));
69
+ e("fromBase64", function() {
70
+ return A(this);
71
+ }), e("toBase64", function(t) {
72
+ return d(this, t);
73
+ }), e("toBase64URI", function() {
74
+ return d(this, !0);
75
+ }), e("toBase64URL", function() {
76
+ return d(this, !0);
77
+ }), e("toUint8Array", function() {
78
+ return z(this);
136
79
  });
137
- _add("toBase64URL", function() {
138
- return fromUint8Array(this, true);
80
+ }, V = function() {
81
+ const e = (t, o) => Object.defineProperty(Uint8Array.prototype, t, Z(o));
82
+ e("toBase64", function(t) {
83
+ return b(this, t);
84
+ }), e("toBase64URI", function() {
85
+ return b(this, !0);
86
+ }), e("toBase64URL", function() {
87
+ return b(this, !0);
139
88
  });
89
+ }, ce = () => {
90
+ N(), V();
91
+ }, de = {
92
+ version: O,
93
+ VERSION: re,
94
+ atob: U,
95
+ atobPolyfill: q,
96
+ btoa: w,
97
+ btoaPolyfill: k,
98
+ fromBase64: A,
99
+ toBase64: d,
100
+ encode: d,
101
+ encodeURI: D,
102
+ encodeURL: D,
103
+ utob: L,
104
+ btou: j,
105
+ decode: A,
106
+ isValid: ue,
107
+ fromUint8Array: b,
108
+ toUint8Array: z,
109
+ extendString: N,
110
+ extendUint8Array: V,
111
+ extendBuiltins: ce
140
112
  };
141
- const extendBuiltins = () => {
142
- extendString();
143
- extendUint8Array();
144
- };
145
- const gBase64 = {
146
- version,
147
- VERSION,
148
- atob: _atob,
149
- atobPolyfill,
150
- btoa: _btoa,
151
- btoaPolyfill,
152
- fromBase64: decode,
153
- toBase64: encode,
154
- encode,
155
- encodeURI,
156
- encodeURL: encodeURI,
157
- utob,
158
- btou,
159
- decode,
160
- isValid,
161
- fromUint8Array,
162
- toUint8Array,
163
- extendString,
164
- extendUint8Array,
165
- extendBuiltins
166
- };
167
- let gRequestHeaders = () => ({});
168
- let gResponseParsers = [new DivisionResponseParser()];
169
- let gErrorHandlers = [new DivisionErrorHandler()];
170
- let gRequestFilters = [
113
+ let Y = () => ({}), M = [new X()], C = [new ee()], J = [
171
114
  {
172
- doFilter: (request2, chain) => {
173
- const headers = gRequestHeaders();
174
- Object.keys(headers).forEach(function(key) {
175
- request2.headers[key] = headers[key];
176
- });
177
- chain.doFilter(request2, chain);
115
+ doFilter: (e, t) => {
116
+ const o = Y();
117
+ Object.keys(o).forEach(function(r) {
118
+ e.headers[r] = o[r];
119
+ }), t.doFilter(e, t);
178
120
  }
179
121
  },
180
122
  {
181
- doFilter: (request2) => {
182
- new DateSerializer("YYYYMMDDHHmmss").serialize(request2.data);
123
+ doFilter: (e) => {
124
+ new W("YYYYMMDDHHmmss").serialize(e.data);
183
125
  }
184
126
  }
185
- ];
186
- let BASE_URL = "/";
187
- let REQUEST_TIMEOUT = 1e3 * 30;
188
- const g_AxiosInstance = axios.create();
189
- g_AxiosInstance.interceptors.request.use(function(config2) {
190
- const chain = new RequestFilterChain(gRequestFilters);
191
- chain.doFilter(config2, chain);
192
- return config2;
127
+ ], F = "/", p = 1e3 * 30;
128
+ const g = Q.create();
129
+ g.interceptors.request.use(function(e) {
130
+ const t = new K(J);
131
+ return t.doFilter(e, t), e;
193
132
  });
194
- g_AxiosInstance.interceptors.response.use(function(response) {
133
+ g.interceptors.response.use(function(e) {
195
134
  try {
196
- const chain = new ResponseParserChain(gResponseParsers);
197
- return chain.doParse(response, chain);
198
- } catch (e) {
199
- throw new ResponseError(e.message, { cause: e }, response);
135
+ const t = new G(M);
136
+ return t.doParse(e, t);
137
+ } catch (t) {
138
+ throw new te(t.message, { cause: t }, e);
200
139
  }
201
140
  });
202
- function request(url, data = {}, options = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }) {
203
- let newData = data;
204
- if (!(data instanceof FormData)) {
205
- newData = cloneDeep(data);
206
- }
207
- let loading;
208
- if (options.loading === true) {
209
- loading = ElLoading.service({ fullscreen: true, background: "transparent" });
210
- }
211
- return g_AxiosInstance.request({
212
- baseURL: BASE_URL,
141
+ function he(e, t = {}, o = { loading: !0, mask: !1, timeout: p }) {
142
+ let r = t;
143
+ t instanceof FormData || (r = $(t));
144
+ let n;
145
+ return o.loading === !0 && (n = v.service({ fullscreen: !0, background: "transparent" })), g.request({
146
+ baseURL: F,
213
147
  method: "POST",
214
- timeout: REQUEST_TIMEOUT,
215
- withCredentials: true,
216
- url,
217
- data: newData,
148
+ timeout: p,
149
+ withCredentials: !0,
150
+ url: e,
151
+ data: r,
218
152
  responseType: "json",
219
- ...options
220
- }).then((data2) => {
221
- if (loading) {
222
- loading.close();
223
- }
224
- return data2;
225
- }).catch(function(error) {
226
- if (loading) {
227
- loading.close();
228
- }
229
- const chain = new ErrorHandlerChain(gErrorHandlers);
230
- return chain.handle(error, chain);
153
+ ...o
154
+ }).then((s) => (n && n.close(), s)).catch(function(s) {
155
+ n && n.close();
156
+ const i = new S(C);
157
+ return i.handle(s, i);
231
158
  });
232
159
  }
233
- function download(url, data = {}, options = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }) {
234
- let loading;
235
- if (options.loading === true) {
236
- loading = ElLoading.service({ fullscreen: true, background: "transparent" });
237
- }
238
- return g_AxiosInstance.request({
239
- baseURL: BASE_URL,
160
+ function Re(e, t = {}, o = { loading: !0, mask: !1, timeout: p }) {
161
+ let r;
162
+ return o.loading === !0 && (r = v.service({ fullscreen: !0, background: "transparent" })), g.request({
163
+ baseURL: F,
240
164
  method: "POST",
241
- timeout: REQUEST_TIMEOUT,
242
- withCredentials: true,
243
- url,
244
- data,
165
+ timeout: p,
166
+ withCredentials: !0,
167
+ url: e,
168
+ data: t,
245
169
  responseType: "blob",
246
- ...options
247
- }).then((data2) => {
248
- if (loading) {
249
- loading.close();
250
- }
251
- return data2;
252
- }).then((response) => {
253
- const contentDisposition = response.headers["content-disposition"];
254
- const blob = response.data;
255
- const base64FileName = contentDisposition.match(/attachment; filename=\"(.*?)\"/)[1];
256
- const decodedFileName = gBase64.decode(base64FileName);
257
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
258
- window.navigator.msSaveOrOpenBlob(blob, decodedFileName);
259
- } else {
260
- const a = document.createElement("a");
261
- const url2 = URL.createObjectURL(blob);
262
- a.href = url2;
263
- a.download = decodedFileName;
264
- document.body.appendChild(a);
265
- a.click();
266
- document.body.removeChild(a);
267
- URL.revokeObjectURL(url2);
170
+ ...o
171
+ }).then((n) => (r && r.close(), n)).then((n) => {
172
+ const s = n.headers["content-disposition"], i = n.data, l = s.match(/attachment; filename=\"(.*?)\"/)[1], f = de.decode(l);
173
+ if (window.navigator && window.navigator.msSaveOrOpenBlob)
174
+ window.navigator.msSaveOrOpenBlob(i, f);
175
+ else {
176
+ const c = document.createElement("a"), u = URL.createObjectURL(i);
177
+ c.href = u, c.download = f, document.body.appendChild(c), c.click(), document.body.removeChild(c), URL.revokeObjectURL(u);
268
178
  }
269
- }).catch(function(error) {
270
- if (loading) {
271
- loading.close();
272
- }
273
- const chain = new ErrorHandlerChain(gErrorHandlers);
274
- return chain.handle(error, chain);
179
+ }).catch(function(n) {
180
+ r && r.close();
181
+ const s = new S(C);
182
+ return s.handle(n, s);
275
183
  });
276
184
  }
277
- function upload(url, params, options) {
278
- const formdata = new FormData();
279
- if (params) {
280
- const keys = Object.keys(params);
281
- const normalParams = {};
282
- for (let i = 0; i < keys.length; i++) {
283
- const key = keys[i];
284
- const itemValue = params[key];
285
- if (itemValue instanceof File) {
286
- formdata.append(key, itemValue);
287
- } else if (itemValue instanceof Array) {
288
- let isFile = false;
289
- for (let j = 0; j < itemValue.length; j++) {
290
- if (itemValue[j] instanceof File) {
291
- isFile = true;
185
+ function _e(e, t, o) {
186
+ const r = new FormData();
187
+ if (t) {
188
+ const n = Object.keys(t), s = {};
189
+ for (let i = 0; i < n.length; i++) {
190
+ const l = n[i], f = t[l];
191
+ if (f instanceof File)
192
+ r.append(l, f);
193
+ else if (f instanceof Array) {
194
+ let c = !1;
195
+ for (let u = 0; u < f.length; u++)
196
+ if (f[u] instanceof File) {
197
+ c = !0;
292
198
  break;
293
199
  }
294
- }
295
- if (isFile) {
296
- for (let j = 0; j < itemValue.length; j++) {
297
- formdata.append(key, itemValue[j]);
298
- }
299
- } else {
300
- normalParams[key] = itemValue;
301
- }
302
- } else {
303
- normalParams[key] = itemValue;
304
- }
200
+ if (c)
201
+ for (let u = 0; u < f.length; u++)
202
+ r.append(l, f[u]);
203
+ else
204
+ s[l] = f;
205
+ } else
206
+ s[l] = f;
305
207
  }
306
- formdata.append("ibayJson", JSON.stringify(normalParams));
208
+ r.append("ibayJson", JSON.stringify(s));
307
209
  }
308
- return request(url, formdata, options);
210
+ return he(e, r, o);
309
211
  }
310
- const config = {
311
- setBaseUrl: (pBaseUrl) => {
312
- if (!pBaseUrl) {
313
- throw new Error(`pBaseUrl is null!`);
314
- }
315
- BASE_URL = pBaseUrl;
212
+ const De = {
213
+ setBaseUrl: (e) => {
214
+ if (!e)
215
+ throw new Error("pBaseUrl is null!");
216
+ F = e;
316
217
  },
317
- setRequestTimeout: (pTimeout) => {
318
- REQUEST_TIMEOUT = pTimeout;
218
+ setRequestTimeout: (e) => {
219
+ p = e;
319
220
  },
320
- setRequestHeaders: (pRequestHeaders) => {
321
- if (!pRequestHeaders) {
322
- throw new Error(`pRequestHeaders is null!`);
323
- }
324
- if (!(pRequestHeaders instanceof Function)) {
325
- throw new Error(`pRequestHeaders is not a function!`);
326
- }
327
- gRequestHeaders = pRequestHeaders;
221
+ setRequestHeaders: (e) => {
222
+ if (!e)
223
+ throw new Error("pRequestHeaders is null!");
224
+ if (!(e instanceof Function))
225
+ throw new Error("pRequestHeaders is not a function!");
226
+ Y = e;
328
227
  },
329
- setRequestFilters: (...filters) => {
330
- if (filters == null) {
331
- throw new Error(`filters is null!`);
332
- }
333
- gRequestFilters = filters;
228
+ setRequestFilters: (...e) => {
229
+ if (e == null)
230
+ throw new Error("filters is null!");
231
+ J = e;
334
232
  },
335
- setResponseParsers: (...parsers) => {
336
- if (parsers == null) {
337
- throw new Error(`parsers is null!`);
338
- }
339
- gResponseParsers = parsers;
233
+ setResponseParsers: (...e) => {
234
+ if (e == null)
235
+ throw new Error("parsers is null!");
236
+ M = e;
340
237
  },
341
- setErrorHandlers: (...handlers) => {
342
- if (handlers == null) {
343
- throw new Error(`handlers should not null!`);
344
- }
345
- gErrorHandlers = handlers;
238
+ setErrorHandlers: (...e) => {
239
+ if (e == null)
240
+ throw new Error("handlers should not null!");
241
+ C = e;
346
242
  }
347
243
  };
348
244
  export {
349
- config,
350
- download,
351
- request,
352
- upload
245
+ De as config,
246
+ Re as download,
247
+ he as request,
248
+ _e as upload
353
249
  };
354
250
  //# sourceMappingURL=index.js.map