@owp/core 1.25.0 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/colors.d.ts +1 -0
  2. package/colors.js +1 -0
  3. package/context.d.ts +1 -0
  4. package/context.js +1 -0
  5. package/dist/Close-DA97hwNx.js +914 -0
  6. package/dist/Close-DA97hwNx.js.map +1 -0
  7. package/dist/OwpStoreProvider-BKRp9Maw.js +34 -0
  8. package/dist/OwpStoreProvider-BKRp9Maw.js.map +1 -0
  9. package/dist/OwpUtils-9lHSCdan.js +611 -0
  10. package/dist/OwpUtils-9lHSCdan.js.map +1 -0
  11. package/dist/{QuickPanel-uWtPXsYC.js → QuickPanel-EyvjMTxX.js} +3 -3
  12. package/dist/{QuickPanel-uWtPXsYC.js.map → QuickPanel-EyvjMTxX.js.map} +1 -1
  13. package/dist/colors.js +38 -0
  14. package/dist/colors.js.map +1 -0
  15. package/dist/constants.js +9 -8
  16. package/dist/constants.js.map +1 -1
  17. package/dist/context.js +72 -0
  18. package/dist/context.js.map +1 -0
  19. package/dist/emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js +1751 -0
  20. package/dist/emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js.map +1 -0
  21. package/dist/hooks.js +76 -33
  22. package/dist/hooks.js.map +1 -1
  23. package/dist/{index-DvBno1rF.js → index-CdxKoZlQ.js} +19773 -23892
  24. package/dist/index-CdxKoZlQ.js.map +1 -0
  25. package/dist/index.js +120 -234
  26. package/dist/index.js.map +1 -1
  27. package/dist/isTypedArray-xp-fB7W4.js +411 -0
  28. package/dist/isTypedArray-xp-fB7W4.js.map +1 -0
  29. package/dist/lazyLoadedSlices-Bjy1crVY.js +2794 -0
  30. package/dist/lazyLoadedSlices-Bjy1crVY.js.map +1 -0
  31. package/dist/owp-app.css +1 -1
  32. package/dist/storageKeys-DRzte9LZ.js +15 -0
  33. package/dist/storageKeys-DRzte9LZ.js.map +1 -0
  34. package/dist/store.js +7 -0
  35. package/dist/store.js.map +1 -0
  36. package/dist/toUpper-CilZrxEa.js +16 -0
  37. package/dist/toUpper-CilZrxEa.js.map +1 -0
  38. package/dist/treeGrid-CjB04cBq.js +35 -0
  39. package/dist/treeGrid-CjB04cBq.js.map +1 -0
  40. package/dist/treeGridUtil-_FDvRzzt.js +771 -0
  41. package/dist/treeGridUtil-_FDvRzzt.js.map +1 -0
  42. package/dist/types/colors/index.d.ts +2 -0
  43. package/dist/types/components/OwpAutoLogoutDialog/index.d.ts +1 -0
  44. package/dist/types/components/OwpBarcodeInput/OwpBarcodeInput.d.ts +1 -0
  45. package/dist/types/components/OwpBarcodeInput/index.d.ts +1 -0
  46. package/dist/types/components/OwpCommonDialog/OwpCommonDialog.d.ts +26 -0
  47. package/dist/types/components/OwpCommonDialog/index.d.ts +1 -26
  48. package/dist/types/components/OwpErrorBoundary/OwpErrorBoundary.d.ts +16 -0
  49. package/dist/types/components/OwpErrorBoundary/index.d.ts +1 -0
  50. package/dist/types/components/OwpEventEmitter/OwpEventEmitter.d.ts +27 -0
  51. package/dist/types/components/OwpEventEmitter/index.d.ts +1 -0
  52. package/dist/types/components/OwpExportExcelButton/index.d.ts +1 -0
  53. package/dist/types/components/OwpFileUploadButton/index.d.ts +1 -0
  54. package/dist/types/components/OwpMrtTable/OwpMrtTable.d.ts +9 -0
  55. package/dist/types/components/OwpMrtTable/index.d.ts +1 -9
  56. package/dist/types/components/OwpNumberField/OwpNumberField.d.ts +12 -0
  57. package/dist/types/components/OwpNumberField/index.d.ts +1 -12
  58. package/dist/types/components/OwpOptionSelector/OwpOptionSelector.d.ts +22 -0
  59. package/dist/types/components/OwpOptionSelector/index.d.ts +1 -22
  60. package/dist/types/components/OwpPageContent/OwpPageContent.d.ts +17 -0
  61. package/dist/types/components/OwpPageContent/index.d.ts +1 -17
  62. package/dist/types/components/OwpPageLockLoading/OwpPageLockLoading.d.ts +11 -0
  63. package/dist/types/components/OwpPageLockLoading/index.d.ts +1 -11
  64. package/dist/types/components/OwpPageTitle/OwpPageTitle.d.ts +15 -0
  65. package/dist/types/components/OwpPageTitle/index.d.ts +1 -15
  66. package/dist/types/components/OwpPicker/index.d.ts +5 -0
  67. package/dist/types/components/OwpSearchFilter/OwpSearchFilter.d.ts +17 -0
  68. package/dist/types/components/OwpSearchFilter/index.d.ts +1 -17
  69. package/dist/types/components/OwpSection/OwpSection.d.ts +24 -0
  70. package/dist/types/components/OwpSection/index.d.ts +1 -24
  71. package/dist/types/components/OwpStyleProvider/OwpStyleProvider.d.ts +18 -0
  72. package/dist/types/components/OwpStyleProvider/index.d.ts +2 -0
  73. package/dist/types/components/OwpTable/index.d.ts +3 -0
  74. package/dist/types/components/OwpTextField/index.d.ts +1 -0
  75. package/dist/types/components/OwpTreeGridExcelButton/OwpTreeGridExcelButton.d.ts +12 -0
  76. package/dist/types/components/OwpTreeGridExcelButton/index.d.ts +1 -12
  77. package/dist/types/components/OwpYesNoSelector/OwpYesNoSelector.d.ts +16 -0
  78. package/dist/types/components/OwpYesNoSelector/index.d.ts +1 -16
  79. package/dist/types/components/OwpZoomImageSlider/index.d.ts +1 -0
  80. package/dist/types/components/shared-components/tabs/OwpTab.d.ts +1 -1
  81. package/dist/types/components/shared-components/tabs/OwpTabs.d.ts +1 -1
  82. package/dist/types/context/OwpAppProvider.d.ts +5 -3
  83. package/dist/types/context/OwpCoreProvider.d.ts +21 -0
  84. package/dist/types/context/OwpUiProvider.d.ts +17 -0
  85. package/dist/types/context/index.d.ts +3 -0
  86. package/dist/types/hooks/useCommonCodeList.d.ts +4 -4
  87. package/dist/types/hooks/useNavigation.d.ts +4 -4
  88. package/dist/types/index.d.ts +3 -16
  89. package/dist/types/store/OwpStoreProvider.d.ts +12 -0
  90. package/dist/types/store/index.d.ts +3 -0
  91. package/dist/types/utils/common/OwpUtils.d.ts +3 -4
  92. package/dist/types/utils/getTrimmedValue.d.ts +5 -0
  93. package/dist/types/utils/index.d.ts +1 -0
  94. package/dist/useOwpTranslation-VarZsCQ4.js +233 -0
  95. package/dist/useOwpTranslation-VarZsCQ4.js.map +1 -0
  96. package/dist/useTreeGridExcelExport-BGh2y8Cg.js +195 -0
  97. package/dist/useTreeGridExcelExport-BGh2y8Cg.js.map +1 -0
  98. package/dist/utils.js +6939 -64
  99. package/dist/utils.js.map +1 -1
  100. package/package.json +7 -1
  101. package/store.d.ts +1 -0
  102. package/store.js +1 -0
  103. package/dist/index-DvBno1rF.js.map +0 -1
  104. package/dist/treeGrid-CPgV7yMG.js +0 -46
  105. package/dist/treeGrid-CPgV7yMG.js.map +0 -1
  106. package/dist/treeGridUtil-mbjQrrTs.js +0 -1176
  107. package/dist/treeGridUtil-mbjQrrTs.js.map +0 -1
  108. package/dist/types/components/ErrorBoundary/ErrorBoundary.d.ts +0 -16
  109. package/dist/types/components/ErrorBoundary/index.d.ts +0 -1
  110. package/dist/types/components/EventEmitter/EventEmitter.d.ts +0 -34
  111. package/dist/types/components/EventEmitter/index.d.ts +0 -1
  112. package/dist/types/components/OwpButtonDelete/index.d.ts +0 -12
  113. package/dist/types/components/OwpButtonSave/index.d.ts +0 -12
  114. package/dist/types/components/OwpPageSimple/OwpPageSimple.d.ts +0 -55
  115. package/dist/types/components/OwpPageSimple/OwpPageSimpleHeader.d.ts +0 -14
  116. package/dist/types/components/OwpPageSimple/OwpPageSimpleSidebar.d.ts +0 -19
  117. package/dist/types/components/OwpPageSimple/OwpPageSimpleSidebarContent.d.ts +0 -13
  118. package/dist/types/components/OwpPageSimple/index.d.ts +0 -1
  119. package/dist/types/components/OwpTreeView/OwpSlotTreeView.d.ts +0 -27
  120. package/dist/types/components/layouts/index.d.ts +0 -8
  121. package/dist/types/components/layouts/layout1/components/RightSideLayout1.d.ts +0 -6
  122. package/dist/types/components/layouts/shared-components/DemoLayoutFooterContent.d.ts +0 -5
  123. package/dist/types/components/layouts/shared-components/DocumentationButton.d.ts +0 -8
  124. package/dist/types/components/layouts/shared-components/PoweredByLinks.d.ts +0 -5
  125. package/dist/types/components/layouts/shared-components/PurchaseButton.d.ts +0 -8
  126. package/dist/types/components/layouts/shared-components/UserNavbarHeader.d.ts +0 -5
  127. package/dist/types/components/withRouterAndRef/index.d.ts +0 -1
  128. package/dist/types/components/withRouterAndRef/withRouterAndRef.d.ts +0 -14
  129. package/dist/useTreeGridExcelExport-BPWeY2Oq.js +0 -2201
  130. package/dist/useTreeGridExcelExport-BPWeY2Oq.js.map +0 -1
  131. package/dist/zipUtil-Dmq4Gna2.js +0 -7505
  132. package/dist/zipUtil-Dmq4Gna2.js.map +0 -1
