@owp/core 1.24.0 → 1.24.2

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.
Files changed (45) hide show
  1. package/dist/{OwpUtils-hi_nUgx5.js → OwpUtils-DgBOzRu6.js} +137 -137
  2. package/dist/OwpUtils-DgBOzRu6.js.map +1 -0
  3. package/dist/{QuickPanel-tv7rbuFl.js → QuickPanel-D8WlNSMK.js} +3 -3
  4. package/dist/{QuickPanel-tv7rbuFl.js.map → QuickPanel-D8WlNSMK.js.map} +1 -1
  5. package/dist/constants.js +19 -7
  6. package/dist/constants.js.map +1 -1
  7. package/dist/hooks.js +40 -39
  8. package/dist/hooks.js.map +1 -1
  9. package/dist/{index-BIbSyAVz.js → index-1U_Yytcf.js} +7828 -7824
  10. package/dist/index-1U_Yytcf.js.map +1 -0
  11. package/dist/index.js +116 -113
  12. package/dist/index.js.map +1 -1
  13. package/dist/language-CwsGUe4C.js +5 -0
  14. package/dist/language-CwsGUe4C.js.map +1 -0
  15. package/dist/treeGrid-4QKOKXZw.js +46 -0
  16. package/dist/treeGrid-4QKOKXZw.js.map +1 -0
  17. package/dist/treeGridUtil-CGze1rYA.js +1176 -0
  18. package/dist/treeGridUtil-CGze1rYA.js.map +1 -0
  19. package/dist/types/constants/excel.d.ts +12 -0
  20. package/dist/types/constants/index.d.ts +3 -0
  21. package/dist/types/constants/language.d.ts +1 -0
  22. package/dist/types/constants/treeGrid.d.ts +4 -0
  23. package/dist/types/hooks/useCurrentLanguage.d.ts +1 -1
  24. package/dist/types/index.d.ts +2 -0
  25. package/dist/types/utils/common/OwpUtils.d.ts +1 -1
  26. package/dist/types/utils/excelUtil.d.ts +2 -8
  27. package/dist/types/utils/index.d.ts +0 -2
  28. package/dist/types/utils/treeGridUtil.d.ts +2 -5
  29. package/dist/useTreeGridExcelExport-B_a3dFaL.js +2160 -0
  30. package/dist/useTreeGridExcelExport-B_a3dFaL.js.map +1 -0
  31. package/dist/utils.js +866 -892
  32. package/dist/utils.js.map +1 -1
  33. package/package.json +3 -2
  34. package/dist/OwpUtils-hi_nUgx5.js.map +0 -1
  35. package/dist/index-BIbSyAVz.js.map +0 -1
  36. package/dist/storageKeys-DRzte9LZ.js +0 -15
  37. package/dist/storageKeys-DRzte9LZ.js.map +0 -1
  38. package/dist/treeGridUtil-DwKt2i7A.js +0 -2952
  39. package/dist/treeGridUtil-DwKt2i7A.js.map +0 -1
  40. package/dist/useTreeGridExcelExport-CzEJeMqo.js +0 -415
  41. package/dist/useTreeGridExcelExport-CzEJeMqo.js.map +0 -1
  42. /package/dist/types/{utils/errors → components/ErrorBoundary}/ErrorBoundary.d.ts +0 -0
  43. /package/dist/types/{utils/errors → components/ErrorBoundary}/index.d.ts +0 -0
  44. /package/dist/types/{utils/events → components/EventEmitter}/EventEmitter.d.ts +0 -0
  45. /package/dist/types/{utils/events → components/EventEmitter}/index.d.ts +0 -0
