@mlightcad/common 1.0.2 → 1.1.0
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.
- package/README.md +0 -1
- package/dist/common.js +194 -141
- package/dist/common.umd.cjs +1 -1
- package/lib/AcCmLodashUtils.d.ts +38 -0
- package/lib/AcCmLodashUtils.d.ts.map +1 -0
- package/lib/AcCmLodashUtils.js +186 -0
- package/lib/AcCmLodashUtils.js.map +1 -0
- package/lib/AcCmObject.d.ts.map +1 -1
- package/lib/AcCmObject.js +1 -1
- package/lib/AcCmObject.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -7
package/README.md
CHANGED
package/dist/common.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
function W(h, e) {
|
|
1
|
+
function H(n, e) {
|
|
3
2
|
for (var t = 0; t < e.length; t++) {
|
|
4
3
|
const r = e[t];
|
|
5
4
|
if (typeof r != "string" && !Array.isArray(r)) {
|
|
6
5
|
for (const o in r)
|
|
7
|
-
if (o !== "default" && !(o in
|
|
8
|
-
const
|
|
9
|
-
|
|
6
|
+
if (o !== "default" && !(o in n)) {
|
|
7
|
+
const i = Object.getOwnPropertyDescriptor(r, o);
|
|
8
|
+
i && Object.defineProperty(n, o, i.get ? i : {
|
|
10
9
|
enumerable: !0,
|
|
11
10
|
get: () => r[o]
|
|
12
11
|
});
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
|
-
return Object.freeze(Object.defineProperty(
|
|
15
|
+
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
17
16
|
}
|
|
18
|
-
const
|
|
17
|
+
const I = {
|
|
19
18
|
aliceblue: 15792383,
|
|
20
19
|
antiquewhite: 16444375,
|
|
21
20
|
aqua: 65535,
|
|
@@ -160,7 +159,7 @@ const k = {
|
|
|
160
159
|
whitesmoke: 16119285,
|
|
161
160
|
yellow: 16776960,
|
|
162
161
|
yellowgreen: 10145074
|
|
163
|
-
},
|
|
162
|
+
}, T = [
|
|
164
163
|
0,
|
|
165
164
|
16711680,
|
|
166
165
|
16776960,
|
|
@@ -419,10 +418,10 @@ const k = {
|
|
|
419
418
|
16777215,
|
|
420
419
|
0
|
|
421
420
|
];
|
|
422
|
-
function b(
|
|
423
|
-
return Math.max(e, Math.min(t,
|
|
421
|
+
function b(n, e, t) {
|
|
422
|
+
return Math.max(e, Math.min(t, n));
|
|
424
423
|
}
|
|
425
|
-
const
|
|
424
|
+
const O = class O {
|
|
426
425
|
constructor() {
|
|
427
426
|
this._colorIndex = 256, this._color = null, this._colorName = null;
|
|
428
427
|
}
|
|
@@ -465,14 +464,14 @@ const x = class x {
|
|
|
465
464
|
return this._colorIndex;
|
|
466
465
|
}
|
|
467
466
|
set colorIndex(e) {
|
|
468
|
-
e == null ? this._colorIndex = null : (this._colorIndex = b(e, 0, 256), this._color =
|
|
467
|
+
e == null ? this._colorIndex = null : (this._colorIndex = b(e, 0, 256), this._color = T[e], this._colorName = this.getColorNameByValue(this._color));
|
|
469
468
|
}
|
|
470
469
|
get colorName() {
|
|
471
470
|
return this._colorName;
|
|
472
471
|
}
|
|
473
472
|
set colorName(e) {
|
|
474
473
|
if (e) {
|
|
475
|
-
const t =
|
|
474
|
+
const t = I[e.toLowerCase()];
|
|
476
475
|
t !== void 0 ? (this._colorName = e, this._color = t, this._colorIndex = this.getColorIndexByValue(this._color)) : console.warn("Unknown color: " + e);
|
|
477
476
|
} else
|
|
478
477
|
this._colorName = null;
|
|
@@ -499,15 +498,15 @@ const x = class x {
|
|
|
499
498
|
return this.setRGB(e, e, e), this;
|
|
500
499
|
}
|
|
501
500
|
setRGB(e, t, r) {
|
|
502
|
-
const o = Math.round(b(e, 0, 255)),
|
|
503
|
-
return this.color = (o << 16) + (
|
|
501
|
+
const o = Math.round(b(e, 0, 255)), i = Math.round(b(t, 0, 255)), l = Math.round(b(r, 0, 255));
|
|
502
|
+
return this.color = (o << 16) + (i << 8) + l, this;
|
|
504
503
|
}
|
|
505
504
|
setColorName(e) {
|
|
506
|
-
const t =
|
|
505
|
+
const t = I[e.toLowerCase()];
|
|
507
506
|
return t !== void 0 ? this.color = t : console.warn("Unknown color " + e), this;
|
|
508
507
|
}
|
|
509
508
|
clone() {
|
|
510
|
-
const e = new
|
|
509
|
+
const e = new O();
|
|
511
510
|
return e.colorIndex = this.colorIndex, e.color = this.color, e._colorName = this._colorName, this;
|
|
512
511
|
}
|
|
513
512
|
copy(e) {
|
|
@@ -520,22 +519,22 @@ const x = class x {
|
|
|
520
519
|
return this.isByLayer ? "ByLayer" : this.isByBlock ? "ByBlock" : this.colorName ? this.colorName : this.hexColor;
|
|
521
520
|
}
|
|
522
521
|
getColorNameByValue(e) {
|
|
523
|
-
for (const [t, r] of Object.entries(
|
|
522
|
+
for (const [t, r] of Object.entries(I))
|
|
524
523
|
if (r === e)
|
|
525
524
|
return t;
|
|
526
525
|
return null;
|
|
527
526
|
}
|
|
528
527
|
getColorIndexByValue(e) {
|
|
529
|
-
const t =
|
|
528
|
+
const t = T.length - 1;
|
|
530
529
|
for (let r = 1; r < t; ++r)
|
|
531
|
-
if (
|
|
530
|
+
if (T[r] === e)
|
|
532
531
|
return r;
|
|
533
532
|
return null;
|
|
534
533
|
}
|
|
535
534
|
};
|
|
536
|
-
|
|
537
|
-
let
|
|
538
|
-
const
|
|
535
|
+
O.NAMES = I;
|
|
536
|
+
let R = O;
|
|
537
|
+
const te = {
|
|
539
538
|
/**
|
|
540
539
|
* Throw error ILLEGAL_PARAMETERS when cannot instantiate from given parameter
|
|
541
540
|
*/
|
|
@@ -571,7 +570,7 @@ const re = {
|
|
|
571
570
|
return new Error("Not implemented yet");
|
|
572
571
|
}
|
|
573
572
|
};
|
|
574
|
-
class
|
|
573
|
+
class re {
|
|
575
574
|
/**
|
|
576
575
|
* Creates {@link AcCmEventDispatcher} object.
|
|
577
576
|
*/
|
|
@@ -592,8 +591,8 @@ class oe {
|
|
|
592
591
|
if (this._listeners === void 0) return;
|
|
593
592
|
const o = this._listeners[e];
|
|
594
593
|
if (o !== void 0) {
|
|
595
|
-
const
|
|
596
|
-
|
|
594
|
+
const i = o.indexOf(t);
|
|
595
|
+
i !== -1 && o.splice(i, 1);
|
|
597
596
|
}
|
|
598
597
|
}
|
|
599
598
|
/**
|
|
@@ -606,8 +605,8 @@ class oe {
|
|
|
606
605
|
if (r !== void 0) {
|
|
607
606
|
e.target = this;
|
|
608
607
|
const o = r.slice(0);
|
|
609
|
-
for (let
|
|
610
|
-
o[
|
|
608
|
+
for (let i = 0, l = o.length; i < l; i++)
|
|
609
|
+
o[i].call(this, e);
|
|
611
610
|
}
|
|
612
611
|
}
|
|
613
612
|
}
|
|
@@ -645,15 +644,15 @@ class U {
|
|
|
645
644
|
r.call(null, e, ...t);
|
|
646
645
|
}
|
|
647
646
|
}
|
|
648
|
-
var
|
|
649
|
-
function
|
|
650
|
-
return
|
|
647
|
+
var K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
648
|
+
function z(n) {
|
|
649
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
651
650
|
}
|
|
652
651
|
var D = { exports: {} };
|
|
653
|
-
(function(
|
|
652
|
+
(function(n) {
|
|
654
653
|
(function(e, t) {
|
|
655
|
-
|
|
656
|
-
})(
|
|
654
|
+
n.exports ? n.exports = t() : e.log = t();
|
|
655
|
+
})(K, function() {
|
|
657
656
|
var e = function() {
|
|
658
657
|
}, t = "undefined", r = typeof window !== t && typeof window.navigator !== t && /Trident\/|MSIE /.test(window.navigator.userAgent), o = [
|
|
659
658
|
"trace",
|
|
@@ -661,46 +660,46 @@ var D = { exports: {} };
|
|
|
661
660
|
"info",
|
|
662
661
|
"warn",
|
|
663
662
|
"error"
|
|
664
|
-
],
|
|
665
|
-
function g(
|
|
666
|
-
var
|
|
667
|
-
if (typeof
|
|
668
|
-
return
|
|
663
|
+
], i = {}, l = null;
|
|
664
|
+
function g(a, h) {
|
|
665
|
+
var s = a[h];
|
|
666
|
+
if (typeof s.bind == "function")
|
|
667
|
+
return s.bind(a);
|
|
669
668
|
try {
|
|
670
|
-
return Function.prototype.bind.call(
|
|
669
|
+
return Function.prototype.bind.call(s, a);
|
|
671
670
|
} catch {
|
|
672
671
|
return function() {
|
|
673
|
-
return Function.prototype.apply.apply(
|
|
672
|
+
return Function.prototype.apply.apply(s, [a, arguments]);
|
|
674
673
|
};
|
|
675
674
|
}
|
|
676
675
|
}
|
|
677
676
|
function p() {
|
|
678
677
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
679
678
|
}
|
|
680
|
-
function m(
|
|
681
|
-
return
|
|
679
|
+
function m(a) {
|
|
680
|
+
return a === "debug" && (a = "log"), typeof console === t ? !1 : a === "trace" && r ? p : console[a] !== void 0 ? g(console, a) : console.log !== void 0 ? g(console, "log") : e;
|
|
682
681
|
}
|
|
683
|
-
function
|
|
684
|
-
for (var
|
|
685
|
-
var
|
|
686
|
-
this[
|
|
682
|
+
function y() {
|
|
683
|
+
for (var a = this.getLevel(), h = 0; h < o.length; h++) {
|
|
684
|
+
var s = o[h];
|
|
685
|
+
this[s] = h < a ? e : this.methodFactory(s, a, this.name);
|
|
687
686
|
}
|
|
688
|
-
if (this.log = this.debug, typeof console === t &&
|
|
687
|
+
if (this.log = this.debug, typeof console === t && a < this.levels.SILENT)
|
|
689
688
|
return "No console available for logging";
|
|
690
689
|
}
|
|
691
|
-
function
|
|
690
|
+
function x(a) {
|
|
692
691
|
return function() {
|
|
693
|
-
typeof console !== t && (
|
|
692
|
+
typeof console !== t && (y.call(this), this[a].apply(this, arguments));
|
|
694
693
|
};
|
|
695
694
|
}
|
|
696
|
-
function d(
|
|
697
|
-
return m(
|
|
695
|
+
function d(a, h, s) {
|
|
696
|
+
return m(a) || x.apply(this, arguments);
|
|
698
697
|
}
|
|
699
|
-
function M(
|
|
700
|
-
var
|
|
701
|
-
typeof
|
|
702
|
-
function
|
|
703
|
-
var u = (o[
|
|
698
|
+
function M(a, h) {
|
|
699
|
+
var s = this, E, N, v, f = "loglevel";
|
|
700
|
+
typeof a == "string" ? f += ":" + a : typeof a == "symbol" && (f = void 0);
|
|
701
|
+
function V(c) {
|
|
702
|
+
var u = (o[c] || "silent").toUpperCase();
|
|
704
703
|
if (!(typeof window === t || !f)) {
|
|
705
704
|
try {
|
|
706
705
|
window.localStorage[f] = u;
|
|
@@ -714,21 +713,21 @@ var D = { exports: {} };
|
|
|
714
713
|
}
|
|
715
714
|
}
|
|
716
715
|
function B() {
|
|
717
|
-
var
|
|
716
|
+
var c;
|
|
718
717
|
if (!(typeof window === t || !f)) {
|
|
719
718
|
try {
|
|
720
|
-
|
|
719
|
+
c = window.localStorage[f];
|
|
721
720
|
} catch {
|
|
722
721
|
}
|
|
723
|
-
if (typeof
|
|
722
|
+
if (typeof c === t)
|
|
724
723
|
try {
|
|
725
|
-
var u = window.document.cookie,
|
|
726
|
-
|
|
727
|
-
u.slice(
|
|
724
|
+
var u = window.document.cookie, k = encodeURIComponent(f), P = u.indexOf(k + "=");
|
|
725
|
+
P !== -1 && (c = /^([^;]+)/.exec(
|
|
726
|
+
u.slice(P + k.length + 1)
|
|
728
727
|
)[1]);
|
|
729
728
|
} catch {
|
|
730
729
|
}
|
|
731
|
-
return
|
|
730
|
+
return s.levels[c] === void 0 && (c = void 0), c;
|
|
732
731
|
}
|
|
733
732
|
}
|
|
734
733
|
function $() {
|
|
@@ -743,71 +742,120 @@ var D = { exports: {} };
|
|
|
743
742
|
}
|
|
744
743
|
}
|
|
745
744
|
}
|
|
746
|
-
function w(
|
|
747
|
-
var u =
|
|
748
|
-
if (typeof u == "string" &&
|
|
745
|
+
function w(c) {
|
|
746
|
+
var u = c;
|
|
747
|
+
if (typeof u == "string" && s.levels[u.toUpperCase()] !== void 0 && (u = s.levels[u.toUpperCase()]), typeof u == "number" && u >= 0 && u <= s.levels.SILENT)
|
|
749
748
|
return u;
|
|
750
|
-
throw new TypeError("log.setLevel() called with invalid level: " +
|
|
749
|
+
throw new TypeError("log.setLevel() called with invalid level: " + c);
|
|
751
750
|
}
|
|
752
|
-
|
|
751
|
+
s.name = a, s.levels = {
|
|
753
752
|
TRACE: 0,
|
|
754
753
|
DEBUG: 1,
|
|
755
754
|
INFO: 2,
|
|
756
755
|
WARN: 3,
|
|
757
756
|
ERROR: 4,
|
|
758
757
|
SILENT: 5
|
|
759
|
-
},
|
|
760
|
-
return
|
|
761
|
-
},
|
|
762
|
-
return
|
|
763
|
-
},
|
|
764
|
-
|
|
765
|
-
},
|
|
766
|
-
|
|
767
|
-
},
|
|
768
|
-
|
|
769
|
-
},
|
|
770
|
-
|
|
771
|
-
},
|
|
772
|
-
if (
|
|
773
|
-
for (var
|
|
774
|
-
|
|
775
|
-
},
|
|
776
|
-
|
|
758
|
+
}, s.methodFactory = h || d, s.getLevel = function() {
|
|
759
|
+
return v ?? N ?? E;
|
|
760
|
+
}, s.setLevel = function(c, u) {
|
|
761
|
+
return v = w(c), u !== !1 && V(v), y.call(s);
|
|
762
|
+
}, s.setDefaultLevel = function(c) {
|
|
763
|
+
N = w(c), B() || s.setLevel(c, !1);
|
|
764
|
+
}, s.resetLevel = function() {
|
|
765
|
+
v = null, $(), y.call(s);
|
|
766
|
+
}, s.enableAll = function(c) {
|
|
767
|
+
s.setLevel(s.levels.TRACE, c);
|
|
768
|
+
}, s.disableAll = function(c) {
|
|
769
|
+
s.setLevel(s.levels.SILENT, c);
|
|
770
|
+
}, s.rebuild = function() {
|
|
771
|
+
if (l !== s && (E = w(l.getLevel())), y.call(s), l === s)
|
|
772
|
+
for (var c in i)
|
|
773
|
+
i[c].rebuild();
|
|
774
|
+
}, E = w(
|
|
775
|
+
l ? l.getLevel() : "WARN"
|
|
777
776
|
);
|
|
778
777
|
var S = B();
|
|
779
|
-
S != null && (
|
|
778
|
+
S != null && (v = w(S)), y.call(s);
|
|
780
779
|
}
|
|
781
|
-
|
|
782
|
-
if (typeof
|
|
780
|
+
l = new M(), l.getLogger = function(h) {
|
|
781
|
+
if (typeof h != "symbol" && typeof h != "string" || h === "")
|
|
783
782
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
784
|
-
var
|
|
785
|
-
return
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
)),
|
|
783
|
+
var s = i[h];
|
|
784
|
+
return s || (s = i[h] = new M(
|
|
785
|
+
h,
|
|
786
|
+
l.methodFactory
|
|
787
|
+
)), s;
|
|
789
788
|
};
|
|
790
|
-
var
|
|
791
|
-
return
|
|
792
|
-
return typeof window !== t && window.log ===
|
|
793
|
-
},
|
|
794
|
-
return
|
|
795
|
-
},
|
|
789
|
+
var j = typeof window !== t ? window.log : void 0;
|
|
790
|
+
return l.noConflict = function() {
|
|
791
|
+
return typeof window !== t && window.log === l && (window.log = j), l;
|
|
792
|
+
}, l.getLoggers = function() {
|
|
793
|
+
return i;
|
|
794
|
+
}, l.default = l, l;
|
|
796
795
|
});
|
|
797
796
|
})(D);
|
|
798
797
|
var q = D.exports;
|
|
799
|
-
const
|
|
798
|
+
const W = /* @__PURE__ */ z(q), Y = /* @__PURE__ */ H({
|
|
800
799
|
__proto__: null,
|
|
801
|
-
default:
|
|
802
|
-
}, [q]), ne = !0, C =
|
|
800
|
+
default: W
|
|
801
|
+
}, [q]), ne = !0, C = Y;
|
|
803
802
|
C.setLevel("debug");
|
|
804
|
-
const
|
|
803
|
+
const oe = (n) => {
|
|
805
804
|
try {
|
|
806
|
-
C.setLevel(
|
|
805
|
+
C.setLevel(n);
|
|
807
806
|
} catch (e) {
|
|
808
807
|
C.setLevel("error"), C.error(e);
|
|
809
808
|
}
|
|
810
809
|
};
|
|
810
|
+
function A(n) {
|
|
811
|
+
return n === null || typeof n != "object" ? n : Array.isArray(n) ? [...n] : { ...n };
|
|
812
|
+
}
|
|
813
|
+
function Z(n, ...e) {
|
|
814
|
+
for (const t of e)
|
|
815
|
+
if (t)
|
|
816
|
+
for (const r in t)
|
|
817
|
+
Object.prototype.hasOwnProperty.call(t, r) && n[r] === void 0 && (n[r] = t[r]);
|
|
818
|
+
return n;
|
|
819
|
+
}
|
|
820
|
+
function J(n, e) {
|
|
821
|
+
return n != null && Object.prototype.hasOwnProperty.call(n, e);
|
|
822
|
+
}
|
|
823
|
+
function X(n) {
|
|
824
|
+
return n == null ? !0 : Array.isArray(n) || typeof n == "string" ? n.length === 0 : n instanceof Map || n instanceof Set ? n.size === 0 : typeof n == "object" ? Object.keys(n).length === 0 : !1;
|
|
825
|
+
}
|
|
826
|
+
function L(n, e) {
|
|
827
|
+
if (n === e)
|
|
828
|
+
return !0;
|
|
829
|
+
if (n == null || e == null)
|
|
830
|
+
return n === e;
|
|
831
|
+
if (typeof n != typeof e)
|
|
832
|
+
return !1;
|
|
833
|
+
if (typeof n != "object")
|
|
834
|
+
return n === e;
|
|
835
|
+
if (Array.isArray(n) !== Array.isArray(e))
|
|
836
|
+
return !1;
|
|
837
|
+
if (Array.isArray(n)) {
|
|
838
|
+
if (n.length !== e.length)
|
|
839
|
+
return !1;
|
|
840
|
+
for (let o = 0; o < n.length; o++)
|
|
841
|
+
if (!L(n[o], e[o]))
|
|
842
|
+
return !1;
|
|
843
|
+
return !0;
|
|
844
|
+
}
|
|
845
|
+
const t = Object.keys(n), r = Object.keys(e);
|
|
846
|
+
if (t.length !== r.length)
|
|
847
|
+
return !1;
|
|
848
|
+
for (const o of t)
|
|
849
|
+
if (!Object.prototype.hasOwnProperty.call(
|
|
850
|
+
e,
|
|
851
|
+
o
|
|
852
|
+
) || !L(
|
|
853
|
+
n[o],
|
|
854
|
+
e[o]
|
|
855
|
+
))
|
|
856
|
+
return !1;
|
|
857
|
+
return !0;
|
|
858
|
+
}
|
|
811
859
|
class F {
|
|
812
860
|
/**
|
|
813
861
|
* Create one object to store attributes. For performance reason, values of attributes passed to constructor
|
|
@@ -821,7 +869,7 @@ class F {
|
|
|
821
869
|
modelChanged: new U()
|
|
822
870
|
}, this._changing = !1, this._previousAttributes = {}, this._pending = !1;
|
|
823
871
|
const r = e || {};
|
|
824
|
-
t &&
|
|
872
|
+
t && Z(r, t), this.attributes = r, this.changed = {};
|
|
825
873
|
}
|
|
826
874
|
/**
|
|
827
875
|
* For strongly-typed access to attributes, use the `get` method only privately in public getter properties.
|
|
@@ -837,12 +885,12 @@ class F {
|
|
|
837
885
|
if (e == null) return this;
|
|
838
886
|
let o;
|
|
839
887
|
typeof e == "object" ? (o = e, r = t) : (o = {}, o[e] = t), r || (r = {});
|
|
840
|
-
const
|
|
841
|
-
this._changing = !0, p || (this._previousAttributes =
|
|
842
|
-
const m = this.attributes,
|
|
888
|
+
const i = r.unset, l = r.silent, g = [], p = this._changing;
|
|
889
|
+
this._changing = !0, p || (this._previousAttributes = A(this.attributes), this.changed = {});
|
|
890
|
+
const m = this.attributes, y = this.changed, x = this._previousAttributes;
|
|
843
891
|
for (const d in o)
|
|
844
|
-
t = o[d],
|
|
845
|
-
if (!
|
|
892
|
+
t = o[d], L(m[d], t) || g.push(d), L(x[d], t) ? delete y[d] : y[d] = t, i ? delete m[d] : m[d] = t;
|
|
893
|
+
if (!l) {
|
|
846
894
|
g.length && (this._pending = r);
|
|
847
895
|
for (let d = 0; d < g.length; d++)
|
|
848
896
|
this.events.attrChanged.dispatch({
|
|
@@ -853,7 +901,7 @@ class F {
|
|
|
853
901
|
});
|
|
854
902
|
}
|
|
855
903
|
if (p) return this;
|
|
856
|
-
if (!
|
|
904
|
+
if (!l)
|
|
857
905
|
for (; this._pending; )
|
|
858
906
|
r = this._pending, this._pending = !1, this.events.modelChanged.dispatch({
|
|
859
907
|
object: this,
|
|
@@ -869,7 +917,7 @@ class F {
|
|
|
869
917
|
* If you specify an attribute name, determine if that attribute has changed.
|
|
870
918
|
*/
|
|
871
919
|
hasChanged(e) {
|
|
872
|
-
return e == null ? !
|
|
920
|
+
return e == null ? !X(this.changed) : J(this.changed, e);
|
|
873
921
|
}
|
|
874
922
|
/**
|
|
875
923
|
* Return an object containing all the attributes that have changed. Useful for determining what parts
|
|
@@ -879,11 +927,11 @@ class F {
|
|
|
879
927
|
* the model, determining if there *would be* a change.
|
|
880
928
|
*/
|
|
881
929
|
changedAttributes(e) {
|
|
882
|
-
if (!e) return this.hasChanged() ?
|
|
930
|
+
if (!e) return this.hasChanged() ? A(this.changed) : {};
|
|
883
931
|
const t = this._changing ? this._previousAttributes : this.attributes, r = {};
|
|
884
932
|
for (const o in e) {
|
|
885
|
-
const
|
|
886
|
-
|
|
933
|
+
const i = e[o];
|
|
934
|
+
L(t[o], i) || (r[o] = i);
|
|
887
935
|
}
|
|
888
936
|
return r;
|
|
889
937
|
}
|
|
@@ -897,13 +945,13 @@ class F {
|
|
|
897
945
|
* Get all of the attributes of the model at the time of the previous `"change"` event.
|
|
898
946
|
*/
|
|
899
947
|
previousAttributes() {
|
|
900
|
-
return
|
|
948
|
+
return A(this._previousAttributes);
|
|
901
949
|
}
|
|
902
950
|
/**
|
|
903
951
|
* Create a new model with identical attributes to this one.
|
|
904
952
|
*/
|
|
905
953
|
clone() {
|
|
906
|
-
const e =
|
|
954
|
+
const e = A(this.attributes);
|
|
907
955
|
return new F(e);
|
|
908
956
|
}
|
|
909
957
|
}
|
|
@@ -966,7 +1014,7 @@ class _ {
|
|
|
966
1014
|
return this.entries.delete(e);
|
|
967
1015
|
}
|
|
968
1016
|
}
|
|
969
|
-
class
|
|
1017
|
+
class se {
|
|
970
1018
|
/**
|
|
971
1019
|
* Converts a byte count to a human-readable string using KB, MB, or GB.
|
|
972
1020
|
*
|
|
@@ -976,11 +1024,11 @@ class ie {
|
|
|
976
1024
|
*/
|
|
977
1025
|
static formatBytes(e, t = 2) {
|
|
978
1026
|
if (e === 0) return "0 B";
|
|
979
|
-
const r = 1024, o = Math.max(0, t),
|
|
980
|
-
return `${parseFloat(g.toFixed(o))} ${
|
|
1027
|
+
const r = 1024, o = Math.max(0, t), i = ["B", "KB", "MB", "GB", "TB"], l = Math.floor(Math.log(e) / Math.log(r)), g = e / Math.pow(r, l);
|
|
1028
|
+
return `${parseFloat(g.toFixed(o))} ${i[l]}`;
|
|
981
1029
|
}
|
|
982
1030
|
}
|
|
983
|
-
class
|
|
1031
|
+
class ie {
|
|
984
1032
|
constructor(e) {
|
|
985
1033
|
this.name = e;
|
|
986
1034
|
}
|
|
@@ -991,7 +1039,7 @@ class le {
|
|
|
991
1039
|
throw new Error("run() must be implemented by subclass");
|
|
992
1040
|
}
|
|
993
1041
|
}
|
|
994
|
-
class
|
|
1042
|
+
class le {
|
|
995
1043
|
constructor() {
|
|
996
1044
|
this.tasks = [], this.onProgress = () => {
|
|
997
1045
|
}, this.onComplete = () => {
|
|
@@ -1031,20 +1079,20 @@ class ae {
|
|
|
1031
1079
|
const t = this.tasks.length;
|
|
1032
1080
|
let r = e;
|
|
1033
1081
|
for (let o = 0; o < t; o++) {
|
|
1034
|
-
const
|
|
1082
|
+
const i = this.tasks[o];
|
|
1035
1083
|
try {
|
|
1036
|
-
r = await new Promise((
|
|
1084
|
+
r = await new Promise((l, g) => {
|
|
1037
1085
|
setTimeout(async () => {
|
|
1038
1086
|
try {
|
|
1039
|
-
const p = await
|
|
1040
|
-
this.onProgress((o + 1) / t,
|
|
1087
|
+
const p = await i.run(r);
|
|
1088
|
+
this.onProgress((o + 1) / t, i), l(p);
|
|
1041
1089
|
} catch (p) {
|
|
1042
1090
|
g(p);
|
|
1043
1091
|
}
|
|
1044
1092
|
}, 0);
|
|
1045
1093
|
});
|
|
1046
|
-
} catch (
|
|
1047
|
-
this.onError(
|
|
1094
|
+
} catch (l) {
|
|
1095
|
+
this.onError(l, o, i);
|
|
1048
1096
|
return;
|
|
1049
1097
|
}
|
|
1050
1098
|
}
|
|
@@ -1128,15 +1176,15 @@ class Q {
|
|
|
1128
1176
|
*/
|
|
1129
1177
|
getHandler(e) {
|
|
1130
1178
|
for (let t = 0, r = this.handlers.length; t < r; t += 2) {
|
|
1131
|
-
const o = this.handlers[t],
|
|
1179
|
+
const o = this.handlers[t], i = this.handlers[t + 1];
|
|
1132
1180
|
if (o.global && (o.lastIndex = 0), o.test(e))
|
|
1133
|
-
return
|
|
1181
|
+
return i;
|
|
1134
1182
|
}
|
|
1135
1183
|
return null;
|
|
1136
1184
|
}
|
|
1137
1185
|
}
|
|
1138
1186
|
const ee = /* @__PURE__ */ new Q();
|
|
1139
|
-
class
|
|
1187
|
+
class ae {
|
|
1140
1188
|
/**
|
|
1141
1189
|
* Creates a new AcCmLoader instance.
|
|
1142
1190
|
* @param manager The loadingManager for the loader to use. Default is DefaultLoadingManager.
|
|
@@ -1208,19 +1256,24 @@ class he {
|
|
|
1208
1256
|
}
|
|
1209
1257
|
}
|
|
1210
1258
|
export {
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1259
|
+
R as AcCmColor,
|
|
1260
|
+
te as AcCmErrors,
|
|
1261
|
+
re as AcCmEventDispatcher,
|
|
1214
1262
|
U as AcCmEventManager,
|
|
1215
|
-
|
|
1263
|
+
ae as AcCmLoader,
|
|
1216
1264
|
Q as AcCmLoadingManager,
|
|
1217
1265
|
F as AcCmObject,
|
|
1218
1266
|
_ as AcCmPerformanceCollector,
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1267
|
+
ie as AcCmTask,
|
|
1268
|
+
le as AcCmTaskScheduler,
|
|
1269
|
+
se as AcTrStringUtil,
|
|
1222
1270
|
ne as DEBUG_MODE,
|
|
1223
1271
|
ee as DefaultLoadingManager,
|
|
1272
|
+
A as clone,
|
|
1273
|
+
Z as defaults,
|
|
1274
|
+
J as has,
|
|
1275
|
+
X as isEmpty,
|
|
1276
|
+
L as isEqual,
|
|
1224
1277
|
C as log,
|
|
1225
|
-
|
|
1278
|
+
oe as setLogLevel
|
|
1226
1279
|
};
|
package/dist/common.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(h,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","lodash-es"],f):(h=typeof globalThis<"u"?globalThis:h||self,f(h.common={},h.lodashEs))})(this,function(h,f){"use strict";function $(c,e){for(var t=0;t<e.length;t++){const r=e[t];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in c)){const i=Object.getOwnPropertyDescriptor(r,n);i&&Object.defineProperty(c,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}const I={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},T=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215,0];function L(c,e,t){return Math.max(e,Math.min(t,c))}const k=class k{constructor(){this._colorIndex=256,this._color=null,this._colorName=null}get color(){return this._color}set color(e){e==null?this._color=null:(this._color=Math.round(L(e,0,256*256*256-1)),this._colorIndex=this.getColorIndexByValue(this._color),this._colorName=this.getColorNameByValue(this._color))}get hexColor(){if(this._color&&this._color>0&&this._color<=16777215){let e=this._color.toString(16).toUpperCase();for(;e.length<6;)e="0"+e;return`0x${e}`}return""}get cssColor(){return`rgb(${this.red},${this.green},${this.blue})`}get red(){return this.color?this.color>>16&255:null}get green(){return this.color?this.color>>8&255:null}get blue(){return this.color?this.color&255:null}get colorIndex(){return this._colorIndex}set colorIndex(e){e==null?this._colorIndex=null:(this._colorIndex=L(e,0,256),this._color=T[e],this._colorName=this.getColorNameByValue(this._color))}get colorName(){return this._colorName}set colorName(e){if(e){const t=I[e.toLowerCase()];t!==void 0?(this._colorName=e,this._color=t,this._colorIndex=this.getColorIndexByValue(this._color)):console.warn("Unknown color: "+e)}else this._colorName=null}get hasColorName(){return this._colorName==null}get hasColorIndex(){return this._colorIndex==null}get isByLayer(){return this.colorIndex==256}setByLayer(){return this.colorIndex=256,this}get isByBlock(){return this.colorIndex==0}setByBlock(){return this.colorIndex=0,this}setScalar(e){return this.setRGB(e,e,e),this}setRGB(e,t,r){const n=Math.round(L(e,0,255)),i=Math.round(L(t,0,255)),s=Math.round(L(r,0,255));return this.color=(n<<16)+(i<<8)+s,this}setColorName(e){const t=I[e.toLowerCase()];return t!==void 0?this.color=t:console.warn("Unknown color "+e),this}clone(){const e=new k;return e.colorIndex=this.colorIndex,e.color=this.color,e._colorName=this._colorName,this}copy(e){return this.colorIndex=e.colorIndex,this.color=e.color,this._colorName=e._colorName,this}equals(e){return e.color==this.color&&e.colorIndex==this.colorIndex&&e._colorName==this._colorName}toString(){return this.isByLayer?"ByLayer":this.isByBlock?"ByBlock":this.colorName?this.colorName:this.hexColor}getColorNameByValue(e){for(const[t,r]of Object.entries(I))if(r===e)return t;return null}getColorIndexByValue(e){const t=T.length-1;for(let r=1;r<t;++r)if(T[r]===e)return r;return null}};k.NAMES=I;let O=k;const G={get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")},get ZERO_DIVISION(){return new Error("Zero division")},get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")},get INFINITE_LOOP(){return new Error("Infinite loop")},get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")},get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")},get NOT_IMPLEMENTED(){return new Error("Not implemented yet")}};class H{constructor(){this._listeners={}}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(t)===-1&&r[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const n=this._listeners[e];if(n!==void 0){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const n=r.slice(0);for(let i=0,s=n.length;i<s;i++)n[i].call(this,e)}}}class M{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}removeEventListener(e){this.listeners=this.listeners.filter(t=>t!==e)}replaceEventListener(e){this.removeEventListener(e),this.addEventListener(e)}dispatch(e,...t){for(const r of this.listeners)r.call(null,e,...t)}}var z=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function K(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var P={exports:{}};(function(c){(function(e,t){c.exports?c.exports=t():e.log=t()})(z,function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},s=null;function p(l,u){var o=l[u];if(typeof o.bind=="function")return o.bind(l);try{return Function.prototype.bind.call(o,l)}catch{return function(){return Function.prototype.apply.apply(o,[l,arguments])}}}function v(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function b(l){return l==="debug"&&(l="log"),typeof console===t?!1:l==="trace"&&r?v:console[l]!==void 0?p(console,l):console.log!==void 0?p(console,"log"):e}function y(){for(var l=this.getLevel(),u=0;u<n.length;u++){var o=n[u];this[o]=u<l?e:this.methodFactory(o,l,this.name)}if(this.log=this.debug,typeof console===t&&l<this.levels.SILENT)return"No console available for logging"}function B(l){return function(){typeof console!==t&&(y.call(this),this[l].apply(this,arguments))}}function g(l,u,o){return b(l)||B.apply(this,arguments)}function q(l,u){var o=this,A,S,_,m="loglevel";typeof l=="string"?m+=":"+l:typeof l=="symbol"&&(m=void 0);function re(a){var d=(n[a]||"silent").toUpperCase();if(!(typeof window===t||!m)){try{window.localStorage[m]=d;return}catch{}try{window.document.cookie=encodeURIComponent(m)+"="+d+";"}catch{}}}function F(){var a;if(!(typeof window===t||!m)){try{a=window.localStorage[m]}catch{}if(typeof a===t)try{var d=window.document.cookie,N=encodeURIComponent(m),V=d.indexOf(N+"=");V!==-1&&(a=/^([^;]+)/.exec(d.slice(V+N.length+1))[1])}catch{}return o.levels[a]===void 0&&(a=void 0),a}}function ne(){if(!(typeof window===t||!m)){try{window.localStorage.removeItem(m)}catch{}try{window.document.cookie=encodeURIComponent(m)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function C(a){var d=a;if(typeof d=="string"&&o.levels[d.toUpperCase()]!==void 0&&(d=o.levels[d.toUpperCase()]),typeof d=="number"&&d>=0&&d<=o.levels.SILENT)return d;throw new TypeError("log.setLevel() called with invalid level: "+a)}o.name=l,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=u||g,o.getLevel=function(){return _??S??A},o.setLevel=function(a,d){return _=C(a),d!==!1&&re(_),y.call(o)},o.setDefaultLevel=function(a){S=C(a),F()||o.setLevel(a,!1)},o.resetLevel=function(){_=null,ne(),y.call(o)},o.enableAll=function(a){o.setLevel(o.levels.TRACE,a)},o.disableAll=function(a){o.setLevel(o.levels.SILENT,a)},o.rebuild=function(){if(s!==o&&(A=C(s.getLevel())),y.call(o),s===o)for(var a in i)i[a].rebuild()},A=C(s?s.getLevel():"WARN");var j=F();j!=null&&(_=C(j)),y.call(o)}s=new q,s.getLogger=function(u){if(typeof u!="symbol"&&typeof u!="string"||u==="")throw new TypeError("You must supply a name when creating a logger.");var o=i[u];return o||(o=i[u]=new q(u,s.methodFactory)),o};var te=typeof window!==t?window.log:void 0;return s.noConflict=function(){return typeof window!==t&&window.log===s&&(window.log=te),s},s.getLoggers=function(){return i},s.default=s,s})})(P);var R=P.exports;const W=$({__proto__:null,default:K(R)},[R]),Y=!0,E=W;E.setLevel("debug");const Z=c=>{try{E.setLevel(c)}catch(e){E.setLevel("error"),E.error(e)}};class x{constructor(e,t){this.events={attrChanged:new M,modelChanged:new M},this._changing=!1,this._previousAttributes={},this._pending=!1;const r=e||{};t&&f.defaults(r,t),this.attributes=r,this.changed={}}get(e){return this.attributes[e]}set(e,t,r){if(e==null)return this;let n;typeof e=="object"?(n=e,r=t):(n={},n[e]=t),r||(r={});const i=r.unset,s=r.silent,p=[],v=this._changing;this._changing=!0,v||(this._previousAttributes=f.clone(this.attributes),this.changed={});const b=this.attributes,y=this.changed,B=this._previousAttributes;for(const g in n)t=n[g],f.isEqual(b[g],t)||p.push(g),f.isEqual(B[g],t)?delete y[g]:y[g]=t,i?delete b[g]:b[g]=t;if(!s){p.length&&(this._pending=r);for(let g=0;g<p.length;g++)this.events.attrChanged.dispatch({object:this,attrName:p[g],attrValue:b[p[g]],options:r})}if(v)return this;if(!s)for(;this._pending;)r=this._pending,this._pending=!1,this.events.modelChanged.dispatch({object:this,options:r});return this._pending=!1,this._changing=!1,this}has(e){return this.get(e)!=null}hasChanged(e){return e==null?!f.isEmpty(this.changed):f.has(this.changed,e)}changedAttributes(e){if(!e)return this.hasChanged()?f.clone(this.changed):{};const t=this._changing?this._previousAttributes:this.attributes,r={};for(const n in e){const i=e[n];f.isEqual(t[n],i)||(r[n]=i)}return r}previous(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]}previousAttributes(){return f.clone(this._previousAttributes)}clone(){const e=f.clone(this.attributes);return new x(e)}}class w{constructor(){this.entries=new Map}static getInstance(){return w.instance||(w.instance=new w),w.instance}collect(e){this.entries.set(e.name,e)}printAll(){for(const[e,t]of this.entries)console.log(`${e}:`),console.log(t.format())}clear(){this.entries.clear()}getAll(){return Array.from(this.entries.values())}getEntry(e){return this.entries.get(e)}remove(e){return this.entries.delete(e)}}class J{static formatBytes(e,t=2){if(e===0)return"0 B";const r=1024,n=Math.max(0,t),i=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(e)/Math.log(r)),p=e/Math.pow(r,s);return`${parseFloat(p.toFixed(n))} ${i[s]}`}}class X{constructor(e){this.name=e}run(e){throw new Error("run() must be implemented by subclass")}}class Q{constructor(){this.tasks=[],this.onProgress=()=>{},this.onComplete=()=>{},this.onError=()=>{}}addTask(e){this.tasks.push(e)}setProgressCallback(e){this.onProgress=e}setCompleteCallback(e){this.onComplete=e}setErrorCallback(e){this.onError=e}async run(e){const t=this.tasks.length;let r=e;for(let n=0;n<t;n++){const i=this.tasks[n];try{r=await new Promise((s,p)=>{setTimeout(async()=>{try{const v=await i.run(r);this.onProgress((n+1)/t,i),s(v)}catch(v){p(v)}},0)})}catch(s){this.onError(s,n,i);return}}this.onComplete(r)}}class U{constructor(e,t,r){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=r}itemStart(e){this.itemsTotal++,this.isLoading===!1&&this.onStart!==void 0&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())}itemError(e){this.onError!==void 0&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return t!==-1&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,r=this.handlers.length;t<r;t+=2){const n=this.handlers[t],i=this.handlers[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return i}return null}}const D=new U;class ee{constructor(e){this.manager=e!==void 0?e:D,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}loadAsync(e,t){return new Promise((r,n)=>{this.load(e,r,t,n)})}parse(e){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}h.AcCmColor=O,h.AcCmErrors=G,h.AcCmEventDispatcher=H,h.AcCmEventManager=M,h.AcCmLoader=ee,h.AcCmLoadingManager=U,h.AcCmObject=x,h.AcCmPerformanceCollector=w,h.AcCmTask=X,h.AcCmTaskScheduler=Q,h.AcTrStringUtil=J,h.DEBUG_MODE=Y,h.DefaultLoadingManager=D,h.log=E,h.setLogLevel=Z,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(a,L){typeof exports=="object"&&typeof module<"u"?L(exports):typeof define=="function"&&define.amd?define(["exports"],L):(a=typeof globalThis<"u"?globalThis:a||self,L(a.common={}))})(this,function(a){"use strict";function L(n,e){for(var t=0;t<e.length;t++){const r=e[t];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in n)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const I={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},M=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215,0];function E(n,e,t){return Math.max(e,Math.min(t,n))}const O=class O{constructor(){this._colorIndex=256,this._color=null,this._colorName=null}get color(){return this._color}set color(e){e==null?this._color=null:(this._color=Math.round(E(e,0,256*256*256-1)),this._colorIndex=this.getColorIndexByValue(this._color),this._colorName=this.getColorNameByValue(this._color))}get hexColor(){if(this._color&&this._color>0&&this._color<=16777215){let e=this._color.toString(16).toUpperCase();for(;e.length<6;)e="0"+e;return`0x${e}`}return""}get cssColor(){return`rgb(${this.red},${this.green},${this.blue})`}get red(){return this.color?this.color>>16&255:null}get green(){return this.color?this.color>>8&255:null}get blue(){return this.color?this.color&255:null}get colorIndex(){return this._colorIndex}set colorIndex(e){e==null?this._colorIndex=null:(this._colorIndex=E(e,0,256),this._color=M[e],this._colorName=this.getColorNameByValue(this._color))}get colorName(){return this._colorName}set colorName(e){if(e){const t=I[e.toLowerCase()];t!==void 0?(this._colorName=e,this._color=t,this._colorIndex=this.getColorIndexByValue(this._color)):console.warn("Unknown color: "+e)}else this._colorName=null}get hasColorName(){return this._colorName==null}get hasColorIndex(){return this._colorIndex==null}get isByLayer(){return this.colorIndex==256}setByLayer(){return this.colorIndex=256,this}get isByBlock(){return this.colorIndex==0}setByBlock(){return this.colorIndex=0,this}setScalar(e){return this.setRGB(e,e,e),this}setRGB(e,t,r){const o=Math.round(E(e,0,255)),s=Math.round(E(t,0,255)),l=Math.round(E(r,0,255));return this.color=(o<<16)+(s<<8)+l,this}setColorName(e){const t=I[e.toLowerCase()];return t!==void 0?this.color=t:console.warn("Unknown color "+e),this}clone(){const e=new O;return e.colorIndex=this.colorIndex,e.color=this.color,e._colorName=this._colorName,this}copy(e){return this.colorIndex=e.colorIndex,this.color=e.color,this._colorName=e._colorName,this}equals(e){return e.color==this.color&&e.colorIndex==this.colorIndex&&e._colorName==this._colorName}toString(){return this.isByLayer?"ByLayer":this.isByBlock?"ByBlock":this.colorName?this.colorName:this.hexColor}getColorNameByValue(e){for(const[t,r]of Object.entries(I))if(r===e)return t;return null}getColorIndexByValue(e){const t=M.length-1;for(let r=1;r<t;++r)if(M[r]===e)return r;return null}};O.NAMES=I;let B=O;const W={get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")},get ZERO_DIVISION(){return new Error("Zero division")},get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")},get INFINITE_LOOP(){return new Error("Infinite loop")},get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")},get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")},get NOT_IMPLEMENTED(){return new Error("Not implemented yet")}};class Y{constructor(){this._listeners={}}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(t)===-1&&r[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const o=this._listeners[e];if(o!==void 0){const s=o.indexOf(t);s!==-1&&o.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const o=r.slice(0);for(let s=0,l=o.length;s<l;s++)o[s].call(this,e)}}}class S{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}removeEventListener(e){this.listeners=this.listeners.filter(t=>t!==e)}replaceEventListener(e){this.removeEventListener(e),this.addEventListener(e)}dispatch(e,...t){for(const r of this.listeners)r.call(null,e,...t)}}var Z=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var U={exports:{}};(function(n){(function(e,t){n.exports?n.exports=t():e.log=t()})(Z,function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],s={},l=null;function f(c,u){var i=c[u];if(typeof i.bind=="function")return i.bind(c);try{return Function.prototype.bind.call(i,c)}catch{return function(){return Function.prototype.apply.apply(i,[c,arguments])}}}function y(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function b(c){return c==="debug"&&(c="log"),typeof console===t?!1:c==="trace"&&r?y:console[c]!==void 0?f(console,c):console.log!==void 0?f(console,"log"):e}function m(){for(var c=this.getLevel(),u=0;u<o.length;u++){var i=o[u];this[i]=u<c?e:this.methodFactory(i,c,this.name)}if(this.log=this.debug,typeof console===t&&c<this.levels.SILENT)return"No console available for logging"}function x(c){return function(){typeof console!==t&&(m.call(this),this[c].apply(this,arguments))}}function g(c,u,i){return b(c)||x.apply(this,arguments)}function G(c,u){var i=this,N,R,_,p="loglevel";typeof c=="string"?p+=":"+c:typeof c=="symbol"&&(p=void 0);function se(h){var d=(o[h]||"silent").toUpperCase();if(!(typeof window===t||!p)){try{window.localStorage[p]=d;return}catch{}try{window.document.cookie=encodeURIComponent(p)+"="+d+";"}catch{}}}function H(){var h;if(!(typeof window===t||!p)){try{h=window.localStorage[p]}catch{}if(typeof h===t)try{var d=window.document.cookie,T=encodeURIComponent(p),z=d.indexOf(T+"=");z!==-1&&(h=/^([^;]+)/.exec(d.slice(z+T.length+1))[1])}catch{}return i.levels[h]===void 0&&(h=void 0),h}}function le(){if(!(typeof window===t||!p)){try{window.localStorage.removeItem(p)}catch{}try{window.document.cookie=encodeURIComponent(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function k(h){var d=h;if(typeof d=="string"&&i.levels[d.toUpperCase()]!==void 0&&(d=i.levels[d.toUpperCase()]),typeof d=="number"&&d>=0&&d<=i.levels.SILENT)return d;throw new TypeError("log.setLevel() called with invalid level: "+h)}i.name=c,i.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},i.methodFactory=u||g,i.getLevel=function(){return _??R??N},i.setLevel=function(h,d){return _=k(h),d!==!1&&se(_),m.call(i)},i.setDefaultLevel=function(h){R=k(h),H()||i.setLevel(h,!1)},i.resetLevel=function(){_=null,le(),m.call(i)},i.enableAll=function(h){i.setLevel(i.levels.TRACE,h)},i.disableAll=function(h){i.setLevel(i.levels.SILENT,h)},i.rebuild=function(){if(l!==i&&(N=k(l.getLevel())),m.call(i),l===i)for(var h in s)s[h].rebuild()},N=k(l?l.getLevel():"WARN");var K=H();K!=null&&(_=k(K)),m.call(i)}l=new G,l.getLogger=function(u){if(typeof u!="symbol"&&typeof u!="string"||u==="")throw new TypeError("You must supply a name when creating a logger.");var i=s[u];return i||(i=s[u]=new G(u,l.methodFactory)),i};var ie=typeof window!==t?window.log:void 0;return l.noConflict=function(){return typeof window!==t&&window.log===l&&(window.log=ie),l},l.getLoggers=function(){return s},l.default=l,l})})(U);var D=U.exports;const X=L({__proto__:null,default:J(D)},[D]),Q=!0,A=X;A.setLevel("debug");const ee=n=>{try{A.setLevel(n)}catch(e){A.setLevel("error"),A.error(e)}};function C(n){return n===null||typeof n!="object"?n:Array.isArray(n)?[...n]:{...n}}function q(n,...e){for(const t of e)if(t)for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&n[r]===void 0&&(n[r]=t[r]);return n}function F(n,e){return n!=null&&Object.prototype.hasOwnProperty.call(n,e)}function j(n){return n==null?!0:Array.isArray(n)||typeof n=="string"?n.length===0:n instanceof Map||n instanceof Set?n.size===0:typeof n=="object"?Object.keys(n).length===0:!1}function v(n,e){if(n===e)return!0;if(n==null||e==null)return n===e;if(typeof n!=typeof e)return!1;if(typeof n!="object")return n===e;if(Array.isArray(n)!==Array.isArray(e))return!1;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(let o=0;o<n.length;o++)if(!v(n[o],e[o]))return!1;return!0}const t=Object.keys(n),r=Object.keys(e);if(t.length!==r.length)return!1;for(const o of t)if(!Object.prototype.hasOwnProperty.call(e,o)||!v(n[o],e[o]))return!1;return!0}class P{constructor(e,t){this.events={attrChanged:new S,modelChanged:new S},this._changing=!1,this._previousAttributes={},this._pending=!1;const r=e||{};t&&q(r,t),this.attributes=r,this.changed={}}get(e){return this.attributes[e]}set(e,t,r){if(e==null)return this;let o;typeof e=="object"?(o=e,r=t):(o={},o[e]=t),r||(r={});const s=r.unset,l=r.silent,f=[],y=this._changing;this._changing=!0,y||(this._previousAttributes=C(this.attributes),this.changed={});const b=this.attributes,m=this.changed,x=this._previousAttributes;for(const g in o)t=o[g],v(b[g],t)||f.push(g),v(x[g],t)?delete m[g]:m[g]=t,s?delete b[g]:b[g]=t;if(!l){f.length&&(this._pending=r);for(let g=0;g<f.length;g++)this.events.attrChanged.dispatch({object:this,attrName:f[g],attrValue:b[f[g]],options:r})}if(y)return this;if(!l)for(;this._pending;)r=this._pending,this._pending=!1,this.events.modelChanged.dispatch({object:this,options:r});return this._pending=!1,this._changing=!1,this}has(e){return this.get(e)!=null}hasChanged(e){return e==null?!j(this.changed):F(this.changed,e)}changedAttributes(e){if(!e)return this.hasChanged()?C(this.changed):{};const t=this._changing?this._previousAttributes:this.attributes,r={};for(const o in e){const s=e[o];v(t[o],s)||(r[o]=s)}return r}previous(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]}previousAttributes(){return C(this._previousAttributes)}clone(){const e=C(this.attributes);return new P(e)}}class w{constructor(){this.entries=new Map}static getInstance(){return w.instance||(w.instance=new w),w.instance}collect(e){this.entries.set(e.name,e)}printAll(){for(const[e,t]of this.entries)console.log(`${e}:`),console.log(t.format())}clear(){this.entries.clear()}getAll(){return Array.from(this.entries.values())}getEntry(e){return this.entries.get(e)}remove(e){return this.entries.delete(e)}}class te{static formatBytes(e,t=2){if(e===0)return"0 B";const r=1024,o=Math.max(0,t),s=["B","KB","MB","GB","TB"],l=Math.floor(Math.log(e)/Math.log(r)),f=e/Math.pow(r,l);return`${parseFloat(f.toFixed(o))} ${s[l]}`}}class re{constructor(e){this.name=e}run(e){throw new Error("run() must be implemented by subclass")}}class ne{constructor(){this.tasks=[],this.onProgress=()=>{},this.onComplete=()=>{},this.onError=()=>{}}addTask(e){this.tasks.push(e)}setProgressCallback(e){this.onProgress=e}setCompleteCallback(e){this.onComplete=e}setErrorCallback(e){this.onError=e}async run(e){const t=this.tasks.length;let r=e;for(let o=0;o<t;o++){const s=this.tasks[o];try{r=await new Promise((l,f)=>{setTimeout(async()=>{try{const y=await s.run(r);this.onProgress((o+1)/t,s),l(y)}catch(y){f(y)}},0)})}catch(l){this.onError(l,o,s);return}}this.onComplete(r)}}class V{constructor(e,t,r){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=r}itemStart(e){this.itemsTotal++,this.isLoading===!1&&this.onStart!==void 0&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())}itemError(e){this.onError!==void 0&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return t!==-1&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,r=this.handlers.length;t<r;t+=2){const o=this.handlers[t],s=this.handlers[t+1];if(o.global&&(o.lastIndex=0),o.test(e))return s}return null}}const $=new V;class oe{constructor(e){this.manager=e!==void 0?e:$,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}loadAsync(e,t){return new Promise((r,o)=>{this.load(e,r,t,o)})}parse(e){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}a.AcCmColor=B,a.AcCmErrors=W,a.AcCmEventDispatcher=Y,a.AcCmEventManager=S,a.AcCmLoader=oe,a.AcCmLoadingManager=V,a.AcCmObject=P,a.AcCmPerformanceCollector=w,a.AcCmTask=re,a.AcCmTaskScheduler=ne,a.AcTrStringUtil=te,a.DEBUG_MODE=Q,a.DefaultLoadingManager=$,a.clone=C,a.defaults=q,a.has=F,a.isEmpty=j,a.isEqual=v,a.log=A,a.setLogLevel=ee,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions extracted from lodash-es to reduce bundle size
|
|
3
|
+
* These are simplified implementations of commonly used lodash functions
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Creates a shallow clone of an object
|
|
7
|
+
* @param obj The object to clone
|
|
8
|
+
* @returns A shallow clone of the object
|
|
9
|
+
*/
|
|
10
|
+
export declare function clone<T>(obj: T): T;
|
|
11
|
+
/**
|
|
12
|
+
* Assigns own enumerable properties of source objects to the destination object for all destination properties that resolve to undefined.
|
|
13
|
+
* @param obj The destination object
|
|
14
|
+
* @param sources The source objects
|
|
15
|
+
* @returns The destination object
|
|
16
|
+
*/
|
|
17
|
+
export declare function defaults(obj: Record<string, unknown>, ...sources: Record<string, unknown>[]): Record<string, unknown>;
|
|
18
|
+
/**
|
|
19
|
+
* Checks if path is a direct property of object
|
|
20
|
+
* @param obj The object to query
|
|
21
|
+
* @param path The path to check
|
|
22
|
+
* @returns Returns true if path exists, else false
|
|
23
|
+
*/
|
|
24
|
+
export declare function has(obj: Record<string, unknown>, path: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Checks if value is an empty object, collection, map, or set
|
|
27
|
+
* @param value The value to check
|
|
28
|
+
* @returns Returns true if value is empty, else false
|
|
29
|
+
*/
|
|
30
|
+
export declare function isEmpty(value: unknown): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Performs a deep comparison between two values to determine if they are equivalent
|
|
33
|
+
* @param value The value to compare
|
|
34
|
+
* @param other The other value to compare
|
|
35
|
+
* @returns Returns true if the values are equivalent, else false
|
|
36
|
+
*/
|
|
37
|
+
export declare function isEqual(value: unknown, other: unknown): boolean;
|
|
38
|
+
//# sourceMappingURL=AcCmLodashUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcCmLodashUtils.d.ts","sourceRoot":"","sources":["../src/AcCmLodashUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAUlC;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,GAAG,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACpC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAczB;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvE;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAkB/C;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAwD/D"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions extracted from lodash-es to reduce bundle size
|
|
3
|
+
* These are simplified implementations of commonly used lodash functions
|
|
4
|
+
*/
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
17
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
18
|
+
if (!m) return o;
|
|
19
|
+
var i = m.call(o), r, ar = [], e;
|
|
20
|
+
try {
|
|
21
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
22
|
+
}
|
|
23
|
+
catch (error) { e = { error: error }; }
|
|
24
|
+
finally {
|
|
25
|
+
try {
|
|
26
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
27
|
+
}
|
|
28
|
+
finally { if (e) throw e.error; }
|
|
29
|
+
}
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
33
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
34
|
+
if (ar || !(i in from)) {
|
|
35
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
36
|
+
ar[i] = from[i];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
40
|
+
};
|
|
41
|
+
var __values = (this && this.__values) || function(o) {
|
|
42
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
43
|
+
if (m) return m.call(o);
|
|
44
|
+
if (o && typeof o.length === "number") return {
|
|
45
|
+
next: function () {
|
|
46
|
+
if (o && i >= o.length) o = void 0;
|
|
47
|
+
return { value: o && o[i++], done: !o };
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Creates a shallow clone of an object
|
|
54
|
+
* @param obj The object to clone
|
|
55
|
+
* @returns A shallow clone of the object
|
|
56
|
+
*/
|
|
57
|
+
export function clone(obj) {
|
|
58
|
+
if (obj === null || typeof obj !== 'object') {
|
|
59
|
+
return obj;
|
|
60
|
+
}
|
|
61
|
+
if (Array.isArray(obj)) {
|
|
62
|
+
return __spreadArray([], __read(obj), false);
|
|
63
|
+
}
|
|
64
|
+
return __assign({}, obj);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Assigns own enumerable properties of source objects to the destination object for all destination properties that resolve to undefined.
|
|
68
|
+
* @param obj The destination object
|
|
69
|
+
* @param sources The source objects
|
|
70
|
+
* @returns The destination object
|
|
71
|
+
*/
|
|
72
|
+
export function defaults(obj) {
|
|
73
|
+
var e_1, _a;
|
|
74
|
+
var sources = [];
|
|
75
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
76
|
+
sources[_i - 1] = arguments[_i];
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
for (var sources_1 = __values(sources), sources_1_1 = sources_1.next(); !sources_1_1.done; sources_1_1 = sources_1.next()) {
|
|
80
|
+
var source = sources_1_1.value;
|
|
81
|
+
if (source) {
|
|
82
|
+
for (var key in source) {
|
|
83
|
+
if (Object.prototype.hasOwnProperty.call(source, key) &&
|
|
84
|
+
obj[key] === undefined) {
|
|
85
|
+
obj[key] = source[key];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
92
|
+
finally {
|
|
93
|
+
try {
|
|
94
|
+
if (sources_1_1 && !sources_1_1.done && (_a = sources_1.return)) _a.call(sources_1);
|
|
95
|
+
}
|
|
96
|
+
finally { if (e_1) throw e_1.error; }
|
|
97
|
+
}
|
|
98
|
+
return obj;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Checks if path is a direct property of object
|
|
102
|
+
* @param obj The object to query
|
|
103
|
+
* @param path The path to check
|
|
104
|
+
* @returns Returns true if path exists, else false
|
|
105
|
+
*/
|
|
106
|
+
export function has(obj, path) {
|
|
107
|
+
return obj != null && Object.prototype.hasOwnProperty.call(obj, path);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Checks if value is an empty object, collection, map, or set
|
|
111
|
+
* @param value The value to check
|
|
112
|
+
* @returns Returns true if value is empty, else false
|
|
113
|
+
*/
|
|
114
|
+
export function isEmpty(value) {
|
|
115
|
+
if (value == null) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
if (Array.isArray(value) || typeof value === 'string') {
|
|
119
|
+
return value.length === 0;
|
|
120
|
+
}
|
|
121
|
+
if (value instanceof Map || value instanceof Set) {
|
|
122
|
+
return value.size === 0;
|
|
123
|
+
}
|
|
124
|
+
if (typeof value === 'object') {
|
|
125
|
+
return Object.keys(value).length === 0;
|
|
126
|
+
}
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Performs a deep comparison between two values to determine if they are equivalent
|
|
131
|
+
* @param value The value to compare
|
|
132
|
+
* @param other The other value to compare
|
|
133
|
+
* @returns Returns true if the values are equivalent, else false
|
|
134
|
+
*/
|
|
135
|
+
export function isEqual(value, other) {
|
|
136
|
+
var e_2, _a;
|
|
137
|
+
if (value === other) {
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
if (value == null || other == null) {
|
|
141
|
+
return value === other;
|
|
142
|
+
}
|
|
143
|
+
if (typeof value !== typeof other) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
if (typeof value !== 'object') {
|
|
147
|
+
return value === other;
|
|
148
|
+
}
|
|
149
|
+
if (Array.isArray(value) !== Array.isArray(other)) {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
if (Array.isArray(value)) {
|
|
153
|
+
if (value.length !== other.length) {
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
for (var i = 0; i < value.length; i++) {
|
|
157
|
+
if (!isEqual(value[i], other[i])) {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
var valueKeys = Object.keys(value);
|
|
164
|
+
var otherKeys = Object.keys(other);
|
|
165
|
+
if (valueKeys.length !== otherKeys.length) {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
try {
|
|
169
|
+
for (var valueKeys_1 = __values(valueKeys), valueKeys_1_1 = valueKeys_1.next(); !valueKeys_1_1.done; valueKeys_1_1 = valueKeys_1.next()) {
|
|
170
|
+
var key = valueKeys_1_1.value;
|
|
171
|
+
if (!Object.prototype.hasOwnProperty.call(other, key) ||
|
|
172
|
+
!isEqual(value[key], other[key])) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
178
|
+
finally {
|
|
179
|
+
try {
|
|
180
|
+
if (valueKeys_1_1 && !valueKeys_1_1.done && (_a = valueKeys_1.return)) _a.call(valueKeys_1);
|
|
181
|
+
}
|
|
182
|
+
finally { if (e_2) throw e_2.error; }
|
|
183
|
+
}
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=AcCmLodashUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcCmLodashUtils.js","sourceRoot":"","sources":["../src/AcCmLodashUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAI,GAAM;IAC7B,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5C,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,yBAAI,GAAG,SAAM,CAAA;IACtB,CAAC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C,KAAgC,CAAC,CAAA;IAC/D,IAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,KAAgC,CAAC,CAAA;IAE/D,IAAI,SAAS,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAA;IACd,CAAC;;QAED,KAAkB,IAAA,cAAA,SAAA,SAAS,CAAA,oCAAA,2DAAE,CAAC;YAAzB,IAAM,GAAG,sBAAA;YACZ,IACE,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CACnC,KAAgC,EAChC,GAAG,CACJ;gBACD,CAAC,OAAO,CACL,KAAiC,CAAC,GAAG,CAAC,EACtC,KAAiC,CAAC,GAAG,CAAC,CACxC,EACD,CAAC;gBACD,OAAO,KAAK,CAAA;YACd,CAAC;QACH,CAAC;;;;;;;;;IAED,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/lib/AcCmObject.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcCmObject.d.ts","sourceRoot":"","sources":["../src/AcCmObject.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcCmObject.d.ts","sourceRoot":"","sources":["../src/AcCmObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAIrD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEhD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,0BAA0B,CAAC,CAAC,SAAS,cAAc;IAClE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,C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IACH,iBAAiB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAYhD;;OAEG;IACH,QAAQ,CAAC,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS;IAKrE;;OAEG;IACH,kBAAkB,IAAI,OAAO,CAAC,CAAC,CAAC;IAIhC;;OAEG;IACH,KAAK;CAIN"}
|
package/lib/AcCmObject.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { clone, defaults, has, isEmpty, isEqual } from 'lodash-es';
|
|
2
1
|
import { AcCmEventManager } from './AcCmEventManager';
|
|
2
|
+
import { clone, defaults, has, isEmpty, isEqual } from './AcCmLodashUtils';
|
|
3
3
|
/**
|
|
4
4
|
* This class is used to store attributes of one data model. It has the following benifits.
|
|
5
5
|
* - Get notification when value of one attributes is changed
|
package/lib/AcCmObject.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcCmObject.js","sourceRoot":"","sources":["../src/AcCmObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AcCmObject.js","sourceRoot":"","sources":["../src/AcCmObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAiC1E;;;;;;;;;GASG;AACH,8DAA8D;AAC9D;IAaE;;;;;OAKG;IACH,oBAAY,UAAuB,EAAE,YAAyB;QAf9C,WAAM,GAAG;YACvB,WAAW,EAAE,IAAI,gBAAgB,EAA0C;YAC3E,YAAY,EAAE,IAAI,gBAAgB,EAAiC;SACpE,CAAA;QAEO,cAAS,GAAY,KAAK,CAAA;Q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e,EAAE,CAAA;QAC9B,KAAK,IAAM,IAAI,IAAI,IAAI,EAAE,CAAC;YACxB,IAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAA;YACtB,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC;gBAAE,SAAQ;YACrC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;QACrB,CAAC;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED;;OAEG;IACH,6BAAQ,GAAR,UAAqC,GAAM;QACzC,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,mBAAmB;YAAE,OAAO,IAAI,CAAA;QACzD,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACtC,CAAC;IAED;;OAEG;IACH,uCAAkB,GAAlB;QACE,OAAO,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;IACxC,CAAC;IAED;;OAEG;IACH,0BAAK,GAAL;QACE,IAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACpC,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;IACH,iBAAC;AAAD,CAAC,AA1LD,IA0LC"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,UAAU,CAAA"}
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,UAAU,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlightcad/common",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -27,15 +27,9 @@
|
|
|
27
27
|
"import": "./dist/common.js",
|
|
28
28
|
"require": "./dist/common.umd.cjs"
|
|
29
29
|
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@types/lodash-es": "^4.17.12"
|
|
32
|
-
},
|
|
33
30
|
"dependencies": {
|
|
34
31
|
"loglevel": "^1.9.1"
|
|
35
32
|
},
|
|
36
|
-
"peerDependencies": {
|
|
37
|
-
"lodash-es": "*"
|
|
38
|
-
},
|
|
39
33
|
"scripts": {
|
|
40
34
|
"clean": "rimraf dist lib tsconfig.tsbuildinfo",
|
|
41
35
|
"build": "tsc && vite build",
|