jk-vue-comps 0.2.18 → 0.2.19

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.
@@ -581,89 +581,4 @@ function y(e, t, n) {
581
581
  return e;
582
582
  }
583
583
  //#endregion
584
- //#region src/utils/math.ts
585
- var b = e.ROUND_DOWN, x = e.ROUND_UP, S = e;
586
- function C(t) {
587
- if (w(t)) return e(~~t);
588
- if (!t) return e(0);
589
- if (T(t)) return t.isNaN() ? e(0) : t;
590
- let n = e(t);
591
- return n.isNaN() ? e(0) : n;
592
- }
593
- function w(e) {
594
- return typeof e == "boolean";
595
- }
596
- function T(t) {
597
- return e.isBigNumber(t);
598
- }
599
- function E(e) {
600
- return typeof e == "number" && !D(e);
601
- }
602
- function D(t) {
603
- return t == null || t == null ? !1 : e(t).isNaN();
604
- }
605
- function O(t) {
606
- return t == null || t == null ? !1 : e(t).isInteger();
607
- }
608
- function k(e, t) {
609
- return C(e).isGreaterThan(C(t));
610
- }
611
- function A(e, t) {
612
- return C(e).isLessThan(C(t));
613
- }
614
- function j(e, t) {
615
- return C(e).isEqualTo(C(t));
616
- }
617
- function M(e, t) {
618
- return C(e).isGreaterThanOrEqualTo(C(t));
619
- }
620
- function N(e, t) {
621
- return C(e).isLessThanOrEqualTo(C(t));
622
- }
623
- function P(e) {
624
- return C(e);
625
- }
626
- function F(e) {
627
- return C(e).toNumber();
628
- }
629
- function I(e, t = !1) {
630
- return F(C(e).integerValue(t ? x : b));
631
- }
632
- function L(e) {
633
- return C(e).toString();
634
- }
635
- function R(e, t, n = !1) {
636
- let r = C(e);
637
- return F(t === void 0 ? r : r.decimalPlaces(t, n ? x : b));
638
- }
639
- function z(e) {
640
- return C(e).toFormat();
641
- }
642
- function B(...e) {
643
- return e.length === 0 ? 0 : F(e.reduce((e, t) => C(e).plus(C(t)), 0));
644
- }
645
- function V(...e) {
646
- return e.length === 0 ? 0 : F(e.reduce((e, t) => C(e).minus(C(t))));
647
- }
648
- function H(...e) {
649
- return e.length === 0 ? 0 : F(e.reduce((e, t) => C(e).times(C(t)), 1));
650
- }
651
- function U(...e) {
652
- if (e.length === 0) return 0;
653
- let t = e.map((e) => P(e));
654
- return t.some((e) => e.isZero()) ? 0 : t.reduce((e, t) => e.dividedBy(t)).toNumber();
655
- }
656
- function W(e, t) {
657
- return F(C(e).pow(C(t)));
658
- }
659
- function G(e, t = "%") {
660
- let n = C(e).times(100);
661
- return `${k(n, 0) ? R(n, 2) : 0}${t}`;
662
- }
663
- function K(e) {
664
- let t = C(e).div(100);
665
- return k(t, 0) ? R(t, 4) : 0;
666
- }
667
- var q = k, J = M, Y = A, X = N, Z = j, Q = D;
668
- //#endregion
669
- export { z as A, X as C, P as D, V as E, L as M, K as N, R as O, Y as S, W as T, A as _, U as a, D as b, q as c, T as d, w as f, O as g, M as h, B as i, F as j, I as k, J as l, k as m, b as n, Z as o, j as p, x as r, G as s, S as t, C as u, N as v, H as w, E as x, Q as y };
584
+ export { e as t };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { is as ee, isArray as e, isBoolean as te, isClient as ne, isDate as re, isDef as t, isEdgeBrowser as n, isElement as r, isEmail as i, isEmpty as a, isFunction as o, isHtmlStr as s, isInMobileBrowser as c, isIp as l, isMap as u, isNull as d, isNullAndUnDef as f, isNullOrUnDef as p, isNumber as m, isObject as h, isPromise as g, isPromiseLink as _, isRegExp as v, isServer as y, isString as b, isUnDef as x, isUrl as S, isValidPhoneNumber as C, isWindow as w, isZhLang as T } from "./utils/is.js";
2
- import { A as E, C as D, D as O, E as k, M as A, N as j, O as M, S as N, T as P, _ as F, a as I, b as L, c as R, d as z, f as B, g as V, h as H, i as U, j as W, k as G, l as K, m as q, n as J, o as Y, p as X, r as ie, s as ae, t as oe, u as se, v as ce, w as le, x as ue, y as de } from "./chunks/math-Xp7OBfoD.js";
2
+ import { BigNumber as E, DOWN as D, UP as O, add as k, divide as A, eq as j, formatRate as M, gt as N, gte as P, helper as F, isBigNum as I, isBool as L, isEqualTo as R, isGreaterThan as z, isGreaterThanOrEqualTo as B, isInt as V, isLessThan as H, isLessThanOrEqualTo as U, isNan as W, isNanValue as G, isNum as K, lt as q, lte as J, multiply as Y, power as X, subtract as ie, toBigNum as ae, toDecimalPlaces as oe, toInt as se, toLocaleString as ce, toNum as le, toString as ue, unFormatRate as de } from "./utils/math.js";
3
3
  import { propTypes as fe } from "./utils/vuePropTypes.js";
