@owp/core 1.24.1 → 1.24.3

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 (29) hide show
  1. package/dist/{OwpUtils-DemzkaAZ.js → OwpUtils-DgBOzRu6.js} +17 -17
  2. package/dist/OwpUtils-DgBOzRu6.js.map +1 -0
  3. package/dist/{QuickPanel-Dla59ejy.js → QuickPanel-GgHx7ox9.js} +3 -3
  4. package/dist/{QuickPanel-Dla59ejy.js.map → QuickPanel-GgHx7ox9.js.map} +1 -1
  5. package/dist/hooks.js +3 -3
  6. package/dist/{index-DuATtBay.js → index-DP0dZ8Y6.js} +5488 -5442
  7. package/dist/index-DP0dZ8Y6.js.map +1 -0
  8. package/dist/index.js +116 -113
  9. package/dist/index.js.map +1 -1
  10. package/dist/treeGridUtil-CGze1rYA.js +1176 -0
  11. package/dist/treeGridUtil-CGze1rYA.js.map +1 -0
  12. package/dist/types/index.d.ts +2 -0
  13. package/dist/types/utils/common/OwpUtils.d.ts +1 -1
  14. package/dist/types/utils/index.d.ts +0 -2
  15. package/dist/useTreeGridExcelExport-B_a3dFaL.js +2160 -0
  16. package/dist/useTreeGridExcelExport-B_a3dFaL.js.map +1 -0
  17. package/dist/utils.js +866 -893
  18. package/dist/utils.js.map +1 -1
  19. package/package.json +1 -1
  20. package/dist/OwpUtils-DemzkaAZ.js.map +0 -1
  21. package/dist/index-DuATtBay.js.map +0 -1
  22. package/dist/treeGridUtil-ZdWIjKlK.js +0 -2922
  23. package/dist/treeGridUtil-ZdWIjKlK.js.map +0 -1
  24. package/dist/useTreeGridExcelExport-BumQHnAN.js +0 -414
  25. package/dist/useTreeGridExcelExport-BumQHnAN.js.map +0 -1
  26. /package/dist/types/{utils/errors → components/ErrorBoundary}/ErrorBoundary.d.ts +0 -0
  27. /package/dist/types/{utils/errors → components/ErrorBoundary}/index.d.ts +0 -0
  28. /package/dist/types/{utils/events → components/EventEmitter}/EventEmitter.d.ts +0 -0
  29. /package/dist/types/{utils/events → components/EventEmitter}/index.d.ts +0 -0