@@ -0,0 +1,611 @@
1
+ var P = Object.defineProperty;
2
+ var W = (e, n, t) => n in e ? P(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var u = (e, n) => P(e, "name", { value: n, configurable: !0 });
4
+ var p = (e, n, t) => W(e, typeof n != "symbol" ? n + "" : n, t);
5
+ import * as G from "@mui/material/colors";
6
+ import { m as E, n as _, h as F, o as D, j as $, p as k, q as z, r as L, s as V, u as X, v as H, e as J, t as Q, l as m, g as U, w as Y, f as Z, c as q, a as j, k as T, x, b as ee } from "./isTypedArray-xp-fB7W4.js";
7
+ var me = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8
+ function Ae(e) {
9
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
10
+ }
11
+ u(Ae, "getDefaultExportFromCjs");
12
+ function Oe(e) {
13
+ if (e.__esModule) return e;
14
+ var n = e.default;
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);
18
+ }, "a");
19
+ t.prototype = n.prototype;
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 : {
24
+ enumerable: !0,
25
+ get: /* @__PURE__ */ u(function() {
26
+ return e[i];
27
+ }, "get")
28
+ });
29
+ }), t;
30
+ }
31
+ u(Oe, "getAugmentedNamespace");
32
+ function S(e) {
33
+ return e;
34
+ }
35
+ u(S, "identity");
36
+ function ne(e) {
37
+ if (E(e))
38
+ return e;
39
+ if (Array.isArray(e) || _(e) || e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer)
40
+ return e.slice(0);
41
+ const n = Object.getPrototypeOf(e), t = n.constructor;
42
+ if (e instanceof Date || e instanceof Map || e instanceof Set)
43
+ return new t(e);
44
+ if (e instanceof RegExp) {
45
+ const i = new t(e);
46
+ return i.lastIndex = e.lastIndex, i;
47
+ }
48
+ if (e instanceof DataView)
49
+ return new t(e.buffer.slice(0));
50
+ if (e instanceof Error) {
51
+ const i = new t(e.message);
52
+ return i.stack = e.stack, i.name = e.name, i.cause = e.cause, i;
53
+ }
54
+ if (typeof File < "u" && e instanceof File)
55
+ return new t([e], e.name, { type: e.type, lastModified: e.lastModified });
56
+ if (typeof e == "object") {
57
+ const i = Object.create(n);
58
+ return Object.assign(i, e);
59
+ }
60
+ return e;
61
+ }
62
+ u(ne, "clone");
63
+ function N(e) {
64
+ return function(n) {
65
+ return F(n, e);
66
+ };
67
+ }
68
+ u(N, "property");
69
+ function A(e) {
70
+ return e !== null && (typeof e == "object" || typeof e == "function");
71
+ }
72
+ u(A, "isObject");
73
+ function te(e, n, t) {
74
+ return typeof t != "function" ? I(e, n) : O(e, n, /* @__PURE__ */ u(function i(f, r, s, l, a, o) {
75
+ const c = t(f, r, s, l, a, o);
76
+ return c !== void 0 ? !!c : O(f, r, i, o);
77
+ }, "doesMatch"), /* @__PURE__ */ new Map());
78
+ }
79
+ u(te, "isMatchWith");
80
+ function O(e, n, t, i) {
81
+ if (n === e)
82
+ return !0;
83
+ switch (typeof n) {
84
+ case "object":
85
+ return ie(e, n, t, i);
86
+ case "function":
87
+ return Object.keys(n).length > 0 ? O(e, { ...n }, t, i) : D(e, n);
88
+ default:
89
+ return A(e) ? typeof n == "string" ? n === "" : !0 : D(e, n);
90
+ }
91
+ }
92
+ u(O, "isMatchWithInternal");
93
+ function ie(e, n, t, i) {
94
+ if (n == null)
95
+ return !0;
96
+ if (Array.isArray(n))
97
+ return K(e, n, t, i);
98
+ if (n instanceof Map)
99
+ return re(e, n, t, i);
100
+ if (n instanceof Set)
101
+ return fe(e, n, t, i);
102
+ const f = Object.keys(n);
103
+ if (e == null)
104
+ return f.length === 0;
105
+ if (f.length === 0)
106
+ return !0;
107
+ if (i && i.has(n))
108
+ return i.get(n) === e;
109
+ i && i.set(n, e);
110
+ try {
111
+ for (let r = 0; r < f.length; r++) {
112
+ const s = f[r];
113
+ 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))
114
+ return !1;
115
+ }
116
+ return !0;
117
+ } finally {
118
+ i && i.delete(n);
119
+ }
120
+ }
121
+ u(ie, "isObjectMatch");
122
+ function re(e, n, t, i) {
123
+ if (n.size === 0)
124
+ return !0;
125
+ if (!(e instanceof Map))
126
+ return !1;
127
+ for (const [f, r] of n.entries()) {
128
+ const s = e.get(f);
129
+ if (t(s, r, f, e, n, i) === !1)
130
+ return !1;
131
+ }
132
+ return !0;
133
+ }
134
+ u(re, "isMapMatch");
135
+ function K(e, n, t, i) {
136
+ if (n.length === 0)
137
+ return !0;
138
+ if (!Array.isArray(e))
139
+ return !1;
140
+ const f = /* @__PURE__ */ new Set();
141
+ for (let r = 0; r < n.length; r++) {
142
+ const s = n[r];
143
+ let l = !1;
144
+ for (let a = 0; a < e.length; a++) {
145
+ if (f.has(a))
146
+ continue;
147
+ const o = e[a];
148
+ let c = !1;
149
+ if (t(o, s, r, e, n, i) && (c = !0), c) {
150
+ f.add(a), l = !0;
151
+ break;
152
+ }
153
+ }
154
+ if (!l)
155
+ return !1;
156
+ }
157
+ return !0;
158
+ }
159
+ u(K, "isArrayMatch");
160
+ function fe(e, n, t, i) {
161
+ return n.size === 0 ? !0 : e instanceof Set ? K([...e], [...n], t, i) : !1;
162
+ }
163
+ u(fe, "isSetMatch");
164
+ function I(e, n) {
165
+ return te(e, n, () => {
166
+ });
167
+ }
168
+ u(I, "isMatch");
169
+ function R(e) {
170
+ return e = $(e), (n) => I(n, e);
171
+ }
172
+ u(R, "matches");
173
+ function se(e, n) {
174
+ return k(e, (t, i, f, r) => {
175
+ if (typeof e == "object")
176
+ switch (Object.prototype.toString.call(e)) {
177
+ case H:
178
+ case X:
179
+ case V: {
180
+ const s = new e.constructor(e == null ? void 0 : e.valueOf());
181
+ return L(s, e), s;
182
+ }
183
+ case z: {
184
+ const s = {};
185
+ return L(s, e), s.length = e.length, s[Symbol.iterator] = e[Symbol.iterator], s;
186
+ }
187
+ default:
188
+ return;
189
+ }
190
+ });
191
+ }
192
+ u(se, "cloneDeepWith");
193
+ function w(e) {
194
+ return se(e);
195
+ }
196
+ u(w, "cloneDeep");
197
+ const le = /^(?:0|[1-9]\d*)$/;
198
+ function ue(e, n = Number.MAX_SAFE_INTEGER) {
199
+ switch (typeof e) {
200
+ case "number":
201
+ return Number.isInteger(e) && e >= 0 && e < n;
202
+ case "symbol":
203
+ return !1;
204
+ case "string":
205
+ return le.test(e);
206
+ }
207
+ }
208
+ u(ue, "isIndex");
209
+ function ae(e, n) {
210
+ let t;
211
+ if (Array.isArray(n) ? t = n : typeof n == "string" && J(n) && (e == null ? void 0 : e[n]) == null ? t = Q(n) : t = [n], t.length === 0)
212
+ return !1;
213
+ let i = e;
214
+ for (let f = 0; f < t.length; f++) {
215
+ const r = t[f];
216
+ if ((i == null || !Object.hasOwn(i, r)) && !((Array.isArray(i) || m(i)) && ue(r) && r < i.length))
217
+ return !1;
218
+ i = i[r];
219
+ }
220
+ return !0;
221
+ }
222
+ u(ae, "has");
223
+ function v(e, n) {
224
+ switch (typeof e) {
225
+ case "object": {
226
+ Object.is(e == null ? void 0 : e.valueOf(), -0) && (e = "-0");
227
+ break;
228
+ }
229
+ case "number": {
230
+ e = U(e);
231
+ break;
232
+ }
233
+ }
234
+ return n = w(n), function(t) {
235
+ const i = F(t, e);
236
+ return i === void 0 ? ae(t, e) : n === void 0 ? i === void 0 : I(i, n);
237
+ };
238
+ }
239
+ u(v, "matchesProperty");
240
+ function oe(e) {
241
+ if (e == null)
242
+ return S;
243
+ switch (typeof e) {
244
+ case "function":
245
+ return e;
246
+ case "object":
247
+ return Array.isArray(e) && e.length === 2 ? v(e[0], e[1]) : R(e);
248
+ case "string":
249
+ case "symbol":
250
+ case "number":
251
+ return N(e);
252
+ }
253
+ }
254
+ u(oe, "iteratee");
255
+ function ce(e, n = S, t = 0) {
256
+ if (!e)
257
+ return;
258
+ t < 0 && (t = Math.max(e.length + t, 0));
259
+ const i = oe(n);
260
+ if (typeof i == "function" && !Array.isArray(e)) {
261
+ const r = Object.keys(e);
262
+ for (let s = t; s < r.length; s++) {
263
+ const l = r[s], a = e[l];
264
+ if (i(a, l, e))
265
+ return a;
266
+ }
267
+ return;
268
+ }
269
+ return (Array.isArray(e) ? e.slice(t) : Object.values(e).slice(t)).find(i);
270
+ }
271
+ u(ce, "find");
272
+ function ye(e, n, t) {
273
+ if (!e)
274
+ return !1;
275
+ n || (n = S);
276
+ const i = Array.isArray(e) ? e : Object.values(e);
277
+ switch (typeof n) {
278
+ case "function": {
279
+ if (!Array.isArray(e)) {
280
+ const f = Object.keys(e);
281
+ for (let r = 0; r < f.length; r++) {
282
+ const s = f[r], l = e[s];
283
+ if (n(l, s, e))
284
+ return !0;
285
+ }
286
+ return !1;
287
+ }
288
+ for (let f = 0; f < e.length; f++)
289
+ if (n(e[f], f, e))
290
+ return !0;
291
+ return !1;
292
+ }
293
+ case "object":
294
+ if (Array.isArray(n) && n.length === 2) {
295
+ const f = n[0], r = n[1], s = v(f, r);
296
+ if (Array.isArray(e)) {
297
+ for (let l = 0; l < e.length; l++)
298
+ if (s(e[l]))
299
+ return !0;
300
+ return !1;
301
+ }
302
+ return i.some(s);
303
+ } else {
304
+ const f = R(n);
305
+ if (Array.isArray(e)) {
306
+ for (let r = 0; r < e.length; r++)
307
+ if (f(e[r]))
308
+ return !0;
309
+ return !1;
310
+ }
311
+ return i.some(f);
312
+ }
313
+ case "number":
314
+ case "symbol":
315
+ case "string": {
316
+ const f = N(n);
317
+ if (Array.isArray(e)) {
318
+ for (let r = 0; r < e.length; r++)
319
+ if (f(e[r]))
320
+ return !0;
321
+ return !1;
322
+ }
323
+ return i.some(f);
324
+ }
325
+ }
326
+ }
327
+ u(ye, "some");
328
+ function de(e, ...n) {
329
+ const t = n.slice(0, -1), i = n[n.length - 1];
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());
334
+ }
335
+ return f;
336
+ }
337
+ u(de, "mergeWith");
338
+ function y(e, n, t, i) {
339
+ if (E(e) && (e = Object(e)), n == null || typeof n != "object")
340
+ return e;
341
+ if (i.has(n))
342
+ return ne(i.get(n));
343
+ if (i.set(n, e), Array.isArray(n)) {
344
+ n = n.slice();
345
+ for (let r = 0; r < n.length; r++)
346
+ n[r] = n[r] ?? void 0;
347
+ }
348
+ const f = [...Object.keys(n), ...Y(n)];
349
+ for (let r = 0; r < f.length; r++) {
350
+ const s = f[r];
351
+ if (Z(s))
352
+ continue;
353
+ let l = n[s], a = e[s];
354
+ if (m(l) && (l = { ...l }), m(a) && (a = { ...a }), typeof Buffer < "u" && Buffer.isBuffer(l) && (l = w(l)), Array.isArray(l))
355
+ if (typeof a == "object" && a != null) {
356
+ const c = [], h = Reflect.ownKeys(a);
357
+ for (let g = 0; g < h.length; g++) {
358
+ const B = h[g];
359
+ c[B] = a[B];
360
+ }
361
+ a = c;
362
+ } else
363
+ a = [];
364
+ const o = t(a, l, s, e, n, i);
365
+ o !== void 0 ? e[s] = o : Array.isArray(l) || q(a) && q(l) ? e[s] = y(a, l, t, i) : a == null && j(l) ? e[s] = y({}, l, t, i) : a == null && T(l) ? e[s] = w(l) : (a === void 0 || l !== void 0) && (e[s] = l);
366
+ }
367
+ return e;
368
+ }
369
+ u(y, "mergeWithDeep");
370
+ function he(e, ...n) {
371
+ return de(e, ...n, x);
372
+ }
373
+ u(he, "merge");
374
+ const b = class b {
375
+ constructor() {
376
+ p(this, "events");
377
+ this.events = {};
378
+ }
379
+ /**
380
+ * Event listener set lookup
381
+ */
382
+ _getEventListByName(n) {
383
+ return typeof this.events[n] > "u" && (this.events[n] = /* @__PURE__ */ new Set()), this.events[n];
384
+ }
385
+ /**
386
+ * Event subscription
387
+ */
388
+ on(n, t) {
389
+ this._getEventListByName(n).add(t);
390
+ }
391
+ /**
392
+ * One-time event subscription
393
+ */
394
+ once(n, t) {
395
+ const i = /* @__PURE__ */ u((...f) => {
396
+ this.removeListener(n, i), t.apply(this, f);
397
+ }, "onceFn");
398
+ this.on(n, i);
399
+ }
400
+ /**
401
+ * Event emission
402
+ */
403
+ emit(n, ...t) {
404
+ this._getEventListByName(n).forEach((i) => {
405
+ i.apply(this, t);
406
+ });
407
+ }
408
+ /**
409
+ * Event unsubscription
410
+ */
411
+ removeListener(n, t) {
412
+ this._getEventListByName(n).delete(t);
413
+ }
414
+ };
415
+ u(b, "OwpEventEmitter");
416
+ let M = b;
417
+ const d = class d {
418
+ /**
419
+ * The filterArrayByString function filters an array of objects by a search string.
420
+ * It takes in an array of objects and a search string as parameters and returns a filtered array of objects.
421
+ *
422
+ */
423
+ static filterArrayByString(n, t) {
424
+ if (!t || (t == null ? void 0 : t.length) === 0 || !t)
425
+ return n;
426
+ t = t == null ? void 0 : t.toLowerCase();
427
+ const i = n.filter((f) => this.searchInObj(f, t));
428
+ return i.length === n.length ? n : i;
429
+ }
430
+ static filterArrayByString2(n, t) {
431
+ return typeof t != "string" || t === "" ? n : (t = t == null ? void 0 : t.toLowerCase(), n.filter((i) => this.searchInObj(i, t)));
432
+ }
433
+ /**
434
+ * The searchInObj function searches an object for a given search string.
435
+ * 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.
436
+ *
437
+ */
438
+ static searchInObj(n, t) {
439
+ if (!f(n))
440
+ return !1;
441
+ const i = Object.keys(n);
442
+ function f(r) {
443
+ return !!(r && typeof r == "object" && !Array.isArray(r) && typeof r != "function");
444
+ }
445
+ u(f, "isRecord");
446
+ for (let r = 0; r < i.length; r += 1) {
447
+ const s = i[r], l = n[s];
448
+ if (typeof l == "string") {
449
+ if (this.searchInString(l, t))
450
+ return !0;
451
+ } else if (Array.isArray(l) && this.searchInArray(l, t))
452
+ return !0;
453
+ if (typeof l == "object" && this.searchInObj(l, t))
454
+ return !0;
455
+ }
456
+ return !1;
457
+ }
458
+ /**
459
+ * The searchInArray function searches an array for a given search string.
460
+ * 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.
461
+ *
462
+ */
463
+ static searchInArray(n, t) {
464
+ return n.forEach((i) => !!(typeof i == "string" && this.searchInString(i, t) || i && typeof i == "object" && this.searchInObj(i, t))), !1;
465
+ }
466
+ /**
467
+ * The searchInString function searches a string for a given search string.
468
+ * 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.
469
+ *
470
+ */
471
+ static searchInString(n, t) {
472
+ return n.toLowerCase().includes(t);
473
+ }
474
+ /**
475
+ * The generateGUID function generates a globally unique identifier.
476
+ * It returns a string representing the GUID.
477
+ *
478
+ */
479
+ static generateGUID() {
480
+ function n() {
481
+ return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
482
+ }
483
+ return u(n, "S4"), n() + n();
484
+ }
485
+ /**
486
+ * The toggleInArray function toggles an item in an array.
487
+ */
488
+ static toggleInArray(n, t) {
489
+ t.indexOf(n) === -1 ? t.push(n) : t.splice(t.indexOf(n), 1);
490
+ }
491
+ /**
492
+ * The handleize function converts a string to a handle.
493
+ */
494
+ static handleize(n) {
495
+ return n.toString().toLowerCase().replace(/\s+/g, "-").replace(/\W+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
496
+ }
497
+ /**
498
+ * The setRoutes function sets the routes for the Owp project.
499
+ */
500
+ static setRoutes(n, t = void 0) {
501
+ let i = [];
502
+ n != null && n.routes && (i = [...n.routes]);
503
+ const f = /* @__PURE__ */ u((r, s) => {
504
+ const l = r.auth || r.auth === null ? r.auth : s, a = he({}, n.settings, r.settings), o = {
505
+ ...r,
506
+ settings: a,
507
+ auth: l
508
+ };
509
+ return r.children && (o.children = r.children.map((c) => f(c, l))), o;
510
+ }, "applyAuth");
511
+ return i = i.map((r) => {
512
+ const s = n.auth || n.auth === null ? n.auth : t || null;
513
+ return f(r, s);
514
+ }), [...i];
515
+ }
516
+ /**
517
+ * The generateRoutesFromConfigs function generates routes from a set of route configurations.
518
+ * It takes in an array of route configurations as a parameter and returns an array of routes.
519
+ *
520
+ */
521
+ static generateRoutesFromConfigs(n, t) {
522
+ let i = [];
523
+ return n.forEach((f) => {
524
+ i = [...i, ...this.setRoutes(f, t)];
525
+ }), i;
526
+ }
527
+ /**
528
+ * The findById function finds an object by its id.
529
+ */
530
+ static findById(n, t) {
531
+ const i = ce(n, { id: t });
532
+ if (i)
533
+ return i;
534
+ let f;
535
+ return ye(n, (r) => r.children ? (f = this.findById(r.children, t), f) : !1), f;
536
+ }
537
+ /**
538
+ * The randomMatColor function generates a random material color.
539
+ */
540
+ static randomMatColor(n = "400") {
541
+ var f;
542
+ const t = [
543
+ "red",
544
+ "pink",
545
+ "purple",
546
+ "deepPurple",
547
+ "indigo",
548
+ "blue",
549
+ "lightBlue",
550
+ "cyan",
551
+ "teal",
552
+ "green",
553
+ "lightGreen",
554
+ "lime",
555
+ "yellow",
556
+ "amber",
557
+ "orange",
558
+ "deepOrange"
559
+ ], i = t[Math.floor(Math.random() * t.length)];
560
+ return (f = G[i]) == null ? void 0 : f[n];
561
+ }
562
+ /**
563
+ * The findNavItemById function finds a navigation item by its id.
564
+ */
565
+ static difference(n, t) {
566
+ function i(f, r) {
567
+ 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), {});
568
+ }
569
+ return u(i, "changes"), i(n, t);
570
+ }
571
+ /**
572
+ * The hasPermission function checks if a user has permission to access a resource.
573
+ */
574
+ // @ts-expect-error
575
+ static hasPermission(n, t) {
576
+ var i;
577
+ 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;
578
+ }
579
+ /**
580
+ * The filterArrayByString function filters an array of objects by a search string.
581
+ */
582
+ static filterRecursive(n, t) {
583
+ return n ? n.reduce((i, f) => {
584
+ let r = null;
585
+ if (t(f) && (r = { ...f }), f.children != null) {
586
+ const s = this.filterRecursive(f.children, t);
587
+ s && (s == null ? void 0 : s.length) > 0 && (r = { ...f, children: s });
588
+ }
589
+ return r && i.push(r), i;
590
+ }, []) : null;
591
+ }
592
+ };
593
+ u(d, "OwpUtils"), /**
594
+ * OwpEventEmitter class reference
595
+ */
596
+ p(d, "EventEmitter", M);
597
+ let C = d;
598
+ export {
599
+ C as O,
600
+ ue as a,
601
+ Ae as b,
602
+ me as c,
603
+ oe as d,
604
+ S as e,
605
+ ce as f,
606
+ Oe as g,
607
+ M as h,
608
+ A as i,
609
+ he as m
610
+ };
611
+ //# sourceMappingURL=OwpUtils-9lHSCdan.js.map