4
4
  import { timeZoneOptions as pe } from "./utils/timeZone.js";
5
5
  import { withInstall as me } from "./utils/withInstall.js";
@@ -21,4 +21,4 @@ var Fe = {
21
21
  Utils: Z
22
22
  };
23
23
  //#endregion
24
- export { oe as BigNumber, J as DOWN, Ee as GoogleAuth, Oe as TelegramAuth, ie as UP, U as add, je as copyTextToClipboard, he as deepMerge, Fe as default, ge as desensitization, I as divide, Y as eq, _e as evalPro, ve as filterInputNum, ae as formatRate, ye as generateFilterInputNumFn, be as getRouterParams, ke as getTelegramAuthUrlParams, xe as getWebsiteUrl, R as gt, K as gte, se as helper, ee as is, e as isArray, z as isBigNum, B as isBool, te as isBoolean, ne as isClient, re as isDate, t as isDef, n as isEdgeBrowser, r as isElement, i as isEmail, a as isEmpty, X as isEqualTo, o as isFunction, q as isGreaterThan, H as isGreaterThanOrEqualTo, s as isHtmlStr, c as isInMobileBrowser, V as isInt, l as isIp, F as isLessThan, ce as isLessThanOrEqualTo, u as isMap, de as isNan, L as isNanValue, d as isNull, f as isNullAndUnDef, p as isNullOrUnDef, ue as isNum, m as isNumber, h as isObject, g as isPromise, _ as isPromiseLink, v as isRegExp, y as isServer, b as isString, x as isUnDef, S as isUrl, C as isValidPhoneNumber, w as isWindow, T as isZhLang, N as lt, D as lte, le as multiply, P as power, fe as propTypes, Se as removeWhitespace, Ce as renderHtmlStr, k as subtract, pe as timeZoneOptions, O as toBigNum, M as toDecimalPlaces, De as toGoogleAuth, G as toInt, E as toLocaleString, W as toNum, A as toString, we as toStyleObject, Te as toStyleUnit, Ae as toTelegramAuth, j as unFormatRate, Me as useCopyToClipboard, Ne as useFormKeypressEnter, Pe as useMemo, me as withInstall };
24
+ export { E as BigNumber, D as DOWN, Ee as GoogleAuth, Oe as TelegramAuth, O as UP, k as add, je as copyTextToClipboard, he as deepMerge, Fe as default, ge as desensitization, A as divide, j as eq, _e as evalPro, ve as filterInputNum, M as formatRate, ye as generateFilterInputNumFn, be as getRouterParams, ke as getTelegramAuthUrlParams, xe as getWebsiteUrl, N as gt, P as gte, F as helper, ee as is, e as isArray, I as isBigNum, L as isBool, te as isBoolean, ne as isClient, re as isDate, t as isDef, n as isEdgeBrowser, r as isElement, i as isEmail, a as isEmpty, R as isEqualTo, o as isFunction, z as isGreaterThan, B as isGreaterThanOrEqualTo, s as isHtmlStr, c as isInMobileBrowser, V as isInt, l as isIp, H as isLessThan, U as isLessThanOrEqualTo, u as isMap, W as isNan, G as isNanValue, d as isNull, f as isNullAndUnDef, p as isNullOrUnDef, K as isNum, m as isNumber, h as isObject, g as isPromise, _ as isPromiseLink, v as isRegExp, y as isServer, b as isString, x as isUnDef, S as isUrl, C as isValidPhoneNumber, w as isWindow, T as isZhLang, q as lt, J as lte, Y as multiply, X as power, fe as propTypes, Se as removeWhitespace, Ce as renderHtmlStr, ie as subtract, pe as timeZoneOptions, ae as toBigNum, oe as toDecimalPlaces, De as toGoogleAuth, se as toInt, ce as toLocaleString, le as toNum, ue as toString, we as toStyleObject, Te as toStyleUnit, Ae as toTelegramAuth, de as unFormatRate, Me as useCopyToClipboard, Ne as useFormKeypressEnter, Pe as useMemo, me as withInstall };
@@ -1,33 +1,33 @@
1
1
  import { t as e } from "../chunks/chunk-cBPL4W67.js";