@@ -0,0 +1,1176 @@
1
+ var Ye = Object.defineProperty;
2
+ var c = (e, t) => Ye(e, "name", { value: t, configurable: !0 });
3
+ import { c as ce, b as oe, a as U, d as $, e as fe, g as ze, h as Xe } from "./treeGrid-4QKOKXZw.js";
4
+ import ae from "dayjs";
5
+ import qe from "exceljs";
6
+ import { enqueueSnackbar as Je } from "notistack";
7
+ function Ze(e) {
8
+ return Number.isSafeInteger(e) && e >= 0;
9
+ }
10
+ c(Ze, "isLength");
11
+ function ue(e) {
12
+ return e != null && typeof e != "function" && Ze(e.length);
13
+ }
14
+ c(ue, "isArrayLike");
15
+ function E(e) {
16
+ return e === "__proto__";
17
+ }
18
+ c(E, "isUnsafeProperty");
19
+ function le(e) {
20
+ switch (typeof e) {
21
+ case "number":
22
+ case "symbol":
23
+ return !1;
24
+ case "string":
25
+ return e.includes(".") || e.includes("[") || e.includes("]");
26
+ }
27
+ }
28
+ c(le, "isDeepKey");
29
+ function de(e) {
30
+ var t;
31
+ return typeof e == "string" || typeof e == "symbol" ? e : Object.is((t = e == null ? void 0 : e.valueOf) == null ? void 0 : t.call(e), -0) ? "-0" : String(e);
32
+ }
33
+ c(de, "toKey");
34
+ function ye(e) {
35
+ const t = [], n = e.length;
36
+ if (n === 0)
37
+ return t;
38
+ let r = 0, s = "", o = "", i = !1;
39
+ for (e.charCodeAt(0) === 46 && (t.push(""), r++); r < n; ) {
40
+ const f = e[r];
41
+ o ? f === "\\" && r + 1 < n ? (r++, s += e[r]) : f === o ? o = "" : s += f : i ? f === '"' || f === "'" ? o = f : f === "]" ? (i = !1, t.push(s), s = "") : s += f : f === "[" ? (i = !0, s && (t.push(s), s = "")) : f === "." ? s && (t.push(s), s = "") : s += f, r++;
42
+ }
43
+ return s && t.push(s), t;
44
+ }
45
+ c(ye, "toPath");
46
+ function W(e, t, n) {
47
+ if (e == null)
48
+ return n;
49
+ switch (typeof t) {
50
+ case "string": {
51
+ if (E(t))
52
+ return n;
53
+ const r = e[t];
54
+ return r === void 0 ? le(t) ? W(e, ye(t), n) : n : r;
55
+ }
56
+ case "number":
57
+ case "symbol": {
58
+ typeof t == "number" && (t = de(t));
59
+ const r = e[t];
60
+ return r === void 0 ? n : r;
61
+ }
62
+ default: {
63
+ if (Array.isArray(t))
64
+ return Qe(e, t, n);
65
+ if (Object.is(t == null ? void 0 : t.valueOf(), -0) ? t = "-0" : t = String(t), E(t))
66
+ return n;
67
+ const r = e[t];
68
+ return r === void 0 ? n : r;
69
+ }
70
+ }
71
+ }
72
+ c(W, "get");
73
+ function Qe(e, t, n) {
74
+ if (t.length === 0)
75
+ return n;
76
+ let r = e;
77
+ for (let s = 0; s < t.length; s++) {
78
+ if (r == null || E(t[s]))
79
+ return n;
80
+ r = r[t[s]];
81
+ }
82
+ return r === void 0 ? n : r;
83
+ }
84
+ c(Qe, "getWithPath");
85
+ function ke(e) {
86
+ return e == null || typeof e != "object" && typeof e != "function";
87
+ }
88
+ c(ke, "isPrimitive");
89
+ function ve(e, t) {
90
+ return e === t || Number.isNaN(e) && Number.isNaN(t);
91
+ }
92
+ c(ve, "eq");
93
+ function P(e) {
94
+ return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
95
+ }
96
+ c(P, "getSymbols");
97
+ function _(e) {
98
+ return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
99
+ }
100
+ c(_, "getTag");
101
+ const ge = "[object RegExp]", pe = "[object String]", he = "[object Number]", we = "[object Boolean]", T = "[object Arguments]", be = "[object Symbol]", me = "[object Date]", Se = "[object Map]", Ae = "[object Set]", Ee = "[object Array]", et = "[object Function]", Ie = "[object ArrayBuffer]", D = "[object Object]", tt = "[object Error]", Re = "[object DataView]", xe = "[object Uint8Array]", Oe = "[object Uint8ClampedArray]", Ge = "[object Uint16Array]", Be = "[object Uint32Array]", nt = "[object BigUint64Array]", De = "[object Int8Array]", _e = "[object Int16Array]", je = "[object Int32Array]", rt = "[object BigInt64Array]", Le = "[object Float32Array]", Pe = "[object Float64Array]";
102
+ function Te(e) {
103
+ return ArrayBuffer.isView(e) && !(e instanceof DataView);
104
+ }
105
+ c(Te, "isTypedArray$1");
106
+ function Hn(e, t) {
107
+ return m(e, void 0, e, /* @__PURE__ */ new Map(), t);
108
+ }
109
+ c(Hn, "cloneDeepWith");
110
+ function m(e, t, n, r = /* @__PURE__ */ new Map(), s = void 0) {
111
+ const o = s == null ? void 0 : s(e, t, n, r);
112
+ if (o !== void 0)
113
+ return o;
114
+ if (ke(e))
115
+ return e;
116
+ if (r.has(e))
117
+ return r.get(e);
118
+ if (Array.isArray(e)) {
119
+ const i = new Array(e.length);
120
+ r.set(e, i);
121
+ for (let f = 0; f < e.length; f++)
122
+ i[f] = m(e[f], f, n, r, s);
123
+ return Object.hasOwn(e, "index") && (i.index = e.index), Object.hasOwn(e, "input") && (i.input = e.input), i;
124
+ }
125
+ if (e instanceof Date)
126
+ return new Date(e.getTime());
127
+ if (e instanceof RegExp) {
128
+ const i = new RegExp(e.source, e.flags);
129
+ return i.lastIndex = e.lastIndex, i;
130
+ }
131
+ if (e instanceof Map) {
132
+ const i = /* @__PURE__ */ new Map();
133
+ r.set(e, i);
134
+ for (const [f, a] of e)
135
+ i.set(f, m(a, f, n, r, s));
136
+ return i;
137
+ }
138
+ if (e instanceof Set) {
139
+ const i = /* @__PURE__ */ new Set();
140
+ r.set(e, i);
141
+ for (const f of e)
142
+ i.add(m(f, void 0, n, r, s));
143
+ return i;
144
+ }
145
+ if (typeof Buffer < "u" && Buffer.isBuffer(e))
146
+ return e.subarray();
147
+ if (Te(e)) {
148
+ const i = new (Object.getPrototypeOf(e)).constructor(e.length);
149
+ r.set(e, i);
150
+ for (let f = 0; f < e.length; f++)
151
+ i[f] = m(e[f], f, n, r, s);
152
+ return i;
153
+ }
154
+ if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer)
155
+ return e.slice(0);
156
+ if (e instanceof DataView) {
157
+ const i = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
158
+ return r.set(e, i), x(i, e, n, r, s), i;
159
+ }
160
+ if (typeof File < "u" && e instanceof File) {
161
+ const i = new File([e], e.name, {
162
+ type: e.type
163
+ });
164
+ return r.set(e, i), x(i, e, n, r, s), i;
165
+ }
166
+ if (e instanceof Blob) {
167
+ const i = new Blob([e], { type: e.type });
168
+ return r.set(e, i), x(i, e, n, r, s), i;
169
+ }
170
+ if (e instanceof Error) {
171
+ const i = new e.constructor();
172
+ return r.set(e, i), i.message = e.message, i.name = e.name, i.stack = e.stack, i.cause = e.cause, x(i, e, n, r, s), i;
173
+ }
174
+ if (typeof e == "object" && st(e)) {
175
+ const i = Object.create(Object.getPrototypeOf(e));
176
+ return r.set(e, i), x(i, e, n, r, s), i;
177
+ }
178
+ return e;
179
+ }
180
+ c(m, "cloneDeepWithImpl");
181
+ function x(e, t, n = e, r, s) {
182
+ const o = [...Object.keys(t), ...P(t)];
183
+ for (let i = 0; i < o.length; i++) {
184
+ const f = o[i], a = Object.getOwnPropertyDescriptor(e, f);
185
+ (a == null || a.writable) && (e[f] = m(t[f], f, n, r, s));
186
+ }
187
+ }
188
+ c(x, "copyProperties");
189
+ function st(e) {
190
+ switch (_(e)) {
191
+ case T:
192
+ case Ee:
193
+ case Ie:
194
+ case Re:
195
+ case we:
196
+ case me:
197
+ case Le:
198
+ case Pe:
199
+ case De:
200
+ case _e:
201
+ case je:
202
+ case Se:
203
+ case he:
204
+ case D:
205
+ case ge:
206
+ case Ae:
207
+ case pe:
208
+ case be:
209
+ case xe:
210
+ case Oe:
211
+ case Ge:
212
+ case Be:
213
+ return !0;
214
+ default:
215
+ return !1;
216
+ }
217
+ }
218
+ c(st, "isCloneableObject");
219
+ function it(e) {
220
+ return m(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
221
+ }
222
+ c(it, "cloneDeep");
223
+ function ct(e) {
224
+ return e !== null && typeof e == "object" && _(e) === "[object Arguments]";
225
+ }
226
+ c(ct, "isArguments");
227
+ function ot(e, t) {
228
+ const n = new Set(t);
229
+ return e.filter((r) => !n.has(r));
230
+ }
231
+ c(ot, "difference");
232
+ function ft(e) {
233
+ return typeof e == "object" && e !== null;
234
+ }
235
+ c(ft, "isObjectLike");
236
+ function at(e) {
237
+ return ft(e) && ue(e);
238
+ }
239
+ c(at, "isArrayLikeObject");
240
+ function Z(e, t) {
241
+ if (e == null)
242
+ return !0;
243
+ switch (typeof t) {
244
+ case "symbol":
245
+ case "number":
246
+ case "object": {
247
+ if (Array.isArray(t))
248
+ return Q(e, t);
249
+ if (typeof t == "number" ? t = de(t) : typeof t == "object" && (Object.is(t == null ? void 0 : t.valueOf(), -0) ? t = "-0" : t = String(t)), E(t))
250
+ return !1;
251
+ if ((e == null ? void 0 : e[t]) === void 0)
252
+ return !0;
253
+ try {
254
+ return delete e[t], !0;
255
+ } catch {
256
+ return !1;
257
+ }
258
+ }
259
+ case "string": {
260
+ if ((e == null ? void 0 : e[t]) === void 0 && le(t))
261
+ return Q(e, ye(t));
262
+ if (E(t))
263
+ return !1;
264
+ try {
265
+ return delete e[t], !0;
266
+ } catch {
267
+ return !1;
268
+ }
269
+ }
270
+ }
271
+ }
272
+ c(Z, "unset");
273
+ function Q(e, t) {
274
+ const n = W(e, t.slice(0, -1), e), r = t[t.length - 1];
275
+ if ((n == null ? void 0 : n[r]) === void 0)
276
+ return !0;
277
+ if (E(r))
278
+ return !1;
279
+ try {
280
+ return delete n[r], !0;
281
+ } catch {
282
+ return !1;
283
+ }
284
+ }
285
+ c(Q, "unsetWithPath");
286
+ function ut(e) {
287
+ return Array.isArray(e);
288
+ }
289
+ c(ut, "isArray");
290
+ function lt(e, ...t) {
291
+ return ot(e, t);
292
+ }
293
+ c(lt, "without$1");
294
+ function dt(e, ...t) {
295
+ return at(e) ? lt(Array.from(e), ...t) : [];
296
+ }
297
+ c(dt, "without");
298
+ function Ne(e) {
299
+ if (e == null)
300
+ return "";
301
+ if (typeof e == "string")
302
+ return e;
303
+ if (Array.isArray(e))
304
+ return e.map(Ne).join(",");
305
+ const t = String(e);
306
+ return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
307
+ }
308
+ c(Ne, "toString");
309
+ function N(e) {
310
+ if (!e || typeof e != "object")
311
+ return !1;
312
+ const t = Object.getPrototypeOf(e);
313
+ return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
314
+ }
315
+ c(N, "isPlainObject$1");
316
+ function yt(e, t, n) {
317
+ return O(e, t, void 0, void 0, void 0, void 0, n);
318
+ }
319
+ c(yt, "isEqualWith");
320
+ function O(e, t, n, r, s, o, i) {
321
+ const f = i(e, t, n, r, s, o);
322
+ if (f !== void 0)
323
+ return f;
324
+ if (typeof e == typeof t)
325
+ switch (typeof e) {
326
+ case "bigint":
327
+ case "string":
328
+ case "boolean":
329
+ case "symbol":
330
+ case "undefined":
331
+ return e === t;
332
+ case "number":
333
+ return e === t || Object.is(e, t);
334
+ case "function":
335
+ return e === t;
336
+ case "object":
337
+ return G(e, t, o, i);
338
+ }
339
+ return G(e, t, o, i);
340
+ }
341
+ c(O, "isEqualWithImpl");
342
+ function G(e, t, n, r) {
343
+ if (Object.is(e, t))
344
+ return !0;
345
+ let s = _(e), o = _(t);
346
+ if (s === T && (s = D), o === T && (o = D), s !== o)
347
+ return !1;
348
+ switch (s) {
349
+ case pe:
350
+ return e.toString() === t.toString();
351
+ case he: {
352
+ const a = e.valueOf(), u = t.valueOf();
353
+ return ve(a, u);
354
+ }
355
+ case we:
356
+ case me:
357
+ case be:
358
+ return Object.is(e.valueOf(), t.valueOf());
359
+ case ge:
360
+ return e.source === t.source && e.flags === t.flags;
361
+ case et:
362
+ return e === t;
363
+ }
364
+ n = n ?? /* @__PURE__ */ new Map();
365
+ const i = n.get(e), f = n.get(t);
366
+ if (i != null && f != null)
367
+ return i === t;
368
+ n.set(e, t), n.set(t, e);
369
+ try {
370
+ switch (s) {
371
+ case Se: {
372
+ if (e.size !== t.size)
373
+ return !1;
374
+ for (const [a, u] of e.entries())
375
+ if (!t.has(a) || !O(u, t.get(a), a, e, t, n, r))
376
+ return !1;
377
+ return !0;
378
+ }
379
+ case Ae: {
380
+ if (e.size !== t.size)
381
+ return !1;
382
+ const a = Array.from(e.values()), u = Array.from(t.values());
383
+ for (let l = 0; l < a.length; l++) {
384
+ const d = a[l], y = u.findIndex((g) => O(d, g, void 0, e, t, n, r));
385
+ if (y === -1)
386
+ return !1;
387
+ u.splice(y, 1);
388
+ }
389
+ return !0;
390
+ }
391
+ case Ee:
392
+ case xe:
393
+ case Oe:
394
+ case Ge:
395
+ case Be:
396
+ case nt:
397
+ case De:
398
+ case _e:
399
+ case je:
400
+ case rt:
401
+ case Le:
402
+ case Pe: {
403
+ if (typeof Buffer < "u" && Buffer.isBuffer(e) !== Buffer.isBuffer(t) || e.length !== t.length)
404
+ return !1;
405
+ for (let a = 0; a < e.length; a++)
406
+ if (!O(e[a], t[a], a, e, t, n, r))
407
+ return !1;
408
+ return !0;
409
+ }
410
+ case Ie:
411
+ return e.byteLength !== t.byteLength ? !1 : G(new Uint8Array(e), new Uint8Array(t), n, r);
412
+ case Re:
413
+ return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : G(new Uint8Array(e), new Uint8Array(t), n, r);
414
+ case tt:
415
+ return e.name === t.name && e.message === t.message;
416
+ case D: {
417
+ if (!(G(e.constructor, t.constructor, n, r) || N(e) && N(t)))
418
+ return !1;
419
+ const u = [...Object.keys(e), ...P(e)], l = [...Object.keys(t), ...P(t)];
420
+ if (u.length !== l.length)
421
+ return !1;
422
+ for (let d = 0; d < u.length; d++) {
423
+ const y = u[d], g = e[y];
424
+ if (!Object.hasOwn(t, y))
425
+ return !1;
426
+ const p = t[y];
427
+ if (!O(g, p, y, e, t, n, r))
428
+ return !1;
429
+ }
430
+ return !0;
431
+ }
432
+ default:
433
+ return !1;
434
+ }
435
+ } finally {
436
+ n.delete(e), n.delete(t);
437
+ }
438
+ }
439
+ c(G, "areObjectsEqual");
440
+ function gt() {
441
+ }
442
+ c(gt, "noop");
443
+ function Un(e, t) {
444
+ return yt(e, t, gt);
445
+ }
446
+ c(Un, "isEqual");
447
+ function pt(e) {
448
+ const t = e == null ? void 0 : e.constructor, n = typeof t == "function" ? t.prototype : Object.prototype;
449
+ return e === n;
450
+ }
451
+ c(pt, "isPrototype");
452
+ function ht(e) {
453
+ return Te(e);
454
+ }
455
+ c(ht, "isTypedArray");
456
+ function k(e) {
457
+ var n;
458
+ if (typeof e != "object" || e == null)
459
+ return !1;
460
+ if (Object.getPrototypeOf(e) === null)
461
+ return !0;
462
+ if (Object.prototype.toString.call(e) !== "[object Object]") {
463
+ const r = e[Symbol.toStringTag];
464
+ return r == null || !((n = Object.getOwnPropertyDescriptor(e, Symbol.toStringTag)) != null && n.writable) ? !1 : e.toString() === `[object ${r}]`;
465
+ }
466
+ let t = e;
467
+ for (; Object.getPrototypeOf(t) !== null; )
468
+ t = Object.getPrototypeOf(t);
469
+ return Object.getPrototypeOf(e) === t;
470
+ }
471
+ c(k, "isPlainObject");
472
+ function wt(e, ...t) {
473
+ if (e == null)
474
+ return {};
475
+ const n = it(e);
476
+ for (let r = 0; r < t.length; r++) {
477
+ let s = t[r];
478
+ switch (typeof s) {
479
+ case "object": {
480
+ Array.isArray(s) || (s = Array.from(s));
481
+ for (let o = 0; o < s.length; o++) {
482
+ const i = s[o];
483
+ Z(n, i);
484
+ }
485
+ break;
486
+ }
487
+ case "string":
488
+ case "symbol":
489
+ case "number": {
490
+ Z(n, s);
491
+ break;
492
+ }
493
+ }
494
+ }
495
+ return n;
496
+ }
497
+ c(wt, "omit");
498
+ function C(e) {
499
+ if (e == null)
500
+ return !0;
501
+ if (ue(e))
502
+ return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !ht(e) && !ct(e) ? !1 : e.length === 0;
503
+ if (typeof e == "object") {
504
+ if (e instanceof Map || e instanceof Set)
505
+ return e.size === 0;
506
+ const t = Object.keys(e);
507
+ return pt(e) ? t.filter((n) => n !== "constructor").length === 0 : t.length === 0;
508
+ }
509
+ return !0;
510
+ }
511
+ c(C, "isEmpty");
512
+ const bt = new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+", "gu");
513
+ function mt(e) {
514
+ return Array.from(e.match(bt) ?? []);
515
+ }
516
+ c(mt, "words");
517
+ function St(e) {
518
+ return typeof e != "string" && (e = Ne(e)), e.replace(/['\u2019]/g, "");
519
+ }
520
+ c(St, "normalizeForCase");
521
+ function At(e) {
522
+ return mt(e).map((n) => n.toLowerCase()).join(" ");
523
+ }
524
+ c(At, "lowerCase$1");
525
+ function Et(e) {
526
+ return At(St(e));
527
+ }
528
+ c(Et, "lowerCase");
529
+ const It = "Header", Rt = "Toolbar", Fe = "Foot", Me = "nextSibling", xt = [
530
+ It,
531
+ Rt,
532
+ Fe
533
+ ], Ot = Object.prototype.hasOwnProperty;
534
+ let v;
535
+ const F = /* @__PURE__ */ c((e, t) => {
536
+ const n = e;
537
+ for (const r in t) {
538
+ if (!Ot.call(t, r) || r === Me)
539
+ continue;
540
+ const s = t[r];
541
+ s !== void 0 && (n[r] = s);
542
+ }
543
+ }, "assignTreeGridSectionFields"), Gt = /* @__PURE__ */ c((e, t) => {
544
+ if (!t || !(e != null && e.Header))
545
+ return;
546
+ let n = t[Me], r = e.Header.nextSibling;
547
+ for (; n && r; )
548
+ F(r, n), n = n.nextSibling, r = r.nextSibling;
549
+ }, "applyTreeGridSubHeaderLayoutText"), Bt = /* @__PURE__ */ c((e) => {
550
+ var t;
551
+ try {
552
+ if (!e || typeof DOMParser != "function")
553
+ return;
554
+ v ?? (v = new DOMParser());
555
+ const r = (t = v.parseFromString(e, "text/xml").documentElement) == null ? void 0 : t.children;
556
+ if (!(r != null && r.length))
557
+ return;
558
+ const s = new Array(r.length);
559
+ for (let o = 0; o < r.length; o += 1) {
560
+ const i = r[o].attributes, f = {};
561
+ for (let a = 0; a < i.length; a += 1) {
562
+ const u = i[a];
563
+ f[u.name] = u.value;
564
+ }
565
+ s[o] = f;
566
+ }
567
+ return s;
568
+ } catch (n) {
569
+ console.error(n);
570
+ return;
571
+ }
572
+ }, "parseTreeGridXmlToJson"), $n = /* @__PURE__ */ c((e, t, n) => {
573
+ var i, f;
574
+ if (!t || !e)
575
+ return;
576
+ const r = (((i = e == null ? void 0 : e.Header) == null ? void 0 : i.Block) ?? 0) > 0, s = t.Header, o = (f = e.Foot) == null ? void 0 : f.lastChild;
577
+ r && s && k(s) && Gt(e, s);
578
+ for (const a of xt) {
579
+ const u = t[a];
580
+ if (!u || !k(u))
581
+ continue;
582
+ if (a === Fe && o) {
583
+ F(o, u);
584
+ continue;
585
+ }
586
+ const l = e[a];
587
+ l && F(l, u);
588
+ }
589
+ n || e.ReloadBody();
590
+ }, "applyTreeGridLayoutToGrid"), Dt = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", _t = "sheet", jt = /* @__PURE__ */ c((e, t) => e.getCell(t), "getWorksheetCell"), Lt = /* @__PURE__ */ c((e, t) => {
591
+ const n = t ?? _t, r = URL.createObjectURL(e), s = document.createElement("a");
592
+ s.href = r, s.download = `${n.normalize("NFC")}.xlsx`, s.click(), URL.revokeObjectURL(r);
593
+ }, "downloadExcelFile"), Pt = /* @__PURE__ */ c((e, t) => ({
594
+ ...oe,
595
+ ...!e && ce,
596
+ ...t
597
+ }), "createCellFont"), Tt = /* @__PURE__ */ c((e) => ({
598
+ ...U,
599
+ ...e
600
+ }), "createCellAlignment"), Nt = /* @__PURE__ */ c((e, t, n) => {
601
+ if (e.border = $, n) {
602
+ e.fill = fe;
603
+ return;
604
+ }
605
+ C(t) || (e.fill = t);
606
+ }, "applyCellFillAndBorder"), Wn = /* @__PURE__ */ c((e) => e.split("").reduce((t, n) => t * 26 + parseInt(n, 36) - 9, 0), "getIndexByLetters"), Cn = /* @__PURE__ */ c((e) => {
607
+ const t = String.fromCharCode(65 + (e - 1) % 26);
608
+ return e > 26 ? String.fromCharCode(64 + (e - 1) / 26) + t : t;
609
+ }, "getLettersByIndex"), Ft = /* @__PURE__ */ c((e, t) => {
610
+ const n = new Blob([e], {
611
+ type: Dt
612
+ });
613
+ Lt(n, t);
614
+ }, "exportExcelByBuffer"), Mt = /* @__PURE__ */ c((e, { key: t, value: n, font: r, alignment: s, fill: o, isHeader: i }) => {
615
+ const f = jt(e, t);
616
+ f.value = n, f.font = Pt(i, r), f.alignment = Tt(s), Nt(f, o, i);
617
+ }, "setCellValue"), Vn = /* @__PURE__ */ c((e, { range: t, value: n, font: r, alignment: s, fill: o, isHeader: i }) => {
618
+ const f = t.split(":")[1];
619
+ e.mergeCells(t), Mt(e, {
620
+ key: f,
621
+ value: n,
622
+ alignment: s,
623
+ font: r,
624
+ fill: o,
625
+ isHeader: i
626
+ });
627
+ }, "setMergeCells"), I = 200, ee = /* @__PURE__ */ new Map(), Ht = "엑셀 다운로드 중 오류가 발생했습니다.", Ut = "TreeGrid 인스턴스가 없습니다.", M = /* @__PURE__ */ c((e) => e == null || typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e instanceof Date, "isPrimitiveCellValue"), S = /* @__PURE__ */ c(() => new Promise((e) => {
628
+ if (typeof requestAnimationFrame == "function") {
629
+ requestAnimationFrame(() => {
630
+ e();
631
+ });
632
+ return;
633
+ }
634
+ setTimeout(e, 0);
635
+ }), "yieldToMain"), te = /* @__PURE__ */ c((e, t, n) => (e == null ? void 0 : e(t, { defaultValue: n })) ?? n, "translateText"), $t = /* @__PURE__ */ c((e) => e.ColNames ?? [], "getGridColNames"), V = /* @__PURE__ */ c((e) => e.Cols, "getGridCols"), Wt = /* @__PURE__ */ c((e) => e.Rows, "getGridRows"), Ct = /* @__PURE__ */ c((e) => e.Header ?? null, "getGridHeader"), Vt = /* @__PURE__ */ c((e) => e.Head ?? null, "getGridHead"), Kt = /* @__PURE__ */ c((e) => e.ExportName, "getGridExportName"), Yt = /* @__PURE__ */ c((e) => (e == null ? void 0 : e.firstChild) ?? null, "getRowFirstChild"), zt = /* @__PURE__ */ c((e) => (e == null ? void 0 : e.nextSibling) ?? null, "getRowNextSibling"), He = /* @__PURE__ */ c((e) => (e ?? "sheet").trim().replace(/[\\/:*?"<>|]/g, "_") || "sheet", "getSafeExportName"), Xt = /* @__PURE__ */ c((e) => He(e).slice(0, 31) || "sheet", "getSafeSheetName"), Ue = /* @__PURE__ */ c((e) => {
636
+ const t = Number(e);
637
+ return !Number.isFinite(t) || t < 1 ? 1 : Math.floor(t);
638
+ }, "toPositiveInt"), H = /* @__PURE__ */ c((e) => e !== 0 && e !== !1 && e !== "0", "isVisible"), qt = /* @__PURE__ */ c((e) => (e == null ? void 0 : e.Type) === "Button" || `${(e == null ? void 0 : e.Button) ?? ""}` == "Button", "isButtonColumn"), Jt = /* @__PURE__ */ c((e) => {
639
+ const t = $t(e).flat(), n = t.length > 0 ? t : typeof e.GetCols == "function" ? e.GetCols() : [], r = [], s = /* @__PURE__ */ new Set();
640
+ for (const o of n)
641
+ !o || s.has(o) || (s.add(o), r.push(o));
642
+ return r;
643
+ }, "getColumnNames"), Zt = /* @__PURE__ */ c((e) => {
644
+ const t = V(e);
645
+ return Jt(e).filter((n) => {
646
+ const r = t[n];
647
+ return !r || n === "Panel" || qt(r) ? !1 : r.CanExport !== 0;
648
+ });
649
+ }, "getAllExportColumns"), Qt = /* @__PURE__ */ c((e, t) => {
650
+ const n = V(e);
651
+ return t.filter((r) => {
652
+ const s = n[r];
653
+ return s ? H(s.Visible) : !1;
654
+ });
655
+ }, "getVisibleExportColumns"), kt = /* @__PURE__ */ c((e) => {
656
+ const t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ c((o) => {
657
+ !o || n.has(o) || o.Kind && o.Kind !== "Header" || (n.add(o), t.push(o));
658
+ }, "appendHeaderRow");
659
+ r(Ct(e));
660
+ let s = Yt(Vt(e));
661
+ for (; s; )
662
+ r(s), s = zt(s);
663
+ return t;
664
+ }, "getHeaderRows"), vt = /* @__PURE__ */ c((e) => {
665
+ if (typeof e.GetShownRows == "function") {
666
+ const r = e.GetShownRows();
667
+ if (Array.isArray(r)) {
668
+ const s = [];
669
+ for (let o = 0; o < r.length; o += 1) {
670
+ const i = r[o];
671
+ !i || i.Kind !== "Data" || !H(i.Visible) || i.Fixed === "Foot" || s.push(i);
672
+ }
673
+ return s;
674
+ }
675
+ }
676
+ const t = [], n = Wt(e);
677
+ for (const r in n) {
678
+ const s = n[r];
679
+ !s || s.Kind !== "Data" || !H(s.Visible) || s.Fixed === "Foot" || t.push(s);
680
+ }
681
+ return t;
682
+ }, "getVisibleDataRows"), en = /* @__PURE__ */ c((e, t) => {
683
+ const n = new Map(e.map((a, u) => [a, u])), r = new Map(
684
+ t.map((a, u) => [a, u])
685
+ ), s = new Array(e.length + 1).fill(0), o = new Array(e.length).fill(-1), i = new Array(e.length).fill(-1);
686
+ let f = -1;
687
+ for (let a = 0; a < e.length; a += 1) {
688
+ const u = e[a];
689
+ if (!u)
690
+ continue;
691
+ const l = r.get(u) ?? -1;
692
+ o[a] = l, s[a + 1] = s[a] + (l >= 0 ? 1 : 0);
693
+ }
694
+ for (let a = e.length - 1; a >= 0; a -= 1)
695
+ o[a] >= 0 && (f = a), i[a] = f;
696
+ return (a, u) => {
697
+ const l = n.get(a);
698
+ if (l === void 0)
699
+ return {
700
+ allColSpan: 1,
701
+ visibleColIndex: null,
702
+ visibleColSpan: 0
703
+ };
704
+ const d = Ue(u), y = Math.min(e.length - 1, l + d - 1), g = i[l], p = g >= 0 && g <= y ? o[g] : null, A = s[y + 1] - s[l];
705
+ return {
706
+ allColSpan: d,
707
+ visibleColIndex: p !== null && p >= 0 ? p : null,
708
+ visibleColSpan: A
709
+ };
710
+ };
711
+ }, "createSpanResolver"), tn = /* @__PURE__ */ c((e) => {
712
+ const t = `${(e == null ? void 0 : e.Align) ?? ""}`.toLowerCase();
713
+ return t === "left" || t === "center" || t === "right" ? t : (e == null ? void 0 : e.Type) === "Int" || (e == null ? void 0 : e.Type) === "Float" ? "right" : (e == null ? void 0 : e.Type) === "Date" || (e == null ? void 0 : e.Type) === "Enum" ? "center" : "left";
714
+ }, "getCellHorizontalAlignment"), nn = /* @__PURE__ */ c((e) => {
715
+ if ((e == null ? void 0 : e.Type) !== "Date")
716
+ return null;
717
+ const t = `${e.Format ?? ""}`.trim();
718
+ if (!t)
719
+ return null;
720
+ const n = ee.get(t);
721
+ if (n !== void 0)
722
+ return n;
723
+ const r = "__TREEGRID_MINUTE_TWO__", s = "__TREEGRID_MINUTE_ONE__", o = t.replace(/yyyy/g, "YYYY").replace(/yy/g, "YY").replace(/tt/g, "A").replace(/hh/g, "HH").replace(/\bh\b/g, "H").replace(/(H{1,2}:)mm/g, `$1${r}`).replace(/(H{1,2}:)m/g, `$1${s}`).replace(/mmmm/g, "MMMM").replace(/mmm/g, "MMM").replace(/mm/g, "MM").replace(/\bm\b/g, "M").replace(new RegExp(r, "g"), "mm").replace(new RegExp(s, "g"), "m").replace(/dddd/g, "dddd").replace(/ddd/g, "ddd").replace(/dd/g, "DD").replace(/\bd\b/g, "D");
724
+ return ee.set(t, o), o;
725
+ }, "getDayjsDateFormat"), j = /* @__PURE__ */ c((e, t) => {
726
+ const n = nn(t);
727
+ if (!n || !M(e) || e === null || e === void 0 || e === "" || typeof e == "boolean")
728
+ return null;
729
+ const r = ae(e);
730
+ return r.isValid() ? r.format(n) : null;
731
+ }, "formatDateValue"), L = /* @__PURE__ */ c((e, t) => (t == null ? void 0 : t.Type) !== "Bool" ? null : e == null || e === "" ? "" : e === !0 || e === 1 || e === "1" || e === "Y" || e === "y" || e === "true" || e === "TRUE" ? "Y" : e === !1 || e === 0 || e === "0" || e === "N" || e === "n" || e === "false" || e === "FALSE" ? "N" : null, "formatBoolValue"), ne = /* @__PURE__ */ c((e, t, n) => {
732
+ const r = t == null ? void 0 : t[n];
733
+ return r != null ? String(r) : typeof e.GetCaption == "function" ? e.GetCaption(n) ?? "" : n;
734
+ }, "getHeaderValue"), w = /* @__PURE__ */ c((e, t) => {
735
+ const n = `${(t == null ? void 0 : t.HtmlPostfix) ?? ""}`;
736
+ return !n || e === null || e === void 0 || e === "" ? e : `${e}${n}`;
737
+ }, "appendHtmlPostfix"), rn = /* @__PURE__ */ c((e, t, n, r) => {
738
+ if ((r == null ? void 0 : r.Type) === "Enum" && typeof e.GetString == "function") {
739
+ const f = e.GetString(t, n);
740
+ if (f != null)
741
+ return w(f, r);
742
+ }
743
+ const s = t[n], o = L(s, r);
744
+ if (o !== null)
745
+ return w(o, r);
746
+ const i = j(s, r);
747
+ if (i !== null)
748
+ return w(i, r);
749
+ if (M(s))
750
+ return w(s, r);
751
+ if (typeof e.GetValue == "function") {
752
+ const f = e.GetValue(t, n), a = L(f, r);
753
+ if (a !== null)
754
+ return w(a, r);
755
+ const u = j(f, r);
756
+ if (u !== null)
757
+ return w(u, r);
758
+ if (M(f))
759
+ return w(f, r);
760
+ }
761
+ if (typeof e.GetString == "function") {
762
+ const f = e.GetString(t, n), a = L(f, r);
763
+ if (a !== null)
764
+ return w(a, r);
765
+ const u = j(f, r);
766
+ if (u !== null)
767
+ return w(u, r);
768
+ if (f != null)
769
+ return w(f, r);
770
+ }
771
+ return "";
772
+ }, "getBodyValue"), sn = /* @__PURE__ */ c(({
773
+ colName: e,
774
+ resolveSpan: t,
775
+ row: n,
776
+ rowIndex: r,
777
+ totalRows: s
778
+ }) => {
779
+ const o = Math.min(
780
+ Ue(n[`${e}RowSpan`]),
781
+ Math.max(1, s - r)
782
+ ), { allColSpan: i, visibleColIndex: f, visibleColSpan: a } = t(
783
+ e,
784
+ n[`${e}Span`]
785
+ );
786
+ return {
787
+ allColSpan: i,
788
+ rowSpan: o,
789
+ visibleColIndex: f,
790
+ visibleColSpan: a
791
+ };
792
+ }, "getCellSpanInfo"), cn = /* @__PURE__ */ c((e, t, n) => {
793
+ var r;
794
+ return (r = e.get(t)) == null ? void 0 : r.has(n);
795
+ }, "isOccupied"), on = /* @__PURE__ */ c((e, t, n, r, s) => {
796
+ for (let o = t; o < t + r; o += 1) {
797
+ const i = e.get(o) ?? /* @__PURE__ */ new Set();
798
+ for (let f = n; f < n + s; f += 1)
799
+ i.add(f);
800
+ e.set(o, i);
801
+ }
802
+ }, "markOccupied"), $e = /* @__PURE__ */ c(async ({
803
+ allExportColumns: e,
804
+ getValue: t,
805
+ onVisibleEntry: n,
806
+ resolveSpan: r,
807
+ rows: s
808
+ }) => {
809
+ if (!e.length)
810
+ return [];
811
+ const o = /* @__PURE__ */ new Map(), i = s.map(() => []);
812
+ for (let f = 0; f < s.length; f += 1) {
813
+ const a = s[f], u = i[f];
814
+ if (!(!a || !u)) {
815
+ for (let l = 0; l < e.length; l += 1) {
816
+ const d = e[l];
817
+ if (!d || cn(o, f, l))
818
+ continue;
819
+ const { allColSpan: y, rowSpan: g, visibleColIndex: p, visibleColSpan: A } = sn({
820
+ row: a,
821
+ colName: d,
822
+ rowIndex: f,
823
+ totalRows: s.length,
824
+ resolveSpan: r
825
+ });
826
+ if (on(o, f, l, g, y), p === null || A < 1)
827
+ continue;
828
+ const B = t(a, d);
829
+ n == null || n(p, B), u.push({
830
+ colIndex: p,
831
+ value: B,
832
+ rowSpan: g,
833
+ colSpan: A
834
+ });
835
+ }
836
+ (f + 1) % I === 0 && await S();
837
+ }
838
+ }
839
+ return i;
840
+ }, "createEntryRows"), fn = /* @__PURE__ */ c(async ({
841
+ allExportColumns: e,
842
+ grid: t,
843
+ headerRows: n,
844
+ resolveSpan: r,
845
+ visibleExportColumns: s
846
+ }) => s.length ? n.length ? $e({
847
+ allExportColumns: e,
848
+ getValue: /* @__PURE__ */ c((o, i) => ne(t, o, i), "getValue"),
849
+ resolveSpan: r,
850
+ rows: n
851
+ }) : [
852
+ s.map((o, i) => ({
853
+ colName: o,
854
+ colIndex: i,
855
+ value: ne(t, null, o),
856
+ rowSpan: 1,
857
+ colSpan: 1
858
+ }))
859
+ ] : [], "createHeaderEntries"), an = /* @__PURE__ */ c(async ({
860
+ allExportColumns: e,
861
+ columns: t,
862
+ onVisibleEntry: n,
863
+ grid: r,
864
+ dataRows: s,
865
+ resolveSpan: o,
866
+ visibleExportColumns: i
867
+ }) => i.length ? $e({
868
+ allExportColumns: e,
869
+ getValue: /* @__PURE__ */ c((f, a) => rn(r, f, a, t[a]), "getValue"),
870
+ onVisibleEntry: n,
871
+ resolveSpan: o,
872
+ rows: s
873
+ }) : [], "createBodyEntries"), re = /* @__PURE__ */ c(async (e, t, n) => {
874
+ const r = e.rowCount + 1, s = [];
875
+ for (let o = 0; o < t.length; o += 1) {
876
+ const i = t[o] ?? [], f = new Array(n).fill("");
877
+ for (let a = 0; a < i.length; a += 1) {
878
+ const u = i[a];
879
+ u && (f[u.colIndex] = u.value ?? "");
880
+ }
881
+ s.push(f), s.length === I ? (e.addRows(s), s.length = 0, await S()) : (o + 1) % I === 0 && await S();
882
+ }
883
+ return s.length && e.addRows(s), r;
884
+ }, "appendEntryRows"), se = /* @__PURE__ */ c(async (e, t, n) => {
885
+ for (let r = 0; r < t.length; r += 1) {
886
+ const s = t[r] ?? [];
887
+ for (let o = 0; o < s.length; o += 1) {
888
+ const i = s[o];
889
+ i && (i.rowSpan === 1 && i.colSpan === 1 || e.mergeCells(
890
+ n + r,
891
+ i.colIndex + 1,
892
+ n + r + i.rowSpan - 1,
893
+ i.colIndex + i.colSpan
894
+ ));
895
+ }
896
+ (r + 1) % I === 0 && await S();
897
+ }
898
+ }, "mergeEntryRows"), un = /* @__PURE__ */ c(async (e, t, n, r) => {
899
+ for (let s = 0; s < n; s += 1) {
900
+ const o = e.getRow(t + s);
901
+ o.font = oe;
902
+ for (let i = 1; i <= r; i += 1) {
903
+ const f = o.getCell(i);
904
+ f.fill = fe, f.border = $, f.alignment = {
905
+ ...U,
906
+ horizontal: "center"
907
+ };
908
+ }
909
+ (s + 1) % I === 0 && await S();
910
+ }
911
+ }, "styleHeaderRows"), ln = /* @__PURE__ */ c(async (e, t, n, r) => {
912
+ for (let s = 0; s < n; s += 1) {
913
+ const o = e.getRow(t + s);
914
+ o.font = ce;
915
+ for (let i = 1; i <= r; i += 1)
916
+ o.getCell(i).border = $;
917
+ (s + 1) % I === 0 && await S();
918
+ }
919
+ }, "styleBodyRows"), dn = /* @__PURE__ */ c((e) => {
920
+ const t = Number((e == null ? void 0 : e.Width) ?? (e == null ? void 0 : e.MinWidth));
921
+ return !Number.isFinite(t) || t <= 0 ? null : Math.min(Math.max(Math.round(t / 8), 10), 50);
922
+ }, "getPreferredColumnWidth"), ie = /* @__PURE__ */ c((e) => Math.min(Math.max(e + 4, 10), 50), "getAutoColumnWidth"), yn = /* @__PURE__ */ c((e, t, n) => {
923
+ const r = new Array(n.length).fill(10), s = new Array(n.length).fill(!1);
924
+ for (let o = 0; o < n.length; o += 1) {
925
+ const i = n[o];
926
+ if (!i)
927
+ continue;
928
+ const f = t[i], a = dn(f);
929
+ if (a !== null) {
930
+ r[o] = a, s[o] = !0;
931
+ continue;
932
+ }
933
+ const u = (typeof e.GetCaption == "function" ? e.GetCaption(i) : "") || i;
934
+ r[o] = ie(`${u}`.length);
935
+ }
936
+ return {
937
+ widths: r,
938
+ updateWidth: /* @__PURE__ */ c((o, i) => {
939
+ if (s[o])
940
+ return;
941
+ const f = r[o];
942
+ if (f === void 0)
943
+ return;
944
+ const a = ie(`${i ?? ""}`.length);
945
+ a > f && (r[o] = a);
946
+ }, "updateWidth")
947
+ };
948
+ }, "createColumnWidths"), We = /* @__PURE__ */ c(async (e, t) => {
949
+ try {
950
+ const n = typeof t == "string" ? { exportName: t } : t, r = n == null ? void 0 : n.t;
951
+ if (!e)
952
+ throw new Error(
953
+ te(r, "Message.TreeGrid 인스턴스가 없습니다.", Ut)
954
+ );
955
+ const s = V(e), o = Zt(e), i = Qt(e, o), { widths: f, updateWidth: a } = yn(e, s, i), u = kt(e), l = vt(e), d = en(o, i), y = await fn({
956
+ allExportColumns: o,
957
+ grid: e,
958
+ headerRows: u,
959
+ resolveSpan: d,
960
+ visibleExportColumns: i
961
+ }), g = await an({
962
+ allExportColumns: o,
963
+ columns: s,
964
+ dataRows: l,
965
+ grid: e,
966
+ onVisibleEntry: a,
967
+ resolveSpan: d,
968
+ visibleExportColumns: i
969
+ }), p = new qe.Workbook(), A = (n == null ? void 0 : n.exportName) ?? Kt(e) ?? e.id ?? "sheet", B = n != null && n.useAppendCurrentDateTimeToExportName ? `-${ae().format("YYYY-MM-DD-HH-mm-ss")}` : "", Y = He(`${A}${B}`), b = p.addWorksheet(Xt(Y)), z = await re(
970
+ b,
971
+ y,
972
+ i.length
973
+ ), X = await re(
974
+ b,
975
+ g,
976
+ i.length
977
+ );
978
+ for (let R = 0; R < i.length; R += 1) {
979
+ const q = i[R];
980
+ if (!q)
981
+ continue;
982
+ const Ke = s[q], J = b.getColumn(R + 1);
983
+ J.width = f[R], J.alignment = {
984
+ ...U,
985
+ horizontal: tn(Ke)
986
+ };
987
+ }
988
+ await se(b, y, z), await se(b, g, X), await un(
989
+ b,
990
+ z,
991
+ y.length,
992
+ i.length
993
+ ), await ln(
994
+ b,
995
+ X,
996
+ g.length,
997
+ i.length
998
+ ), b.views = [{ state: "frozen", ySplit: y.length }], await S();
999
+ const Ve = await p.xlsx.writeBuffer({
1000
+ useSharedStrings: !1,
1001
+ useStyles: !0
1002
+ });
1003
+ Ft(Ve, Y);
1004
+ } catch (n) {
1005
+ const r = typeof t == "string" ? {} : t, s = r == null ? void 0 : r.t;
1006
+ Je(
1007
+ n instanceof Error ? n.message : te(
1008
+ s,
1009
+ "Message.엑셀 다운로드 중 오류가 발생했습니다.",
1010
+ Ht
1011
+ ),
1012
+ {
1013
+ variant: "error"
1014
+ }
1015
+ );
1016
+ }
1017
+ }, "exportTreeGridExcel"), Kn = We, gn = ["Added", "Changed"], pn = ["OWP", "IPX"], hn = /* @__PURE__ */ c((e) => Object.values((e == null ? void 0 : e.Rows) ?? {}).filter((t) => t.Kind === "Data"), "getDataRows"), wn = /* @__PURE__ */ c((e, t) => {
1018
+ const n = (t == null ? void 0 : t.insertPosition) ?? "top", r = t == null ? void 0 : t.parent, s = t == null ? void 0 : t.anchorRow;
1019
+ let o = r ?? (s ? s.parentNode : null) ?? e.GetFirst(), i = null;
1020
+ switch (n) {
1021
+ case "top":
1022
+ i = e.GetFirst();
1023
+ break;
1024
+ case "last":
1025
+ o = e.GetNext(e.GetLast(), e.RowCount > 0 ? e.RowCount + 1 : 0), i = o;
1026
+ break;
1027
+ case "above":
1028
+ i = s ?? e.GetFirst();
1029
+ break;
1030
+ case "below":
1031
+ i = (s == null ? void 0 : s.nextSibling) ?? e.GetFirst();
1032
+ break;
1033
+ }
1034
+ return { resolvedParent: o, next: i };
1035
+ }, "resolveRowInsertionTarget"), bn = /* @__PURE__ */ c((e, t) => {
1036
+ N(t) && Object.entries(t).forEach(([n, r]) => {
1037
+ e[n] = r;
1038
+ });
1039
+ }, "assignInitialRowValues"), mn = /* @__PURE__ */ c((e) => pn.some((t) => e.startsWith(t)), "isTreeGridDataKey"), Sn = /* @__PURE__ */ c((e) => Object.fromEntries(
1040
+ dt(Object.keys(e), "id").filter((t) => mn(t) && !C(e[t])).map((t) => [t, e[t]])
1041
+ ), "normalizeAddedRow"), An = /* @__PURE__ */ c((e, t) => e.filter((n) => W(n, t) === "1" && n.Deleted !== "1").map((n) => t === "Changed" ? wt(n, ["id", "Changed"]) : Sn(n)).filter((n) => !C(n)), "getChangedRowsByStatus"), h = /* @__PURE__ */ c((e) => Grids[e], "getTreeGridById"), En = /* @__PURE__ */ c((e) => {
1042
+ const t = h(e);
1043
+ return hn(t);
1044
+ }, "getTreeGridDataRowsById"), In = /* @__PURE__ */ c((e, t) => {
1045
+ const n = h(e);
1046
+ if (!n)
1047
+ return;
1048
+ const r = n.Data.Data;
1049
+ n.Data.Data = {
1050
+ ...r,
1051
+ Data: { Body: [t || []] },
1052
+ Url: ""
1053
+ }, n.ReloadBody();
1054
+ }, "reloadTreeGridBodyById"), Rn = /* @__PURE__ */ c((e, t) => {
1055
+ const n = h(e);
1056
+ if (!n)
1057
+ return;
1058
+ const r = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, { resolvedParent: o, next: i } = wn(n, t), f = n.AddRow(o, i, 1);
1059
+ bn(f, s), f.CanEdit = 1, f.CanDelete = 1, f.CanSelect = r ? 1 : 0, n.Focus(f), n.RefreshRow(f);
1060
+ }, "addTreeGridRowById"), xn = /* @__PURE__ */ c((e) => {
1061
+ const t = h(e), n = Bt(t == null ? void 0 : t.GetXmlData("changes,allcols,nogrid,noio"));
1062
+ return ut(n) ? Object.fromEntries(
1063
+ gn.map((r) => [
1064
+ Et(r),
1065
+ An(n, r)
1066
+ ])
1067
+ ) : { added: [], changed: [] };
1068
+ }, "getTreeGridRowChangesById"), On = /* @__PURE__ */ c((e, t) => {
1069
+ const n = h(e);
1070
+ n && We(n, { exportName: t ?? "" });
1071
+ }, "exportTreeGridToExcelById"), Gn = /* @__PURE__ */ c((e) => {
1072
+ const t = h(e);
1073
+ return (t == null ? void 0 : t.GetSelRows()) ?? [];
1074
+ }, "getTreeGridSelectedRowsById"), Bn = /* @__PURE__ */ c((e, t) => {
1075
+ const n = h(e);
1076
+ if (!n || !(t != null && t.targetKey))
1077
+ return;
1078
+ const r = t == null ? void 0 : t.targetKey;
1079
+ if (t == null ? void 0 : t.canVisible) {
1080
+ n.ShowCol(r);
1081
+ return;
1082
+ }
1083
+ n.HideCol(r);
1084
+ }, "setTreeGridColumnVisibilityById"), Dn = /* @__PURE__ */ c((e, t) => {
1085
+ const n = h(e), r = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
1086
+ !n || !r || !s || (n.SetValue(r, `${s}Class`, ze), n.SetValue(r, `${s}Color`, Xe), n.RefreshCell(r, s));
1087
+ }, "highlightTreeGridCellById"), K = /* @__PURE__ */ c((e) => {
1088
+ const t = h(e);
1089
+ t && t.ActionDeselectAll(1, 0);
1090
+ }, "resetTreeGridSelectionById"), _n = /* @__PURE__ */ c((e) => {
1091
+ e.forEach(K);
1092
+ }, "resetTreeGridSelectionsByIds"), Ce = /* @__PURE__ */ c((e) => {
1093
+ const t = h(e);
1094
+ t && (t.ActionUndoAll(1, 0), K(e));
1095
+ }, "resetTreeGridChangesById"), jn = /* @__PURE__ */ c((e) => {
1096
+ e.forEach(Ce);
1097
+ }, "resetTreeGridChangesByIds"), Ln = /* @__PURE__ */ c((e, t, n, r, s) => {
1098
+ if (!(n != null && n.length))
1099
+ return;
1100
+ const o = h(e);
1101
+ if (!o)
1102
+ return;
1103
+ const i = n.map((a) => {
1104
+ const u = a;
1105
+ return `${s.map((d) => u[d]).find((d) => d != null && d !== "") ?? ""}`;
1106
+ }).join("|"), f = n.map((a) => `${a[r] ?? ""}`).join("|");
1107
+ o.SetAttribute(null, t, "Type", "Enum", 0, 0), o.SetAttribute(null, t, "Enum", `|${i}`, 0, 0), o.SetAttribute(null, t, "EnumKeys", `|${f}`, 1, 0);
1108
+ }, "setTreeGridColumnEnumOptionsById"), Yn = h, zn = En, Xn = In, qn = Rn, Jn = xn, Zn = On, Qn = Gn, kn = Bn, vn = Dn, er = K, tr = _n, nr = Ce, rr = jn, sr = Ln;
1109
+ export {
1110
+ T as $,
1111
+ En as A,
1112
+ In as B,
1113
+ Rn as C,
1114
+ xn as D,
1115
+ Gn as E,
1116
+ Dn as F,
1117
+ K as G,
1118
+ _n as H,
1119
+ Ce as I,
1120
+ jn as J,
1121
+ Yn as K,
1122
+ zn as L,
1123
+ Xn as M,
1124
+ qn as N,
1125
+ Jn as O,
1126
+ Zn as P,
1127
+ Qn as Q,
1128
+ kn as R,
1129
+ vn as S,
1130
+ er as T,
1131
+ tr as U,
1132
+ nr as V,
1133
+ rr as W,
1134
+ sr as X,
1135
+ ke as Y,
1136
+ it as Z,
1137
+ Hn as _,
1138
+ at as a,
1139
+ x as a0,
1140
+ we as a1,
1141
+ pe as a2,
1142
+ he as a3,
1143
+ le as a4,
1144
+ ct as a5,
1145
+ Te as a6,
1146
+ P as a7,
1147
+ ft as a8,
1148
+ ht as a9,
1149
+ gt as aa,
1150
+ de as b,
1151
+ E as c,
1152
+ Ne as d,
1153
+ ve as e,
1154
+ C as f,
1155
+ Un as g,
1156
+ ut as h,
1157
+ ue as i,
1158
+ Ft as j,
1159
+ Vn as k,
1160
+ Mt as l,
1161
+ Cn as m,
1162
+ On as n,
1163
+ $n as o,
1164
+ wt as p,
1165
+ W as q,
1166
+ Bn as r,
1167
+ Ln as s,
1168
+ ye as t,
1169
+ k as u,
1170
+ N as v,
1171
+ h as w,
1172
+ We as x,
1173
+ Wn as y,
1174
+ Kn as z
1175
+ };
1176
+ //# sourceMappingURL=treeGridUtil-CGze1rYA.js.map