open-grid 0.2.0 → 0.3.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.
@@ -1,4 +1,4 @@
1
- class qe {
1
+ class Ye {
2
2
  constructor() {
3
3
  this.listeners = /* @__PURE__ */ new Map();
4
4
  }
@@ -15,18 +15,18 @@ class qe {
15
15
  return this.listeners.delete(e), this;
16
16
  const s = this.listeners.get(e);
17
17
  if (s) {
18
- const n = s.filter((i) => i.handler !== t);
19
- n.length === 0 ? this.listeners.delete(e) : this.listeners.set(e, n);
18
+ const i = s.filter((n) => n.handler !== t);
19
+ i.length === 0 ? this.listeners.delete(e) : this.listeners.set(e, i);
20
20
  }
21
21
  return this;
22
22
  }
23
23
  emit(e, ...t) {
24
24
  const s = this.listeners.get(e);
25
25
  if (!s || s.length === 0) return !1;
26
- const n = [];
27
- for (const i of s)
28
- i.handler(...t), i.once || n.push(i);
29
- return n.length !== s.length && (n.length === 0 ? this.listeners.delete(e) : this.listeners.set(e, n)), !0;
26
+ const i = [];
27
+ for (const n of s)
28
+ n.handler(...t), n.once || i.push(n);
29
+ return i.length !== s.length && (i.length === 0 ? this.listeners.delete(e) : this.listeners.set(e, i)), !0;
30
30
  }
31
31
  removeAllListeners(e) {
32
32
  return e ? this.listeners.delete(e) : this.listeners.clear(), this;
@@ -36,19 +36,19 @@ class qe {
36
36
  return ((t = this.listeners.get(e)) == null ? void 0 : t.length) ?? 0;
37
37
  }
38
38
  }
39
- let Ye = 0;
39
+ let Xe = 0;
40
40
  function Me() {
41
- return `og-r-${++Ye}`;
41
+ return `og-r-${++Xe}`;
42
42
  }
43
- class Xe {
43
+ class Ge {
44
44
  constructor(e = "_ogRowId") {
45
45
  this._data = [], this._original = [], this._meta = /* @__PURE__ */ new Map(), this._displayIndexes = [], this._idMap = /* @__PURE__ */ new Map(), this._findQuery = "", this._findFields = [], this._idField = e;
46
46
  }
47
47
  // ─── 데이터 설정 ──────────────────────────────────────
48
48
  setData(e) {
49
49
  this._data = e.map((t) => {
50
- const s = Me(), n = { ...t, [this._idField]: s };
51
- return this._meta.set(s, { state: "none", rowId: s }), n;
50
+ const s = Me(), i = { ...t, [this._idField]: s };
51
+ return this._meta.set(s, { state: "none", rowId: s }), i;
52
52
  }), this._original = this._data.map((t) => ({ ...t })), this._rebuildIdMap(), this._displayIndexes = this._data.map((t, s) => s);
53
53
  }
54
54
  getData() {
@@ -71,44 +71,44 @@ class Xe {
71
71
  }
72
72
  // ─── 행 CRUD ──────────────────────────────────────────
73
73
  addRow(e, t = "last") {
74
- const s = Me(), n = { ...e, [this._idField]: s };
74
+ const s = Me(), i = { ...e, [this._idField]: s };
75
75
  if (this._meta.set(s, { state: "added", rowId: s }), t === "last") {
76
- const i = this._data.push(n) - 1;
77
- this._idMap.set(s, i), this._displayIndexes.push(i);
76
+ const n = this._data.push(i) - 1;
77
+ this._idMap.set(s, n), this._displayIndexes.push(n);
78
78
  } else if (t === "first")
79
- this._data.unshift(n), this._rebuildIdMap(), this._displayIndexes.unshift(0);
79
+ this._data.unshift(i), this._rebuildIdMap(), this._displayIndexes.unshift(0);
80
80
  else {
81
- const i = Math.min(t, this._displayIndexes.length), o = i < this._displayIndexes.length ? this._displayIndexes[i] : this._data.length;
82
- this._data.splice(o, 0, n), this._rebuildIdMap(), this._displayIndexes = this._data.map((l, r) => r);
81
+ const n = Math.min(t, this._displayIndexes.length), o = n < this._displayIndexes.length ? this._displayIndexes[n] : this._data.length;
82
+ this._data.splice(o, 0, i), this._rebuildIdMap(), this._displayIndexes = this._data.map((l, r) => r);
83
83
  }
84
84
  }
85
85
  removeRow(e) {
86
86
  const t = this._displayIndexes[e];
87
87
  if (t === void 0) return;
88
- const s = this._data[t], n = s[this._idField], i = this._meta.get(n);
89
- return (i == null ? void 0 : i.state) === "added" ? (this._data.splice(t, 1), this._meta.delete(n)) : this._meta.set(n, { ...i, state: "removed" }), this._rebuildIdMap(), this._displayIndexes = this._data.map((o, l) => ({ r: o, i: l })).filter(({ r: o }) => {
88
+ const s = this._data[t], i = s[this._idField], n = this._meta.get(i);
89
+ return (n == null ? void 0 : n.state) === "added" ? (this._data.splice(t, 1), this._meta.delete(i)) : this._meta.set(i, { ...n, state: "removed" }), this._rebuildIdMap(), this._displayIndexes = this._data.map((o, l) => ({ r: o, i: l })).filter(({ r: o }) => {
90
90
  var l;
91
91
  return ((l = this._meta.get(o[this._idField])) == null ? void 0 : l.state) !== "removed";
92
92
  }).map(({ i: o }) => o), s;
93
93
  }
94
94
  moveRow(e, t) {
95
- const s = this._displayIndexes[e], n = this._displayIndexes[t];
96
- if (s === void 0 || n === void 0) return;
97
- const [i] = this._data.splice(s, 1), o = s < n ? n - 1 : n;
98
- this._data.splice(o, 0, i), this._rebuildIdMap(), this._displayIndexes = this._data.map((l, r) => ({ r: l, i: r })).filter(({ r: l }) => {
95
+ const s = this._displayIndexes[e], i = this._displayIndexes[t];
96
+ if (s === void 0 || i === void 0) return;
97
+ const [n] = this._data.splice(s, 1), o = s < i ? i - 1 : i;
98
+ this._data.splice(o, 0, n), this._rebuildIdMap(), this._displayIndexes = this._data.map((l, r) => ({ r: l, i: r })).filter(({ r: l }) => {
99
99
  var r;
100
100
  return ((r = this._meta.get(l[this._idField])) == null ? void 0 : r.state) !== "removed";
101
101
  }).map(({ i: l }) => l);
102
102
  }
103
103
  updateCell(e, t, s) {
104
- const n = this._displayIndexes[e];
105
- if (n === void 0) return !1;
106
- const o = this._data[n][this._idField], l = this._meta.get(o);
104
+ const i = this._displayIndexes[e];
105
+ if (i === void 0) return !1;
106
+ const o = this._data[i][this._idField], l = this._meta.get(o);
107
107
  return (l == null ? void 0 : l.state) === "none" && this._meta.set(o, {
108
108
  ...l,
109
109
  state: "edited",
110
- original: { ...this._original[n] }
111
- }), this._data[n][t] = s, !0;
110
+ original: { ...this._original[i] }
111
+ }), this._data[i][t] = s, !0;
112
112
  }
113
113
  getRowByIndex(e) {
114
114
  const t = this._displayIndexes[e];
@@ -154,17 +154,17 @@ class Xe {
154
154
  */
155
155
  getChanges() {
156
156
  const e = [], t = [], s = [];
157
- for (const n of this._data) {
158
- const i = n[this._idField], o = this._meta.get(i), l = (o == null ? void 0 : o.state) ?? "none";
157
+ for (const i of this._data) {
158
+ const n = i[this._idField], o = this._meta.get(n), l = (o == null ? void 0 : o.state) ?? "none";
159
159
  if (l === "added")
160
- e.push({ ...n });
160
+ e.push({ ...i });
161
161
  else if (l === "removed")
162
- s.push({ ...n });
162
+ s.push({ ...i });
163
163
  else if (l === "edited") {
164
- const r = o.original ?? {}, a = Object.keys(n).filter(
165
- (c) => c !== this._idField && n[c] !== r[c]
164
+ const r = o.original ?? {}, a = Object.keys(i).filter(
165
+ (c) => c !== this._idField && i[c] !== r[c]
166
166
  );
167
- t.push({ ...n, _changedFields: a });
167
+ t.push({ ...i, _changedFields: a });
168
168
  }
169
169
  }
170
170
  return { added: e, edited: t, removed: s };
@@ -178,25 +178,25 @@ class Xe {
178
178
  var t;
179
179
  return ((t = this._meta.get(e[this._idField])) == null ? void 0 : t.state) === "edited";
180
180
  }).map((e) => {
181
- var n;
182
- const t = ((n = this._meta.get(e[this._idField])) == null ? void 0 : n.original) ?? {}, s = [];
183
- for (const i of Object.keys(e))
184
- i !== this._idField && e[i] !== t[i] && s.push({ field: i, oldValue: t[i], newValue: e[i] });
185
- return { row: { ...e }, fields: s.map((i) => i.field), diff: s };
181
+ var i;
182
+ const t = ((i = this._meta.get(e[this._idField])) == null ? void 0 : i.original) ?? {}, s = [];
183
+ for (const n of Object.keys(e))
184
+ n !== this._idField && e[n] !== t[n] && s.push({ field: n, oldValue: t[n], newValue: e[n] });
185
+ return { row: { ...e }, fields: s.map((n) => n.field), diff: s };
186
186
  });
187
187
  }
188
188
  /** rowIndex 행의 원본(수정 전) 데이터 반환. 추가된 행은 undefined. */
189
189
  getOriginalRow(e) {
190
190
  const t = this._displayIndexes[e];
191
191
  if (t === void 0) return;
192
- const s = this._data[t], n = this._meta.get(s[this._idField]);
193
- if (!(!n || n.state === "added"))
194
- return n.state === "edited" && n.original ? { ...n.original } : { ...this._original[t] };
192
+ const s = this._data[t], i = this._meta.get(s[this._idField]);
193
+ if (!(!i || i.state === "added"))
194
+ return i.state === "edited" && i.original ? { ...i.original } : { ...this._original[t] };
195
195
  }
196
196
  getRowsWithState(e) {
197
197
  return this._data.map((t) => {
198
- var n;
199
- const s = ((n = this._meta.get(t[this._idField])) == null ? void 0 : n.state) ?? "none";
198
+ var i;
199
+ const s = ((i = this._meta.get(t[this._idField])) == null ? void 0 : i.state) ?? "none";
200
200
  return { ...t, [e]: s };
201
201
  });
202
202
  }
@@ -207,24 +207,24 @@ class Xe {
207
207
  }
208
208
  // ─── 정렬 ─────────────────────────────────────────────
209
209
  applySort(e) {
210
- const t = (n) => {
211
- var i, o;
212
- return ((o = this._meta.get((i = this._data[n]) == null ? void 0 : i[this._idField])) == null ? void 0 : o.state) !== "removed";
210
+ const t = (i) => {
211
+ var n, o;
212
+ return ((o = this._meta.get((n = this._data[i]) == null ? void 0 : n[this._idField])) == null ? void 0 : o.state) !== "removed";
213
213
  };
214
214
  if (e.length === 0) {
215
- this._displayIndexes = this._data.map((n, i) => i).filter(t);
215
+ this._displayIndexes = this._data.map((i, n) => n).filter(t);
216
216
  return;
217
217
  }
218
- const s = this._displayIndexes.filter(t).map((n) => {
219
- const i = this._data[n];
218
+ const s = this._displayIndexes.filter(t).map((i) => {
219
+ const n = this._data[i];
220
220
  return {
221
- idx: n,
222
- keys: e.map((o) => i[o.field])
221
+ idx: i,
222
+ keys: e.map((o) => n[o.field])
223
223
  };
224
224
  });
225
- s.sort((n, i) => {
225
+ s.sort((i, n) => {
226
226
  for (let o = 0; o < e.length; o++) {
227
- const l = e[o].dir, r = n.keys[o], a = i.keys[o];
227
+ const l = e[o].dir, r = i.keys[o], a = n.keys[o];
228
228
  let c = 0;
229
229
  if (r == null && a == null) c = 0;
230
230
  else if (r == null) c = -1;
@@ -237,23 +237,23 @@ class Xe {
237
237
  if (c !== 0) return l === "asc" ? c : -c;
238
238
  }
239
239
  return 0;
240
- }), this._displayIndexes = s.map((n) => n.idx);
240
+ }), this._displayIndexes = s.map((i) => i.idx);
241
241
  }
242
242
  // ─── 필터 ─────────────────────────────────────────────
243
243
  applyFilter(e) {
244
244
  const t = Object.keys(e);
245
- this._displayIndexes = this._data.map((s, n) => ({ r: s, i: n })).filter(({ r: s }) => {
246
- var n;
247
- if (((n = this._meta.get(s[this._idField])) == null ? void 0 : n.state) === "removed" || t.length > 0 && !t.every((i) => {
248
- const o = s[i];
249
- return e[i].every((l) => Ge(o, l));
245
+ this._displayIndexes = this._data.map((s, i) => ({ r: s, i })).filter(({ r: s }) => {
246
+ var i;
247
+ if (((i = this._meta.get(s[this._idField])) == null ? void 0 : i.state) === "removed" || t.length > 0 && !t.every((n) => {
248
+ const o = s[n];
249
+ return e[n].every((l) => Qe(o, l));
250
250
  }))
251
251
  return !1;
252
252
  if (this._findQuery && this._findFields.length > 0) {
253
- const i = this._findQuery;
253
+ const n = this._findQuery;
254
254
  if (!this._findFields.some((l) => {
255
255
  const r = s[l];
256
- return r != null && String(r).toLowerCase().includes(i);
256
+ return r != null && String(r).toLowerCase().includes(n);
257
257
  })) return !1;
258
258
  }
259
259
  return !0;
@@ -270,7 +270,7 @@ class Xe {
270
270
  });
271
271
  }
272
272
  }
273
- function Ge(d, e) {
273
+ function Qe(d, e) {
274
274
  const t = d, s = e.value;
275
275
  switch (e.operator) {
276
276
  case "=":
@@ -295,7 +295,7 @@ function Ge(d, e) {
295
295
  return !0;
296
296
  }
297
297
  }
298
- class Qe {
298
+ class Je {
299
299
  constructor(e, t) {
300
300
  this._totalRows = 0, this._scrollTop = 0, this._viewportHeight = 0, this._rafId = null, this._onScroll = () => {
301
301
  this._scrollTop = this.container.scrollTop, this._scheduleRender();
@@ -312,8 +312,8 @@ class Qe {
312
312
  const e = Math.ceil(this._viewportHeight / this.rowHeight), t = Math.max(0, Math.floor(this._scrollTop / this.rowHeight) - this.overscan), s = Math.min(
313
313
  this._totalRows - 1,
314
314
  t + e + this.overscan * 2
315
- ), n = t * this.rowHeight;
316
- return { startIndex: t, endIndex: s, offsetY: n };
315
+ ), i = t * this.rowHeight;
316
+ return { startIndex: t, endIndex: s, offsetY: i };
317
317
  }
318
318
  setTotalRows(e) {
319
319
  this._totalRows = e, this._updateSpacerHeight(), this._scheduleRender();
@@ -325,12 +325,12 @@ class Qe {
325
325
  this.rowHeight = e, this._updateSpacerHeight(), this._scheduleRender();
326
326
  }
327
327
  scrollToRow(e) {
328
- const t = e * this.rowHeight, s = t + this.rowHeight, n = this._scrollTop + this._viewportHeight;
328
+ const t = e * this.rowHeight, s = t + this.rowHeight, i = this._scrollTop + this._viewportHeight;
329
329
  if (t < this._scrollTop)
330
330
  this._scrollTop = t, this.container.scrollTop = t;
331
- else if (s > n) {
332
- const i = s - this._viewportHeight;
333
- this._scrollTop = i, this.container.scrollTop = i;
331
+ else if (s > i) {
332
+ const n = s - this._viewportHeight;
333
+ this._scrollTop = n, this.container.scrollTop = n;
334
334
  }
335
335
  }
336
336
  getTotalHeight() {
@@ -344,16 +344,16 @@ class Qe {
344
344
  this.container.removeEventListener("scroll", this._onScroll), this._rafId !== null && cancelAnimationFrame(this._rafId);
345
345
  }
346
346
  }
347
- class re {
347
+ class le {
348
348
  constructor(e, t = 0) {
349
349
  this._flatLeaves = [], this._maxDepth = 1, this._frozenCount = 0, this._columns = e, this._frozenCount = t, this._process();
350
350
  }
351
351
  _process() {
352
352
  const e = [];
353
353
  let t = 0;
354
- const s = (n, i) => {
355
- for (const o of n)
356
- o.children && o.children.length > 0 ? (s(o.children, i + 1), this._maxDepth = Math.max(this._maxDepth, i + 1)) : e.push({ ...o, _colIndex: t++, _depth: i, _leaf: !0 });
354
+ const s = (i, n) => {
355
+ for (const o of i)
356
+ o.children && o.children.length > 0 ? (s(o.children, n + 1), this._maxDepth = Math.max(this._maxDepth, n + 1)) : e.push({ ...o, _colIndex: t++, _depth: n, _leaf: !0 });
357
357
  };
358
358
  this._maxDepth = 1, s(this._columns, 1), this._flatLeaves = e;
359
359
  }
@@ -391,7 +391,7 @@ class re {
391
391
  t === "last" ? this._columns.push(e) : t === "first" ? this._columns.unshift(e) : this._columns.splice(t, 0, e), this._process();
392
392
  }
393
393
  removeColumn(e) {
394
- const t = (s) => s.filter((n) => n.field === e ? !1 : (n.children && (n.children = t(n.children)), !0));
394
+ const t = (s) => s.filter((i) => i.field === e ? !1 : (i.children && (i.children = t(i.children)), !0));
395
395
  this._columns = t(this._columns), this._process();
396
396
  }
397
397
  getColumnByField(e) {
@@ -407,26 +407,26 @@ class re {
407
407
  buildHeaderCells() {
408
408
  const e = Array.from({ length: this._maxDepth }, () => []);
409
409
  let t = 0;
410
- const s = (n, i) => {
410
+ const s = (i, n) => {
411
411
  let o = 0;
412
- for (const l of n)
412
+ for (const l of i)
413
413
  if (!l.hidden)
414
414
  if (l.children && l.children.length > 0) {
415
- const r = s(l.children, i + 1);
416
- r > 0 && (e[i - 1].push({
415
+ const r = s(l.children, n + 1);
416
+ r > 0 && (e[n - 1].push({
417
417
  column: l,
418
418
  colIndex: t,
419
- depth: i,
419
+ depth: n,
420
420
  colSpan: r,
421
421
  rowSpan: 1
422
422
  }), o += r);
423
423
  } else
424
- e[i - 1].push({
424
+ e[n - 1].push({
425
425
  column: l,
426
426
  colIndex: t++,
427
- depth: i,
427
+ depth: n,
428
428
  colSpan: 1,
429
- rowSpan: this._maxDepth - i + 1
429
+ rowSpan: this._maxDepth - n + 1
430
430
  }), o++;
431
431
  return o;
432
432
  };
@@ -434,11 +434,11 @@ class re {
434
434
  }
435
435
  /** 각 리프 컬럼의 계산된 너비 배열 반환 */
436
436
  computeWidths(e, t = 100) {
437
- const s = this.visibleLeaves, n = s.filter((r) => r.flex), i = s.filter((r) => !r.flex && r.width).reduce((r, a) => r + a.width, 0), o = n.reduce((r, a) => r + (a.flex ?? 1), 0), l = Math.max(0, e - i);
437
+ const s = this.visibleLeaves, i = s.filter((r) => r.flex), n = s.filter((r) => !r.flex && r.width).reduce((r, a) => r + a.width, 0), o = i.reduce((r, a) => r + (a.flex ?? 1), 0), l = Math.max(0, e - n);
438
438
  return s.map((r) => r.flex ? Math.round(r.flex / o * l) : r.width ?? t);
439
439
  }
440
440
  }
441
- class Je {
441
+ class Ze {
442
442
  constructor(e, t, s) {
443
443
  this._field = "", this._outsideHandler = null, this._onApply = t, this._onClear = s, this._el = document.createElement("div"), this._el.className = "og-filter-panel", this._el.style.cssText = `
444
444
  position:absolute;z-index:1000;min-width:200px;max-width:280px;
@@ -450,10 +450,10 @@ class Je {
450
450
  open(e, t, s) {
451
451
  var E;
452
452
  this._field = e, this._el.innerHTML = "";
453
- const n = document.createElement("div");
454
- n.textContent = "필터", n.style.cssText = "font-weight:600;margin-bottom:8px;color:var(--og-text-color,#333);", this._el.appendChild(n);
455
453
  const i = document.createElement("div");
456
- i.style.cssText = "display:flex;gap:4px;margin-bottom:6px;";
454
+ i.textContent = "필터", i.style.cssText = "font-weight:600;margin-bottom:8px;color:var(--og-text-color,#333);", this._el.appendChild(i);
455
+ const n = document.createElement("div");
456
+ n.style.cssText = "display:flex;gap:4px;margin-bottom:6px;";
457
457
  const o = document.createElement("select");
458
458
  o.style.cssText = "flex:1;padding:3px 4px;border:1px solid var(--og-border-color,#e0e0e0);border-radius:3px;font-size:12px;";
459
459
  const l = [
@@ -467,18 +467,18 @@ class Je {
467
467
  { label: "이상", value: ">=" },
468
468
  { label: "이하", value: "<=" }
469
469
  ];
470
- for (const w of l) {
470
+ for (const b of l) {
471
471
  const C = document.createElement("option");
472
- C.value = w.value, C.textContent = w.label, o.appendChild(C);
472
+ C.value = b.value, C.textContent = b.label, o.appendChild(C);
473
473
  }
474
- s[0] && (o.value = s[0].operator), i.appendChild(o), this._el.appendChild(i);
474
+ s[0] && (o.value = s[0].operator), n.appendChild(o), this._el.appendChild(n);
475
475
  const r = document.createElement("input");
476
476
  r.type = "text", r.placeholder = "필터 값 입력...", r.value = ((E = s[0]) == null ? void 0 : E.value) ?? "", r.style.cssText = `
477
477
  width:100%;padding:4px 6px;border:1px solid var(--og-border-color,#e0e0e0);
478
478
  border-radius:3px;font-size:12px;box-sizing:border-box;margin-bottom:8px;
479
479
  outline:none;
480
- `, r.addEventListener("keydown", (w) => {
481
- w.key === "Enter" ? h.click() : w.key === "Escape" && this.close();
480
+ `, r.addEventListener("keydown", (b) => {
481
+ b.key === "Enter" ? h.click() : b.key === "Escape" && this.close();
482
482
  }), this._el.appendChild(r);
483
483
  const a = document.createElement("div");
484
484
  a.style.cssText = "display:flex;gap:6px;justify-content:flex-end;";
@@ -495,12 +495,12 @@ class Je {
495
495
  border-radius:3px;background:var(--og-primary,#1976d2);
496
496
  color:#fff;cursor:pointer;font-size:12px;
497
497
  `, h.addEventListener("click", () => {
498
- const w = r.value.trim();
499
- w ? this._onApply(this._field, [{ operator: o.value, value: w }]) : this._onClear(this._field), this.close();
498
+ const b = r.value.trim();
499
+ b ? this._onApply(this._field, [{ operator: o.value, value: b }]) : this._onClear(this._field), this.close();
500
500
  }), a.appendChild(c), a.appendChild(h), this._el.appendChild(a);
501
501
  const u = t.getBoundingClientRect(), g = this._el.parentElement.getBoundingClientRect();
502
- this._el.style.top = `${u.bottom - g.top + 2}px`, this._el.style.left = `${Math.min(u.left - g.left, g.width - 220)}px`, this._el.style.display = "block", requestAnimationFrame(() => r.focus()), this._outsideHandler && document.removeEventListener("mousedown", this._outsideHandler), this._outsideHandler = (w) => {
503
- !this._el.contains(w.target) && w.target !== t && this.close();
502
+ this._el.style.top = `${u.bottom - g.top + 2}px`, this._el.style.left = `${Math.min(u.left - g.left, g.width - 220)}px`, this._el.style.display = "block", requestAnimationFrame(() => r.focus()), this._outsideHandler && document.removeEventListener("mousedown", this._outsideHandler), this._outsideHandler = (b) => {
503
+ !this._el.contains(b.target) && b.target !== t && this.close();
504
504
  }, setTimeout(() => document.addEventListener("mousedown", this._outsideHandler), 0);
505
505
  }
506
506
  close() {
@@ -513,8 +513,8 @@ class Je {
513
513
  this.close(), this._el.remove();
514
514
  }
515
515
  }
516
- const Ze = 10;
517
- function et(d, e = Ze) {
516
+ const et = 10;
517
+ function tt(d, e = et) {
518
518
  const t = Math.pow(10, e);
519
519
  return Math.round(d * t) / t;
520
520
  }
@@ -530,13 +530,13 @@ class x {
530
530
  const t = String(e).trim();
531
531
  if (!t || t === "null" || t === "undefined" || t === "NaN")
532
532
  return new x(0n, 0);
533
- const s = t.startsWith("-"), n = s ? t.slice(1) : t, i = n.indexOf(".");
533
+ const s = t.startsWith("-"), i = s ? t.slice(1) : t, n = i.indexOf(".");
534
534
  let o, l;
535
- if (i === -1)
536
- o = BigInt(n), l = 0;
535
+ if (n === -1)
536
+ o = BigInt(i), l = 0;
537
537
  else {
538
- const r = n.slice(i + 1);
539
- o = BigInt(n.slice(0, i) + r), l = r.length;
538
+ const r = i.slice(n + 1);
539
+ o = BigInt(i.slice(0, n) + r), l = r.length;
540
540
  }
541
541
  return new x(s ? -o : o, l);
542
542
  }
@@ -552,12 +552,12 @@ class x {
552
552
  }
553
553
  // ── 사칙연산 ─────────────────────────────────────────────
554
554
  add(e) {
555
- const [t, s, n] = x._align(this, x.from(e));
556
- return new x(t + s, n);
555
+ const [t, s, i] = x._align(this, x.from(e));
556
+ return new x(t + s, i);
557
557
  }
558
558
  sub(e) {
559
- const [t, s, n] = x._align(this, x.from(e));
560
- return new x(t - s, n);
559
+ const [t, s, i] = x._align(this, x.from(e));
560
+ return new x(t - s, i);
561
561
  }
562
562
  mul(e) {
563
563
  const t = x.from(e);
@@ -570,13 +570,13 @@ class x {
570
570
  div(e, t = 20) {
571
571
  const s = x.from(e);
572
572
  if (s._c === 0n) throw new Error("OGDecimal: division by zero");
573
- const i = this._c * 10n ** BigInt(t + s._s) / s._c;
574
- return new x(i, t + this._s);
573
+ const n = this._c * 10n ** BigInt(t + s._s) / s._c;
574
+ return new x(n, t + this._s);
575
575
  }
576
576
  /** 나머지 (정수 나머지와 동일한 개념을 소수에 적용) */
577
577
  mod(e) {
578
- const t = x.from(e), [s, n, i] = x._align(this, t);
579
- return new x(s % n, i);
578
+ const t = x.from(e), [s, i, n] = x._align(this, t);
579
+ return new x(s % i, n);
580
580
  }
581
581
  /** 부호 반전 */
582
582
  neg() {
@@ -625,12 +625,12 @@ class x {
625
625
  t = t * 10n ** BigInt(e - s);
626
626
  else if (s > e) {
627
627
  const c = 10n ** BigInt(s - e), h = c / 2n, u = t < 0n, g = u ? -t : t, E = g % c;
628
- let w = g / c;
629
- E >= h && (w += 1n), t = u ? -w : w;
628
+ let b = g / c;
629
+ E >= h && (b += 1n), t = u ? -b : b;
630
630
  }
631
631
  s = e;
632
- const n = t < 0n, o = (n ? -t : t).toString().padStart(e + 1, "0"), l = o.slice(0, o.length - e) || "0", r = e > 0 ? "." + o.slice(o.length - e) : "";
633
- return (n ? "-" : "") + l + r;
632
+ const i = t < 0n, o = (i ? -t : t).toString().padStart(e + 1, "0"), l = o.slice(0, o.length - e) || "0", r = e > 0 ? "." + o.slice(o.length - e) : "";
633
+ return (i ? "-" : "") + l + r;
634
634
  }
635
635
  /** 정규화(후행 0 제거) 후 최소 표현 문자열 반환 */
636
636
  toString() {
@@ -664,7 +664,7 @@ class x {
664
664
  return e.map(x.from).reduce((t, s) => t.gt(s) ? t : s);
665
665
  }
666
666
  }
667
- function tt(d, e, t = 30) {
667
+ function Be(d, e, t = 30) {
668
668
  return new st(d, e, t).parse();
669
669
  }
670
670
  class st {
@@ -751,7 +751,7 @@ class st {
751
751
  this._pos++;
752
752
  }
753
753
  }
754
- function be(d, e) {
754
+ function ve(d, e) {
755
755
  if (d == null || d === "") return d ?? "";
756
756
  const t = typeof e == "string" ? { type: e } : e, s = t.char ?? "*";
757
757
  switch (t.type) {
@@ -773,7 +773,7 @@ function be(d, e) {
773
773
  case "ip":
774
774
  return dt(d, s);
775
775
  case "partial":
776
- return ee(d, s, t.visiblePrefix ?? 0, t.visibleSuffix ?? 4);
776
+ return te(d, s, t.visiblePrefix ?? 0, t.visibleSuffix ?? 4);
777
777
  default:
778
778
  return d;
779
779
  }
@@ -784,35 +784,35 @@ function it(d, e) {
784
784
  const o = d.includes("-") ? "-" : "", l = d.indexOf("-") >= 0 ? d.indexOf("-") : 6;
785
785
  return d.slice(0, l) + o + e.repeat(Math.max(1, d.length - l - o.length));
786
786
  }
787
- const s = t.slice(0, 6), n = t[6], i = t.length - 7;
788
- return `${s}-${n}${e.repeat(i)}`;
787
+ const s = t.slice(0, 6), i = t[6], n = t.length - 7;
788
+ return `${s}-${i}${e.repeat(n)}`;
789
789
  }
790
790
  function nt(d, e) {
791
791
  const t = d.replace(/[^0-9]/g, "");
792
- return t.length === 11 ? `${t.slice(0, 3)}-${e.repeat(4)}-${t.slice(7)}` : t.length === 10 ? t.startsWith("02") ? `${t.slice(0, 2)}-${e.repeat(4)}-${t.slice(6)}` : `${t.slice(0, 3)}-${e.repeat(3)}-${t.slice(6)}` : t.length === 9 ? `${t.slice(0, 2)}-${e.repeat(3)}-${t.slice(5)}` : ee(d, e, 3, 4);
792
+ return t.length === 11 ? `${t.slice(0, 3)}-${e.repeat(4)}-${t.slice(7)}` : t.length === 10 ? t.startsWith("02") ? `${t.slice(0, 2)}-${e.repeat(4)}-${t.slice(6)}` : `${t.slice(0, 3)}-${e.repeat(3)}-${t.slice(6)}` : t.length === 9 ? `${t.slice(0, 2)}-${e.repeat(3)}-${t.slice(5)}` : te(d, e, 3, 4);
793
793
  }
794
794
  function ot(d, e) {
795
795
  const t = d.indexOf("@");
796
- if (t < 0) return ee(d, e, 2, 0);
797
- const s = d.slice(0, t), n = d.slice(t), i = Math.min(2, s.length), o = s.slice(0, i), l = Math.max(s.length - i, 3);
798
- return `${o}${e.repeat(l)}${n}`;
796
+ if (t < 0) return te(d, e, 2, 0);
797
+ const s = d.slice(0, t), i = d.slice(t), n = Math.min(2, s.length), o = s.slice(0, n), l = Math.max(s.length - n, 3);
798
+ return `${o}${e.repeat(l)}${i}`;
799
799
  }
800
800
  function rt(d, e) {
801
801
  const t = d.replace(/[^0-9]/g, "");
802
802
  if (t.length < 8) return d;
803
- const s = t.slice(0, 4), n = t.slice(-4), i = t.length - 8, o = e.repeat(Math.max(i, 8)), l = [s];
803
+ const s = t.slice(0, 4), i = t.slice(-4), n = t.length - 8, o = e.repeat(Math.max(n, 8)), l = [s];
804
804
  for (let r = 0; r < o.length; r += 4) {
805
805
  const a = o.slice(r, r + 4);
806
806
  a && l.push(a);
807
807
  }
808
- return l.push(n), l.join("-");
808
+ return l.push(i), l.join("-");
809
809
  }
810
810
  function lt(d, e, t, s) {
811
- const n = d.replace(/[^0-9]/g, "");
812
- if (n.length <= t + s)
813
- return ee(n, e, t, s);
814
- const i = n.slice(0, t), o = n.slice(-s), l = n.length - t - s;
815
- return `${i}-${e.repeat(l)}-${o}`;
811
+ const i = d.replace(/[^0-9]/g, "");
812
+ if (i.length <= t + s)
813
+ return te(i, e, t, s);
814
+ const n = i.slice(0, t), o = i.slice(-s), l = i.length - t - s;
815
+ return `${n}-${e.repeat(l)}-${o}`;
816
816
  }
817
817
  function at(d, e) {
818
818
  const t = d.trim();
@@ -820,22 +820,22 @@ function at(d, e) {
820
820
  }
821
821
  function dt(d, e) {
822
822
  const t = d.split(".");
823
- if (t.length !== 4) return ee(d, e, 3, 0);
824
- const s = (n) => e.repeat(Math.max(n.length, 3));
823
+ if (t.length !== 4) return te(d, e, 3, 0);
824
+ const s = (i) => e.repeat(Math.max(i.length, 3));
825
825
  return `${t[0]}.${t[1]}.${s(t[2])}.${s(t[3])}`;
826
826
  }
827
- function ee(d, e, t, s) {
827
+ function te(d, e, t, s) {
828
828
  if (d.length <= t + s) return d;
829
- const n = d.slice(0, t), i = s > 0 ? d.slice(-s) : "", o = d.length - t - s;
830
- return `${n}${e.repeat(o)}${i}`;
829
+ const i = d.slice(0, t), n = s > 0 ? d.slice(-s) : "", o = d.length - t - s;
830
+ return `${i}${e.repeat(o)}${n}`;
831
831
  }
832
- function Be(d) {
832
+ function We(d) {
833
833
  const e = d.column;
834
834
  if (!e.formula) return null;
835
835
  const t = e.formulaPrecision ?? 30;
836
836
  try {
837
837
  let s;
838
- return typeof e.formula == "function" ? s = e.formula(d.row, x) : s = tt(e.formula, d.row, t), s instanceof x ? e.precision != null ? s.toFixed(e.precision) : s.toString() : typeof s == "string" ? s : e.precision != null ? x.from(s).toFixed(e.precision) : String(s);
838
+ return typeof e.formula == "function" ? s = e.formula(d.row, x) : s = Be(e.formula, d.row, t), s instanceof x ? e.precision != null ? s.toFixed(e.precision) : s.toString() : typeof s == "string" ? s : e.precision != null ? x.from(s).toFixed(e.precision) : String(s);
839
839
  } catch (s) {
840
840
  return console.warn("[OpenGrid] Formula error:", s), "#ERR";
841
841
  }
@@ -844,52 +844,52 @@ function ct(d, e, t) {
844
844
  if (d == null || d === "") return "";
845
845
  let s = Number(d);
846
846
  if (isNaN(s)) return String(d);
847
- if (t != null && (s = et(s, t)), !e)
847
+ if (t != null && (s = tt(s, t)), !e)
848
848
  return t != null ? s.toFixed(t) : String(s);
849
849
  if (e.includes(",")) {
850
- const n = e.includes(".") ? e.split(".")[1].length : t ?? 0;
850
+ const i = e.includes(".") ? e.split(".")[1].length : t ?? 0;
851
851
  return s.toLocaleString("ko-KR", {
852
- minimumFractionDigits: n,
853
- maximumFractionDigits: n
852
+ minimumFractionDigits: i,
853
+ maximumFractionDigits: i
854
854
  });
855
855
  }
856
856
  return String(s);
857
857
  }
858
- function We(d, e = "yyyy-MM-dd") {
858
+ function Ne(d, e = "yyyy-MM-dd") {
859
859
  if (!d) return "";
860
860
  const t = d instanceof Date ? d : new Date(d);
861
861
  if (isNaN(t.getTime())) return String(d);
862
- const s = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0");
863
- return e.replace("yyyy", String(s)).replace("MM", n).replace("dd", i);
862
+ const s = t.getFullYear(), i = String(t.getMonth() + 1).padStart(2, "0"), n = String(t.getDate()).padStart(2, "0");
863
+ return e.replace("yyyy", String(s)).replace("MM", i).replace("dd", n);
864
864
  }
865
865
  function ht(d, e, t) {
866
- const s = be(d, e.mask), n = document.createElement("span");
867
- n.style.cssText = "display:flex;align-items:center;gap:3px;overflow:hidden;width:100%;box-sizing:border-box;";
868
- const i = document.createElement("span");
869
- i.style.cssText = "flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:monospace;letter-spacing:0.4px;color:var(--og-mask-text,#888);", i.textContent = s;
866
+ const s = ve(d, e.mask), i = document.createElement("span");
867
+ i.style.cssText = "display:flex;align-items:center;gap:3px;overflow:hidden;width:100%;box-sizing:border-box;";
868
+ const n = document.createElement("span");
869
+ n.style.cssText = "flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:monospace;letter-spacing:0.4px;color:var(--og-mask-text,#888);", n.textContent = s;
870
870
  const o = document.createElement("button");
871
871
  return o.title = "클릭하면 원문 표시", o.setAttribute("aria-label", "마스킹 해제"), o.innerHTML = '<svg width="13" height="13" viewBox="0 0 16 16" fill="currentColor"><path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8z"/><path d="M8 5.5A2.5 2.5 0 1 0 8 10.5 2.5 2.5 0 0 0 8 5.5zm0 4A1.5 1.5 0 1 1 8 6.5a1.5 1.5 0 0 1 0 3z" fill="#fff"/></svg>', o.style.cssText = "flex-shrink:0;background:none;border:none;cursor:pointer;color:#c0c0c0;padding:1px 2px;line-height:0;border-radius:3px;display:flex;align-items:center;", o.addEventListener("mouseover", () => {
872
872
  o.style.color = "var(--og-primary,#1976d2)", o.style.background = "rgba(25,118,210,0.08)";
873
873
  }), o.addEventListener("mouseout", () => {
874
874
  o.style.color = "#c0c0c0", o.style.background = "none";
875
875
  }), o.addEventListener("click", (l) => {
876
- l.stopPropagation(), i.textContent = d, i.style.fontFamily = "", i.style.letterSpacing = "", i.style.color = "", o.remove(), (e._maskRevealedRows ?? (e._maskRevealedRows = /* @__PURE__ */ new Set())).add(t);
877
- }), n.appendChild(i), n.appendChild(o), n;
876
+ l.stopPropagation(), n.textContent = d, n.style.fontFamily = "", n.style.letterSpacing = "", n.style.color = "", o.remove(), (e._maskRevealedRows ?? (e._maskRevealedRows = /* @__PURE__ */ new Set())).add(t);
877
+ }), i.appendChild(n), i.appendChild(o), i;
878
878
  }
879
- class le {
879
+ class ae {
880
880
  render(e) {
881
881
  var r;
882
882
  const t = document.createElement("span");
883
883
  t.className = "og-cell-text";
884
- const s = Be(e);
884
+ const s = We(e);
885
885
  if (s !== null)
886
886
  return t.textContent = s, t.style.cssText = "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;", t;
887
- const { value: n, column: i, rowIndex: o } = e;
887
+ const { value: i, column: n, rowIndex: o } = e;
888
888
  let l;
889
- if (i.valueMap && n != null && i.valueMap[n] ? l = i.valueMap[n] : l = n == null ? "" : String(n), i.mask) {
890
- const a = i._maskRevealed === !0, c = ((r = i._maskRevealedRows) == null ? void 0 : r.has(o)) === !0;
889
+ if (n.valueMap && i != null && n.valueMap[i] ? l = n.valueMap[i] : l = i == null ? "" : String(i), n.mask) {
890
+ const a = n._maskRevealed === !0, c = ((r = n._maskRevealedRows) == null ? void 0 : r.has(o)) === !0;
891
891
  if (!a && !c)
892
- return ht(l, i, o);
892
+ return ht(l, n, o);
893
893
  }
894
894
  return t.textContent = l, t.style.cssText = "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;", t;
895
895
  }
@@ -905,25 +905,25 @@ class ut {
905
905
  t.className = "og-cell-text", t.style.cssText = "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;";
906
906
  const s = e.value;
907
907
  if (s == null || s === "") return t;
908
- const n = String(s), o = (this._fn ? this._fn(e.row, e.rowIndex).map((l) => typeof l == "string" ? { label: l, value: l } : { label: l.label ?? l.text ?? String(l.value ?? ""), value: l.value }) : this._opts).find((l) => String(l.value) === n);
909
- return t.textContent = o ? o.label : n, t;
908
+ const i = String(s), o = (this._fn ? this._fn(e.row, e.rowIndex).map((l) => typeof l == "string" ? { label: l, value: l } : { label: l.label ?? l.text ?? String(l.value ?? ""), value: l.value }) : this._opts).find((l) => String(l.value) === i);
909
+ return t.textContent = o ? o.label : i, t;
910
910
  }
911
911
  }
912
- class ae {
912
+ class de {
913
913
  render(e) {
914
914
  const t = document.createElement("span");
915
915
  t.className = "og-cell-number";
916
- const s = Be(e);
916
+ const s = We(e);
917
917
  return s !== null ? (t.textContent = s, t.style.cssText = "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;width:100%;text-align:right;", t) : (t.textContent = ct(e.value, e.column.format ?? "#,##0", e.column.precision), t.style.cssText = "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;width:100%;text-align:right;", t);
918
918
  }
919
919
  }
920
- class de {
920
+ class ce {
921
921
  render(e) {
922
922
  const t = document.createElement("span");
923
- return t.className = "og-cell-date", t.textContent = We(e.value, e.column.format), t.style.cssText = "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;", t;
923
+ return t.className = "og-cell-date", t.textContent = Ne(e.value, e.column.format), t.style.cssText = "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;", t;
924
924
  }
925
925
  }
926
- class ce {
926
+ class he {
927
927
  render(e) {
928
928
  const t = document.createElement("span");
929
929
  t.className = "og-cell-checkbox", t.style.cssText = "display:flex;align-items:center;justify-content:center;height:100%;";
@@ -936,13 +936,13 @@ class Re {
936
936
  this.def = e;
937
937
  }
938
938
  render(e) {
939
- var i, o, l;
939
+ var n, o, l;
940
940
  const t = document.createElement("span");
941
941
  t.style.cssText = "display:flex;align-items:center;justify-content:center;height:100%;";
942
942
  const s = document.createElement("button");
943
- s.className = `og-cell-btn${(i = this.def) != null && i.buttonClass ? " " + this.def.buttonClass : ""}`;
944
- const n = (o = this.def) == null ? void 0 : o.label;
945
- return typeof n == "function" ? s.textContent = n(e.value, e.row) : s.textContent = n ?? String(e.value ?? "btn"), s.style.cssText = `
943
+ s.className = `og-cell-btn${(n = this.def) != null && n.buttonClass ? " " + this.def.buttonClass : ""}`;
944
+ const i = (o = this.def) == null ? void 0 : o.label;
945
+ return typeof i == "function" ? s.textContent = i(e.value, e.row) : s.textContent = i ?? String(e.value ?? "btn"), s.style.cssText = `
946
946
  padding:2px 10px;border:1px solid var(--og-primary,#1976d2);
947
947
  border-radius:4px;background:var(--og-row-bg,#fff);color:var(--og-primary,#1976d2);
948
948
  cursor:pointer;font-size:12px;white-space:nowrap;transition:background 0.12s;
@@ -958,9 +958,9 @@ class ke {
958
958
  var l, r, a;
959
959
  const t = document.createElement("span");
960
960
  t.style.cssText = "display:flex;align-items:center;height:100%;";
961
- const s = document.createElement("span"), n = e.value == null ? "" : String(e.value), i = ((l = this.labelMap) == null ? void 0 : l[n]) ?? ((r = e.column.valueMap) == null ? void 0 : r[n]) ?? n;
962
- s.textContent = i;
963
- const o = ((a = this.colorMap) == null ? void 0 : a[n]) ?? "#666";
961
+ const s = document.createElement("span"), i = e.value == null ? "" : String(e.value), n = ((l = this.labelMap) == null ? void 0 : l[i]) ?? ((r = e.column.valueMap) == null ? void 0 : r[i]) ?? i;
962
+ s.textContent = n;
963
+ const o = ((a = this.colorMap) == null ? void 0 : a[i]) ?? "#666";
964
964
  return s.style.cssText = `
965
965
  display:inline-block;padding:2px 8px;border-radius:12px;font-size:11px;
966
966
  background:${o}22;color:${o};border:1px solid ${o}66;
@@ -986,7 +986,7 @@ class gt {
986
986
  return t.className = "og-cell-template", t.style.cssText = "display:flex;align-items:center;height:100%;overflow:hidden;", t.innerHTML = this.templateFn(e.value, e.row, e.rowIndex), t;
987
987
  }
988
988
  }
989
- class _t {
989
+ class pt {
990
990
  constructor(e) {
991
991
  this.def = e;
992
992
  }
@@ -994,17 +994,17 @@ class _t {
994
994
  var a, c, h, u, g;
995
995
  const t = document.createElement("span");
996
996
  t.style.cssText = "display:flex;align-items:center;justify-content:center;height:100%;";
997
- const s = document.createElement("img"), n = (a = this.def) != null && a.srcFn ? this.def.srcFn(e.value, e.row) : String(e.value ?? "");
998
- s.src = n;
999
- const i = ((c = this.def) == null ? void 0 : c.width) ?? 28, o = ((h = this.def) == null ? void 0 : h.height) ?? 28, l = ((u = this.def) == null ? void 0 : u.radius) ?? 4;
1000
- s.style.cssText = `width:${i}px;height:${o}px;object-fit:cover;border-radius:${l}px;display:block;`;
997
+ const s = document.createElement("img"), i = (a = this.def) != null && a.srcFn ? this.def.srcFn(e.value, e.row) : String(e.value ?? "");
998
+ s.src = i;
999
+ const n = ((c = this.def) == null ? void 0 : c.width) ?? 28, o = ((h = this.def) == null ? void 0 : h.height) ?? 28, l = ((u = this.def) == null ? void 0 : u.radius) ?? 4;
1000
+ s.style.cssText = `width:${n}px;height:${o}px;object-fit:cover;border-radius:${l}px;display:block;`;
1001
1001
  const r = (g = this.def) == null ? void 0 : g.alt;
1002
1002
  return s.alt = typeof r == "function" ? r(e.value, e.row) : r ?? "", s.onerror = () => {
1003
1003
  s.style.display = "none";
1004
1004
  }, t.appendChild(s), t;
1005
1005
  }
1006
1006
  }
1007
- class pt {
1007
+ class _t {
1008
1008
  constructor(e) {
1009
1009
  this.def = e;
1010
1010
  }
@@ -1012,12 +1012,12 @@ class pt {
1012
1012
  var a, c, h, u;
1013
1013
  const t = document.createElement("span");
1014
1014
  t.style.cssText = "display:flex;align-items:center;gap:5px;width:100%;padding:0 4px;box-sizing:border-box;";
1015
- const s = ((a = this.def) == null ? void 0 : a.max) ?? 100, n = Number(e.value) || 0, i = Math.min(100, Math.max(0, n / s * 100)), o = (c = this.def) != null && c.colorFn ? this.def.colorFn(n) : ((h = this.def) == null ? void 0 : h.color) ?? "var(--og-primary,#1976d2)", l = document.createElement("div");
1015
+ const s = ((a = this.def) == null ? void 0 : a.max) ?? 100, i = Number(e.value) || 0, n = Math.min(100, Math.max(0, i / s * 100)), o = (c = this.def) != null && c.colorFn ? this.def.colorFn(i) : ((h = this.def) == null ? void 0 : h.color) ?? "var(--og-primary,#1976d2)", l = document.createElement("div");
1016
1016
  l.className = "og-progress-track", l.style.cssText = "flex:1;height:10px;background:#e0e0e0;border-radius:5px;overflow:hidden;";
1017
1017
  const r = document.createElement("div");
1018
- if (r.className = "og-progress-fill", r.style.cssText = `width:${i}%;height:100%;background:${o};border-radius:5px;`, l.appendChild(r), t.appendChild(l), ((u = this.def) == null ? void 0 : u.showLabel) !== !1) {
1018
+ if (r.className = "og-progress-fill", r.style.cssText = `width:${n}%;height:100%;background:${o};border-radius:5px;`, l.appendChild(r), t.appendChild(l), ((u = this.def) == null ? void 0 : u.showLabel) !== !1) {
1019
1019
  const g = document.createElement("span");
1020
- g.style.cssText = "font-size:11px;color:#666;white-space:nowrap;min-width:28px;text-align:right;", g.textContent = `${Math.round(i)}%`, t.appendChild(g);
1020
+ g.style.cssText = "font-size:11px;color:#666;white-space:nowrap;min-width:28px;text-align:right;", g.textContent = `${Math.round(n)}%`, t.appendChild(g);
1021
1021
  }
1022
1022
  return t;
1023
1023
  }
@@ -1033,23 +1033,23 @@ class ft {
1033
1033
  const s = Array.isArray(e.value) ? e.value.map(Number) : [];
1034
1034
  if (!s.length)
1035
1035
  return t.textContent = "-", t;
1036
- const n = ((c = this.def) == null ? void 0 : c.width) ?? 80, i = ((h = this.def) == null ? void 0 : h.height) ?? 22, o = ((u = this.def) == null ? void 0 : u.color) ?? "#1976d2", l = ((g = this.def) == null ? void 0 : g.chartType) ?? "bar", r = document.createElement("canvas");
1037
- r.width = n, r.height = i, r.style.cssText = "display:block;";
1036
+ const i = ((c = this.def) == null ? void 0 : c.width) ?? 80, n = ((h = this.def) == null ? void 0 : h.height) ?? 22, o = ((u = this.def) == null ? void 0 : u.color) ?? "#1976d2", l = ((g = this.def) == null ? void 0 : g.chartType) ?? "bar", r = document.createElement("canvas");
1037
+ r.width = i, r.height = n, r.style.cssText = "display:block;";
1038
1038
  const a = r.getContext("2d");
1039
1039
  if (a) {
1040
- const E = Math.max(...s, 1), w = Math.min(...s, 0), C = E - w || 1, M = s.length;
1040
+ const E = Math.max(...s, 1), b = Math.min(...s, 0), C = E - b || 1, M = s.length;
1041
1041
  if (l === "bar") {
1042
- const p = n / M;
1043
- s.forEach((v, _) => {
1044
- const F = (v - w) / C * (i - 2);
1045
- a.fillStyle = o, a.fillRect(_ * p + 1, i - F - 1, p - 2, F);
1042
+ const _ = i / M;
1043
+ s.forEach((y, p) => {
1044
+ const A = (y - b) / C * (n - 2);
1045
+ a.fillStyle = o, a.fillRect(p * _ + 1, n - A - 1, _ - 2, A);
1046
1046
  });
1047
1047
  } else {
1048
- const p = s.map((v, _) => ({
1049
- x: _ / (M - 1 || 1) * n,
1050
- y: i - (v - w) / C * (i - 4) - 2
1048
+ const _ = s.map((y, p) => ({
1049
+ x: p / (M - 1 || 1) * i,
1050
+ y: n - (y - b) / C * (n - 4) - 2
1051
1051
  }));
1052
- l === "area" && (a.fillStyle = o + "33", a.beginPath(), a.moveTo(p[0].x, i), p.forEach((v) => a.lineTo(v.x, v.y)), a.lineTo(p[p.length - 1].x, i), a.closePath(), a.fill()), a.strokeStyle = o, a.lineWidth = 1.5, a.beginPath(), p.forEach((v, _) => _ === 0 ? a.moveTo(v.x, v.y) : a.lineTo(v.x, v.y)), a.stroke();
1052
+ l === "area" && (a.fillStyle = o + "33", a.beginPath(), a.moveTo(_[0].x, n), _.forEach((y) => a.lineTo(y.x, y.y)), a.lineTo(_[_.length - 1].x, n), a.closePath(), a.fill()), a.strokeStyle = o, a.lineWidth = 1.5, a.beginPath(), _.forEach((y, p) => p === 0 ? a.moveTo(y.x, y.y) : a.lineTo(y.x, y.y)), a.stroke();
1053
1053
  }
1054
1054
  }
1055
1055
  return t.appendChild(r), t;
@@ -1059,14 +1059,14 @@ class Se {
1059
1059
  render(e) {
1060
1060
  const t = document.createElement("span");
1061
1061
  t.style.cssText = "display:flex;align-items:center;justify-content:center;height:100%;";
1062
- const s = !!e.value, n = document.createElement("span");
1063
- n.className = "og-switch" + (s ? " og-switch--on" : ""), n.style.cssText = `display:inline-block;width:34px;height:18px;border-radius:9px;
1062
+ const s = !!e.value, i = document.createElement("span");
1063
+ i.className = "og-switch" + (s ? " og-switch--on" : ""), i.style.cssText = `display:inline-block;width:34px;height:18px;border-radius:9px;
1064
1064
  background:${s ? "var(--og-primary,#1976d2)" : "#bdbdbd"};
1065
1065
  position:relative;transition:background 0.2s;cursor:pointer;flex-shrink:0;pointer-events:none;`;
1066
- const i = document.createElement("span");
1067
- return i.style.cssText = `position:absolute;top:2px;left:${s ? "16px" : "2px"};
1066
+ const n = document.createElement("span");
1067
+ return n.style.cssText = `position:absolute;top:2px;left:${s ? "16px" : "2px"};
1068
1068
  width:14px;height:14px;border-radius:50%;background:#fff;
1069
- transition:left 0.2s;box-shadow:0 1px 3px rgba(0,0,0,0.3);`, n.appendChild(i), t.appendChild(n), t;
1069
+ transition:left 0.2s;box-shadow:0 1px 3px rgba(0,0,0,0.3);`, i.appendChild(n), t.appendChild(i), t;
1070
1070
  }
1071
1071
  }
1072
1072
  class mt {
@@ -1077,15 +1077,15 @@ class mt {
1077
1077
  var o, l;
1078
1078
  const t = document.createElement("span");
1079
1079
  t.style.cssText = "display:flex;align-items:center;gap:1px;height:100%;";
1080
- const s = ((o = this.def) == null ? void 0 : o.max) ?? 5, n = Math.round(Number(e.value) || 0), i = ((l = this.def) == null ? void 0 : l.color) ?? "#ffa000";
1080
+ const s = ((o = this.def) == null ? void 0 : o.max) ?? 5, i = Math.round(Number(e.value) || 0), n = ((l = this.def) == null ? void 0 : l.color) ?? "#ffa000";
1081
1081
  for (let r = 1; r <= s; r++) {
1082
1082
  const a = document.createElement("span");
1083
- a.textContent = "★", a.style.cssText = `font-size:14px;color:${r <= n ? i : "#e0e0e0"};line-height:1;`, t.appendChild(a);
1083
+ a.textContent = "★", a.style.cssText = `font-size:14px;color:${r <= i ? n : "#e0e0e0"};line-height:1;`, t.appendChild(a);
1084
1084
  }
1085
1085
  return t;
1086
1086
  }
1087
1087
  }
1088
- class he {
1088
+ class ue {
1089
1089
  render(e) {
1090
1090
  const t = document.createElement("span");
1091
1091
  t.style.cssText = "display:flex;align-items:center;justify-content:center;height:100%;pointer-events:none;";
@@ -1093,7 +1093,7 @@ class he {
1093
1093
  return s.type = "radio", s.checked = !!e.value, s.setAttribute("aria-checked", e.value ? "true" : "false"), s.setAttribute("aria-label", e.column.header ?? "선택"), e.column.group && (s.name = `og-radio-${e.rowIndex}-${e.column.group}`), s.style.cssText = "width:14px;height:14px;cursor:pointer;accent-color:var(--og-primary,#1976d2);", t.appendChild(s), t;
1094
1094
  }
1095
1095
  }
1096
- class ue {
1096
+ class ge {
1097
1097
  render(e) {
1098
1098
  const t = document.createElement("span");
1099
1099
  if (t.style.cssText = "display:flex;align-items:center;justify-content:center;height:100%;overflow:hidden;", !e.value) return t;
@@ -1101,7 +1101,7 @@ class ue {
1101
1101
  return s.src = String(e.value), s.alt = e.column.alt ?? e.column.field, s.style.cssText = "max-width:100%;max-height:100%;object-fit:contain;display:block;", s.setAttribute("role", "img"), t.appendChild(s), t;
1102
1102
  }
1103
1103
  }
1104
- function wt(d) {
1104
+ function bt(d) {
1105
1105
  const e = document.createElement("div");
1106
1106
  return e.innerHTML = d, e.querySelectorAll("script,iframe,object,embed").forEach((t) => t.remove()), e.querySelectorAll("*").forEach((t) => {
1107
1107
  for (const s of [...t.attributes])
@@ -1112,15 +1112,15 @@ function wt(d) {
1112
1112
  }
1113
1113
  }), e.innerHTML;
1114
1114
  }
1115
- class ge {
1115
+ class pe {
1116
1116
  render(e) {
1117
1117
  const t = document.createElement("span");
1118
1118
  t.style.cssText = "display:block;overflow:hidden;width:100%;";
1119
- const s = e.column.sanitize !== !1, n = String(e.value ?? "");
1120
- return t.innerHTML = s ? wt(n) : n, t;
1119
+ const s = e.column.sanitize !== !1, i = String(e.value ?? "");
1120
+ return t.innerHTML = s ? bt(i) : i, t;
1121
1121
  }
1122
1122
  }
1123
- const yt = [
1123
+ const wt = [
1124
1124
  "212222",
1125
1125
  "222122",
1126
1126
  "222221",
@@ -1241,7 +1241,7 @@ const yt = [
1241
1241
  "211214",
1242
1242
  "211232"
1243
1243
  // 104 (Start B), 105 (Start C)
1244
- ], bt = "2331112";
1244
+ ], yt = "2331112";
1245
1245
  function Le(d) {
1246
1246
  let e = "", t = !0;
1247
1247
  for (const s of d)
@@ -1251,25 +1251,25 @@ function Le(d) {
1251
1251
  function vt(d) {
1252
1252
  const e = [104];
1253
1253
  for (const s of d) {
1254
- const n = s.charCodeAt(0) - 32;
1255
- n >= 0 && n <= 94 && e.push(n);
1254
+ const i = s.charCodeAt(0) - 32;
1255
+ i >= 0 && i <= 94 && e.push(i);
1256
1256
  }
1257
1257
  let t = 104;
1258
1258
  for (let s = 1; s < e.length; s++) t += e[s] * s;
1259
- return e.push(t % 103), e.map((s) => Le(yt[s])).join("") + Le(bt) + "11";
1259
+ return e.push(t % 103), e.map((s) => Le(wt[s])).join("") + Le(yt) + "11";
1260
1260
  }
1261
1261
  class _e {
1262
1262
  render(e) {
1263
- const t = String(e.value ?? ""), s = e.column.barcodeHeight ?? 28, n = document.createElement("div");
1264
- n.style.cssText = "display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;overflow:hidden;gap:1px;", n.setAttribute("role", "img"), n.setAttribute("aria-label", `바코드: ${t}`), n.innerHTML = xt(t, s);
1265
- const i = document.createElement("span");
1266
- return i.textContent = t, i.style.cssText = "font-size:9px;font-family:monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;", n.appendChild(i), n;
1263
+ const t = String(e.value ?? ""), s = e.column.barcodeHeight ?? 28, i = document.createElement("div");
1264
+ i.style.cssText = "display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;overflow:hidden;gap:1px;", i.setAttribute("role", "img"), i.setAttribute("aria-label", `바코드: ${t}`), i.innerHTML = xt(t, s);
1265
+ const n = document.createElement("span");
1266
+ return n.textContent = t, n.style.cssText = "font-size:9px;font-family:monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;", i.appendChild(n), i;
1267
1267
  }
1268
1268
  }
1269
1269
  function xt(d, e) {
1270
1270
  if (!d) return "";
1271
- const t = vt(d), s = 1.4, n = 6, i = t.length * s + n * 2, o = [];
1272
- let l = 0, r = n;
1271
+ const t = vt(d), s = 1.4, i = 6, n = t.length * s + i * 2, o = [];
1272
+ let l = 0, r = i;
1273
1273
  for (; l < t.length; )
1274
1274
  if (t[l] === "1") {
1275
1275
  let a = 0;
@@ -1277,39 +1277,39 @@ function xt(d, e) {
1277
1277
  o.push(`<rect x="${r.toFixed(2)}" y="0" width="${(a * s).toFixed(2)}" height="${e}"/>`), r += a * s, l += a;
1278
1278
  } else
1279
1279
  r += s, l++;
1280
- return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${i.toFixed(2)} ${e}" width="${i.toFixed(2)}" height="${e}" style="display:block" aria-hidden="true"><g fill="currentColor">${o.join("")}</g></svg>`;
1280
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n.toFixed(2)} ${e}" width="${n.toFixed(2)}" height="${e}" style="display:block" aria-hidden="true"><g fill="currentColor">${o.join("")}</g></svg>`;
1281
1281
  }
1282
1282
  function Ct(d) {
1283
1283
  const e = d.renderer;
1284
1284
  if (!e)
1285
1285
  switch (d.type) {
1286
1286
  case "number":
1287
- return new ae();
1288
- case "date":
1289
1287
  return new de();
1290
- case "boolean":
1288
+ case "date":
1291
1289
  return new ce();
1292
- case "radio":
1290
+ case "boolean":
1293
1291
  return new he();
1294
- case "img":
1292
+ case "radio":
1295
1293
  return new ue();
1296
- case "html":
1294
+ case "img":
1297
1295
  return new ge();
1296
+ case "html":
1297
+ return new pe();
1298
1298
  case "barcode":
1299
1299
  return new _e();
1300
1300
  case "select":
1301
1301
  return new ut(d.options ?? [], d.optionsFn);
1302
1302
  default:
1303
- return new le();
1303
+ return new ae();
1304
1304
  }
1305
1305
  if (typeof e == "string")
1306
1306
  switch (e) {
1307
1307
  case "number":
1308
- return new ae();
1309
- case "date":
1310
1308
  return new de();
1311
- case "checkbox":
1309
+ case "date":
1312
1310
  return new ce();
1311
+ case "checkbox":
1312
+ return new he();
1313
1313
  case "button":
1314
1314
  return new Re();
1315
1315
  case "link":
@@ -1319,21 +1319,21 @@ function Ct(d) {
1319
1319
  case "switch":
1320
1320
  return new Se();
1321
1321
  case "radio":
1322
- return new he();
1323
- case "img":
1324
1322
  return new ue();
1325
- case "html":
1323
+ case "img":
1326
1324
  return new ge();
1325
+ case "html":
1326
+ return new pe();
1327
1327
  case "barcode":
1328
1328
  return new _e();
1329
1329
  default:
1330
- return new le();
1330
+ return new ae();
1331
1331
  }
1332
1332
  switch (e.type) {
1333
1333
  case "button":
1334
1334
  return new Re(e);
1335
1335
  case "checkbox":
1336
- return new ce();
1336
+ return new he();
1337
1337
  case "link":
1338
1338
  return new Ee(e.hrefFn, e.target);
1339
1339
  case "template":
@@ -1341,9 +1341,9 @@ function Ct(d) {
1341
1341
  case "badge":
1342
1342
  return new ke(e.colorMap, e.labelMap ?? e.valueMap);
1343
1343
  case "image":
1344
- return new _t(e);
1345
- case "progress":
1346
1344
  return new pt(e);
1345
+ case "progress":
1346
+ return new _t(e);
1347
1347
  case "sparkline":
1348
1348
  return new ft(e);
1349
1349
  case "switch":
@@ -1351,24 +1351,24 @@ function Ct(d) {
1351
1351
  case "rating":
1352
1352
  return new mt(e);
1353
1353
  case "number":
1354
- return new ae();
1355
- case "date":
1356
1354
  return new de();
1355
+ case "date":
1356
+ return new ce();
1357
1357
  case "radio":
1358
- return new he();
1359
- case "img":
1360
1358
  return new ue();
1361
- case "html":
1359
+ case "img":
1362
1360
  return new ge();
1361
+ case "html":
1362
+ return new pe();
1363
1363
  case "barcode":
1364
1364
  return new _e();
1365
1365
  default:
1366
- return new le();
1366
+ return new ae();
1367
1367
  }
1368
1368
  }
1369
1369
  class Mt {
1370
1370
  constructor(e, t, s) {
1371
- this._cellMap = /* @__PURE__ */ new Map(), this._root = e, this._opts = t, this._cbs = s, this._header = S("div", "og-header"), this._header.style.cssText = "flex-shrink:0;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid var(--og-border-color,#e0e0e0);scrollbar-width:none;", this._bodyWrap = S("div", "og-body-wrapper"), this._bodyWrap.style.cssText = "flex:1;overflow:auto;position:relative;", this._bodyWrap.style.setProperty("--scrollbar-size", "8px"), this._body = S("div", "og-body"), this._body.style.cssText = "position:relative;", this._bodyWrap.appendChild(this._body), e.appendChild(this._header), e.appendChild(this._bodyWrap), this._bodyWrap.addEventListener("scroll", () => {
1371
+ this._cellMap = /* @__PURE__ */ new Map(), this._root = e, this._opts = t, this._cbs = s, this._header = L("div", "og-header"), this._header.style.cssText = "flex-shrink:0;overflow-x:auto;overflow-y:hidden;border:0;border-bottom:1px solid var(--og-border-color,#e0e0e0);scrollbar-width:none;", this._bodyWrap = L("div", "og-body-wrapper"), this._bodyWrap.style.cssText = "flex:1;overflow:auto;position:relative;", this._bodyWrap.style.setProperty("--scrollbar-size", "8px"), this._body = L("div", "og-body"), this._body.style.cssText = "position:relative;", this._bodyWrap.appendChild(this._body), e.appendChild(this._header), e.appendChild(this._bodyWrap), this._bodyWrap.addEventListener("scroll", () => {
1372
1372
  this._header.scrollLeft = this._bodyWrap.scrollLeft;
1373
1373
  }, { passive: !0 });
1374
1374
  }
@@ -1378,333 +1378,350 @@ class Mt {
1378
1378
  updateSize(e, t) {
1379
1379
  this._bodyWrap.style.height = `${e - t}px`;
1380
1380
  }
1381
- renderHeader(e, t, s, n, i) {
1381
+ renderHeader(e, t, s, i, n) {
1382
1382
  var g, E;
1383
1383
  this._header.innerHTML = "";
1384
- const o = i._frozenCount ?? 0;
1384
+ const o = n._frozenCount ?? 0;
1385
1385
  let l = 0;
1386
- i.stateColumn && (l += 24), i.draggable && (l += 18), i.rowNumber && (l += 44), i.checkColumn && (l += 36);
1387
- const r = l + t.reduce((w, C, M) => w + (s[M] ?? i.defaultColumnWidth), 0);
1386
+ n.stateColumn && (l += 24), n.draggable && (l += 18), n.rowNumber && (l += 44), n.checkColumn && (l += 36);
1387
+ const r = l + t.reduce((b, C, M) => b + (s[M] ?? n.defaultColumnWidth), 0);
1388
1388
  this._header.style.background = "var(--og-header-bg,#f5f5f5)";
1389
- const a = S("table");
1390
- a.setAttribute("role", "presentation"), a.style.cssText = `table-layout:fixed;border-collapse:collapse;width:${r}px;background:var(--og-header-bg,#f5f5f5);`;
1389
+ const a = L("table", "og-header-table");
1390
+ a.setAttribute("role", "presentation"), a.style.cssText = `table-layout:fixed;border-collapse:collapse;border-spacing:0;margin:0;width:${r}px;background:var(--og-header-bg,#f5f5f5);`;
1391
1391
  const c = e.length;
1392
1392
  let h = 0;
1393
- const u = (w, C, M, p = "") => {
1394
- const v = S("th", `og-header-cell og-extra-col ${p}`);
1395
- v.setAttribute("rowspan", String(c)), v.textContent = M, Te(v, {
1393
+ const u = (b, C, M, _ = "") => {
1394
+ const y = L("th", `og-header-cell og-extra-col ${_}`);
1395
+ y.setAttribute("rowspan", String(c)), y.textContent = M, Te(y, {
1396
1396
  width: `${C}px`,
1397
1397
  minWidth: `${C}px`,
1398
1398
  textAlign: "center",
1399
1399
  borderRight: "1px solid var(--og-border-color,#e0e0e0)",
1400
1400
  borderBottom: "1px solid var(--og-border-color,#e0e0e0)",
1401
+ // host isolation: extra 컬럼 th 도 호스트 th{} 침범 차단 (border/line-height)
1402
+ borderTop: "0",
1403
+ borderLeft: "0",
1404
+ lineHeight: "normal",
1405
+ verticalAlign: "middle",
1401
1406
  padding: "0",
1402
1407
  fontSize: "11px",
1403
1408
  color: "#999",
1404
1409
  userSelect: "none",
1405
1410
  boxSizing: "border-box",
1406
1411
  background: "var(--og-header-bg,#f5f5f5)"
1407
- }), o > 0 && (v.style.position = "sticky", v.style.left = `${h}px`, v.style.zIndex = "4"), h += C, w.appendChild(v);
1412
+ }), o > 0 && (y.style.position = "sticky", y.style.left = `${h}px`, y.style.zIndex = "4"), h += C, b.appendChild(y);
1408
1413
  };
1409
- for (let w = 0; w < e.length; w++) {
1410
- const C = S("tr", "og-header-row");
1411
- if (C.style.height = `${i.headerHeight}px`, w === 0 && (i.stateColumn && u(C, 24, ""), i.draggable && u(C, 18, ""), i.rowNumber && u(C, 44, "No"), i.checkColumn)) {
1412
- const M = S("th", "og-header-cell og-extra-col");
1413
- M.setAttribute("rowspan", String(c)), M.style.cssText = "width:36px;min-width:36px;text-align:center;border-right:1px solid var(--og-border-color,#e0e0e0);border-bottom:1px solid var(--og-border-color,#e0e0e0);background:var(--og-header-bg,#f5f5f5);box-sizing:border-box;", o > 0 && (M.style.position = "sticky", M.style.left = `${h}px`, M.style.zIndex = "4"), h += 36;
1414
- const p = document.createElement("input");
1415
- p.type = "checkbox", p.setAttribute("aria-label", "전체 행 선택"), p.style.cssText = "width:16px;height:16px;", p.addEventListener("change", () => this._cbs.onAllCheck(p.checked)), M.appendChild(p), C.appendChild(M);
1414
+ for (let b = 0; b < e.length; b++) {
1415
+ const C = L("tr", "og-header-row");
1416
+ if (C.style.height = `${n.headerHeight}px`, b === 0 && (n.stateColumn && u(C, 24, ""), n.draggable && u(C, 18, ""), n.rowNumber && u(C, 44, "No"), n.checkColumn)) {
1417
+ const M = L("th", "og-header-cell og-extra-col");
1418
+ M.setAttribute("rowspan", String(c)), M.style.cssText = "width:36px;min-width:36px;text-align:center;border-right:1px solid var(--og-border-color,#e0e0e0);border-bottom:1px solid var(--og-border-color,#e0e0e0);border-top:0;border-left:0;line-height:normal;vertical-align:middle;background:var(--og-header-bg,#f5f5f5);box-sizing:border-box;", o > 0 && (M.style.position = "sticky", M.style.left = `${h}px`, M.style.zIndex = "4"), h += 36;
1419
+ const _ = document.createElement("input");
1420
+ _.type = "checkbox", _.setAttribute("aria-label", "전체 행 선택"), _.style.cssText = "width:16px;height:16px;", _.addEventListener("change", () => this._cbs.onAllCheck(_.checked)), M.appendChild(_), C.appendChild(M);
1416
1421
  }
1417
- for (const M of e[w] ?? []) {
1418
- const p = S("th", "og-header-cell"), v = M.column;
1419
- M.colSpan > 1 && (p.colSpan = M.colSpan), M.rowSpan > 1 && (p.rowSpan = M.rowSpan);
1420
- const _ = M.colSpan === 1 ? t.findIndex((m) => m.field === v.field) : -1;
1422
+ for (const M of e[b] ?? []) {
1423
+ const _ = L("th", "og-header-cell"), y = M.column;
1424
+ M.colSpan > 1 && (_.colSpan = M.colSpan), M.rowSpan > 1 && (_.rowSpan = M.rowSpan);
1425
+ const p = M.colSpan === 1 ? t.findIndex((m) => m.field === y.field) : -1;
1421
1426
  if (M.colSpan === 1) {
1422
- const m = _ >= 0 ? s[_] ?? i.defaultColumnWidth : v.width ?? i.defaultColumnWidth;
1423
- p.style.width = `${m}px`, p.style.minWidth = `${m}px`;
1427
+ const m = p >= 0 ? s[p] ?? n.defaultColumnWidth : y.width ?? n.defaultColumnWidth;
1428
+ _.style.width = `${m}px`, _.style.minWidth = `${m}px`;
1424
1429
  }
1425
- const F = n.find((m) => m.field === v.field), A = v.sortable !== !1 && i.sortable && M.colSpan === 1;
1426
- if (p.setAttribute("role", "columnheader"), p.setAttribute("scope", "col"), A && (p.setAttribute("aria-sort", F ? F.dir === "asc" ? "ascending" : "descending" : "none"), p.tabIndex = _ === 0 ? 0 : -1, p.addEventListener("keydown", (m) => {
1430
+ const A = i.find((m) => m.field === y.field), T = y.sortable !== !1 && n.sortable && M.colSpan === 1;
1431
+ if (_.setAttribute("role", "columnheader"), _.setAttribute("scope", "col"), T && (_.setAttribute("aria-sort", A ? A.dir === "asc" ? "ascending" : "descending" : "none"), _.tabIndex = p === 0 ? 0 : -1, _.addEventListener("keydown", (m) => {
1427
1432
  if (m.key === "Enter" || m.key === " ")
1428
- m.preventDefault(), this._cbs.onHeaderClick(v.field, m.shiftKey);
1433
+ m.preventDefault(), this._cbs.onHeaderClick(y.field, m.shiftKey);
1429
1434
  else if (m.key === "ArrowRight") {
1430
1435
  m.preventDefault();
1431
- const b = p.nextElementSibling;
1432
- (b == null ? void 0 : b.tagName) === "TH" && b.focus();
1436
+ const v = _.nextElementSibling;
1437
+ (v == null ? void 0 : v.tagName) === "TH" && v.focus();
1433
1438
  } else if (m.key === "ArrowLeft") {
1434
1439
  m.preventDefault();
1435
- const b = p.previousElementSibling;
1436
- (b == null ? void 0 : b.tagName) === "TH" && b.focus();
1440
+ const v = _.previousElementSibling;
1441
+ (v == null ? void 0 : v.tagName) === "TH" && v.focus();
1437
1442
  }
1438
- })), _ >= 0 && _ < o) {
1443
+ })), p >= 0 && p < o) {
1439
1444
  let m = 0;
1440
- i.stateColumn && (m += 24), i.draggable && (m += 18), i.rowNumber && (m += 44), i.checkColumn && (m += 36);
1441
- for (let b = 0; b < _; b++) m += s[b] ?? i.defaultColumnWidth;
1442
- p.classList.add("og-frozen"), _ === o - 1 && p.classList.add("og-frozen-last"), p.style.left = `${m}px`;
1445
+ n.stateColumn && (m += 24), n.draggable && (m += 18), n.rowNumber && (m += 44), n.checkColumn && (m += 36);
1446
+ for (let v = 0; v < p; v++) m += s[v] ?? n.defaultColumnWidth;
1447
+ _.classList.add("og-frozen"), p === o - 1 && _.classList.add("og-frozen-last"), _.style.left = `${m}px`;
1443
1448
  }
1444
- Te(p, {
1449
+ Te(_, {
1445
1450
  padding: "4px 8px",
1446
1451
  boxSizing: "border-box",
1447
- textAlign: v.headerAlign ?? "center",
1452
+ // host isolation: 헤더 <th> 의 모든 시각 속성을 인라인으로 고정한다.
1453
+ // 임베드 호스트(WordPress 등)가 `.entry-content th`/`.fn-post-content th`(특이도 0,2,1)로
1454
+ // 배경·글자·라인높이·보더·폰트크기를 덮어써도 인라인(최고 우선순위)이 이긴다.
1455
+ // (var 참조라 setTheme 시 자동 반영. text-align/padding 은 그리드 의도값 유지)
1456
+ background: "var(--og-header-bg)",
1457
+ color: "var(--og-header-color)",
1458
+ lineHeight: "normal",
1459
+ verticalAlign: "middle",
1460
+ fontSize: "var(--og-font-size)",
1461
+ textAlign: y.headerAlign ?? "center",
1462
+ borderTop: "0",
1463
+ borderLeft: "0",
1448
1464
  borderRight: "1px solid var(--og-border-color,#e0e0e0)",
1449
1465
  borderBottom: "1px solid var(--og-border-color,#e0e0e0)",
1450
1466
  userSelect: "none",
1451
- cursor: A ? "pointer" : "default",
1467
+ cursor: T ? "pointer" : "default",
1452
1468
  whiteSpace: "nowrap",
1453
1469
  overflow: "hidden",
1454
1470
  textOverflow: "ellipsis",
1455
1471
  position: "relative"
1456
- });
1457
- const H = S("span");
1458
- if (H.textContent = v.header ?? v.field, H.style.cssText = "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;", p.appendChild(H), F) {
1459
- p.classList.add("og-sorted");
1460
- const m = S("span", "og-sort-icon");
1461
- m.textContent = F.dir === "asc" ? " ↑" : " ↓", p.appendChild(m);
1472
+ }), _.title = (typeof y.tooltip == "string" ? y.tooltip : y.header ?? y.field) ?? "";
1473
+ const F = L("span");
1474
+ if (F.textContent = y.header ?? y.field, F.style.cssText = "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;", _.appendChild(F), A) {
1475
+ _.classList.add("og-sorted");
1476
+ const m = L("span", "og-sort-icon");
1477
+ m.textContent = A.dir === "asc" ? " ↑" : " ↓", _.appendChild(m);
1462
1478
  }
1463
- if (v.filterable !== !1 && i.filterable && M.colSpan === 1) {
1464
- const m = S("span", "og-filter-icon"), b = ((E = (g = i._activeFilters) == null ? void 0 : g[v.field]) == null ? void 0 : E.length) > 0;
1465
- m.textContent = b ? "⊿" : "▿", m.title = "필터", m.style.cssText = "margin-left:3px;cursor:pointer;font-size:10px;opacity:0.6;", b && m.classList.add("og-filter-icon--active"), m.addEventListener("click", (k) => {
1466
- k.stopPropagation(), this._cbs.onFilterIconClick(v.field, m);
1467
- }), p.appendChild(m);
1479
+ if (y.filterable !== !1 && n.filterable && M.colSpan === 1) {
1480
+ const m = L("span", "og-filter-icon"), v = ((E = (g = n._activeFilters) == null ? void 0 : g[y.field]) == null ? void 0 : E.length) > 0;
1481
+ m.textContent = v ? "⊿" : "▿", m.title = "필터", m.style.cssText = "margin-left:3px;cursor:pointer;font-size:10px;opacity:0.6;", v && m.classList.add("og-filter-icon--active"), m.addEventListener("click", (k) => {
1482
+ k.stopPropagation(), this._cbs.onFilterIconClick(y.field, m);
1483
+ }), _.appendChild(m);
1468
1484
  }
1469
- if (v.resizable !== !1) {
1470
- const m = S("div", "og-resize-handle");
1471
- m.style.cssText = "position:absolute;right:0;top:0;bottom:0;width:4px;cursor:col-resize;z-index:1;", p.appendChild(m);
1472
- const b = _;
1473
- Rt(m, p, (k) => {
1474
- b >= 0 && this._cbs.onColResize(b, k);
1485
+ if (y.resizable !== !1) {
1486
+ const m = L("div", "og-resize-handle");
1487
+ m.style.cssText = "position:absolute;right:0;top:0;bottom:0;width:4px;cursor:col-resize;z-index:1;", _.appendChild(m);
1488
+ const v = p;
1489
+ Rt(m, _, (k) => {
1490
+ v >= 0 && this._cbs.onColResize(v, k);
1475
1491
  });
1476
1492
  }
1477
- i.columnReorder && _ >= 0 && M.colSpan === 1 && (p.draggable = !0, p.addEventListener("dragstart", (m) => {
1478
- var b;
1479
- this._cbs.onColDragStart(_), p.classList.add("og-col-dragging"), (b = m.dataTransfer) == null || b.setData("text/plain", String(_));
1480
- }), p.addEventListener("dragend", () => {
1481
- p.classList.remove("og-col-dragging"), this._header.querySelectorAll(".og-col-drop-over").forEach((m) => m.classList.remove("og-col-drop-over"));
1482
- }), p.addEventListener("dragover", (m) => {
1493
+ n.columnReorder && p >= 0 && M.colSpan === 1 && (_.draggable = !0, _.addEventListener("dragstart", (m) => {
1494
+ var v;
1495
+ this._cbs.onColDragStart(p), _.classList.add("og-col-dragging"), (v = m.dataTransfer) == null || v.setData("text/plain", String(p));
1496
+ }), _.addEventListener("dragend", () => {
1497
+ _.classList.remove("og-col-dragging"), this._header.querySelectorAll(".og-col-drop-over").forEach((m) => m.classList.remove("og-col-drop-over"));
1498
+ }), _.addEventListener("dragover", (m) => {
1483
1499
  m.preventDefault();
1484
- const b = this._cbs.getColDragIdx();
1485
- b !== null && b !== _ && (this._header.querySelectorAll(".og-col-drop-over").forEach((k) => k.classList.remove("og-col-drop-over")), p.classList.add("og-col-drop-over"));
1486
- }), p.addEventListener("dragleave", () => {
1487
- p.classList.remove("og-col-drop-over");
1488
- }), p.addEventListener("drop", (m) => {
1489
- m.preventDefault(), p.classList.remove("og-col-drop-over"), this._cbs.onColDrop(_);
1490
- })), A && p.addEventListener("click", (m) => {
1491
- m.target.classList.contains("og-resize-handle") || this._cbs.onHeaderClick(v.field, m.shiftKey);
1492
- }), C.appendChild(p);
1500
+ const v = this._cbs.getColDragIdx();
1501
+ v !== null && v !== p && (this._header.querySelectorAll(".og-col-drop-over").forEach((k) => k.classList.remove("og-col-drop-over")), _.classList.add("og-col-drop-over"));
1502
+ }), _.addEventListener("dragleave", () => {
1503
+ _.classList.remove("og-col-drop-over");
1504
+ }), _.addEventListener("drop", (m) => {
1505
+ m.preventDefault(), _.classList.remove("og-col-drop-over"), this._cbs.onColDrop(p);
1506
+ })), T && _.addEventListener("click", (m) => {
1507
+ m.target.classList.contains("og-resize-handle") || this._cbs.onHeaderClick(y.field, m.shiftKey);
1508
+ }), C.appendChild(_);
1493
1509
  }
1494
1510
  a.appendChild(C);
1495
1511
  }
1496
1512
  this._header.appendChild(a);
1497
1513
  }
1498
- renderBody(e, t, s, n, i, o, l, r, a, c, h = null, u, g, E = {}, w) {
1499
- var p, v;
1514
+ renderBody(e, t, s, i, n, o, l, r, a, c, h = null, u, g, E = {}, b) {
1515
+ var _, y;
1500
1516
  Object.keys(E).length && (o = { ...o, ...E }), this._body.innerHTML = "", this._cellMap.clear(), this._body.style.height = `${r}px`;
1501
1517
  const C = o._frozenCount ?? 0;
1502
1518
  {
1503
- let _ = 0;
1504
- o.stateColumn && (_ += 24), o.draggable && (_ += 18), o.rowNumber && (_ += 44), o.checkColumn && (_ += 36);
1505
- const F = _ + n.reduce((A, H, $) => A + (i[$] ?? o.defaultColumnWidth), 0);
1506
- this._body.style.minWidth = `${F}px`;
1519
+ let p = 0;
1520
+ o.stateColumn && (p += 24), o.draggable && (p += 18), o.rowNumber && (p += 44), o.checkColumn && (p += 36);
1521
+ const A = p + i.reduce((T, F, z) => T + (n[z] ?? o.defaultColumnWidth), 0);
1522
+ this._body.style.minWidth = `${A}px`;
1507
1523
  }
1508
1524
  if (t < e) return;
1509
1525
  const M = document.createDocumentFragment();
1510
- for (let _ = e; _ <= t; _++) {
1511
- const F = h ? h[_] : null, A = F && F._isGroup === !0, H = F && F._isTree === !0;
1512
- if (A) {
1513
- const f = F, L = `__${f._groupField}:${f._groupValue}`, D = S("div", "og-group-row"), te = l + (_ - e) * o.rowHeight;
1514
- D.style.cssText = [
1515
- `top:${te}px;height:${o.rowHeight}px;`,
1526
+ for (let p = e; p <= t; p++) {
1527
+ const A = h ? h[p] : null, T = A && A._isGroup === !0, F = A && A._isTree === !0;
1528
+ if (T) {
1529
+ const f = A, S = `__${f._groupField}:${f._groupValue}`, $ = L("div", "og-group-row"), se = l + (p - e) * o.rowHeight;
1530
+ $.style.cssText = [
1531
+ `top:${se}px;height:${o.rowHeight}px;`,
1516
1532
  "display:flex;align-items:stretch;cursor:pointer;",
1517
1533
  `padding-left:${4 + f._depth * 12}px;`,
1518
1534
  "background:var(--og-header-bg,#f5f5f5);",
1519
- "border-bottom:1px solid var(--og-border-color,#e0e0e0);"
1520
- ].join(""), D.setAttribute("role", "row"), D.setAttribute("aria-expanded", f._expanded ? "true" : "false"), D.setAttribute("aria-rowindex", String(_ + 1)), D.setAttribute("aria-level", String(f._depth + 1));
1535
+ // host isolation: border:0 선행 (WP :where([style*=border-color]) 의 3px 강제 차단)
1536
+ "border:0;border-bottom:1px solid var(--og-border-color,#e0e0e0);"
1537
+ ].join(""), $.setAttribute("role", "row"), $.setAttribute("aria-expanded", f._expanded ? "true" : "false"), $.setAttribute("aria-rowindex", String(p + 1)), $.setAttribute("aria-level", String(f._depth + 1));
1521
1538
  let P = 0;
1522
1539
  if (o.stateColumn && (P += 24), o.draggable && (P += 18), o.rowNumber && (P += 44), o.checkColumn && (P += 36), P > 0) {
1523
- const y = S("div", "og-group-state-cell");
1524
- y.style.cssText = [
1540
+ const w = L("div", "og-group-state-cell");
1541
+ w.style.cssText = [
1525
1542
  `width:${P}px;min-width:${P}px;flex-shrink:0;`,
1526
1543
  "display:flex;align-items:center;justify-content:center;",
1527
1544
  "font-size:10px;font-weight:700;gap:2px;",
1528
1545
  "border-right:1px solid var(--og-border-color,#e0e0e0);"
1529
1546
  ].join("");
1530
- const I = f._states ?? { added: 0, edited: 0, removed: 0 };
1531
- if (I.added > 0) {
1532
- const z = S("span");
1533
- z.textContent = `+${I.added}`, z.style.cssText = "color:var(--og-row-added-bg,#2e7d32);background:#e8f5e9;padding:1px 3px;border-radius:3px;", y.appendChild(z);
1547
+ const H = f._states ?? { added: 0, edited: 0, removed: 0 };
1548
+ if (H.added > 0) {
1549
+ const I = L("span");
1550
+ I.textContent = `+${H.added}`, I.style.cssText = "color:var(--og-row-added-bg,#2e7d32);background:#e8f5e9;padding:1px 3px;border-radius:3px;", w.appendChild(I);
1534
1551
  }
1535
- if (I.edited > 0) {
1536
- const z = S("span");
1537
- z.textContent = `M${I.edited}`, z.style.cssText = "color:#e65100;background:#fff8e1;padding:1px 3px;border-radius:3px;", y.appendChild(z);
1552
+ if (H.edited > 0) {
1553
+ const I = L("span");
1554
+ I.textContent = `M${H.edited}`, I.style.cssText = "color:#e65100;background:#fff8e1;padding:1px 3px;border-radius:3px;", w.appendChild(I);
1538
1555
  }
1539
- if (I.removed > 0) {
1540
- const z = S("span");
1541
- z.textContent = `D${I.removed}`, z.style.cssText = "color:var(--og-row-removed-bg,#c62828);background:#ffebee;padding:1px 3px;border-radius:3px;", y.appendChild(z);
1556
+ if (H.removed > 0) {
1557
+ const I = L("span");
1558
+ I.textContent = `D${H.removed}`, I.style.cssText = "color:var(--og-row-removed-bg,#c62828);background:#ffebee;padding:1px 3px;border-radius:3px;", w.appendChild(I);
1542
1559
  }
1543
- D.appendChild(y);
1560
+ $.appendChild(w);
1544
1561
  }
1545
1562
  let O = !1;
1546
- for (let y = 0; y < n.length; y++) {
1547
- const I = n[y], z = i[y] ?? o.defaultColumnWidth, se = f._summaryFmt !== void 0 && I.field in (f._summaryFmt ?? {}), B = S("div", "og-group-cell");
1563
+ for (let w = 0; w < i.length; w++) {
1564
+ const H = i[w], I = n[w] ?? o.defaultColumnWidth, ie = f._summaryFmt !== void 0 && H.field in (f._summaryFmt ?? {}), B = L("div", "og-group-cell");
1548
1565
  if (B.style.cssText = [
1549
- `width:${z}px;min-width:${z}px;flex-shrink:0;`,
1566
+ `width:${I}px;min-width:${I}px;flex-shrink:0;`,
1550
1567
  "padding:2px 8px;box-sizing:border-box;overflow:hidden;",
1551
1568
  "border-right:1px solid var(--og-border-color,#e0e0e0);",
1552
1569
  "display:flex;align-items:center;",
1553
1570
  "white-space:nowrap;text-overflow:ellipsis;"
1554
- ].join(""), se) {
1555
- const U = f._summaryFmt[I.field];
1571
+ ].join(""), ie) {
1572
+ const U = f._summaryFmt[H.field];
1556
1573
  B.textContent = U !== "" ? U : "-", B.style.justifyContent = "flex-end", B.style.color = "var(--og-primary,#1976d2)", B.style.fontWeight = "600";
1557
1574
  } else if (!O) {
1558
1575
  O = !0;
1559
- const U = S("span", "og-group-arrow");
1576
+ const U = L("span", "og-group-arrow");
1560
1577
  U.textContent = f._expanded ? "▾ " : "▸ ", U.style.cssText = "color:var(--og-primary,#1976d2);margin-right:4px;flex-shrink:0;", B.appendChild(U);
1561
- const j = S("span", "og-group-label");
1578
+ const j = L("span", "og-group-label");
1562
1579
  j.textContent = `${f._groupLabel} (${f._childCount}건)`, j.style.cssText = "overflow:hidden;text-overflow:ellipsis;font-weight:600;", B.appendChild(j), B.style.gap = "0";
1563
1580
  }
1564
- D.appendChild(B);
1581
+ $.appendChild(B);
1565
1582
  }
1566
- D.addEventListener("click", () => u == null ? void 0 : u(L)), M.appendChild(D);
1583
+ $.addEventListener("click", () => u == null ? void 0 : u(S)), M.appendChild($);
1567
1584
  continue;
1568
1585
  }
1569
- const $ = H ? F : null, m = $ ? $.data : h ? F : s.getRowByIndex(_);
1586
+ const z = F ? A : null, m = z ? z.data : h ? A : s.getRowByIndex(p);
1570
1587
  if (!m) continue;
1571
- const b = H || A ? "none" : s.getRowState(_), k = S("div", "og-row");
1572
- k.setAttribute("role", "row"), k.setAttribute("aria-rowindex", String(_ + 1));
1573
- const K = l + (_ - e) * o.rowHeight;
1588
+ const v = F || T ? "none" : s.getRowState(p), k = L("div", "og-row");
1589
+ k.setAttribute("role", "row"), k.setAttribute("aria-rowindex", String(p + 1));
1590
+ const K = l + (p - e) * o.rowHeight;
1574
1591
  k.style.top = `${K}px`, k.style.height = `${o.rowHeight}px`;
1575
- let T = _ % 2 === 0 ? "var(--og-row-bg,#fff)" : "var(--og-row-alt-bg,#fafafa)";
1576
- k.style.background = T, b === "added" && k.classList.add("og-state-added"), b === "edited" && k.classList.add("og-state-edited"), b === "removed" && k.classList.add("og-state-removed"), a.has(_) && k.classList.add("og-selected"), k.setAttribute("aria-selected", a.has(_) ? "true" : "false"), b === "added" && (T = "var(--og-row-added-bg,#e8f5e9)"), b === "edited" && (T = "var(--og-row-edited-bg,#fff8e1)"), b === "removed" && (T = "var(--og-row-removed-bg,#ffebee)"), a.has(_) && (T = "var(--og-row-selected-bg,#bbdefb)");
1577
- const ne = _;
1592
+ let D = p % 2 === 0 ? "var(--og-row-bg,#fff)" : "var(--og-row-alt-bg,#fafafa)";
1593
+ k.style.background = D, v === "added" && k.classList.add("og-state-added"), v === "edited" && k.classList.add("og-state-edited"), v === "removed" && k.classList.add("og-state-removed"), a.has(p) && k.classList.add("og-selected"), k.setAttribute("aria-selected", a.has(p) ? "true" : "false"), v === "added" && (D = "var(--og-row-added-bg,#e8f5e9)"), v === "edited" && (D = "var(--og-row-edited-bg,#fff8e1)"), v === "removed" && (D = "var(--og-row-removed-bg,#ffebee)"), a.has(p) && (D = "var(--og-row-selected-bg,#bbdefb)");
1594
+ const oe = p;
1578
1595
  k.addEventListener("click", (f) => {
1579
- this._cbs.onCellClick(ne, -1, f);
1596
+ this._cbs.onCellClick(oe, -1, f);
1580
1597
  });
1581
- const oe = /* @__PURE__ */ new Map();
1598
+ const re = /* @__PURE__ */ new Map();
1582
1599
  let V = 0;
1583
1600
  if (o.stateColumn) {
1584
- const f = S("div", "og-cell og-col-state"), L = { added: "✚", edited: "✎", removed: "✖", none: "" }, D = { added: "#2e7d32", edited: "#bf360c", removed: "#c62828", none: "" };
1585
- f.textContent = L[b] ?? "", f.style.color = D[b] ?? "", f.title = b, C > 0 && (f.style.position = "sticky", f.style.left = `${V}px`, f.style.zIndex = "2", f.style.background = T), V += 24, k.appendChild(f);
1601
+ const f = L("div", "og-cell og-col-state"), S = { added: "✚", edited: "✎", removed: "✖", none: "" }, $ = { added: "#2e7d32", edited: "#bf360c", removed: "#c62828", none: "" };
1602
+ f.textContent = S[v] ?? "", f.style.color = $[v] ?? "", f.title = v, C > 0 && (f.style.position = "sticky", f.style.left = `${V}px`, f.style.zIndex = "2", f.style.background = D), V += 24, k.appendChild(f);
1586
1603
  }
1587
1604
  const J = this._cbs.getDndManager();
1588
1605
  if (o.draggable && J) {
1589
- const f = J.attachHandle(k, _, o._totalRows ?? t + 1);
1590
- C > 0 && (f.style.position = "sticky", f.style.left = `${V}px`, f.style.zIndex = "2", f.style.background = T), V += 18, k.appendChild(f);
1606
+ const f = J.attachHandle(k, p, o._totalRows ?? t + 1);
1607
+ C > 0 && (f.style.position = "sticky", f.style.left = `${V}px`, f.style.zIndex = "2", f.style.background = D), V += 18, k.appendChild(f);
1591
1608
  }
1592
1609
  if (o.rowNumber) {
1593
- const f = S("div", "og-cell og-col-rownum");
1594
- f.textContent = String(_ + 1), C > 0 && (f.style.position = "sticky", f.style.left = `${V}px`, f.style.zIndex = "2", f.style.background = T), V += 44, k.appendChild(f);
1610
+ const f = L("div", "og-cell og-col-rownum");
1611
+ f.textContent = String(p + 1), C > 0 && (f.style.position = "sticky", f.style.left = `${V}px`, f.style.zIndex = "2", f.style.background = D), V += 44, k.appendChild(f);
1595
1612
  }
1596
1613
  if (o.checkColumn) {
1597
- const f = S("div", "og-cell og-col-check"), L = document.createElement("input");
1598
- L.type = "checkbox", L.checked = c.has(_), L.setAttribute("aria-label", `${_ + 1}행 선택`), L.addEventListener("click", (D) => D.stopPropagation()), L.addEventListener("change", (D) => {
1599
- D.stopPropagation(), this._cbs.onRowCheck(_, L.checked);
1600
- }), f.appendChild(L), C > 0 && (f.style.position = "sticky", f.style.left = `${V}px`, f.style.zIndex = "2", f.style.background = T), V += 36, k.appendChild(f);
1614
+ const f = L("div", "og-cell og-col-check"), S = document.createElement("input");
1615
+ S.type = "checkbox", S.checked = c.has(p), S.setAttribute("aria-label", `${p + 1}행 선택`), S.addEventListener("click", ($) => $.stopPropagation()), S.addEventListener("change", ($) => {
1616
+ $.stopPropagation(), this._cbs.onRowCheck(p, S.checked);
1617
+ }), f.appendChild(S), C > 0 && (f.style.position = "sticky", f.style.left = `${V}px`, f.style.zIndex = "2", f.style.background = D), V += 36, k.appendChild(f);
1601
1618
  }
1602
- for (let f = 0; f < n.length; f++) {
1603
- const L = n[f], D = i[f] ?? o.defaultColumnWidth, te = o.editable && L.editable !== !1, P = f === 0, O = w && !w.isEmpty ? w.getInfo(_, f) : null;
1619
+ for (let f = 0; f < i.length; f++) {
1620
+ const S = i[f], $ = n[f] ?? o.defaultColumnWidth, se = o.editable && S.editable !== !1, P = f === 0, O = b && !b.isEmpty ? b.getInfo(p, f) : null;
1604
1621
  if (O != null && O.hidden) {
1605
- const R = S("div", "og-cell og-cell--merge-ph");
1606
- R.style.cssText = `width:${D}px;min-width:${D}px;flex-shrink:0;visibility:hidden;box-sizing:border-box;`, k.appendChild(R);
1622
+ const R = L("div", "og-cell og-cell--merge-ph");
1623
+ R.style.cssText = `width:${$}px;min-width:${$}px;flex-shrink:0;visibility:hidden;box-sizing:border-box;`, k.appendChild(R);
1607
1624
  continue;
1608
1625
  }
1609
- const y = S("div", "og-cell");
1610
- y.setAttribute("role", "gridcell"), y.setAttribute("aria-colindex", String(f + 1));
1611
- const I = (O == null ? void 0 : O.rowSpan) ?? 1, z = (O == null ? void 0 : O.colSpan) ?? 1, se = I > 1 ? I * o.rowHeight : o.rowHeight;
1612
- let B = D;
1613
- if (z > 1)
1614
- for (let R = 1; R < z; R++)
1615
- B += i[f + R] ?? o.defaultColumnWidth;
1626
+ const w = L("div", "og-cell");
1627
+ w.setAttribute("role", "gridcell"), w.setAttribute("aria-colindex", String(f + 1));
1628
+ const H = (O == null ? void 0 : O.rowSpan) ?? 1, I = (O == null ? void 0 : O.colSpan) ?? 1, ie = H > 1 ? H * o.rowHeight : o.rowHeight;
1629
+ let B = $;
1630
+ if (I > 1)
1631
+ for (let R = 1; R < I; R++)
1632
+ B += n[f + R] ?? o.defaultColumnWidth;
1616
1633
  const U = f < C;
1617
1634
  let j = 0;
1618
1635
  if (U) {
1619
1636
  o.stateColumn && (j += 24), o.draggable && (j += 18), o.rowNumber && (j += 44), o.checkColumn && (j += 36);
1620
- for (let R = 0; R < f; R++) j += i[R] ?? o.defaultColumnWidth;
1621
- y.classList.add("og-frozen-cell"), f === C - 1 && y.classList.add("og-frozen-last");
1637
+ for (let R = 0; R < f; R++) j += n[R] ?? o.defaultColumnWidth;
1638
+ w.classList.add("og-frozen-cell"), f === C - 1 && w.classList.add("og-frozen-last");
1622
1639
  }
1623
- y.style.width = `${B}px`, y.style.minWidth = `${B}px`, y.style.maxWidth = `${B}px`, I > 1 && (y.style.height = `${se}px`), U && (y.style.background = T), $ && P && (y.style.padding = "0"), y.style.overflow = "hidden", I > 1 ? (y.style.height = `${se}px`, y.style.position = "absolute", y.style.zIndex = "3", y.style.background = T && T !== "inherit" ? T : "var(--og-row-bg, #fff)", y.style.borderBottom = "1px solid var(--og-border-color, #e0e0e0)") : U && (y.style.position = "sticky", y.style.left = `${j}px`, y.style.zIndex = "1"), L.type === "number" || L.align === "right" ? y.classList.add("og-cell--right") : L.align === "center" && y.classList.add("og-cell--center"), te && y.classList.add("og-cell--editable"), te || y.setAttribute("aria-readonly", "true"), z > 1 && y.setAttribute("aria-colspan", String(z)), I > 1 && y.setAttribute("aria-rowspan", String(I)), ((p = o._focusCell) == null ? void 0 : p.ri) === _ && ((v = o._focusCell) == null ? void 0 : v.ci) === f && (y.classList.add("og-cell-focused"), y.tabIndex = -1);
1624
- const xe = m ? m[L.field] : null;
1625
- y.setAttribute("aria-label", `${L.header}: ${xe == null ? "" : String(xe)}`);
1626
- let Ce = y;
1627
- if ($ && P) {
1628
- const R = S("div", "og-tree-cell"), q = $._ancestorHasMore ?? [];
1629
- for (let N = 0; N < $._depth; N++) {
1630
- const Y = S("span", "og-tree-guide");
1640
+ w.style.width = `${B}px`, w.style.minWidth = `${B}px`, w.style.maxWidth = `${B}px`, H > 1 && (w.style.height = `${ie}px`), U && (w.style.background = D), z && P && (w.style.padding = "0"), w.style.overflow = "hidden", H > 1 ? (w.style.height = `${ie}px`, w.style.position = "absolute", w.style.zIndex = "3", w.style.background = D && D !== "inherit" ? D : "var(--og-row-bg, #fff)", w.style.borderTop = "0", w.style.borderLeft = "0", w.style.borderBottom = "1px solid var(--og-border-color, #e0e0e0)") : U && (w.style.position = "sticky", w.style.left = `${j}px`, w.style.zIndex = "1"), S.type === "number" || S.align === "right" ? w.classList.add("og-cell--right") : S.align === "center" && w.classList.add("og-cell--center"), se && w.classList.add("og-cell--editable"), S.wrap && w.classList.add("og-cell--wrap"), se || w.setAttribute("aria-readonly", "true"), I > 1 && w.setAttribute("aria-colspan", String(I)), H > 1 && w.setAttribute("aria-rowspan", String(H)), ((_ = o._focusCell) == null ? void 0 : _.ri) === p && ((y = o._focusCell) == null ? void 0 : y.ci) === f && (w.classList.add("og-cell-focused"), w.tabIndex = -1);
1641
+ const Z = m ? m[S.field] : null;
1642
+ w.setAttribute("aria-label", `${S.header}: ${Z == null ? "" : String(Z)}`), S.tooltip != null ? w.title = typeof S.tooltip == "function" ? String(S.tooltip(Z, m) ?? "") : String(S.tooltip) : o.tooltips && Z != null && Z !== "" && (w.title = String(Z));
1643
+ let Ce = w;
1644
+ if (z && P) {
1645
+ const R = L("div", "og-tree-cell"), q = z._ancestorHasMore ?? [];
1646
+ for (let N = 0; N < z._depth; N++) {
1647
+ const Y = L("span", "og-tree-guide");
1631
1648
  q[N] && Y.classList.add("og-tree-guide--line"), R.appendChild(Y);
1632
1649
  }
1633
- if ($._depth > 0) {
1634
- const N = S("span", "og-tree-connector");
1650
+ if (z._depth > 0) {
1651
+ const N = L("span", "og-tree-connector");
1635
1652
  N.classList.add(
1636
- $._isLastChild ? "og-tree-connector--last" : "og-tree-connector--mid"
1653
+ z._isLastChild ? "og-tree-connector--last" : "og-tree-connector--mid"
1637
1654
  ), R.appendChild(N);
1638
1655
  }
1639
- const ie = S("span", "og-tree-toggle-wrap");
1640
- if (!$._hasChildren) {
1641
- const N = S("span", "og-tree-leaf-dot");
1642
- ie.appendChild(N);
1656
+ const ne = L("span", "og-tree-toggle-wrap");
1657
+ if (!z._hasChildren) {
1658
+ const N = L("span", "og-tree-leaf-dot");
1659
+ ne.appendChild(N);
1643
1660
  }
1644
- R.appendChild(ie);
1661
+ R.appendChild(ne);
1645
1662
  const W = document.createElement("i");
1646
- if ($._hasChildren) {
1647
- const N = Fe(L.treeNodeIcon, m, !0, $._expanded);
1648
- W.className = $._expanded ? `${N} og-tree-node-icon og-tree-node-icon--branch og-tree-node-icon--open og-tree-node-icon--toggle` : `${N} og-tree-node-icon og-tree-node-icon--branch og-tree-node-icon--toggle`, W.setAttribute("role", "button"), W.setAttribute("tabindex", "0"), W.setAttribute("aria-expanded", $._expanded ? "true" : "false"), W.setAttribute("aria-label", $._expanded ? "접기" : "펼치기"), W.addEventListener("click", (Y) => {
1649
- Y.stopPropagation(), g == null || g($._treeId);
1663
+ if (z._hasChildren) {
1664
+ const N = Fe(S.treeNodeIcon, m, !0, z._expanded);
1665
+ W.className = z._expanded ? `${N} og-tree-node-icon og-tree-node-icon--branch og-tree-node-icon--open og-tree-node-icon--toggle` : `${N} og-tree-node-icon og-tree-node-icon--branch og-tree-node-icon--toggle`, W.setAttribute("role", "button"), W.setAttribute("tabindex", "0"), W.setAttribute("aria-expanded", z._expanded ? "true" : "false"), W.setAttribute("aria-label", z._expanded ? "접기" : "펼치기"), W.addEventListener("click", (Y) => {
1666
+ Y.stopPropagation(), g == null || g(z._treeId);
1650
1667
  }), W.addEventListener("keydown", (Y) => {
1651
- (Y.key === "Enter" || Y.key === " ") && (Y.preventDefault(), Y.stopPropagation(), g == null || g($._treeId));
1668
+ (Y.key === "Enter" || Y.key === " ") && (Y.preventDefault(), Y.stopPropagation(), g == null || g(z._treeId));
1652
1669
  });
1653
1670
  } else {
1654
- const N = Fe(L.treeNodeIcon, m, !1, !1);
1671
+ const N = Fe(S.treeNodeIcon, m, !1, !1);
1655
1672
  W.setAttribute("aria-hidden", "true"), W.className = `${N} og-tree-node-icon og-tree-node-icon--leaf`;
1656
1673
  }
1657
- R.appendChild(W), y.appendChild(R), Ce = R;
1674
+ R.appendChild(W), w.appendChild(R), Ce = R;
1658
1675
  }
1659
- if (L.cellStyle) {
1660
- const R = m[L.field], q = typeof L.cellStyle == "function" ? L.cellStyle(R, m, _) : L.cellStyle;
1661
- Object.assign(y.style, q);
1676
+ if (S.cellStyle) {
1677
+ const R = m[S.field], q = typeof S.cellStyle == "function" ? S.cellStyle(R, m, p) : S.cellStyle;
1678
+ Object.assign(w.style, q);
1662
1679
  }
1663
- const je = Ct(L).render({
1664
- value: m[L.field],
1680
+ const qe = Ct(S).render({
1681
+ value: m[S.field],
1665
1682
  row: m,
1666
- rowIndex: _,
1667
- column: L,
1683
+ rowIndex: p,
1684
+ column: S,
1668
1685
  colIndex: f,
1669
- isSelected: a.has(_),
1670
- rowState: b
1686
+ isSelected: a.has(p),
1687
+ rowState: v
1671
1688
  });
1672
- Ce.appendChild(je);
1673
- const X = _, G = f;
1674
- if (y.addEventListener("click", (R) => {
1689
+ Ce.appendChild(qe);
1690
+ const X = p, G = f;
1691
+ if (w.addEventListener("click", (R) => {
1675
1692
  R.stopPropagation(), this._cbs.onCellClick(X, G, R);
1676
- }), y.addEventListener("dblclick", (R) => {
1693
+ }), w.addEventListener("dblclick", (R) => {
1677
1694
  R.stopPropagation(), this._cbs.onCellDblClick(X, G, R);
1678
- }), y.addEventListener("mouseover", (R) => {
1695
+ }), w.addEventListener("mouseover", (R) => {
1679
1696
  R.stopPropagation(), this._cbs.onCellMouseOver(X, G, R);
1680
- }), y.addEventListener("mouseout", (R) => {
1697
+ }), w.addEventListener("mouseout", (R) => {
1681
1698
  R.stopPropagation(), this._cbs.onCellMouseOut(X, G, R);
1682
- }), y.addEventListener("mousedown", (R) => {
1699
+ }), w.addEventListener("mousedown", (R) => {
1683
1700
  R.stopPropagation(), this._cbs.onCellMouseDown(X, G, R);
1684
- }), y.addEventListener("mouseup", (R) => {
1701
+ }), w.addEventListener("mouseup", (R) => {
1685
1702
  R.stopPropagation(), this._cbs.onCellMouseUp(X, G, R);
1686
- }), y.addEventListener("mousemove", (R) => {
1703
+ }), w.addEventListener("mousemove", (R) => {
1687
1704
  R.stopPropagation(), this._cbs.onCellMouseMove(X, G, R);
1688
- }), oe.set(f, y), I > 1) {
1705
+ }), re.set(f, w), H > 1) {
1689
1706
  const R = document.createElement("div");
1690
1707
  R.style.cssText = [
1691
- `width:${D}px;min-width:${D}px;height:${o.rowHeight}px;`,
1708
+ `width:${$}px;min-width:${$}px;height:${o.rowHeight}px;`,
1692
1709
  "flex-shrink:0;box-sizing:border-box;",
1693
1710
  "border-right:1px solid var(--og-border-color,#e0e0e0);"
1694
1711
  ].join(""), k.appendChild(R);
1695
1712
  let q = 0;
1696
1713
  o.stateColumn && (q += 24), o.draggable && (q += 18), o.rowNumber && (q += 44), o.checkColumn && (q += 36);
1697
- for (let W = 0; W < f; W++) q += i[W] ?? o.defaultColumnWidth;
1698
- const ie = l + (_ - e) * o.rowHeight;
1699
- y.style.left = `${q}px`, y.style.top = `${ie}px`, M.appendChild(y);
1714
+ for (let W = 0; W < f; W++) q += n[W] ?? o.defaultColumnWidth;
1715
+ const ne = l + (p - e) * o.rowHeight;
1716
+ w.style.left = `${q}px`, w.style.top = `${ne}px`, M.appendChild(w);
1700
1717
  } else
1701
- k.appendChild(y);
1718
+ k.appendChild(w);
1702
1719
  }
1703
- this._cellMap.set(_, oe), M.appendChild(k);
1720
+ this._cellMap.set(p, re), M.appendChild(k);
1704
1721
  }
1705
1722
  if (s.rowCount === 0) {
1706
- const _ = S("div", "og-empty-message");
1707
- _.textContent = "데이터가 없습니다.", _.style.cssText = "width:100%;", M.appendChild(_);
1723
+ const p = L("div", "og-empty-message");
1724
+ p.textContent = "데이터가 없습니다.", p.style.cssText = "width:100%;", M.appendChild(p);
1708
1725
  }
1709
1726
  this._body.appendChild(M);
1710
1727
  }
@@ -1717,10 +1734,10 @@ class Mt {
1717
1734
  }
1718
1735
  }
1719
1736
  function Fe(d, e, t, s) {
1720
- let n;
1721
- return d ? typeof d == "function" ? n = d(e, t, s) : t ? n = s ? d.branchOpen ?? "bi-folder2-open" : d.branch ?? "bi-folder2" : n = d.leaf ?? "bi-file-earmark" : n = t ? s ? "bi-folder2-open" : "bi-folder2" : "bi-file-earmark", n.startsWith("bi ") ? n : `bi ${n}`;
1737
+ let i;
1738
+ return d ? typeof d == "function" ? i = d(e, t, s) : t ? i = s ? d.branchOpen ?? "bi-folder2-open" : d.branch ?? "bi-folder2" : i = d.leaf ?? "bi-file-earmark" : i = t ? s ? "bi-folder2-open" : "bi-folder2" : "bi-file-earmark", i.startsWith("bi ") ? i : `bi ${i}`;
1722
1739
  }
1723
- function S(d, e) {
1740
+ function L(d, e) {
1724
1741
  const t = document.createElement(d);
1725
1742
  return e && (t.className = e), t;
1726
1743
  }
@@ -1728,18 +1745,18 @@ function Te(d, e) {
1728
1745
  Object.assign(d.style, e);
1729
1746
  }
1730
1747
  function De(d, e, t = "text/plain;charset=utf-8") {
1731
- const s = new Blob([d], { type: t }), n = URL.createObjectURL(s), i = document.createElement("a");
1732
- i.href = n, i.download = e, i.click(), URL.revokeObjectURL(n);
1748
+ const s = new Blob([d], { type: t }), i = URL.createObjectURL(s), n = document.createElement("a");
1749
+ n.href = i, n.download = e, n.click(), URL.revokeObjectURL(i);
1733
1750
  }
1734
1751
  function Rt(d, e, t) {
1735
- let s = 0, n = 0;
1736
- d.addEventListener("mousedown", (i) => {
1737
- i.stopPropagation(), i.preventDefault(), s = i.clientX, n = e.offsetWidth;
1752
+ let s = 0, i = 0;
1753
+ d.addEventListener("mousedown", (n) => {
1754
+ n.stopPropagation(), n.preventDefault(), s = n.clientX, i = e.offsetWidth;
1738
1755
  const o = (r) => {
1739
- const a = Math.max(40, n + r.clientX - s);
1756
+ const a = Math.max(40, i + r.clientX - s);
1740
1757
  e.style.width = `${a}px`, e.style.minWidth = `${a}px`;
1741
1758
  }, l = (r) => {
1742
- document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", l), t(Math.max(40, n + r.clientX - s));
1759
+ document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", l), t(Math.max(40, i + r.clientX - s));
1743
1760
  };
1744
1761
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", l);
1745
1762
  });
@@ -1815,7 +1832,7 @@ class kt {
1815
1832
  this._selectedRows.clear(), this._checkedRows.clear();
1816
1833
  }
1817
1834
  }
1818
- class pe {
1835
+ class fe {
1819
1836
  constructor() {
1820
1837
  this._onKeyDown = (e) => {
1821
1838
  e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), this._onCommit(this.input.value)) : e.key === "Escape" && this._onCancel();
@@ -1823,12 +1840,12 @@ class pe {
1823
1840
  this._onCommit(this.input.value);
1824
1841
  };
1825
1842
  }
1826
- mount(e, t, s, n) {
1827
- this._container = e, this._onCommit = s, this._onCancel = n, e.setAttribute("aria-haspopup", "dialog"), e.setAttribute("aria-expanded", "true"), this.input = document.createElement("input"), this.input.type = "date", this.input.className = "og-cell-input", this.input.setAttribute("aria-label", t.column.header ?? "날짜 선택");
1828
- const i = t.value;
1829
- if (i) {
1830
- const o = i instanceof Date ? i : new Date(i);
1831
- isNaN(o.getTime()) || (this.input.value = We(o, "yyyy-MM-dd"));
1843
+ mount(e, t, s, i) {
1844
+ this._container = e, this._onCommit = s, this._onCancel = i, e.setAttribute("aria-haspopup", "dialog"), e.setAttribute("aria-expanded", "true"), this.input = document.createElement("input"), this.input.type = "date", this.input.className = "og-cell-input", this.input.setAttribute("aria-label", t.column.header ?? "날짜 선택");
1845
+ const n = t.value;
1846
+ if (n) {
1847
+ const o = n instanceof Date ? n : new Date(n);
1848
+ isNaN(o.getTime()) || (this.input.value = Ne(o, "yyyy-MM-dd"));
1832
1849
  }
1833
1850
  this.input.addEventListener("keydown", this._onKeyDown), this.input.addEventListener("blur", this._onBlur), e.appendChild(this.input);
1834
1851
  }
@@ -1848,20 +1865,20 @@ class pe {
1848
1865
  function $e(d) {
1849
1866
  return d.map((e) => typeof e == "string" ? { label: e, value: e } : { label: e.label ?? e.text ?? String(e.value ?? ""), value: e.value });
1850
1867
  }
1851
- class fe {
1868
+ class me {
1852
1869
  constructor(e = [], t) {
1853
1870
  this._options = $e(e), this._optionsFn = t ?? null;
1854
1871
  }
1855
- mount(e, t, s, n) {
1856
- this._container = e, this._onCommit = s, this._onCancel = n, e.setAttribute("aria-haspopup", "listbox"), e.setAttribute("aria-expanded", "true"), this.select = document.createElement("select"), this.select.className = "og-cell-select", this.select.setAttribute("aria-label", t.column.header ?? "선택");
1857
- const i = this._optionsFn ? $e(this._optionsFn(t.row, t.rowIndex)) : this._options;
1858
- for (const l of i) {
1872
+ mount(e, t, s, i) {
1873
+ this._container = e, this._onCommit = s, this._onCancel = i, e.setAttribute("aria-haspopup", "listbox"), e.setAttribute("aria-expanded", "true"), this.select = document.createElement("select"), this.select.className = "og-cell-select", this.select.setAttribute("aria-label", t.column.header ?? "선택");
1874
+ const n = this._optionsFn ? $e(this._optionsFn(t.row, t.rowIndex)) : this._options;
1875
+ for (const l of n) {
1859
1876
  const r = document.createElement("option");
1860
1877
  r.value = String(l.value), r.textContent = l.label, this.select.appendChild(r);
1861
1878
  }
1862
1879
  const o = t.value == null ? "" : String(t.value);
1863
- i.some((l) => String(l.value) === o) && (this.select.value = o), this.select.addEventListener("change", () => s(this.select.value)), this.select.addEventListener("blur", () => s(this.select.value)), this.select.addEventListener("keydown", (l) => {
1864
- l.key === "Escape" && n();
1880
+ n.some((l) => String(l.value) === o) && (this.select.value = o), this.select.addEventListener("change", () => s(this.select.value)), this.select.addEventListener("blur", () => s(this.select.value)), this.select.addEventListener("keydown", (l) => {
1881
+ l.key === "Escape" && i();
1865
1882
  }), e.appendChild(this.select);
1866
1883
  }
1867
1884
  getValue() {
@@ -1877,7 +1894,7 @@ class fe {
1877
1894
  (e = this._container) == null || e.setAttribute("aria-expanded", "false");
1878
1895
  }
1879
1896
  }
1880
- class me {
1897
+ class be {
1881
1898
  constructor() {
1882
1899
  this._onKeyDown = (e) => {
1883
1900
  e.stopPropagation(), e.key === "Enter" || e.key === "Tab" ? (e.preventDefault(), this._onCommit(this.input.value)) : e.key === "Escape" && this._onCancel();
@@ -1885,8 +1902,8 @@ class me {
1885
1902
  this._onCommit(this.input.value);
1886
1903
  };
1887
1904
  }
1888
- mount(e, t, s, n) {
1889
- this._onCommit = s, this._onCancel = n, this.input = document.createElement("input"), this.input.type = "text", this.input.value = t.value == null ? "" : String(t.value), this.input.style.cssText = `
1905
+ mount(e, t, s, i) {
1906
+ this._onCommit = s, this._onCancel = i, this.input = document.createElement("input"), this.input.type = "text", this.input.value = t.value == null ? "" : String(t.value), this.input.style.cssText = `
1890
1907
  width:100%;height:100%;border:none;outline:none;padding:0 8px;
1891
1908
  font-size:var(--og-font-size,13px);font-family:var(--og-font-family,sans-serif);
1892
1909
  background:var(--og-row-bg,#fff);box-sizing:border-box;
@@ -1913,8 +1930,8 @@ class we {
1913
1930
  this._commit();
1914
1931
  }, this.min = e == null ? void 0 : e.min, this.max = e == null ? void 0 : e.max, this.step = e == null ? void 0 : e.step;
1915
1932
  }
1916
- mount(e, t, s, n) {
1917
- this._onCommit = s, this._onCancel = n, this.input = document.createElement("input"), this.input.type = "number", this.input.value = t.value == null ? "" : String(t.value), this.min != null && (this.input.min = String(this.min)), this.max != null && (this.input.max = String(this.max)), this.step != null && (this.input.step = String(this.step)), this.input.style.cssText = `
1933
+ mount(e, t, s, i) {
1934
+ this._onCommit = s, this._onCancel = i, this.input = document.createElement("input"), this.input.type = "number", this.input.value = t.value == null ? "" : String(t.value), this.min != null && (this.input.min = String(this.min)), this.max != null && (this.input.max = String(this.max)), this.step != null && (this.input.step = String(this.step)), this.input.style.cssText = `
1918
1935
  width:100%;height:100%;border:none;outline:none;padding:0 8px;
1919
1936
  font-size:var(--og-font-size,13px);text-align:right;
1920
1937
  background:var(--og-row-bg,#fff);box-sizing:border-box;
@@ -1938,7 +1955,7 @@ class we {
1938
1955
  }
1939
1956
  }
1940
1957
  class ye {
1941
- mount(e, t, s, n) {
1958
+ mount(e, t, s, i) {
1942
1959
  this._onCommit = s, e.style.cssText += "display:flex;align-items:center;justify-content:center;", this.chk = document.createElement("input"), this.chk.type = "checkbox", this.chk.checked = !!t.value, this.chk.style.cursor = "pointer", this.chk.addEventListener("change", () => s(this.chk.checked)), e.appendChild(this.chk);
1943
1960
  }
1944
1961
  getValue() {
@@ -1959,26 +1976,26 @@ function Ae(d) {
1959
1976
  case "number":
1960
1977
  return new we();
1961
1978
  case "date":
1962
- return new pe();
1979
+ return new fe();
1963
1980
  case "boolean":
1964
1981
  return new ye();
1965
1982
  case "select":
1966
- return new fe(d.options ?? [], d.optionsFn);
1983
+ return new me(d.options ?? [], d.optionsFn);
1967
1984
  default:
1968
- return new me();
1985
+ return new be();
1969
1986
  }
1970
1987
  if (typeof e == "string")
1971
1988
  switch (e) {
1972
1989
  case "number":
1973
1990
  return new we();
1974
1991
  case "date":
1975
- return new pe();
1992
+ return new fe();
1976
1993
  case "select":
1977
- return new fe(d.options ?? [], d.optionsFn);
1994
+ return new me(d.options ?? [], d.optionsFn);
1978
1995
  case "checkbox":
1979
1996
  return new ye();
1980
1997
  default:
1981
- return new me();
1998
+ return new be();
1982
1999
  }
1983
2000
  switch (e.type) {
1984
2001
  case "number": {
@@ -1986,16 +2003,16 @@ function Ae(d) {
1986
2003
  return e.min != null && (t.min = e.min), e.max != null && (t.max = e.max), e.step != null && (t.step = e.step), new we(t);
1987
2004
  }
1988
2005
  case "date":
1989
- return new pe();
2006
+ return new fe();
1990
2007
  case "select":
1991
- return new fe(e.options ?? [], d.optionsFn);
2008
+ return new me(e.options ?? [], d.optionsFn);
1992
2009
  case "checkbox":
1993
2010
  return new ye();
1994
2011
  default:
1995
- return new me();
2012
+ return new be();
1996
2013
  }
1997
2014
  }
1998
- function Z(d) {
2015
+ function ee(d) {
1999
2016
  const e = typeof d.renderer == "string" ? d.renderer : d.renderer && typeof d.renderer == "object" ? d.renderer.type : "";
2000
2017
  return d.type === "boolean" || d.type === "checkbox" || e === "checkbox" || e === "switch";
2001
2018
  }
@@ -2022,11 +2039,11 @@ class Et {
2022
2039
  // ─── 포커스 셀 ───────────────────────────────────────────
2023
2040
  setFocusCell(e, t) {
2024
2041
  this._focusCell = { ri: e, ci: t }, this._d.scrollToRow(e), this._d.doRender();
2025
- const s = this._d.getVisibleLeaves()[t], n = this._d.data.getRowByIndex(e);
2026
- if (s && n) {
2027
- const i = n[s.field];
2042
+ const s = this._d.getVisibleLeaves()[t], i = this._d.data.getRowByIndex(e);
2043
+ if (s && i) {
2044
+ const n = i[s.field];
2028
2045
  this._d.announce(
2029
- `${e + 1}행 ${t + 1}열, ${s.header}: ${i == null ? "빈 값" : String(i)}`
2046
+ `${e + 1}행 ${t + 1}열, ${s.header}: ${n == null ? "빈 값" : String(n)}`
2030
2047
  );
2031
2048
  }
2032
2049
  }
@@ -2038,7 +2055,7 @@ class Et {
2038
2055
  var a, c, h;
2039
2056
  const s = this._d.getVisibleLeaves()[t];
2040
2057
  if (!s) return;
2041
- if (Z(s)) {
2058
+ if (ee(s)) {
2042
2059
  const u = this._d.getOptions();
2043
2060
  if (s.editable !== !1 && (s.editable !== void 0 || u.editable)) {
2044
2061
  const E = this._d.data.getRowByIndex(e);
@@ -2046,12 +2063,12 @@ class Et {
2046
2063
  }
2047
2064
  return;
2048
2065
  }
2049
- const n = this._d.data.getRowByIndex(e);
2050
- if (s.editable === !1 || typeof s.editable == "function" && !s.editable(n, e)) return;
2066
+ const i = this._d.data.getRowByIndex(e);
2067
+ if (s.editable === !1 || typeof s.editable == "function" && !s.editable(i, e)) return;
2051
2068
  this.commitEdit();
2052
- const i = (a = this._d.getRenderer()) == null ? void 0 : a.getCellEl(e, t);
2053
- if (!i) return;
2054
- i.innerHTML = "";
2069
+ const n = (a = this._d.getRenderer()) == null ? void 0 : a.getCellEl(e, t);
2070
+ if (!n) return;
2071
+ n.innerHTML = "";
2055
2072
  const o = Ae(s);
2056
2073
  this._activeEditor = o, this._editCell = { ri: e, ci: t };
2057
2074
  const l = {
@@ -2059,15 +2076,15 @@ class Et {
2059
2076
  rowIndex: e,
2060
2077
  columnIndex: t,
2061
2078
  field: s.field,
2062
- oldValue: n == null ? void 0 : n[s.field],
2063
- newValue: n == null ? void 0 : n[s.field],
2064
- row: n,
2079
+ oldValue: i == null ? void 0 : i[s.field],
2080
+ newValue: i == null ? void 0 : i[s.field],
2081
+ row: i,
2065
2082
  column: s
2066
2083
  };
2067
- this._d.emit("editStart", l), (h = (c = this._d.getOptions()).onEditStart) == null || h.call(c, l), i.classList.add("og-editing");
2084
+ this._d.emit("editStart", l), (h = (c = this._d.getOptions()).onEditStart) == null || h.call(c, l), n.classList.add("og-editing");
2068
2085
  const r = {
2069
- value: n == null ? void 0 : n[s.field],
2070
- row: n,
2086
+ value: i == null ? void 0 : i[s.field],
2087
+ row: i,
2071
2088
  rowIndex: e,
2072
2089
  column: s,
2073
2090
  colIndex: t,
@@ -2075,7 +2092,7 @@ class Et {
2075
2092
  rowState: "none"
2076
2093
  };
2077
2094
  o.mount(
2078
- i,
2095
+ n,
2079
2096
  r,
2080
2097
  (u) => this.commitEditWithValue(e, t, u),
2081
2098
  () => this.cancelEdit()
@@ -2084,34 +2101,34 @@ class Et {
2084
2101
  // ─── 편집 시작 (마우스) ──────────────────────────────────
2085
2102
  startEdit(e, t, s) {
2086
2103
  var h, u;
2087
- const n = this._d.getOptions();
2088
- if (!n.editable) return;
2089
- const i = this._d.getVisibleLeaves()[t];
2090
- if (!i || Z(i)) return;
2104
+ const i = this._d.getOptions();
2105
+ if (!i.editable) return;
2106
+ const n = this._d.getVisibleLeaves()[t];
2107
+ if (!n || ee(n)) return;
2091
2108
  const o = this._d.data.getRowByIndex(e);
2092
- if (i.editable === !1 || typeof i.editable == "function" && !i.editable(o, e) || !i.editable && !n.editable) return;
2109
+ if (n.editable === !1 || typeof n.editable == "function" && !n.editable(o, e) || !n.editable && !i.editable) return;
2093
2110
  this.commitEdit();
2094
2111
  const l = (h = this._d.getRenderer()) == null ? void 0 : h.getCellEl(e, t);
2095
2112
  if (!l) return;
2096
2113
  l.innerHTML = "";
2097
- const r = Ae(i);
2114
+ const r = Ae(n);
2098
2115
  this._activeEditor = r, this._editCell = { ri: e, ci: t };
2099
2116
  const a = {
2100
2117
  type: "editStart",
2101
2118
  rowIndex: e,
2102
2119
  columnIndex: t,
2103
- field: i.field,
2104
- oldValue: o == null ? void 0 : o[i.field],
2105
- newValue: o == null ? void 0 : o[i.field],
2120
+ field: n.field,
2121
+ oldValue: o == null ? void 0 : o[n.field],
2122
+ newValue: o == null ? void 0 : o[n.field],
2106
2123
  row: o,
2107
- column: i
2124
+ column: n
2108
2125
  };
2109
- this._d.emit("editStart", a), (u = n.onEditStart) == null || u.call(n, a), l.classList.add("og-editing");
2126
+ this._d.emit("editStart", a), (u = i.onEditStart) == null || u.call(i, a), l.classList.add("og-editing");
2110
2127
  const c = {
2111
- value: o == null ? void 0 : o[i.field],
2128
+ value: o == null ? void 0 : o[n.field],
2112
2129
  row: o,
2113
2130
  rowIndex: e,
2114
- column: i,
2131
+ column: n,
2115
2132
  colIndex: t,
2116
2133
  isSelected: !0,
2117
2134
  rowState: "none"
@@ -2137,23 +2154,23 @@ class Et {
2137
2154
  const { ri: e, ci: t } = this._editCell;
2138
2155
  this._finishEdit(e, t, void 0, !0);
2139
2156
  }
2140
- _finishEdit(e, t, s, n) {
2157
+ _finishEdit(e, t, s, i) {
2141
2158
  var l, r, a;
2142
2159
  if (!this._activeEditor) return;
2143
- const i = this._d.getVisibleLeaves()[t], o = (l = this._d.getRenderer()) == null ? void 0 : l.getCellEl(e, t);
2144
- if (o && (this._activeEditor.destroy(), o.classList.remove("og-editing")), this._activeEditor = null, this._editCell = null, !n && i) {
2145
- const c = this._d.data.getCellValue(e, i.field);
2160
+ const n = this._d.getVisibleLeaves()[t], o = (l = this._d.getRenderer()) == null ? void 0 : l.getCellEl(e, t);
2161
+ if (o && (this._activeEditor.destroy(), o.classList.remove("og-editing")), this._activeEditor = null, this._editCell = null, !i && n) {
2162
+ const c = this._d.data.getCellValue(e, n.field);
2146
2163
  if (s !== c) {
2147
- this._d.data.updateCell(e, i.field, s);
2164
+ this._d.data.updateCell(e, n.field, s);
2148
2165
  const h = this._d.data.getRowByIndex(e), u = this._d.getOptions(), g = {
2149
2166
  type: "editEnd",
2150
2167
  rowIndex: e,
2151
2168
  columnIndex: t,
2152
- field: i.field,
2169
+ field: n.field,
2153
2170
  oldValue: c,
2154
2171
  newValue: s,
2155
2172
  row: h,
2156
- column: i
2173
+ column: n
2157
2174
  };
2158
2175
  this._d.emit("editEnd", g), (r = u.onEditEnd) == null || r.call(u, g), this._d.emit("dataChange", this._d.data.getData()), (a = u.onDataChange) == null || a.call(u, this._d.data.getData());
2159
2176
  }
@@ -2162,8 +2179,8 @@ class Et {
2162
2179
  }
2163
2180
  }
2164
2181
  class St {
2165
- constructor(e, t, s, n, i) {
2166
- this._selects = /* @__PURE__ */ new Map(), this._selected = {}, this._config = t, this._onFilter = s, this._onReset = n, this._el = document.createElement("fieldset"), this._el.className = "og-filter-select";
2182
+ constructor(e, t, s, i, n) {
2183
+ this._selects = /* @__PURE__ */ new Map(), this._selected = {}, this._config = t, this._onFilter = s, this._onReset = i, this._el = document.createElement("fieldset"), this._el.className = "og-filter-select";
2167
2184
  const o = document.createElement("legend");
2168
2185
  o.className = "og-filter-select-legend", o.textContent = t.legend ?? "필터", this._el.appendChild(o);
2169
2186
  const l = document.createElement("div");
@@ -2174,7 +2191,7 @@ class St {
2174
2191
  const u = document.createElement("label");
2175
2192
  u.htmlFor = c, u.textContent = a.label, u.className = "og-filter-select-label";
2176
2193
  const g = document.createElement("select");
2177
- g.id = c, g.className = "og-filter-select-sel", g.setAttribute("aria-label", a.label), i && g.setAttribute("aria-controls", i), a.dependsOn ? this._fill(g, [], !1) : this._fill(g, this._resolve(a, ""), !0), g.addEventListener("change", () => this._onChange(a.field, g.value)), h.appendChild(u), h.appendChild(g), l.appendChild(h), this._selects.set(a.field, g);
2194
+ g.id = c, g.className = "og-filter-select-sel", g.setAttribute("aria-label", a.label), n && g.setAttribute("aria-controls", n), a.dependsOn ? this._fill(g, [], !1) : this._fill(g, this._resolve(a, ""), !0), g.addEventListener("change", () => this._onChange(a.field, g.value)), h.appendChild(u), h.appendChild(g), l.appendChild(h), this._selects.set(a.field, g);
2178
2195
  }
2179
2196
  const r = document.createElement("button");
2180
2197
  r.type = "button", r.textContent = "초기화", r.className = "og-filter-select-reset", r.setAttribute("aria-label", "필터 초기화"), r.addEventListener("click", () => this._reset()), this._el.appendChild(l), this._el.appendChild(r), e.insertBefore(this._el, e.firstChild);
@@ -2192,27 +2209,27 @@ class St {
2192
2209
  e.dependsOn && e.dependsOnKey && t && (s = s.filter(
2193
2210
  (o) => String(o[e.dependsOnKey] ?? "") === t
2194
2211
  ));
2195
- const n = e.valueKey ?? "value", i = e.textKey ?? n;
2212
+ const i = e.valueKey ?? "value", n = e.textKey ?? i;
2196
2213
  return s.map((o) => ({
2197
- value: String(o[n] ?? ""),
2198
- text: String(o[i] ?? o[n] ?? "")
2214
+ value: String(o[i] ?? ""),
2215
+ text: String(o[n] ?? o[i] ?? "")
2199
2216
  }));
2200
2217
  }
2201
2218
  // ─── select DOM 채우기 ────────────────────────────────
2202
2219
  _fill(e, t, s) {
2203
2220
  e.innerHTML = "";
2204
- const n = document.createElement("option");
2205
- n.value = "", n.textContent = "전체", e.appendChild(n);
2206
- for (const i of t) {
2221
+ const i = document.createElement("option");
2222
+ i.value = "", i.textContent = "전체", e.appendChild(i);
2223
+ for (const n of t) {
2207
2224
  const o = document.createElement("option");
2208
- o.value = i.value, o.textContent = i.text, e.appendChild(o);
2225
+ o.value = n.value, o.textContent = n.text, e.appendChild(o);
2209
2226
  }
2210
2227
  e.disabled = !s;
2211
2228
  }
2212
2229
  // ─── 선택 변경 처리 ───────────────────────────────────
2213
2230
  _onChange(e, t) {
2214
- const s = this._config.columns.find((i) => i.field === e), n = s.filterKey ?? s.field;
2215
- t ? (this._selected[e] = t, this._onFilter(n, [{ operator: "=", value: t }])) : (delete this._selected[e], this._onReset(n)), this._cascade(e);
2231
+ const s = this._config.columns.find((n) => n.field === e), i = s.filterKey ?? s.field;
2232
+ t ? (this._selected[e] = t, this._onFilter(i, [{ operator: "=", value: t }])) : (delete this._selected[e], this._onReset(i)), this._cascade(e);
2216
2233
  }
2217
2234
  /**
2218
2235
  * 부모 컬럼 변경 후 자식 컬럼 옵션을 재계산한다 (재귀).
@@ -2221,10 +2238,10 @@ class St {
2221
2238
  const t = this._selected[e] ?? "";
2222
2239
  for (const s of this._config.columns) {
2223
2240
  if (s.dependsOn !== e) continue;
2224
- const n = this._selects.get(s.field);
2225
- if (!n) continue;
2226
- const i = s.filterKey ?? s.field;
2227
- t ? (this._fill(n, this._resolve(s, t), !0), n.value = "", delete this._selected[s.field], this._onReset(i)) : (this._fill(n, [], !1), delete this._selected[s.field], this._onReset(i), this._cascade(s.field));
2241
+ const i = this._selects.get(s.field);
2242
+ if (!i) continue;
2243
+ const n = s.filterKey ?? s.field;
2244
+ t ? (this._fill(i, this._resolve(s, t), !0), i.value = "", delete this._selected[s.field], this._onReset(n)) : (this._fill(i, [], !1), delete this._selected[s.field], this._onReset(n), this._cascade(s.field));
2228
2245
  }
2229
2246
  }
2230
2247
  // ─── 전체 초기화 ──────────────────────────────────────
@@ -2291,15 +2308,15 @@ class Lt {
2291
2308
  t.style.cssText = "display:flex;align-items:center;gap:3px;margin-right:8px;";
2292
2309
  const s = document.createElement("span");
2293
2310
  s.textContent = "행/페이지:", s.style.color = "#888";
2294
- const n = document.createElement("select");
2295
- n.style.cssText = "padding:2px 4px;border:1px solid var(--og-border-color,#e0e0e0);border-radius:3px;font-size:11px;cursor:pointer;";
2311
+ const i = document.createElement("select");
2312
+ i.style.cssText = "padding:2px 4px;border:1px solid var(--og-border-color,#e0e0e0);border-radius:3px;font-size:11px;cursor:pointer;";
2296
2313
  for (const c of [10, 20, 50, 100, 200]) {
2297
2314
  const h = document.createElement("option");
2298
- h.value = String(c), h.textContent = String(c), c === this._pageSize && (h.selected = !0), n.appendChild(h);
2315
+ h.value = String(c), h.textContent = String(c), c === this._pageSize && (h.selected = !0), i.appendChild(h);
2299
2316
  }
2300
- n.addEventListener("change", () => this.setPageSize(Number(n.value))), t.appendChild(s), t.appendChild(n), this._el.appendChild(t);
2301
- const i = document.createElement("span"), { start: o, end: l } = this.getRange();
2302
- i.textContent = this._totalRows > 0 ? `${o + 1}–${l + 1} / ${this._totalRows}건` : "0건", i.style.cssText = "margin-right:8px;color:#888;", this._el.appendChild(i);
2317
+ i.addEventListener("change", () => this.setPageSize(Number(i.value))), t.appendChild(s), t.appendChild(i), this._el.appendChild(t);
2318
+ const n = document.createElement("span"), { start: o, end: l } = this.getRange();
2319
+ n.textContent = this._totalRows > 0 ? `${o + 1}–${l + 1} / ${this._totalRows}건` : "0건", n.style.cssText = "margin-right:8px;color:#888;", this._el.appendChild(n);
2303
2320
  const r = (c, h, u) => {
2304
2321
  const g = document.createElement("button");
2305
2322
  return g.textContent = c, g.disabled = u, g.style.cssText = `
@@ -2327,7 +2344,7 @@ class Lt {
2327
2344
  }
2328
2345
  }
2329
2346
  function Ft(d, e) {
2330
- if (e <= 7) return Array.from({ length: e }, (s, n) => n + 1);
2347
+ if (e <= 7) return Array.from({ length: e }, (s, i) => i + 1);
2331
2348
  const t = [1];
2332
2349
  d > 3 && t.push(-1);
2333
2350
  for (let s = Math.max(2, d - 1); s <= Math.min(e - 1, d + 1); s++)
@@ -2340,21 +2357,21 @@ class Tt {
2340
2357
  }
2341
2358
  /** 행 엘리먼트에 드래그 핸들 삽입 */
2342
2359
  attachHandle(e, t, s) {
2343
- const n = document.createElement("div");
2344
- return n.className = "og-drag-handle", n.innerHTML = "⠿", n.style.cssText = `
2360
+ const i = document.createElement("div");
2361
+ return i.className = "og-drag-handle", i.innerHTML = "⠿", i.style.cssText = `
2345
2362
  width:18px;min-width:18px;height:100%;
2346
2363
  display:flex;align-items:center;justify-content:center;
2347
2364
  cursor:grab;font-size:14px;color:#bbb;flex-shrink:0;
2348
2365
  user-select:none;border-right:1px solid var(--og-border-color,#e0e0e0);
2349
- `, n.addEventListener("mousedown", (i) => {
2350
- i.preventDefault(), i.stopPropagation(), this._startDrag(i, e, t, s);
2351
- }), n;
2366
+ `, i.addEventListener("mousedown", (n) => {
2367
+ n.preventDefault(), n.stopPropagation(), this._startDrag(n, e, t, s);
2368
+ }), i;
2352
2369
  }
2353
- _startDrag(e, t, s, n) {
2354
- const i = t.getBoundingClientRect(), o = document.createElement("div");
2370
+ _startDrag(e, t, s, i) {
2371
+ const n = t.getBoundingClientRect(), o = document.createElement("div");
2355
2372
  o.style.cssText = `
2356
- position:fixed;left:${i.left}px;top:${i.top}px;
2357
- width:${i.width}px;height:${i.height}px;
2373
+ position:fixed;left:${n.left}px;top:${n.top}px;
2374
+ width:${n.width}px;height:${n.height}px;
2358
2375
  background:rgba(25,118,210,0.12);border:2px dashed #1976d2;
2359
2376
  box-sizing:border-box;pointer-events:none;z-index:9999;
2360
2377
  border-radius:2px;opacity:0.9;
@@ -2369,24 +2386,24 @@ class Tt {
2369
2386
  ghostEl: o,
2370
2387
  indicator: l,
2371
2388
  rowHeight: this._rowHeight,
2372
- totalRows: n,
2389
+ totalRows: i,
2373
2390
  bodyEl: this._bodyEl,
2374
2391
  currentTarget: s
2375
2392
  }, document.addEventListener("mousemove", this._onMouseMove), document.addEventListener("mouseup", this._onMouseUp);
2376
2393
  }
2377
2394
  _onMouseMove(e) {
2378
2395
  if (!this._drag) return;
2379
- const t = this._drag, s = e.clientY - t.startY, n = t.ghostEl.getBoundingClientRect();
2380
- t.ghostEl.style.top = `${n.top + s}px`, t.startY = e.clientY;
2381
- const i = t.bodyEl.getBoundingClientRect(), o = e.clientY - i.top + t.bodyEl.scrollTop, l = Math.max(0, Math.min(t.totalRows - 1, Math.round(o / t.rowHeight)));
2396
+ const t = this._drag, s = e.clientY - t.startY, i = t.ghostEl.getBoundingClientRect();
2397
+ t.ghostEl.style.top = `${i.top + s}px`, t.startY = e.clientY;
2398
+ const n = t.bodyEl.getBoundingClientRect(), o = e.clientY - n.top + t.bodyEl.scrollTop, l = Math.max(0, Math.min(t.totalRows - 1, Math.round(o / t.rowHeight)));
2382
2399
  t.currentTarget = l;
2383
2400
  const r = l * t.rowHeight;
2384
2401
  t.indicator.style.display = "block", t.indicator.style.top = `${r}px`;
2385
2402
  }
2386
2403
  _onMouseUp(e) {
2387
2404
  if (document.removeEventListener("mousemove", this._onMouseMove), document.removeEventListener("mouseup", this._onMouseUp), !this._drag) return;
2388
- const { fromIndex: t, currentTarget: s, ghostEl: n, indicator: i } = this._drag;
2389
- this._drag = null, n.remove(), i.remove(), t !== s && this._onDrop(t, s);
2405
+ const { fromIndex: t, currentTarget: s, ghostEl: i, indicator: n } = this._drag;
2406
+ this._drag = null, i.remove(), n.remove(), t !== s && this._onDrop(t, s);
2390
2407
  }
2391
2408
  destroy() {
2392
2409
  var e, t;
@@ -2404,15 +2421,15 @@ class Q {
2404
2421
  applyMergeCells(e) {
2405
2422
  this._map.clear();
2406
2423
  for (const t of e) {
2407
- const s = Math.max(1, t.rowSpan ?? 1), n = Math.max(1, t.colSpan ?? 1);
2424
+ const s = Math.max(1, t.rowSpan ?? 1), i = Math.max(1, t.colSpan ?? 1);
2408
2425
  this._map.set(Q._key(t.row, t.col), {
2409
2426
  rowSpan: s,
2410
- colSpan: n,
2427
+ colSpan: i,
2411
2428
  hidden: !1
2412
2429
  });
2413
- for (let i = 0; i < s; i++)
2414
- for (let o = 0; o < n; o++)
2415
- i === 0 && o === 0 || this._map.set(Q._key(t.row + i, t.col + o), {
2430
+ for (let n = 0; n < s; n++)
2431
+ for (let o = 0; o < i; o++)
2432
+ n === 0 && o === 0 || this._map.set(Q._key(t.row + n, t.col + o), {
2416
2433
  rowSpan: 1,
2417
2434
  colSpan: 1,
2418
2435
  hidden: !0
@@ -2425,13 +2442,13 @@ class Q {
2425
2442
  * fields: colIndexes[i] 에 대응하는 field 이름
2426
2443
  */
2427
2444
  applyAutoMerge(e, t, s) {
2428
- var n, i;
2445
+ var i, n;
2429
2446
  this._map.clear();
2430
2447
  for (let o = 0; o < t.length; o++) {
2431
2448
  const l = t[o], r = s[o];
2432
2449
  let a = 0;
2433
2450
  for (let c = 1; c <= e.length; c++) {
2434
- const h = (n = e[c - 1]) == null ? void 0 : n[r], u = c < e.length ? (i = e[c]) == null ? void 0 : i[r] : void 0;
2451
+ const h = (i = e[c - 1]) == null ? void 0 : i[r], u = c < e.length ? (n = e[c]) == null ? void 0 : n[r] : void 0;
2435
2452
  if (c === e.length || u !== h) {
2436
2453
  const g = c - a;
2437
2454
  if (g > 1) {
@@ -2484,53 +2501,54 @@ class $t {
2484
2501
  }
2485
2502
  open(e, t) {
2486
2503
  this.close();
2487
- const s = t ?? Dt, n = document.createElement("div");
2488
- n.className = "og-context-menu", n.setAttribute("role", "menu");
2489
- for (const i of s) {
2490
- if (i.type === "divider") {
2491
- const r = document.createElement("div");
2492
- r.className = "og-cm-divider", r.setAttribute("role", "separator"), n.appendChild(r);
2504
+ const s = t ?? Dt, i = document.createElement("div");
2505
+ i.className = "og-context-menu", i.setAttribute("role", "menu");
2506
+ for (const l of s) {
2507
+ if (l.type === "divider") {
2508
+ const c = document.createElement("div");
2509
+ c.className = "og-cm-divider", c.setAttribute("role", "separator"), i.appendChild(c);
2493
2510
  continue;
2494
2511
  }
2495
- const o = document.createElement("button");
2496
- if (o.className = "og-cm-item", o.setAttribute("role", "menuitem"), o.setAttribute("tabindex", "-1"), i.disabled && (o.classList.add("og-cm-disabled"), o.setAttribute("aria-disabled", "true")), i.icon) {
2497
- const r = document.createElement("span");
2498
- if (r.className = "og-cm-icon", /^[a-zA-Z][\w-]*(\s+[\w-]+)+$/.test(i.icon.trim())) {
2499
- const a = document.createElement("i");
2500
- a.className = i.icon, r.appendChild(a);
2512
+ const r = document.createElement("button");
2513
+ if (r.className = "og-cm-item", r.setAttribute("role", "menuitem"), r.setAttribute("tabindex", "-1"), l.disabled && (r.classList.add("og-cm-disabled"), r.setAttribute("aria-disabled", "true")), l.icon) {
2514
+ const c = document.createElement("span");
2515
+ if (c.className = "og-cm-icon", /^[a-zA-Z][\w-]*(\s+[\w-]+)+$/.test(l.icon.trim())) {
2516
+ const h = document.createElement("i");
2517
+ h.className = l.icon, c.appendChild(h);
2501
2518
  } else
2502
- r.textContent = i.icon;
2503
- r.setAttribute("aria-hidden", "true"), o.appendChild(r);
2519
+ c.textContent = l.icon;
2520
+ c.setAttribute("aria-hidden", "true"), r.appendChild(c);
2504
2521
  }
2505
- const l = document.createElement("span");
2506
- l.className = "og-cm-label", l.textContent = i.label ?? "", o.appendChild(l), o.addEventListener("click", (r) => {
2507
- r.stopPropagation(), i.disabled || this._runAction(i), this.close();
2508
- }), n.appendChild(o);
2522
+ const a = document.createElement("span");
2523
+ a.className = "og-cm-label", a.textContent = l.label ?? "", r.appendChild(a), r.addEventListener("click", (c) => {
2524
+ c.stopPropagation(), l.disabled || this._runAction(l), this.close();
2525
+ }), i.appendChild(r);
2509
2526
  }
2510
- this._anchor.appendChild(n), this._el = n, this._docMouseMove = (i) => {
2527
+ const n = this._anchor.closest("[data-og-theme]"), o = n == null ? void 0 : n.getAttribute("data-og-theme");
2528
+ o && i.setAttribute("data-og-theme", o), document.body.appendChild(i), this._el = i, this._docMouseMove = (l) => {
2511
2529
  if (!this._el) return;
2512
- const o = this._el.getBoundingClientRect();
2513
- (i.clientX < o.left - 4 || i.clientX > o.right + 4 || i.clientY < o.top - 4 || i.clientY > o.bottom + 4) && this.close();
2514
- }, this._position(n, e.clientX, e.clientY, () => {
2515
- this._el === n && document.addEventListener("mousemove", this._docMouseMove, { capture: !0, passive: !0 });
2516
- }), this._docClick = (i) => {
2517
- n.contains(i.target) || this.close();
2518
- }, this._docKey = (i) => {
2519
- if (i.key === "Escape") {
2530
+ const r = this._el.getBoundingClientRect();
2531
+ (l.clientX < r.left - 4 || l.clientX > r.right + 4 || l.clientY < r.top - 4 || l.clientY > r.bottom + 4) && this.close();
2532
+ }, this._position(i, e.clientX, e.clientY, () => {
2533
+ this._el === i && document.addEventListener("mousemove", this._docMouseMove, { capture: !0, passive: !0 });
2534
+ }), this._docClick = (l) => {
2535
+ i.contains(l.target) || this.close();
2536
+ }, this._docKey = (l) => {
2537
+ if (l.key === "Escape") {
2520
2538
  this.close();
2521
2539
  return;
2522
2540
  }
2523
- if (i.key === "ArrowDown") {
2524
- i.preventDefault(), this._moveFocus(1);
2541
+ if (l.key === "ArrowDown") {
2542
+ l.preventDefault(), this._moveFocus(1);
2525
2543
  return;
2526
2544
  }
2527
- if (i.key === "ArrowUp") {
2528
- i.preventDefault(), this._moveFocus(-1);
2545
+ if (l.key === "ArrowUp") {
2546
+ l.preventDefault(), this._moveFocus(-1);
2529
2547
  return;
2530
2548
  }
2531
- if (i.key === "Enter") {
2532
- const o = n.querySelector(".og-cm-item:focus");
2533
- o == null || o.click();
2549
+ if (l.key === "Enter") {
2550
+ const r = i.querySelector(".og-cm-item:focus");
2551
+ r == null || r.click();
2534
2552
  }
2535
2553
  }, this._docScroll = () => this.close(), setTimeout(() => {
2536
2554
  document.addEventListener("click", this._docClick), document.addEventListener("keydown", this._docKey), window.addEventListener("scroll", this._docScroll, { passive: !0 });
@@ -2544,10 +2562,10 @@ class $t {
2544
2562
  this.close();
2545
2563
  }
2546
2564
  // ── 위치 결정 ─────────────────────────────────────────────
2547
- _position(e, t, s, n) {
2565
+ _position(e, t, s, i) {
2548
2566
  e.style.cssText = "position:fixed;visibility:hidden;left:0;top:0;", requestAnimationFrame(() => {
2549
- const { width: i, height: o } = e.getBoundingClientRect(), l = window.innerWidth, r = window.innerHeight, a = t + i > l ? Math.max(0, t - i) : t, c = s + o > r ? Math.max(0, s - o) : s;
2550
- e.style.cssText = `position:fixed;left:${a}px;top:${c}px;z-index:9999;`, n == null || n();
2567
+ const { width: n, height: o } = e.getBoundingClientRect(), l = window.innerWidth, r = window.innerHeight, a = t + n > l ? Math.max(0, t - n) : t, c = s + o > r ? Math.max(0, s - o) : s;
2568
+ e.style.cssText = `position:fixed;left:${a}px;top:${c}px;z-index:9999;`, i == null || i();
2551
2569
  });
2552
2570
  }
2553
2571
  // ── 키보드 포커스 이동 ────────────────────────────────────
@@ -2610,7 +2628,7 @@ class ze {
2610
2628
  throw new Error(`WorksheetManager: 시트 '${t}'이 이미 존재합니다`);
2611
2629
  this._sheets.get(e);
2612
2630
  const s = Array.from(this._sheets.entries()).map(
2613
- ([n, i]) => n === e ? [t, { ...i, name: t }] : [n, i]
2631
+ ([i, n]) => i === e ? [t, { ...n, name: t }] : [i, n]
2614
2632
  );
2615
2633
  this._sheets = new Map(s), this._active === e && (this._active = t), this._renderTabs();
2616
2634
  }
@@ -2659,16 +2677,16 @@ class ze {
2659
2677
  _startRename(e, t) {
2660
2678
  const s = document.createElement("input");
2661
2679
  s.className = "og-sheet-tab-rename", s.value = t, e.replaceWith(s), s.focus(), s.select();
2662
- const n = () => {
2663
- const i = s.value.trim() || t;
2680
+ const i = () => {
2681
+ const n = s.value.trim() || t;
2664
2682
  try {
2665
- i !== t ? this.rename(t, i) : this._renderTabs();
2683
+ n !== t ? this.rename(t, n) : this._renderTabs();
2666
2684
  } catch {
2667
2685
  this._renderTabs();
2668
2686
  }
2669
2687
  };
2670
- s.addEventListener("blur", n), s.addEventListener("keydown", (i) => {
2671
- i.key === "Enter" && s.blur(), i.key === "Escape" && (s.value = t, s.blur());
2688
+ s.addEventListener("blur", i), s.addEventListener("keydown", (n) => {
2689
+ n.key === "Enter" && s.blur(), n.key === "Escape" && (s.value = t, s.blur());
2672
2690
  });
2673
2691
  }
2674
2692
  }
@@ -2682,90 +2700,90 @@ class At {
2682
2700
  _hexToXlsxRgb(e) {
2683
2701
  const t = e.trim(), s = t.match(/^rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)/i);
2684
2702
  if (s)
2685
- return [s[1], s[2], s[3]].map((i) => parseInt(i).toString(16).padStart(2, "0")).join("").toUpperCase();
2686
- const n = t.replace("#", "").toUpperCase();
2687
- return n.length === 3 ? n[0] + n[0] + n[1] + n[1] + n[2] + n[2] : n.length === 6 ? n : "";
2703
+ return [s[1], s[2], s[3]].map((n) => parseInt(n).toString(16).padStart(2, "0")).join("").toUpperCase();
2704
+ const i = t.replace("#", "").toUpperCase();
2705
+ return i.length === 3 ? i[0] + i[0] + i[1] + i[1] + i[2] + i[2] : i.length === 6 ? i : "";
2688
2706
  }
2689
2707
  exportExcel(e) {
2690
2708
  const t = typeof e == "string" ? { filename: e } : e ?? {};
2691
2709
  let s = t.filename ?? "export";
2692
2710
  s.toLowerCase().endsWith(".xlsx") || (s += ".xlsx");
2693
- const n = t.sheetName ?? (this._d.getOptions().ariaLabel || "Sheet1"), i = this._d.getData(), o = this._d.getColLayout().visibleLeaves.filter((r) => {
2711
+ const i = t.sheetName ?? (this._d.getOptions().ariaLabel || "Sheet1"), n = this._d.getData(), o = this._d.getColLayout().visibleLeaves.filter((r) => {
2694
2712
  var a;
2695
2713
  return !((a = t.exceptFields) != null && a.includes(r.field));
2696
2714
  }), l = t.includeHeader !== !1;
2697
2715
  import("./xlsx.min-Wavxcamn.js").then((r) => r.x).then(({ utils: r, writeFile: a }) => {
2698
2716
  var m;
2699
2717
  const c = [];
2700
- l && c.push(o.map((b) => b.header));
2701
- for (const b of i)
2718
+ l && c.push(o.map((v) => v.header));
2719
+ for (const v of n)
2702
2720
  c.push(o.map((k) => {
2703
- const K = b[k.field];
2721
+ const K = v[k.field];
2704
2722
  if (t.maskOnExport && k.mask && this._d.getMaskEnabled(k.field))
2705
- return be(K == null ? "" : String(K), k.mask);
2706
- const T = K;
2707
- return T == null || T === "" ? "" : k.type === "number" && typeof T == "number" ? T : typeof T == "boolean" ? T ? "✓" : "" : typeof T == "object" ? "" : String(T);
2723
+ return ve(K == null ? "" : String(K), k.mask);
2724
+ const D = K;
2725
+ return D == null || D === "" ? "" : k.type === "number" && typeof D == "number" ? D : typeof D == "boolean" ? D ? "✓" : "" : typeof D == "object" ? "" : String(D);
2708
2726
  }));
2709
2727
  const h = r.aoa_to_sheet(c), u = this._d.getColWidths(), g = this._d.getColLayout();
2710
- h["!cols"] = o.map((b) => ({
2711
- wpx: u[g.getColumnIndex(b.field)] ?? 100
2712
- })), h["!rows"] = c.map((b, k) => ({ hpx: k === 0 && l ? 22 : 19 }));
2728
+ h["!cols"] = o.map((v) => ({
2729
+ wpx: u[g.getColumnIndex(v.field)] ?? 100
2730
+ })), h["!rows"] = c.map((v, k) => ({ hpx: k === 0 && l ? 22 : 19 }));
2713
2731
  const E = t.styleMode ?? "theme";
2714
- let w = "1565C0", C = "FFFFFF", M = "FFFFFF", p = "EEF2FF", v = "212121", _ = "BDBDBD", F = 10;
2732
+ let b = "1565C0", C = "FFFFFF", M = "FFFFFF", _ = "EEF2FF", y = "212121", p = "BDBDBD", A = 10;
2715
2733
  if (E === "theme") {
2716
- const b = (K) => this._hexToXlsxRgb(K);
2717
- w = b(this._readCssVar("--og-header-bg")) || w, C = b(this._readCssVar("--og-header-color")) || C, M = b(this._readCssVar("--og-row-bg")) || M, p = b(this._readCssVar("--og-row-alt-bg")) || p, v = b(this._readCssVar("--og-row-color")) || v, _ = b(this._readCssVar("--og-border-color")) || _;
2734
+ const v = (K) => this._hexToXlsxRgb(K);
2735
+ b = v(this._readCssVar("--og-header-bg")) || b, C = v(this._readCssVar("--og-header-color")) || C, M = v(this._readCssVar("--og-row-bg")) || M, _ = v(this._readCssVar("--og-row-alt-bg")) || _, y = v(this._readCssVar("--og-row-color")) || y, p = v(this._readCssVar("--og-border-color")) || p;
2718
2736
  const k = this._readCssVar("--og-font-size");
2719
- k && (F = Math.max(8, Math.round(parseFloat(k) * 0.75)));
2737
+ k && (A = Math.max(8, Math.round(parseFloat(k) * 0.75)));
2720
2738
  }
2721
- const A = E === "none", H = {
2722
- hdrFont: A ? {} : { bold: !0, color: { rgb: C }, sz: F, name: "맑은 고딕" },
2723
- dataFont: A ? {} : { sz: F, color: { rgb: v }, name: "맑은 고딕" },
2724
- hdrFill: A ? {} : { patternType: "solid", fgColor: { rgb: w } },
2725
- evenFill: A ? {} : { patternType: "solid", fgColor: { rgb: M } },
2726
- oddFill: A ? {} : { patternType: "solid", fgColor: { rgb: p } },
2727
- hdrBorder: A ? {} : {
2728
- top: { style: "medium", color: { rgb: w } },
2729
- bottom: { style: "medium", color: { rgb: w } },
2730
- left: { style: "thin", color: { rgb: w } },
2731
- right: { style: "thin", color: { rgb: w } }
2739
+ const T = E === "none", F = {
2740
+ hdrFont: T ? {} : { bold: !0, color: { rgb: C }, sz: A, name: "맑은 고딕" },
2741
+ dataFont: T ? {} : { sz: A, color: { rgb: y }, name: "맑은 고딕" },
2742
+ hdrFill: T ? {} : { patternType: "solid", fgColor: { rgb: b } },
2743
+ evenFill: T ? {} : { patternType: "solid", fgColor: { rgb: M } },
2744
+ oddFill: T ? {} : { patternType: "solid", fgColor: { rgb: _ } },
2745
+ hdrBorder: T ? {} : {
2746
+ top: { style: "medium", color: { rgb: b } },
2747
+ bottom: { style: "medium", color: { rgb: b } },
2748
+ left: { style: "thin", color: { rgb: b } },
2749
+ right: { style: "thin", color: { rgb: b } }
2732
2750
  },
2733
- dataBorder: A ? {} : {
2734
- top: { style: "thin", color: { rgb: _ } },
2735
- bottom: { style: "thin", color: { rgb: _ } },
2736
- left: { style: "thin", color: { rgb: _ } },
2737
- right: { style: "thin", color: { rgb: _ } }
2751
+ dataBorder: T ? {} : {
2752
+ top: { style: "thin", color: { rgb: p } },
2753
+ bottom: { style: "thin", color: { rgb: p } },
2754
+ left: { style: "thin", color: { rgb: p } },
2755
+ right: { style: "thin", color: { rgb: p } }
2738
2756
  }
2739
2757
  };
2740
- c.forEach((b, k) => {
2741
- const K = l && k === 0, ne = (l ? k - 1 : k) % 2 === 0;
2742
- b.forEach((oe, V) => {
2758
+ c.forEach((v, k) => {
2759
+ const K = l && k === 0, oe = (l ? k - 1 : k) % 2 === 0;
2760
+ v.forEach((re, V) => {
2743
2761
  const J = r.encode_cell({ r: k, c: V });
2744
2762
  h[J] || (h[J] = { t: "s", v: "" });
2745
- const f = o[V], L = f.type === "number" || f.align === "right", D = K ? "center" : L ? "right" : f.align ?? "left";
2763
+ const f = o[V], S = f.type === "number" || f.align === "right", $ = K ? "center" : S ? "right" : f.align ?? "left";
2746
2764
  h[J].s = {
2747
- font: K ? H.hdrFont : H.dataFont,
2748
- fill: K ? H.hdrFill : ne ? H.evenFill : H.oddFill,
2749
- border: K ? H.hdrBorder : H.dataBorder,
2750
- alignment: { horizontal: D, vertical: "center", wrapText: !1 }
2765
+ font: K ? F.hdrFont : F.dataFont,
2766
+ fill: K ? F.hdrFill : oe ? F.evenFill : F.oddFill,
2767
+ border: K ? F.hdrBorder : F.dataBorder,
2768
+ alignment: { horizontal: $, vertical: "center", wrapText: !1 }
2751
2769
  };
2752
2770
  });
2753
2771
  });
2754
- const $ = r.book_new();
2755
- r.book_append_sheet($, h, n), a($, s, { cellStyles: !0 }), (m = t.onAfter) == null || m.call(t, new Blob([]));
2772
+ const z = r.book_new();
2773
+ r.book_append_sheet(z, h, i), a(z, s, { cellStyles: !0 }), (m = t.onAfter) == null || m.call(t, new Blob([]));
2756
2774
  }).catch(() => {
2757
2775
  console.error("Excel 내보내기 실패: xlsx 패키지를 확인하세요.");
2758
2776
  });
2759
2777
  }
2760
2778
  exportCsv(e) {
2761
- const t = typeof e == "string" ? { filename: e } : e ?? {}, s = this._d.getData(), n = this._d.getColLayout().visibleLeaves, i = n.map((r) => `"${r.header}"`).join(","), o = s.map((r) => n.map((a) => {
2779
+ const t = typeof e == "string" ? { filename: e } : e ?? {}, s = this._d.getData(), i = this._d.getColLayout().visibleLeaves, n = i.map((r) => `"${r.header}"`).join(","), o = s.map((r) => i.map((a) => {
2762
2780
  const c = r[a.field] ?? "";
2763
2781
  if (t.maskOnExport && a.mask && this._d.getMaskEnabled(a.field))
2764
- return be(String(c), a.mask);
2782
+ return ve(String(c), a.mask);
2765
2783
  const h = c;
2766
2784
  return typeof h == "string" && h.includes(",") ? `"${h}"` : h;
2767
2785
  }).join(",")), l = t.filename ?? "export.csv";
2768
- De("\uFEFF" + [i, ...o].join(`
2786
+ De("\uFEFF" + [n, ...o].join(`
2769
2787
  `), l);
2770
2788
  }
2771
2789
  exportJson(e) {
@@ -2773,11 +2791,11 @@ class At {
2773
2791
  De(JSON.stringify(this._d.getData(), null, 2), t, "application/json");
2774
2792
  }
2775
2793
  print(e) {
2776
- const t = (e == null ? void 0 : e.title) ?? "OPEN_GRID", s = (e == null ? void 0 : e.footerText) ?? "", n = this._d.getData(), i = this._d.getColLayout().visibleLeaves.filter((h) => {
2794
+ const t = (e == null ? void 0 : e.title) ?? "OPEN_GRID", s = (e == null ? void 0 : e.footerText) ?? "", i = this._d.getData(), n = this._d.getColLayout().visibleLeaves.filter((h) => {
2777
2795
  var u;
2778
2796
  return !((u = e == null ? void 0 : e.excludeFields) != null && u.includes(h.field));
2779
- }), o = i.map((h) => `<th>${h.header ?? h.field}</th>`).join(""), l = n.map(
2780
- (h) => `<tr>${i.map((u) => `<td>${String(h[u.field] ?? "")}</td>`).join("")}</tr>`
2797
+ }), o = n.map((h) => `<th>${h.header ?? h.field}</th>`).join(""), l = i.map(
2798
+ (h) => `<tr>${n.map((u) => `<td>${String(h[u.field] ?? "")}</td>`).join("")}</tr>`
2781
2799
  ).join(""), r = s ? `<div class="og-print-footer">${s}</div>` : "", a = `<!DOCTYPE html>
2782
2800
  <html lang="ko"><head>
2783
2801
  <meta charset="UTF-8"><title>${t}</title>
@@ -2794,7 +2812,7 @@ class At {
2794
2812
  </style>
2795
2813
  </head><body>
2796
2814
  <h2>${t}</h2>
2797
- <p>${n.length}행 × ${i.length}열 · ${(/* @__PURE__ */ new Date()).toLocaleString("ko-KR")}</p>
2815
+ <p>${i.length}행 × ${n.length}열 · ${(/* @__PURE__ */ new Date()).toLocaleString("ko-KR")}</p>
2798
2816
  <table>
2799
2817
  <thead><tr>${o}</tr></thead>
2800
2818
  <tbody>${l}</tbody>
@@ -2811,19 +2829,19 @@ ${r}
2811
2829
  return;
2812
2830
  }
2813
2831
  const s = e ?? "workbook.xlsx";
2814
- import("./xlsx.min-Wavxcamn.js").then((n) => n.x).then(({ utils: n, writeFile: i }) => {
2815
- const o = n.book_new(), l = this._d.getOptions();
2832
+ import("./xlsx.min-Wavxcamn.js").then((i) => i.x).then(({ utils: i, writeFile: n }) => {
2833
+ const o = i.book_new(), l = this._d.getOptions();
2816
2834
  for (const r of t.getNames()) {
2817
2835
  const a = t.get(r), c = a.columns.length ? a.columns : l.columns, h = [c.map((g) => g.header)];
2818
2836
  for (const g of a.data)
2819
2837
  h.push(c.map((E) => {
2820
- const w = g[E.field];
2821
- return w == null ? "" : typeof w == "boolean" ? w ? "✓" : "" : E.type === "number" && typeof w == "number" ? w : String(w);
2838
+ const b = g[E.field];
2839
+ return b == null ? "" : typeof b == "boolean" ? b ? "✓" : "" : E.type === "number" && typeof b == "number" ? b : String(b);
2822
2840
  }));
2823
- const u = n.aoa_to_sheet(h);
2824
- u["!cols"] = c.map(() => ({ wpx: 100 })), n.book_append_sheet(o, u, r);
2841
+ const u = i.aoa_to_sheet(h);
2842
+ u["!cols"] = c.map(() => ({ wpx: 100 })), i.book_append_sheet(o, u, r);
2825
2843
  }
2826
- i(o, s.endsWith(".xlsx") ? s : s + ".xlsx", { cellStyles: !0 });
2844
+ n(o, s.endsWith(".xlsx") ? s : s + ".xlsx", { cellStyles: !0 });
2827
2845
  }).catch(() => console.error("exportSheetsExcel: xlsx 패키지를 확인하세요."));
2828
2846
  }
2829
2847
  }
@@ -2834,7 +2852,7 @@ class zt {
2834
2852
  fmtNum(e, t) {
2835
2853
  if (!t)
2836
2854
  return Math.round(e).toLocaleString("ko-KR");
2837
- const s = t.includes("#") || t.includes(","), n = t.match(/\.(\d+)$/), i = n ? parseInt(n[1], 10) : /^\d+$/.test(t) ? parseInt(t, 10) : 0, o = Math.abs(e).toFixed(i), [l = "0", r] = o.split("."), a = s ? l.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : l, c = r !== void 0 ? `${a}.${r}` : a;
2855
+ const s = t.includes("#") || t.includes(","), i = t.match(/\.(\d+)$/), n = i ? parseInt(i[1], 10) : /^\d+$/.test(t) ? parseInt(t, 10) : 0, o = Math.abs(e).toFixed(n), [l = "0", r] = o.split("."), a = s ? l.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : l, c = r !== void 0 ? `${a}.${r}` : a;
2838
2856
  return e < 0 ? `-${c}` : c;
2839
2857
  }
2840
2858
  computeValues() {
@@ -2842,29 +2860,29 @@ class zt {
2842
2860
  if (!e || e.length === 0) return [];
2843
2861
  const t = this._d.getData();
2844
2862
  return e.filter((s) => s.field && s.op).map((s) => {
2845
- const n = s.field, i = s.op, o = t.map((h) => h[n]).filter((h) => h != null && h !== "");
2863
+ const i = s.field, n = s.op, o = t.map((h) => h[i]).filter((h) => h != null && h !== "");
2846
2864
  let l = null;
2847
- const r = i.toUpperCase();
2865
+ const r = n.toUpperCase();
2848
2866
  if (r === "SUM")
2849
2867
  l = o.length > 0 ? x.sum(o.map((h) => String(h))) : null;
2850
2868
  else if (r === "AVG")
2851
2869
  l = o.length > 0 ? x.sum(o.map((h) => String(h))).div(x.from(String(o.length))) : null;
2852
2870
  else if (r === "COUNT") {
2853
2871
  const h = o.length;
2854
- return { _field: n, _value: h, _formatted: h.toLocaleString("ko-KR") };
2872
+ return { _field: i, _value: h, _formatted: h.toLocaleString("ko-KR") };
2855
2873
  } else r === "MAX" ? l = o.length > 0 ? x.max(o.map((h) => String(h))) : null : r === "MIN" && (l = o.length > 0 ? x.min(o.map((h) => String(h))) : null);
2856
- if (!l) return { _field: n, _value: null, _formatted: "" };
2874
+ if (!l) return { _field: i, _value: null, _formatted: "" };
2857
2875
  const a = l.toNumber(), c = this.fmtNum(a, s.format);
2858
- return { _field: n, _value: a, _formatted: c };
2876
+ return { _field: i, _value: a, _formatted: c };
2859
2877
  });
2860
2878
  }
2861
2879
  render() {
2862
2880
  var h;
2863
2881
  const e = this._d.getContainer(), t = e.querySelector(".og-footer-bar");
2864
2882
  t == null || t.remove();
2865
- const s = this._d.getOptions(), n = s.footer;
2866
- if (!n || n.length === 0) return;
2867
- const i = this._d.getColLayout().visibleLeaves, o = this._d.getColWidths() ?? i.map((u) => u.width ?? 100), l = new Map(
2883
+ const s = this._d.getOptions(), i = s.footer;
2884
+ if (!i || i.length === 0) return;
2885
+ const n = this._d.getColLayout().visibleLeaves, o = this._d.getColWidths() ?? n.map((u) => u.width ?? 100), l = new Map(
2868
2886
  this.computeValues().map((u) => [u._field, u])
2869
2887
  ), r = document.createElement("div");
2870
2888
  r.className = "og-footer-bar", r.style.cssText = [
@@ -2880,12 +2898,12 @@ class zt {
2880
2898
  u.style.cssText = `width:${a}px;flex-shrink:0;border-right:1px solid var(--og-border-color,#e0e0e0);`, r.appendChild(u);
2881
2899
  }
2882
2900
  let c = 0;
2883
- for (const u of n) {
2901
+ for (const u of i) {
2884
2902
  const g = Math.max(1, u.colspan ?? 1);
2885
2903
  let E = 0;
2886
- for (let v = 0; v < g; v++)
2887
- E += o[c + v] ?? 100;
2888
- const w = i[c];
2904
+ for (let y = 0; y < g; y++)
2905
+ E += o[c + y] ?? 100;
2906
+ const b = n[c];
2889
2907
  c += g;
2890
2908
  const C = document.createElement("div");
2891
2909
  C.style.cssText = [
@@ -2894,10 +2912,10 @@ class zt {
2894
2912
  "border-right:1px solid var(--og-border-color,#e0e0e0);",
2895
2913
  "white-space:nowrap;text-overflow:ellipsis;"
2896
2914
  ].join("");
2897
- const M = u.field, p = M ? l.get(M) : null;
2898
- if (p) {
2899
- const v = p._formatted ?? String(p._value ?? ""), _ = u.label ? `${u.label}: ` : "";
2900
- C.textContent = _ + v, C.title = `${((h = u.op) == null ? void 0 : h.toUpperCase()) ?? ""} = ${v}`, C.style.color = "var(--og-primary,#1976d2)", C.style.textAlign = u.align ?? ((w == null ? void 0 : w.type) === "number", "right");
2915
+ const M = u.field, _ = M ? l.get(M) : null;
2916
+ if (_) {
2917
+ const y = _._formatted ?? String(_._value ?? ""), p = u.label ? `${u.label}: ` : "";
2918
+ C.textContent = p + y, C.title = `${((h = u.op) == null ? void 0 : h.toUpperCase()) ?? ""} = ${y}`, C.style.color = "var(--og-primary,#1976d2)", C.style.textAlign = u.align ?? ((b == null ? void 0 : b.type) === "number", "right");
2901
2919
  } else u.label && (C.textContent = u.label, C.style.textAlign = u.align ?? "left", C.style.color = "var(--og-row-color,#212121)");
2902
2920
  r.appendChild(C);
2903
2921
  }
@@ -2912,8 +2930,8 @@ class It {
2912
2930
  const t = this._d.getEditMgr();
2913
2931
  if (t.activeEditor) return;
2914
2932
  this._d.handleCellKeyEvt("cellKeyDown", e);
2915
- const s = this._d.getData(), n = this._d.getColLayout(), i = s.rowCount, o = n.visibleLeaves.length;
2916
- if (i === 0 || o === 0) return;
2933
+ const s = this._d.getData(), i = this._d.getColLayout(), n = s.rowCount, o = i.visibleLeaves.length;
2934
+ if (n === 0 || o === 0) return;
2917
2935
  if ((e.ctrlKey || e.metaKey) && e.key === "c") {
2918
2936
  e.preventDefault(), this._copyToClipboard();
2919
2937
  return;
@@ -2927,7 +2945,7 @@ class It {
2927
2945
  if (e.key === "ArrowDown") {
2928
2946
  e.preventDefault();
2929
2947
  const r = t.focusCell.ci !== void 0 ? t.focusCell.ri : 0;
2930
- r < i - 1 && (this._d.handleRowDrop(r, r + 1), this._d.setFocusCell(r + 1, t.focusCell.ci), this._d.announce(`행 ${r + 1}을(를) ${r + 2}번째 위치로 이동`));
2948
+ r < n - 1 && (this._d.handleRowDrop(r, r + 1), this._d.setFocusCell(r + 1, t.focusCell.ci), this._d.announce(`행 ${r + 1}을(를) ${r + 2}번째 위치로 이동`));
2931
2949
  return;
2932
2950
  }
2933
2951
  if (e.key === "ArrowUp") {
@@ -2940,7 +2958,7 @@ class It {
2940
2958
  switch (e.key) {
2941
2959
  case "ArrowDown": {
2942
2960
  e.preventDefault();
2943
- const r = t.focusCell, a = r ? Math.min(r.ri + 1, i - 1) : 0;
2961
+ const r = t.focusCell, a = r ? Math.min(r.ri + 1, n - 1) : 0;
2944
2962
  this._d.setFocusCell(a, (r == null ? void 0 : r.ci) ?? 0);
2945
2963
  break;
2946
2964
  }
@@ -2957,7 +2975,7 @@ class It {
2957
2975
  this._d.setFocusCell(0, 0);
2958
2976
  break;
2959
2977
  }
2960
- r.ci < o - 1 ? this._d.setFocusCell(r.ri, r.ci + 1) : r.ri < i - 1 && this._d.setFocusCell(r.ri + 1, 0);
2978
+ r.ci < o - 1 ? this._d.setFocusCell(r.ri, r.ci + 1) : r.ri < n - 1 && this._d.setFocusCell(r.ri + 1, 0);
2961
2979
  break;
2962
2980
  }
2963
2981
  case "ArrowLeft": {
@@ -2977,7 +2995,7 @@ class It {
2977
2995
  this._d.setFocusCell(0, 0);
2978
2996
  break;
2979
2997
  }
2980
- e.shiftKey ? r.ci > 0 ? this._d.setFocusCell(r.ri, r.ci - 1) : r.ri > 0 && this._d.setFocusCell(r.ri - 1, o - 1) : r.ci < o - 1 ? this._d.setFocusCell(r.ri, r.ci + 1) : r.ri < i - 1 && this._d.setFocusCell(r.ri + 1, 0);
2998
+ e.shiftKey ? r.ci > 0 ? this._d.setFocusCell(r.ri, r.ci - 1) : r.ri > 0 && this._d.setFocusCell(r.ri - 1, o - 1) : r.ci < o - 1 ? this._d.setFocusCell(r.ri, r.ci + 1) : r.ri < n - 1 && this._d.setFocusCell(r.ri + 1, 0);
2981
2999
  break;
2982
3000
  }
2983
3001
  case "Home": {
@@ -2991,7 +3009,7 @@ class It {
2991
3009
  }
2992
3010
  case "End": {
2993
3011
  if (e.preventDefault(), e.ctrlKey || e.metaKey)
2994
- this._d.setFocusCell(i - 1, o - 1);
3012
+ this._d.setFocusCell(n - 1, o - 1);
2995
3013
  else {
2996
3014
  const r = t.focusCell;
2997
3015
  this._d.setFocusCell((r == null ? void 0 : r.ri) ?? 0, o - 1);
@@ -3000,7 +3018,7 @@ class It {
3000
3018
  }
3001
3019
  case "PageDown": {
3002
3020
  e.preventDefault();
3003
- const r = t.focusCell, a = this._d.getOptions().pageSize ?? 10, c = Math.min(r ? r.ri + a : a - 1, i - 1);
3021
+ const r = t.focusCell, a = this._d.getOptions().pageSize ?? 10, c = Math.min(r ? r.ri + a : a - 1, n - 1);
3004
3022
  this._d.setFocusCell(c, (r == null ? void 0 : r.ci) ?? 0);
3005
3023
  break;
3006
3024
  }
@@ -3032,20 +3050,20 @@ class It {
3032
3050
  _copyToClipboard() {
3033
3051
  var o;
3034
3052
  if (!this._d.getOptions().clipboard) return;
3035
- const t = this._d.getEditMgr(), s = this._d.getColLayout(), n = this._d.getData();
3036
- let i = "";
3053
+ const t = this._d.getEditMgr(), s = this._d.getColLayout(), i = this._d.getData();
3054
+ let n = "";
3037
3055
  if (t.focusCell) {
3038
3056
  const { ri: l, ci: r } = t.focusCell, a = s.visibleLeaves[r];
3039
- a && (i = String(n.getCellValue(l, a.field) ?? ""));
3057
+ a && (n = String(i.getCellValue(l, a.field) ?? ""));
3040
3058
  } else if (this._d.getRowMgr().selectedRows.size > 0) {
3041
3059
  const l = s.visibleLeaves;
3042
- i = [...this._d.getRowMgr().selectedRows].sort((a, c) => a - c).map((a) => {
3043
- const c = n.getRowByIndex(a);
3060
+ n = [...this._d.getRowMgr().selectedRows].sort((a, c) => a - c).map((a) => {
3061
+ const c = i.getRowByIndex(a);
3044
3062
  return l.map((h) => String((c == null ? void 0 : c[h.field]) ?? "")).join(" ");
3045
3063
  }).join(`
3046
3064
  `);
3047
3065
  }
3048
- i && ((o = navigator.clipboard) == null || o.writeText(i).catch(() => {
3066
+ n && ((o = navigator.clipboard) == null || o.writeText(n).catch(() => {
3049
3067
  }));
3050
3068
  }
3051
3069
  _pasteFromClipboard() {
@@ -3053,15 +3071,15 @@ class It {
3053
3071
  const e = this._d.getOptions();
3054
3072
  if (!e.clipboard || !e.editable) return;
3055
3073
  const t = this._d.getEditMgr();
3056
- t.focusCell && ((s = navigator.clipboard) == null || s.readText().then((n) => {
3057
- if (!n) return;
3058
- const { ri: i, ci: o } = t.focusCell, l = n.split(`
3074
+ t.focusCell && ((s = navigator.clipboard) == null || s.readText().then((i) => {
3075
+ if (!i) return;
3076
+ const { ri: n, ci: o } = t.focusCell, l = i.split(`
3059
3077
  `), r = this._d.getColLayout().visibleLeaves, a = this._d.getData();
3060
3078
  for (let c = 0; c < l.length; c++) {
3061
3079
  const h = l[c].split(" ");
3062
3080
  for (let u = 0; u < h.length; u++) {
3063
- const g = i + c, E = o + u, w = r[E];
3064
- w && g < a.rowCount && a.updateCell(g, w.field, h[u]);
3081
+ const g = n + c, E = o + u, b = r[E];
3082
+ b && g < a.rowCount && a.updateCell(g, b.field, h[u]);
3065
3083
  }
3066
3084
  }
3067
3085
  this._d.emit("dataChange", a.getData()), this._d.doRender();
@@ -3081,16 +3099,16 @@ class Ht {
3081
3099
  t.className = "og-find-bar", t.hidden = !0;
3082
3100
  const s = document.createElement("span");
3083
3101
  s.className = "og-find-label", s.textContent = "찾기";
3084
- const n = document.createElement("input");
3085
- n.type = "text", n.className = "og-find-input", n.placeholder = "검색어 입력...", n.setAttribute("aria-label", "그리드 내 검색");
3086
- const i = document.createElement("span");
3087
- i.className = "og-find-count";
3102
+ const i = document.createElement("input");
3103
+ i.type = "text", i.className = "og-find-input", i.placeholder = "검색어 입력...", i.setAttribute("aria-label", "그리드 내 검색");
3104
+ const n = document.createElement("span");
3105
+ n.className = "og-find-count";
3088
3106
  const o = document.createElement("button");
3089
- o.className = "og-find-close", o.textContent = "✕", o.setAttribute("aria-label", "찾기 닫기"), t.appendChild(s), t.appendChild(n), t.appendChild(i), t.appendChild(o), e.insertBefore(t, e.firstChild), n.addEventListener("input", () => {
3090
- this._filter = n.value.trim(), this._apply();
3091
- }), n.addEventListener("keydown", (l) => {
3107
+ o.className = "og-find-close", o.textContent = "✕", o.setAttribute("aria-label", "찾기 닫기"), t.appendChild(s), t.appendChild(i), t.appendChild(n), t.appendChild(o), e.insertBefore(t, e.firstChild), i.addEventListener("input", () => {
3108
+ this._filter = i.value.trim(), this._apply();
3109
+ }), i.addEventListener("keydown", (l) => {
3092
3110
  l.key === "Escape" && this.close();
3093
- }), o.addEventListener("click", () => this.close()), this._bar = t, this._input = n, this._count = i;
3111
+ }), o.addEventListener("click", () => this.close()), this._bar = t, this._input = i, this._count = n;
3094
3112
  }
3095
3113
  open() {
3096
3114
  this._bar && (this._bar.hidden = !1, this._input.focus(), this._input.select());
@@ -3099,20 +3117,20 @@ class Ht {
3099
3117
  this._bar && (this._bar.hidden = !0, this._filter = "", this._input.value = "", this._count && (this._count.textContent = ""), this._apply());
3100
3118
  }
3101
3119
  _apply() {
3102
- var n, i;
3120
+ var i, n;
3103
3121
  const e = this._d.getData(), t = this._d.getColLayout().visibleLeaves.map((o) => o.field);
3104
3122
  e.setFindFilter(this._filter, t), e.applyFilter(this._d.getFilters());
3105
3123
  const s = e.rowCount;
3106
- (n = this._d.getVs()) == null || n.setTotalRows(s), (i = this._d.getPagination()) == null || i.setTotalRows(s), this._count && (this._count.textContent = this._filter ? `${s}건` : ""), this._d.doRender();
3124
+ (i = this._d.getVs()) == null || i.setTotalRows(s), (n = this._d.getPagination()) == null || n.setTotalRows(s), this._count && (this._count.textContent = this._filter ? `${s}건` : ""), this._d.doRender();
3107
3125
  }
3108
3126
  }
3109
- function Ne(d) {
3127
+ function Ke(d) {
3110
3128
  return d && d._isGroup === !0;
3111
3129
  }
3112
- function Ie(d, e, t = [], s = /* @__PURE__ */ new Set(), n) {
3113
- return e.length ? Ke(d, e, 0, t, s, "", n) : [];
3130
+ function Ie(d, e, t = [], s = /* @__PURE__ */ new Set(), i) {
3131
+ return e.length ? Oe(d, e, 0, t, s, "", i) : [];
3114
3132
  }
3115
- function Ke(d, e, t, s, n, i, o) {
3133
+ function Oe(d, e, t, s, i, n, o) {
3116
3134
  const l = e[t], r = /* @__PURE__ */ new Map();
3117
3135
  for (const c of d) {
3118
3136
  const h = c[l];
@@ -3120,10 +3138,10 @@ function Ke(d, e, t, s, n, i, o) {
3120
3138
  }
3121
3139
  const a = [];
3122
3140
  for (const [c, h] of r) {
3123
- const u = `${i}__${l}:${c}`, g = n.has(u);
3141
+ const u = `${n}__${l}:${c}`, g = i.has(u);
3124
3142
  let E;
3125
- t < e.length - 1 ? E = Ke(h, e, t + 1, s, n, u, o) : E = h;
3126
- const { summary: w, summaryFmt: C } = Bt(h, s), M = Wt(h, o);
3143
+ t < e.length - 1 ? E = Oe(h, e, t + 1, s, i, u, o) : E = h;
3144
+ const { summary: b, summaryFmt: C } = Bt(h, s), M = Wt(h, o);
3127
3145
  a.push({
3128
3146
  _isGroup: !0,
3129
3147
  _groupField: l,
@@ -3132,7 +3150,7 @@ function Ke(d, e, t, s, n, i, o) {
3132
3150
  _depth: t,
3133
3151
  _expanded: g,
3134
3152
  _childCount: h.length,
3135
- _summary: w,
3153
+ _summary: b,
3136
3154
  _summaryFmt: C,
3137
3155
  _states: M,
3138
3156
  children: E
@@ -3142,35 +3160,35 @@ function Ke(d, e, t, s, n, i, o) {
3142
3160
  }
3143
3161
  function Bt(d, e) {
3144
3162
  const t = {}, s = {};
3145
- for (const n of e) {
3146
- const i = d.map((a) => a[n.field]).filter((a) => a != null && a !== "");
3163
+ for (const i of e) {
3164
+ const n = d.map((a) => a[i.field]).filter((a) => a != null && a !== "");
3147
3165
  let o = null;
3148
- const l = n.op.toUpperCase();
3166
+ const l = i.op.toUpperCase();
3149
3167
  if (l === "SUM")
3150
- o = i.length > 0 ? x.sum(i.map(String)) : null;
3168
+ o = n.length > 0 ? x.sum(n.map(String)) : null;
3151
3169
  else if (l === "AVG")
3152
- o = i.length > 0 ? x.sum(i.map(String)).div(x.from(String(i.length))) : null;
3170
+ o = n.length > 0 ? x.sum(n.map(String)).div(x.from(String(n.length))) : null;
3153
3171
  else if (l === "COUNT") {
3154
- t[n.field] = d.length, s[n.field] = d.length.toLocaleString("ko-KR");
3172
+ t[i.field] = d.length, s[i.field] = d.length.toLocaleString("ko-KR");
3155
3173
  continue;
3156
- } else l === "MAX" ? o = i.length > 0 ? x.max(i.map(String)) : null : l === "MIN" && (o = i.length > 0 ? x.min(i.map(String)) : null);
3174
+ } else l === "MAX" ? o = n.length > 0 ? x.max(n.map(String)) : null : l === "MIN" && (o = n.length > 0 ? x.min(n.map(String)) : null);
3157
3175
  if (!o) {
3158
- t[n.field] = null, s[n.field] = "";
3176
+ t[i.field] = null, s[i.field] = "";
3159
3177
  continue;
3160
3178
  }
3161
3179
  const r = o.toNumber();
3162
- t[n.field] = r, s[n.field] = Nt(r, n.format);
3180
+ t[i.field] = r, s[i.field] = Nt(r, i.format);
3163
3181
  }
3164
3182
  return { summary: t, summaryFmt: s };
3165
3183
  }
3166
3184
  function Wt(d, e) {
3167
3185
  if (!e) return { added: 0, edited: 0, removed: 0 };
3168
- let t = 0, s = 0, n = 0;
3169
- for (const i of d) {
3170
- const o = e(i);
3171
- o === "added" ? t++ : o === "edited" ? s++ : o === "removed" && n++;
3186
+ let t = 0, s = 0, i = 0;
3187
+ for (const n of d) {
3188
+ const o = e(n);
3189
+ o === "added" ? t++ : o === "edited" ? s++ : o === "removed" && i++;
3172
3190
  }
3173
- return { added: t, edited: s, removed: n };
3191
+ return { added: t, edited: s, removed: i };
3174
3192
  }
3175
3193
  function Nt(d, e) {
3176
3194
  if (e == null)
@@ -3178,36 +3196,36 @@ function Nt(d, e) {
3178
3196
  minimumFractionDigits: 2,
3179
3197
  maximumFractionDigits: 6
3180
3198
  });
3181
- const t = e.includes("#") || e.includes(","), s = e.match(/\.(\d+)$/), n = s ? parseInt(s[1], 10) : /^\d+$/.test(e) ? parseInt(e, 10) : 0, i = Math.abs(d).toFixed(n), [o = "0", l] = i.split("."), r = t ? o.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : o, a = l !== void 0 ? `${r}.${l}` : r;
3199
+ const t = e.includes("#") || e.includes(","), s = e.match(/\.(\d+)$/), i = s ? parseInt(s[1], 10) : /^\d+$/.test(e) ? parseInt(e, 10) : 0, n = Math.abs(d).toFixed(i), [o = "0", l] = n.split("."), r = t ? o.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : o, a = l !== void 0 ? `${r}.${l}` : r;
3182
3200
  return d < 0 ? `-${a}` : a;
3183
3201
  }
3184
- function Oe(d) {
3202
+ function Ve(d) {
3185
3203
  const e = [];
3186
3204
  for (const t of d)
3187
3205
  if (e.push(t), t._expanded)
3188
3206
  for (const s of t.children)
3189
- Ne(s) ? e.push(...Oe([s])) : e.push(s);
3207
+ Ke(s) ? e.push(...Ve([s])) : e.push(s);
3190
3208
  return e;
3191
3209
  }
3192
- function Ve(d, e = "") {
3210
+ function Pe(d, e = "") {
3193
3211
  const t = [];
3194
3212
  for (const s of d) {
3195
- const n = `${e}__${s._groupField}:${s._groupValue}`;
3196
- t.push(n);
3197
- const i = s.children.filter((o) => Ne(o));
3198
- i.length && t.push(...Ve(i, n));
3213
+ const i = `${e}__${s._groupField}:${s._groupValue}`;
3214
+ t.push(i);
3215
+ const n = s.children.filter((o) => Ke(o));
3216
+ n.length && t.push(...Pe(n, i));
3199
3217
  }
3200
3218
  return t;
3201
3219
  }
3202
3220
  function He(d, e, t = /* @__PURE__ */ new Set()) {
3203
- const { idField: s, parentIdField: n, expandOnLoad: i = !1 } = e, o = /* @__PURE__ */ new Map(), l = [];
3221
+ const { idField: s, parentIdField: i, expandOnLoad: n = !1 } = e, o = /* @__PURE__ */ new Map(), l = [];
3204
3222
  for (const c of d) {
3205
3223
  const h = c[s], u = {
3206
3224
  _isTree: !0,
3207
3225
  _treeId: h,
3208
- _treeParentId: c[n],
3226
+ _treeParentId: c[i],
3209
3227
  _depth: 0,
3210
- _expanded: i || t.has(h),
3228
+ _expanded: n || t.has(h),
3211
3229
  _hasChildren: !1,
3212
3230
  _childCount: 0,
3213
3231
  _isLastChild: !1,
@@ -3228,7 +3246,7 @@ function He(d, e, t = /* @__PURE__ */ new Set()) {
3228
3246
  }
3229
3247
  function r(c, h) {
3230
3248
  for (const u of c)
3231
- u._depth = h, u._childCount = Pe(u), r(u.children, h + 1);
3249
+ u._depth = h, u._childCount = Ue(u), r(u.children, h + 1);
3232
3250
  }
3233
3251
  r(l, 0);
3234
3252
  function a(c, h) {
@@ -3239,24 +3257,24 @@ function He(d, e, t = /* @__PURE__ */ new Set()) {
3239
3257
  }
3240
3258
  return a(l, []), l;
3241
3259
  }
3242
- function Pe(d) {
3260
+ function Ue(d) {
3243
3261
  let e = d.children.length;
3244
- for (const t of d.children) e += Pe(t);
3262
+ for (const t of d.children) e += Ue(t);
3245
3263
  return e;
3246
3264
  }
3247
- function Ue(d) {
3265
+ function je(d) {
3248
3266
  const e = [];
3249
3267
  for (const t of d)
3250
- e.push(t), t._expanded && t.children.length > 0 && e.push(...Ue(t.children));
3268
+ e.push(t), t._expanded && t.children.length > 0 && e.push(...je(t.children));
3251
3269
  return e;
3252
3270
  }
3253
3271
  function Kt(d, e) {
3254
3272
  d.has(e) ? d.delete(e) : d.add(e);
3255
3273
  }
3256
- function ve(d) {
3274
+ function xe(d) {
3257
3275
  const e = [];
3258
3276
  for (const t of d)
3259
- e.push(t._treeId), t.children.length && e.push(...ve(t.children));
3277
+ e.push(t._treeId), t.children.length && e.push(...xe(t.children));
3260
3278
  return e;
3261
3279
  }
3262
3280
  class Ot {
@@ -3289,7 +3307,7 @@ class Ot {
3289
3307
  expandAll() {
3290
3308
  if (!this._isGroupMode) return;
3291
3309
  const e = Ie(this._d.getData(), this._groupFields, this._getSummaryDefs());
3292
- Ve(e).forEach((t) => this._groupExpandedKeys.add(t)), this.rebuildGroups();
3310
+ Pe(e).forEach((t) => this._groupExpandedKeys.add(t)), this.rebuildGroups();
3293
3311
  }
3294
3312
  collapseAll() {
3295
3313
  this._groupExpandedKeys.clear(), this._isGroupMode && this.rebuildGroups();
@@ -3298,12 +3316,12 @@ class Ot {
3298
3316
  this._groupExpandedKeys.has(e) ? this._groupExpandedKeys.delete(e) : this._groupExpandedKeys.add(e), this.rebuildGroups();
3299
3317
  }
3300
3318
  rebuildGroups() {
3301
- var i;
3319
+ var n;
3302
3320
  const e = this._d.getData(), t = this._d.getDataLayer(), s = (o) => {
3303
3321
  const l = e.indexOf(o);
3304
3322
  return l >= 0 ? t.getRowState(l) : "none";
3305
- }, n = Ie(e, this._groupFields, this._getSummaryDefs(), this._groupExpandedKeys, s);
3306
- this._groupFlatRows = Oe(n), (i = this._d.getVs()) == null || i.setTotalRows(this._groupFlatRows.length), this._d.doRenderFull(this._groupFlatRows.length);
3323
+ }, i = Ie(e, this._groupFields, this._getSummaryDefs(), this._groupExpandedKeys, s);
3324
+ this._groupFlatRows = Ve(i), (n = this._d.getVs()) == null || n.setTotalRows(this._groupFlatRows.length), this._d.doRenderFull(this._groupFlatRows.length);
3307
3325
  }
3308
3326
  // ─── 트리 ─────────────────────────────────────────────────
3309
3327
  enableTree() {
@@ -3314,7 +3332,7 @@ class Ot {
3314
3332
  idField: e.treeId,
3315
3333
  parentIdField: e.treeParentId
3316
3334
  });
3317
- ve(t).forEach((s) => this._treeExpandedKeys.add(s));
3335
+ xe(t).forEach((s) => this._treeExpandedKeys.add(s));
3318
3336
  }
3319
3337
  this.rebuildTree();
3320
3338
  }
@@ -3326,12 +3344,12 @@ class Ot {
3326
3344
  }
3327
3345
  expandNodes(e, t = !0) {
3328
3346
  const s = Array.isArray(e) ? e : [e];
3329
- for (const n of s)
3330
- t ? this._treeExpandedKeys.add(n) : this._treeExpandedKeys.delete(n);
3347
+ for (const i of s)
3348
+ t ? this._treeExpandedKeys.add(i) : this._treeExpandedKeys.delete(i);
3331
3349
  this._isTreeMode && this.rebuildTree();
3332
3350
  }
3333
3351
  expandAllNodes() {
3334
- this._isTreeMode && (ve(this._treeRoots).forEach((e) => this._treeExpandedKeys.add(e)), this.rebuildTree());
3352
+ this._isTreeMode && (xe(this._treeRoots).forEach((e) => this._treeExpandedKeys.add(e)), this.rebuildTree());
3335
3353
  }
3336
3354
  collapseAllNodes() {
3337
3355
  this._isTreeMode && (this._treeExpandedKeys.clear(), this.rebuildTree());
@@ -3346,7 +3364,7 @@ class Ot {
3346
3364
  idField: e.treeId,
3347
3365
  parentIdField: e.treeParentId,
3348
3366
  expandOnLoad: e.expandOnLoad
3349
- }, this._treeExpandedKeys), this._treeFlatRows = Ue(this._treeRoots), (t = this._d.getVs()) == null || t.setTotalRows(this._treeFlatRows.length), this._d.doRenderFull(this._treeFlatRows.length);
3367
+ }, this._treeExpandedKeys), this._treeFlatRows = je(this._treeRoots), (t = this._d.getVs()) == null || t.setTotalRows(this._treeFlatRows.length), this._d.doRenderFull(this._treeFlatRows.length);
3350
3368
  }
3351
3369
  // ─── 내부 헬퍼 ───────────────────────────────────────────
3352
3370
  _getSummaryDefs() {
@@ -3354,7 +3372,7 @@ class Ot {
3354
3372
  if (!e) return [];
3355
3373
  if (e.rows && e.rows.length > 0)
3356
3374
  return e.fields.flatMap(
3357
- (s) => e.rows.map((n) => ({ field: s, op: n.op, format: n.format }))
3375
+ (s) => e.rows.map((i) => ({ field: s, op: i.op, format: i.format }))
3358
3376
  );
3359
3377
  const t = Array.isArray(e.ops) ? e.ops : e.ops ? [e.ops] : ["SUM"];
3360
3378
  return e.fields.map((s) => ({ field: s, op: t[0] ?? "SUM", format: e.format }));
@@ -3376,21 +3394,21 @@ class Vt {
3376
3394
  var l;
3377
3395
  const s = this._d.getOptions();
3378
3396
  if (!s.sortable) return;
3379
- const n = this._sortList.findIndex((r) => r.field === e);
3380
- if (n >= 0) {
3381
- const r = this._sortList[n];
3382
- r.dir === "asc" ? r.dir = "desc" : this._sortList.splice(n, 1);
3397
+ const i = this._sortList.findIndex((r) => r.field === e);
3398
+ if (i >= 0) {
3399
+ const r = this._sortList[i];
3400
+ r.dir === "asc" ? r.dir = "desc" : this._sortList.splice(i, 1);
3383
3401
  } else
3384
3402
  (!t || !s.multiSort) && (this._sortList = []), this._sortList.push({ field: e, dir: "asc" });
3385
3403
  this._d.getData().applySort(this._sortList), this._d.renderHeader(), this._d.doRender();
3386
- const i = this._sortList.find((r) => r.field === e), o = i ? i.dir === "asc" ? "오름차순" : "내림차순" : "정렬 해제";
3387
- this._d.announce(`${e} ${o} 정렬`), this._d.emit("sortChange", { sortList: this._sortList }), (l = s.onSortChange) == null || l.call(s, { field: e, dir: (i == null ? void 0 : i.dir) ?? "asc", sortList: this._sortList });
3404
+ const n = this._sortList.find((r) => r.field === e), o = n ? n.dir === "asc" ? "오름차순" : "내림차순" : "정렬 해제";
3405
+ this._d.announce(`${e} ${o} 정렬`), this._d.emit("sortChange", { sortList: this._sortList }), (l = s.onSortChange) == null || l.call(s, { field: e, dir: (n == null ? void 0 : n.dir) ?? "asc", sortList: this._sortList });
3388
3406
  }
3389
3407
  sort(e, t = "asc") {
3390
3408
  if (Array.isArray(e))
3391
3409
  this._sortList = e;
3392
3410
  else {
3393
- const s = this._sortList.findIndex((n) => n.field === e);
3411
+ const s = this._sortList.findIndex((i) => i.field === e);
3394
3412
  s >= 0 ? this._sortList[s].dir = t : this._sortList = [{ field: e, dir: t }], this._d.getOptions().multiSort || (this._sortList = this._sortList.slice(-1));
3395
3413
  }
3396
3414
  this._d.getData().applySort(this._sortList), this._d.renderHeader(), this._d.doRender(), this._d.emit("sortChange", { sortList: this._sortList });
@@ -3406,8 +3424,8 @@ class Vt {
3406
3424
  }
3407
3425
  // ─── 필터 ─────────────────────────────────────────────────
3408
3426
  setFilter(e, t) {
3409
- var s, n;
3410
- this._filters[e] = t, this.applyFilters(), this._d.renderHeader(), this._d.doRender(), this._d.emit("filterChange", { field: e, filterItems: t, allFilters: this._filters }), (n = (s = this._d.getOptions()).onFilterChange) == null || n.call(s, { field: e, filterItems: t, allFilters: this._filters });
3427
+ var s, i;
3428
+ this._filters[e] = t, this.applyFilters(), this._d.renderHeader(), this._d.doRender(), this._d.emit("filterChange", { field: e, filterItems: t, allFilters: this._filters }), (i = (s = this._d.getOptions()).onFilterChange) == null || i.call(s, { field: e, filterItems: t, allFilters: this._filters });
3411
3429
  }
3412
3430
  resetFilter(e) {
3413
3431
  e ? delete this._filters[e] : this._filters = {}, this.applyFilters(), this._d.renderHeader(), this._d.doRender();
@@ -3419,11 +3437,11 @@ class Vt {
3419
3437
  this._filters = { ...e }, this.applyFilters();
3420
3438
  }
3421
3439
  applyFilters() {
3422
- var s, n;
3440
+ var s, i;
3423
3441
  const e = this._d.getData();
3424
- e.setFindFilter(this._d.getFindFilter(), this._d.getColLayout().visibleLeaves.map((i) => i.field)), e.applyFilter(this._filters);
3442
+ e.setFindFilter(this._d.getFindFilter(), this._d.getColLayout().visibleLeaves.map((n) => n.field)), e.applyFilter(this._filters);
3425
3443
  const t = e.rowCount;
3426
- (s = this._d.getVs()) == null || s.setTotalRows(t), (n = this._d.getPagination()) == null || n.setTotalRows(t);
3444
+ (s = this._d.getVs()) == null || s.setTotalRows(t), (i = this._d.getPagination()) == null || i.setTotalRows(t);
3427
3445
  }
3428
3446
  }
3429
3447
  class Pt {
@@ -3431,115 +3449,122 @@ class Pt {
3431
3449
  this._d = e;
3432
3450
  }
3433
3451
  handleCellClick(e, t, s) {
3434
- var a, c, h, u, g, E, w;
3435
- const n = this._d.getOptions(), i = this._d.getRowMgr(), o = this._d.getEditMgr();
3436
- n.selection === "single" || n.selection === "row" ? i.selectSingle(e) : n.selection === "multiple" && (s.ctrlKey || s.metaKey ? i.selectToggle(e) : i.selectSingle(e));
3452
+ var a, c, h, u, g, E, b;
3453
+ const i = this._d.getOptions(), n = this._d.getRowMgr(), o = this._d.getEditMgr();
3454
+ i.selection === "single" || i.selection === "row" ? n.selectSingle(e) : i.selection === "multiple" && (s.ctrlKey || s.metaKey ? n.selectToggle(e) : n.selectSingle(e));
3437
3455
  const l = this._d.getData().getRowByIndex(e), r = this._d.getColLayout().visibleLeaves[t];
3438
3456
  if (l && r) {
3439
- const C = r.editable !== !1 && (r.editable !== void 0 || n.editable);
3440
- if (Z(r) && C) {
3441
- const F = l[r.field];
3442
- this._d.writeCell(e, r.field, !F);
3457
+ const C = r.editable !== !1 && (r.editable !== void 0 || i.editable);
3458
+ if (ee(r) && C) {
3459
+ const T = l[r.field];
3460
+ this._d.writeCell(e, r.field, !T);
3443
3461
  }
3444
3462
  if (r.type === "radio") {
3445
- const F = r.group;
3446
- for (const A of this._d.getColLayout().visibleLeaves)
3447
- A.type === "radio" && A.field !== r.field && (!F || A.group === F) && this._d.getData().updateCell(e, A.field, !1);
3463
+ const T = r.group;
3464
+ for (const F of this._d.getColLayout().visibleLeaves)
3465
+ F.type === "radio" && F.field !== r.field && (!T || F.group === T) && this._d.getData().updateCell(e, F.field, !1);
3448
3466
  this._d.writeCell(e, r.field, !0);
3449
3467
  }
3450
- const M = {
3468
+ let M = l[r.field];
3469
+ if (M === void 0 && r.formula)
3470
+ try {
3471
+ const T = r.formulaPrecision ?? 30, F = Be(r.formula, l, T);
3472
+ M = F instanceof x ? r.precision != null ? F.toFixed(r.precision) : F.toString() : String(F);
3473
+ } catch {
3474
+ }
3475
+ const _ = {
3451
3476
  type: "cellClick",
3452
3477
  rowIndex: e,
3453
3478
  columnIndex: t,
3454
3479
  field: r.field,
3455
- value: l[r.field],
3480
+ value: M,
3456
3481
  row: l,
3457
3482
  column: r,
3458
3483
  target: s.target,
3459
3484
  originalEvent: s
3460
3485
  };
3461
- this._d.emit("cellClick", M), (a = n.onCellClick) == null || a.call(n, M);
3462
- const p = { type: "rowClick", rowIndex: e, row: l, target: s.target, originalEvent: s };
3463
- this._d.emit("rowClick", p), (c = n.onRowClick) == null || c.call(n, p);
3464
- const v = r.type === "select";
3465
- !(o.activeEditor != null && ((h = o.editCell) == null ? void 0 : h.ri) === e && ((u = o.editCell) == null ? void 0 : u.ci) === t) && (n.editMode === "click" || v) && !Z(r) && o.startEdit(e, t, s);
3486
+ this._d.emit("cellClick", _), (a = i.onCellClick) == null || a.call(i, _);
3487
+ const y = { type: "rowClick", rowIndex: e, row: l, target: s.target, originalEvent: s };
3488
+ this._d.emit("rowClick", y), (c = i.onRowClick) == null || c.call(i, y);
3489
+ const p = r.type === "select";
3490
+ !(o.activeEditor != null && ((h = o.editCell) == null ? void 0 : h.ri) === e && ((u = o.editCell) == null ? void 0 : u.ci) === t) && (i.editMode === "click" || p) && !ee(r) && o.startEdit(e, t, s);
3466
3491
  }
3467
3492
  o.activeEditor && ((g = o.editCell) == null ? void 0 : g.ri) === e && ((E = o.editCell) == null ? void 0 : E.ci) === t || (this._d.doRender(), this._d.emit("selectionChange", {
3468
- rows: i.getSelections(),
3469
- rowIndexes: [...i.selectedRows]
3470
- }), (w = n.onSelectionChange) == null || w.call(n, { rows: i.getSelections(), rowIndexes: [...i.selectedRows], cells: [] }));
3493
+ rows: n.getSelections(),
3494
+ rowIndexes: [...n.selectedRows]
3495
+ }), (b = i.onSelectionChange) == null || b.call(i, { rows: n.getSelections(), rowIndexes: [...n.selectedRows], cells: [] }));
3471
3496
  }
3472
3497
  handleCellDblClick(e, t, s) {
3473
3498
  var a, c;
3474
- const n = this._d.getData().getRowByIndex(e), i = this._d.getColLayout().visibleLeaves[t];
3475
- if (!n || !i) return;
3499
+ const i = this._d.getData().getRowByIndex(e), n = this._d.getColLayout().visibleLeaves[t];
3500
+ if (!i || !n) return;
3476
3501
  const o = this._d.getOptions(), l = {
3477
3502
  type: "cellDblClick",
3478
3503
  rowIndex: e,
3479
3504
  columnIndex: t,
3480
- field: i.field,
3481
- value: n[i.field],
3482
- row: n,
3483
- column: i,
3505
+ field: n.field,
3506
+ value: i[n.field],
3507
+ row: i,
3508
+ column: n,
3484
3509
  target: s.target,
3485
3510
  originalEvent: s
3486
3511
  };
3487
3512
  this._d.emit("cellDblClick", l), (a = o.onCellDblClick) == null || a.call(o, l);
3488
- const r = { type: "rowDblClick", rowIndex: e, row: n, target: s.target, originalEvent: s };
3513
+ const r = { type: "rowDblClick", rowIndex: e, row: i, target: s.target, originalEvent: s };
3489
3514
  this._d.emit("rowDblClick", r), (c = o.onRowDblClick) == null || c.call(o, r), o.editMode === "dblclick" && this._d.getEditMgr().startEdit(e, t, s);
3490
3515
  }
3491
3516
  handleCellMouseOver(e, t, s) {
3492
3517
  var a, c;
3493
- const n = this._d.getData().getRowByIndex(e), i = this._d.getColLayout().visibleLeaves[t];
3494
- if (!n || !i) return;
3495
- const o = this._d.getOptions(), l = { type: "cellMouseOver", rowIndex: e, columnIndex: t, field: i.field, value: n[i.field], row: n, column: i, target: s.target, originalEvent: s };
3518
+ const i = this._d.getData().getRowByIndex(e), n = this._d.getColLayout().visibleLeaves[t];
3519
+ if (!i || !n) return;
3520
+ const o = this._d.getOptions(), l = { type: "cellMouseOver", rowIndex: e, columnIndex: t, field: n.field, value: i[n.field], row: i, column: n, target: s.target, originalEvent: s };
3496
3521
  this._d.emit("cellMouseOver", l), (a = o.onCellMouseOver) == null || a.call(o, l);
3497
- const r = { type: "rowMouseOver", rowIndex: e, row: n, target: s.target, originalEvent: s };
3522
+ const r = { type: "rowMouseOver", rowIndex: e, row: i, target: s.target, originalEvent: s };
3498
3523
  this._d.emit("rowMouseOver", r), (c = o.onRowMouseOver) == null || c.call(o, r);
3499
3524
  }
3500
3525
  handleCellMouseOut(e, t, s) {
3501
3526
  var a, c;
3502
- const n = this._d.getData().getRowByIndex(e), i = this._d.getColLayout().visibleLeaves[t];
3503
- if (!n || !i) return;
3504
- const o = this._d.getOptions(), l = { type: "cellMouseOut", rowIndex: e, columnIndex: t, field: i.field, value: n[i.field], row: n, column: i, target: s.target, originalEvent: s };
3527
+ const i = this._d.getData().getRowByIndex(e), n = this._d.getColLayout().visibleLeaves[t];
3528
+ if (!i || !n) return;
3529
+ const o = this._d.getOptions(), l = { type: "cellMouseOut", rowIndex: e, columnIndex: t, field: n.field, value: i[n.field], row: i, column: n, target: s.target, originalEvent: s };
3505
3530
  this._d.emit("cellMouseOut", l), (a = o.onCellMouseOut) == null || a.call(o, l);
3506
- const r = { type: "rowMouseOut", rowIndex: e, row: n, target: s.target, originalEvent: s };
3531
+ const r = { type: "rowMouseOut", rowIndex: e, row: i, target: s.target, originalEvent: s };
3507
3532
  this._d.emit("rowMouseOut", r), (c = o.onRowMouseOut) == null || c.call(o, r);
3508
3533
  }
3509
3534
  handleCellMouseDown(e, t, s) {
3510
3535
  var a, c;
3511
- const n = this._d.getData().getRowByIndex(e), i = this._d.getColLayout().visibleLeaves[t];
3512
- if (!n || !i) return;
3513
- const o = this._d.getOptions(), l = { type: "cellMouseDown", rowIndex: e, columnIndex: t, field: i.field, value: n[i.field], row: n, column: i, target: s.target, originalEvent: s };
3536
+ const i = this._d.getData().getRowByIndex(e), n = this._d.getColLayout().visibleLeaves[t];
3537
+ if (!i || !n) return;
3538
+ const o = this._d.getOptions(), l = { type: "cellMouseDown", rowIndex: e, columnIndex: t, field: n.field, value: i[n.field], row: i, column: n, target: s.target, originalEvent: s };
3514
3539
  this._d.emit("cellMouseDown", l), (a = o.onCellMouseDown) == null || a.call(o, l);
3515
- const r = { type: "rowMouseDown", rowIndex: e, row: n, target: s.target, originalEvent: s };
3540
+ const r = { type: "rowMouseDown", rowIndex: e, row: i, target: s.target, originalEvent: s };
3516
3541
  this._d.emit("rowMouseDown", r), (c = o.onRowMouseDown) == null || c.call(o, r);
3517
3542
  }
3518
3543
  handleCellMouseUp(e, t, s) {
3519
3544
  var a, c;
3520
- const n = this._d.getData().getRowByIndex(e), i = this._d.getColLayout().visibleLeaves[t];
3521
- if (!n || !i) return;
3522
- const o = this._d.getOptions(), l = { type: "cellMouseUp", rowIndex: e, columnIndex: t, field: i.field, value: n[i.field], row: n, column: i, target: s.target, originalEvent: s };
3545
+ const i = this._d.getData().getRowByIndex(e), n = this._d.getColLayout().visibleLeaves[t];
3546
+ if (!i || !n) return;
3547
+ const o = this._d.getOptions(), l = { type: "cellMouseUp", rowIndex: e, columnIndex: t, field: n.field, value: i[n.field], row: i, column: n, target: s.target, originalEvent: s };
3523
3548
  this._d.emit("cellMouseUp", l), (a = o.onCellMouseUp) == null || a.call(o, l);
3524
- const r = { type: "rowMouseUp", rowIndex: e, row: n, target: s.target, originalEvent: s };
3549
+ const r = { type: "rowMouseUp", rowIndex: e, row: i, target: s.target, originalEvent: s };
3525
3550
  this._d.emit("rowMouseUp", r), (c = o.onRowMouseUp) == null || c.call(o, r);
3526
3551
  }
3527
3552
  handleCellMouseMove(e, t, s) {
3528
3553
  var a, c;
3529
- const n = this._d.getData().getRowByIndex(e), i = this._d.getColLayout().visibleLeaves[t];
3530
- if (!n || !i) return;
3531
- const o = this._d.getOptions(), l = { type: "cellMouseMove", rowIndex: e, columnIndex: t, field: i.field, value: n[i.field], row: n, column: i, target: s.target, originalEvent: s };
3554
+ const i = this._d.getData().getRowByIndex(e), n = this._d.getColLayout().visibleLeaves[t];
3555
+ if (!i || !n) return;
3556
+ const o = this._d.getOptions(), l = { type: "cellMouseMove", rowIndex: e, columnIndex: t, field: n.field, value: i[n.field], row: i, column: n, target: s.target, originalEvent: s };
3532
3557
  this._d.emit("cellMouseMove", l), (a = o.onCellMouseMove) == null || a.call(o, l);
3533
- const r = { type: "rowMouseMove", rowIndex: e, row: n, target: s.target, originalEvent: s };
3558
+ const r = { type: "rowMouseMove", rowIndex: e, row: i, target: s.target, originalEvent: s };
3534
3559
  this._d.emit("rowMouseMove", r), (c = o.onRowMouseMove) == null || c.call(o, r);
3535
3560
  }
3536
3561
  handleCellKeyEvt(e, t) {
3537
3562
  var c, h, u;
3538
3563
  const s = this._d.getEditMgr();
3539
3564
  if (!s.focusCell || s.activeEditor) return;
3540
- const { ri: n, ci: i } = s.focusCell, o = this._d.getData().getRowByIndex(n), l = this._d.getColLayout().visibleLeaves[i];
3565
+ const { ri: i, ci: n } = s.focusCell, o = this._d.getData().getRowByIndex(i), l = this._d.getColLayout().visibleLeaves[n];
3541
3566
  if (!o || !l) return;
3542
- const r = this._d.getOptions(), a = { type: e, rowIndex: n, columnIndex: i, field: l.field, value: o[l.field], row: o, column: l, key: t.key, target: this._d.getContainer(), originalEvent: t };
3567
+ const r = this._d.getOptions(), a = { type: e, rowIndex: i, columnIndex: n, field: l.field, value: o[l.field], row: o, column: l, key: t.key, target: this._d.getContainer(), originalEvent: t };
3543
3568
  this._d.emit(e, a), e === "cellKeyDown" ? (c = r.onCellKeyDown) == null || c.call(r, a) : e === "cellKeyUp" ? (h = r.onCellKeyUp) == null || h.call(r, a) : (u = r.onCellKeyPress) == null || u.call(r, a);
3544
3569
  }
3545
3570
  }
@@ -3553,8 +3578,8 @@ class Ut {
3553
3578
  remove(e, t) {
3554
3579
  const s = this._triggers.get(e);
3555
3580
  if (s) {
3556
- const n = s.indexOf(t);
3557
- n >= 0 && s.splice(n, 1);
3581
+ const i = s.indexOf(t);
3582
+ i >= 0 && s.splice(i, 1);
3558
3583
  }
3559
3584
  }
3560
3585
  clear(e) {
@@ -3578,19 +3603,19 @@ class Ut {
3578
3603
  }
3579
3604
  exec(e, t) {
3580
3605
  const s = this._triggers.get(e) ?? [];
3581
- for (const n of s)
3582
- if (n(t), t.cancelled) return !1;
3606
+ for (const i of s)
3607
+ if (i(t), t.cancelled) return !1;
3583
3608
  if (e.startsWith("after:")) {
3584
- const n = this._triggers.get("complete") ?? [];
3585
- for (const i of n) i(t);
3609
+ const i = this._triggers.get("complete") ?? [];
3610
+ for (const n of i) n(t);
3586
3611
  }
3587
3612
  return !0;
3588
3613
  }
3589
3614
  }
3590
3615
  const jt = "_ogRowId";
3591
- class Xt extends qe {
3616
+ class Xt extends Ye {
3592
3617
  constructor(e, t) {
3593
- var n;
3618
+ var i;
3594
3619
  super(), this._vs = null, this._ro = null, this._renderer = null, this._trigMgr = new Ut(), this._destroyed = !1, this._colWidths = [], this._filterPanel = null, this._filterSelect = null, this._pagination = null, this._dnd = null, this._mergeEngine = new Q(), this._liveRegion = null, this._ctxMenu = null, this._cmHandler = null, this._cmKbdHandler = null, this._wsManager = null;
3595
3620
  const s = typeof e == "string" ? document.querySelector(e) : e;
3596
3621
  if (!s) throw new Error(`OpenGrid: container not found: ${e}`);
@@ -3634,19 +3659,19 @@ class Xt extends qe {
3634
3659
  cssVars: {},
3635
3660
  ariaLabel: "OPEN_GRID 데이터 그리드",
3636
3661
  ...t
3637
- }, this._data = new Xe(jt), this._rowMgr = new kt(this._data), this._colLayout = new re(this._options.columns, this._options.frozenColumns), this._editMgr = new Et({
3662
+ }, this._data = new Ge(jt), this._rowMgr = new kt(this._data), this._colLayout = new le(this._options.columns, this._options.frozenColumns), this._editMgr = new Et({
3638
3663
  data: this._data,
3639
3664
  colLayout: this._colLayout,
3640
3665
  getRenderer: () => this._renderer,
3641
3666
  getContainer: () => this._container,
3642
3667
  getOptions: () => this._options,
3643
- emit: (i, ...o) => this.emit(i, ...o),
3668
+ emit: (n, ...o) => this.emit(n, ...o),
3644
3669
  doRender: () => this._doRender(...this._visRange()),
3645
- announce: (i) => this._announce(i),
3646
- writeCell: (i, o, l) => this.writeCell(i, o, l),
3647
- scrollToRow: (i) => {
3670
+ announce: (n) => this._announce(n),
3671
+ writeCell: (n, o, l) => this.writeCell(n, o, l),
3672
+ scrollToRow: (n) => {
3648
3673
  var o;
3649
- return (o = this._vs) == null ? void 0 : o.scrollToRow(i);
3674
+ return (o = this._vs) == null ? void 0 : o.scrollToRow(n);
3650
3675
  },
3651
3676
  getVisibleLeaves: () => this._colLayout.visibleLeaves
3652
3677
  }), this._exportMgr = new At({
@@ -3655,7 +3680,7 @@ class Xt extends qe {
3655
3680
  getColWidths: () => this._colWidths,
3656
3681
  getOptions: () => this._options,
3657
3682
  getContainer: () => this._container,
3658
- getMaskEnabled: (i) => this.getMaskEnabled(i),
3683
+ getMaskEnabled: (n) => this.getMaskEnabled(n),
3659
3684
  getWsManager: () => this._wsManager
3660
3685
  }), this._footerMgr = new zt({
3661
3686
  getData: () => this._data.getData(),
@@ -3669,13 +3694,13 @@ class Xt extends qe {
3669
3694
  getData: () => this._data,
3670
3695
  getColLayout: () => this._colLayout,
3671
3696
  getOptions: () => this._options,
3672
- setFocusCell: (i, o) => this._setFocusCell(i, o),
3673
- handleRowDrop: (i, o) => this._handleRowDrop(i, o),
3697
+ setFocusCell: (n, o) => this._setFocusCell(n, o),
3698
+ handleRowDrop: (n, o) => this._handleRowDrop(n, o),
3674
3699
  doRender: () => this._doRender(...this._visRange()),
3675
- announce: (i) => this._announce(i),
3676
- emit: (i, ...o) => this.emit(i, ...o),
3700
+ announce: (n) => this._announce(n),
3701
+ emit: (n, ...o) => this.emit(n, ...o),
3677
3702
  visRange: () => this._visRange(),
3678
- handleCellKeyEvt: (i, o) => this._handleCellKeyEvt(i, o)
3703
+ handleCellKeyEvt: (n, o) => this._handleCellKeyEvt(n, o)
3679
3704
  }), this._sfMgr = new Vt({
3680
3705
  getData: () => this._data,
3681
3706
  getColLayout: () => this._colLayout,
@@ -3685,8 +3710,8 @@ class Xt extends qe {
3685
3710
  getOptions: () => this._options,
3686
3711
  renderHeader: () => this._renderHeader(),
3687
3712
  doRender: () => this._doRender(...this._visRange()),
3688
- announce: (i) => this._announce(i),
3689
- emit: (i, ...o) => this.emit(i, ...o)
3713
+ announce: (n) => this._announce(n),
3714
+ emit: (n, ...o) => this.emit(n, ...o)
3690
3715
  }), this._findMgr = new Ht({
3691
3716
  getColLayout: () => this._colLayout,
3692
3717
  getData: () => this._data,
@@ -3700,8 +3725,8 @@ class Xt extends qe {
3700
3725
  getOptions: () => this._options,
3701
3726
  getEditMgr: () => this._editMgr,
3702
3727
  getRowMgr: () => this._rowMgr,
3703
- emit: (i, ...o) => this.emit(i, ...o),
3704
- writeCell: (i, o, l) => this.writeCell(i, o, l),
3728
+ emit: (n, ...o) => this.emit(n, ...o),
3729
+ writeCell: (n, o, l) => this.writeCell(n, o, l),
3705
3730
  doRender: () => this._doRender(...this._visRange()),
3706
3731
  getContainer: () => this._container
3707
3732
  }), this._grpMgr = new Ot({
@@ -3709,59 +3734,59 @@ class Xt extends qe {
3709
3734
  getDataLayer: () => this._data,
3710
3735
  getOptions: () => this._options,
3711
3736
  getVs: () => this._vs,
3712
- doRenderFull: (i) => this._doRender(0, i - 1),
3737
+ doRenderFull: (n) => this._doRender(0, n - 1),
3713
3738
  doRender: () => this._doRender(...this._visRange())
3714
- }), this._mount(), this._bindOptionEvents(), (n = this._options.defaultSort) != null && n.length && this._sfMgr.initSort(this._options.defaultSort), requestAnimationFrame(() => {
3715
- var i, o;
3716
- this.emit("ready", this), (o = (i = this._options).onReady) == null || o.call(i, this);
3739
+ }), this._mount(), this._bindOptionEvents(), (i = this._options.defaultSort) != null && i.length && this._sfMgr.initSort(this._options.defaultSort), requestAnimationFrame(() => {
3740
+ var n, o;
3741
+ this.emit("ready", this), (o = (n = this._options).onReady) == null || o.call(n, this);
3717
3742
  });
3718
3743
  }
3719
3744
  _mount() {
3720
- var s, n;
3745
+ var s, i;
3721
3746
  this._container.classList.add("og-container");
3722
3747
  const e = this._options.height, t = this._options.width;
3723
3748
  this._container.style.height = typeof e == "number" ? `${e}px` : String(e), this._container.style.width = typeof t == "number" ? `${t}px` : String(t), this._container.style.display = "flex", this._container.style.flexDirection = "column", this._container.style.overflow = "hidden", this._container.style.boxSizing = "border-box", this._container.style.border = "1px solid var(--og-border-color, #e0e0e0)", this._container.style.fontFamily = "var(--og-font-family, -apple-system, sans-serif)", this._container.style.fontSize = "var(--og-font-size, 13px)", this._container.setAttribute("data-og-theme", this._options.theme);
3724
- for (const [i, o] of Object.entries(this._options.cssVars))
3725
- this._container.style.setProperty(i, o);
3749
+ for (const [n, o] of Object.entries(this._options.cssVars))
3750
+ this._container.style.setProperty(n, o);
3726
3751
  this._renderer = new Mt(this._container, this._options, {
3727
- onHeaderClick: (i, o) => this._handleSortClick(i, o),
3728
- onCellClick: (i, o, l) => this._handleCellClick(i, o, l),
3729
- onCellDblClick: (i, o, l) => this._handleCellDblClick(i, o, l),
3730
- onCellMouseOver: (i, o, l) => this._handleCellMouseOver(i, o, l),
3731
- onCellMouseOut: (i, o, l) => this._handleCellMouseOut(i, o, l),
3732
- onCellMouseDown: (i, o, l) => this._handleCellMouseDown(i, o, l),
3733
- onCellMouseUp: (i, o, l) => this._handleCellMouseUp(i, o, l),
3734
- onCellMouseMove: (i, o, l) => this._handleCellMouseMove(i, o, l),
3735
- onRowCheck: (i, o) => this._handleRowCheck(i, o),
3736
- onAllCheck: (i) => this._handleAllCheck(i),
3737
- onColResize: (i, o) => this._handleColResize(i, o),
3738
- onFilterIconClick: (i, o) => this._handleFilterIconClick(i, o),
3752
+ onHeaderClick: (n, o) => this._handleSortClick(n, o),
3753
+ onCellClick: (n, o, l) => this._handleCellClick(n, o, l),
3754
+ onCellDblClick: (n, o, l) => this._handleCellDblClick(n, o, l),
3755
+ onCellMouseOver: (n, o, l) => this._handleCellMouseOver(n, o, l),
3756
+ onCellMouseOut: (n, o, l) => this._handleCellMouseOut(n, o, l),
3757
+ onCellMouseDown: (n, o, l) => this._handleCellMouseDown(n, o, l),
3758
+ onCellMouseUp: (n, o, l) => this._handleCellMouseUp(n, o, l),
3759
+ onCellMouseMove: (n, o, l) => this._handleCellMouseMove(n, o, l),
3760
+ onRowCheck: (n, o) => this._handleRowCheck(n, o),
3761
+ onAllCheck: (n) => this._handleAllCheck(n),
3762
+ onColResize: (n, o) => this._handleColResize(n, o),
3763
+ onFilterIconClick: (n, o) => this._handleFilterIconClick(n, o),
3739
3764
  getDndManager: () => this._dnd,
3740
- onColDragStart: (i) => {
3741
- this._editMgr.dragColIdx = i;
3765
+ onColDragStart: (n) => {
3766
+ this._editMgr.dragColIdx = n;
3742
3767
  },
3743
- onColDrop: (i) => {
3744
- this._editMgr.dragColIdx !== null && this._editMgr.dragColIdx !== i && this._reorderColumn(this._editMgr.dragColIdx, i), this._editMgr.dragColIdx = null;
3768
+ onColDrop: (n) => {
3769
+ this._editMgr.dragColIdx !== null && this._editMgr.dragColIdx !== n && this._reorderColumn(this._editMgr.dragColIdx, n), this._editMgr.dragColIdx = null;
3745
3770
  },
3746
3771
  getColDragIdx: () => this._editMgr.dragColIdx
3747
- }), this._filterPanel = new Je(
3772
+ }), this._filterPanel = new Ze(
3748
3773
  this._container,
3749
- (i, o) => this.setFilter(i, o),
3750
- (i) => this.resetFilter(i)
3751
- ), this._container.setAttribute("role", "grid"), this._container.setAttribute("aria-label", this._options.ariaLabel ?? ((s = this._options.cssVars) == null ? void 0 : s["aria-label"]) ?? "OPEN_GRID 데이터 그리드"), this._container.setAttribute("aria-rowcount", "0"), this._container.setAttribute("aria-colcount", String(this._options.columns.filter((i) => !i.hidden).length)), this._liveRegion = document.createElement("div"), this._liveRegion.setAttribute("aria-live", "polite"), this._liveRegion.setAttribute("aria-atomic", "true"), this._liveRegion.className = "og-live-region", this._container.insertAdjacentElement("beforebegin", this._liveRegion), this._container.tabIndex = 0, this._container.addEventListener("keydown", (i) => this._handleKeyDown(i)), this._container.addEventListener("keyup", (i) => this._handleCellKeyEvt("cellKeyUp", i)), this._container.addEventListener("keypress", (i) => this._handleCellKeyEvt("cellKeyPress", i)), this._vs = new Qe(this._renderer.bodyWrapper, {
3774
+ (n, o) => this.setFilter(n, o),
3775
+ (n) => this.resetFilter(n)
3776
+ ), this._container.setAttribute("role", "grid"), this._container.setAttribute("aria-label", this._options.ariaLabel ?? ((s = this._options.cssVars) == null ? void 0 : s["aria-label"]) ?? "OPEN_GRID 데이터 그리드"), this._container.setAttribute("aria-rowcount", "0"), this._container.setAttribute("aria-colcount", String(this._options.columns.filter((n) => !n.hidden).length)), this._liveRegion = document.createElement("div"), this._liveRegion.setAttribute("aria-live", "polite"), this._liveRegion.setAttribute("aria-atomic", "true"), this._liveRegion.className = "og-live-region", this._container.insertAdjacentElement("beforebegin", this._liveRegion), this._container.tabIndex = 0, this._container.addEventListener("keydown", (n) => this._handleKeyDown(n)), this._container.addEventListener("keyup", (n) => this._handleCellKeyEvt("cellKeyUp", n)), this._container.addEventListener("keypress", (n) => this._handleCellKeyEvt("cellKeyPress", n)), this._vs = new Je(this._renderer.bodyWrapper, {
3752
3777
  rowHeight: this._options.rowHeight,
3753
- onRender: (i, o) => this._doRender(i, o)
3778
+ onRender: (n, o) => this._doRender(n, o)
3754
3779
  }), this._options.draggable && (this._dnd = new Tt(
3755
3780
  this._renderer.bodyWrapper,
3756
3781
  this._options.rowHeight,
3757
- (i, o) => this._handleRowDrop(i, o)
3782
+ (n, o) => this._handleRowDrop(n, o)
3758
3783
  )), this._options.pagination && (this._pagination = new Lt(
3759
3784
  this._container,
3760
3785
  this._options.pageSize,
3761
- (i) => {
3762
- this.emit("pageChange", i), this._doRender(...this._visRange());
3786
+ (n) => {
3787
+ this.emit("pageChange", n), this._doRender(...this._visRange());
3763
3788
  }
3764
- )), this._findMgr.init(this._container), this._initContextMenu(), (n = this._options.worksheets) != null && n.length && this._initWorksheets(), this._ro = new ResizeObserver(() => this._onResize()), this._ro.observe(this._container), this._onResize();
3789
+ )), this._findMgr.init(this._container), this._initContextMenu(), (i = this._options.worksheets) != null && i.length && this._initWorksheets(), this._ro = new ResizeObserver(() => this._onResize()), this._ro.observe(this._container), this._onResize();
3765
3790
  }
3766
3791
  _initContextMenu() {
3767
3792
  const e = this._options.contextMenu;
@@ -3783,16 +3808,16 @@ class Xt extends qe {
3783
3808
  const s = t.target.closest(".og-cell");
3784
3809
  if (!s) return;
3785
3810
  t.preventDefault();
3786
- const n = Number(s.dataset.colIndex ?? -1), i = this._colLayout.visibleLeaves[n];
3787
- i && this._ctxMenu && (this._ctxMenu._actions.onSortAsc = () => this.orderBy(i.field, "asc"), this._ctxMenu._actions.onSortDesc = () => this.orderBy(i.field, "desc"));
3811
+ const i = Number(s.dataset.colIndex ?? -1), n = this._colLayout.visibleLeaves[i];
3812
+ n && this._ctxMenu && (this._ctxMenu._actions.onSortAsc = () => this.orderBy(n.field, "asc"), this._ctxMenu._actions.onSortDesc = () => this.orderBy(n.field, "desc"));
3788
3813
  const o = Array.isArray(e) ? e : void 0;
3789
3814
  (l = this._ctxMenu) == null || l.open(t, o);
3790
3815
  }, this._container.addEventListener("contextmenu", this._cmHandler), this._cmKbdHandler = (t) => {
3791
3816
  var s;
3792
3817
  if (t.shiftKey && t.key === "F10") {
3793
3818
  t.preventDefault();
3794
- const n = this._container.getBoundingClientRect(), i = { clientX: n.left + 80, clientY: n.top + 40 };
3795
- (s = this._ctxMenu) == null || s.open(i);
3819
+ const i = this._container.getBoundingClientRect(), n = { clientX: i.left + 80, clientY: i.top + 40 };
3820
+ (s = this._ctxMenu) == null || s.open(n);
3796
3821
  }
3797
3822
  }, this._container.addEventListener("keydown", this._cmKbdHandler));
3798
3823
  }
@@ -3810,7 +3835,7 @@ class Xt extends qe {
3810
3835
  (t = this._filterSelect) == null || t.destroy(), this._filterSelect = null, e && (this._container.id || (this._container.id = `og-${Math.random().toString(36).slice(2, 7)}`), this._filterSelect = new St(
3811
3836
  this._container,
3812
3837
  e,
3813
- (s, n) => this.setFilter(s, n),
3838
+ (s, i) => this.setFilter(s, i),
3814
3839
  (s) => this.resetFilter(s),
3815
3840
  this._container.id
3816
3841
  ));
@@ -3831,9 +3856,9 @@ class Xt extends qe {
3831
3856
  * enabled=false → 컬럼 전체 마스킹 해제 (원문 표시)
3832
3857
  */
3833
3858
  setMaskEnabled(e, t) {
3834
- var n;
3859
+ var i;
3835
3860
  const s = this._colLayout.getColumnByField(e);
3836
- s && (t ? (s._maskRevealed = !1, (n = s._maskRevealedRows) == null || n.clear()) : s._maskRevealed = !0, this._doRender(...this._visRange()));
3861
+ s && (t ? (s._maskRevealed = !1, (i = s._maskRevealedRows) == null || i.clear()) : s._maskRevealed = !0, this._doRender(...this._visRange()));
3837
3862
  }
3838
3863
  /** 현재 컬럼 마스킹 활성 여부 반환. true=마스킹 중, false=해제됨 */
3839
3864
  getMaskEnabled(e) {
@@ -3845,7 +3870,7 @@ class Xt extends qe {
3845
3870
  this._wsManager = new ze(
3846
3871
  this._container,
3847
3872
  (t, s) => {
3848
- this._data.setData(s.data), this._colLayout = new re(
3873
+ this._data.setData(s.data), this._colLayout = new le(
3849
3874
  s.columns.length ? s.columns : this._options.columns,
3850
3875
  this._options.frozenColumns
3851
3876
  ), this._doRender(...this._visRange()), this._renderHeader();
@@ -3857,9 +3882,9 @@ class Xt extends qe {
3857
3882
  addWorksheet(e, t, s) {
3858
3883
  this._wsManager || (this._wsManager = new ze(
3859
3884
  this._container,
3860
- (n, i) => {
3861
- this._data.setData(i.data), this._colLayout = new re(
3862
- i.columns.length ? i.columns : this._options.columns,
3885
+ (i, n) => {
3886
+ this._data.setData(n.data), this._colLayout = new le(
3887
+ n.columns.length ? n.columns : this._options.columns,
3863
3888
  this._options.frozenColumns
3864
3889
  ), this._doRender(...this._visRange()), this._renderHeader();
3865
3890
  }
@@ -3915,7 +3940,7 @@ class Xt extends qe {
3915
3940
  );
3916
3941
  }
3917
3942
  _doRender(e, t) {
3918
- var n;
3943
+ var i;
3919
3944
  if (!this._renderer || !this._vs) return;
3920
3945
  const s = this._vs.getVisibleRange();
3921
3946
  this._renderer.renderBody(
@@ -3930,11 +3955,11 @@ class Xt extends qe {
3930
3955
  this._rowMgr.selectedRows,
3931
3956
  this._rowMgr.checkedRows,
3932
3957
  this._grpMgr.isGroupMode ? this._grpMgr.groupFlatRows : this._grpMgr.isTreeMode ? this._grpMgr.treeFlatRows : null,
3933
- (i) => this._grpMgr.handleGroupToggle(i),
3934
- this._grpMgr.isTreeMode ? (i) => this._grpMgr.handleTreeToggle(i) : void 0,
3958
+ (n) => this._grpMgr.handleGroupToggle(n),
3959
+ this._grpMgr.isTreeMode ? (n) => this._grpMgr.handleTreeToggle(n) : void 0,
3935
3960
  { _totalRows: this._data.rowCount, _frozenCount: this._colLayout.frozenCount, _focusCell: this._editMgr.focusCell },
3936
3961
  this._mergeEngine
3937
- ), (n = this._options.footer) != null && n.length && this._renderFooterEl();
3962
+ ), (i = this._options.footer) != null && i.length && this._renderFooterEl();
3938
3963
  }
3939
3964
  _handleGroupToggle(e) {
3940
3965
  this._grpMgr.handleGroupToggle(e);
@@ -3943,8 +3968,8 @@ class Xt extends qe {
3943
3968
  _visRange() {
3944
3969
  var t;
3945
3970
  if (this._options.pagination && this._pagination) {
3946
- const { start: s, end: n } = this._pagination.getRange();
3947
- return [s, n];
3971
+ const { start: s, end: i } = this._pagination.getRange();
3972
+ return [s, i];
3948
3973
  }
3949
3974
  const e = (t = this._vs) == null ? void 0 : t.getVisibleRange();
3950
3975
  return [(e == null ? void 0 : e.startIndex) ?? 0, Math.min(((e == null ? void 0 : e.endIndex) ?? 30) + this._visCount() + 5, this._data.rowCount - 1)];
@@ -3957,7 +3982,7 @@ class Xt extends qe {
3957
3982
  this._sfMgr.handleSortClick(e, t);
3958
3983
  }
3959
3984
  _isToggleCol(e) {
3960
- return Z(e);
3985
+ return ee(e);
3961
3986
  }
3962
3987
  _handleCellClick(e, t, s) {
3963
3988
  this._cellEvt.handleCellClick(e, t, s);
@@ -3987,20 +4012,20 @@ class Xt extends qe {
3987
4012
  this._rowMgr.check(e, t), this._doRender(...this._visRange()), this.emit("rowCheck", { rowIndex: e, checked: t, row: this._data.getRowByIndex(e) });
3988
4013
  }
3989
4014
  _handleFilterIconClick(e, t) {
3990
- var n, i;
3991
- if ((n = this._filterPanel) != null && n.isOpen) {
4015
+ var i, n;
4016
+ if ((i = this._filterPanel) != null && i.isOpen) {
3992
4017
  this._filterPanel.close();
3993
4018
  return;
3994
4019
  }
3995
4020
  const s = this._sfMgr.filters[e] ?? [];
3996
- (i = this._filterPanel) == null || i.open(e, t, s);
4021
+ (n = this._filterPanel) == null || n.open(e, t, s);
3997
4022
  }
3998
4023
  _handleAllCheck(e) {
3999
4024
  this._rowMgr.checkAll(e, this._data.rowCount), this._doRender(...this._visRange()), this.emit("allCheck", { checked: e });
4000
4025
  }
4001
4026
  _handleRowDrop(e, t) {
4002
- var s, n;
4003
- this._data.moveRow(e, t), this._doRender(...this._visRange()), this.emit("rowDrop", { fromIndex: e, toIndex: t }), (n = (s = this._options).onRowDrop) == null || n.call(s, { fromIndex: e, toIndex: t });
4027
+ var s, i;
4028
+ this._data.moveRow(e, t), this._doRender(...this._visRange()), this.emit("rowDrop", { fromIndex: e, toIndex: t }), (i = (s = this._options).onRowDrop) == null || i.call(s, { fromIndex: e, toIndex: t });
4004
4029
  }
4005
4030
  /** 행을 드롭으로 이동할 때 실행된다 */
4006
4031
  /** ???꾩튂 ?대룞 */
@@ -4037,18 +4062,18 @@ class Xt extends qe {
4037
4062
  return this._data.getOriginalData();
4038
4063
  }
4039
4064
  pushData(e) {
4040
- var n, i;
4065
+ var i, n;
4041
4066
  const t = [...this._data.getAllData(), ...e];
4042
4067
  this._data.setData(t);
4043
4068
  const s = this._data.rowCount;
4044
- (n = this._vs) == null || n.setTotalRows(s), (i = this._pagination) == null || i.setTotalRows(s);
4069
+ (i = this._vs) == null || i.setTotalRows(s), (n = this._pagination) == null || n.setTotalRows(s);
4045
4070
  }
4046
4071
  prefixData(e) {
4047
- var n, i;
4072
+ var i, n;
4048
4073
  const t = [...e, ...this._data.getAllData()];
4049
4074
  this._data.setData(t);
4050
4075
  const s = this._data.rowCount;
4051
- (n = this._vs) == null || n.setTotalRows(s), (i = this._pagination) == null || i.setTotalRows(s);
4076
+ (i = this._vs) == null || i.setTotalRows(s), (n = this._pagination) == null || n.setTotalRows(s);
4052
4077
  }
4053
4078
  clearData() {
4054
4079
  var e, t;
@@ -4058,26 +4083,26 @@ class Xt extends qe {
4058
4083
  var o, l, r, a;
4059
4084
  const s = this._trigMgr.mkCtx("insertRow", [e, t]);
4060
4085
  if (!this._trigMgr.exec("before:insertRow", s)) return;
4061
- const n = t === "before" ? 0 : t === "after" ? this._data.rowCount : t;
4062
- this._data.addRow(e, n);
4063
- const i = this._data.rowCount;
4064
- (o = this._vs) == null || o.setTotalRows(i), (l = this._pagination) == null || l.setTotalRows(i), this._doRender(...this._visRange()), this.emit("dataChange", this._data.getData()), (a = (r = this._options).onDataChange) == null || a.call(r, this._data.getData()), s.result = { rowCount: i, item: e }, this._trigMgr.exec("after:insertRow", s);
4086
+ const i = t === "before" ? 0 : t === "after" ? this._data.rowCount : t;
4087
+ this._data.addRow(e, i);
4088
+ const n = this._data.rowCount;
4089
+ (o = this._vs) == null || o.setTotalRows(n), (l = this._pagination) == null || l.setTotalRows(n), this._doRender(...this._visRange()), this.emit("dataChange", this._data.getData()), (a = (r = this._options).onDataChange) == null || a.call(r, this._data.getData()), s.result = { rowCount: n, item: e }, this._trigMgr.exec("after:insertRow", s);
4065
4090
  }
4066
4091
  pushRow(e) {
4067
- var n, i, o, l;
4092
+ var i, n, o, l;
4068
4093
  (Array.isArray(e) ? e : [e]).forEach((r) => this._data.addRow(r, "last"));
4069
4094
  const s = this._data.rowCount;
4070
- (n = this._vs) == null || n.setTotalRows(s), (i = this._pagination) == null || i.setTotalRows(s), this._doRender(...this._visRange()), this.emit("dataChange", this._data.getData()), (l = (o = this._options).onDataChange) == null || l.call(o, this._data.getData());
4095
+ (i = this._vs) == null || i.setTotalRows(s), (n = this._pagination) == null || n.setTotalRows(s), this._doRender(...this._visRange()), this.emit("dataChange", this._data.getData()), (l = (o = this._options).onDataChange) == null || l.call(o, this._data.getData());
4071
4096
  }
4072
4097
  /** @deprecated 하위호환 alias → pushRow */
4073
4098
  appendRows(e) {
4074
4099
  this.pushRow(e);
4075
4100
  }
4076
4101
  unshiftRow(e) {
4077
- var n, i, o, l;
4102
+ var i, n, o, l;
4078
4103
  (Array.isArray(e) ? e : [e]).forEach((r) => this._data.addRow(r, "first"));
4079
4104
  const s = this._data.rowCount;
4080
- (n = this._vs) == null || n.setTotalRows(s), (i = this._pagination) == null || i.setTotalRows(s), this._doRender(...this._visRange()), this.emit("dataChange", this._data.getData()), (l = (o = this._options).onDataChange) == null || l.call(o, this._data.getData());
4105
+ (i = this._vs) == null || i.setTotalRows(s), (n = this._pagination) == null || n.setTotalRows(s), this._doRender(...this._visRange()), this.emit("dataChange", this._data.getData()), (l = (o = this._options).onDataChange) == null || l.call(o, this._data.getData());
4081
4106
  }
4082
4107
  /** @deprecated 하위호환 alias → unshiftRow */
4083
4108
  prependRows(e) {
@@ -4087,10 +4112,10 @@ class Xt extends qe {
4087
4112
  var o, l, r, a;
4088
4113
  const t = this._trigMgr.mkCtx("deleteRow", [e]), s = Array.isArray(e) ? [...e] : [e];
4089
4114
  if (t.extra = { rows: s.map((c) => this._data.getRowByIndex(c)) }, !this._trigMgr.exec("before:deleteRow", t)) return;
4090
- const n = s.sort((c, h) => h - c);
4091
- n.forEach((c) => this._data.removeRow(c));
4092
- const i = this._data.rowCount;
4093
- (o = this._vs) == null || o.setTotalRows(i), (l = this._pagination) == null || l.setTotalRows(i), this._doRender(...this._visRange()), this.emit("dataChange", this._data.getData()), (a = (r = this._options).onDataChange) == null || a.call(r, this._data.getData()), t.result = { deleted: n.length, rowCount: i }, this._trigMgr.exec("after:deleteRow", t);
4115
+ const i = s.sort((c, h) => h - c);
4116
+ i.forEach((c) => this._data.removeRow(c));
4117
+ const n = this._data.rowCount;
4118
+ (o = this._vs) == null || o.setTotalRows(n), (l = this._pagination) == null || l.setTotalRows(n), this._doRender(...this._visRange()), this.emit("dataChange", this._data.getData()), (a = (r = this._options).onDataChange) == null || a.call(r, this._data.getData()), t.result = { deleted: i.length, rowCount: n }, this._trigMgr.exec("after:deleteRow", t);
4094
4119
  }
4095
4120
  deleteById(e) {
4096
4121
  }
@@ -4103,11 +4128,11 @@ class Xt extends qe {
4103
4128
  }
4104
4129
  writeCell(e, t, s) {
4105
4130
  var c, h, u, g;
4106
- const n = this.readCell(e, t), i = this._trigMgr.mkCtx("writeCell", [e, t, s]);
4107
- if (i.extra = { oldValue: n, rowIndex: e, field: t }, !this._trigMgr.exec("before:writeCell", i)) return;
4131
+ const i = this.readCell(e, t), n = this._trigMgr.mkCtx("writeCell", [e, t, s]);
4132
+ if (n.extra = { oldValue: i, rowIndex: e, field: t }, !this._trigMgr.exec("before:writeCell", n)) return;
4108
4133
  this._data.updateCell(e, t, s);
4109
- const o = this._data.getRowByIndex(e), l = this._colLayout.getColumnByField(t), r = this._colLayout.getColumnIndex(t), a = { type: "editEnd", rowIndex: e, columnIndex: r, field: t, oldValue: n, newValue: s, row: o, column: l };
4110
- this.emit("editEnd", a), (h = (c = this._options).onEditEnd) == null || h.call(c, a), this.emit("dataChange", this._data.getData()), (g = (u = this._options).onDataChange) == null || g.call(u, this._data.getData()), this._doRender(...this._visRange()), i.result = { rowIndex: e, field: t, oldValue: n, newValue: s }, this._trigMgr.exec("after:writeCell", i);
4134
+ const o = this._data.getRowByIndex(e), l = this._colLayout.getColumnByField(t), r = this._colLayout.getColumnIndex(t), a = { type: "editEnd", rowIndex: e, columnIndex: r, field: t, oldValue: i, newValue: s, row: o, column: l };
4135
+ this.emit("editEnd", a), (h = (c = this._options).onEditEnd) == null || h.call(c, a), this.emit("dataChange", this._data.getData()), (g = (u = this._options).onDataChange) == null || g.call(u, this._data.getData()), this._doRender(...this._visRange()), n.result = { rowIndex: e, field: t, oldValue: i, newValue: s }, this._trigMgr.exec("after:writeCell", n);
4111
4136
  }
4112
4137
  getRowAt(e) {
4113
4138
  return this._data.getRowByIndex(e);
@@ -4166,8 +4191,8 @@ class Xt extends qe {
4166
4191
  var o, l;
4167
4192
  const s = this._colLayout.visibleLeaves.map((r) => r);
4168
4193
  if (e < 0 || t < 0 || e >= s.length || t >= s.length) return;
4169
- const n = [...this._options.columns], [i] = n.splice(e, 1);
4170
- n.splice(t, 0, i), this._options.columns = n, this.applyColumns(n), (l = (o = this._options).onColumnReorder) == null || l.call(o, { fromIndex: e, toIndex: t, field: i.field ?? "" });
4194
+ const i = [...this._options.columns], [n] = i.splice(e, 1);
4195
+ i.splice(t, 0, n), this._options.columns = i, this.applyColumns(i), (l = (o = this._options).onColumnReorder) == null || l.call(o, { fromIndex: e, toIndex: t, field: n.field ?? "" });
4171
4196
  }
4172
4197
  hideColumn(e) {
4173
4198
  this._colLayout.hideColumn(e), this._recalcWidths(this._container.getBoundingClientRect().width), this._renderHeader(), this._doRender(...this._visRange());
@@ -4256,12 +4281,12 @@ class Xt extends qe {
4256
4281
  /** 자동 병합: 지정 필드 컬럼에서 연속 같은 값을 rowSpan으로 묶는다 */
4257
4282
  /** ?먮룞 蹂묓빀: 吏€??field 而щ읆?먯꽌 ?곗냽 媛숈? 媛믪쓣 rowSpan */
4258
4283
  autoMerge(e) {
4259
- const t = this._colLayout.visibleLeaves, s = [], n = [];
4260
- for (const i of e) {
4261
- const o = t.findIndex((l) => l.field === i);
4262
- o >= 0 && (s.push(o), n.push(i));
4284
+ const t = this._colLayout.visibleLeaves, s = [], i = [];
4285
+ for (const n of e) {
4286
+ const o = t.findIndex((l) => l.field === n);
4287
+ o >= 0 && (s.push(o), i.push(n));
4263
4288
  }
4264
- this._mergeEngine.applyAutoMerge(this._data.getData(), s, n), this._doRender(...this._visRange());
4289
+ this._mergeEngine.applyAutoMerge(this._data.getData(), s, i), this._doRender(...this._visRange());
4265
4290
  }
4266
4291
  /** 蹂묓빀 ?댁젣 */
4267
4292
  clearMerge() {
@@ -4315,7 +4340,7 @@ class Xt extends qe {
4315
4340
  const t = this._data.getData();
4316
4341
  if (e) return t;
4317
4342
  const s = this._colLayout.visibleLeaves;
4318
- return t.map((n) => s.map((i) => n[i.field]));
4343
+ return t.map((i) => s.map((n) => i[n.field]));
4319
4344
  }
4320
4345
  jumpToRow(e) {
4321
4346
  var t;
@@ -4365,12 +4390,12 @@ class Xt extends qe {
4365
4390
  return this._trigMgr.exec(e, t);
4366
4391
  }
4367
4392
  destroy() {
4368
- var e, t, s, n, i, o, l, r;
4369
- this._destroyed || (this._destroyed = !0, this._trigMgr.clear(), (e = this._ro) == null || e.disconnect(), (t = this._vs) == null || t.destroy(), (s = this._filterPanel) == null || s.destroy(), (n = this._dnd) == null || n.destroy(), this._cmHandler && this._container.removeEventListener("contextmenu", this._cmHandler), this._cmKbdHandler && this._container.removeEventListener("keydown", this._cmKbdHandler), this._cmHandler = this._cmKbdHandler = null, (i = this._ctxMenu) == null || i.destroy(), (o = this._wsManager) == null || o.destroy(), (l = this._renderer) == null || l.destroy(), (r = this._liveRegion) == null || r.remove(), this._liveRegion = null, this._container.innerHTML = "", this._container.classList.remove("og-container"), this.removeAllListeners());
4393
+ var e, t, s, i, n, o, l, r;
4394
+ this._destroyed || (this._destroyed = !0, this._trigMgr.clear(), (e = this._ro) == null || e.disconnect(), (t = this._vs) == null || t.destroy(), (s = this._filterPanel) == null || s.destroy(), (i = this._dnd) == null || i.destroy(), this._cmHandler && this._container.removeEventListener("contextmenu", this._cmHandler), this._cmKbdHandler && this._container.removeEventListener("keydown", this._cmKbdHandler), this._cmHandler = this._cmKbdHandler = null, (n = this._ctxMenu) == null || n.destroy(), (o = this._wsManager) == null || o.destroy(), (l = this._renderer) == null || l.destroy(), (r = this._liveRegion) == null || r.remove(), this._liveRegion = null, this._container.innerHTML = "", this._container.classList.remove("og-container"), this.removeAllListeners());
4370
4395
  }
4371
4396
  }
4372
4397
  export {
4373
4398
  Xt as O,
4374
4399
  He as b
4375
4400
  };
4376
- //# sourceMappingURL=OpenGrid-CfZy3e7Q.js.map
4401
+ //# sourceMappingURL=OpenGrid-Dult64jp.js.map