2
- import { is as t, isArray as n, isBoolean as r, isClient as i, isDate as a, isDef as o, isEdgeBrowser as s, isElement as c, isEmail as l, isEmpty as u, isFunction as d, isHtmlStr as f, isInMobileBrowser as p, isIp as ee, isMap as te, isNull as ne, isNullAndUnDef as m, isNullOrUnDef as h, isNumber as g, isObject as _, isPromise as v, isPromiseLink as y, isRegExp as b, isServer as x, isString as S, isUnDef as C, isUrl as w, isValidPhoneNumber as T, isWindow as E, isZhLang as D } from "./is.js";
3
- import { A as O, C as k, D as A, E as j, M, N, O as P, S as F, T as I, _ as L, a as R, b as z, c as B, d as V, f as H, g as U, h as W, i as G, j as K, k as q, l as J, m as Y, n as re, o as X, p as ie, r as ae, s as oe, t as se, u as ce, v as le, w as ue, x as de, y as fe } from "../chunks/math-Xp7OBfoD.js";
2
+ import { is as t, isArray as n, isBoolean as r, isClient as i, isDate as a, isDef as o, isEdgeBrowser as s, isElement as c, isEmail as l, isEmpty as u, isFunction as d, isHtmlStr as f, isInMobileBrowser as ee, isIp as te, isMap as ne, isNull as re, isNullAndUnDef as p, isNullOrUnDef as m, isNumber as h, isObject as g, isPromise as _, isPromiseLink as v, isRegExp as y, isServer as b, isString as x, isUnDef as S, isUrl as C, isValidPhoneNumber as w, isWindow as T, isZhLang as E } from "./is.js";
3
+ import { BigNumber as D, DOWN as O, UP as k, add as A, divide as j, eq as M, formatRate as N, gt as P, gte as F, helper as I, isBigNum as L, isBool as R, isEqualTo as z, isGreaterThan as B, isGreaterThanOrEqualTo as V, isInt as H, isLessThan as U, isLessThanOrEqualTo as W, isNan as G, isNanValue as K, isNum as q, lt as J, lte as ie, multiply as Y, power as ae, subtract as oe, toBigNum as se, toDecimalPlaces as ce, toInt as le, toLocaleString as ue, toNum as X, toString as de, unFormatRate as fe } from "./math.js";
4
4
  import { propTypes as pe } from "./vuePropTypes.js";
5
5
  import { timeZoneOptions as me } from "./timeZone.js";
6
6
  import { withInstall as he } from "./withInstall.js";
7
7
  import { createVNode as ge, nextTick as _e } from "vue";
8
8
  //#region src/utils/index.ts
