@owp/core 2.0.0 → 2.0.1
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/dist/{Close-C91nHTKM.js → Close-JeenM19L.js} +3 -3
- package/dist/{Close-C91nHTKM.js.map → Close-JeenM19L.js.map} +1 -1
- package/dist/{OwpStoreProvider-BPa_lWCz.js → OwpStoreProvider-Cl8MlcxC.js} +2 -2
- package/dist/{OwpStoreProvider-BPa_lWCz.js.map → OwpStoreProvider-Cl8MlcxC.js.map} +1 -1
- package/dist/{OwpUtils-DV2LSByd.js → OwpUtils-CDsU9hQL.js} +118 -146
- package/dist/{OwpUtils-DV2LSByd.js.map → OwpUtils-CDsU9hQL.js.map} +1 -1
- package/dist/{commonCodeUtils-DNfSjP6S.js → commonCodeUtils-Dt6TXOku.js} +3 -3
- package/dist/{commonCodeUtils-DNfSjP6S.js.map → commonCodeUtils-Dt6TXOku.js.map} +1 -1
- package/dist/contexts.js +16 -17
- package/dist/contexts.js.map +1 -1
- package/dist/exceljs.min-CwK2XNVA.js +23595 -0
- package/dist/exceljs.min-CwK2XNVA.js.map +1 -0
- package/dist/hooks.js +10 -10
- package/dist/index.js +15049 -32038
- package/dist/index.js.map +1 -1
- package/dist/isTypedArray-DGEiG32J.js +637 -0
- package/dist/{isTypedArray-CCnDZ5HJ.js.map → isTypedArray-DGEiG32J.js.map} +1 -1
- package/dist/{language-DaxFvPOq.js → language-s_jJgpD5.js} +2 -2
- package/dist/{language-DaxFvPOq.js.map → language-s_jJgpD5.js.map} +1 -1
- package/dist/{lazyLoadedSlices-C18y0AEB.js → lazyLoadedSlices-D_EtusDd.js} +7 -7
- package/dist/{lazyLoadedSlices-C18y0AEB.js.map → lazyLoadedSlices-D_EtusDd.js.map} +1 -1
- package/dist/store.js +2 -2
- package/dist/{toUpper-Dmh8Htx_.js → toUpper-D7kus_mL.js} +2 -2
- package/dist/{toUpper-Dmh8Htx_.js.map → toUpper-D7kus_mL.js.map} +1 -1
- package/dist/{treeGridUtil-DAfaAk6C.js → treeGridUtil-Ch99srur.js} +103 -102
- package/dist/treeGridUtil-Ch99srur.js.map +1 -0
- package/dist/types/components/OwpPicker/OwpTimePicker.d.ts +0 -2
- package/dist/types/utils/dayjsBrowser.d.ts +7 -0
- package/dist/types/utils/excelUtil.d.ts +1 -1
- package/dist/types/utils/exceljsBrowser.d.ts +3 -0
- package/dist/{usePageLockLoading-BGODEt_k.js → usePageLockLoading-Vx7WVcGX.js} +2 -2
- package/dist/{usePageLockLoading-BGODEt_k.js.map → usePageLockLoading-Vx7WVcGX.js.map} +1 -1
- package/dist/{useShortcuts-BjtlXprQ.js → useShortcuts-DY5fnx6L.js} +3 -3
- package/dist/{useShortcuts-BjtlXprQ.js.map → useShortcuts-DY5fnx6L.js.map} +1 -1
- package/dist/{useTreeGridExcelExport-BE6h1hsO.js → useTreeGridExcelExport-615UIM92.js} +4 -4
- package/dist/{useTreeGridExcelExport-BE6h1hsO.js.map → useTreeGridExcelExport-615UIM92.js.map} +1 -1
- package/dist/utils.js +243 -248
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/isString-Codtu20I.js +0 -55
- package/dist/isString-Codtu20I.js.map +0 -1
- package/dist/isTypedArray-CCnDZ5HJ.js +0 -609
- package/dist/treeGridUtil-DAfaAk6C.js.map +0 -1
|
@@ -1,89 +1,64 @@
|
|
|
1
1
|
var w = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var C = (t, e, n) => e in t ? w(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var o = (t, e) => w(t, "name", { value: e, configurable: !0 });
|
|
4
|
-
var
|
|
5
|
-
import * as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
10
|
-
}
|
|
11
|
-
o(Y, "getDefaultExportFromCjs");
|
|
12
|
-
function Z(t) {
|
|
13
|
-
if (Object.prototype.hasOwnProperty.call(t, "__esModule")) return t;
|
|
14
|
-
var e = t.default;
|
|
15
|
-
if (typeof e == "function") {
|
|
16
|
-
var n = /* @__PURE__ */ o(function r() {
|
|
17
|
-
return this instanceof r ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
|
|
18
|
-
}, "a");
|
|
19
|
-
n.prototype = e.prototype;
|
|
20
|
-
} else n = {};
|
|
21
|
-
return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(t).forEach(function(r) {
|
|
22
|
-
var s = Object.getOwnPropertyDescriptor(t, r);
|
|
23
|
-
Object.defineProperty(n, r, s.get ? s : {
|
|
24
|
-
enumerable: !0,
|
|
25
|
-
get: /* @__PURE__ */ o(function() {
|
|
26
|
-
return t[r];
|
|
27
|
-
}, "get")
|
|
28
|
-
});
|
|
29
|
-
}), n;
|
|
30
|
-
}
|
|
31
|
-
o(Z, "getAugmentedNamespace");
|
|
32
|
-
function $(t) {
|
|
33
|
-
if (P(t))
|
|
4
|
+
var h = (t, e, n) => C(t, typeof e != "symbol" ? e + "" : e, n);
|
|
5
|
+
import * as F from "@mui/material/colors";
|
|
6
|
+
import { f as M, h as P, b as E, a as k, p as D, m as R, j as K, k as V, l as W, n as B, o as S, q as v, r as q, s as G, t as N, c as $, u as I } from "./isTypedArray-DGEiG32J.js";
|
|
7
|
+
function z(t) {
|
|
8
|
+
if (M(t))
|
|
34
9
|
return t;
|
|
35
|
-
if (Array.isArray(t) ||
|
|
10
|
+
if (Array.isArray(t) || P(t) || t instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && t instanceof SharedArrayBuffer)
|
|
36
11
|
return t.slice(0);
|
|
37
12
|
const e = Object.getPrototypeOf(t), n = e.constructor;
|
|
38
13
|
if (t instanceof Date || t instanceof Map || t instanceof Set)
|
|
39
14
|
return new n(t);
|
|
40
15
|
if (t instanceof RegExp) {
|
|
41
|
-
const
|
|
42
|
-
return
|
|
16
|
+
const i = new n(t);
|
|
17
|
+
return i.lastIndex = t.lastIndex, i;
|
|
43
18
|
}
|
|
44
19
|
if (t instanceof DataView)
|
|
45
20
|
return new n(t.buffer.slice(0));
|
|
46
21
|
if (t instanceof Error) {
|
|
47
|
-
const
|
|
48
|
-
return
|
|
22
|
+
const i = new n(t.message);
|
|
23
|
+
return i.stack = t.stack, i.name = t.name, i.cause = t.cause, i;
|
|
49
24
|
}
|
|
50
25
|
if (typeof File < "u" && t instanceof File)
|
|
51
26
|
return new n([t], t.name, { type: t.type, lastModified: t.lastModified });
|
|
52
27
|
if (typeof t == "object") {
|
|
53
|
-
const
|
|
54
|
-
return Object.assign(
|
|
28
|
+
const i = Object.create(e);
|
|
29
|
+
return Object.assign(i, t);
|
|
55
30
|
}
|
|
56
31
|
return t;
|
|
57
32
|
}
|
|
58
|
-
o(
|
|
59
|
-
function
|
|
33
|
+
o(z, "clone");
|
|
34
|
+
function H(t, e = E, n = 0) {
|
|
60
35
|
if (!t)
|
|
61
36
|
return;
|
|
62
37
|
n < 0 && (n = Math.max(t.length + n, 0));
|
|
63
|
-
const
|
|
64
|
-
if (typeof
|
|
65
|
-
const
|
|
66
|
-
for (let l = n; l <
|
|
67
|
-
const f =
|
|
68
|
-
if (
|
|
38
|
+
const i = k(e);
|
|
39
|
+
if (typeof i == "function" && !Array.isArray(t)) {
|
|
40
|
+
const r = Object.keys(t);
|
|
41
|
+
for (let l = n; l < r.length; l++) {
|
|
42
|
+
const f = r[l], a = t[f];
|
|
43
|
+
if (i(a, f, t))
|
|
69
44
|
return a;
|
|
70
45
|
}
|
|
71
46
|
return;
|
|
72
47
|
}
|
|
73
|
-
return (Array.isArray(t) ? t.slice(n) : Object.values(t).slice(n)).find(
|
|
48
|
+
return (Array.isArray(t) ? t.slice(n) : Object.values(t).slice(n)).find(i);
|
|
74
49
|
}
|
|
75
|
-
o(
|
|
76
|
-
function
|
|
50
|
+
o(H, "find");
|
|
51
|
+
function J(t, e, n) {
|
|
77
52
|
if (!t)
|
|
78
53
|
return !1;
|
|
79
|
-
e || (e =
|
|
80
|
-
const
|
|
54
|
+
e || (e = E);
|
|
55
|
+
const i = Array.isArray(t) ? t : Object.values(t);
|
|
81
56
|
switch (typeof e) {
|
|
82
57
|
case "function": {
|
|
83
58
|
if (!Array.isArray(t)) {
|
|
84
59
|
const s = Object.keys(t);
|
|
85
|
-
for (let
|
|
86
|
-
const l = s[
|
|
60
|
+
for (let r = 0; r < s.length; r++) {
|
|
61
|
+
const l = s[r], f = t[l];
|
|
87
62
|
if (e(f, l, t))
|
|
88
63
|
return !0;
|
|
89
64
|
}
|
|
@@ -96,88 +71,88 @@ function _(t, e, n) {
|
|
|
96
71
|
}
|
|
97
72
|
case "object":
|
|
98
73
|
if (Array.isArray(e) && e.length === 2) {
|
|
99
|
-
const s = e[0],
|
|
74
|
+
const s = e[0], r = e[1], l = R(s, r);
|
|
100
75
|
if (Array.isArray(t)) {
|
|
101
76
|
for (let f = 0; f < t.length; f++)
|
|
102
77
|
if (l(t[f]))
|
|
103
78
|
return !0;
|
|
104
79
|
return !1;
|
|
105
80
|
}
|
|
106
|
-
return
|
|
81
|
+
return i.some(l);
|
|
107
82
|
} else {
|
|
108
|
-
const s =
|
|
83
|
+
const s = K(e);
|
|
109
84
|
if (Array.isArray(t)) {
|
|
110
|
-
for (let
|
|
111
|
-
if (s(t[
|
|
85
|
+
for (let r = 0; r < t.length; r++)
|
|
86
|
+
if (s(t[r]))
|
|
112
87
|
return !0;
|
|
113
88
|
return !1;
|
|
114
89
|
}
|
|
115
|
-
return
|
|
90
|
+
return i.some(s);
|
|
116
91
|
}
|
|
117
92
|
case "number":
|
|
118
93
|
case "symbol":
|
|
119
94
|
case "string": {
|
|
120
95
|
const s = D(e);
|
|
121
96
|
if (Array.isArray(t)) {
|
|
122
|
-
for (let
|
|
123
|
-
if (s(t[
|
|
97
|
+
for (let r = 0; r < t.length; r++)
|
|
98
|
+
if (s(t[r]))
|
|
124
99
|
return !0;
|
|
125
100
|
return !1;
|
|
126
101
|
}
|
|
127
|
-
return
|
|
102
|
+
return i.some(s);
|
|
128
103
|
}
|
|
129
104
|
}
|
|
130
105
|
}
|
|
131
|
-
o(
|
|
132
|
-
function
|
|
133
|
-
const n = e.slice(0, -1),
|
|
106
|
+
o(J, "some");
|
|
107
|
+
function Q(t, ...e) {
|
|
108
|
+
const n = e.slice(0, -1), i = e[e.length - 1];
|
|
134
109
|
let s = t;
|
|
135
|
-
for (let
|
|
136
|
-
const l = n[
|
|
137
|
-
s =
|
|
110
|
+
for (let r = 0; r < n.length; r++) {
|
|
111
|
+
const l = n[r];
|
|
112
|
+
s = c(s, l, i, /* @__PURE__ */ new Map());
|
|
138
113
|
}
|
|
139
114
|
return s;
|
|
140
115
|
}
|
|
141
|
-
o(
|
|
142
|
-
function
|
|
143
|
-
if (
|
|
116
|
+
o(Q, "mergeWith");
|
|
117
|
+
function c(t, e, n, i) {
|
|
118
|
+
if (M(t) && (t = Object(t)), e == null || typeof e != "object")
|
|
144
119
|
return t;
|
|
145
|
-
if (
|
|
146
|
-
return
|
|
147
|
-
if (
|
|
120
|
+
if (i.has(e))
|
|
121
|
+
return z(i.get(e));
|
|
122
|
+
if (i.set(e, t), Array.isArray(e)) {
|
|
148
123
|
e = e.slice();
|
|
149
|
-
for (let
|
|
150
|
-
e[
|
|
124
|
+
for (let r = 0; r < e.length; r++)
|
|
125
|
+
e[r] = e[r] ?? void 0;
|
|
151
126
|
}
|
|
152
|
-
const s = [...Object.keys(e), ...
|
|
153
|
-
for (let
|
|
154
|
-
const l = s[
|
|
155
|
-
if (
|
|
127
|
+
const s = [...Object.keys(e), ...V(e)];
|
|
128
|
+
for (let r = 0; r < s.length; r++) {
|
|
129
|
+
const l = s[r];
|
|
130
|
+
if (W(l))
|
|
156
131
|
continue;
|
|
157
132
|
let f = e[l], a = t[l];
|
|
158
|
-
if (
|
|
133
|
+
if (B(f) && (f = { ...f }), B(a) && (a = { ...a }), typeof Buffer < "u" && Buffer.isBuffer(f) && (f = S(f)), Array.isArray(f))
|
|
159
134
|
if (typeof a == "object" && a != null) {
|
|
160
|
-
const
|
|
161
|
-
for (let p = 0; p <
|
|
162
|
-
const
|
|
163
|
-
|
|
135
|
+
const y = [], A = Reflect.ownKeys(a);
|
|
136
|
+
for (let p = 0; p < A.length; p++) {
|
|
137
|
+
const O = A[p];
|
|
138
|
+
y[O] = a[O];
|
|
164
139
|
}
|
|
165
|
-
a =
|
|
140
|
+
a = y;
|
|
166
141
|
} else
|
|
167
142
|
a = [];
|
|
168
|
-
const u = n(a, f, l, t, e,
|
|
169
|
-
u !== void 0 ? t[l] = u : Array.isArray(f) ||
|
|
143
|
+
const u = n(a, f, l, t, e, i);
|
|
144
|
+
u !== void 0 ? t[l] = u : Array.isArray(f) || v(a) && v(f) ? t[l] = c(a, f, n, i) : a == null && q(f) ? t[l] = c({}, f, n, i) : a == null && G(f) ? t[l] = S(f) : (a === void 0 || f !== void 0) && (t[l] = f);
|
|
170
145
|
}
|
|
171
146
|
return t;
|
|
172
147
|
}
|
|
173
|
-
o(
|
|
174
|
-
function
|
|
175
|
-
return
|
|
148
|
+
o(c, "mergeWithDeep");
|
|
149
|
+
function X(t, ...e) {
|
|
150
|
+
return Q(t, ...e, N);
|
|
176
151
|
}
|
|
177
|
-
o(
|
|
152
|
+
o(X, "merge");
|
|
178
153
|
const m = class m {
|
|
179
154
|
constructor() {
|
|
180
|
-
|
|
155
|
+
h(this, "events");
|
|
181
156
|
this.events = {};
|
|
182
157
|
}
|
|
183
158
|
/**
|
|
@@ -196,17 +171,17 @@ const m = class m {
|
|
|
196
171
|
* One-time event subscription
|
|
197
172
|
*/
|
|
198
173
|
once(e, n) {
|
|
199
|
-
const
|
|
200
|
-
this.removeListener(e,
|
|
174
|
+
const i = /* @__PURE__ */ o((...s) => {
|
|
175
|
+
this.removeListener(e, i), n.apply(this, s);
|
|
201
176
|
}, "onceFn");
|
|
202
|
-
this.on(e,
|
|
177
|
+
this.on(e, i);
|
|
203
178
|
}
|
|
204
179
|
/**
|
|
205
180
|
* Event emission
|
|
206
181
|
*/
|
|
207
182
|
emit(e, ...n) {
|
|
208
|
-
this._getEventListByName(e).forEach((
|
|
209
|
-
|
|
183
|
+
this._getEventListByName(e).forEach((i) => {
|
|
184
|
+
i.apply(this, n);
|
|
210
185
|
});
|
|
211
186
|
}
|
|
212
187
|
/**
|
|
@@ -217,7 +192,7 @@ const m = class m {
|
|
|
217
192
|
}
|
|
218
193
|
};
|
|
219
194
|
o(m, "OwpEventEmitter");
|
|
220
|
-
let
|
|
195
|
+
let g = m;
|
|
221
196
|
const d = class d {
|
|
222
197
|
/**
|
|
223
198
|
* The filterArrayByString function filters an array of objects by a search string.
|
|
@@ -228,11 +203,11 @@ const d = class d {
|
|
|
228
203
|
if (!n || (n == null ? void 0 : n.length) === 0 || !n)
|
|
229
204
|
return e;
|
|
230
205
|
n = n == null ? void 0 : n.toLowerCase();
|
|
231
|
-
const
|
|
232
|
-
return
|
|
206
|
+
const i = e.filter((s) => this.searchInObj(s, n));
|
|
207
|
+
return i.length === e.length ? e : i;
|
|
233
208
|
}
|
|
234
209
|
static filterArrayByString2(e, n) {
|
|
235
|
-
return typeof n != "string" || n === "" ? e : (n = n == null ? void 0 : n.toLowerCase(), e.filter((
|
|
210
|
+
return typeof n != "string" || n === "" ? e : (n = n == null ? void 0 : n.toLowerCase(), e.filter((i) => this.searchInObj(i, n)));
|
|
236
211
|
}
|
|
237
212
|
/**
|
|
238
213
|
* The searchInObj function searches an object for a given search string.
|
|
@@ -242,13 +217,13 @@ const d = class d {
|
|
|
242
217
|
static searchInObj(e, n) {
|
|
243
218
|
if (!s(e))
|
|
244
219
|
return !1;
|
|
245
|
-
const
|
|
246
|
-
function s(
|
|
247
|
-
return !!(
|
|
220
|
+
const i = Object.keys(e);
|
|
221
|
+
function s(r) {
|
|
222
|
+
return !!(r && typeof r == "object" && !Array.isArray(r) && typeof r != "function");
|
|
248
223
|
}
|
|
249
224
|
o(s, "isRecord");
|
|
250
|
-
for (let
|
|
251
|
-
const l = r
|
|
225
|
+
for (let r = 0; r < i.length; r += 1) {
|
|
226
|
+
const l = i[r], f = e[l];
|
|
252
227
|
if (typeof f == "string") {
|
|
253
228
|
if (this.searchInString(f, n))
|
|
254
229
|
return !0;
|
|
@@ -265,7 +240,7 @@ const d = class d {
|
|
|
265
240
|
*
|
|
266
241
|
*/
|
|
267
242
|
static searchInArray(e, n) {
|
|
268
|
-
return e.forEach((
|
|
243
|
+
return e.forEach((i) => !!(typeof i == "string" && this.searchInString(i, n) || i && typeof i == "object" && this.searchInObj(i, n))), !1;
|
|
269
244
|
}
|
|
270
245
|
/**
|
|
271
246
|
* The searchInString function searches a string for a given search string.
|
|
@@ -302,20 +277,20 @@ const d = class d {
|
|
|
302
277
|
* The setRoutes function sets the routes for the Owp project.
|
|
303
278
|
*/
|
|
304
279
|
static setRoutes(e, n = void 0) {
|
|
305
|
-
let
|
|
306
|
-
e != null && e.routes && (
|
|
307
|
-
const s = /* @__PURE__ */ o((
|
|
308
|
-
const f =
|
|
309
|
-
...
|
|
280
|
+
let i = [];
|
|
281
|
+
e != null && e.routes && (i = [...e.routes]);
|
|
282
|
+
const s = /* @__PURE__ */ o((r, l) => {
|
|
283
|
+
const f = r.auth || r.auth === null ? r.auth : l, a = X({}, e.settings, r.settings), u = {
|
|
284
|
+
...r,
|
|
310
285
|
settings: a,
|
|
311
286
|
auth: f
|
|
312
287
|
};
|
|
313
|
-
return
|
|
288
|
+
return r.children && (u.children = r.children.map((y) => s(y, f))), u;
|
|
314
289
|
}, "applyAuth");
|
|
315
|
-
return
|
|
290
|
+
return i = i.map((r) => {
|
|
316
291
|
const l = e.auth || e.auth === null ? e.auth : n || null;
|
|
317
|
-
return s(
|
|
318
|
-
}), [...
|
|
292
|
+
return s(r, l);
|
|
293
|
+
}), [...i];
|
|
319
294
|
}
|
|
320
295
|
/**
|
|
321
296
|
* The generateRoutesFromConfigs function generates routes from a set of route configurations.
|
|
@@ -323,20 +298,20 @@ const d = class d {
|
|
|
323
298
|
*
|
|
324
299
|
*/
|
|
325
300
|
static generateRoutesFromConfigs(e, n) {
|
|
326
|
-
let
|
|
301
|
+
let i = [];
|
|
327
302
|
return e.forEach((s) => {
|
|
328
|
-
|
|
329
|
-
}),
|
|
303
|
+
i = [...i, ...this.setRoutes(s, n)];
|
|
304
|
+
}), i;
|
|
330
305
|
}
|
|
331
306
|
/**
|
|
332
307
|
* The findById function finds an object by its id.
|
|
333
308
|
*/
|
|
334
309
|
static findById(e, n) {
|
|
335
|
-
const
|
|
336
|
-
if (
|
|
337
|
-
return
|
|
310
|
+
const i = H(e, { id: n });
|
|
311
|
+
if (i)
|
|
312
|
+
return i;
|
|
338
313
|
let s;
|
|
339
|
-
return
|
|
314
|
+
return J(e, (r) => r.children ? (s = this.findById(r.children, n), s) : !1), s;
|
|
340
315
|
}
|
|
341
316
|
/**
|
|
342
317
|
* The randomMatColor function generates a random material color.
|
|
@@ -360,52 +335,49 @@ const d = class d {
|
|
|
360
335
|
"amber",
|
|
361
336
|
"orange",
|
|
362
337
|
"deepOrange"
|
|
363
|
-
],
|
|
364
|
-
return (s =
|
|
338
|
+
], i = n[Math.floor(Math.random() * n.length)];
|
|
339
|
+
return (s = F[i]) == null ? void 0 : s[e];
|
|
365
340
|
}
|
|
366
341
|
/**
|
|
367
342
|
* The findNavItemById function finds a navigation item by its id.
|
|
368
343
|
*/
|
|
369
344
|
static difference(e, n) {
|
|
370
|
-
function
|
|
371
|
-
return s == null ? void 0 : s.reduce((l, f, a) => (
|
|
345
|
+
function i(s, r) {
|
|
346
|
+
return s == null ? void 0 : s.reduce((l, f, a) => ($(f, r[a]) || (l[a] = I(f) && I(r[a]) ? i(f, r[a]) : f), l), {});
|
|
372
347
|
}
|
|
373
|
-
return o(
|
|
348
|
+
return o(i, "changes"), i(e, n);
|
|
374
349
|
}
|
|
375
350
|
/**
|
|
376
351
|
* The hasPermission function checks if a user has permission to access a resource.
|
|
377
352
|
*/
|
|
378
353
|
// @ts-expect-error
|
|
379
354
|
static hasPermission(e, n) {
|
|
380
|
-
var
|
|
381
|
-
return e == null ? !0 : Array.isArray(e) && (e == null ? void 0 : e.length) === 0 ? !n || n.length === 0 : n && Array.isArray(e) && Array.isArray(n) ? e.some((s) => n.indexOf(s) >= 0) : typeof n == "string" && Array.isArray(e) ? (
|
|
355
|
+
var i;
|
|
356
|
+
return e == null ? !0 : Array.isArray(e) && (e == null ? void 0 : e.length) === 0 ? !n || n.length === 0 : n && Array.isArray(e) && Array.isArray(n) ? e.some((s) => n.indexOf(s) >= 0) : typeof n == "string" && Array.isArray(e) ? (i = e == null ? void 0 : e.includes) == null ? void 0 : i.call(e, n) : !1;
|
|
382
357
|
}
|
|
383
358
|
/**
|
|
384
359
|
* The filterArrayByString function filters an array of objects by a search string.
|
|
385
360
|
*/
|
|
386
361
|
static filterRecursive(e, n) {
|
|
387
|
-
return e ? e.reduce((
|
|
388
|
-
let
|
|
389
|
-
if (n(s) && (
|
|
362
|
+
return e ? e.reduce((i, s) => {
|
|
363
|
+
let r = null;
|
|
364
|
+
if (n(s) && (r = { ...s }), s.children != null) {
|
|
390
365
|
const l = this.filterRecursive(s.children, n);
|
|
391
|
-
l && (l == null ? void 0 : l.length) > 0 && (
|
|
366
|
+
l && (l == null ? void 0 : l.length) > 0 && (r = { ...s, children: l });
|
|
392
367
|
}
|
|
393
|
-
return
|
|
368
|
+
return r && i.push(r), i;
|
|
394
369
|
}, []) : null;
|
|
395
370
|
}
|
|
396
371
|
};
|
|
397
372
|
o(d, "OwpUtils"), /**
|
|
398
373
|
* OwpEventEmitter class reference
|
|
399
374
|
*/
|
|
400
|
-
|
|
401
|
-
let
|
|
375
|
+
h(d, "EventEmitter", g);
|
|
376
|
+
let L = d;
|
|
402
377
|
export {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
X as
|
|
407
|
-
z as f,
|
|
408
|
-
Z as g,
|
|
409
|
-
H as m
|
|
378
|
+
L as O,
|
|
379
|
+
g as a,
|
|
380
|
+
H as f,
|
|
381
|
+
X as m
|
|
410
382
|
};
|
|
411
|
-
//# sourceMappingURL=OwpUtils-
|
|
383
|
+
//# sourceMappingURL=OwpUtils-CDsU9hQL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwpUtils-DV2LSByd.js","sources":["../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/object/clone.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/find.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/some.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/merge.mjs","../src/components/OwpEventEmitter/OwpEventEmitter.ts","../src/utils/common/OwpUtils.ts"],"sourcesContent":["import { isPrimitive } from '../predicate/isPrimitive.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction clone(obj) {\n if (isPrimitive(obj)) {\n return obj;\n }\n if (Array.isArray(obj) ||\n isTypedArray(obj) ||\n obj instanceof ArrayBuffer ||\n (typeof SharedArrayBuffer !== 'undefined' && obj instanceof SharedArrayBuffer)) {\n return obj.slice(0);\n }\n const prototype = Object.getPrototypeOf(obj);\n const Constructor = prototype.constructor;\n if (obj instanceof Date || obj instanceof Map || obj instanceof Set) {\n return new Constructor(obj);\n }\n if (obj instanceof RegExp) {\n const newRegExp = new Constructor(obj);\n newRegExp.lastIndex = obj.lastIndex;\n return newRegExp;\n }\n if (obj instanceof DataView) {\n return new Constructor(obj.buffer.slice(0));\n }\n if (obj instanceof Error) {\n const newError = new Constructor(obj.message);\n newError.stack = obj.stack;\n newError.name = obj.name;\n newError.cause = obj.cause;\n return newError;\n }\n if (typeof File !== 'undefined' && obj instanceof File) {\n const newFile = new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });\n return newFile;\n }\n if (typeof obj === 'object') {\n const newObject = Object.create(prototype);\n return Object.assign(newObject, obj);\n }\n return obj;\n}\n\nexport { clone };\n","import { identity } from '../../function/identity.mjs';\nimport { iteratee } from '../util/iteratee.mjs';\n\nfunction find(source, _doesMatch = identity, fromIndex = 0) {\n if (!source) {\n return undefined;\n }\n if (fromIndex < 0) {\n fromIndex = Math.max(source.length + fromIndex, 0);\n }\n const doesMatch = iteratee(_doesMatch);\n if (typeof doesMatch === 'function' && !Array.isArray(source)) {\n const keys = Object.keys(source);\n for (let i = fromIndex; i < keys.length; i++) {\n const key = keys[i];\n const value = source[key];\n if (doesMatch(value, key, source)) {\n return value;\n }\n }\n return undefined;\n }\n const values = Array.isArray(source) ? source.slice(fromIndex) : Object.values(source).slice(fromIndex);\n return values.find(doesMatch);\n}\n\nexport { find };\n","import { identity } from '../../function/identity.mjs';\nimport { property } from '../object/property.mjs';\nimport { matches } from '../predicate/matches.mjs';\nimport { matchesProperty } from '../predicate/matchesProperty.mjs';\n\nfunction some(source, predicate, guard) {\n if (!source) {\n return false;\n }\n if (guard != null) {\n predicate = undefined;\n }\n if (!predicate) {\n predicate = identity;\n }\n const values = Array.isArray(source) ? source : Object.values(source);\n switch (typeof predicate) {\n case 'function': {\n if (!Array.isArray(source)) {\n const keys = Object.keys(source);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = source[key];\n if (predicate(value, key, source)) {\n return true;\n }\n }\n return false;\n }\n for (let i = 0; i < source.length; i++) {\n if (predicate(source[i], i, source)) {\n return true;\n }\n }\n return false;\n }\n case 'object': {\n if (Array.isArray(predicate) && predicate.length === 2) {\n const key = predicate[0];\n const value = predicate[1];\n const matchFunc = matchesProperty(key, value);\n if (Array.isArray(source)) {\n for (let i = 0; i < source.length; i++) {\n if (matchFunc(source[i])) {\n return true;\n }\n }\n return false;\n }\n return values.some(matchFunc);\n }\n else {\n const matchFunc = matches(predicate);\n if (Array.isArray(source)) {\n for (let i = 0; i < source.length; i++) {\n if (matchFunc(source[i])) {\n return true;\n }\n }\n return false;\n }\n return values.some(matchFunc);\n }\n }\n case 'number':\n case 'symbol':\n case 'string': {\n const propFunc = property(predicate);\n if (Array.isArray(source)) {\n for (let i = 0; i < source.length; i++) {\n if (propFunc(source[i])) {\n return true;\n }\n }\n return false;\n }\n return values.some(propFunc);\n }\n }\n}\n\nexport { some };\n","import { cloneDeep } from './cloneDeep.mjs';\nimport { isUnsafeProperty } from '../../_internal/isUnsafeProperty.mjs';\nimport { clone } from '../../object/clone.mjs';\nimport { isPrimitive } from '../../predicate/isPrimitive.mjs';\nimport { getSymbols } from '../_internal/getSymbols.mjs';\nimport { isArguments } from '../predicate/isArguments.mjs';\nimport { isObjectLike } from '../predicate/isObjectLike.mjs';\nimport { isPlainObject } from '../predicate/isPlainObject.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction mergeWith(object, ...otherArgs) {\n const sources = otherArgs.slice(0, -1);\n const merge = otherArgs[otherArgs.length - 1];\n let result = object;\n for (let i = 0; i < sources.length; i++) {\n const source = sources[i];\n result = mergeWithDeep(result, source, merge, new Map());\n }\n return result;\n}\nfunction mergeWithDeep(target, source, merge, stack) {\n if (isPrimitive(target)) {\n target = Object(target);\n }\n if (source == null || typeof source !== 'object') {\n return target;\n }\n if (stack.has(source)) {\n return clone(stack.get(source));\n }\n stack.set(source, target);\n if (Array.isArray(source)) {\n source = source.slice();\n for (let i = 0; i < source.length; i++) {\n source[i] = source[i] ?? undefined;\n }\n }\n const sourceKeys = [...Object.keys(source), ...getSymbols(source)];\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n let sourceValue = source[key];\n let targetValue = target[key];\n if (isArguments(sourceValue)) {\n sourceValue = { ...sourceValue };\n }\n if (isArguments(targetValue)) {\n targetValue = { ...targetValue };\n }\n if (typeof Buffer !== 'undefined' && Buffer.isBuffer(sourceValue)) {\n sourceValue = cloneDeep(sourceValue);\n }\n if (Array.isArray(sourceValue)) {\n if (typeof targetValue === 'object' && targetValue != null) {\n const cloned = [];\n const targetKeys = Reflect.ownKeys(targetValue);\n for (let i = 0; i < targetKeys.length; i++) {\n const targetKey = targetKeys[i];\n cloned[targetKey] = targetValue[targetKey];\n }\n targetValue = cloned;\n }\n else {\n targetValue = [];\n }\n }\n const merged = merge(targetValue, sourceValue, key, target, source, stack);\n if (merged !== undefined) {\n target[key] = merged;\n }\n else if (Array.isArray(sourceValue)) {\n target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n }\n else if (isObjectLike(targetValue) && isObjectLike(sourceValue)) {\n target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n }\n else if (targetValue == null && isPlainObject(sourceValue)) {\n target[key] = mergeWithDeep({}, sourceValue, merge, stack);\n }\n else if (targetValue == null && isTypedArray(sourceValue)) {\n target[key] = cloneDeep(sourceValue);\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { mergeWith };\n","import { mergeWith } from './mergeWith.mjs';\nimport { noop } from '../../function/noop.mjs';\n\nfunction merge(object, ...sources) {\n return mergeWith(object, ...sources, noop);\n}\n\nexport { merge };\n","/**\n * Owp event emitter implementation\n */\nexport class OwpEventEmitter {\n private events: { [eventName: string]: Set<(...args: unknown[]) => void> };\n\n constructor() {\n this.events = {};\n }\n\n /**\n * Event listener set lookup\n */\n private _getEventListByName<T extends unknown[]>(eventName: string): Set<(...args: T) => void> {\n if (typeof this.events[eventName] === 'undefined') {\n this.events[eventName] = new Set();\n }\n\n return this.events[eventName];\n }\n\n /**\n * Event subscription\n */\n on<T extends unknown[]>(eventName: string, fn: (...args: T) => void): void {\n this._getEventListByName<T>(eventName).add(fn);\n }\n\n /**\n * One-time event subscription\n */\n once(eventName: string, fn: (...args: unknown[]) => void): void {\n const onceFn = (...args: unknown[]) => {\n this.removeListener(eventName, onceFn);\n fn.apply(this, args);\n };\n this.on(eventName, onceFn);\n }\n\n /**\n * Event emission\n */\n emit(eventName: string, ...args: unknown[]): void {\n this._getEventListByName(eventName).forEach((fn) => {\n fn.apply(this, args);\n });\n }\n\n /**\n * Event unsubscription\n */\n removeListener(eventName: string, fn: (...args: unknown[]) => void): void {\n this._getEventListByName(eventName).delete(fn);\n }\n}\n","import { OwpEventEmitter } from '@/components/OwpEventEmitter';\nimport type { OwpSettingsConfigType } from '@/types/OwpSettingsTypes';\nimport * as colors from '@mui/material/colors';\nimport { find, isEqual, isObject, merge, some } from 'es-toolkit/compat';\nimport { DeepPartial } from 'react-hook-form';\nimport { RouteObject } from 'react-router-dom';\nimport { PartialDeep } from 'type-fest';\n\ntype TreeNode = {\n id: string;\n children?: TreeNode[];\n};\n/**\n * The OwpRouteItemType type is a custom type that extends the RouteObject type from react-router-dom.\n * It adds an optional auth property and an optional settings property.\n */\nexport type OwpRouteItemType = RouteObject & {\n auth?: string[] | [] | null;\n settings?: DeepPartial<OwpSettingsConfigType>;\n children?: OwpRouteItemType[];\n};\n\n/**\n * The OwpRoutesType type is a custom type that is an array of OwpRouteItemType objects.\n */\nexport type OwpRoutesType = OwpRouteItemType[];\n\n/**\n * The OwpRouteConfigType type is a custom type that defines the configuration for a set of routes.\n * It includes an optional routes property, an optional settings property, and an optional auth property.\n */\nexport type OwpRouteConfigType = {\n routes: OwpRoutesType;\n settings?: PartialDeep<OwpSettingsConfigType>;\n auth?: string[] | [];\n path?: string;\n};\n\n/**\n * The OwpRouteConfigsType type is a custom type that is an array of OwpRouteConfigType objects.\n */\nexport type OwpRouteConfigsType = OwpRouteConfigType[] | [];\n\n/**\n * The hueTypes type is a custom type that defines the possible values for a hue.\n */\ntype hueTypes =\n | '50'\n | '100'\n | '200'\n | '300'\n | '400'\n | '500'\n | '600'\n | '700'\n | '800'\n | '900'\n | 'A100'\n | 'A200'\n | 'A400'\n | 'A700';\n\ntype Color = {\n 50?: string;\n 100?: string;\n 200?: string;\n 300?: string;\n 400?: string;\n 500?: string;\n 600?: string;\n 700?: string;\n 800?: string;\n 900?: string;\n A100?: string;\n A200?: string;\n A400?: string;\n A700?: string;\n [key: string]: string | undefined;\n};\n\n/**\n * The OwpUtils class provides utility functions for the Owp project.\n */\nexport class OwpUtils {\n /**\n * The filterArrayByString function filters an array of objects by a search string.\n * It takes in an array of objects and a search string as parameters and returns a filtered array of objects.\n *\n */\n\n static filterArrayByString<T>(mainArr: T[], searchText: string): T[] {\n if (!searchText || searchText?.length === 0 || !searchText) {\n return mainArr; \n }\n\n searchText = searchText?.toLowerCase();\n const filtered = mainArr.filter((itemObj) => this.searchInObj(itemObj, searchText));\n\n if (filtered.length === mainArr.length) {\n return mainArr; \n }\n\n return filtered;\n }\n\n static filterArrayByString2<T>(mainArr: T[], searchText: string): T[] {\n if (typeof searchText !== 'string' || searchText === '') {\n return mainArr;\n }\n\n searchText = searchText?.toLowerCase();\n\n return mainArr.filter((itemObj: unknown) => this.searchInObj(itemObj, searchText));\n }\n\n /**\n * The searchInObj function searches an object for a given search string.\n * It takes in an object and a search string as parameters and returns a boolean indicating whether the search string was found in the object.\n *\n */\n static searchInObj(itemObj: unknown, searchText: string) {\n if (!isRecord(itemObj)) {\n return false;\n }\n\n const propArray = Object.keys(itemObj);\n\n function isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(\n value && typeof value === 'object' && !Array.isArray(value) && typeof value !== 'function',\n );\n }\n\n for (let i = 0; i < propArray.length; i += 1) {\n const prop = propArray[i];\n\n const value = itemObj[prop!];\n\n if (typeof value === 'string') {\n if (this.searchInString(value, searchText)) {\n return true;\n }\n } else if (Array.isArray(value)) {\n if (this.searchInArray(value, searchText)) {\n return true;\n }\n }\n\n if (typeof value === 'object') {\n if (this.searchInObj(value, searchText)) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * The searchInArray function searches an array for a given search string.\n * It takes in an array and a search string as parameters and returns a boolean indicating whether the search string was found in the array.\n *\n */\n static searchInArray(arr: unknown[], searchText: string) {\n arr.forEach((value) => {\n if (typeof value === 'string') {\n if (this.searchInString(value, searchText)) {\n return true;\n }\n }\n\n if (value && typeof value === 'object') {\n if (this.searchInObj(value, searchText)) {\n return true;\n }\n }\n\n return false;\n });\n return false;\n }\n\n /**\n * The searchInString function searches a string for a given search string.\n * It takes in a string and a search string as parameters and returns a boolean indicating whether the search string was found in the string.\n *\n */\n static searchInString(value: string, searchText: string) {\n return value.toLowerCase().includes(searchText);\n }\n\n /**\n * The generateGUID function generates a globally unique identifier.\n * It returns a string representing the GUID.\n *\n */\n static generateGUID(): string {\n function S4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return S4() + S4();\n }\n\n /**\n * The toggleInArray function toggles an item in an array.\n */\n static toggleInArray(item: unknown, array: unknown[]) {\n if (array.indexOf(item) === -1) {\n array.push(item);\n } else {\n array.splice(array.indexOf(item), 1);\n }\n }\n\n /**\n * The handleize function converts a string to a handle.\n */\n static handleize(text: string) {\n return text\n .toString()\n .toLowerCase()\n .replace(/\\s+/g, '-') \n .replace(/\\W+/g, '') \n .replace(/--+/g, '-') \n .replace(/^-+/, '') \n .replace(/-+$/, ''); \n }\n\n /**\n * The setRoutes function sets the routes for the Owp project.\n */\n static setRoutes(\n config: OwpRouteConfigType,\n defaultAuth: OwpSettingsConfigType['defaultAuth'] = undefined,\n ): OwpRouteItemType[] {\n let routes: OwpRouteItemType[] = [];\n\n if (config?.routes) {\n routes = [...config.routes];\n }\n\n const applyAuth = (route: OwpRouteItemType, parentAuth: string[] | null) => {\n const auth = route.auth || route.auth === null ? route.auth : parentAuth;\n const settings = merge({}, config.settings, route.settings);\n\n const newRoute = {\n ...route,\n settings,\n auth,\n };\n\n if (route.children) {\n newRoute.children = route.children.map((childRoute) => applyAuth(childRoute, auth));\n }\n\n return newRoute;\n };\n\n routes = routes.map((route) => {\n const auth = config.auth || config.auth === null ? config.auth : defaultAuth || null;\n return applyAuth(route, auth);\n }) as OwpRouteItemType[];\n\n return [...routes];\n }\n\n /**\n * The generateRoutesFromConfigs function generates routes from a set of route configurations.\n * It takes in an array of route configurations as a parameter and returns an array of routes.\n *\n */\n static generateRoutesFromConfigs(\n configs: OwpRouteConfigsType,\n defaultAuth: OwpSettingsConfigType['defaultAuth'],\n ) {\n let allRoutes: OwpRouteItemType[] = [];\n configs.forEach((config: OwpRouteConfigType) => {\n allRoutes = [...allRoutes, ...this.setRoutes(config, defaultAuth)];\n });\n return allRoutes;\n }\n\n /**\n * The findById function finds an object by its id.\n */\n static findById(tree: TreeNode[], idToFind: string): TreeNode | undefined {\n \n const node = find(tree, { id: idToFind });\n\n if (node) {\n return node;\n }\n\n let foundNode: TreeNode | undefined;\n\n \n some(tree, (item) => {\n if (item.children) {\n foundNode = this.findById(item.children, idToFind);\n return foundNode; \n }\n\n return false; \n });\n\n return foundNode;\n }\n\n /**\n * The randomMatColor function generates a random material color.\n */\n static randomMatColor(hue: hueTypes = '400') {\n const mainColors = [\n 'red',\n 'pink',\n 'purple',\n 'deepPurple',\n 'indigo',\n 'blue',\n 'lightBlue',\n 'cyan',\n 'teal',\n 'green',\n 'lightGreen',\n 'lime',\n 'yellow',\n 'amber',\n 'orange',\n 'deepOrange',\n ];\n\n const randomColor = mainColors[Math.floor(Math.random() * mainColors.length)];\n\n return (colors as { [key: string]: Color })[randomColor!]?.[hue];\n }\n\n /**\n * The findNavItemById function finds a navigation item by its id.\n */\n static difference(\n object: Record<string, unknown>,\n base: Record<string, unknown>,\n ): Record<string, unknown> {\n function changes(\n _object: Record<string, unknown>,\n _base: Record<string, unknown>,\n ): Record<string, unknown> {\n // @ts-expect-error\n return _object?.reduce((result: Record<string, unknown>, value: unknown, key: string) => {\n if (!isEqual(value, _base[key])) {\n result[key] =\n isObject(value) && isObject(_base[key])\n ? changes(value as Record<string, unknown>, _base[key] as Record<string, unknown>)\n : value;\n }\n\n return result;\n }, {});\n }\n\n return changes(object, base);\n }\n\n /**\n * OwpEventEmitter class reference\n */\n static EventEmitter = OwpEventEmitter;\n\n /**\n * The hasPermission function checks if a user has permission to access a resource.\n */\n // @ts-expect-error\n static hasPermission(authArr: string[] | string | undefined, userRole: User['role']): boolean {\n \n if (authArr === null || authArr === undefined) {\n return true;\n }\n\n if (Array.isArray(authArr) && authArr?.length === 0) {\n \n return !userRole || userRole.length === 0;\n }\n\n \n \n if (userRole && Array.isArray(authArr) && Array.isArray(userRole)) {\n return authArr.some((r: string) => userRole.indexOf(r) >= 0);\n }\n\n if (typeof userRole === 'string' && Array.isArray(authArr)) {\n return authArr?.includes?.(userRole);\n }\n\n return false;\n }\n\n /**\n * The filterArrayByString function filters an array of objects by a search string.\n */\n static filterRecursive(data: [] | null, predicate: (arg0: unknown) => boolean) {\n \n return !data\n ? null\n : data.reduce((list: unknown[], entry: { children?: [] }) => {\n let clone: unknown = null;\n\n if (predicate(entry)) {\n \n clone = { ...entry };\n }\n\n if (entry.children != null) {\n \n const children = this.filterRecursive(entry.children, predicate);\n\n if (children && children?.length > 0) {\n \n \n clone = { ...entry, children };\n }\n }\n\n \n if (clone) {\n list.push(clone);\n }\n\n return list;\n }, []);\n }\n}\n"],"names":["clone","obj","isPrimitive","isTypedArray","prototype","Constructor","newRegExp","newError","newObject","__name","find","source","_doesMatch","identity","fromIndex","doesMatch","iteratee","keys","i","key","value","some","predicate","guard","values","matchFunc","matchesProperty","matches","propFunc","property","mergeWith","object","otherArgs","sources","merge","result","mergeWithDeep","target","stack","sourceKeys","getSymbols","isUnsafeProperty","sourceValue","targetValue","isArguments","cloneDeep","cloned","targetKeys","targetKey","merged","isObjectLike","isPlainObject","noop","_OwpEventEmitter","__publicField","eventName","fn","onceFn","args","OwpEventEmitter","_OwpUtils","mainArr","searchText","filtered","itemObj","isRecord","propArray","prop","arr","S4","item","array","text","config","defaultAuth","routes","applyAuth","route","parentAuth","auth","settings","newRoute","childRoute","configs","allRoutes","tree","idToFind","node","foundNode","hue","mainColors","randomColor","_a","colors","base","changes","_object","_base","isEqual","isObject","authArr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A,KAAA,gBAAAA,EAAS,YAAW,IAEzC,CAACC,KAAYA,EAAS,WAAW,IAKtCA,KAAY,MAAM,QAAQD,CAAO,KAAK,MAAM,QAAQC,CAAQ,IACvDD,EAAQ,KAAK,CAACE,MAAcD,EAAS,QAAQC,CAAC,KAAK,CAAC,IAGzD,OAAOD,KAAa,YAAY,MAAM,QAAQD,CAAO,KAChDR,IAAAQ,KAAA,gBAAAA,EAAS,aAAT,gBAAAR,EAAA,KAAAQ,GAAoBC,KAGtB;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,gBAAgBE,GAAiBjF,GAAuC;AAE7E,WAAQiF,IAEJA,EAAK,OAAO,CAACC,GAAiBC,MAA6B;AACzD,UAAIzG,IAAiB;AAOrB,UALIsB,EAAUmF,CAAK,MAEjBzG,IAAQ,EAAE,GAAGyG,EAAA,IAGXA,EAAM,YAAY,MAAM;AAE1B,cAAMC,IAAW,KAAK,gBAAgBD,EAAM,UAAUnF,CAAS;AAE/D,QAAIoF,MAAYA,KAAA,gBAAAA,EAAU,UAAS,MAGjC1G,IAAQ,EAAE,GAAGyG,GAAO,UAAAC,EAAA;AAAA,MAExB;AAGA,aAAI1G,KACFwG,EAAK,KAAKxG,CAAK,GAGVwG;AAAA,IACT,GAAG,CAAA,CAAE,IA1BL;AAAA,EA2BN;AACF;AA7VsB/F,EAAAmD,GAAA;AAAA;AAAA;AA6RpBN,EA7RWM,GA6RJ,gBAAeD;AA7RjB,IAAMgD,IAAN/C;","x_google_ignoreList":[0,1,2,3,4]}
|
|
1
|
+
{"version":3,"file":"OwpUtils-CDsU9hQL.js","sources":["../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/object/clone.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/find.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/some.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/merge.mjs","../src/components/OwpEventEmitter/OwpEventEmitter.ts","../src/utils/common/OwpUtils.ts"],"sourcesContent":["import { isPrimitive } from '../predicate/isPrimitive.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction clone(obj) {\n if (isPrimitive(obj)) {\n return obj;\n }\n if (Array.isArray(obj) ||\n isTypedArray(obj) ||\n obj instanceof ArrayBuffer ||\n (typeof SharedArrayBuffer !== 'undefined' && obj instanceof SharedArrayBuffer)) {\n return obj.slice(0);\n }\n const prototype = Object.getPrototypeOf(obj);\n const Constructor = prototype.constructor;\n if (obj instanceof Date || obj instanceof Map || obj instanceof Set) {\n return new Constructor(obj);\n }\n if (obj instanceof RegExp) {\n const newRegExp = new Constructor(obj);\n newRegExp.lastIndex = obj.lastIndex;\n return newRegExp;\n }\n if (obj instanceof DataView) {\n return new Constructor(obj.buffer.slice(0));\n }\n if (obj instanceof Error) {\n const newError = new Constructor(obj.message);\n newError.stack = obj.stack;\n newError.name = obj.name;\n newError.cause = obj.cause;\n return newError;\n }\n if (typeof File !== 'undefined' && obj instanceof File) {\n const newFile = new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });\n return newFile;\n }\n if (typeof obj === 'object') {\n const newObject = Object.create(prototype);\n return Object.assign(newObject, obj);\n }\n return obj;\n}\n\nexport { clone };\n","import { identity } from '../../function/identity.mjs';\nimport { iteratee } from '../util/iteratee.mjs';\n\nfunction find(source, _doesMatch = identity, fromIndex = 0) {\n if (!source) {\n return undefined;\n }\n if (fromIndex < 0) {\n fromIndex = Math.max(source.length + fromIndex, 0);\n }\n const doesMatch = iteratee(_doesMatch);\n if (typeof doesMatch === 'function' && !Array.isArray(source)) {\n const keys = Object.keys(source);\n for (let i = fromIndex; i < keys.length; i++) {\n const key = keys[i];\n const value = source[key];\n if (doesMatch(value, key, source)) {\n return value;\n }\n }\n return undefined;\n }\n const values = Array.isArray(source) ? source.slice(fromIndex) : Object.values(source).slice(fromIndex);\n return values.find(doesMatch);\n}\n\nexport { find };\n","import { identity } from '../../function/identity.mjs';\nimport { property } from '../object/property.mjs';\nimport { matches } from '../predicate/matches.mjs';\nimport { matchesProperty } from '../predicate/matchesProperty.mjs';\n\nfunction some(source, predicate, guard) {\n if (!source) {\n return false;\n }\n if (guard != null) {\n predicate = undefined;\n }\n if (!predicate) {\n predicate = identity;\n }\n const values = Array.isArray(source) ? source : Object.values(source);\n switch (typeof predicate) {\n case 'function': {\n if (!Array.isArray(source)) {\n const keys = Object.keys(source);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = source[key];\n if (predicate(value, key, source)) {\n return true;\n }\n }\n return false;\n }\n for (let i = 0; i < source.length; i++) {\n if (predicate(source[i], i, source)) {\n return true;\n }\n }\n return false;\n }\n case 'object': {\n if (Array.isArray(predicate) && predicate.length === 2) {\n const key = predicate[0];\n const value = predicate[1];\n const matchFunc = matchesProperty(key, value);\n if (Array.isArray(source)) {\n for (let i = 0; i < source.length; i++) {\n if (matchFunc(source[i])) {\n return true;\n }\n }\n return false;\n }\n return values.some(matchFunc);\n }\n else {\n const matchFunc = matches(predicate);\n if (Array.isArray(source)) {\n for (let i = 0; i < source.length; i++) {\n if (matchFunc(source[i])) {\n return true;\n }\n }\n return false;\n }\n return values.some(matchFunc);\n }\n }\n case 'number':\n case 'symbol':\n case 'string': {\n const propFunc = property(predicate);\n if (Array.isArray(source)) {\n for (let i = 0; i < source.length; i++) {\n if (propFunc(source[i])) {\n return true;\n }\n }\n return false;\n }\n return values.some(propFunc);\n }\n }\n}\n\nexport { some };\n","import { cloneDeep } from './cloneDeep.mjs';\nimport { isUnsafeProperty } from '../../_internal/isUnsafeProperty.mjs';\nimport { clone } from '../../object/clone.mjs';\nimport { isPrimitive } from '../../predicate/isPrimitive.mjs';\nimport { getSymbols } from '../_internal/getSymbols.mjs';\nimport { isArguments } from '../predicate/isArguments.mjs';\nimport { isObjectLike } from '../predicate/isObjectLike.mjs';\nimport { isPlainObject } from '../predicate/isPlainObject.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction mergeWith(object, ...otherArgs) {\n const sources = otherArgs.slice(0, -1);\n const merge = otherArgs[otherArgs.length - 1];\n let result = object;\n for (let i = 0; i < sources.length; i++) {\n const source = sources[i];\n result = mergeWithDeep(result, source, merge, new Map());\n }\n return result;\n}\nfunction mergeWithDeep(target, source, merge, stack) {\n if (isPrimitive(target)) {\n target = Object(target);\n }\n if (source == null || typeof source !== 'object') {\n return target;\n }\n if (stack.has(source)) {\n return clone(stack.get(source));\n }\n stack.set(source, target);\n if (Array.isArray(source)) {\n source = source.slice();\n for (let i = 0; i < source.length; i++) {\n source[i] = source[i] ?? undefined;\n }\n }\n const sourceKeys = [...Object.keys(source), ...getSymbols(source)];\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n let sourceValue = source[key];\n let targetValue = target[key];\n if (isArguments(sourceValue)) {\n sourceValue = { ...sourceValue };\n }\n if (isArguments(targetValue)) {\n targetValue = { ...targetValue };\n }\n if (typeof Buffer !== 'undefined' && Buffer.isBuffer(sourceValue)) {\n sourceValue = cloneDeep(sourceValue);\n }\n if (Array.isArray(sourceValue)) {\n if (typeof targetValue === 'object' && targetValue != null) {\n const cloned = [];\n const targetKeys = Reflect.ownKeys(targetValue);\n for (let i = 0; i < targetKeys.length; i++) {\n const targetKey = targetKeys[i];\n cloned[targetKey] = targetValue[targetKey];\n }\n targetValue = cloned;\n }\n else {\n targetValue = [];\n }\n }\n const merged = merge(targetValue, sourceValue, key, target, source, stack);\n if (merged !== undefined) {\n target[key] = merged;\n }\n else if (Array.isArray(sourceValue)) {\n target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n }\n else if (isObjectLike(targetValue) && isObjectLike(sourceValue)) {\n target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n }\n else if (targetValue == null && isPlainObject(sourceValue)) {\n target[key] = mergeWithDeep({}, sourceValue, merge, stack);\n }\n else if (targetValue == null && isTypedArray(sourceValue)) {\n target[key] = cloneDeep(sourceValue);\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { mergeWith };\n","import { mergeWith } from './mergeWith.mjs';\nimport { noop } from '../../function/noop.mjs';\n\nfunction merge(object, ...sources) {\n return mergeWith(object, ...sources, noop);\n}\n\nexport { merge };\n","/**\n * Owp event emitter implementation\n */\nexport class OwpEventEmitter {\n private events: { [eventName: string]: Set<(...args: unknown[]) => void> };\n\n constructor() {\n this.events = {};\n }\n\n /**\n * Event listener set lookup\n */\n private _getEventListByName<T extends unknown[]>(eventName: string): Set<(...args: T) => void> {\n if (typeof this.events[eventName] === 'undefined') {\n this.events[eventName] = new Set();\n }\n\n return this.events[eventName];\n }\n\n /**\n * Event subscription\n */\n on<T extends unknown[]>(eventName: string, fn: (...args: T) => void): void {\n this._getEventListByName<T>(eventName).add(fn);\n }\n\n /**\n * One-time event subscription\n */\n once(eventName: string, fn: (...args: unknown[]) => void): void {\n const onceFn = (...args: unknown[]) => {\n this.removeListener(eventName, onceFn);\n fn.apply(this, args);\n };\n this.on(eventName, onceFn);\n }\n\n /**\n * Event emission\n */\n emit(eventName: string, ...args: unknown[]): void {\n this._getEventListByName(eventName).forEach((fn) => {\n fn.apply(this, args);\n });\n }\n\n /**\n * Event unsubscription\n */\n removeListener(eventName: string, fn: (...args: unknown[]) => void): void {\n this._getEventListByName(eventName).delete(fn);\n }\n}\n","import { OwpEventEmitter } from '@/components/OwpEventEmitter';\nimport type { OwpSettingsConfigType } from '@/types/OwpSettingsTypes';\nimport * as colors from '@mui/material/colors';\nimport { find, isEqual, isObject, merge, some } from 'es-toolkit/compat';\nimport { DeepPartial } from 'react-hook-form';\nimport { RouteObject } from 'react-router-dom';\nimport { PartialDeep } from 'type-fest';\n\ntype TreeNode = {\n id: string;\n children?: TreeNode[];\n};\n/**\n * The OwpRouteItemType type is a custom type that extends the RouteObject type from react-router-dom.\n * It adds an optional auth property and an optional settings property.\n */\nexport type OwpRouteItemType = RouteObject & {\n auth?: string[] | [] | null;\n settings?: DeepPartial<OwpSettingsConfigType>;\n children?: OwpRouteItemType[];\n};\n\n/**\n * The OwpRoutesType type is a custom type that is an array of OwpRouteItemType objects.\n */\nexport type OwpRoutesType = OwpRouteItemType[];\n\n/**\n * The OwpRouteConfigType type is a custom type that defines the configuration for a set of routes.\n * It includes an optional routes property, an optional settings property, and an optional auth property.\n */\nexport type OwpRouteConfigType = {\n routes: OwpRoutesType;\n settings?: PartialDeep<OwpSettingsConfigType>;\n auth?: string[] | [];\n path?: string;\n};\n\n/**\n * The OwpRouteConfigsType type is a custom type that is an array of OwpRouteConfigType objects.\n */\nexport type OwpRouteConfigsType = OwpRouteConfigType[] | [];\n\n/**\n * The hueTypes type is a custom type that defines the possible values for a hue.\n */\ntype hueTypes =\n | '50'\n | '100'\n | '200'\n | '300'\n | '400'\n | '500'\n | '600'\n | '700'\n | '800'\n | '900'\n | 'A100'\n | 'A200'\n | 'A400'\n | 'A700';\n\ntype Color = {\n 50?: string;\n 100?: string;\n 200?: string;\n 300?: string;\n 400?: string;\n 500?: string;\n 600?: string;\n 700?: string;\n 800?: string;\n 900?: string;\n A100?: string;\n A200?: string;\n A400?: string;\n A700?: string;\n [key: string]: string | undefined;\n};\n\n/**\n * The OwpUtils class provides utility functions for the Owp project.\n */\nexport class OwpUtils {\n /**\n * The filterArrayByString function filters an array of objects by a search string.\n * It takes in an array of objects and a search string as parameters and returns a filtered array of objects.\n *\n */\n\n static filterArrayByString<T>(mainArr: T[], searchText: string): T[] {\n if (!searchText || searchText?.length === 0 || !searchText) {\n return mainArr; \n }\n\n searchText = searchText?.toLowerCase();\n const filtered = mainArr.filter((itemObj) => this.searchInObj(itemObj, searchText));\n\n if (filtered.length === mainArr.length) {\n return mainArr; \n }\n\n return filtered;\n }\n\n static filterArrayByString2<T>(mainArr: T[], searchText: string): T[] {\n if (typeof searchText !== 'string' || searchText === '') {\n return mainArr;\n }\n\n searchText = searchText?.toLowerCase();\n\n return mainArr.filter((itemObj: unknown) => this.searchInObj(itemObj, searchText));\n }\n\n /**\n * The searchInObj function searches an object for a given search string.\n * It takes in an object and a search string as parameters and returns a boolean indicating whether the search string was found in the object.\n *\n */\n static searchInObj(itemObj: unknown, searchText: string) {\n if (!isRecord(itemObj)) {\n return false;\n }\n\n const propArray = Object.keys(itemObj);\n\n function isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(\n value && typeof value === 'object' && !Array.isArray(value) && typeof value !== 'function',\n );\n }\n\n for (let i = 0; i < propArray.length; i += 1) {\n const prop = propArray[i];\n\n const value = itemObj[prop!];\n\n if (typeof value === 'string') {\n if (this.searchInString(value, searchText)) {\n return true;\n }\n } else if (Array.isArray(value)) {\n if (this.searchInArray(value, searchText)) {\n return true;\n }\n }\n\n if (typeof value === 'object') {\n if (this.searchInObj(value, searchText)) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * The searchInArray function searches an array for a given search string.\n * It takes in an array and a search string as parameters and returns a boolean indicating whether the search string was found in the array.\n *\n */\n static searchInArray(arr: unknown[], searchText: string) {\n arr.forEach((value) => {\n if (typeof value === 'string') {\n if (this.searchInString(value, searchText)) {\n return true;\n }\n }\n\n if (value && typeof value === 'object') {\n if (this.searchInObj(value, searchText)) {\n return true;\n }\n }\n\n return false;\n });\n return false;\n }\n\n /**\n * The searchInString function searches a string for a given search string.\n * It takes in a string and a search string as parameters and returns a boolean indicating whether the search string was found in the string.\n *\n */\n static searchInString(value: string, searchText: string) {\n return value.toLowerCase().includes(searchText);\n }\n\n /**\n * The generateGUID function generates a globally unique identifier.\n * It returns a string representing the GUID.\n *\n */\n static generateGUID(): string {\n function S4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n\n return S4() + S4();\n }\n\n /**\n * The toggleInArray function toggles an item in an array.\n */\n static toggleInArray(item: unknown, array: unknown[]) {\n if (array.indexOf(item) === -1) {\n array.push(item);\n } else {\n array.splice(array.indexOf(item), 1);\n }\n }\n\n /**\n * The handleize function converts a string to a handle.\n */\n static handleize(text: string) {\n return text\n .toString()\n .toLowerCase()\n .replace(/\\s+/g, '-') \n .replace(/\\W+/g, '') \n .replace(/--+/g, '-') \n .replace(/^-+/, '') \n .replace(/-+$/, ''); \n }\n\n /**\n * The setRoutes function sets the routes for the Owp project.\n */\n static setRoutes(\n config: OwpRouteConfigType,\n defaultAuth: OwpSettingsConfigType['defaultAuth'] = undefined,\n ): OwpRouteItemType[] {\n let routes: OwpRouteItemType[] = [];\n\n if (config?.routes) {\n routes = [...config.routes];\n }\n\n const applyAuth = (route: OwpRouteItemType, parentAuth: string[] | null) => {\n const auth = route.auth || route.auth === null ? route.auth : parentAuth;\n const settings = merge({}, config.settings, route.settings);\n\n const newRoute = {\n ...route,\n settings,\n auth,\n };\n\n if (route.children) {\n newRoute.children = route.children.map((childRoute) => applyAuth(childRoute, auth));\n }\n\n return newRoute;\n };\n\n routes = routes.map((route) => {\n const auth = config.auth || config.auth === null ? config.auth : defaultAuth || null;\n return applyAuth(route, auth);\n }) as OwpRouteItemType[];\n\n return [...routes];\n }\n\n /**\n * The generateRoutesFromConfigs function generates routes from a set of route configurations.\n * It takes in an array of route configurations as a parameter and returns an array of routes.\n *\n */\n static generateRoutesFromConfigs(\n configs: OwpRouteConfigsType,\n defaultAuth: OwpSettingsConfigType['defaultAuth'],\n ) {\n let allRoutes: OwpRouteItemType[] = [];\n configs.forEach((config: OwpRouteConfigType) => {\n allRoutes = [...allRoutes, ...this.setRoutes(config, defaultAuth)];\n });\n return allRoutes;\n }\n\n /**\n * The findById function finds an object by its id.\n */\n static findById(tree: TreeNode[], idToFind: string): TreeNode | undefined {\n \n const node = find(tree, { id: idToFind });\n\n if (node) {\n return node;\n }\n\n let foundNode: TreeNode | undefined;\n\n \n some(tree, (item) => {\n if (item.children) {\n foundNode = this.findById(item.children, idToFind);\n return foundNode; \n }\n\n return false; \n });\n\n return foundNode;\n }\n\n /**\n * The randomMatColor function generates a random material color.\n */\n static randomMatColor(hue: hueTypes = '400') {\n const mainColors = [\n 'red',\n 'pink',\n 'purple',\n 'deepPurple',\n 'indigo',\n 'blue',\n 'lightBlue',\n 'cyan',\n 'teal',\n 'green',\n 'lightGreen',\n 'lime',\n 'yellow',\n 'amber',\n 'orange',\n 'deepOrange',\n ];\n\n const randomColor = mainColors[Math.floor(Math.random() * mainColors.length)];\n\n return (colors as { [key: string]: Color })[randomColor!]?.[hue];\n }\n\n /**\n * The findNavItemById function finds a navigation item by its id.\n */\n static difference(\n object: Record<string, unknown>,\n base: Record<string, unknown>,\n ): Record<string, unknown> {\n function changes(\n _object: Record<string, unknown>,\n _base: Record<string, unknown>,\n ): Record<string, unknown> {\n // @ts-expect-error\n return _object?.reduce((result: Record<string, unknown>, value: unknown, key: string) => {\n if (!isEqual(value, _base[key])) {\n result[key] =\n isObject(value) && isObject(_base[key])\n ? changes(value as Record<string, unknown>, _base[key] as Record<string, unknown>)\n : value;\n }\n\n return result;\n }, {});\n }\n\n return changes(object, base);\n }\n\n /**\n * OwpEventEmitter class reference\n */\n static EventEmitter = OwpEventEmitter;\n\n /**\n * The hasPermission function checks if a user has permission to access a resource.\n */\n // @ts-expect-error\n static hasPermission(authArr: string[] | string | undefined, userRole: User['role']): boolean {\n \n if (authArr === null || authArr === undefined) {\n return true;\n }\n\n if (Array.isArray(authArr) && authArr?.length === 0) {\n \n return !userRole || userRole.length === 0;\n }\n\n \n \n if (userRole && Array.isArray(authArr) && Array.isArray(userRole)) {\n return authArr.some((r: string) => userRole.indexOf(r) >= 0);\n }\n\n if (typeof userRole === 'string' && Array.isArray(authArr)) {\n return authArr?.includes?.(userRole);\n }\n\n return false;\n }\n\n /**\n * The filterArrayByString function filters an array of objects by a search string.\n */\n static filterRecursive(data: [] | null, predicate: (arg0: unknown) => boolean) {\n \n return !data\n ? null\n : data.reduce((list: unknown[], entry: { children?: [] }) => {\n let clone: unknown = null;\n\n if (predicate(entry)) {\n \n clone = { ...entry };\n }\n\n if (entry.children != null) {\n \n const children = this.filterRecursive(entry.children, predicate);\n\n if (children && children?.length > 0) {\n \n \n clone = { ...entry, children };\n }\n }\n\n \n if (clone) {\n list.push(clone);\n }\n\n return list;\n }, []);\n }\n}\n"],"names":["clone","obj","isPrimitive","isTypedArray","prototype","Constructor","newRegExp","newError","newObject","__name","find","source","_doesMatch","identity","fromIndex","doesMatch","iteratee","keys","i","key","value","some","predicate","guard","values","matchFunc","matchesProperty","matches","propFunc","property","mergeWith","object","otherArgs","sources","merge","result","mergeWithDeep","target","stack","sourceKeys","getSymbols","isUnsafeProperty","sourceValue","targetValue","isArguments","cloneDeep","cloned","targetKeys","targetKey","merged","isObjectLike","isPlainObject","noop","_OwpEventEmitter","__publicField","eventName","fn","onceFn","args","OwpEventEmitter","_OwpUtils","mainArr","searchText","filtered","itemObj","isRecord","propArray","prop","arr","S4","item","array","text","config","defaultAuth","routes","applyAuth","route","parentAuth","auth","settings","newRoute","childRoute","configs","allRoutes","tree","idToFind","node","foundNode","hue","mainColors","randomColor","_a","colors","base","changes","_object","_base","isEqual","isObject","authArr","userRole","r","data","list","entry","children","OwpUtils"],"mappings":";;;;;;AAGA,SAASA,EAAMC,GAAK;AAChB,MAAIC,EAAYD,CAAG;AACf,WAAOA;AAEX,MAAI,MAAM,QAAQA,CAAG,KACjBE,EAAaF,CAAG,KAChBA,aAAe,eACd,OAAO,oBAAsB,OAAeA,aAAe;AAC5D,WAAOA,EAAI,MAAM,CAAC;AAEtB,QAAMG,IAAY,OAAO,eAAeH,CAAG,GACrCI,IAAcD,EAAU;AAC9B,MAAIH,aAAe,QAAQA,aAAe,OAAOA,aAAe;AAC5D,WAAO,IAAII,EAAYJ,CAAG;AAE9B,MAAIA,aAAe,QAAQ;AACvB,UAAMK,IAAY,IAAID,EA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A6B;AACzD,UAAIzG,IAAiB;AAOrB,UALIsB,EAAUmF,CAAK,MAEjBzG,IAAQ,EAAE,GAAGyG,EAAA,IAGXA,EAAM,YAAY,MAAM;AAE1B,cAAMC,IAAW,KAAK,gBAAgBD,EAAM,UAAUnF,CAAS;AAE/D,QAAIoF,MAAYA,KAAA,gBAAAA,EAAU,UAAS,MAGjC1G,IAAQ,EAAE,GAAGyG,GAAO,UAAAC,EAAA;AAAA,MAExB;AAGA,aAAI1G,KACFwG,EAAK,KAAKxG,CAAK,GAGVwG;AAAA,IACT,GAAG,CAAA,CAAE,IA1BL;AAAA,EA2BN;AACF;AA7VsB/F,EAAAmD,GAAA;AAAA;AAAA;AA6RpBN,EA7RWM,GA6RJ,gBAAeD;AA7RjB,IAAMgD,IAAN/C;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var a = Object.defineProperty;
|
|
2
2
|
var u = (e, n) => a(e, "name", { value: n, configurable: !0 });
|
|
3
|
-
import {
|
|
4
|
-
import { i as c } from "./treeGridUtil-
|
|
3
|
+
import { i, a as y, b as O } from "./isTypedArray-DGEiG32J.js";
|
|
4
|
+
import { i as c } from "./treeGridUtil-Ch99srur.js";
|
|
5
5
|
function E(e, n) {
|
|
6
6
|
const r = {};
|
|
7
7
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -39,4 +39,4 @@ export {
|
|
|
39
39
|
I as b,
|
|
40
40
|
G as t
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=commonCodeUtils-
|
|
42
|
+
//# sourceMappingURL=commonCodeUtils-Dt6TXOku.js.map
|