@@ -2,7 +2,7 @@ var P = Object.defineProperty;
2
2
  var v = (e, n, t) => n in e ? P(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
3
  var u = (e, n) => P(e, "name", { value: n, configurable: !0 });
4
4
  var g = (e, n, t) => v(e, typeof n != "symbol" ? n + "" : n, t);
5
- import { w as N, e as D, ab as E, ac as G, ad as k, ae as _, af as C, ag as $, ah as z, ai as V, aj as U, t as X, ak as m, b as H, al as J, am as Q, c as Y, an as L, y as Z, ao as j, ap as T, g as x, k as ee } from "./treeGridUtil-DwKt2i7A.js";
5
+ import { q as F, e as D, Y as E, Z as G, _, $, a0 as C, a1 as z, a2 as k, a3 as V, a4 as U, t as X, a5 as m, b as Y, a6 as Z, a7 as H, c as J, a8 as L, u as Q, a9 as j, aa as T, d as x, g as ee } from "./treeGridUtil-CGze1rYA.js";
6
6
  import * as ne from "@mui/material/colors";
7
7
  var Ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8
8
  function Oe(e) {
@@ -13,17 +13,17 @@ function we(e) {
13
13
  if (e.__esModule) return e;
14
14
  var n = e.default;
15
15
  if (typeof n == "function") {
16
- var t = /* @__PURE__ */ u(function i() {
17
- return this instanceof i ? Reflect.construct(n, arguments, this.constructor) : n.apply(this, arguments);
16
+ var t = /* @__PURE__ */ u(function r() {
17
+ return this instanceof r ? Reflect.construct(n, arguments, this.constructor) : n.apply(this, arguments);
18
18
  }, "a");
19
19
  t.prototype = n.prototype;
20
20
  } else t = {};
21
- return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(i) {
22
- var f = Object.getOwnPropertyDescriptor(e, i);
23
- Object.defineProperty(t, i, f.get ? f : {
21
+ return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
22
+ var f = Object.getOwnPropertyDescriptor(e, r);
23
+ Object.defineProperty(t, r, f.get ? f : {
24
24
  enumerable: !0,
25
25
  get: /* @__PURE__ */ u(function() {
26
- return e[i];
26
+ return e[r];
27
27
  }, "get")
28
28
  });
29
29
  }), t;
@@ -33,93 +33,93 @@ function S(e) {
33
33
  return e;
34
34
  }
35
35
  u(S, "identity");
36
- function q(e) {
36
+ function N(e) {
37
37
  return function(n) {
38
- return N(n, e);
38
+ return F(n, e);
39
39
  };
40
40
  }
41
- u(q, "property");
41
+ u(N, "property");
42
42
  function A(e) {
43
43
  return e !== null && (typeof e == "object" || typeof e == "function");
44
44
  }
45
45
  u(A, "isObject");
46
46
  function te(e, n, t) {
47
- return typeof t != "function" ? I(e, n) : O(e, n, /* @__PURE__ */ u(function i(f, r, s, l, a, o) {
48
- const c = t(f, r, s, l, a, o);
49
- return c !== void 0 ? !!c : O(f, r, i, o);
47
+ return typeof t != "function" ? I(e, n) : O(e, n, /* @__PURE__ */ u(function r(f, i, s, l, a, o) {
48
+ const c = t(f, i, s, l, a, o);
49
+ return c !== void 0 ? !!c : O(f, i, r, o);
50
50
  }, "doesMatch"), /* @__PURE__ */ new Map());
51
51
  }
52
52
  u(te, "isMatchWith");
53
- function O(e, n, t, i) {
53
+ function O(e, n, t, r) {
54
54
  if (n === e)
55
55
  return !0;
56
56
  switch (typeof n) {
57
57
  case "object":
58
- return ie(e, n, t, i);
58
+ return re(e, n, t, r);
59
59
  case "function":
60
- return Object.keys(n).length > 0 ? O(e, { ...n }, t, i) : D(e, n);
60
+ return Object.keys(n).length > 0 ? O(e, { ...n }, t, r) : D(e, n);
61
61
  default:
62
62
  return A(e) ? typeof n == "string" ? n === "" : !0 : D(e, n);
63
63
  }
64
64
  }
65
65
  u(O, "isMatchWithInternal");
66
- function ie(e, n, t, i) {
66
+ function re(e, n, t, r) {
67
67
  if (n == null)
68
68
  return !0;
69
69
  if (Array.isArray(n))
70
- return K(e, n, t, i);
70
+ return K(e, n, t, r);
71
71
  if (n instanceof Map)
72
- return re(e, n, t, i);
72
+ return ie(e, n, t, r);
73
73
  if (n instanceof Set)
74
- return fe(e, n, t, i);
74
+ return fe(e, n, t, r);
75
75
  const f = Object.keys(n);
76
76
  if (e == null)
77
77
  return f.length === 0;
78
78
  if (f.length === 0)
79
79
  return !0;
80
- if (i && i.has(n))
81
- return i.get(n) === e;
82
- i && i.set(n, e);
80
+ if (r && r.has(n))
81
+ return r.get(n) === e;
82
+ r && r.set(n, e);
83
83
  try {
84
- for (let r = 0; r < f.length; r++) {
85
- const s = f[r];
86
- if (!E(e) && !(s in e) || n[s] === void 0 && e[s] !== void 0 || n[s] === null && e[s] !== null || !t(e[s], n[s], s, e, n, i))
84
+ for (let i = 0; i < f.length; i++) {
85
+ const s = f[i];
86
+ if (!E(e) && !(s in e) || n[s] === void 0 && e[s] !== void 0 || n[s] === null && e[s] !== null || !t(e[s], n[s], s, e, n, r))
87
87
  return !1;
88
88
  }
89
89
  return !0;
90
90
  } finally {
91
- i && i.delete(n);
91
+ r && r.delete(n);
92
92
  }
93
93
  }
94
- u(ie, "isObjectMatch");
95
- function re(e, n, t, i) {
94
+ u(re, "isObjectMatch");
95
+ function ie(e, n, t, r) {
96
96
  if (n.size === 0)
97
97
  return !0;
98
98
  if (!(e instanceof Map))
99
99
  return !1;
100
- for (const [f, r] of n.entries()) {
100
+ for (const [f, i] of n.entries()) {
101
101
  const s = e.get(f);
102
- if (t(s, r, f, e, n, i) === !1)
102
+ if (t(s, i, f, e, n, r) === !1)
103
103
  return !1;
104
104
  }
105
105
  return !0;
106
106
  }
107
- u(re, "isMapMatch");
108
- function K(e, n, t, i) {
107
+ u(ie, "isMapMatch");
108
+ function K(e, n, t, r) {
109
109
  if (n.length === 0)
110
110
  return !0;
111
111
  if (!Array.isArray(e))
112
112
  return !1;
113
113
  const f = /* @__PURE__ */ new Set();
114
- for (let r = 0; r < n.length; r++) {
115
- const s = n[r];
114
+ for (let i = 0; i < n.length; i++) {
115
+ const s = n[i];
116
116
  let l = !1;
117
117
  for (let a = 0; a < e.length; a++) {
118
118
  if (f.has(a))
119
119
  continue;
120
120
  const o = e[a];
121
121
  let c = !1;
122
- if (t(o, s, r, e, n, i) && (c = !0), c) {
122
+ if (t(o, s, i, e, n, r) && (c = !0), c) {
123
123
  f.add(a), l = !0;
124
124
  break;
125
125
  }
@@ -130,8 +130,8 @@ function K(e, n, t, i) {
130
130
  return !0;
131
131
  }
132
132
  u(K, "isArrayMatch");
133
- function fe(e, n, t, i) {
134
- return n.size === 0 ? !0 : e instanceof Set ? K([...e], [...n], t, i) : !1;
133
+ function fe(e, n, t, r) {
134
+ return n.size === 0 ? !0 : e instanceof Set ? K([...e], [...n], t, r) : !1;
135
135
  }
136
136
  u(fe, "isSetMatch");
137
137
  function I(e, n) {
@@ -144,16 +144,16 @@ function R(e) {
144
144
  }
145
145
  u(R, "matches");
146
146
  function se(e, n) {
147
- return k(e, (t, i, f, r) => {
147
+ return _(e, (t, r, f, i) => {
148
148
  if (typeof e == "object")
149
149
  switch (Object.prototype.toString.call(e)) {
150
150
  case V:
151
- case z:
152
- case $: {
151
+ case k:
152
+ case z: {
153
153
  const s = new e.constructor(e == null ? void 0 : e.valueOf());
154
154
  return C(s, e), s;
155
155
  }
156
- case _: {
156
+ case $: {
157
157
  const s = {};
158
158
  return C(s, e), s.length = e.length, s[Symbol.iterator] = e[Symbol.iterator], s;
159
159
  }
@@ -183,12 +183,12 @@ function ae(e, n) {
183
183
  let t;
184
184
  if (Array.isArray(n) ? t = n : typeof n == "string" && U(n) && (e == null ? void 0 : e[n]) == null ? t = X(n) : t = [n], t.length === 0)
185
185
  return !1;
186
- let i = e;
186
+ let r = e;
187
187
  for (let f = 0; f < t.length; f++) {
188
- const r = t[f];
189
- if ((i == null || !Object.hasOwn(i, r)) && !((Array.isArray(i) || m(i)) && ue(r) && r < i.length))
188
+ const i = t[f];
189
+ if ((r == null || !Object.hasOwn(r, i)) && !((Array.isArray(r) || m(r)) && ue(i) && i < r.length))
190
190
  return !1;
191
- i = i[r];
191
+ r = r[i];
192
192
  }
193
193
  return !0;
194
194
  }
@@ -200,13 +200,13 @@ function W(e, n) {
200
200
  break;
201
201
  }
202
202
  case "number": {
203
- e = H(e);
203
+ e = Y(e);
204
204
  break;
205
205
  }
206
206
  }
207
207
  return n = w(n), function(t) {
208
- const i = N(t, e);
209
- return i === void 0 ? ae(t, e) : n === void 0 ? i === void 0 : I(i, n);
208
+ const r = F(t, e);
209
+ return r === void 0 ? ae(t, e) : n === void 0 ? r === void 0 : I(r, n);
210
210
  };
211
211
  }
212
212
  u(W, "matchesProperty");
@@ -221,7 +221,7 @@ function oe(e) {
221
221
  case "string":
222
222
  case "symbol":
223
223
  case "number":
224
- return q(e);
224
+ return N(e);
225
225
  }
226
226
  }
227
227
  u(oe, "iteratee");
@@ -229,30 +229,30 @@ function ce(e, n = S, t = 0) {
229
229
  if (!e)
230
230
  return;
231
231
  t < 0 && (t = Math.max(e.length + t, 0));
232
- const i = oe(n);
233
- if (typeof i == "function" && !Array.isArray(e)) {
234
- const r = Object.keys(e);
235
- for (let s = t; s < r.length; s++) {
236
- const l = r[s], a = e[l];
237
- if (i(a, l, e))
232
+ const r = oe(n);
233
+ if (typeof r == "function" && !Array.isArray(e)) {
234
+ const i = Object.keys(e);
235
+ for (let s = t; s < i.length; s++) {
236
+ const l = i[s], a = e[l];
237
+ if (r(a, l, e))
238
238
  return a;
239
239
  }
240
240
  return;
241
241
  }
242
- return (Array.isArray(e) ? e.slice(t) : Object.values(e).slice(t)).find(i);
242
+ return (Array.isArray(e) ? e.slice(t) : Object.values(e).slice(t)).find(r);
243
243
  }
244
244
  u(ce, "find");
245
245
  function ye(e, n, t) {
246
246
  if (!e)
247
247
  return !1;
248
248
  n || (n = S);
249
- const i = Array.isArray(e) ? e : Object.values(e);
249
+ const r = Array.isArray(e) ? e : Object.values(e);
250
250
  switch (typeof n) {
251
251
  case "function": {
252
252
  if (!Array.isArray(e)) {
253
253
  const f = Object.keys(e);
254
- for (let r = 0; r < f.length; r++) {
255
- const s = f[r], l = e[s];
254
+ for (let i = 0; i < f.length; i++) {
255
+ const s = f[i], l = e[s];
256
256
  if (n(l, s, e))
257
257
  return !0;
258
258
  }
@@ -265,35 +265,35 @@ function ye(e, n, t) {
265
265
  }
266
266
  case "object":
267
267
  if (Array.isArray(n) && n.length === 2) {
268
- const f = n[0], r = n[1], s = W(f, r);
268
+ const f = n[0], i = n[1], s = W(f, i);
269
269
  if (Array.isArray(e)) {
270
270
  for (let l = 0; l < e.length; l++)
271
271
  if (s(e[l]))
272
272
  return !0;
273
273
  return !1;
274
274
  }
275
- return i.some(s);
275
+ return r.some(s);
276
276
  } else {
277
277
  const f = R(n);
278
278
  if (Array.isArray(e)) {
279
- for (let r = 0; r < e.length; r++)
280
- if (f(e[r]))
279
+ for (let i = 0; i < e.length; i++)
280
+ if (f(e[i]))
281
281
  return !0;
282
282
  return !1;
283
283
  }
284
- return i.some(f);
284
+ return r.some(f);
285
285
  }
286
286
  case "number":
287
287
  case "symbol":
288
288
  case "string": {
289
- const f = q(n);
289
+ const f = N(n);
290
290
  if (Array.isArray(e)) {
291
- for (let r = 0; r < e.length; r++)
292
- if (f(e[r]))
291
+ for (let i = 0; i < e.length; i++)
292
+ if (f(e[i]))
293
293
  return !0;
294
294
  return !1;
295
295
  }
296
- return i.some(f);
296
+ return r.some(f);
297
297
  }
298
298
  }
299
299
  }
@@ -301,54 +301,54 @@ u(ye, "some");
301
301
  function de(e) {
302
302
  if (E(e))
303
303
  return e;
304
- if (Array.isArray(e) || J(e) || e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer)
304
+ if (Array.isArray(e) || Z(e) || e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer)
305
305
  return e.slice(0);
306
306
  const n = Object.getPrototypeOf(e), t = n.constructor;
307
307
  if (e instanceof Date || e instanceof Map || e instanceof Set)
308
308
  return new t(e);
309
309
  if (e instanceof RegExp) {
310
- const i = new t(e);
311
- return i.lastIndex = e.lastIndex, i;
310
+ const r = new t(e);
311
+ return r.lastIndex = e.lastIndex, r;
312
312
  }
313
313
  if (e instanceof DataView)
314
314
  return new t(e.buffer.slice(0));
315
315
  if (e instanceof Error) {
316
- const i = new t(e.message);
317
- return i.stack = e.stack, i.name = e.name, i.cause = e.cause, i;
316
+ const r = new t(e.message);
317
+ return r.stack = e.stack, r.name = e.name, r.cause = e.cause, r;
318
318
  }
319
319
  if (typeof File < "u" && e instanceof File)
320
320
  return new t([e], e.name, { type: e.type, lastModified: e.lastModified });
321
321
  if (typeof e == "object") {
322
- const i = Object.create(n);
323
- return Object.assign(i, e);
322
+ const r = Object.create(n);
323
+ return Object.assign(r, e);
324
324
  }
325
325
  return e;
326
326
  }
327
327
  u(de, "clone");
328
328
  function he(e, ...n) {
329
- const t = n.slice(0, -1), i = n[n.length - 1];
329
+ const t = n.slice(0, -1), r = n[n.length - 1];
330
330
  let f = e;
331
- for (let r = 0; r < t.length; r++) {
332
- const s = t[r];
333
- f = y(f, s, i, /* @__PURE__ */ new Map());
331
+ for (let i = 0; i < t.length; i++) {
332
+ const s = t[i];
333
+ f = y(f, s, r, /* @__PURE__ */ new Map());
334
334
  }
335
335
  return f;
336
336
  }
337
337
  u(he, "mergeWith");
338
- function y(e, n, t, i) {
338
+ function y(e, n, t, r) {
339
339
  if (E(e) && (e = Object(e)), n == null || typeof n != "object")
340
340
  return e;
341
- if (i.has(n))
342
- return de(i.get(n));
343
- if (i.set(n, e), Array.isArray(n)) {
341
+ if (r.has(n))
342
+ return de(r.get(n));
343
+ if (r.set(n, e), Array.isArray(n)) {
344
344
  n = n.slice();
345
- for (let r = 0; r < n.length; r++)
346
- n[r] = n[r] ?? void 0;
345
+ for (let i = 0; i < n.length; i++)
346
+ n[i] = n[i] ?? void 0;
347
347
  }
348
- const f = [...Object.keys(n), ...Q(n)];
349
- for (let r = 0; r < f.length; r++) {
350
- const s = f[r];
351
- if (Y(s))
348
+ const f = [...Object.keys(n), ...H(n)];
349
+ for (let i = 0; i < f.length; i++) {
350
+ const s = f[i];
351
+ if (J(s))
352
352
  continue;
353
353
  let l = n[s], a = e[s];
354
354
  if (m(l) && (l = { ...l }), m(a) && (a = { ...a }), typeof Buffer < "u" && Buffer.isBuffer(l) && (l = w(l)), Array.isArray(l))
@@ -361,8 +361,8 @@ function y(e, n, t, i) {
361
361
  a = c;
362
362
  } else
363
363
  a = [];
364
- const o = t(a, l, s, e, n, i);
365
- o !== void 0 ? e[s] = o : Array.isArray(l) || L(a) && L(l) ? e[s] = y(a, l, t, i) : a == null && Z(l) ? e[s] = y({}, l, t, i) : a == null && j(l) ? e[s] = w(l) : (a === void 0 || l !== void 0) && (e[s] = l);
364
+ const o = t(a, l, s, e, n, r);
365
+ o !== void 0 ? e[s] = o : Array.isArray(l) || L(a) && L(l) ? e[s] = y(a, l, t, r) : a == null && Q(l) ? e[s] = y({}, l, t, r) : a == null && j(l) ? e[s] = w(l) : (a === void 0 || l !== void 0) && (e[s] = l);
366
366
  }
367
367
  return e;
368
368
  }
@@ -404,18 +404,18 @@ const b = class b {
404
404
  *
405
405
  */
406
406
  once(n, t) {
407
- const i = /* @__PURE__ */ u((...f) => {
408
- this.removeListener(n, i), t.apply(this, f);
407
+ const r = /* @__PURE__ */ u((...f) => {
408
+ this.removeListener(n, r), t.apply(this, f);
409
409
  }, "onceFn");
410
- this.on(n, i);
410
+ this.on(n, r);
411
411
  }
412
412
  /**
413
413
  * The emit method triggers all registered callback functions for a given event name.
414
414
  *
415
415
  */
416
416
  emit(n, ...t) {
417
- this._getEventListByName(n).forEach((i) => {
418
- i.apply(this, t);
417
+ this._getEventListByName(n).forEach((r) => {
418
+ r.apply(this, t);
419
419
  });
420
420
  }
421
421
  /**
@@ -438,11 +438,11 @@ const d = class d {
438
438
  if (!t || (t == null ? void 0 : t.length) === 0 || !t)
439
439
  return n;
440
440
  t = t == null ? void 0 : t.toLowerCase();
441
- const i = n.filter((f) => this.searchInObj(f, t));
442
- return i.length === n.length ? n : i;
441
+ const r = n.filter((f) => this.searchInObj(f, t));
442
+ return r.length === n.length ? n : r;
443
443
  }
444
444
  static filterArrayByString2(n, t) {
445
- return typeof t != "string" || t === "" ? n : (t = t == null ? void 0 : t.toLowerCase(), n.filter((i) => this.searchInObj(i, t)));
445
+ return typeof t != "string" || t === "" ? n : (t = t == null ? void 0 : t.toLowerCase(), n.filter((r) => this.searchInObj(r, t)));
446
446
  }
447
447
  /**
448
448
  * The searchInObj function searches an object for a given search string.
@@ -452,13 +452,13 @@ const d = class d {
452
452
  static searchInObj(n, t) {
453
453
  if (!f(n))
454
454
  return !1;
455
- const i = Object.keys(n);
456
- function f(r) {
457
- return !!(r && typeof r == "object" && !Array.isArray(r) && typeof r != "function");
455
+ const r = Object.keys(n);
456
+ function f(i) {
457
+ return !!(i && typeof i == "object" && !Array.isArray(i) && typeof i != "function");
458
458
  }
459
459
  u(f, "isRecord");
460
- for (let r = 0; r < i.length; r += 1) {
461
- const s = i[r], l = n[s];
460
+ for (let i = 0; i < r.length; i += 1) {
461
+ const s = r[i], l = n[s];
462
462
  if (typeof l == "string") {
463
463
  if (this.searchInString(l, t))
464
464
  return !0;
@@ -475,7 +475,7 @@ const d = class d {
475
475
  *
476
476
  */
477
477
  static searchInArray(n, t) {
478
- return n.forEach((i) => !!(typeof i == "string" && this.searchInString(i, t) || i && typeof i == "object" && this.searchInObj(i, t))), !1;
478
+ return n.forEach((r) => !!(typeof r == "string" && this.searchInString(r, t) || r && typeof r == "object" && this.searchInObj(r, t))), !1;
479
479
  }
480
480
  /**
481
481
  * The searchInString function searches a string for a given search string.
@@ -512,20 +512,20 @@ const d = class d {
512
512
  * The setRoutes function sets the routes for the Owp project.
513
513
  */
514
514
  static setRoutes(n, t = void 0) {
515
- let i = [];
516
- n != null && n.routes && (i = [...n.routes]);
517
- const f = /* @__PURE__ */ u((r, s) => {
518
- const l = r.auth || r.auth === null ? r.auth : s, a = pe({}, n.settings, r.settings), o = {
519
- ...r,
515
+ let r = [];
516
+ n != null && n.routes && (r = [...n.routes]);
517
+ const f = /* @__PURE__ */ u((i, s) => {
518
+ const l = i.auth || i.auth === null ? i.auth : s, a = pe({}, n.settings, i.settings), o = {
519
+ ...i,
520
520
  settings: a,
521
521
  auth: l
522
522
  };
523
- return r.children && (o.children = r.children.map((c) => f(c, l))), o;
523
+ return i.children && (o.children = i.children.map((c) => f(c, l))), o;
524
524
  }, "applyAuth");
525
- return i = i.map((r) => {
525
+ return r = r.map((i) => {
526
526
  const s = n.auth || n.auth === null ? n.auth : t || null;
527
- return f(r, s);
528
- }), [...i];
527
+ return f(i, s);
528
+ }), [...r];
529
529
  }
530
530
  /**
531
531
  * The generateRoutesFromConfigs function generates routes from a set of route configurations.
@@ -533,20 +533,20 @@ const d = class d {
533
533
  *
534
534
  */
535
535
  static generateRoutesFromConfigs(n, t) {
536
- let i = [];
536
+ let r = [];
537
537
  return n.forEach((f) => {
538
- i = [...i, ...this.setRoutes(f, t)];
539
- }), i;
538
+ r = [...r, ...this.setRoutes(f, t)];
539
+ }), r;
540
540
  }
541
541
  /**
542
542
  * The findById function finds an object by its id.
543
543
  */
544
544
  static findById(n, t) {
545
- const i = ce(n, { id: t });
546
- if (i)
547
- return i;
545
+ const r = ce(n, { id: t });
546
+ if (r)
547
+ return r;
548
548
  let f;
549
- return ye(n, (r) => r.children ? (f = this.findById(r.children, t), f) : !1), f;
549
+ return ye(n, (i) => i.children ? (f = this.findById(i.children, t), f) : !1), f;
550
550
  }
551
551
  /**
552
552
  * The randomMatColor function generates a random material color.
@@ -570,37 +570,37 @@ const d = class d {
570
570
  "amber",
571
571
  "orange",
572
572
  "deepOrange"
573
- ], i = t[Math.floor(Math.random() * t.length)];
574
- return (f = ne[i]) == null ? void 0 : f[n];
573
+ ], r = t[Math.floor(Math.random() * t.length)];
574
+ return (f = ne[r]) == null ? void 0 : f[n];
575
575
  }
576
576
  /**
577
577
  * The findNavItemById function finds a navigation item by its id.
578
578
  */
579
579
  static difference(n, t) {
580
- function i(f, r) {
581
- return f == null ? void 0 : f.reduce((s, l, a) => (ee(l, r[a]) || (s[a] = A(l) && A(r[a]) ? i(l, r[a]) : l), s), {});
580
+ function r(f, i) {
581
+ return f == null ? void 0 : f.reduce((s, l, a) => (ee(l, i[a]) || (s[a] = A(l) && A(i[a]) ? r(l, i[a]) : l), s), {});
582
582
  }
583
- return u(i, "changes"), i(n, t);
583
+ return u(r, "changes"), r(n, t);
584
584
  }
585
585
  /**
586
586
  * The hasPermission function checks if a user has permission to access a resource.
587
587
  */
588
588
  // @ts-expect-error
589
589
  static hasPermission(n, t) {
590
- var i;
591
- return n == null ? !0 : Array.isArray(n) && (n == null ? void 0 : n.length) === 0 ? !t || t.length === 0 : t && Array.isArray(n) && Array.isArray(t) ? n.some((f) => t.indexOf(f) >= 0) : typeof t == "string" && Array.isArray(n) ? (i = n == null ? void 0 : n.includes) == null ? void 0 : i.call(n, t) : !1;
590
+ var r;
591
+ return n == null ? !0 : Array.isArray(n) && (n == null ? void 0 : n.length) === 0 ? !t || t.length === 0 : t && Array.isArray(n) && Array.isArray(t) ? n.some((f) => t.indexOf(f) >= 0) : typeof t == "string" && Array.isArray(n) ? (r = n == null ? void 0 : n.includes) == null ? void 0 : r.call(n, t) : !1;
592
592
  }
593
593
  /**
594
594
  * The filterArrayByString function filters an array of objects by a search string.
595
595
  */
596
596
  static filterRecursive(n, t) {
597
- return n ? n.reduce((i, f) => {
598
- let r = null;
599
- if (t(f) && (r = { ...f }), f.children != null) {
597
+ return n ? n.reduce((r, f) => {
598
+ let i = null;
599
+ if (t(f) && (i = { ...f }), f.children != null) {
600
600
  const s = this.filterRecursive(f.children, t);
601
- s && (s == null ? void 0 : s.length) > 0 && (r = { ...f, children: s });
601
+ s && (s == null ? void 0 : s.length) > 0 && (i = { ...f, children: s });
602
602
  }
603
- return r && i.push(r), i;
603
+ return i && r.push(i), r;
604
604
  }, []) : null;
605
605
  }
606
606
  };
@@ -609,10 +609,10 @@ u(d, "OwpUtils"), /**
609
609
  * It provides methods for registering and emitting events.
610
610
  */
611
611
  g(d, "EventEmitter", M);
612
- let F = d;
612
+ let q = d;
613
613
  export {
614
614
  M as E,
615
- F as O,
615
+ q as O,
616
616
  ue as a,
617
617
  Oe as b,
618
618
  Ae as c,
@@ -625,4 +625,4 @@ export {
625
625
  pe as m,
626
626
  Ee as t
627
627
  };
628
- //# sourceMappingURL=OwpUtils-hi_nUgx5.js.map
628
+ //# sourceMappingURL=OwpUtils-DgBOzRu6.js.map