@dxtmisha/functional-basic 1.3.7 → 1.3.8
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/CHANGELOG.md +14 -0
- package/ai-description.txt +11 -20
- package/ai-types.txt +552 -86
- package/dist/library.js +436 -381
- package/dist/src/classes/UrlItem.d.ts +71 -0
- package/dist/src/library.d.ts +1 -0
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -513,7 +513,7 @@ function he(e, t, n = !0) {
|
|
|
513
513
|
}
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region src/classes/ServerStorage.ts
|
|
516
|
-
var
|
|
516
|
+
var ge = "__ui:server-storage__", _e = "__ui:server:storage:id__", D = class {
|
|
517
517
|
static init(e) {
|
|
518
518
|
return this.listener || (this.listener = e), this;
|
|
519
519
|
}
|
|
@@ -543,7 +543,7 @@ var D = "__ui:server-storage__", ge = "__ui:server:storage:id__", O = class {
|
|
|
543
543
|
e in t && delete t[e];
|
|
544
544
|
}
|
|
545
545
|
static toString() {
|
|
546
|
-
return me(
|
|
546
|
+
return me(_e, this.getDataForHydration());
|
|
547
547
|
}
|
|
548
548
|
static getStorage(e = !0, t) {
|
|
549
549
|
var n;
|
|
@@ -557,11 +557,11 @@ var D = "__ui:server-storage__", ge = "__ui:server:storage:id__", O = class {
|
|
|
557
557
|
details: { status: t }
|
|
558
558
|
}), e && !this.storage && (this.storage = {}), (i = this.storage) == null ? {} : i;
|
|
559
559
|
}
|
|
560
|
-
return
|
|
560
|
+
return ge in r || (r[ge] = {}), r[ge];
|
|
561
561
|
}
|
|
562
562
|
static getStorageDom() {
|
|
563
563
|
if (!this.storage) {
|
|
564
|
-
let e = he(
|
|
564
|
+
let e = he(_e, {});
|
|
565
565
|
this.storage = {}, r(e, (e, t) => {
|
|
566
566
|
this.storage[t] = {
|
|
567
567
|
value: e,
|
|
@@ -578,16 +578,16 @@ var D = "__ui:server-storage__", ge = "__ui:server:storage:id__", O = class {
|
|
|
578
578
|
}), t;
|
|
579
579
|
}
|
|
580
580
|
};
|
|
581
|
-
T(
|
|
581
|
+
T(D, "storage", void 0), T(D, "listener", void 0), T(D, "hideError", void 0);
|
|
582
582
|
//#endregion
|
|
583
583
|
//#region src/classes/DataStorage.ts
|
|
584
|
-
var
|
|
584
|
+
var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O = class {
|
|
585
585
|
static setPrefix(e) {
|
|
586
|
-
|
|
586
|
+
ve = e;
|
|
587
587
|
}
|
|
588
588
|
constructor(e, t = !1, n = E.getItem()) {
|
|
589
589
|
T(this, "name", void 0), T(this, "isSession", void 0), T(this, "errorCenter", void 0), T(this, "value", void 0), T(this, "age", void 0), this.name = e, this.isSession = t, this.errorCenter = n;
|
|
590
|
-
let r = `${t ? "session" : "storage"}#${e}`, i =
|
|
590
|
+
let r = `${t ? "session" : "storage"}#${e}`, i = ye();
|
|
591
591
|
if (r in i) return i[r];
|
|
592
592
|
this.make(), i[r] = this;
|
|
593
593
|
}
|
|
@@ -624,7 +624,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
getIndex() {
|
|
627
|
-
return `${
|
|
627
|
+
return `${ve}__${this.name}`;
|
|
628
628
|
}
|
|
629
629
|
getValue() {
|
|
630
630
|
var e, t;
|
|
@@ -643,9 +643,9 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
643
643
|
let e = this.getValue();
|
|
644
644
|
return e ? (this.value = e.value, this.age = e.age) : (this.value = void 0, this.age = void 0), this;
|
|
645
645
|
}
|
|
646
|
-
},
|
|
646
|
+
}, be = "__ui:cookie-block__", xe = class {
|
|
647
647
|
constructor() {
|
|
648
|
-
T(this, "storage", new
|
|
648
|
+
T(this, "storage", new O(be));
|
|
649
649
|
}
|
|
650
650
|
get() {
|
|
651
651
|
var e;
|
|
@@ -654,9 +654,9 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
654
654
|
set(e) {
|
|
655
655
|
this.storage.set(e);
|
|
656
656
|
}
|
|
657
|
-
},
|
|
657
|
+
}, Se = class {
|
|
658
658
|
static getItem() {
|
|
659
|
-
return
|
|
659
|
+
return D.get("__ui:cookie-block__", () => new xe());
|
|
660
660
|
}
|
|
661
661
|
static get() {
|
|
662
662
|
return this.getItem().get();
|
|
@@ -664,7 +664,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
664
664
|
static set(e) {
|
|
665
665
|
this.getItem().set(e);
|
|
666
666
|
}
|
|
667
|
-
},
|
|
667
|
+
}, Ce = "__ui:cookie-storage__", k = class {
|
|
668
668
|
static init(e, t, n) {
|
|
669
669
|
this.getListener = e, this.getListenerRaw = t, this.setListener = n;
|
|
670
670
|
}
|
|
@@ -678,7 +678,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
678
678
|
}
|
|
679
679
|
static set(e, t, n) {
|
|
680
680
|
let r = S(t);
|
|
681
|
-
if (
|
|
681
|
+
if (Se.get()) return r;
|
|
682
682
|
let i = C(r, !1);
|
|
683
683
|
return this.setListener ? this.setListener(e, i, this.format(e, i, n), n) : (this.initItems()[e] = i === "" ? void 0 : r, this.hasDom() && (document.cookie = this.format(e, i, n))), r;
|
|
684
684
|
}
|
|
@@ -686,7 +686,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
686
686
|
this.set(e, "", { age: -1 });
|
|
687
687
|
}
|
|
688
688
|
static update() {
|
|
689
|
-
s() && (
|
|
689
|
+
s() && (D.remove(Ce), this.initItems());
|
|
690
690
|
}
|
|
691
691
|
static format(e, t, n) {
|
|
692
692
|
return [
|
|
@@ -713,7 +713,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
713
713
|
return t;
|
|
714
714
|
}
|
|
715
715
|
static initItems() {
|
|
716
|
-
return
|
|
716
|
+
return D.get(Ce, () => {
|
|
717
717
|
var e;
|
|
718
718
|
if (this.hasDom()) return this.parse(document.cookie);
|
|
719
719
|
let t = (e = this.getListenerRaw) == null ? void 0 : e.call(this);
|
|
@@ -745,19 +745,19 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
745
745
|
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${C(t)}`);
|
|
746
746
|
}
|
|
747
747
|
};
|
|
748
|
-
T(
|
|
748
|
+
T(k, "getListener", void 0), T(k, "getListenerRaw", void 0), T(k, "setListener", void 0);
|
|
749
749
|
//#endregion
|
|
750
750
|
//#region src/classes/Cookie.ts
|
|
751
|
-
var
|
|
751
|
+
var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
752
752
|
static getInstance(t) {
|
|
753
753
|
var n, r;
|
|
754
|
-
return (n = (r =
|
|
754
|
+
return (n = (r = we()) == null ? void 0 : r[t]) == null ? new e(t) : n;
|
|
755
755
|
}
|
|
756
756
|
constructor(e) {
|
|
757
757
|
T(this, "name", void 0), T(this, "value", void 0), T(this, "options", {}), this.name = e;
|
|
758
|
-
let t =
|
|
758
|
+
let t = we();
|
|
759
759
|
if (e in t) return t[e];
|
|
760
|
-
this.value =
|
|
760
|
+
this.value = k.get(this.name), t[e] = this;
|
|
761
761
|
}
|
|
762
762
|
get(e, t) {
|
|
763
763
|
return this.value === void 0 && e && this.set(e, t), this.value;
|
|
@@ -769,11 +769,11 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
769
769
|
this.set("");
|
|
770
770
|
}
|
|
771
771
|
update() {
|
|
772
|
-
|
|
772
|
+
k.set(this.name, this.value, this.options);
|
|
773
773
|
}
|
|
774
|
-
},
|
|
774
|
+
}, Ee = "ui-geo-code", De = "__ui:geo-code__", Oe = class {
|
|
775
775
|
constructor() {
|
|
776
|
-
T(this, "storage", new
|
|
776
|
+
T(this, "storage", new O(De)), T(this, "location", void 0), T(this, "valueDefault", void 0), T(this, "item", void 0), T(this, "language", void 0), T(this, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
777
777
|
}
|
|
778
778
|
get() {
|
|
779
779
|
return this.item;
|
|
@@ -846,7 +846,7 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
846
846
|
this.valueDefault = e, this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
847
847
|
}
|
|
848
848
|
getCookie() {
|
|
849
|
-
return
|
|
849
|
+
return Te.getInstance(Ee);
|
|
850
850
|
}
|
|
851
851
|
findLocation() {
|
|
852
852
|
return this.findLocationDom() || this.getCookie().get() || this.valueDefault || "en-GB";
|
|
@@ -871,9 +871,9 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
871
871
|
firstDay: (e == null ? void 0 : e.firstDay) || "Mo"
|
|
872
872
|
};
|
|
873
873
|
}
|
|
874
|
-
},
|
|
874
|
+
}, A = class {
|
|
875
875
|
static getObject() {
|
|
876
|
-
return
|
|
876
|
+
return D.get("__ui:geo-instance__", () => new Oe());
|
|
877
877
|
}
|
|
878
878
|
static get() {
|
|
879
879
|
return this.getObject().get();
|
|
@@ -935,14 +935,14 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
935
935
|
};
|
|
936
936
|
//#endregion
|
|
937
937
|
//#region src/functions/isWindow.ts
|
|
938
|
-
function
|
|
938
|
+
function ke(e) {
|
|
939
939
|
return s() && e === window;
|
|
940
940
|
}
|
|
941
941
|
//#endregion
|
|
942
942
|
//#region src/functions/getElement.ts
|
|
943
|
-
function
|
|
943
|
+
function j(e) {
|
|
944
944
|
if (!s()) return d(e) ? void 0 : e;
|
|
945
|
-
if (
|
|
945
|
+
if (ke(e)) return document.body;
|
|
946
946
|
if (d(e)) {
|
|
947
947
|
var t;
|
|
948
948
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -951,30 +951,30 @@ function M(e) {
|
|
|
951
951
|
}
|
|
952
952
|
//#endregion
|
|
953
953
|
//#region src/functions/getElementOrWindow.ts
|
|
954
|
-
function
|
|
955
|
-
return
|
|
954
|
+
function Ae(e) {
|
|
955
|
+
return ke(e) ? e : j(e);
|
|
956
956
|
}
|
|
957
957
|
//#endregion
|
|
958
958
|
//#region src/functions/isInDom.ts
|
|
959
|
-
function
|
|
959
|
+
function je(e) {
|
|
960
960
|
var t;
|
|
961
|
-
return (e == null ? void 0 : e.isConnected) || !!((t =
|
|
961
|
+
return (e == null ? void 0 : e.isConnected) || !!((t = j(e)) != null && t.closest("html"));
|
|
962
962
|
}
|
|
963
963
|
//#endregion
|
|
964
964
|
//#region src/functions/toArray.ts
|
|
965
|
-
function
|
|
965
|
+
function M(e) {
|
|
966
966
|
return Array.isArray(e) ? e : [e];
|
|
967
967
|
}
|
|
968
968
|
//#endregion
|
|
969
969
|
//#region src/classes/EventItem.ts
|
|
970
|
-
var
|
|
970
|
+
var Me = class {
|
|
971
971
|
constructor(e, n = ["click"], r, i, a) {
|
|
972
972
|
T(this, "listener", void 0), T(this, "options", void 0), T(this, "detail", void 0), T(this, "element", void 0), T(this, "elementControl", void 0), T(this, "elementControlEdit", void 0), T(this, "type", void 0), T(this, "listenerRecent", (e) => {
|
|
973
|
-
if (
|
|
973
|
+
if (je(this.elementControl)) {
|
|
974
974
|
var n, r;
|
|
975
975
|
(n = this.listener) == null || n.call(this.element, e, this.detail), t(this.options) && (r = this.options) != null && r.once && this.stop();
|
|
976
976
|
} else this.stop();
|
|
977
|
-
}), T(this, "activity", !1), T(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element =
|
|
977
|
+
}), T(this, "activity", !1), T(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element = Ae(e), this.elementControl = j(e), this.type = M(n);
|
|
978
978
|
}
|
|
979
979
|
isActive() {
|
|
980
980
|
return this.activity;
|
|
@@ -983,14 +983,14 @@ var je = class {
|
|
|
983
983
|
return this.element;
|
|
984
984
|
}
|
|
985
985
|
setElement(e) {
|
|
986
|
-
let t =
|
|
987
|
-
return this.elementControlEdit || (this.elementControl =
|
|
986
|
+
let t = Ae(e);
|
|
987
|
+
return this.elementControlEdit || (this.elementControl = j(e)), this.element = t, this.reset(), this;
|
|
988
988
|
}
|
|
989
989
|
setElementControl(e) {
|
|
990
|
-
return this.elementControl =
|
|
990
|
+
return this.elementControl = j(e), this.elementControlEdit = !c(this.elementControl), this.elementControlEdit || (this.elementControl = j(this.element)), this;
|
|
991
991
|
}
|
|
992
992
|
setType(e) {
|
|
993
|
-
return this.type =
|
|
993
|
+
return this.type = M(e), this.reset(), this;
|
|
994
994
|
}
|
|
995
995
|
setListener(e) {
|
|
996
996
|
return this.listener = e, this;
|
|
@@ -1059,9 +1059,9 @@ var je = class {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
return !1;
|
|
1061
1061
|
}
|
|
1062
|
-
},
|
|
1063
|
-
constructor(e =
|
|
1064
|
-
T(this, "eventName", void 0), T(this, "value", 0), T(this, "event", void 0), T(this, "registrationList", []), this.eventName = e, s() && (this.event = new
|
|
1062
|
+
}, Ne = "ui-loading", Pe = class {
|
|
1063
|
+
constructor(e = Ne) {
|
|
1064
|
+
T(this, "eventName", void 0), T(this, "value", 0), T(this, "event", void 0), T(this, "registrationList", []), this.eventName = e, s() && (this.event = new Me(window, this.eventName));
|
|
1065
1065
|
}
|
|
1066
1066
|
is() {
|
|
1067
1067
|
return this.value > 0;
|
|
@@ -1077,7 +1077,7 @@ var je = class {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
registrationEvent(e, t) {
|
|
1079
1079
|
if (s()) {
|
|
1080
|
-
let n = new
|
|
1080
|
+
let n = new Me(window, this.eventName, e).setElementControl(t).start();
|
|
1081
1081
|
this.registrationList.push({
|
|
1082
1082
|
item: n,
|
|
1083
1083
|
listener: e,
|
|
@@ -1092,7 +1092,7 @@ var je = class {
|
|
|
1092
1092
|
var e;
|
|
1093
1093
|
(e = this.event) == null || e.dispatch({ loading: this.is() });
|
|
1094
1094
|
}
|
|
1095
|
-
},
|
|
1095
|
+
}, N = class {
|
|
1096
1096
|
static is() {
|
|
1097
1097
|
return this.getItem().is();
|
|
1098
1098
|
}
|
|
@@ -1100,7 +1100,7 @@ var je = class {
|
|
|
1100
1100
|
return this.getItem().get();
|
|
1101
1101
|
}
|
|
1102
1102
|
static getItem() {
|
|
1103
|
-
return
|
|
1103
|
+
return D.get("__ui:loading-instance__", () => new Pe());
|
|
1104
1104
|
}
|
|
1105
1105
|
static show() {
|
|
1106
1106
|
this.getItem().show();
|
|
@@ -1114,7 +1114,7 @@ var je = class {
|
|
|
1114
1114
|
static unregistrationEvent(e, t) {
|
|
1115
1115
|
this.getItem().unregistrationEvent(e, t);
|
|
1116
1116
|
}
|
|
1117
|
-
},
|
|
1117
|
+
}, Fe, Ie = 1440 * 60, P = class {
|
|
1118
1118
|
static init(e, t, n, r) {
|
|
1119
1119
|
this.getListener = e, this.setListener = t, this.removeListener = n, r && (this.cacheStepAgeClearOld = r, this.stepAgeClearOld = r);
|
|
1120
1120
|
}
|
|
@@ -1136,7 +1136,7 @@ var je = class {
|
|
|
1136
1136
|
let t = this.generateKey(e);
|
|
1137
1137
|
return await this.get(t);
|
|
1138
1138
|
}
|
|
1139
|
-
static async set(e, t, n =
|
|
1139
|
+
static async set(e, t, n = Ie) {
|
|
1140
1140
|
let r = {
|
|
1141
1141
|
value: t,
|
|
1142
1142
|
age: n,
|
|
@@ -1199,10 +1199,10 @@ var je = class {
|
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
1201
1201
|
};
|
|
1202
|
-
|
|
1202
|
+
Fe = P, T(P, "items", void 0), T(P, "getListener", void 0), T(P, "setListener", void 0), T(P, "removeListener", void 0), T(P, "cacheStepAgeClearOld", 16384), T(P, "stepAgeClearOld", Fe.cacheStepAgeClearOld);
|
|
1203
1203
|
//#endregion
|
|
1204
1204
|
//#region src/classes/ApiStatus.ts
|
|
1205
|
-
var
|
|
1205
|
+
var Le = class {
|
|
1206
1206
|
constructor() {
|
|
1207
1207
|
T(this, "value", void 0);
|
|
1208
1208
|
}
|
|
@@ -1264,13 +1264,13 @@ var Ie = class {
|
|
|
1264
1264
|
setValue(e, t) {
|
|
1265
1265
|
this.value || (this.value = {}), this.value[e] = t;
|
|
1266
1266
|
}
|
|
1267
|
-
},
|
|
1267
|
+
}, Re = [
|
|
1268
1268
|
"success",
|
|
1269
1269
|
"status",
|
|
1270
1270
|
"code",
|
|
1271
1271
|
"message",
|
|
1272
1272
|
"error"
|
|
1273
|
-
],
|
|
1273
|
+
], ze = class {
|
|
1274
1274
|
constructor(e, t, n, r) {
|
|
1275
1275
|
T(this, "apiFetch", void 0), T(this, "query", void 0), T(this, "end", void 0), T(this, "error", void 0), T(this, "data", void 0), T(this, "dataMod", void 0), this.apiFetch = e, this.query = t, this.end = n, this.error = r;
|
|
1276
1276
|
}
|
|
@@ -1302,16 +1302,16 @@ var Ie = class {
|
|
|
1302
1302
|
}
|
|
1303
1303
|
initItem(e) {
|
|
1304
1304
|
let t = { ...e.data };
|
|
1305
|
-
return
|
|
1305
|
+
return Re.forEach((r) => {
|
|
1306
1306
|
if (r in e && !(r in t) && (t[r] = e[r], r === "error" && n(e[r]))) {
|
|
1307
1307
|
var i, a, o, s;
|
|
1308
1308
|
t.code = (i = (a = e[r]) == null ? void 0 : a.code) == null ? e.code : i, t.message = (o = (s = e[r]) == null ? void 0 : s.message) == null ? e.message : o;
|
|
1309
1309
|
}
|
|
1310
1310
|
}), t;
|
|
1311
1311
|
}
|
|
1312
|
-
},
|
|
1312
|
+
}, F = /* @__PURE__ */ function(e) {
|
|
1313
1313
|
return e.delete = "DELETE", e.get = "GET", e.post = "POST", e.put = "PUT", e.patch = "PATCH", e;
|
|
1314
|
-
}({}),
|
|
1314
|
+
}({}), Be = class {
|
|
1315
1315
|
constructor() {
|
|
1316
1316
|
T(this, "value", void 0);
|
|
1317
1317
|
}
|
|
@@ -1340,7 +1340,7 @@ var Ie = class {
|
|
|
1340
1340
|
e.has(t) || e.set(t, n);
|
|
1341
1341
|
}), this;
|
|
1342
1342
|
}
|
|
1343
|
-
},
|
|
1343
|
+
}, Ve = class {
|
|
1344
1344
|
constructor(e, t, n) {
|
|
1345
1345
|
T(this, "method", void 0), T(this, "response", void 0), T(this, "error", void 0), T(this, "jsonResponse", void 0), this.method = e, this.response = t, this.error = n;
|
|
1346
1346
|
}
|
|
@@ -1364,7 +1364,7 @@ var Ie = class {
|
|
|
1364
1364
|
getStatus() {
|
|
1365
1365
|
return this.response.status;
|
|
1366
1366
|
}
|
|
1367
|
-
},
|
|
1367
|
+
}, He = class {
|
|
1368
1368
|
constructor() {
|
|
1369
1369
|
T(this, "storage", []);
|
|
1370
1370
|
}
|
|
@@ -1383,7 +1383,7 @@ var Ie = class {
|
|
|
1383
1383
|
};
|
|
1384
1384
|
}
|
|
1385
1385
|
add(e, t, n) {
|
|
1386
|
-
return
|
|
1386
|
+
return M(e).forEach((e) => {
|
|
1387
1387
|
let r = e.url || t, i = e.method || n;
|
|
1388
1388
|
r && i && this.storage.push({
|
|
1389
1389
|
...e,
|
|
@@ -1418,17 +1418,17 @@ var Ie = class {
|
|
|
1418
1418
|
getMessage(e) {
|
|
1419
1419
|
return this.getDataByKey(e, "message");
|
|
1420
1420
|
}
|
|
1421
|
-
},
|
|
1421
|
+
}, Ue = class {
|
|
1422
1422
|
static getStorage() {
|
|
1423
|
-
return
|
|
1423
|
+
return D.get("__ui:api-error-storage__", () => new He());
|
|
1424
1424
|
}
|
|
1425
1425
|
static add(e, t, n) {
|
|
1426
1426
|
this.getStorage().add(e, t, n);
|
|
1427
1427
|
}
|
|
1428
1428
|
static async getItem(e, t) {
|
|
1429
|
-
return new
|
|
1429
|
+
return new Ve(e, t, await this.getStorage().find(e, t));
|
|
1430
1430
|
}
|
|
1431
|
-
},
|
|
1431
|
+
}, We = class {
|
|
1432
1432
|
constructor() {
|
|
1433
1433
|
T(this, "headers", {});
|
|
1434
1434
|
}
|
|
@@ -1444,7 +1444,7 @@ var Ie = class {
|
|
|
1444
1444
|
set(e) {
|
|
1445
1445
|
return this.headers = e, this;
|
|
1446
1446
|
}
|
|
1447
|
-
},
|
|
1447
|
+
}, Ge = "__ui:api:hydration:id__", Ke = class {
|
|
1448
1448
|
constructor() {
|
|
1449
1449
|
T(this, "list", []);
|
|
1450
1450
|
}
|
|
@@ -1452,7 +1452,7 @@ var Ie = class {
|
|
|
1452
1452
|
s() && e.add(this.getListByClient());
|
|
1453
1453
|
}
|
|
1454
1454
|
toClient(e, t) {
|
|
1455
|
-
let { path: n, method: r =
|
|
1455
|
+
let { path: n, method: r = F.get, request: i, global: a = r === F.get } = e;
|
|
1456
1456
|
!a || !n || s() || this.list.push({
|
|
1457
1457
|
path: n,
|
|
1458
1458
|
method: r,
|
|
@@ -1461,12 +1461,12 @@ var Ie = class {
|
|
|
1461
1461
|
});
|
|
1462
1462
|
}
|
|
1463
1463
|
toString() {
|
|
1464
|
-
return me(
|
|
1464
|
+
return me(Ge, this.list);
|
|
1465
1465
|
}
|
|
1466
1466
|
getListByClient() {
|
|
1467
|
-
return he(
|
|
1467
|
+
return he(Ge, []);
|
|
1468
1468
|
}
|
|
1469
|
-
},
|
|
1469
|
+
}, qe = class {
|
|
1470
1470
|
constructor() {
|
|
1471
1471
|
T(this, "callback", void 0), T(this, "callbackEnd", void 0), T(this, "loading", !1);
|
|
1472
1472
|
}
|
|
@@ -1494,13 +1494,13 @@ var Ie = class {
|
|
|
1494
1494
|
};
|
|
1495
1495
|
//#endregion
|
|
1496
1496
|
//#region src/functions/executePromise.ts
|
|
1497
|
-
async function
|
|
1497
|
+
async function Je(e, ...t) {
|
|
1498
1498
|
let n = S(e, ...t);
|
|
1499
1499
|
return n instanceof Promise ? await n : n;
|
|
1500
1500
|
}
|
|
1501
1501
|
//#endregion
|
|
1502
1502
|
//#region src/classes/ApiResponse.ts
|
|
1503
|
-
var
|
|
1503
|
+
var Ye = "d-response-loading", Xe = class {
|
|
1504
1504
|
constructor(e) {
|
|
1505
1505
|
T(this, "requestDefault", void 0), T(this, "first", []), T(this, "response", []), T(this, "loading", void 0), T(this, "devMode", !1), this.requestDefault = e;
|
|
1506
1506
|
}
|
|
@@ -1511,7 +1511,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1511
1511
|
return this.response.filter((e) => e.isForGlobal !== !0);
|
|
1512
1512
|
}
|
|
1513
1513
|
add(e) {
|
|
1514
|
-
return this.response.push(...
|
|
1514
|
+
return this.response.push(...M(e)), this;
|
|
1515
1515
|
}
|
|
1516
1516
|
setDevMode(e) {
|
|
1517
1517
|
return this.devMode = e, this;
|
|
@@ -1545,7 +1545,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
readData(e) {
|
|
1547
1547
|
if (!s()) return;
|
|
1548
|
-
let { path: t = "", method: n =
|
|
1548
|
+
let { path: t = "", method: n = F.get, global: r = n === F.get, devMode: i = !1 } = e;
|
|
1549
1549
|
if (r || this.isDevMode(i)) {
|
|
1550
1550
|
let r = this.requestDefault.request(e.request), a = this.get(t, n, r, i);
|
|
1551
1551
|
if (a) return {
|
|
@@ -1556,9 +1556,9 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1556
1556
|
}
|
|
1557
1557
|
fetch(e, t) {
|
|
1558
1558
|
return this.startResponseLoading(), new Promise((n) => {
|
|
1559
|
-
|
|
1560
|
-
e != null && e.lag ? (
|
|
1561
|
-
this.stopResponseLoading(), n(t),
|
|
1559
|
+
Je(x(e.response) ? e.response(t) : e.response).then((t) => {
|
|
1560
|
+
e != null && e.lag ? (N.show(), setTimeout(() => {
|
|
1561
|
+
this.stopResponseLoading(), n(t), N.hide();
|
|
1562
1562
|
}, f(0, 2e3))) : (this.stopResponseLoading(), n(t));
|
|
1563
1563
|
});
|
|
1564
1564
|
});
|
|
@@ -1567,17 +1567,17 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1567
1567
|
return e.response;
|
|
1568
1568
|
}
|
|
1569
1569
|
startResponseLoading() {
|
|
1570
|
-
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(
|
|
1570
|
+
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(Ye);
|
|
1571
1571
|
}
|
|
1572
1572
|
stopResponseLoading() {
|
|
1573
1573
|
s() && (this.loading = setTimeout(() => {
|
|
1574
|
-
this.loading = void 0, document.body.classList.remove(
|
|
1574
|
+
this.loading = void 0, document.body.classList.remove(Ye);
|
|
1575
1575
|
}, 2400));
|
|
1576
1576
|
}
|
|
1577
|
-
},
|
|
1577
|
+
}, Ze = class {
|
|
1578
1578
|
constructor(e = "/api/", t = {}) {
|
|
1579
1579
|
T(this, "url", void 0), T(this, "headers", void 0), T(this, "requestDefault", void 0), T(this, "status", void 0), T(this, "response", void 0), T(this, "preparation", void 0), T(this, "loading", void 0), T(this, "errorCenter", void 0), T(this, "hydration", void 0), T(this, "timeout", 16e3), T(this, "origin", void 0), this.url = e;
|
|
1580
|
-
let { headersClass: n =
|
|
1580
|
+
let { headersClass: n = We, requestDefaultClass: r = Be, statusClass: i = Le, responseClass: a = Xe, preparationClass: o = qe, loadingClass: s = N.getItem(), errorCenterClass: c = E.getItem(), hydrationClass: l = Ke } = t;
|
|
1581
1581
|
this.headers = new n(), this.requestDefault = new r(), this.status = new i(), this.response = new a(this.requestDefault), this.preparation = new o(), this.loading = s, this.errorCenter = c, this.hydration = new l(), this.hydration.initResponse(this.response);
|
|
1582
1582
|
}
|
|
1583
1583
|
isLocalhost() {
|
|
@@ -1596,14 +1596,14 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1596
1596
|
return this.origin && /^\//.test(this.url) ? `${this.origin}${this.url}` : this.url;
|
|
1597
1597
|
}
|
|
1598
1598
|
getUrl(e, t = !0) {
|
|
1599
|
-
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}",
|
|
1599
|
+
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}", A.getLocation()).replace("{country}", A.getCountry()).replace("{language}", A.getLanguage());
|
|
1600
1600
|
}
|
|
1601
|
-
getBody(e = {}, t =
|
|
1601
|
+
getBody(e = {}, t = F.get) {
|
|
1602
1602
|
if (e instanceof FormData) return e;
|
|
1603
|
-
if (t !==
|
|
1603
|
+
if (t !== F.get && l(e)) return d(e) ? e : JSON.stringify(e);
|
|
1604
1604
|
}
|
|
1605
|
-
getBodyForGet(e, t = "", n =
|
|
1606
|
-
if (n ===
|
|
1605
|
+
getBodyForGet(e, t = "", n = F.get) {
|
|
1606
|
+
if (n === F.get) {
|
|
1607
1607
|
let n = t.match(/\?/) ? "&" : "?", r = typeof e == "object" ? o(e) : e;
|
|
1608
1608
|
if (l(r)) return `${n}${r}`;
|
|
1609
1609
|
}
|
|
@@ -1639,42 +1639,42 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1639
1639
|
get(e) {
|
|
1640
1640
|
return this.request({
|
|
1641
1641
|
...e,
|
|
1642
|
-
method:
|
|
1642
|
+
method: F.get
|
|
1643
1643
|
});
|
|
1644
1644
|
}
|
|
1645
1645
|
post(e) {
|
|
1646
1646
|
return this.request({
|
|
1647
1647
|
...e,
|
|
1648
|
-
method:
|
|
1648
|
+
method: F.post
|
|
1649
1649
|
});
|
|
1650
1650
|
}
|
|
1651
1651
|
put(e) {
|
|
1652
1652
|
return this.request({
|
|
1653
1653
|
...e,
|
|
1654
|
-
method:
|
|
1654
|
+
method: F.put
|
|
1655
1655
|
});
|
|
1656
1656
|
}
|
|
1657
1657
|
patch(e) {
|
|
1658
1658
|
return this.request({
|
|
1659
1659
|
...e,
|
|
1660
|
-
method:
|
|
1660
|
+
method: F.patch
|
|
1661
1661
|
});
|
|
1662
1662
|
}
|
|
1663
1663
|
delete(e) {
|
|
1664
1664
|
return this.request({
|
|
1665
1665
|
...e,
|
|
1666
|
-
method:
|
|
1666
|
+
method: F.delete
|
|
1667
1667
|
});
|
|
1668
1668
|
}
|
|
1669
1669
|
getRetryDelay(e, t) {
|
|
1670
1670
|
return f(t, t + e * t);
|
|
1671
1671
|
}
|
|
1672
1672
|
async fetch(e, t = 0) {
|
|
1673
|
-
let { method: n =
|
|
1673
|
+
let { method: n = F.get, api: r = !0, path: i = "", hideError: a = !1, hideLoading: o = !1, retry: s = 0, retryDelay: c = 64, globalPreparation: l = !0, globalEnd: u = !0, initError: d = !0, endResetLimit: f = 8 } = e, te = this.getUrl(i, r), p = await this.response.emulator(e);
|
|
1674
1674
|
if (p) return p;
|
|
1675
|
-
let m = await
|
|
1675
|
+
let m = await P.getByFetch(e);
|
|
1676
1676
|
if (m) return this.hydration.toClient(e, m), m;
|
|
1677
|
-
let h = new
|
|
1677
|
+
let h = new Le(), g, _;
|
|
1678
1678
|
o || this.loading.show();
|
|
1679
1679
|
try {
|
|
1680
1680
|
await this.preparation.make(l, e);
|
|
@@ -1683,19 +1683,19 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1683
1683
|
let p = await this.preparation.makeEnd(u, r, e);
|
|
1684
1684
|
if (h.setStatus(r.status, r.statusText), this.status.setStatus(r.status, r.statusText), !a && r.status >= 400) {
|
|
1685
1685
|
var ne;
|
|
1686
|
-
d && (_ = await
|
|
1686
|
+
d && (_ = await Ue.getItem(n, r)), this.makeErrorQuery((ne = _) == null ? r : ne);
|
|
1687
1687
|
}
|
|
1688
1688
|
if (p != null && p.reset && t < f || t < s) return await ee(this.getRetryDelay(t, c)), o || this.loading.hide(), await this.fetch(e, t + 1);
|
|
1689
|
-
g = new
|
|
1689
|
+
g = new ze(e, r, p, _), await g.init();
|
|
1690
1690
|
} catch (e) {
|
|
1691
1691
|
throw a || this.makeError(e), h.setError(String(e)), this.status.setError(String(e)), o || this.loading.hide(), e;
|
|
1692
1692
|
}
|
|
1693
1693
|
h.setLastResponse(g.getData()), this.status.setLastResponse(g.getData());
|
|
1694
1694
|
let v = g.getAndStatus(h);
|
|
1695
|
-
return o || this.loading.hide(), this.hydration.toClient(e, v), await
|
|
1695
|
+
return o || this.loading.hide(), this.hydration.toClient(e, v), await P.setByFetch(e, v), v;
|
|
1696
1696
|
}
|
|
1697
1697
|
async makeQuery(e, t) {
|
|
1698
|
-
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i =
|
|
1698
|
+
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i = F.get, headers: a = {}, type: o = "application/json;charset=UTF-8", init: s = {} } = e, c = r == null ? t : r, l = `${c}${this.getBodyForGet(n, c, i)}`, u = this.headers.getByRequest(e.request, a, o), d = {
|
|
1699
1699
|
...s,
|
|
1700
1700
|
method: i,
|
|
1701
1701
|
body: this.getBody(n, i)
|
|
@@ -1789,12 +1789,12 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1789
1789
|
}, n);
|
|
1790
1790
|
}
|
|
1791
1791
|
}
|
|
1792
|
-
},
|
|
1792
|
+
}, I = class {
|
|
1793
1793
|
static isLocalhost() {
|
|
1794
1794
|
return this.getItem().isLocalhost();
|
|
1795
1795
|
}
|
|
1796
1796
|
static getItem() {
|
|
1797
|
-
return
|
|
1797
|
+
return D.get("__ui:api-instance__", () => new Ze());
|
|
1798
1798
|
}
|
|
1799
1799
|
static getStatus() {
|
|
1800
1800
|
return this.getItem().getStatus();
|
|
@@ -1814,10 +1814,10 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1814
1814
|
static getUrl(e, t = !0) {
|
|
1815
1815
|
return this.getItem().getUrl(e, t);
|
|
1816
1816
|
}
|
|
1817
|
-
static getBody(e = {}, t =
|
|
1817
|
+
static getBody(e = {}, t = F.get) {
|
|
1818
1818
|
return this.getItem().getBody(e, t);
|
|
1819
1819
|
}
|
|
1820
|
-
static getBodyForGet(e, t = "", n =
|
|
1820
|
+
static getBodyForGet(e, t = "", n = F.get) {
|
|
1821
1821
|
return this.getItem().getBodyForGet(e, t, n);
|
|
1822
1822
|
}
|
|
1823
1823
|
static setHeaders(e) {
|
|
@@ -1862,7 +1862,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1862
1862
|
static delete(e) {
|
|
1863
1863
|
return this.getItem().delete(e);
|
|
1864
1864
|
}
|
|
1865
|
-
},
|
|
1865
|
+
}, Qe = class {
|
|
1866
1866
|
constructor(e, t, n, r = E.getItem()) {
|
|
1867
1867
|
if (T(this, "callback", void 0), T(this, "callbackError", void 0), T(this, "channel", void 0), T(this, "update", (e) => {
|
|
1868
1868
|
var t;
|
|
@@ -1871,7 +1871,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1871
1871
|
var t;
|
|
1872
1872
|
return (t = this.callbackError) == null || t.call(this, e), this;
|
|
1873
1873
|
}), this.callback = t, this.callbackError = n, s()) try {
|
|
1874
|
-
this.channel = new BroadcastChannel(`${
|
|
1874
|
+
this.channel = new BroadcastChannel(`${$e()}__${e}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
|
|
1875
1875
|
} catch (e) {
|
|
1876
1876
|
r.on({
|
|
1877
1877
|
group: "broadcast",
|
|
@@ -1897,7 +1897,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1897
1897
|
var e;
|
|
1898
1898
|
return (e = this.channel) == null || e.close(), this.channel = void 0, this;
|
|
1899
1899
|
}
|
|
1900
|
-
},
|
|
1900
|
+
}, $e = () => new O("__ui:broadcast-name__").get(() => `name_${f(1e6, 9999999)}`), et = class {
|
|
1901
1901
|
constructor(e) {
|
|
1902
1902
|
T(this, "callback", void 0), T(this, "cache", void 0), T(this, "cacheOld", void 0), T(this, "comparisons", []), this.callback = e;
|
|
1903
1903
|
}
|
|
@@ -1919,7 +1919,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1919
1919
|
isUpdate(e) {
|
|
1920
1920
|
return this.cache === void 0 || this.comparisons.length !== e.length || this.comparisons.findIndex((t, n) => t !== e[n]) >= 0 ? (this.comparisons = [...e], !0) : !1;
|
|
1921
1921
|
}
|
|
1922
|
-
},
|
|
1922
|
+
}, tt = class {
|
|
1923
1923
|
constructor() {
|
|
1924
1924
|
T(this, "cache", {});
|
|
1925
1925
|
}
|
|
@@ -1930,11 +1930,11 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1930
1930
|
return await this.getCacheItem(e, t).getCacheAsync(n == null ? [] : n);
|
|
1931
1931
|
}
|
|
1932
1932
|
getCacheItem(e, t) {
|
|
1933
|
-
return e in this.cache || (this.cache[e] = new
|
|
1933
|
+
return e in this.cache || (this.cache[e] = new et(t)), this.cache[e];
|
|
1934
1934
|
}
|
|
1935
|
-
},
|
|
1935
|
+
}, nt = class {
|
|
1936
1936
|
static getItem() {
|
|
1937
|
-
return
|
|
1937
|
+
return D.get("__ui:cache-static__", () => new tt());
|
|
1938
1938
|
}
|
|
1939
1939
|
static get(e, t, n) {
|
|
1940
1940
|
return this.getItem().get(e, t, n);
|
|
@@ -1945,41 +1945,41 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1945
1945
|
};
|
|
1946
1946
|
//#endregion
|
|
1947
1947
|
//#region src/functions/toDate.ts
|
|
1948
|
-
function
|
|
1948
|
+
function L(e) {
|
|
1949
1949
|
var t, n, r, i, a, o, s, l;
|
|
1950
1950
|
if (e instanceof Date) return e;
|
|
1951
1951
|
if (c(e)) return /* @__PURE__ */ new Date();
|
|
1952
1952
|
if (typeof e == "number") return new Date(e);
|
|
1953
|
-
let u = e, d =
|
|
1953
|
+
let u = e, d = A.getTimezoneFormat().trim();
|
|
1954
1954
|
e.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (e, t, n) => (u = t, d = n.trim(), e));
|
|
1955
1955
|
let f = (t = (n = (r = (i = (a = (o = (s = (l = /^\d{4}\d{2}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) == null ? /^\d{4}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00` : l) == null ? /^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(u) && u.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6") : s) == null ? /^\d{4}-\d{2}-\d{2}$/.exec(u) && `${u}T00:00:00` : o) == null ? /^\d{4}-\d{2}$/.exec(u) && `${u}-01T00:00:00` : a) == null ? /^\d{4}$/.exec(u) && `${u}-01-01T00:00:00` : i) == null ? /^\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}:00` : r) == null ? /^\d{2}:\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}` : n) == null ? u.replace(" ", "T") : t;
|
|
1956
1956
|
return /* @__PURE__ */ new Date(`${f.trim()}${d}`);
|
|
1957
1957
|
}
|
|
1958
1958
|
//#endregion
|
|
1959
1959
|
//#region src/functions/getColumn.ts
|
|
1960
|
-
function
|
|
1960
|
+
function rt(e, t) {
|
|
1961
1961
|
return r(e, (e) => e == null ? void 0 : e[t], !0);
|
|
1962
1962
|
}
|
|
1963
1963
|
//#endregion
|
|
1964
1964
|
//#region src/classes/GeoIntl.ts
|
|
1965
|
-
var
|
|
1966
|
-
static isItem(e =
|
|
1967
|
-
return this.getLocation(e) in
|
|
1965
|
+
var R = class e {
|
|
1966
|
+
static isItem(e = A.getLocation()) {
|
|
1967
|
+
return this.getLocation(e) in B;
|
|
1968
1968
|
}
|
|
1969
|
-
static getLocation(e =
|
|
1970
|
-
if (e in
|
|
1971
|
-
let t =
|
|
1972
|
-
return
|
|
1969
|
+
static getLocation(e = A.getLocation()) {
|
|
1970
|
+
if (e in z) return z[e];
|
|
1971
|
+
let t = A.find(e);
|
|
1972
|
+
return z[e] = t.standard, t.standard;
|
|
1973
1973
|
}
|
|
1974
|
-
static getInstance(t =
|
|
1974
|
+
static getInstance(t = A.getLocation()) {
|
|
1975
1975
|
let n = this.getLocation(t);
|
|
1976
|
-
return n in
|
|
1976
|
+
return n in B ? B[n] : new e(t);
|
|
1977
1977
|
}
|
|
1978
|
-
constructor(e =
|
|
1979
|
-
T(this, "errorCenter", void 0), T(this, "geo", void 0), this.errorCenter = t, this.geo =
|
|
1978
|
+
constructor(e = A.getLocation(), t = E.getItem()) {
|
|
1979
|
+
T(this, "errorCenter", void 0), T(this, "geo", void 0), this.errorCenter = t, this.geo = A.find(e);
|
|
1980
1980
|
let n = this.getLocation();
|
|
1981
|
-
if (n in
|
|
1982
|
-
|
|
1981
|
+
if (n in B) return B[n];
|
|
1982
|
+
z[e] = n, B[n] = this;
|
|
1983
1983
|
}
|
|
1984
1984
|
getLocation() {
|
|
1985
1985
|
return this.geo.standard;
|
|
@@ -2010,7 +2010,7 @@ var z = class e {
|
|
|
2010
2010
|
type: "language",
|
|
2011
2011
|
style: t
|
|
2012
2012
|
};
|
|
2013
|
-
return this.display(
|
|
2013
|
+
return this.display(A.getByCode(e).language, n);
|
|
2014
2014
|
}
|
|
2015
2015
|
countryName(e, t) {
|
|
2016
2016
|
let n = {
|
|
@@ -2054,7 +2054,7 @@ var z = class e {
|
|
|
2054
2054
|
}, i = e.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...e) => (r.currency = String(e[2]).toUpperCase(), String(e[1])));
|
|
2055
2055
|
if (n) {
|
|
2056
2056
|
let t = this.numberObject(r);
|
|
2057
|
-
return t ?
|
|
2057
|
+
return t ? rt(t.formatToParts(y(e)).filter((e) => ["literal", "currency"].indexOf(e.type) === -1), "value").join("") : e.toString();
|
|
2058
2058
|
} else if ("currency" in r) return this.number(typeof e == "number" ? e : i, r);
|
|
2059
2059
|
else return this.number(typeof e == "number" ? e : i, {
|
|
2060
2060
|
...r,
|
|
@@ -2135,18 +2135,18 @@ var z = class e {
|
|
|
2135
2135
|
return `${this.number(a, r)} ${(i = o == null ? void 0 : o[0]) == null ? "" : i}`.trim();
|
|
2136
2136
|
}
|
|
2137
2137
|
date(e, t, n, r) {
|
|
2138
|
-
let i =
|
|
2138
|
+
let i = L(e), a = typeof n == "string", o = this.dateOptions(t, a ? n : "short");
|
|
2139
2139
|
return r && (o.hour12 = !1), a || Object.assign(o, n), i.toLocaleString(this.getLocation(), o);
|
|
2140
2140
|
}
|
|
2141
2141
|
relative(e, t, n) {
|
|
2142
|
-
let r =
|
|
2142
|
+
let r = L(e), i = n || /* @__PURE__ */ new Date(), a = {
|
|
2143
2143
|
numeric: "auto",
|
|
2144
2144
|
...typeof t == "string" ? { style: t } : t || {}
|
|
2145
2145
|
}, o = "second", s = (r.getTime() - i.getTime()) / 1e3;
|
|
2146
2146
|
return Math.abs(s) >= 60 && (o = "minute", s /= 60, Math.abs(s) >= 60 && (o = "hour", s /= 60, Math.abs(s) >= 24 && (o = "day", s /= 24, Math.abs(s) >= 30 && (o = "month", s /= 30, Math.abs(s) >= 12 && (o = "year", s /= 12))))), this.relativeByValue(s, o, a);
|
|
2147
2147
|
}
|
|
2148
2148
|
relativeLimit(e, t, n, r, i, a, o) {
|
|
2149
|
-
let s =
|
|
2149
|
+
let s = L(e), c = n || /* @__PURE__ */ new Date(), l = new Date(c), u = new Date(c);
|
|
2150
2150
|
return l.setDate(c.getDate() - t), u.setDate(c.getDate() + t), s >= l && s <= u ? this.relative(s, r, c) : this.date(s, a, i, o);
|
|
2151
2151
|
}
|
|
2152
2152
|
relativeByValue(e, t, n) {
|
|
@@ -2167,7 +2167,7 @@ var z = class e {
|
|
|
2167
2167
|
}
|
|
2168
2168
|
month(e, t) {
|
|
2169
2169
|
try {
|
|
2170
|
-
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(
|
|
2170
|
+
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(L(e));
|
|
2171
2171
|
} catch (e) {
|
|
2172
2172
|
this.errorCenter.on({
|
|
2173
2173
|
group: "intl",
|
|
@@ -2201,7 +2201,7 @@ var z = class e {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
weekday(e, t) {
|
|
2203
2203
|
try {
|
|
2204
|
-
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(
|
|
2204
|
+
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(L(e));
|
|
2205
2205
|
} catch (e) {
|
|
2206
2206
|
this.errorCenter.on({
|
|
2207
2207
|
group: "intl",
|
|
@@ -2303,15 +2303,15 @@ var z = class e {
|
|
|
2303
2303
|
"second"
|
|
2304
2304
|
].indexOf(e) !== -1 && (n.second = "2-digit")), n;
|
|
2305
2305
|
}
|
|
2306
|
-
},
|
|
2307
|
-
constructor(e, t = "date", n =
|
|
2308
|
-
T(this, "type", void 0), T(this, "code", void 0), T(this, "date", void 0), T(this, "hour24", !1), T(this, "watch", void 0), this.type = t, this.code = n, this.date =
|
|
2306
|
+
}, z = {}, B = {}, it = class e {
|
|
2307
|
+
constructor(e, t = "date", n = A.getLocation()) {
|
|
2308
|
+
T(this, "type", void 0), T(this, "code", void 0), T(this, "date", void 0), T(this, "hour24", !1), T(this, "watch", void 0), this.type = t, this.code = n, this.date = L(e), isNaN(this.date.getTime()) && E.on({
|
|
2309
2309
|
group: "intl",
|
|
2310
2310
|
code: "invalid"
|
|
2311
2311
|
});
|
|
2312
2312
|
}
|
|
2313
2313
|
getIntl() {
|
|
2314
|
-
return
|
|
2314
|
+
return R.getInstance(this.code);
|
|
2315
2315
|
}
|
|
2316
2316
|
getDate() {
|
|
2317
2317
|
return this.date;
|
|
@@ -2414,7 +2414,7 @@ var z = class e {
|
|
|
2414
2414
|
].indexOf(this.type) !== -1 && (i = n.locale("time"))), `${r.join("-")}${i ? `T${i}${t ? n.getTimeZone() : ""}` : ""}`;
|
|
2415
2415
|
}
|
|
2416
2416
|
setDate(e) {
|
|
2417
|
-
return this.date =
|
|
2417
|
+
return this.date = L(e), this.update(), this;
|
|
2418
2418
|
}
|
|
2419
2419
|
setType(e) {
|
|
2420
2420
|
return this.type = e, this.update(), this;
|
|
@@ -2566,22 +2566,22 @@ var z = class e {
|
|
|
2566
2566
|
};
|
|
2567
2567
|
//#endregion
|
|
2568
2568
|
//#region src/functions/getItemByPath.ts
|
|
2569
|
-
function
|
|
2569
|
+
function V(e, n) {
|
|
2570
2570
|
var r;
|
|
2571
2571
|
if (!l(n, !0)) return;
|
|
2572
2572
|
let i = ae(n, ".", 2), a = i[0];
|
|
2573
|
-
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ?
|
|
2573
|
+
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ? V(e[a], i[1]) : (r = e == null ? void 0 : e[a]) == null ? void 0 : r;
|
|
2574
2574
|
}
|
|
2575
2575
|
//#endregion
|
|
2576
2576
|
//#region src/functions/toCamelCase.ts
|
|
2577
|
-
function
|
|
2577
|
+
function at(e) {
|
|
2578
2578
|
return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...e) => `${String(e[1]).toUpperCase()}`).replace(/^([A-Z])/, (e) => `${e.toLowerCase()}`);
|
|
2579
2579
|
}
|
|
2580
2580
|
//#endregion
|
|
2581
2581
|
//#region src/types/formattersTypes.ts
|
|
2582
|
-
var
|
|
2582
|
+
var H = /* @__PURE__ */ function(e) {
|
|
2583
2583
|
return e.currency = "currency", e.date = "date", e.name = "name", e.number = "number", e.plural = "plural", e.unit = "unit", e;
|
|
2584
|
-
}({}),
|
|
2584
|
+
}({}), ot = class {
|
|
2585
2585
|
constructor(e, t) {
|
|
2586
2586
|
T(this, "options", void 0), T(this, "list", void 0), this.options = e, this.list = t;
|
|
2587
2587
|
}
|
|
@@ -2595,7 +2595,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2595
2595
|
return this.list ? this.isArray() ? this.list.length : 1 : 0;
|
|
2596
2596
|
}
|
|
2597
2597
|
getList() {
|
|
2598
|
-
return this.list ?
|
|
2598
|
+
return this.list ? M(this.list) : [];
|
|
2599
2599
|
}
|
|
2600
2600
|
getOptions() {
|
|
2601
2601
|
return this.options;
|
|
@@ -2613,50 +2613,50 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2613
2613
|
getFormatData(e) {
|
|
2614
2614
|
let t = {};
|
|
2615
2615
|
return r(this.options, (n, r) => {
|
|
2616
|
-
let i = `${
|
|
2616
|
+
let i = `${at(r)}Format`, a = V(e, r);
|
|
2617
2617
|
n != null && n.transformation ? l(a) ? t[i] = n.transformation(a, e, n.options) : t[i] = "" : t[i] = this.transformation(a, e, n.type, n.options);
|
|
2618
2618
|
}), t;
|
|
2619
2619
|
}
|
|
2620
2620
|
transformation(e, t, n, r) {
|
|
2621
|
-
if (l(e) || n ===
|
|
2622
|
-
case
|
|
2623
|
-
case
|
|
2624
|
-
case
|
|
2625
|
-
case
|
|
2626
|
-
case
|
|
2627
|
-
case
|
|
2621
|
+
if (l(e) || n === H.name) switch (n) {
|
|
2622
|
+
case H.currency: return this.formatCurrency(e, t, r);
|
|
2623
|
+
case H.date: return this.formatDate(e, r);
|
|
2624
|
+
case H.name: return this.formatName(t, r);
|
|
2625
|
+
case H.number: return this.formatNumber(e, r);
|
|
2626
|
+
case H.plural: return this.formatPlural(e, r);
|
|
2627
|
+
case H.unit: return this.formatUnit(e, r);
|
|
2628
2628
|
default: return String(e);
|
|
2629
2629
|
}
|
|
2630
2630
|
return "";
|
|
2631
2631
|
}
|
|
2632
2632
|
formatCurrency(e, t, n) {
|
|
2633
2633
|
var r;
|
|
2634
|
-
let i = n != null && n.currencyPropName ?
|
|
2635
|
-
return
|
|
2634
|
+
let i = n != null && n.currencyPropName ? V(t, n.currencyPropName) : t == null ? void 0 : t.currency;
|
|
2635
|
+
return R.getInstance().currency(e, (r = n == null ? void 0 : n.options) == null ? i : r, n == null ? void 0 : n.numberOnly);
|
|
2636
2636
|
}
|
|
2637
2637
|
formatDate(e, t) {
|
|
2638
|
-
return
|
|
2638
|
+
return R.getInstance().date(e, t == null ? void 0 : t.type, t == null ? void 0 : t.options, t == null ? void 0 : t.hour24);
|
|
2639
2639
|
}
|
|
2640
2640
|
formatName(e, t) {
|
|
2641
2641
|
var n, r, i;
|
|
2642
|
-
let a =
|
|
2643
|
-
return a && o ?
|
|
2642
|
+
let a = V(e, (n = t == null ? void 0 : t.lastPropName) == null ? "lastName" : n), o = V(e, (r = t == null ? void 0 : t.firstPropName) == null ? "firstName" : r), s = V(e, (i = t == null ? void 0 : t.surname) == null ? "surname" : i);
|
|
2643
|
+
return a && o ? R.getInstance().fullName(a, o, s, t == null ? void 0 : t.short) : "";
|
|
2644
2644
|
}
|
|
2645
2645
|
formatNumber(e, t) {
|
|
2646
|
-
return
|
|
2646
|
+
return R.getInstance().number(e, t == null ? void 0 : t.options);
|
|
2647
2647
|
}
|
|
2648
2648
|
formatPlural(e, t) {
|
|
2649
|
-
return t && t.words ?
|
|
2649
|
+
return t && t.words ? R.getInstance().plural(e, t == null ? void 0 : t.words, t == null ? void 0 : t.options, t == null ? void 0 : t.optionsNumber) : e;
|
|
2650
2650
|
}
|
|
2651
2651
|
formatUnit(e, t) {
|
|
2652
|
-
return t && t.unit ?
|
|
2652
|
+
return t && t.unit ? R.getInstance().unit(e, t.unit) : e;
|
|
2653
2653
|
}
|
|
2654
|
-
},
|
|
2655
|
-
constructor(e =
|
|
2654
|
+
}, st = "f", ct = class e {
|
|
2655
|
+
constructor(e = A.getLocation()) {
|
|
2656
2656
|
T(this, "code", void 0), this.code = e;
|
|
2657
2657
|
}
|
|
2658
2658
|
get(t = this.getCode()) {
|
|
2659
|
-
let n =
|
|
2659
|
+
let n = A.find(t);
|
|
2660
2660
|
if (n) {
|
|
2661
2661
|
var r;
|
|
2662
2662
|
let t = this.getCountry(n);
|
|
@@ -2672,7 +2672,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2672
2672
|
}
|
|
2673
2673
|
}
|
|
2674
2674
|
getCode() {
|
|
2675
|
-
return this.code ||
|
|
2675
|
+
return this.code || A.getLocation();
|
|
2676
2676
|
}
|
|
2677
2677
|
getFlag(e = this.getCode()) {
|
|
2678
2678
|
var t;
|
|
@@ -2680,7 +2680,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2680
2680
|
}
|
|
2681
2681
|
getList(e, t = !0) {
|
|
2682
2682
|
let n = r(this.getCodes(e), (e) => this.get(e));
|
|
2683
|
-
return t ? new
|
|
2683
|
+
return t ? new R().sort(n, (e, t) => [e.label, t.label]) : n;
|
|
2684
2684
|
}
|
|
2685
2685
|
getNational(t, n = !0) {
|
|
2686
2686
|
let i = r(this.getList(t, !1), (t) => {
|
|
@@ -2692,13 +2692,13 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2692
2692
|
nationalCountry: n == null ? void 0 : n.country
|
|
2693
2693
|
};
|
|
2694
2694
|
});
|
|
2695
|
-
return n ? new
|
|
2695
|
+
return n ? new R().sort(i, (e, t) => [e.label, t.label]) : i;
|
|
2696
2696
|
}
|
|
2697
2697
|
setCode(e) {
|
|
2698
2698
|
return this.code = e, this;
|
|
2699
2699
|
}
|
|
2700
2700
|
getLocation() {
|
|
2701
|
-
return new
|
|
2701
|
+
return new R(this.code);
|
|
2702
2702
|
}
|
|
2703
2703
|
getCodes(t) {
|
|
2704
2704
|
return t == null ? Object.keys(e.flags) : t;
|
|
@@ -2710,7 +2710,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2710
2710
|
return this.getLocation().countryName(e.country);
|
|
2711
2711
|
}
|
|
2712
2712
|
};
|
|
2713
|
-
T(
|
|
2713
|
+
T(ct, "flags", {
|
|
2714
2714
|
AD: "f-ad",
|
|
2715
2715
|
AE: "f-ae",
|
|
2716
2716
|
AF: "f-af",
|
|
@@ -2955,7 +2955,7 @@ T(st, "flags", {
|
|
|
2955
2955
|
});
|
|
2956
2956
|
//#endregion
|
|
2957
2957
|
//#region src/classes/GeoPhone.ts
|
|
2958
|
-
var
|
|
2958
|
+
var lt = class {
|
|
2959
2959
|
static get(e) {
|
|
2960
2960
|
return this.getList().find((t) => e === t.value);
|
|
2961
2961
|
}
|
|
@@ -3011,11 +3011,11 @@ var ct = class {
|
|
|
3011
3011
|
return (t = (n = e.match(/\*/g)) == null ? void 0 : n.length) == null ? 0 : t;
|
|
3012
3012
|
}
|
|
3013
3013
|
static makeList() {
|
|
3014
|
-
let e = r(
|
|
3014
|
+
let e = r(A.getList(), (e) => {
|
|
3015
3015
|
if (e != null && e.phoneMask) return {
|
|
3016
3016
|
phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/g, "")) || void 0,
|
|
3017
3017
|
within: (e == null ? void 0 : e.phoneWithin) || 0,
|
|
3018
|
-
mask:
|
|
3018
|
+
mask: M(e.phoneMask),
|
|
3019
3019
|
value: e.country
|
|
3020
3020
|
};
|
|
3021
3021
|
});
|
|
@@ -3054,12 +3054,12 @@ var ct = class {
|
|
|
3054
3054
|
return e.replace(/\*/, this.getWithinSymbol(t));
|
|
3055
3055
|
}
|
|
3056
3056
|
};
|
|
3057
|
-
T(
|
|
3057
|
+
T(lt, "list", void 0), T(lt, "map", void 0);
|
|
3058
3058
|
//#endregion
|
|
3059
3059
|
//#region src/classes/Global.ts
|
|
3060
|
-
var
|
|
3060
|
+
var ut = class {
|
|
3061
3061
|
static getItem() {
|
|
3062
|
-
return
|
|
3062
|
+
return D.get("__ui:global-instance__", () => ({}));
|
|
3063
3063
|
}
|
|
3064
3064
|
static get(e) {
|
|
3065
3065
|
var t;
|
|
@@ -3069,7 +3069,7 @@ var lt = class {
|
|
|
3069
3069
|
let t = this.getItem();
|
|
3070
3070
|
Object.keys(t).length > 0 || Object.assign(t, e);
|
|
3071
3071
|
}
|
|
3072
|
-
},
|
|
3072
|
+
}, dt = class {
|
|
3073
3073
|
constructor() {
|
|
3074
3074
|
T(this, "hash", void 0), T(this, "watch", {}), T(this, "block", !1), T(this, "time", void 0);
|
|
3075
3075
|
}
|
|
@@ -3135,9 +3135,9 @@ var lt = class {
|
|
|
3135
3135
|
((r = this.hash) == null ? void 0 : r[n]) !== (e == null ? void 0 : e[n]) && t.forEach((t) => t(e[n]));
|
|
3136
3136
|
}), this;
|
|
3137
3137
|
}
|
|
3138
|
-
},
|
|
3138
|
+
}, ft = class {
|
|
3139
3139
|
static getItem() {
|
|
3140
|
-
return
|
|
3140
|
+
return D.get("__ui:hash-instance__", () => new dt());
|
|
3141
3141
|
}
|
|
3142
3142
|
static get(e, t) {
|
|
3143
3143
|
return this.getItem().get(e, t);
|
|
@@ -3154,29 +3154,29 @@ var lt = class {
|
|
|
3154
3154
|
static reload() {
|
|
3155
3155
|
this.getItem().reload();
|
|
3156
3156
|
}
|
|
3157
|
-
},
|
|
3157
|
+
}, pt = 320, mt = "--LOAD--", ht = class {
|
|
3158
3158
|
static is(e) {
|
|
3159
3159
|
return e in this.icons || this.getName(e) in this.icons;
|
|
3160
3160
|
}
|
|
3161
3161
|
static async get(e, t = "", n = 1e3 * 60 * 3) {
|
|
3162
3162
|
let r = this.getRaw(e, t);
|
|
3163
|
-
return typeof r == "string" ? r ===
|
|
3163
|
+
return typeof r == "string" ? r === mt && n > 0 ? (await this.wait(), this.get(e, t, n - pt)) : r : x(r) ? await r() : await r;
|
|
3164
3164
|
}
|
|
3165
3165
|
static getAsync(e, t = "") {
|
|
3166
3166
|
let n = this.getRaw(e, t);
|
|
3167
|
-
return typeof n == "string" && n !==
|
|
3167
|
+
return typeof n == "string" && n !== mt ? n : "";
|
|
3168
3168
|
}
|
|
3169
3169
|
static getNameList() {
|
|
3170
3170
|
return r(this.icons, (e, t) => t.replace(/^@/, ""));
|
|
3171
3171
|
}
|
|
3172
3172
|
static getUrlGlobal() {
|
|
3173
|
-
return `${
|
|
3173
|
+
return `${I.isLocalhost(), ""}${this.url}`;
|
|
3174
3174
|
}
|
|
3175
3175
|
static add(e, t) {
|
|
3176
3176
|
this.icons[this.getName(e)] = t;
|
|
3177
3177
|
}
|
|
3178
3178
|
static addLoad(e) {
|
|
3179
|
-
this.icons[this.getName(e)] =
|
|
3179
|
+
this.icons[this.getName(e)] = mt;
|
|
3180
3180
|
}
|
|
3181
3181
|
static addGlobal(e, t) {
|
|
3182
3182
|
this.icons[this.getName(e)] = `${this.getUrlGlobal()}${t}`;
|
|
@@ -3198,22 +3198,22 @@ var lt = class {
|
|
|
3198
3198
|
return (n = (r = (i = this.icons) == null ? void 0 : i[this.getName(e)]) == null ? (a = this.icons) == null ? void 0 : a[e] : r) == null ? `${e.replace(/^@/, t || this.url)}.svg` : n;
|
|
3199
3199
|
}
|
|
3200
3200
|
static wait() {
|
|
3201
|
-
return new Promise((e) => setTimeout(() => e(),
|
|
3201
|
+
return new Promise((e) => setTimeout(() => e(), pt));
|
|
3202
3202
|
}
|
|
3203
3203
|
};
|
|
3204
|
-
T(
|
|
3204
|
+
T(ht, "icons", {}), T(ht, "url", "/icons/");
|
|
3205
3205
|
//#endregion
|
|
3206
3206
|
//#region src/functions/getElementItem.ts
|
|
3207
|
-
function
|
|
3207
|
+
function gt(e, t, n) {
|
|
3208
3208
|
var r, i;
|
|
3209
|
-
return (r = (i =
|
|
3209
|
+
return (r = (i = j(e)) == null ? void 0 : i[t]) == null ? n : r;
|
|
3210
3210
|
}
|
|
3211
3211
|
//#endregion
|
|
3212
3212
|
//#region src/functions/setElementItem.ts
|
|
3213
|
-
function
|
|
3214
|
-
let a =
|
|
3213
|
+
function _t(e, n, i) {
|
|
3214
|
+
let a = j(e);
|
|
3215
3215
|
if (a) {
|
|
3216
|
-
let e =
|
|
3216
|
+
let e = gt(a, n);
|
|
3217
3217
|
if (t(e) && t(i)) r(i, (t, n) => {
|
|
3218
3218
|
e[n] = S(t);
|
|
3219
3219
|
});
|
|
@@ -3226,31 +3226,31 @@ function gt(e, n, i) {
|
|
|
3226
3226
|
}
|
|
3227
3227
|
//#endregion
|
|
3228
3228
|
//#region src/functions/createElement.ts
|
|
3229
|
-
function
|
|
3229
|
+
function U(e, t = "div", i, a) {
|
|
3230
3230
|
if (!s()) return;
|
|
3231
3231
|
let o = document.createElement(t);
|
|
3232
3232
|
return typeof i == "function" ? i(o) : n(i) && r(i, (e, t) => {
|
|
3233
|
-
|
|
3233
|
+
_t(o, t, e);
|
|
3234
3234
|
}), e == null || e.insertBefore(o, a == null ? null : a), o;
|
|
3235
3235
|
}
|
|
3236
3236
|
//#endregion
|
|
3237
3237
|
//#region src/functions/encodeAttribute.ts
|
|
3238
|
-
var
|
|
3238
|
+
var vt = {
|
|
3239
3239
|
"&": "&",
|
|
3240
3240
|
"<": "<",
|
|
3241
3241
|
">": ">",
|
|
3242
3242
|
"\"": """,
|
|
3243
3243
|
"'": "'"
|
|
3244
3244
|
};
|
|
3245
|
-
function
|
|
3245
|
+
function W(e) {
|
|
3246
3246
|
return String(e).replace(/[&<>"']/g, (e) => {
|
|
3247
3247
|
var t;
|
|
3248
|
-
return (t =
|
|
3248
|
+
return (t = vt == null ? void 0 : vt[e]) == null ? e : t;
|
|
3249
3249
|
});
|
|
3250
3250
|
}
|
|
3251
3251
|
//#endregion
|
|
3252
3252
|
//#region src/classes/MetaManager.ts
|
|
3253
|
-
var
|
|
3253
|
+
var G = class {
|
|
3254
3254
|
constructor(e, t = !1) {
|
|
3255
3255
|
T(this, "listMeta", void 0), T(this, "isProperty", void 0), T(this, "items", {}), this.listMeta = e, this.isProperty = t, this.update();
|
|
3256
3256
|
}
|
|
@@ -3292,13 +3292,13 @@ var K = class {
|
|
|
3292
3292
|
let r = this.findMetaElement(e);
|
|
3293
3293
|
if (r) return r.content = n, this;
|
|
3294
3294
|
let i = { content: n };
|
|
3295
|
-
return this.isProperty ? i.property = e : i.name = e,
|
|
3295
|
+
return this.isProperty ? i.property = e : i.name = e, U(document.head, "meta", i), this;
|
|
3296
3296
|
}
|
|
3297
3297
|
toHtmlString(e) {
|
|
3298
3298
|
var t;
|
|
3299
3299
|
let n = (t = this.items[e]) == null ? "" : t;
|
|
3300
3300
|
if (e === "title") return "";
|
|
3301
|
-
let r =
|
|
3301
|
+
let r = W(n);
|
|
3302
3302
|
return r ? `<meta ${this.getAttributeName()}="${e}" content="${r}">` : "";
|
|
3303
3303
|
}
|
|
3304
3304
|
toHtmlTitle(e) {
|
|
@@ -3310,121 +3310,121 @@ var K = class {
|
|
|
3310
3310
|
this.items[e] = (t = (n = this.findMetaElement(e)) == null ? void 0 : n.content) == null ? "" : t;
|
|
3311
3311
|
}), this;
|
|
3312
3312
|
}
|
|
3313
|
-
},
|
|
3313
|
+
}, K = /* @__PURE__ */ function(e) {
|
|
3314
3314
|
return e.title = "title", e.description = "description", e.keywords = "keywords", e.canonical = "canonical", e.robots = "robots", e.author = "author", e;
|
|
3315
|
-
}({}),
|
|
3315
|
+
}({}), yt = /* @__PURE__ */ function(e) {
|
|
3316
3316
|
return e.indexFollow = "index, follow", e.noIndexFollow = "noindex, follow", e.indexNoFollow = "index, nofollow", e.noIndexNoFollow = "noindex, nofollow", e.noArchive = "noarchive", e.noSnippet = "nosnippet", e.noImageIndex = "noimageindex", e.images = "images", e.noTranslate = "notranslate", e.noPreview = "nopreview", e.textOnly = "textonly", e.noIndexSubpages = "noindex, noarchive", e.none = "none", e;
|
|
3317
|
-
}({}),
|
|
3317
|
+
}({}), q = /* @__PURE__ */ function(e) {
|
|
3318
3318
|
return e.title = "og:title", e.type = "og:type", e.url = "og:url", e.image = "og:image", e.description = "og:description", e.locale = "og:locale", e.siteName = "og:site_name", e.localeAlternate = "og:locale:alternate", e.imageUrl = "og:image:url", e.imageSecureUrl = "og:image:secure_url", e.imageType = "og:image:type", e.imageWidth = "og:image:width", e.imageHeight = "og:image:height", e.imageAlt = "og:image:alt", e.video = "og:video", e.videoUrl = "og:video:url", e.videoSecureUrl = "og:video:secure_url", e.videoType = "og:video:type", e.videoWidth = "og:video:width", e.videoHeight = "og:video:height", e.audio = "og:audio", e.audioSecureUrl = "og:audio:secure_url", e.audioType = "og:audio:type", e.articlePublishedTime = "article:published_time", e.articleModifiedTime = "article:modified_time", e.articleExpirationTime = "article:expiration_time", e.articleAuthor = "article:author", e.articleSection = "article:section", e.articleTag = "article:tag", e.bookAuthor = "book:author", e.bookIsbn = "book:isbn", e.bookReleaseDate = "book:release_date", e.bookTag = "book:tag", e.musicDuration = "music:duration", e.musicAlbum = "music:album", e.musicAlbumDisc = "music:album:disc", e.musicAlbumTrack = "music:album:track", e.musicMusician = "music:musician", e.musicSong = "music:song", e.musicSongDisc = "music:song:disc", e.musicSongTrack = "music:song:track", e.musicReleaseDate = "music:release_date", e.musicCreator = "music:creator", e.videoActor = "video:actor", e.videoActorRole = "video:actor:role", e.videoDirector = "video:director", e.videoWriter = "video:writer", e.videoDuration = "video:duration", e.videoReleaseDate = "video:release_date", e.videoTag = "video:tag", e.videoSeries = "video:series", e.profileFirstName = "profile:first_name", e.profileLastName = "profile:last_name", e.profileUsername = "profile:username", e.profileGender = "profile:gender", e.productBrand = "product:brand", e.productAvailability = "product:availability", e.productCondition = "product:condition", e.productPriceAmount = "product:price:amount", e.productPriceCurrency = "product:price:currency", e.productRetailerItemId = "product:retailer_item_id", e.productCategory = "product:category", e.productEan = "product:ean", e.productIsbn = "product:isbn", e.productMfrPartNo = "product:mfr_part_no", e.productUpc = "product:upc", e.productWeightValue = "product:weight:value", e.productWeightUnits = "product:weight:units", e.productColor = "product:color", e.productMaterial = "product:material", e.productPattern = "product:pattern", e.productAgeGroup = "product:age_group", e.productGender = "product:gender", e;
|
|
3319
|
-
}({}), yt = /* @__PURE__ */ function(e) {
|
|
3320
|
-
return e.website = "website", e.article = "article", e.video = "video.other", e.videoTvShow = "video.tv_show", e.videoEpisode = "video.episode", e.videoMovie = "video.movie", e.musicAlbum = "music.album", e.musicPlaylist = "music.playlist", e.musicSong = "music.song", e.musicRadioStation = "music.radio_station", e.app = "app", e.product = "product", e.business = "business.business", e.place = "place", e.event = "event", e.profile = "profile", e.book = "book", e;
|
|
3321
3319
|
}({}), bt = /* @__PURE__ */ function(e) {
|
|
3322
|
-
return e.
|
|
3320
|
+
return e.website = "website", e.article = "article", e.video = "video.other", e.videoTvShow = "video.tv_show", e.videoEpisode = "video.episode", e.videoMovie = "video.movie", e.musicAlbum = "music.album", e.musicPlaylist = "music.playlist", e.musicSong = "music.song", e.musicRadioStation = "music.radio_station", e.app = "app", e.product = "product", e.business = "business.business", e.place = "place", e.event = "event", e.profile = "profile", e.book = "book", e;
|
|
3323
3321
|
}({}), xt = /* @__PURE__ */ function(e) {
|
|
3324
|
-
return e.
|
|
3322
|
+
return e.inStock = "in stock", e.outOfStock = "out of stock", e.preorder = "preorder", e.backorder = "backorder", e.discontinued = "discontinued", e.pending = "pending", e;
|
|
3325
3323
|
}({}), St = /* @__PURE__ */ function(e) {
|
|
3326
|
-
return e.
|
|
3324
|
+
return e.new = "new", e.used = "used", e.refurbished = "refurbished", e;
|
|
3327
3325
|
}({}), Ct = /* @__PURE__ */ function(e) {
|
|
3326
|
+
return e.newborn = "newborn", e.infant = "infant", e.toddler = "toddler", e.kids = "kids", e.adult = "adult", e;
|
|
3327
|
+
}({}), wt = /* @__PURE__ */ function(e) {
|
|
3328
3328
|
return e.female = "female", e.male = "male", e.unisex = "unisex", e;
|
|
3329
|
-
}({}),
|
|
3329
|
+
}({}), J = /* @__PURE__ */ function(e) {
|
|
3330
3330
|
return e.card = "twitter:card", e.site = "twitter:site", e.creator = "twitter:creator", e.url = "twitter:url", e.title = "twitter:title", e.description = "twitter:description", e.image = "twitter:image", e.imageAlt = "twitter:image:alt", e.imageSrc = "twitter:image:src", e.imageWidth = "twitter:image:width", e.imageHeight = "twitter:image:height", e.label1 = "twitter:label1", e.data1 = "twitter:data1", e.label2 = "twitter:label2", e.data2 = "twitter:data2", e.appNameIphone = "twitter:app:name:iphone", e.appIdIphone = "twitter:app:id:iphone", e.appUrlIphone = "twitter:app:url:iphone", e.appNameIpad = "twitter:app:name:ipad", e.appIdIpad = "twitter:app:id:ipad", e.appUrlIpad = "twitter:app:url:ipad", e.appNameGooglePlay = "twitter:app:name:googleplay", e.appIdGooglePlay = "twitter:app:id:googleplay", e.appUrlGooglePlay = "twitter:app:url:googleplay", e.player = "twitter:player", e.playerWidth = "twitter:player:width", e.playerHeight = "twitter:player:height", e.playerStream = "twitter:player:stream", e.playerStreamContentType = "twitter:player:stream:content_type", e;
|
|
3331
|
-
}({}),
|
|
3331
|
+
}({}), Tt = /* @__PURE__ */ function(e) {
|
|
3332
3332
|
return e.summary = "summary", e.summaryLargeImage = "summary_large_image", e.app = "app", e.player = "player", e.product = "product", e.gallery = "gallery", e.photo = "photo", e.leadGeneration = "lead_generation", e.audio = "audio", e.poll = "poll", e;
|
|
3333
|
-
}({}),
|
|
3333
|
+
}({}), Et = class extends G {
|
|
3334
3334
|
constructor() {
|
|
3335
|
-
super(Object.values(
|
|
3335
|
+
super(Object.values(q), !0);
|
|
3336
3336
|
}
|
|
3337
3337
|
getTitle() {
|
|
3338
|
-
return this.get(
|
|
3338
|
+
return this.get(q.title);
|
|
3339
3339
|
}
|
|
3340
3340
|
getType() {
|
|
3341
|
-
return this.get(
|
|
3341
|
+
return this.get(q.type);
|
|
3342
3342
|
}
|
|
3343
3343
|
getUrl() {
|
|
3344
|
-
return this.get(
|
|
3344
|
+
return this.get(q.url);
|
|
3345
3345
|
}
|
|
3346
3346
|
getImage() {
|
|
3347
|
-
return this.get(
|
|
3347
|
+
return this.get(q.image);
|
|
3348
3348
|
}
|
|
3349
3349
|
getDescription() {
|
|
3350
|
-
return this.get(
|
|
3350
|
+
return this.get(q.description);
|
|
3351
3351
|
}
|
|
3352
3352
|
getLocale() {
|
|
3353
|
-
return this.get(
|
|
3353
|
+
return this.get(q.locale);
|
|
3354
3354
|
}
|
|
3355
3355
|
getSiteName() {
|
|
3356
|
-
return this.get(
|
|
3356
|
+
return this.get(q.siteName);
|
|
3357
3357
|
}
|
|
3358
3358
|
setTitle(e) {
|
|
3359
|
-
return this.set(
|
|
3359
|
+
return this.set(q.title, e);
|
|
3360
3360
|
}
|
|
3361
3361
|
setType(e) {
|
|
3362
|
-
return this.set(
|
|
3362
|
+
return this.set(q.type, e);
|
|
3363
3363
|
}
|
|
3364
3364
|
setUrl(e) {
|
|
3365
|
-
return this.set(
|
|
3365
|
+
return this.set(q.url, e);
|
|
3366
3366
|
}
|
|
3367
3367
|
setImage(e) {
|
|
3368
|
-
return this.set(
|
|
3368
|
+
return this.set(q.image, e);
|
|
3369
3369
|
}
|
|
3370
3370
|
setDescription(e) {
|
|
3371
|
-
return this.set(
|
|
3371
|
+
return this.set(q.description, e);
|
|
3372
3372
|
}
|
|
3373
3373
|
setLocale(e) {
|
|
3374
|
-
return this.set(
|
|
3374
|
+
return this.set(q.locale, e);
|
|
3375
3375
|
}
|
|
3376
3376
|
setSiteName(e) {
|
|
3377
|
-
return this.set(
|
|
3377
|
+
return this.set(q.siteName, e);
|
|
3378
3378
|
}
|
|
3379
|
-
},
|
|
3379
|
+
}, Dt = class extends G {
|
|
3380
3380
|
constructor() {
|
|
3381
|
-
super(Object.values(
|
|
3381
|
+
super(Object.values(J));
|
|
3382
3382
|
}
|
|
3383
3383
|
getCard() {
|
|
3384
|
-
return this.get(
|
|
3384
|
+
return this.get(J.card);
|
|
3385
3385
|
}
|
|
3386
3386
|
getSite() {
|
|
3387
|
-
return this.get(
|
|
3387
|
+
return this.get(J.site);
|
|
3388
3388
|
}
|
|
3389
3389
|
getCreator() {
|
|
3390
|
-
return this.get(
|
|
3390
|
+
return this.get(J.creator);
|
|
3391
3391
|
}
|
|
3392
3392
|
getUrl() {
|
|
3393
|
-
return this.get(
|
|
3393
|
+
return this.get(J.url);
|
|
3394
3394
|
}
|
|
3395
3395
|
getTitle() {
|
|
3396
|
-
return this.get(
|
|
3396
|
+
return this.get(J.title);
|
|
3397
3397
|
}
|
|
3398
3398
|
getDescription() {
|
|
3399
|
-
return this.get(
|
|
3399
|
+
return this.get(J.description);
|
|
3400
3400
|
}
|
|
3401
3401
|
getImage() {
|
|
3402
|
-
return this.get(
|
|
3402
|
+
return this.get(J.image);
|
|
3403
3403
|
}
|
|
3404
3404
|
setCard(e) {
|
|
3405
|
-
return this.set(
|
|
3405
|
+
return this.set(J.card, e), this;
|
|
3406
3406
|
}
|
|
3407
3407
|
setSite(e) {
|
|
3408
|
-
return this.set(
|
|
3408
|
+
return this.set(J.site, e), this;
|
|
3409
3409
|
}
|
|
3410
3410
|
setCreator(e) {
|
|
3411
|
-
return this.set(
|
|
3411
|
+
return this.set(J.creator, e), this;
|
|
3412
3412
|
}
|
|
3413
3413
|
setUrl(e) {
|
|
3414
|
-
return this.set(
|
|
3414
|
+
return this.set(J.url, e), this;
|
|
3415
3415
|
}
|
|
3416
3416
|
setTitle(e) {
|
|
3417
|
-
return this.set(
|
|
3417
|
+
return this.set(J.title, e), this;
|
|
3418
3418
|
}
|
|
3419
3419
|
setDescription(e) {
|
|
3420
|
-
return this.set(
|
|
3420
|
+
return this.set(J.description, e), this;
|
|
3421
3421
|
}
|
|
3422
3422
|
setImage(e) {
|
|
3423
|
-
return this.set(
|
|
3423
|
+
return this.set(J.image, e), this;
|
|
3424
3424
|
}
|
|
3425
|
-
},
|
|
3425
|
+
}, Ot = class extends G {
|
|
3426
3426
|
constructor() {
|
|
3427
|
-
super(Object.values(
|
|
3427
|
+
super(Object.values(K)), T(this, "suffix", void 0), T(this, "og", void 0), T(this, "twitter", void 0), this.og = new Et(), this.twitter = new Dt();
|
|
3428
3428
|
}
|
|
3429
3429
|
getOg() {
|
|
3430
3430
|
return this.og;
|
|
@@ -3433,26 +3433,26 @@ var K = class {
|
|
|
3433
3433
|
return this.twitter;
|
|
3434
3434
|
}
|
|
3435
3435
|
getTitle() {
|
|
3436
|
-
let e = this.get(
|
|
3436
|
+
let e = this.get(K.title);
|
|
3437
3437
|
return !l(e) && s() && (e = document.title), e.replace(this.getSuffix(), "").trim();
|
|
3438
3438
|
}
|
|
3439
3439
|
getKeywords() {
|
|
3440
|
-
return this.get(
|
|
3440
|
+
return this.get(K.keywords);
|
|
3441
3441
|
}
|
|
3442
3442
|
getDescription() {
|
|
3443
|
-
return this.get(
|
|
3443
|
+
return this.get(K.description);
|
|
3444
3444
|
}
|
|
3445
3445
|
getImage() {
|
|
3446
3446
|
return this.og.getImage();
|
|
3447
3447
|
}
|
|
3448
3448
|
getCanonical() {
|
|
3449
|
-
return this.get(
|
|
3449
|
+
return this.get(K.canonical);
|
|
3450
3450
|
}
|
|
3451
3451
|
getRobots() {
|
|
3452
|
-
return this.get(
|
|
3452
|
+
return this.get(K.robots);
|
|
3453
3453
|
}
|
|
3454
3454
|
getAuthor() {
|
|
3455
|
-
return this.get(
|
|
3455
|
+
return this.get(K.author);
|
|
3456
3456
|
}
|
|
3457
3457
|
getSiteName() {
|
|
3458
3458
|
return this.og.getSiteName();
|
|
@@ -3462,25 +3462,25 @@ var K = class {
|
|
|
3462
3462
|
}
|
|
3463
3463
|
setTitle(e) {
|
|
3464
3464
|
let t = l(e) ? `${e}${this.getSuffix()}` : this.suffix ? this.suffix : "";
|
|
3465
|
-
return s() && (document.title = t), this.set(
|
|
3465
|
+
return s() && (document.title = t), this.set(K.title, t), this.og.setTitle(t), this.twitter.setTitle(t), this;
|
|
3466
3466
|
}
|
|
3467
3467
|
setKeywords(e) {
|
|
3468
|
-
return this.set(
|
|
3468
|
+
return this.set(K.keywords, M(e).join(", ")), this;
|
|
3469
3469
|
}
|
|
3470
3470
|
setDescription(e) {
|
|
3471
|
-
return this.set(
|
|
3471
|
+
return this.set(K.description, e), this;
|
|
3472
3472
|
}
|
|
3473
3473
|
setImage(e) {
|
|
3474
3474
|
return this.og.setImage(e), this.twitter.setImage(e), this;
|
|
3475
3475
|
}
|
|
3476
3476
|
setCanonical(e) {
|
|
3477
|
-
return this.set(
|
|
3477
|
+
return this.set(K.canonical, e), this.og.setUrl(e), this.twitter.setUrl(e), this;
|
|
3478
3478
|
}
|
|
3479
3479
|
setRobots(e) {
|
|
3480
|
-
return this.set(
|
|
3480
|
+
return this.set(K.robots, e), this;
|
|
3481
3481
|
}
|
|
3482
3482
|
setAuthor(e) {
|
|
3483
|
-
return this.set(
|
|
3483
|
+
return this.set(K.author, e), this;
|
|
3484
3484
|
}
|
|
3485
3485
|
setSiteName(e) {
|
|
3486
3486
|
return this.og.setSiteName(e), this.twitter.setSite(e), this;
|
|
@@ -3495,14 +3495,14 @@ var K = class {
|
|
|
3495
3495
|
return `${super.html()}${this.og.html()}${this.twitter.html()}`;
|
|
3496
3496
|
}
|
|
3497
3497
|
htmlTitle() {
|
|
3498
|
-
return this.toHtmlTitle(this.get(
|
|
3498
|
+
return this.toHtmlTitle(this.get(K.title));
|
|
3499
3499
|
}
|
|
3500
3500
|
getSuffix() {
|
|
3501
3501
|
return l(this.suffix) ? ` - ${this.suffix}` : "";
|
|
3502
3502
|
}
|
|
3503
|
-
},
|
|
3503
|
+
}, kt = class {
|
|
3504
3504
|
static getItem() {
|
|
3505
|
-
return
|
|
3505
|
+
return D.get("__ui:meta-instance__", () => new Ot());
|
|
3506
3506
|
}
|
|
3507
3507
|
static getOg() {
|
|
3508
3508
|
return this.getItem().getOg();
|
|
@@ -3573,7 +3573,7 @@ var K = class {
|
|
|
3573
3573
|
static htmlTitle() {
|
|
3574
3574
|
return this.getItem().htmlTitle();
|
|
3575
3575
|
}
|
|
3576
|
-
},
|
|
3576
|
+
}, At = class {
|
|
3577
3577
|
constructor(e, t = 320, n = !1) {
|
|
3578
3578
|
T(this, "callback", void 0), T(this, "delay", void 0), T(this, "timerId", void 0), T(this, "startTime", void 0), T(this, "remaining", void 0), T(this, "completed", !1), this.callback = e, this.delay = t, n || this.resume();
|
|
3579
3579
|
}
|
|
@@ -3611,7 +3611,7 @@ var K = class {
|
|
|
3611
3611
|
stop() {
|
|
3612
3612
|
return this.timerId && (clearTimeout(this.timerId), this.timerId = void 0), this;
|
|
3613
3613
|
}
|
|
3614
|
-
},
|
|
3614
|
+
}, jt = class {
|
|
3615
3615
|
static async is() {
|
|
3616
3616
|
let e = await this.get();
|
|
3617
3617
|
return e !== -1 && e <= 8;
|
|
@@ -3627,14 +3627,14 @@ var K = class {
|
|
|
3627
3627
|
return t;
|
|
3628
3628
|
}
|
|
3629
3629
|
static getStorage() {
|
|
3630
|
-
return new
|
|
3630
|
+
return new O("__ui:scrollbar__", !0);
|
|
3631
3631
|
}
|
|
3632
3632
|
static getCalculate() {
|
|
3633
3633
|
return this.calculate;
|
|
3634
3634
|
}
|
|
3635
3635
|
static createElement() {
|
|
3636
|
-
return
|
|
3637
|
-
e.style.height = "24px", e.style.overflowY = "scroll", e.style.position = "fixed", e.style.width = "100%",
|
|
3636
|
+
return U(document.body, "div", (e) => {
|
|
3637
|
+
e.style.height = "24px", e.style.overflowY = "scroll", e.style.position = "fixed", e.style.width = "100%", U(e, "div", (e) => {
|
|
3638
3638
|
e.style.height = "100px";
|
|
3639
3639
|
});
|
|
3640
3640
|
});
|
|
@@ -3649,18 +3649,18 @@ var K = class {
|
|
|
3649
3649
|
});
|
|
3650
3650
|
}
|
|
3651
3651
|
};
|
|
3652
|
-
T(
|
|
3652
|
+
T(jt, "calculate", !1);
|
|
3653
3653
|
//#endregion
|
|
3654
3654
|
//#region src/functions/escapeExp.ts
|
|
3655
|
-
function
|
|
3655
|
+
function Y(e) {
|
|
3656
3656
|
return String(e).replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
3657
3657
|
}
|
|
3658
3658
|
//#endregion
|
|
3659
3659
|
//#region src/functions/getSeparatingSearchExp.ts
|
|
3660
|
-
function
|
|
3660
|
+
function X(e, t = 128) {
|
|
3661
3661
|
if (e instanceof RegExp) return e;
|
|
3662
3662
|
if (!e || e.trim().length === 0 || e.length > t) return /^/;
|
|
3663
|
-
let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(
|
|
3663
|
+
let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(Y).join("|");
|
|
3664
3664
|
return RegExp(`(${n})`, "ig");
|
|
3665
3665
|
}
|
|
3666
3666
|
//#endregion
|
|
@@ -3669,10 +3669,10 @@ var Mt = `___HIGHLIGHT_START_${f(1e5, 999999)}___`, Nt = `___HIGHLIGHT_END_${f(1
|
|
|
3669
3669
|
function Ft(e, t, n = "sys-highlight-match", r = !1) {
|
|
3670
3670
|
let i = a(e);
|
|
3671
3671
|
if (l(i) && l(t)) {
|
|
3672
|
-
let e = i.replace(
|
|
3673
|
-
return r && (e =
|
|
3672
|
+
let e = i.replace(X(t), `${Mt}$1${Nt}`);
|
|
3673
|
+
return r && (e = W(e)), e.replace(Pt, (e) => e === Mt ? `<span class="${n}">` : "</span>");
|
|
3674
3674
|
}
|
|
3675
|
-
return r ?
|
|
3675
|
+
return r ? W(i) : i;
|
|
3676
3676
|
}
|
|
3677
3677
|
//#endregion
|
|
3678
3678
|
//#region src/classes/SearchListData.ts
|
|
@@ -3715,7 +3715,7 @@ var It = class {
|
|
|
3715
3715
|
toFormatItem(e, t) {
|
|
3716
3716
|
let n = {};
|
|
3717
3717
|
return this.columns && this.columns.forEach((r) => {
|
|
3718
|
-
let i = this.getColumnName(r), a =
|
|
3718
|
+
let i = this.getColumnName(r), a = V(e, r);
|
|
3719
3719
|
n[i] = l(a) && t ? this.addTag(a) : C(a);
|
|
3720
3720
|
}), {
|
|
3721
3721
|
...e,
|
|
@@ -3735,7 +3735,7 @@ var It = class {
|
|
|
3735
3735
|
for (let t of this.list) {
|
|
3736
3736
|
let n = "";
|
|
3737
3737
|
if (this.columns) for (let e of this.columns) {
|
|
3738
|
-
let r =
|
|
3738
|
+
let r = V(t, e);
|
|
3739
3739
|
l(r) && (n += ` ${C(r)}`);
|
|
3740
3740
|
}
|
|
3741
3741
|
e.push({
|
|
@@ -3772,7 +3772,7 @@ var It = class {
|
|
|
3772
3772
|
//#endregion
|
|
3773
3773
|
//#region src/functions/getExp.ts
|
|
3774
3774
|
function Rt(e, t = "ig", n = ":value") {
|
|
3775
|
-
let r =
|
|
3775
|
+
let r = Y(e);
|
|
3776
3776
|
return new RegExp(n.replace(/:value/g, r), t);
|
|
3777
3777
|
}
|
|
3778
3778
|
//#endregion
|
|
@@ -3786,7 +3786,7 @@ function Bt(e, t = 128) {
|
|
|
3786
3786
|
if (!d(e) || e.trim().length === 0 || e.length > t) return /^/;
|
|
3787
3787
|
let n = [];
|
|
3788
3788
|
return a(e).split(" ").forEach((e) => {
|
|
3789
|
-
let t =
|
|
3789
|
+
let t = Y(e).trim();
|
|
3790
3790
|
l(t) && n.push(`(?=.*?${t})`);
|
|
3791
3791
|
}), RegExp(`^${n.join("")}`, "i");
|
|
3792
3792
|
}
|
|
@@ -3883,7 +3883,7 @@ var Vt = class {
|
|
|
3883
3883
|
let e = this.data.getList();
|
|
3884
3884
|
return e ? r(e, this.callbackToNone) : [];
|
|
3885
3885
|
}
|
|
3886
|
-
}, Wt = () =>
|
|
3886
|
+
}, Wt = () => D.get("__ui:storage-callback__", () => ({})), Gt = class e {
|
|
3887
3887
|
static getInstance(t, n = "main") {
|
|
3888
3888
|
return new e(t, n);
|
|
3889
3889
|
}
|
|
@@ -3916,7 +3916,7 @@ var Vt = class {
|
|
|
3916
3916
|
}
|
|
3917
3917
|
async run(e) {
|
|
3918
3918
|
this.loading = !1;
|
|
3919
|
-
for (let { callback: t, isOnce: n } of this.callbacks) await
|
|
3919
|
+
for (let { callback: t, isOnce: n } of this.callbacks) await Je(t, e), n && this.removeCallback(t);
|
|
3920
3920
|
return this;
|
|
3921
3921
|
}
|
|
3922
3922
|
}, Kt = [
|
|
@@ -3963,9 +3963,9 @@ var Vt = class {
|
|
|
3963
3963
|
})), r;
|
|
3964
3964
|
}, Yt = (e) => {
|
|
3965
3965
|
var t;
|
|
3966
|
-
return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success || !(e == null || (t = e.statusObject) == null) && t.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(
|
|
3966
|
+
return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success || !(e == null || (t = e.statusObject) == null) && t.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(I.getStatus().getStatus()))));
|
|
3967
3967
|
}, Xt = "global", Zt = 160, Qt = class {
|
|
3968
|
-
constructor(e, t = () =>
|
|
3968
|
+
constructor(e, t = () => A.getLanguage(), n = () => A.getLocation()) {
|
|
3969
3969
|
T(this, "language", void 0), T(this, "location", void 0), T(this, "files", {}), T(this, "data", {}), this.language = t, this.location = n, e && this.add(e);
|
|
3970
3970
|
}
|
|
3971
3971
|
isFile() {
|
|
@@ -4012,7 +4012,7 @@ var Vt = class {
|
|
|
4012
4012
|
async get(e, t) {
|
|
4013
4013
|
var n;
|
|
4014
4014
|
let r = this.getText(e);
|
|
4015
|
-
return r ? this.replacement(r, t) : (
|
|
4015
|
+
return r ? this.replacement(r, t) : (I.isLocalhost() || await this.add(e), this.replacement((n = this.getText(e)) == null ? e : n));
|
|
4016
4016
|
}
|
|
4017
4017
|
getSync(e, t = !1, n) {
|
|
4018
4018
|
let r = this.getText(e);
|
|
@@ -4053,7 +4053,7 @@ var Vt = class {
|
|
|
4053
4053
|
});
|
|
4054
4054
|
}
|
|
4055
4055
|
async addNormalOrSync(e) {
|
|
4056
|
-
if (l(e)) if (
|
|
4056
|
+
if (l(e)) if (I.isLocalhost()) this.addSync(e);
|
|
4057
4057
|
else {
|
|
4058
4058
|
let t = Object.keys(e);
|
|
4059
4059
|
t.length > 0 && await this.add(t);
|
|
@@ -4099,12 +4099,12 @@ var Vt = class {
|
|
|
4099
4099
|
}
|
|
4100
4100
|
getNamesNone(e) {
|
|
4101
4101
|
let t = [];
|
|
4102
|
-
return
|
|
4102
|
+
return M(e).forEach((e) => {
|
|
4103
4103
|
e !== "__TRANSLATE_START__" && e !== "__TRANSLATE_END__" && !this.hasName(e) && t.push(e);
|
|
4104
4104
|
}), t;
|
|
4105
4105
|
}
|
|
4106
4106
|
async getResponse() {
|
|
4107
|
-
let e = await
|
|
4107
|
+
let e = await I.get({
|
|
4108
4108
|
api: !1,
|
|
4109
4109
|
path: this.url,
|
|
4110
4110
|
request: { [this.propsName]: this.cache },
|
|
@@ -4177,16 +4177,71 @@ var Vt = class {
|
|
|
4177
4177
|
};
|
|
4178
4178
|
T(en, "item", void 0);
|
|
4179
4179
|
//#endregion
|
|
4180
|
+
//#region src/classes/UrlItem.ts
|
|
4181
|
+
var tn = class e {
|
|
4182
|
+
static getInstance() {
|
|
4183
|
+
return D.get("__ui:url-item__", () => new e());
|
|
4184
|
+
}
|
|
4185
|
+
constructor(e) {
|
|
4186
|
+
T(this, "url", void 0), this.set(e);
|
|
4187
|
+
}
|
|
4188
|
+
get href() {
|
|
4189
|
+
return this.url.href;
|
|
4190
|
+
}
|
|
4191
|
+
get protocol() {
|
|
4192
|
+
return this.url.protocol;
|
|
4193
|
+
}
|
|
4194
|
+
get username() {
|
|
4195
|
+
return this.url.username;
|
|
4196
|
+
}
|
|
4197
|
+
get password() {
|
|
4198
|
+
return this.url.password;
|
|
4199
|
+
}
|
|
4200
|
+
get host() {
|
|
4201
|
+
return this.url.host;
|
|
4202
|
+
}
|
|
4203
|
+
get hostname() {
|
|
4204
|
+
return this.url.hostname;
|
|
4205
|
+
}
|
|
4206
|
+
get port() {
|
|
4207
|
+
return this.url.port;
|
|
4208
|
+
}
|
|
4209
|
+
get pathname() {
|
|
4210
|
+
return this.url.pathname;
|
|
4211
|
+
}
|
|
4212
|
+
get search() {
|
|
4213
|
+
return this.url.search;
|
|
4214
|
+
}
|
|
4215
|
+
get searchParams() {
|
|
4216
|
+
return this.url.searchParams;
|
|
4217
|
+
}
|
|
4218
|
+
get hash() {
|
|
4219
|
+
return this.url.hash;
|
|
4220
|
+
}
|
|
4221
|
+
get origin() {
|
|
4222
|
+
return this.url.origin;
|
|
4223
|
+
}
|
|
4224
|
+
set(e) {
|
|
4225
|
+
return e ? e instanceof URL ? this.url = new URL(e.href) : /^[a-z0-9+.-]+:/i.test(e) ? this.url = new URL(e) : s() ? this.url = new URL(e, window.location.origin) : this.url = new URL(e, "http://localhost") : s() ? this.url = new URL(window.location.href) : this.url = new URL("http://localhost"), this;
|
|
4226
|
+
}
|
|
4227
|
+
toString() {
|
|
4228
|
+
return this.url.toString();
|
|
4229
|
+
}
|
|
4230
|
+
toJSON() {
|
|
4231
|
+
return this.url.toJSON();
|
|
4232
|
+
}
|
|
4233
|
+
};
|
|
4234
|
+
//#endregion
|
|
4180
4235
|
//#region src/functions/arrFill.ts
|
|
4181
|
-
function
|
|
4236
|
+
function nn(e, t) {
|
|
4182
4237
|
return Array(t).fill(e);
|
|
4183
4238
|
}
|
|
4184
4239
|
//#endregion
|
|
4185
4240
|
//#region src/functions/blobToBase64.ts
|
|
4186
|
-
var
|
|
4241
|
+
var rn = () => an() !== void 0, an = () => {
|
|
4187
4242
|
var e;
|
|
4188
4243
|
return (e = globalThis) == null ? void 0 : e.Buffer;
|
|
4189
|
-
},
|
|
4244
|
+
}, on = async (e) => new Promise((t, n) => {
|
|
4190
4245
|
if (typeof FileReader < "u") {
|
|
4191
4246
|
let r = new FileReader();
|
|
4192
4247
|
r.onloadend = () => {
|
|
@@ -4197,19 +4252,19 @@ var nn = () => rn() !== void 0, rn = () => {
|
|
|
4197
4252
|
t(r.result.replace(/^data:.*?,/, ""));
|
|
4198
4253
|
}, r.onerror = n, r.readAsDataURL(e);
|
|
4199
4254
|
} else n();
|
|
4200
|
-
}),
|
|
4255
|
+
}), sn = (e) => {
|
|
4201
4256
|
var t;
|
|
4202
4257
|
return ((t = globalThis) == null ? void 0 : t.Buffer).from(e).toString("base64");
|
|
4203
4258
|
};
|
|
4204
|
-
async function
|
|
4205
|
-
let n = s() ? await
|
|
4259
|
+
async function cn(e, t = !1) {
|
|
4260
|
+
let n = s() ? await on(e) : rn() ? sn(await e.arrayBuffer()) : void 0;
|
|
4206
4261
|
if (n) return t ? n : `data:${e.type};base64,${n}`;
|
|
4207
4262
|
}
|
|
4208
4263
|
//#endregion
|
|
4209
4264
|
//#region src/functions/capitalize.ts
|
|
4210
|
-
function
|
|
4265
|
+
function ln(e, t = !1) {
|
|
4211
4266
|
let n = String(e);
|
|
4212
|
-
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(
|
|
4267
|
+
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(A.getLocation()) + n.slice(1) : n.charAt(0).toUpperCase() + n.slice(1) : n;
|
|
4213
4268
|
}
|
|
4214
4269
|
//#endregion
|
|
4215
4270
|
//#region src/functions/copyObject.ts
|
|
@@ -4218,12 +4273,12 @@ function Z(e) {
|
|
|
4218
4273
|
}
|
|
4219
4274
|
//#endregion
|
|
4220
4275
|
//#region src/functions/copyObjectLite.ts
|
|
4221
|
-
function
|
|
4276
|
+
function un(e, t) {
|
|
4222
4277
|
return Object.assign({}, e, t);
|
|
4223
4278
|
}
|
|
4224
4279
|
//#endregion
|
|
4225
4280
|
//#region src/functions/domQuerySelector.ts
|
|
4226
|
-
function
|
|
4281
|
+
function dn(e) {
|
|
4227
4282
|
if (s()) {
|
|
4228
4283
|
var t;
|
|
4229
4284
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -4231,67 +4286,67 @@ function un(e) {
|
|
|
4231
4286
|
}
|
|
4232
4287
|
//#endregion
|
|
4233
4288
|
//#region src/functions/domQuerySelectorAll.ts
|
|
4234
|
-
function
|
|
4289
|
+
function fn(e) {
|
|
4235
4290
|
if (s()) return document.querySelectorAll(e);
|
|
4236
4291
|
}
|
|
4237
4292
|
//#endregion
|
|
4238
4293
|
//#region src/functions/getElementImage.ts
|
|
4239
|
-
function
|
|
4240
|
-
return d(e) ?
|
|
4294
|
+
function pn(e) {
|
|
4295
|
+
return d(e) ? U(void 0, "img", { src: e }) : e;
|
|
4241
4296
|
}
|
|
4242
4297
|
//#endregion
|
|
4243
4298
|
//#region src/functions/resizeImageByMax.ts
|
|
4244
|
-
function
|
|
4299
|
+
function mn(e, t = "auto") {
|
|
4245
4300
|
switch (t) {
|
|
4246
4301
|
case "auto": return e.naturalWidth >= e.naturalHeight;
|
|
4247
4302
|
case "width": return !0;
|
|
4248
4303
|
case "height": return !1;
|
|
4249
4304
|
}
|
|
4250
4305
|
}
|
|
4251
|
-
function
|
|
4252
|
-
let i =
|
|
4306
|
+
function hn(e, t, n = "auto", r) {
|
|
4307
|
+
let i = pn(e);
|
|
4253
4308
|
if (s() && i && i.naturalWidth && i.naturalHeight && (i.naturalWidth > t && (n === "auto" || n === "width") || i.naturalHeight > t && (n === "auto" || n === "height"))) {
|
|
4254
4309
|
var a;
|
|
4255
|
-
let e =
|
|
4310
|
+
let e = mn(i, n), o = (a = document.createElement("canvas")) == null ? void 0 : a.getContext("2d");
|
|
4256
4311
|
if (o) return o.canvas.width = e ? t : i.naturalWidth / i.naturalHeight * t, o.canvas.height = e ? i.naturalHeight / i.naturalWidth * t : t, o.drawImage(i, 0, 0, o.canvas.width, o.canvas.height), o.canvas.toDataURL(r);
|
|
4257
4312
|
}
|
|
4258
4313
|
}
|
|
4259
4314
|
//#endregion
|
|
4260
4315
|
//#region src/functions/ensureMaxSize.ts
|
|
4261
|
-
async function
|
|
4316
|
+
async function gn(e, t = .56, n = "image/jpeg") {
|
|
4262
4317
|
return new Promise((r) => {
|
|
4263
4318
|
if (!s()) {
|
|
4264
4319
|
r("");
|
|
4265
4320
|
return;
|
|
4266
4321
|
}
|
|
4267
|
-
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o =
|
|
4322
|
+
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o = pn(a);
|
|
4268
4323
|
o ? (o.onload = () => {
|
|
4269
|
-
let e =
|
|
4324
|
+
let e = hn(o, t * o.naturalWidth, "width", n);
|
|
4270
4325
|
r(e == null ? "" : e), URL.revokeObjectURL(a);
|
|
4271
4326
|
}, o.onerror = () => {
|
|
4272
4327
|
URL.revokeObjectURL(a), r("");
|
|
4273
|
-
}) :
|
|
4328
|
+
}) : cn(i).then((e) => r(String(e == null ? "" : e)));
|
|
4274
4329
|
});
|
|
4275
4330
|
}
|
|
4276
4331
|
//#endregion
|
|
4277
4332
|
//#region src/functions/eventStopPropagation.ts
|
|
4278
|
-
function
|
|
4333
|
+
function _n(e) {
|
|
4279
4334
|
e.preventDefault(), e.stopPropagation();
|
|
4280
4335
|
}
|
|
4281
4336
|
//#endregion
|
|
4282
4337
|
//#region src/functions/frame.ts
|
|
4283
|
-
function
|
|
4338
|
+
function vn(e, t, n) {
|
|
4284
4339
|
let r = () => {
|
|
4285
|
-
e(), s() && t != null && t() ?
|
|
4340
|
+
e(), s() && t != null && t() ? vn(e, t, n) : n == null || n();
|
|
4286
4341
|
};
|
|
4287
4342
|
s() ? requestAnimationFrame(r) : r();
|
|
4288
4343
|
}
|
|
4289
4344
|
//#endregion
|
|
4290
4345
|
//#region src/functions/getArrayHighlightMatch.ts
|
|
4291
|
-
function
|
|
4346
|
+
function yn(e, t) {
|
|
4292
4347
|
let n = a(e);
|
|
4293
4348
|
if (l(n) && l(t)) {
|
|
4294
|
-
let e = [], r =
|
|
4349
|
+
let e = [], r = X(t), i = 0, a;
|
|
4295
4350
|
for (; (a = r.exec(n)) !== null && a.index !== r.lastIndex;) a.index > i && e.push({
|
|
4296
4351
|
text: n.substring(i, a.index),
|
|
4297
4352
|
isMatch: !1
|
|
@@ -4311,8 +4366,8 @@ function vn(e, t) {
|
|
|
4311
4366
|
}
|
|
4312
4367
|
//#endregion
|
|
4313
4368
|
//#region src/functions/getAttributes.ts
|
|
4314
|
-
function
|
|
4315
|
-
let t = {}, n =
|
|
4369
|
+
function bn(e) {
|
|
4370
|
+
let t = {}, n = j(e);
|
|
4316
4371
|
if (n) for (let e of n.attributes) {
|
|
4317
4372
|
var r;
|
|
4318
4373
|
t[e.name] = (r = (e == null ? void 0 : e.value) || (e == null ? void 0 : e.textContent)) == null ? void 0 : r;
|
|
@@ -4321,7 +4376,7 @@ function yn(e) {
|
|
|
4321
4376
|
}
|
|
4322
4377
|
//#endregion
|
|
4323
4378
|
//#region src/functions/getClipboardData.ts
|
|
4324
|
-
async function
|
|
4379
|
+
async function xn(e) {
|
|
4325
4380
|
if (s()) try {
|
|
4326
4381
|
var t, n;
|
|
4327
4382
|
return (t = e == null || (n = e.clipboardData) == null ? void 0 : n.getData("text")) == null ? await navigator.clipboard.readText() || "" : t;
|
|
@@ -4336,35 +4391,35 @@ async function bn(e) {
|
|
|
4336
4391
|
}
|
|
4337
4392
|
//#endregion
|
|
4338
4393
|
//#region src/functions/getCurrentDate.ts
|
|
4339
|
-
function
|
|
4340
|
-
return new
|
|
4394
|
+
function Sn(e = "datetime") {
|
|
4395
|
+
return new it(void 0, e).standard();
|
|
4341
4396
|
}
|
|
4342
4397
|
//#endregion
|
|
4343
4398
|
//#region src/functions/getCurrentTime.ts
|
|
4344
|
-
function
|
|
4399
|
+
function Cn() {
|
|
4345
4400
|
return Date.now();
|
|
4346
4401
|
}
|
|
4347
4402
|
//#endregion
|
|
4348
4403
|
//#region src/functions/getElementId.ts
|
|
4349
|
-
var Q,
|
|
4404
|
+
var Q, wn = () => {
|
|
4350
4405
|
let e = Q == null ? void 0 : Q();
|
|
4351
4406
|
if (e) return String(e);
|
|
4352
|
-
let t =
|
|
4407
|
+
let t = D.get("__ui:getElementId__", () => ({ id: 1e5 }));
|
|
4353
4408
|
return `id-${t.id++}`;
|
|
4354
4409
|
};
|
|
4355
|
-
function
|
|
4410
|
+
function Tn(e, t) {
|
|
4356
4411
|
if (e) {
|
|
4357
|
-
let n =
|
|
4358
|
-
if (n) return l(n.id) || n.setAttribute("id",
|
|
4412
|
+
let n = j(e);
|
|
4413
|
+
if (n) return l(n.id) || n.setAttribute("id", wn()), t ? `#${n.id}${t}`.trim() : n.id;
|
|
4359
4414
|
}
|
|
4360
|
-
return
|
|
4415
|
+
return wn();
|
|
4361
4416
|
}
|
|
4362
|
-
function
|
|
4417
|
+
function En(e) {
|
|
4363
4418
|
Q || (Q = e);
|
|
4364
4419
|
}
|
|
4365
4420
|
//#endregion
|
|
4366
4421
|
//#region src/functions/getFirst.ts
|
|
4367
|
-
function
|
|
4422
|
+
function Dn(e) {
|
|
4368
4423
|
if (i(e)) return e == null ? void 0 : e[0];
|
|
4369
4424
|
if (t(e)) {
|
|
4370
4425
|
var n;
|
|
@@ -4374,18 +4429,18 @@ function En(e) {
|
|
|
4374
4429
|
}
|
|
4375
4430
|
//#endregion
|
|
4376
4431
|
//#region src/functions/getKey.ts
|
|
4377
|
-
function
|
|
4432
|
+
function On(e) {
|
|
4378
4433
|
var t, n, r;
|
|
4379
4434
|
return (t = (n = e == null ? void 0 : e.key) == null ? e == null ? void 0 : e.code : n) == null ? e == null || (r = e.keyCode) == null ? void 0 : r.toString() : t;
|
|
4380
4435
|
}
|
|
4381
4436
|
//#endregion
|
|
4382
4437
|
//#region src/functions/getLength.ts
|
|
4383
|
-
function
|
|
4438
|
+
function kn(e) {
|
|
4384
4439
|
return e == null ? 0 : typeof e == "string" || Array.isArray(e) ? e.length : e instanceof Map || e instanceof Set ? e.size : t(e) ? Object.keys(e).length : 0;
|
|
4385
4440
|
}
|
|
4386
4441
|
//#endregion
|
|
4387
4442
|
//#region src/functions/getLengthOfAllArray.ts
|
|
4388
|
-
function
|
|
4443
|
+
function An(e) {
|
|
4389
4444
|
return r(e, (e) => {
|
|
4390
4445
|
var t;
|
|
4391
4446
|
return (t = e == null ? void 0 : e.length) == null ? 0 : t;
|
|
@@ -4393,41 +4448,41 @@ function kn(e) {
|
|
|
4393
4448
|
}
|
|
4394
4449
|
//#endregion
|
|
4395
4450
|
//#region src/functions/getMaxLengthAllArray.ts
|
|
4396
|
-
function
|
|
4451
|
+
function jn(e) {
|
|
4397
4452
|
if (!l(e)) return 0;
|
|
4398
|
-
let t =
|
|
4453
|
+
let t = An(e);
|
|
4399
4454
|
return t.length > 1e4 ? t.reduce((e, t) => Math.max(e, t)) : Math.max(...t);
|
|
4400
4455
|
}
|
|
4401
4456
|
//#endregion
|
|
4402
4457
|
//#region src/functions/getMinLengthAllArray.ts
|
|
4403
|
-
function
|
|
4458
|
+
function Mn(e) {
|
|
4404
4459
|
if (!l(e)) return 0;
|
|
4405
|
-
let t =
|
|
4460
|
+
let t = An(e);
|
|
4406
4461
|
return t.length > 1e4 ? t.reduce((e, t) => Math.min(e, t)) : Math.min(...t);
|
|
4407
4462
|
}
|
|
4408
4463
|
//#endregion
|
|
4409
4464
|
//#region src/functions/getMouseClientX.ts
|
|
4410
|
-
function
|
|
4465
|
+
function Nn(e) {
|
|
4411
4466
|
var t, n;
|
|
4412
4467
|
return (e == null ? void 0 : e.clientX) || (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientX) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientX) || 0;
|
|
4413
4468
|
}
|
|
4414
4469
|
//#endregion
|
|
4415
4470
|
//#region src/functions/getMouseClientY.ts
|
|
4416
|
-
function
|
|
4471
|
+
function Pn(e) {
|
|
4417
4472
|
var t, n;
|
|
4418
4473
|
return (e == null ? void 0 : e.clientY) || (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientY) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientY) || 0;
|
|
4419
4474
|
}
|
|
4420
4475
|
//#endregion
|
|
4421
4476
|
//#region src/functions/getMouseClient.ts
|
|
4422
|
-
function
|
|
4477
|
+
function Fn(e) {
|
|
4423
4478
|
return {
|
|
4424
|
-
x:
|
|
4425
|
-
y:
|
|
4479
|
+
x: Nn(e),
|
|
4480
|
+
y: Pn(e)
|
|
4426
4481
|
};
|
|
4427
4482
|
}
|
|
4428
4483
|
//#endregion
|
|
4429
4484
|
//#region src/functions/getObjectByKeys.ts
|
|
4430
|
-
function
|
|
4485
|
+
function In(e, t) {
|
|
4431
4486
|
let r = {};
|
|
4432
4487
|
return n(e) && t.forEach((t) => {
|
|
4433
4488
|
t in e && e[t] !== void 0 && (r[t] = e[t]);
|
|
@@ -4435,7 +4490,7 @@ function Fn(e, t) {
|
|
|
4435
4490
|
}
|
|
4436
4491
|
//#endregion
|
|
4437
4492
|
//#region src/functions/getObjectNoUndefined.ts
|
|
4438
|
-
function
|
|
4493
|
+
function Ln(e, t = void 0) {
|
|
4439
4494
|
let n = {};
|
|
4440
4495
|
return r(e, (e, r) => {
|
|
4441
4496
|
e !== t && (n[r] = e);
|
|
@@ -4443,42 +4498,42 @@ function In(e, t = void 0) {
|
|
|
4443
4498
|
}
|
|
4444
4499
|
//#endregion
|
|
4445
4500
|
//#region src/functions/getObjectOrNone.ts
|
|
4446
|
-
function
|
|
4501
|
+
function Rn(e) {
|
|
4447
4502
|
return n(e) ? e : {};
|
|
4448
4503
|
}
|
|
4449
4504
|
//#endregion
|
|
4450
4505
|
//#region src/functions/getOnlyText.ts
|
|
4451
|
-
function
|
|
4506
|
+
function zn(e) {
|
|
4452
4507
|
return C(e).replace(/[^\p{L}\p{N}\s]+/gu, "").trim();
|
|
4453
4508
|
}
|
|
4454
4509
|
//#endregion
|
|
4455
4510
|
//#region src/functions/strFill.ts
|
|
4456
|
-
function
|
|
4511
|
+
function Bn(e, t) {
|
|
4457
4512
|
return String(e).repeat(t);
|
|
4458
4513
|
}
|
|
4459
4514
|
//#endregion
|
|
4460
4515
|
//#region src/functions/getRandomText.ts
|
|
4461
|
-
function
|
|
4516
|
+
function Vn(e, t, n = "#", r = 2, i = 12) {
|
|
4462
4517
|
let a = f(e, t), o = [];
|
|
4463
|
-
for (let e = 0; e < a; e++) o.push(
|
|
4518
|
+
for (let e = 0; e < a; e++) o.push(Bn(n, f(r, i)));
|
|
4464
4519
|
return o.join(" ");
|
|
4465
4520
|
}
|
|
4466
4521
|
//#endregion
|
|
4467
4522
|
//#region src/functions/getStepPercent.ts
|
|
4468
|
-
function
|
|
4523
|
+
function Hn(e, t) {
|
|
4469
4524
|
let n = e == null ? 0 : e;
|
|
4470
4525
|
return t > n ? 100 / (t - n) : 0;
|
|
4471
4526
|
}
|
|
4472
4527
|
//#endregion
|
|
4473
4528
|
//#region src/functions/getStepValue.ts
|
|
4474
|
-
function
|
|
4529
|
+
function Un(e, t) {
|
|
4475
4530
|
let n = e == null ? 0 : e;
|
|
4476
4531
|
return t > n ? (t - n) / 100 : 0;
|
|
4477
4532
|
}
|
|
4478
4533
|
//#endregion
|
|
4479
4534
|
//#region src/functions/goScroll.ts
|
|
4480
|
-
var
|
|
4481
|
-
function
|
|
4535
|
+
var Wn = 0;
|
|
4536
|
+
function Gn(e, t, n) {
|
|
4482
4537
|
if (!s()) return;
|
|
4483
4538
|
let r = t == null ? void 0 : t.closest(e);
|
|
4484
4539
|
if (t && r && r.scrollHeight !== r.offsetHeight) {
|
|
@@ -4486,12 +4541,12 @@ function Wn(e, t, n) {
|
|
|
4486
4541
|
if (n) {
|
|
4487
4542
|
let a = n.getBoundingClientRect();
|
|
4488
4543
|
r.scrollTop = t.offsetTop - (a.top - e.top) - (a.height / 2 - i.height / 2), r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = t.offsetTop + t.offsetHeight - r.offsetHeight);
|
|
4489
|
-
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top -
|
|
4544
|
+
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top - Wn : r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = i.top - e.top + i.height - e.height + Wn);
|
|
4490
4545
|
}
|
|
4491
4546
|
}
|
|
4492
4547
|
//#endregion
|
|
4493
4548
|
//#region src/functions/goScrollSmooth.ts
|
|
4494
|
-
function
|
|
4549
|
+
function Kn(e, t, n = 0) {
|
|
4495
4550
|
if (!s()) return;
|
|
4496
4551
|
let r = (t == null ? void 0 : t.behavior) || "smooth";
|
|
4497
4552
|
if ("scrollIntoView" in e && !n) {
|
|
@@ -4513,7 +4568,7 @@ function Gn(e, t, n = 0) {
|
|
|
4513
4568
|
}
|
|
4514
4569
|
//#endregion
|
|
4515
4570
|
//#region src/functions/goScrollTo.ts
|
|
4516
|
-
function
|
|
4571
|
+
function qn(e, t, n = "smooth") {
|
|
4517
4572
|
if (!s() || !e || !t) return;
|
|
4518
4573
|
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
4519
4574
|
e.scrollBy({
|
|
@@ -4524,13 +4579,13 @@ function Kn(e, t, n = "smooth") {
|
|
|
4524
4579
|
}
|
|
4525
4580
|
//#endregion
|
|
4526
4581
|
//#region src/functions/isShare.ts
|
|
4527
|
-
function
|
|
4582
|
+
function Jn() {
|
|
4528
4583
|
return s() && typeof navigator < "u" && !!navigator.share;
|
|
4529
4584
|
}
|
|
4530
4585
|
//#endregion
|
|
4531
4586
|
//#region src/functions/handleShare.ts
|
|
4532
|
-
async function
|
|
4533
|
-
if (
|
|
4587
|
+
async function Yn(e) {
|
|
4588
|
+
if (Jn() && navigator.canShare && navigator.canShare(e)) try {
|
|
4534
4589
|
return await navigator.share(e), !0;
|
|
4535
4590
|
} catch (e) {
|
|
4536
4591
|
E.on({
|
|
@@ -4543,20 +4598,20 @@ async function Jn(e) {
|
|
|
4543
4598
|
}
|
|
4544
4599
|
//#endregion
|
|
4545
4600
|
//#region src/functions/inArray.ts
|
|
4546
|
-
function
|
|
4601
|
+
function Xn(e, t) {
|
|
4547
4602
|
return e.includes(t);
|
|
4548
4603
|
}
|
|
4549
4604
|
//#endregion
|
|
4550
4605
|
//#region src/functions/initScrollbarOffset.ts
|
|
4551
|
-
async function
|
|
4606
|
+
async function Zn() {
|
|
4552
4607
|
if (s()) {
|
|
4553
|
-
let e = await
|
|
4608
|
+
let e = await jt.get();
|
|
4554
4609
|
document.body.style.setProperty("--sys-scrollbar-offset", `${e}px`);
|
|
4555
4610
|
}
|
|
4556
4611
|
}
|
|
4557
4612
|
//#endregion
|
|
4558
4613
|
//#region src/functions/intersectKey.ts
|
|
4559
|
-
function
|
|
4614
|
+
function Qn(e, n) {
|
|
4560
4615
|
let i = {};
|
|
4561
4616
|
return t(e) && t(n) && r(e, (e, t) => {
|
|
4562
4617
|
t in n && (i[t] = e);
|
|
@@ -4564,7 +4619,7 @@ function Zn(e, n) {
|
|
|
4564
4619
|
}
|
|
4565
4620
|
//#endregion
|
|
4566
4621
|
//#region src/functions/isDifferent.ts
|
|
4567
|
-
function
|
|
4622
|
+
function $n(e, t) {
|
|
4568
4623
|
let n = Object.keys(e).length !== Object.keys(t).length;
|
|
4569
4624
|
return n || r(e, (e, r) => {
|
|
4570
4625
|
e !== (t == null ? void 0 : t[r]) && (n = !0);
|
|
@@ -4572,25 +4627,25 @@ function Qn(e, t) {
|
|
|
4572
4627
|
}
|
|
4573
4628
|
//#endregion
|
|
4574
4629
|
//#region src/functions/isElementVisible.ts
|
|
4575
|
-
function
|
|
4630
|
+
function er(e) {
|
|
4576
4631
|
if (!s()) return !1;
|
|
4577
|
-
let t =
|
|
4632
|
+
let t = j(e);
|
|
4578
4633
|
if (!t || "isConnected" in t && t.isConnected === !1) return !1;
|
|
4579
4634
|
let n = window.getComputedStyle(t);
|
|
4580
4635
|
return n.display !== "none" && n.visibility !== "hidden" && n.opacity !== "0" && t.offsetWidth !== 0 && t.offsetHeight !== 0;
|
|
4581
4636
|
}
|
|
4582
4637
|
//#endregion
|
|
4583
4638
|
//#region src/functions/isInput.ts
|
|
4584
|
-
var
|
|
4639
|
+
var tr = (e) => {
|
|
4585
4640
|
if (e instanceof HTMLElement) {
|
|
4586
4641
|
let t = e.tagName.toLowerCase();
|
|
4587
4642
|
return !!(t === "input" || t === "textarea" || t === "select" || e.isContentEditable || e.getAttribute("contenteditable") === "true") && !(e != null && e.readOnly) && !(e != null && e.disabled);
|
|
4588
4643
|
}
|
|
4589
4644
|
return !1;
|
|
4590
|
-
},
|
|
4645
|
+
}, nr = (e, t) => e.code === "Space" || e.code === "Enter" || e.key === " " || e.key === "Spacebar" || e.key === "Enter" || e.keyCode === 13 || e.keyCode === 32 ? t === void 0 ? !tr(e.target) : !t : !1;
|
|
4591
4646
|
//#endregion
|
|
4592
4647
|
//#region src/functions/isFloat.ts
|
|
4593
|
-
function
|
|
4648
|
+
function rr(e) {
|
|
4594
4649
|
switch (typeof e) {
|
|
4595
4650
|
case "number": return !0;
|
|
4596
4651
|
case "string": return /^-?\d+(\.\d+)?$/.test(e);
|
|
@@ -4599,21 +4654,21 @@ function nr(e) {
|
|
|
4599
4654
|
}
|
|
4600
4655
|
//#endregion
|
|
4601
4656
|
//#region src/functions/isIntegerBetween.ts
|
|
4602
|
-
function
|
|
4657
|
+
function ir(e, t) {
|
|
4603
4658
|
let n = Math.floor(t);
|
|
4604
4659
|
return e >= n && e < n + 1;
|
|
4605
4660
|
}
|
|
4606
4661
|
//#endregion
|
|
4607
4662
|
//#region src/functions/isSelectedByList.ts
|
|
4608
|
-
function
|
|
4663
|
+
function ar(e, t) {
|
|
4609
4664
|
return Array.isArray(e) ? e.every((e) => b(e, t)) : b(e, t);
|
|
4610
4665
|
}
|
|
4611
4666
|
//#endregion
|
|
4612
4667
|
//#region src/functions/isTab.ts
|
|
4613
|
-
var
|
|
4668
|
+
var or = (e) => e.key === "Tab" || e.code === "Tab" || e.keyCode === 9;
|
|
4614
4669
|
//#endregion
|
|
4615
4670
|
//#region src/functions/removeCommonPrefix.ts
|
|
4616
|
-
function
|
|
4671
|
+
function sr(e, t) {
|
|
4617
4672
|
if (e.startsWith(t)) return e.slice(t.length).trim();
|
|
4618
4673
|
let n = 0;
|
|
4619
4674
|
for (; e[n] === t[n] && n < e.length && n < t.length;) n++;
|
|
@@ -4621,13 +4676,13 @@ function or(e, t) {
|
|
|
4621
4676
|
}
|
|
4622
4677
|
//#endregion
|
|
4623
4678
|
//#region src/functions/replaceComponentName.ts
|
|
4624
|
-
var
|
|
4679
|
+
var cr = (e, t, n) => {
|
|
4625
4680
|
var r;
|
|
4626
4681
|
return e == null || (r = e.replace(RegExp(`<${t}`, "ig"), `<${n}`)) == null || (r = r.replace(RegExp(`</${t}`, "ig"), `</${n}`)) == null ? void 0 : r.trim();
|
|
4627
4682
|
};
|
|
4628
4683
|
//#endregion
|
|
4629
4684
|
//#region src/functions/uniqueArray.ts
|
|
4630
|
-
function
|
|
4685
|
+
function lr(e) {
|
|
4631
4686
|
return [...new Set(e)];
|
|
4632
4687
|
}
|
|
4633
4688
|
//#endregion
|
|
@@ -4636,12 +4691,12 @@ function $(e, n, i = !0) {
|
|
|
4636
4691
|
let a = Z(e);
|
|
4637
4692
|
return t(e) && t(n) && r(n, (n, r) => {
|
|
4638
4693
|
let o = e == null ? void 0 : e[r];
|
|
4639
|
-
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Z(
|
|
4694
|
+
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Z(lr([...o, ...n])) : a[r] = $(Array.isArray(o) ? { ...o } : o, n, i) : a[r] = t(n) ? Z(n) : n;
|
|
4640
4695
|
}), a;
|
|
4641
4696
|
}
|
|
4642
4697
|
//#endregion
|
|
4643
4698
|
//#region src/functions/replaceTemplate.ts
|
|
4644
|
-
function
|
|
4699
|
+
function ur(e, t) {
|
|
4645
4700
|
let n = e;
|
|
4646
4701
|
return r(t, (e, t) => {
|
|
4647
4702
|
n = n.replace(Rt(`[${t}]`), S(e));
|
|
@@ -4649,7 +4704,7 @@ function lr(e, t) {
|
|
|
4649
4704
|
}
|
|
4650
4705
|
//#endregion
|
|
4651
4706
|
//#region src/functions/secondToTime.ts
|
|
4652
|
-
function
|
|
4707
|
+
function dr(e, t) {
|
|
4653
4708
|
let n = y(e);
|
|
4654
4709
|
if (n > 0) {
|
|
4655
4710
|
let e = String(Math.floor(n / 60)).padStart(2, "0"), r = String(n % 60).padStart(2, "0");
|
|
@@ -4659,7 +4714,7 @@ function ur(e, t) {
|
|
|
4659
4714
|
}
|
|
4660
4715
|
//#endregion
|
|
4661
4716
|
//#region src/functions/setValues.ts
|
|
4662
|
-
function
|
|
4717
|
+
function fr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, notEmpty: o = !1 }) {
|
|
4663
4718
|
if (n) {
|
|
4664
4719
|
if (i(e)) {
|
|
4665
4720
|
let n = e.indexOf(t), i = [...e];
|
|
@@ -4671,7 +4726,7 @@ function dr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, no
|
|
|
4671
4726
|
}
|
|
4672
4727
|
//#endregion
|
|
4673
4728
|
//#region src/functions/splice.ts
|
|
4674
|
-
function
|
|
4729
|
+
function pr(e, n, i) {
|
|
4675
4730
|
if (t(e) && t(n)) {
|
|
4676
4731
|
if (i) {
|
|
4677
4732
|
let a = {}, o = !1;
|
|
@@ -4685,34 +4740,34 @@ function fr(e, n, i) {
|
|
|
4685
4740
|
}
|
|
4686
4741
|
//#endregion
|
|
4687
4742
|
//#region src/functions/toCamelCaseFirst.ts
|
|
4688
|
-
function
|
|
4689
|
-
return
|
|
4743
|
+
function mr(e) {
|
|
4744
|
+
return at(e).replace(/^([a-z])/, (e) => `${e.toUpperCase()}`);
|
|
4690
4745
|
}
|
|
4691
4746
|
//#endregion
|
|
4692
4747
|
//#region src/functions/toKebabCase.ts
|
|
4693
|
-
function
|
|
4748
|
+
function hr(e) {
|
|
4694
4749
|
return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/^[A-Z]/, (e) => e.toLowerCase()).replace(/(?<=[\w ])[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[A-Z]/g, (e) => e.toLowerCase());
|
|
4695
4750
|
}
|
|
4696
4751
|
//#endregion
|
|
4697
4752
|
//#region src/functions/toNumberByMax.ts
|
|
4698
|
-
function
|
|
4753
|
+
function gr(e, t, n, r) {
|
|
4699
4754
|
let i = y(e), a = y(t);
|
|
4700
|
-
return t && a < i ? `${
|
|
4755
|
+
return t && a < i ? `${_r(a, n, r)}+` : _r(i, n, r);
|
|
4701
4756
|
}
|
|
4702
|
-
var
|
|
4757
|
+
var _r = (e, t, n) => t ? new R(n).number(e) : e;
|
|
4703
4758
|
//#endregion
|
|
4704
4759
|
//#region src/functions/toPercent.ts
|
|
4705
|
-
function
|
|
4760
|
+
function vr(e, t) {
|
|
4706
4761
|
return e === 0 ? t : 1 / e * t;
|
|
4707
4762
|
}
|
|
4708
4763
|
//#endregion
|
|
4709
4764
|
//#region src/functions/toPercentBy100.ts
|
|
4710
|
-
function
|
|
4711
|
-
return
|
|
4765
|
+
function yr(e, t) {
|
|
4766
|
+
return vr(e, t) * 100;
|
|
4712
4767
|
}
|
|
4713
4768
|
//#endregion
|
|
4714
4769
|
//#region src/functions/uint8ArrayToBase64.ts
|
|
4715
|
-
function
|
|
4770
|
+
function br(e) {
|
|
4716
4771
|
let t = "";
|
|
4717
4772
|
for (let n of e) t += String.fromCharCode(n);
|
|
4718
4773
|
if (s()) return window.btoa(t);
|
|
@@ -4724,7 +4779,7 @@ function yr(e) {
|
|
|
4724
4779
|
}
|
|
4725
4780
|
//#endregion
|
|
4726
4781
|
//#region src/functions/writeClipboardData.ts
|
|
4727
|
-
async function
|
|
4782
|
+
async function xr(e) {
|
|
4728
4783
|
if (s()) try {
|
|
4729
4784
|
await navigator.clipboard.writeText(e);
|
|
4730
4785
|
} catch (n) {
|
|
@@ -4733,4 +4788,4 @@ async function br(e) {
|
|
|
4733
4788
|
}
|
|
4734
4789
|
}
|
|
4735
4790
|
//#endregion
|
|
4736
|
-
export {
|
|
4791
|
+
export { I as Api, P as ApiCache, ze as ApiDataReturn, Be as ApiDefault, Ue as ApiError, Ve as ApiErrorItem, He as ApiErrorStorage, We as ApiHeaders, Ke as ApiHydration, Ze as ApiInstance, F as ApiMethodItem, qe as ApiPreparation, Xe as ApiResponse, Le as ApiStatus, Qe as BroadcastMessage, tt as Cache, et as CacheItem, nt as CacheStatic, Te as Cookie, Se as CookieBlock, xe as CookieBlockInstance, k as CookieStorage, O as DataStorage, it as Datetime, E as ErrorCenter, ce as ErrorCenterHandler, le as ErrorCenterInstance, Me as EventItem, ot as Formatters, H as FormattersType, st as GEO_FLAG_ICON_NAME, A as Geo, ct as GeoFlag, Oe as GeoInstance, R as GeoIntl, lt as GeoPhone, ut as Global, ft as Hash, dt as HashInstance, ht as Icons, N as Loading, Pe as LoadingInstance, Ot as Meta, G as MetaManager, Et as MetaOg, Ct as MetaOpenGraphAge, xt as MetaOpenGraphAvailability, St as MetaOpenGraphCondition, wt as MetaOpenGraphGender, q as MetaOpenGraphTag, bt as MetaOpenGraphType, yt as MetaRobots, kt as MetaStatic, K as MetaTag, Dt as MetaTwitter, Tt as MetaTwitterCard, J as MetaTwitterTag, At as ResumableTimer, jt as ScrollbarWidth, Ut as SearchList, It as SearchListData, Lt as SearchListItem, Vt as SearchListMatcher, Ht as SearchListOptions, D as ServerStorage, Gt as StorageCallback, Xt as TRANSLATE_GLOBAL_PREFIX, Zt as TRANSLATE_TIME_OUT, en as Translate, Qt as TranslateFile, $t as TranslateInstance, Ee as UI_GEO_COOKIE_KEY, tn as UrlItem, Ft as addTagHighlightMatch, C as anyToString, Jt as applyTemplate, nn as arrFill, cn as blobToBase64, ln as capitalize, Z as copyObject, un as copyObjectLite, U as createElement, dn as domQuerySelector, fn as domQuerySelectorAll, W as encodeAttribute, pe as encodeLiteAttribute, gn as ensureMaxSize, Y as escapeExp, _n as eventStopPropagation, S as executeFunction, Je as executePromise, r as forEach, vn as frame, yn as getArrayHighlightMatch, bn as getAttributes, xn as getClipboardData, rt as getColumn, Sn as getCurrentDate, Cn as getCurrentTime, j as getElement, Tn as getElementId, pn as getElementImage, gt as getElementItem, Ae as getElementOrWindow, me as getElementSafeScript, zt as getExactSearchExp, Rt as getExp, Dn as getFirst, he as getHydrationData, V as getItemByPath, On as getKey, kn as getLength, An as getLengthOfAllArray, jn as getMaxLengthAllArray, Mn as getMinLengthAllArray, Fn as getMouseClient, Nn as getMouseClientX, Pn as getMouseClientY, In as getObjectByKeys, Ln as getObjectNoUndefined, Rn as getObjectOrNone, zn as getOnlyText, Vn as getRandomText, o as getRequestString, Bt as getSearchExp, X as getSeparatingSearchExp, Hn as getStepPercent, Un as getStepValue, Gn as goScroll, Kn as goScrollSmooth, qn as goScrollTo, Yn as handleShare, Xn as inArray, En as initGetElementId, Zn as initScrollbarOffset, Qn as intersectKey, Yt as isApiSuccess, i as isArray, $n as isDifferent, ie as isDomData, s as isDomRuntime, er as isElementVisible, nr as isEnter, l as isFilled, rr as isFloat, x as isFunction, je as isInDom, tr as isInput, ir as isIntegerBetween, c as isNull, p as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, b as isSelected, ar as isSelectedByList, Jn as isShare, d as isString, or as isTab, ke as isWindow, f as random, sr as removeCommonPrefix, cr as replaceComponentName, $ as replaceRecursive, ur as replaceTemplate, hn as resizeImageByMax, dr as secondToTime, _t as setElementItem, fr as setValues, ee as sleep, pr as splice, Bn as strFill, ae as strSplit, M as toArray, at as toCamelCase, mr as toCamelCaseFirst, L as toDate, hr as toKebabCase, y as toNumber, gr as toNumberByMax, vr as toPercent, yr as toPercentBy100, a as toString, de as transformation, br as uint8ArrayToBase64, lr as uniqueArray, xr as writeClipboardData };
|