9
9
  var ve = /* @__PURE__ */ e({
10
- BigNumber: () => se,
11
- DOWN: () => re,
12
- UP: () => ae,
13
- add: () => G,
10
+ BigNumber: () => D,
11
+ DOWN: () => O,
12
+ UP: () => k,
13
+ add: () => A,
14
14
  deepMerge: () => $,
15
15
  desensitization: () => we,
16
- divide: () => R,
17
- eq: () => X,
16
+ divide: () => j,
17
+ eq: () => M,
18
18
  evalPro: () => ye,
19
19
  filterInputNum: () => Z,
20
- formatRate: () => oe,
20
+ formatRate: () => N,
21
21
  generateFilterInputNumFn: () => be,
22
22
  getRouterParams: () => Se,
23
23
  getWebsiteUrl: () => Q,
24
- gt: () => B,
25
- gte: () => J,
26
- helper: () => ce,
24
+ gt: () => P,
25
+ gte: () => F,
26
+ helper: () => I,
27
27
  is: () => t,
28
28
  isArray: () => n,
29
- isBigNum: () => V,
30
- isBool: () => H,
29
+ isBigNum: () => L,
30
+ isBool: () => R,
31
31
  isBoolean: () => r,
32
32
  isClient: () => i,
33
33
  isDate: () => a,
@@ -36,53 +36,53 @@ var ve = /* @__PURE__ */ e({
36
36
  isElement: () => c,
37
37
  isEmail: () => l,
38
38
  isEmpty: () => u,
39
- isEqualTo: () => ie,
39
+ isEqualTo: () => z,
40
40
  isFunction: () => d,
41
- isGreaterThan: () => Y,
42
- isGreaterThanOrEqualTo: () => W,
41
+ isGreaterThan: () => B,
42
+ isGreaterThanOrEqualTo: () => V,
43
43
  isHtmlStr: () => f,
44
- isInMobileBrowser: () => p,
45
- isInt: () => U,
46
- isIp: () => ee,
47
- isLessThan: () => L,
48
- isLessThanOrEqualTo: () => le,
49
- isMap: () => te,
50
- isNan: () => fe,
51
- isNanValue: () => z,
52
- isNull: () => ne,
53
- isNullAndUnDef: () => m,
54
- isNullOrUnDef: () => h,
55
- isNum: () => de,
56
- isNumber: () => g,
57
- isObject: () => _,
58
- isPromise: () => v,
59
- isPromiseLink: () => y,
60
- isRegExp: () => b,
61
- isServer: () => x,
62
- isString: () => S,
63
- isUnDef: () => C,
64
- isUrl: () => w,
65
- isValidPhoneNumber: () => T,
66
- isWindow: () => E,
67
- isZhLang: () => D,
68
- lt: () => F,
69
- lte: () => k,
70
- multiply: () => ue,
71
- power: () => I,
44
+ isInMobileBrowser: () => ee,
45
+ isInt: () => H,
46
+ isIp: () => te,
47
+ isLessThan: () => U,
48
+ isLessThanOrEqualTo: () => W,
49
+ isMap: () => ne,
50
+ isNan: () => G,
51
+ isNanValue: () => K,
52
+ isNull: () => re,
53
+ isNullAndUnDef: () => p,
54
+ isNullOrUnDef: () => m,
55
+ isNum: () => q,
56
+ isNumber: () => h,
57
+ isObject: () => g,
58
+ isPromise: () => _,
59
+ isPromiseLink: () => v,
60
+ isRegExp: () => y,
61
+ isServer: () => b,
62
+ isString: () => x,
63
+ isUnDef: () => S,
64
+ isUrl: () => C,
65
+ isValidPhoneNumber: () => w,
66
+ isWindow: () => T,
67
+ isZhLang: () => E,
68
+ lt: () => J,
69
+ lte: () => ie,
70
+ multiply: () => Y,
71
+ power: () => ae,
72
72
  propTypes: () => pe,
73
73
  removeWhitespace: () => Ce,
74
74
  renderHtmlStr: () => xe,
75
- subtract: () => j,
75
+ subtract: () => oe,
76
76
  timeZoneOptions: () => me,
77
- toBigNum: () => A,
78
- toDecimalPlaces: () => P,
79
- toInt: () => q,
80
- toLocaleString: () => O,
81
- toNum: () => K,
82
- toString: () => M,
77
+ toBigNum: () => se,
78
+ toDecimalPlaces: () => ce,
79
+ toInt: () => le,
80
+ toLocaleString: () => ue,
81
+ toNum: () => X,
82
+ toString: () => de,
83
83
  toStyleObject: () => Ee,
84
84
  toStyleUnit: () => Te,
85
- unFormatRate: () => N,
85
+ unFormatRate: () => fe,
86
86
  withInstall: () => he
87
87
  });
88
88
  function ye(e) {
@@ -112,7 +112,7 @@ function be(e, t, n, r = "int", i = 6) {
112
112
  };
113
113
  }
114
114
  function xe(e) {
115
- return !S(e) || !f(e) ? e : ge("div", { innerHTML: e });
115
+ return !x(e) || !f(e) ? e : ge("div", { innerHTML: e });
116
116
  }
117
117
  function Q() {
118
118
  return window ? `${window.location.protocol}//${window.location.hostname}` : "";
@@ -125,23 +125,23 @@ function Se() {
125
125
  return t;
126
126
  }
127
127
  function Ce(e) {
128
- return S(e) ? e.replace(/\s+/g, "") : "";
128
+ return x(e) ? e.replace(/\s+/g, "") : "";
129
129
  }
130
130
  function $(e = {}, t = {}) {
131
131
  let n;
132
- for (n in t) e[n] = _(e[n]) ? $(e[n], t[n]) : e[n] = t[n];
132
+ for (n in t) e[n] = g(e[n]) ? $(e[n], t[n]) : e[n] = t[n];
133
133
  return e;
134
134
  }
135
135
  function we(e, t = 6, { showPrefix: n = !0, showSuffix: r = !0, middleStr: i = "****" } = {}) {
136
- if (!S(e) && !g(e)) return e;
136
+ if (!x(e) && !h(e)) return e;
137
137
  let a = String(e), o = a?.length ?? 0;
138
138
  return !a || !o || t <= 0 ? a : `${n ? a.substring(0, t) : ""}${i}${r ? a.substring(o - t) : ""}`;
139
139
  }
140
140
  function Te(e, t = "px") {
141
- if (!(e === null || e === "" || e === void 0)) return z(e) ? String(e) : `${K(e)}${t}`;
141
+ if (!(e === null || e === "" || e === void 0)) return K(e) ? String(e) : `${X(e)}${t}`;
142
142
  }
143
143
  function Ee(e) {
144
- return e ? _(e) ? e : e.split(";").reduce((e, t) => {
144
+ return e ? g(e) ? e : e.split(";").reduce((e, t) => {
145
145
  let [n, r] = t.trim().split(":");
146
146
  if (n) {
147
147
  let t = n.trim().replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
@@ -151,4 +151,4 @@ function Ee(e) {
151
151
  }, {}) : {};
152
152
  }
153
153
  //#endregion
154
- export { se as BigNumber, re as DOWN, ae as UP, G as add, $ as deepMerge, we as desensitization, R as divide, X as eq, ye as evalPro, Z as filterInputNum, oe as formatRate, be as generateFilterInputNumFn, Se as getRouterParams, Q as getWebsiteUrl, B as gt, J as gte, ce as helper, t as is, n as isArray, V as isBigNum, H as isBool, r as isBoolean, i as isClient, a as isDate, o as isDef, s as isEdgeBrowser, c as isElement, l as isEmail, u as isEmpty, ie as isEqualTo, d as isFunction, Y as isGreaterThan, W as isGreaterThanOrEqualTo, f as isHtmlStr, p as isInMobileBrowser, U as isInt, ee as isIp, L as isLessThan, le as isLessThanOrEqualTo, te as isMap, fe as isNan, z as isNanValue, ne as isNull, m as isNullAndUnDef, h as isNullOrUnDef, de as isNum, g as isNumber, _ as isObject, v as isPromise, y as isPromiseLink, b as isRegExp, x as isServer, S as isString, C as isUnDef, w as isUrl, T as isValidPhoneNumber, E as isWindow, D as isZhLang, F as lt, k as lte, ue as multiply, I as power, pe as propTypes, Ce as removeWhitespace, xe as renderHtmlStr, j as subtract, ve as t, me as timeZoneOptions, A as toBigNum, P as toDecimalPlaces, q as toInt, O as toLocaleString, K as toNum, M as toString, Ee as toStyleObject, Te as toStyleUnit, N as unFormatRate, he as withInstall };
154
+ export { D as BigNumber, O as DOWN, k as UP, A as add, $ as deepMerge, we as desensitization, j as divide, M as eq, ye as evalPro, Z as filterInputNum, N as formatRate, be as generateFilterInputNumFn, Se as getRouterParams, Q as getWebsiteUrl, P as gt, F as gte, I as helper, t as is, n as isArray, L as isBigNum, R as isBool, r as isBoolean, i as isClient, a as isDate, o as isDef, s as isEdgeBrowser, c as isElement, l as isEmail, u as isEmpty, z as isEqualTo, d as isFunction, B as isGreaterThan, V as isGreaterThanOrEqualTo, f as isHtmlStr, ee as isInMobileBrowser, H as isInt, te as isIp, U as isLessThan, W as isLessThanOrEqualTo, ne as isMap, G as isNan, K as isNanValue, re as isNull, p as isNullAndUnDef, m as isNullOrUnDef, q as isNum, h as isNumber, g as isObject, _ as isPromise, v as isPromiseLink, y as isRegExp, b as isServer, x as isString, S as isUnDef, C as isUrl, w as isValidPhoneNumber, T as isWindow, E as isZhLang, J as lt, ie as lte, Y as multiply, ae as power, pe as propTypes, Ce as removeWhitespace, xe as renderHtmlStr, oe as subtract, ve as t, me as timeZoneOptions, se as toBigNum, ce as toDecimalPlaces, le as toInt, ue as toLocaleString, X as toNum, de as toString, Ee as toStyleObject, Te as toStyleUnit, fe as unFormatRate, he as withInstall };
@@ -1,71 +1,73 @@
1
+ import { t as e } from "../chunks/bignumber-CC1ajqLP.js";
1
2
  //#region src/utils/lodash.ts
2
- function e(t) {
3
- if (typeof t != "object" || !t) return t;
4
- let n = t;
5
- return n?.__v_isRef && (n = n.value), n?.__v_raw && (n = n.__v_raw), n === t ? n : e(n);
6
- }
7
- function t(t) {
8
- let n = e(t);
9
- if (typeof n != "object" || !n) return n;
10
- if (Array.isArray(n)) return [...n];
11
- if (n instanceof Date) return new Date(n.getTime());
12
- if (n instanceof RegExp) {
13
- let e = new RegExp(n.source, n.flags);
14
- return e.lastIndex = n.lastIndex, e;
3
+ function t(e) {
4
+ if (typeof e != "object" || !e) return e;
5
+ let n = e;
6
+ return n?.__v_isRef && (n = n.value), n?.__v_raw && (n = n.__v_raw), n === e ? n : t(n);
7
+ }
8
+ function n(n) {
9
+ let r = t(n);
10
+ if (typeof r != "object" || !r) return r;
11
+ if (r.$d && typeof r.clone == "function") return r.clone();
12
+ if (e.isBigNumber(r)) return new r.constructor(r);
13
+ if (Array.isArray(r)) return [...r];
14
+ if (r instanceof Date) return new Date(r.getTime());
15
+ if (r instanceof RegExp) {
16
+ let e = new RegExp(r.source, r.flags);
17
+ return e.lastIndex = r.lastIndex, e;
15
18
  }
16
- return n instanceof Map ? new Map(n) : n instanceof Set ? new Set(n) : Object.assign(Object.create(Object.getPrototypeOf(n)), n);
17
- }
18
- function n(t, r = /* @__PURE__ */ new WeakMap()) {
19
- let i = e(t);
20
- if (typeof i != "object" || !i) return i;
21
- if (i instanceof Date) return new Date(i);
22
- if (i instanceof RegExp) return new RegExp(i.source, i.flags);
23
- if (r.has(i)) return r.get(i);
24
- if (i instanceof Map) {
19
+ return r instanceof Map ? new Map(r) : r instanceof Set ? new Set(r) : Object.assign(Object.create(Object.getPrototypeOf(r)), r);
20
+ }
21
+ function r(n, i = /* @__PURE__ */ new WeakMap()) {
22
+ let a = t(n);
23
+ if (typeof a != "object" || !a) return a;
24
+ if (a.$d && typeof a.clone == "function") return a.clone();
25
+ if (e.isBigNumber(a)) return new a.constructor(a);
26
+ if (a instanceof Date) return new Date(a.getTime());
27
+ if (a instanceof RegExp) return new RegExp(a.source, a.flags);
28
+ if (i.has(a)) return i.get(a);
29
+ if (a instanceof Map) {
25
30
  let e = /* @__PURE__ */ new Map();
26
- return r.set(i, e), i.forEach((t, i) => e.set(n(i, r), n(t, r))), e;
31
+ return i.set(a, e), a.forEach((t, n) => e.set(r(n, i), r(t, i))), e;
27
32
  }
28
- if (i instanceof Set) {
33
+ if (a instanceof Set) {
29
34
  let e = /* @__PURE__ */ new Set();
30
- return r.set(i, e), i.forEach((t) => e.add(n(t, r))), e;
35
+ return i.set(a, e), a.forEach((t) => e.add(r(t, i))), e;
31
36
  }
32
- let a;
33
- if (Array.isArray(i)) a = [];
34
- else if (Object.prototype.toString.call(i) === "[object Object]") a = {};
35
- else return i;
36
- r.set(i, a);
37
- let o = Array.isArray(i) ? void 0 : Object.keys(i);
38
- return (o || i).forEach((e, t) => {
39
- let s = o ? e : t;
37
+ let o;
38
+ o = Array.isArray(a) ? [] : Object.prototype.toString.call(a) === "[object Object]" ? {} : Object.create(Object.getPrototypeOf(a)), i.set(a, o);
39
+ let s = Array.isArray(a) ? void 0 : Object.keys(a);
40
+ return (s || a).forEach((e, t) => {
41
+ let n = s ? e : t;
40
42
  try {
41
- a[s] = n(i[s], r);
43
+ o[n] = r(a[n], i);
42
44
  } catch (e) {
43
- console.warn(`Property ${String(s)} could not be cloned.`, e);
45
+ console.warn(`Property ${String(n)} could not be cloned.`, e);
44
46
  }
45
- }), a;
47
+ }), o;
46
48
  }
47
- function r(e, t) {
49
+ function i(e, t) {
48
50
  let n = {};
49
51
  if (e == null) return n;
50
52
  let r = Array.isArray(t) ? t : [t];
51
53
  for (let t of r) t in e && (n[t] = e[t]);
52
54
  return n;
53
55
  }
54
- function i(e, t) {
56
+ function a(e, t) {
55
57
  let n = {};
56
58
  return e == null || Object.keys(e).forEach((r) => {
57
59
  let i = e[r];
58
60
  t(i, r) && (n[r] = i);
59
61
  }), n;
60
62
  }
61
- function a(e, t) {
63
+ function o(e, t) {
62
64
  if (typeof e != "object" || !e) return e;
63
65
  if (t === void 0 || t === "" || Array.isArray(t) && !t.length) return { ...e };
64
66
  let n = Array.isArray(t) ? t : [t], r = {}, i = Reflect.ownKeys(e);
65
67
  for (let t of i) n.includes(t) || (r[t] = e[t]);
66
68
  return r;
67
69
  }
68
- function o(e, t, n) {
70
+ function s(e, t, n) {
69
71
  if (e == null) return n;
70
72
  if (!t) return e;
71
73
  let r = t.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean), i = e;
@@ -75,7 +77,7 @@ function o(e, t, n) {
75
77
  }
76
78
  return i === void 0 ? n : i;
77
79
  }
78
- function s(e, t, n) {
80
+ function c(e, t, n) {
79
81
  if (Object(e) !== e) return e;
80
82
  let r = t.toString().replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean), i = e;
81
83
  for (let e = 0; e < r.length - 1; e++) {
@@ -89,10 +91,10 @@ function s(e, t, n) {
89
91
  let a = r[r.length - 1];
90
92
  return i[a] = n, e;
91
93
  }
92
- function c(e) {
94
+ function l(e) {
93
95
  return e == null;
94
96
  }
95
- function l(e, t) {
97
+ function u(e, t) {
96
98
  if (e === t || typeof e == "number" && typeof t == "number" && isNaN(e) && isNaN(t)) return !0;
97
99
  if (typeof e != "object" || !e || typeof t != "object" || !t || Object.prototype.toString.call(e) !== Object.prototype.toString.call(t)) return !1;
98
100
  if (e instanceof Date) return e.getTime() === t.getTime();
@@ -101,18 +103,18 @@ function l(e, t) {
101
103
  if (n !== Array.isArray(t)) return !1;
102
104
  if (n) {
103
105
  if (e.length !== t.length) return !1;
104
- for (let n = 0; n < e.length; n++) if (!l(e[n], t[n])) return !1;
106
+ for (let n = 0; n < e.length; n++) if (!u(e[n], t[n])) return !1;
105
107
  return !0;
106
108
  }
107
109
  let r = Object.keys(e), i = Object.keys(t);
108
110
  if (r.length !== i.length) return !1;
109
- for (let n of r) if (!Object.prototype.hasOwnProperty.call(t, n) || !l(e[n], t[n])) return !1;
111
+ for (let n of r) if (!Object.prototype.hasOwnProperty.call(t, n) || !u(e[n], t[n])) return !1;
110
112
  return !0;
111
113
  }
112
- function u(e) {
114
+ function d(e) {
113
115
  return Array.isArray(e) ? [...new Set(e)] : [];
114
116
  }
115
- function d(e, t) {
117
+ function f(e, t) {
116
118
  if (!Array.isArray(e)) return [];
117
119
  let n = [], r = /* @__PURE__ */ new Set();
118
120
  for (let i of e) {
@@ -121,33 +123,33 @@ function d(e, t) {
121
123
  }
122
124
  return n;
123
125
  }
124
- function f(e) {
126
+ function p(e) {
125
127
  if (!e) return "";
126
128
  let t = String(e);
127
129
  return t.charAt(0).toUpperCase() + t.slice(1);
128
130
  }
129
- function p(e) {
131
+ function m(e) {
130
132
  return typeof e == "object" && !!e && !Array.isArray(e);
131
133
  }
132
- function m(e, ...t) {
134
+ function h(e, ...t) {
133
135
  if (!t.length) return e;
134
136
  let n = t.shift();
135
- if (p(e) && p(n)) {
137
+ if (m(e) && m(n)) {
136
138
  for (let t in n) if (Object.prototype.hasOwnProperty.call(n, t)) {
137
139
  let r = n[t], i = e[t];
138
- p(r) ? ((!i || !p(i)) && (e[t] = {}), m(e[t], r)) : Array.isArray(r) ? (Array.isArray(i) || (e[t] = []), r.forEach((n, r) => {
139
- p(n) ? (e[t][r] || (e[t][r] = {}), m(e[t][r], n)) : e[t][r] = n;
140
+ m(r) ? ((!i || !m(i)) && (e[t] = {}), h(e[t], r)) : Array.isArray(r) ? (Array.isArray(i) || (e[t] = []), r.forEach((n, r) => {
141
+ m(n) ? (e[t][r] || (e[t][r] = {}), h(e[t][r], n)) : e[t][r] = n;
140
142
  })) : r !== void 0 && (e[t] = r);
141
143
  }
142
144
  }
143
- return m(e, ...t);
145
+ return h(e, ...t);
144
146
  }
145
- function h(e, ...t) {
147
+ function g(e, ...t) {
146
148
  if (!Array.isArray(e)) return [];
147
149
  let n = new Set(t.flat());
148
150
  return e.filter((e) => !n.has(e));
149
151
  }
150
- function g(...e) {
152
+ function _(...e) {
151
153
  if (e.length === 0) return [];
152
154
  let t = [...new Set(e[0])], n = e.slice(1);
153
155
  if (n.length === 0) return t;
@@ -155,4 +157,4 @@ function g(...e) {
155
157
  return t.filter((e) => r.every((t) => t.has(e)));
156
158
  }
157
159
  //#endregion
158
- export { t as clone, n as cloneDeep, h as difference, o as get, g as intersection, l as isEqual, c as isNil, m as merge, a as omit, r as pick, i as pickBy, s as set, u as uniq, d as uniqBy, f as upperFirst };
160
+ export { n as clone, r as cloneDeep, g as difference, s as get, _ as intersection, u as isEqual, l as isNil, h as merge, o as omit, i as pick, a as pickBy, c as set, d as uniq, f as uniqBy, p as upperFirst };
@@ -1,2 +1,87 @@
1
- import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, S as s, T as c, _ as l, a as u, b as d, c as f, d as p, f as m, g as h, h as g, i as _, j as v, k as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, v as k, w as A, x as j, y as M } from "../chunks/math-Xp7OBfoD.js";
2
- export { D as BigNumber, S as DOWN, T as UP, _ as add, u as divide, C as eq, E as formatRate, f as gt, b as gte, O as helper, p as isBigNum, m as isBool, w as isEqualTo, x as isGreaterThan, g as isGreaterThanOrEqualTo, h as isInt, l as isLessThan, k as isLessThanOrEqualTo, M as isNan, d as isNanValue, j as isNum, s as lt, t as lte, A as multiply, c as power, r as subtract, n as toBigNum, o as toDecimalPlaces, y as toInt, e as toLocaleString, v as toNum, i as toString, a as unFormatRate };
1
+ import { t as e } from "../chunks/bignumber-CC1ajqLP.js";
2
+ //#region src/utils/math.ts
3
+ var t = e.ROUND_DOWN, n = e.ROUND_UP, r = e;
4
+ function i(t) {
5
+ if (a(t)) return e(~~t);
6
+ if (!t) return e(0);
7
+ if (o(t)) return t.isNaN() ? e(0) : t;
8
+ let n = e(t);
9
+ return n.isNaN() ? e(0) : n;
10
+ }
11
+ function a(e) {
12
+ return typeof e == "boolean";
13
+ }
14
+ function o(t) {
15
+ return e.isBigNumber(t);
16
+ }
17
+ function s(e) {
18
+ return typeof e == "number" && !c(e);
19
+ }
20
+ function c(t) {
21
+ return t == null || t == null ? !1 : e(t).isNaN();
22
+ }
23
+ function l(t) {
24
+ return t == null || t == null ? !1 : e(t).isInteger();
25
+ }
26
+ function u(e, t) {
27
+ return i(e).isGreaterThan(i(t));
28
+ }
29
+ function d(e, t) {
30
+ return i(e).isLessThan(i(t));
31
+ }
32
+ function f(e, t) {
33
+ return i(e).isEqualTo(i(t));
34
+ }
35
+ function p(e, t) {
36
+ return i(e).isGreaterThanOrEqualTo(i(t));
37
+ }
38
+ function m(e, t) {
39
+ return i(e).isLessThanOrEqualTo(i(t));
40
+ }
41
+ function h(e) {
42
+ return i(e);
43
+ }
44
+ function g(e) {
45
+ return i(e).toNumber();
46
+ }
47
+ function _(e, r = !1) {
48
+ return g(i(e).integerValue(r ? n : t));
49
+ }
50
+ function v(e) {
51
+ return i(e).toString();
52
+ }
53
+ function y(e, r, a = !1) {
54
+ let o = i(e);
55
+ return g(r === void 0 ? o : o.decimalPlaces(r, a ? n : t));
56
+ }
57
+ function b(e) {
58
+ return i(e).toFormat();
59
+ }
60
+ function x(...e) {
61
+ return e.length === 0 ? 0 : g(e.reduce((e, t) => i(e).plus(i(t)), 0));
62
+ }
63
+ function S(...e) {
64
+ return e.length === 0 ? 0 : g(e.reduce((e, t) => i(e).minus(i(t))));
65
+ }
66
+ function C(...e) {
67
+ return e.length === 0 ? 0 : g(e.reduce((e, t) => i(e).times(i(t)), 1));
68
+ }
69
+ function w(...e) {
70
+ if (e.length === 0) return 0;
71
+ let t = e.map((e) => h(e));
72
+ return t.some((e) => e.isZero()) ? 0 : t.reduce((e, t) => e.dividedBy(t)).toNumber();
73
+ }
74
+ function T(e, t) {
75
+ return g(i(e).pow(i(t)));
76
+ }
77
+ function E(e, t = "%") {
78
+ let n = i(e).times(100);
79
+ return `${u(n, 0) ? y(n, 2) : 0}${t}`;
80
+ }
81
+ function D(e) {
82
+ let t = i(e).div(100);
83
+ return u(t, 0) ? y(t, 4) : 0;
84
+ }
85
+ var O = u, k = p, A = d, j = m, M = f, N = c;
86
+ //#endregion
87
+ export { r as BigNumber, t as DOWN, n as UP, x as add, w as divide, M as eq, E as formatRate, O as gt, k as gte, i as helper, o as isBigNum, a as isBool, f as isEqualTo, u as isGreaterThan, p as isGreaterThanOrEqualTo, l as isInt, d as isLessThan, m as isLessThanOrEqualTo, N as isNan, c as isNanValue, s as isNum, A as lt, j as lte, C as multiply, T as power, S as subtract, h as toBigNum, y as toDecimalPlaces, _ as toInt, b as toLocaleString, g as toNum, v as toString, D as unFormatRate };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jk-vue-comps",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "jk-vue-comps",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",