PageSourceSearch

https://webapp.wisestamp.com/assets-ws1/1790235839988/account-settings/account-settings-mfe.js

js wisestamp.com collected 2026-09-24 08:50:02 UTC 1,289,439 bytes, 34,724 lines download raw bytes

1import { WsDialogSection as Oa, WsDialogActions as Ga, WsButton as vt, openDialog as Ha, WsDialogForm as Gc, WsInput as fr, WsSelect as mr, WsSelectOption as ao, WsBadge as Ba, WsToggle as Hc, prompt as xn, PromptResult as Pn, toast as Ct, ToastStatus as ti, WsIconButton as Bc, WsMenu as Nc, WsMenuItem as lo, useQuasarPlugin as Vc } from "@mfl/common-components";
2import { bootstrapMicrofrontend as Wc } from "@mfl/vue-common";
3import { shallowRef as zc, unref as O, shallowReactive as _c, defineComponent as Le, reactive as En, inject as ui, computed as Ae, h as Na, provide as co, ref as j, watch as Ds, nextTick as Uc, useTemplateRef as $c, toRefs as Kc, useModel as jc, onMounted as yi, getCurrentInstance as uo, markRaw as qc, onUnmounted as Dn, openBlock as X, createElementBlock as $e, mergeModels as Cr, mergeDefaults as Yc, isRef as Qc, isReactive as Zc, isProxy as Xc, toRaw as Jc, createVNode as oe, render as vr, createBlock as xe, normalizeProps as Va, guardReactiveProps as Wa, withCtx as ne, createTextVNode as je, toDisplayString as le, createElementVNode as pe, createCommentVNode as it, Fragment as wr, renderList as Sr, onBeforeMount as eu } from "vue";
4import { getAccountBasicInfo as tu, currentUser as St, reportUserAnalyticEvent as za, trackEvent as _a, PURCHASE_PLANS_URL as Ua, EntitelmentTypes as An, auth4Sdks as Tn } from "@mfl/platform-shell";
5import { navigateTo as $a } from "@mfl/framework";
6import { openScheduleDemoModal as iu } from "@mfl/schedule-demo-modal";
7import { headerComponents as su, showLogo as br } from "@mfe/core-header";
8import { navigationBarMode as ho, NavigationBarMode as ou, navigationItemsOverride as nu } from "@mfe/core-navigation";
9const Qt = typeof document < "u";
10function Ka(e) {
11  return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
12}
13function ru(e) {
14  return e.__esModule || e[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
15  // add the Module string tag
16  e.default && Ka(e.default);
17}
18const $ = Object.assign;
19function go(e, t) {
20  const i = {};
21  for (const s in t) {
22    const o = t[s];
23    i[s] = Be(o) ? o.map(e) : e(o);
24  }
25  return i;
26}
27const Gi = () => {
28}, Be = Array.isArray, ja = /#/g, au = /&/g, lu = /\//g, du = /=/g, cu = /\?/g, qa = /\+/g, uu = /%5B/g, hu = /%5D/g, Ya = /%5E/g, gu = /%60/g, Qa = /%7B/g, pu = /%7C/g, Za = /%7D/g, fu = /%20/g;
29function Mn(e) {
30  return encodeURI("" + e).replace(pu, "|").replace(uu, "[").replace(hu, "]");
31}
32function mu(e) {
33  return Mn(e).replace(Qa, "{").replace(Za, "}").replace(Ya, "^");
34}
35function _o(e) {
36  return Mn(e).replace(qa, "%2B").replace(fu, "+").replace(ja, "%23").replace(au, "%26").replace(gu, "`").replace(Qa, "{").replace(Za, "}").replace(Ya, "^");
37}
38function Cu(e) {
39  return _o(e).replace(du, "%3D");
40}
41function vu(e) {
42  return Mn(e).replace(ja, "%23").replace(cu, "%3F");
43}
44function wu(e) {
45  return e == null ? "" : vu(e).replace(lu, "%2F");
46}
47function Ki(e) {
48  try {
49    return decodeURIComponent("" + e);
50  } catch {
51  }
52  return "" + e;
53}
54const Su = /\/$/, bu = (e) => e.replace(Su, "");
55function po(e, t, i = "/") {
56  let s, o = {}, n = "", r = "";
57  const a = t.indexOf("#");
58  let l = t.indexOf("?");
59  return a < l && a >= 0 && (l = -1), l > -1 && (s = t.slice(0, l), n = t.slice(l + 1, a > -1 ? a : t.length), o = e(n)), a > -1 && (s = s || t.slice(0, a), r = t.slice(a, t.length)), s = xu(s ?? t, i), {
60    fullPath: s + (n && "?") + n + r,
61    path: s,
62    query: o,
63    hash: Ki(r)
64  };
65}
66function yu(e, t) {
67  const i = t.query ? e(t.query) : "";
68  return t.path + (i && "?") + i + (t.hash || "");
69}
70function yr(e, t) {
71  return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
72}
73function Ru(e, t, i) {
74  const s = t.matched.length - 1, o = i.matched.length - 1;
75  return s > -1 && s === o && hi(t.matched[s], i.matched[o]) && Xa(t.params, i.params) && e(t.query) === e(i.query) && t.hash === i.hash;
76}
77function hi(e, t) {
78  return (e.aliasOf || e) === (t.aliasOf || t);
79}
80function Xa(e, t) {
81  if (Object.keys(e).length !== Object.keys(t).length)
82    return !1;
83  for (const i in e)
84    if (!Fu(e[i], t[i]))
85      return !1;
86  return !0;
87}
88function Fu(e, t) {
89  return Be(e) ? Rr(e, t) : Be(t) ? Rr(t, e) : e === t;
90}
91function Rr(e, t) {
92  return Be(t) ? e.length === t.length && e.every((i, s) => i === t[s]) : e.length === 1 && e[0] === t;
93}
94function xu(e, t) {
95  if (e.startsWith("/"))
96    return e;
97  if (!e)
98    return t;
99  const i = t.split("/"), s = e.split("/"), o = s[s.length - 1];
100  (o === ".." || o === ".") && s.push("");
101  let n = i.length - 1, r, a;
102  for (r = 0; r < s.length; r++)
103    if (a = s[r], a !== ".")
104      if (a === "..")
105        n > 1 && n--;
106      else
107        break;
108  return i.slice(0, n).join("/") + "/" + s.slice(r).join("/");
109}
110const ut = {
111  path: "/",
112  // TODO: could we use a symbol in the future?
113  name: void 0,
114  params: {},
115  query: {},
116  hash: "",
117  fullPath: "/",
118  matched: [],
119  meta: {},
120  redirectedFrom: void 0
121};
122var ji;
123(function(e) {
124  e.pop = "pop", e.push = "push";
125})(ji || (ji = {}));
126var Hi;
127(function(e) {
128  e.back = "back", e.forward = "forward", e.unknown = "";
129})(Hi || (Hi = {}));
130function Pu(e) {
131  if (!e)
132    if (Qt) {
133      const t = document.querySelector("base");
134      e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, "");
135    } else
136      e = "/";
137  return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), bu(e);
138}
139const Eu = /^[^#]+#/;
140function Du(e, t) {
141  return e.replace(Eu, "#") + t;
142}
143function Au(e, t) {
144  const i = document.documentElement.getBoundingClientRect(), s = e.getBoundingClientRect();
145  return {
146    behavior: t.behavior,
147    left: s.left - i.left - (t.left || 0),
148    top: s.top - i.top - (t.top || 0)
149  };
150}
151const Qs = () => ({
152  left: window.scrollX,
153  top: window.scrollY
154});
155function Tu(e) {
156  let t;
157  if ("el" in e) {
158    const i = e.el, s = typeof i == "string" && i.startsWith("#"), o = typeof i == "string" ? s ? document.getElementById(i.slice(1)) : document.querySelector(i) : i;
159    if (!o)
160      return;
161    t = Au(o, e);
162  } else
163    t = e;
164  "scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.scrollX, t.top != null ? t.top : window.scrollY);
165}
166function Fr(e, t) {
167  return (history.state ? history.state.position - t : -1) + e;
168}
169const Uo = /* @__PURE__ */ new Map();
170function Mu(e, t) {
171  Uo.set(e, t);
172}
173function Iu(e) {
174  const t = Uo.get(e);
175  return Uo.delete(e), t;
176}
177let ku = () => location.protocol + "//" + location.host;
178function Ja(e, t) {
179  const { pathname: i, search: s, hash: o } = t, n = e.indexOf("#");
180  if (n > -1) {
181    let a = o.includes(e.slice(n)) ? e.slice(n).length : 1, l = o.slice(a);
182    return l[0] !== "/" && (l = "/" + l), yr(l, "");
183  }
184  return yr(i, e) + s + o;
185}
186function Lu(e, t, i, s) {
187  let o = [], n = [], r = null;
188  const a = ({ state: h }) => {
189    const g = Ja(e, location), p = i.value, f = t.value;
190    let m = 0;
191    if (h) {
192      if (i.value = g, t.value = h, r && r === p) {
193        r = null;
194        return;
195      }
196      m = f ? h.position - f.position : 0;
197    } else
198      s(g);
199    o.forEach((C) => {
200      C(i.value, p, {
201        delta: m,
202        type: ji.pop,
203        direction: m ? m > 0 ? Hi.forward : Hi.back : Hi.unknown
204      });
205    });
206  };
207  function l() {
208    r = i.value;
209  }
210  function d(h) {
211    o.push(h);
212    const g = () => {
213      const p = o.indexOf(h);
214      p > -1 && o.splice(p, 1);
215    };
216    return n.push(g), g;
217  }
218  function c() {
219    const { history: h } = window;
220    h.state && h.replaceState($({}, h.state, { scroll: Qs() }), "");
221  }
222  function u() {
223    for (const h of n)
224      h();
225    n = [], window.removeEventListener("popstate", a), window.removeEventListener("beforeunload", c);
226  }
227  return window.addEventListener("popstate", a), window.addEventListener("beforeunload", c, {
228    passive: !0
229  }), {
230    pauseListeners: l,
231    listen: d,
232    destroy: u
233  };
234}
235function xr(e, t, i, s = !1, o = !1) {
236  return {
237    back: e,
238    current: t,
239    forward: i,
240    replaced: s,
241    position: window.history.length,
242    scroll: o ? Qs() : null
243  };
244}
245function Ou(e) {
246  const { history: t, location: i } = window, s = {
247    value: Ja(e, i)
248  }, o = { value: t.state };
249  o.value || n(s.value, {
250    back: null,
251    current: s.value,
252    forward: null,
253    // the length is off by one, we need to decrease it
254    position: t.length - 1,
255    replaced: !0,
256    // don't add a scroll as the user may have an anchor, and we want
257    // scrollBehavior to be triggered without a saved position
258    scroll: null
259  }, !0);
260  function n(l, d, c) {
261    const u = e.indexOf("#"), h = u > -1 ? (i.host && document.querySelector("base") ? e : e.slice(u)) + l : ku() + e + l;
262    try {
263      t[c ? "replaceState" : "pushState"](d, "", h), o.value = d;
264    } catch (g) {
265      console.error(g), i[c ? "replace" : "assign"](h);
266    }
267  }
268  function r(l, d) {
269    const c = $({}, t.state, xr(
270      o.value.back,
271      // keep back and forward entries but override current position
272      l,
273      o.value.forward,
274      !0
275    ), d, { position: o.value.position });
276    n(l, c, !0), s.value = l;
277  }
278  function a(l, d) {
279    const c = $(
280      {},
281      // use current history state to gracefully handle a wrong call to
282      // history.replaceState
283      // https://github.com/vuejs/router/issues/366
284      o.value,
285      t.state,
286      {
287        forward: l,
288        scroll: Qs()
289      }
290    );
291    n(c.current, c, !0);
292    const u = $({}, xr(s.value, l, null), { position: c.position + 1 }, d);
293    n(l, u, !1), s.value = l;
294  }
295  return {
296    location: s,
297    state: o,
298    push: a,
299    replace: r
300  };
301}
302function Gu(e) {
303  e = Pu(e);
304  const t = Ou(e), i = Lu(e, t.state, t.location, t.replace);
305  function s(n, r = !0) {
306    r || i.pauseListeners(), history.go(n);
307  }
308  const o = $({
309    // it's overridden right after
310    location: "",
311    base: e,
312    go: s,
313    createHref: Du.bind(null, e)
314  }, t, i);
315  return Object.defineProperty(o, "location", {
316    enumerable: !0,
317    get: () => t.location.value
318  }), Object.defineProperty(o, "state", {
319    enumerable: !0,
320    get: () => t.state.value
321  }), o;
322}
323function Hu(e) {
324  return typeof e == "string" || e && typeof e == "object";
325}
326function el(e) {
327  return typeof e == "string" || typeof e == "symbol";
328}
329const tl = /* @__PURE__ */ Symbol("");
330var Pr;
331(function(e) {
332  e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
333})(Pr || (Pr = {}));
334function gi(e, t) {
335  return $(new Error(), {
336    type: e,
337    [tl]: !0
338  }, t);
339}
340function et(e, t) {
341  return e instanceof Error && tl in e && (t == null || !!(e.type & t));
342}
343const Er = "[^/]+?", Bu = {
344  sensitive: !1,
345  strict: !1,
346  start: !0,
347  end: !0
348}, Nu = /[.+*?^${}()[\]/\\]/g;
349function Vu(e, t) {
350  const i = $({}, Bu, t), s = [];
351  let o = i.start ? "^" : "";
352  const n = [];
353  for (const d of e) {
354    const c = d.length ? [] : [
355      90
356      /* PathScore.Root */
357    ];
358    i.strict && !d.length && (o += "/");
359    for (let u = 0; u < d.length; u++) {
360      const h = d[u];
361      let g = 40 + (i.sensitive ? 0.25 : 0);
362      if (h.type === 0)
363        u || (o += "/"), o += h.value.replace(Nu, "\\$&"), g += 40;
364      else if (h.type === 1) {
365        const { value: p, repeatable: f, optional: m, regexp: C } = h;
366        n.push({
367          name: p,
368          repeatable: f,
369          optional: m
370        });
371        const w = C || Er;
372        if (w !== Er) {
373          g += 10;
374          try {
375            new RegExp(`(${w})`);
376          } catch (v) {
377            throw new Error(`Invalid custom RegExp for param "${p}" (${w}): ` + v.message);
378          }
379        }
380        let S = f ? `((?:${w})(?:/(?:${w}))*)` : `(${w})`;
381        u || (S = // avoid an optional / if there are more segments e.g. /:p?-static
382        // or /:p?-:p2
383        m && d.length < 2 ? `(?:/${S})` : "/" + S), m && (S += "?"), o += S, g += 20, m && (g += -8), f && (g += -20), w === ".*" && (g += -50);
384      }
385      c.push(g);
386    }
387    s.push(c);
388  }
389  if (i.strict && i.end) {
390    const d = s.length - 1;
391    s[d][s[d].length - 1] += 0.7000000000000001;
392  }
393  i.strict || (o += "/?"), i.end ? o += "$" : i.strict && !o.endsWith("/") && (o += "(?:/|$)");
394  const r = new RegExp(o, i.sensitive ? "" : "i");
395  function a(d) {
396    const c = d.match(r), u = {};
397    if (!c)
398      return null;
399    for (let h = 1; h < c.length; h++) {
400      const g = c[h] || "", p = n[h - 1];
401      u[p.name] = g && p.repeatable ? g.split("/") : g;
402    }
403    return u;
404  }
405  function l(d) {
406    let c = "", u = !1;
407    for (const h of e) {
408      (!u || !c.endsWith("/")) && (c += "/"), u = !1;
409      for (const g of h)
410        if (g.type === 0)
411          c += g.value;
412        else if (g.type === 1) {
413          const { value: p, repeatable: f, optional: m } = g, C = p in d ? d[p] : "";
414          if (Be(C) && !f)
415            throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);
416          const w = Be(C) ? C.join("/") : C;
417          if (!w)
418            if (m)
419              h.length < 2 && (c.endsWith("/") ? c = c.slice(0, -1) : u = !0);
420            else
421              throw new Error(`Missing required param "${p}"`);
422          c += w;
423        }
424    }
425    return c || "/";
426  }
427  return {
428    re: r,
429    score: s,
430    keys: n,
431    parse: a,
432    stringify: l
433  };
434}
435function Wu(e, t) {
436  let i = 0;
437  for (; i < e.length && i < t.length; ) {
438    const s = t[i] - e[i];
439    if (s)
440      return s;
441    i++;
442  }
443  return e.length < t.length ? e.length === 1 && e[0] === 80 ? -1 : 1 : e.length > t.length ? t.length === 1 && t[0] === 80 ? 1 : -1 : 0;
444}
445function il(e, t) {
446  let i = 0;
447  const s = e.score, o = t.score;
448  for (; i < s.length && i < o.length; ) {
449    const n = Wu(s[i], o[i]);
450    if (n)
451      return n;
452    i++;
453  }
454  if (Math.abs(o.length - s.length) === 1) {
455    if (Dr(s))
456      return 1;
457    if (Dr(o))
458      return -1;
459  }
460  return o.length - s.length;
461}
462function Dr(e) {
463  const t = e[e.length - 1];
464  return e.length > 0 && t[t.length - 1] < 0;
465}
466const zu = {
467  type: 0,
468  value: ""
469}, _u = /[a-zA-Z0-9_]/;
470function Uu(e) {
471  if (!e)
472    return [[]];
473  if (e === "/")
474    return [[zu]];
475  if (!e.startsWith("/"))
476    throw new Error(`Invalid path "${e}"`);
477  function t(g) {
478    throw new Error(`ERR (${i})/"${d}": ${g}`);
479  }
480  let i = 0, s = i;
481  const o = [];
482  let n;
483  function r() {
484    n && o.push(n), n = [];
485  }
486  let a = 0, l, d = "", c = "";
487  function u() {
488    d && (i === 0 ? n.push({
489      type: 0,
490      value: d
491    }) : i === 1 || i === 2 || i === 3 ? (n.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`), n.push({
492      type: 1,
493      value: d,
494      regexp: c,
495      repeatable: l === "*" || l === "+",
496      optional: l === "*" || l === "?"
497    })) : t("Invalid state to consume buffer"), d = "");
498  }
499  function h() {
500    d += l;
501  }
502  for (; a < e.length; ) {
503    if (l = e[a++], l === "\\" && i !== 2) {
504      s = i, i = 4;
505      continue;
506    }
507    switch (i) {
508      case 0:
509        l === "/" ? (d && u(), r()) : l === ":" ? (u(), i = 1) : h();
510        break;
511      case 4:
512        h(), i = s;
513        break;
514      case 1:
515        l === "(" ? i = 2 : _u.test(l) ? h() : (u(), i = 0, l !== "*" && l !== "?" && l !== "+" && a--);
516        break;
517      case 2:
518        l === ")" ? c[c.length - 1] == "\\" ? c = c.slice(0, -1) + l : i = 3 : c += l;
519        break;
520      case 3:
521        u(), i = 0, l !== "*" && l !== "?" && l !== "+" && a--, c = "";
522        break;
523      default:
524        t("Unknown state");
525        break;
526    }
527  }
528  return i === 2 && t(`Unfinished custom RegExp for param "${d}"`), u(), r(), o;
529}
530function $u(e, t, i) {
531  const s = Vu(Uu(e.path), i), o = $(s, {
532    record: e,
533    parent: t,
534    // these needs to be populated by the parent
535    children: [],
536    alias: []
537  });
538  return t && !o.record.aliasOf == !t.record.aliasOf && t.children.push(o), o;
539}
540function Ku(e, t) {
541  const i = [], s = /* @__PURE__ */ new Map();
542  t = Ir({ strict: !1, end: !0, sensitive: !1 }, t);
543  function o(u) {
544    return s.get(u);
545  }
546  function n(u, h, g) {
547    const p = !g, f = Tr(u);
548    f.aliasOf = g && g.record;
549    const m = Ir(t, u), C = [f];
550    if ("alias" in u) {
551      const v = typeof u.alias == "string" ? [u.alias] : u.alias;
552      for (const P of v)
553        C.push(
554          // we need to normalize again to ensure the `mods` property
555          // being non enumerable
556          Tr($({}, f, {
557            // this allows us to hold a copy of the `components` option
558            // so that async components cache is hold on the original record
559            components: g ? g.record.components : f.components,
560            path: P,
561            // we might be the child of an alias
562            aliasOf: g ? g.record : f
563            // the aliases are always of the same kind as the original since they
564            // are defined on the same record
565          }))
566        );
567    }
568    let w, S;
569    for (const v of C) {
570      const { path: P } = v;
571      if (h && P[0] !== "/") {
572        const T = h.record.path, D = T[T.length - 1] === "/" ? "" : "/";
573        v.path = h.record.path + (P && D + P);
574      }
575      if (w = $u(v, h, m), g ? g.alias.push(w) : (S = S || w, S !== w && S.alias.push(w), p && u.name && !Mr(w) && r(u.name)), sl(w) && l(w), f.children) {
576        const T = f.children;
577        for (let D = 0; D < T.length; D++)
578          n(T[D], w, g && g.children[D]);
579      }
580      g = g || w;
581    }
582    return S ? () => {
583      r(S);
584    } : Gi;
585  }
586  function r(u) {
587    if (el(u)) {
588      const h = s.get(u);
589      h && (s.delete(u), i.splice(i.indexOf(h), 1), h.children.forEach(r), h.alias.forEach(r));
590    } else {
591      const h = i.indexOf(u);
592      h > -1 && (i.splice(h, 1), u.record.name && s.delete(u.record.name), u.children.forEach(r), u.alias.forEach(r));
593    }
594  }
595  function a() {
596    return i;
597  }
598  function l(u) {
599    const h = Yu(u, i);
600    i.splice(h, 0, u), u.record.name && !Mr(u) && s.set(u.record.name, u);
601  }
602  function d(u, h) {
603    let g, p = {}, f, m;
604    if ("name" in u && u.name) {
605      if (g = s.get(u.name), !g)
606        throw gi(1, {
607          location: u
608        });
609      m = g.record.name, p = $(
610        // paramsFromLocation is a new object
611        Ar(
612          h.params,
613          // only keep params that exist in the resolved location
614          // only keep optional params coming from a parent record
615          g.keys.filter((S) => !S.optional).concat(g.parent ? g.parent.keys.filter((S) => S.optional) : []).map((S) => S.name)
616        ),
617        // discard any existing params in the current location that do not exist here
618        // #1497 this ensures better active/exact matching
619        u.params && Ar(u.params, g.keys.map((S) => S.name))
620      ), f = g.stringify(p);
621    } else if (u.path != null)
622      f = u.path, g = i.find((S) => S.re.test(f)), g && (p = g.parse(f), m = g.record.name);
623    else {
624      if (g = h.name ? s.get(h.name) : i.find((S) => S.re.test(h.path)), !g)
625        throw gi(1, {
626          location: u,
627          currentLocation: h
628        });
629      m = g.record.name, p = $({}, h.params, u.params), f = g.stringify(p);
630    }
631    const C = [];
632    let w = g;
633    for (; w; )
634      C.unshift(w.record), w = w.parent;
635    return {
636      name: m,
637      path: f,
638      params: p,
639      matched: C,
640      meta: qu(C)
641    };
642  }
643  e.forEach((u) => n(u));
644  function c() {
645    i.length = 0, s.clear();
646  }
647  return {
648    addRoute: n,
649    resolve: d,
650    removeRoute: r,
651    clearRoutes: c,
652    getRoutes: a,
653    getRecordMatcher: o
654  };
655}
656function Ar(e, t) {
657  const i = {};
658  for (const s of t)
659    s in e && (i[s] = e[s]);
660  return i;
661}
662function Tr(e) {
663  const t = {
664    path: e.path,
665    redirect: e.redirect,
666    name: e.name,
667    meta: e.meta || {},
668    aliasOf: e.aliasOf,
669    beforeEnter: e.beforeEnter,
670    props: ju(e),
671    children: e.children || [],
672    instances: {},
673    leaveGuards: /* @__PURE__ */ new Set(),
674    updateGuards: /* @__PURE__ */ new Set(),
675    enterCallbacks: {},
676    // must be declared afterwards
677    // mods: {},
678    components: "components" in e ? e.components || null : e.component && { default: e.component }
679  };
680  return Object.defineProperty(t, "mods", {
681    value: {}
682  }), t;
683}
684function ju(e) {
685  const t = {}, i = e.props || !1;
686  if ("component" in e)
687    t.default = i;
688  else
689    for (const s in e.components)
690      t[s] = typeof i == "object" ? i[s] : i;
691  return t;
692}
693function Mr(e) {
694  for (; e; ) {
695    if (e.record.aliasOf)
696      return !0;
697    e = e.parent;
698  }
699  return !1;
700}
701function qu(e) {
702  return e.reduce((t, i) => $(t, i.meta), {});
703}
704function Ir(e, t) {
705  const i = {};
706  for (const s in e)
707    i[s] = s in t ? t[s] : e[s];
708  return i;
709}
710function Yu(e, t) {
711  let i = 0, s = t.length;
712  for (; i !== s; ) {
713    const n = i + s >> 1;
714    il(e, t[n]) < 0 ? s = n : i = n + 1;
715  }
716  const o = Qu(e);
717  return o && (s = t.lastIndexOf(o, s - 1)), s;
718}
719function Qu(e) {
720  let t = e;
721  for (; t = t.parent; )
722    if (sl(t) && il(e, t) === 0)
723      return t;
724}
725function sl({ record: e }) {
726  return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
727}
728function Zu(e) {
729  const t = {};
730  if (e === "" || e === "?")
731    return t;
732  const s = (e[0] === "?" ? e.slice(1) : e).split("&");
733  for (let o = 0; o < s.length; ++o) {
734    const n = s[o].replace(qa, " "), r = n.indexOf("="), a = Ki(r < 0 ? n : n.slice(0, r)), l = r < 0 ? null : Ki(n.slice(r + 1));
735    if (a in t) {
736      let d = t[a];
737      Be(d) || (d = t[a] = [d]), d.push(l);
738    } else
739      t[a] = l;
740  }
741  return t;
742}
743function kr(e) {
744  let t = "";
745  for (let i in e) {
746    const s = e[i];
747    if (i = Cu(i), s == null) {
748      s !== void 0 && (t += (t.length ? "&" : "") + i);
749      continue;
750    }
751    (Be(s) ? s.map((n) =>
751 n && _o(n)) : [s && _o(s)]).forEach((n) => {
752      n !== void 0 && (t += (t.length ? "&" : "") + i, n != null && (t += "=" + n));
753    });
754  }
755  return t;
756}
757function Xu(e) {
758  const t = {};
759  for (const i in e) {
760    const s = e[i];
761    s !== void 0 && (t[i] = Be(s) ? s.map((o) => o == null ? null : "" + o) : s == null ? s : "" + s);
762  }
763  return t;
764}
765const Ju = /* @__PURE__ */ Symbol(""), Lr = /* @__PURE__ */ Symbol(""), In = /* @__PURE__ */ Symbol(""), kn = /* @__PURE__ */ Symbol(""), $o = /* @__PURE__ */ Symbol("");
766function Di() {
767  let e = [];
768  function t(s) {
769    return e.push(s), () => {
770      const o = e.indexOf(s);
771      o > -1 && e.splice(o, 1);
772    };
773  }
774  function i() {
775    e = [];
776  }
777  return {
778    add: t,
779    list: () => e.slice(),
780    reset: i
781  };
782}
783function pt(e, t, i, s, o, n = (r) => r()) {
784  const r = s && // name is defined if record is because of the function overload
785  (s.enterCallbacks[o] = s.enterCallbacks[o] || []);
786  return () => new Promise((a, l) => {
787    const d = (h) => {
788      h === !1 ? l(gi(4, {
789        from: i,
790        to: t
791      })) : h instanceof Error ? l(h) : Hu(h) ? l(gi(2, {
792        from: t,
793        to: h
794      })) : (r && // since enterCallbackArray is truthy, both record and name also are
795      s.enterCallbacks[o] === r && typeof h == "function" && r.push(h), a());
796    }, c = n(() => e.call(s && s.instances[o], t, i, d));
797    let u = Promise.resolve(c);
798    e.length < 3 && (u = u.then(d)), u.catch((h) => l(h));
799  });
800}
801function fo(e, t, i, s, o = (n) => n()) {
802  const n = [];
803  for (const r of e)
804    for (const a in r.components) {
805      let l = r.components[a];
806      if (!(t !== "beforeRouteEnter" && !r.instances[a]))
807        if (Ka(l)) {
808          const c = (l.__vccOpts || l)[t];
809          c && n.push(pt(c, i, s, r, a, o));
810        } else {
811          let d = l();
812          n.push(() => d.then((c) => {
813            if (!c)
814              throw new Error(`Couldn't resolve component "${a}" at "${r.path}"`);
815            const u = ru(c) ? c.default : c;
816            r.mods[a] = c, r.components[a] = u;
817            const g = (u.__vccOpts || u)[t];
818            return g && pt(g, i, s, r, a, o)();
819          }));
820        }
821    }
822  return n;
823}
824function Or(e) {
825  const t = ui(In), i = ui(kn), s = Ae(() => {
826    const l = O(e.to);
827    return t.resolve(l);
828  }), o = Ae(() => {
829    const { matched: l } = s.value, { length: d } = l, c = l[d - 1], u = i.matched;
830    if (!c || !u.length)
831      return -1;
832    const h = u.findIndex(hi.bind(null, c));
833    if (h > -1)
834      return h;
835    const g = Gr(l[d - 2]);
836    return (
837      // we are dealing with nested routes
838      d > 1 && // if the parent and matched route have the same path, this link is
839      // referring to the empty child. Or we currently are on a different
840      // child of the same parent
841      Gr(c) === g && // avoid comparing the child with its parent
842      u[u.length - 1].path !== g ? u.findIndex(hi.bind(null, l[d - 2])) : h
843    );
844  }), n = Ae(() => o.value > -1 && oh(i.params, s.value.params)), r = Ae(() => o.value > -1 && o.value === i.matched.length - 1 && Xa(i.params, s.value.params));
845  function a(l = {}) {
846    if (sh(l)) {
847      const d = t[O(e.replace) ? "replace" : "push"](
848        O(e.to)
849        // avoid uncaught errors are they are logged anyway
850      ).catch(Gi);
851      return e.viewTransition && typeof document < "u" && "startViewTransition" in document && document.startViewTransition(() => d), d;
852    }
853    return Promise.resolve();
854  }
855  return {
856    route: s,
857    href: Ae(() => s.value.href),
858    isActive: n,
859    isExactActive: r,
860    navigate: a
861  };
862}
863function eh(e) {
864  return e.length === 1 ? e[0] : e;
865}
866const th = /* @__PURE__ */ Le({
867  name: "RouterLink",
868  compatConfig: { MODE: 3 },
869  props: {
870    to: {
871      type: [String, Object],
872      required: !0
873    },
874    replace: Boolean,
875    activeClass: String,
876    // inactiveClass: String,
877    exactActiveClass: String,
878    custom: Boolean,
879    ariaCurrentValue: {
880      type: String,
881      default: "page"
882    },
883    viewTransition: Boolean
884  },
885  useLink: Or,
886  setup(e, { slots: t }) {
887    const i = En(Or(e)), { options: s } = ui(In), o = Ae(() => ({
888      [Hr(e.activeClass, s.linkActiveClass, "router-link-active")]: i.isActive,
889      // [getLinkClass(
890      //   props.inactiveClass,
891      //   options.linkInactiveClass,
892      //   'router-link-inactive'
893      // )]: !link.isExactActive,
894      [Hr(e.exactActiveClass, s.linkExactActiveClass, "router-link-exact-active")]: i.isExactActive
895    }));
896    return () => {
897      const n = t.default && eh(t.default(i));
898      return e.custom ? n : Na("a", {
899        "aria-current": i.isExactActive ? e.ariaCurrentValue : null,
900        href: i.href,
901        // this would override user added attrs but Vue will still add
902        // the listener, so we end up triggering both
903        onClick: i.navigate,
904        class: o.value
905      }, n);
906    };
907  }
908}), ih = th;
909function sh(e) {
910  if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) {
911    if (e.currentTarget && e.currentTarget.getAttribute) {
912      const t = e.currentTarget.getAttribute("target");
913      if (/\b_blank\b/i.test(t))
914        return;
915    }
916    return e.preventDefault && e.preventDefault(), !0;
917  }
918}
919function oh(e, t) {
920  for (const i in t) {
921    const s = t[i], o = e[i];
922    if (typeof s == "string") {
923      if (s !== o)
924        return !1;
925    } else if (!Be(o) || o.length !== s.length || s.some((n, r) => n !== o[r]))
926      return !1;
927  }
928  return !0;
929}
930function Gr(e) {
931  return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
932}
933const Hr = (e, t, i) => e ?? t ?? i, nh = /* @__PURE__ */ Le({
934  name: "RouterView",
935  // #674 we manually inherit them
936  inheritAttrs: !1,
937  props: {
938    name: {
939      type: String,
940      default: "default"
941    },
942    route: Object
943  },
944  // Better compat for @vue/compat users
945  // https://github.com/vuejs/router/issues/1315
946  compatConfig: { MODE: 3 },
947  setup(e, { attrs: t, slots: i }) {
948    const s = ui($o), o = Ae(() => e.route || s.value), n = ui(Lr, 0), r = Ae(() => {
949      let d = O(n);
950      const { matched: c } = o.value;
951      let u;
952      for (; (u = c[d]) && !u.components; )
953        d++;
954      return d;
955    }), a = Ae(() => o.value.matched[r.value]);
956    co(Lr, Ae(() => r.value + 1)), co(Ju, a), co($o, o);
957    const l = j();
958    return Ds(() => [l.value, a.value, e.name], ([d, c, u], [h, g, p]) => {
959      c && (c.instances[u] = d, g && g !== c && d && d === h && (c.leaveGuards.size || (c.leaveGuards = g.leaveGuards), c.updateGuards.size || (c.updateGuards = g.updateGuards))), d && c && // if there is no instance but to and from are the same this might be
960      // the first visit
961      (!g || !hi(c, g) || !h) && (c.enterCallbacks[u] || []).forEac
961h((f) => f(d));
962    }, { flush: "post" }), () => {
963      const d = o.value, c = e.name, u = a.value, h = u && u.components[c];
964      if (!h)
965        return Br(i.default, { Component: h, route: d });
966      const g = u.props[c], p = g ? g === !0 ? d.params : typeof g == "function" ? g(d) : g : null, m = Na(h, $({}, p, t, {
967        onVnodeUnmounted: (C) => {
968          C.component.isUnmounted && (u.instances[c] = null);
969        },
970        ref: l
971      }));
972      return (
973        // pass the vnode to the slot as a prop.
974        // h and <component :is="..."> both accept vnodes
975        Br(i.default, { Component: m, route: d }) || m
976      );
977    };
978  }
979});
980function Br(e, t) {
981  if (!e)
982    return null;
983  const i = e(t);
984  return i.length === 1 ? i[0] : i;
985}
986const ol = nh;
987function rh(e) {
988  const t = Ku(e.routes, e), i = e.parseQuery || Zu, s = e.stringifyQuery || kr, o = e.history, n = Di(), r = Di(), a = Di(), l = zc(ut);
989  let d = ut;
990  Qt && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
991  const c = go.bind(null, (F) => "" + F), u = go.bind(null, wu), h = (
992    // @ts-expect-error: intentionally avoid the type check
993    go.bind(null, Ki)
994  );
995  function g(F, G) {
996    let L, H;
997    return el(F) ? (L = t.getRecordMatcher(F), H = G) : H = F, t.addRoute(H, L);
998  }
999  function p(F) {
1000    const G = t.getRecordMatcher(F);
1001    G && t.removeRoute(G);
1002  }
1003  function f() {
1004    return t.getRoutes().map((F) => F.record);
1005  }
1006  function m(F) {
1007    return !!t.getRecordMatcher(F);
1008  }
1009  function C(F, G) {
1010    if (G = $({}, G || l.value), typeof F == "string") {
1011      const N = po(i, F, G.path), se = t.resolve({ path: N.path }, G), Ei = o.createHref(N.fullPath);
1012      return $(N, se, {
1013        params: h(se.params),
1014        hash: Ki(N.hash),
1015        redirectedFrom: void 0,
1016        href: Ei
1017      });
1018    }
1019    let L;
1020    if (F.path != null)
1021      L = $({}, F, {
1022        path: po(i, F.path, G.path).path
1023      });
1024    else {
1025      const N = $({}, F.params);
1026      for (const se in N)
1027        N[se] == null && delete N[se];
1028      L = $({}, F, {
1029        params: u(N)
1030      }), G.params = u(G.params);
1031    }
1032    const H = t.resolve(L, G), q = F.hash || "";
1033    H.params = c(h(H.params));
1034    const ie = yu(s, $({}, F, {
1035      hash: mu(q),
1036      path: H.path
1037    })), V = o.createHref(ie);
1038    return $({
1039      fullPath: ie,
1040      // keep the hash encoded so fullPath is effectively path + encodedQuery +
1041      // hash
1042      hash: q,
1043      query: (
1044        // if the user is using a custom query lib like qs, we might have
1045        // nested objects, so we keep the query as is, meaning it can contain
1046        // numbers at `$route.query`, but at the point, the user will have to
1047        // use their own type anyway.
1048        // https://github.com/vuejs/router/issues/328#issuecomment-649481567
1049        s === kr ? Xu(F.query) : F.query || {}
1050      )
1051    }, H, {
1052      redirectedFrom: void 0,
1053      href: V
1054    });
1055  }
1056  function w(F) {
1057    return typeof F == "string" ? po(i, F, l.value.path) : $({}, F);
1058  }
1059  function S(F, G) {
1060    if (d !== F)
1061      return gi(8, {
1062        from: G,
1063        to: F
1064      });
1065  }
1066  function v(F) {
1067    return D(F);
1068  }
1069  function P(F) {
1070    return v($(w(F), { replace: !0 }));
1071  }
1072  function T(F) {
1073    const G = F.matched[F.matched.length - 1];
1074    if (G && G.redirect) {
1075      const { redirect: L } = G;
1076      let H = typeof L == "function" ? L(F) : L;
1077      return typeof H == "string" && (H = H.includes("?") || H.includes("#") ? H = w(H) : (
1078        // force empty params
1079        { path: H }
1080      ), H.params = {}), $({
1081        query: F.query,
1082        hash: F.hash,
1083        // avoid transferring params if the redirect has a path
1084        params: H.path != null ? {} : F.params
1085      }, H);
1086    }
1087  }
1088  function D(F, G) {
1089    const L = d = C(F), H = l.value, q = F.state, ie = F.force, V = F.replace === !0, N = T(L);
1090    if (N)
1091      return D(
1092        $(w(N), {
1093          state: typeof N == "object" ? $({}, q, N.state) : q,
1094          force: ie,
1095          replace: V
1096        }),
1097        // keep original redirectedFrom if it exists
1098        G || L
1099      );
1100    const se = L;
1101    se.redirectedFrom = G;
1102    let Ei;
1103    return !ie && Ru(s, H, L) && (Ei = gi(16, { to: se, from: H }), $t(
1104      H,
1105      H,
1106      // this is a push, the only way for it to be triggered from a
1107      // history.listen is with a redirect, which makes it become a push
1108      !0,
1109      // This cannot be the first navigation because the initial location
1110      // cannot be manually navigated to
1111      !1
1112    )), (Ei ? Promise.resolve(Ei) : k(se, H)).catch((we) => et(we) ? (
1113      // navigation redirects still mark the router as ready
1114      et(
1115        we,
1116        2
1117        /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
1118      ) ? we : Je(we)
1119    ) : (
1120      // reject any unknown error
1121      Ut(we, se, H)
1122    )).then((we) => {
1123      if (we) {
1124        if (et(
1125          we,
1126          2
1127          /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
1128        ))
1129          return D(
1130            // keep options
1131            $({
1132              // preserve an existing replacement but allow the redirect to override it
1133              replace: V
1134            }, w(we.to), {
1135              state: typeof we.to == "object" ? $({}, q, we.to.state) : q,
1136              force: ie
1137            }),
1138            // preserve the original redirectedFrom if any
1139            G || se
1140          );
1141      } else
1142        we = Ee(se, H, !0, V, q);
1143      return K(se, H, we), we;
1144    });
1145  }
1146  function R(F, G) {
1147    const L = S(F, G);
1148    return L ? Promise.reject(L) : Promise.resolve();
1149  }
1150  function E(F) {
1151    const G = hs.values().next().value;
1152    return G && typeof G.runWithContext == "function" ? G.runWithContext(F) : F();
1153  }
1154  function k(F, G) {
1155    let L;
1156    const [H, q, ie] = ah(F, G);
1157    L = fo(H.reverse(), "beforeRouteLeave", F, G);
1158    for (const N of H)
1159      N.leaveGuards.forEach((se) => {
1160        L.push(pt(se, F, G));
1161      });
1162    const V = R.bind(null, F, G);
1163    return L.push(V), jt(L).then(() => {
1164      L = [];
1165      for (const N of n.list())
1166        L.push(pt(N, F, G));
1167      return L.push(V), jt(L);
1168    }).then(() => {
1169      L = fo(q, "beforeRouteUpdate", F, G);
1170      for (const N of q)
1171        N.updateGuards.forEach((se) => {
1172          L.push(pt(se, F, G));
1173        });
1174      return L.push(V), jt(L);
1175    }).then(() => {
1176      L = [];
1177      for (const N of ie)
1178        if (N.beforeEnter)
1179          if (Be(N.beforeEnter))
1180            for (const se of N.beforeEnter)
1181              L.push(pt(se, F, G));
1182          else
1183            L.push(pt(N.beforeEnter, F, G));
1184      return L.push(V), jt(L);
1185    }).then(() => (F.matched.forEach((N) => N.enterCallbacks = {}), L = fo(ie, "beforeRouteEnter", F, G, E), L.push(V), jt(L))).then(() => {
1186      L = [];
1187      for (const N of r.list())
1188        L.push(pt(N, F, G));
1189      return L.push(V), jt(L);
1190    }).catch((N) => et(
1191      N,
1192      8
1193      /* ErrorTypes.NAVIGATION_CANCELLED */
1194    ) ? N : Promise.reject(N));
1195  }
1196  function K(F, G, L) {
1197    a.list().forEach((H) => E(() => H(F, G, L)));
1198  }
1199  function Ee(F, G, L, H, q) {
1200    const ie = S(F, G);
1201    if (ie)
1202      return ie;
1203    const V = G === ut, N = Qt ? history.state : {};
1204    L && (H || V ? o.replace(F.fullPath, $({
1205      scroll: V && N && N.scroll
1206    }, q)) : o.push(F.fullPath, q)), l.value = F, $t(F, G, L, V), Je();
1207  }
1208  let Fe;
1209  function ze() {
1210    Fe || (Fe = o.listen((F, G, L) => {
1211      if (!pr.listening)
1212        return;
1213      const H = C(F), q = T(H);
1214      if (q) {
1215        D($(q, { replace: !0, force: !0 }), H).catch(Gi);
1216        return;
1217      }
1218      d = H;
1219      const ie = l.value;
1220      Qt && Mu(Fr(ie.fullPath, L.delta), Qs()), k(H, ie).catch((V) => et(
1221        V,
1222        12
1223        /* ErrorTypes.NAVIGATION_CANCELLED */
1224      ) ? V : et(
1225        V,
1226        2
1227        /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
1228      ) ? (D(
1229        $(w(V.to), {
1230          force: !0
1231        }),
1232        H
1233        // avoid an uncaught rejection, let push call triggerError
1234      ).then((N) => {
1235        et(
1236          N,
1237          20
1238          /* ErrorTypes.NAVIGATION_DUPLICATED */
1239        ) && !L.delta && L.type === ji.pop && o.go(-1, !1);
1240      }).catch(Gi), Promise.reject()) : (L.delta && o.go(-L.delta, !1), Ut(V, H, ie))).then((V) => {
1241        V = V || Ee(
1242          // after navigation, all matched components are resolved
1243          H,
1244          ie,
1245          !1
1246        ), V && (L.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
1247        // entry while a different route is displayed
1248        !et(
1249          V,
1250          8
1251          /* ErrorTypes.NAVIGATION_CANCELLED */
1252        ) ? o.go(-L.delta, !1) : L.type === ji.pop && et(
1253          V,
1254          20
1255          /* ErrorTypes.NAVIGATION_DUPLICATED */
1256        ) && o.go(-1, !1)), K(H, ie, V);
1257      }).catch(Gi);
1258    }));
1259  }
1260  let re = Di(), Pt = Di(), Et;
1261  function Ut(F, G, L) {
1262    Je(F);
1263    const H = Pt.list();
1264    return H.length ? H.forEach((q) => q(F, G, L)) : console.error(F), Promise.reject(F);
1265  }
1266  function ae() {
1267    return Et && l.value !== ut ? Promise.resolve() : new Promise((F, G) => {
1268      re.add([F, G]);
1269    });
1270  }
1271  function Je(F) {
1272    return Et || (Et = !F, ze(), re.list().forEach(([G, L]) => F ? L(F) : G()), re.reset()), F;
1273  }
1274  function $t(F, G, L, H) {
1275    const { scrollBehavior: q } = e;
1276    if (!Qt || !q)
1277      return Promise.resolve();
1278    const ie = !L && Iu(Fr(F.fullPath, 0)) || (H || !L) && history.state && history.state.scroll || null;
1279    return Uc().then(() => q(F, G, ie)).then((V) => V && Tu(V)).catch((V) => Ut(V, F, G));
1280  }
1281  const _e = (F) => o.go(F);
1282  let Kt;
1283  const hs = /* @__PURE__ */ new Set(), pr = {
1284    currentRoute: l,
1285    listening: !0,
1286    addRoute: g,
1287    removeRoute: p,
1288    clearRoutes: t.clearRoutes,
1289    hasRoute: m,
1290    getRoutes: f,
1291    resolve: C,
1292    options: e,
1293    push: v,
1294    replace: P,
1295    go: _e,
1296    back: () => _e(-1),
1297    forward: () => _e(1),
1298    beforeEach: n.add,
1299    beforeResolve: r.add,
1300    afterEach: a.add,
1301    onError: Pt.add,
1302    isReady: ae,
1303    install(F) {
1304      const G = this;
1305      F.component("RouterLink", ih), F.component("RouterView", ol), F.config.globalProperties.$router = G, Object.defineProperty(F.config.globalProperties, "$route", {
1306        enumerable: !0,
1307        get: () => O(l)
1308      }), Qt && // used for the initial navigation client side to avoid pushing
1309      // multiple times when the router is used in multiple apps
1310      !Kt && l.value === ut && (Kt = !0, v(o.location).catch((q) => {
1311      }));
1312      const L = {};
1313      for (const q in ut)
1314        Object.defineProperty(L, q, {
1315          get: () => l.value[q],
1316          enumerable: !0
1317        });
1318      F.provide(In, G), F.provide(kn, _c(L)), F.provide($o, l);
1319      const H = F.unmount;
1320      hs.add(F), F.unmount = function() {
1321        hs.delete(F), hs.size < 1 && (d = ut, Fe && Fe(), Fe = null, l.value = ut, Kt = !1, Et = !1), H();
1322      };
1323    }
1324  };
1325  function jt(F) {
1326    return F.reduce((G, L) => G.then(() => E(L)), Promise.resolve());
1327  }
1328  return pr;
1329}
1330function ah(e, t) {
1331  const i = [], s = [], o = [], n = Math.max(t.matched.length, e.matched.length);
1332  for (let r = 0; r < n; r++) {
1333    const a = t.matched[r];
1334    a && (e.matched.find((d) => hi(d, a)) ? s.push(a) : i.push(a));
1335    const l = e.matched[r];
1336    l && (t.matched.find((d) => hi(d, l)) || o.push(l));
1337  }
1338  return [i, s, o];
1339}
1340function lh(e) {
1341  return ui(kn);
1342}
1343const Bt = (e, t) => {
1344  const i = e.__vccOpts || e;
1345  for (const [s, o] of t)
1346    i[s] = o;
1347  return i;
1348}, dh = {};
1349function ch(e, t) {
1350  return "profile";
1351}
1352const uh = /* @__PURE__ */ Bt(dh, [["render", ch]]), hh = "ws1/account-settings-users-gateway", gh = [
1353  "getInfo",
1354  "getUsers",
1355  "getRoles",
1356  "getOrganizations",
1357  "updateUser",
1358  "deleteUser",
1359  "invite",
1360  "revoke"
1361];
1362class ph extends Error {
1363  url;
1364  constructor(t, i) {
1365    super(t), this.url = i, this.name = "RateLimitError";
1366  }
1367}
1368async function fh(e, t, i, s) {
1369  if (t.status === 429) {
1370    let n = "Too many requests, please try again later.";
1371    if (s.includeResponseBodyInMessage)
1372      try {
1373        const r = await i(), a = JSON.parse(r);
1374        a.message && (n = a.message);
1375      } catch {
1376      }
1377    throw new ph(n, e);
1378  }
1379  const o = s.includeResponseBodyInMessage ? " - " + await i() : "";
1380  throw new Error(`${e} failed: ${t.status} - ${t.statusText}${o}`);
1381}
1382function Ri(e) {
1383  return new mh(e);
1384}
1385class mh {
1386  options;
1387  baseUrl;
1388  _auth;
1389  requireAuth;
1390  constructor(t) {
1391    this.options = t;
1392    const { methods: i, requireAuth: s } = t;
1393    i.forEach((o) => {
1394      this[o] = (n) => this.sdkMethod(o, n);
1395    }), Array.isArray(s) ? this.requireAuth = new Set(s) : s && (this.requireAuth = new Set(i));
1396  }
1397  /**
1398   *
1399   * @param localPort Intended ONLY for service test
1400   */
1401  async init(t, i) {
1402    this.baseUrl = await this.getBaseUrl(i), this._auth = t, console.log(`${this.options.sdkPackageName} Initialized`);
1403  }
1404  async getBaseUrl(t) {
1405    const { baseRoute: i } = this.options;
1406    return t ? `http://localhost:${t}/${i}` : window.location.host.includes("local") ? `http://${window.location.hostname}:37000/${i}` : `https://webapp.wisestamp.com/${i}`;
1407  }
1408  checkInit() {
1409    if (!this.baseUrl)
1410      throw new Error(`${this.options.sdkPackageName} Not initialized`);
1411  }
1412  /**
1413   * Perform a POST request
1414   *
1415   * CONSIDER: Auto logs and metric (configurable with a flag)
1416   * @param method The route to call
1417   * @param request The request POJO to stringify
1418   * @returns The response as a POJO (or throws an error)
1419   */
1420  async sdkMethod(t, i) {
1421    this.checkInit();
1422    const s = `${this.baseUrl}/${t}`;
1423    console.log({
1424      message: `${this.options.sdkPackageName}: Calling ${t}`,
1425      request: i
1426    });
1427    const o = JSON.stringify(i), n = {
1428      "content-type": "application/json"
1429    }, r = this.requireAuth?.has(t);
1430    if (r) {
1431      if (!this._auth)
1432        throw new Error(`${this.options.sdkPackageName} is missing iAuth`);
1433      const l = await this.getAccessToken();
1434      n["ws-auth"] = l;
1435    }
1436    let a = await this.doFetch(s, o, n);
1437    return a.status === 401 && r && (n["ws-auth"] = await this._auth?.refresh() || "", a = await this.doFetch(s, o, n)), a.ok || await fh(s, a, () => a.text(), {
1438      includeResponseBodyInMessage: !!this.baseUrl?.includes("localhost")
1439    }), await a.json();
1440  }
1441  async doFetch(t, i, s) {
1442    return await fetch(t, {
1443      method: "POST",
1444      body: i,
1445      headers: s,
1446      mode: "cors",
1447      redirect: "follow",
1448      // need this only on local
1449      credentials: "include"
1450    });
1451  }
1452  async getAccessToken() {
1453    if (!this._auth)
1454      return;
1455    const t = this._auth.getCurrentAccessToken();
1456    return t || await this._auth.refresh();
1457  }
1458}
1459const Ge = Ri({
1460  baseRoute: hh,
1461  methods: gh,
1462  sdkPackageName: "@msl/account-settings-users-gateway-sdk",
1463  requireAuth: !0
1464}), rs = "ws1/user-gateway", Ch = rs + "/user-profile", vh = rs + "/organization", wh = rs + "/bi-analytics";
1465var Nr;
1466(function(e) {
1467  e.expired = "EXPIRED", e.grace = "GRACE", e.active = "ACTIVE", e.soloPro = "pro", e.soloFree = "free", e.trialActive = "TRIAL-ACTIVE", e.trialExpired = "TRIAL-EXPIRED";
1468})(Nr || (Nr = {}));
1469var Vr;
1470(function(e) {
1471  e.GATEWAY_ERROR_MISSING_AUTH_DATA = "accountId or userId are missing", e.GATEWAY_ERROR_MISSING_REQUIRED_DATA = "required data is missing", e.GATEWAY_ERROR_INVALID_ACCOUNT_STATE_FOR_ONBOARDING = "invalid account state for onboarding", e.GATEWAY_ERROR_FAILED_TO_CREATE_BILLING_ACCOUNT = "failed to create billing account", e.GATEWAY_ERROR_FAILED_TO_CREATE_SUBSCRIPTION = "failed to create subscription", e.GATEWAY_ERROR_SET_WORKSPACE_FAILED = "set workspace failed", e.BRIDGE_SERVER_ERROR_UPDATE_BASIC_INFO = "update basic info bridge error", e.BRIDGE_SERVER_ERROR_SET_ACCOUNT_TYPE = "set account type bridge error", e.BRIDGE_SERVER_ERROR_COMPLETE_SETUP = "complete setup bridge error", e.BRIDGE_SERVER_ERROR_REMOVE_ORGANIZATION = "remove organization bridge error", e.ORGANIZATION_COUNT_ERROR_REMOVE_ORGANIZATION = "remove organization count of organization less then two", e.BRIDGE_SERVER_ERROR_COMPLETE_SETUP_STAGE = "complete setup stage bridge error", e.SERVER_ERROR_CREATE_ORGANIZATION = "create organization error", e.LIMIT_ERROR_CREATE_ORGANIZATION = "create organization limit error", e.ORGANIZATION_NAME_ALREADY_EXISTS = "organization name already exists", e.SERVER_ERROR_SET_DEFAULT_ORGANIZATION = "set default organization error", e.GATEWAY_ERROR_USER_NOT_FOUND = "user not found";
1472})(Vr || (Vr = {}));
1473var Wr;
1474(function(e) {
1475  e[e.EXPERIENCE_STATE_UNSPECIFIED = 0] = "EXPERIENCE_STATE_UNSPECIFIED", e[e.STANDARD = 1] = "STANDARD", e[e.GENERATOR_PRO = 2] = "GENERATOR_PRO", e[e.GENERATOR_ORGANIZATION = 3] = "GENERATOR_ORGANIZATION", e[e.STANDARD_WEBMAIL = 4] = "STANDARD_WEBMAIL";
1476})(Wr || (Wr = {}));
1477const Sh = [
1478  "accountBasicInfo",
1479  "getAccountLimits"
1480], bh = [
1481  "reportAnonymousUserAnalyticEvent",
1482  "reportRegisteredUserAnalyticEvent"
1483];
1484var zr;
1485(function(e) {
1486  e[e.MICROSOFT = 0] = "MICROSOFT", e[e.GOOGLE = 1] = "GOOGLE", e[e.OTHER = 2] = "OTHER";
1487})(zr || (zr = {}));
1488const yh = [
1489  "getOrganizationsList",
1490  "removeOrganization",
1491  "createOrganization",
1492  "setDefaultOrganization"
1493];
1494var _r;
1495(function(e) {
1496  e[e.Success = 0] = "Success", e[e.UserNotFound = 1] = "UserNotFound", e[e.InternalError = 2] = "InternalError", e[e.InvalidRequest = 3] = "InvalidRequest";
1497})(_r || (_r = {}));
1498var Ur;
1499(function(e) {
1500  e[e.Success = 0] = "Success", e[e.EmailAlreadyInUse = 1] = "EmailAlreadyInUse", e[e.InvalidPassword = 2] = "InvalidPassword", e[e.UserNotFound = 3] = "UserNotFound", e[e.InvalidData = 4] = "InvalidData", e[e.InternalError = 5] = "InternalError";
1501})(Ur || (Ur = {}));
1502var $r;
1503(function(e) {
1504  e[e.TooExpensive = 0] = "TooExpensive", e[e.CouldntFindTemplateILike = 1] = "CouldntFindTemplateILike", e[e.MissingFeatureCustomizationOption = 2] = "MissingFeatureCustomizationOption", e[e.TooDifficultToUse = 3] = "TooDifficultToUse", e[e.SignatureDidntInsertProperly = 4] = "SignatureDidntInsertProperly", e[e.FoundBetterSolution = 5] = "FoundBetterSolution", e[e.Other = 6] = "Other";
1505})($r || ($r = {}));
1506var Kr;
1507(function(e) {
1508  e[e.Success = 0] = "Success", e[e.InvalidPassword = 1] = "InvalidPassword", e[e.UserNotFound = 2] = "UserNotFound", e[e.AccessDenied = 3] = "AccessDenied";
1509})(Kr || (Kr = {}));
1510const Rh = [
1511  "getProfile",
1512  "updateProfile",
1513  "deleteAccount"
1514], Fh = [
1515  "convertSoloToTeams",
1516  "convertPersonalSignaturesToOrganization"
1517], jr = Ri({
1518  baseRoute: rs,
1519  methods: Sh,
1520  sdkPackageName: "@msl/user-gateway-sdk",
1521  requireAuth: !0
1522});
1523Ri({
1524  baseRoute: vh,
1525  methods: yh,
1526  sdkPackageName: "@msl/user-gateway-sdk",
1527  requireAuth: !0
1528});
1529Ri({
1530  baseRoute: Ch,
1531  methods: Rh,
1532  sdkPackageName: "@msl/user-gateway-sdk",
1533  requireAuth: !0
1534});
1535Ri({
1536  baseRoute: rs,
1537  methods: Fh,
1538  sdkPackageName: "@msl/user-gateway-sdk",
1539  requireAuth: !0
1540});
1541Ri({
1542  baseRoute: wh,
1543  methods: bh,
1544  sdkPackageName: "@msl/user-gateway-sdk",
1545  requireAuth: ["reportRegisteredUserAnalyticEvent"]
1546});
1547var Fi = class {
1548  constructor() {
1549    this.allSyncListeners = /* @__PURE__ */ new Map(), this.allAsyncListeners = /* @__PURE__ */ new Map(), this.globalSyncListeners = /* @__PURE__ */ new Set(), this.globalAsyncListeners = /* @__PURE__ */ new Set(), this.asyncFunctionsQueue = [], this.scheduled = !1, this.firedEvents = {};
1550  }
1551  setFrameworkOverrides(e) {
1552    this.frameworkOverrides = e;
1553  }
1554  getListeners(e, t, i) {
1555    const s = t ? this.allAsyncListeners : this.allSyncListeners;
1556    let o = s.get(e);
1557    return !o && i && (o = /* @__PURE__ */ new Set(), s.set(e, o)), o;
1558  }
1559  noRegisteredListenersExist() {
1560    return this.allSyncListeners.size === 0 && this.allAsyncListeners.size === 0 && this.globalSyncListeners.size === 0 && this.globalAsyncListeners.size === 0;
1561  }
1562  addEventListener(e, t, i = !1) {
1563    this.getListeners(e, i, !0).add(t);
1564  }
1565  removeEventListener(e, t, i = !1) {
1566    const s = this.getListeners(e, i, !1);
1567    s && (s.delete(t), s.size === 0 && (i ? this.allAsyncListeners : this.allSyncListeners).delete(e));
1568  }
1569  addGlobalListener(e, t = !1) {
1570    (t ? this.globalAsyncListeners : this.globalSyncListeners).add(e);
1571  }
1572  removeGlobalListener(e, t = !1) {
1573    (t ? this.globalAsyncListeners : this.globalSyncListeners).delete(e);
1574  }
1575  dispatchEvent(e) {
1576    const t = e;
1577    this.dispatchToListeners(t, !0), this.dispatchToListeners(t, !1), this.firedEvents[t.type] = !0;
1578  }
1579  dispatchEventOnce(e) {
1580    this.firedEvents[e.type] || this.dispatchEvent(e);
1581  }
1582  dispatchToListeners(e, t) {
1583    const i = e.type;
1584    if (t && "event" in e) {
1585      const a = e.event;
1586      a instanceof Event && (e.eventPath = a.composedPath());
1587    }
1588    const s = (a, l) => a.forEach((d) => {
1589      if (!l.has(d))
1590        return;
1591      const c = this.frameworkOverrides ? () => this.frameworkOverrides.wrapIncoming(() => d(e)) : () => d(e);
1592      t ? this.dispatchAsync(c) : c();
1593    }), o = this.getListeners(i, t, !1) ?? /* @__PURE__ */ new Set(), n = new Set(o);
1594    n.size > 0 && s(n, o), new Set(
1595      t ? this.globalAsyncListeners : this.globalSyncListeners
1596    ).forEach((a) => {
1597      const l = this.frameworkOverrides ? () => this.frameworkOverrides.wrapIncoming(() => a(i, e)) : () => a(i, e);
1598      t ? this.dispatchAsync(l) : l();
1599    });
1600  }
1601  // this gets called inside the grid's thread, for each event that it
1602  // wants to set async. the grid then batches the events into one setTimeout()
1603  // because setTimeout() is an expensive operation. ideally we would have
1604  // each event in it's own setTimeout(), but we batch for performance.
1605  dispatchAsync(e) {
1606    if (this.asyncFunctionsQueue.push(e), !this.scheduled) {
1607      const t = () => {
1608        window.setTimeout(this.flushAsyncQueue.bind(this), 0);
1609      };
1610      this.frameworkOverrides ? this.frameworkOverrides.wrapIncoming(t) : t(), this.scheduled = !0;
1611    }
1612  }
1613  // this happens in the next VM turn only, and empties the queue of events
1614  flushAsyncQueue() {
1615    this.scheduled = !1;
1616    const e = this.asyncFunctionsQueue.slice();
1617    this.asyncFunctionsQueue = [], e.forEach((t) => t());
1618  }
1619};
1620function xh(e, t) {
1621  return t;
1622}
1623function nl(e) {
1624  return e?.getLocaleTextFunc() ?? xh;
1625}
1626function ct(e, t, i) {
1627  i == null || typeof i == "string" && i == "" ? rl(e, t) : We(e, t, i);
1628}
1629function We(e, t, i) {
1630  e.setAttribute(al(t), i.toString());
1631}
1632function rl(e, t) {
1633  e.removeAttribute(al(t));
1634}
1635function al(e) {
1636  return `aria-${e}`;
1637}
1638function ve(e, t) {
1639  t ? e.setAttribute("role", t) : e.removeAttribute("role");
1640}
1641function Ph(e) {
1642  let t;
1643  return e === "asc" ? t = "ascending" : e === "desc" ? t = "descending" : e === "mixed" ? t = "other" : t = "none", t;
1644}
1645function Eh(e) {
1646  return e.getAttribute("aria-label");
1647}
1648function Zs(e, t) {
1649  ct(e, "label", t);
1650}
1651function Ko(e, t) {
1652  ct(e, "labelledby", t);
1653}
1654function ll(e, t) {
1655  ct(e, "live", t);
1656}
1657function Dh(e, t) {
1658  ct(e, "atomic", t);
1659}
1660function Ah(e, t) {
1661  ct(e, "relevant", t);
1662}
1663function Th(e, t) {
1664  ct(e, "disabled", t);
1665}
1666function dl(e, t) {
1667  ct(e, "hidden", t);
1668}
1669function jo(e, t) {
1670  We(e, "expanded", t);
1671}
1672function Mh(e, t) {
1673  We(e, "setsize", t);
1674}
1675function Ih(e, t) {
1676  We(e, "posinset", t);
1677}
1678function kh(e, t) {
1679  We(e, "multiselectable", t);
1680}
1681function Lh(e, t) {
1682  We(e, "rowcount", t);
1683}
1684function cl(e, t) {
1685  We(e, "rowindex", t);
1686}
1687function Oh(e, t) {
1688  We(e, "colcount", t);
1689}
1690function ul(e, t) {
1691  We(e, "colindex", t);
1692}
1693function Gh(e, t) {
1694  We(e, "colspan", t);
1695}
1696function Hh(e, t) {
1697  We(e, "sort", t);
1698}
1699function Bh(e) {
1700  rl(e, "sort");
1701}
1702function qo(e, t) {
1703  ct(e, "selected", t);
1704}
1705function Nh(e, t) {
1706  ct(e, "controls", t.id), Ko(t, e.id);
1707}
1708function Ln(e, t) {
1709  return t === void 0 ? e("ariaIndeterminate", "indeterminate") : t === !0 ? e("ariaChecked", "checked") : e("ariaUnchecked", "unchecked");
1710}
1711var mo, Co, vo, wo, So, Yo, Qo, bo;
1712function Nt() {
1713  return mo === void 0 && (mo = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), mo;
1714}
1715function hl() {
1716  if (Co === void 0) {
1717    const e = window;
1718    Co = !!e.chrome && (!!e.chrome.webstore || !!e.chrome.runtime) || /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
1719  }
1720  return Co;
1721}
1722function gl() {
1723  return vo === void 0 && (vo = /(firefox)/i.test(navigator.userAgent)), vo;
1724}
1725function pl() {
1726  return wo === void 0 && (wo = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)), wo;
1727}
1728function Tt() {
1729  return So === void 0 && (So = /iPad|iPhone|iPod/.test(navigator.platform) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1), So;
1730}
1731function Zo(e) {
1732  if (!e)
1733    return null;
1734  const t = e.tabIndex, i = e.getAttribute("tabIndex");
1735  return t === -1 && (i === null || i === "" && !gl()) ? null : t.toString();
1736}
1737function Vh() {
1738  if (bo !== void 0)
1739    return bo;
1740  if (!document.body)
1741    return -1;
1742  let e = 1e6;
1743  const t = gl() ? 6e6 : 1e9, i = document.createElement("div");
1744  for (document.body.appendChild(i); ; ) {
1745    const s = e * 2;
1746    if (i.style.height = s + "px", s > t || i.clientHeight !== s)
1747      break;
1748    e = s;
1749  }
1750  return document.body.removeChild(i), bo = e, e;
1751}
1752function Wh() {
1753  return Qo == null && fl(), Qo;
1754}
1755function fl() {
1756  const e = document.body, t = document.createElement("div");
1757  t.style.width = t.style.height = "100px", t.style.opacity = "0", t.style.overflow = "scroll", t.style.msOverflowStyle = "scrollbar", t.style.position = "absolute", e.appendChild(t);
1758  let i = t.offsetWidth - t.clientWidth;
1759  i === 0 && t.clientWidth === 0 && (i = null), t.parentNode && t.parentNode.removeChild(t), i != null && (Qo = i, Yo = i === 0);
1760}
1761function ml() {
1762  return Yo == null && fl(), Yo;
1763}
1764var gs, zh = "[tabindex], input, select, button, textarea, [href]", Cl = "[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";
1765function On(e) {
1766  const t = Element.prototype.matches || Element.prototype.msMatchesSelector, s = t.call(e, "input, select, button, textarea"), o = t.call(e, Cl), n = Ne(e);
1767  return s && !o && n;
1768}
1769function Q(e, t, i = {}) {
1770  const { skipAriaHidden: s } = i;
1771  e.classList.toggle("ag-hidden", !t), s || dl(e, !t);
1772}
1773function _h(e, t, i = {}) {
1774  const { skipAriaHidden: s } = i;
1775  e.classList.toggle("ag-invisible", !t), s || dl(e, !t);
1776}
1777function qi(e, t) {
1778  const i = "disabled", s = t ? (o) => o.setAttribute(i, "") : (o) => o.removeAttribute(i);
1779  s(e), Fl(e.querySelectorAll("input"), (o) => s(o));
1780}
1781function Mt(e, t, i) {
1782  let s = 0;
1783  for (; e; ) {
1784    if (e.classList.contains(t))
1785      return !0;
1786    if (e = e.parentElement, typeof i == "number") {
1787      if (++s > i)
1788        break;
1789    } else if (e === i)
1790      break;
1791  }
1792  return !1;
1793}
1794function Vt(e) {
1795  const {
1796    height: t,
1797    width: i,
1798    borderTopWidth: s,
1799    borderRightWidth: o,
1800    borderBottomWidth: n,
1801    borderLeftWidth: r,
1802    paddingTop: a,
1803    paddingRight: l,
1804    paddingBottom: d,
1805    paddingLeft: c,
1806    marginTop: u,
1807    marginRight: h,
1808    marginBottom: g,
1809    marginLeft: p,
1810    boxSizing: f
1811  } = window.getComputedStyle(e);
1812  return {
1813    height: parseFloat(t || "0"),
1814    width: parseFloat(i || "0"),
1815    borderTopWidth: parseFloat(s || "0"),
1816    borderRightWidth: parseFloat(o || "0"),
1817    borderBottomWidth: parseFloat(n || "0"),
1818    borderLeftWidth: parseFloat(r || "0"),
1819    paddingTop: parseFloat(a || "0"),
1820    paddingRight: parseFloat(l || "0"),
1821    paddingBottom: parseFloat(d || "0"),
1822    paddingLeft: parseFloat(c || "0"),
1823    marginTop: parseFloat(u || "0"),
1824    marginRight: parseFloat(h || "0"),
1825    marginBottom: parseFloat(g || "0"),
1826    marginLeft: parseFloat(p || "0"),
1827    boxSizing: f
1828  };
1829}
1830function Gn(e) {
1831  const t = Vt(e);
1832  return t.boxSizing === "border-box" ? t.height - t.paddingTop 
1832- t.paddingBottom : t.height;
1833}
1834function Yi(e) {
1835  const t = Vt(e);
1836  return t.boxSizing === "border-box" ? t.width - t.paddingLeft - t.paddingRight : t.width;
1837}
1838function vl(e) {
1839  const { height: t, marginBottom: i, marginTop: s } = Vt(e);
1840  return Math.floor(t + i + s);
1841}
1842function As(e) {
1843  const { width: t, marginLeft: i, marginRight: s } = Vt(e);
1844  return Math.floor(t + i + s);
1845}
1846function wl(e) {
1847  const t = e.getBoundingClientRect(), { borderTopWidth: i, borderLeftWidth: s, borderRightWidth: o, borderBottomWidth: n } = Vt(e);
1848  return {
1849    top: t.top + (i || 0),
1850    left: t.left + (s || 0),
1851    right: t.right + (o || 0),
1852    bottom: t.bottom + (n || 0)
1853  };
1854}
1855function Ts() {
1856  if (typeof gs == "boolean")
1857    return gs;
1858  const e = document.createElement("div");
1859  return e.style.direction = "rtl", e.style.width = "1px", e.style.height = "1px", e.style.position = "fixed", e.style.top = "0px", e.style.overflow = "hidden", e.dir = "rtl", e.innerHTML = /* html */
1860  `<div style="width: 2px">
1861            <span style="display: inline-block; width: 1px"></span>
1862            <span style="display: inline-block; width: 1px"></span>
1863        </div>`, document.body.appendChild(e), e.scrollLeft = 1, gs = Math.floor(e.scrollLeft) === 0, document.body.removeChild(e), gs;
1864}
1865function Ms(e, t) {
1866  let i = e.scrollLeft;
1867  return t && (i = Math.abs(i), hl() && !Ts() && (i = e.scrollWidth - e.getBoundingClientRect().width - i)), i;
1868}
1869function Is(e, t, i) {
1870  i && (Ts() ? t *= -1 : (Nt() || hl()) && (t = e.scrollWidth - e.getBoundingClientRect().width - t)), e.scrollLeft = t;
1871}
1872function ue(e) {
1873  for (; e && e.firstChild; )
1874    e.removeChild(e.firstChild);
1875}
1876function qe(e) {
1877  e && e.parentNode && e.parentNode.removeChild(e);
1878}
1879function Sl(e) {
1880  return !!e.offsetParent;
1881}
1882function Ne(e) {
1883  const t = e;
1884  return t.checkVisibility ? t.checkVisibility({ checkVisibilityCSS: !0 }) : !(!Sl(e) || window.getComputedStyle(e).visibility !== "visible");
1885}
1886function Qi(e) {
1887  const t = document.createElement("div");
1888  return t.innerHTML = (e || "").trim(), t.firstChild;
1889}
1890function bl(e, t, i) {
1891  i && i.nextSibling === t || (i ? i.nextSibling ? e.insertBefore(t, i.nextSibling) : e.appendChild(t) : e.firstChild && e.firstChild !== t && e.insertAdjacentElement("afterbegin", t));
1892}
1893function yl(e, t) {
1894  for (let i = 0; i < t.length; i++) {
1895    const s = t[i], o = e.children[i];
1896    o !== s && e.insertBefore(s, o);
1897  }
1898}
1899function Uh(e, t, i) {
1900  i ? i.insertAdjacentElement("afterend", t) : e.firstChild ? e.insertAdjacentElement("afterbegin", t) : e.appendChild(t);
1901}
1902function $h(e) {
1903  return e.replace(/[A-Z]/g, (t) => `-${t.toLocaleLowerCase()}`);
1904}
1905function Rl(e, t) {
1906  if (t)
1907    for (const [i, s] of Object.entries(t)) {
1908      if (!i || !i.length || s == null)
1909        continue;
1910      const o = $h(i), n = s.toString(), r = n.replace(/\s*!important/g, ""), a = r.length != n.length ? "important" : void 0;
1911      e.style.setProperty(o, r, a);
1912    }
1913}
1914function Kh(e) {
1915  return e.clientWidth < e.scrollWidth;
1916}
1917function jh(e) {
1918  return e.clientHeight < e.scrollHeight;
1919}
1920function ks(e, t) {
1921  t === "flex" ? (e.style.removeProperty("width"), e.style.removeProperty("minWidth"), e.style.removeProperty("maxWidth"), e.style.flex = "1 1 auto") : Ye(e, t);
1922}
1923function Ye(e, t) {
1924  t = Hn(t), e.style.width = t.toString(), e.style.maxWidth = t.toString(), e.style.minWidth = t.toString();
1925}
1926function Bi(e, t) {
1927  t = Hn(t), e.style.height = t.toString(), e.style.maxHeight = t.toString(), e.style.minHeight = t.toString();
1928}
1929function Hn(e) {
1930  return typeof e == "number" ? `${e}px` : e;
1931}
1932function Bn(e) {
1933  return e instanceof Node || e instanceof HTMLElement;
1934}
1935function qh(e) {
1936  if (e == null)
1937    return [];
1938  const t = [];
1939  return Fl(e, (i) => t.push(i)), t;
1940}
1941function Yh(e, t) {
1942  if (e)
1943    for (let i = 0; i < e.length; i++) {
1944      const s = e[i];
1945      t(s.name, s.value);
1946    }
1947}
1948function Ie(e, t, i) {
1949  i == null || i === "" ? e.removeAttribute(t) : e.setAttribute(t, i.toString());
1950}
1951function Fl(e, t) {
1952  if (e != null)
1953    for (let i = 0; i < e.length; i++)
1954      t(e[i]);
1955}
1956function Rt(e, t, i) {
1957  const o = kl(e).ResizeObserver, n = o ? new o(i) : null;
1958  return n?.observe(t), () => n?.disconnect();
1959}
1960function ot(e) {
1961  return e == null || e === "" ? null : e;
1962}
1963function A(e) {
1964  return e != null && e !== "";
1965}
1966function Y(e) {
1967  return !A(e);
1968}
1969function Xo(e) {
1970  return e != null && typeof e.toString == "function" ? e.toString() : null;
1971}
1972function Zi(e, t) {
1973  const i = e ? JSON.stringify(e) : null, s = t ? JSON.stringify(t) : null;
1974  return i === s;
1975}
1976function Qh(e, t, i = !1) {
1977  const s = e == null, o = t == null;
1978  if (e && e.toNumber && (e = e.toNumber()), t && t.toNumber && (t = t.toNumber()), s && o)
1979    return 0;
1980  if (s)
1981    return -1;
1982  if (o)
1983    return 1;
1984  function n(r, a) {
1985    return r > a ? 1 : r < a ? -1 : 0;
1986  }
1987  if (typeof e != "string" || !i)
1988    return n(e, t);
1989  try {
1990    return e.localeCompare(t);
1991  } catch {
1992    return n(e, t);
1993  }
1994}
1995var xl = "https://www.ag-grid.com", qr = {};
1996function Pl(e, t) {
1997  qr[t] || (e(), qr[t] = !0);
1998}
1999function bt(e, t, ...i) {
2000  e.get("debug") && console.log("AG Grid: " + t, ...i);
2001}
2002function Ni(e, ...t) {
2003  Pl(() => console.warn("AG Grid: " + e, ...t), e + t?.join(""));
2004}
2005function ii(e, ...t) {
2006  Pl(() => console.error("AG Grid: " + e, ...t), e + t?.join(""));
2007}
2008var yo = [], Ro = !1;
2009function Yr(e) {
2010  yo.push(e), !Ro && (Ro = !0, window.setTimeout(() => {
2011    const t = yo.slice();
2012    yo.length = 0, Ro = !1, t.forEach((i) => i());
2013  }, 0));
2014}
2015function Ce(e, t, i) {
2016  let s;
2017  return function(...o) {
2018    const n = this;
2019    window.clearTimeout(s), s = window.setTimeout(function() {
2020      e.isAlive() && t.apply(n, o);
2021    }, i);
2022  };
2023}
2024function Qr(e, t) {
2025  let i = 0;
2026  return function(...s) {
2027    const o = this, n = (/* @__PURE__ */ new Date()).getTime();
2028    n - i < t || (i = n, e.apply(o, s));
2029  };
2030}
2031function Zh(e, t, i = 100, s) {
2032  const o = (/* @__PURE__ */ new Date()).getTime();
2033  let n = null, r = !1;
2034  const a = () => {
2035    const l = (/* @__PURE__ */ new Date()).getTime() - o > i;
2036    (e() || l) && (t(), r = !0, n != null && (window.clearInterval(n), n = null));
2037  };
2038  a(), r || (n = window.setInterval(a, 10));
2039}
2040var I = "33.0.4", Zr = 2e3, Xr = 100, El = "_version_", Dl = null, pi = `${xl}/javascript-data-grid`;
2041function Xh(e) {
2042  Dl = e;
2043}
2044function Jh(e) {
2045  pi = e;
2046}
2047function Al(e, t, i) {
2048  return Dl?.getConsoleMessage(e, t) ?? [sg(e, t, i)];
2049}
2050function Nn(e, t, i, s) {
2051  e(`error #${t}`, ...Al(t, i, s));
2052}
2053function eg(e) {
2054  if (!e)
2055    return String(e);
2056  const t = {};
2057  for (const i of Object.keys(e))
2058    typeof e[i] != "object" && typeof e[i] != "function" && (t[i] = e[i]);
2059  return JSON.stringify(t);
2060}
2061function tg(e) {
2062  let t = e;
2063  return e instanceof Error ? t = e.toString() : typeof e == "object" && (t = eg(e)), t;
2064}
2065function Ls(e) {
2066  return e === void 0 ? "undefined" : e === null ? "null" : e;
2067}
2068function Jo(e, t) {
2069  return `${e}?${t.toString()}`;
2070}
2071function ig(e, t, i) {
2072  const s = Array.from(t.entries()).sort((n, r) => r[1].length - n[1].length);
2073  let o = Jo(e, t);
2074  for (const [n, r] of s) {
2075    if (n === El)
2076      continue;
2077    const a = o.length - i;
2078    if (a <= 0)
2079      break;
2080    const l = "...", d = a + l.length, c = r.length - d > Xr ? r.slice(0, r.length - d) + l : r.slice(0, Xr) + l;
2081    t.set(n, c), o = Jo(e, t);
2082  }
2083  return o;
2084}
2085function Tl(e, t) {
2086  const i = new URLSearchParams();
2087  i.append(El, I), t && Object.entries(t).forEach(([n, r]) => {
2088    i.append(n, tg(r));
2089  });
2090  const s = `${pi}/errors/${e}`, o = Jo(s, i);
2091  return o.length <= Zr ? o : ig(s, i, Zr);
2092}
2093var sg = (e, t, i) => {
2094  const s = Tl(e, t);
2095  return `${i ? i + ` 
2096` : ""}Visit ${s}${i ? "" : ` 
2097  Alternatively register the ValidationModule to see the full message in the console.`}`;
2098};
2099function x(...e) {
2100  Nn(Ni, e[0], e[1]);
2101}
2102function z(...e) {
2103  Nn(ii, e[0], e[1]);
2104}
2105function en(e, t, i) {
2106  Nn(ii, e, t, i);
2107}
2108function og(e, t) {
2109  const i = t[0];
2110  return `error #${i} ` + Al(i, t[1], e).join(" ");
2111}
2112function wt(...e) {
2113  return og(void 0, e);
2114}
2115function Ml(e, t) {
2116  return e.get("rowModelType") === t;
2117}
2118function me(e, t) {
2119  return Ml(e, "clientSide");
2120}
2121function as(e, t) {
2122  return Ml(e, "serverSide");
2123}
2124function de(e, t) {
2125  return e.get("domLayout") === t;
2126}
2127function It(e) {
2128  return Gs(e) !== void 0;
2129}
2130function Il(e) {
2131  return typeof e.get("getRowHeight") == "function";
2132}
2133function ng(e, t) {
2134  return t ? !e.get("enableStrictPivotColumnOrder") : e.get("maintainColumnOrder");
2135}
2136function Ot(e, t, i = !1, s) {
2137  const { gos: o, environment: n } = e;
2138  if (s == null && (s = n.getDefaultRowHeight()), Il(o)) {
2139    if (i)
2140      return { height: s, estimated: !0 };
2141    const l = {
2142      node: t,
2143      data: t.data
2144    }, d = o.getCallback("getRowHeight")(l);
2145    if (tn(d))
2146      return d === 0 && x(23), { height: Math.max(1, d), estimated: !1 };
2147  }
2148  if (t.detail && o.get("masterDetail"))
2149    return rg(o);
2150  const r = o.get("rowHeight");
2151  return { height: r && tn(r) ? r : s, estimated: !1 };
2152}
2153function rg(e) {
2154  if (e.get("detailRowAutoHeight"))
2155    return { height: 1, estimated: !1 };
2156  const t = e.get("detailRowHeight");
2157  return tn(t) ? { height: t, estimated: !1 } : { height: 300, estimated: !1 };
2158}
2159function kt(e) {
2160  const { environment: t, gos: i } = e, s = i.get("rowHeight");
2161  if (!s || Y(s))
2162    return t.getDefaultRowHeight();
2163  const o = t.refreshRowHeightVariable();
2164  return o !== -1 ? o : (x(24), t.getDefaultRowHeight());
2165}
2166function tn(e) {
2167  return !isNaN(e) && typeof e == "number" && isFinite(e);
2168}
2169function Os(e, t, i) {
2170  const s = t[e.getDomDataKey()];
2171  return s ? s[i] : void 0;
2172}
2173function Gt(e, t, i, s) {
2174  const o = e.getDomDataKey();
2175  let n = t[o];
2176  Y(n) && (n = {}, t[o] = n), n[i] = s;
2177}
2178function te(e) {
2179  const { gos: t, eGridDiv: i } = e;
2180  let s = null;
2181  const o = t.get("getDocument");
2182  return o && A(o) ? s = o() : i && (s = i.ownerDocument), s && A(s) ? s : document;
2183}
2184function kl(e) {
2185  return te(e).defaultView || window;
2186}
2187function Xi(e) {
2188  return e.eGridDiv.getRootNode();
2189}
2190function Z(e) {
2191  return Xi(e).activeElement;
2192}
2193function Vn(e) {
2194  let t = null, i = null;
2195  try {
2196    t = te(e).fullscreenElement;
2197  } catch {
2198  } finally {
2199    t || (t = Xi(e));
2200    const s = t.querySelector("body");
2201    s ? i = s : t instanceof ShadowRoot ? i = t : t instanceof Document ? i = t?.documentElement : i = t;
2202  }
2203  return i;
2204}
2205function ag(e) {
2206  return Vn(e)?.clientWidth ?? (window.innerHeight || -1);
2207}
2208function lg(e) {
2209  return Vn(e)?.clientHeight ?? (window.innerHeight || -1);
2210}
2211function dg(e, t, i) {
2212  const o = e.getBoundingClientRect().height, n = ag(i) - 2, r = lg(i) - 2;
2213  if (!e.offsetParent)
2214    return;
2215  const l = wl(e.offsetParent), { clientY: d, clientX: c } = t;
2216  let u = d - l.top - o / 2, h = c - l.left - 10;
2217  const g = te(i), p = g.defaultView || window, f = p.pageYOffset || g.documentElement.scrollTop, m = p.pageXOffset || g.documentElement.scrollLeft;
2218  n > 0 && h + e.clientWidth > n + m && (h = n + m - e.clientWidth), h < 0 && (h = 0), r > 0 && u + e.clientHeight > r + f && (u = r + f - e.clientHeight), u < 0 && (u = 0), e.style.left = `${h}px`, e.style.top = `${u}px`;
2219}
2220function Ll(e) {
2221  const t = te(e), i = Z(e);
2222  return i === null || i === t.body;
2223}
2224function si(e) {
2225  return e.get("ensureDomOrder") ? !1 : e.get("animateRows");
2226}
2227function Ol(e) {
2228  return !(e.get("paginateChildRows") || e.get("groupHideOpenParents") || de(e, "print"));
2229}
2230function Ke(e) {
2231  return !e.get("autoGroupColumnDef")?.comparator && !e.get("treeData");
2232}
2233function sn(e) {
2234  const t = e.get("groupAggFiltering");
2235  if (typeof t == "function")
2236    return e.getCallback("groupAggFiltering");
2237  if (t === !0)
2238    return () => !0;
2239}
2240function cg(e) {
2241  return e.exists("groupDisplayType") ? e.get("groupDisplayType") === "multipleColumns" : e.get("groupHideOpenParents");
2242}
2243function Wn(e, t) {
2244  return t ? !1 : e.get("groupDisplayType") === "groupRows";
2245}
2246function fi(e) {
2247  const t = e.getCallback("getRowId");
2248  return t === void 0 ? t : (i) => {
2249    let s = t(i);
2250    return typeof s != "string" && (x(25, { id: s }), s = String(s)), s;
2251  };
2252}
2253function ug(e, t) {
2254  const i = e.get("groupHideParentOfSingleChild");
2255  return !!(i === !0 || i === "leafGroupsOnly" && t.leafGroup || e.get("groupRemoveSingleChildren") || e.get("groupRemoveLowestSingleChildren") && t.leafGroup);
2256}
2257function hg(e) {
2258  const t = e.get("maxConcurrentDatasourceRequests");
2259  return t > 0 ? t : void 0;
2260}
2261function oi(e) {
2262  return e?.checkboxes ?? !0;
2263}
2264function Rs(e) {
2265  return e?.mode === "multiRow" && (e.headerCheckbox ?? !0);
2266}
2267function on(e) {
2268  if (typeof e == "object")
2269    return e.checkboxLocation ?? "selectionColumn";
2270}
2271function Fo(e) {
2272  return e?.hideDisabledCheckboxes ?? !1;
2273}
2274function gg(e) {
2275  return typeof e.get("rowSelection") != "string";
2276}
2277function lt(e) {
2278  const t = e.get("cellSelection");
2279  return t !== void 0 ? !!t : e.get("enableRangeSelection");
2280}
2281function Gl(e) {
2282  const t = e.get("rowSelection") ?? "single";
2283  if (typeof t == "string") {
2284    const i = e.get("suppressRowClickSelection"), s = e.get("suppressRowDeselection");
2285    return i && s ? !1 : i ? "enableDeselection" : s ? "enableSelection" : !0;
2286  }
2287  return t.mode === "singleRow" || t.mode === "multiRow" ? t.enableClickSelection ?? !1 : !1;
2288}
2289function pg(e) {
2290  const t = Gl(e);
2291  return t === !0 || t === "enableSelection";
2292}
2293function Jr(e) {
2294  const t = Gl(e);
2295  return t === !0 || t === "enableDeselection";
2296}
2297function nn(e) {
2298  const t = e.get("rowSelection");
2299  return typeof t == "string" ? e.get("isRowSelectable") : t?.isRowSelectable;
2300}
2301function Gs(e) {
2302  const t = e.get("rowSelection");
2303  if (typeof t == "string")
2304    switch (t) {
2305      case "multiple":
2306        return "multiRow";
2307      case "single":
2308        return "singleRow";
2309      default:
2310        return;
2311    }
2312  switch (t?.mode) {
2313    case "multiRow":
2314    case "singleRow":
2315      return t.mode;
2316    default:
2317      return;
2318  }
2319}
2320function Xs(e) {
2321  return Gs(e) === "multiRow";
2322}
2323function fg(e) {
2324  const t = e.get("rowSelection");
2325  return typeof t == "string" ? e.get("rowMultiSelectWithClick") : t?.enableSelectionWithoutKeys ?? !1;
2326}
2327function Hs(e) {
2328  const t = e.get("rowSelection");
2329  if (typeof t == "string") {
2330    const i = e.get("groupSelectsChildren"), s = e.get("groupSelectsFiltered");
2331    return i && s ? "filteredDescendants" : i ? "descendants" : "self";
2332  }
2333  return t?.mode === "multiRow" ? t.groupSelects : void 0;
2334}
2335function Hl(e, t = !0) {
2336  const i = e.get("rowSelection");
2337  return typeof i != "object" ? t ? "all" : void 0 : i.mode === "multiRow" ? i.selectAll : "all";
2338}
2339function Ji(e) {
2340  const t = Hs(e);
2341  return t === "descendants" || t === "filteredDescendants";
2342}
2343function xo(e) {
2344  return e.isModuleRegistered("SetFilter") && !e.get("suppressSetFilterByDefault");
2345}
2346function Pe(e) {
2347  return e.get("columnMenu") === "legacy";
2348}
2349function mg(e) {
2350  return !Pe(e);
2351}
2352function zn(e) {
2353  return !e || e.length < 2 ? e : "on" + e[0].toUpperCase() + e.substring(1);
2354}
2355function Cg(e, t, i) {
2356  typeof e != "object" && (e = {});
2357  const s = { ...e };
2358  return i.forEach((o) => {
2359    const n = t[o];
2360    typeof n < "u" && (s[o] = n);
2361  }), s;
2362}
2363function vg(e, t) {
2364  if (!e)
2365    return;
2366  const i = {};
2367  let s = !1;
2368  if (Object.keys(e).forEach((r) => {
2369    i[r] = e[r], s = !0;
2370  }), !s)
2371    return;
2372  const o = {
2373    type: "gridOptionsChanged",
2374    options: i
2375  };
2376  t.dispatchEvent(o);
2377  const n = {
2378    type: "componentStateChanged",
2379    ...i
2380  };
2381  t.dispatchEvent(n);
2382}
2383var Bl = "__ag_Grid_Stop_Propagation", wg = ["touchstart", "touchend", "touchmove", "touchcancel", "scroll"], Sg = ["wheel"], Po = {};
2384function mi(e) {
2385  e[Bl] = !0;
2386}
2387function nt(e) {
2388  return e[Bl] === !0;
2389}
2390var Nl = /* @__PURE__ */ (() => {
2391  const e = {
2392    select: "input",
2393    change: "input",
2394    submit: "form",
2395    reset: "form",
2396    error: "img",
2397    load: "img",
2398    abort: "img"
2399  };
2400  return (i) => {
2401    if (typeof Po[i] == "boolean")
2402      return Po[i];
2403    const s = document.createElement(e[i] || "div");
2404    return i = "on" + i, Po[i] = i in s;
2405  };
2406})();
2407function Vl(e, t, i) {
2408  let s = t;
2409  for (; s; ) {
2410    const o = Os(e, s, i);
2411    if (o)
2412      return o;
2413    s = s.parentElement;
2414  }
2415  return null;
2416}
2417function bg(e, t) {
2418  return !t || !e ? !1 : Rg(t).indexOf(e) >= 0;
2419}
2420function yg(e) {
2421  const t = [];
2422  let i = e.target;
2423  for (; i; )
2424    t.push(i), i = i.parentElement;
2425  return t;
2426}
2427function Rg(e) {
2428  const t = e;
2429  return t.path ? t.path : t.composedPath ? t.composedPath() : yg(t);
2430}
2431function Fg(e, t, i, s) {
2432  const o = Wl(i);
2433  let n;
2434  o != null && (n = { passive: o }), e && e.addEventListener && e.addEventListener(t, i, s, n);
2435}
2436var Wl = (e) => {
2437  const t = wg.includes(e), i = Sg.includes(e);
2438  if (t)
2439    return !0;
2440  if (i)
2441    return !1;
2442}, y = class {
2443  constructor() {
2444    this.destroyFunctions = [], this.destroyed = !1, this.__v_skip = !0, this.propertyListenerId = 0, this.lastChangeSetIdLookup = {}, this.isAlive = () => !this.destroyed;
2445  }
2446  preWireBeans(e) {
2447    this.beans = e, this.stubContext = e.context, this.eventSvc = e.eventSvc, this.gos = e.gos;
2448  }
2449  // this was a test constructor niall built, when active, it prints after 5 seconds all beans/components that are
2450  // not destroyed. to use, create a new grid, then api.destroy() before 5 seconds. then anything that gets printed
2451  // points to a bean or component that was not properly disposed of.
2452  // constructor() {
2453  //     setTimeout(()=> {
2454  //         if (this.isAlive()) {
2455  //             let prototype: any = Object.getPrototypeOf(this);
2456  //             const constructor: any = prototype.constructor;
2457  //             const constructorString = constructor.toString();
2458  //             const beanName = constructorString.substring(9, constructorString.indexOf("("));
2459  //             console.log('is alive ' + beanName);
2460  //         }
2461  //     }, 5000);
2462  // }
2463  destroy() {
2464    const { destroyFunctions: e } = this;
2465    for (let t = 0; t < e.length; t++)
2466      e[t]();
2467    e.length = 0, this.destroyed = !0, this.dispatchLocalEvent({ type: "destroyed" });
2468  }
2469  // The typing of AgEventListener<any, any, any> is not ideal, but it's the best we can do at the moment to enable
2470  // eventSvc to have the best typing at the expense of BeanStub local events
2471  /** Add a local event listener against this BeanStub */
2472  addEventListener(e, t, i) {
2473    this.localEventService || (this.localEventService = new Fi()), this.localEventService.addEventListener(e, t, i);
2474  }
2475  /** Remove a local event listener from this BeanStub */
2476  removeEventListener(e, t, i) {
2477    this.localEventService?.removeEventListener(e, t, i);
2478  }
2479  dispatchLocalEvent(e) {
2480    this.localEventService?.dispatchEvent(e);
2481  }
2482  addManagedElementListeners(e, t) {
2483    return this._setupListeners(e, t);
2484  }
2485  addManagedEventListeners(e) {
2486    return this._setupListeners(this.eventSvc, e);
2487  }
2488  addManagedListeners(e, t) {
2489    return this._setupListeners(e, t);
2490  }
2491  _setupListeners(e, t) {
2492    const i = [];
2493    for (const s of Object.keys(t)) {
2494      const o = t[s];
2495      o && i.push(this._setupListener(e, s, o));
2496    }
2497    return i;
2498  }
2499  _setupListener(e, t, i) {
2500    if (this.destroyed)
2501      return () => null;
2502    e instanceof HTMLElement ? Fg(this.beans.frameworkOverrides, e, t, i) : e.addEventListener(t, i);
2503    const s = () => (e.removeEventListener(t, i), null);
2504    return this.destroyFunctions.push(s), () => (s(), this.destroyFunctions = this.destroyFunctions.filter((o) => o !== s), null);
2505  }
2506  /**
2507   * Setup a managed property listener for the given GridOption property.
2508   * However, stores the destroy function in the beanStub so that if this bean
2509   * is a component the destroy function will be called when the component is destroyed
2510   * as opposed to being cleaned up only when the GridOptionsService is destroyed.
2511   */
2512  setupGridOptionListener(e, t) {
2513    const { gos: i } = this;
2514    i.addPropertyEventListener(e, t);
2515    const s = () => (i.removePropertyEventListener(e, t), null);
2516    return this.destroyFunctions.push(s), () => (s(), this.destroyFunctions = this.destroyFunctions.filter((o) => o !== s), null);
2517  }
2518  /**
2519   * Setup a managed property listener for the given GridOption property.
2520   * @param event GridOption property to listen to changes for.
2521   * @param listener Listener to run when property value changes
2522   */
2523  addManagedPropertyListener(e, t) {
2524    return this.destroyed ? () => null : this.setupGridOptionListener(e, t);
2525  }
2526  /**
2527   * Setup managed property listeners for the given set of GridOption properties.
2528   * The listener will be run if any of the property changes but will only run once if
2529   * multiple of the properties change within the same framework lifecycle event.
2530   * Works on the basis that GridOptionsService updates all properties *before* any property change events are fired.
2531   * @param events Array of GridOption properties to listen for changes too.
2532   * @param listener Shared listener to run if any of the properties change
2533   */
2534  addManagedPropertyListeners(e, t) {
2535    if (this.destroyed)
2536      return;
2537    const i = e.join("-") + this.propertyListenerId++, s = (o) => {
2538      if (o.changeSet) {
2539        if (o.changeSet && o.changeSet.id === this.lastChangeSetIdLookup[i])
2540          return;
2541        this.lastChangeSetIdLookup[i] = o.changeSet.id;
2542      }
2543      const n = {
2544        type: "gridPropertyChanged",
2545        changeSet: o.changeSet,
2546        source: o.source
2547      };
2548      t(n);
2549    };
2550    e.forEach((o) => this.setupGridOptionListener(o, s));
2551  }
2552  getLocaleTextFunc() {
2553    return nl(this.beans.localeSvc);
2554  }
2555  addDestroyFunc(e) {
2556    this.isAlive() ? this.destroyFunctions.push(e) : e();
2557  }
2558  /** doesn't throw an error if `bean` is undefined */
2559  createOptionalManagedBean(e, t) {
2560    return e ? this.createManagedBean(e, t) : void 0;
2561  }
2562  createManagedBean(e, t) {
2563    const i = this.createBean(e, t);
2564    return this.addDestroyFunc(this.destroyBean.bind(this, e, t)), i;
2565  }
2566  createBean(e, t, i) {
2567    return (t || this.stubContext).createBean(e, i);
2568  }
2569  /**
2570   * Destroys a bean and returns undefined to support destruction and clean up in a single line.
2571   * this.dateComp = this.context.destroyBean(this.dateComp);
2572   */
2573  destroyBean(e, t) {
2574    return (t || this.stubContext).destroyBean(e);
2575  }
2576  /**
2577   * Destroys an array of beans and returns an empty array to support destruction and clean up in a single line.
2578   * this.dateComps = this.context.destroyBeans(this.dateComps);
2579   */
2580  destroyBeans(e, t) {
2581    return (t || this.stubContext).destroyBeans(e);
2582  }
2583}, zl = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
2584function xg(e, t) {
2585  if (e != null) {
2586    if (Array.isArray(e)) {
2587      for (let i = 0; i < e.length; i++)
2588        t(i.toString(), e[i]);
2589      return;
2590    }
2591    for (const [i, s] of Object.entries(e))
2592      t(i, s);
2593  }
2594}
2595function ce(e, t, i = !0, s = !1) {
2596  A(t) && xg(t, (o, n) => {
2597    if (zl.has(o))
2598      return;
2599    let r = e[o];
2600    r !== n && (s && r == null && n != null && typeof n == "object" && n.constructor === Object && (r = {}, e[o] = r), ea(n) && ea(r) && !Array.isArray(r) ? ce(r, n, i, s) : (i || n !== void 0) && (e[o] = n));
2601  });
2602}
2603function Vi(e, t, i) {
2604  if (!t || !e)
2605    return;
2606  if (!i)
2607    return e[t];
2608  const s = t.split(".");
2609  let o = e;
2610  for (let n = 0; n < s.length; n++) {
2611    if (o == null)
2612      return;
2613    o = o[s[n]];
2614  }
2615  return o;
2616}
2617function ea(e) {
2618  return typeof e == "object" && e !== null;
2619}
2620var Pg = {
2621  resizable: !0,
2622  sortable: !0
2623}, Eg = 0;
2624function _l() {
2625  return Eg++;
2626}
2627function yt(e) {
2628  return e instanceof _n;
2629}
2630var _n = class extends y {
2631  constructor(e, t, i, s) {
2632    super(), this.colDef = e, this.userProvidedColDef = t, this.colId = i, this.primary = s, this.isColumn = !0, this.instanceId = _l(), this.autoHeaderHeight = null, this.moving = !1, this.menuVisible = !1, this.lastLeftPinned = !1, this.firstRightPinned = !1, this.filterActive = !1, this.colEventSvc = new Fi(), this.tooltipEnabled = !1, this.rowGroupActive = !1, this.pivotActive = !1, this.aggregationActive = !1, this.flex = null;
2633  }
2634  getInstanceId() {
2635    return this.instanceId;
2636  }
2637  setState() {
2638    const {
2639      colDef: e,
2640      beans: { sortSvc: t, pinnedCols: i, colFlex: s }
2641    } = this;
2642    t?.initCol(this);
2643    const o = e.hide;
2644    o !== void 0 ? this.visible = !o : this.visible = !e.initialHide, i?.initCol(this), s?.initCol(this);
2645  }
2646  // gets called when user provides an alternative colDef, eg
2647  setColDef(e, t, i) {
2648    this.colDef = e, this.userProvidedColDef = t, this.initMinAndMaxWidths(), this.initDotNotation(), this.initTooltip(), this.dispatchColEvent("colDefChanged", i);
2649  }
2650  getUserProvidedColDef() {
2651    return this.userProvidedColDef;
2652  }
2653  getParent() {
2654    return this.parent;
2655  }
2656  getOriginalParent() {
2657    return this.originalParent;
2658  }
2659  // this is done after constructor as it uses gridOptionsService
2660  postConstruct() {
2661    this.setState(), this.initMinAndMaxWidths(), this.resetActualWidth("gridInitializing"), this.initDotNotation(), this.initTooltip();
2662  }
2663  initDotNotation() {
2664    const {
2665      gos: e,
2666      colDef: { field: t, tooltipField: i }
2667    } = this, s = e.get("suppressFieldDotNotation");
2668    this.fieldContainsDots = A(t) && t.indexOf(".") >= 0 && !s, this.tooltipFieldContainsDots = A(i) && i.indexOf(".") >= 0 && !s;
2669  }
2670  initMinAndMaxWidths() {
2671    const e = this.colDef;
2672    this.minWidth = e.minWidth ?? this.beans.environment.getDefaultColumnMinWidth(), this.maxWidth = e.maxWidth ?? Number.MAX_SAFE_INTEGER;
2673  }
2674  initTooltip() {
2675    this.beans.tooltipSvc?.initCol(this);
2676  }
2677  resetActualWidth(e) {
2678    const t = this.calculateColInitialWidth(this.colDef);
2679    this.setActualWidth(t, e, !0);
2680  }
2681  calculateColInitialWidth(e) {
2682    let t;
2683    const i = e.width, s = e.initialWidth;
2684    return i != null ? t = i : s != null ? t = s : t = 200, Math.max(Math.min(t, this.maxWidth), this.minWidth);
2685  }
2686  isEmptyGroup() {
2687    return !1;
2688  }
2689  isRowGroupDisplayed(e) {
2690    return this.beans.showRowGroupCols?.isRowGroupDisplayed(this, e) ?? !1;
2691  }
2692  isPrimary() {
2693    return this.primary;
2694  }
2695  isFilterAllowed() {
2696    return !!this.colDef.filter;
2697  }
2698  isFieldContainsDots() {
2699    return this.fieldContainsDots;
2700  }
2701  isTooltipEnabled() {
2702    return this.tooltipEnabled;
2703  }
2704  isTooltipFieldContainsDots() {
2705    return this.tooltipFieldContainsDots;
2706  }
2707  getHighlighted() {
2708    return this.highlighted;
2709  }
2710  addEventListener(e, t) {
2711    this.frameworkEventListenerService = this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(
2712      this.frameworkEventListenerService,
2713      this.colEventSvc
2714    );
2715    const i = this.frameworkEventListenerService?.wrap(t) ?? t;
2716    this.colEventSvc.addEventListener(e, i);
2717  }
2718  removeEventListener(e, t) {
2719    const i = this.frameworkEventListenerService?.unwrap(t) ?? t;
2720    this.colEventSvc.removeEventListener(e, i);
2721  }
2722  createColumnFunctionCallbackParams(e) {
2723    return this.gos.addGridCommonParams({
2724      node: e,
2725      data: e.data,
2726      column: this,
2727      colDef: this.colDef
2728    });
2729  }
2730  isSuppressNavigable(e) {
2731    return this.beans.cellNavigation?.isSuppressNavigable(this, e) ?? !1;
2732  }
2733  isCellEditable(e) {
2734    return this.beans.editSvc?.isCellEditable(this, e) ?? !1;
2735  }
2736  isSuppressFillHandle() {
2737    return !!this.colDef.suppressFillHandle;
2738  }
2739  isAutoHeight() {
2740    return !!this.colDef.autoHeight;
2741  }
2742  isAutoHeaderHeight() {
2743    return !!this.colDef.autoHeaderHeight;
2744  }
2745  isRowDrag(e) {
2746    return this.isColumnFunc(e, this.colDef.rowDrag);
2747  }
2748  isDndSource(e) {
2749    return this.isColumnFunc(e, this.colDef.dndSource);
2750  }
2751  isCellCheckboxSelection(e) {
2752    return this.beans.selectionSvc?.isCellCheckboxSelection(this, e) ?? !1;
2753  }
2754  isSuppressPaste(e) {
2755    return this.isColumnFunc(e, this.colDef?.suppressPaste ?? null);
2756  }
2757  isResizable() {
2758    return !!this.getColDefValue("resizable");
2759  }
2760  /** Get value from ColDef or default if it exists. */
2761  getColDefValue(e) {
2762    return this.colDef[e] ?? Pg[e];
2763  }
2764  isColumnFunc(e, t) {
2765    if (typeof t == "boolean")
2766      return t;
2767    if (typeof t == "function") {
2768      const i = this.createColumnFunctionCallbackParams(e);
2769      return t(i);
2770    }
2771    return !1;
2772  }
2773  createColumnEvent(e, t) {
2774    return this.gos.addGridCommonParams({
2775      type: e,
2776      column: this,
2777      columns: [this],
2778      source: t
2779    });
2780  }
2781  isMoving() {
2782    return this.moving;
2783  }
2784  getSort() {
2785    return this.sort;
2786  }
2787  isSortable() {
2788    return !!this.getColDefValue("sortable");
2789  }
2790  /** @deprecated v32 use col.getSort() === 'asc */
2791  isSortAscending() {
2792    return this.sort === "asc";
2793  }
2794  /** @deprecated v32 use col.getSort() === 'desc */
2795  isSortDescending() {
2796    return this.sort === "desc";
2797  }
2798  /** @deprecated v32 use col.getSort() === undefined */
2799  isSortNone() {
2800    return Y(this.sort);
2801  }
2802  /** @deprecated v32 use col.getSort() !== undefined */
2803  isSorting() {
2804    return A(this.sort);
2805  }
2806  getSortIndex() {
2807    return this.sortIndex;
2808  }
2809  isMenuVisible() {
2810    return this.menuVisible;
2811  }
2812  getAggFunc() {
2813    return this.aggFunc;
2814  }
2815  getLeft() {
2816    return this.left;
2817  }
2818  getOldLeft() {
2819    return this.oldLeft;
2820  }
2821  getRight() {
2822    return this.left + this.actualWidth;
2823  }
2824  setLeft(e, t) {
2825    this.oldLeft = this.left, this.left !== e && (this.left = e, this.dispatchColEvent("leftChanged", t));
2826  }
2827  isFilterActive() {
2828    return this.filterActive;
2829  }
2830  /** @deprecated v33 Use `api.isColumnHovered(column)` instead. */
2831  isHovered() {
2832    return x(261), !!this.beans.colHover?.isHovered(this);
2833  }
2834  setFirstRightPinned(e, t) {
2835    this.firstRightPinned !== e && (this.firstRightPinned = e, this.dispatchColEvent("firstRightPinnedChanged", t));
2836  }
2837  setLastLeftPinned(e, t) {
2838    this.lastLeftPinned !== e && (this.lastLeftPinned = e, this.dispatchColEvent("lastLeftPinnedChanged", t));
2839  }
2840  isFirstRightPinned() {
2841    return this.firstRightPinned;
2842  }
2843  isLastLeftPinned() {
2844    return this.lastLeftPinned;
2845  }
2846  isPinned() {
2847    return this.pinned === "left" || this.pinned === "right";
2848  }
2849  isPinnedLeft() {
2850    return this.pinned === "left";
2851  }
2852  isPinnedRight() {
2853    return this.pinned === "right";
2854  }
2855  getPinned() {
2856    return this.pinned;
2857  }
2858  setVisible(e, t) {
2859    const i = e === !0;
2860    this.visible !== i && (this.visible = i, this.dispatchColEvent("visibleChanged", t)), this.dispatchStateUpdatedEvent("hide");
2861  }
2862  isVisible() {
2863    return this.visible;
2864  }
2865  isSpanHeaderHeight() {
2866    return !this.getColDef().suppressSpanHeaderHeight;
2867  }
2868  getColumnGroupPaddingInfo() {
2869    let e = this.getParent();
2870    if (!e || !e.isPadding())
2871      return { numberOfParents: 0, isSpanningTotal: !1 };
2872    const t = e.getPaddingLevel() + 1;
2873    let i = !0;
2874    for (; e; ) {
2875      if (!e.isPadding()) {
2876        i = !1;
2877        break;
2878      }
2879      e = e.getParent();
2880    }
2881    return { numberOfParents: t, isSpanningTotal: i };
2882  }
2883  getColDef() {
2884    return this.colDef;
2885  }
2886  getDefinition() {
2887    return this.colDef;
2888  }
2889  getColumnGroupShow() {
2890    return this.colDef.columnGroupShow;
2891  }
2892  getColId() {
2893    return this.colId;
2894  }
2895  getId() {
2896    return this.colId;
2897  }
2898  getUniqueId() {
2899    return this.colId;
2900  }
2901  getActualWidth() {
2902    return this.actualWidth;
2903  }
2904  getAutoHeaderHeight() {
2905    return this.autoHeaderHeight;
2906  }
2907  /** Returns true if the header height has changed */
2908  setAutoHeaderHeight(e) {
2909    const t = e !== this.autoHeaderHeight;
2910    return this.autoHeaderHeight = e, t;
2911  }
2912  createBaseColDefParams(e) {
2913    return this.gos.addGridCommonParams({
2914      node: e,
2915      data: e.data,
2916      colDef: this.colDef,
2917      column: this
2918    });
2919  }
2920  getColSpan(e) {
2921    if (Y(this.colDef.colSpan))
2922      return 1;
2923    const t = this.createBaseColDefParams(e), i = this.colDef.colSpan(t);
2924    return Math.max(i, 1);
2925  }
2926  getRowSpan(e) {
2927    if (Y(this.colDef.rowSpan))
2928      return 1;
2929    const t = this.createBaseColDefParams(e), i = this.colDef.rowSpan(t);
2930    return Math.max(i, 1);
2931  }
2932  setActualWidth(e, t, i = !1) {
2933    e = Math.max(e, this.minWidth), e = Math.min(e, this.maxWidth), this.actualWidth !== e && (this.actualWidth = e, this.flex && t !== "flex" && t !== "gridInitializing" && (this.flex = null), i || this.fireColumnWidthChangedEvent(t)), this.dispatchStateUpdatedEvent("width");
2934  }
2935  fireColumnWidthChangedEvent(e) {
2936    this.dispatchColEvent("widthChanged", e);
2937  }
2938  isGreaterThanMax(e) {
2939    return e > this.maxWidth;
2940  }
2941  getMinWidth() {
2942    return this.minWidth;
2943  }
2944  getMaxWidth() {
2945    return this.maxWidth;
2946  }
2947  getFlex() {
2948    return this.flex;
2949  }
2950  isRowGroupActive() {
2951    return this.rowGroupActive;
2952  }
2953  isPivotActive() {
2954    return this.pivotActive;
2955  }
2956  isAnyFunctionActive() {
2957    return this.isPivotActive() || this.isRowGroupActive() || this.isValueActive();
2958  }
2959  isAnyFunctionAllowed() {
2960    return this.isAllowPivot() || this.isAllowRowGroup() || this.isAllowValue();
2961  }
2962  isValueActive() {
2963    return this.aggregationActive;
2964  }
2965  isAllowPivot() {
2966    return this.colDef.enablePivot === !0;
2967  }
2968  isAllowValue() {
2969    return this.colDef.enableValue === !0;
2970  }
2971  isAllowRowGroup() {
2972    return this.colDef.enableRowGroup === !0;
2973  }
2974  dispatchColEvent(e, t, i) {
2975    const s = this.createColumnEvent(e, t);
2976    i && ce(s, i), this.colEventSvc.dispatchEvent(s);
2977  }
2978  dispatchStateUpdatedEvent(e) {
2979    this.colEventSvc.dispatchEvent({
2980      type: "columnStateUpdated",
2981      key: e
2982    });
2983  }
2984};
2985function fe(e) {
2986  return e instanceof Fs;
2987}
2988var Fs = class extends y {
2989  constructor(e, t, i, s) {
2990    super(), this.colGroupDef = e, this.groupId = t, this.padding = i, this.level = s, this.isColumn = !1, this.expandable = !1, this.instanceId = _l(), this.expandableListenerRemoveCallback = null, this.expanded = !!e?.openByDefault;
2991  }
2992  destroy() {
2993    this.expandableListenerRemoveCallback && this.reset(null, void 0), super.destroy();
2994  }
2995  reset(e, t) {
2996    this.colGroupDef = e, this.level = t, this.originalParent = null, this.expandableListenerRemoveCallback && this.expandableListenerRemoveCallback(), this.children = void 0, this.expandable = void 0;
2997  }
2998  getInstanceId() {
2999    return this.instanceId;
3000  }
3001  getOriginalParent() {
3002    return this.originalParent;
3003  }
3004  getLevel() {
3005    return this.level;
3006  }
3007  isVisible() {
3008    return this.children ? this.children.some((e) => e.isVisible()) : !1;
3009  }
3010  isPadding() {
3011    return this.padding;
3012  }
3013  setExpanded(e) {
3014    this.expanded = e === void 0 ? !1 : e, this.dispatchLocalEvent({ type: "expandedChanged" });
3015  }
3016  isExpandable() {
3017    return this.expandable;
3018  }
3019  isExpanded() {
3020    return this.expanded;
3021  }
3022  getGroupId() {
3023    return this.groupId;
3024  }
3025  getId() {
3026    return this.getGroupId();
3027  }
3028  setChildren(e) {
3029    this.children = e;
3030  }
3031  getChildren() {
3032    return this.children;
3033  }
3034  getColGroupDef() {
3035    return this.colGroupDef;
3036  }
3037  getLeafColumns() {
3038    const e = [];
3039    return this.addLeafColumns(e), e;
3040  }
3041  addLeafColumns(e) {
3042    this.children && this.children.forEach((t) => {
3043      yt(t) ? e.push(t) : fe(t) && t.addLeafColumns(e);
3044    });
3045  }
3046  getColumnGroupShow() {
3047    const e = this.colGroupDef;
3048    if (e)
3049      return e.columnGroupShow;
3050  }
3051  // need to check that this group has at least one col showing when both expanded and contracted.
3052  // if not, then we don't allow expanding and contracting on this group
3053  setupExpandable() {
3054    this.setExpandable(), this.expandableListenerRemoveCallback && this.expandableListenerRemoveCallback();
3055    const e = this.onColumnVisibilityChanged.bind(this);
3056    this.getLeafColumns().forEach((t) => t.addEventListener("visibleChanged", e)), this.expandableListenerRemoveCallback = () => {
3057      this.getLeafColumns().forEach((t) => t.removeEventListener("visibleChanged", e)), this.expandableListenerRemoveCallback = null;
3058    };
3059  }
3060  setExpandable() {
3061    if (this.isPadding())
3062      return;
3063    let e = !1, t = !1, i = !1;
3064    const s = this.findChildrenRemovingPadding();
3065    for (let n = 0, r = s.length; n < r; n++) {
3066      const a = s[n];
3067      if (!a.isVisible())
3068        continue;
3069      const l = a.getColumnGroupShow();
3070      l === "open" ? (e = !0, i = !0) : l === "closed" ? (t = !0, i = !0) : (e = !0, t = !0);
3071    }
3072    const o = e && t && i;
3073    this.expandable !== o && (this.expandable = o, this.dispatchLocalEvent({ type: "expandableChanged" }));
3074  }
3075  findChildrenRemovingPadding() {
3076    const e = [], t = (i) => {
3077      i.forEach((s) => {
3078        fe(s) && s.isPadding() ? t(s.children) : e.push(s);
3079      });
3080    };
3081    return t(this.children), e;
3082  }
3083  onColumnVisibilityChanged() {
3084    this.setExpandable();
3085  }
3086}, Dg = {
3087  numericColumn: {
3088    headerClass: "ag-right-aligned-header",
3089    cellClass: "ag-right-aligned-cell"
3090  },
3091  rightAligned: {
3092    headerClass: "ag-right-aligned-header",
3093    cellClass: "ag-right-aligned-cell"
3094  }
3095}, Ag = class {
3096  constructor() {
3097    this.existingKeys = {};
3098  }
3099  addExistingKeys(e) {
3100    for (let t = 0; t < e.length; t++)
3101      this.existingKeys[e[t]] = !0;
3102  }
3103  getUniqueKey(e, t) {
3104    e = Xo(e);
3105    let i = 0;
3106    for (; ; ) {
3107      let s = e ?? t;
3108      if (s ? i !== 0 && (s += "_" + i) : s = i, !this.existingKeys[s])
3109        return this.existingKeys[s] = !0, String(s);
3110      i++;
3111    }
3112  }
3113}, ta = Object.freeze([]);
3114function W(e) {
3115  if (e?.length)
3116    return e[e.length - 1];
3117}
3118function Wt(e, t, i) {
3119  return e == null && t == null ? !0 : e != null && t != null && e.length === t.length && e.every((s, o) => i ? i(s, t[o]) : t[o] === s);
3120}
3121function Tg(e) {
3122  return e.sort((t, i) => t - i);
3123}
3124function Ve(e, t) {
3125  const i = e.indexOf(t);
3126  i >= 0 && e.splice(i, 1);
3127}
3128function ia(e, t, i) {
3129  for (let s = 0; s < t.length; s++)
3130    Ve(e, t[s]);
3131  for (let s = t.length - 1; s >= 0; s--)
3132    e.splice(i, 0, t[s]);
3133}
3134function Ul(e, t) {
3135  const i = [], s = [], o = [];
3136  return e.forEach((r) => {
3137    const a = r.getColDef().lockPosition;
3138    a === "right" ? o.push(r) : a === "left" || a === !0 ? i.push(r) : s.push(r);
3139  }), t.get("enableRtl") ? [...o, ...s, ...i] : [...i, ...s, ...o];
3140}
3141function $l(e, t) {
3142  let i = !0;
3143  return rt(null, t, (s) => {
3144    if (!fe(s))
3145      return;
3146    const o = s, n = o.getColGroupDef();
3147    if (!(n && n.marryChildren))
3148      return;
3149    const a = [];
3150    o.getLeafColumns().forEach((h) => {
3151      const g = e.indexOf(h);
3152      a.push(g);
3153    });
3154    const l = Math.max.apply(Math, a), d = Math.min.apply(Math, a), c = l - d, u = o.getLeafColumns().length - 1;
3155    c > u && (i = !1);
3156  }), i;
3157}
3158function Kl(e, t) {
3159  if (!e || e.length == 0)
3160    return;
3161  const i = t(e[0]);
3162  for (let s = 1; s < e.length; s++)
3163    if (i !== t(e[s]))
3164      return;
3165  return i;
3166}
3167function jl(e, t, i) {
3168  if (!t.length)
3169    return;
3170  const s = t.length === 1 ? t[0] : null, o = Kl(t, (n) => n.getPinned());
3171  e.dispatchEvent({
3172    type: "columnPinned",
3173    // mistake in typing, 'undefined' should be allowed, as 'null' means 'not pinned'
3174    pinned: o ?? null,
3175    columns: t,
3176    column: s,
3177    source: i
3178  });
3179}
3180function Mg(e, t, i) {
3181  if (!t.length)
3182    return;
3183  const s = t.length === 1 ? t[0] : null, o = Kl(t, (n) => n.isVisible());
3184  e.dispatchEvent({
3185    type: "columnVisible",
3186    visible: o,
3187    columns: t,
3188    column: s,
3189    source: i
3190  });
3191}
3192function Ig(e, t, i, s) {
3193  e.dispatchEvent({
3194    type: t,
3195    columns: i,
3196    column: i && i.length == 1 ? i[0] : null,
3197    source: s
3198  });
3199}
3200function Ci(e, t, i, s, o = null) {
3201  t?.length && e.dispatchEvent({
3202    type: "columnResized",
3203    columns: t,
3204    column: t.length === 1 ? t[0] : null,
3205    flexColumns: o,
3206    finished: i,
3207    source: s
3208  });
3209}
3210function He(e, t, i) {
3211  const {
3212    colModel: s,
3213    rowGroupColsSvc: o,
3214    pivotColsSvc: n,
3215    autoColSvc: r,
3216    selectionColSvc: a,
3217    colAnimation: l,
3218    visibleCols: d,
3219    pivotResultCols: c,
3220    environment: u,
3221    valueColsSvc: h,
3222    eventSvc: g,
3223    gos: p
3224  } = e, f = s.getColDefCols() || [];
3225  if (!f?.length)
3226    return !1;
3227  if (t?.state && !t.state.forEach)
3228    return x(32), !1;
3229  const m = (v, P, T, D, R) => {
3230    if (!v)
3231      return;
3232    const E = Vg(P, t.defaultState), k = E("flex").value1;
3233    if (id(
3234      e,
3235      v,
3236      E("hide").value1,
3237      E("sort").value1,
3238      E("sortIndex").value1,
3239      E("pinned").value1,
3240      k,
3241      i
3242    ), k == null) {
3243      const K = E("width").value1;
3244      if (K != null) {
3245        const Ee = v.getColDef().minWidth ?? u.getDefaultColumnMinWidth();
3246        Ee != null && K >= Ee && v.setActualWidth(K, i);
3247      }
3248    }
3249    R || !v.isPrimary() || (h?.syncColumnWithState(v, i, E), o?.syncColumnWithState(v, i, E, T), n?.syncColumnWithState(v, i, E, D));
3250  }, C = (v, P, T) => {
3251    const D = ql(e, i), R = P.slice(), E = {}, k = {}, K = [], Ee = [], Fe = [];
3252    let ze = 0;
3253    const re = o?.columns.slice() ?? [], Pt = n?.columns.slice() ?? [];
3254    v.forEach((ae) => {
3255      const Je = ae.colId;
3256      if (Je.startsWith(Js)) {
3257        K.push(ae), Fe.push(ae);
3258        return;
3259      }
3260      if (Qe(Je)) {
3261        Ee.push(ae), Fe.push(ae);
3262        return;
3263      }
3264      const _e = T(Je);
3265      _e ? (m(_e, ae, E, k, !1), Ve(R, _e)) : (Fe.push(ae), ze += 1);
3266    });
3267    const Et = (ae) => m(ae, null, E, k, !1);
3268    R.forEach(Et), o?.sortColumns(sa.bind(o, E, re)), n?.sortColumns(sa.bind(n, k, Pt)), s.refreshCols(!1);
3269    const Ut = (ae, Je, $t = []) => {
3270      Je.forEach((_e) => {
3271        const Kt = ae(_e.colId);
3272        Ve($t, Kt), m(Kt, _e, null, null, !0);
3273      }), $t.forEach(Et);
3274    };
3275    return Ut(
3276      (ae) => r?.getAutoCol(ae) ?? null,
3277      K,
3278      r?.getAutoCols()?.slice()
3279    ), Ut(
3280      (ae) => a?.getSelectionCol(ae) ?? null,
3281      Ee,
3282      a?.getSelectionCols()?.slice()
3283    ), Lg(t, s, p), d.refresh(i), g.dispatchEvent({
3284      type: "columnEverythingChanged",
3285      source: i
3286    }), D(), { unmatchedAndAutoStates: Fe, unmatchedCount: ze };
3287  };
3288  l?.start();
3289  let { unmatchedAndAutoStates: w, unmatchedCount: S } = C(
3290    t.state || [],
3291    f,
3292    (v) => s.getColDefCol(v)
3293  );
3294  if (w.length > 0 || A(t.defaultState)) {
3295    const v = c?.getPivotResultCols()?.list ?? [];
3296    S = C(
3297      w,
3298      v,
3299      (P) => c?.getPivotResultCol(P) ?? null
3300    ).unmatchedCount;
3301  }
3302  return l?.finish(), S === 0;
3303}
3304function kg(e, t) {
3305  const { colModel: i, autoColSvc: s } = e;
3306  if (!i.getColDefCols()?.length)
3307    return;
3308  const n = i.getColDefColTree(), r = Jl(n), a = [];
3309  let l = 1e3, d = 1e3, c = [];
3310  const u = s?.getAutoCols();
3311  u && (c = c.concat(u)), r && (c = c.concat(r)), c.forEach((h) => {
3312    const g = Yl(h);
3313    Y(g.rowGroupIndex) && g.rowGroup && (g.rowGroupIndex = l++), Y(g.pivotIndex) && g.pivot && (g.pivotIndex = d++), a.push(g);
3314  }), He(e, { state: a, applyOrder: !0 }, t);
3315}
3316function ql(e, t) {
3317  const { rowGroupColsSvc: i, pivotColsSvc: s, valueColsSvc: o, colModel: n, sortSvc: r, eventSvc: a } = e, l = {
3318    rowGroupColumns: i?.columns.slice() ?? [],
3319    pivotColumns: s?.columns.slice() ?? [],
3320    valueColumns: o?.columns.slice() ?? []
3321  }, d = es(e), c = {};
3322  return d.forEach((u) => {
3323    c[u.colId] = u;
3324  }), () => {
3325    const u = n.getAllCols(), h = (D, R, E, k) => {
3326      const K = R.map(k), Ee = E.map(k);
3327      if (Wt(K, Ee))
3328        return;
3329      const ze = new Set(R);
3330      E.forEach((Pt) => {
3331        ze.delete(Pt) || ze.add(Pt);
3332      });
3333      const re = [...ze];
3334      a.dispatchEvent({
3335        type: D,
3336        columns: re,
3337        column: re.length === 1 ? re[0] : null,
3338        source: t
3339      });
3340    }, g = (D) => {
3341      const R = [];
3342      return u.forEach((E) => {
3343        const k = c[E.getColId()];
3344        k && D(k, E) && R.push(E);
3345      }), R;
3346    }, p = (D) => D.getColId();
3347    h(
3348      "columnRowGroupChanged",
3349      l.rowGroupColumns,
3350      i?.columns ?? [],
3351      p
3352    ), h(
3353      "columnPivotChanged",
3354      l.pivotColumns,
3355      s?.columns ?? [],
3356      p
3357    );
3358    const m = g((D, R) => {
3359      const E = D.aggFunc != null, k = E != R.isValueActive(), K = E && D.aggFunc != R.getAggFunc();
3360      return k || K;
3361    });
3362    m.length > 0 && Ig(a, "columnValueChanged", m, t), Ci(a, g((D, R) => D.width != R.getActualWidth()), !0, t), jl(a, g((D, R) => D.pinned != R.getPinned()), t), Mg(a, g((D, R) => D.hide == R.isVisible()), t);
3363    const P = g((D, R) => D.sort != R.getSort() || D.sortIndex != R.getSortIndex());
3364    P.length > 0 && r?.dispatchSortChangedEvents(t, P);
3365    const T = es(e);
3366    Gg(d, T, t, n, a);
3367  };
3368}
3369function es(e) {
3370  const { colModel: t, rowGroupColsSvc: i, pivotColsSvc: s } = e, o = t.getColDefCols();
3371  if (Y(o) || !t.isAlive())
3372    return [];
3373  const n = t.getAllCols(), r = i?.columns, a = s?.columns, l = (u) => {
3374    const h = u.isRowGroupActive() && r ? r.indexOf(u) : null, g = u.isPivotActive() && a ? a.indexOf(u) : null, p = u.isValueActive() ? u.getAggFunc() : null, f = u.getSort() != null ? u.getSort() : null, m = u.getSortIndex() != null ? u.getSortIndex() : null;
3375    return {
3376      colId: u.getColId(),
3377      width: u.getActualWidth(),
3378      hide: !u.isVisible(),
3379      pinned: u.getPinned(),
3380      sort: f,
3381      sortIndex: m,
3382      aggFunc: p,
3383      rowGroup: u.isRowGroupActive(),
3384      rowGroupIndex: h,
3385      pivot: u.isPivotActive(),
3386      pivotIndex: g,
3387      flex: u.getFlex() ?? null
3388    };
3389  }, d = n.map((u) => l(u)), c = new Map(
3390    t.getCols().map((u, h) => [u.getColId(), h])
3391  );
3392  return d.sort((u, h) => {
3393    const g = c.has(u.colId) ? c.get(u.colId) : -1, p = c.has(h.colId) ? c.get(h.colId) : -1;
3394    return g - p;
3395  }), d;
3396}
3397function Yl(e) {
3398  const t = (p, f) => p ?? f ?? null, i = e.getColDef(), s = t(i.sort, i.initialSort), o = t(i.sortIndex, i.initialSortIndex), n = t(i.hide, i.initialHide), r = t(i.pinned, i.initialPinned), a = t(i.width, i.initialWidth), l = t(i.flex, i.initialFlex);
3399  let d = t(i.rowGroupIndex, i.initialRowGroupIndex), c = t(i.rowGroup, i.initialRowGroup);
3400  d == null && (c == null || c == !1) && (d = null, c = null);
3401  let u = t(i.pivotIndex, i.initialPivotIndex), h = t(i.pivot, i.initialPivot);
3402  u == null && (h == null || h == !1) && (u = null, h = null);
3403  const g = t(i.aggFunc, i.initialAggFunc);
3404  return {
3405    colId: e.getColId(),
3406    sort: s,
3407    sortIndex: o,
3408    hide: n,
3409    pinned: r,
3410    width: a,
3411    flex: l,
3412    rowGroup: c,
3413    rowGroupIndex: d,
3414    pivot: h,
3415    pivotIndex: u,
3416    aggFunc: g
3417  };
3418}
3419function Lg(e, t, i) {
3420  if (!e.applyOrder || !e.state)
3421    return;
3422  const s = [];
3423  e.state.forEach((o) => {
3424    o.colId != null && s.push(o.colId);
3425  }), Og(t.cols, s, t, i);
3426}
3427function Og(e, t, i, s) {
3428  if (e == null)
3429    return;
3430  let o = [];
3431  const n = {};
3432  t.forEach((a) => {
3433    if (n[a])
3434      return;
3435    const l = e.map[a];
3436    l && (o.push(l), n[a] = !0);
3437  });
3438  let r = 0;
3439  if (e.list.forEach((a) => {
3440    const l = a.getColId();
3441    if (n[l] != null)
3442      return;
3443    l.startsWith(Js) ? o.splice(r++, 0, a) : o.push(a);
3444  }), o = Ul(o, s), !$l(o, i.getColTree())) {
3445    x(39);
3446    return;
3447  }
3448  e.list = o;
3449}
3450function Gg(e, t, i, s, o) {
3451  const n = {};
3452  t.forEach((c) => n[c.colId] = c);
3453  const r = {};
3454  e.forEach((c) => {
3455    n[c.colId] && (r[c.colId] = !0);
3456  });
3457  const a = e.filter((c) => r[c.colId]), l = t.filter((c) => r[c.colId]), d = [];
3458  l.forEach((c, u) => {
3459    const h = a && a[u];
3460    if (h && h.colId !== c.colId) {
3461      const g = s.getCol(h.colId);
3462      g && d.push(g);
3463    }
3464  }), d.length && o.dispatchEvent({
3465    type: "columnMoved",
3466    columns: d,
3467    column: d.length === 1 ? d[0] : null,
3468    finished: !0,
3469    source: i
3470  });
3471}
3472var sa = (e, t, i, s) => {
3473  const o = e[i.getId()], n = e[s.getId()], r = o != null, a = n != null;
3474  if (r && a)
3475    return o - n;
3476  if (r)
3477    return -1;
3478  if (a)
3479    return 1;
3480  const l = t.indexOf(i), d = t.indexOf(s), c = l >= 0, u = d >= 0;
3481  return c && u ? l - d : c ? -1 : 1;
3482}, Ql = "ag-Grid-SelectionColumn", Hg = class extends y {
3483  constructor() {
3484    super(...arguments), this.beanName = "selectionColSvc";
3485  }
3486  postConstruct() {
3487    this.addManagedPropertyListener("rowSelection", (e) => {
3488      this.onSelectionOptionsChanged(
3489        e.currentValue,
3490        e.previousValue,
3491        ni(e.source)
3492      );
3493    });
3494  }
3495  addSelectionCols(e) {
3496    const t = this.selectionCols;
3497    t != null && (e.list = t.list.concat(e.list), e.tree = t.tree.concat(e.tree), Ng(e));
3498  }
3499  createSelectionCols(e, t) {
3500    const i = () => {
3501      Bs(this.beans, this.selectionCols?.tree), this.selectionCols = null;
3502    }, s = e.treeDepth, n = (this.selectionCols?.treeDepth ?? -1) == s, r = this.generateSelectionCols();
3503    if (Bg(r, this.selectionCols?.list ?? []) && n)
3504      return;
3505    i();
3506    const { colGroupSvc: l } = this.beans, d = l?.findDepth(e.tree) ?? 0, c = l?.balanceTreeForAutoCols(r, d) ?? [];
3507    this.selectionCols = {
3508      list: r,
3509      tree: c,
3510      treeDepth: d,
3511      map: {}
3512    }, t((h) => {
3513      if (!h)
3514        return null;
3515      const g = h.filter((p) => !Qe(p));
3516      return [...r, ...g];
3517    });
3518  }
3519  isSelectionColumnEnabled() {
3520    const { gos: e, beans: t } = this, i = e.get("rowSelection");
3521    if (typeof i != "object" || !It(e))
3522      return !1;
3523    const s = (t.autoColSvc?.getAutoCols()?.length ?? 0) > 0;
3524    if (i.checkboxLocation === "autoGroupColumn" && s)
3525      return !1;
3526    const o = !!oi(i), n = Rs(i);
3527    return o || n;
3528  }
3529  generateSelectionCols() {
3530    if (!this.isSelectionColumnEnabled())
3531      return [];
3532    const { gos: e, validation: t } = this.beans, i = e.get("selectionColumnDef"), o = {
3533      // overridable properties
3534      width: 50,
3535      resizable: !1,
3536      suppressHeaderMenuButton: !0,
3537      sortable: !1,
3538      suppressMovable: !0,
3539      lockPosition: e.get("enableRtl") ? "right" : "left",
3540      comparator(a, l, d, c) {
3541        const u = d.isSelected(), h = c.isSelected();
3542        return u === h ? 0 : u ? 1 : -1;
3543      },
3544      editable: !1,
3545      suppressFillHandle: !0,
3546      // overrides
3547      ...i,
3548      // non-overridable properties
3549      colId: Ql
3550    }, n = o.colId;
3551    t?.validateColDef(o, n, !0);
3552    const r = new _n(o, null, n, !1);
3553    return this.createBean(r), [r];
3554  }
3555  putSelectionColsFirstInList(e, t) {
3556    if (!t)
3557      return null;
3558    const i = t.filter((s) => !Qe(s));
3559    return [...e, ...i];
3560  }
3561  getSelectionCol(e) {
3562    return this.selectionCols?.list.find((t) => ed(t, e)) ?? null;
3563  }
3564  getSelectionCols() {
3565    return this.selectionCols?.list ?? null;
3566  }
3567  onSelectionOptionsChanged(e, t, i) {
3568    const s = t && typeof t != "string" ? oi(t) : void 0, o = e && typeof e != "string" ? oi(e) : void 0, n = s !== o, r = t && typeof t != "string" ? Rs(t) : void 0, a = e && typeof e != "string" ? Rs(e) : void 0, l = r !== a, d = on(e), c = on(t);
3569    (n || l || d !== c) && this.beans.colModel.refreshAll(i);
3570  }
3571  destroy() {
3572    Bs(this.beans, this.selectionCols?.tree), super.destroy();
3573  }
3574  refreshVisibility(e) {
3575    if (!this.isSelectionColumnEnabled())
3576      return;
3577    const t = this.beans, i = t.visibleCols.getAllTrees() ?? [];
3578    if (i.length !== 0) {
3579      if (!i.some(Zl)) {
3580        const s = es(t).find((o) => Qe(o.colId));
3581        s && He(
3582          t,
3583          {
3584            state: [{ colId: s.colId, hide: !s.hide }]
3585          },
3586          e
3587        );
3588      }
3589      if (i.length === 1) {
3590        const s = i[0], o = Xl(s);
3591        if (!o)
3592          return;
3593        He(t, { state: [{ colId: o.getColId(), hide: !0 }] }, e);
3594      }
3595    }
3596  }
3597}, Zl = (e) => e.isColumn ? Qe(e) : e.getChildren()?.some(Zl) ?? !1;
3598function Xl(e) {
3599  if (e.isColumn)
3600    return Qe(e) ? e : null;
3601  const t = e.getChildren() ?? [];
3602  for (const i of t) {
3603    const s = Xl(i);
3604    if (s)
3605      return s;
3606  }
3607  return null;
3608}
3609var Js = "ag-Grid-AutoColumn";
3610function Jl(e) {
3611  const t = [], i = (s) => {
3612    for (let o = 0; o < s.length; o++) {
3613      const n = s[o];
3614      yt(n) ? t.push(n) : fe(n) && i(n.getChildren());
3615    }
3616  };
3617  return i(e), t;
3618}
3619function tt(e) {
3620  return e.reduce((t, i) => t + i.getActualWidth(), 0);
3621}
3622function Bs(e, t, i) {
3623  const s = {};
3624  if (!t)
3625    return;
3626  rt(null, t, (n) => {
3627    s[n.getInstanceId()] = n;
3628  }), i && rt(null, i, (n) => {
3629    s[n.getInstanceId()] = null;
3630  });
3631  const o = Object.values(s).filter((n) => n != null);
3632  e.context.destroyBeans(o);
3633}
3634function Un(e) {
3635  return e.getId().startsWith(Js);
3636}
3637function Qe(e) {
3638  return (typeof e == "string" ? e : "getColId" in e ? e.getColId() : e.colId)?.startsWith(Ql) ?? !1;
3639}
3640function Ns(e) {
3641  let t = [];
3642  return e instanceof Array ? t = e : typeof e == "string" && (t = e.split(",")), t;
3643}
3644function Bg(e, t) {
3645  return Wt(e, t, (i, s) => i.getColId() === s.getColId());
3646}
3647function Ng(e) {
3648  e.map = {}, e.list.forEach((t) => e.map[t.getId()] = t);
3649}
3650function ni(e) {
3651  return e === "gridOptionsUpdated" ? "gridOptionsChanged" : e;
3652}
3653function ed(e, t) {
3654  const i = e === t, s = e.getColDef() === t, o = e.getColId() == t;
3655  return i || s || o;
3656}
3657var Vg = (e, t) => (i, s) => {
3658  const o = {
3659    value1: void 0,
3660    value2: void 0
3661  };
3662  let n = !1;
3663  return e && (e[i] !== void 0 && (o.value1 = e[i], n = !0), A(s) && e[s] !== void 0 && (o.value2 = e[s], n = !0)), !n && t && (t[i] !== void 0 && (o.value1 = t[i]), A(s) && t[s] !== void 0 && (o.value2 = t[s])), o;
3664};
3665function Wg(e, t = null, i, s, o) {
3666  const n = new Ag(), { existingCols: r, existingGroups: a, existingColKeys: l } = zg(s);
3667  n.addExistingKeys(l);
3668  const d = td(
3669    e,
3670    t,
3671    0,
3672    i,
3673    r,
3674    n,
3675    a,
3676    o
3677  ), { colGroupSvc: c } = e, u = c?.findMaxDepth(d, 0) ?? 0, h = c ? c.balanceColumnTree(d, 0, u, n) : d;
3678  return rt(null, h, (p, f) => {
3679    fe(p) && p.setupExpandable(), p.originalParent = f;
3680  }), {
3681    columnTree: h,
3682    treeDept: u
3683  };
3684}
3685function zg(e) {
3686  const t = [], i = [], s = [];
3687  return e && rt(null, e, (o) => {
3688    if (fe(o)) {
3689      const n = o;
3690      i.push(n);
3691    } else {
3692      const n = o;
3693      s.push(n.getId()), t.push(n);
3694    }
3695  }), { existingCols: t, existingGroups: i, existingColKeys: s };
3696}
3697function td(e, t, i, s, o, n, r, a) {
3698  if (!t)
3699    return [];
3700  const { colGroupSvc: l } = e, d = new Array(t.length);
3701  for (let c = 0; c < d.length; c++) {
3702    const u = t[c];
3703    l && qg(u) ? d[c] = l.createProvidedColumnGroup(
3704      s,
3705      u,
3706      i,
3707      o,
3708      n,
3709      r,
3710      a
3711    ) : d[c] = _g(e, s, u, o, n, a);
3712  }
3713  return d;
3714}
3715function _g(e, t, i, s, o, n) {
3716  const r = $g(i, s);
3717  r && s?.splice(r.idx, 1);
3718  let a = r?.column;
3719  if (a) {
3720    const l = rn(e, i, a.getColId());
3721    a.setColDef(l, i, n), Ug(e, a, l, n);
3722  } else {
3723    const l = o.getUniqueKey(i.colId, i.field), d = rn(e, i, l);
3724    a = new _n(d, i, l, t), e.context.createBean(a);
3725  }
3726  return e.dataTypeSvc?.addColumnListeners(a), a;
3727}
3728function id(e, t, i, s, o, n, r, a) {
3729  const { sortSvc: l, pinnedCols: d, colFlex: c } = e;
3730  i !== void 0 && t.setVisible(!i, a), l && (l.updateColSort(t, s, a), o !== void 0 && l.setColSortIndex(t, o)), n !== void 0 && d?.setColPinned(t, n), r !== void 0 && c?.setColFlex(t, r);
3731}
3732function Ug(e, t, i, s) {
3733  id(
3734    e,
3735    t,
3736    i.hide,
3737    i.sort,
3738    i.sortIndex,
3739    i.pinned,
3740    i.flex,
3741    s
3742  );
3743  const o = t.getFlex();
3744  if (!(o != null && o > 0))
3745    if (i.width != null)
3746      t.setActualWidth(i.width, s);
3747    else {
3748      const n = t.getActualWidth();
3749      t.setActualWidth(n, s);
3750    }
3751}
3752function $g(e, t) {
3753  if (t)
3754    for (let i = 0; i < t.length; i++) {
3755      const s = t[i].getUserProvidedColDef();
3756      if (!s)
3757        continue;
3758      if (e.colId != null) {
3759        if (t[i].getId() === e.colId)
3760          return { idx: i, column: t[i] };
3761        continue;
3762      }
3763      if (e.field != null) {
3764        if (s.field === e.field)
3765          return { idx: i, column: t[i] };
3766        continue;
3767      }
3768      if (s === e)
3769        return { idx: i, column: t[i] };
3770    }
3771}
3772function rn(e, t, i, s) {
3773  const { gos: o, dataTypeSvc: n, validation: r } = e, a = {}, l = o.get("defaultColDef");
3774  ce(a, l, !1, !0);
3775  const d = Kg(e, a, t, i);
3776  d && jg(e, d, a), ce(a, t, !1, !0);
3777  const c = o.get("autoGroupColumnDef"), u = Ke(o);
3778  return t.rowGroup && c && u && ce(
3779    a,
3780    { sort: c.sort, initialSort: c.initialSort },
3781    !1,
3782    !0
3783  ), n?.validateColDef(a), r?.validateColDef(a, i, s), a;
3784}
3785function Kg(e, t, i, s) {
3786  const o = e.dataTypeSvc?.updateColDefAndGetColumnType(t, i, s), n = i.type ?? o ?? t.type;
3787  return t.type = n, n ? Ns(n) : void 0;
3788}
3789function jg(e, t, i) {
3790  if (!t.length)
3791    return;
3792  const s = Object.assign({}, Dg), o = e.gos.get("columnTypes") || {};
3793  for (const [n, r] of Object.entries(o))
3794    n in s ? x(34, { key: n }) : (r.type && x(35), s[n] = r);
3795  t.forEach((n) => {
3796    const r = s[n.trim()];
3797    r ? ce(i, r, !1, !0) : x(36, { t: n });
3798  });
3799}
3800function qg(e) {
3801  return e.children !== void 0;
3802}
3803function rt(e, t, i) {
3804  if (t)
3805    for (let s = 0; s < t.length; s++) {
3806      const o = t[s];
3807      fe(o) && rt(o, o.getChildren(), i), i(o, e);
3808    }
3809}
3810var Yg = class extends y {
3811  constructor() {
3812    super(...arguments), this.beanName = "colModel", this.pivotMode = !1, this.ready = !1, this.changeEventsDispat
3812ching = !1;
3813  }
3814  postConstruct() {
3815    this.pivotMode = this.gos.get("pivotMode"), this.addManagedPropertyListeners(
3816      ["groupDisplayType", "treeData", "treeDataDisplayType", "groupHideOpenParents"],
3817      (e) => this.refreshAll(ni(e.source))
3818    ), this.addManagedPropertyListeners(
3819      ["defaultColDef", "defaultColGroupDef", "columnTypes", "suppressFieldDotNotation"],
3820      (e) => this.recreateColumnDefs(ni(e.source))
3821    ), this.addManagedPropertyListener(
3822      "pivotMode",
3823      (e) => this.setPivotMode(this.gos.get("pivotMode"), ni(e.source))
3824    );
3825  }
3826  // called from SyncService, when grid has finished initialising
3827  createColsFromColDefs(e) {
3828    const { beans: t } = this, {
3829      valueCache: i,
3830      colAutosize: s,
3831      rowGroupColsSvc: o,
3832      pivotColsSvc: n,
3833      valueColsSvc: r,
3834      visibleCols: a,
3835      colViewport: l,
3836      eventSvc: d
3837    } = t, c = this.colDefs ? ql(t, e) : void 0;
3838    i?.expire();
3839    const u = this.colDefCols?.list, h = this.colDefCols?.tree, g = Wg(t, this.colDefs, !0, h, e);
3840    Bs(t, this.colDefCols?.tree, g.columnTree);
3841    const p = g.columnTree, f = g.treeDept, m = Jl(p), C = {};
3842    m.forEach((w) => C[w.getId()] = w), this.colDefCols = { tree: p, treeDepth: f, list: m, map: C }, o?.extractCols(e, u), n?.extractCols(e, u), r?.extractCols(e, u), this.ready = !0, this.refreshCols(!0), a.refresh(e), l.checkViewportColumns(), d.dispatchEvent({
3843      type: "columnEverythingChanged",
3844      source: e
3845    }), c && (this.changeEventsDispatching = !0, c(), this.changeEventsDispatching = !1), d.dispatchEvent({
3846      type: "newColumnsLoaded",
3847      source: e
3848    }), e === "gridInitializing" && s?.applyAutosizeStrategy();
3849  }
3850  // called from: buildAutoGroupColumns (events 'groupDisplayType', 'treeData', 'treeDataDisplayType', 'groupHideOpenParents')
3851  // createColsFromColDefs (recreateColumnDefs, setColumnsDefs),
3852  // setPivotMode, applyColumnState,
3853  // functionColsService.setPrimaryColList, functionColsService.updatePrimaryColList,
3854  // pivotResultCols.setPivotResultCols
3855  refreshCols(e) {
3856    if (!this.colDefCols)
3857      return;
3858    const t = this.cols?.tree;
3859    this.saveColOrder();
3860    const {
3861      autoColSvc: i,
3862      selectionColSvc: s,
3863      quickFilter: o,
3864      pivotResultCols: n,
3865      showRowGroupCols: r,
3866      rowAutoHeight: a,
3867      visibleCols: l,
3868      colViewport: d,
3869      eventSvc: c
3870    } = this.beans, u = this.selectCols(n, this.colDefCols);
3871    i?.createAutoCols(u, (p) => {
3872      this.lastOrder = p(this.lastOrder), this.lastPivotOrder = p(this.lastPivotOrder);
3873    }), i?.addAutoCols(u), s?.createSelectionCols(u, (p) => {
3874      this.lastOrder = p(this.lastOrder) ?? null, this.lastPivotOrder = p(this.lastPivotOrder) ?? null;
3875    }), s?.addSelectionCols(u);
3876    const h = ng(this.gos, this.showingPivotResult);
3877    (!e || h) && this.restoreColOrder(u), this.positionLockedCols(u), r?.refresh(), o?.refreshCols(), this.setColSpanActive(), a?.setAutoHeightActive(u), l.clear(), d.clear(), !Wt(t, this.cols.tree) && c.dispatchEvent({
3878      type: "gridColumnsChanged"
3879    });
3880  }
3881  selectCols(e, t) {
3882    const i = e?.getPivotResultCols() ?? null;
3883    this.showingPivotResult = i != null;
3884    const { map: s, list: o, tree: n, treeDepth: r } = i ?? t;
3885    return this.cols = {
3886      list: o.slice(),
3887      map: { ...s },
3888      tree: n.slice(),
3889      treeDepth: r
3890    }, i && (i.list.some((l) => this.cols?.map[l.getColId()] !== void 0) || (this.lastPivotOrder = null)), this.cols;
3891  }
3892  getColsToShow() {
3893    if (!this.cols)
3894      return [];
3895    const e = this.isPivotMode() && !this.showingPivotResult, t = this.beans.valueColsSvc?.columns;
3896    return this.cols.list.filter((s) => {
3897      const o = Un(s);
3898      if (e) {
3899        const n = t?.includes(s);
3900        return o || n;
3901      } else
3902        return o || s.isVisible();
3903    });
3904  }
3905  // on events 'groupDisplayType', 'treeData', 'treeDataDisplayType', 'groupHideOpenParents'
3906  refreshAll(e) {
3907    this.ready && (this.refreshCols(!1), this.beans.visibleCols.refresh(e));
3908  }
3909  setColsVisible(e, t = !1, i) {
3910    He(
3911      this.beans,
3912      {
3913        state: e.map((s) => ({
3914          colId: typeof s == "string" ? s : s.getColId(),
3915          hide: !t
3916        }))
3917      },
3918      i
3919    );
3920  }
3921  restoreColOrder(e) {
3922    const t = this.showingPivotResult ? this.lastPivotOrder : this.lastOrder;
3923    if (!t)
3924      return;
3925    const i = new Map(t.map((d, c) => [d, c]));
3926    if (!e.list.some((d) => i.has(d)))
3927      return;
3928    const o = new Map(e.list.map((d) => [d, !0])), n = t.filter((d) => o.has(d)), r = new Map(n.map((d) => [d, !0])), a = e.list.filter((d) => !r.has(d)), l = n.slice();
3929    a.forEach((d) => {
3930      let c = d.getOriginalParent();
3931      if (!c) {
3932        l.push(d);
3933        return;
3934      }
3935      const u = [];
3936      for (; !u.length && c; )
3937        c.getLeafColumns().forEach((f) => {
3938          const m = l.indexOf(f) >= 0, C = u.indexOf(f) < 0;
3939          m && C && u.push(f);
3940        }), c = c.getOriginalParent();
3941      if (!u.length) {
3942        l.push(d);
3943        return;
3944      }
3945      const h = u.map((p) => l.indexOf(p)), g = Math.max(...h);
3946      l.splice(g + 1, 0, d);
3947    }), e.list = l;
3948  }
3949  positionLockedCols(e) {
3950    e.list = Ul(e.list, this.gos);
3951  }
3952  saveColOrder() {
3953    this.showingPivotResult ? this.lastPivotOrder = this.cols?.list ?? null : this.lastOrder = this.cols?.list ?? null;
3954  }
3955  getColumnDefs() {
3956    return this.colDefCols ? this.beans.colDefFactory?.getColumnDefs(
3957      this.colDefCols.list,
3958      this.showingPivotResult,
3959      this.lastOrder,
3960      this.cols?.list ?? []
3961    ) : void 0;
3962  }
3963  setColSpanActive() {
3964    this.colSpanActive = !!this.cols?.list.some((e) => e.getColDef().colSpan != null);
3965  }
3966  isPivotMode() {
3967    return this.pivotMode;
3968  }
3969  setPivotMode(e, t) {
3970    if (e === this.pivotMode || (this.pivotMode = e, !this.ready))
3971      return;
3972    this.refreshCols(!1);
3973    const { visibleCols: i, eventSvc: s } = this.beans;
3974    i.refresh(t), s.dispatchEvent({
3975      type: "columnPivotModeChanged"
3976    });
3977  }
3978  // + clientSideRowModel
3979  isPivotActive() {
3980    const e = this.beans.pivotColsSvc?.columns;
3981    return this.pivotMode && !!e?.length;
3982  }
3983  // called when dataTypes change
3984  recreateColumnDefs(e) {
3985    this.cols && (this.beans.autoColSvc?.updateAutoCols(e), this.createColsFromColDefs(e));
3986  }
3987  setColumnDefs(e, t) {
3988    this.colDefs = e, this.createColsFromColDefs(t);
3989  }
3990  destroy() {
3991    Bs(this.beans, this.colDefCols?.tree), super.destroy();
3992  }
3993  getColTree() {
3994    return this.cols?.tree ?? [];
3995  }
3996  // + columnSelectPanel
3997  getColDefColTree() {
3998    return this.colDefCols?.tree ?? [];
3999  }
4000  // + clientSideRowController -> sorting, building quick filter text
4001  // + headerRenderer -> sorting (clearing icon)
4002  getColDefCols() {
4003    return this.colDefCols?.list ?? null;
4004  }
4005  // + moveColumnController
4006  getCols() {
4007    return this.cols?.list ?? [];
4008  }
4009  // returns colDefCols, pivotResultCols and autoCols
4010  getAllCols() {
4011    const { pivotResultCols: e, autoColSvc: t, selectionColSvc: i } = this.beans, s = e?.getPivotResultCols()?.list;
4012    return [
4013      this.colDefCols?.list ?? [],
4014      t?.autoCols?.list ?? [],
4015      i?.selectionCols?.list ?? [],
4016      s ?? []
4017    ].flat();
4018  }
4019  getColsForKeys(e) {
4020    return e ? e.map((t) => this.getCol(t)).filter((t) => t != null) : [];
4021  }
4022  getColDefCol(e) {
4023    return this.colDefCols?.list ? this.getColFromCollection(e, this.colDefCols) : null;
4024  }
4025  getCol(e) {
4026    return e == null ? null : this.getColFromCollection(e, this.cols);
4027  }
4028  getColFromCollection(e, t) {
4029    if (t == null)
4030      return null;
4031    const { map: i, list: s } = t;
4032    if (typeof e == "string" && i[e])
4033      return i[e];
4034    for (let o = 0; o < s.length; o++)
4035      if (ed(s[o], e))
4036        return s[o];
4037    return this.beans.autoColSvc?.getAutoCol(e) ?? null;
4038  }
4039}, sd = class {
4040  constructor() {
4041    this.existingIds = {};
4042  }
4043  getInstanceIdForKey(e) {
4044    const t = this.existingIds[e];
4045    let i;
4046    return typeof t != "number" ? i = 0 : i = t + 1, this.existingIds[e] = i, i;
4047  }
4048};
4049function ls(e, t, i) {
4050  return i && e.addDestroyFunc(() => t.destroyBean(i)), i ?? e;
4051}
4052var Qg = class {
4053  constructor(e) {
4054    this.cssClassStates = {}, this.getGui = e;
4055  }
4056  addCssClass(e) {
4057    this.addOrRemoveCssClass(e, !0);
4058  }
4059  removeCssClass(e) {
4060    this.addOrRemoveCssClass(e, !1);
4061  }
4062  containsCssClass(e) {
4063    const t = this.getGui();
4064    return t ? t.classList.contains(e) : !1;
4065  }
4066  addOrRemoveCssClass(e, t) {
4067    if (!e)
4068      return;
4069    if (e.indexOf(" ") >= 0) {
4070      const s = (e || "").split(" ");
4071      if (s.length > 1) {
4072        s.forEach((o) => this.addOrRemoveCssClass(o, t));
4073        return;
4074      }
4075    }
4076    if (this.cssClassStates[e] !== t && e.length) {
4077      const s = this.getGui();
4078      s && s.classList.toggle(e, t), this.cssClassStates[e] = t;
4079    }
4080  }
4081}, Zg = 0, M = null, _ = class extends y {
4082  constructor(e, t) {
4083    super(), this.suppressDataRefValidation = !1, this.displayed = !0, this.visible = !0, this.compId = Zg++, this.cssClassManager = new Qg(() => this.eGui), this.componentSelectors = new Map((t ?? []).map((i) => [i.selector, i])), e && this.setTemplate(e);
4084  }
4085  preConstruct() {
4086    this.wireTemplate(this.getGui());
4087    const e = "component-" + Object.getPrototypeOf(this)?.constructor?.name;
4088    this.css?.forEach((t) => this.beans.environment.addGlobalCSS(t, e));
4089  }
4090  wireTemplate(e, t) {
4091    e && this.gos && (this.applyElementsToComponent(e), this.createChildComponentsFromTags(e, t));
4092  }
4093  getCompId() {
4094    return this.compId;
4095  }
4096  getDataRefAttribute(e) {
4097    return e.getAttribute ? e.getAttribute("data-ref") : null;
4098  }
4099  applyElementsToComponent(e, t, i, s = null) {
4100    if (t === void 0 && (t = this.getDataRefAttribute(e)), t) {
4101      const o = this[t];
4102      if (o === M)
4103        this[t] = s ?? e;
4104      else {
4105        const n = i && i[t];
4106        if (!this.suppressDataRefValidation && !n)
4107          throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`);
4108      }
4109    }
4110  }
4111  // for registered components only, eg creates AgCheckbox instance from ag-checkbox HTML tag
4112  createChildComponentsFromTags(e, t) {
4113    qh(e.childNodes).forEach((s) => {
4114      if (!(s instanceof HTMLElement))
4115        return;
4116      const o = this.createComponentFromElement(
4117        s,
4118        (n) => {
4119          n.getGui() && this.copyAttributesFromNode(s, n.getGui());
4120        },
4121        t
4122      );
4123      if (o) {
4124        if (o.addItems && s.children.length) {
4125          this.createChildComponentsFromTags(s, t);
4126          const n = Array.prototype.slice.call(s.children);
4127          o.addItems(n);
4128        }
4129        this.swapComponentForNode(o, e, s);
4130      } else s.childNodes && this.createChildComponentsFromTags(s, t);
4131    });
4132  }
4133  createComponentFromElement(e, t, i) {
4134    const s = e.nodeName, o = this.getDataRefAttribute(e), n = s.indexOf("AG-") === 0, r = n ? this.componentSelectors.get(s) : null;
4135    let a = null;
4136    if (r) {
4137      const l = i && o ? i[o] : void 0;
4138      a = new r.component(l), a.setParentComponent(this), this.createBean(a, null, t);
4139    } else if (n)
4140      throw new Error(`selector: ${s}`);
4141    return this.applyElementsToComponent(e, o, i, a), a;
4142  }
4143  copyAttributesFromNode(e, t) {
4144    Yh(e.attributes, (i, s) => t.setAttribute(i, s));
4145  }
4146  swapComponentForNode(e, t, i) {
4147    const s = e.getGui();
4148    t.replaceChild(s, i), t.insertBefore(document.createComment(i.nodeName), s), this.addDestroyFunc(this.destroyBean.bind(this, e));
4149  }
4150  activateTabIndex(e) {
4151    const t = this.gos.get("tabIndex");
4152    e || (e = []), e.length || e.push(this.getGui()), e.forEach((i) => i.setAttribute("tabindex", t.toString()));
4153  }
4154  setTemplate(e, t, i) {
4155    const s = Qi(e);
4156    this.setTemplateFromElement(s, t, i);
4157  }
4158  setTemplateFromElement(e, t, i, s = !1) {
4159    if (this.eGui = e, this.suppressDataRefValidation = s, t)
4160      for (let o = 0; o < t.length; o++) {
4161        const n = t[o];
4162        this.componentSelectors.set(n.selector, n);
4163      }
4164    this.wireTemplate(e, i);
4165  }
4166  getGui() {
4167    return this.eGui;
4168  }
4169  getFocusableElement() {
4170    return this.eGui;
4171  }
4172  getAriaElement() {
4173    return this.getFocusableElement();
4174  }
4175  setParentComponent(e) {
4176    this.parentComponent = e;
4177  }
4178  getParentComponent() {
4179    return this.parentComponent;
4180  }
4181  // this method is for older code, that wants to provide the gui element,
4182  // it is not intended for this to be in ag-Stack
4183  setGui(e) {
4184    this.eGui = e;
4185  }
4186  queryForHtmlElement(e) {
4187    return this.eGui.querySelector(e);
4188  }
4189  getContainerAndElement(e, t) {
4190    let i = t;
4191    return e == null ? null : (i || (i = this.eGui), Bn(e) ? {
4192      element: e,
4193      parent: i
4194    } : {
4195      element: e.getGui(),
4196      parent: i
4197    });
4198  }
4199  prependChild(e, t) {
4200    const { element: i, parent: s } = this.getContainerAndElement(e, t) || {};
4201    !i || !s || s.insertAdjacentElement("afterbegin", i);
4202  }
4203  appendChild(e, t) {
4204    const { element: i, parent: s } = this.getContainerAndElement(e, t) || {};
4205    !i || !s || s.appendChild(i);
4206  }
4207  isDisplayed() {
4208    return this.displayed;
4209  }
4210  setVisible(e, t = {}) {
4211    if (e !== this.visible) {
4212      this.visible = e;
4213      const { skipAriaHidden: i } = t;
4214      _h(this.eGui, e, { skipAriaHidden: i });
4215    }
4216  }
4217  setDisplayed(e, t = {}) {
4218    if (e !== this.displayed) {
4219      this.displayed = e;
4220      const { skipAriaHidden: i } = t;
4221      Q(this.eGui, e, { skipAriaHidden: i });
4222      const s = {
4223        type: "displayChanged",
4224        visible: this.displayed
4225      };
4226      this.dispatchLocalEvent(s);
4227    }
4228  }
4229  destroy() {
4230    this.parentComponent && (this.parentComponent = void 0), super.destroy();
4231  }
4232  addGuiEventListener(e, t, i) {
4233    this.eGui.addEventListener(e, t, i), this.addDestroyFunc(() => this.eGui.removeEventListener(e, t));
4234  }
4235  addCssClass(e) {
4236    this.cssClassManager.addCssClass(e);
4237  }
4238  removeCssClass(e) {
4239    this.cssClassManager.removeCssClass(e);
4240  }
4241  containsCssClass(e) {
4242    return this.cssClassManager.containsCssClass(e);
4243  }
4244  addOrRemoveCssClass(e, t) {
4245    this.cssClassManager.addOrRemoveCssClass(e, t);
4246  }
4247  registerCSS(e) {
4248    this.css || (this.css = []), this.css.push(e);
4249  }
4250}, ye = class ki {
4251  constructor(t) {
4252    this.status = 0, this.resolution = null, this.waiters = [], t(
4253      (i) => this.onDone(i),
4254      (i) => this.onReject(i)
4255    );
4256  }
4257  static all(t) {
4258    return t.length ? new ki((i) => {
4259      let s = t.length;
4260      const o = new Array(s);
4261      t.forEach((n, r) => {
4262        n.then((a) => {
4263          o[r] = a, s--, s === 0 && i(o);
4264        });
4265      });
4266    }) : ki.resolve();
4267  }
4268  static resolve(t = null) {
4269    return new ki((i) => i(t));
4270  }
4271  then(t) {
4272    return new ki((i) => {
4273      this.status === 1 ? i(t(this.resolution)) : this.waiters.push((s) => i(t(s)));
4274    });
4275  }
4276  onDone(t) {
4277    this.status = 1, this.resolution = t, this.waiters.forEach((i) => i(t));
4278  }
4279  onReject(t) {
4280  }
4281};
4282function Xg(e) {
4283  return e ? e.prototype && "getGui" in e.prototype : !1;
4284}
4285function od(e, t, i, s) {
4286  const { name: o } = i;
4287  let n, r, a, l, d, c;
4288  if (t) {
4289    const u = t, h = u[o + "Selector"], g = h ? h(s) : null, p = (f) => {
4290      typeof f == "string" ? n = f : f != null && f !== !0 && (e.isFrameworkComponent(f) ? a = f : r = f);
4291    };
4292    g ? (p(g.component), l = g.params, d = g.popup, c = g.popupPosition) : p(u[o]);
4293  }
4294  return { compName: n, jsComp: r, fwComp: a, paramsFromSelector: l, popupFromSelector: d, popupPositionFromSelector: c };
4295}
4296var Jg = class extends y {
4297  constructor() {
4298    super(...arguments), this.beanName = "userCompFactory";
4299  }
4300  wireBeans(e) {
4301    this.agCompUtils = e.agCompUtils, this.registry = e.registry, this.frameworkCompWrapper = e.frameworkCompWrapper, this.gridOptions = e.gridOptions;
4302  }
4303  getCompDetailsFromGridOptions(e, t, i, s = !1) {
4304    return this.getCompDetails(this.gridOptions, e, t, i, s);
4305  }
4306  getCompDetails(e, t, i, s, o = !1) {
4307    const { name: n, cellRenderer: r } = t;
4308    let { compName: a, jsComp: l, fwComp: d, paramsFromSelector: c, popupFromSelector: u, popupPositionFromSelector: h } = od(this.beans.frameworkOverrides, e, t, s), g;
4309    const p = (w) => {
4310      const S = this.registry.getUserComponent(n, w);
4311      S && (l = S.componentFromFramework ? void 0 : S.component, d = S.componentFromFramework ? S.component : void 0, g = S.params);
4312    };
4313    if (a != null && p(a), l == null && d == null && i != null && p(i), l && r && !Xg(l) && (l = this.agCompUtils?.adaptFunction(t, l)), !l && !d) {
4314      const { validation: w } = this.beans;
4315      o && (a !== i || !i) ? a ? w?.isProvidedUserComp(a) || z(50, { compName: a }) : i ? w || z(260, {
4316        ...this.gos.getModuleErrorParams(),
4317        propName: n,
4318        compName: i
4319      }) : z(216, { name: n }) : i && !w && z(146, { comp: i });
4320      return;
4321    }
4322    const f = this.mergeParams(e, t, s, c, g), m = l == null, C = l ?? d;
4323    return {
4324      componentFromFramework: m,
4325      componentClass: C,
4326      params: f,
4327      type: t,
4328      popupFromSelector: u,
4329      popupPositionFromSelector: h,
4330      newAgStackInstance: () => this.newAgStackInstance(C, m, f, t)
4331    };
4332  }
4333  newAgStackInstance(e, t, i, s) {
4334    const o = !t;
4335    let n;
4336    o ? n = new e() : n = this.frameworkCompWrapper.wrap(
4337      e,
4338      s.mandatoryMethods,
4339      s.optionalMethods,
4340      s
4341    ), this.createBean(n);
4342    const r = n.init?.(i);
4343    return r == null ? ye.resolve(n) : r.then(() => n);
4344  }
4345  /**
4346   * merges params with application provided params
4347   * used by Floating Filter
4348   */
4349  mergeParams(e, t, i, s = null, o) {
4350    const n = this.gos.getGridCommonParams();
4351    ce(n, i), o && ce(n, o);
4352    const r = e, a = r && r[t.name + "Params"];
4353    if (typeof a == "function") {
4354      const l = a(i);
4355      ce(n, l);
4356    } else typeof a == "object" && ce(n, a);
4357    return ce(n, s), n;
4358  }
4359}, ep = {
4360  name: "dateComponent",
4361  mandatoryMethods: ["getDate", "setDate"],
4362  optionalMethods: ["afterGuiAttached", "setInputPlaceholder", "setInputAriaLabel", "setDisabled", "refresh"]
4363}, tp = {
4364  name: "dragAndDropImageComponent",
4365  mandatoryMethods: ["setIcon", "setLabel"]
4366}, ip = { name: "headerComponent", optionalMethods: ["refresh"] }, sp = { name: "innerHeaderComponent" }, op = { name: "innerHeaderGroupComponent" }, np = { name: "headerGroupComponent" }, rp = {
4367  name: "cellRenderer",
4368  optionalMethods: ["refresh", "afterGuiAttached"],
4369  cellRenderer: !0
4370}, ap = { name: "loadingCellRenderer", cellRenderer: !0 }, lp = {
4371  name: "cellEditor",
4372  mandatoryMethods: ["getValue"],
4373  optionalMethods: [
4374    "isPopup",
4375    "isCancelBeforeStart",
4376    "isCancelAfterEnd",
4377    "getPopupPosition",
4378    "focusIn",
4379    "focusOut",
4380    "afterGuiAttached",
4381    "refresh"
4382  ]
4383}, dp = { name: "loadingOverlayComponent", optionalMethods: ["refresh"] }, cp = { name: "noRowsOverlayComponent", optionalMethods: ["refresh"] }, up = { name: "tooltipComponent" }, $n = {
4384  name: "filter",
4385  mandatoryMethods: ["isFilterActive", "doesFilterPass", "getModel", "setModel"],
4386  optionalMethods: [
4387    "afterGuiAttached",
4388    "afterGuiDetached",
4389    "onNewRowsLoaded",
4390    "getModelAsString",
4391    "onFloatingFilterChanged",
4392    "onAnyFilterChanged",
4393    "refresh"
4394  ]
4395}, hp = {
4396  name: "floatingFilterComponent",
4397  mandatoryMethods: ["onParentModelChanged"],
4398  optionalMethods: ["afterGuiAttached", "refresh"]
4399}, gp = {
4400  name: "fullWidthCellRenderer",
4401  optionalMethods: ["refresh", "afterGuiAttached"],
4402  cellRenderer: !0
4403}, pp = { name: "loadingCellRenderer", cellRenderer: !0 }, fp = {
4404  name: "groupRowRenderer",
4405  optionalMethods: ["afterGuiAttached"],
4406  cellRenderer: !0
4407}, mp = { name: "detailCellRenderer", optionalMethods: ["refresh"], cellRenderer: !0 };
4408function Cp(e, t) {
4409  return e.getCompDetailsFromGridOptions(tp, "agDragAndDropImage", t, !0);
4410}
4411function vp(e, t, i) {
4412  return e.getCompDetails(t, ip, "agColumnHeader", i);
4413}
4414function wp(e, t, i) {
4415  return e.getCompDetails(t, sp, void 0, i);
4416}
4417function Sp(e, t) {
4418  const i = t.columnGroup.getColGroupDef();
4419  return e.getCompDetails(i, np, "agColumnGroupHeader", t);
4420}
4421function bp(e, t, i) {
4422  return e.getCompDetails(t, op, void 0, i);
4423}
4424function yp(e, t) {
4425  return e.getCompDetailsFromGridOptions(gp, void 0, t, !0);
4426}
4427function Rp(e, t) {
4428  return e.getCompDetailsFromGridOptions(pp, "agLoadingCellRenderer", t, !0);
4429}
4430function Fp(e, t) {
4431  return e.getCompDetailsFromGridOptions(fp, "agGroupRowRenderer", t, !0);
4432}
4433function xp(e, t) {
4434  return e.getCompDetailsFromGridOptions(mp, "agDetailCellRenderer", t, !0);
4435}
4436function Pp(e, t, i) {
4437  return e.getCompDetails(t, rp, void 0, i);
4438}
4439function Ep(e, t, i) {
4440  return e.getCompDetails(t, ap, "agSkeletonCellRenderer", i, !0);
4441}
4442function oa(e, t, i) {
4443  return e.getCompDetails(t, lp, "agCellEditor", i, !0);
4444}
4445function Dp(e, t, i, s) {
4446  return e.getCompDetails(t, $n, s, i, !0);
4447}
4448function Ap(e, t) {
4449  return e.getCompDetailsFromGridOptions(ep, "agDateInput", t, !0);
4450}
4451function Tp(e, t) {
4452  return e.getCompDetailsFromGridOptions(dp, "agLoadingOverlay", t, !0);
4453}
4454function Mp(e, t) {
4455  return e.getCompDetailsFromGridOptions(cp, "agNoRowsOverlay", t, !0);
4456}
4457function Ip(e, t) {
4458  return e.getCompDetails(t.colDef, up, "agTooltipComponent", t, !0);
4459}
4460function kp(e, t, i, s) {
4461  return e.getCompDetails(t, hp, s, i);
4462}
4463function Lp(e, t) {
4464  return od(e, t, $n);
4465}
4466function Op(e, t, i) {
4467  return e.mergeParams(t, $n, i);
4468}
4469function ts(e) {
4470  const t = e;
4471  return t != null && t.getFrameworkComponentInstance != null ? t.getFrameworkComponentInstance() : e;
4472}
4473var nd = /* @__PURE__ */ new Set(), Vs = {}, ri = {}, xs, rd = !1;
4474function Gp(e) {
4475  const [t, i] = e.version.split(".") || [], [s, o] = xs.split(".") || [];
4476  return t === s && i === o;
4477}
4478function Hp(e) {
4479  xs || (xs = e.version);
4480  const t = (i) => `You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;
4481  if (e.version ? Gp(e) || ii(
4482    t(
4483      `'${e.moduleName}' is version ${e.version} but the other modules are version ${xs}.`
4484    )
4485  ) : ii(t(`'${e.moduleName}' is incompatible.`)), e.validate) {
4486    const i = e.validate();
4487    i.isValid || ii(`${i.message}`);
4488  }
4489}
4490function is(e, t) {
4491  Hp(e);
4492  const i = e.rowModels ?? ["all"];
4493  nd.add(e);
4494  let s;
4495  t !== void 0 ? (rd = !0, ri[t] === void 0 && (ri[t] = {}), s = ri[t]) : s = Vs, i.forEach((o) => {
4496    s[o] === void 0 && (s[o] = {}), s[o][e.moduleName] = e;
4497  }), e.dependsOn && e.dependsOn.forEach((o) => is(o, t));
4498}
4499function Bp(e) {
4500  delete ri[e];
4501}
4502function ad(e, t, i) {
4503  const s = (o) => !!Vs[o]?.[e] || !!ri[t]?.[o]?.[e];
4504  return s(i) || s("all");
4505}
4506function Kn() {
4507  return rd;
4508}
4509function Np(e, t) {
4510  const i = ri[e] ?? {};
4511  return [
4512    ...Object.values(Vs.all ?? {}),
4513    ...Object.values(i.all ?? {}),
4514    ...Object.values(Vs[t] ?? {}),
4515    ...Object.values(i[t] ?? {})
4516  ];
4517}
4518function Vp() {
4519  return new Set(nd);
4520}
4521var ld = class {
4522  /**
4523   * @deprecated v33 Use `registerModules([module])` instead.
4524   */
4525  static register(e) {
4526    is(e, void 0);
4527  }
4528  /**
4529   * Globally register the given modules for all grids.
4530   * @param modules - modules to register
4531   */
4532  static registerModules(e) {
4533    e.forEach((t) => is(t, void 0));
4534  }
4535}, Wp = class {
4536  constructor(e) {
4537    this.beans = {}, this.createdBeans = [], this.destroyed = !1, !(!e || !e.beanClasse
4537s) && (this.beanDestroyComparator = e.beanDestroyComparator, this.init(e));
4538  }
4539  init(e) {
4540    Object.entries(e.providedBeanInstances).forEach(([t, i]) => {
4541      this.beans[t] = i;
4542    }), e.beanClasses.forEach((t) => {
4543      const i = new t();
4544      i.beanName ? this.beans[i.beanName] = i : console.error(`Bean ${t.name} is missing beanName`), this.createdBeans.push(i);
4545    }), e.derivedBeans?.forEach((t) => {
4546      const { beanName: i, bean: s } = t(this);
4547      this.beans[i] = s, this.createdBeans.push(s);
4548    }), e.beanInitComparator && this.createdBeans.sort(e.beanInitComparator), this.initBeans(this.createdBeans);
4549  }
4550  getBeanInstances() {
4551    return Object.values(this.beans);
4552  }
4553  createBean(e, t) {
4554    if (!e)
4555      throw Error("null bean");
4556    return this.initBeans([e], t), e;
4557  }
4558  initBeans(e, t) {
4559    e.forEach((i) => {
4560      i.preWireBeans?.(this.beans), i.wireBeans?.(this.beans);
4561    }), e.forEach((i) => i.preConstruct?.()), t && e.forEach(t), e.forEach((i) => i.postConstruct?.());
4562  }
4563  getBeans() {
4564    return this.beans;
4565  }
4566  getBean(e) {
4567    return this.beans[e];
4568  }
4569  destroy() {
4570    if (this.destroyed)
4571      return;
4572    this.destroyed = !0;
4573    const e = this.getBeanInstances();
4574    this.beanDestroyComparator && e.sort(this.beanDestroyComparator), this.destroyBeans(e), this.beans = {}, this.createdBeans = [];
4575  }
4576  /**
4577   * Destroys a bean and returns undefined to support destruction and clean up in a single line.
4578   * this.dateComp = this.context.destroyBean(this.dateComp);
4579   */
4580  destroyBean(e) {
4581    e?.destroy?.();
4582  }
4583  /**
4584   * Destroys an array of beans and returns an empty array to support destruction and clean up in a single line.
4585   * this.dateComps = this.context.destroyBeans(this.dateComps);
4586   */
4587  destroyBeans(e) {
4588    if (e)
4589      for (let t = 0; t < e.length; t++)
4590        this.destroyBean(e[t]);
4591    return [];
4592  }
4593  isDestroyed() {
4594    return this.destroyed;
4595  }
4596}, zp = class extends Wp {
4597  init(e) {
4598    this.gridId = e.gridId, this.beans.context = this, this.destroyCallback = e.destroyCallback, super.init(e);
4599  }
4600  destroy() {
4601    super.destroy(), Bp(this.gridId), this.destroyCallback?.();
4602  }
4603  getGridId() {
4604    return this.gridId;
4605  }
4606}, _p = "ag-column-first", Up = "ag-column-last";
4607function dd(e, t, i, s) {
4608  return Y(e) ? [] : Kp(e.headerClass, e, t, i, s);
4609}
4610function cd(e, t, i) {
4611  e.addOrRemoveCssClass(_p, i.isColAtEdge(t, "first")), e.addOrRemoveCssClass(Up, i.isColAtEdge(t, "last"));
4612}
4613function $p(e, t, i, s) {
4614  return t.addGridCommonParams({
4615    // bad naming, as colDef here can be a group or a column,
4616    // however most people won't appreciate the difference,
4617    // so keeping it as colDef to avoid confusion.
4618    colDef: e,
4619    column: i,
4620    columnGroup: s
4621  });
4622}
4623function Kp(e, t, i, s, o) {
4624  if (Y(e))
4625    return [];
4626  let n;
4627  if (typeof e == "function") {
4628    const r = $p(t, i, s, o);
4629    n = e(r);
4630  } else
4631    n = e;
4632  return typeof n == "string" ? [n] : Array.isArray(n) ? [...n] : [];
4633}
4634function Ft(e, t) {
4635  const i = kl(e);
4636  i.requestAnimationFrame ? i.requestAnimationFrame(t) : i.webkitRequestAnimationFrame ? i.webkitRequestAnimationFrame(t) : i.setTimeout(t, 0);
4637}
4638var jp = class extends y {
4639  constructor() {
4640    super(...arguments), this.beanName = "animationFrameSvc", this.createTasksP1 = { list: [], sorted: !1 }, this.createTasksP2 = { list: [], sorted: !1 }, this.destroyTasks = [], this.ticking = !1, this.scrollGoingDown = !0, this.lastPage = 0, this.lastScrollTop = 0, this.taskCount = 0, this.cancelledTasks = /* @__PURE__ */ new Set();
4641  }
4642  setScrollTop(e) {
4643    const { gos: t, pagination: i } = this.beans, s = t.get("pagination");
4644    if (this.scrollGoingDown = e >= this.lastScrollTop, s && e === 0) {
4645      const o = i?.getCurrentPage() ?? 0;
4646      o !== this.lastPage && (this.lastPage = o, this.scrollGoingDown = !0);
4647    }
4648    this.lastScrollTop = e;
4649  }
4650  postConstruct() {
4651    this.active = !this.gos.get("suppressAnimationFrame");
4652  }
4653  // this method is for our AG Grid sanity only - if animation frames are turned off,
4654  // then no place in the code should be looking to add any work to be done in animation
4655  // frames. this stops bugs - where some code is asking for a frame to be executed
4656  // when it should not.
4657  verifyAnimationFrameOn(e) {
4658    this.active === !1 && x(92, { methodName: e });
4659  }
4660  createTask(e, t, i) {
4661    this.verifyAnimationFrameOn(i);
4662    const s = { task: e, index: t, createOrder: ++this.taskCount };
4663    this.addTaskToList(this[i], s), this.schedule();
4664  }
4665  cancelTask(e) {
4666    this.cancelledTasks.add(e);
4667  }
4668  addTaskToList(e, t) {
4669    e.list.push(t), e.sorted = !1;
4670  }
4671  sortTaskList(e) {
4672    if (e.sorted)
4673      return;
4674    const t = this.scrollGoingDown ? 1 : -1;
4675    e.list.sort(
4676      (i, s) => i.index !== s.index ? t * (s.index - i.index) : s.createOrder - i.createOrder
4677    ), e.sorted = !0;
4678  }
4679  addDestroyTask(e) {
4680    this.verifyAnimationFrameOn("createTasksP3"), this.destroyTasks.push(e), this.schedule();
4681  }
4682  executeFrame(e) {
4683    this.verifyAnimationFrameOn("executeFrame");
4684    const t = this.createTasksP1, i = t.list, s = this.createTasksP2, o = s.list, n = this.destroyTasks, r = (/* @__PURE__ */ new Date()).getTime();
4685    let a = (/* @__PURE__ */ new Date()).getTime() - r;
4686    const l = e <= 0, d = this.beans.ctrlsSvc.getScrollFeature();
4687    for (; l || a < e; ) {
4688      if (!d.scrollGridIfNeeded()) {
4689        let u;
4690        if (i.length)
4691          this.sortTaskList(t), u = i.pop().task;
4692        else if (o.length)
4693          this.sortTaskList(s), u = o.pop().task;
4694        else if (n.length)
4695          u = n.pop();
4696        else {
4697          this.cancelledTasks.clear();
4698          break;
4699        }
4700        this.cancelledTasks.has(u) || u();
4701      }
4702      a = (/* @__PURE__ */ new Date()).getTime() - r;
4703    }
4704    i.length || o.length || n.length ? this.requestFrame() : this.ticking = !1;
4705  }
4706  flushAllFrames() {
4707    this.active && this.executeFrame(-1);
4708  }
4709  schedule() {
4710    this.active && (this.ticking || (this.ticking = !0, this.requestFrame()));
4711  }
4712  requestFrame() {
4713    const e = this.executeFrame.bind(this, 60);
4714    Ft(this.beans, e);
4715  }
4716  isQueueEmpty() {
4717    return !this.ticking;
4718  }
4719}, b = {
4720  BACKSPACE: "Backspace",
4721  TAB: "Tab",
4722  ENTER: "Enter",
4723  ESCAPE: "Escape",
4724  SPACE: " ",
4725  LEFT: "ArrowLeft",
4726  UP: "ArrowUp",
4727  RIGHT: "ArrowRight",
4728  DOWN: "ArrowDown",
4729  DELETE: "Delete",
4730  F2: "F2",
4731  PAGE_UP: "PageUp",
4732  PAGE_DOWN: "PageDown",
4733  PAGE_HOME: "Home",
4734  PAGE_END: "End",
4735  // these should be used with `event.code` instead of `event.key`
4736  // as `event.key` changes when non-latin keyboards are used
4737  A: "KeyA",
4738  C: "KeyC",
4739  D: "KeyD",
4740  V: "KeyV",
4741  X: "KeyX",
4742  Y: "KeyY",
4743  Z: "KeyZ"
4744}, an = !1, Ws = 0;
4745function qp(e) {
4746  Ws > 0 || (e.addEventListener("keydown", zs), e.addEventListener("mousedown", zs));
4747}
4748function Yp(e) {
4749  Ws > 0 || (e.removeEventListener("keydown", zs), e.removeEventListener("mousedown", zs));
4750}
4751function zs(e) {
4752  const t = an, i = e.type === "keydown";
4753  i && (e.ctrlKey || e.metaKey || e.altKey) || t !== i && (an = i);
4754}
4755function Qp(e) {
4756  const t = te(e);
4757  return qp(t), Ws++, () => {
4758    Ws--, Yp(t);
4759  };
4760}
4761function Zp() {
4762  return an;
4763}
4764function Xp(e, t, i) {
4765  t.addManagedElementListeners(i, {
4766    keydown: (s) => {
4767      if (!s.defaultPrevented && s.key === b.TAB) {
4768        const o = s.shiftKey;
4769        zt(e, i, !1, o) || vi(e, o) && s.preventDefault();
4770      }
4771    }
4772  });
4773}
4774function ai(e, t, i = !1) {
4775  const s = zh;
4776  let o = Cl;
4777  t && (o += ", " + t), i && (o += ', [tabindex="-1"]');
4778  const n = Array.prototype.slice.apply(e.querySelectorAll(s)).filter((l) => Ne(l)), r = Array.prototype.slice.apply(e.querySelectorAll(o));
4779  return r.length ? ((l, d) => l.filter((c) => d.indexOf(c) === -1))(n, r) : n;
4780}
4781function Ht(e, t = !1, i = !1) {
4782  const s = ai(e, null, i), o = t ? W(s) : s[0];
4783  return o ? (o.focus({ preventScroll: !0 }), !0) : !1;
4784}
4785function zt(e, t, i, s) {
4786  const o = ai(t, i ? ':not([tabindex="-1"])' : null), n = Z(e);
4787  let r;
4788  i ? r = o.findIndex((l) => l.contains(n)) : r = o.indexOf(n);
4789  const a = r + (s ? -1 : 1);
4790  return a < 0 || a >= o.length ? null : o[a];
4791}
4792function ud(e, t = 5) {
4793  let i = 0;
4794  for (; e && Zo(e) === null && ++i <= t; )
4795    e = e.parentElement;
4796  return Zo(e) === null ? null : e;
4797}
4798function Jp(e, t) {
4799  return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t);
4800}
4801function li(e) {
4802  return e.gos.get("suppressHeaderFocus") || !!e.overlays?.isExclusive();
4803}
4804function hd(e) {
4805  return e.gos.get("suppressCellFocus") || !!e.overlays?.isExclusive();
4806}
4807function vi(e, t, i = !1) {
4808  const s = e.ctrlsSvc.get("gridCtrl");
4809  return !i && s.focusNextInnerContainer(t) ? !0 : ((i || !t && !s.isDetailGrid()) && s.forceFocusOutOfContainer(t), !1);
4810}
4811var ef = /[&<>"']/g, tf = {
4812  "&": "&amp;",
4813  "<": "&lt;",
4814  ">": "&gt;",
4815  '"': "&quot;",
4816  "'": "&#39;"
4817};
4818function Ze(e, t) {
4819  if (e == null)
4820    return null;
4821  const i = e.toString().toString();
4822  return t ? i : i.replace(ef, (s) => tf[s]);
4823}
4824function sf(e, t = !1) {
4825  return e === b.DELETE ? !0 : !t && e === b.BACKSPACE ? pl() : !1;
4826}
4827var of = class extends y {
4828  constructor(e, t, i, s) {
4829    super(), this.cellCtrl = e, this.rowNode = i, this.rowCtrl = s, this.beans = t;
4830  }
4831  setComp(e) {
4832    this.eGui = e;
4833  }
4834  onKeyDown(e) {
4835    const t = e.key;
4836    switch (t) {
4837      case b.ENTER:
4838        this.onEnterKeyDown(e);
4839        break;
4840      case b.F2:
4841        this.onF2KeyDown(e);
4842        break;
4843      case b.ESCAPE:
4844        this.onEscapeKeyDown(e);
4845        break;
4846      case b.TAB:
4847        this.onTabKeyDown(e);
4848        break;
4849      case b.BACKSPACE:
4850      case b.DELETE:
4851        this.onBackspaceOrDeleteKeyDown(t, e);
4852        break;
4853      case b.DOWN:
4854      case b.UP:
4855      case b.RIGHT:
4856      case b.LEFT:
4857        this.onNavigationKeyDown(e, t);
4858        break;
4859    }
4860  }
4861  onNavigationKeyDown(e, t) {
4862    this.cellCtrl.editing || (e.shiftKey && this.cellCtrl.isRangeSelectionEnabled() ? this.onShiftRangeSelect(e) : this.beans.navigation?.navigateToNextCell(e, t, this.cellCtrl.cellPosition, !0), e.preventDefault());
4863  }
4864  onShiftRangeSelect(e) {
4865    const { rangeSvc: t, navigation: i } = this.beans;
4866    if (!t)
4867      return;
4868    const s = t.extendLatestRangeInDirection(e);
4869    s && i?.ensureCellVisible(s);
4870  }
4871  onTabKeyDown(e) {
4872    this.beans.navigation?.onTabKeyDown(this.cellCtrl, e);
4873  }
4874  onBackspaceOrDeleteKeyDown(e, t) {
4875    const { cellCtrl: i, beans: s, rowNode: o } = this, { gos: n, rangeSvc: r, eventSvc: a } = s;
4876    if (!i.editing) {
4877      if (a.dispatchEvent({ type: "keyShortcutChangedCellStart" }), sf(e, n.get("enableCellEditingOnBackspace"))) {
4878        if (r && lt(n))
4879          r.clearCellRangeCellValues({ dispatchWrapperEvents: !0, wrapperEventSource: "deleteKey" });
4880        else if (i.isCellEditable()) {
4881          const { column: l } = i, d = this.beans.valueSvc.getDeleteValue(l, o);
4882          o.setDataValue(l, d, "cellClear");
4883        }
4884      } else
4885        s.editSvc?.startRowOrCellEdit(i, e, t);
4886      a.dispatchEvent({ type: "keyShortcutChangedCellEnd" });
4887    }
4888  }
4889  onEnterKeyDown(e) {
4890    const { cellCtrl: t, beans: i } = this;
4891    if (t.editing || this.rowCtrl.editing)
4892      t.stopEditingAndFocus(!1, e.shiftKey);
4893    else if (i.gos.get("enterNavigatesVertically")) {
4894      const s = e.shiftKey ? b.UP : b.DOWN;
4895      i.navigation?.navigateToNextCell(null, s, t.cellPosition, !1);
4896    } else
4897      i.editSvc?.startRowOrCellEdit(t, b.ENTER, e), t.editing && e.preventDefault();
4898  }
4899  onF2KeyDown(e) {
4900    const { cellCtrl: t, beans: i } = this;
4901    t.editing || i.editSvc?.startRowOrCellEdit(t, b.F2, e);
4902  }
4903  // eslint-disable-next-line @typescript-eslint/no-unused-vars
4904  onEscapeKeyDown(e) {
4905    const { cellCtrl: t, beans: i } = this;
4906    t.editing && (i.editSvc?.stopRowOrCellEdit(t, !0), t.focusCell(!0));
4907  }
4908  processCharacter(e) {
4909    if (e.target !== this.eGui || this.cellCtrl.editing)
4910      return;
4911    const s = e.key;
4912    s === b.SPACE ? this.onSpaceKeyDown(e) : this.beans.editSvc?.startRowOrCellEdit(this.cellCtrl, s, e) && e.preventDefault();
4913  }
4914  onSpaceKeyDown(e) {
4915    const { gos: t } = this.beans;
4916    !this.cellCtrl.editing && It(t) && this.beans.selectionSvc?.handleSelectionEvent(e, this.rowNode, "spaceKey"), e.preventDefault();
4917  }
4918  destroy() {
4919    super.destroy();
4920  }
4921}, nf = class extends y {
4922  constructor(e, t, i) {
4923    super(), this.cellCtrl = e, this.column = i, this.beans = t;
4924  }
4925  onMouseEvent(e, t) {
4926    if (!nt(t))
4927      switch (e) {
4928        case "click":
4929          this.onCellClicked(t);
4930          break;
4931        case "mousedown":
4932        case "touchstart":
4933          this.onMouseDown(t);
4934          break;
4935        case "dblclick":
4936          this.onCellDoubleClicked(t);
4937          break;
4938        case "mouseout":
4939          this.onMouseOut(t);
4940          break;
4941        case "mouseover":
4942          this.onMouseOver(t);
4943          break;
4944      }
4945  }
4946  onCellClicked(e) {
4947    if (this.beans.touchSvc?.handleCellDoubleClick(this, e))
4948      return;
4949    const { eventSvc: t, rangeSvc: i, gos: s, editSvc: o } = this.beans, n = e.ctrlKey || e.metaKey;
4950    i && n && i.getCellRangeCount(this.cellCtrl.cellPosition) > 1 && i.intersectLastRange(!0);
4951    const r = this.cellCtrl.createEvent(e, "cellClicked");
4952    t.dispatchEvent(r);
4953    const a = this.column.getColDef();
4954    a.onCellClicked && window.setTimeout(() => {
4955      this.beans.frameworkOverrides.wrapOutgoing(() => {
4956        a.onCellClicked(r);
4957      });
4958    }, 0), (s.get("singleClickEdit") || a.singleClickEdit) && !s.get("suppressClickEdit") && !(e.shiftKey && i?.getCellRanges().length != 0) && o?.startRowOrCellEdit(this.cellCtrl);
4959  }
4960  onCellDoubleClicked(e) {
4961    const { column: t, beans: i, cellCtrl: s } = this, { eventSvc: o, frameworkOverrides: n, gos: r, editSvc: a } = i, l = t.getColDef(), d = s.createEvent(e, "cellDoubleClicked");
4962    o.dispatchEvent(d), typeof l.onCellDoubleClicked == "function" && window.setTimeout(() => {
4963      n.wrapOutgoing(() => {
4964        l.onCellDoubleClicked(d);
4965      });
4966    }, 0), !r.get("singleClickEdit") && !r.get("suppressClickEdit") && a?.startRowOrCellEdit(s, null, e);
4967  }
4968  onMouseDown(e) {
4969    const { ctrlKey: t, metaKey: i, shiftKey: s } = e, o = e.target, { cellCtrl: n, beans: r } = this, { eventSvc: a, rangeSvc: l, focusSvc: d, gos: c } = r;
4970    if (this.isRightClickInExistingRange(e))
4971      return;
4972    const u = l && !l.isEmpty(), h = this.containsWidget(o), { cellPosition: g } = n;
4973    if (!s || !u) {
4974      const f = c.get("enableCellTextSelection") && e.defaultPrevented, m = (Nt() || f) && !n.editing && !On(o) && !h;
4975      n.focusCell(m);
4976    }
4977    if (s && u && !d.isCellFocused(g)) {
4978      e.preventDefault();
4979      const p = d.getFocusedCell();
4980      if (p) {
4981        const { column: f, rowIndex: m, rowPinned: C } = p, S = r.rowRenderer.getRowByPosition({ rowIndex: m, rowPinned: C })?.getCellCtrl(f);
4982        S?.editing && S.stopEditing(), d.setFocusedCell({
4983          column: f,
4984          rowIndex: m,
4985          rowPinned: C,
4986          forceBrowserFocus: !0,
4987          preventScrollOnBrowserFocus: !0
4988        });
4989      }
4990    }
4991    if (!h) {
4992      if (l)
4993        if (s)
4994          l.extendLatestRangeToCell(g);
4995        else {
4996          const p = t || i;
4997          l.setRangeToCell(g, p);
4998        }
4999      a.dispatchEvent(this.cellCtrl.createEvent(e, "cellMouseDown"));
5000    }
5001  }
5002  isRightClickInExistingRange(e) {
5003    const { rangeSvc: t } = this.beans;
5004    if (t) {
5005      const i = t.isCellInAnyRange(this.cellCtrl.cellPosition), s = e.button === 2 || e.ctrlKey && this.beans.gos.get("allowContextMenuWithControlKey");
5006      if (i && s)
5007        return !0;
5008    }
5009    return !1;
5010  }
5011  containsWidget(e) {
5012    return Mt(e, "ag-selection-checkbox", 3) || Mt(e, "ag-drag-handle", 3);
5013  }
5014  onMouseOut(e) {
5015    if (this.mouseStayingInsideCell(e))
5016      return;
5017    const { eventSvc: t, colHover: i } = this.beans;
5018    t.dispatchEvent(this.cellCtrl.createEvent(e, "cellMouseOut")), i?.clearMouseOver();
5019  }
5020  onMouseOver(e) {
5021    if (this.mouseStayingInsideCell(e))
5022      return;
5023    const { eventSvc: t, colHover: i } = this.beans;
5024    t.dispatchEvent(this.cellCtrl.createEvent(e, "cellMouseOver")), i?.setMouseOver([this.column]);
5025  }
5026  mouseStayingInsideCell(e) {
5027    if (!e.target || !e.relatedTarget)
5028      return !1;
5029    const { eGui: t } = this.cellCtrl, i = t.contains(e.target), s = t.contains(e.relatedTarget);
5030    return i && s;
5031  }
5032  destroy() {
5033    super.destroy();
5034  }
5035}, rf = class extends y {
5036  constructor(e, t) {
5037    super(), this.cellCtrl = e, this.beans = t, this.column = e.column, this.rowNode = e.rowNode;
5038  }
5039  setupRowSpan() {
5040    this.rowSpan = this.column.getRowSpan(this.rowNode), this.addManagedListeners(this.beans.eventSvc, { newColumnsLoaded: () => this.onNewColumnsLoaded() });
5041  }
5042  setComp(e) {
5043    this.eGui = e, this.setupColSpan(), this.setupRowSpan(), this.onLeftChanged(), this.onWidthChanged(), this.applyRowSpan();
5044  }
5045  onNewColumnsLoaded() {
5046    const e = this.column.getRowSpan(this.rowNode);
5047    this.rowSpan !== e && (this.rowSpan = e, this.applyRowSpan(!0));
5048  }
5049  onDisplayColumnsChanged() {
5050    const e = this.getColSpanningList();
5051    Wt(this.colsSpanning, e) || (this.colsSpanning = e, this.onWidthChanged(), this.onLeftChanged());
5052  }
5053  setupColSpan() {
5054    this.column.getColDef().colSpan != null && (this.colsSpanning = this.getColSpanningList(), this.addManagedListeners(this.beans.eventSvc, {
5055      // because we are col spanning, a reorder of the cols can change what cols we are spanning over
5056      displayedColumnsChanged: this.onDisplayColumnsChanged.bind(this),
5057      // because we are spanning over multiple cols, we check for width any time any cols width changes.
5058      // this is expensive - really we should be explicitly checking only the cols we are spanning over
5059      // instead of every col, however it would be tricky code to track the cols we are spanning over, so
5060      // because hardly anyone will be using colSpan, am favouring this easier way for more maintainable code.
5061      displayedColumnsWidthChanged: this.onWidthChanged.bind(this)
5062    }));
5063  }
5064  onWidthChanged() {
5065    if (!this.eGui)
5066      return;
5067    const e = this.getCellWidth();
5068    this.eGui.style.width = `${e}px`;
5069  }
5070  getCellWidth() {
5071    return this.colsSpanning ? this.colsSpanning.reduce((e, t) => e + t.getActualWidth(), 0) : this.column.getActualWidth();
5072  }
5073  getColSpanningList() {
5074    const { column: e, rowNode: t } = this, i = e.getColSpan(t), s = [];
5075    if (i === 1)
5076      s.push(e);
5077    else {
5078      let o = e;
5079      const n = e.getPinned();
5080      for (let r = 0; o && r < i && (s.push(o), o = this.beans.visibleCols.getColAfter(o), !(!o || Y(o) || n !== o.getPinned())); r++)
5081        ;
5082    }
5083    return s;
5084  }
5085  onLeftChanged() {
5086    if (!this.eGui)
5087      return;
5088    const e = this.modifyLeftForPrintLayout(this.getCellLeft());
5089    this.eGui.style.left = e + "px";
5090  }
5091  getCellLeft() {
5092    let e;
5093    return this.beans.gos.get("enableRtl") && this.colsSpanning ? e = W(this.colsSpanning) : e = this.column, e.getLeft();
5094  }
5095  modifyLeftForPrintLayout(e) {
5096    if (!this.cellCtrl.printLayout || this.column.getPinned() === "left")
5097      return e;
5098    const { visibleCols: t } = this.beans, i = t.getColsLeftWidth();
5099    if (this.column.getPinned() === "right") {
5100      const s = t.bodyWidth;
5101      return i + s + (e || 0);
5102    }
5103    return i + (e || 0);
5104  }
5105  applyRowSpan(e) {
5106    if (this.rowSpan === 1 && !e)
5107      return;
5108    const i = kt(this.beans) * this.rowSpan;
5109    this.eGui.style.height = `${i}px`, this.eGui.style.zIndex = "1";
5110  }
5111  // overriding to make public, as we don't dispose this bean via context
5112  destroy() {
5113    super.destroy();
5114  }
5115}, af = "ag-cell", lf = "ag-cell-auto-height", df = "ag-cell-normal-height", cf = "ag-cell-focus", uf = "ag-cell-first-right-pinned", hf = "ag-cell-last-left-pinned", gf = "ag-cell-not-inline-editing", pf = "ag-cell-wrap-text", _s = "cellCtrl";
5116function gd(e, t) {
5117  return Vl(e, t, _s);
5118}
5119var ff = 0, Ps = class extends y {
5120  constructor(e, t, i, s) {
5121    super(), this.column = e, this.rowNode = t, this.rowCtrl = s, this.rangeFeature = void 0, this.positionFeature = void 0, this.customStyleFeature = void 0, this.tooltipFeature = void 0, this.mouseListener = void 0, this.keyboardListener = void 0, this.suppressRefreshCell = !1, this.onCompAttachedFuncs = [], this.onEditorAttachedFuncs = [], this.beans = i, this.instanceId = e.getId() + "-" + ff++, this.colIdSanitised = Ze(this.column.getId()), this.createCellPosition(), this.updateAndFormatValue(!1);
5122  }
5123  shouldRestoreFocus() {
5124    return this.beans.focusSvc.shouldRestoreFocus(this.cellPosition);
5125  }
5126  onFocusOut() {
5127    this.beans.focusSvc.clearRestoreFocus();
5128  }
5129  addFeatures() {
5130    const { beans: e } = this;
5131    this.positionFeature = new rf(this, e), this.customStyleFeature = e.cellStyles?.createCellCustomStyleFeature(this, e), this.mouseListener = new nf(this, e, this.column), this.keyboardListener = new of(this, e, this.rowNode, this.rowCtrl), this.column.isTooltipEnabled() && this.enableTooltipFeature();
5132    const { rangeSvc: t } = e;
5133    t && lt(e.gos) && (this.rangeFeature = t.createCellRangeFeature(e, this));
5134  }
5135  removeFeatures() {
5136    const e = this.beans.context;
5137    this.positionFeature = e.destroyBean(this.positionFeature), this.customStyleFeature = e.destroyBean(this.customStyleFeature), this.mouseListener = e.destroyBean(this.mouseListener), this.keyboardListener = e.destroyBean(this.keyboardListener), this.rangeFeature = e.destroyBean(this.rangeFeature), this.disableTooltipFeature();
5138  }
5139  enableTooltipFeature(e, t) {
5140    this.tooltipFeature = this.beans.tooltipSvc?.enableCellTooltipFeature(this, e, t);
5141  }
5142  disableTooltipFeature() {
5143    this.tooltipFeature = this.beans.context.destroyBean(this.tooltipFeature);
5144  }
5145  setComp(e, t, i, s, o, n) {
5146    this.comp = e, this.eGui = t, this.printLayout = s, n ?? (n = this), this.addDomData(n), this.addFeatures(), n.addDestroyFunc(() => this.removeFeatures()), this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")), this.onCellFocused(this.focusEventToRestore), this.applyStaticCssClasses(), this.setWrapText(), this.onFirstRightPinnedChanged(), this.onLastLeftPinnedChanged(), this.onColumnHover(), this.setupControlComps(), this.setupAutoHeight(i, n), this.refreshFirstAndLastStyles(), this.refreshAriaColIndex(), this.positionFeature?.setComp(t), this.customStyleFeature?.setComp(e), this.tooltipFeature?.refreshTooltip(), this.keyboardListener?.setComp(this.eGui), this.rangeFeature && this.rangeFeature.setComp(e, t), o && this.isCellEditable() ? this.beans.editSvc?.startEditing(this) : this.showValue(), this.onCompAttachedFuncs.length && (this.onCompAttachedFuncs.forEach((r) => r()), this.onCompAttachedFuncs = []);
5147  }
5148  setupAutoHeight(e, t) {
5149    this.isAutoHeight = this.column.isAutoHeight(), !(!this.isAutoHeight || !e) && this.beans.rowAutoHeight?.setupCellAutoHeight(this, e, t);
5150  }
5151  getCellAriaRole() {
5152    return this.column.getColDef().cellAriaRole ?? "gridcell";
5153  }
5154  isCellRenderer() {
5155    const e = this.column.getColDef();
5156    return e.cellRenderer != null || e.cellRendererSelector != null;
5157  }
5158  getValueToDisplay() {
5159    return this.valueFormatted ?? this.value;
5160  }
5161  showValue(e = !1) {
5162    const { beans: t, column: i, rowNode: s, rangeFeature: o } = this, { userCompFactory: n } = t, r = this.getValueToDisplay();
5163    let a;
5164    if (s.stub && s.groupData?.[i.getId()] == null) {
5165      const d = this.createCellRendererParams();
5166      a = Ep(n, i.getColDef(), d);
5167    } else if (this.isCellRenderer()) {
5168      const d = this.createCellRendererParams();
5169      a = Pp(n, i.getColDef(), d);
5170    }
5171    this.comp.setRenderDetails(a, r, e), o && Ft(t, () => o?.refreshHandle());
5172  }
5173  setupControlComps() {
5174    const e = this.column.getColDef();
5175    this.includeSelection = this.isIncludeControl(this.isCheckboxSelection(e)), this.includeRowDrag = this.isIncludeControl(e.rowDrag), this.includeDndSource = this.isIncludeControl(e.dndSource), this.comp.setIncludeSelection(this.includeSelection), this.comp.setIncludeDndSource(this.includeDndSource), this.comp.setIncludeRowDrag(this.includeRowDrag);
5176  }
5177  isForceWrapper() {
5178    return this.beans.gos.get("enableCellTextSelection") || this.column.isAutoHeight();
5179  }
5180  // eslint-disable-next-line @typescript-eslint/ban-types
5181  isIncludeControl(e) {
5182    return this.rowNode.rowPinned != null ? !1 : typeof e == "function" || e === !0;
5183  }
5184  isCheckboxSelection(e) {
5185    const { rowSelection: t } = this.beans.gridOptions;
5186    return e.checkboxSelection || Qe(this.column) && t && typeof t != "string" && oi(t);
5187  }
5188  refreshShouldDestroy() {
5189    const e = this.column.getColDef(), t = this.includeSelection != this.isIncludeControl(this.isCheckboxSelection(e)), i = this.includeRowDrag != this.isIncludeControl(e.rowDrag), s = this.includeDndSource != this.isIncludeControl(e.dndSource), o = this.isAutoHeight != this.column.isAutoHeight();
5190    return t || i || s || o;
5191  }
5192  onPopupEditorClosed() {
5193    this.editing && this.stopEditingAndFocus();
5194  }
5195  /**
5196   * Ends the Cell Editing
5197   * @param cancel `True` if the edit process is being canceled.
5198   * @returns `True` if the value of the `GridCell` has been updated, otherwise `False`.
5199   */
5200  stopEditing(e = !1) {
5201    return this.beans.editSvc?.stopEditing(this, e) ?? !1;
5202  }
5203  createCellRendererParams() {
5204    const {
5205      value: e,
5206      valueFormatted: t,
5207      column: i,
5208      rowNode: s,
5209      comp: o,
5210      eGui: n,
5211      beans: { valueSvc: r, gos: a }
5212    } = this;
5213    return a.addGridCommonParams({
5214      value: e,
5215      valueFormatted: t,
5216      getValue: () => r.getValueForDisplay(i, s),
5217      setValue: (d) => r.setValue(s, i, d),
5218      formatValue: this.formatValue.bind(this),
5219      data: s.data,
5220      node: s,
5221      pinned: i.getPinned(),
5222      colDef: i.getColDef(),
5223      column: i,
5224      refreshCell: this.refreshCell.bind(this),
5225      eGridCell: n,
5226      eParentOfValue: o.getParentOfValue(),
5227      registerRowDragger: (d, c, u, h) => this.registerRowDragger(d, c, h),
5228      setTooltip: (d, c) => {
5229        a.assertModuleRegistered("Tooltip", 3), this.tooltipFeature && this.disableTooltipFeature(), this.enableTooltipFeature(d, c), this.tooltipFeature?.refreshTooltip();
5230      }
5231    });
5232  }
5233  onCellChanged(e) {
5234    e.column === this.column && this.refreshCell({});
5235  }
5236  refreshOrDestroyCell(e) {
5237    this.refreshShouldDestroy() ? this.rowCtrl?.recreateCell(this) : this.refreshCell(e);
5238  }
5239  // + stop editing {forceRefresh: true, suppressFlash: true}
5240  // + event cellChanged {}
5241  // + cellRenderer.params.refresh() {} -> method passes 'as is' to the cellRenderer, so params could be anything
5242  // + rowCtrl: event dataChanged {suppressFlash: !update, newData: !update}
5243  // + rowCtrl: api refreshCells() {animate: true/false}
5244  // + rowRenderer: api softRefreshView() {}
5245  refreshCell(e) {
5246    if (this.suppressRefreshCell || this.editing)
5247      return;
5248    const t = this.column.getColDef(), i = e != null && !!e.newData, s = e != null && !!e.suppressFlash, o = t.field == null && t.valueGetter == null && t.showRowGroup == null, n = e && e.forceRefresh || o || i, r = !!this.comp, a = this.updateAndFormatValue(r), l = n || a;
5249    if (r) {
5250      if (l) {
5251        this.showValue(i);
5252        const d = this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();
5253        !s && !d && t.enableCellChangeFlash && this.beans.cellFlashSvc?.flashCell(this), this.customStyleFeature?.applyUserStyles(), this.customStyleFeature?.applyClassesFromColDef();
5254      }
5255      this.tooltipFeature?.refreshTooltip(), this.customStyleFeature?.applyCellClassRules();
5256    }
5257  }
5258  // cell editors call this, when they want to stop for reasons other
5259  // than what we pick up on. eg selecting from a dropdown ends editing.
5260  stopEditingAndFocus(e = !1, t = !1) {
5261    this.beans.editSvc?.stopEditingAndFocus(this, e, t);
5262  }
5263  isCellEditable() {
5264    return this.column.isCellEditable(this.rowNode);
5265  }
5266  formatValue(e) {
5267    return this.callValueFormatter(e) ?? e;
5268  }
5269  callValueFormatter(e) {
5270    return this.beans.valueSvc.formatValue(this.column, this.rowNode, e);
5271  }
5272  updateAndFormatValue(e) {
5273    const t = this.value, i = this.valueFormatted;
5274    return this.value = this.beans.valueSvc.getValueForDisplay(this.column, this.rowNode), this.valueFormatted = this.callValueFormatter(this.value), e ? !this.valuesAreEqual(t, this.value) || this.valueFormatted != i : !0;
5275  }
5276  valuesAreEqual(e, t) {
5277    const i = this.column.getColDef();
5278    return i.equals ? i.equals(e, t) : e === t;
5279  }
5280  addDomData(e) {
5281    const t = this.eGui;
5282    Gt(this.beans.gos, t, _s, this), e.addDestroyFunc(() => Gt(this.beans.gos, t, _s, null));
5283  }
5284  createEvent(e, t) {
5285    const { rowNode: i, column: s, value: o } = this;
5286    return this.beans.gos.addGridCommonParams({
5287      type: t,
5288      node: i,
5289      data: i.data,
5290      value: o,
5291      column: s,
5292      colDef: s.getColDef(),
5293      rowPinned: i.rowPinned,
5294      event: e,
5295      rowIndex: i.rowIndex
5296    });
5297  }
5298  processCharacter(e) {
5299    this.keyboardListener?.processCharacter(e);
5300  }
5301  onKeyDown(e) {
5302    this.keyboardListener?.onKeyDown(e);
5303  }
5304  onMouseEvent(e, t) {
5305    this.mouseListener?.onMouseEvent(e, t);
5306  }
5307  getColSpanningList() {
5308    return this.positionFeature.getColSpanningList();
5309  }
5310  onLeftChanged() {
5311    this.comp && this.positionFeature?.onLeftChanged();
5312  }
5313  onDisplayedColumnsChanged() {
5314    this.eGui && (this.refreshAriaColIndex(), this.refreshFirstAndLastStyles());
5315  }
5316  refreshFirstAndLastStyles() {
5317    const { comp: e, column: t, beans: i } = this;
5318    cd(e, t, i.visibleCols);
5319  }
5320  refreshAriaColIndex() {
5321    const e = this.beans.visibleCols.getAriaColIndex(this.column);
5322    ul(this.eGui, e);
5323  }
5324  onWidthChanged() {
5325    return this.positionFeature?.onWidthChanged();
5326  }
5327  getRowPosition() {
5328    const { rowIndex: e, rowPinned: t } = this.cellPosition;
5329    return {
5330      rowIndex: e,
5331      rowPinned: t
5332    };
5333  }
5334  updateRangeBordersIfRangeCount() {
5335    this.comp && this.rangeFeature?.updateRangeBordersIfRangeCount();
5336  }
5337  onCellSelectionChanged() {
5338    this.comp && this.rangeFeature?.onCellSelectionChanged();
5339  }
5340  isRangeSelectionEnabled() {
5341    return this.rangeFeature != null;
5342  }
5343  focusCell(e = !1) {
5344    this.beans.focusSvc.setFocusedCell({
5345      rowIndex: this.cellPosition.rowIndex,
5346      column: this.column,
5347      rowPinned: this.rowNode.rowPinned,
5348      forceBrowserFocus: e
5349    });
5350  }
5351  onRowIndexChanged() {
5352    this.createCellPosition(), this.onCellFocused(), this.rangeFeature?.onCellSelectionChanged();
5353  }
5354  onSuppressCellFocusChanged(e) {
5355    this.eGui && Ie(this.eGui, "tabindex", e ? void 0 : -1);
5356  }
5357  onFirstRightPinnedChanged() {
5358    if (!this.comp)
5359      return;
5360    const e = this.column.isFirstRightPinned();
5361    this.comp.addOrRemoveCssClass(uf, e);
5362  }
5363  onLastLeftPinnedChanged() {
5364    if (!this.comp)
5365      return;
5366    const e = this.column.isLastLeftPinned();
5367    this.comp.addOrRemoveCssClass(hf, e);
5368  }
5369  onCellFocused(e) {
5370    const { beans: t } = this;
5371    if (hd(t))
5372      return;
5373    const i = t.focusSvc.isCellFocused(this.cellPosition);
5374    if (!this.comp) {
5375      i && e?.forceBrowserFocus && (this.focusEventToRestore = e);
5376      return;
5377    }
5378    if (this.focusEventToRestore = void 0, this.comp.addOrRemoveCssClass(cf, i), i && e && e.forceBrowserFocus) {
5379      let o = this.comp.getFocusableElement();
5380      if (this.editing) {
5381        const n = ai(o, null, !0);
5382        n.length && (o = n[0]);
5383      }
5384      o.focus({ preventScroll: !!e.preventScrollOnBrowserFocus });
5385    }
5386    const s = t.gos.get("editType") === "fullRow";
5387    !i && !s && this.editing && t.editSvc?.stopRowOrCellEdit(this), i && this.rowCtrl.announceDescription();
5388  }
5389  createCellPosition() {
5390    const { rowIndex: e, rowPinned: t } = this.rowNode;
5391    this.cellPosition = {
5392      rowIndex: e,
5393      rowPinned: ot(t),
5394      column: this.column
5395    };
5396  }
5397  setInlineEditingCss() {
5398    this.beans.editSvc?.setInlineEditingCss(this.rowCtrl);
5399  }
5400  // CSS Classes that only get applied once, they never change
5401  applyStaticCssClasses() {
5402    const { comp: e } = this;
5403    e.addOrRemoveCssClass(af, !0), e.addOrRemoveCssClass(gf, !0);
5404    const t = this.column.isAutoHeight() == !0;
5405    e.addOrRemoveCssClass(lf, t), e.addOrRemoveCssClass(df, !t);
5406  }
5407  onColumnHover() {
5408    this.beans.colHover?.onCellColumnHover(this.column, this.comp);
5409  }
5410  onColDefChanged() {
5411    this.comp && (this.column.isTooltipEnabled() ? (this.disableTooltipFeature(), this.enableTooltipFeature()) : this.disableTooltipFeature(), this.setWrapText(), this.editing ? this.beans.editSvc?.handleColDefChanged(this) : this.refreshOrDestroyCell({ forceRefresh: !0, suppressFlash: !0 }));
5412  }
5413  setWrapText() {
5414    const e = this.column.getColDef().wrapText == !0;
5415    this.comp.addOrRemoveCssClass(pf, e);
5416  }
5417  dispatchCellContextMenuEvent(e) {
5418    const t = this.column.getColDef(), i = this.createEvent(e, "cellContextMenu"), { beans: s } = this;
5419    s.eventSvc.dispatchEvent(i), t.onCellContextMenu && window.setTimeout(() => {
5420      s.frameworkOverrides.wrapOutgoing(() => {
5421        t.onCellContextMenu(i);
5422      });
5423    }, 0);
5424  }
5425  getCellRenderer() {
5426    return this.comp?.getCellRenderer() ?? null;
5427  }
5428  destroy() {
5429    this.onCompAttachedFuncs = [], this.onEditorAttachedFuncs = [], super.destroy();
5430  }
5431  createSelectionCheckbox() {
5432    const e = this.beans.selectionSvc?.createCheckboxSelectionComponent();
5433    if (e)
5434      return this.beans.context.createBean(e), e.init({ rowNode: this.rowNode, column: this.column }), e;
5435  }
5436  createDndSource() {
5437    const e = this.beans.registry.createDynamicBean(
5438      "dndSourceComp",
5439      !1,
5440      this.rowNode,
5441      this.column,
5442      this.eGui
5443    );
5444    return e && this.beans.context.createBean(e), e;
5445  }
5446  registerRowDragger(e, t, i) {
5447    if (this.customRowDragComp) {
5448      this.customRowDragComp.setDragElement(e, t);
5449      return;
5450    }
5451    const s = this.createRowDragComp(e, t, i);
5452    s && (this.customRowDragComp = s, this.addDestroyFunc(() => {
5453      this.beans.context.destroyBean(s), this.customRowDragComp = null;
5454    }));
5455  }
5456  createRowDragComp(e, t, i) {
5457    const s = this.beans.rowDragSvc?.createRowDragCompForCell(
5458      this.rowNode,
5459      this.column,
5460      () => this.value,
5461      e,
5462      t,
5463      i
5464    );
5465    if (s)
5466      return this.beans.context.createBean(s), s;
5467  }
5468  cellEditorAttached() {
5469    this.onEditorAttachedFuncs.forEach((e) => e()), this.onEditorAttachedFuncs = [];
5470  }
5471}, pd = "__ag_grid_instance";
5472function fd(e, t) {
5473  t[pd] = e.gridInstanceId;
5474}
5475function Us(e, t) {
5476  return md(e, t.target);
5477}
5478function md(e, t) {
5479  let i = t;
5480  for (; i; ) {
5481    const s = i[pd];
5482    if (A(s))
5483      return s === e.gridInstanceId;
5484    i = i.parentElement;
5485  }
5486  return !1;
5487}
5488function mf(e, t) {
5489  return gd(e, t.target)?.cellPosition ?? null;
5490}
5491function Eo(e, t) {
5492  const i = de(e.gos, "normal"), s = t;
5493  let o, n;
5494  if (s.clientX != null || s.clientY != null ? (o = s.clientX, n = s.clientY) : (o = s.x, n = s.y), i) {
5495    const r = e.ctrlsSvc.getScrollFeature(), a = r.getVScrollPosition(), l = r.getHScrollPosition();
5496    o += l.left, n += a.top;
5497  }
5498  return { x: o, y: n };
5499}
5500var Cf = class extends y {
5501  constructor() {
5502    super(...arguments), this.beanName = "dragAndDrop", this.dragSourceAndParamsList = [], this.dropTargets = [];
5503  }
5504  wireBeans(e) {
5505    this.ctrlsSvc = e.ctrlsSvc, this.dragSvc = e.dragSvc, this.environment = e.environment, this.userCompFactory = e.userCompFactory;
5506  }
5507  addDragSource(e, t = !1) {
5508    const i = {
5509      eElement: e.eElement,
5510      dragStartPixels: e.dragStartPixels,
5511      onDragStart: this.onDragStart.bind(this, e),
5512      onDragStop: this.onDragStop.bind(this),
5513      onDragging: this.onDragging.bind(this),
5514      onDragCancel: this.onDragCancel.bind(this),
5515      includeTouch: t
5516    };
5517    this.dragSourceAndParamsList.push({ params: i, dragSource: e }), this.dragSvc.addDragSource(i);
5518  }
5519  getDragAndDropImageComponent() {
5520    const { dragAndDropImageComp: e } = this;
5521    return !e || !e.comp ? null : e.comp;
5522  }
5523  removeDragSource(e) {
5524    const { dragSourceAndParamsList: t, dragSvc: i } = this, s = t.find((o) => o.dragSource === e);
5525    s && (i.removeDragSource(s.params), Ve(t, s));
5526  }
5527  destroy() {
5528    const { dragSourceAndParamsList: e, dragSvc: t, dropTargets: i } = this;
5529    e.forEach((s) => t.removeDragSource(s.params)), e.length = 0, i.length = 0, this.clearDragAndDropProperties(), super.destroy();
5530  }
5531  nudge() {
5532    this.dragging && this.onDragging(this.eventLastTime, !0);
5533  }
5534  onDragStart(e, t) {
5535    this.dragging = !0, this.dragSource = e, this.eventLastTime = t, this.dragItem = e.getDragItem(), e.onDragStarted?.(), this.createDragAndDropImageComponent();
5536  }
5537  onDragStop(e) {
5538    this.dragSource?.onDragStopped?.();
5539    const { lastDropTarget: t } = this;
5540    if (t?.onDragStop) {
5541      const i = this.createDropTargetEvent(t, e, null, null, !1);
5542      t.onDragStop(i);
5543    }
5544    this.clearDragAndDropProperties();
5545  }
5546  onDragCancel() {
5547    const { dragSource: e, lastDropTarget: t } = this;
5548    e?.onDragCancelled?.(), t?.onDragCancel && t.onDragCancel(
5549      this.createDropTargetEvent(t, this.eventLastTime, null, null, !1)
5550    ), this.clearDragAndDropProperties();
5551  }
5552  clearDragAndDropProperties() {
5553    this.eventLastTime = null, this.dragging = !1, this.lastDropTarget = void 0, this.dragItem = null, this.dragSource = null, this.removeDragAndDropImageComponent();
5554  }
5555  onDragging(e, t = !1) {
5556    const i = this.getHorizontalDirection(e), s = this.getVerticalDirection(e);
5557    this.eventLastTime = e, this.positionDragAndDropImageComp(e);
5558    const o = this.dropTargets.filter((c) => this.isMouseOnDropTarget(e, c)), n = this.findCurrentDropTarget(e, o), { lastDropTarget: r, dragSource: a, dragAndDropImageComp: l, dragItem: d } = this;
5559    if (n !== r) {
5560      if (this.leaveLastTargetIfExists(e, i, s, t), r !== null && n === null && a?.onGridExit?.(d), r === null && n !== null && a?.onGridEnter?.(d), this.enterDragTargetIfExists(n, e, i, s, t), n && l) {
5561        const { comp: c, promise: u } = l;
5562        c ? c.setIcon(n.getIconName ? n.getIconName() : null, !1) : u.then((h) => {
5563          h && h.setIcon(n.getIconName ? n.getIconName() : null, !1);
5564        });
5565      }
5566      this.lastDropTarget = n;
5567    } else if (n && n.onDragging) {
5568      const c = this.createDropTargetEvent(n, e, i, s, t);
5569      n.onDragging(c);
5570    }
5571  }
5572  getAllContainersFromDropTarget(e) {
5573    const t = e.getSecondaryContainers ? e.getSecondaryContainers() : null, i = [[e.getContainer()]];
5574    return t ? i.concat(t) : i;
5575  }
5576  // checks if the mouse is on the drop target. it checks eContainer and eSecondaryContainers
5577  isMouseOnDropTarget(e, t) {
5578    const i = this.getAllContainersFromDropTarget(t);
5579    let s = !1;
5580    const o = (a, l) => {
5581      for (const d of l) {
5582        const { width: c, height: u, left: h, right: g, top: p, bottom: f } = d.getBoundingClientRect();
5583        if (c === 0 || u === 0)
5584          return !1;
5585        const m = a.clientX >= h && a.clientX < g, C = a.clientY >= p && a.clientY < f;
5586        if (!m || !C)
5587          return !1;
5588      }
5589      return !0;
5590    };
5591    for (const a of i)
5592      if (o(e, a)) {
5593        s = !0;
5594        break;
5595      }
5596    const { eElement: n, type: r } = this.dragSource;
5597    return t.targetContainsSource && !t.getContainer().contains(n) ? !1 : s && t.isInterestedIn(r, n);
5598  }
5599  findCurrentDropTarget(e, t) {
5600    const i = t.length;
5601    if (i === 0)
5602      return null;
5603    if (i === 1)
5604      return t[0];
5605    const o = Xi(this.beans).elementsFromPoint(e.clientX, e.clientY);
5606    for (const n of o)
5607      for (const r of t)
5608        if (this.getAllContainersFromDropTarget(r).flatMap((l) => l).indexOf(n) !== -1)
5609          return r;
5610    return null;
5611  }
5612  enterDragTargetIfExists(e, t, i, s, o) {
5613    if (e && e.onDragEnter) {
5614      const n = this.createDropTargetEvent(
5615        e,
5616        t,
5617        i,
5618        s,
5619        o
5620      );
5621      e.onDragEnter(n);
5622    }
5623  }
5624  leaveLastTargetIfExists(e, t, i, s) {
5625    const { lastDropTarget: o } = this;
5626    if (!o)
5627      return;
5628    if (o.onDragLeave) {
5629      const r = this.createDropTargetEvent(
5630        o,
5631        e,
5632        t,
5633        i,
5634        s
5635      );
5636      o.onDragLeave(r);
5637    }
5638    const n = this.getDragAndDropImageComponent();
5639    n && n.setIcon(null, !1);
5640  }
5641  addDropTarget(e) {
5642    this.dropTargets.push(e);
5643  }
5644  removeDropTarget(e) {
5645    this.dropTargets = this.dropTargets.filter((t) => t.getContainer() !== e.getContainer());
5646  }
5647  hasExternalDropZones() {
5648    return this.dropTargets.some((e) => e.external);
5649  }
5650  findExternalZone(e) {
5651    return this.dropTargets.filter((i) => i.external).find((i) => i.getContainer() === e.getContainer()) || null;
5652  }
5653  isDropZoneWithinThisGrid(e) {
5654    const i = this.ctrlsSvc.getGridBodyCtrl().eGridBody, { dropZoneTarget: s } = e;
5655    return i.contains(s);
5656  }
5657  getHorizontalDirection(e) {
5658    const t = this.eventLastTime?.clientX, i = e.clientX;
5659    return t === i ? null : t > i ? "left" : "right";
5660  }
5661  getVerticalDirection(e) {
5662    const t = this.eventLastTime?.clientY, i = e.clientY;
5663    return t === i ? null : t > i ? "up" : "down";
5664  }
5665  createDropTargetEvent(e, t, i, s, o) {
5666    const n = e.getContainer(), r = n.getBoundingClientRect(), { dragItem: a, dragSource: l, gos: d } = this, c = t.clientX - r.left, u = t.clientY - r.top;
5667    return d.addGridCommonParams({
5668      event: t,
5669      x: c,
5670      y: u,
5671      vDirection: s,
5672      hDirection: i,
5673      dragSource: l,
5674      fromNudge: o,
5675      dragItem: a,
5676      dropZoneTarget: n
5677    });
5678  }
5679  positionDragAndDropImageComp(e) {
5680    const t = this.getDragAndDropImageComponent();
5681    t && dg(t.getGui(), e, this.beans);
5682  }
5683  removeDragAndDropImageComponent() {
5684    const { dragAndDropImageComp: e } = this;
5685    if (e) {
5686      const { comp: t } = e;
5687      if (t) {
5688        const i = t.getGui();
5689        this.dragAndDropImageParent?.removeChild(i), this.destroyBean(t);
5690      }
5691    }
5692    this.dragAndDropImageComp = null;
5693  }
5694  createDragAndDropImageComponent() {
5695    const { dragSource: e } = this;
5696    if (!e)
5697      return;
5698    const t = Cp(this.userCompFactory, {
5699      dragSource: e
5700    });
5701    if (!t)
5702      return;
5703    const i = t.newAgStackInstance();
5704    this.dragAndDropImageComp = {
5705      promise: i
5706    }, i.then((s) => {
5707      !s || !this.isAlive() || (this.processDragAndDropImageComponent(s), this.dragAndDropImageComp.comp = s);
5708    });
5709  }
5710  processDragAndDropImageComponent(e) {
5711    const { dragSource: t, environment: i } = this;
5712    if (!t)
5713      return;
5714    const s = e.getGui();
5715    s.style.setProperty("position", "absolute"), s.style.setProperty("z-index", "9999"), fd(this.gos, s), i.applyThemeClasses(s), e.setIcon(null, !1);
5716    let { dragItemName: o } = t;
5717    typeof o == "function" && (o = o()), e.setLabel(o || ""), s.style.top = "20px", s.style.left = "20px";
5718    const n = Vn(this.beans);
5719    this.dragAndDropImageParent = n, n ? n.appendChild(s) : x(54);
5720  }
5721  registerGridDropTarget(e, t) {
5722    const i = {
5723      getContainer: e,
5724      isInterestedIn: (s) => s === 1 || s === 0,
5725      getIconName: () => "notAllowed"
5726    };
5727    this.addDropTarget(i), t.addDestroyFunc(() => this.removeDropTarget(i));
5728  }
5729}, vf = class {
5730  constructor(e) {
5731    this.tickingInterval = null, this.onScrollCallback = null, this.scrollContainer = e.scrollC
5731ontainer, this.scrollHorizontally = e.scrollAxis.indexOf("x") !== -1, this.scrollVertically = e.scrollAxis.indexOf("y") !== -1, this.scrollByTick = e.scrollByTick != null ? e.scrollByTick : 20, e.onScrollCallback && (this.onScrollCallback = e.onScrollCallback), this.scrollVertically && (this.getVerticalPosition = e.getVerticalPosition, this.setVerticalPosition = e.setVerticalPosition), this.scrollHorizontally && (this.getHorizontalPosition = e.getHorizontalPosition, this.setHorizontalPosition = e.setHorizontalPosition), this.shouldSkipVerticalScroll = e.shouldSkipVerticalScroll || (() => !1), this.shouldSkipHorizontalScroll = e.shouldSkipHorizontalScroll || (() => !1);
5732  }
5733  check(e, t = !1) {
5734    const i = t || this.shouldSkipVerticalScroll();
5735    if (i && this.shouldSkipHorizontalScroll())
5736      return;
5737    const s = this.scrollContainer.getBoundingClientRect(), o = this.scrollByTick;
5738    this.tickLeft = e.clientX < s.left + o, this.tickRight = e.clientX > s.right - o, this.tickUp = e.clientY < s.top + o && !i, this.tickDown = e.clientY > s.bottom - o && !i, this.tickLeft || this.tickRight || this.tickUp || this.tickDown ? this.ensureTickingStarted() : this.ensureCleared();
5739  }
5740  ensureTickingStarted() {
5741    this.tickingInterval === null && (this.tickingInterval = window.setInterval(this.doTick.bind(this), 100), this.tickCount = 0);
5742  }
5743  doTick() {
5744    this.tickCount++;
5745    const e = this.tickCount > 20 ? 200 : this.tickCount > 10 ? 80 : 40;
5746    if (this.scrollVertically) {
5747      const t = this.getVerticalPosition();
5748      this.tickUp && this.setVerticalPosition(t - e), this.tickDown && this.setVerticalPosition(t + e);
5749    }
5750    if (this.scrollHorizontally) {
5751      const t = this.getHorizontalPosition();
5752      this.tickLeft && this.setHorizontalPosition(t - e), this.tickRight && this.setHorizontalPosition(t + e);
5753    }
5754    this.onScrollCallback && this.onScrollCallback();
5755  }
5756  ensureCleared() {
5757    this.tickingInterval && (window.clearInterval(this.tickingInterval), this.tickingInterval = null);
5758  }
5759};
5760function wf(e) {
5761  const { rowIndex: t, rowPinned: i, column: s } = e;
5762  return `${t}.${i ?? "null"}.${s.getId()}`;
5763}
5764function ln(e, t) {
5765  const i = e.column === t.column, s = e.rowPinned === t.rowPinned, o = e.rowIndex === t.rowIndex;
5766  return i && s && o;
5767}
5768function Sf(e, t) {
5769  switch (e.rowPinned) {
5770    case "top":
5771      if (t.rowPinned !== "top")
5772        return !0;
5773      break;
5774    case "bottom":
5775      if (t.rowPinned !== "bottom")
5776        return !1;
5777      break;
5778    default:
5779      if (A(t.rowPinned))
5780        return t.rowPinned !== "top";
5781      break;
5782  }
5783  return e.rowIndex < t.rowIndex;
5784}
5785function bf(e, t) {
5786  return !e && !t ? !0 : e && !t || !e && t ? !1 : e.rowIndex === t.rowIndex && e.rowPinned == t.rowPinned;
5787}
5788function yf(e) {
5789  let t = 0, i;
5790  const { pinnedRowModel: s, rowModel: o, pageBounds: n } = e;
5791  return s?.getPinnedTopRowCount() ? i = "top" : o.getRowCount() ? (i = null, t = n.getFirstRow()) : s?.getPinnedBottomRowCount() && (i = "bottom"), i === void 0 ? null : { rowIndex: t, rowPinned: i };
5792}
5793function Rf(e) {
5794  let t, i = null;
5795  const { pinnedRowModel: s, pageBounds: o } = e, n = s?.getPinnedBottomRowCount(), r = s?.getPinnedTopRowCount();
5796  return n ? (i = "bottom", t = n - 1) : e.rowModel.getRowCount() ? (i = null, t = o.getLastRow()) : r && (i = "top", t = r - 1), t === void 0 ? null : { rowIndex: t, rowPinned: i };
5797}
5798function dn(e, t) {
5799  switch (t.rowPinned) {
5800    case "top":
5801      return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);
5802    case "bottom":
5803      return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);
5804    default:
5805      return e.rowModel.getRow(t.rowIndex);
5806  }
5807}
5808function Xt(e, t) {
5809  const i = e.rowRenderer.getRowByPosition(t);
5810  return i ? i.getCellCtrl(t.column) : null;
5811}
5812var Ff = class extends y {
5813  constructor(e) {
5814    super(), this.eContainer = e;
5815  }
5816  postConstruct() {
5817    const { rowModel: e, gos: t, ctrlsSvc: i } = this.beans;
5818    me(t) && (this.clientSideRowModel = e), i.whenReady(this, (s) => {
5819      const o = s.gridBodyCtrl;
5820      this.autoScrollService = new vf({
5821        scrollContainer: o.eBodyViewport,
5822        scrollAxis: "y",
5823        getVerticalPosition: () => o.scrollFeature.getVScrollPosition().top,
5824        setVerticalPosition: (n) => o.scrollFeature.setVerticalScrollPosition(n),
5825        onScrollCallback: () => {
5826          this.onDragging(this.lastDraggingEvent);
5827        }
5828      });
5829    });
5830  }
5831  getContainer() {
5832    return this.eContainer;
5833  }
5834  isInterestedIn(e) {
5835    return e === 2;
5836  }
5837  getIconName() {
5838    return this.gos.get("rowDragManaged") && this.shouldPreventRowMove() ? "notAllowed" : "move";
5839  }
5840  shouldPreventRowMove() {
5841    const { rowGroupColsSvc: e, filterManager: t, sortSvc: i } = this.beans;
5842    return !!((e?.columns ?? []).length || t?.isAnyFilterPresent() || i?.isSortActive());
5843  }
5844  getRowNodes(e) {
5845    if (!this.isFromThisGrid(e))
5846      return e.dragItem.rowNodes || [];
5847    const t = e.dragItem.rowNode;
5848    if (this.gos.get("rowDragMultiRow")) {
5849      const s = [...this.beans.selectionSvc?.getSelectedNodes() ?? []].sort((o, n) => o.rowIndex == null || n.rowIndex == null ? 0 : this.getRowIndexNumber(o) - this.getRowIndexNumber(n));
5850      if (s.indexOf(t) !== -1)
5851        return s;
5852    }
5853    return [t];
5854  }
5855  onDragEnter(e) {
5856    e.dragItem.rowNodes = this.getRowNodes(e), this.dispatchGridEvent("rowDragEnter", e), this.getRowNodes(e).forEach((t) => {
5857      this.setRowNodeDragging(t, !0);
5858    }), this.onEnterOrDragging(e);
5859  }
5860  onDragging(e) {
5861    this.onEnterOrDragging(e);
5862  }
5863  isFromThisGrid(e) {
5864    const { dragSourceDomDataKey: t } = e.dragSource;
5865    return t === this.gos.getDomDataKey();
5866  }
5867  onEnterOrDragging(e) {
5868    this.dispatchGridEvent("rowDragMove", e), this.lastDraggingEvent = e;
5869    const t = Eo(this.beans, e).y;
5870    this.gos.get("rowDragManaged") && this.doManagedDrag(e, t), this.autoScrollService.check(e.event);
5871  }
5872  doManagedDrag(e, t) {
5873    const { dragAndDrop: i, gos: s } = this.beans, o = this.isFromThisGrid(e), n = s.get("rowDragManaged"), r = e.dragItem.rowNodes;
5874    n && this.shouldPreventRowMove() || (s.get("suppressMoveWhenRowDragging") || !o ? i.isDropZoneWithinThisGrid(e) && this.clientSideRowModel.highlightRowAtPixel(r[0], t) : this.moveRows(r, t));
5875  }
5876  getRowIndexNumber(e) {
5877    const t = e.getRowIndexString();
5878    return parseInt(W(t.split("-")), 10);
5879  }
5880  moveRowAndClearHighlight(e) {
5881    const t = this.clientSideRowModel, i = t.getLastHighlightedRowNode(), s = i && i.highlighted === "Below", o = Eo(this.beans, e).y, n = e.dragItem.rowNodes;
5882    let r = s ? 1 : 0;
5883    if (this.isFromThisGrid(e))
5884      n.forEach((a) => {
5885        a.rowTop < o && (r -= 1);
5886      }), this.moveRows(n, o, r);
5887    else {
5888      const a = fi(this.gos);
5889      let l = t.getRowIndexAtPixel(o) + 1;
5890      t.getHighlightPosition(o) === "Above" && l--, t.updateRowData({
5891        add: n.filter(
5892          (d) => !t.getRowNode(
5893            a?.({ data: d.data, level: 0, rowPinned: d.rowPinned }) ?? d.data.id
5894          )
5895        ).map((d) => d.data),
5896        addIndex: l
5897      });
5898    }
5899    this.clearRowHighlight();
5900  }
5901  clearRowHighlight() {
5902    this.clientSideRowModel.highlightRowAtPixel(null);
5903  }
5904  moveRows(e, t, i = 0) {
5905    const s = this.beans.focusSvc, o = s.getFocusedCell(), n = o && Xt(this.beans, o);
5906    this.clientSideRowModel.ensureRowsAtPixel(e, t, i) && (n ? n.focusCell() : s.clearFocusedCell());
5907  }
5908  addRowDropZone(e) {
5909    if (!e.getContainer()) {
5910      x(55);
5911      return;
5912    }
5913    const t = this.beans.dragAndDrop;
5914    if (t.findExternalZone(e)) {
5915      x(56);
5916      return;
5917    }
5918    let i = {
5919      getContainer: e.getContainer
5920    };
5921    e.fromGrid ? i = e : (e.onDragEnter && (i.onDragEnter = (o) => {
5922      e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter", o));
5923    }), e.onDragLeave && (i.onDragLeave = (o) => {
5924      e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave", o));
5925    }), e.onDragging && (i.onDragging = (o) => {
5926      e.onDragging(this.draggingToRowDragEvent("rowDragMove", o));
5927    }), e.onDragStop && (i.onDragStop = (o) => {
5928      e.onDragStop(this.draggingToRowDragEvent("rowDragEnd", o));
5929    }), e.onDragCancel && (i.onDragCancel = (o) => {
5930      e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel", o));
5931    }));
5932    const s = {
5933      isInterestedIn: (o) => o === 2,
5934      getIconName: () => "move",
5935      external: !0,
5936      ...i
5937    };
5938    t.addDropTarget(s), this.addDestroyFunc(() => t.removeDropTarget(s));
5939  }
5940  getRowDropZone(e) {
5941    const t = this.getContainer.bind(this), i = this.onDragEnter.bind(this), s = this.onDragLeave.bind(this), o = this.onDragging.bind(this), n = this.onDragStop.bind(this), r = this.onDragCancel.bind(this);
5942    let a;
5943    return e ? a = {
5944      getContainer: t,
5945      onDragEnter: e.onDragEnter ? (l) => {
5946        i(l), e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter", l));
5947      } : i,
5948      onDragLeave: e.onDragLeave ? (l) => {
5949        s(l), e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave", l));
5950      } : s,
5951      onDragging: e.onDragging ? (l) => {
5952        o(l), e.onDragging(this.draggingToRowDragEvent("rowDragMove", l));
5953      } : o,
5954      onDragStop: e.onDragStop ? (l) => {
5955        n(l), e.onDragStop(this.draggingToRowDragEvent("rowDragEnd", l));
5956      } : n,
5957      onDragCancel: e.onDragCancel ? (l) => {
5958        r(l), e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel", l));
5959      } : r,
5960      fromGrid: !0
5961    } : a = {
5962      getContainer: t,
5963      onDragEnter: i,
5964      onDragLeave: s,
5965      onDragging: o,
5966      onDragStop: n,
5967      onDragCancel: r,
5968      /* @private */
5969      fromGrid: !0
5970    }, a;
5971  }
5972  draggingToRowDragEvent(e, t) {
5973    const i = this.beans, { pageBounds: s, rowModel: o, gos: n } = i, r = Eo(i, t).y, a = r > s.getCurrentPageHeight();
5974    let l = -1, d;
5975    return a || (l = o.getRowIndexAtPixel(r), d = o.getRow(l)), n.addGridCommonParams({
5976      type: e,
5977      event: t.event,
5978      node: t.dragItem.rowNode,
5979      nodes: t.dragItem.rowNodes,
5980      overIndex: l,
5981      overNode: d,
5982      y: r,
5983      vDirection: t.vDirection
5984    });
5985  }
5986  dispatchGridEvent(e, t) {
5987    const i = this.draggingToRowDragEvent(e, t);
5988    this.eventSvc.dispatchEvent(i);
5989  }
5990  onDragLeave(e) {
5991    this.dispatchGridEvent("rowDragLeave", e), this.stopDragging(e), this.gos.get("rowDragManaged") && this.clearRowHighlight();
5992  }
5993  onDragStop(e) {
5994    this.dispatchGridEvent("rowDragEnd", e), this.stopDragging(e);
5995    const { dragAndDrop: t, gos: i } = this.beans;
5996    i.get("rowDragManaged") && (i.get("suppressMoveWhenRowDragging") || !this.isFromThisGrid(e)) && t.isDropZoneWithinThisGrid(e) && this.moveRowAndClearHighlight(e);
5997  }
5998  onDragCancel(e) {
5999    this.dispatchGridEvent("rowDragCancel", e), this.stopDragging(e);
6000    const { dragAndDrop: t, gos: i } = this.beans;
6001    i.get("rowDragManaged") && (i.get("suppressMoveWhenRowDragging") || !this.isFromThisGrid(e)) && t.isDropZoneWithinThisGrid(e) && this.clearRowHighlight();
6002  }
6003  stopDragging(e) {
6004    this.autoScrollService.ensureCleared(), this.getRowNodes(e).forEach((t) => {
6005      this.setRowNodeDragging(t, !1);
6006    });
6007  }
6008  setRowNodeDragging(e, t) {
6009    e.dragging !== t && (e.dragging = t, e.dispatchRowEvent("draggingChanged"));
6010  }
6011};
6012function Cd(e, t, i) {
6013  if (i === 0)
6014    return !1;
6015  const s = Math.abs(e.clientX - t.clientX), o = Math.abs(e.clientY - t.clientY);
6016  return Math.max(s, o) <= i;
6017}
6018var xf = class extends y {
6019  constructor() {
6020    super(...arguments), this.beanName = "dragSvc", this.dragEndFunctions = [], this.dragSources = [];
6021  }
6022  destroy() {
6023    const { dragSources: e } = this;
6024    e.forEach(this.removeListener.bind(this)), e.length = 0, super.destroy();
6025  }
6026  removeListener(e) {
6027    const t = e.dragSource.eElement, i = e.mouseDownListener;
6028    if (t.removeEventListener("mousedown", i), e.touchEnabled) {
6029      const s = e.touchStartListener;
6030      t.removeEventListener("touchstart", s, { passive: !0 });
6031    }
6032  }
6033  removeDragSource(e) {
6034    const { dragSources: t } = this, i = t.find((s) => s.dragSource === e);
6035    i && (this.removeListener(i), Ve(t, i));
6036  }
6037  addDragSource(e) {
6038    const t = this.onMouseDown.bind(this, e), { eElement: i, includeTouch: s, stopPropagationForTouch: o } = e;
6039    i.addEventListener("mousedown", t);
6040    let n = null;
6041    const r = this.gos.get("suppressTouch");
6042    s && !r && (n = (a) => {
6043      On(a.target) || (o && a.stopPropagation(), this.onTouchStart(e, a));
6044    }, i.addEventListener("touchstart", n, { passive: !1 })), this.dragSources.push({
6045      dragSource: e,
6046      mouseDownListener: t,
6047      touchStartListener: n,
6048      touchEnabled: !!s
6049    });
6050  }
6051  // gets called whenever mouse down on any drag source
6052  onTouchStart(e, t) {
6053    this.currentDragParams = e, this.dragging = !1;
6054    const i = t.touches[0];
6055    this.touchLastTime = i, this.touchStart = i;
6056    const s = (l) => this.onTouchMove(l, e.eElement), o = (l) => this.onTouchUp(l, e.eElement), n = (l) => {
6057      l.cancelable && l.preventDefault();
6058    }, r = t.target, a = [
6059      // Prevents the page document from moving while we are dragging items around.
6060      // preventDefault needs to be called in the touchmove listener and never inside the
6061      // touchstart, because using touchstart causes the click event to be cancelled on touch devices.
6062      {
6063        target: Xi(this.beans),
6064        type: "touchmove",
6065        listener: n,
6066        options: { passive: !1 }
6067      },
6068      { target: r, type: "touchmove", listener: s, options: { passive: !0 } },
6069      { target: r, type: "touchend", listener: o, options: { passive: !0 } },
6070      { target: r, type: "touchcancel", listener: o, options: { passive: !0 } }
6071    ];
6072    this.addTemporaryEvents(a), e.dragStartPixels === 0 && this.onCommonMove(i, this.touchStart, e.eElement);
6073  }
6074  // gets called whenever mouse down on any drag source
6075  onMouseDown(e, t) {
6076    const i = t;
6077    if (e.skipMouseEvent && e.skipMouseEvent(t) || i._alreadyProcessedByDragService || (i._alreadyProcessedByDragService = !0, t.button !== 0))
6078      return;
6079    this.shouldPreventMouseEvent(t) && t.preventDefault(), this.currentDragParams = e, this.dragging = !1, this.mouseStartEvent = t, this.startTarget = t.target;
6080    const s = (d) => this.onMouseMove(d, e.eElement), o = (d) => this.onMouseUp(d, e.eElement), n = (d) => d.preventDefault(), r = (d) => {
6081      d.key === b.ESCAPE && this.cancelDrag(e.eElement);
6082    }, a = Xi(this.beans), l = [
6083      { target: a, type: "mousemove", listener: s },
6084      { target: a, type: "mouseup", listener: o },
6085      { target: a, type: "contextmenu", listener: n },
6086      { target: a, type: "keydown", listener: r }
6087    ];
6088    this.addTemporaryEvents(l), e.dragStartPixels === 0 && this.onMouseMove(t, e.eElement);
6089  }
6090  addTemporaryEvents(e) {
6091    e.forEach((t) => {
6092      const { target: i, type: s, listener: o, options: n } = t;
6093      i.addEventListener(s, o, n);
6094    }), this.dragEndFunctions.push(() => {
6095      e.forEach((t) => {
6096        const { target: i, type: s, listener: o, options: n } = t;
6097        i.removeEventListener(s, o, n);
6098      });
6099    });
6100  }
6101  // returns true if the event is close to the original event by X pixels either vertically or horizontally.
6102  // we only start dragging after X pixels so this allows us to know if we should start dragging yet.
6103  isEventNearStartEvent(e, t) {
6104    const { dragStartPixels: i } = this.currentDragParams, s = A(i) ? i : 4;
6105    return Cd(e, t, s);
6106  }
6107  getFirstActiveTouch(e) {
6108    for (let t = 0; t < e.length; t++)
6109      if (e[t].identifier === this.touchStart.identifier)
6110        return e[t];
6111    return null;
6112  }
6113  onCommonMove(e, t, i) {
6114    if (!this.dragging) {
6115      if (this.isEventNearStartEvent(e, t))
6116        return;
6117      if (this.dragging = !0, this.eventSvc.dispatchEvent({
6118        type: "dragStarted",
6119        target: i
6120      }), this.currentDragParams.onDragStart(t), !this.currentDragParams) {
6121        this.dragging = !1;
6122        return;
6123      }
6124      this.currentDragParams.onDragging(t);
6125    }
6126    this.currentDragParams?.onDragging(e);
6127  }
6128  onTouchMove(e, t) {
6129    const i = this.getFirstActiveTouch(e.touches);
6130    i && this.onCommonMove(i, this.touchStart, t);
6131  }
6132  // only gets called after a mouse down - as this is only added after mouseDown
6133  // and is removed when mouseUp happens
6134  onMouseMove(e, t) {
6135    Nt() && te(this.beans).getSelection()?.removeAllRanges(), this.shouldPreventMouseEvent(e) && e.preventDefault(), this.onCommonMove(e, this.mouseStartEvent, t);
6136  }
6137  shouldPreventMouseEvent(e) {
6138    const { gos: t } = this, i = t.get("enableCellTextSelection"), s = e.type === "mousemove", o = (n) => !!n.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button");
6139    return (
6140      // when `isEnableCellTextSelect` is `true`, we need to preventDefault on mouseMove
6141      // to avoid the grid text being selected while dragging components.
6142      i && s && e.cancelable && Us(t, e) && !o(e)
6143    );
6144  }
6145  onTouchUp(e, t) {
6146    let i = this.getFirstActiveTouch(e.changedTouches);
6147    i || (i = this.touchLastTime), this.onUpCommon(i, t);
6148  }
6149  onMouseUp(e, t) {
6150    this.onUpCommon(e, t);
6151  }
6152  onUpCommon(e, t) {
6153    this.dragging && (this.dragging = !1, this.currentDragParams.onDragStop(e), this.eventSvc.dispatchEvent({
6154      type: "dragStopped",
6155      target: t
6156    })), this.resetDragProperties();
6157  }
6158  cancelDrag(e) {
6159    this.eventSvc.dispatchEvent({
6160      type: "dragCancelled",
6161      target: e
6162    }), this.currentDragParams?.onDragCancel?.(), this.resetDragProperties();
6163  }
6164  resetDragProperties() {
6165    this.mouseStartEvent = null, this.startTarget = null, this.touchStart = null, this.touchLastTime = null, this.currentDragParams = null;
6166    const { dragEndFunctions: e } = this;
6167    e.forEach((t) => t()), e.length = 0;
6168  }
6169};
6170function vd(e, t) {
6171  return e + "_" + t;
6172}
6173function ee(e) {
6174  return e instanceof wd;
6175}
6176var wd = class extends y {
6177  constructor(e, t, i, s) {
6178    super(), this.providedColumnGroup = e, this.groupId = t, this.partId = i, this.pinned = s, this.isColumn = !1, this.displayedChildren = [], this.autoHeaderHeight = null, this.parent = null;
6179  }
6180  // as the user is adding and removing columns, the groups are recalculated.
6181  // this reset clears out all children, ready for children to be added again
6182  reset() {
6183    this.parent = null, this.children = null, this.displayedChildren = null;
6184  }
6185  getParent() {
6186    return this.parent;
6187  }
6188  getUniqueId() {
6189    return vd(this.groupId, this.partId);
6190  }
6191  isEmptyGroup() {
6192    return this.displayedChildren.length === 0;
6193  }
6194  isMoving() {
6195    const e = this.getProvidedColumnGroup().getLeafColumns();
6196    return !e || e.length === 0 ? !1 : e.every((t) => t.isMoving());
6197  }
6198  checkLeft() {
6199    if (this.displayedChildren.forEach((e) => {
6200      ee(e) && e.checkLeft();
6201    }), this.displayedChildren.length > 0)
6202      if (this.gos.get("enableRtl")) {
6203        const t = W(this.displayedChildren).getLeft();
6204        this.setLeft(t);
6205      } else {
6206        const e = this.displayedChildren[0].getLeft();
6207        this.setLeft(e);
6208      }
6209    else
6210      this.setLeft(null);
6211  }
6212  getLeft() {
6213    return this.left;
6214  }
6215  getOldLeft() {
6216    return this.oldLeft;
6217  }
6218  setLeft(e) {
6219    this.oldLeft = this.left, this.left !== e && (this.left = e, this.dispatchLocalEvent({ type: "leftChanged" }));
6220  }
6221  getPinned() {
6222    return this.pinned;
6223  }
6224  getGroupId() {
6225    return this.groupId;
6226  }
6227  getPartId() {
6228    return this.partId;
6229  }
6230  getActualWidth() {
6231    let e = 0;
6232    return this.displayedChildren?.forEach((t) => {
6233      e += t.getActualWidth();
6234    }), e;
6235  }
6236  isResizable() {
6237    if (!this.displayedChildren)
6238      return !1;
6239    let e = !1;
6240    return this.displayedChildren.forEach((t) => {
6241      t.isResizable() && (e = !0);
6242    }), e;
6243  }
6244  getMinWidth() {
6245    let e = 0;
6246    return this.displayedChildren.forEach((t) => {
6247      e += t.getMinWidth();
6248    }), e;
6249  }
6250  addChild(e) {
6251    this.children || (this.children = []), this.children.push(e);
6252  }
6253  getDisplayedChildren() {
6254    return this.displayedChildren;
6255  }
6256  getLeafColumns() {
6257    const e = [];
6258    return this.addLeafColumns(e), e;
6259  }
6260  getDisplayedLeafColumns() {
6261    const e = [];
6262    return this.addDisplayedLeafColumns(e), e;
6263  }
6264  getDefinition() {
6265    return this.providedColumnGroup.getColGroupDef();
6266  }
6267  getColGroupDef() {
6268    return this.providedColumnGroup.getColGroupDef();
6269  }
6270  isPadding() {
6271    return this.providedColumnGroup.isPadding();
6272  }
6273  isExpandable() {
6274    return this.providedColumnGroup.isExpandable();
6275  }
6276  isExpanded() {
6277    return this.providedColumnGroup.isExpanded();
6278  }
6279  setExpanded(e) {
6280    this.providedColumnGroup.setExpanded(e);
6281  }
6282  isAutoHeaderHeight() {
6283    return !!this.getColGroupDef()?.autoHeaderHeight;
6284  }
6285  getAutoHeaderHeight() {
6286    return this.autoHeaderHeight;
6287  }
6288  /** Returns true if the header height has changed */
6289  setAutoHeaderHeight(e) {
6290    const t = e !== this.autoHeaderHeight;
6291    return this.autoHeaderHeight = e, t;
6292  }
6293  addDisplayedLeafColumns(e) {
6294    this.displayedChildren.forEach((t) => {
6295      yt(t) ? e.push(t) : ee(t) && t.addDisplayedLeafColumns(e);
6296    });
6297  }
6298  addLeafColumns(e) {
6299    this.children.forEach((t) => {
6300      yt(t) ? e.push(t) : ee(t) && t.addLeafColumns(e);
6301    });
6302  }
6303  getChildren() {
6304    return this.children;
6305  }
6306  getColumnGroupShow() {
6307    return this.providedColumnGroup.getColumnGroupShow();
6308  }
6309  getProvidedColumnGroup() {
6310    return this.providedColumnGroup;
6311  }
6312  getPaddingLevel() {
6313    const e = this.getParent();
6314    return !this.isPadding() || !e || !e.isPadding() ? 0 : 1 + e.getPaddingLevel();
6315  }
6316  calculateDisplayedColumns() {
6317    this.displayedChildren = [];
6318    let e = this;
6319    for (; e != null && e.isPadding(); )
6320      e = e.getParent();
6321    if (!(e ? e.getProvidedColumnGroup().isExpandable() : !1)) {
6322      this.displayedChildren = this.children, this.dispatchLocalEvent({ type: "displayedChildrenChanged" });
6323      return;
6324    }
6325    this.children.forEach((i) => {
6326      if (ee(i) && (!i.displayedChildren || !i.displayedChildren.length))
6327        return;
6328      switch (i.getColumnGroupShow()) {
6329        case "open":
6330          e.getProvidedColumnGroup().isExpanded() && this.displayedChildren.push(i);
6331          break;
6332        case "closed":
6333          e.getProvidedColumnGroup().isExpanded() || this.displayedChildren.push(i);
6334          break;
6335        default:
6336          this.displayedChildren.push(i);
6337          break;
6338      }
6339    }), this.dispatchLocalEvent({ type: "displayedChildrenChanged" });
6340  }
6341}, cn = "row-group-", Sd = "t-", bd = "b-", Pf = 0, wi = class {
6342  constructor(e) {
6343    this.master = !1, this.detail = void 0, this.rowIndex = null, this.key = null, this.sourceRowIndex = -1, this.childrenMapped = {}, this.treeNode = null, this.treeNodeFlags = 0, this.displayed = !1, this.rowTop = null, this.oldRowTop = null, this.selectable = !0, this.__objectId = Pf++, this.alreadyRendered = !1, this.highlighted = null, this.hovered = !1, this.__selected = !1, this.beans = e;
6344  }
6345  /**
6346   * Replaces the data on the `rowNode`. When this method is called, the grid will refresh the entire rendered row if it is displayed.
6347   */
6348  setData(e) {
6349    this.setDataCommon(e, !1);
6350  }
6351  // similar to setRowData, however it is expected that the data is the same data item. this
6352  // is intended to be used with Redux type stores, where the whole data can be changed. we are
6353  // guaranteed that the data is the same entity (so grid doesn't need to worry about the id of the
6354  // underlying data changing, hence doesn't need to worry about selection). the grid, upon receiving
6355  // dataChanged event, will refresh the cells rather than rip them all out (so user can show transitions).
6356  /**
6357   * Updates the data on the `rowNode`. When this method is called, the grid will refresh the entire rendered row if it is displayed.
6358   */
6359  updateData(e) {
6360    this.setDataCommon(e, !0);
6361  }
6362  setDataCommon(e, t) {
6363    const i = this.data;
6364    this.data = e, this.beans.valueCache?.onDataChanged(), this.updateDataOnDetailNode(), this.beans.selectionSvc?.updateRowSelectable(this), this.resetQuickFilterAggregateText();
6365    const s = this.createDataChangedEvent(e, i, t);
6366    this.__localEventService?.dispatchEvent(s);
6367  }
6368  // when we are doing master / detail, the detail node is lazy created, but then kept around.
6369  // so if we show / hide the detail, the same detail rowNode is used. so we need to keep the data
6370  // in sync, otherwise expand/collapse of the detail would still show the old values.
6371  updateDataOnDetailNode() {
6372    this.detailNode && (this.detailNode.data = this.data);
6373  }
6374  createDataChangedEvent(e, t, i) {
6375    return {
6376      type: "dataChanged",
6377      node: this,
6378      oldData: t,
6379      newData: e,
6380      update: i
6381    };
6382  }
6383  getRowIndexString() {
6384    return this.rowIndex == null ? (z(13), null) : this.rowPinned === "top" ? Sd + this.rowIndex : this.rowPinned === "bottom" ? bd + this.rowIndex : this.rowIndex.toString();
6385  }
6386  setDataAndId(e, t) {
6387    const { selectionSvc: i } = this.beans, s = i?.createDaemonNode?.(this), o = this.data;
6388    this.data = e, this.updateDataOnDetailNode(), this.setId(t), i && (i.updateRowSelectable(this), i.syncInRowNode(this, s));
6389    const n = this.createDataChangedEvent(e, o, !1);
6390    this.__localEventService?.dispatchEvent(n);
6391  }
6392  setId(e) {
6393    const t = fi(this.beans.gos);
6394    if (t)
6395      if (this.data) {
6396        const i = this.parent?.getRoute() ?? [];
6397        this.id = t({
6398          data: this.data,
6399          parentKeys: i.length > 0 ? i : void 0,
6400          level: this.level,
6401          rowPinned: this.rowPinned
6402        }), this.id.startsWith(cn) && z(14, {
6403          groupPrefix: cn
6404        });
6405      } else
6406        this.id = void 0;
6407    else
6408      this.id = e;
6409  }
6410  setRowTop(e) {
6411    this.oldRowTop = this.rowTop, this.rowTop !== e && (this.rowTop = e, this.dispatchRowEvent("topChanged"), this.setDisplayed(e !== null));
6412  }
6413  clearRowTopAndRowIndex() {
6414    this.oldRowTop = null, this.setRowTop(null), this.setRowIndex(null);
6415  }
6416  setHovered(e) {
6417    this.hovered = e;
6418  }
6419  isHovered() {
6420    return this.hovered;
6421  }
6422  /**
6423   * Sets the row height.
6424   * Call if you want to change the height initially assigned to the row.
6425   * After calling, you must call `api.onRowHeightChanged()` so the grid knows it needs to work out the placement of the rows. */
6426  setRowHeight(e, t = !1) {
6427    this.rowHeight = e, this.rowHeightEstimated = t, this.dispatchRowEvent("heightChanged");
6428  }
6429  setExpanded(e, t, i) {
6430    this.beans.expansionSvc?.setExpanded(this, e, t, i);
6431  }
6432  /**
6433   * Replaces the value on the `rowNode` for the specified column. When complete,
6434   * the grid will refresh the rendered cell on the required row only.
6435   * **Note**: This method only fires `onCellEditRequest` when the Grid is in **Read Only** mode.
6436   *
6437   * @param colKey The column where the value should be updated
6438   * @param newValue The new value
6439   * @param eventSource The source of the event
6440   * @returns `true` if the value was changed, otherwise `false`.
6441   */
6442  setDataValue(e, t, i) {
6443    const { colModel: s, valueSvc: o, gos: n, selectionSvc: r } = this.beans, a = typeof e != "string" ? e : s.getCol(e) ?? s.getColDefCol(e);
6444    if (!a)
6445      return !1;
6446    const l = o.getValueForDisplay(a, this);
6447    if (n.get("readOnlyEdit")) {
6448      const {
6449        beans: { eventSvc: c },
6450        data: u,
6451        rowIndex: h,
6452        rowPinned: g
6453      } = this;
6454      return c.dispatchEvent({
6455        type: "cellEditRequest",
6456        event: null,
6457        rowIndex: h,
6458        rowPinned: g,
6459        column: a,
6460        colDef: a.colDef,
6461        data: u,
6462        node: this,
6463        oldValue: l,
6464        newValue: t,
6465        value: t,
6466        source: i
6467      }), !1;
6468    }
6469    const d = o.setValue(this, a, t, i);
6470    return this.dispatchCellChangedEvent(a, t, l), r?.updateRowSelectable(this), d;
6471  }
6472  updateHasChildren() {
6473    let e = this.group && !this.footer || this.childrenAfterGroup && this.childrenAfterGroup.length > 0;
6474    const { rowChildrenSvc: t } = this.beans;
6475    t && (e = t.getHasChildrenValue(this)), e !== this.__hasChildren && (this.__hasChildren = !!e, this.dispatchRowEvent("hasChildrenChanged"));
6476  }
6477  hasChildren() {
6478    return this.__hasChildren == null && this.updateHasChildren(), this.__hasChildren;
6479  }
6480  dispatchCellChangedEvent(e, t, i) {
6481    const s = {
6482      type: "cellChanged",
6483      node: this,
6484      column: e,
6485      newValue: t,
6486      oldValue: i
6487    };
6488    this.__localEventService?.dispatchEvent(s);
6489  }
6490  /**
6491   * The first time `quickFilter` runs, the grid creates a one-off string representation of the row.
6492   * This string is then used for the quick filter instead of hitting each column separately.
6493   * When you edit, using grid editing, this string gets cleared down.
6494   * However if you edit without using grid editing, you will need to clear this string down for the row to be updated with the new values.
6495   * Otherwise new values will not work with the `quickFilter`. */
6496  resetQuickFilterAggregateText() {
6497    this.quickFilterAggregateText = null;
6498  }
6499  /** Returns:
6500   * - `true` if the node can be expanded, i.e it is a group or master row.
6501   * - `false` if the node cannot be expanded
6502   */
6503  isExpandable() {
6504    return this.beans.expansionSvc?.isExpandable(this) ?? !1;
6505  }
6506  /** Returns:
6507   * - `true` if node is selected,
6508   * - `false` if the node isn't selected
6509   * - `undefined` if it's partially selected (group where not all children are selected). */
6510  isSelected() {
6511    return this.footer ? this.sibling.isSelected() : this.__selected;
6512  }
6513  /** Perform a depth-first search of this node and its children. */
6514  depthFirstSearch(e) {
6515    this.childrenAfterGroup?.forEach((t) => t.depthFirstSearch(e)), e(this);
6516  }
6517  dispatchRowEvent(e) {
6518    this.__localEventService?.dispatchEvent({
6519      type: e,
6520      node: this
6521    });
6522  }
6523  /**
6524   * Select (or deselect) the node.
6525   * @param newValue -`true` for selection, `false` for deselection.
6526   * @param clearSelection - If selecting, then passing `true` will select the node exclusively (i.e. NOT do multi select). If doing deselection, `clearSelection` has no impact.
6527   * @param source - Source property that will appear in the `selectionChanged` event.
6528   */
6529  setSelected(e, t = !1, i = "api") {
6530    this.beans.selectionSvc?.setNodesSelected({
6531      nodes: [this],
6532      newValue: e,
6533      clearSelection: t,
6534      source: i
6535    });
6536  }
6537  /**
6538   * Returns:
6539   * - `true` if node is either pinned to the `top` or `bottom`
6540   * - `false` if the node isn't pinned
6541   */
6542  isRowPinned() {
6543    return !!this.rowPinned;
6544  }
6545  /** Add an event listener. */
6546  addEventListener(e, t) {
6547    this.beans.validation?.checkRowEvents(e), this.__localEventService || (this.__localEventService = new Fi()), this.frameworkEventListenerService = this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(
6548      this.frameworkEventListenerService,
6549      this.__localEventService
6550    );
6551    const i = this.frameworkEventListenerService?.wrap(t) ?? t;
6552    this.__localEventService.addEventListener(e, i);
6553  }
6554  /** Remove event listener. */
6555  removeEventListener(e, t) {
6556    if (!this.__localEventService)
6557      return;
6558    const i = this.frameworkEventListenerService?.unwrap(t) ?? t;
6559    this.__localEventService.removeEventListener(e, i), this.__localEventService.n
6559oRegisteredListenersExist() && (this.__localEventService = null);
6560  }
6561  /**
6562   * @deprecated v32.2.0 Check `node.detail` then user provided callback `isFullWidthRow` instead.
6563   *
6564   * Returns:
6565   * - `true` if the node is a full width cell
6566   * - `false` if the node is not a full width cell
6567   */
6568  isFullWidthCell() {
6569    if (x(61), this.detail)
6570      return !0;
6571    const e = this.beans.gos.getCallback("isFullWidthRow");
6572    return e ? e({ rowNode: this }) : !1;
6573  }
6574  /**
6575   * Returns the route of keys to the row node. Returns undefined if the node has no key.
6576   */
6577  getRoute() {
6578    if (this.level === -1)
6579      return [];
6580    if (this.key == null)
6581      return;
6582    const e = [];
6583    let t = this;
6584    for (; t && t.key != null; )
6585      e.push(t.key), t = t.parent;
6586    return e.reverse();
6587  }
6588  setFirstChild(e) {
6589    this.firstChild !== e && (this.firstChild = e, this.dispatchRowEvent("firstChildChanged"));
6590  }
6591  setDisplayed(e) {
6592    this.displayed !== e && (this.displayed = e, this.dispatchRowEvent("displayedChanged"));
6593  }
6594  setRowIndex(e) {
6595    this.rowIndex !== e && (this.rowIndex = e, this.dispatchRowEvent("rowIndexChanged"));
6596  }
6597  setAllChildrenCount(e) {
6598    this.allChildrenCount !== e && (this.allChildrenCount = e, this.dispatchRowEvent("allChildrenCountChanged"));
6599  }
6600  setUiLevel(e) {
6601    this.uiLevel !== e && (this.uiLevel = e, this.dispatchRowEvent("uiLevelChanged"));
6602  }
6603};
6604function Ef(e, t, i) {
6605  return t.addGridCommonParams({
6606    type: i,
6607    node: e,
6608    data: e.data,
6609    rowIndex: e.rowIndex,
6610    rowPinned: e.rowPinned
6611  });
6612}
6613var Df = class extends _ {
6614  constructor(e, t) {
6615    super(
6616      /* html */
6617      '<div class="ag-filter"></div>'
6618    ), this.column = e, this.source = t, this.filterWrapper = null;
6619  }
6620  postConstruct() {
6621    this.createFilter(!0), this.addManagedEventListeners({ filterDestroyed: this.onFilterDestroyed.bind(this) });
6622  }
6623  hasFilter() {
6624    return !!this.filterWrapper;
6625  }
6626  getFilter() {
6627    return this.filterWrapper?.filterPromise ?? null;
6628  }
6629  afterInit() {
6630    return this.filterWrapper?.filterPromise?.then(() => {
6631    }) ?? ye.resolve();
6632  }
6633  afterGuiAttached(e) {
6634    this.filterWrapper?.filterPromise?.then((t) => {
6635      t?.afterGuiAttached?.(e);
6636    });
6637  }
6638  afterGuiDetached() {
6639    this.filterWrapper?.filterPromise?.then((e) => {
6640      e?.afterGuiDetached?.();
6641    });
6642  }
6643  createFilter(e) {
6644    const { column: t, source: i } = this;
6645    this.filterWrapper = this.beans.filterManager?.getOrCreateFilterWrapper(t) ?? null, this.filterWrapper?.filterPromise && this.filterWrapper.filterPromise.then((s) => {
6646      const o = s.getGui();
6647      A(o) || x(69, { guiFromFilter: o }), this.appendChild(o), e && this.eventSvc.dispatchEvent({
6648        type: "filterOpened",
6649        column: t,
6650        source: i,
6651        eGui: this.getGui()
6652      });
6653    });
6654  }
6655  onFilterDestroyed(e) {
6656    (e.source === "api" || e.source === "paramsUpdated") && e.column.getId() === this.column.getId() && this.beans.colModel.getColDefCol(this.column) && (ue(this.getGui()), this.createFilter());
6657  }
6658  destroy() {
6659    this.filterWrapper = null, super.destroy();
6660  }
6661}, yd = "ag-resizer-wrapper", ht = (e, t) => `<div data-ref="${e}Resizer" class="ag-resizer ag-resizer-${t}"></div>`, Af = (
6662  /* html */
6663  `<div class="${yd}">
6664        ${ht("eTopLeft", "topLeft")}
6665        ${ht("eTop", "top")}
6666        ${ht("eTopRight", "topRight")}
6667        ${ht("eRight", "right")}
6668        ${ht("eBottomRight", "bottomRight")}
6669        ${ht("eBottom", "bottom")}
6670        ${ht("eBottomLeft", "bottomLeft")}
6671        ${ht("eLeft", "left")}
6672    </div>`
6673), Tf = class extends y {
6674  constructor(e, t) {
6675    super(), this.element = e, this.dragStartPosition = {
6676      x: 0,
6677      y: 0
6678    }, this.position = {
6679      x: 0,
6680      y: 0
6681    }, this.lastSize = {
6682      width: -1,
6683      height: -1
6684    }, this.positioned = !1, this.resizersAdded = !1, this.resizeListeners = [], this.boundaryEl = null, this.isResizing = !1, this.isMoving = !1, this.resizable = {}, this.movable = !1, this.currentResizer = null, this.config = Object.assign({}, { popup: !1 }, t);
6685  }
6686  wireBeans(e) {
6687    this.popupSvc = e.popupSvc, this.dragSvc = e.dragSvc;
6688  }
6689  center() {
6690    const { clientHeight: e, clientWidth: t } = this.offsetParent, i = t / 2 - this.getWidth() / 2, s = e / 2 - this.getHeight() / 2;
6691    this.offsetElement(i, s);
6692  }
6693  initialisePosition() {
6694    if (this.positioned)
6695      return;
6696    const { centered: e, forcePopupParentAsOffsetParent: t, minWidth: i, width: s, minHeight: o, height: n, x: r, y: a } = this.config;
6697    this.offsetParent || this.setOffsetParent();
6698    let l = 0, d = 0;
6699    const c = Ne(this.element);
6700    if (c) {
6701      const u = this.findBoundaryElement(), h = window.getComputedStyle(u);
6702      if (h.minWidth != null) {
6703        const g = u.offsetWidth - this.element.offsetWidth;
6704        d = parseInt(h.minWidth, 10) - g;
6705      }
6706      if (h.minHeight != null) {
6707        const g = u.offsetHeight - this.element.offsetHeight;
6708        l = parseInt(h.minHeight, 10) - g;
6709      }
6710    }
6711    if (this.minHeight = o || l, this.minWidth = i || d, s && this.setWidth(s), n && this.setHeight(n), (!s || !n) && this.refreshSize(), e)
6712      this.center();
6713    else if (r || a)
6714      this.offsetElement(r, a);
6715    else if (c && t) {
6716      let u = this.boundaryEl, h = !0;
6717      if (u || (u = this.findBoundaryElement(), h = !1), u) {
6718        const g = parseFloat(u.style.top), p = parseFloat(u.style.left);
6719        h ? this.offsetElement(isNaN(p) ? 0 : p, isNaN(g) ? 0 : g) : this.setPosition(p, g);
6720      }
6721    }
6722    this.positioned = !!this.offsetParent;
6723  }
6724  isPositioned() {
6725    return this.positioned;
6726  }
6727  getPosition() {
6728    return this.position;
6729  }
6730  setMovable(e, t) {
6731    if (!this.config.popup || e === this.movable)
6732      return;
6733    this.movable = e;
6734    const i = this.moveElementDragListener || {
6735      eElement: t,
6736      onDragStart: this.onMoveStart.bind(this),
6737      onDragging: this.onMove.bind(this),
6738      onDragStop: this.onMoveEnd.bind(this)
6739    };
6740    e ? (this.dragSvc?.addDragSource(i), this.moveElementDragListener = i) : (this.dragSvc?.removeDragSource(i), this.moveElementDragListener = void 0);
6741  }
6742  setResizable(e) {
6743    if (this.clearResizeListeners(), e ? this.addResizers() : this.removeResizers(), typeof e == "boolean") {
6744      if (e === !1)
6745        return;
6746      e = {
6747        topLeft: e,
6748        top: e,
6749        topRight: e,
6750        right: e,
6751        bottomRight: e,
6752        bottom: e,
6753        bottomLeft: e,
6754        left: e
6755      };
6756    }
6757    Object.keys(e).forEach((t) => {
6758      const s = !!e[t], o = this.getResizerElement(t), n = {
6759        dragStartPixels: 0,
6760        eElement: o,
6761        onDragStart: (r) => this.onResizeStart(r, t),
6762        onDragging: this.onResize.bind(this),
6763        onDragStop: (r) => this.onResizeEnd(r, t)
6764      };
6765      (s || !this.isAlive() && !s) && (s ? (this.dragSvc?.addDragSource(n), this.resizeListeners.push(n), o.style.pointerEvents = "all") : o.style.pointerEvents = "none", this.resizable[t] = s);
6766    });
6767  }
6768  removeSizeFromEl() {
6769    this.element.style.removeProperty("height"), this.element.style.removeProperty("width"), this.element.style.removeProperty("flex");
6770  }
6771  restoreLastSize() {
6772    this.element.style.flex = "0 0 auto";
6773    const { height: e, width: t } = this.lastSize;
6774    t !== -1 && (this.element.style.width = `${t}px`), e !== -1 && (this.element.style.height = `${e}px`);
6775  }
6776  getHeight() {
6777    return this.element.offsetHeight;
6778  }
6779  setHeight(e) {
6780    const { popup: t } = this.config, i = this.element;
6781    let s = !1;
6782    if (typeof e == "string" && e.indexOf("%") !== -1)
6783      Bi(i, e), e = vl(i), s = !0;
6784    else if (e = Math.max(this.minHeight, e), this.positioned) {
6785      const o = this.getAvailableHeight();
6786      o && e > o && (e = o);
6787    }
6788    this.getHeight() !== e && (s ? (i.style.maxHeight = "unset", i.style.minHeight = "unset") : t ? Bi(i, e) : (i.style.height = `${e}px`, i.style.flex = "0 0 auto", this.lastSize.height = typeof e == "number" ? e : parseFloat(e)));
6789  }
6790  getAvailableHeight() {
6791    const { popup: e, forcePopupParentAsOffsetParent: t } = this.config;
6792    this.positioned || this.initialisePosition();
6793    const { clientHeight: i } = this.offsetParent;
6794    if (!i)
6795      return null;
6796    const s = this.element.getBoundingClientRect(), o = this.offsetParent.getBoundingClientRect(), n = e ? this.position.y : s.top, r = e ? 0 : o.top;
6797    let a = 0;
6798    if (t) {
6799      const d = this.element.parentElement;
6800      if (d) {
6801        const { bottom: c } = d.getBoundingClientRect();
6802        a = c - s.bottom;
6803      }
6804    }
6805    return i + r - n - a;
6806  }
6807  getWidth() {
6808    return this.element.offsetWidth;
6809  }
6810  setWidth(e) {
6811    const t = this.element, { popup: i } = this.config;
6812    let s = !1;
6813    if (typeof e == "string" && e.indexOf("%") !== -1)
6814      Ye(t, e), e = As(t), s = !0;
6815    else if (this.positioned) {
6816      e = Math.max(this.minWidth, e);
6817      const { clientWidth: o } = this.offsetParent, n = i ? this.position.x : this.element.getBoundingClientRect().left;
6818      o && e + n > o && (e = o - n);
6819    }
6820    this.getWidth() !== e && (s ? (t.style.maxWidth = "unset", t.style.minWidth = "unset") : this.config.popup ? Ye(t, e) : (t.style.width = `${e}px`, t.style.flex = " unset", this.lastSize.width = typeof e == "number" ? e : parseFloat(e)));
6821  }
6822  offsetElement(e = 0, t = 0) {
6823    const { forcePopupParentAsOffsetParent: i } = this.config, s = i ? this.boundaryEl : this.element;
6824    s && (this.popupSvc?.positionPopup({
6825      ePopup: s,
6826      keepWithinBounds: !0,
6827      skipObserver: this.movable || this.isResizable(),
6828      updatePosition: () => ({ x: e, y: t })
6829    }), this.setPosition(parseFloat(s.style.left), parseFloat(s.style.top)));
6830  }
6831  constrainSizeToAvailableHeight(e) {
6832    if (!this.config.forcePopupParentAsOffsetParent)
6833      return;
6834    const t = () => {
6835      const i = this.getAvailableHeight();
6836      this.element.style.setProperty("max-height", `${i}px`);
6837    };
6838    e && this.popupSvc ? this.resizeObserverSubscriber = Rt(
6839      this.beans,
6840      this.popupSvc?.getPopupParent(),
6841      t
6842    ) : (this.element.style.removeProperty("max-height"), this.resizeObserverSubscriber && (this.resizeObserverSubscriber(), this.resizeObserverSubscriber = void 0));
6843  }
6844  setPosition(e, t) {
6845    this.position.x = e, this.position.y = t;
6846  }
6847  updateDragStartPosition(e, t) {
6848    this.dragStartPosition = { x: e, y: t };
6849  }
6850  calculateMouseMovement(e) {
6851    const { e: t, isLeft: i, isTop: s, anywhereWithin: o, topBuffer: n } = e, r = t.clientX - this.dragStartPosition.x, a = t.clientY - this.dragStartPosition.y, l = this.shouldSkipX(t, !!i, !!o, r) ? 0 : r, d = this.shouldSkipY(t, !!s, n, a) ? 0 : a;
6852    return { movementX: l, movementY: d };
6853  }
6854  shouldSkipX(e, t, i, s) {
6855    const o = this.element.getBoundingClientRect(), n = this.offsetParent.getBoundingClientRect(), r = this.boundaryEl.getBoundingClientRect(), a = this.config.popup ? this.position.x : o.left;
6856    let l = a <= 0 && n.left >= e.clientX || n.right <= e.clientX && n.right <= r.right;
6857    return l ? !0 : (t ? l = // skip if we are moving to the left and the cursor
6858    // is positioned to the right of the left side anchor
6859    s < 0 && e.clientX > a + n.left || // skip if we are moving to the right and the cursor
6860    // is positioned to the left of the dialog
6861    s > 0 && e.clientX < a + n.left : i ? l = s < 0 && e.clientX > r.right || s > 0 && e.clientX < a + n.left : l = // if the movement is bound to the right side of the dialog
6862    // we skip if we are moving to the left and the cursor
6863    // is to the right of the dialog
6864    s < 0 && e.clientX > r.right || // or skip if we are moving to the right and the cursor
6865    // is to the left of the right side anchor
6866    s > 0 && e.clientX < r.right, l);
6867  }
6868  shouldSkipY(e, t, i = 0, s) {
6869    const o = this.element.getBoundingClientRect(), n = this.offsetParent.getBoundingClientRect(), r = this.boundaryEl.getBoundingClientRect(), a = this.config.popup ? this.position.y : o.top;
6870    let l = a <= 0 && n.top >= e.clientY || n.bottom <= e.clientY && n.bottom <= r.bottom;
6871    return l ? !0 : (t ? l = // skip if we are moving to towards top and the cursor is
6872    // below the top anchor + topBuffer
6873    // note: topBuffer is used when moving the dialog using the title bar
6874    s < 0 && e.clientY > a + n.top + i || // skip if we are moving to the bottom and the cursor is
6875    // above the top anchor
6876    s > 0 && e.clientY < a + n.top : l = // skip if we are moving towards the top and the cursor
6877    // is below the bottom anchor
6878    s < 0 && e.clientY > r.bottom || // skip if we are moving towards the bottom and the cursor
6879    // is above the bottom anchor
6880    s > 0 && e.clientY < r.bottom, l);
6881  }
6882  createResizeMap() {
6883    const e = this.element;
6884    this.resizerMap = {
6885      topLeft: { element: e.querySelector("[data-ref=eTopLeftResizer]") },
6886      top: { element: e.querySelector("[data-ref=eTopResizer]") },
6887      topRight: { element: e.querySelector("[data-ref=eTopRightResizer]") },
6888      right: { element: e.querySelector("[data-ref=eRightResizer]") },
6889      bottomRight: { element: e.querySelector("[data-ref=eBottomRightResizer]") },
6890      bottom: { element: e.querySelector("[data-ref=eBottomResizer]") },
6891      bottomLeft: { element: e.querySelector("[data-ref=eBottomLeftResizer]") },
6892      left: { element: e.querySelector("[data-ref=eLeftResizer]") }
6893    };
6894  }
6895  addResizers() {
6896    if (this.resizersAdded)
6897      return;
6898    const e = this.element;
6899    if (!e)
6900      return;
6901    const i = new DOMParser().parseFromString(Af, "text/html").body;
6902    e.appendChild(i.firstChild), this.createResizeMap(), this.resizersAdded = !0;
6903  }
6904  removeResizers() {
6905    this.resizerMap = void 0;
6906    const e = this.element.querySelector(`.${yd}`);
6907    e && this.element.removeChild(e), this.resizersAdded = !1;
6908  }
6909  getResizerElement(e) {
6910    return this.resizerMap[e].element;
6911  }
6912  onResizeStart(e, t) {
6913    this.boundaryEl = this.findBoundaryElement(), this.positioned || this.initialisePosition(), this.currentResizer = {
6914      isTop: !!t.match(/top/i),
6915      isRight: !!t.match(/right/i),
6916      isBottom: !!t.match(/bottom/i),
6917      isLeft: !!t.match(/left/i)
6918    }, this.element.classList.add("ag-resizing"), this.resizerMap[t].element.classList.add("ag-active");
6919    const { popup: i, forcePopupParentAsOffsetParent: s } = this.config;
6920    !i && !s && this.applySizeToSiblings(this.currentResizer.isBottom || this.currentResizer.isTop), this.isResizing = !0, this.updateDragStartPosition(e.clientX, e.clientY);
6921  }
6922  getSiblings() {
6923    const t = this.element.parentElement;
6924    return t ? Array.prototype.slice.call(t.children).filter((i) => !i.classList.contains("ag-hidden")) : null;
6925  }
6926  getMinSizeOfSiblings() {
6927    const e = this.getSiblings() || [];
6928    let t = 0, i = 0;
6929    for (let s = 0; s < e.length; s++) {
6930      const o = e[s], n = !!o.style.flex && o.style.flex !== "0 0 auto";
6931      if (o === this.element)
6932        continue;
6933      let r = this.minHeight || 0, a = this.minWidth || 0;
6934      if (n) {
6935        const l = window.getComputedStyle(o);
6936        l.minHeight && (r = parseInt(l.minHeight, 10)), l.minWidth && (a = parseInt(l.minWidth, 10));
6937      } else
6938        r = o.offsetHeight, a = o.offsetWidth;
6939      t += r, i += a;
6940    }
6941    return { height: t, width: i };
6942  }
6943  applySizeToSiblings(e) {
6944    let t = null;
6945    const i = this.getSiblings();
6946    if (i) {
6947      for (let s = 0; s < i.length; s++) {
6948        const o = i[s];
6949        o !== t && (e ? o.style.height = `${o.offsetHeight}px` : o.style.width = `${o.offsetWidth}px`, o.style.flex = "0 0 auto", o === this.element && (t = i[s + 1]));
6950      }
6951      t && (t.style.removeProperty("height"), t.style.removeProperty("min-height"), t.style.removeProperty("max-height"), t.style.flex = "1 1 auto");
6952    }
6953  }
6954  isResizable() {
6955    return Object.values(this.resizable).some((e) => e);
6956  }
6957  onResize(e) {
6958    if (!this.isResizing || !this.currentResizer)
6959      return;
6960    const { popup: t, forcePopupParentAsOffsetParent: i } = this.config, { isTop: s, isRight: o, isBottom: n, isLeft: r } = this.currentResizer, a = o || r, l = n || s, { movementX: d, movementY: c } = this.calculateMouseMovement({ e, isLeft: r, isTop: s }), u = this.position.x, h = this.position.y;
6961    let g = 0, p = 0;
6962    if (a && d) {
6963      const f = r ? -1 : 1, m = this.getWidth(), C = m + d * f;
6964      let w = !1;
6965      r && (g = m - C, (u + g <= 0 || C <= this.minWidth) && (w = !0, g = 0)), w || this.setWidth(C);
6966    }
6967    if (l && c) {
6968      const f = s ? -1 : 1, m = this.getHeight(), C = m + c * f;
6969      let w = !1;
6970      s ? (p = m - C, (h + p <= 0 || C <= this.minHeight) && (w = !0, p = 0)) : !this.config.popup && !this.config.forcePopupParentAsOffsetParent && m < C && this.getMinSizeOfSiblings().height + C > this.element.parentElement.offsetHeight && (w = !0), w || this.setHeight(C);
6971    }
6972    this.updateDragStartPosition(e.clientX, e.clientY), ((t || i) && g || p) && this.offsetElement(u + g, h + p);
6973  }
6974  onResizeEnd(e, t) {
6975    this.isResizing = !1, this.currentResizer = null, this.boundaryEl = null, this.element.classList.remove("ag-resizing"), this.resizerMap[t].element.classList.remove("ag-active"), this.dispatchLocalEvent({ type: "resize" });
6976  }
6977  refreshSize() {
6978    const e = this.element;
6979    this.config.popup && (this.config.width || this.setWidth(e.offsetWidth), this.config.height || this.setHeight(e.offsetHeight));
6980  }
6981  onMoveStart(e) {
6982    this.boundaryEl = this.findBoundaryElement(), this.positioned || this.initialisePosition(), this.isMoving = !0, this.element.classList.add("ag-moving"), this.updateDragStartPosition(e.clientX, e.clientY);
6983  }
6984  onMove(e) {
6985    if (!this.isMoving)
6986      return;
6987    const { x: t, y: i } = this.position;
6988    let s;
6989    this.config.calculateTopBuffer && (s = this.config.calculateTopBuffer());
6990    const { movementX: o, movementY: n } = this.calculateMouseMovement({
6991      e,
6992      isTop: !0,
6993      anywhereWithin: !0,
6994      topBuffer: s
6995    });
6996    this.offsetElement(t + o, i + n), this.updateDragStartPosition(e.clientX, e.clientY);
6997  }
6998  onMoveEnd() {
6999    this.isMoving = !1, this.boundaryEl = null, this.element.classList.remove("ag-moving");
7000  }
7001  setOffsetParent() {
7002    this.config.forcePopupParentAsOffsetParent && this.popupSvc ? this.offsetParent = this.popupSvc.getPopupParent() : this.offsetParent = this.element.offsetParent;
7003  }
7004  findBoundaryElement() {
7005    let e = this.element;
7006    for (; e; ) {
7007      if (window.getComputedStyle(e).position !== "static")
7008        return e;
7009      e = e.parentElement;
7010    }
7011    return this.element;
7012  }
7013  clearResizeListeners() {
7014    for (; this.resizeListeners.length; ) {
7015      const e = this.resizeListeners.pop();
7016      this.dragSvc?.removeDragSource(e);
7017    }
7018  }
7019  destroy() {
7020    super.destroy(), this.moveElementDragListener && this.dragSvc?.removeDragSource(this.moveElementDragListener), this.constrainSizeToAvailableHeight(!1), this.clearResizeListeners(), this.removeResizers();
7021  }
7022}, Mf = "ag-focus-managed", xi = class extends y {
7023  constructor(e, t = {}) {
7024    super(), this.eFocusable = e, this.callbacks = t, this.callbacks = {
7025      shouldStopEventPropagation: () => !1,
7026      onTabKeyDown: (i) => {
7027        if (i.defaultPrevented)
7028          return;
7029        const s = zt(this.beans, this.eFocusable, !1, i.shiftKey);
7030        s && (s.focus(), i.preventDefault());
7031      },
7032      ...t
7033    };
7034  }
7035  postConstruct() {
7036    const {
7037      eFocusable: e,
7038      callbacks: { onFocusIn: t, onFocusOut: i }
7039    } = this;
7040    e.classList.add(Mf), this.addKeyDownListeners(e), t && this.addManagedElementListeners(e, { focusin: t }), i && this.addManagedElementListeners(e, { focusout: i });
7041  }
7042  addKeyDownListeners(e) {
7043    this.addManagedElementListeners(e, {
7044      keydown: (t) => {
7045        if (t.defaultPrevented || nt(t))
7046          return;
7047        const { callbacks: i } = this;
7048        if (i.shouldStopEventPropagation(t)) {
7049          mi(t);
7050          return;
7051        }
7052        t.key === b.TAB ? i.onTabKeyDown(t) : i.handleKeyDown && i.handleKeyDown(t);
7053      }
7054    });
7055  }
7056}, Rd = {
7057  applyFilter: "Apply",
7058  clearFilter: "Clear",
7059  resetFilter: "Reset",
7060  cancelFilter: "Cancel",
7061  textFilter: "Text Filter",
7062  numberFilter: "Number Filter",
7063  dateFilter: "Date Filter",
7064  setFilter: "Set Filter",
7065  filterOoo: "Filter...",
7066  empty: "Choose one",
7067  equals: "Equals",
7068  notEqual: "Does not equal",
7069  lessThan: "Less than",
7070  greaterThan: "Greater than",
7071  inRange: "Between",
7072  inRangeStart: "From",
7073  inRangeEnd: "To",
7074  lessThanOrEqual: "Less than or equal to",
7075  greaterThanOrEqual: "Greater than or equal to",
7076  contains: "Contains",
7077  notContains: "Does not contain",
7078  startsWith: "Begins with",
7079  endsWith: "Ends with",
7080  blank: "Blank",
7081  notBlank: "Not blank",
7082  before: "Before",
7083  after: "After",
7084  andCondition: "AND",
7085  orCondition: "OR",
7086  dateFormatOoo: "yyyy-mm-dd"
7087};
7088function jn(e, t) {
7089  const { debounceMs: i } = e;
7090  return $s(e) ? (i != null && x(71), 0) : i ?? t;
7091}
7092function $s(e) {
7093  return (e.buttons?.indexOf("apply") ?? -1) >= 0;
7094}
7095var If = class extends _ {
7096  constructor(e) {
7097    super(), this.filterNameKey = e, this.applyActive = !1, this.hidePopup = null, this.debouncePending = !1, this.appliedModel = null, this.eFilterBody = M, this.buttonListeners = [], this.defaultDebounceMs = 0;
7098  }
7099  postConstruct() {
7100    this.resetTemplate(), this.createManagedBean(
7101      new xi(this.getFocusableElement(), {
7102        handleKeyDown: this.handleKeyDown.bind(this)
7103      })
7104    ), this.positionableFeature = new Tf(this.getPositionableElement(), {
7105      forcePopupParentAsOffsetParent: !0
7106    }), this.createBean(this.positionableFeature);
7107  }
7108  // override
7109  // eslint-disable-next-line @typescript-eslint/no-unused-vars
7110  handleKeyDown(e) {
7111  }
7112  getFilterTitle() {
7113    return this.translate(this.filterNameKey);
7114  }
7115  isFilterActive() {
7116    return !!this.appliedModel;
7117  }
7118  resetTemplate(e) {
7119    let t = this.getGui();
7120    t && t.removeEventListener("submit", this.onFormSubmit);
7121    const i = (
7122      /* html */
7123      `
7124            <form class="ag-filter-wrapper">
7125                <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" data-ref="eFilterBody">
7126                    ${this.createBodyTemplate()}
7127                </div>
7128            </form>`
7129    );
7130    this.setTemplate(i, this.getAgComponents(), e), t = this.getGui(), t?.addEventListener("submit", this.onFormSubmit);
7131  }
7132  isReadOnly() {
7133    return !!this.params.readOnly;
7134  }
7135  init(e) {
7136    this.setParams(e), this.resetUiToDefaults(!0).then(() => {
7137      this.updateUiVisibility(), this.setupOnBtApplyDebounce();
7138    });
7139  }
7140  setParams(e) {
7141    this.params = e, this.applyActive = $s(e), this.resetButtonsPanel(e);
7142  }
7143  updateParams(e) {
7144    this.params = e, this.applyActive = $s(e), this.resetUiToActiveModel(this.getModel(), () => {
7145      this.updateUiVisibility(), this.setupOnBtApplyDebounce();
7146    });
7147  }
7148  resetButtonsPanel(e, t) {
7149    const { buttons: i, readOnly: s } = t ?? {}, { buttons: o, readOnly: n } = e;
7150    if (s === n && Zi(i, o))
7151      return;
7152    const r = o && o.length > 0 && !this.isReadOnly();
7153    if (this.eButtonsPanel ? (ue(this.eButtonsPanel), this.buttonListeners.forEac
7153h((d) => d()), this.buttonListeners = []) : r && (this.eButtonsPanel = document.createElement("div"), this.eButtonsPanel.classList.add("ag-filter-apply-panel")), !r) {
7154      this.eButtonsPanel && qe(this.eButtonsPanel);
7155      return;
7156    }
7157    const a = document.createDocumentFragment(), l = (d) => {
7158      let c;
7159      const u = d ? this.translate(`${d}Filter`) : void 0;
7160      switch (d) {
7161        case "apply":
7162          c = (p) => this.onBtApply(!1, !1, p);
7163          break;
7164        case "clear":
7165          c = () => this.onBtClear();
7166          break;
7167        case "reset":
7168          c = () => this.onBtReset();
7169          break;
7170        case "cancel":
7171          c = (p) => {
7172            this.onBtCancel(p);
7173          };
7174          break;
7175        default:
7176          x(75);
7177          return;
7178      }
7179      const g = Qi(
7180        /* html */
7181        `<button
7182                    type="${d === "apply" ? "submit" : "button"}"
7183                    data-ref="${d}FilterButton"
7184                    class="ag-button ag-standard-button ag-filter-apply-panel-button"
7185                >${u}
7186                </button>`
7187      );
7188      this.buttonListeners.push(...this.addManagedElementListeners(g, { click: c })), a.append(g);
7189    };
7190    o.forEach((d) => l(d)), this.eButtonsPanel.append(a), this.getGui().appendChild(this.eButtonsPanel);
7191  }
7192  setupOnBtApplyDebounce() {
7193    const e = jn(this.params, this.defaultDebounceMs), t = Ce(this, this.checkApplyDebounce.bind(this), e);
7194    this.onBtApplyDebounce = () => {
7195      this.debouncePending = !0, t();
7196    };
7197  }
7198  checkApplyDebounce() {
7199    this.debouncePending && (this.debouncePending = !1, this.onBtApply());
7200  }
7201  getModel() {
7202    return this.appliedModel ?? null;
7203  }
7204  setModel(e) {
7205    return (e != null ? this.setModelIntoUi(e) : this.resetUiToDefaults()).then(() => {
7206      this.updateUiVisibility(), this.applyModel("api");
7207    });
7208  }
7209  onBtCancel(e) {
7210    this.resetUiToActiveModel(this.getModel(), () => {
7211      this.handleCancelEnd(e);
7212    });
7213  }
7214  handleCancelEnd(e) {
7215    this.params.closeOnApply && this.close(e);
7216  }
7217  resetUiToActiveModel(e, t) {
7218    const i = () => {
7219      this.onUiChanged(!1, "prevent"), t?.();
7220    };
7221    e != null ? this.setModelIntoUi(e).then(i) : this.resetUiToDefaults().then(i);
7222  }
7223  onBtClear() {
7224    this.resetUiToDefaults().then(() => this.onUiChanged());
7225  }
7226  onBtReset() {
7227    this.onBtClear(), this.onBtApply();
7228  }
7229  /**
7230   * Applies changes made in the UI to the filter, and returns true if the model has changed.
7231   */
7232  // eslint-disable-next-line @typescript-eslint/no-unused-vars
7233  applyModel(e = "api") {
7234    const t = this.getModelFromUi();
7235    if (!this.isModelValid(t))
7236      return !1;
7237    const i = this.appliedModel;
7238    return this.appliedModel = t, !this.areModelsEqual(i, t);
7239  }
7240  // eslint-disable-next-line @typescript-eslint/no-unused-vars
7241  isModelValid(e) {
7242    return !0;
7243  }
7244  onFormSubmit(e) {
7245    e.preventDefault();
7246  }
7247  onBtApply(e = !1, t = !1, i) {
7248    i && i.preventDefault(), this.applyModel(t ? "rowDataUpdated" : "ui") && this.params.filterChangedCallback({ afterFloatingFilter: e, afterDataChange: t, source: "columnFilter" });
7249    const { closeOnApply: s } = this.params;
7250    s && this.applyActive && !e && !t && this.close(i);
7251  }
7252  onNewRowsLoaded() {
7253  }
7254  close(e) {
7255    if (!this.hidePopup)
7256      return;
7257    const t = e, i = t && t.key;
7258    let s;
7259    (i === "Enter" || i === "Space") && (s = { keyboardEvent: t }), this.hidePopup(s), this.hidePopup = null;
7260  }
7261  /**
7262   * By default, if the change came from a floating filter it will be applied immediately, otherwise if there is no
7263   * apply button it will be applied after a debounce, otherwise it will not be applied at all. This behaviour can
7264   * be adjusted by using the apply parameter.
7265   */
7266  onUiChanged(e = !1, t) {
7267    if (this.updateUiVisibility(), this.params.filterModifiedCallback(), this.applyActive && !this.isReadOnly()) {
7268      const i = this.isModelValid(this.getModelFromUi()), s = this.queryForHtmlElement('[data-ref="applyFilterButton"]');
7269      s && qi(s, !i);
7270    }
7271    e && !t || t === "immediately" ? this.onBtApply(e) : (!this.applyActive && !t || t === "debounce") && this.onBtApplyDebounce();
7272  }
7273  afterGuiAttached(e) {
7274    e && (this.hidePopup = e.hidePopup), this.refreshFilterResizer(e?.container);
7275  }
7276  refreshFilterResizer(e) {
7277    const { positionableFeature: t, gos: i } = this;
7278    if (!t || e === "toolPanel")
7279      return;
7280    e === "floatingFilter" || e === "columnFilter" ? (t.restoreLastSize(), t.setResizable(
7281      i.get("enableRtl") ? { bottom: !0, bottomLeft: !0, left: !0 } : { bottom: !0, bottomRight: !0, right: !0 }
7282    )) : (t.removeSizeFromEl(), t.setResizable(!1)), t.constrainSizeToAvailableHeight(!0);
7283  }
7284  afterGuiDetached() {
7285    this.checkApplyDebounce(), this.positionableFeature?.constrainSizeToAvailableHeight(!1);
7286  }
7287  refresh(e) {
7288    const t = this.params;
7289    return this.params = e, this.resetButtonsPanel(e, t), !0;
7290  }
7291  destroy() {
7292    const e = this.getGui();
7293    e && e.removeEventListener("submit", this.onFormSubmit), this.hidePopup = null, this.positionableFeature && (this.positionableFeature = this.destroyBean(this.positionableFeature)), this.appliedModel = null, super.destroy();
7294  }
7295  translate(e) {
7296    return this.getLocaleTextFunc()(e, Rd[e]);
7297  }
7298  getCellValue(e) {
7299    return this.params.getValue(e);
7300  }
7301  // override to control positionable feature
7302  getPositionableElement() {
7303    return this.eFilterBody;
7304  }
7305};
7306function kf(e, t, i) {
7307  if (t == null)
7308    return null;
7309  let s = null;
7310  const { compName: o, jsComp: n, fwComp: r } = Lp(e, t);
7311  return o ? s = {
7312    agSetColumnFilter: "agSetColumnFloatingFilter",
7313    agMultiColumnFilter: "agMultiColumnFloatingFilter",
7314    agGroupColumnFilter: "agGroupColumnFloatingFilter",
7315    agNumberColumnFilter: "agNumberColumnFloatingFilter",
7316    agDateColumnFilter: "agDateColumnFloatingFilter",
7317    agTextColumnFilter: "agTextColumnFloatingFilter"
7318  }[o] : n == null && r == null && t.filter === !0 && (s = i()), s;
7319}
7320var Oe = {
7321  AUTO_HEIGHT: "ag-layout-auto-height",
7322  NORMAL: "ag-layout-normal",
7323  PRINT: "ag-layout-print"
7324}, qn = class extends y {
7325  constructor(e) {
7326    super(), this.view = e;
7327  }
7328  postConstruct() {
7329    this.addManagedPropertyListener("domLayout", this.updateLayoutClasses.bind(this)), this.updateLayoutClasses();
7330  }
7331  updateLayoutClasses() {
7332    const e = this.gos.get("domLayout"), t = {
7333      autoHeight: e === "autoHeight",
7334      normal: e === "normal",
7335      print: e === "print"
7336    }, i = t.autoHeight ? Oe.AUTO_HEIGHT : t.print ? Oe.PRINT : Oe.NORMAL;
7337    this.view.updateLayoutClasses(i, t);
7338  }
7339}, gt = "Viewport", na = "fakeVScrollComp", ra = [
7340  "fakeHScrollComp",
7341  "centerHeader",
7342  "topCenter",
7343  "bottomCenter",
7344  "stickyTopCenter",
7345  "stickyBottomCenter"
7346], Lf = class extends y {
7347  constructor(e) {
7348    super(), this.lastScrollSource = [null, null], this.scrollLeft = -1, this.nextScrollTop = -1, this.scrollTop = -1, this.lastOffsetHeight = -1, this.lastScrollTop = -1, this.scrollTimer = 0, this.needsRefreshedScrollPosition = !0, this.eBodyViewport = e, this.resetLastHScrollDebounced = Ce(
7349      this,
7350      () => this.lastScrollSource[
7351        1
7352        /* Horizontal */
7353      ] = null,
7354      500
7355    ), this.resetLastVScrollDebounced = Ce(
7356      this,
7357      () => this.lastScrollSource[
7358        0
7359        /* Vertical */
7360      ] = null,
7361      500
7362    );
7363  }
7364  wireBeans(e) {
7365    this.ctrlsSvc = e.ctrlsSvc, this.animationFrameSvc = e.animationFrameSvc, this.visibleCols = e.visibleCols;
7366  }
7367  destroy() {
7368    super.destroy(), window.clearTimeout(this.scrollTimer);
7369  }
7370  postConstruct() {
7371    this.enableRtl = this.gos.get("enableRtl");
7372    const e = this.requireUpdatedScrollPosition.bind(this);
7373    this.addManagedEventListeners({
7374      displayedColumnsWidthChanged: this.onDisplayedColumnsWidthChanged.bind(this),
7375      gridSizeChanged: e
7376    }), this.addManagedElementListeners(this.eBodyViewport, {
7377      scroll: e
7378    }), this.ctrlsSvc.whenReady(this, (t) => {
7379      this.centerRowsCtrl = t.center, this.onDisplayedColumnsWidthChanged(), this.addScrollListener();
7380    });
7381  }
7382  requireUpdatedScrollPosition() {
7383    this.needsRefreshedScrollPosition = !0;
7384  }
7385  addScrollListener() {
7386    this.addHorizontalScrollListeners(), this.addVerticalScrollListeners();
7387  }
7388  addHorizontalScrollListeners() {
7389    this.addManagedElementListeners(this.centerRowsCtrl.eViewport, {
7390      scroll: this.onHScroll.bind(this, gt)
7391    });
7392    for (const e of ra) {
7393      const t = this.ctrlsSvc.get(e);
7394      this.registerScrollPartner(t, this.onHScroll.bind(this, e));
7395    }
7396  }
7397  addVerticalScrollListeners() {
7398    const e = this.ctrlsSvc.get("fakeVScrollComp"), t = this.gos.get("debounceVerticalScrollbar"), i = t ? Ce(this, this.onVScroll.bind(this, gt), 100) : this.onVScroll.bind(this, gt), s = t ? Ce(this, this.onVScroll.bind(this, na), 100) : this.onVScroll.bind(this, na);
7399    this.addManagedElementListeners(this.eBodyViewport, { scroll: i }), this.registerScrollPartner(e, s);
7400  }
7401  registerScrollPartner(e, t) {
7402    e.onScrollCallback(t);
7403  }
7404  onDisplayedColumnsWidthChanged() {
7405    this.enableRtl && this.horizontallyScrollHeaderCenterAndFloating
7405Center();
7406  }
7407  horizontallyScrollHeaderCenterAndFloatingCenter(e) {
7408    this.centerRowsCtrl != null && (e === void 0 && (e = this.centerRowsCtrl.getCenterViewportScrollLeft()), this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)));
7409  }
7410  setScrollLeftForAllContainersExceptCurrent(e) {
7411    for (const t of [...ra, gt]) {
7412      if (this.lastScrollSource[
7413        1
7414        /* Horizontal */
7415      ] === t)
7416        continue;
7417      const i = this.getViewportForSource(t);
7418      Is(i, e, this.enableRtl);
7419    }
7420  }
7421  getViewportForSource(e) {
7422    return e === gt ? this.centerRowsCtrl.eViewport : this.ctrlsSvc.get(e).eViewport;
7423  }
7424  isControllingScroll(e, t) {
7425    return this.lastScrollSource[t] == null ? (t === 0 ? this.lastScrollSource[0] = e : this.lastScrollSource[1] = e, !0) : this.lastScrollSource[t] === e;
7426  }
7427  onHScroll(e) {
7428    if (!this.isControllingScroll(
7429      e,
7430      1
7431      /* Horizontal */
7432    ))
7433      return;
7434    const t = this.centerRowsCtrl.eViewport, { scrollLeft: i } = t;
7435    if (this.shouldBlockScrollUpdate(1, i, !0))
7436      return;
7437    const s = Ms(this.getViewportForSource(e), this.enableRtl);
7438    this.doHorizontalScroll(s), this.resetLastHScrollDebounced();
7439  }
7440  onVScroll(e) {
7441    if (!this.isControllingScroll(
7442      e,
7443      0
7444      /* Vertical */
7445    ))
7446      return;
7447    let t;
7448    if (e === gt ? t = this.eBodyViewport.scrollTop : t = this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(), this.shouldBlockScrollUpdate(0, t, !0))
7449      return;
7450    const { animationFrameSvc: i } = this;
7451    i?.setScrollTop(t), this.nextScrollTop = t, e === gt ? this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t) : this.eBodyViewport.scrollTop = t, !i || this.gos.get("suppressAnimationFrame") ? this.scrollGridIfNeeded() : i.schedule(), this.resetLastVScrollDebounced();
7452  }
7453  doHorizontalScroll(e) {
7454    const t = this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();
7455    this.scrollLeft === e && e === t || (this.scrollLeft = e, this.fireScrollEvent(
7456      1
7457      /* Horizontal */
7458    ), this.horizontallyScrollHeaderCenterAndFloatingCenter(e), this.centerRowsCtrl.onHorizontalViewportChanged(!0));
7459  }
7460  fireScrollEvent(e) {
7461    const t = {
7462      type: "bodyScroll",
7463      direction: e === 1 ? "horizontal" : "vertical",
7464      left: this.scrollLeft,
7465      top: this.scrollTop
7466    };
7467    this.eventSvc.dispatchEvent(t), window.clearTimeout(this.scrollTimer), this.scrollTimer = window.setTimeout(() => {
7468      this.scrollTimer = 0, this.eventSvc.dispatchEvent({
7469        ...t,
7470        type: "bodyScrollEnd"
7471      });
7472    }, 100);
7473  }
7474  shouldBlockScrollUpdate(e, t, i = !1) {
7475    return i && !Tt() ? !1 : e === 0 ? this.shouldBlockVerticalScroll(t) : this.shouldBlockHorizontalScroll(t);
7476  }
7477  shouldBlockVerticalScroll(e) {
7478    const t = Gn(this.eBodyViewport), { scrollHeight: i } = this.eBodyViewport;
7479    return e < 0 || e + t > i;
7480  }
7481  shouldBlockHorizontalScroll(e) {
7482    const t = this.centerRowsCtrl.getCenterWidth(), { scrollWidth: i } = this.centerRowsCtrl.eViewport;
7483    if (this.enableRtl && Ts()) {
7484      if (e > 0)
7485        return !0;
7486    } else if (e < 0)
7487      return !0;
7488    return Math.abs(e) + t > i;
7489  }
7490  redrawRowsAfterScroll() {
7491    this.fireScrollEvent(
7492      0
7493      /* Vertical */
7494    );
7495  }
7496  // this is to cater for AG-3274, where grid is removed from the dom and then inserted back in again.
7497  // (which happens with some implementations of tabbing). this can result in horizontal scroll getting
7498  // reset back to the left, however no scroll event is fired. so we need to get header to also scroll
7499  // back to the left to be kept in sync.
7500  // adding and removing the grid from the DOM both resets the scroll position and
7501  // triggers a resize event, so notify listeners if the scroll position has changed
7502  checkScrollLeft() {
7503    this.scrollLeft !== this.centerRowsCtrl.getCenterViewportScrollLeft() && this.onHScroll(gt);
7504  }
7505  scrollGridIfNeeded() {
7506    const e = this.scrollTop != this.nextScrollTop;
7507    return e && (this.scrollTop = this.nextScrollTop, this.redrawRowsAfterScroll()), e;
7508  }
7509  // called by scrollHorizontally method and alignedGridsService
7510  setHorizontalScrollPosition(e, t = !1) {
7511    const s = this.centerRowsCtrl.eViewport.scrollWidth - this.centerRowsCtrl.getCenterWidth();
7512    !t && this.shouldBlockScrollUpdate(1, e) && (this.enableRtl && Ts() ? e = e > 0 ? 0 : s : e = Math.min(Math.max(e, 0), s)), Is(this.centerRowsCtrl.eViewport, Math.abs(e), this.enableRtl), this.doHorizontalScroll(e);
7513  }
7514  setVerticalScrollPosition(e) {
7515    this.eBodyViewport.scrollTop = e;
7516  }
7517  getVScrollPosition() {
7518    if (!this.needsRefreshedScrollPosition) {
7519      const { lastOffsetHeight: i, lastScrollTop: s } = this;
7520      return {
7521        top: s,
7522        bottom: s + i
7523      };
7524    }
7525    this.needsRefreshedScrollPosition = !1;
7526    const { scrollTop: e, offsetHeight: t } = this.eBodyViewport;
7527    return this.lastScrollTop = e, this.lastOffsetHeight = t, {
7528      top: e,
7529      bottom: e + t
7530    };
7531  }
7532  /** Get an approximate scroll position that returns the last real value read.
7533   * This is useful for avoiding repeated DOM reads that force the browser to recalculate styles.
7534   * This can have big performance improvements but may not be 100% accurate so only use if this is acceptable.
7535   */
7536  getApproximateVScollPosition() {
7537    return this.lastScrollTop >= 0 && this.lastOffsetHeight >= 0 ? {
7538      top: this.scrollTop,
7539      bottom: this.scrollTop + this.lastOffsetHeight
7540    } : this.getVScrollPosition();
7541  }
7542  getHScrollPosition() {
7543    return this.centerRowsCtrl.getHScrollPosition();
7544  }
7545  isHorizontalScrollShowing() {
7546    return this.centerRowsCtrl.isHorizontalScrollShowing();
7547  }
7548  // called by the headerRootComp and moveColumnController
7549  scrollHorizontally(e) {
7550    const t = this.centerRowsCtrl.eViewport.scrollLeft;
7551    return this.setHorizontalScrollPosition(t + e), this.centerRowsCtrl.eViewport.scrollLeft - t;
7552  }
7553  // gets called by rowRenderer when new data loaded, as it will want to scroll to the top
7554  scrollToTop() {
7555    this.eBodyViewport.scrollTop = 0;
7556  }
7557  // Valid values for position are bottom, middle and top
7558  ensureNodeVisible(e, t = null) {
7559    const { rowModel: i } = this.beans, s = i.getRowCount();
7560    let o = -1;
7561    for (let n = 0; n < s; n++) {
7562      const r = i.getRow(n);
7563      if (typeof e == "function") {
7564        if (r && e(r)) {
7565          o = n;
7566          break;
7567        }
7568      } else if (e === r || e === r.data) {
7569        o = n;
7570        break;
7571      }
7572    }
7573    o >= 0 && this.ensureIndexVisible(o, t);
7574  }
7575  // Valid values for position are bottom, middle and top
7576  // position should be {'top','middle','bottom', or undefined/null}.
7577  // if undefined/null, then the grid will to the minimal amount of scrolling,
7578  // eg if grid needs to scroll up, it scrolls until row is on top,
7579  //    if grid needs to scroll down, it scrolls until row is on bottom,
7580  //    if row is already in view, grid does not scroll
7581  ensureIndexVisible(e, t) {
7582    if (de(this.gos, "print"))
7583      return;
7584    const { rowModel: i } = this.beans, s = i.getRowCount();
7585    if (typeof e != "number" || e < 0 || e >= s) {
7586      x(88, { index: e });
7587      return;
7588    }
7589    const n = this.gos.get("pagination") && !this.gos.get("suppressPaginationPanel"), {
7590      frameworkOverrides: r,
7591      pagination: a,
7592      pageBounds: l,
7593      rowContainerHeight: d,
7594      rowRenderer: c
7595    } = this.beans;
7596    r.wrapIncoming(() => {
7597      n || a?.goToPageWithIndex(e);
7598      const u = this.ctrlsSvc.getGridBodyCtrl(), h = u.stickyTopHeight, g = u.stickyBottomHeight, p = i.getRow(e);
7599      let f;
7600      do {
7601        const m = p.rowTop, C = p.rowHeight, w = l.getPixelOffset(), S = p.rowTop - w, v = S + p.rowHeight, P = this.getVScrollPosition(), T = d.divStretchOffset, D = P.top + T, R = P.bottom + T, E = R - D, k = d.getScrollPositionForPixel(S), K = d.getScrollPositionForPixel(v - E), Ee = Math.min((k + K) / 2, S), Fe = D + h > S, ze = R - g < v;
7602        let re = null;
7603        t === "top" ? re = k : t === "bottom" ? re = K : t === "middle" ? re = Ee : Fe ? re = k - h : ze && (re = K + g), re !== null && (this.setVerticalScrollPosition(re), c.redraw({ afterScroll: !0 })), f = m !== p.rowTop || C !== p.rowHeight;
7604      } while (f);
7605      this.animationFrameSvc?.flushAllFrames();
7606    });
7607  }
7608  ensureColumnVisible(e, t = "auto") {
7609    const { colModel: i, frameworkOverrides: s } = this.beans, o = i.getCol(e);
7610    if (!o || o.isPinned() || !this.visibleCols.isColDisplayed(o))
7611      return;
7612    const n = this.getPositionedHorizontalScroll(o, t);
7613    s.wrapIncoming(() => {
7614      n !== null && this.centerRowsCtrl.setCenterViewportScrollLeft(n), this.centerRowsCtrl.onHorizontalViewportChanged(), this.animationFrameSvc?.flushAllFrames();
7615    });
7616  }
7617  getPositionedHorizontalScroll(e, t) {
7618    const { columnBeforeStart: i, columnAfterEnd: s } = this.isColumnOutsideViewport(e), o = this.centerRowsCtrl.getCenterWidth() < e.getActualWidth(), n = this.centerRowsCtrl.getCenterWidth(), r = this.enableRtl;
7619    let a = (r ? i : s) || o, l = r ? s : i;
7620    t !== "auto" && (a = t === "start", l = t === "end");
7621    const d = t === "middle";
7622    if (a || l || d) {
7623      const { colLeft: c, colMiddle: u, colRight: h } = this.getColumnBounds(e);
7624      return d ? u - n / 2 : a ? r ? h : c : r ? c - n : h - n;
7625    }
7626    return null;
7627  }
7628  isColumnOutsideViewport(e) {
7629    const { start: t, end: i } = this.getViewportBounds(), { colLeft: s, colRight: o } = this.getColumnBounds(e), n = this.enableRtl, r = n ? t > o : i < o, a = n ? i < s : t > s;
7630    return { columnBeforeStart: r, columnAfterEnd: a };
7631  }
7632  getColumnBounds(e) {
7633    const t = this.enableRtl, i = this.visibleCols.bodyWidth, s = e.getActualWidth(), o = e.getLeft(), n = t ? -1 : 1, r = t ? i - o : o, a = r + s * n, l = r + s / 2 * n;
7634    return { colLeft: r, colMiddle: l, colRight: a };
7635  }
7636  getViewportBounds() {
7637    const e = this.centerRowsCtrl.getCenterWidth(), t = this.centerRowsCtrl.getCenterViewportScrollLeft(), i = t, s = e + t;
7638    return { start: i, end: s, width: e };
7639  }
7640}, Yn = class extends y {
7641  constructor(e, t = !1) {
7642    super(), this.callback = e, this.addSpacer = t;
7643  }
7644  postConstruct() {
7645    const e = this.setWidth.bind(this);
7646    this.addManagedPropertyListener("domLayout", e), this.addManagedEventListeners({
7647      columnContainerWidthChanged: e,
7648      displayedColumnsChanged: e,
7649      leftPinnedWidthChanged: e
7650    }), this.addSpacer && this.addManagedEventListeners({
7651      rightPinnedWidthChanged: e,
7652      scrollVisibilityChanged: e,
7653      scrollbarWidthChanged: e
7654    }), this.setWidth();
7655  }
7656  setWidth() {
7657    const e = de(this.gos, "print"), { visibleCols: t, scrollVisibleSvc: 
7657i } = this.beans, s = t.bodyWidth, o = t.getColsLeftWidth(), n = t.getDisplayedColumnsRightWidth();
7658    let r;
7659    e ? r = s + o + n : (r = s, this.addSpacer && (this.gos.get("enableRtl") ? o : n) === 0 && i.verticalScrollShowing && (r += i.getScrollbarWidth())), this.callback(r);
7660  }
7661}, Of = class extends y {
7662  constructor(e) {
7663    super(), this.centerContainerCtrl = e;
7664  }
7665  wireBeans(e) {
7666    this.scrollVisibleSvc = e.scrollVisibleSvc;
7667  }
7668  postConstruct() {
7669    this.beans.ctrlsSvc.whenReady(this, (e) => {
7670      this.gridBodyCtrl = e.gridBodyCtrl, this.listenForResize();
7671    }), this.addManagedEventListeners({ scrollbarWidthChanged: this.onScrollbarWidthChanged.bind(this) }), this.addManagedPropertyListeners(["alwaysShowHorizontalScroll", "alwaysShowVerticalScroll"], () => {
7672      this.checkViewportAndScrolls();
7673    });
7674  }
7675  listenForResize() {
7676    const { beans: e, centerContainerCtrl: t, gridBodyCtrl: i } = this, s = () => {
7677      Ft(e, () => {
7678        this.onCenterViewportResized();
7679      });
7680    };
7681    t.registerViewportResizeListener(s), i.registerBodyViewportResizeListener(s);
7682  }
7683  onScrollbarWidthChanged() {
7684    this.checkViewportAndScrolls();
7685  }
7686  onCenterViewportResized() {
7687    if (this.scrollVisibleSvc.updateScrollGap(), this.centerContainerCtrl.isViewportInTheDOMTree()) {
7688      const { pinnedCols: e, colFlex: t } = this.beans;
7689      e?.keepPinnedColumnsNarrowerThanViewport(), this.checkViewportAndScrolls();
7690      const i = this.centerContainerCtrl.getCenterWidth();
7691      i !== this.centerWidth && (this.centerWidth = i, t?.refreshFlexedColumns({
7692        viewportWidth: this.centerWidth,
7693        updateBodyWidths: !0,
7694        fireResizedEvent: !0
7695      }));
7696    } else
7697      this.bodyHeight = 0;
7698  }
7699  // gets called every time the viewport size changes. we use this to check visibility of scrollbars
7700  // in the grid panel, and also to check size and position of viewport for row and column virtualisation.
7701  checkViewportAndScrolls() {
7702    this.updateScrollVisibleService(), this.checkBodyHeight(), this.onHorizontalViewportChanged(), this.gridBodyCtrl.scrollFeature.checkScrollLeft();
7703  }
7704  getBodyHeight() {
7705    return this.bodyHeight;
7706  }
7707  checkBodyHeight() {
7708    const e = this.gridBodyCtrl.eBodyViewport, t = Gn(e);
7709    this.bodyHeight !== t && (this.bodyHeight = t, this.eventSvc.dispatchEvent({
7710      type: "bodyHeightChanged"
7711    }));
7712  }
7713  updateScrollVisibleService() {
7714    this.updateScrollVisibleServiceImpl(), setTimeout(this.updateScrollVisibleServiceImpl.bind(this), 500);
7715  }
7716  updateScrollVisibleServiceImpl() {
7717    const e = {
7718      horizontalScrollShowing: this.centerContainerCtrl.isHorizontalScrollShowing(),
7719      verticalScrollShowing: this.gridBodyCtrl.isVerticalScrollShowing()
7720    };
7721    this.scrollVisibleSvc.setScrollsVisible(e);
7722  }
7723  // this gets called whenever a change in the viewport, so we can inform column controller it has to work
7724  // out the virtual columns again. gets called from following locations:
7725  // + ensureColVisible, scroll, init, layoutChanged, displayedColumnsChanged
7726  onHorizontalViewportChanged() {
7727    const e = this.centerContainerCtrl.getCenterWidth(), t = this.centerContainerCtrl.getViewportScrollLeft();
7728    this.beans.colViewport.setScrollPosition(e, t);
7729  }
7730};
7731function Qn(e, t, i, s, o, n) {
7732  if (i == null && t == null)
7733    return;
7734  const r = {}, a = {}, l = (d, c) => {
7735    d.split(" ").forEach((u) => {
7736      u.trim() != "" && c(u);
7737    });
7738  };
7739  if (i) {
7740    const d = Object.keys(i);
7741    for (let c = 0; c < d.length; c++) {
7742      const u = d[c], h = i[u];
7743      let g;
7744      typeof h == "string" ? g = e ? e.evaluate(h, s) : !0 : typeof h == "function" && (g = h(s)), l(u, (p) => {
7745        g ? r[p] = !0 : a[p] = !0;
7746      });
7747    }
7748  }
7749  t && n && Object.keys(t).forEach(
7750    (d) => l(d, (c) => {
7751      r[c] || (a[c] = !0);
7752    })
7753  ), n && Object.keys(a).forEach(n), Object.keys(r).forEach(o);
7754}
7755function aa(e) {
7756  if (e.group)
7757    return e.level;
7758  const t = e.parent;
7759  return t ? t.level + 1 : 0;
7760}
7761var Gf = class extends y {
7762  constructor() {
7763    super(...arguments), this.beanName = "rowStyleSvc";
7764  }
7765  processClassesFromGridOptions(e, t) {
7766    const i = this.gos, s = (r) => {
7767      typeof r == "string" ? e.push(r) : Array.isArray(r) && r.forEach((a) => e.push(a));
7768    }, o = i.get("rowClass");
7769    o && s(o);
7770    const n = i.getCallback("getRowClass");
7771    if (n) {
7772      const r = {
7773        data: t.data,
7774        node: t,
7775        rowIndex: t.rowIndex
7776      }, a = n(r);
7777      s(a);
7778    }
7779  }
7780  preProcessRowClassRules(e, t) {
7781    this.processRowClassRules(
7782      t,
7783      (i) => {
7784        e.push(i);
7785      },
7786      () => {
7787      }
7788    );
7789  }
7790  processRowClassRules(e, t, i) {
7791    const { gos: s, expressionSvc: o } = this.beans, n = s.addGridCommonParams({
7792      data: e.data,
7793      node: e,
7794      rowIndex: e.rowIndex
7795    });
7796    Qn(
7797      o,
7798      void 0,
7799      s.get("rowClassRules"),
7800      n,
7801      t,
7802      i
7803    );
7804  }
7805  processStylesFromGridOptions(e) {
7806    const t = this.gos, i = t.get("rowStyle"), s = t.getCallback("getRowStyle");
7807    let o;
7808    if (s) {
7809      const n = {
7810        data: e.data,
7811        node: e,
7812        rowIndex: e.rowIndex
7813      };
7814      o = s(n);
7815    }
7816    if (o || i)
7817      return Object.assign({}, i, o);
7818  }
7819}, Hf = 0, ss = "renderedRow", un = class extends y {
7820  constructor(e, t, i, s, o) {
7821    super(), this.rowNode = e, this.useAnimationFrameForCreate = s, this.printLayout = o, this.allRowGuis = [], this.active = !0, this.centerCellCtrls = { list: [], map: {} }, this.leftCellCtrls = { list: [], map: {} }, this.rightCellCtrls = { list: [], map: {} }, this.slideInAnimation = {
7822      left: !1,
7823      center: !1,
7824      right: !1,
7825      fullWidth: !1
7826    }, this.fadeInAnimation = {
7827      left: !1,
7828      center: !1,
7829      right: !1,
7830      fullWidth: !1
7831    }, this.rowDragComps = [], this.lastMouseDownOnDragger = !1, this.emptyStyle = {}, this.updateColumnListsPending = !1, this.rowId = null, this.businessKey = null, this.beans = t, this.gos = t.gos, this.paginationPage = t.pagination?.getCurrentPage() ?? 0, this.suppressRowTransform = this.gos.get("suppressRowTransform"), this.instanceId = e.id + "-" + Hf++, this.rowId = Ze(e.id), this.initRowBusinessKey(), this.rowFocused = t.focusSvc.isRowFocused(this.rowNode.rowIndex, this.rowNode.rowPinned), this.rowLevel = aa(this.rowNode), this.setRowType(), this.setAnimateFlags(i), this.rowStyles = this.processStylesFromGridOptions(), this.addListeners();
7832  }
7833  initRowBusinessKey() {
7834    this.businessKeyForNodeFunc = this.gos.get("getBusinessKeyForNode"), this.updateRowBusinessKey();
7835  }
7836  updateRowBusinessKey() {
7837    if (typeof this.businessKeyForNodeFunc != "function")
7838      return;
7839    const e = this.businessKeyForNodeFunc(this.rowNode);
7840    this.businessKey = Ze(e);
7841  }
7842  updateGui(e, t) {
7843    e === "left" ? this.leftGui = t : e === "right" ? this.rightGui = t : e === "fullWidth" ? this.fullWidthGui = t : this.centerGui = t;
7844  }
7845  setComp(e, t, i, s) {
7846    s = ls(this, this.beans.context, s);
7847    const o = { rowComp: e, element: t, containerType: i, compBean: s };
7848    this.allRowGuis.push(o), this.updateGui(i, o), this.initialiseRowComp(o), this.rowType !== "FullWidthLoading" && !this.rowNode.rowPinned && this.beans.rowRenderer.dispatchFirstDataRenderedEvent();
7849  }
7850  unsetComp(e) {
7851    this.allRowGuis = this.allRowGuis.filter((t) => t.containerType !== e), this.updateGui(e, void 0);
7852  }
7853  isCacheable() {
7854    return this.rowType === "FullWidthDetail" && this.gos.get("keepDetailRows");
7855  }
7856  setCached(e) {
7857    const t = e ? "none" : "";
7858    this.allRowGuis.forEach((i) => i.element.style.display = t);
7859  }
7860  initialiseRowComp(e) {
7861    const t = this.gos;
7862    this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")), this.listenOnDomOrder(e), this.beans.rowAutoHeight?.checkAutoHeights(this.rowNode), this.onRowHeightChanged(e), this.updateRowIndexes(e), this.setFocusedClasse
7862s(e), this.setStylesFromGridOptions(!1, e), It(t) && this.rowNode.selectable && this.onRowSelected(e), this.updateColumnLists(!this.useAnimationFrameForCreate);
7863    const i = e.rowComp;
7864    this.getInitialRowClasses(e.containerType).forEach((o) => i.addOrRemoveCssClass(o, !0)), this.executeSlideAndFadeAnimations(e), this.rowNode.group && jo(e.element, this.rowNode.expanded == !0), this.setRowCompRowId(i), this.setRowCompRowBusinessKey(i), Gt(t, e.element, ss, this), e.compBean.addDestroyFunc(() => Gt(t, e.element, ss, null)), this.useAnimationFrameForCreate ? this.beans.animationFrameSvc.createTask(
7865      this.addHoverFunctionality.bind(this, e),
7866      this.rowNode.rowIndex,
7867      "createTasksP2"
7868    ) : this.addHoverFunctionality(e), this.isFullWidth() && this.setupFullWidth(e), t.get("rowDragEntireRow") && this.addRowDraggerToRow(e), this.useAnimationFrameForCreate && this.beans.animationFrameSvc.addDestroyTask(() => {
7869      this.isAlive() && e.rowComp.addOrRemoveCssClass("ag-after-created", !0);
7870    }), this.executeProcessRowPostCreateFunc();
7871  }
7872  setRowCompRowBusinessKey(e) {
7873    this.businessKey != null && e.setRowBusinessKey(this.businessKey);
7874  }
7875  setRowCompRowId(e) {
7876    const t = Ze(this.rowNode.id);
7877    this.rowId = t, t != null && e.setRowId(t);
7878  }
7879  executeSlideAndFadeAnimations(e) {
7880    const { containerType: t } = e;
7881    this.slideInAnimation[t] && (Yr(() => {
7882      this.onTopChanged();
7883    }), this.slideInAnimation[t] = !1), this.fadeInAnimation[t] && (Yr(() => {
7884      e.rowComp.addOrRemoveCssClass("ag-opacity-zero", !1);
7885    }), this.fadeInAnimation[t] = !1);
7886  }
7887  addRowDraggerToRow(e) {
7888    const t = this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode, e.element);
7889    if (!t)
7890      return;
7891    const i = this.createBean(t, this.beans.context);
7892    this.rowDragComps.push(i), e.compBean.addDestroyFunc(() => {
7893      this.rowDragComps = this.rowDragComps.filter((s) => s !== i), this.destroyBean(i, this.beans.context);
7894    });
7895  }
7896  setupFullWidth(e) {
7897    const t = this.getPinnedForContainer(e.containerType), i = this.createFullWidthCompDetails(e.element, t);
7898    e.rowComp.showFullWidth(i);
7899  }
7900  getFullWidthCellRenderers() {
7901    return this.gos.get("embedFullWidthRows") ? this.allRowGuis.map((e) => e?.rowComp?.getFullWidthCellRenderer()) : [this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()];
7902  }
7903  executeProcessRowPostCreateFunc() {
7904    const e = this.gos.getCallback("processRowPostCreate");
7905    if (!e || !this.areAllContainersReady())
7906      return;
7907    const t = {
7908      // areAllContainersReady asserts that centerGui is not null
7909      eRow: this.centerGui.element,
7910      ePinnedLeftRow: this.leftGui ? this.leftGui.element : void 0,
7911      ePinnedRightRow: this.rightGui ? this.rightGui.element : void 0,
7912      node: this.rowNode,
7913      rowIndex: this.rowNode.rowIndex,
7914      addRenderedRowListener: this.addEventListener.bind(this)
7915    };
7916    e(t);
7917  }
7918  areAllContainersReady() {
7919    const {
7920      leftGui: e,
7921      centerGui: t,
7922      rightGui: i,
7923      beans: { visibleCols: s }
7924    } = this, o = !!e || !s.isPinningLeft(), n = !!t, r = !!i || !s.isPinningRight();
7925    return o && n && r;
7926  }
7927  isNodeFullWidthCell() {
7928    if (this.rowNode.detail)
7929      return !0;
7930    const e = this.beans.gos.getCallback("isFullWidthRow");
7931    return e ? e({ rowNode: this.rowNode }) : !1;
7932  }
7933  setRowType() {
7934    const e = this.rowNode.stub && !this.gos.get("suppressServerSideFullWidthLoadingRow") && !this.gos.get("groupHideOpenParents"), t = this.isNodeFullWidthCell(), i = this.gos.get("masterDetail") && this.rowNode.detail, s = this.beans.colModel.isPivotMode(), n = !!this.rowNode.group && !this.rowNode.footer && Wn(this.gos, s);
7935    e ? this.rowType = "FullWidthLoading" : i ? this.rowType = "FullWidthDetail" : t ? this.rowType = "FullWidth" : n ? this.rowType = "FullWidthGroup" : this.rowType = "Normal";
7936  }
7937  updateColumnLists(e = !1, t = !1) {
7938    if (this.isFullWidth())
7939      return;
7940    const { animationFrameSvc: i } = this.beans;
7941    if (!i || e || this.gos.get("suppressAnimationFrame") || this.printLayout) {
7942      this.updateColumnListsImpl(t);
7943      return;
7944    }
7945    this.updateColumnListsPending || (i.createTask(
7946      () => {
7947        this.active && this.updateColumnListsImpl(!0);
7948      },
7949      this.rowNode.rowIndex,
7950      "createTasksP1"
7951    ), this.updateColumnListsPending = !0);
7952  }
7953  createCellCtrls(e, t, i = null) {
7954    const s = {
7955      list: [],
7956      map: {}
7957    }, o = (n, r) => {
7958      s.list.push(r), s.map[n] = r;
7959    };
7960    return t.forEach((n) => {
7961      const r = n.getInstanceId();
7962      let a = e.map[r];
7963      a || (a = new Ps(n, this.rowNode, this.beans, this)), o(r, a);
7964    }), e.list.forEach((n) => {
7965      const r = n.column.getInstanceId();
7966      if (s.map[r] != null)
7967        return;
7968      if (!this.isCellEligibleToBeRemoved(n, i)) {
7969        o(r, n);
7970        return;
7971      }
7972      n.destroy();
7973    }), s;
7974  }
7975  updateColumnListsImpl(e) {
7976    this.updateColumnListsPending = !1, this.createAllCellCtrls(), this.setCellCtrls(e);
7977  }
7978  setCellCtrls(e) {
7979    this.allRowGuis.forEach((t) => {
7980      const i = this.getCellCtrlsForContainer(t.containerType);
7981      t.rowComp.setCellCtrls(i, e);
7982    });
7983  }
7984  getCellCtrlsForContainer(e) {
7985    switch (e) {
7986      case "left":
7987        return this.leftCellCtrls.list;
7988      case "right":
7989        return this.rightCellCtrls.list;
7990      case "fullWidth":
7991        return [];
7992      case "center":
7993        return this.centerCellCtrls.list;
7994    }
7995  }
7996  createAllCellCtrls() {
7997    const e = this.beans.colViewport, t = this.beans.visibleCols;
7998    if (this.printLayout)
7999      this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, t.allCols), this.leftCellCtrls = { list: [], map: {} }, this.rightCellCtrls = { list: [], map: {} };
8000    else {
8001      const i = e.getColsWithinViewport(this.rowNode);
8002      this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, i);
8003      const s = t.getLeftColsForRow(this.rowNode);
8004      this.leftCellCtrls = this.createCellCtrls(this.leftCellCtrls, s, "left");
8005      const o = t.getRightColsForRow(this.rowNode);
8006      this.rightCellCtrls = this.createCellCtrls(this.rightCellCtrls, o, "right");
8007    }
8008  }
8009  isCellEligibleToBeRemoved(e, t) {
8010    const { column: o } = e;
8011    if (o.getPinned() != t)
8012      return !0;
8013    const { editing: n, cellPosition: r } = e, { focusSvc: a, visibleCols: l } = this.beans, d = a.isCellFocused(r);
8014    return n || d ? !(l.allCols.indexOf(o) >= 0) : !0;
8015  }
8016  getDomOrder() {
8017    return this.gos.get("ensureDomOrder") || de(this.gos, "print");
8018  }
8019  listenOnDomOrder(e) {
8020    const t = () => {
8021      e.rowComp.setDomOrder(this.getDomOrder());
8022    };
8023    e.compBean.addManagedPropertyListeners(["domLayout", "ensureDomOrder"], t);
8024  }
8025  setAnimateFlags(e) {
8026    if (this.rowNode.sticky || !e)
8027      return;
8028    const t = A(this.rowNode.oldRowTop), { visibleCols: i } = this.beans, s = i.isPinningLeft(), o = i.isPinningRight();
8029    if (t) {
8030      const { slideInAnimation: n } = this;
8031      if (this.isFullWidth() && !this.gos.get("embedFullWidthRows")) {
8032        n.fullWidth = !0;
8033        return;
8034      }
8035      n.center = !0, n.left = s, n.right = o;
8036    } else {
8037      const { fadeInAnimation: n } = this;
8038      if (this.isFullWidth() && !this.gos.get("embedFullWidthRows")) {
8039        n.fullWidth = !0;
8040        return;
8041      }
8042      n.center = !0, n.left = s, n.right = o;
8043    }
8044  }
8045  isFullWidth() {
8046    return this.rowType !== "Normal";
8047  }
8048  refreshFullWidth() {
8049    const e = (r, a) => r ? r.rowComp.refreshFullWidth(() => this.createFullWidthCompDetails(r.element, a).params) : !0, t = e(this.fullWidthGui, null), i = e(this.centerGui, null), s = e(this.leftGui, "left"), o = e(this.rightGui, "right");
8050    return t && i && s && o;
8051  }
8052  addListeners() {
8053    this.addManagedListeners(this.rowNode, {
8054      heightChanged: () => this.onRowHeightChanged(),
8055      rowSelected: () => this.onRowSelected(),
8056      rowIndexChanged: this.onRowIndexChanged.bind(this),
8057      topChanged: this.onTopChanged.bind(this),
8058      ...this.beans.expansionSvc?.getRowExpandedListeners(this) ?? {}
8059    }), this.rowNode.detail && this.addManagedListeners(this.rowNode.parent, { dataChanged: this.onRowNodeDataChanged.bind(this) }), this.addManagedListeners(this.rowNode, {
8060      dataChanged: this.onRowNodeDataChanged.bind(this),
8061      cellChanged: this.postProcessCss.bind(this),
8062      rowHighlightChanged: this.onRowNodeHighlightChanged.bind(this),
8063      draggingChanged: this.postProcessRowDragging.bind(this),
8064      uiLevelChanged: this.onUiLevelChanged.bind(this)
8065    }), this.addManagedListeners(this.beans.eventSvc, {
8066      paginationPixelOffsetChanged: this.onPaginationPixelOffsetChanged.bind(this),
8067      heightScaleChanged: this.onTopChanged.bind(this),
8068      displayedColumnsChanged: this.onDisplayedColumnsChanged.bind(this),
8069      virtualColumnsChanged: this.onVirtualColumnsChanged.bind(this),
8070      cellFocused: this.onCellFocusChanged.bind(this),
8071      cellFocusCleared: this.onCellFocusChanged.bind(this),
8072      paginationChanged: this.onPaginationChanged.bind(this),
8073      modelUpdated: this.refreshFirstAndLastRowStyles.bind(this),
8074      columnMoved: () => this.updateColumnLists()
8075    }), this.addDestroyFunc(() => {
8076      this.rowDragComps = this.destroyBeans(this.rowDragComps, this.beans.context), this.tooltipFeature = this.destroyBean(this.tooltipFeature, this.beans.context);
8077    }), this.addManagedPropertyListeners(
8078      ["rowStyle", "getRowStyle", "rowClass", "getRowClass", "rowClassRules"],
8079      this.postProcessCss.bind(this)
8080    ), this.addManagedPropertyListener("rowDragEntireRow", () => {
8081      if (this.gos.get("rowDragEntireRow")) {
8082        this.allRowGuis.forEach((t) => {
8083          this.addRowDraggerToRow(t);
8084        });
8085        return;
8086      }
8087      this.rowDragComps = this.destroyBeans(this.rowDragComps, this.beans.context);
8088    }), this.addListenersForCellComps();
8089  }
8090  addListenersForCellComps() {
8091    this.addManagedListeners(this.rowNode, {
8092      rowIndexChanged: () => {
8093        this.getAllCellCtrls().forEach((e) => e.onRowIndexChanged());
8094      },
8095      cellChanged: (e) => {
8096        this.getAllCellCtrls().forEach((t) => t.onCellChanged(e));
8097      }
8098    });
8099  }
8100  onRowNodeDataChanged(e) {
8101    if (this.isFullWidth() !== !!this.isNodeFullWidthCell()) {
8102      this.beans.rowRenderer.redrawRow(this.rowNode);
8103      return;
8104    }
8105    if (this.isFullWidth()) {
8106      this.refreshFullWidth() || this.beans.rowRenderer.redrawRow(this.rowNode);
8107      return;
8108    }
8109    this.getAllCellCtrls().forEach(
8110      (i) => i.refreshCell({
8111        suppressFlash: !e.update,
8112        newData: !e.update
8113      })
8114    ), this.allRowGuis.forEach((i) => {
8115      this.setRowCompRowId(i.rowComp), this.updateRowBusinessKey(), this.setRowCompRowBusinessKey(i.rowComp);
8116    }), this.onRowSelected(), this.postProcessCss();
8117  }
8118  postProcessCss() {
8119    this.setStylesFromGridOptions(!0), this.postProcessClassesFromGridOptions(), this.postProcessRowClassRules(), this.postProcessRowDragging();
8120  }
8121  onRowNodeHighlightChanged() {
8122    const e = this.rowNode.highlighted;
8123    this.allRowGuis.forEach((t) => {
8124      const i = e === "Above", s = e === "Below";
8125      t.rowComp.addOrRemoveCssClass("ag-row-highlight-above", i), t.rowComp.addOrRemoveCssClass("ag-row-highlight-below", s);
8126    });
8127  }
8128  postProcessRowDragging() {
8129    const e = this.rowNode.dragging;
8130    this.allRowGuis.forEach((t) => t.rowComp.addOrRemoveCssClass("ag-row-dragging", e));
8131  }
8132  onDisplayedColumnsChanged() {
8133    this.updateColumnLists(!0), this.beans.rowAutoHeight?.checkAutoHeights(this.rowNode);
8134  }
8135  onVirtualColumnsChanged() {
8136    this.updateColumnLists(!1, !0);
8137  }
8138  getRowPosition() {
8139    return {
8140      rowPinned: ot(this.rowNode.rowPinned),
8141      rowIndex: this.rowNode.rowIndex
8142    };
8143  }
8144  findFullWidthRowGui(e) {
8145    return this.allRowGuis.find((t) => t.element.contains(e));
8146  }
8147  onKeyboardNavigate(e) {
8148    const t = this.findFullWidthRowGui(e.target);
8149    if (!((t ? t.element : null) === e.target))
8150      return;
8151    const o = this.rowNode, { focusSvc: n, navigation: r } = this.beans, a = n.getFocusedCell(), l = {
8152      rowIndex: o.rowIndex,
8153      rowPinned: o.rowPinned,
8154      column: a?.column ?? this.getColumnForFullWidth(t)
8155    };
8156    r?.navigateToNextCell(e, e.key, l, !0), e.preventDefault();
8157  }
8158  onTabKeyDown(e) {
8159    if (e.defaultPrevented || nt(e))
8160      return;
8161    const t = this.allRowGuis.find(
8162      (a) => a.element.contains(e.target)
8163    ), i = t ? t.element : null, s = i === e.target, o = Z(this.beans);
8164    let n = !1;
8165    i && o && (n = i.contains(o) && o.classList.contains("ag-cell"));
8166    let r = null;
8167    !s && !n && (r = zt(this.beans, i, !1, e.shiftKey)), (this.isFullWidth() && s || !r) && this.beans.navigation?.onTabKeyDown(this, e);
8168  }
8169  getFullWidthElement() {
8170    return this.fullWidthGui ? this.fullWidthGui.element : null;
8171  }
8172  getRowYPosition() {
8173    const e = this.allRowGuis.find((t) => Ne(t.element))?.element;
8174    return e ? e.getBoundingClientRect().top : 0;
8175  }
8176  onSuppressCellFocusChanged(e) {
8177    const t = this.isFullWidth() && e ? void 0 : -1;
8178    this.allRowGuis.forEach((i) => {
8179      Ie(i.element, "tabindex", t);
8180    });
8181  }
8182  onFullWidthRowFocused(e) {
8183    const t = this.rowNode, i = e ? this.isFullWidth() && e.rowIndex === t.rowIndex && e.rowPinned == t.rowPinned : !1, s = this.fullWidthGui ? this.fullWidthGui.element : this.centerGui?.element;
8184    s && (s.classList.toggle("ag-full-width-focus", i), i && e?.forceBrowserFocus && s.focus({ preventScroll: !0 }));
8185  }
8186  recreateCell(e) {
8187    this.centerCellCtrls = this.removeCellCtrl(this.centerCellCtrls, e), this.leftCellCtrls = this.removeCellCtrl(this.leftCellCtrls, e), this.rightCellCtrls = this.removeCellCtrl(this.rightCellCtrls, e), e.destroy(), this.updateColumnLists();
8188  }
8189  removeCellCtrl(e, t) {
8190    const i = {
8191      list: [],
8192      map: {}
8193    };
8194    return e.list.forEach((s) => {
8195      s !== t && (i.list.push(s), i.map[s.column.getInstanceId()] = s);
8196    }), i;
8197  }
8198  onMouseEvent(e, t) {
8199    switch (e) {
8200      case "dblclick":
8201        this.onRowDblClick(t);
8202        break;
8203      case "click":
8204        this.onRowClick(t);
8205        break;
8206      case "touchstart":
8207      case "mousedown":
8208        this.onRowMouseDown(t);
8209        break;
8210    }
8211  }
8212  createRowEvent(e, t) {
8213    const { rowNode: i } = this;
8214    return this.gos.addGridCommonParams({
8215      type: e,
8216      node: i,
8217      data: i.data,
8218      rowIndex: i.rowIndex,
8219      rowPinned: i.rowPinned,
8220      event: t
8221    });
8222  }
8223  createRowEventWithSource(e, t) {
8224    const i = this.createRowEvent(e, t);
8225    return i.source = this, i;
8226  }
8227  onRowDblClick(e) {
8228    nt(e) || this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked", e));
8229  }
8230  getColumnForFullWidth(e) {
8231    const { visibleCols: t } = this.beans;
8232    switch (e?.containerType) {
8233      case "center":
8234        return t.centerCols[0];
8235      case "left":
8236        return t.leftCols[0];
8237      case "right":
8238        return t.rightCols[0];
8239      default:
8240        return t.allCols[0];
8241    }
8242  }
8243  onRowMouseDown(e) {
8244    if (this.lastMouseDownOnDragger = Mt(e.target, "ag-row-drag", 3), !this.isFullWidth())
8245      return;
8246    const t = this.rowNode, { rangeSvc: i, focusSvc: s } = this.beans;
8247    i?.removeAllCellRanges();
8248    const o = this.findFullWidthRowGui(e.target), n = o?.element, r = e.target;
8249    let a = !0;
8250    n && n.contains(r) && On(r) && (a = !1), s.setFocusedCell({
8251      rowIndex: t.rowIndex,
8252      column: this.getColumnForFullWidth(o),
8253      rowPinned: t.rowPinned,
8254      forceBrowserFocus: a
8255    });
8256  }
8257  onRowClick(e) {
8258    if (nt(e) || this.lastMouseDownOnDragger)
8259      return;
8260    const { eventSvc: i, selectionSvc: s } = this.beans;
8261    i.dispatchEvent(this.createRowEventWithSource("rowClicked", e)), s?.handleSelectionEvent(e, this.rowNode, "rowClicked");
8262  }
8263  setupDetailRowAutoHeight(e) {
8264    this.rowType === "FullWidthDetail" && this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this, e);
8265  }
8266  createFullWidthCompDetails(e, t) {
8267    const { gos: i, rowNode: s } = this, o = i.addGridCommonParams({
8268      fullWidth: !0,
8269      data: s.data,
8270      node: s,
8271      value: s.key,
8272      valueFormatted: s.key,
8273      // these need to be taken out, as part of 'afterAttached' now
8274      eGridCell: e,
8275      eParentOfValue: e,
8276      pinned: t,
8277      addRenderedRowListener: this.addEventListener.bind(this),
8278      registerRowDragger: (r, a, l, d) => this.addFullWidthRowDragging(r, a, l, d),
8279      setTooltip: (r, a) => {
8280        i.assertModuleRegistered("Tooltip", 3), this.refreshRowTooltip(r, a);
8281      }
8282    }), n = this.beans.userCompFactory;
8283    switch (this.rowType) {
8284      case "FullWidthDetail":
8285        return xp(n, o);
8286      case "FullWidthGroup":
8287        return Fp(n, o);
8288      case "FullWidthLoading":
8289        return Rp(n, o);
8290      default:
8291        return yp(n, o);
8292    }
8293  }
8294  refreshRowTooltip(e, t) {
8295    this.fullWidthGui && (this.tooltipFeature = this.beans.tooltipSvc?.refreshRowTooltip(
8296      this.tooltipFeature,
8297      this,
8298      e,
8299      t
8300    ));
8301  }
8302  addFullWidthRowDragging(e, t, i = "", s) {
8303    const { rowDragSvc: o, context: n } = this.beans;
8304    if (!o || !this.isFullWidth())
8305      return;
8306    const r = o.createRowDragComp(
8307      () => i,
8308      this.rowNode,
8309      void 0,
8310      e,
8311      t,
8312      s
8313    );
8314    this.createBean(r, n), this.addDestroyFunc(() => {
8315      this.destroyBean(r, n);
8316    });
8317  }
8318  onUiLevelChanged() {
8319    const e = aa(this.rowNode);
8320    if (this.rowLevel != e) {
8321      const t = "ag-row-level-" + e, i = "ag-row-level-" + this.rowLevel;
8322      this.allRowGuis.forEach((s) => {
8323        s.rowComp.addOrRemoveCssClass(t, !0), s.rowComp.addOrRemoveCssClass(i, !1);
8324      });
8325    }
8326    this.rowLevel = e;
8327  }
8328  isFirstRowOnPage() {
8329    return this.rowNode.rowIndex === this.beans.pageBounds.getFirstRow();
8330  }
8331  isLastRowOnPage() {
8332    return this.rowNode.rowIndex === this.beans.pageBounds.getLastRow();
8333  }
8334  refreshFirstAndLastRowStyles() {
8335    const e = this.isFirstRowOnPage(), t = this.isLastRowOnPage();
8336    this.firstRowOnPage !== e && (this.firstRowOnPage = e, this.allRowGuis.forEach((i) => i.rowComp.addOrRemoveCssClass("ag-row-first", e))), this.lastRowOnPage !== t && (this.lastRowOnPage = t, this.allRowGuis.forEach((i) => i.rowComp.addOrRemoveCssClass("ag-row-last", t)));
8337  }
8338  getAllCellCtrls() {
8339    return this.leftCellCtrls.list.length === 0 && this.rightCellCtrls.list.length === 0 ? this.centerCellCtrls.list : [...this.centerCellCtrls.list, ...this.leftCellCtrls.list, ...this.rightCellCtrls.list];
8340  }
8341  postProcessClassesFromGridOptions() {
8342    const e = [];
8343    this.beans.rowStyleSvc?.processClassesFromGridOptions(e, this.rowNode), e.length && e.forEach((t) => {
8344      this.allRowGuis.forEach((i) => i.rowComp.addOrRemoveCssClass(t, !0));
8345    });
8346  }
8347  postProcessRowClassRules() {
8348    this.beans.rowStyleSvc?.processRowClassRules(
8349      this.rowNode,
8350      (e) => {
8351        this.allRowGuis.forEach((t) => t.rowComp.addOrRemoveCssClass(e, !0));
8352      },
8353      (e) => {
8354        this.allRowGuis.forEach((t) => t.rowComp.addOrRemoveCssClass(e, !1));
8355      }
8356    );
8357  }
8358  setStylesFromGridOptions(e, t) {
8359    e && (this.rowStyles = this.processStylesFromGridOptions()), this.forEachGui(t, (i) => i.rowComp.setUserStyles(this.rowStyles));
8360  }
8361  getPinnedForContainer(e) {
8362    return e === "left" || e === "right" ? e : null;
8363  }
8364  getInitialRowClasses(e) {
8365    const t = this.getPinnedForContainer(e), i = this.isFullWidth(), { rowNode: s, beans: o } = this, n = [];
8366    n.push("ag-row"), n.push(this.rowFocused ? "ag-row-focus" : "ag-row-no-focus"), this.fadeInAnimation[e] && n.push("ag-opacity-zero"), n.push(s.rowIndex % 2 === 0 ? "ag-row-even" : "ag-row-odd"), s.isRowPinned() && n.push("ag-row-pinned"), s.isSelected() && n.push("ag-row-selected"), s.footer && n.push("ag-row-footer"), n.push("ag-row-level-" + this.rowLevel), s.stub && n.push("ag-row-loading"), i && n.push("ag-full-width-row"), o.expansionSvc?.addExpandedCss(n, s), s.dragging && n.push("ag-row-dragging");
8367    const { rowStyleSvc: r } = o;
8368    return r && (r.processClassesFromGridOptions(n, s), r.preProcessRowClassRules(n, s)), n.push(this.printLayout ? "ag-row-position-relative" : "ag-row-position-absolute"), this.isFirstRowOnPage() && n.push("ag-row-first"), this.isLastRowOnPage() && n.push("ag-row-last"), i && (t === "left" && n.push("ag-cell-last-left-pinned"), t === "right" && n.push("ag-cell-first-right-pinned")), n;
8369  }
8370  processStylesFromGridOptions() {
8371    return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode) ?? this.emptyStyle;
8372  }
8373  onRowSelected(e) {
8374    this.beans.selectionSvc?.onRowCtrlSelected(
8375      this,
8376      (t) => {
8377        (t === this.centerGui || t === this.fullWidthGui) && this.announceDescription();
8378      },
8379      e
8380    );
8381  }
8382  announceDescription() {
8383    this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode);
8384  }
8385  addHoverFunctionality(e) {
8386    if (!this.active)
8387      return;
8388    const { element: t, compBean: i }
8388 = e, { rowNode: s, beans: o, gos: n } = this;
8389    i.addManagedListeners(t, {
8390      mouseenter: () => s.dispatchRowEvent("mouseEnter"),
8391      mouseleave: () => s.dispatchRowEvent("mouseLeave")
8392    }), i.addManagedListeners(s, {
8393      mouseEnter: () => {
8394        !o.dragSvc?.dragging && !n.get("suppressRowHoverHighlight") && (t.classList.add("ag-row-hover"), s.setHovered(!0));
8395      },
8396      mouseLeave: () => {
8397        t.classList.remove("ag-row-hover"), s.setHovered(!1);
8398      }
8399    });
8400  }
8401  // for animation, we don't want to animate entry or exit to a very far away pixel,
8402  // otherwise the row would move so fast, it would appear to disappear. so this method
8403  // moves the row closer to the viewport if it is far away, so the row slide in / out
8404  // at a speed the user can see.
8405  roundRowTopToBounds(e) {
8406    const t = this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(), i = this.applyPaginationOffset(t.top, !0) - 100, s = this.applyPaginationOffset(t.bottom, !0) + 100;
8407    return Math.min(Math.max(i, e), s);
8408  }
8409  forEachGui(e, t) {
8410    e ? t(e) : this.allRowGuis.forEach(t);
8411  }
8412  onRowHeightChanged(e) {
8413    if (this.rowNode.rowHeight == null)
8414      return;
8415    const t = this.rowNode.rowHeight, i = this.beans.environment.getDefaultRowHeight(), o = Il(this.gos) ? Ot(this.beans, this.rowNode).height : void 0, n = o ? `${Math.min(i, o) - 2}px` : void 0;
8416    this.forEachGui(e, (r) => {
8417      r.element.style.height = `${t}px`, n && r.element.style.setProperty("--ag-line-height", n);
8418    });
8419  }
8420  // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.
8421  destroyFirstPass(e = !1) {
8422    this.active = !1;
8423    const { rowNode: t } = this;
8424    if (!e && si(this.gos) && !t.sticky)
8425      if (t.rowTop != null) {
8426        const o = this.roundRowTopToBounds(t.rowTop);
8427        this.setRowTop(o);
8428      } else
8429        this.allRowGuis.forEach((o) => o.rowComp.addOrRemoveCssClass("ag-opacity-zero", !0));
8430    t.setHovered(!1);
8431    const i = this.createRowEvent("virtualRowRemoved");
8432    this.dispatchLocalEvent(i), this.beans.eventSvc.dispatchEvent(i), super.destroy();
8433  }
8434  destroySecondPass() {
8435    this.allRowGuis.length = 0, this.beans.editSvc?.stopRowEditing(this);
8436    const e = (t) => (t.list.forEach((i) => i.destroy()), { list: [], map: {} });
8437    this.centerCellCtrls = e(this.centerCellCtrls), this.leftCellCtrls = e(this.leftCellCtrls), this.rightCellCtrls = e(this.rightCellCtrls);
8438  }
8439  setFocusedClasses(e) {
8440    this.forEachGui(e, (t) => {
8441      t.rowComp.addOrRemoveCssClass("ag-row-focus", this.rowFocused), t.rowComp.addOrRemoveCssClass("ag-row-no-focus", !this.rowFocused);
8442    });
8443  }
8444  onCellFocusChanged() {
8445    const { focusSvc: e, editSvc: t } = this.beans, i = e.isRowFocused(this.rowNode.rowIndex, this.rowNode.rowPinned);
8446    i !== this.rowFocused && (this.rowFocused = i, this.setFocusedClasses()), !i && this.editing && t?.stopRowEditing(this, !1);
8447  }
8448  onPaginationChanged() {
8449    const e = this.beans.pagination?.getCurrentPage() ?? 0;
8450    this.paginationPage !== e && (this.paginationPage = e, this.onTopChanged()), this.refreshFirstAndLastRowStyles();
8451  }
8452  onTopChanged() {
8453    this.setRowTop(this.rowNode.rowTop);
8454  }
8455  onPaginationPixelOffsetChanged() {
8456    this.onTopChanged();
8457  }
8458  // applies pagination offset, eg if on second page, and page height is 500px, then removes
8459  // 500px from the top position, so a row with rowTop 600px is displayed at location 100px.
8460  // reverse will take the offset away rather than add.
8461  applyPaginationOffset(e, t = !1) {
8462    if (this.rowNode.isRowPinned() || this.rowNode.sticky)
8463      return e;
8464    const i = this.beans.pageBounds.getPixelOffset();
8465    return e + i * (t ? 1 : -1);
8466  }
8467  setRowTop(e) {
8468    if (!this.printLayout && A(e)) {
8469      const t = this.applyPaginationOffset(e), o = `${this.rowNode.isRowPinned() || this.rowNode.sticky ? t : this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;
8470      this.setRowTopStyle(o);
8471    }
8472  }
8473  // the top needs to be set into the DOM element when the element is created, not updated afterwards.
8474  // otherwise the transition would not work, as it would be transitioning from zero (the unset value).
8475  // for example, suppose a row that is outside the viewport, then user does a filter to remove other rows
8476  // and this row now appears in the viewport, and the row moves up (ie it was under the viewport and not rendered,
8477  // but now is in the viewport) then a new RowComp is created, however it should have it's position initialised
8478  // to below the viewport, so the row will appear to animate up. if we didn't set the initial position at creation
8479  // time, the row would animate down (ie from position zero).
8480  getInitialRowTop(e) {
8481    return this.suppressRowTransform ? this.getInitialRowTopShared(e) : void 0;
8482  }
8483  getInitialTransform(e) {
8484    return this.suppressRowTransform ? void 0 : `translateY(${this.getInitialRowTopShared(e)})`;
8485  }
8486  getInitialRowTopShared(e) {
8487    if (this.printLayout)
8488      return "";
8489    const t = this.rowNode;
8490    let i;
8491    if (t.sticky)
8492      i = t.stickyRowTop;
8493    else {
8494      const s = this.slideInAnimation[e] ? this.roundRowTopToBounds(t.oldRowTop) : t.rowTop, o = this.applyPaginationOffset(s);
8495      i = t.isRowPinned() ? o : this.beans.rowContainerHeight.getRealPixelPosition(o);
8496    }
8497    return i + "px";
8498  }
8499  setRowTopStyle(e) {
8500    this.allRowGuis.forEach(
8501      (t) => this.suppressRowTransform ? t.rowComp.setTop(e) : t.rowComp.setTransform(`translateY(${e})`)
8502    );
8503  }
8504  getCellCtrl(e, t = !1) {
8505    let i = null;
8506    return this.getAllCellCtrls().forEach((s) => {
8507      s.column == e && (i = s);
8508    }), i != null || t || this.getAllCellCtrls().forEach((s) => {
8509      s.getColSpanningList().indexOf(e) >= 0 && (i = s);
8510    }), i;
8511  }
8512  onRowIndexChanged() {
8513    this.rowNode.rowIndex != null && (this.onCellFocusChanged(), this.updateRowIndexes(), this.postProcessCss());
8514  }
8515  updateRowIndexes(e) {
8516    const t = this.rowNode.getRowIndexString();
8517    if (t === null)
8518      return;
8519    const i = (this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount() ?? 0) + (this.beans.filterManager?.getHeaderRowCount() ?? 0), s = this.rowNode.rowIndex % 2 === 0, o = i + this.rowNode.rowIndex + 1;
8520    this.forEachGui(e, (n) => {
8521      n.rowComp.setRowIndex(t), n.rowComp.addOrRemoveCssClass("ag-row-even", s), n.rowComp.addOrRemoveCssClass("ag-row-odd", !s), cl(n.element, o);
8522    });
8523  }
8524};
8525function Fd(e) {
8526  return e.altKey || e.ctrlKey || e.metaKey ? !1 : e.key?.length === 1;
8527}
8528function hn(e, t, i, s, o) {
8529  const n = s ? s.getColDef().suppressKeyboardEvent : void 0;
8530  if (!n)
8531    return !1;
8532  const r = e.addGridCommonParams({
8533    event: t,
8534    editing: o,
8535    column: s,
8536    node: i,
8537    data: i.data,
8538    colDef: s.getColDef()
8539  });
8540  return !!(n && n(r));
8541}
8542var Bf = 65, Nf = 67, Vf = 86, Wf = 68, zf = 90, _f = 89;
8543function Uf(e) {
8544  const { keyCode: t } = e;
8545  let i;
8546  switch (t) {
8547    case Bf:
8548      i = b.A;
8549      break;
8550    case Nf:
8551      i = b.C;
8552      break;
8553    case Vf:
8554      i = b.V;
8555      break;
8556    case Wf:
8557      i = b.D;
8558      break;
8559    case zf:
8560      i = b.Z;
8561      break;
8562    case _f:
8563      i = b.Y;
8564      break;
8565    default:
8566      i = e.code;
8567  }
8568  return i;
8569}
8570var $f = class extends y {
8571  constructor(e) {
8572    super(), this.element = e;
8573  }
8574  postConstruct() {
8575    this.addKeyboardListeners(), this.addMouseListeners(), this.beans.touchSvc?.mockRowContextMenu(this);
8576  }
8577  addKeyboardListeners() {
8578    const e = "keydown", t = this.processKeyboardEvent.bind(this, e);
8579    this.addManagedElementListeners(this.element, { [e]: t });
8580  }
8581  addMouseListeners() {
8582    ["dblclick", "contextmenu", "mouseover", "mouseout", "click", Nl("touchstart") ? "touchstart" : "mousedown"].forEach((i) => {
8583      const s = this.processMouseEvent.bind(this, i);
8584      this.addManagedElementListeners(this.element, { [i]: s });
8585    });
8586  }
8587  processMouseEvent(e, t) {
8588    if (!Us(this.gos, t) || nt(t))
8589      return;
8590    const { cellCtrl: i, rowCtrl: s } = this.getControlsForEventTarget(t.target);
8591    e === "contextmenu" ? (i?.column && i.dispatchCellContextMenuEvent(t), this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t, void 0, s, i)) : (i && i.onMouseEvent(e, t), s && s.onMouseEvent(e, t));
8592  }
8593  getControlsForEventTarget(e) {
8594    const { gos: t } = this;
8595    return {
8596      cellCtrl: gd(t, e),
8597      rowCtrl: Vl(t, e, ss)
8598    };
8599  }
8600  processKeyboardEvent(e, t) {
8601    const { cellCtrl: i, rowCtrl: s } = this.getControlsForEventTarget(t.target);
8602    t.defaultPrevented || (i ? this.processCellKeyboardEvent(i, e, t) : s && s.isFullWidth() && this.processFullWidthRowKeyboardEvent(s, e, t));
8603  }
8604  processCellKeyboardEvent(e, t, i) {
8605    const { rowNode: s, column: o, editing: n } = e;
8606    !hn(
8607      this.gos,
8608      i,
8609      s,
8610      o,
8611      n
8612    ) && t === "keydown" && (!n && this.beans.navigation?.handlePageScrollingKey(i) || e.onKeyDown(i), this.doGridOperations(i, e.editing), Fd(i) && e.processCharacter(i)), t === "keydown" && this.eventSvc.dispatchEvent(e.createEvent(i, "cellKeyDown"));
8613  }
8614  processFullWidthRowKeyboardEvent(e, t, i) {
8615    const { rowNode: s } = e, { focusSvc: o, navigation: n } = this.beans, r = o.getFocusedCell(), a = r && r.column;
8616    if (!hn(this.gos, i, s, a, !1)) {
8617      const d = i.key;
8618      if (t === "keydown")
8619        switch (d) {
8620          case b.PAGE_HOME:
8621          case b.PAGE_END:
8622          case b.PAGE_UP:
8623          case b.PAGE_DOWN:
8624            n?.handlePageScrollingKey(i, !0);
8625            break;
8626          case b.UP:
8627          case b.DOWN:
8628            e.onKeyboardNavigate(i);
8629            break;
8630          case b.TAB:
8631            e.onTabKeyDown(i);
8632            break;
8633        }
8634    }
8635    t === "keydown" && this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown", i));
8636  }
8637  doGridOperations(e, t) {
8638    if (!e.ctrlKey && !e.metaKey || t || !Us(this.gos, e))
8639      return;
8640    const i = Uf(e), { clipboardSvc: s, undoRedo: o } = this.beans;
8641    if (i === b.A)
8642      return this.onCtrlAndA(e);
8643    if (i === b.C)
8644      return this.onCtrlAndC(s, e);
8645    if (i === b.D)
8646      return this.onCtrlAndD(s, e);
8647    if (i === b.V)
8648      return this.onCtrlAndV(s, e);
8649    if (i === b.X)
8650      return this.onCtrlAndX(s, e);
8651    if (i === b.Y)
8652      return this.onCtrlAndY(o);
8653    if (i === b.Z)
8654      return this.onCtrlAndZ(o, e);
8655  }
8656  onCtrlAndA(e) {
8657    const {
8658      beans: { pinnedRowModel: t, rowModel: i, visibleCols: s, rangeSvc: o, selectionSvc: n },
8659      gos: r
8660    } = this;
8661    if (o && lt(r) && i.isRowsToRender()) {
8662      const [a, l] = [
8663        t?.isEmpty("top") ?? !0,
8664        t?.isEmpty("bottom") ?? !0
8665      ], d = a ? null : "top";
8666      let c, u;
8667      l ? (c = null, u = i.getRowCount() - 1) : (c = "bottom", u = t?.getPinnedBottomRowCount() ?? -1);
8668      const h = s.allCols;
8669      if (!h?.length)
8670        return;
8671      o.setCellRange({
8672        rowStartIndex: 0,
8673        rowStartPinned: d,
8674        rowEndIndex: u,
8675        rowEndPinned: c,
8676        columnStart: h[0],
8677        columnEnd: W(h)
8678      });
8679    } else n && n?.selectAllRowNodes({ source: "keyboardSelectAll", selectAll: Hl(r) });
8680    e.preventDefault();
8681  }
8682  onCtrlAndC(e, t) {
8683    if (!e || this.gos.get("enableCellTextSelection"))
8684      return;
8685    const { cellCtrl: i, rowCtrl: s } = this.getControlsForEventTarget(t.target);
8686    i?.editing || s?.editing || (t.preventDefault(), e.copyToClipboard());
8687  }
8688  onCtrlAndX(e, t) {
8689    if (!e || this.gos.get("enableCellTextSelection") || this.gos.get("suppressCutToClipboard"))
8690      return;
8691    const { cellCtrl: i, rowCtrl: s } = this.getControlsForEventTarget(t.target);
8692    i?.editing || s?.editing || (t.preventDefault(), e.cutToClipboard(void 0, "ui"));
8693  }
8694  onCtrlAndV(e, t) {
8695    const { cellCtrl: i, rowCtrl: s } = this.getControlsForEventTarget(t.target);
8696    i?.editing || s?.editing || e && !this.gos.get("suppressClipboardPaste") && e.pasteFromClipboard();
8697  }
8698  onCtrlAndD(e, t) {
8699    e && !this.gos.get("suppressClipboardPaste") && e.copyRangeDown(), t.preventDefault();
8700  }
8701  onCtrlAndZ(e, t) {
8702    !this.gos.get("undoRedoCellEditing") || !e || (t.preventDefault(), t.shiftKey ? e.redo("ui") : e.undo("ui"));
8703  }
8704  onCtrlAndY(e) {
8705    e?.redo("ui");
8706  }
8707}, xd = class extends y {
8708  constructor(e, t) {
8709    super(), this.eContainer = e, this.eViewport = t;
8710  }
8711  postConstruct() {
8712    this.addManagedEventListeners({
8713      rowContainerHeightChanged: this.onHeightChanged.bind(this, this.beans.rowContainerHeight)
8714    });
8715  }
8716  onHeightChanged(e) {
8717    const t = e.uiContainerHeight, i = t != null ? `${t}px` : "";
8718    this.eContainer.style.height = i, this.eViewport && (this.eViewport.style.height = i);
8719  }
8720}, ps = (e) => e.topRowCtrls, fs = (e) => e.getStickyTopRowCtrls(), ms = (e) => e.getStickyBottomRowCtrls(), Cs = (e) => e.bottomRowCtrls, vs = (e) => e.allRowCtrls, Kf = {
8721  center: {
8722    type: "center",
8723    container: "ag-center-cols-container",
8724    viewport: "ag-center-cols-viewport",
8725    getRowCtrls: vs
8726  },
8727  left: {
8728    type: "left",
8729    container: "ag-pinned-left-cols-container",
8730    pinnedType: "left",
8731    getRowCtrls: vs
8732  },
8733  right: {
8734    type: "right",
8735    container: "ag-pinned-right-cols-container",
8736    pinnedType: "right",
8737    getRowCtrls: vs
8738  },
8739  fullWidth: {
8740    type: "fullWidth",
8741    container: "ag-full-width-container",
8742    fullWidth: !0,
8743    getRowCtrls: vs
8744  },
8745  topCenter: {
8746    type: "center",
8747    container: "ag-floating-top-container",
8748    viewport: "ag-floating-top-viewport",
8749    getRowCtrls: ps
8750  },
8751  topLeft: {
8752    type: "left",
8753    container: "ag-pinned-left-floating-top",
8754    pinnedType: "left",
8755    getRowCtrls: ps
8756  },
8757  topRight: {
8758    type: "right",
8759    container: "ag-pinned-right-floating-top",
8760    pinnedType: "right",
8761    getRowCtrls: ps
8762  },
8763  topFullWidth: {
8764    type: "fullWidth",
8765    container: "ag-floating-top-full-width-container",
8766    fullWidth: !0,
8767    getRowCtrls: ps
8768  },
8769  stickyTopCenter: {
8770    type: "center",
8771    container: "ag-sticky-top-container",
8772    viewport: "ag-sticky-top-viewport",
8773    getRowCtrls: fs
8774  },
8775  stickyTopLeft: {
8776    type: "left",
8777    container: "ag-pinned-left-sticky-top",
8778    pinnedType: "left",
8779    getRowCtrls: fs
8780  },
8781  stickyTopRight: {
8782    type: "right",
8783    container: "ag-pinned-right-sticky-top",
8784    pinnedType: "right",
8785    getRowCtrls: fs
8786  },
8787  stickyTopFullWidth: {
8788    type: "fullWidth",
8789    container: "ag-sticky-top-full-width-container",
8790    fullWidth: !0,
8791    getRowCtrls: fs
8792  },
8793  stickyBottomCenter: {
8794    type: "center",
8795    container: "ag-sticky-bottom-container",
8796    viewport: "ag-sticky-bottom-viewport",
8797    getRowCtrls: ms
8798  },
8799  stickyBottomLeft: {
8800    type: "left",
8801    container: "ag-pinned-left-sticky-bottom",
8802    pinnedType: "left",
8803    getRowCtrls: ms
8804  },
8805  stickyBottomRight: {
8806    type: "right",
8807    container: "ag-pinned-right-sticky-bottom",
8808    pinnedType: "right",
8809    getRowCtrls: ms
8810  },
8811  stickyBottomFullWidth: {
8812    type: "fullWidth",
8813    container: "ag-sticky-bottom-full-width-container",
8814    fullWidth: !0,
8815    getRowCtrls: ms
8816  },
8817  bottomCenter: {
8818    type: "center",
8819    container: "ag-floating-bottom-container",
8820    viewport: "ag-floating-bottom-viewport",
8821    getRowCtrls: Cs
8822  },
8823  bottomLeft: {
8824    type: "left",
8825    container: "ag-pinned-left-floating-bottom",
8826    pinnedType: "left",
8827    getRowCtrls: Cs
8828  },
8829  bottomRight: {
8830    type: "right",
8831    container: "ag-pinned-right-floating-bottom",
8832    pinnedType: "right",
8833    getRowCtrls: Cs
8834  },
8835  bottomFullWidth: {
8836    type: "fullWidth",
8837    container: "ag-floating-bottom-full-width-container",
8838    fullWidth: !0,
8839    getRowCtrls: Cs
8840  }
8841};
8842function Jt(e) {
8843  return Kf[e];
8844}
8845var jf = ["topCenter", "topLeft", "topRight"], qf = ["bottomCenter", "bottomLeft", "bottomRight"], Yf = ["center", "left", "right"], Qf = ["center", "left", "right", "fullWidth"], Zf = ["stickyTopCenter", "stickyBottomCenter", "center", "topCenter", "bottomCenter"], Xf = ["left", "bottomLeft", "topLeft", "stickyTopLeft", "stickyBottomLeft"], Jf = ["right", "bottomRight", "topRight", "stickyTopRight", "stickyBottomRight"], Pd = ["stickyTopCenter", "stickyTopLeft", "stickyTopRight"], Ed = ["stickyBottomCenter", "stickyBottomLeft", "stickyBottomRight"], em = [
8846  ...Pd,
8847  "stickyTopFullWidth",
8848  ...Ed,
8849  "stickyBottomFullWidth"
8850], tm = [
8851  ...jf,
8852  ...qf,
8853  ...Yf,
8854  ...Pd,
8855  ...Ed
8856], im = class extends y {
8857  constructor(e) {
8858    super(), this.name = e, this.visible = !0, this.EMPTY_CTRLS = [], this.options = Jt(e);
8859  }
8860  postConstruct() {
8861    this.enableRtl = this.gos.get("enableRtl"), this.forContainers(["center"], () => {
8862      this.viewportSizeFeature = this.createManagedBean(new Of(this)), this.addManagedEventListeners({
8863        stickyTopOffsetChanged: this.onStickyTopOffsetChanged.bind(this)
8864      });
8865    });
8866  }
8867  onStickyTopOffsetChanged(e) {
8868    this.comp.setOffsetTop(`${e.offset}px`);
8869  }
8870  registerWithCtrlsService() {
8871    this.options.fullWidth || this.beans.ctrlsSvc.register(this.name, this);
8872  }
8873  forContainers(e, t) {
8874    e.indexOf(this.name) >= 0 && t();
8875  }
8876  setComp(e, t, i) {
8877    this.comp = e, this.eContainer = t, this.eViewport = i, this.createManagedBean(new $f(this.eContainer)), this.addPreventScrollWhileDragging(), this.listenOnDomOrder();
8878    const { pinnedCols: s, rangeSvc: o } = this.beans, n = () => this.onPinnedWidthChanged();
8879    this.forContainers(Xf, () => {
8880      this.pinnedWidthFeature = this.createOptionalManagedBean(
8881        s?.createPinnedWidthFeature(this.eContainer, !0)
8882      ), this.addManagedEventListeners({ leftPinnedWidthChanged: n });
8883    }), this.forContainers(Jf, () => {
8884      this.pinnedWidthFeature = this.createOptionalManagedBean(
8885        s?.createPinnedWidthFeature(this.eContainer, !1)
8886      ), this.addManagedEventListeners({ rightPinnedWidthChanged: n });
8887    }), this.forContainers(
8888      Qf,
8889      () => this.createManagedBean(
8890        new xd(this.eContainer, this.name === "center" ? i : void 0)
8891      )
8892    ), o && this.forContainers(
8893      tm,
8894      () => this.createManagedBean(o.createDragListenerFeature(this.eContainer))
8895    ), this.forContainers(
8896      Zf,
8897      () => this.createManagedBean(new Yn((r) => this.comp.setContainerWidth(`${r}px`)))
8898    ), this.visible = this.isContainerVisible(), this.addListeners(), this.registerWithCtrlsService();
8899  }
8900  onScrollCallback(e) {
8901    this.addManagedElementListeners(this.eViewport, { scroll: e });
8902  }
8903  addListeners() {
8904    this.addManagedEventListeners({
8905      displayedColumnsChanged: this.onDisplayedColumnsChanged.bind(this),
8906      displayedColumnsWidthChanged: this.onDisplayedColumnsChanged.bind(this),
8907      displayedRowsChanged: (e) => this.onDisplayedRowsChanged(e.afterScroll)
8908    }), this.onDisplayedColumnsChanged(), this.onDisplayedRowsChanged();
8909  }
8910  listenOnDomOrder() {
8911    if (em.indexOf(this.name) >= 0) {
8912      this.comp.setDomOrder(!0);
8913      return;
8914    }
8915    const t = () => {
8916      const i = this.gos.get("ensureDomOrder"), s = de(this.gos, "print");
8917      this.comp.setDomOrder(i || s);
8918    };
8919    this.addManagedPropertyListener("domLayout", t), t();
8920  }
8921  onDisplayedColumnsChanged() {
8922    this.forContainers(["center"], () => this.onHorizontalViewportChanged());
8923  }
8924  // this methods prevents the grid views from being scrolled while the dragService is being used
8925  // eg. the view should not scroll up and down while dragging rows using the rowDragComp.
8926  addPreventScrollWhileDragging() {
8927    const { dragSvc: e } = this.beans;
8928    if (!e)
8929      return;
8930    const t = (i) => {
8931      e.dragging && i.cancelable && i.preventDefault();
8932    };
8933    this.eContainer.addEventListener("touchmove", t, { passive: !1 }), this.addDestroyFunc(() => this.eContainer.removeEventListener("touchmove", t));
8934  }
8935  // this gets called whenever a change in the viewport, so we can inform column controller it has to work
8936  // out the virtual columns again. gets called from following locations:
8937  // + ensureColVisible, scroll, init, layoutChanged, displayedColumnsChanged
8938  onHorizontalViewportChanged(e = !1) {
8939    const t = this.getCenterWidth(), i = this.getCenterViewportScrollLeft();
8940    this.beans.colViewport.setScrollPosition(t, i, e);
8941  }
8942  hasHorizontalScrollGap() {
8943    return this.eContainer.clientWidth - this.eViewport.clientWidth < 0;
8944  }
8945  hasVerticalScrollGap() {
8946    return this.eContainer.clientHeight - this.eViewport.clientHeight < 0;
8947  }
8948  getCenterWidth() {
8949    return Yi(this.eViewport);
8950  }
8951  getCenterViewportScrollLeft() {
8952    return Ms(this.eViewport, this.enableRtl);
8953  }
8954  registerViewportResizeListener(e) {
8955    const t = Rt(this.beans, this.eViewport, e);
8956    this.addDestroyFunc(() => t());
8957  }
8958  isViewportInTheDOMTree() {
8959    return Sl(this.eViewport);
8960  }
8961  getViewportScrollLeft() {
8962    return Ms(this.eViewport, this.enableRtl);
8963  }
8964  isHorizontalScrollShowing() {
8965    return this.gos.get("alwaysShowHorizontalScroll") || Kh(this.eViewport);
8966  }
8967  setHorizontalScroll(e) {
8968    this.comp.setHorizontalScroll(e);
8969  }
8970  getHScrollPosition() {
8971    return {
8972      left: this.eViewport.scrollLeft,
8973      right: this.eViewport.scrollLeft + this.eViewport.offsetWidth
8974    };
8975  }
8976  setCenterViewportScrollLeft(e) {
8977    Is(this.eViewport, e, this.enableRtl);
8978  }
8979  isContainerVisible() {
8980    return !(this.options.pinnedType != null) || !!this.pinnedWidthFeature && this.pinnedWidthFeature.getWidth() > 0;
8981  }
8982  onPinnedWidthChanged() {
8983    const e = this.isContainerVisible();
8984    this.visible != e && (this.visible = e, this.onDisplayedRowsChanged());
8985  }
8986  onDisplayedRowsChanged(e = !1) {
8987    const t = this.options.getRowCtrls(this.beans.rowRenderer);
8988    if (!this.visible || t.length === 0) {
8989      this.comp.setRowCtrls({ rowCtrls: this.EMPTY_CTRLS });
8990      return;
8991    }
8992    const i = de(this.gos, "print"), o = this.gos.get("embedFullWidthRows") || i, n = t.filter((r) => {
8993      const a = r.isFullWidth();
8994      return this.options.fullWidth ? !o && a : o || !a;
8995    });
8996    this.comp.setRowCtrls({ rowCtrls: n, useFlushSync: e });
8997  }
8998}, Dd = "ag-force-vertical-scroll", sm = "ag-selectable", om = "ag-column-moving", nm = class extends y {
8999  constructor() {
9000    super(...arguments), this.stickyTopHeight = 0, this.stickyBottomHeight = 0;
9001  }
9002  wireBeans(e) {
9003    this.ctrlsSvc = e.ctrlsSvc, this.colModel = e.colModel, this.scrollVisibleSvc = e.scrollVisibleSvc, this.pinnedRowModel = e.pinnedRowModel, this.filterManager = e.filterManager, this.rowGroupColsSvc = e.rowGroupColsSvc;
9004  }
9005  setComp(e, t, i, s, o, n, r) {
9006    this.comp = e, this.eGridBody = t, this.eBodyViewport = i, this.eTop = s, this.eBottom = o, this.eStickyTop = n, this.eStickyBottom = r, this.eCenterColsViewport = i.querySelector(
9007      `.${Jt("center").viewport}`
9008    ), this.eFullWidthContainer = i.querySelector(
9009      `.${Jt("fullWidth").container}`
9010    ), this.eStickyTopFullWidthContainer = n.querySelector(
9011      `.${Jt("stickyTopFullWidth").container}`
9012    ), this.eStickyBottomFullWidthContainer = r.querySelector(
9013      `.${Jt("stickyBottomFullWidth").container}`
9014    ), this.setCellTextSelection(this.gos.get("enableCellTextSelection")), this.addManagedPropertyListener(
9015      "enableCellTextSelection",
9016      (a) => this.setCellTextSelection(a.currentValue)
9017    ), this.createManagedBean(new qn(this.comp)), this.scrollFeature = this.createManagedBean(new Lf(this.eBodyViewport)), this.beans.rowDragSvc?.setupRowDrag(this.eBodyViewport, this), this.setupRowAnimationCssClass(), this.addEventListeners(), this.addFocusListeners([s, i, o, n, r]), this.setGridRootRole(), this.onGridColumnsChanged(), this.addBodyViewportListener(), this.setFloatingHeights(), this.disableBrowserDragging(), this.addStopEditingWhenGridLosesFocus(), this.updateScrollingClasses(), this.filterManager?.setupAdvFilterHeaderComp(s), this.ctrlsSvc.register("gridBodyCtrl", this);
9018  }
9019  addEventListeners() {
9020    const e = this.setFloatingHeights.bind(this), t = this.setGridRootRole.bind(this);
9021    this.addManagedEventListeners({
9022      gridColumnsChanged: this.onGridColumnsChanged.bind(this),
9023      scrollVisibilityChanged: this.onScrollVisibilityChanged.bind(this),
9024      scrollGapChanged: this.updateScrollingClasses.bind(this),
9025      pinnedRowDataChanged: e,
9026      pinnedHeightChanged: e,
9027      headerHeightChanged: this.setStickyTopOffsetTop.bind(this),
9028      columnRowGroupChanged: t,
9029      columnPivotChanged: t
9030    }), this.addManagedPropertyListener("treeData", t);
9031  }
9032  onGridColumnsChanged() {
9033    const e = this.beans.colModel.getCols();
9034    this.comp.setColumnCount(e.length);
9035  }
9036  onScrollVisibilityChanged() {
9037    const { scrollVisibleSvc: e } = this, t = e.verticalScrollShowing;
9038    this.setVerticalScrollPaddingVisible(t), this.setStickyWidth(t), this.setStickyBottomOffsetBottom();
9039    const i = t && e.getScrollbarWidth() || 0, s = ml() ? 16 : 0, o = `calc(100% + ${i + s}px)`;
9040    Ft(this.beans, () => this.comp.setBodyViewportWidth(o)), this.updateScrollingClasses();
9041  }
9042  setGridRootRole() {
9043    const { rowGroupColsSvc: e, colModel: t } = this;
9044    let i = this.gos.get("treeData");
9045    if (!i) {
9046      const s = t.isPivotMode();
9047      i = (e ? e.columns.length : 0) >= (s ? 2 : 1);
9048    }
9049    this.comp.setGridRootRole(i ? "treegrid" : "grid");
9050  }
9051  addFocusListeners(e) {
9052    e.forEach((t) => {
9053      this.addManagedElementListeners(t, {
9054        focusin: (i) => {
9055          const { target: s } = i, o = Mt(s, "ag-root", t);
9056          t.classList.toggle("ag-has-focus", !o);
9057        },
9058        focusout: (i) => {
9059          const { target: s, relatedTarget: o } = i, n = t.contains(o), r = Mt(
9060            o,
9061            "ag-root",
9062            t
9063          );
9064          Mt(s, "ag-root", t) || (!n || r) && t.classList.remove("ag-has-focus");
9065        }
9066      });
9067    });
9068  }
9069  // used by ColumnAnimationService
9070  setColumnMovingCss(e) {
9071    this.comp.setColumnMovingCss(om, e);
9072  }
9073  setCellTextSelection(e = !1) {
9074    this.comp.setCellSelectableCss(sm, e);
9075  }
9076  updateScrollingClasses() {
9077    const {
9078      eGridBody: { classList: e },
9079      scrollVisibleSvc: t
9080    } = this;
9081    e.toggle("ag-body-vertical-content-no-gap", !t.verticalScrollGap), e.toggle("ag-body-horizontal-content-no-gap", !t.horizontalScrollGap);
9082  }
9083  // if we do not do this, then the user can select a pic in the grid (eg an image in a custom cell renderer)
9084  // and then that will start the browser native drag n' drop, which messes up with our own drag and drop.
9085  disableBrowserDragging() {
9086    this.addManagedElementListeners(this.eGridBody, {
9087      dragstart: (e) => {
9088        if (e.target instanceof HTMLImageElement)
9089          return e.preventDefault(), !1;
9090      }
9091    });
9092  }
9093  addStopEditingWhenGridLosesFocus() {
9094    this.beans.editSvc?.addStopEditingWhenGridLosesFocus([
9095      this.eBodyViewport,
9096      this.eBottom,
9097      this.eTop,
9098      this.eStickyTop,
9099      this.eStickyBottom
9100    ]);
9101  }
9102  updateRowCount() {
9103    const e = (this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount() ?? 0) + (this.filterManager?.getHeaderRowCount() ?? 0), { rowModel: t } = this.beans, i = t.isLastRowIndexKnown() ? t.getRowCount() : -1, s = i === -1 ? -1 : e + i;
9104    this.comp.setRowCount(s);
9105  }
9106  registerBodyViewportResizeListener(e) {
9107    this.comp.registerBodyViewportResizeListener(e);
9108  }
9109  setVerticalScrollPaddingVisible(e) {
9110    const t = e ? "scroll" : "hidden";
9111    this.comp.setPinnedTopBottomOverflowY(t);
9112  }
9113  isVerticalScrollShowing() {
9114    const e = this.gos.get("alwaysShowVerticalScroll"), t = e ? Dd : null, i = de(this.gos, "normal");
9115    return this.comp.setAlwaysVerticalScrollClass(t, e), e || i && jh(this.eBodyViewport);
9116  }
9117  setupRowAnimationCssClass() {
9118    const { rowContainerHeight: e, environment: t } = this.beans;
9119    let i = t.sizesMeasured;
9120    const s = () => {
9121      const o = i && si(this.gos) && !e.stretching, n = o ? "ag-row-animation" : "ag-row-no-animation";
9122      this.comp.setRowAnimationCssOnBodyViewport(n, o);
9123    };
9124    s(), this.addManagedEventListeners({ heightScaleChanged: s }), this.addManagedPropertyListener("animateRows", s), this.addManagedEventListeners({
9125      gridStylesChanged: () => {
9126        !i && t.sizesMeasured && (i = !0, s());
9127      }
9128    });
9129  }
9130  addBodyViewportListener() {
9131    const { popupSvc: e, touchSvc: t } = this.beans, i = this.onBodyViewportContextMenu.bind(this);
9132    this.addManagedElementListeners(this.eBodyViewport, { contextmenu: i }), t?.mockBodyContextMenu(this, i), this.addManagedElementListeners(this.eBodyViewport, {
9133      wheel: this.onBodyViewportWheel.bind(this, e)
9134    }), this.addManagedElementListeners(this.eStickyTop, { wheel: this.onStickyWheel.bind(this) }), this.addManagedElementListeners(this.eStickyBottom, { wheel: this.onStickyWheel.bind(this) }), this.addFullWidthContainerWheelListener();
9135  }
9136  addFullWidthContainerWheelListener() {
9137    this.addManagedElementListeners(this.eFullWidthContainer, {
9138      wheel: (e) => this.onFullWidthContainerWheel(e)
9139    });
9140  }
9141  onFullWidthContainerWheel(e) {
9142    const { deltaX: t, deltaY: i, shiftKey: s } = e;
9143    (s || Math.abs(t) > Math.abs(i)) && Us(this.gos, e) && this.scrollGridBodyToMatchEvent(e);
9144  }
9145  onStickyWheel(e) {
9146    const { deltaX: t, deltaY: i, shiftKey: s } = e, o = s || Math.abs(t) > Math.abs(i), n = e.target;
9147    o ? (this.eStickyTopFullWidthContainer.contains(n) || this.eStickyBottomFullWidthContainer.contains(n)) && this.scrollGridBodyToMatchEvent(e) : (e.preventDefault(), this.scrollVertically(i));
9148  }
9149  scrollGridBodyToMatchEvent(e) {
9150    const { deltaX: t, deltaY: i } = e;
9151    e.preventDefault(), this.eCenterColsViewport.scrollBy({ left: t || i });
9152  }
9153  onBodyViewportContextMenu(e, t, i) {
9154    if (!e && !i)
9155      return;
9156    this.gos.get("preventDefaultOnContextMenu") && (e || i).preventDefault();
9157    const { target: s } = e || t;
9158    (s === this.eBodyViewport || s === this.ctrlsSvc.get("center").eViewport) && this.beans.contextMenuSvc?.showContextMenu({
9159      mouseEvent: e,
9160      touchEvent: i,
9161      value: null,
9162      anchorToElement: this.eGridBody
9163    });
9164  }
9165  onBodyViewportWheel(e, t) {
9166    this.gos.get("suppressScrollWhenPopupsAreOpen") && e?.hasAnchoredPopup() && t.preventDefault();
9167  }
9168  // called by rowDragFeature
9169  scrollVertically(e) {
9170    const t = this.eBodyViewport.scrollTop;
9171    return this.scrollFeature.setVerticalScrollPosition(t + e), this.eBodyViewport.scrollTop - t;
9172  }
9173  setFloatingHeights() {
9174    const { pinnedRowModel: e } = this, t = e?.getPinnedTopTotalHeight() ?? 0, i = e?.getPinnedBottomTotalHeight() ?? 0;
9175    this.comp.setTopHeight(t), this.comp.setBottomHeight(i), this.comp.setTopDisplay(t ? "inherit" : "none"), this.comp.setBottomDisplay(i ? "inherit" : "none"), this.setStickyTopOffsetTop(), this.setStickyBottomOffsetBottom();
9176  }
9177  setStickyTopHeight(e = 0) {
9178    this.comp.setStickyTopHeight(`${e}px`), this.stickyTopHeight = e;
9179  }
9180  setStickyBottomHeight(e = 0) {
9181    this.comp.setStickyBottomHeight(`${e}px`), this.stickyBottomHeight = e;
9182  }
9183  setStickyWidth(e) {
9184    if (!e)
9185      this.comp.setStickyTopWidth("100%"), this.comp.setStickyBottomWidth("100%");
9186    else {
9187      const t = this.scrollVisibleSvc.getScrollbarWidth();
9188      this.comp.setStickyTopWidth(`calc(100% - ${t}px)`), this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`);
9189    }
9190  }
9191  setStickyTopOffsetTop() {
9192    const t = this.ctrlsSvc.get("gridHeaderCtrl").headerHeight + (this.filterManager?.getHeaderHeight() ?? 0), i = this.pinnedRowModel?.getPinnedTopTotalHeight() ?? 0;
9193    let s = 0;
9194    t > 0 && (s += t), i > 0 && (s += i), s > 0 && (s += 1), this.comp.setStickyTopTop(`${s}px`);
9195  }
9196  setStickyBottomOffsetBottom() {
9197    const { pinnedRowModel: e, scrollVisibleSvc: t, comp: i } = this, s = e?.getPinnedBottomTotalHeight() ?? 0, n = t.horizontalScrollShowing && t.getScrollbarWidth() || 0, r = s + n;
9198    i.setStickyBottomBottom(`${r}px`);
9199  }
9200}, Ad = class extends _ {
9201  constructor(e, t) {
9202    super(), this.direction = t, this.eViewport = M, this.eContainer = M, this.hideTimeout = 0, this.setTemplate(e);
9203  }
9204  postConstruct() {
9205    this.addManagedEventListeners({
9206      scrollVisibilityChanged: this.onScrollVisibilityChanged.bind(this)
9207    }), this.onScrollVisibilityChanged(), this.addOrRemoveCssClass("ag-apple-scrollbar", pl() || Tt());
9208  }
9209  destroy() {
9210    super.destroy(), window.clearTimeout(this.hideTimeout);
9211  }
9212  initialiseInvisibleScrollbar() {
9213    this.invisibleScrollbar === void 0 && (this.invisibleScrollbar = ml(), this.invisibleScrollbar && (this.hideAndShowInvisibleScrollAsNeeded(), this.addActiveListenerToggles()));
9214  }
9215  addActiveListenerToggles() {
9216    const e = this.getGui(), t = () => this.addOrRemoveCssClass("ag-scrollbar-active", !0), i = () => this.addOrRemoveCssClass("ag-scrollbar-active", !1);
9217    this.addManagedListeners(e, {
9218      mouseenter: t,
9219      mousedown: t,
9220      touchstart: t,
9221      mouseleave: i,
9222      touchend: i
9223    });
9224  }
9225  onScrollVisibilityChanged() {
9226    this.invisibleScrollbar === void 0 && this.initialiseInvisibleScrollbar(), Ft(this.beans, () => this.setScrollVisible());
9227  }
9228  hideAndShowInvisibleScrollAsNeeded() {
9229    this.addManagedEventListeners({
9230      bodyScroll: (e) => {
9231        e.direction === this.direction && (this.hideTimeout && (window.clearTimeout(this.hideTimeout), this.hideTimeout = 0), this.addOrRemoveCssClass("ag-scrollbar-scrolling", !0));
9232      },
9233      bodyScrollEnd: () => {
9234        this.hideTimeout = window.setTimeout(() => {
9235          this.addOrRemoveCssClass("ag-scrollbar-scrolling", !1), this.hideTimeout = 0;
9236        }, 400);
9237      }
9238    });
9239  }
9240  attemptSettingScrollPosition(e) {
9241    const t = this.eViewport;
9242    Zh(
9243      () => Ne(t),
9244      () => this.setScrollPosition(e),
9245      100
9246    );
9247  }
9248  onScrollCallback(e) {
9249    this.addManagedElementListeners(this.eViewport, { scroll: e });
9250  }
9251}, rm = class extends Ad {
9252  constructor() {
9253    super(
9254      /* html */
9255      `<div class="ag-body-horizontal-scroll" aria-hidden="true">
9256            <div class="ag-horizontal-left-spacer" data-ref="eLeftSpacer"></div>
9257            <div class="ag-body-horizontal-scroll-viewport" data-ref="eViewport">
9258                <div class="ag-body-horizontal-scroll-container" data-ref="eContainer"></div>
9259            </div>
9260            <div class="ag-horizontal-right-spacer" data-ref="eRightSpacer"></div>
9261        </div>`,
9262      "horizontal"
9263    ), this.eLeftSpacer = M, this.eRightSpacer = M, this.setScrollVisibleDebounce = 0;
9264  }
9265  wireBeans(e) {
9266    this.visibleCols = e.visibleCols, this.scrollVisibleSvc = e.scrollVisibleSvc;
9267  }
9268  postConstruct() {
9269    super.postConstruct();
9270    const e = this.setFakeHScrollSpacerWidths.bind(this);
9271    this.addManagedEventListeners({
9272      displayedColumnsChanged: e,
9273      displayedColumnsWidthChanged: e,
9274      pinnedRowDataChanged: this.refreshCompBottom.bind(this)
9275    }), this.addManagedPropertyListener("domLayout", e), this.beans.ctrlsSvc.register("fakeHScrollComp", this), this.createManagedBean(new Yn((t) => this.eContainer.style.width = `${t}px`)), this.addManagedPropertyListeners(["suppressHorizontalScroll"], this.onScrollVisibilityChanged.bind(this));
9276  }
9277  destroy() {
9278    window.clearTimeout(this.setScrollVisibleDebounce), super.destroy();
9279  }
9280  initialiseInvisibleScrollbar() {
9281    this.invisibleScrollbar === void 0 && (this.enableRtl = this.gos.get("enableRtl"), super.initialiseInvisibleScrollbar(), this.invisibleScrollbar && this.refreshCompBottom());
9282  }
9283  refreshCompBottom() {
9284    if (!this.invisibleScrollbar)
9285      return;
9286    const e = this.beans.pinnedRowModel?.getPinnedBottomTotalHeight() ?? 0;
9287    this.getGui().style.bottom = `${e}px`;
9288  }
9289  onScrollVisibilityChanged() {
9290    super.onScrollVisibilityChanged(), this.setFakeHScrollSpacerWidths();
9291  }
9292  setFakeHScrollSpacerWidths() {
9293    const e = this.scrollVisibleSvc.verticalScrollShowing;
9294    let t = this.visibleCols.getDisplayedColumnsRightWidth();
9295    const i = !this.enableRtl && e, s = this.scrollVisibleSvc.getScrollbarWidth();
9296    i && (t += s), Ye(this.eRightSpacer, t), this.eRightSpacer.classList.toggle("ag-scroller-corner", t <= s);
9297    let o = this.visibleCols.getColsLeftWidth();
9298    this.enableRtl && e && (o += s), Ye(this.eLeftSpacer, o), this.eLeftSpacer.classList.toggle("ag-scroller-corner", o <= s);
9299  }
9300  setScrollVisible() {
9301    const e = this.scrollVisibleSvc.horizontalScrollShowing, t = this.invisibleScrollbar, i = this.gos.get("suppressHorizontalScroll"), s = e && this.scrollVisibleSvc.getScrollbarWidth() || 0, n = i ? 0 : s === 0 && t ? 16 : s, r = () => {
9302      this.setScrollVisibleDebounce = 0, this.addOrRemoveCssClass("ag-scrollbar-invisible", t), Bi(this.getGui(), n), Bi(this.eViewport, n), Bi(this.eContainer, n), this.setDisplayed(e, { skipAriaHidden: !0 });
9303    };
9304    window.clearTimeout(this.setScrollVisibleDebounce), e ? this.setScrollVisibleDebounce = window.setTimeout(r, 100) : r();
9305  }
9306  getScrollPosition() {
9307    return Ms(this.eViewport, this.enableRtl);
9308  }
9309  setScrollPosition(e) {
9310    Ne(this.eViewport) || this.attemptSettingScrollPosition(e), Is(this.eViewport, e, this.enableRtl);
9311  }
9312}, am = {
9313  selector: "AG-FAKE-HORIZONTAL-SCROLL",
9314  component: rm
9315}, lm = class extends Ad {
9316  constructor() {
9317    super(
9318      /* html */
9319      `<div class="ag-body-vertical-scroll" aria-hidden="true">
9320            <div class="ag-body-vertical-scroll-viewport" data-ref="eViewport">
9321                <div class="ag-body-vertical-scroll-container" data-ref="eContainer"></div>
9322            </div>
9323        </div>`,
9324      "vertical"
9325    );
9326  }
9327  postConstruct() {
9328    super.postConstruct(), this.createManagedBean(new xd(this.eContainer));
9329    const { ctrlsSvc: e } = this.beans;
9330    e.register("fakeVScrollComp", this), this.addManagedEventListeners({
9331      rowContainerHeightChanged: this.onRowContainerHeightChanged.bind(this, e)
9332    });
9333  }
9334  setScrollVisible() {
9335    const { scrollVisibleSvc: e } = this.beans, t = e.verticalScrollShowing, i = this.invisibleScrollbar, s = t && e.getScrollbarWidth() || 0, o = s === 0 && i ? 16 : s;
9336    this.addOrRemoveCssClass("ag-scrollbar-invisible", i), Ye(this.getGui(), o), Ye(this.eViewport, o), Ye(this.eContainer, o), this.setDisplayed(t, { skipAriaHidden: !0 });
9337  }
9338  onRowContainerHeightChanged(e) {
9339    const i = e.getGridBodyCtrl().eBodyViewport, s = this.getScrollPosition(), o = i.scrollTop;
9340    s != o && this.setScrollPosition(o, !0);
9341  }
9342  getScrollPosition() {
9343    return this.eViewport.scrollTop;
9344  }
9345  setScrollPosition(e, t) {
9346    !t && !Ne(this.eViewport) && this.attemptSettingScrollPosition(e), this.eViewport.scrollTop = e;
9347  }
9348}, dm = {
9349  selector: "AG-FAKE-VERTICAL-SCROLL",
9350  component: lm
9351};
9352function cm(e) {
9353  return e.cols ? e.cols.treeDepth + 1 : -1;
9354}
9355function st(e) {
9356  return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount() ?? 0;
9357}
9358function Zn(e) {
9359  const t = [], i = e.ctrlsSvc.getHeaderRowContainerCtrls();
9360  for (const s of i) {
9361    if (!s)
9362      continue;
9363    const o = s.getGroupRowCount() || 0;
9364    for (let n = 0; n < o; n++) {
9365      const r = s.getGroupRowCtrlAtIndex(n), a = t[n];
9366      if (r) {
9367        const l = um(e, r);
9368        (a == null || l > a) && (t[n] = l);
9369      }
9370    }
9371  }
9372  return t;
9373}
9374function um(e, t) {
9375  const i = e.colModel.isPivotMode() ? gm(e) : Md(e);
9376  let s = 0;
9377  const o = t.getHeaderCtrls();
9378  for (const n of o) {
9379    const { column: r } = n;
9380    if (r.isAutoHeaderHeight()) {
9381      const a = r.getAutoHeaderHeight();
9382      a != null && a > s && (s = a);
9383    }
9384  }
9385  return Math.max(i, s);
9386}
9387function Xn(e) {
9388  const t = e.colModel.isPivotMode() ? hm(e) : ds(e), s = e.visibleCols.allCols.filter((o) => o.isAutoHeaderHeight()).map((o) => o.getAutoHeaderHeight() || 0);
9389  return Math.max(t, ...s);
9390}
9391function ds(e) {
9392  return e.gos.get("headerHeight") ?? e.environment.getDefaultHeaderHeight();
9393}
9394function Td(e) {
9395  return e.gos.get("floatingFiltersHeight") ?? ds(e);
9396}
9397function Md(e) {
9398  return e.gos.get("groupHeaderHeight") ?? ds(e);
9399}
9400function hm(e) {
9401  return e.gos.get("pivotHeaderHeight") ?? ds(e);
9402}
9403function gm(e) {
9404  return e.gos.get("pivotGroupHeaderHeight") ?? Md(e);
9405}
9406var pm = class extends y {
9407  setComp(e, t, i) {
9408    this.comp = e, this.eGui = t;
9409    const { beans: s } = this, { headerNavigation: o, touchSvc: n, ctrlsSvc: r } = s;
9410    o && this.createManagedBean(
9411      new xi(i, {
9412        onTabKeyDown: this.onTabKeyDown.bind(this),
9413        handleKeyDown: this.handleKeyDown.bind(this),
9414        onFocusOut: this.onFocusOut.bind(this)
9415      })
9416    ), this.addManagedEventListeners({
9417      columnPivotModeChanged: this.onPivotModeChanged.bind(this, s),
9418      displayedColumnsChanged: this.onDisplayedColumnsChanged.bind(this, s)
9419    }), this.onPivotModeChanged(s), this.setupHeaderHeight();
9420    const a = this.onHeaderContextMenu.bind(this);
9421    this.addManagedElementListeners(this.eGui, { contextmenu: a }), n?.mockHeaderContextMenu(this, a), r.register("gridHeaderCtrl", this);
9422  }
9423  setupHeaderHeight() {
9424    const e = this.setHeaderHeight.bind(this);
9425    e(), this.addManagedPropertyListeners(
9426      [
9427        "headerHeight",
9428        "pivotHeaderHeight",
9429        "groupHeaderHeight",
9430        "pivotGroupHeaderHeight",
9431        "floatingFiltersHeight"
9432      ],
9433      e
9434    ), this.addManagedEventListeners({
9435      displayedColumnsChanged: e,
9436      columnHeaderHeightChanged: e,
9437      // add this to the animation frame to avoid a feedback loop
9438      columnGroupHeaderHeightChanged: () => Ft(this.beans, () => e()),
9439      gridStylesChanged: e,
9440      advancedFilterEnabledChanged: e
9441    });
9442  }
9443  setHeaderHeight() {
9444    const { beans: e } = this;
9445    let t = 0;
9446    const i = Zn(e).reduce((n, r) => n + r, 0), s = Xn(e);
9447    if (e.filterManager?.hasFloatingFilters() && (t += Td(e)), t += i, t += s, this.headerHeight === t)
9448      return;
9449    this.headerHeight = t;
9450    const o = `${t + 1}px`;
9451    this.comp.setHeightAndMinHeight(o), this.eventSvc.dispatchEvent({
9452      type: "headerHeightChanged"
9453    });
9454  }
9455  onPivotModeChanged(e) {
9456    const t = e.colModel.isPivotMode();
9457    this.comp.addOrRemoveCssClass("ag-pivot-on", t), this.comp.addOrRemoveCssClass("ag-pivot-off", !t);
9458  }
9459  onDisplayedColumnsChanged(e) {
9460    const i = e.visibleCols.allCols.some((s) => s.isSpanHeaderHeight());
9461    this.comp.addOrRemoveCssClass("ag-header-allow-overflow", i);
9462  }
9463  onTabKeyDown(e) {
9464    const t = this.gos.get("enableRtl"), i = e.shiftKey, s = i !== t ? "LEFT" : "RIGHT", { beans: o } = this, { headerNavigation: n, focusSvc: r } = o;
9465    (n.navigateHorizontally(s, !0, e) || !i && r.focusOverlay(!1) || vi(o, i, !0)) && e.preventDefault();
9466  }
9467  handleKeyDown(e) {
9468    let t = null;
9469    const { headerNavigation: i } = this.beans;
9470    switch (e.key) {
9471      case b.LEFT:
9472        t = "LEFT";
9473      case b.RIGHT: {
9474        A(t) || (t = "RIGHT"), i.navigateHorizontally(t, !1, e) && e.preventDefault();
9475        break;
9476      }
9477      case b.UP:
9478        t = "UP";
9479      case b.DOWN: {
9480        A(t) || (t = "DOWN"), i.navigateVertically(t, null, e) && e.preventDefault();
9481        break;
9482      }
9483      default:
9484        return;
9485    }
9486  }
9487  onFocusOut(e) {
9488    const { relatedTarget: t } = e, { eGui: i, beans: s } = this;
9489    !t && i.contains(Z(s)) || i.contains(t) || (s.focusSvc.focusedHeader = null);
9490  }
9491  onHeaderContextMenu(e, t, i) {
9492    const { menuSvc: s, ctrlsSvc: o } = this.beans;
9493    if (!e && !i || !s?.isHeaderContextMenuEnabled())
9494      return;
9495    const { target: n } = e ?? t;
9496    (n === this.eGui || n === o.getHeaderRowContainerCtrl()?.eViewport) && s.showHeaderContextMenu(void 0, e, i);
9497  }
9498}, Jn = class extends _ {
9499  constructor(e, t) {
9500    super(e), this.ctrl = t;
9501  }
9502  getCtrl() {
9503    return this.ctrl;
9504  }
9505}, fm = class extends Jn {
9506  constructor(e) {
9507    super(
9508      /* html */
9509      `<div class="ag-header-cell" role="columnheader">
9510            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
9511            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
9512        </div>`,
9513      e
9514    ), this.eResize = M, this.eHeaderCompWrapper = M, this.headerCompVersion = 0;
9515  }
9516  postConstruct() {
9517    const e = this.getGui();
9518    ((o, n) => {
9519      n != null && n != "" ? e.setAttribute(o, n) : e.removeAttribute(o);
9520    })("col-id", this.ctrl.column.getColId());
9521    const i = {
9522      setWidth: (o) => e.style.width = o,
9523      addOrRemoveCssClass: (o, n) => this.addOrRemoveCssClass(o, n),
9524      setAriaSort: (o) => o ? Hh(e, o) : Bh(e),
9525      setUserCompDetails: (o) => this.setUserCompDetails(o),
9526      getUserCompInstance: () => this.headerComp
9527    };
9528    this.ctrl.setComp(i, this.getGui(), this.eResize, this.eHeaderCompWrapper, void 0);
9529    const s = this.ctrl.getSelectAllGui();
9530    s && this.eResize.insertAdjacentElement("afterend", s);
9531  }
9532  destroy() {
9533    this.destroyHeaderComp(), super.destroy();
9534  }
9535  destroyHeaderComp() {
9536    this.headerComp && (this.eHeaderCompWrapper.removeChild(this.headerCompGui), this.headerComp = this.destroyBean(this.headerComp), this.headerCompGui = void 0);
9537  }
9538  setUserCompDetails(e) {
9539    this.headerCompVersion++;
9540    const t = this.headerCompVersion;
9541    e.newAgStackInstance().then((i) => this.afterCompCreated(t, i));
9542  }
9543  afterCompCreated(e, t) {
9544    if (e != this.headerCompVersion || !this.isAlive()) {
9545      this.destroyBean(t);
9546      return;
9547    }
9548    this.destroyHeaderComp(), this.headerComp = t, this.headerCompGui = t.getGui(), this.eHeaderCompWrapper.appendChild(this.headerCompGui), this.ctrl.setDragSource(this.getGui());
9549  }
9550}, mm = class extends Jn {
9551  constructor(e) {
9552    super(
9553      /* html */
9554      `<div class="ag-header-group-cell" role="columnheader">
9555            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
9556            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
9557        </div>`,
9558      e
9559    ), this.eResize = M, this.eHeaderCompWrapper = M;
9560  }
9561  postConstruct() {
9562    const e = this.getGui(), t = (s, o) => o != null ? e.setAttribute(s, o) : e.removeAttribute(s);
9563    e.setAttribute("col-id", this.ctrl.column.getUniqueId());
9564    const i = {
9565      addOrRemoveCssClass: (s, o) => this.addOrRemoveCssClass(s, o),
9566      setHeaderWrapperHidden: (s) => {
9567        s ? this.eHeaderCompWrapper.style.setProperty("display", "none") : this.eHeaderCompWrapper.style.removeProperty("display");
9568      },
9569      setHeaderWrapperMaxHeight: (s) => {
9570        s != null ? this.eHeaderCompWrapper.style.setProperty("max-height", `${s}px`) : this.eHeaderCompWrapper.style.removeProperty("max-height"), this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height", s != null);
9571      },
9572      setResizableDisplayed: (s) => Q(this.eResize, s),
9573      setWidth: (s) => e.style.width = s,
9574      setAriaExpanded: (s) => t("aria-expanded", s),
9575      setUserCompDetails: (s) => this.setUserCompDetails(s),
9576      getUserCompInstance: () => this.headerGroupComp
9577    };
9578    this.ctrl.setComp(i, e, this.eResize, this.eHeaderCompWrapper, void 0);
9579  }
9580  setUserCompDetails(e) {
9581    e.newAgStackInstance().then((t) => this.afterHeaderCompCreated(t));
9582  }
9583  afterHeaderCompCreated(e) {
9584    const t = () => this.destroyBean(e);
9585    if (!this.isAlive()) {
9586      t();
9587      return;
9588    }
9589    const i = this.getGui(), s = e.getGui();
9590    this.eHeaderCompWrapper.appendChild(s), this.addDestroyFunc(t), this.headerGroupComp = e, this.ctrl.setDragSource(i);
9591  }
9592  addOrRemoveHeaderWrapperStyle(e, t) {
9593    const { eHeaderCompWrapper: i } = this;
9594    t ? i.style.setProperty(e, t) : i.style.removeProperty(e);
9595  }
9596}, Cm = class extends Jn {
9597  constructor(e) {
9598    super(
9599      /* html */
9600      `<div class="ag-header-cell ag-floating-filter" role="gridcell">
9601            <div data-ref="eFloatingFilterBody" role="presentation"></div>
9602            <div class="ag-floating-filter-button ag-hidden" data-ref="eButtonWrapper" role="presentation">
9603                <button type="button" class="ag-button ag-floating-filter-button-button" data-ref="eButtonShowMainFilter" tabindex="-1"></button>
9604            </div>
9605        </div>`,
9606      e
9607    ), this.eFloatingFilterBody = M, this.eButtonWrapper = M, this.eButtonShowMainFilter = M;
9608  }
9609  postConstruct() {
9610    const e = this.getGui(), t = {
9611      addOrRemoveCssClass: (i, s) => this.addOrRemoveCssClass(i, s),
9612      addOrRemoveBodyCssClass: (i, s) => this.eFloatingFilterBody.classList.toggle(i, s),
9613      setButtonWrapperDisplayed: (i) => Q(this.eButtonWrapper, i),
9614      setCompDetails: (i) => this.setCompDetails(i),
9615      getFloatingFilterComp: () => this.compPromise,
9616      setWidth: (i) => e.style.width = i,
9617      setMenuIcon: (i) => this.eButtonShowMainFilter.appendChild(i)
9618    };
9619    this.ctrl.setComp(t, e, this.eButtonShowMainFilter, this.eFloatingFilterBody, void 0);
9620  }
9621  setCompDetails(e) {
9622    if (!e) {
9623      this.destroyFloatingFilterComp(), this.compPromise = null;
9624      return;
9625    }
9626    this.compPromise = e.newAgStackInstance(), this.compPromise.then((t) => this.afterCompCreated(t));
9627  }
9628  destroy() {
9629    this.destroyFloatingFilterComp(), super.destroy();
9630  }
9631  destroyFloatingFilterComp() {
9632    this.floatingFilterComp && (this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()), this.floatingFilterComp = this.destroyBean(this.floatingFilterComp));
9633  }
9634  afterCompCreated(e) {
9635    if (e) {
9636      if (!this.isAlive()) {
9637        this.destroyBean(e);
9638        return;
9639      }
9640      this.destroyFloatingFilterComp(), this.floatingFilterComp = e, this.eFloatingFilterBody.appendChild(e.getGui()), e.afterGuiAttached && e.afterGuiAttached();
9641    }
9642  }
9643}, vm = class extends _ {
9644  constructor(e) {
9645    super(), this.headerComps = {}, this.ctrl = e, this.setTemplate(
9646      /* html */
9647      `<div class="${this.ctrl.headerRowClass}" role="row"></div>`
9648    );
9649  }
9650  postConstruct() {
9651    cl(this.getGui(), this.ctrl.getAriaRowIndex());
9652    const e = {
9653      setHeight: (t) => this.getGui().style.height = t,
9654      setTop: (t) => this.getGui().style.top = t,
9655      setHeaderCtrls: (t, i) => this.setHeaderCtrls(t, i),
9656      setWidth: (t) => this.getGui().style.width = t
9657    };
9658    this.ctrl.setComp(e, void 0);
9659  }
9660  destroy() {
9661    this.setHeaderCtrls([], !1), super.destroy();
9662  }
9663  setHeaderCtrls(e, t) {
9664    if (!this.isAlive())
9665      return;
9666    const i = this.headerComps;
9667    if (this.headerComps = {}, e.forEach((s) => {
9668      const o = s.instanceId;
9669      let n = i[o];
9670      delete i[o], n == null && (n = this.createHeaderComp(s), this.getGui().appendChild(n.getGui())), this.headerComps[o] = n;
9671    }), Object.values(i).forEach((s) => {
9672      this.getGui().removeChild(s.getGui()), this.destroyBean(s);
9673    }), t) {
9674      const s = Object.values(this.headerComps);
9675      s.sort(
9676        (n, r) => {
9677          const a = n.getCtrl().column.getLeft(), l = r.getCtrl().column.getLeft();
9678          return a - l;
9679        }
9680      );
9681      const o = s.map((n) => n.getGui());
9682      yl(this.getGui(), o);
9683    }
9684  }
9685  createHeaderComp(e) {
9686    let t;
9687    switch (this.ctrl.type) {
9688      case "group":
9689        t = new mm(e);
9690        break;
9691      case "filter":
9692        t = new Cm(e);
9693        break;
9694      default:
9695        t = new fm(e);
9696        break;
9697    }
9698    return this.createBean(t), t.setParentComponent(this), t;
9699  }
9700}, er = class extends y {
9701  constructor(e, t, i, s) {
9702    super(), this.columnOrGroup = e, this.eCell = t, this.colsSpanning = s, this.columnOrGroup = e, this.ariaEl = t.querySelector("[role=columnheader]") || t, this.beans = i;
9703  }
9704  setColsSpanning(e) {
9705    this.colsSpanning = e, this.onLeftChanged();
9706  }
9707  getColumnOrGroup() {
9708    const { beans: e, colsSpanning: t } = this;
9709    return e.gos.get("enableRtl") && t ? W(t) : this.columnOrGroup;
9710  }
9711  postConstruct() {
9712    const e = this.onLeftChanged.bind(this);
9713    this.addManagedListeners(this.columnOrGroup, { leftChanged: e }), this.setLeftFirstTime(), this.addManagedEventListeners({ displayedColumnsWidthChanged: e }), this.addManagedPropertyListener("domLayout", e);
9714  }
9715  setLeftFirstTime() {
9716    const { gos: e, colAnimation: t } = this.beans, i = e.get("suppressColumnMoveAnimation"), s = A(this.columnOrGroup.getOldLeft());
9717    t?.isActive() && s && !i ? this.animateInLeft() : this.onLeftChanged();
9718  }
9719  animateInLeft() {
9720    const e = this.getColumnOrGroup(), t = this.modifyLeftForPrintLayout(e, e.getOldLeft()), i = this.modifyLeftForPrintLayout(e, e.getLeft());
9721    this.setLeft(t), this.actualLeft = i, this.beans.colAnimation.executeNextVMTurn(() => {
9722      this.actualLeft === i && this.setLeft(i);
9723    });
9724  }
9725  onLeftChanged() {
9726    const e = this.getColumnOrGroup(), t = e.getLeft();
9727    this.actualLeft = this.modifyLeftForPrintLayout(e, t), this.setLeft(this.actualLeft);
9728  }
9729  modifyLeftForPrintLayout(e, t) {
9730    const { gos: i, visibleCols: s } = this.beans;
9731    if (!de(i, "print") || e.getPinned() === "left")
9732      return t;
9733    const n = s.getColsLeftWidth();
9734    if (e.getPinned() === "right") {
9735      const r = s.bodyWidth;
9736      return n + r + t;
9737    }
9738    return n + t;
9739  }
9740  setLeft(e) {
9741    if (A(e) && (this.eCell.style.left = `${e}px`), ee(this.columnOrGroup)) {
9742      const t = this.columnOrGroup.getLeafColumns();
9743      if (!t.length)
9744        return;
9745      t.length > 1 && Gh(this.ariaEl, t.length);
9746    }
9747  }
9748}, wm = 0, Id = "headerCtrl", tr = class extends y {
9749  constructor(e, t) {
9750    super(), this.column = e, this.rowCtrl = t, this.resizeToggleTimeout = 0, this.resizeMultiplier = 1, this.resizeFeature = null, this.lastFocusEvent = null, this.dragSource = null, this.instanceId = e.getUniqueId() + "-" + wm++;
9751  }
9752  postConstruct() {
9753    const e = this.refreshTabIndex.bind(this);
9754    this.addManagedPropertyListeners(["suppressHeaderFocus"], e), this.addManagedEventListeners({
9755      overlayExclusiveChanged: e
9756    });
9757  }
9758  shouldStopEventPropagation(e) {
9759    const { headerRowIndex: t, column: i } = this.beans.focusSvc.focusedHeader, s = i.getDefinition(), o = s && s.suppressHeaderKeyboardEvent;
9760    if (!A(o))
9761      return !1;
9762    const n = this.gos.addGridCommonParams({
9763      colDef: s,
9764      column: i,
9765      headerRowIndex: t,
9766      event: e
9767    });
9768    return !!o(n);
9769  }
9770  getWrapperHasFocus() {
9771    return Z(this.beans) === this.eGui;
9772  }
9773  setGui(e, t) {
9774    this.eGui = e, this.addDomData(t), t.addManagedListeners(this.beans.eventSvc, {
9775      displayedColumnsChanged: this.onDisplayedColumnsChanged.bind(this)
9776    }), t.addManagedElementListeners(this.eGui, {
9777      focus: this.onGuiFocus.bind(this)
9778    }), this.onDisplayedColumnsChanged(), this.refreshTabIndex();
9779  }
9780  onGuiFocus() {
9781    this.eventSvc.dispatchEvent({
9782      type: "headerFocused",
9783      column: this.column
9784    });
9785  }
9786  setupAutoHeight(e) {
9787    const { wrapperElement: t, checkMeasuringCallback: i, compBean: s } = e, { beans: o } = this, n = (u) => {
9788      if (!this.isAlive() || !s.isAlive())
9789        return;
9790      const { paddingTop: h, paddingBottom: g, borderBottomWidth: p, borderTopWidth: f } = Vt(this.eGui), m = h + g + p + f, w = t.offsetHeight + m;
9791      if (u < 5) {
9792        const S = te(o), v = !S || !S.contains(t), P = w == 0;
9793        if (v || P) {
9794          Ft(o, () => n(u + 1));
9795          return;
9796        }
9797      }
9798      this.setColHeaderHeight(this.column, w);
9799    };
9800    let r = !1, a;
9801    const l = () => {
9802      const u = this.column.isAutoHeaderHeight();
9803      u && !r && d(), !u && r && c();
9804    }, d = () => {
9805      r = !0, n(0), this.comp.addOrRemoveCssClass("ag-header-cell-auto-height", !0), a = Rt(this.beans, t, () => n(0));
9806    }, c = () => {
9807      r = !1, a && a(), this.comp.addOrRemoveCssClass("ag-header-cell-auto-height", !1), a = void 0;
9808    };
9809    l(), s.addDestroyFunc(() => c()), s.addManagedListeners(this.column, { widthChanged: () => r && n(0) }), s.addManagedEventListeners({
9810      sortChanged: () => {
9811        r && window.setTimeout(() => n(0));
9812      }
9813    }), i && i(l);
9814  }
9815  onDisplayedColumnsChanged() {
9816    const { comp: e, column: t, beans: i, eGui: s } = this;
9817    !e || !t || !s || (cd(e, t, i.visibleCols), ul(s, i.visibleCols.getAriaColIndex(t)));
9818  }
9819  addResizeAndMoveKeyboardListeners(e) {
9820    e.addManagedListeners(this.eGui, {
9821      keydown: this.onGuiKeyDown.bind(this),
9822      keyup: this.onGuiKeyUp.bind(this)
9823    });
9824  }
9825  refreshTabIndex() {
9826    const e = li(this.beans);
9827    this.eGui && Ie(this.eGui, "tabindex", e ? null : "-1");
9828  }
9829  onGuiKeyDown(e) {
9830    const t = Z(this.beans), i = e.key === b.LEFT || e.key === b.RIGHT;
9831    if (this.isResizing && (e.preventDefault(), e.stopImmediatePropagation()), // if elements within the header are focused, we don't process the event
9832    t !== this.eGui || // if shiftKey and altKey are not pressed, it's cell navigation so we don't process the event
9833    !e.shiftKey && !e.altKey || ((this.isResizing || i) && (e.preventDefault(), e.stopImmediatePropagation()), !i))
9834      return;
9835    const o = e.key === b.LEFT !== this.gos.get("enableRtl") ? "left" : "right";
9836    if (e.altKey) {
9837      this.isResizing = !0, this.resizeMultiplier += 1;
9838      const n = this.getViewportAdjustedResizeDiff(e);
9839      this.resizeHeader(n, e.shiftKey), this.resizeFeature?.toggleColumnResizing(!0);
9840    } else
9841      this.moveHeader(o);
9842  }
9843  moveHeader(e) {
9844    this.beans.colMoves?.moveHeader(e, this.eGui, this.column, this.rowCtrl.pinned, this);
9845  }
9846  getViewportAdjustedResizeDiff(e) {
9847    const t = this.getResizeDiff(e), { pinnedCols: i } = this.beans;
9848    return i ? i.getHeaderResizeDiff(t, this.column) : t;
9849  }
9850  getResizeDiff(e) {
9851    const { gos: t, column: i } = this;
9852    let s = e.key === b.LEFT !== t.get("enableRtl");
9853    const o = i.getPinned(), n = t.get("enableRtl");
9854    return o && n !== (o === "right") && (s = !s), (s ? -1 : 1) * this.resizeMultiplier;
9855  }
9856  onGuiKeyUp() {
9857    this.isResizing && (this.resizeToggleTimeout && (window.clearTimeout(this.resizeToggleTimeout), this.resizeToggleTimeout = 0), this.isResizing = !1, this.resizeMultiplier = 1, this.resizeToggleTimeout = window.setTimeout(() => {
9858      this.resizeFeature?.toggleColumnResizing(!1);
9859    }, 150));
9860  }
9861  handleKeyDown(e) {
9862    const t = this.getWrapperHasFocus();
9863    switch (e.key) {
9864      case b.PAGE_DOWN:
9865      case b.PAGE_UP:
9866      case b.PAGE_HOME:
9867      case b.PAGE_END:
9868        t && e.preventDefault();
9869    }
9870  }
9871  addDomData(e) {
9872    const t = Id, { eGui: i, gos: s } = this;
9873    Gt(s, i, t, this), e.addDestroyFunc(() => Gt(s, i, t, null));
9874  }
9875  focus(e) {
9876    const { eGui: t } = this;
9877    return t ? (this.lastFocusEvent = e || null, t.focus(), !0) : !1;
9878  }
9879  focusThis() {
9880    this.beans.focusSvc.focusedHeader = { headerRowIndex: this.rowCtrl.rowIndex, column: this.column };
9881  }
9882  removeDragSource() {
9883    this.dragSource && (this.beans.dragAndDrop?.removeDragSource(this.dragSource), this.dragSource = null);
9884  }
9885  handleContextMenuMouseEvent(e, t, i) {
9886    const s = e ?? t, { menuSvc: o, gos: n } = this.beans;
9887    n.get("preventDefaultOnContextMenu") && s.preventDefault(), o?.isHeaderContextMenuEnabled(i) && o.showHeaderContextMenu(i, e, t), this.dispatchColumnMouseEvent("columnHeaderContextMenu", i);
9888  }
9889  dispatchColumnMouseEvent(e, t) {
9890    this.eventSvc.dispatchEvent({
9891      type: e,
9892      column: t
9893    });
9894  }
9895  setColHeaderHeight(e, t) {
9896    if (!e.setAutoHeaderHeight(t))
9897      return;
9898    const { eventSvc: i } = this;
9899    e.isColumn ? i.dispatchEvent({
9900      type: "columnHeaderHeightChanged",
9901      column: e,
9902      columns: [e],
9903      source: "autosizeColumnHeaderHeight"
9904    }) : i.dispatchEvent({
9905      type: "columnGroupHeaderHeightChanged",
9906      columnGroup: e,
9907      source: "autosizeColumnGroupHeaderHeight"
9908    });
9909  }
9910  clearComponent() {
9911    this.removeDragSource(), this.resizeFeature = null, this.comp = null, this.eGui = null;
9912  }
9913  destroy() {
9914    super.destroy(), this.column = null, this.lastFocusEvent = null, this.rowCtrl = null;
9915  }
9916}, Sm = class extends tr {
9917  constructor() {
9918    super(...arguments), this.refreshFunctions = {}, this.userHeaderClasses = /* @__PURE__ */ new Set(), this.ariaDescriptionProperties = /* @__PURE__ */ new Map();
9919  }
9920  setComp(e, t, i, s, o) {
9921    this.comp = e;
9922    const { colResize: n, context: r, colHover: a } = this.beans, l = ls(this, r, o);
9923    this.setGui(t, l), this.updateState(), this.setupWidth(l), this.setupMovingCss(l), this.setupMenuClass(l), this.setupSortableClass(l), this.setupWrapTextClass(), this.refreshSpanHeaderHeight(), this.setupAutoHeight({
9924      wrapperElement: s,
9925      checkMeasuringCallback: (c) => this.setRefreshFunction("measuring", c),
9926      compBean: l
9927    }), this.addColumnHoverListener(l), this.setupFilterClass(l), this.setupClassesFromColDef(), this.setupTooltip(), this.addActiveHeaderMouseListeners(l), this.setupSelectAll(l), this.setupUserComp(), this.refreshAria(), n ? this.resizeFeature = l.createManagedBean(
9928      n.createResizeFeature(this.rowCtrl.pinned, this.column, i, e, this)
9929    ) : Q(i, !1), a?.createHoverFeature(l, [this.column], t), l.createManagedBean(new er(this.column, t, this.beans)), l.createManagedBean(
9930      new xi(t, {
9931        shouldStopEventPropagation: (c) => this.shouldStopEventPropagation(c),
9932        onTabKeyDown: () => null,
9933        handleKeyDown: this.handleKeyDown.bind(this),
9934        onFocusIn: this.onFocusIn.bind(this),
9935        onFocusOut: this.onFocusOut.bind(this)
9936      })
9937    ), this.addResizeAndMoveKeyboardListeners(l), l.addManagedPropertyListeners(
9938      ["suppressMovableColumns", "suppressMenuHide", "suppressAggFuncInHeader"],
9939      () => this.refresh()
9940    ), l.addManagedListeners(this.column, { colDefChanged: () => this.refresh() }), l.addManagedListeners(this.column, { headerHighlightChanged: this.onHeaderHighlightChanged.bind(this) });
9941    const d = () => this.checkDisplayName();
9942    l.addManagedEventListeners({
9943      columnValueChanged: d,
9944      columnRowGroupChanged: d,
9945      columnPivotChanged: d,
9946      headerHeightChanged: this.onHeaderHeightChanged.bind(this)
9947    }), l.addDestroyFunc(() => {
9948      this.refreshFunctions = {}, this.selectAllFeature = null, this.dragSourceElement = void 0, this.userCompDetails = null, this.userHeaderClasses.clear(), this.ariaDescriptionProperties.clear(), this.clearComponent();
9949    });
9950  }
9951  resizeHeader(e, t) {
9952    this.beans.colResize?.resizeHeader(this.column, e, t);
9953  }
9954  setupUserComp() {
9955    const e = this.lookupUserCompDetails();
9956    e && this.setCompDetails(e);
9957  }
9958  setCompDetails(e) {
9959    this.userCompDetails = e, this.comp.setUserCompDetails(e);
9960  }
9961  lookupUserCompDetails() {
9962    const e = this.createParams(), t = this.column.getColDef();
9963    return vp(this.beans.userCompFactory, t, e);
9964  }
9965  createParams() {
9966    const { menuSvc: e, sortSvc: t, colFilter: i, gos: s } = this.beans;
9967    return s.addGridCommonParams({
9968      column: this.column,
9969      displayName: this.displayName,
9970      enableSorting: this.column.isSortable(),
9971      enableMenu: this.menuEnabled,
9972      enableFilterButton: this.openFilterEnabled && !!e?.isHeaderFilterButtonEnabled(this.column),
9973      enableFilterIcon: !!i && (!this.openFilterEnabled || Pe(this.gos)),
9974      showColumnMenu: (n) => {
9975        e?.showColumnMenu({
9976          column: this.column,
9977          buttonElement: n,
9978          positionBy: "button"
9979        });
9980      },
9981      showColumnMenuAfterMouseClick: (n) => {
9982        e?.showColumnMenu({
9983          column: this.column,
9984          mouseEvent: n,
9985          positionBy: "mouse"
9986        });
9987      },
9988      showFilter: (n) => {
9989        e?.showFilterMenu({
9990          column: this.column,
9991          buttonElement: n,
9992          containerType: "columnFilter",
9993          positionBy: "button"
9994        });
9995      },
9996      progressSort: (n) => {
9997        t?.progressSort(this.column, !!n, "uiColumnSorted");
9998      },
9999      setSort: (n, r) => {
10000        t?.setSortForColumn(this.column, n, !!r, "uiColumnSorted");
10001      },
10002      eGridHeader: this.eGui,
10003      setTooltip: (n, r) => {
10004        s.assertModuleRegistered("Tooltip", 3), this.setupTooltip(n, r);
10005      }
10006    });
10007  }
10008  setupSelectAll(e) {
10009    const { selectionSvc: t } = this.beans;
10010    t && (this.selectAllFeature = e.createManagedBean(t.createSelectAllFeature(this.column)), this.selectAllFeature.setComp(this));
10011  }
10012  getSelectAllGui() {
10013    return this.selectAllFeature?.getCheckboxGui();
10014  }
10015  handleKeyDown(e) {
10016    super.handleKeyDown(e), e.key === b.SPACE && this.selectAllFeature?.onSpaceKeyDown(e), e.key === b.ENTER && this.onEnterKeyDown(e), e.key === b.DOWN && e.altKey && this.showMenuOnKeyPress(e, !1);
10017  }
10018  onEnterKeyDown(e) {
10019    e.ctrlKey || e.metaKey ? this.showMenuOnKeyPress(e, !0) : this.sortable && this.beans.sortSvc?.progressSort(this.column, e.shiftKey, "uiColumnSorted");
10020  }
10021  showMenuOnKeyPress(e, t) {
10022    const i = this.comp.getUserCompInstance();
10023    la(i) && i.onMenuKeyboardShortcut(t) && e.preventDefault();
10024  }
10025  onFocusIn(e) {
10026    this.eGui.contains(e.relatedTarget) || (this.focusThis(), this.announceAriaDescription()), Zp() && this.setActiveHeader(!0);
10027  }
10028  onFocusOut(e) {
10029    this.eGui.contains(e.relatedTarget) || this.setActiveHeader(!1);
10030  }
10031  setupTooltip(e, t) {
10032    this.tooltipFeature = this.beans.tooltipSvc?.setupHeaderTooltip(
10033      this.tooltipFeature,
10034      this,
10035      e,
10036      t
10037    );
10038  }
10039  setupClassesFromColDef() {
10040    const e = () => {
10041      const t = this.column.getColDef(), i = dd(t, this.gos, this.column, null), s = this.userHeaderClasses;
10042      this.userHeaderClasses = new Set(i), i.forEach((o) => {
10043        s.has(o) ? s.delete(o) : this.comp.addOrRemoveCssClass(o, !0);
10044      }), s.forEach((o) => this.comp.addOrRemoveCssClass(o, !1));
10045    };
10046    this.setRefreshFunction("headerClasses", e), e();
10047  }
10048  setDragSource(e) {
10049    this.dragSourceElement = e, this.removeDragSource(), !(!e || !this.draggable) && (this.dragSource = this.beans.colMoves?.setDragSourceForHeader(e, this.column, this.displayName) ?? null);
10050  }
10051  updateState() {
10052    const { menuSvc: e } = this.beans;
10053    this.menuEnabled = !!e?.isColumnMenuInHeaderEnabled(this.column), this.openFilterEnabled = !!e?.isFilterMenuInHeaderEnabled(this.column), this.sortable = this.column.isSortable(), this.displayName = this.calculateDisplayName(), this.draggable = this.workOutDraggable();
10054  }
10055  setRefreshFunction(e, t) {
10056    this.refreshFunctions[e] = t;
10057  }
10058  refresh() {
10059    this.updateState(), this.refreshHeaderComp(), this.refreshAria(), Object.values(this.refreshFunctions).forEac
10059h((e) => e());
10060  }
10061  refreshHeaderComp() {
10062    const e = this.lookupUserCompDetails();
10063    if (!e)
10064      return;
10065    (this.comp.getUserCompInstance() != null && this.userCompDetails.componentClass == e.componentClass ? this.attemptHeaderCompRefresh(e.params) : !1) ? this.setDragSource(this.dragSourceElement) : this.setCompDetails(e);
10066  }
10067  attemptHeaderCompRefresh(e) {
10068    const t = this.comp.getUserCompInstance();
10069    return !t || !t.refresh ? !1 : t.refresh(e);
10070  }
10071  calculateDisplayName() {
10072    return this.beans.colNames.getDisplayNameForColumn(this.column, "header", !0);
10073  }
10074  checkDisplayName() {
10075    this.displayName !== this.calculateDisplayName() && this.refresh();
10076  }
10077  workOutDraggable() {
10078    const e = this.column.getColDef();
10079    return !!(!this.gos.get("suppressMovableColumns") && !e.suppressMovable && !e.lockPosition) || !!e.enableRowGroup || !!e.enablePivot;
10080  }
10081  setupWidth(e) {
10082    const t = () => {
10083      const i = this.column.getActualWidth();
10084      this.comp.setWidth(`${i}px`);
10085    };
10086    e.addManagedListeners(this.column, { widthChanged: t }), t();
10087  }
10088  setupMovingCss(e) {
10089    const t = () => {
10090      this.comp.addOrRemoveCssClass("ag-header-cell-moving", this.column.isMoving());
10091    };
10092    e.addManagedListeners(this.column, { movingChanged: t }), t();
10093  }
10094  setupMenuClass(e) {
10095    const t = () => {
10096      this.comp.addOrRemoveCssClass("ag-column-menu-visible", this.column.isMenuVisible());
10097    };
10098    e.addManagedListeners(this.column, { menuVisibleChanged: t }), t();
10099  }
10100  setupSortableClass(e) {
10101    const t = () => {
10102      this.comp.addOrRemoveCssClass("ag-header-cell-sortable", !!this.sortable);
10103    };
10104    t(), this.setRefreshFunction("updateSortable", t), e.addManagedEventListeners({ sortChanged: this.refreshAriaSort.bind(this) });
10105  }
10106  setupFilterClass(e) {
10107    const t = () => {
10108      const i = this.column.isFilterActive();
10109      this.comp.addOrRemoveCssClass("ag-header-cell-filtered", i), this.refreshAria();
10110    };
10111    e.addManagedListeners(this.column, { filterActiveChanged: t }), t();
10112  }
10113  setupWrapTextClass() {
10114    const e = () => {
10115      const t = !!this.column.getColDef().wrapHeaderText;
10116      this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text", t);
10117    };
10118    e(), this.setRefreshFunction("wrapText", e);
10119  }
10120  onHeaderHighlightChanged() {
10121    const e = this.column.getHighlighted(), t = e === 0, i = e === 1;
10122    this.comp.addOrRemoveCssClass("ag-header-highlight-before", t), this.comp.addOrRemoveCssClass("ag-header-highlight-after", i);
10123  }
10124  onDisplayedColumnsChanged() {
10125    super.onDisplayedColumnsChanged(), this.isAlive() && this.onHeaderHeightChanged();
10126  }
10127  onHeaderHeightChanged() {
10128    this.refreshSpanHeaderHeight();
10129  }
10130  refreshSpanHeaderHeight() {
10131    const { eGui: e, column: t, comp: i, beans: s } = this, o = Zn(this.beans), n = o.reduce((c, u) => c += u, 0) === 0;
10132    if (i.addOrRemoveCssClass("ag-header-parent-hidden", n), !t.isSpanHeaderHeight()) {
10133      e.style.removeProperty("top"), e.style.removeProperty("height"), i.addOrRemoveCssClass("ag-header-span-height", !1), i.addOrRemoveCssClass("ag-header-span-total", !1);
10134      return;
10135    }
10136    const { numberOfParents: r, isSpanningTotal: a } = this.column.getColumnGroupPaddingInfo();
10137    i.addOrRemoveCssClass("ag-header-span-height", r > 0);
10138    const l = Xn(s);
10139    if (r === 0) {
10140      i.addOrRemoveCssClass("ag-header-span-total", !1), e.style.setProperty("top", "0px"), e.style.setProperty("height", `${l}px`);
10141      return;
10142    }
10143    i.addOrRemoveCssClass("ag-header-span-total", a);
10144    let d = 0;
10145    for (let c = 0; c < r; c++)
10146      d += o[o.length - 1 - c];
10147    e.style.setProperty("top", `${-d}px`), e.style.setProperty("height", `${l + d}px`);
10148  }
10149  refreshAriaSort() {
10150    if (this.sortable) {
10151      const e = this.getLocaleTextFunc(), t = this.beans.sortSvc?.getDisplaySortForColumn(this.column) || null;
10152      this.comp.setAriaSort(Ph(t)), this.setAriaDescriptionProperty("sort", e("ariaSortableColumn", "Press ENTER to sort"));
10153    } else
10154      this.comp.setAriaSort(), this.setAriaDescriptionProperty("sort", null);
10155  }
10156  refreshAriaMenu() {
10157    if (this.menuEnabled) {
10158      const e = this.getLocaleTextFunc();
10159      this.setAriaDescriptionProperty("menu", e("ariaMenuColumn", "Press ALT DOWN to open column menu"));
10160    } else
10161      this.setAriaDescriptionProperty("menu", null);
10162  }
10163  refreshAriaFilterButton() {
10164    if (this.openFilterEnabled && !Pe(this.gos)) {
10165      const e = this.getLocaleTextFunc();
10166      this.setAriaDescriptionProperty(
10167        "filterButton",
10168        e("ariaFilterColumn", "Press CTRL ENTER to open filter")
10169      );
10170    } else
10171      this.setAriaDescriptionProperty("filterButton", null);
10172  }
10173  refreshAriaFiltered() {
10174    const e = this.getLocaleTextFunc();
10175    this.column.isFilterActive() ? this.setAriaDescriptionProperty("filter", e("ariaColumnFiltered", "Column Filtered")) : this.setAriaDescriptionProperty("filter", null);
10176  }
10177  setAriaDescriptionProperty(e, t) {
10178    t != null ? this.ariaDescriptionProperties.set(e, t) : this.ariaDescriptionProperties.delete(e);
10179  }
10180  announceAriaDescription() {
10181    if (!this.eGui.contains(Z(this.beans)))
10182      return;
10183    const e = Array.from(this.ariaDescriptionProperties.keys()).sort((t, i) =>
10183 t === "filter" ? -1 : i.charCodeAt(0) - t.charCodeAt(0)).map((t) => this.ariaDescriptionProperties.get(t)).join(". ");
10184    this.beans.ariaAnnounce?.announceValue(e, "columnHeader");
10185  }
10186  refreshAria() {
10187    this.refreshAriaSort(), this.refreshAriaMenu(), this.refreshAriaFilterButton(), this.refreshAriaFiltered();
10188  }
10189  addColumnHoverListener(e) {
10190    this.beans.colHover?.addHeaderColumnHoverListener(e, this.comp, this.column);
10191  }
10192  addActiveHeaderMouseListeners(e) {
10193    const t = (o) => this.handleMouseOverChange(o.type === "mouseenter"), i = () => this.dispatchColumnMouseEvent("columnHeaderClicked", this.column), s = (o) => this.handleContextMenuMouseEvent(o, void 0, this.column);
10194    e.addManagedListeners(this.eGui, {
10195      mouseenter: t,
10196      mouseleave: t,
10197      click: i,
10198      contextmenu: s
10199    });
10200  }
10201  handleMouseOverChange(e) {
10202    this.setActiveHeader(e), this.eventSvc.dispatchEvent({
10203      type: e ? "columnHeaderMouseOver" : "columnHeaderMouseLeave",
10204      column: this.column
10205    });
10206  }
10207  setActiveHeader(e) {
10208    this.comp.addOrRemoveCssClass("ag-header-active", e);
10209  }
10210  getAnchorElementForMenu(e) {
10211    const t = this.comp.getUserCompInstance();
10212    return la(t) ? t.getAnchorElementForMenu(e) : this.eGui;
10213  }
10214  destroy() {
10215    this.tooltipFeature = this.destroyBean(this.tooltipFeature), super.destroy();
10216  }
10217};
10218function la(e) {
10219  return typeof e.getAnchorElementForMenu == "function" && typeof e.onMenuKeyboardShortcut == "function";
10220}
10221var bm = 0, Do = class extends y {
10222  constructor(e, t, i) {
10223    super(), this.rowIndex = e, this.pinned = t, this.type = i, this.instanceId = bm++;
10224    const s = i == "group" ? "ag-header-row-column-group" : i == "filter" ? "ag-header-row-column-filter" : "ag-header-row-column";
10225    this.headerRowClass = `ag-header-row ${s}`;
10226  }
10227  postConstruct() {
10228    this.isPrintLayout = de(this.gos, "print"), this.isEnsureDomOrder = this.gos.get("ensureDomOrder");
10229  }
10230  /** Checks that every header cell that is currently visible has been rendered.
10231   * Can only be false under some circumstances when using React
10232   */
10233  areCellsRendered() {
10234    return this.comp ? this.getHeaderCellCtrls().every((e) => e.eGui != null) : !1;
10235  }
10236  /**
10237   *
10238   * @param comp Proxy to the actual component
10239   * @param initCompState Should the component be initialised with the current state of the controller. Default: true
10240   */
10241  setComp(e, t, i = !0) {
10242    this.comp = e, t = ls(this, this.beans.context, t), i && (this.onRowHeightChanged(), this.onVirtualColumnsChanged()), this.setWidth(), this.addEventListeners(t);
10243  }
10244  getAriaRowIndex() {
10245    return this.rowIndex + 1;
10246  }
10247  addEventListeners(e) {
10248    const t = this.onRowHeightChanged.bind(this);
10249    e.addManagedEventListeners({
10250      columnResized: this.setWidth.bind(this),
10251      displayedColumnsChanged: this.onDisplayedColumnsChanged.bind(this),
10252      virtualColumnsChanged: (i) => this.onVirtualColumnsChanged(i.afterScroll),
10253      columnGroupHeaderHeightChanged: t,
10254      columnHeaderHeightChanged: t,
10255      gridStylesChanged: t,
10256      advancedFilterEnabledChanged: t
10257    }), e.addManagedPropertyListener("domLayout", this.onDisplayedColumnsChanged.bind(this)), e.addManagedPropertyListener("ensureDomOrder", (i) => this.isEnsureDomOrder = i.currentValue), e.addManagedPropertyListeners(
10258      [
10259        "headerHeight",
10260        "pivotHeaderHeight",
10261        "groupHeaderHeight",
10262        "pivotGroupHeaderHeight",
10263        "floatingFiltersHeight"
10264      ],
10265      t
10266    );
10267  }
10268  getHeaderCellCtrl(e) {
10269    if (this.headerCellCtrls) {
10270      for (const t of this.headerCellCtrls.values())
10271        if (t.column === e)
10272          return t;
10273    }
10274  }
10275  onDisplayedColumnsChanged() {
10276    this.isPrintLayout = de(this.gos, "print"), this.onVirtualColumnsChanged(), this.setWidth(), this.onRowHeightChanged();
10277  }
10278  setWidth() {
10279    const e = this.getWidthForRow();
10280    this.comp.setWidth(`${e}px`);
10281  }
10282  getWidthForRow() {
10283    const { visibleCols: e } = this.beans;
10284    return this.isPrintLayout ? this.pinned != null ? 0 : e.getContainerWidth("right") + e.getContainerWidth("left") + e.getContainerWidth(null) : e.getContainerWidth(this.pinned);
10285  }
10286  onRowHeightChanged() {
10287    const { topOffset: e, rowHeight: t } = this.getTopAndHeight();
10288    this.comp.setTop(e + "px"), this.comp.setHeight(t + "px");
10289  }
10290  getTopAndHeight() {
10291    const { filterManager: e } = this.beans, t = [], i = Zn(this.beans), s = Xn(this.beans);
10292    t.push(...i), t.push(s), e?.hasFloatingFilters() && t.push(Td(this.beans));
10293    let o = 0;
10294    for (let r = 0; r < this.rowIndex; r++)
10295      o += t[r];
10296    const n = t[this.rowIndex];
10297    return { topOffset: o, rowHeight: n };
10298  }
10299  onVirtualColumnsChanged(e = !1) {
10300    const t = this.getHeaderCtrls(), i = this.isEnsureDomOrder || this.isPrintLayout;
10301    this.comp.setHeaderCtrls(t, i, e);
10302  }
10303  getHeaderCtrls() {
10304    const e = this.headerCellCtrls;
10305    this.headerCellCtrls = /* @__PURE__ */ new Map();
10306    const t = this.getColumnsInViewport();
10307    for (const s of t)
10308      this.recycleAndCreateHeaderCtrls(s, e);
10309    const i = (s) => {
10310      const { focusSvc: o, visibleCols: n } = this.beans;
10311      return o.isHeaderWrapperFocused(s) ? n.isVisible(s.column) : !1;
10312    };
10313    if (e)
10314      for (const [s, o] of e)
10315        i(o) ? this.headerCellCtrls.set(s, o) : this.destroyBean(o);
10316    return this.getHeaderCellCtrls();
10317  }
10318  getHeaderCellCtrls() {
10319    return Array.from(this.headerCellCtrls?.values() ?? []);
10320  }
10321  recycleAndCreateHeaderCtrls(e, t) {
10322    if (!this.headerCellCtrls || e.isEmptyGroup())
10323      return;
10324    const i = e.getUniqueId();
10325    let s;
10326    if (t && (s = t.get(i), t.delete(i)), s && s.column != e && (this.destroyBean(s), s = void 0), s == null)
10327      switch (this.type) {
10328        case "filter": {
10329          s = this.createBean(
10330            this.beans.registry.createDynamicBean(
10331              "headerFilterCellCtrl",
10332              !0,
10333              e,
10334              this
10335            )
10336          );
10337          break;
10338        }
10339        case "group":
10340          s = this.createBean(
10341            this.beans.registry.createDynamicBean(
10342              "headerGroupCellCtrl",
10343              !0,
10344              e,
10345              this
10346            )
10347          );
10348          break;
10349        default:
10350          s = this.createBean(new Sm(e, this));
10351          break;
10352      }
10353    this.headerCellCtrls.set(i, s);
10354  }
10355  getColumnsInViewport() {
10356    return this.isPrintLayout ? this.getColumnsInViewportPrintLayout() : this.getColumnsInViewportNormalLayout();
10357  }
10358  getColumnsInViewportPrintLayout() {
10359    if (this.pinned != null)
10360      return [];
10361    let e = [];
10362    const t = this.getActualDepth(), { colViewport: i } = this.beans;
10363    return ["left", null, "right"].forEach((s) => {
10364      const o = i.getHeadersToRender(s, t);
10365      e = e.concat(o);
10366    }), e;
10367  }
10368  getActualDepth() {
10369    return this.type == "filter" ? this.rowIndex - 1 : this.rowIndex;
10370  }
10371  getColumnsInViewportNormalLayout() {
10372    return this.beans.colViewport.getHeadersToRender(this.pinned, this.getActualDepth());
10373  }
10374  findHeaderCellCtrl(e) {
10375    if (!this.headerCellCtrls)
10376      return;
10377    const t = this.getHeaderCellCtrls();
10378    let i;
10379    return typeof e == "function" ? i = t.find(e) : i = t.find((s) => s.column == e), i;
10380  }
10381  focusHeader(e, t) {
10382    const i = this.findHeaderCellCtrl(e);
10383    return i ? i.focus(t) : !1;
10384  }
10385  destroy() {
10386    this.headerCellCtrls?.forEach((e) => {
10387      this.destroyBean(e);
10388    }), this.headerCellCtrls = void 0, super.destroy();
10389  }
10390}, ym = class extends y {
10391  constructor(e) {
10392    super(), this.pinned = e, this.hidden = !1, this.includeFloatingFilter = !1, this.groupsRowCtrls = [];
10393  }
10394  setComp(e, t) {
10395    this.comp = e, this.eViewport = t;
10396    const { pinnedCols: i, ctrlsSvc: s, colModel: o, colMoves: n, filterManager: r } = this.beans;
10397    this.setupCenterWidth(), i?.setupHeaderPinnedWidth(this), this.setupDragAndDrop(n, this.eViewport);
10398    const a = this.onDisplayedColumnsChanged.bind(this, r);
10399    this.addManagedEventListeners({
10400      gridColumnsChanged: this.onGridColumnsChanged.bind(this),
10401      displayedColumnsChanged: a,
10402      advancedFilterEnabledChanged: a
10403    });
10404    const l = `${typeof this.pinned == "string" ? this.pinned : "center"}Header`;
10405    s.register(l, this), o.ready && this.refresh();
10406  }
10407  getAllCtrls() {
10408    const e = [...this.groupsRowCtrls];
10409    return this.columnsRowCtrl && e.push(this.columnsRowCtrl), this.filtersRowCtrl && e.push(this.filtersRowCtrl), e;
10410  }
10411  refresh(e = !1) {
10412    const { focusSvc: t, colModel: i, filterManager: s } = this.beans;
10413    let o = 0;
10414    const n = t.getFocusHeaderToUseAfterRefresh(), r = () => {
10415      const c = cm(i) - 1;
10416      this.groupsRowCtrls = this.destroyBeans(this.groupsRowCtrls);
10417      for (let u = 0; u < c; u++) {
10418        const h = this.createBean(new Do(o++, this.pinned, "group"));
10419        this.groupsRowCtrls.push(h);
10420      }
10421    }, a = () => {
10422      const c = o++, u = !this.hidden && (this.columnsRowCtrl == null || !e || this.columnsRowCtrl.rowIndex !== c);
10423      (u || this.hidden) && (this.columnsRowCtrl = this.destroyBean(this.columnsRowCtrl)), u && (this.columnsRowCtrl = this.createBean(new Do(c, this.pinned, "column")));
10424    }, l = () => {
10425      this.includeFloatingFilter = !!s?.hasFloatingFilters() && !this.hidden;
10426      const c = () => {
10427        this.filtersRowCtrl = this.destroyBean(this.filtersRowCtrl);
10428      };
10429      if (!this.includeFloatingFilter) {
10430        c();
10431        return;
10432      }
10433      const u = o++;
10434      if (this.filtersRowCtrl) {
10435        const h = this.filtersRowCtrl.rowIndex !== u;
10436        (!e || h) && c();
10437      }
10438      this.filtersRowCtrl || (this.filtersRowCtrl = this.createBean(new Do(u, this.pinned, "filter")));
10439    };
10440    r(), a(), l();
10441    const d = this.getAllCtrls();
10442    this.comp.setCtrls(d), this.restoreFocusOnHeader(t, n);
10443  }
10444  getHeaderCtrlForColumn(e) {
10445    if (yt(e))
10446      return this.columnsRowCtrl?.getHeaderCellCtrl(e);
10447    if (this.groupsRowCtrls.length !== 0)
10448      for (let t = 0; t < this.groupsRowCtrls.length; t++) {
10449        const i = this.groupsRowCtrls[t].getHeaderCellCtrl(e);
10450        if (i)
10451          return i;
10452      }
10453  }
10454  getHtmlElementForColumnHeader(e) {
10455    return this.getHeaderCtrlForColumn(e)?.eGui ?? null;
10456  }
10457  getRowType(e) {
10458    return this.getAllCtrls()[e]?.type;
10459  }
10460  focusHeader(e, t, i) {
10461    const o = this.getAllCtrls()[e];
10462    return o ? o.focusHeader(t, i) : !1;
10463  }
10464  getGroupRowCount() {
10465    return this.groupsRowCtrls.length;
10466  }
10467  getGroupRowCtrlAtIndex(e) {
10468    return this.groupsRowCtrls[e];
10469  }
10470  getRowCount() {
10471    return this.groupsRowCtrls.length + (this.columnsRowCtrl ? 1 : 0) + (this.filtersRowCtrl ? 1 : 0);
10472  }
10473  setHorizontalScroll(e) {
10474    this.comp.setViewportScrollLeft(e);
10475  }
10476  onScrollCallback(e) {
10477    this.addManagedElementListeners(this.eViewport, { scroll: e });
10478  }
10479  destroy() {
10480    this.filtersRowCtrl = this.destroyBean(this.filtersRowCtrl), this.columnsRowCtrl = this.destroyBean(this.columnsRowCtrl), this.groupsRowCtrls = this.destroyBeans(this.groupsRowCtrls), super.destroy();
10481  }
10482  setupDragAndDrop(e, t) {
10483    const i = e?.createBodyDropTarget(this.pinned, t);
10484    i && this.createManagedBean(i);
10485  }
10486  restoreFocusOnHeader(e, t) {
10487    if (!t)
10488      return;
10489    const { column: i } = t;
10490    i.getPinned() == this.pinned && e.focusHeaderPosition({ headerPosition: t });
10491  }
10492  // grid cols have changed - this also means the number of rows in the header can have
10493  // changed. so we remove all the old rows and insert new ones for a complete refresh
10494  onGridColumnsChanged() {
10495    this.refresh(!0);
10496  }
10497  onDisplayedColumnsChanged(e) {
10498    const t = !!e?.hasFloatingFilters() && !this.hidden;
10499    this.includeFloatingFilter !== t && this.refresh(!0);
10500  }
10501  setupCenterWidth() {
10502    this.pinned == null && this.createManagedBean(new Yn((e) => this.comp.setCenterWidth(`${e}px`), !0));
10503  }
10504}, Rm = class extends y {
10505  constructor() {
10506    super(...arguments), this.beanName = "menuSvc";
10507  }
10508  postConstruct() {
10509    const { enterpriseMenuFactory: e, filterMenuFactory: t } = this.beans;
10510    this.activeMenuFactory = e ?? t;
10511  }
10512  showColumnMenu(e) {
10513    this.showColumnMenuCommon(this.activeMenuFactory, e, "columnMenu");
10514  }
10515  showFilterMenu(e) {
10516    const { enterpriseMenuFactory: t, filterMenuFactory: i } = this.beans, s = t && Pe(this.gos) ? t : i;
10517    this.showColumnMenuCommon(s, e, e.containerType, !0);
10518  }
10519  showHeaderContextMenu(e, t, i) {
10520    this.activeMenuFactory?.showMenuAfterContextMenuEvent(e, t, i);
10521  }
10522  hidePopupMenu() {
10523    this.beans.contextMenuSvc?.hideActiveMenu(), this.activeMenuFactory?.hideActiveMenu();
10524  }
10525  isColumnMenuInHeaderEnabled(e) {
10526    const { suppressHeaderMenuButton: t } = e.getColDef();
10527    return !t && !!this.activeMenuFactory?.isMenuEnabled(e) && (Pe(this.gos) || !!this.beans.enterpriseMenuFactory);
10528  }
10529  isFilterMenuInHeaderEnabled(e) {
10530    return !e.getColDef().suppressHeaderFilterButton && !!this.beans.filterManager?.isFilterAllowed(e);
10531  }
10532  isHeaderContextMenuEnabled(e) {
10533    return !(e && yt(e) ? e.getColDef() : e?.getColGroupDef())?.suppressHeaderContextMenu && this.gos.get("columnMenu") === "new";
10534  }
10535  isHeaderMenuButtonAlwaysShowEnabled() {
10536    return this.isSuppressMenuHide();
10537  }
10538  isHeaderMenuButtonEnabled() {
10539    const e = !this.isSuppressMenuHide();
10540    return !(Tt() && e);
10541  }
10542  isHeaderFilterButtonEnabled(e) {
10543    return this.isFilterMenuInHeaderEnabled(e) && !Pe(this.gos) && !this.isFloatingFilterButtonDisplayed(e);
10544  }
10545  isFilterMenuItemEnabled(e) {
10546    return !!this.beans.filterManager?.isFilterAllowed(e) && !Pe(this.gos) && !this.isFilterMenuInHeaderEnabled(e) && !this.isFloatingFilterButtonDisplayed(e);
10547  }
10548  isFloatingFilterButtonEnabled(e) {
10549    return !e.getColDef().suppressFloatingFilterButton;
10550  }
10551  isFloatingFilterButtonDisplayed(e) {
10552    return !!e.getColDef().floatingFilter && this.isFloatingFilterButtonEnabled(e);
10553  }
10554  isSuppressMenuHide() {
10555    const e = this.gos, t = e.get("suppressMenuHide");
10556    return Pe(e) ? e.exists("suppressMenuHide") ? t : !1 : t;
10557  }
10558  showColumnMenuCommon(e, t, i, s) {
10559    const { positionBy: o } = t, n = t.column;
10560    if (o === "button") {
10561      const { buttonElement: r } = t;
10562      e?.showMenuAfterButtonClick(n, r, i, s);
10563    } else if (o === "mouse") {
10564      const { mouseEvent: r } = t;
10565      e?.showMenuAfterMouseEvent(n, r, i, s);
10566    } else if (n) {
10567      const r = this.beans, a = r.ctrlsSvc;
10568      a.getScrollFeature().ensureColumnVisible(n, "auto"), Ft(r, () => {
10569        const l = a.getHeaderRowContainerCtrl(n.getPinned())?.getHeaderCtrlForColumn(n);
10570        l && e?.showMenuAfterButtonClick(
10571          n,
10572          l.getAnchorElementForMenu(s),
10573          i,
10574          !0
10575        );
10576      });
10577    }
10578  }
10579};
10580function da(e, t, i) {
10581  e.menuVisible !== t && (e.menuVisible = t, e.dispatchColEvent("menuVisibleChanged", i));
10582}
10583var kd = class extends _ {
10584  constructor() {
10585    super();
10586  }
10587}, Fm = class extends kd {
10588  init() {
10589    const e = ot(this.gos.get("overlayLoadingTemplate")?.trim());
10590    if (this.setTemplate(
10591      e ?? /* html */
10592      '<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>'
10593    ), !e) {
10594      const t = this.getLocaleTextFunc();
10595      setTimeout(() => {
10596        this.getGui().textContent = t("loadingOoo", "Loading...");
10597      });
10598    }
10599  }
10600}, xm = class extends kd {
10601  init() {
10602    const e = ot(this.gos.get("overlayNoRowsTemplate")?.trim());
10603    if (this.setTemplate(e ?? /* html */
10604    '<span class="ag-overlay-no-rows-center"></span>'), !e) {
10605      const t = this.getLocaleTextFunc();
10606      setTimeout(() => {
10607        this.getGui().textContent = t("noRowsToShow", "No Rows To Show");
10608      });
10609    }
10610  }
10611};
10612function Pm(e, t, i) {
10613  const s = Te(e, t, i);
10614  if (s) {
10615    const { className: n } = s;
10616    if (typeof n == "string" && n.indexOf("ag-icon") > -1 || typeof n == "object" && n["ag-icon"])
10617      return s;
10618  }
10619  const o = document.createElement("span");
10620  return o.appendChild(s), o;
10621}
10622function Te(e, t, i) {
10623  let s = null;
10624  e === "smallDown" ? x(262) : e === "smallLeft" ? x(263) : e === "smallRight" && x(264);
10625  const o = i && i.getColDef().icons;
10626  if (o && (s = o[e]), t.gos && !s) {
10627    const n = t.gos.get("icons");
10628    n && (s = n[e]);
10629  }
10630  if (s) {
10631    let n;
10632    if (typeof s == "function")
10633      n = s();
10634    else if (typeof s == "string")
10635      n = s;
10636    else {
10637      x(38, { iconName: e });
10638      return;
10639    }
10640    if (typeof n == "string")
10641      return Qi(n);
10642    if (Bn(n))
10643      return n;
10644    x(133, { iconName: e });
10645    return;
10646  } else {
10647    const n = document.createElement("span"), r = t.registry.getIcon(e);
10648    r || t.validation?.validateIcon(e);
10649    const a = r ?? e;
10650    return n.setAttribute("class", `ag-icon ag-icon-${a}`), n.setAttribute("unselectable", "on"), ve(n, "presentation"), n;
10651  }
10652}
10653var Em = (
10654  /*css*/
10655  ".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}"
10656), Dm = class extends _ {
10657  constructor() {
10658    super(), this.dragSource = null, this.eIcon = M, this.eLabel = M, this.registerCSS(Em);
10659  }
10660  postConstruct() {
10661    const e = (t) => Pm(t, this.beans, null);
10662    this.dropIconMap = {
10663      pinned: e("columnMovePin"),
10664      hide: e("columnMoveHide"),
10665      move: e("columnMoveMove"),
10666      left: e("columnMoveLeft"),
10667      right: e("columnMoveRight"),
10668      group: e("columnMoveGroup"),
10669      aggregate: e("columnMoveValue"),
10670      pivot: e("columnMovePivot"),
10671      notAllowed: e("dropNotAllowed")
10672    };
10673  }
10674  init(e) {
10675    this.dragSource = e.dragSource, this.setTemplate(
10676      /* html */
10677      `<div class="ag-dnd-ghost ag-unselectable">
10678                <span data-ref="eIcon" class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
10679                <div data-ref="eLabel" class="ag-dnd-ghost-label"></div>
10680            </div>`
10681    );
10682  }
10683  destroy() {
10684    this.dragSource = null, super.destroy();
10685  }
10686  setIcon(e, t) {
10687    const { eIcon: i, dragSource: s, dropIconMap: o, gos: n } = this;
10688    ue(i);
10689    let r = null;
10690    e || (e = s?.getDefaultIconName ? s.getDefaultIconName() : "notAllowed"), r = o[e], i.classList.toggle("ag-shake-left-to-right", t), !(r === o.hide && n.get("suppressDragLeaveHidesColumns")) && r && i.appendChild(r);
10691  }
10692  setLabel(e) {
10693    this.eLabel.textContent = Ze(e);
10694  }
10695}, Am = (
10696  /*css*/
10697  ".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}"
10698), Tm = class extends _ {
10699  constructor(e, t, i) {
10700    super(t, i), this.labelSeparator = "", this.labelAlignment = "left", this.disabled = !1, this.label = "", this.config = e || {}, this.registerCSS(Am);
10701  }
10702  postConstruct() {
10703    this.addCssClass("ag-labeled"), this.eLabel.classList.add("ag-label");
10704    const { labelSeparator: e, label: t, labelWidth: i, labelAlignment: s, disabled: o } = this.config;
10705    o != null && this.setDisabled(o), e != null && this.setLabelSeparator(e), t != null && this.setLabel(t), i != null && this.setLabelWidth(i), this.setLabelAlignment(s || this.labelAlignment), this.refreshLabel();
10706  }
10707  refreshLabel() {
10708    const { label: e, eLabel: t } = this;
10709    ue(t), typeof e == "string" ? t.innerText = e + this.labelSeparator : e && t.appendChild(e), e === "" ? (Q(t, !1), ve(t, "presentation")) : (Q(t, !0), ve(t, null));
10710  }
10711  setLabelSeparator(e) {
10712    return this.labelSeparator === e ? this : (this.labelSeparator = e, this.label != null && this.refreshLabel(), this);
10713  }
10714  getLabelId() {
10715    const e = this.eLabel;
10716    return e.id = e.id || `ag-${this.getCompId()}-label`, e.id;
10717  }
10718  getLabel() {
10719    return this.label;
10720  }
10721  setLabel(e) {
10722    return this.label === e ? this : (this.label = e, this.refreshLabel(), this);
10723  }
10724  setLabelAlignment(e) {
10725    const i = this.getGui().classList;
10726    return i.toggle("ag-label-align-left", e === "left"), i.toggle("ag-label-align-right", e === "right"), i.toggle("ag-label-align-top", e === "top"), this;
10727  }
10728  setLabelEllipsis(e) {
10729    return this.eLabel.classList.toggle("ag-label-ellipsis", e), this;
10730  }
10731  setLabelWidth(e) {
10732    return this.label == null ? this : (ks(this.eLabel, e), this);
10733  }
10734  setDisabled(e) {
10735    e = !!e;
10736    const t = this.getGui();
10737    return qi(t, e), t.classList.toggle("ag-disabled", e), this.disabled = e, this;
10738  }
10739  isDisabled() {
10740    return !!this.disabled;
10741  }
10742}, Ld = class extends Tm {
10743  constructor(e, t, i, s) {
10744    super(e, t, i), this.className = s;
10745  }
10746  postConstruct() {
10747    super.postConstruct();
10748    const { width: e, value: t, onValueChange: i } = this.config;
10749    e != null && this.setWidth(e), t != null && this.setValue(t), i != null && this.onValueChange(i), this.className && this.addCssClass(this.className), this.refreshAriaLabelledBy();
10750  }
10751  setLabel(e) {
10752    return super.setLabel(e), this.refreshAriaLabelledBy(), this;
10753  }
10754  refreshAriaLabelledBy() {
10755    const e = this.getAriaElement(), t = this.getLabelId(), i = this.getLabel();
10756    i == null || i == "" || Eh(e) !== null ? Ko(e, "") : Ko(e, t ?? "");
10757  }
10758  setAriaLabel(e) {
10759    return Zs(this.getAriaElement(), e), this.refreshAriaLabelledBy(), this;
10760  }
10761  onValueChange(e) {
10762    return this.addManagedListeners(this, { fieldValueChanged: () => e(this.getValue()) }), this;
10763  }
10764  getWidth() {
10765    return this.getGui().clientWidth;
10766  }
10767  setWidth(e) {
10768    return Ye(this.getGui(), e), this;
10769  }
10770  getPreviousValue() {
10771    return this.previousValue;
10772  }
10773  getValue() {
10774    return this.value;
10775  }
10776  setValue(e, t) {
10777    return this.value === e ? this : (this.previousValue = this.value, this.value = e, t || this.dispatchLocalEvent({ type: "fieldValueChanged" }), this);
10778  }
10779}, At = class extends Ld {
10780  constructor(e, t, i = "text", s = "input") {
10781    super(
10782      e,
10783      e?.template ?? /* html */
10784      `
10785            <div role="presentation">
10786                <div data-ref="eLabel" class="ag-input-field-label"></div>
10787                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
10788                    <${s} data-ref="eInput" class="ag-input-field-input"></${s}>
10789                </div>
10790            </div>`,
10791      [],
10792      t
10793    ), this.inputType = i, this.displayFieldTag = s, this.eLabel = M, this.eWrapper = M, this.eInput = M;
10794  }
10795  postConstruct() {
10796    super.postConstruct(), this.setInputType();
10797    const { eLabel: e, eWrapper: t, eInput: i, className: s } = this;
10798    e.classList.add(`${s}-label`), t.classList.add(`${s}-input-wrapper`), i.classList.add(`${s}-input`), this.addCssClass("ag-input-field"), i.id = i.id || `ag-${this.getCompId()}-input`;
10799    const { inputName: o, inputWidth: n } = this.config;
10800    o != null && this.setInputName(o), n != null && this.setInputWidth(n), this.addInputListeners(), this.activateTabIndex([i]);
10801  }
10802  addInputListeners() {
10803    this.addManagedElementListeners(this.eInput, { input: (e) => this.setValue(e.target.value) });
10804  }
10805  setInputType() {
10806    this.displayFieldTag === "input" && this.eInput.setAttribute("type", this.inputType);
10807  }
10808  getInputElement() {
10809    return this.eInput;
10810  }
10811  setInputWidth(e) {
10812    return ks(this.eWrapper, e), this;
10813  }
10814  setInputName(e) {
10815    return this.getInputElement().setAttribute("name", e), this;
10816  }
10817  getFocusableElement() {
10818    return this.eInput;
10819  }
10820  setMaxLength(e) {
10821    const t = this.eInput;
10822    return t.maxLength = e, this;
10823  }
10824  setInputPlaceholder(e) {
10825    return Ie(this.eInput, "placeholder", e), this;
10826  }
10827  setInputAriaLabel(e) {
10828    return Zs(this.eInput, e), this.refreshAriaLabelledBy(), this;
10829  }
10830  setDisabled(e) {
10831    return qi(this.eInput, e), super.setDisabled(e);
10832  }
10833  setAutoComplete(e) {
10834    if (e === !0)
10835      Ie(this.eInput, "autocomplete", null);
10836    else {
10837      const t = typeof e == "string" ? e : "off";
10838      Ie(this.eInput, "autocomplete", t);
10839    }
10840    return this;
10841  }
10842}, ir = class extends At {
10843  constructor(e, t = "ag-checkbox", i = "checkbox") {
10844    super(e, t, i), this.labelAlignment = "right", this.selected = !1, this.readOnly = !1, this.passive = !1;
10845  }
10846  postConstruct() {
10847    super.postConstruct();
10848    const { readOnly: e, passive: t } = this.config;
10849    typeof e == "boolean" && this.setReadOnly(e), typeof t == "boolean" && this.setPassive(t);
10850  }
10851  addInputListeners() {
10852    this.addManagedElementListeners(this.eInput, { click: this.onCheckboxClick.bind(this) }), this.addManagedElementListeners(this.eLabel, { click: this.toggle.bind(this) });
10853  }
10854  getNextValue() {
10855    return this.selected === void 0 ? !0 : !this.selected;
10856  }
10857  setPassive(e) {
10858    this.passive = e;
10859  }
10860  isReadOnly() {
10861    return this.readOnly;
10862  }
10863  setReadOnly(e) {
10864    this.eWrapper.classList.toggle("ag-disabled", e), this.eInput.disabled = e, this.readOnly = e;
10865  }
10866  setDisabled(e) {
10867    return this.eWrapper.classList.toggle("ag-disabled", e), super.setDisabled(e);
10868  }
10869  toggle() {
10870    if (this.eInput.disabled)
10871      return;
10872    const e = this.isSelected(), t = this.getNextValue();
10873    this.passive ? this.dispatchChange(t, e) : this.setValue(t);
10874  }
10875  getValue() {
10876    return this.isSelected();
10877  }
10878  setValue(e, t) {
10879    return this.refreshSelectedClass(e), this.setSelected(e, t), this;
10880  }
10881  setName(e) {
10882    const t = this.getInputElement();
10883    return t.name = e, this;
10884  }
10885  isSelected() {
10886    return this.selected;
10887  }
10888  setSelected(e, t) {
10889    if (this.isSelected() === e)
10890      return;
10891    this.previousValue = this.isSelected(), e = this.selected = typeof e == "boolean" ? e : void 0;
10892    const i = this.eInput;
10893    i.checked = e, i.indeterminate = e === void 0, t || this.dispatchChange(this.selected, this.previousValue);
10894  }
10895  dispatchChange(e, t, i) {
10896    this.dispatchLocalEvent({ type: "fieldValueChanged", selected: e, previousValue: t, event: i });
10897    const s = this.getInputElement();
10898    this.eventSvc.dispatchEvent({
10899      type: "checkboxChanged",
10900      id: s.id,
10901      name: s.name,
10902      selected: e,
10903      previousValue: t
10904    });
10905  }
10906  onCheckboxClick(e) {
10907    if (this.passive || this.eInput.disabled)
10908      return;
10909    const t = this.isSelected(), i = this.selected = e.target.checked;
10910    this.refreshSelectedClass(i), this.dispatchChange(i, t, e);
10911  }
10912  refreshSelectedClass(e) {
10913    const t = this.eWrapper.classList;
10914    t.toggle("ag-checked", e === !0), t.toggle("ag-indeterminate", e == null);
10915  }
10916}, sr = {
10917  selector: "AG-CHECKBOX",
10918  component: ir
10919}, Mm = (
10920  /*css*/
10921  ".ag-checkbox-cell{height:100%}"
10922), Im = class extends _ {
10923  constructor() {
10924    super(
10925      /* html*/
10926      `
10927            <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
10928                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
10929            </div>`,
10930      [sr]
10931    ), this.eCheckbox = M, this.registerCSS(Mm);
10932  }
10933  init(e) {
10934    this.refresh(e);
10935    const { eCheckbox: t, beans: i } = this, s = t.getInputElement();
10936    s.setAttribute("tabindex", "-1"), ll(s, "polite"), this.addManagedListeners(s, {
10937      click: (o) => {
10938        if (mi(o), t.isDisabled())
10939          return;
10940        const n = t.getValue();
10941        this.onCheckboxChanged(n);
10942      },
10943      dblclick: (o) => {
10944        mi(o);
10945      }
10946    }), this.addManagedElementListeners(e.eGridCell, {
10947      keydown: (o) => {
10948        if (o.key === b.SPACE && !t.isDisabled()) {
10949          e.eGridCell === Z(i) && t.toggle();
10950          const n = t.getValue();
10951          this.onCheckboxChanged(n), o.preventDefault();
10952        }
10953      }
10954    });
10955  }
10956  refresh(e) {
10957    return this.params = e, this.updateCheckbox(e), !0;
10958  }
10959  updateCheckbox(e) {
10960    let t, i = !0;
10961    const { value: s, column: o, node: n } = e;
10962    if (n.group && o)
10963      if (typeof s == "boolean")
10964        t = s;
10965      else {
10966        const u = o.getColId();
10967        u.startsWith(Js) ? t = s == null || s === "" ? void 0 : s === "true" : n.aggData && n.aggData[u] !== void 0 ? t = s ?? void 0 : i = !1;
10968      }
10969    else
10970      t = s ?? void 0;
10971    const { eCheckbox: r } = this;
10972    if (!i) {
10973      r.setDisplayed(!1);
10974      return;
10975    }
10976    r.setValue(t);
10977    const a = e.disabled ?? !o?.isCellEditable(n);
10978    r.setDisabled(a);
10979    const l = this.getLocaleTextFunc(), d = Ln(l, t), c = a ? d : `${l("ariaToggleCellValue", "Press SPACE to toggle cell value")} (${d})`;
10980    r.setInputAriaLabel(c);
10981  }
10982  onCheckboxChanged(e) {
10983    const { eventSvc: t, params: i } = this, { column: s, node: o, value: n } = i, r = {
10984      column: s,
10985      colDef: s.getColDef(),
10986      data: o.data,
10987      node: o,
10988      rowIndex: o.rowIndex,
10989      rowPinned: o.rowPinned,
10990      value: n
10991    };
10992    t.dispatchEvent({
10993      type: "cellEditingStarted",
10994      ...r
10995    });
10996    const a = o.setDataValue(s, e, "edit");
10997    t.dispatchEvent({
10998      type: "cellEditingStopped",
10999      ...r,
11000      oldValue: n,
11001      newValue: e,
11002      valueChanged: a
11003    }), a || this.updateCheckbox(i);
11004  }
11005}, km = "ROOT_NODE_ID", Lm = class extends y {
11006  constructor() {
11007    super(...arguments), this.nextId = 0, this.allNodesMap = {}, this.rootNode = null;
11008  }
11009  get treeData() {
11010    return !1;
11011  }
11012  getRowNode(e) {
11013    return this.allNodesMap[e];
11014  }
11015  extractRowData() {
11016    return this.rootNode?.allLeafChildren?.map((e) => e.data);
11017  }
11018  activate(e) {
11019    this.rootNode = e, e.group = !0, e.level = -1, e.id = km, e.allLeafChildren = [], e.childrenAfterGroup = [], e.childrenAfterSort = [], e.childrenAfterAggFilter = [], e.childrenAfterFilter = [], this.updateRootSiblingArrays(e);
11020  }
11021  deactivate() {
11022    this.rootNode && (this.allNodesMap = {}, this.rootNode = null);
11023  }
11024  destroy() {
11025    super.destroy(), this.allNodesMap = {}, this.rootNode = null;
11026  }
11027  setNewRowData(e) {
11028    const t = this.rootNode;
11029    t && (this.dispatchRowDataUpdateStartedEvent(e), t.childrenAfterFilter = null, t.childrenAfterGroup = null, t.childrenAfterAggFilter = null, t.childrenAfterSort = null, t.childrenMapped = null, t.updateHasChildren(), this.allNodesMap = {}, this.nextId = 0, this.loadNewRowData(e), this.updateRootSiblingArrays(t));
11030  }
11031  updateRootSiblingArrays(e) {
11032    const t = e.sibling;
11033    t && (t.childrenAfterFilter = e.childrenAfterFilter, t.childrenAfterGroup = e.childrenAfterGroup, t.childrenAfterAggFilter = e.childrenAfterAggFilter, t.childrenAfterSort = e.childrenAfterSort, t.childrenMapped = e.childrenMapped, t.allLeafChildren = e.allLeafChildren);
11034  }
11035  loadNewRowData(e) {
11036    this.rootNode.allLeafChildren = e?.map((t, i) => this.createRowNode(t, i)) ?? [];
11037  }
11038  setImmutableRowData(e, t) {
11039    const i = this.createTransactionForRowData(t), s = this.updateRowData(i, e.changedRowNodes);
11040    let o = !1;
11041    this.gos.get("suppressMaintainUnsortedOrder") || (o = this.updateRowOrderFromRowData(t));
11042    const { rowNodeTransaction: n, rowsInserted: r } = s, { add: a, remove: l, update: d } = n;
11043    (r || o || a.length || l.length || d.length) && (e.step = "group", e.rowDataUpdated = !0, e.rowNodeTransactions = [n], e.rowNodesOrderChanged = r || o);
11044  }
11045  updateRowData(e, t) {
11046    this.dispatchRowDataUpdateStartedEvent(e.add);
11047    const i = {
11048      changedRowNodes: t,
11049      rowNodeTransaction: { remove: [], update: [], add: [] },
11050      rowsInserted: !1
11051    }, s = [], o = fi(this.gos);
11052    return this.executeRemove(o, e, i, s), this.executeUpdate(o, e, i, s), this.executeAdd(e, i), this.deselectNodes(s), i;
11053  }
11054  /** Converts the setRowData() command to a transaction */
11055  createTransactionForRowData(e) {
11056    const t = fi(this.gos), i = { ...this.allNodesMap }, s = [], o = [], n = [];
11057    A(e) && e.forEach((r) => {
11058      const a = t({ data: r, level: 0 }), l = i[a];
11059      l ? (l.data !== r && o.push(r), i[a] = void 0) : n.push(r);
11060    });
11061    for (const r of Object.values(i))
11062      r && s.push(r.data);
11063    return { remove: s, update: o, add: n };
11064  }
11065  /**
11066   * Used by setImmutableRowData, after updateRowData, after updating with a generated transaction to
11067   * apply the order as specified by the the new data. We use sourceRowIndex to determine the order of the rows.
11068   * Time complexity is O(n) where n is the number of rows/rowData
11069   * @returns true if the order changed, otherwise false
11070   */
11071  updateRowOrderFromRowData(e) {
11072    const t = this.rootNode?.allLeafChildren, i = t?.length ?? 0, s = /* @__PURE__ */ new Map();
11073    let o = -1, n = -1;
11074    for (let r = 0; r < i; ++r) {
11075      const a = t[r], l = a.data;
11076      l !== e[r] && (n < 0 && (o = r), n = r, s.set(l, a));
11077    }
11078    if (o < 0)
11079      return !1;
11080    for (let r = o; r <= n; ++r) {
11081      const a = s.get(e[r]);
11082      a !== void 0 && (t[r] = a, a.sourceRowIndex = r);
11083    }
11084    return !0;
11085  }
11086  executeAdd(e, t) {
11087    const i = e.add;
11088    if (!i?.length)
11089      return;
11090    let s = this.rootNode.allLeafChildren, o = s.length;
11091    if (typeof e.addIndex == "number" && (o = this.sanitizeAddIndex(e.addIndex), o > 0 && this.gos.get("treeData") && this.gos.get("getDataPath"))) {
11092      for (let u = 0; u < s.length; u++)
11093        if (s[u]?.rowIndex == o - 1) {
11094          o = u + 1;
11095          break;
11096        }
11097    }
11098    const n = i.length, r = t.changedRowNodes, a = new Array(n);
11099    for (let c = 0; c < n; c++) {
11100      const u = this.createRowNode(i[c], o + c);
11101      r.add(u), a[c] = u;
11102    }
11103    const l = this.rootNode;
11104    if (o < s.length) {
11105      const c = s.slice(0, o), u = s.slice(o, s.length), h = c.length + a.length;
11106      for (let g = 0, p = u.length; g < p; ++g)
11107        u[g].sourceRowIndex = h + g;
11108      s = [...c, ...a, ...u], t.rowsInserted = !0;
11109    } else
11110      s = s.concat(a);
11111    l.allLeafChildren = s;
11112    const d = l.sibling;
11113    d && (d.allLeafChildren = s), t.rowNodeTransaction.add = a;
11114  }
11115  executeRemove(e, t, { changedRowNodes: i, rowNodeTransaction: s }, o) {
11116    const { remove: n } = t;
11117    if (!n?.length)
11118      return;
11119    const r = {};
11120    n.forEach((d) => {
11121      const c = this.lookupRowNode(e, d);
11122      c && (c.isSelected() && o.push(c), c.clearRowTopAndRowIndex(), r[c.id] = !0, delete this.allNodesMap[c.id], s.remove.push(c), i.remove(c));
11123    });
11124    const a = this.rootNode;
11125    a.allLeafChildren = a.allLeafChildren?.filter((d) => !r[d.id]) ?? null, a.allLeafChildren?.forEach((d, c) => {
11126      d.sourceRowIndex = c;
11127    });
11128    const l = a.sibling;
11129    l && (l.allLeafChildren = a.allLeafChildren);
11130  }
11131  executeUpdate(e, t, { changedRowNodes: i, rowNodeTransaction: s }, o) {
11132    const { update: n } = t;
11133    n?.length && n.forEach((r) => {
11134      const a = this.lookupRowNode(e, r);
11135      a && (a.updateData(r), !a.selectable && a.isSelected() && o.push(a), s.update.push(a), i.update(a));
11136    });
11137  }
11138  dispatchRowDataUpdateStartedEvent(e) {
11139    this.eventSvc.dispatchEvent({
11140      type: "rowDataUpdateStarted",
11141      firstRowData: e?.length ? e[0] : null
11142    });
11143  }
11144  deselectNodes(e) {
11145    const t = "rowDataChanged", i = this.beans.selectionSvc, s = e.length > 0;
11146    s && i?.setNodesSelected({
11147      newValue: !1,
11148      nodes: e,
11149      suppressFinishActions: !0,
11150      source: t
11151    }), i?.updateGroupsFromChildrenSelections?.(t), s && this.eventSvc.dispatchEvent({
11152      type: "selectionChanged",
11153      source: t
11154    });
11155  }
11156  sanitizeAddIndex(e) {
11157    const t = this.rootNode.allLeafChildren?.length ?? 0;
11158    return e < 0 || e >= t || Number.isNaN(e) ? t : Math.ceil(e);
11159  }
11160  createRowNode(e, t) {
11161    const i = new wi(this.beans);
11162    return i.parent = this.rootNode, i.level = 0, i.group = !1, i.expanded = !1, i.sourceRowIndex = t, i.setDataAndId(e, String(this.nextId)), this.allNodesMap[i.id] && x(2, { nodeId: i.id }), this.allNodesMap[i.id] = i, this.nextId++, i;
11163  }
11164  lookupRowNode(e, t) {
11165    let i;
11166    if (e) {
11167      const s = e({ data: t, level: 0 });
11168      if (i = this.allNodesMap[s], !i)
11169        return z(4, { id: s }), null;
11170    } else if (i = this.rootNode?.allLeafChildren?.find((s) => s.data === t), !i)
11171      return z(5, { data: t }), null;
11172    return i || null;
11173  }
11174}, Om = class extends _ {
11175  constructor() {
11176    super(
11177      /* html*/
11178      `
11179            <div class="ag-selection-checkbox" role="presentation">
11180                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
11181            </div>`,
11182      [sr]
11183    ), this.eCheckbox = M;
11184  }
11185  postConstruct() {
11186    this.eCheckbox.setPassive(!0);
11187  }
11188  getCheckboxId() {
11189    return this.eCheckbox.getInputElement().id;
11190  }
11191  onDataChanged() {
11192    this.onSelectionChanged();
11193  }
11194  onSelectableChanged() {
11195    this.showOrHideSelect();
11196  }
11197  onSelectionChanged() {
11198    const e = this.getLocaleTextFunc(), { rowNode: t, eCheckbox: i } = this, s = t.isSelected(), o = Ln(e, s), [n, r] = t.selectable ? ["ariaRowToggleSelection", "Press Space to toggle row selection"] : ["ariaRowSelectionDisabled", "Row Selection is disabled for this row"], a = e(n, r);
11199    i.setValue(s, !0), i.setInputAriaLabel(`${a} (${o})`);
11200  }
11201  init(e) {
11202    if (this.rowNode = e.rowNode, this.column = e.column, this.overrides = e.overrides, this.onSelectionChanged(), this.addManagedListeners(this.eCheckbox.getInputElement(), {
11203      // we don't want double click on this icon to open a group
11204      dblclick: mi,
11205      click: (s) => {
11206        mi(s), this.beans.selectionSvc?.handleSelectionEvent(s, this.rowNode, "checkboxSelected");
11207      }
11208    }), this.addManagedListeners(this.rowNode, {
11209      rowSelected: this.onSelectionChanged.bind(this),
11210      dataChanged: this.onDataChanged.bind(this),
11211      selectableChanged: this.onSelectableChanged.bind(this)
11212    }), this.addManagedPropertyListener("rowSelection", ({ currentValue: s, previousValue: o }) => {
11213      const n = typeof s == "object" ? Fo(s) : void 0, r = typeof o == "object" ? Fo(o) : void 0;
11214      n !== r && this.onSelectableChanged();
11215    }), nn(this.gos) || typeof this.getIsVisible() == "function") {
11216      const s = this.showOrHideSelect.bind(this);
11217      this.addManagedEventListeners({ displayedColumnsChanged: s }), this.addManagedListeners(this.rowNode, {
11218        dataChanged: s,
11219        cellChanged: s
11220      }), this.showOrHideSelect();
11221    }
11222    this.eCheckbox.getInputElement().setAttribute("tabindex", "-1");
11223  }
11224  showOrHideSelect() {
11225    const { column: e, rowNode: t, overrides: i, gos: s } = this;
11226    let o = t.selectable;
11227    const n = this.getIsVisible();
11228    if (o)
11229      if (typeof n == "function") {
11230        const l = i?.callbackParams;
11231        if (!e)
11232          o = n({ ...l, node: t, data: t.data });
11233        else {
11234          const d = e.createColumnFunctionCallbackParams(t);
11235          o = n({ ...l, ...d });
11236        }
11237      } else
11238        o = n ?? !1;
11239    const r = s.get("rowSelection");
11240    if (r && typeof r != "string" ? !Fo(r) : e?.getColDef().showDisabledCheckboxes) {
11241      this.eCheckbox.setDisabled(!o), this.setVisible(!0), this.setDisplayed(!0);
11242      return;
11243    }
11244    if (i?.removeHidden) {
11245      this.setDisplayed(o);
11246      return;
11247    }
11248    this.setVisible(o);
11249  }
11250  getIsVisible() {
11251    const e = this.overrides;
11252    if (e)
11253      return e.isVisible;
11254    const t = this.gos.get("rowSelection");
11255    return t && typeof t != "string" ? oi(t) : this.column?.getColDef()?.checkboxSelection;
11256  }
11257}, Gm = class {
11258  constructor(e) {
11259    this.rootId = null, this.endId = null, this.cachedRange = [], this.rowModel = e;
11260  }
11261  reset() {
11262    this.rootId = null, this.endId = null, this.cachedRange.length = 0;
11263  }
11264  setRoot(e) {
11265    this.rootId = e.id, this.endId = null, this.cachedRange.length = 0;
11266  }
11267  setEndRange(e) {
11268    this.endId = e.id, this.cachedRange.length = 0;
11269  }
11270  getRange() {
11271    if (this.cachedRange.length === 0) {
11272      const e = this.getRoot(), t = this.getEnd();
11273      if (e == null || t == null)
11274        return this.cachedRange;
11275      this.cachedRange = this.rowModel.getNodesInRangeForSelection(e, t) ?? [];
11276    }
11277    return this.cachedRange;
11278  }
11279  isInRange(e) {
11280    return this.rootId === null ? !1 : this.getRange().some((t) => t.id === e.id);
11281  }
11282  getRoot() {
11283    return this.rootId ? this.rowModel.getRowNode(this.rootId) ?? null : null;
11284  }
11285  getEnd() {
11286    return this.endId ? this.rowModel.getRowNode(this.endId) ?? null : null;
11287  }
11288  /**
11289   * Truncates the range to the given node (assumed to be within the current range).
11290   * Returns nodes that remain in the current range and those that should be removed
11291   *
11292   * @param node - Node at which to truncate the range
11293   * @returns Object of nodes to either keep or discard (i.e. deselect) from the range
11294   */
11295  truncate(e) {
11296    const t = this.getRange();
11297    if (t.length === 0)
11298      return { keep: [], discard: [] };
11299    const i = t[0].id === this.rootId, s = t.findIndex((o) => o.id === e.id);
11300    if (s > -1) {
11301      const o = t.slice(0, s), n = t.slice(s + 1);
11302      return this.setEndRange(e), i ? { keep: o, discard: n } : { keep: n, discard: o };
11303    } else
11304      return { keep: t, discard: [] };
11305  }
11306  /**
11307   * Extends the range to the given node. Returns nodes that remain in the current range
11308   * and those that should be removed.
11309   *
11310   * @param node - Node marking the new end of the range
11311   * @returns Object of nodes to either keep or discard (i.e. deselect) from the range
11312   */
11313  extend(e, t = !1) {
11314    const i = this.getRoot();
11315    if (i == null) {
11316      const o = this.getRange().slice();
11317      return t && e.depthFirstSearch((n) => !n.group && o.push(n)), o.push(e), this.setRoot(e), { keep: o, discard: [] };
11318    }
11319    const s = this.rowModel.getNodesInRangeForSelection(i, e);
11320    if (!s)
11321      return this.setRoot(e), { keep: [e], discard: [] };
11322    if (s.find((o) => o.id === this.endId))
11323      return this.setEndRange(e), { keep: this.getRange(), discard: [] };
11324    {
11325      const o = this.getRange().slice();
11326      return this.setEndRange(e), { keep: this.getRange(), discard: o };
11327    }
11328  }
11329}, Hm = class extends y {
11330  constructor(e) {
11331    super(), this.column = e, this.cbSelectAllVisible = !1, this.processingEventFromCheckbox = !1;
11332  }
11333  onSpaceKeyDown(e) {
11334    const t = this.cbSelectAll;
11335    t.isDisplayed() && !t.getGui().contains(Z(this.beans)) && (e.preventDefault(), t.setValue(!t.getValue()));
11336  }
11337  getCheckboxGui() {
11338    return this.cbSelectAll.getGui();
11339  }
11340  setComp(e) {
11341    this.headerCellCtrl = e;
11342    const t = this.createManagedBean(new ir());
11343    this.cbSelectAll = t, t.addCssClass("ag-header-select-all"), ve(t.getGui(), "presentation"), this.showOrHideSelectAll(), this.addManagedEventListeners({
11344      newColumnsLoaded: this.showOrHideSelectAll.bind(this),
11345      displayedColumnsChanged: this.onDisplayedColumnsChanged.bind(this),
11346      selectionChanged: this.onSelectionChanged.bind(this),
11347      paginationChanged: this.onSelectionChanged.bind(this),
11348      modelUpdated: this.onModelChanged.bind(this)
11349    }), this.addManagedListeners(t, { fieldValueChanged: this.onCbSelectAll.bind(this) }), t.getInputElement().setAttribute("tabindex", "-1"), this.refreshSelectAllLabel();
11350  }
11351  onDisplayedColumnsChanged() {
11352    this.isAlive() && this.showOrHideSelectAll();
11353  }
11354  showOrHideSelectAll() {
11355    const e = this.isCheckboxSelection();
11356    this.cbSelectAllVisible = e, this.cbSelectAll.setDisplayed(e), e && (this.checkRightRowModelType("selectAllCheckbox"), this.checkSelectionType("selectAllCheckbox"), this.updateStateOfCheckbox()), this.refreshSelectAllLabel();
11357  }
11358  onModelChanged() {
11359    this.cbSelectAllVisible && this.updateStateOfCheckbox();
11360  }
11361  onSelectionChanged() {
11362    this.cbSelectAllVisible && this.updateStateOfCheckbox();
11363  }
11364  updateStateOfCheckbox() {
11365    if (this.processingEventFromCheckbox)
11366      return;
11367    this.processingEventFromCheckbox = !0;
11368    const e = this.getSelectAllMode(), t = this.beans.selectionSvc, i = this.cbSelectAll, s = t.getSelectAllState(e);
11369    i.setValue(s);
11370    const o = t.hasNodesToSelect(e);
11371    i.setDisabled(!o), this.refreshSelectAllLabel(), this.processingEventFromCheckbox = !1;
11372  }
11373  refreshSelectAllLabel() {
11374    const e = this.getLocaleTextFunc(), { headerCellCtrl: t, cbSelectAll: i, cbSelectAllVisible: s } = this, n = i.getValue() ? e("ariaChecked", "checked") : e("ariaUnchecked", "unchecked"), r = e("ariaRowSelectAll", "Press Space to toggle all rows selection");
11375    t.setAriaDescriptionProperty(
11376      "selectAll",
11377      s ? `${r} (${n})` : null
11378    ), i.setInputAriaLabel(e("ariaHeaderSelection", "Column with Header Selection")), t.announceAriaDescription();
11379  }
11380  checkSelectionType(e) {
11381    return Xs(this.gos) ? !0 : (x(128, { feature: e }), !1);
11382  }
11383  checkRightRowModelType(e) {
11384    const { gos: t, rowModel: i } = this.beans;
11385    return me(t) || as(t) ? !0 : (x(129, { feature: e, rowModel: i.getType() }), !1);
11386  }
11387  onCbSelectAll() {
11388    if (this.processingEventFromCheckbox || !this.cbSelectAllVisible)
11389      return;
11390    const e = this.cbSelectAll.getValue(), t = this.getSelectAllMode();
11391    let i = "uiSelectAll";
11392    t === "currentPage" ? i = "uiSelectAllCurrentPage" : t === "filtered" && (i = "uiSelectAllFiltered");
11393    const s = { source: i, selectAll: t }, o = this.beans.selectionSvc;
11394    e ? o.selectAllRowNodes(s) : o.deselectAllRowNodes(s);
11395  }
11396  /**
11397   * Checkbox is enabled when either the `headerCheckbox` option is enabled in the new selection API
11398   * or `headerCheckboxSelection` is enabled in the legacy API.
11399   */
11400  isCheckboxSelection() {
11401    const { column: e, gos: t, beans: i } = this, s = t.get("rowSelection"), o = e.getColDef(), { headerCheckboxSelection: n } = o;
11402    let r = !1;
11403    const a = typeof s == "object";
11404    if (a) {
11405      const d = Qe(e), c = Un(e);
11406      (on(s) === "autoGroupColumn" && c || d && i.selectionColSvc?.isSelectionColumnEnabled()) && (r = Rs(s));
11407    } else
11408      typeof n == "function" ? r = n(t.addGridCommonParams({ column: e, colDef: o })) : r = !!n;
11409    const l = a ? "headerCheckbox" : "headerCheckboxSelection";
11410    return r && this.checkRightRowModelType(l) && this.checkSelectionType(l);
11411  }
11412  getSelectAllMode() {
11413    const e = Hl(this.gos, !1);
11414    if (e)
11415      return e;
11416    const { headerCheckboxSelectionCurrentPageOnly: t, headerCheckboxSelectionFilteredOnly: i } = this.column.getColDef();
11417    return t ? "currentPage" : i ? "filtered" : "all";
11418  }
11419}, Bm = class extends y {
11420  postConstruct() {
11421    const { gos: e, beans: t } = this;
11422    this.selectionCtx = new Gm(t.rowModel), this.addManagedPropertyListeners(["isRowSelectable", "rowSelection"], () => {
11423      const i = nn(e);
11424      i !== this.isRowSelectable && (this.isRowSelectable = i, this.updateSelectable());
11425    }), this.isRowSelectable = nn(e);
11426  }
11427  destroy() {
11428    super.destroy(), this.selectionCtx.reset();
11429  }
11430  createCheckboxSelectionComponent() {
11431    return new Om();
11432  }
11433  createSelectAllFeature(e) {
11434    return new Hm(e);
11435  }
11436  isMultiSelect() {
11437    return Xs(this.gos);
11438  }
11439  onRowCtrlSelected(e, t, i) {
11440    const s = !!e.rowNode.isSelected();
11441    e.forEachGui(i, (o) => {
11442      o.rowComp.addOrRemoveCssClass("ag-row-selected", s);
11443      const n = o.element;
11444      qo(n, s), n.contains(Z(this.beans)) && t(o);
11445    });
11446  }
11447  announceAriaRowSelection(e) {
11448    if (this.isRowSelectionBlocked(e))
11449      return;
11450    const t = e.isSelected();
11451    if (t && !Jr(this.gos))
11452      return;
11453    const s = this.getLocaleTextFunc()(
11454      t ? "ariaRowDeselect" : "ariaRowSelect",
11455      `Press SPACE to ${t ? "deselect" : "select"} this row`
11456    );
11457    this.beans.ariaAnnounce?.announceValue(s, "rowSelection");
11458  }
11459  dispatchSelectionChanged(e) {
11460    this.eventSvc.dispatchEvent({
11461      type: "selectionChanged",
11462      source: e
11463    });
11464  }
11465  isRowSelectionBlocked(e) {
11466    return !e.selectable || !!e.rowPinned || !It(this.gos);
11467  }
11468  updateRowSelectable(e, t) {
11469    const i = this.isRowSelectable?.(e) ?? !0;
11470    return this.setRowSelectable(e, i, t), i;
11471  }
11472  setRowSelectable(e, t, i) {
11473    if (e.selectable !== t) {
11474      if (e.selectable = t, e.dispatchRowEvent("selectableChanged"), i)
11475        return;
11476      if (Ji(this.gos)) {
11477        const o = this.calculateSelectedFromChildren(e);
11478        this.setNodesSelected({ nodes: [e], newValue: o ?? !1, source: "selectableChanged" });
11479        return;
11480      }
11481      e.isSelected() && !e.selectable && this.setNodesSelected({ nodes: [e], newValue: !1, source: "selectableChanged" });
11482    }
11483  }
11484  calculateSelectedFromChildren(e) {
11485    let t = !1, i = !1;
11486    if (!e.childrenAfterGroup?.length)
11487      return e.selectable ? e.__selected : null;
11488    for (let s = 0; s < e.childrenAfterGroup.length; s++) {
11489      const o = e.childrenAfterGroup[s];
11490      let n = o.isSelected();
11491      if (!o.selectable) {
11492        const r = this.calculateSelectedFromChildren(o);
11493        if (r === null)
11494          continue;
11495        n = r;
11496      }
11497      switch (n) {
11498        case !0:
11499          t = !0;
11500          break;
11501        case !1:
11502          i = !0;
11503          break;
11504        default:
11505          return;
11506      }
11507    }
11508    if (!(t && i))
11509      return t ? !0 : i ? !1 : e.selectable ? e.__selected : null;
11510  }
11511  selectRowNode(e, t, i, s = "api") {
11512    const o = !e.selectable && t, n = e.__selected === t;
11513    if (o || n)
11514      return !1;
11515    e.__selected = t, e.dispatchRowEvent("rowSelected");
11516    const r = e.sibling;
11517    return r && r.footer && r.__localEventService && r.dispatchRowEvent("rowSelected"), this.eventSvc.dispatchEvent({
11518      ...Ef(e, this.gos, "rowSelected"),
11519      event: i || null,
11520      source: s
11521    }), !0;
11522  }
11523  isCellCheckboxSelection(e, t) {
11524    const i = this.gos.get("rowSelection");
11525    if (i && typeof i != "string") {
11526      const s = Qe(e) && oi(i);
11527      return e.isColumnFunc(t, s);
11528    } else
11529      return e.isColumnFunc(t, e.colDef.checkboxSelection);
11530  }
11531  inferNodeSelections(e, t, i, s) {
11532    const { gos: o, selectionCtx: n } = this, r = e.isSelected(), a = Ji(o), l = pg(o), d = Jr(o), c = s === "rowClicked";
11533    if (c && a && e.group || c && !(l || d))
11534      return null;
11535    if (t && i && this.isMultiSelect()) {
11536      const u = n.getRoot();
11537      if (u)
11538        if (u.isSelected()) {
11539          const h = n.isInRange(e) ? n.truncate(e) : n.extend(e, a);
11540          return {
11541            deselect: h.discard,
11542            select: h.keep,
11543            reset: !1
11544          };
11545        } else {
11546          const h = n.extend(e, a);
11547          return {
11548            select: [],
11549            deselect: h.keep,
11550            reset: !1
11551          };
11552        }
11553      else return null;
11554    } else if (t && this.isMultiSelect()) {
11555      const u = n.getRoot(), h = n.isInRange(e) ? n.truncate(e) : n.extend(e, a);
11556      return {
11557        select: h.keep,
11558        deselect: h.discard,
11559        reset: !!(u && !u.isSelected())
11560      };
11561    } else {
11562      if (i)
11563        return n.setRoot(e), c && r && !d ? null : {
11564          node: e,
11565          newValue: !r,
11566          clearSelection: !this.isMultiSelect()
11567        };
11568      {
11569        n.setRoot(e);
11570        const u = fg(o), h = Hs(o) === "filteredDescendants", g = c && (!u || !l);
11571        if (h && r === void 0 && me(o))
11572          return {
11573            node: e,
11574            newValue: !1,
11575            clearSelection: !this.isMultiSelect() || g
11576          };
11577        if (c) {
11578          const p = r ? !u : l;
11579          return p === r ? null : {
11580            node: e,
11581            newValue: p,
11582            clearSelection: !this.isMultiSelect() || g
11583          };
11584        }
11585        return {
11586          node: e,
11587          newValue: !r,
11588          clearSelection: !this.isMultiSelect() || g
11589        };
11590      }
11591    }
11592  }
11593}, Nm = class extends ir {
11594  constructor(e) {
11595    super(e, "ag-radio-button", "radio");
11596  }
11597  isSelected() {
11598    return this.eInput.checked;
11599  }
11600  toggle() {
11601    this.eInput.disabled || this.isSelected() || this.setValue(!0);
11602  }
11603  addInputListeners() {
11604    super.addInputListeners(), this.addManagedEventListeners({ checkboxChanged: this.onChange.bind(this) });
11605  }
11606  /**
11607   * This ensures that if another radio button in the same named group is selected, we deselect this radio button.
11608   * By default the browser does this for you, but we are managing classes ourselves in order to ensure input
11609   * elements are styled correctly in IE11, and the DOM 'changed' event is only fired when a button is selected,
11610   * not deselected, so we need to use our own event.
11611   */
11612  onChange(e) {
11613    const t = this.eInput;
11614    e.selected && e.name && t.name && t.name === e.name && e.id && t.id !== e.id && this.setValue(!1, !0);
11615  }
11616}, _t = class extends At {
11617  constructor(e, t = "ag-text-field", i = "text") {
11618    super(e, t, i);
11619  }
11620  postConstruct() {
11621    super.postConstruct(), this.config.allowedCharPattern && this.preventDisallowedCharacters();
11622  }
11623  setValue(e, t) {
11624    const i = this.eInput;
11625    return i.value !== e && (i.value = A(e) ? e : ""), super.setValue(e, t);
11626  }
11627  /** Used to set an initial value into the input without necessarily setting `this.value` or triggering events (e.g. to set an invalid value) */
11628  setStartValue(e) {
11629    this.setValue(e, !0);
11630  }
11631  preventDisallowedCharacters() {
11632    const e = new RegExp(`[${this.config.allowedCharPattern}]`), t = (i) => {
11633      Fd(i) && i.key && !e.test(i.key) && i.preventDefault();
11634    };
11635    this.addManagedListeners(this.eInput, {
11636      keydown: t,
11637      paste: (i) => {
11638        const s = i.clipboardData?.getData("text");
11639        s && s.split("").some((o) => !e.test(o)) && i.preventDefault();
11640      }
11641    });
11642  }
11643}, eo = {
11644  selector: "AG-INPUT-TEXT-FIELD",
11645  component: _t
11646}, Vm = class extends At {
11647  constructor(e) {
11648    super(e, "ag-text-area", null, "textarea");
11649  }
11650  setValue(e, t) {
11651    const i = super.setValue(e, t);
11652    return this.eInput.value = e, i;
11653  }
11654  setCols(e) {
11655    return this.eInput.cols = e, this;
11656  }
11657  setRows(e) {
11658    return this.eInput.rows = e, this;
11659  }
11660}, Wm = {
11661  selector: "AG-INPUT-TEXT-AREA",
11662  component: Vm
11663}, or = class extends _t {
11664  constructor(e) {
11665    super(e, "ag-number-field", "number");
11666  }
11667  postConstruct() {
11668    super.postConstruct();
11669    const e = this.eInput;
11670    this.addManagedListeners(e, {
11671      blur: () => {
11672        const n = parseFloat(e.value), r = isNaN(n) ? "" : this.normalizeValue(n.toString());
11673        this.value !== r && this.setValue(r);
11674      },
11675      wheel: this.onWheel.bind(this)
11676    }), e.step = "any";
11677    const { precision: t, min: i, max: s, step: o } = this.config;
11678    typeof t == "number" && this.setPrecision(t), typeof i == "number" && this.setMin(i), typeof s == "number" && this.setMax(s), typeof o == "number" && this.setStep(o);
11679  }
11680  onWheel(e) {
11681    Z(this.beans) === this.eInput && e.preventDefault();
11682  }
11683  normalizeValue(e) {
11684    if (e === "")
11685      return "";
11686    this.precision != null && (e = this.adjustPrecision(e));
11687    const t = parseFloat(e), { min: i, max: s } = this;
11688    return i != null && t < i ? e = i.toString() : s != null && t > s && (e = s.toString()), e;
11689  }
11690  adjustPrecision(e, t) {
11691    const i = this.precision;
11692    if (i == null)
11693      return e;
11694    if (t) {
11695      const o = parseFloat(e).toFixed(i);
11696      return parseFloat(o).toString();
11697    }
11698    const s = String(e).split(".");
11699    if (s.length > 1) {
11700      if (s[1].length <= i)
11701        return e;
11702      if (i > 0)
11703        return `${s[0]}.${s[1].slice(0, i)}`;
11704    }
11705    return s[0];
11706  }
11707  setMin(e) {
11708    return this.min === e ? this : (this.min = e, Ie(this.eInput, "min", e), this);
11709  }
11710  setMax(e) {
11711    return this.max === e ? this : (this.max = e, Ie(this.eInput, "max", e), this);
11712  }
11713  setPrecision(e) {
11714    return this.precision = e, this;
11715  }
11716  setStep(e) {
11717    return this.step === e ? this : (this.step = e, Ie(this.eInput, "step", e), this);
11718  }
11719  setValue(e, t) {
11720    return this.setValueOrInputValue(
11721      (i) => super.setValue(i, t),
11722      () => this,
11723      e
11724    );
11725  }
11726  setStartValue(e) {
11727    return this.setValueOrInputValue(
11728      (t) => super.setValue(t, !0),
11729      (t) => {
11730        this.eInput.value = t;
11731      },
11732      e
11733    );
11734  }
11735  setValueOrInputValue(e, t, i) {
11736    if (A(i)) {
11737      let s = this.isScientificNotation(i);
11738      if (s && this.eInput.validity.valid)
11739        return e(i);
11740      if (!s) {
11741        i = this.adjustPrecision(i);
11742        const o = this.normalizeValue(i);
11743        s = i != o;
11744      }
11745      if (s)
11746        return t(i);
11747    }
11748    return e(i);
11749  }
11750  getValue() {
11751    const e = this.eInput;
11752    if (!e.validity.valid)
11753      return;
11754    const t = e.value;
11755    return this.isScientificNotation(t) ? this.adjustPrecision(t, !0) : super.getValue();
11756  }
11757  isScientificNotation(e) {
11758    return typeof e == "string" && e.includes("e");
11759  }
11760}, zm = {
11761  selector: "AG-INPUT-NUMBER-FIELD",
11762  component: or
11763};
11764function Wi(e, t) {
11765  return e.toString().padStart(t, "0");
11766}
11767function ke(e, t = !0, i = "-") {
11768  if (!e)
11769    return null;
11770  let s = [e.getFullYear(), e.getMonth() + 1, e.getDate()].map((o) => Wi(o, 2)).join(i);
11771  return t && (s += " " + [e.getHours(), e.getMinutes(), e.getSeconds()].map((o) => Wi(o, 2)).join(":")), s;
11772}
11773var Ao = (e) => {
11774  if (e > 3 && e < 21)
11775    return "th";
11776  switch (e % 10) {
11777    case 1:
11778      return "st";
11779    case 2:
11780      return "nd";
11781    case 3:
11782      return "rd";
11783  }
11784  return "th";
11785};
11786function zi(e, t = "YYYY-MM-DD") {
11787  const i = Wi(e.getFullYear(), 4), s = [
11788    "January",
11789    "February",
11790    "March",
11791    "April",
11792    "May",
11793    "June",
11794    "July",
11795    "August",
11796    "September",
11797    "October",
11798    "November",
11799    "December"
11800  ], o = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], n = {
11801    YYYY: () => i.slice(i.length - 4, i.length),
11802    YY: () => i.slice(i.length - 2, i.length),
11803    Y: () => `${e.getFullYear()}`,
11804    MMMM: () => s[e.getMonth()],
11805    MMM: () => s[e.getMonth()].slice(0, 3),
11806    MM: () => Wi(e.getMonth() + 1, 2),
11807    Mo: () => `${e.getMonth() + 1}${Ao(e.getMonth() + 1)}`,
11808    M: () => `${e.getMonth() + 1}`,
11809    Do: () => `${e.getDate()}${Ao(e.getDate())}`,
11810    DD: () => Wi(e.getDate(), 2),
11811    D: () => `${e.getDate()}`,
11812    dddd: () => o[e.getDay()],
11813    ddd: () => o[e.getDay()].slice(0, 3),
11814    dd: () => o[e.getDay()].slice(0, 2),
11815    do: () => `${e.getDay()}${Ao(e.getDay())}`,
11816    d: () => `${e.getDay()}`
11817  }, r = new RegExp(Object.keys(n).join("|"), "g");
11818  return t.replace(r, (a) => a in n ? n[a]() : a);
11819}
11820function Re(e) {
11821  if (!e)
11822    return null;
11823  const [t, i] = e.split(" ");
11824  if (!t)
11825    return null;
11826  const s = t.split("-").map((u) => parseInt(u, 10));
11827  if (s.filter((u) => !isNaN(u)).length !== 3)
11828    return null;
11829  const [o, n, r] = s, a = new Date(o, n - 1, r);
11830  if (a.getFullYear() !== o || a.getMonth() !== n - 1 || a.getDate() !== r)
11831    return null;
11832  if (!i || i === "00:00:00")
11833    return a;
11834  const [l, d, c] = i.split(":").map((u) => parseInt(u, 10));
11835  return l >= 0 && l < 24 && a.setHours(l), d >= 0 && d < 60 && a.setMinutes(d), c >= 0 && c < 60 && a.setSeconds(c), a;
11836}
11837var _m = class extends _t {
11838  constructor(e) {
11839    super(e, "ag-date-field", "date");
11840  }
11841  postConstruct() {
11842    super.postConstruct();
11843    const e = Nt();
11844    this.addManagedListeners(this.eInput, {
11845      wheel: this.onWheel.bind(this),
11846      mousedown: () => {
11847        this.isDisabled() || e || this.eInput.focus();
11848      }
11849    }), this.eInput.step = "any";
11850  }
11851  onWheel(e) {
11852    Z(this.beans) === this.eInput && e.preventDefault();
11853  }
11854  setMin(e) {
11855    const t = e instanceof Date ? ke(e ?? null, !1) ?? void 0 : e;
11856    return this.min === t ? this : (this.min = t, Ie(this.eInput, "min", t), this);
11857  }
11858  setMax(e) {
11859    const t = e instanceof Date ? ke(e ?? null, !1) ?? void 0 : e;
11860    return this.max === t ? this : (this.max = t, Ie(this.eInput, "max", t), this);
11861  }
11862  setStep(e) {
11863    return this.step === e ? this : (this.step = e, Ie(this.eInput, "step", e), this);
11864  }
11865  getDate() {
11866    if (this.eInput.validity.valid)
11867      return Re(this.getValue()) ?? void 0;
11868  }
11869  setDate(e, t) {
11870    this.setValue(ke(e ?? null, !1), t);
11871  }
11872}, Od = {
11873  selector: "AG-INPUT-DATE-FIELD",
11874  component: _m
11875}, Um = 1e3, $m = 1e3, ca = 100, ua, ws = !1, Km = class extends y {
11876  constructor(e, t) {
11877    super(), this.tooltipCtrl = e, this.getTooltipValue = t, this.interactionEnabled = !1, this.isInteractingWithTooltip = !1, this.state = 0, this.tooltipInstanceCount = 0, this.tooltipMouseTrack = !1;
11878  }
11879  wireBeans(e) {
11880    this.popupSvc = e.popupSvc, this.userCompFactory = e.userCompFactory;
11881  }
11882  postConstruct() {
11883    this.gos.get("tooltipInteraction") && (this.interactionEnabled = !0), this.tooltipTrigger = this.getTooltipTrigger(), this.tooltipMouseTrack = this.gos.get("tooltipMouseTrack");
11884    const e = this.tooltipCtrl.getGui();
11885    this.tooltipTrigger === 0 && this.addManagedListeners(e, {
11886      mouseenter: this.onMouseEnter.bind(this),
11887      mouseleave: this.onMouseLeave.bind(this)
11888    }), this.tooltipTrigger === 1 && this.addManagedListeners(e, {
11889      focusin: this.onFocusIn.bind(this),
11890      focusout: this.onFocusOut.bind(this)
11891    }), this.addManagedListeners(e, { mousemove: this.onMouseMove.bind(this) }), this.interactionEnabled || this.addManagedListeners(e, {
11892      mousedown: this.onMouseDown.bind(this),
11893      keydown: this.onKeyDown.bind(this)
11894    });
11895  }
11896  getGridOptionsTooltipDelay(e) {
11897    const t = this.gos.get(e);
11898    return Math.max(200, t);
11899  }
11900  getTooltipDelay(e) {
11901    return e === "show" ? this.tooltipCtrl.getTooltipShowDelayOverride?.() ?? this.getGridOptionsTooltipDelay("tooltipShowDelay") : this.tooltipCtrl.getTooltipHideDelayOverride?.() ?? this.getGridOptionsTooltipDelay("tooltipHideDelay");
11902  }
11903  destroy() {
11904    this.setToDoNothing(), super.destroy();
11905  }
11906  getTooltipTrigger() {
11907    const e = this.gos.get("tooltipTrigger");
11908    return !e || e === "hover" ? 0 : 1;
11909  }
11910  onMouseEnter(e) {
11911    this.interactionEnabled && this.interactiveTooltipTimeoutId && (this.unlockService(), this.startHideTimeout()), !Tt() && (ws ? this.showTooltipTimeoutId = window.setTimeout(() => {
11912      this.prepareToShowTooltip(e);
11913    }, ca) : this.prepareToShowTooltip(e));
11914  }
11915  onMouseMove(e) {
11916    this.lastMouseEvent && (this.lastMouseEvent = e), this.tooltipMouseTrack && this.state === 2 && this.tooltipComp && this.positionTooltip();
11917  }
11918  onMouseDown() {
11919    this.setToDoNothing();
11920  }
11921  onMouseLeave() {
11922    this.interactionEnabled ? this.lockService() : this.setToDoNothing();
11923  }
11924  onFocusIn() {
11925    this.prepareToShowTooltip();
11926  }
11927  onFocusOut(e) {
11928    const t = e.relatedTarget, i = this.tooltipCtrl.getGui(), s = this.tooltipComp?.getGui();
11929    this.isInteractingWithTooltip || i.contains(t) || this.interactionEnabled && s?.contains(t) || this.setToDoNothing();
11930  }
11931  onKeyDown() {
11932    this.isInteractingWithTooltip && (this.isInteractingWithTooltip = !1), this.setToDoNothing();
11933  }
11934  prepareToShowTooltip(e) {
11935    if (this.state != 0 || ws)
11936      return;
11937    let t = 0;
11938    e && (t = this.isLastTooltipHiddenRecently() ? 200 : this.getTooltipDelay("show")), this.lastMouseEvent = e || null, this.showTooltipTimeoutId = window.setTimeout(this.showTooltip.bind(this), t), this.state = 1;
11939  }
11940  isLastTooltipHiddenRecently() {
11941    return (/* @__PURE__ */ new Date()).getTime() - ua < Um;
11942  }
11943  setToDoNothing(e) {
11944    !e && this.state === 2 && this.hideTooltip(), this.onBodyScrollEventCallback && (this.onBodyScrollEventCallback(), this.onBodyScrollEventCallback = void 0), this.onColumnMovedEventCallback && (this.onColumnMovedEventCallback(), this.onColumnMovedEventCallback = void 0), this.onDocumentKeyDownCallback && (this.onDocumentKeyDownCallback(), this.onDocumentKeyDownCallback = void 0), this.clearTimeouts(), this.state = 0, this.lastMouseEvent = null;
11945  }
11946  showTooltip() {
11947    const e = this.getTooltipValue(), t = this.tooltipCtrl;
11948    if (!A(e) || t.shouldDisplayTooltip && !t.shouldDisplayTooltip()) {
11949      this.setToDoNothing();
11950      return;
11951    }
11952    const i = t.getRowNode?.(), s = {
11953      location: t.getLocation?.() ?? "UNKNOWN",
11954      //'cell',
11955      colDef: t.getColDef?.(),
11956      column: t.getColumn?.(),
11957      rowIndex: t.getRowIndex?.(),
11958      node: i,
11959      data: i?.data,
11960      value: e,
11961      valueFormatted: t.getValueFormatted?.(),
11962      hideTooltipCallback: () => this.hideTooltip(!0),
11963      ...t.getAdditionalParams?.() ?? {}
11964    };
11965    this.state = 2, this.tooltipInstanceCount++;
11966    const o = this.newTooltipComponentCallback.bind(this, this.tooltipInstanceCount);
11967    Ip(this.userCompFactory, s)?.newAgStackInstance().then(o);
11968  }
11969  hideTooltip(e) {
11970    !e && this.isInteractingWithTooltip || (this.tooltipComp && (this.destroyTooltipComp(), ua = (/* @__PURE__ */ new Date()).getTime()), this.eventSvc.dispatchEvent({
11971      type: "tooltipHide",
11972      parentGui: this.tooltipCtrl.getGui()
11973    }), e && (this.isInteractingWithTooltip = !1), this.setToDoNothing(!0));
11974  }
11975  newTooltipComponentCallback(e, t) {
11976    if (this.state !== 2 || this.tooltipInstanceCount !== e) {
11977      this.destroyBean(t);
11978      return;
11979    }
11980    const s = t.getGui();
11981    this.tooltipComp = t, s.classList.contains("ag-tooltip") || s.classList.add("ag-tooltip-custom"), this.tooltipTrigger === 0 && s.classList.add("ag-tooltip-animate"), this.interactionEnabled && s.classList.add("ag-tooltip-interactive");
11982    const o = this.getLocaleTextFunc(), n = this.popupSvc?.addPopup({
11983      eChild: s,
11984      ariaLabel: o("ariaLabelTooltip", "Tooltip")
11985    });
11986    if (n && (this.tooltipPopupDestroyFunc = n.hideFunc), this.positionTooltip(), this.tooltipTrigger === 1) {
11987      const r = () => this.setToDoNothing();
11988      [this.onBodyScrollEventCallback, this.onColumnMovedEventCallback] = this.addManagedEventListeners({
11989        bodyScroll: r,
11990        columnMoved: r
11991      });
11992    }
11993    this.interactionEnabled && ([this.tooltipMouseEnterListener, this.tooltipMouseLeaveListener] = this.addManagedElementListeners(s, {
11994      mouseenter: this.onTooltipMouseEnter.bind(this),
11995      mouseleave: this.onTooltipMouseLeave.bind(this)
11996    }), [this.onDocumentKeyDownCallback] = this.addManagedElementListeners(te(this.beans), {
11997      keydown: (r) => {
11998        s.contains(r?.target) || this.onKeyDown();
11999      }
12000    }), this.tooltipTrigger === 1 && ([this.tooltipFocusInListener, this.tooltipFocusOutListener] = this.addManagedElementListeners(s, {
12001      focusin: this.onTooltipFocusIn.bind(this),
12002      focusout: this.onTooltipFocusOut.bind(this)
12003    }))), this.eventSvc.dispatchEvent({
12004      type: "tooltipShow",
12005      tooltipGui: s,
12006      parentGui: this.tooltipCtrl.getGui()
12007    }), this.startHideTimeout();
12008  }
12009  onTooltipMouseEnter() {
12010    this.isInteractingWithTooltip = !0, this.unlockService();
12011  }
12012  onTooltipMouseLeave() {
12013    this.isTooltipFocused() || (this.isInteractingWithTooltip = !1, this.lockService())
12013;
12014  }
12015  onTooltipFocusIn() {
12016    this.isInteractingWithTooltip = !0;
12017  }
12018  isTooltipFocused() {
12019    const e = this.tooltipComp?.getGui(), t = Z(this.beans);
12020    return !!e && e.contains(t);
12021  }
12022  onTooltipFocusOut(e) {
12023    const t = this.tooltipCtrl.getGui();
12024    this.isTooltipFocused() || (this.isInteractingWithTooltip = !1, t.contains(e.relatedTarget) ? this.startHideTimeout() : this.hideTooltip());
12025  }
12026  positionTooltip() {
12027    const e = {
12028      type: "tooltip",
12029      ePopup: this.tooltipComp.getGui(),
12030      nudgeY: 18,
12031      skipObserver: this.tooltipMouseTrack
12032    };
12033    this.lastMouseEvent ? this.popupSvc?.positionPopupUnderMouseEvent({
12034      ...e,
12035      mouseEvent: this.lastMouseEvent
12036    }) : this.popupSvc?.positionPopupByComponent({
12037      ...e,
12038      eventSource: this.tooltipCtrl.getGui(),
12039      position: "under",
12040      keepWithinBounds: !0,
12041      nudgeY: 5
12042    });
12043  }
12044  destroyTooltipComp() {
12045    this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");
12046    const e = this.tooltipPopupDestroyFunc, t = this.tooltipComp, i = this.tooltipTrigger === 0 ? $m : 0;
12047    window.setTimeout(() => {
12048      e(), this.destroyBean(t);
12049    }, i), this.clearTooltipListeners(), this.tooltipPopupDestroyFunc = void 0, this.tooltipComp = void 0;
12050  }
12051  clearTooltipListeners() {
12052    [
12053      this.tooltipMouseEnterListener,
12054      this.tooltipMouseLeaveListener,
12055      this.tooltipFocusInListener,
12056      this.tooltipFocusOutListener
12057    ].forEach((e) => {
12058      e && e();
12059    }), this.tooltipMouseEnterListener = this.tooltipMouseLeaveListener = this.tooltipFocusInListener = this.tooltipFocusOutListener = null;
12060  }
12061  lockService() {
12062    ws = !0, this.interactiveTooltipTimeoutId = window.setTimeout(() => {
12063      this.unlockService(), this.setToDoNothing();
12064    }, ca);
12065  }
12066  unlockService() {
12067    ws = !1, this.clearInteractiveTimeout();
12068  }
12069  startHideTimeout() {
12070    this.clearHideTimeout(), this.hideTooltipTimeoutId = window.setTimeout(this.hideTooltip.bind(this), this.getTooltipDelay("hide"));
12071  }
12072  clearShowTimeout() {
12073    this.showTooltipTimeoutId && (window.clearTimeout(this.showTooltipTimeoutId), this.showTooltipTimeoutId = void 0);
12074  }
12075  clearHideTimeout() {
12076    this.hideTooltipTimeoutId && (window.clearTimeout(this.hideTooltipTimeoutId), this.hideTooltipTimeoutId = void 0);
12077  }
12078  clearInteractiveTimeout() {
12079    this.interactiveTooltipTimeoutId && (window.clearTimeout(this.interactiveTooltipTimeoutId), this.interactiveTooltipTimeoutId = void 0);
12080  }
12081  clearTimeouts() {
12082    this.clearShowTimeout(), this.clearHideTimeout(), this.clearInteractiveTimeout();
12083  }
12084};
12085function To(e) {
12086  return e.get("tooltipShowMode") === "whenTruncated";
12087}
12088function Es(e) {
12089  return () => {
12090    const t = e();
12091    return t ? t.scrollWidth > t.clientWidth : !0;
12092  };
12093}
12094var jm = class extends y {
12095  constructor(e, t) {
12096    super(), this.ctrl = e, t && (this.beans = t);
12097  }
12098  postConstruct() {
12099    this.refreshTooltip();
12100  }
12101  setBrowserTooltip(e) {
12102    const t = "title", i = this.ctrl.getGui();
12103    i && (e != null && e != "" ? i.setAttribute(t, e) : i.removeAttribute(t));
12104  }
12105  updateTooltipText() {
12106    const { getTooltipValue: e } = this.ctrl;
12107    e && (this.tooltip = e());
12108  }
12109  createTooltipFeatureIfNeeded() {
12110    this.tooltipManager == null && (this.tooltipManager = this.createBean(
12111      new Km(this.ctrl, () => this.tooltip),
12112      this.beans.context
12113    ));
12114  }
12115  setTooltipAndRefresh(e) {
12116    this.tooltip = e, this.refreshTooltip();
12117  }
12118  refreshTooltip() {
12119    this.browserTooltips = this.beans.gos.get("enableBrowserTooltips"), this.updateTooltipText(), this.browserTooltips ? (this.setBrowserTooltip(this.tooltip), this.tooltipManager = this.destroyBean(this.tooltipManager, this.beans.context)) : (this.setBrowserTooltip(null), this.createTooltipFeatureIfNeeded());
12120  }
12121  destroy() {
12122    this.tooltipManager = this.destroyBean(this.tooltipManager, this.beans.context), super.destroy();
12123  }
12124}, qm = class extends _ {
12125  constructor(e = "default", t = !1) {
12126    super(
12127      /* html */
12128      `<div class="ag-list ag-${e}-list" role="listbox"></div>`
12129    ), this.cssIdentifier = e, this.unFocusable = t, this.activeClass = "ag-active-item", this.options = [], this.itemEls = [];
12130  }
12131  postConstruct() {
12132    const e = this.getGui();
12133    this.addManagedElementListeners(e, { mouseleave: () => this.clearHighlighted() }), !this.unFocusable && this.addManagedElementListeners(e, { keydown: this.handleKeyDown.bind(this) });
12134  }
12135  handleKeyDown(e) {
12136    const t = e.key;
12137    switch (t) {
12138      case b.ENTER:
12139        if (!this.highlightedEl)
12140          this.setValue(this.getValue());
12141        else {
12142          const i = this.itemEls.indexOf(this.highlightedEl);
12143          this.setValueByIndex(i);
12144        }
12145        break;
12146      case b.DOWN:
12147      case b.UP:
12148        e.preventDefault(), this.navigate(t);
12149        break;
12150      case b.PAGE_DOWN:
12151      case b.PAGE_UP:
12152      case b.PAGE_HOME:
12153      case b.PAGE_END:
12154        e.preventDefault(), this.navigateToPage(t);
12155        break;
12156    }
12157  }
12158  navigate(e) {
12159    const t = e === b.DOWN;
12160    let i;
12161    const { itemEls: s, highlightedEl: o } = this;
12162    if (!o)
12163      i = s[t ? 0 : s.length - 1];
12164    else {
12165      let r = s.indexOf(o) + (t ? 1 : -1);
12166      r = Math.min(Math.max(r, 0), s.length - 1), i = s[r];
12167    }
12168    this.highlightItem(i);
12169  }
12170  navigateToPage(e) {
12171    const { itemEls: t, highlightedEl: i } = this;
12172    if (!i || t.length === 0)
12173      return;
12174    const s = t.indexOf(i), o = this.options.length - 1, n = t[0].clientHeight, r = Math.floor(this.getGui().clientHeight / n);
12175    let a = -1;
12176    e === b.PAGE_HOME ? a = 0 : e === b.PAGE_END ? a = o : e === b.PAGE_DOWN ? a = Math.min(s + r, o) : e === b.PAGE_UP && (a = Math.max(s - r, 0)), a !== -1 && this.highlightItem(t[a]);
12177  }
12178  addOptions(e) {
12179    return e.forEach((t) => this.addOption(t)), this;
12180  }
12181  addOption(e) {
12182    const { value: t, text: i } = e, s = i || t;
12183    return this.options.push({ value: t, text: s }), this.renderOption(t, s), this.updateIndices(), this;
12184  }
12185  clearOptions() {
12186    this.options = [], this.reset(!0), this.itemEls.forEach((e) => {
12187      qe(e);
12188    }), this.itemEls = [];
12189  }
12190  updateIndices() {
12191    const e = this.getGui().querySelectorAll(".ag-list-item");
12192    e.forEach((t, i) => {
12193      Ih(t, i + 1), Mh(t, e.length);
12194    });
12195  }
12196  renderOption(e, t) {
12197    const i = te(this.beans), s = i.createElement("div");
12198    ve(s, "option"), s.classList.add("ag-list-item", `ag-${this.cssIdentifier}-list-item`);
12199    const o = i.createElement("span");
12200    s.appendChild(o), o.textContent = t, this.unFocusable || (s.tabIndex = -1), this.itemEls.push(s), this.addManagedListeners(s, {
12201      mouseover: () => this.highlightItem(s),
12202      mousedown: (n) => {
12203        n.preventDefault(), n.stopPropagation(), this.setValue(e);
12204      }
12205    }), this.createOptionalManagedBean(
12206      this.beans.registry.createDynamicBean("tooltipFeature", !1, {
12207        getTooltipValue: () => t,
12208        getGui: () => s,
12209        getLocation: () => "UNKNOWN",
12210        // only show tooltips for items where the text cannot be fully displayed
12211        shouldDisplayTooltip: () => o.scrollWidth > o.clientWidth
12212      })
12213    ), this.getGui().appendChild(s);
12214  }
12215  setValue(e, t) {
12216    if (this.value === e)
12217      return this.fireItemSelected(), this;
12218    if (e == null)
12219      return this.reset(t), this;
12220    const i = this.options.findIndex((s) => s.value === e);
12221    if (i !== -1) {
12222      const s = this.options[i];
12223      this.value = s.value, this.displayValue = s.text, this.highlightItem(this.itemEls[i]), t || this.fireChangeEvent();
12224    }
12225    return this;
12226  }
12227  setValueByIndex(e) {
12228    return this.setValue(this.options[e].value);
12229  }
12230  getValue() {
12231    return this.value;
12232  }
12233  getDisplayValue() {
12234    return this.displayValue;
12235  }
12236  refreshHighlighted() {
12237    this.clearHighlighted();
12238    const e = this.options.findIndex((t) => t.value === this.value);
12239    e !== -1 && this.highlightItem(this.itemEls[e]);
12240  }
12241  reset(e) {
12242    this.value = null, this.displayValue = null, this.clearHighlighted(), e || this.fireChangeEvent();
12243  }
12244  highlightItem(e) {
12245    if (!Ne(e))
12246      return;
12247    this.clearHighlighted(), this.highlightedEl = e, e.classList.add(this.activeClass), qo(e, !0);
12248    const t = this.getGui(), { scrollTop: i, clientHeight: s } = t, { offsetTop: o, offsetHeight: n } = e;
12249    (o + n > i + s || o < i) && e.scrollIntoView({ block: "nearest" }), this.unFocusable || e.focus();
12250  }
12251  clearHighlighted() {
12252    const e = this.highlightedEl;
12253    !e || !Ne(e) || (e.classList.remove(this.activeClass), qo(e, !1), this.highlightedEl = null);
12254  }
12255  fireChangeEvent() {
12256    this.dispatchLocalEvent({ type: "fieldValueChanged" }), this.fireItemSelected();
12257  }
12258  fireItemSelected() {
12259    this.dispatchLocalEvent({ type: "selectedItem" });
12260  }
12261}, Ym = (
12262  /*css*/
12263  ".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{border:var(--ag-input-focus-border);box-shadow:var(--ag-focus-shadow)}}.ag-picker-field-button{background-color:var(--ag-background-color)}"
12264), Qm = class extends Ld {
12265  constructor(e) {
12266    if (super(
12267      e,
12268      e?.template || /* html */
12269      `
12270            <div class="ag-picker-field" role="presentation">
12271                <div data-ref="eLabel"></div>
12272                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
12273                    <div data-ref="eDisplayField" class="ag-picker-field-display"></div>
12274                    <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
12275                </div>
12276            </div>`,
12277      e?.agComponents || [],
12278      e?.className
12279    ), this.isPickerDisplayed = !1, this.skipClick = !1, this.pickerGap = 4, this.hideCurrentPicker = null, this.eLabel = M, this.eWrapper = M, this.eDisplayField = M, this.eIcon = M, this.registerCSS(Ym), this.ariaRole = e?.ariaRole, this.onPickerFocusIn = this.onPickerFocusIn.bind(this), this.onPickerFocusOut = this.onPickerFocusOut.bind(this), !e)
12280      return;
12281    const { pickerGap: t, maxPickerHeight: i, variableWidth: s, minPickerWidth: o, maxPickerWidth: n } = e;
12282    t != null && (this.pickerGap = t), this.variableWidth = !!s, i != null && this.setPickerMaxHeight(i), o != null && this.setPickerMinWidth(o), n != null && this.setPickerMaxWidth(n);
12283  }
12284  postConstruct() {
12285    super.postConstruct(), this.setupAria();
12286    const e = `ag-${this.getCompId()}-display`;
12287    this.eDisplayField.setAttribute("id", e);
12288    const t = this.getAriaElement();
12289    this.addManagedElementListeners(t, { keydown: this.onKeyDown.bind(this) }), this.addManagedElementListeners(this.eLabel, { mousedown: this.onLabelOrWrapperMouseDown.bind(this) }), this.addManagedElementListeners(this.eWrapper, { mousedown: this.onLabelOrWrapperMouseDown.bind(this) });
12290    const { pickerIcon: i, inputWidth: s } = this.config;
12291    if (i) {
12292      const o = Te(i, this.beans);
12293      o && this.eIcon.appendChild(o);
12294    }
12295    s != null && this.setInputWidth(s);
12296  }
12297  setupAria() {
12298    const e = this.getAriaElement();
12299    e.setAttribute("tabindex", this.gos.get("tabIndex").toString()), jo(e, !1), this.ariaRole && ve(e, this.ariaRole);
12300  }
12301  onLabelOrWrapperMouseDown(e) {
12302    if (e) {
12303      const t = this.getFocusableElement();
12304      if (t !== this.eWrapper && e?.target === t)
12305        return;
12306      e.preventDefault(), this.getFocusableElement().focus();
12307    }
12308    if (this.skipClick) {
12309      this.skipClick = !1;
12310      return;
12311    }
12312    this.isDisabled() || (this.isPickerDisplayed ? this.hidePicker() : this.showPicker());
12313  }
12314  onKeyDown(e) {
12315    switch (e.key) {
12316      case b.UP:
12317      case b.DOWN:
12318      case b.ENTER:
12319      case b.SPACE:
12320        e.preventDefault(), this.onLabelOrWrapperMouseDown();
12321        break;
12322      case b.ESCAPE:
12323        this.isPickerDisplayed && (e.preventDefault(), e.stopPropagation(), this.hideCurrentPicker && this.hideCurrentPicker());
12324        break;
12325    }
12326  }
12327  showPicker() {
12328    this.isPickerDisplayed = !0, this.pickerComponent || (this.pickerComponent = this.createPickerComponent());
12329    const e = this.pickerComponent.getGui();
12330    e.addEventListener("focusin", this.onPickerFocusIn), e.addEventListener("focusout", this.onPickerFocusOut), this.hideCurrentPicker = this.renderAndPositionPicker(), this.toggleExpandedStyles(!0);
12331  }
12332  renderAndPositionPicker() {
12333    const e = this.pickerComponent.getGui();
12334    this.gos.get("suppressScrollWhenPopupsAreOpen") || ([this.destroyMouseWheelFunc] = this.addManagedEventListeners({
12335      bodyScroll: () => {
12336        this.hidePicker();
12337      }
12338    }));
12339    const t = this.getLocaleTextFunc(), {
12340      config: { pickerAriaLabelKey: i, pickerAriaLabelValue: s, modalPicker: o = !0 },
12341      maxPickerHeight: n,
12342      minPickerWidth: r,
12343      maxPickerWidth: a,
12344      variableWidth: l,
12345      beans: d,
12346      eWrapper: c
12347    } = this, u = {
12348      modal: o,
12349      eChild: e,
12350      closeOnEsc: !0,
12351      closedCallback: () => {
12352        const f = Ll(d);
12353        this.beforeHidePicker(), f && this.isAlive() && this.getFocusableElement().focus();
12354      },
12355      ariaLabel: t(i, s),
12356      anchorToElement: c
12357    };
12358    e.style.position = "absolute";
12359    const h = d.popupSvc, g = h.addPopup(u);
12360    l ? (r && (e.style.minWidth = r), e.style.width = Hn(As(c)), a && (e.style.maxWidth = a)) : ks(e, a ?? As(c));
12361    const p = n ?? `${Gn(h.getPopupParent())}px`;
12362    return e.style.setProperty("max-height", p), this.alignPickerToComponent(), g.hideFunc;
12363  }
12364  alignPickerToComponent() {
12365    if (!this.pickerComponent)
12366      return;
12367    const {
12368      pickerGap: e,
12369      config: { pickerType: t },
12370      beans: { popupSvc: i, gos: s },
12371      eWrapper: o,
12372      pickerComponent: n
12373    } = this, r = s.get("enableRtl") ? "right" : "left";
12374    i.positionPopupByComponent({
12375      type: t,
12376      eventSource: o,
12377      ePopup: n.getGui(),
12378      position: "under",
12379      alignSide: r,
12380      keepWithinBounds: !0,
12381      nudgeY: e
12382    });
12383  }
12384  beforeHidePicker() {
12385    this.destroyMouseWheelFunc && (this.destroyMouseWheelFunc(), this.destroyMouseWheelFunc = void 0), this.toggleExpandedStyles(!1);
12386    const e = this.pickerComponent.getGui();
12387    e.removeEventListener("focusin", this.onPickerFocusIn), e.removeEventListener("focusout", this.onPickerFocusOut), this.isPickerDisplayed = !1, this.pickerComponent = void 0, this.hideCurrentPicker = null;
12388  }
12389  toggleExpandedStyles(e) {
12390    if (!this.isAlive())
12391      return;
12392    const t = this.getAriaElement();
12393    jo(t, e);
12394    const i = this.eWrapper.classList;
12395    i.toggle("ag-picker-expanded", e), i.toggle("ag-picker-collapsed", !e);
12396  }
12397  onPickerFocusIn() {
12398    this.togglePickerHasFocus(!0);
12399  }
12400  onPickerFocusOut(e) {
12401    this.pickerComponent?.getGui().contains(e.relatedTarget) || this.togglePickerHasFocus(!1);
12402  }
12403  togglePickerHasFocus(e) {
12404    this.pickerComponent && this.eWrapper.classList.toggle("ag-picker-has-focus", e);
12405  }
12406  hidePicker() {
12407    this.hideCurrentPicker?.();
12408  }
12409  setInputWidth(e) {
12410    return ks(this.eWrapper, e), this;
12411  }
12412  getFocusableElement() {
12413    return this.eWrapper;
12414  }
12415  setPickerGap(e) {
12416    return this.pickerGap = e, this;
12417  }
12418  setPickerMinWidth(e) {
12419    return typeof e == "number" && (e = `${e}px`), this.minPickerWidth = e ?? void 0, this;
12420  }
12421  setPickerMaxWidth(e) {
12422    return typeof e == "number" && (e = `${e}px`), this.maxPickerWidth = e ?? void 0, this;
12423  }
12424  setPickerMaxHeight(e) {
12425    return typeof e == "number" && (e = `${e}px`), this.maxPickerHeight = e ?? void 0, this;
12426  }
12427  destroy() {
12428    this.hidePicker(), super.destroy();
12429  }
12430}, Zm = (
12431  /*css*/
12432  ".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}"
12433), nr = class extends Qm {
12434  constructor(e) {
12435    super({
12436      pickerAriaLabelKey: "ariaLabelSelectField",
12437      pickerAriaLabelValue: "Select Field",
12438      pickerType: "ag-list",
12439      className: "ag-select",
12440      pickerIcon: "selectOpen",
12441      ariaRole: "combobox",
12442      ...e
12443    }), this.registerCSS(Zm);
12444  }
12445  postConstruct() {
12446    this.tooltipFeature = this.createOptionalManagedBean(
12447      this.beans.registry.createDynamicBean("tooltipFeature", !1, {
12448        shouldDisplayTooltip: Es(() => this.eDisplayField),
12449        getGui: () => this.getGui()
12450      })
12451    ), super.postConstruct(), this.createListComponent(), this.eWrapper.tabIndex = this.gos.get("tabIndex");
12452    const { options: e, value: t, placeholder: i } = this.config;
12453    e != null && this.addOptions(e), t != null && this.setValue(t, !0), i && t == null && (this.eDisplayField.textContent = i), this.addManagedElementListeners(this.eWrapper, { focusout: this.onWrapperFocusOut.bind(this) });
12454  }
12455  onWrapperFocusOut(e) {
12456    this.eWrapper.contains(e.relatedTarget) || this.hidePicker();
12457  }
12458  createListComponent() {
12459    const e = this.createBean(new qm("select", !0));
12460    this.listComponent = e, e.setParentComponent(this);
12461    const t = e.getAriaElement(), i = `ag-select-list-${e.getCompId()}`;
12462    t.setAttribute("id", i), Nh(this.getAriaElement(), t), e.addManagedListeners(e, {
12463      selectedItem: () => {
12464        this.hidePicker(), this.dispatchLocalEvent({ type: "selectedItem" });
12465      }
12466    }), e.addManagedListeners(e, {
12467      fieldValueChanged: () => {
12468        this.listComponent && (this.setValue(this.listComponent.getValue(), !1, !0), this.hidePicker());
12469      }
12470    });
12471  }
12472  createPickerComponent() {
12473    return this.listComponent;
12474  }
12475  onKeyDown(e) {
12476    const { key: t } = e;
12477    switch (t === b.TAB && this.hidePicker(), t) {
12478      case b.ENTER:
12479      case b.UP:
12480      case b.DOWN:
12481      case b.PAGE_UP:
12482      case b.PAGE_DOWN:
12483      case b.PAGE_HOME:
12484      case b.PAGE_END:
12485        e.preventDefault(), this.isPickerDisplayed ? this.listComponent?.handleKeyDown(e) : super.onKeyDown(e);
12486        break;
12487      case b.ESCAPE:
12488        super.onKeyDown(e);
12489        break;
12490      case b.SPACE:
12491        this.isPickerDisplayed ? e.preventDefault() : super.onKeyDown(e);
12492        break;
12493    }
12494  }
12495  showPicker() {
12496    const e = this.listComponent;
12497    e && (super.showPicker(), e.refreshHighlighted());
12498  }
12499  addOptions(e) {
12500    return e.forEach((t) => this.addOption(t)), this;
12501  }
12502  addOption(e) {
12503    return this.listComponent.addOption(e), this;
12504  }
12505  clearOptions() {
12506    return this.listComponent?.clearOptions(), this;
12507  }
12508  setValue(e, t, i) {
12509    const {
12510      listComponent: s,
12511      config: { placeholder: o },
12512      eDisplayField: n,
12513      tooltipFeature: r
12514    } = this;
12515    if (this.value === e || !s)
12516      return this;
12517    if (i || s.setValue(e, !0), s.getValue() === this.getValue())
12518      return this;
12519    let l = s.getDisplayValue();
12520    return l == null && o && (l = o), n.textContent = l, r?.setTooltipAndRefresh(l ?? null), super.setValue(e, t);
12521  }
12522  destroy() {
12523    this.listComponent = this.destroyBean(this.listComponent), super.destroy();
12524  }
12525}, Xm = {
12526  selector: "AG-SELECT",
12527  component: nr
12528}, Mo = {
12529  TAB_GUARD: "ag-tab-guard",
12530  TAB_GUARD_TOP: "ag-tab-guard-top",
12531  TAB_GUARD_BOTTOM: "ag-tab-guard-bottom"
12532}, Jm = class extends y {
12533  constructor(e) {
12534    super(), this.skipTabGuardFocus = !1, this.forcingFocusOut = !1, this.allowFocus = !1;
12535    const {
12536      comp: t,
12537      eTopGuard: i,
12538      eBottomGuard: s,
12539      focusTrapActive: o,
12540      forceFocusOutWhenTabGuardsAreEmpty: n,
12541      isFocusableContainer: r,
12542      focusInnerElement: a,
12543      onFocusIn: l,
12544      onFocusOut: d,
12545      shouldStopEventPropagation: c,
12546      onTabKeyDown: u,
12547      handleKeyDown: h,
12548      eFocusableElement: g
12549    } = e;
12550    this.comp = t, this.eTopGuard = i, this.eBottomGuard = s, this.providedFocusInnerElement = a, this.eFocusableElement = g, this.focusTrapActive = !!o, this.forceFocusOutWhenTabGuardsAreEmpty = !!n, this.isFocusableContainer = !!r, this.providedFocusIn = l, this.providedFocusOut = d, this.providedShouldStopEventPropagation = c, this.providedOnTabKeyDown = u, this.providedHandleKeyDown = h;
12551  }
12552  postConstruct() {
12553    this.createManagedBean(
12554      new xi(this.eFocusableElement, {
12555        shouldStopEventPropagation: () => this.shouldStopEventPropagation(),
12556        onTabKeyDown: (e) => this.onTabKeyDown(e),
12557        handleKeyDown: (e) => this.handleKeyDown(e),
12558        onFocusIn: (e) => this.onFocusIn(e),
12559        onFocusOut: (e) => this.onFocusOut(e)
12560      })
12561    ), this.activateTabGuards(), [this.eTopGuard, this.eBottomGuard].forEach(
12562      (e) => this.addManagedElementListeners(e, { focus: this.onFocus.bind(this) })
12563    );
12564  }
12565  handleKeyDown(e) {
12566    this.providedHandleKeyDown && this.providedHandleKeyDown(e);
12567  }
12568  tabGuardsAreActive() {
12569    return !!this.eTopGuard && this.eTopGuard.hasAttribute("tabIndex");
12570  }
12571  shouldStopEventPropagation() {
12572    return this.providedShouldStopEventPropagation ? this.providedShouldStopEventPropagation() : !1;
12573  }
12574  activateTabGuards() {
12575    if (this.forcingFocusOut)
12576      return;
12577    const e = this.gos.get("tabIndex");
12578    this.comp.setTabIndex(e.toString());
12579  }
12580  deactivateTabGuards() {
12581    this.comp.setTabIndex();
12582  }
12583  onFocus(e) {
12584    if (this.isFocusableContainer && !this.eFocusableElement.contains(e.relatedTarget) && !this.allowFocus) {
12585      this.findNextElementOutsideAndFocus(e.target === this.eBottomGuard);
12586      return;
12587    }
12588    if (this.skipTabGuardFocus) {
12589      this.skipTabGuardFocus = !1;
12590      return;
12591    }
12592    if (this.forceFocusOutWhenTabGuardsAreEmpty && ai(this.eFocusableElement, ".ag-tab-guard").length === 0) {
12593      this.findNextElementOutsideAndFocus(e.target === this.eBottomGuard);
12594      return;
12595    }
12596    if (this.isFocusableContainer && this.eFocusableElement.contains(e.relatedTarget))
12597      return;
12598    const t = e.target === this.eBottomGuard;
12599    this.providedFocusInnerElement ? this.providedFocusInnerElement(t) : this.focusInnerElement(t);
12600  }
12601  findNextElementOutsideAndFocus(e) {
12602    const t = te(this.beans), i = ai(t.body, null, !0), s = i.indexOf(e ? this.eTopGuard : this.eBottomGuard);
12603    if (s === -1)
12604      return;
12605    let o, n;
12606    e ? (o = 0, n = s) : (o = s + 1, n = i.length);
12607    const r = i.slice(o, n), a = this.gos.get("tabIndex");
12608    r.sort((l, d) => {
12609      const c = parseInt(l.getAttribute("tabindex") || "0"), u = parseInt(d.getAttribute("tabindex") || "0");
12610      return u === a ? 1 : c === a ? -1 : c === 0 ? 1 : u === 0 ? -1 : c - u;
12611    }
12611), r[e ? r.length - 1 : 0]?.focus();
12612  }
12613  onFocusIn(e) {
12614    this.focusTrapActive || this.forcingFocusOut || (this.providedFocusIn && this.providedFocusIn(e), this.isFocusableContainer || this.deactivateTabGuards());
12615  }
12616  onFocusOut(e) {
12617    this.focusTrapActive || (this.providedFocusOut && this.providedFocusOut(e), this.eFocusableElement.contains(e.relatedTarget) || this.activateTabGuards());
12618  }
12619  onTabKeyDown(e) {
12620    if (this.providedOnTabKeyDown) {
12621      this.providedOnTabKeyDown(e);
12622      return;
12623    }
12624    if (this.focusTrapActive || e.defaultPrevented)
12625      return;
12626    const t = this.tabGuardsAreActive();
12627    t && this.deactivateTabGuards();
12628    const i = this.getNextFocusableElement(e.shiftKey);
12629    t && setTimeout(() => this.activateTabGuards(), 0), i && (i.focus(), e.preventDefault());
12630  }
12631  focusInnerElement(e = !1) {
12632    const t = ai(this.eFocusableElement);
12633    this.tabGuardsAreActive() && (t.splice(0, 1), t.splice(t.length - 1, 1)), t.length && t[e ? t.length - 1 : 0].focus({ preventScroll: !0 });
12634  }
12635  getNextFocusableElement(e) {
12636    return zt(this.beans, this.eFocusableElement, !1, e);
12637  }
12638  forceFocusOutOfContainer(e = !1) {
12639    if (this.forcingFocusOut)
12640      return;
12641    const t = e ? this.eTopGuard : this.eBottomGuard;
12642    this.activateTabGuards(), this.skipTabGuardFocus = !0, this.forcingFocusOut = !0, t.focus(), window.setTimeout(() => {
12643      this.forcingFocusOut = !1, this.activateTabGuards();
12644    });
12645  }
12646  isTabGuard(e, t) {
12647    return e === this.eTopGuard && !t || e === this.eBottomGuard && (t ?? !0);
12648  }
12649  setAllowFocus(e) {
12650    this.allowFocus = e;
12651  }
12652}, eC = class extends y {
12653  constructor(e) {
12654    super(), this.comp = e;
12655  }
12656  initialiseTabGuard(e) {
12657    this.eTopGuard = this.createTabGuard("top"), this.eBottomGuard = this.createTabGuard("bottom"), this.eFocusableElement = this.comp.getFocusableElement();
12658    const { eTopGuard: t, eBottomGuard: i, eFocusableElement: s } = this, o = [t, i], n = {
12659      setTabIndex: (f) => {
12660        o.forEach(
12661          (m) => f != null ? m.setAttribute("tabindex", f) : m.removeAttribute("tabindex")
12662        );
12663      }
12664    };
12665    this.addTabGuards(t, i);
12666    const {
12667      focusTrapActive: r = !1,
12668      onFocusIn: a,
12669      onFocusOut: l,
12670      focusInnerElement: d,
12671      handleKeyDown: c,
12672      onTabKeyDown: u,
12673      shouldStopEventPropagation: h,
12674      forceFocusOutWhenTabGuardsAreEmpty: g,
12675      isFocusableContainer: p
12676    } = e;
12677    this.tabGuardCtrl = this.createManagedBean(
12678      new Jm({
12679        comp: n,
12680        focusTrapActive: r,
12681        eTopGuard: t,
12682        eBottomGuard: i,
12683        eFocusableElement: s,
12684        onFocusIn: a,
12685        onFocusOut: l,
12686        focusInnerElement: d,
12687        handleKeyDown: c,
12688        onTabKeyDown: u,
12689        shouldStopEventPropagation: h,
12690        forceFocusOutWhenTabGuardsAreEmpty: g,
12691        isFocusableContainer: p
12692      })
12693    );
12694  }
12695  getTabGuardCtrl() {
12696    return this.tabGuardCtrl;
12697  }
12698  createTabGuard(e) {
12699    const t = te(this.beans).createElement("div"), i = e === "top" ? Mo.TAB_GUARD_TOP : Mo.TAB_GUARD_BOTTOM;
12700    return t.classList.add(Mo.TAB_GUARD, i), ve(t, "presentation"), t;
12701  }
12702  addTabGuards(e, t) {
12703    const i = this.eFocusableElement;
12704    i.insertAdjacentElement("afterbegin", e), i.insertAdjacentElement("beforeend", t);
12705  }
12706  removeAllChildrenExceptTabGuards() {
12707    const e = [this.eTopGuard, this.eBottomGuard];
12708    ue(this.comp.getFocusableElement()), this.addTabGuards(...e);
12709  }
12710  forceFocusOutOfContainer(e = !1) {
12711    this.tabGuardCtrl.forceFocusOutOfContainer(e);
12712  }
12713  appendChild(e, t, i) {
12714    Bn(t) || (t = t.getGui());
12715    const { eBottomGuard: s } = this;
12716    s ? s.insertAdjacentElement("beforebegin", t) : e(t, i);
12717  }
12718}, Gd = class extends _ {
12719  initialiseTabGuard(e) {
12720    this.tabGuardFeature = this.createManagedBean(new eC(this)), this.tabGuardFeature.initialiseTabGuard(e);
12721  }
12722  forceFocusOutOfContainer(e = !1) {
12723    this.tabGuardFeature.forceFocusOutOfContainer(e);
12724  }
12725  appendChild(e, t) {
12726    this.tabGuardFeature.appendChild(super.appendChild.bind(this), e, t);
12727  }
12728}, Pi = class extends _ {
12729  isPopup() {
12730    return !0;
12731  }
12732  setParentComponent(e) {
12733    e.addCssClass("ag-has-popup"), super.setParentComponent(e);
12734  }
12735  destroy() {
12736    const e = this.parentComponent;
12737    e && e.isAlive() && e.getGui().classList.remove("ag-has-popup"), super.destroy();
12738  }
12739}, Zt = class {
12740  constructor(e, t = !1) {
12741    this.DOUBLE_TAP_MILLIS = 500, this.destroyFuncs = [], this.touching = !1, this.localEventService = new Fi(), this.preventMouseClick = t;
12742    const i = this.onTouchStart.bind(this), s = this.onTouchMove.bind(this), o = this.onTouchEnd.bind(this);
12743    e.addEventListener("touchstart", i, { passive: !0 }), e.addEventListener("touchmove", s, { passive: !0 }), e.addEventListener("touchend", o, { passive: !1 }), this.destroyFuncs.push(() => {
12744      e.removeEventListener("touchstart", i, { passive: !0 }), e.removeEventListener("touchmove", s, { passive: !0 }), e.removeEventListener("touchend", o, { passive: !1 });
12745    });
12746  }
12747  getActiveTouch(e) {
12748    for (let t = 0; t < e.length; t++)
12749      if (e[t].identifier === this.touchStart.identifier)
12750        return e[t];
12751    return null;
12752  }
12753  addEventListener(e, t) {
12754    this.localEventService.addEventListener(e, t);
12755  }
12756  removeEventListener(e, t) {
12757    this.localEventService.removeEventListener(e, t);
12758  }
12759  onTouchStart(e) {
12760    if (this.touching)
12761      return;
12762    this.touchStart = e.touches[0], this.touching = !0, this.moved = !1;
12763    const t = this.touchStart;
12764    window.setTimeout(() => {
12765      const i = this.touchStart === t;
12766      if (this.touching && i && !this.moved) {
12767        this.moved = !0;
12768        const s = {
12769          type: "longTap",
12770          touchStart: this.touchStart,
12771          touchEvent: e
12772        };
12773        this.localEventService.dispatchEvent(s);
12774      }
12775    }, 500);
12776  }
12777  onTouchMove(e) {
12778    if (!this.touching)
12779      return;
12780    const t = this.getActiveTouch(e.touches);
12781    if (!t)
12782      return;
12783    !Cd(t, this.touchStart, 4) && (this.moved = !0);
12784  }
12785  onTouchEnd(e) {
12786    if (this.touching) {
12787      if (!this.moved) {
12788        const t = {
12789          type: "tap",
12790          touchStart: this.touchStart
12791        };
12792        this.localEventService.dispatchEvent(t), this.checkForDoubleTap();
12793      }
12794      this.preventMouseClick && e.cancelable && e.preventDefault(), this.touching = !1;
12795    }
12796  }
12797  checkForDoubleTap() {
12798    const e = (/* @__PURE__ */ new Date()).getTime();
12799    if (this.lastTapTime && this.lastTapTime > 0)
12800      if (e - this.lastTapTime > this.DOUBLE_TAP_MILLIS) {
12801        const i = {
12802          type: "doubleTap",
12803          touchStart: this.touchStart
12804        };
12805        this.localEventService.dispatchEvent(i), this.lastTapTime = null;
12806      } else
12807        this.lastTapTime = e;
12808    else
12809      this.lastTapTime = e;
12810  }
12811  destroy() {
12812    this.destroyFuncs.forEach((e) => e());
12813  }
12814}, Hd = class {
12815  constructor(e = "javascript") {
12816    this.frameworkName = e, this.renderingEngine = "vanilla", this.wrapIncoming = (t) => t(), this.wrapOutgoing = (t) => t(), this.baseDocLink = `${xl}/${this.frameworkName}-data-grid`, Jh(this.baseDocLink);
12817  }
12818  setInterval(e, t) {
12819    return new ye((i) => {
12820      i(window.setInterval(e, t));
12821    });
12822  }
12823  // for Vanilla JS, we just add the event to the element
12824  addEventListener(e, t, i, s) {
12825    let o = {};
12826    if (typeof s == "object" ? o = s : typeof s == "boolean" && (o = { capture: s }), o.passive == null) {
12827      const n = Wl(t);
12828      n != null && (o.passive = n);
12829    }
12830    e.addEventListener(t, i, o);
12831  }
12832  frameworkComponent(e) {
12833    return null;
12834  }
12835  isFrameworkComponent(e) {
12836    return !1;
12837  }
12838  getDocLink(e) {
12839    return `${this.baseDocLink}${e ? `/${e}` : ""}`;
12840  }
12841};
12842function tC(e) {
12843  return {
12844    beanName: "gridApi",
12845    bean: e.getBean("apiFunctionSvc").api
12846  };
12847}
12848var iC = [
12849  // Validate license first
12850  "licenseManager",
12851  // core beans only
12852  "environment",
12853  "eventSvc",
12854  "gos",
12855  "paginationAutoPageSizeSvc",
12856  "apiFunctionSvc",
12857  "gridApi",
12858  "registry",
12859  "agCompUtils",
12860  "userCompFactory",
12861  "rowContainerHeight",
12862  "horizontalResizeSvc",
12863  "localeSvc",
12864  "pinnedRowModel",
12865  "dragSvc",
12866  "colGroupSvc",
12867  "visibleCols",
12868  "popupSvc",
12869  "selectionSvc",
12870  "colFilter",
12871  "quickFilter",
12872  "filterManager",
12873  "colModel",
12874  "headerNavigation",
12875  "pageBounds",
12876  "pagination",
12877  "pageBoundsListener",
12878  "stickyRowSvc",
12879  "rowRenderer",
12880  "expressionSvc",
12881  "alignedGridsSvc",
12882  "navigation",
12883  "valueCache",
12884  "valueSvc",
12885  "autoWidthCalc",
12886  "filterMenuFactory",
12887  "dragAndDrop",
12888  "focusSvc",
12889  "cellNavigation",
12890  "cellStyles",
12891  "scrollVisibleSvc",
12892  "sortSvc",
12893  "colHover",
12894  "colAnimation",
12895  "autoColSvc",
12896  "selectionColSvc",
12897  "changeDetectionSvc",
12898  "animationFrameSvc",
12899  "undoRedo",
12900  "colDefFactory",
12901  "rowStyleSvc",
12902  "rowNodeBlockLoader",
12903  "rowNodeSorter",
12904  "ctrlsSvc",
12905  "pinnedCols",
12906  "dataTypeSvc",
12907  "syncSvc",
12908  "overlays",
12909  "stateSvc",
12910  "expansionSvc",
12911  "apiEventSvc",
12912  "ariaAnnounce",
12913  "menuSvc",
12914  "colMoves",
12915  "colAutosize",
12916  "colFlex",
12917  "colResize",
12918  "pivotColsSvc",
12919  "valueColsSvc",
12920  "rowGroupColsSvc",
12921  "funcColsSvc",
12922  "colNames",
12923  "colViewport",
12924  "pivotResultCols",
12925  "showRowGroupCols",
12926  "validation"
12927  // Have validations run last
12928], ha = Object.fromEntries(
12929  iC.map((e, t) => [e, t])
12930);
12931function sC(e, t) {
12932  const i = (e.beanName ? ha[e.beanName] : void 0) ?? Number.MAX_SAFE_INTEGER, s = (t.beanName ? ha[t.beanName] : void 0) ?? Number.MAX_SAFE_INTEGER;
12933  return i - s;
12934}
12935function oC(e, t) {
12936  return e?.beanName === "gridDestroySvc" ? -1 : 0;
12937}
12938var nC = (
12939  /* html */
12940  '<div class="ag-pinned-left-header" role="rowgroup"></div>'
12941), rC = (
12942  /* html */
12943  '<div class="ag-pinned-right-header" role="rowgroup"></div>'
12944), aC = (
12945  /* html */
12946  `<div class="ag-header-viewport" role="presentation">
12947        <div class="ag-header-container" data-ref="eCenterContainer" role="rowgroup"></div>
12948    </div>`
12949), Io = class extends _ {
12950  constructor(e) {
12951    super(), this.eCenterContainer = M, this.headerRowComps = {}, this.rowCompsList = [], this.pinned = e;
12952  }
12953  postConstruct() {
12954    this.selectAndSetTemplate();
12955    const e = {
12956      setDisplayed: (i) => this.setDisplayed(i),
12957      setCtrls: (i) => this.setCtrls(i),
12958      // only gets called for center section
12959      setCenterWidth: (i) => this.eCenterContainer.style.width = i,
12960      setViewportScrollLeft: (i) => this.getGui().scrollLeft = i,
12961      // only gets called for pinned sections
12962      setPinnedContainerWidth: (i) => {
12963        const s = this.getGui();
12964        s.style.width = i, s.style.maxWidth = i, s.style.minWidth = i;
12965      }
12966    };
12967    this.createManagedBean(new ym(this.pinned)).setComp(e, this.getGui());
12968  }
12969  selectAndSetTemplate() {
12970    const e = this.pinned == "left", t = this.pinned == "right", i = e ? nC : t ? rC : aC;
12971    this.setTemplate(i), this.eRowContainer = this.eCenterContainer !== M ? this.eCenterContainer : this.getGui();
12972  }
12973  destroy() {
12974    this.setCtrls([]), super.destroy();
12975  }
12976  destroyRowComp(e) {
12977    this.destroyBean(e), this.eRowContainer.removeChild(e.getGui());
12978  }
12979  setCtrls(e) {
12980    const t = this.headerRowComps;
12981    this.headerRowComps = {}, this.rowCompsList = [];
12982    let i;
12983    const s = (o) => {
12984      const n = o.getGui();
12985      n.parentElement != this.eRowContainer && this.eRowContainer.appendChild(n), i && bl(this.eRowContainer, n, i), i = n;
12986    };
12987    e.forEach((o) => {
12988      const n = o.instanceId, r = t[n];
12989      delete t[n];
12990      const a = r || this.createBean(new vm(o));
12991      this.headerRowComps[n] = a, this.rowCompsList.push(a), s(a);
12992    }), Object.values(t).forEach((o) => this.destroyRowComp(o));
12993  }
12994}, lC = class extends _ {
12995  constructor() {
12996    super(
12997      /* html */
12998      '<div class="ag-header" role="presentation"/>'
12999    );
13000  }
13001  postConstruct() {
13002    const e = {
13003      addOrRemoveCssClass: (s, o) => this.addOrRemoveCssClass(s, o),
13004      setHeightAndMinHeight: (s) => {
13005        this.getGui().style.height = s, this.getGui().style.minHeight = s;
13006      }
13007    };
13008    this.createManagedBean(new pm()).setComp(e, this.getGui(), this.getFocusableElement());
13009    const i = (s) => {
13010      this.createManagedBean(s), this.appendChild(s);
13011    };
13012    i(new Io("left")), i(new Io(null)), i(new Io("right"));
13013  }
13014}, dC = {
13015  selector: "AG-HEADER-ROOT",
13016  component: lC
13017}, cC = class extends _ {
13018  constructor(e, t, i, s, o) {
13019    super(), this.cellCtrl = t, this.rendererVersion = 0, this.editorVersion = 0, this.beans = e, this.column = t.column, this.rowNode = t.rowNode, this.eRow = s;
13020    const n = document.createElement("div");
13021    n.setAttribute("comp-id", `${this.getCompId()}`), this.setTemplateFromElement(n);
13022    const r = this.getGui();
13023    this.forceWrapper = t.isForceWrapper(), this.refreshWrapper(!1), ve(r, t.getCellAriaRole()), r.setAttribute("col-id", t.colIdSanitised);
13024    const a = {
13025      addOrRemoveCssClass: (l, d) => this.addOrRemoveCssClass(l, d),
13026      setUserStyles: (l) => Rl(r, l),
13027      getFocusableElement: () => this.getFocusableElement(),
13028      setIncludeSelection: (l) => this.includeSelection = l,
13029      setIncludeRowDrag: (l) => this.includeRowDrag = l,
13030      setIncludeDndSource: (l) => this.includeDndSource = l,
13031      setRenderDetails: (l, d, c) => this.setRenderDetails(l, d, c),
13032      setEditDetails: (l, d, c) => this.setEditDetails(l, d, c),
13033      getCellEditor: () => this.cellEditor || null,
13034      getCellRenderer: () => this.cellRenderer || null,
13035      getParentOfValue: () => this.getParentOfValue()
13036    };
13037    t.setComp(a, this.getGui(), this.eCellWrapper, i, o, void 0);
13038  }
13039  getParentOfValue() {
13040    return this.eCellValue ? this.eCellValue : this.eCellWrapper ? this.eCellWrapper : this.getGui();
13041  }
13042  setRenderDetails(e, t, i) {
13043    if (this.cellEditor && !this.cellEditorPopupWrapper)
13044      return;
13045    this.firstRender = this.firstRender == null;
13046    const o = this.refreshWrapper(!1);
13047    this.refreshEditStyles(!1), e ? !(i || o) && this.refreshCellRenderer(e) || (this.destroyRenderer(), this.createCellRendererInstance(e)) : (this.destroyRenderer(), this.insertValueWithoutCellRenderer(t));
13048  }
13049  setEditDetails(e, t, i) {
13050    e ? this.createCellEditorInstance(e, t, i) : this.destroyEditor();
13051  }
13052  removeControls() {
13053    this.checkboxSelectionComp = this.beans.context.destroyBean(this.checkboxSelectionComp), this.dndSourceComp = this.beans.context.destroyBean(this.dndSourceComp), this.rowDraggingComp = this.beans.context.destroyBean(this.rowDraggingComp);
13054  }
13055  // returns true if wrapper was changed
13056  refreshWrapper(e) {
13057    const t = this.includeRowDrag || this.includeDndSource || this.includeSelection, i = t || this.forceWrapper, s = i && this.eCellWrapper == null;
13058    if (s) {
13059      const d = document.createElement("div");
13060      d.setAttribute("role", "presentation"), d.setAttribute("class", "ag-cell-wrapper"), this.eCellWrapper = d, this.getGui().appendChild(this.eCellWrapper);
13061    }
13062    const o = !i && this.eCellWrapper != null;
13063    o && (qe(this.eCellWrapper), this.eCellWrapper = void 0), this.addOrRemoveCssClass("ag-cell-value", !i);
13064    const n = !e && i, r = n && this.eCellValue == null;
13065    if (r) {
13066      const d = document.createElement("span");
13067      d.setAttribute("role", "presentation"), d.setAttribute("class", "ag-cell-value"), this.eCellValue = d, this.eCellWrapper.appendChild(this.eCellValue);
13068    }
13069    const a = !n && this.eCellValue != null;
13070    a && (qe(this.eCellValue), this.eCellValue = void 0);
13071    const l = s || o || r || a;
13072    return l && this.removeControls(), e || t && this.addControls(), l;
13073  }
13074  addControls() {
13075    this.includeRowDrag && this.rowDraggingComp == null && (this.rowDraggingComp = this.cellCtrl.createRowDragComp(), this.rowDraggingComp && this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(), this.eCellValue)), this.includeDndSource && this.dndSourceComp == null && (this.dndSourceComp = this.cellCtrl.createDndSource(), this.dndSourceComp && this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(), this.eCellValue)), this.includeSelection && this.checkboxSelectionComp == null && (this.checkboxSelectionComp = this.cellCtrl.createSelectionCheckbox(), this.checkboxSelectionComp && this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(), this.eCellValue));
13076  }
13077  createCellEditorInstance(e, t, i) {
13078    const s = this.editorVersion, o = e.newAgStackInstance(), { params: n } = e;
13079    o.then((a) => this.afterCellEditorCreated(s, a, n, t, i)), Y(this.cellEditor) && n.cellStartedEdit && this.cellCtrl.focusCell(!0);
13080  }
13081  insertValueWithoutCellRenderer(e) {
13082    const t = this.getParentOfValue();
13083    ue(t);
13084    const i = e != null ? Ze(e, !0) : null;
13085    i != null && (t.textContent = i);
13086  }
13087  destroyEditorAndRenderer() {
13088    this.destroyRenderer(), this.destroyEditor();
13089  }
13090  destroyRenderer() {
13091    const { context: e } = this.beans;
13092    this.cellRenderer = e.destroyBean(this.cellRenderer), qe(this.cellRendererGui), this.cellRendererGui = null, this.rendererVersion++;
13093  }
13094  destroyEditor() {
13095    const { context: e } = this.beans;
13096    this.hideEditorPopup && this.hideEditorPopup(), this.hideEditorPopup = void 0, this.cellEditor = e.destroyBean(this.cellEditor), this.cellEditorPopupWrapper = e.destroyBean(this.cellEditorPopupWrapper), qe(this.cellEditorGui), this.cellEditorGui = null, this.editorVersion++;
13097  }
13098  refreshCellRenderer(e) {
13099    if (this.cellRenderer == null || this.cellRenderer.refresh == null || this.cellRendererClass !== e.componentClass)
13100      return !1;
13101    const t = this.cellRenderer.refresh(e.params);
13102    return t === !0 || t === void 0;
13103  }
13104  createCellRendererInstance(e) {
13105    const i = !this.beans.gos.get("suppressAnimationFrame") && this.beans.animationFrameSvc, s = this.rendererVersion, { componentClass: o } = e, n = () => {
13106      if (this.rendererVersion !== s || !this.isAlive())
13107        return;
13108      const a = e.newAgStackInstance(), l = this.afterCellRendererCreated.bind(this, s, o);
13109      a && a.then(l);
13110    };
13111    i && this.firstRender ? this.beans.animationFrameSvc.createTask(n, this.rowNode.rowIndex, "createTasksP2") : n();
13112  }
13113  afterCellRendererCreated(e, t, i) {
13114    if (!this.isAlive() || e !== this.rendererVersion) {
13115      this.beans.context.destroyBean(i);
13116      return;
13117    }
13118    if (this.cellRenderer = i, this.cellRendererClass = t, this.cellRendererGui = this.cellRenderer.getGui(), this.cellRendererGui != null) {
13119      const o = this.getParentOfValue();
13120      ue(o), o.appendChild(this.cellRendererGui);
13121    }
13122  }
13123  afterCellEditorCreated(e, t, i, s, o) {
13124    if (e !== this.editorVersion) {
13125      this.beans.context.destroyBean(t);
13126      return;
13127    }
13128    if (t.isCancelBeforeStart && t.isCancelBeforeStart()) {
13129      this.beans.context.destroyBean(t), this.cellCtrl.stopEditing(!0);
13130      return;
13131    }
13132    if (!t.getGui) {
13133      x(97, { colId: this.column.getId() }), this.beans.context.destroyBean(t);
13134      return;
13135    }
13136    this.cellEditor = t, this.cellEditorGui = t.getGui();
13137    const a = s || t.isPopup !== void 0 && t.isPopup();
13138    a ? this.addPopupCellEditor(i, o) : this.addInCellEditor(), this.refreshEditStyles(!0, a), t.afterGuiAttached && t.afterGuiAttached(), this.cellCtrl.cellEditorAttached();
13139  }
13140  refreshEditStyles(e, t) {
13141    this.addOrRemoveCssClass("ag-cell-inline-editing", e && !t), this.addOrRemoveCssClass("ag-cell-popup-editing", e && !!t), this.addOrRemoveCssClass("ag-cell-not-inline-editing", !e || !!t), this.cellCtrl.setInlineEditingCss();
13142  }
13143  addInCellEditor() {
13144    const e = this.getGui();
13145    e.contains(Z(this.beans)) && e.focus(), this.destroyRenderer(), this.refreshWrapper(!0), this.clearParentOfValue(), this.cellEditorGui && this.getParentOfValue().appendChild(this.cellEditorGui);
13146  }
13147  addPopupCellEditor(e, t) {
13148    this.beans.gos.get("editType") === "fullRow" && x(98);
13149    const i = this.cellEditor;
13150    this.cellEditorPopupWrapper = this.beans.context.createBean(
13151      this.beans.editSvc.createPopupEditorWrapper(e)
13152    );
13153    const s = this.cellEditorPopupWrapper.getGui();
13154    this.cellEditorGui && s.appendChild(this.cellEditorGui);
13155    const o = this.beans.popupSvc, n = this.beans.gos.get("stopEditingWhenCellsLoseFocus"), r = t ?? i.getPopupPosition?.() ?? "over", a = this.beans.gos.get("enableRtl"), l = {
13156      ePopup: s,
13157      column: this.column,
13158      rowNode: this.rowNode,
13159      type: "popupCellEditor",
13160      eventSource: this.getGui(),
13161      position: r,
13162      alignSide: a ? "right" : "left",
13163      keepWithinBounds: !0
13164    }, d = o.positionPopupByComponent.bind(o, l), c = nl(this.beans.localeSvc), u = o.addPopup({
13165      modal: n,
13166      eChild: s,
13167      closeOnEsc: !0,
13168      closedCallback: () => {
13169        this.cellCtrl.onPopupEditorClosed();
13170      },
13171      anchorToElement: this.getGui(),
13172      positionCallback: d,
13173      ariaLabel: c("ariaLabelCellEditor", "Cell Editor")
13174    });
13175    u && (this.hideEditorPopup = u.hideFunc);
13176  }
13177  detach() {
13178    this.eRow.removeChild(this.getGui());
13179  }
13180  // if the row is also getting destroyed, then we don't need to remove from dom,
13181  // as the row will also get removed, so no need to take out the cells from the row
13182  // if the row is going (removing is an expensive operation, so only need to remove
13183  // the top part)
13184  //
13185  // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.
13186  destroy() {
13187    this.cellCtrl.stopEditing(), this.destroyEditorAndRenderer(), this.removeControls(), super.destroy();
13188  }
13189  clearParentOfValue() {
13190    const e = this.getGui();
13191    e.contains(Z(this.beans)) && e.focus({ preventScroll: !0 }), ue(this.getParentOfValue());
13192  }
13193}, uC = class extends _ {
13194  constructor(e, t, i) {
13195    super(), this.cellComps = {}, this.beans = t, this.rowCtrl = e;
13196    const s = document.createElement("div");
13197    s.setAttribute("comp-id", `${this.getCompId()}`), s.setAttribute("style", this.getInitialStyle(i)), this.setTemplateFromElement(s);
13198    const o = this.getGui(), n = o.style;
13199    this.domOrder = this.rowCtrl.getDomOrder(), ve(o, "row");
13200    const r = {
13201      setDomOrder: (a) => this.domOrder = a,
13202      setCellCtrls: (a) => this.setCellCtrls(a),
13203      showFullWidth: (a) =>
13203 this.showFullWidth(a),
13204      getFullWidthCellRenderer: () => this.fullWidthCellRenderer,
13205      addOrRemoveCssClass: (a, l) => this.addOrRemoveCssClass(a, l),
13206      setUserStyles: (a) => Rl(o, a),
13207      setTop: (a) => n.top = a,
13208      setTransform: (a) => n.transform = a,
13209      setRowIndex: (a) => o.setAttribute("row-index", a),
13210      setRowId: (a) => o.setAttribute("row-id", a),
13211      setRowBusinessKey: (a) => o.setAttribute("row-business-key", a),
13212      refreshFullWidth: (a) => this.fullWidthCellRenderer?.refresh?.(a()) ?? !1
13213    };
13214    e.setComp(r, this.getGui(), i, void 0), this.addDestroyFunc(() => {
13215      e.unsetComp(i);
13216    });
13217  }
13218  getInitialStyle(e) {
13219    const t = this.rowCtrl.getInitialTransform(e);
13220    return t ? `transform: ${t}` : `top: ${this.rowCtrl.getInitialRowTop(e)}`;
13221  }
13222  showFullWidth(e) {
13223    const t = (s) => {
13224      if (this.isAlive()) {
13225        const o = s.getGui();
13226        this.getGui().appendChild(o), this.rowCtrl.setupDetailRowAutoHeight(o), this.setFullWidthRowComp(s);
13227      } else
13228        this.beans.context.destroyBean(s);
13229    };
13230    e.newAgStackInstance().then(t);
13231  }
13232  setCellCtrls(e) {
13233    const t = Object.assign({}, this.cellComps);
13234    e.forEach((s) => {
13235      const o = s.instanceId;
13236      this.cellComps[o] == null ? this.newCellComp(s) : t[o] = null;
13237    });
13238    const i = Object.values(t).filter((s) => s != null);
13239    this.destroyCells(i), this.ensureDomOrder(e);
13240  }
13241  ensureDomOrder(e) {
13242    if (!this.domOrder)
13243      return;
13244    const t = [];
13245    e.forEach((i) => {
13246      const s = this.cellComps[i.instanceId];
13247      s && t.push(s.getGui());
13248    }), yl(this.getGui(), t);
13249  }
13250  newCellComp(e) {
13251    const t = new cC(
13252      this.beans,
13253      e,
13254      this.rowCtrl.printLayout,
13255      this.getGui(),
13256      this.rowCtrl.editing
13257    );
13258    this.cellComps[e.instanceId] = t, this.getGui().appendChild(t.getGui());
13259  }
13260  destroy() {
13261    super.destroy(), this.destroyAllCells();
13262  }
13263  destroyAllCells() {
13264    const e = Object.values(this.cellComps).filter((t) => t != null);
13265    this.destroyCells(e);
13266  }
13267  setFullWidthRowComp(e) {
13268    this.fullWidthCellRenderer = e, this.addDestroyFunc(() => {
13269      this.fullWidthCellRenderer = this.beans.context.destroyBean(this.fullWidthCellRenderer);
13270    });
13271  }
13272  destroyCells(e) {
13273    e.forEach((t) => {
13274      if (!t)
13275        return;
13276      const i = t.cellCtrl.instanceId;
13277      this.cellComps[i] === t && (t.detach(), t.destroy(), this.cellComps[i] = null);
13278    });
13279  }
13280};
13281function hC(e) {
13282  let t;
13283  return e.type === "center" ? t = /* html */
13284  `<div class="${e.viewport}" data-ref="eViewport" role="presentation">
13285                <div class="${e.container}" data-ref="eContainer"></div>
13286            </div>` : t = /* html */
13287  `<div class="${e.container}" data-ref="eContainer"></div>`, t;
13288}
13289var gC = class extends _ {
13290  constructor(e) {
13291    super(), this.eViewport = M, this.eContainer = M, this.rowComps = {}, this.name = e?.name, this.options = Jt(this.name), this.setTemplate(hC(this.options));
13292  }
13293  postConstruct() {
13294    const e = {
13295      setHorizontalScroll: (i) => this.eViewport.scrollLeft = i,
13296      setViewportHeight: (i) => this.eViewport.style.height = i,
13297      setRowCtrls: ({ rowCtrls: i }) => this.setRowCtrls(i),
13298      setDomOrder: (i) => {
13299        this.domOrder = i;
13300      },
13301      setContainerWidth: (i) => this.eContainer.style.width = i,
13302      setOffsetTop: (i) => this.eContainer.style.transform = `translateY(${i})`
13303    };
13304    this.createManagedBean(new im(this.name)).setComp(e, this.eContainer, this.eViewport);
13305  }
13306  destroy() {
13307    this.setRowCtrls([]), super.destroy();
13308  }
13309  setRowCtrls(e) {
13310    const t = { ...this.rowComps };
13311    this.rowComps = {}, this.lastPlacedElement = null;
13312    const i = (s) => {
13313      const o = s.instanceId, n = t[o];
13314      if (n)
13315        this.rowComps[o] = n, delete t[o], this.ensureDomOrder(n.getGui());
13316      else {
13317        if (!s.rowNode.displayed)
13318          return;
13319        const r = new uC(s, this.beans, this.options.type);
13320        this.rowComps[o] = r, this.appendRow(r.getGui());
13321      }
13322    };
13323    e.forEach(i), Object.values(t).forEach((s) => {
13324      this.eContainer.removeChild(s.getGui()), s.destroy();
13325    }), ve(this.eContainer, "rowgroup");
13326  }
13327  appendRow(e) {
13328    this.domOrder ? Uh(this.eContainer, e, this.lastPlacedElement) : this.eContainer.appendChild(e), this.lastPlacedElement = e;
13329  }
13330  ensureDomOrder(e) {
13331    this.domOrder && (bl(this.eContainer, e, this.lastPlacedElement), this.lastPlacedElement = e);
13332  }
13333}, pC = {
13334  selector: "AG-ROW-CONTAINER",
13335  component: gC
13336};
13337function Ai(e, t) {
13338  return t.map((i) => {
13339    const s = `e${i[0].toUpperCase() + i.substring(1)}RowContainer`;
13340    return e[s] = { name: i }, /* html */
13341    `<ag-row-container name="${i}" data-ref="${s}"></ag-row-container>`;
13342  }).join("");
13343}
13344function fC(e) {
13345  const t = {}, i = (
13346    /* html */
13347    `<div class="ag-root ag-unselectable" data-ref="eGridRoot">
13348        <ag-header-root></ag-header-root>
13349        <div class="ag-floating-top" data-ref="eTop" role="presentation">
13350            ${Ai(t, ["topLeft", "topCenter", "topRight", "topFullWidth"])}
13351        </div>
13352        <div class="ag-body" data-ref="eBody" role="presentation">
13353            <div class="ag-body-viewport" data-ref="eBodyViewport" role="presentation">
13354            ${Ai(t, ["left", "center", "right", "fullWidth"])}
13355            </div>
13356            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>
13357        </div>
13358        <div class="ag-sticky-top" data-ref="eStickyTop" role="presentation">
13359            ${Ai(t, ["stickyTopLeft", "stickyTopCenter", "stickyTopRight", "stickyTopFullWidth"])}
13360        </div>
13361        <div class="ag-sticky-bottom" data-ref="eStickyBottom" role="presentation">
13362            ${Ai(t, ["stickyBottomLeft", "stickyBottomCenter", "stickyBottomRight", "stickyBottomFullWidth"])}
13363        </div>
13364        <div class="ag-floating-bottom" data-ref="eBottom" role="presentation">
13365            ${Ai(t, ["bottomLeft", "bottomCenter", "bottomRight", "bottomFullWidth"])}
13366        </div>
13367        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
13368        ${e ? (
13369      /* html */
13370      "<ag-overlay-wrapper></ag-overlay-wrapper>"
13371    ) : ""}
13372    </div>`
13373  );
13374  return { paramsMap: t, template: i };
13375}
13376var mC = class extends _ {
13377  constructor() {
13378    super(...arguments), this.eGridRoot = M, this.eBodyViewport = M, this.eStickyTop = M, this.eStickyBottom = M, this.eTop = M, this.eBottom = M, this.eBody = M;
13379  }
13380  postConstruct() {
13381    const { overlays: e, rangeSvc: t } = this.beans, i = e?.getOverlayWrapperSelector(), { paramsMap: s, template: o } = fC(!!i);
13382    this.setTemplate(
13383      o,
13384      [
13385        ...i ? [i] : [],
13386        am,
13387        dm,
13388        dC,
13389        pC
13390      ],
13391      s
13392    );
13393    const n = (a, l) => {
13394      const d = `${a}px`;
13395      l.style.minHeight = d, l.style.height = d;
13396    }, r = {
13397      setRowAnimationCssOnBodyViewport: (a, l) => this.setRowAnimationCssOnBodyViewport(a, l),
13398      setColumnCount: (a) => Oh(this.getGui(), a),
13399      setRowCount: (a) => Lh(this.getGui(), a),
13400      setTopHeight: (a) => n(a, this.eTop),
13401      setBottomHeight: (a) => n(a, this.eBottom),
13402      setTopDisplay: (a) => this.eTop.style.display = a,
13403      setBottomDisplay: (a) => this.eBottom.style.display = a,
13404      setStickyTopHeight: (a) => this.eStickyTop.style.height = a,
13405      setStickyTopTop: (a) => this.eStickyTop.style.top = a,
13406      setStickyTopWidth: (a) => this.eStickyTop.style.width = a,
13407      setStickyBottomHeight: (a) => {
13408        this.eStickyBottom.style.height = a, this.eStickyBottom.classList.toggle("ag-hidden", a === "0px");
13409      },
13410      setStickyBottomBottom: (a) => this.eStickyBottom.style.bottom = a,
13411      setStickyBottomWidth: (a) => this.eStickyBottom.style.width = a,
13412      setColumnMovingCss: (a, l) => this.addOrRemoveCssClass(a, l),
13413      updateLayoutClasses: (a, l) => {
13414        [this.eBodyViewport.classList, this.eBody.classList].forEach((c) => {
13415          c.toggle(Oe.AUTO_HEIGHT, l.autoHeight), c.toggle(Oe.NORMAL, l.normal), c.toggle(Oe.PRINT, l.print);
13416        }), this.addOrRemoveCssClass(Oe.AUTO_HEIGHT, l.autoHeight), this.addOrRemoveCssClass(Oe.NORMAL, l.normal), this.addOrRemoveCssClass(Oe.PRINT, l.print);
13417      },
13418      setAlwaysVerticalScrollClass: (a, l) => this.eBodyViewport.classList.toggle(Dd, l),
13419      registerBodyViewportResizeListener: (a) => {
13420        const l = Rt(this.beans, this.eBodyViewport, a);
13421        this.addDestroyFunc(() => l());
13422      },
13423      setPinnedTopBottomOverflowY: (a) => this.eTop.style.overflowY = this.eBottom.style.overflowY = a,
13424      setCellSelectableCss: (a, l) => {
13425        [this.eTop, this.eBodyViewport, this.eBottom].forEach(
13426          (d) => d.classList.toggle(a, l)
13427        );
13428      },
13429      setBodyViewportWidth: (a) => this.eBodyViewport.style.width = a,
13430      setGridRootRole: (a) => ve(this.eGridRoot, a)
13431    };
13432    this.ctrl = this.createManagedBean(new nm()), this.ctrl.setComp(
13433      r,
13434      this.getGui(),
13435      this.eBodyViewport,
13436      this.eTop,
13437      this.eBottom,
13438      this.eStickyTop,
13439      this.eStickyBottom
13440    ), (t && lt(this.gos) || Xs(this.gos)) && kh(this.getGui(), !0);
13441  }
13442  setRowAnimationCssOnBodyViewport(e, t) {
13443    const i = this.eBodyViewport.classList;
13444    i.toggle("ag-row-animation", t), i.toggle("ag-row-no-animation", !t);
13445  }
13446}, CC = {
13447  selector: "AG-GRID-BODY",
13448  component: mC
13449}, vC = class extends y {
13450  constructor() {
13451    super(...arguments), this.additionalFocusableContainers = /* @__PURE__ */ new Set();
13452  }
13453  setComp(e, t, i) {
13454    this.view = e, this.eGridHostDiv = t, this.eGui = i, this.eGui.setAttribute("grid-id", this.beans.context.getGridId());
13455    const { dragAndDrop: s, ctrlsSvc: o } = this.beans;
13456    s?.registerGridDropTarget(() => this.eGui, this), fd(this.gos, t), this.createManagedBean(new qn(this.view)), this.view.setRtlClass(this.gos.get("enableRtl") ? "ag-rtl" : "ag-ltr");
13457    const n = Rt(this.beans, this.eGridHostDiv, this.onGridSizeChanged.bind(this));
13458    this.addDestroyFunc(() => n()), o.register("gridCtrl", this);
13459  }
13460  isDetailGrid() {
13461    return ud(this.getGui())?.getAttribute("row-id")?.startsWith("detail") || !1;
13462  }
13463  getOptionalSelectors() {
13464    const e = this.beans;
13465    return {
13466      paginationSelector: e.pagination?.getPaginationSelector(),
13467      gridHeaderDropZonesSelector: e.registry.getSelector("AG-GRID-HEADER-DROP-ZONES"),
13468      sideBarSelector: e.sideBar?.getSelector(),
13469      statusBarSelector: e.registry?.getSelector("AG-STATUS-BAR"),
13470      watermarkSelector: e.licenseManager?.getWatermarkSelector()
13471    };
13472  }
13473  onGridSizeChanged() {
13474    this.eventSvc.dispatchEvent({
13475      type: "gridSizeChanged",
13476      clientWidth: this.eGridHostDiv.clientWidth,
13477      clientHeight: this.eGridHostDiv.clientHeight
13478    });
13479  }
13480  destroyGridUi() {
13481    this.view.destroyGridUi();
13482  }
13483  getGui() {
13484    return this.eGui;
13485  }
13486  setResizeCursor(e) {
13487    this.view.setCursor(e ? "ew-resize" : null);
13488  }
13489  disableUserSelect(e) {
13490    this.view.setUserSelect(e ? "none" : null);
13491  }
13492  focusNextInnerContainer(e) {
13493    const t = this.getFocusableContainers(), { indexWithFocus: i, nextIndex: s } = this.getNextFocusableIndex(t, e);
13494    if (s < 0 || s >= t.length)
13495      return !1;
13496    if (s === 0) {
13497      if (i > 0) {
13498        const { visibleCols: o, focusSvc: n } = this.beans, r = o.allCols, a = W(r);
13499        if (n.focusGridView(a, !0))
13500          return !0;
13501      }
13502      return !1;
13503    }
13504    return this.focusContainer(t[s], e);
13505  }
13506  focusInnerElement(e) {
13507    const t = this.gos.getCallback("focusGridInnerElement");
13508    if (t && t({ fromBottom: !!e }))
13509      return !0;
13510    const i = this.getFocusableContainers(), { focusSvc: s, visibleCols: o } = this.beans, n = o.allCols;
13511    if (e) {
13512      if (i.length > 1)
13513        return this.focusContainer(W(i), !0);
13514      const r = W(n);
13515      if (s.focusGridView(r, !0))
13516        return !0;
13517    }
13518    if (this.gos.get("headerHeight") === 0 || li(this.beans)) {
13519      if (s.focusGridView(n[0]))
13520        return !0;
13521      for (let r = 1; r < i.length; r++)
13522        if (Ht(i[r].getGui()))
13523          return !0;
13524      return !1;
13525    }
13526    return s.focusFirstHeader();
13527  }
13528  forceFocusOutOfContainer(e = !1) {
13529    this.view.forceFocusOutOfContainer(e);
13530  }
13531  addFocusableContainer(e) {
13532    this.additionalFocusableContainers.add(e);
13533  }
13534  removeFocusableContainer(e) {
13535    this.additionalFocusableContainers.delete(e);
13536  }
13537  allowFocusForNextCoreContainer(e) {
13538    const t = this.view.getFocusableContainers(), { nextIndex: i, indexWithFocus: s } = this.getNextFocusableIndex(t, e);
13539    if (s === -1 || i < 0 || i >= t.length)
13540      return;
13541    const o = t[i];
13542    o.setAllowFocus?.(!0), setTimeout(() => {
13543      o.setAllowFocus?.(!1);
13544    });
13545  }
13546  getNextFocusableIndex(e, t) {
13547    const i = Z(this.beans), s = e.findIndex((n) => n.getGui().contains(i)), o = s + (t ? -1 : 1);
13548    return {
13549      indexWithFocus: s,
13550      nextIndex: o
13551    };
13552  }
13553  focusContainer(e, t) {
13554    e.setAllowFocus?.(!0);
13555    const i = Ht(e.getGui(), t);
13556    return e.setAllowFocus?.(!1), i;
13557  }
13558  getFocusableContainers() {
13559    return [...this.view.getFocusableContainers(), ...this.additionalFocusableContainers];
13560  }
13561  destroy() {
13562    this.additionalFocusableContainers.clear(), super.destroy();
13563  }
13564}, wC = class extends Gd {
13565  constructor(e) {
13566    super(), this.gridBody = M, this.sideBar = M, this.pagination = M, this.rootWrapperBody = M, this.eGridDiv = e;
13567  }
13568  postConstruct() {
13569    const e = {
13570      destroyGridUi: () => this.destroyBean(this),
13571      setRtlClass: (n) => this.addCssClass(n),
13572      forceFocusOutOfContainer: this.forceFocusOutOfContainer.bind(this),
13573      updateLayoutClasses: this.updateLayoutClasses.bind(this),
13574      getFocusableContainers: this.getFocusableContainers.bind(this),
13575      setUserSelect: (n) => {
13576        this.getGui().style.userSelect = n ?? "", this.getGui().style.webkitUserSelect = n ?? "";
13577      },
13578      setCursor: (n) => {
13579        this.getGui().style.cursor = n ?? "";
13580      }
13581    }, t = this.createManagedBean(new vC()), i = t.getOptionalSelectors(), s = this.createTemplate(i), o = [CC, ...Object.values(i).filter((n) => !!n)];
13582    this.setTemplate(s, o), t.setComp(e, this.eGridDiv, this.getGui()), this.insertGridIntoDom(), this.initialiseTabGuard({
13583      // we want to override the default behaviour to do nothing for onTabKeyDown
13584      onTabKeyDown: () => {
13585      },
13586      focusInnerElement: (n) => t.focusInnerElement(n),
13587      forceFocusOutWhenTabGuardsAreEmpty: !0
13588    });
13589  }
13590  insertGridIntoDom() {
13591    const e = this.getGui();
13592    this.eGridDiv.appendChild(e), this.addDestroyFunc(() => {
13593      this.eGridDiv.removeChild(e), bt(this.gos, "Grid removed from DOM");
13594    });
13595  }
13596  updateLayoutClasses(e, t) {
13597    const i = this.rootWrapperBody.classList, { AUTO_HEIGHT: s, NORMAL: o, PRINT: n } = Oe, { autoHeight: r, normal: a, print: l } = t;
13598    i.toggle(s, r), i.toggle(o, a), i.toggle(n, l), this.addOrRemoveCssClass(s, r), this.addOrRemoveCssClass(o, a), this.addOrRemoveCssClass(n, l);
13599  }
13600  createTemplate(e) {
13601    const t = e.gridHeaderDropZonesSelector ? "<ag-grid-header-drop-zones></ag-grid-header-drop-zones>" : "", i = e.sideBarSelector ? '<ag-side-bar data-ref="sideBar"></ag-side-bar>' : "", s = e.statusBarSelector ? "<ag-status-bar></ag-status-bar>" : "", o = e.watermarkSelector ? "<ag-watermark></ag-watermark>" : "", n = e.paginationSelector ? '<ag-pagination data-ref="pagination"></ag-pagination>' : "";
13602    return (
13603      /* html */
13604      `<div class="ag-root-wrapper" role="presentation">
13605                ${t}
13606                <div class="ag-root-wrapper-body" data-ref="rootWrapperBody" role="presentation">
13607                    <ag-grid-body data-ref="gridBody"></ag-grid-body>
13608                    ${i}
13609                </div>
13610                ${s}
13611                ${n}
13612                ${o}
13613            </div>`
13614    );
13615  }
13616  getFocusableElement() {
13617    return this.rootWrapperBody;
13618  }
13619  forceFocusOutOfContainer(e = !1) {
13620    if (!e && this.pagination?.isDisplayed()) {
13621      this.pagination.forceFocusOutOfContainer(e);
13622      return;
13623    }
13624    super.forceFocusOutOfContainer(e);
13625  }
13626  getFocusableContainers() {
13627    const e = [this.gridBody];
13628    return [this.sideBar, this.pagination].forEach((t) => {
13629      t && e.push(t);
13630    }), e.filter((t) => Ne(t.getGui()));
13631  }
13632}, B = (e, t) => {
13633  for (const i of Object.keys(t))
13634    t[i] = e;
13635  return t;
13636}, ga = {
13637  dispatchEvent: "CommunityCore",
13638  // this is always registered
13639  ...B("CommunityCore", {
13640    destroy: 0,
13641    getGridId: 0,
13642    getGridOption: 0,
13643    isDestroyed: 0,
13644    setGridOption: 0,
13645    updateGridOptions: 0
13646  }),
13647  ...B("GridState", {
13648    getState: 0
13649  }),
13650  ...B("SharedRowSelection", {
13651    setNodesSelected: 0,
13652    selectAll: 0,
13653    deselectAll: 0,
13654    selectAllFiltered: 0,
13655    deselectAllFiltered: 0,
13656    selectAllOnCurrentPage: 0,
13657    deselectAllOnCurrentPage: 0,
13658    getSelectedNodes: 0,
13659    getSelectedRows: 0
13660  }),
13661  ...B("RowApi", {
13662    redrawRows: 0,
13663    setRowNodeExpanded: 0,
13664    getRowNode: 0,
13665    addRenderedRowListener: 0,
13666    getRenderedNodes: 0,
13667    forEachNode: 0,
13668    getFirstDisplayedRowIndex: 0,
13669    getLastDisplayedRowIndex: 0,
13670    getDisplayedRowAtIndex: 0,
13671    getDisplayedRowCount: 0
13672  }),
13673  ...B("ScrollApi", {
13674    getVerticalPixelRange: 0,
13675    getHorizontalPixelRange: 0,
13676    ensureColumnVisible: 0,
13677    ensureIndexVisible: 0,
13678    ensureNodeVisible: 0
13679  }),
13680  ...B("KeyboardNavigation", {
13681    getFocusedCell: 0,
13682    clearFocusedCell: 0,
13683    setFocusedCell: 0,
13684    tabToNextCell: 0,
13685    tabToPreviousCell: 0,
13686    setFocusedHeader: 0
13687  }),
13688  ...B("EventApi", {
13689    addEventListener: 0,
13690    addGlobalListener: 0,
13691    removeEventListener: 0,
13692    removeGlobalListener: 0
13693  }),
13694  ...B("ValueCache", {
13695    expireValueCache: 0
13696  }),
13697  ...B("CellApi", {
13698    getCellValue: 0
13699  }),
13700  ...B("SharedMenu", {
13701    showColumnMenu: 0,
13702    hidePopupMenu: 0
13703  }),
13704  ...B("Sort", {
13705    onSortChanged: 0
13706  }),
13707  ...B("PinnedRow", {
13708    getPinnedTopRowCount: 0,
13709    getPinnedBottomRowCount: 0,
13710    getPinnedTopRow: 0,
13711    getPinnedBottomRow: 0
13712  }),
13713  ...B("Overlay", {
13714    showLoadingOverlay: 0,
13715    showNoRowsOverlay: 0,
13716    hideOverlay: 0
13717  }),
13718  ...B("RenderApi", {
13719    setGridAriaProperty: 0,
13720    refreshCells: 0,
13721    refreshHeader: 0,
13722    isAnimationFrameQueueEmpty: 0,
13723    flushAllAnimationFrames: 0,
13724    getSizesForCurrentTheme: 0,
13725    getCellRendererInstances: 0
13726  }),
13727  ...B("HighlightChanges", {
13728    flashCells: 0
13729  }),
13730  ...B("RowDrag", {
13731    addRowDropZone: 0,
13732    removeRowDropZone: 0,
13733    getRowDropZoneParams: 0
13734  }),
13735  ...B("ColumnApi", {
13736    getColumnDefs: 0,
13737    getColumnDef: 0,
13738    getDisplayNameForColumn: 0,
13739    getColumn: 0,
13740    getColumns: 0,
13741    applyColumnState: 0,
13742    getColumnState: 0,
13743    resetColumnState: 0,
13744    isPinning: 0,
13745    isPinningLeft: 0,
13746    isPinningRight: 0,
13747    getDisplayedColAfter: 0,
13748    getDisplayedColBefore: 0,
13749    setColumnsVisible: 0,
13750    setColumnsPinned: 0,
13751    getAllGridColumns: 0,
13752    getDisplayedLeftColumns: 0,
13753    getDisplayedCenterColumns: 0,
13754    getDisplayedRightColumns: 0,
13755    getAllDisplayedColumns: 0,
13756    getAllDisplayedVirtualColumns: 0
13757  }),
13758  ...B("ColumnAutoSize", {
13759    sizeColumnsToFit: 0,
13760    autoSizeColumns: 0,
13761    autoSizeAllColumns: 0
13762  }),
13763  ...B("ColumnGroup", {
13764    setColumnGroupOpened: 0,
13765    getColumnGroup: 0,
13766    getProvidedColumnGroup: 0,
13767    getDisplayNameForColumnGroup: 0,
13768    getColumnGroupState: 0,
13769    setColumnGroupState: 0,
13770    resetColumnGroupState: 0,
13771    getLeftDisplayedColumnGroups: 0,
13772    getCenterDisplayedColumnGroups: 0,
13773    getRightDisplayedColumnGroups: 0,
13774    getAllDisplayedColumnGroups: 0
13775  }),
13776  ...B("ColumnMove", {
13777    moveColumnByIndex: 0,
13778    moveColumns: 0
13779  }),
13780  ...B("ColumnResize", {
13781    setColumnWidths: 0
13782  }),
13783  ...B("ColumnHover", {
13784    isColumnHovered: 0
13785  }),
13786  ...B("EditCore", {
13787    getCellEditorInstances: 0,
13788    getEditingCells: 0,
13789    stopEditing: 0,
13790    startEditingCell: 0
13791  }),
13792  ...B("UndoRedoEdit", {
13793    undoCellEditing: 0,
13794    redoCellEditing: 0,
13795    getCurrentUndoSize: 0,
13796    getCurrentRedoSize: 0
13797  }),
13798  ...B("FilterCore", {
13799    isAnyFilterPresent: 0,
13800    onFilterChanged: 0
13801  }),
13802  ...B("ColumnFilter", {
13803    isColumnFilterPresent: 0,
13804    getColumnFilterInstance: 0,
13805    destroyFilter: 0,
13806    setFilterModel: 0,
13807    getFilterModel: 0,
13808    getColumnFilterModel: 0,
13809    setColumnFilterModel: 0,
13810    showColumnFilter: 0
13811  }),
vendor: 4,245 bytes, lines 13812-13985
13812  ...B("QuickFilter", {
13813    isQuickFilterPresent: 0,
13814    getQuickFilter: 0,
13815    resetQuickFilter: 0
13816  }),
13817  ...B("Pagination", {
13818    paginationIsLastPageFound: 0,
13819    paginationGetPageSize: 0,
13820    paginationGetCurrentPage: 0,
13821    paginationGetTotalPages: 0,
13822    paginationGetRowCount: 0,
13823    paginationGoToNextPage: 0,
13824    paginationGoToPreviousPage: 0,
13825    paginationGoToFirstPage: 0,
13826    paginationGoToLastPage: 0,
13827    paginationGoToPage: 0
13828  }),
13829  ...B("CsrmSsrmSharedApi", {
13830    expandAll: 0,
13831    collapseAll: 0,
13832    onRowHeightChanged: 0
13833  }),
13834  ...B("SsrmInfiniteSharedApi", {
13835    setRowCount: 0,
13836    getCacheBlockState: 0,
13837    isLastRowIndexKnown: 0
13838  }),
13839  ...B("ClientSideRowModelApi", {
13840    onGroupExpandedOrCollapsed: 0,
13841    refreshClientSideRowModel: 0,
13842    isRowDataEmpty: 0,
13843    forEachLeafNode: 0,
13844    forEachNodeAfterFilter: 0,
13845    forEachNodeAfterFilterAndSort: 0,
13846    resetRowHeights: 0,
13847    applyTransaction: 0,
13848    applyTransactionAsync: 0,
13849    flushAsyncTransactions: 0,
13850    getBestCostNodeSelection: 0
13851  }),
13852  ...B("CsvExport", {
13853    getDataAsCsv: 0,
13854    exportDataAsCsv: 0
13855  }),
13856  ...B("InfiniteRowModel", {
13857    refreshInfiniteCache: 0,
13858    purgeInfiniteCache: 0,
13859    getInfiniteRowCount: 0
13860  }),
13861  ...B("AdvancedFilter", {
13862    getAdvancedFilterModel: 0,
13863    setAdvancedFilterModel: 0,
13864    showAdvancedFilterBuilder: 0,
13865    hideAdvancedFilterBuilder: 0
13866  }),
13867  ...B("IntegratedCharts", {
13868    getChartModels: 0,
13869    getChartRef: 0,
13870    getChartImageDataURL: 0,
13871    downloadChart: 0,
13872    openChartToolPanel: 0,
13873    closeChartToolPanel: 0,
13874    createRangeChart: 0,
13875    createPivotChart: 0,
13876    createCrossFilterChart: 0,
13877    updateChart: 0,
13878    restoreChart: 0
13879  }),
13880  ...B("Clipboard", {
13881    copyToClipboard: 0,
13882    cutToClipboard: 0,
13883    copySelectedRowsToClipboard: 0,
13884    copySelectedRangeToClipboard: 0,
13885    copySelectedRangeDown: 0,
13886    pasteFromClipboard: 0
13887  }),
13888  ...B("ExcelExport", {
13889    getDataAsExcel: 0,
13890    exportDataAsExcel: 0,
13891    getSheetDataForExcel: 0,
13892    getMultipleSheetsAsExcel: 0,
13893    exportMultipleSheetsAsExcel: 0
13894  }),
13895  ...B("SharedMasterDetail", {
13896    addDetailGridInfo: 0,
13897    removeDetailGridInfo: 0,
13898    getDetailGridInfo: 0,
13899    forEachDetailGridInfo: 0
13900  }),
13901  ...B("ContextMenu", {
13902    showContextMenu: 0
13903  }),
13904  ...B("ColumnMenu", {
13905    showColumnChooser: 0,
13906    hideColumnChooser: 0
13907  }),
13908  ...B("CellSelection", {
13909    getCellRanges: 0,
13910    addCellRange: 0,
13911    clearRangeSelection: 0,
13912    clearCellSelection: 0
13913  }),
13914  ...B("SharedRowGrouping", {
13915    setRowGroupColumns: 0,
13916    removeRowGroupColumns: 0,
13917    addRowGroupColumns: 0,
13918    getRowGroupColumns: 0,
13919    moveRowGroupColumn: 0
13920  }),
13921  ...B("SharedAggregation", {
13922    addAggFuncs: 0,
13923    clearAggFuncs: 0,
13924    setColumnAggFunc: 0
13925  }),
13926  ...B("SharedPivot", {
13927    isPivotMode: 0,
13928    getPivotResultColumn: 0,
13929    setValueColumns: 0,
13930    getValueColumns: 0,
13931    removeValueColumns: 0,
13932    addValueColumns: 0,
13933    setPivotColumns: 0,
13934    removePivotColumns: 0,
13935    addPivotColumns: 0,
13936    getPivotColumns: 0,
13937    setPivotResultColumns: 0,
13938    getPivotResultColumns: 0
13939  }),
13940  ...B("ServerSideRowModelApi", {
13941    getServerSideSelectionState: 0,
13942    setServerSideSelectionState: 0,
13943    applyServerSideTransaction: 0,
13944    applyServerSideTransactionAsync: 0,
13945    applyServerSideRowData: 0,
13946    retryServerSideLoads: 0,
13947    flushServerSideAsyncTransactions: 0,
13948    refreshServerSide: 0,
13949    getServerSideGroupLevelState: 0
13950  }),
13951  ...B("SideBar", {
13952    isSideBarVisible: 0,
13953    setSideBarVisible: 0,
13954    setSideBarPosition: 0,
13955    openToolPanel: 0,
13956    closeToolPanel: 0,
13957    getOpenedToolPanel: 0,
13958    refreshToolPanel: 0,
13959    isToolPanelShowing: 0,
13960    getToolPanelInstance: 0,
13961    getSideBar: 0
13962  }),
13963  ...B("StatusBar", {
13964    getStatusPanel: 0
13965  })
13966}, ko = {
13967  isDestroyed: () => !0,
13968  destroy() {
13969  },
13970  preConstruct() {
13971  },
13972  postConstruct() {
13973  },
13974  preWireBeans() {
13975  },
13976  wireBeans() {
13977  }
13978}, SC = (e, t) => e.eventSvc.dispatchEvent(t), Bd = class {
13979};
13980Reflect.defineProperty(Bd, "name", { value: "GridApi" });
13981var bC = class extends y {
13982  constructor() {
13983    super(), this.beanName = "apiFunctionSvc", this.api = new Bd(), this.fns = {
13984      ...ko,
13985      // dispatchEvent is used by frameworks, also used by aligned grids to i
13985dentify a grid api instance
13986      dispatchEvent: SC
13987    }, this.preDestroyLink = "";
13988    const { api: e } = this;
13989    for (const t of Object.keys(ga))
13990      e[t] = this.makeApi(t)[t];
13991  }
13992  postConstruct() {
13993    this.preDestroyLink = this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed");
13994  }
13995  addFunction(e, t) {
13996    const { fns: i, beans: s } = this;
13997    i !== ko && (i[e] = s?.validation?.validateApiFunction(e, t) ?? t);
13998  }
13999  makeApi(e) {
14000    return {
14001      [e]: (...t) => {
14002        const {
14003          beans: i,
14004          fns: { [e]: s }
14005        } = this;
14006        return s ? s(i, ...t) : this.apiNotFound(e);
14007      }
14008    };
14009  }
14010  apiNotFound(e) {
14011    const { beans: t, gos: i, preDestroyLink: s } = this;
14012    if (!t)
14013      x(26, { fnName: e, preDestroyLink: s });
14014    else {
14015      const o = ga[e];
14016      i.assertModuleRegistered(o, `api.${e}`) && x(27, { fnName: e, module: o });
14017    }
14018  }
14019  destroy() {
14020    super.destroy(), this.fns = ko, this.beans = null;
14021  }
14022};
14023function yC(e) {
14024  return e.context.getGridId();
14025}
14026function RC(e) {
14027  e.gridDestroySvc.destroy();
14028}
14029function FC(e) {
14030  return e.gridDestroySvc.destroyCalled;
14031}
14032function xC(e, t) {
14033  return e.gos.get(t);
14034}
14035function PC(e, t, i) {
14036  Nd(e, { [t]: i });
14037}
14038function Nd(e, t) {
14039  e.gos.updateGridOptions({ options: t });
14040}
14041var EC = class extends _ {
14042  constructor(e, t, i) {
14043    super(
14044      /* html */
14045      '<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'
14046    ), this.rowNode = e, this.column = t, this.eCell = i;
14047  }
14048  postConstruct() {
14049    this.getGui().appendChild(Te("rowDrag", this.beans, null)), this.addGuiEventListener("mousedown", (t) => {
14050      t.stopPropagation();
14051    }), this.addDragSource(), this.checkVisibility();
14052  }
14053  addDragSource() {
14054    this.addGuiEventListener("dragstart", this.onDragStart.bind(this));
14055  }
14056  onDragStart(e) {
14057    const { rowNode: t, column: i, eCell: s, gos: o } = this, n = i.getColDef().dndSourceOnRowDrag, r = e.dataTransfer;
14058    if (r.setDragImage(s, 0, 0), n) {
14059      const a = o.addGridCommonParams({
14060        rowNode: t,
14061        dragEvent: e
14062      });
14063      n(a);
14064    } else
14065      try {
14066        const a = JSON.stringify(t.data);
14067        r.setData("application/json", a), r.setData("text/plain", a);
14068      } catch {
14069      }
14070  }
14071  checkVisibility() {
14072    const e = this.column.isDndSource(this.rowNode);
14073    this.setDisplayed(e);
14074  }
14075};
14076function DC(e, t) {
14077  e.rowDragSvc?.rowDragFeature?.addRowDropZone(t);
14078}
14079function AC(e, t) {
14080  const i = e.dragAndDrop?.findExternalZone(t);
14081  i && e.dragAndDrop?.removeDropTarget(i);
14082}
14083function TC(e, t) {
14084  return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t);
14085}
14086var MC = class extends y {
14087  constructor() {
14088    super(...arguments), this.beanName = "horizontalResizeSvc";
14089  }
14090  addResizeBar(e) {
14091    const t = {
14092      dragStartPixels: e.dragStartPixels || 0,
14093      eElement: e.eResizeBar,
14094      onDragStart: this.onDragStart.bind(this, e),
14095      onDragStop: this.onDragStop.bind(this, e),
14096      onDragging: this.onDragging.bind(this, e),
14097      onDragCancel: this.onDragStop.bind(this, e),
14098      includeTouch: !0,
14099      stopPropagationForTouch: !0
14100    }, { dragSvc: i } = this.beans;
14101    return i.addDragSource(t), () => i.removeDragSource(t);
14102  }
14103  onDragStart(e, t) {
14104    this.dragStartX = t.clientX, this.setResizeIcons();
14105    const i = t instanceof MouseEvent && t.shiftKey === !0;
14106    e.onResizeStart(i);
14107  }
14108  setResizeIcons() {
14109    const e = this.beans.ctrlsSvc.get("gridCtrl");
14110    e.setResizeCursor(!0), e.disableUserSelect(!0);
14111  }
14112  onDragStop(e) {
14113    e.onResizeEnd(this.resizeAmount), this.resetIcons();
14114  }
14115  resetIcons() {
14116    const e = this.beans.ctrlsSvc.get("gridCtrl");
14117    e.setResizeCursor(!1), e.disableUserSelect(!1);
14118  }
14119  onDragging(e, t) {
14120    this.resizeAmount = t.clientX - this.dragStartX, e.onResizing(this.resizeAmount);
14121  }
14122}, IC = class extends _ {
14123  constructor(e, t, i, s, o, n) {
14124    super(), this.cellValueFn = e, this.rowNode = t, this.column = i, this.customGui = s, this.dragStartPixels = o, this.suppressVisibilityChange = n, this.dragSource = null;
14125  }
14126  isCustomGui() {
14127    return this.customGui != null;
14128  }
14129  postConstruct() {
14130    const { beans: e, rowNode: t, column: i, gos: s } = this;
14131    if (this.customGui ? this.setDragElement(this.customGui, this.dragStartPixels) : (this.setTemplate(
14132      /* html */
14133      '<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'
14134    ), this.getGui().appendChild(Te("rowDrag", e, null)), this.addDragSource()), !this.suppressVisibilityChange) {
14135      const o = s.get("rowDragManaged") ? new LC(this, t, i) : new kC(this, t, i);
14136      this.createManagedBean(o, this.beans.context);
14137    }
14138  }
14139  setDragElement(e, t) {
14140    this.setTemplateFromElement(e, void 0, void 0, !0), this.addDragSource(t);
14141  }
14142  getSelectedNodes() {
14143    const e = this.rowNode;
14144    if (!this.gos.get("rowDragMultiRow"))
14145      return [e];
14146    const i = this.beans.selectionSvc?.getSelectedNodes() ?? [];
14147    return i.indexOf(e) !== -1 ? i : [e];
14148  }
14149  getDragItem() {
14150    const { column: e, rowNode: t } = this;
14151    return {
14152      rowNode: t,
14153      rowNodes: this.getSelectedNodes(),
14154      columns: e ? [e] : void 0,
14155      defaultTextValue: this.cellValueFn()
14156    };
14157  }
14158  getRowDragText(e) {
14159    if (e) {
14160      const t = e.getColDef();
14161      if (t.rowDragText)
14162        return t.rowDragText;
14163    }
14164    return this.gos.get("rowDragText");
14165  }
14166  addDragSource(e = 4) {
14167    this.dragSource && this.removeDragSource();
14168    const t = this.getGui();
14169    this.gos.get("enableCellTextSelection") && (this.removeMouseDownListener(), this.mouseDownListener = this.addManagedElementListeners(t, {
14170      mousedown: (s) => {
14171        s?.preventDefault();
14172      }
14173    })[0]);
14174    const i = this.getLocaleTextFunc();
14175    this.dragSource = {
14176      type: 2,
14177      eElement: t,
14178      dragItemName: () => {
14179        const s = this.getDragItem(), o = s.rowNodes?.length || 1, n = this.getRowDragText(this.column);
14180        return n ? n(s, o) : o === 1 ? this.cellValueFn() : `${o} ${i("rowDragRows", "rows")}`;
14181      },
14182      getDragItem: () => this.getDragItem(),
14183      dragStartPixels: e,
14184      dragSourceDomDataKey: this.gos.getDomDataKey()
14185    }, this.beans.dragAndDrop.addDragSource(this.dragSource, !0);
14186  }
14187  destroy() {
14188    this.removeDragSource(), this.removeMouseDownListener(), super.destroy();
14189  }
14190  removeDragSource() {
14191    this.dragSource && (this.beans.dragAndDrop.removeDragSource(this.dragSource), this.dragSource = null);
14192  }
14193  removeMouseDownListener() {
14194    this.mouseDownListener && (this.mouseDownListener(), this.mouseDownListener = void 0);
14195  }
14196}, Vd = class extends y {
14197  constructor(e, t, i) {
14198    super(), this.parent = e, this.rowNode = t, this.column = i;
14199  }
14200  setDisplayedOrVisible(e) {
14201    const t = { skipAriaHidden: !0 };
14202    if (e)
14203      this.parent.setDisplayed(!1, t);
14204    else {
14205      let i = !0, s = !1;
14206      const { column: o, rowNode: n, parent: r } = this;
14207      o && (i = o.isRowDrag(n) || r.isCustomGui(), s = typeof o.getColDef().rowDrag == "function"), s ? (r.setDisplayed(!0, t), r.setVisible(i, t)) : (r.setDisplayed(i, t), r.setVisible(!0, t));
14208    }
14209  }
14210}, kC = class extends Vd {
14211  postConstruct() {
14212    this.addManagedPropertyListener("suppressRowDrag", this.onSuppressRowDrag.bind(this));
14213    const e = this.workOutVisibility.bind(this);
14214    this.addManagedListeners(this.rowNode, {
14215      dataChanged: e,
14216      cellChanged: e
14217    }), this.addManagedListeners(this.beans.eventSvc, { newColumnsLoaded: e }), this.workOutVisibility();
14218  }
14219  onSuppressRowDrag() {
14220    this.workOutVisibility();
14221  }
14222  workOutVisibility() {
14223    const e = this.gos.get("suppressRowDrag");
14224    this.setDisplayedOrVisible(e);
14225  }
14226}, LC = class extends Vd {
14227  postConstruct() {
14228    const e = this.workOutVisibility.bind(this);
14229    this.addManagedListeners(this.beans.eventSvc, {
14230      sortChanged: e,
14231      filterChanged: e,
14232      columnRowGroupChanged: e,
14233      newColumnsLoaded: e
14234    }), this.addManagedListeners(this.rowNode, {
14235      dataChanged: e,
14236      cellChanged: e
14237    }), this.addManagedPropertyListener("suppressRowDrag", this.onSuppressRowDrag.bind(this)), this.workOutVisibility();
14238  }
14239  onSuppressRowDrag() {
14240    this.workOutVisibility();
14241  }
14242  workOutVisibility() {
14243    const { rowDragSvc: e, dragAndDrop: t, gos: i } = this.beans, s = e.rowDragFeature, o = s && s.shouldPreventRowMove(), n = i.get("suppressRowDrag"), r = t.hasExternalDropZones(), a = o && !r || n;
14244    this.setDisplayedOrVisible(a);
14245  }
14246}, OC = class extends y {
14247  constructor() {
14248    super(...arguments), this.beanName = "rowDragSvc";
14249  }
14250  setupRowDrag(e, t) {
14251    const i = t.createManagedBean(new Ff(e)), s = this.beans.dragAndDrop;
14252    s.addDropTarget(i), t.addDestroyFunc(() => s.removeDropTarget(i)), this.rowDragFeature = i;
14253  }
14254  createRowDragComp(e, t, i, s, o, n) {
14255    return new IC(e, t, i, s, o, n);
14256  }
14257  createRowDragCompForRow(e, t) {
14258    if (lt(this.gos))
14259      return;
14260    const i = this.getLocaleTextFunc();
14261    return this.createRowDragComp(
14262      () => `1 ${i("rowDragRow", "row")}`,
14263      e,
14264      void 0,
14265      t,
14266      void 0,
14267      !0
14268    );
14269  }
14270  createRowDragCompForCell(e, t, i, s, o, n) {
14271    const r = this.gos;
14272    return r.get("rowDragManaged") && (!me(r) || r.get("pagination")) ? void 0 : this.createRowDragComp(
14273      i,
14274      e,
14275      t,
14276      s,
14277      o,
14278      n
14279    );
14280  }
14281}, Wd = {
14282  moduleName: "Drag",
14283  version: I,
14284  beans: [xf]
14285}, GC = {
14286  moduleName: "DragAndDrop",
14287  version: I,
14288  dynamicBeans: {
14289    dndSourceComp: EC
14290  },
14291  icons: {
14292    // drag handle used to pick up draggable rows
14293    rowDrag: "grip"
14294  }
14295}, zd = {
14296  moduleName: "SharedDragAndDrop",
14297  version: I,
14298  beans: [Cf],
14299  dependsOn: [Wd],
14300  userComponents: {
14301    agDragAndDropImage: Dm
14302  },
14303  icons: {
14304    // shown on drag and drop image component icon while dragging column to the side of the grid to pin
14305    columnMovePin: "pin",
14306    // shown on drag and drop image component icon while dragging over part of the page that is not a drop zone
14307    columnMoveHide: "eye-slash",
14308    // shown on drag and drop image component icon while dragging columns to reorder
14309    columnMoveMove: "arrows",
14310    // animating icon shown when dragging a column to the right of the grid causes horizontal scrolling
14311    columnMoveLeft: "left",
14312    // animating icon shown when dragging a column to the left of the grid causes horizontal scrolling
14313    columnMoveRight: "right",
14314    // shown on drag and drop image component icon while dragging over Row Groups drop zone
14315    columnMoveGroup: "group",
14316    // shown on drag and drop image component icon while dragging over Values drop zone
14317    columnMoveValue: "aggregation",
14318    // shown on drag and drop image component icon while dragging over pivot drop zone
14319    columnMovePivot: "pivot",
14320    // shown on drag and drop image component icon while dragging over drop zone that doesn't support it, e.g.
14321    // string column over aggregation drop zone
14322    dropNotAllowed: "not-allowed",
14323    // drag handle used to pick up draggable rows
14324    rowDrag: "grip"
14325  }
14326}, HC = {
14327  moduleName: "RowDrag",
14328  version: I,
14329  beans: [OC],
14330  apiFunctions: {
14331    addRowDropZone: DC,
14332    removeRowDropZone: AC,
14333    getRowDropZoneParams: TC
14334  },
14335  dependsOn: [zd]
14336}, BC = {
14337  moduleName: "HorizontalResize",
14338  version: I,
14339  beans: [MC],
14340  dependsOn: [Wd]
14341}, NC = (
14342  /*css*/
14343  ":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}"
14344), VC = class extends y {
14345  constructor() {
14346    super(...arguments), this.beanName = "colAnimation", this.executeNextFuncs = [], this.executeLaterFuncs = [], this.active = !1, this.activeNext = !1, this.suppressAnimation = !1, this.animationThreadCount = 0;
14347  }
14348  postConstruct() {
14349    this.beans.ctrlsSvc.whenReady(this, (e) => this.gridBodyCtrl = e.gridBodyCtrl);
14350  }
14351  isActive() {
14352    return this.active && !this.suppressAnimation;
14353  }
14354  setSuppressAnimation(e) {
14355    this.suppressAnimation = e;
14356  }
14357  start() {
14358    if (this.active)
14359      return;
14360    const { gos: e } = this;
14361    e.get("suppressColumnMoveAnimation") || e.get("enableRtl") || (this.ensureAnimationCssClassPresent(), this.active = !0, this.activeNext = !0);
14362  }
14363  finish() {
14364    this.active && this.flush(
14365      () => this.activeNext = !1,
14366      () => this.active = !1
14367    );
14368  }
14369  executeNextVMTurn(e) {
14370    this.activeNext ? this.executeNextFuncs.push(e) : e();
14371  }
14372  executeLaterVMTurn(e) {
14373    this.active ? this.executeLaterFuncs.push(e) : e();
14374  }
14375  ensureAnimationCssClassPresent() {
14376    this.animationThreadCount++;
14377    const e = this.animationThreadCount, { gridBodyCtrl: t } = this;
14378    t.setColumnMovingCss(!0), this.executeLaterFuncs.push(() => {
14379      this.animationThreadCount === e && t.setColumnMovingCss(!1);
14380    });
14381  }
14382  flush(e, t) {
14383    const { executeNextFuncs: i, executeLaterFuncs: s } = this;
14384    if (i.length === 0 && s.length === 0) {
14385      e(), t();
14386      return;
14387    }
14388    const o = (n) => {
14389      for (; n.length; ) {
14390        const r = n.pop();
14391        r && r();
14392      }
14393    };
14394    this.beans.frameworkOverrides.wrapIncoming(() => {
14395      window.setTimeout(() => {
14396        e(), o(i);
14397      }, 0), window.setTimeout(() => {
14398        t(), o(s);
14399      }, 200);
14400    });
14401  }
14402};
14403function WC(e, t, i) {
14404  e.colMoves?.moveColumnByIndex(t, i, "api");
14405}
14406function zC(e, t, i) {
14407  e.colMoves?.moveColumns(t, i, "api");
14408}
14409var _C = class extends y {
14410  constructor(e) {
14411    super(), this.pinned = e, this.columnsToAggregate = [], this.columnsToGroup = [], this.columnsToPivot = [];
14412  }
14413  /** Callback for when drag enters */
14414  onDragEnter(e) {
14415    if (this.clearColumnsList(), this.gos.get("functionsReadOnly"))
14416      return;
14417    const t = e.dragItem.columns;
14418    t && t.forEach((i) => {
14419      i.isPrimary() && (i.isAnyFunctionActive() || (i.isAllowValue() ? this.columnsToAggregate.push(i) : i.isAllowRowGroup() ? this.columnsToGroup.push(i) : i.isAllowPivot() && this.columnsToPivot.push(i)));
14420    });
14421  }
14422  getIconName() {
14423    return this.columnsToAggregate.length + this.columnsToGroup.length + this.columnsToPivot.length > 0 ? this.pinned ? "pinned" : "move" : null;
14424  }
14425  /** Callback for when drag leaves */
14426  // eslint-disable-next-line @typescript-eslint/no-unused-vars
14427  onDragLeave(e) {
14428    this.clearColumnsList();
14429  }
14430  clearColumnsList() {
14431    this.columnsToAggregate.length = 0, this.columnsToGroup.length = 0, this.columnsToPivot.length = 0;
14432  }
14433  /** Callback for when dragging */
14434  // eslint-disable-next-line @typescript-eslint/no-unused-vars
14435  onDragging(e) {
14436  }
14437  /** Callback for when drag stops */
14438  // eslint-disable-next-line @typescript-eslint/no-unused-vars
14439  onDragStop(e) {
14440    const { valueColsSvc: t, rowGroupColsSvc: i, pivotColsSvc: s } = this.beans;
14441    this.columnsToAggregate.length > 0 && t?.addColumns(this.columnsToAggregate, "toolPanelDragAndDrop"), this.columnsToGroup.length > 0 && i?.addColumns(this.columnsToGroup, "toolPanelDragAndDrop"), this.columnsToPivot.length > 0 && s?.addColumns(this.columnsToPivot, "toolPanelDragAndDrop");
14442  }
14443  onDragCancel() {
14444    this.clearColumnsList();
14445  }
14446};
14447function UC(e, t) {
14448  !t || t.length <= 1 || t.filter((s) => e.indexOf(s) < 0).length > 0 || t.sort((s, o) => {
14449    const n = e.indexOf(s), r = e.indexOf(o);
14450    return n - r;
14451  });
14452}
14453function _d(e) {
14454  const { isFromHeader: t, fromLeft: i, xPosition: s, fromEnter: o, fakeEvent: n, pinned: r, gos: a, c
14454olModel: l, colMoves: d, visibleCols: c } = e;
14455  let { allMovingColumns: u } = e;
14456  if (t) {
14457    const P = [];
14458    u.forEach((T) => {
14459      let D = null, R = T.getParent();
14460      for (; R != null && R.getDisplayedLeafColumns().length === 1; )
14461        D = R, R = R.getParent();
14462      D != null ? (!!D.getColGroupDef()?.marryChildren ? (
14463        // when marry children is true, we also have to move hidden
14464        // columns within the group, so grab them from the `providedColumnGroup`
14465        D.getProvidedColumnGroup().getLeafColumns()
14466      ) : D.getLeafColumns()).forEach((K) => {
14467        P.includes(K) || P.push(K);
14468      }) : P.includes(T) || P.push(T);
14469    }), u = P;
14470  }
14471  const h = u.slice();
14472  UC(l.getCols(), h);
14473  const g = qC({
14474    movingCols: h,
14475    draggingRight: i,
14476    xPosition: s,
14477    pinned: r,
14478    gos: a,
14479    colModel: l,
14480    visibleCols: c
14481  }), p = $C(h, l);
14482  if (g.length === 0)
14483    return;
14484  const f = g[0];
14485  let m = p !== null && !o;
14486  if (t && (m = p !== null), m && !n && (!i && f >= p || i && f <= p))
14487    return;
14488  const C = c.allCols, w = [];
14489  let S = null;
14490  for (let P = 0; P < g.length; P++) {
14491    const T = g[P], D = d.getProposedColumnOrder(h, T);
14492    if (!d.doesOrderPassRules(D))
14493      continue;
14494    const R = D.filter((k) => C.includes(k));
14495    if (S === null)
14496      S = R;
14497    else if (!Wt(R, S))
14498      break;
14499    const E = KC(D);
14500    w.push({ move: T, fragCount: E });
14501  }
14502  if (w.length === 0)
14503    return;
14504  w.sort((P, T) => P.fragCount - T.fragCount);
14505  const v = w[0].move;
14506  if (!(v > l.getCols().length - u.length))
14507    return { columns: u, toIndex: v };
14508}
14509function Ud(e) {
14510  const { columns: t, toIndex: i } = _d(e) || {}, { finished: s, colMoves: o } = e;
14511  return !t || i == null ? null : (o.moveColumns(t, i, "uiColumnMoved", s), s ? null : { columns: t, toIndex: i });
14512}
14513function $C(e, t) {
14514  const i = t.getCols(), s = Tg(e.map((l) => i.indexOf(l))), o = s[0];
14515  return W(s) - o !== s.length - 1 ? null : o;
14516}
14517function KC(e) {
14518  function t(s) {
14519    const o = [];
14520    let n = s.getOriginalParent();
14521    for (; n != null; )
14522      o.push(n), n = n.getOriginalParent();
14523    return o;
14524  }
14525  let i = 0;
14526  for (let s = 0; s < e.length - 1; s++) {
14527    let o = t(e[s]), n = t(e[s + 1]);
14528    [o, n] = o.length > n.length ? [o, n] : [n, o], o.forEach((r) => {
14529      n.indexOf(r) === -1 && i++;
14530    });
14531  }
14532  return i;
14533}
14534function jC(e, t) {
14535  switch (t) {
14536    case "left":
14537      return e.leftCols;
14538    case "right":
14539      return e.rightCols;
14540    default:
14541      return e.centerCols;
14542  }
14543}
14544function qC(e) {
14545  const { movingCols: t, draggingRight: i, xPosition: s, pinned: o, gos: n, colModel: r, visibleCols: a } = e;
14546  if (n.get("suppressMovableColumns") || t.some((S) => S.getColDef().suppressMovable))
14547    return [];
14548  const d = jC(a, o), c = r.getCols(), u = d.filter((S) => t.includes(S)), h = d.filter((S) => !t.includes(S)), g = c.filter((S) => !t.includes(S));
14549  let p = 0, f = s;
14550  if (i) {
14551    let S = 0;
14552    u.forEach((v) => S += v.getActualWidth()), f -= S;
14553  }
14554  if (f > 0) {
14555    for (let S = 0; S < h.length; S++) {
14556      const v = h[S];
14557      if (f -= v.getActualWidth(), f < 0)
14558        break;
14559      p++;
14560    }
14561    i && p++;
14562  }
14563  let m;
14564  if (p > 0) {
14565    const S = h[p - 1];
14566    m = g.indexOf(S) + 1;
14567  } else
14568    m = g.indexOf(h[0]), m === -1 && (m = 0);
14569  const C = [m], w = (S, v) => S - v;
14570  if (i) {
14571    let S = m + 1;
14572    const v = c.length - 1;
14573    for (; S <= v; )
14574      C.push(S), S++;
14575    C.sort(w);
14576  } else {
14577    let S = m;
14578    const v = c.length - 1;
14579    let P = c[S];
14580    for (; S <= v && d.indexOf(P) < 0; )
14581      S++, C.push(S), P = c[S];
14582    S = m - 1;
14583    const T = 0;
14584    for (; S >= T; )
14585      C.push(S), S--;
14586    C.sort(w).reverse();
14587  }
14588  return C;
14589}
14590function gn(e) {
14591  const { pinned: t, fromKeyboard: i, gos: s, ctrlsSvc: o, useHeaderRow: n, skipScrollPadding: r } = e;
14592  let a = o.getHeaderRowContainerCtrl(t)?.eViewport, { x: l } = e;
14593  return a ? (i && (l -= a.getBoundingClientRect().left), s.get("enableRtl") && (n && (a = a.querySelector(".ag-header-row")), l = a.clientWidth - l), t == null && !r && (l += o.get("center").getCenterViewportScrollLeft()), l) : 0;
14594}
14595function Lo(e, t) {
14596  for (const i of e)
14597    i.moving = t, i.dispatchColEvent("movingChanged", "uiColumnMoved");
14598}
14599var pa = 7, pn = 100, Ss = pn / 2, YC = 5, QC = 100, ZC = class extends y {
14600  constructor(e) {
14601    super(), this.pinned = e, this.needToMoveLeft = !1, this.needToMoveRight = !1, this.lastMovedInfo = null, this.isCenterContainer = !A(e);
14602  }
14603  postConstruct() {
14604    this.beans.ctrlsSvc.whenReady(this, (e) => {
14605      this.gridBodyCon = e.gridBodyCtrl;
14606    });
14607  }
14608  getIconName() {
14609    const { pinned: e, lastDraggingEvent: t } = this, i = t?.dragItem.columns ?? [];
14610    for (const s of i) {
14611      const o = s.getPinned();
14612      if (s.getColDef().lockPinned) {
14613        if (o == e)
14614          return "move";
14615        continue;
14616      }
14617      if (o === e || !e)
14618        return "move";
14619      if (!o && e)
14620        return "pinned";
14621    }
14622    return "notAllowed";
14623  }
14624  onDragEnter(e) {
14625    const t = e.dragItem, i = t.columns;
14626    if (e.dragSource.type === 0)
14627      this.setColumnsVisible(i, !0, "uiColumnDragged");
14628    else {
14629      const o = t.visibleState, n = (i || []).filter((r) => o[r.getId()]);
14630      this.setColumnsVisible(n, !0, "uiColumnDragged");
14631    }
14632    this.gos.get("suppressMoveWhenColumnDragging") || this.attemptToPinColumns(i, this.pinned), this.onDragging(e, !0, !0);
14633  }
14634  onDragging(e = this.lastDraggingEvent, t = !1, i = !1, s = !1) {
14635    const { gos: o, ctrlsSvc: n } = this.beans, r = o.get("suppressMoveWhenColumnDragging");
14636    if (s && !r) {
14637      this.finishColumnMoving();
14638      return;
14639    }
14640    if (this.lastDraggingEvent = e, !e || !s && Y(e.hDirection))
14641      return;
14642    const a = gn({
14643      x: e.x,
14644      pinned: this.pinned,
14645      gos: o,
14646      ctrlsSvc: n
14647    });
14648    t || this.checkCenterForScrolling(a), r ? this.handleColumnDragWhileSuppressingMovement(e, t, i, a, s) : this.handleColumnDragWhileAllowingMovement(e, t, i, a, s);
14649  }
14650  onDragLeave() {
14651    this.ensureIntervalCleared(), this.clearHighlighted(), this.lastMovedInfo = null;
14652  }
14653  onDragStop() {
14654    this.onDragging(this.lastDraggingEvent, !1, !0, !0), this.ensureIntervalCleared(), this.lastMovedInfo = null;
14655  }
14656  onDragCancel() {
14657    this.clearHighlighted(), this.ensureIntervalCleared(), this.lastMovedInfo = null;
14658  }
14659  setColumnsVisible(e, t, i) {
14660    if (!e)
14661      return;
14662    const s = e.filter((o) => !o.getColDef().lockVisible);
14663    this.beans.colModel.setColsVisible(s, t, i);
14664  }
14665  finishColumnMoving() {
14666    this.clearHighlighted();
14667    const e = this.lastMovedInfo;
14668    if (!e)
14669      return;
14670    const { columns: t, toIndex: i } = e;
14671    this.beans.colMoves.moveColumns(t, i, "uiColumnMoved", !0);
14672  }
14673  handleColumnDragWhileSuppressingMovement(e, t, i, s, o) {
14674    const n = this.getAllMovingColumns(e, !0);
14675    if (o) {
14676      const r = this.isAttemptingToPin(n);
14677      r && this.attemptToPinColumns(n, void 0, !0);
14678      const { fromLeft: a, xPosition: l } = this.getNormalisedXPositionInfo(n, r) || {};
14679      if (a == null || l == null) {
14680        this.finishColumnMoving();
14681        return;
14682      }
14683      this.moveColumnsAfterHighlight({
14684        allMovingColumns: n,
14685        xPosition: l,
14686        fromEnter: t,
14687        fakeEvent: i,
14688        fromLeft: a
14689      });
14690    } else {
14691      if (!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))
14692        return;
14693      this.highlightHoveredColumn(n, s);
14694    }
14695  }
14696  handleColumnDragWhileAllowingMovement(e, t, i, s, o) {
14697    const n = this.getAllMovingColumns(e), r = this.normaliseDirection(e.hDirection) === "right", a = e.dragSource.type === 1, l = this.getMoveColumnParams({
14698      allMovingColumns: n,
14699      isFromHeader: a,
14700      xPosition: s,
14701      fromLeft: r,
14702      fromEnter: t,
14703      fakeEvent: i
14704    }), d = Ud({ ...l, finished: o });
14705    d && (this.lastMovedInfo = d);
14706  }
14707  getAllMovingColumns(e, t = !1) {
14708    const i = e.dragSource.getDragItem();
14709    let s = null;
14710    t ? (s = i.columnsInSplit, s || (s = i.columns)) : s = i.columns;
14711    const o = (n) => n.getColDef().lockPinned ? n.getPinned() == this.pinned : !0;
14712    return s ? s.filter(o) : [];
14713  }
14714  getMoveColumnParams(e) {
14715    const { allMovingColumns: t, isFromHeader: i, xPosition: s, fromLeft: o, fromEnter: n, fakeEvent: r }
14715 = e, { gos: a, colModel: l, colMoves: d, visibleCols: c } = this.beans;
14716    return {
14717      allMovingColumns: t,
14718      isFromHeader: i,
14719      fromLeft: o,
14720      xPosition: s,
14721      pinned: this.pinned,
14722      fromEnter: n,
14723      fakeEvent: r,
14724      gos: a,
14725      colModel: l,
14726      colMoves: d,
14727      visibleCols: c
14728    };
14729  }
14730  highlightHoveredColumn(e, t) {
14731    const { gos: i, colModel: s } = this.beans, o = i.get("enableRtl"), n = s.getCols().filter((c) => c.isVisible() && c.getPinned() === this.pinned);
14732    let r = null, a = null, l = null;
14733    for (const c of n) {
14734      if (a = c.getActualWidth(), r = this.getNormalisedColumnLeft(c, 0, o), r != null) {
14735        const u = r + a;
14736        if (r <= t && u >= t) {
14737          l = c;
14738          break;
14739        }
14740      }
14741      r = null, a = null;
14742    }
14743    if (l)
14744      e.indexOf(l) !== -1 && (l = null);
14745    else {
14746      for (let c = n.length - 1; c >= 0; c--) {
14747        const u = n[c], h = n[c].getParent();
14748        if (!h) {
14749          l = u;
14750          break;
14751        }
14752        const g = h?.getDisplayedLeafColumns();
14753        if (g.length) {
14754          l = W(g);
14755          break;
14756        }
14757      }
14758      if (!l)
14759        return;
14760      r = this.getNormalisedColumnLeft(l, 0, o), a = l.getActualWidth();
14761    }
14762    if (this.lastHighlightedColumn?.column !== l && this.clearHighlighted(), l == null || r == null || a == null)
14763      return;
14764    let d;
14765    t - r < a / 2 !== o ? d = 0 : d = 1, fa(l, d), this.lastHighlightedColumn = { column: l, position: d };
14766  }
14767  getNormalisedXPositionInfo(e, t) {
14768    const { gos: i, visibleCols: s } = this.beans, o = i.get("enableRtl"), { firstMovingCol: n, column: r, position: a } = this.getColumnMoveAndTargetInfo(
14769      e,
14770      t,
14771      o
14772    );
14773    if (!n || !r || a == null)
14774      return;
14775    const l = s.allCols, d = l.indexOf(n), c = l.indexOf(r), u = a === 0 !== o, h = d < c || d === c && !u;
14776    let g = 0;
14777    if (u ? h && (g -= 1) : h || (g += 1), c + g === d)
14778      return;
14779    const p = l[c + g];
14780    if (!p)
14781      return;
14782    const f = this.getNormalisedColumnLeft(p, 20, o);
14783    return { fromLeft: h, xPosition: f };
14784  }
14785  getColumnMoveAndTargetInfo(e, t, i) {
14786    const s = this.lastHighlightedColumn || {}, { firstMovingCol: o, lastMovingCol: n } = XC(e);
14787    if (!o || !n || s.column || !t)
14788      return {
14789        firstMovingCol: o,
14790        ...s
14791      };
14792    const a = this.getPinDirection() === "left";
14793    return {
14794      firstMovingCol: o,
14795      position: a ? 1 : 0,
14796      column: a !== i ? o : n
14797    };
14798  }
14799  normaliseDirection(e) {
14800    if (this.gos.get("enableRtl"))
14801      switch (e) {
14802        case "left":
14803          return "right";
14804        case "right":
14805          return "left";
14806      }
14807    return e;
14808  }
14809  getNormalisedColumnLeft(e, t, i) {
14810    const { gos: s, ctrlsSvc: o } = this.beans, n = e.getLeft();
14811    if (n == null)
14812      return null;
14813    const r = e.getActualWidth();
14814    return gn({
14815      x: i ? n + r - t : n + t,
14816      pinned: e.getPinned(),
14817      useHeaderRow: i,
14818      skipScrollPadding: !0,
14819      gos: s,
14820      ctrlsSvc: o
14821    });
14822  }
14823  isAttemptingToPin(e) {
14824    const t = this.needToMoveLeft || this.needToMoveRight, i = this.failedMoveAttempts > pa;
14825    return t && i || e.some((s) => s.getPinned() !== this.pinned);
14826  }
14827  moveColumnsAfterHighlight(e) {
14828    const { allMovingColumns: t, xPosition: i, fromEnter: s, fakeEvent: o, fromLeft: n } = e, r = this.getMoveColumnParams({
14829      allMovingColumns: t,
14830      isFromHeader: !0,
14831      xPosition: i,
14832      fromLeft: n,
14833      fromEnter: s,
14834      fakeEvent: o
14835    }), { columns: a, toIndex: l } = _d(r) || {};
14836    a && l != null && (this.lastMovedInfo = {
14837      columns: a,
14838      toIndex: l
14839    }), this.finishColumnMoving();
14840  }
14841  clearHighlighted() {
14842    const { lastHighlightedColumn: e } = this;
14843    e && (fa(e.column, null), this.lastHighlightedColumn = null);
14844  }
14845  checkCenterForScrolling(e) {
14846    if (!this.isCenterContainer)
14847      return;
14848    const t = this.beans.ctrlsSvc.get("center"), i = t.getCenterViewportScrollLeft(), s = i + t.getCenterWidth();
14849    let o, n;
14850    this.gos.get("enableRtl") ? (o = e < i + Ss, n = e >
14850 s - Ss) : (n = e < i + Ss, o = e > s - Ss), this.needToMoveRight = o, this.needToMoveLeft = n, n || o ? this.ensureIntervalStarted() : this.ensureIntervalCleared();
14851  }
14852  ensureIntervalStarted() {
14853    this.movingIntervalId || (this.intervalCount = 0, this.failedMoveAttempts = 0, this.movingIntervalId = window.setInterval(this.moveInterval.bind(this), QC), this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft ? "left" : "right", !0));
14854  }
14855  ensureIntervalCleared() {
14856    this.movingIntervalId && (window.clearInterval(this.movingIntervalId), this.movingIntervalId = null, this.failedMoveAttempts = 0, this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.getIconName(), !1));
14857  }
14858  moveInterval() {
14859    let e;
14860    this.intervalCount++, e = 10 + this.intervalCount * YC, e > pn && (e = pn);
14861    let t = null;
14862    const i = this.gridBodyCon.scrollFeature;
14863    if (this.needToMoveLeft ? t = i.scrollHorizontally(-e) : this.needToMoveRight && (t = i.scrollHorizontally(e)), t !== 0)
14864      this.onDragging(this.lastDraggingEvent), this.failedMoveAttempts = 0;
14865    else {
14866      this.failedMoveAttempts++;
14867      const { pinnedCols: s, dragAndDrop: o, gos: n } = this.beans;
14868      if (this.failedMoveAttempts <= pa + 1 || !s)
14869        return;
14870      if (o.getDragAndDropImageComponent()?.setIcon("pinned", !1), !n.get("suppressMoveWhenColumnDragging")) {
14871        const r = this.lastDraggingEvent?.dragItem.columns;
14872        this.attemptToPinColumns(r, void 0, !0);
14873      }
14874    }
14875  }
14876  getPinDirection() {
14877    if (this.needToMoveLeft || this.pinned === "left")
14878      return "left";
14879    if (this.needToMoveRight || this.pinned === "right")
14880      return "right";
14881  }
14882  attemptToPinColumns(e, t, i = !1) {
14883    const s = (e || []).filter((r) => !r.getColDef().lockPinned);
14884    if (!s.length)
14885      return 0;
14886    i && (t = this.getPinDirection());
14887    const { pinnedCols: o, dragAndDrop: n } = this.beans;
14888    return o?.setColsPinned(s, t, "uiColumnDragged"), i && n.nudge(), s.length;
14889  }
14890  destroy() {
14891    super.destroy(), this.lastDraggingEvent = null, this.clearHighlighted(), this.lastMovedInfo = null;
14892  }
14893};
14894function fa(e, t) {
14895  e.highlighted !== t && (e.highlighted = t, e.dispatchColEvent("headerHighlightChanged", "uiColumnMoved"));
14896}
14897function XC(e) {
14898  const t = e.length;
14899  let i, s;
14900  for (let o = 0; o <= t; o++) {
14901    if (!i) {
14902      const n = e[o];
14903      n.getLeft() != null && (i = n);
14904    }
14905    if (!s) {
14906      const n = e[t - 1 - o];
14907      n.getLeft() != null && (s = n);
14908    }
14909    if (i && s)
14910      break;
14911  }
14912  return { firstMovingCol: i, lastMovingCol: s };
14913}
14914var JC = class extends y {
14915  constructor(e, t) {
14916    super(), this.pinned = e, this.eContainer = t;
14917  }
14918  postConstruct() {
14919    const { ctrlsSvc: e, dragAndDrop: t } = this.beans, i = this.pinned;
14920    e.whenReady(this, (s) => {
14921      let o;
14922      const n = s.gridBodyCtrl.eBodyViewport;
14923      switch (i) {
14924        case "left":
14925          o = [
14926            [n, s.left.eContainer],
14927            [s.bottomLeft.eContainer],
14928            [s.topLeft.eContainer]
14929          ];
14930          break;
14931        case "right":
14932          o = [
14933            [n, s.right.eContainer],
14934            [s.bottomRight.eContainer],
14935            [s.topRight.eContainer]
14936          ];
14937          break;
14938        default:
14939          o = [
14940            [n, s.center.eViewport],
14941            [s.bottomCenter.eViewport],
14942            [s.topCenter.eViewport]
14943          ];
14944          break;
14945      }
14946      this.eSecondaryContainers = o;
14947    }), this.moveColumnFeature = this.createManagedBean(new ZC(i)), this.bodyDropPivotTarget = this.createManagedBean(new _C(i)), t.addDropTarget(this), this.addDestroyFunc(() => t.removeDropTarget(this));
14948  }
14949  isInterestedIn(e) {
14950    return e === 1 || e === 0 && this.gos.get("allowDragFromColumnsToolPanel");
14951  }
14952  getSecondaryContainers() {
14953    return this.eSecondaryContainers;
14954  }
14955  getContainer() {
14956    return this.eContainer;
14957  }
14958  getIconName() {
14959    return this.currentDropListener.getIconName();
14960  }
14961  // we want to use the bodyPivotTarget if the user is dragging columns in from the toolPanel
14962  // and we are in pivot mode, as it has to logic to set pivot/value/group on the columns when
14963  // dropped into the grid's body.
14964  isDropColumnInPivotMode(e) {
14965    return this.beans.colModel.isPivotMode() && e.dragSource.type === 0;
14966  }
14967  onDragEnter(e) {
14968    this.currentDropListener = this.isDropColumnInPivotMode(e) ? this.bodyDropPivotTarget : this.moveColumnFeature, this.currentDropListener.onDragEnter(e);
14969  }
14970  onDragLeave(e) {
14971    this.currentDropListener.onDragLeave(e);
14972  }
14973  onDragging(e) {
14974    this.currentDropListener.onDragging(e);
14975  }
14976  onDragStop(e) {
14977    this.currentDropListener.onDragStop(e);
14978  }
14979  onDragCancel() {
14980    this.currentDropListener.onDragCancel();
14981  }
14982}, ev = class extends y {
14983  constructor() {
14984    super(...arguments), this.beanName = "colMoves";
14985  }
14986  moveColumnByIndex(e, t, i) {
14987    const s = this.beans.colModel.getCols();
14988    if (!s)
14989      return;
14990    const o = s[e];
14991    this.moveColumns([o], t, i);
14992  }
14993  moveColumns(e, t, i, s = !0) {
14994    const { colModel: o, colAnimation: n, visibleCols: r, eventSvc: a } = this.beans, l = o.getCols();
14995    if (!l)
14996      return;
14997    if (t > l.length - e.length) {
14998      x(30, { toIndex: t });
14999      return;
15000    }
15001    n?.start();
15002    const d = o.getColsForKeys(e);
15003    this.doesMovePassRules(d, t) && (ia(o.getCols(), d, t), r.refresh(i), a.dispatchEvent({
15004      type: "columnMoved",
15005      columns: d,
15006      column: d.length === 1 ? d[0] : null,
15007      toIndex: t,
15008      finished: s,
15009      source: i
15010    })), n?.finish();
15011  }
15012  doesMovePassRules(e, t) {
15013    const i = this.getProposedColumnOrder(e, t);
15014    return this.doesOrderPassRules(i);
15015  }
15016  doesOrderPassRules(e) {
15017    const { colModel: t, gos: i } = this.beans;
15018    return !(!$l(e, t.getColTree()) || !((o) => {
15019      const n = (d) => d ? d === "left" || d === !0 ? -1 : 1 : 0, r = i.get("enableRtl");
15020      let a = r ? 1 : -1, l = !0;
15021      return o.forEach((d) => {
15022        const c = n(d.getColDef().lockPosition);
15023        r ? c > a && (l = !1) : c < a && (l = !1), a = c;
15024      }), l;
15025    })(e));
15026  }
15027  getProposedColumnOrder(e, t) {
15028    const s = this.beans.colModel.getCols().slice();
15029    return ia(s, e, t), s;
15030  }
15031  createBodyDropTarget(e, t) {
15032    return new JC(e, t);
15033  }
15034  moveHeader(e, t, i, s, o) {
15035    const { ctrlsSvc: n, gos: r, colModel: a, visibleCols: l, focusSvc: d } = this.beans, c = t.getBoundingClientRect(), u = c.left, h = ee(i), g = h ? c.width : i.getActualWidth(), p = e === "left" !== r.get("enableRtl"), f = gn({
15036      x: p ? u - 20 : u + g + 20,
15037      pinned: s,
15038      fromKeyboard: !0,
15039      gos: r,
15040      ctrlsSvc: n
15041    }
15041), m = d.focusedHeader;
15042    Ud({
15043      allMovingColumns: h ? i.getLeafColumns() : [i],
15044      isFromHeader: !0,
15045      fromLeft: e === "right",
15046      xPosition: f,
15047      pinned: s,
15048      fromEnter: !1,
15049      fakeEvent: !1,
15050      gos: r,
15051      colModel: a,
15052      colMoves: this,
15053      visibleCols: l,
15054      finished: !0
15055    });
15056    let C;
15057    if (h) {
15058      const w = i.getDisplayedLeafColumns();
15059      C = p ? w[0] : W(w);
15060    } else
15061      C = i;
15062    if (n.getScrollFeature().ensureColumnVisible(C, "auto"), (!o.isAlive() || r.get("ensureDomOrder")) && m) {
15063      let w;
15064      if (h) {
15065        const S = i.getGroupId(), v = i.getLeafColumns();
15066        if (!v.length)
15067          return;
15068        const P = v[0].getParent();
15069        if (!P)
15070          return;
15071        w = tv(P, S);
15072      } else
15073        w = i;
15074      w && d.focusHeaderPosition({
15075        headerPosition: {
15076          ...m,
15077          column: w
15078        }
15079      });
15080    }
15081  }
15082  setDragSourceForHeader(e, t, i) {
15083    const { gos: s, colModel: o, dragAndDrop: n, visibleCols: r } = this.beans;
15084    let a = !s.get("suppressDragLeaveHidesColumns");
15085    const l = ee(t), d = l ? t.getProvidedColumnGroup().getLeafColumns() : [t], u = {
15086      type: 1,
15087      eElement: e,
15088      getDefaultIconName: () => a ? "hide" : "notAllowed",
15089      getDragItem: l ? () => sv(t, r.allCols) : () => iv(t),
15090      dragItemName: i,
15091      onDragStarted: () => {
15092        a = !s.get("suppressDragLeaveHidesColumns"), Lo(d, !0);
15093      },
15094      onDragStopped: () => Lo(d, !1),
15095      onDragCancelled: () => Lo(d, !1),
15096      onGridEnter: (h) => {
15097        if (a) {
15098          const { columns: g = [], visibleState: p } = h ?? {}, f = l ? (C) => !p || p[C.getColId()] : () => !0, m = g.filter(
15099            (C) => !C.getColDef().lockVisible && f(C)
15100          );
15101          o.setColsVisible(m, !0, "uiColumnMoved");
15102        }
15103      },
15104      onGridExit: (h) => {
15105        if (a) {
15106          const g = h?.columns?.filter((p) => !p.getColDef().lockVisible) || [];
15107          o.setColsVisible(g, !1, "uiColumnMoved");
15108        }
15109      }
15110    };
15111    return n.addDragSource(u, !0), u;
15112  }
15113};
15114function tv(e, t) {
15115  for (; e; ) {
15116    if (e.getGroupId() === t)
15117      return e;
15118    e = e.getParent();
15119  }
15120}
15121function iv(e) {
15122  const t = {};
15123  return t[e.getId()] = e.isVisible(), {
15124    columns: [e],
15125    visibleState: t
15126  };
15127}
15128function sv(e, t) {
15129  const i = e.getProvidedColumnGroup().getLeafColumns(), s = {};
15130  i.forEach((a) => s[a.getId()] = a.isVisible());
15131  const o = [];
15132  t.forEach((a) => {
15133    i.indexOf(a) >= 0 && (o.push(a), Ve(i, a));
15134  }), i.forEach((a) => o.push(a));
15135  const n = [], r = e.getLeafColumns();
15136  for (const a of o)
15137    r.indexOf(a) !== -1 && n.push(a);
15138  return {
15139    columns: o,
15140    columnsInSplit: n,
15141    visibleState: s
15142  };
15143}
15144var ov = {
15145  moduleName: "ColumnMove",
15146  version: I,
15147  beans: [ev, VC],
15148  apiFunctions: {
15149    moveColumnByIndex: WC,
15150    moveColumns: zC
15151  },
15152  dependsOn: [zd],
15153  css: [NC]
15154}, nv = class extends y {
15155  constructor() {
15156    super(...arguments), this.beanName = "autoWidthCalc";
15157  }
15158  postConstruct() {
15159    this.beans.ctrlsSvc.whenReady(this, (e) => {
15160      this.centerRowContainerCtrl = e.center;
15161    });
15162  }
15163  // this is the trick: we create a dummy container and clone all the cells
15164  // into the dummy, then check the dummy's width. then destroy the dummy
15165  // as we don't need it any more.
15166  // drawback: only the cells visible on the screen are considered
15167  getPreferredWidthForColumn(e, t) {
15168    const i = this.getHeaderCellForColumn(e);
15169    if (!i)
15170      return -1;
15171    const s = this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);
15172    return t || s.push(i), this.addElementsToContainerAndGetWidth(s);
15173  }
15174  getPreferredWidthForColumnGroup(e) {
15175    const t = this.getHeaderCellForColumn(e);
15176    return t ? this.addElementsToContainerAndGetWidth([t]) : -1;
15177  }
15178  addElementsToContainerAndGetWidth(e) {
15179    const t = document.createElement("form");
15180    t.style.position = "fixed";
15181    const i = this.centerRowContainerCtrl.eContainer;
15182    e.forEach((n) => this.cloneItemIntoDummy(n, t)), i.appendChild(t);
15183    const s = t.offsetWidth;
15184    i.removeChild(t);
15185    const o = this.gos.get("autoSizePadding");
15186    return s + o;
15187  }
15188  getHeaderCellForColumn(e) {
15189    let t = null;
15190    return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEac
15190h((i) => {
15191      const s = i.getHtmlElementForColumnHeader(e);
15192      s != null && (t = s);
15193    }), t;
15194  }
15195  cloneItemIntoDummy(e, t) {
15196    const i = e.cloneNode(!0);
15197    i.style.width = "", i.style.position = "static", i.style.left = "";
15198    const s = document.createElement("div"), o = s.classList;
15199    ["ag-header-cell", "ag-header-group-cell"].some((a) => i.classList.contains(a)) ? (o.add("ag-header", "ag-header-row"), s.style.position = "static") : o.add("ag-row");
15200    let r = e.parentElement;
15201    for (; r; ) {
15202      if (["ag-header-row", "ag-row"].some((l) => r.classList.contains(l))) {
15203        for (let l = 0; l < r.classList.length; l++) {
15204          const d = r.classList[l];
15205          d != "ag-row-position-absolute" && o.add(d);
15206        }
15207        break;
15208      }
15209      r = r.parentElement;
15210    }
15211    s.appendChild(i), t.appendChild(s);
15212  }
15213}, $d = {
15214  moduleName: "AutoWidth",
15215  version: I,
15216  beans: [nv]
15217};
15218function rv(e, t, i = !0, s = "api") {
15219  e.colResize?.setColumnWidths(t, !1, i, s);
15220}
15221var av = class extends y {
15222  constructor(e, t, i, s) {
15223    super(), this.comp = e, this.eResize = t, this.pinned = i, this.columnGroup = s;
15224  }
15225  postConstruct() {
15226    if (!this.columnGroup.isResizable()) {
15227      this.comp.setResizableDisplayed(!1);
15228      return;
15229    }
15230    const { horizontalResizeSvc: e, gos: t, colAutosize: i } = this.beans, s = e.addResizeBar({
15231      eResizeBar: this.eResize,
15232      onResizeStart: this.onResizeStart.bind(this),
15233      onResizing: this.onResizing.bind(this, !1),
15234      onResizeEnd: this.onResizing.bind(this, !0)
15235    });
15236    this.addDestroyFunc(s), !t.get("suppressAutoSize") && i && this.addDestroyFunc(
15237      i.addColumnGroupResize(
15238        this.eResize,
15239        this.columnGroup,
15240        () => this.resizeLeafColumnsToFit("uiColumnResized")
15241      )
15242    );
15243  }
15244  onResizeStart(e) {
15245    const {
15246      columnsToResize: t,
15247      resizeStartWidth: i,
15248      resizeRatios: s,
15249      groupAfterColumns: o,
15250      groupAfterStartWidth: n,
15251      groupAfterRatios: r
15252    } = this.getInitialValues(e);
15253    this.resizeCols = t, this.resizeStartWidth = i, this.resizeRatios = s, this.resizeTakeFromCols = o, this.resizeTakeFromStartWidth = n, this.resizeTakeFromRatios = r, this.toggleColumnResizing(!0);
15254  }
15255  onResizing(e, t, i = "uiColumnResized") {
15256    const s = this.normaliseDragChange(t), o = this.resizeStartWidth + s;
15257    this.resizeColumnsFromLocalValues(o, i, e);
15258  }
15259  getInitialValues(e) {
15260    const t = (l) => l.reduce((d, c) => d + c.getActualWidth(), 0), i = (l, d) => l.map((c) => c.getActualWidth() / d), s = this.getColumnsToResize(), o = t(s), n = i(s, o), r = {
15261      columnsToResize: s,
15262      resizeStartWidth: o,
15263      resizeRatios: n
15264    };
15265    let a = null;
15266    if (e && (a = this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup, "After") ?? null), a) {
15267      const l = a.getDisplayedLeafColumns(), d = r.groupAfterColumns = l.filter(
15268        (u) => u.isResizable()
15269      ), c = r.groupAfterStartWidth = t(d);
15270      r.groupAfterRatios = i(d, c);
15271    } else
15272      r.groupAfterColumns = void 0, r.groupAfterStartWidth = void 0, r.groupAfterRatios = void 0;
15273    return r;
15274  }
15275  resizeLeafColumnsToFit(e) {
15276    const t = this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup), i = this.getInitialValues();
15277    t > i.resizeStartWidth && this.resizeColumns(i, t, e, !0);
15278  }
15279  resizeColumnsFromLocalValues(e, t, i = !0) {
15280    if (!this.resizeCols || !this.resizeRatios)
15281      return;
15282    const s = {
15283      columnsToResize: this.resizeCols,
15284      resizeStartWidth: this.resizeStartWidth,
15285      resizeRatios: this.resizeRatios,
15286      groupAfterColumns: this.resizeTakeFromCols,
15287      groupAfterStartWidth: this.resizeTakeFromStartWidth,
15288      groupAfterRatios: this.resizeTakeFromRatios
15289    };
15290    this.resizeColumns(s, e, t, i);
15291  }
15292  resizeColumns(e, t, i, s = !0) {
15293    const {
15294      columnsToResize: o,
15295      resizeStartWidth: n,
15296      resizeRatios: r,
15297      groupAfterColumns: a,
15298      groupAfterStartWidth: l,
15299      groupAfterRatios: d
15300    } = e, c = [];
15301    if (c.push({
15302      columns: o,
15303      ratios: r,
15304      width: t
15305    }), a) {
15306      const u = t - n;
15307      c.push({
15308        columns: a,
15309        ratios: d,
15310        width: l - u
15311      });
15312    }
15313    this.beans.colResize?.resizeColumnSets({
15314      resizeSets: c,
15315      finished: s,
15316      source: i
15317    }), s && this.toggleColumnResizing(!1);
15318  }
15319  toggleColumnResizing(e) {
15320    this.comp.addOrRemoveCssClass("ag-column-resizing", e);
15321  }
15322  getColumnsToResize() {
15323    return this.columnGroup.getDisplayedLeafColumns().filter((t) => t.isResizable());
15324  }
15325  // optionally inverts the drag, depending on pinned and RTL
15326  // note - this method is duplicated in RenderedHeaderCell - should refactor out?
15327  normaliseDragChange(e) {
15328    let t = e;
15329    return this.gos.get("enableRtl") ? this.pinned !== "left" && (t *= -1) : this.pinned === "right" && (t *= -1), t;
15330  }
15331  destroy() {
15332    super.destroy(), this.resizeCols = void 0, this.resizeRatios = void 0, this.resizeTakeFromCols = void 0, this.resizeTakeFromRatios = void 0;
15333  }
15334}, lv = class extends y {
15335  constructor(e, t, i, s, o) {
15336    super(), this.pinned = e, this.column = t, this.eResize = i, this.comp = s, this.ctrl = o;
15337  }
15338  postConstruct() {
15339    const e = [];
15340    let t, i;
15341    const s = () => {
15342      if (Q(this.eResize, t), !t)
15343        return;
15344      const { horizontalResizeSvc: r, colAutosize: a } = this.beans, l = r.addResizeBar({
15345        eResizeBar: this.eResize,
15346        onResizeStart: this.onResizeStart.bind(this),
15347        onResizing: this.onResizing.bind(this, !1),
15348        onResizeEnd: this.onResizing.bind(this, !0)
15349      });
15350      e.push(l), i && a && e.push(a.addColumnAutosize(this.eResize, this.column));
15351    }, o = () => {
15352      e.forEach((r) => r()), e.length = 0;
15353    }, n = () => {
15354      const r = this.column.isResizable(), a = !this.gos.get("suppressAutoSize") && !this.column.getColDef().suppressAutoSize;
15355      (r !== t || a !== i) && (t = r, i = a, o(), s());
15356    };
15357    n(), this.addDestroyFunc(o), this.ctrl.setRefreshFunction("resize", n);
15358  }
15359  onResizing(e, t) {
15360    const { column: i, lastResizeAmount: s, resizeStartWidth: o, beans: n } = this, r = this.normaliseResizeAmount(t), a = o + r, l = [{ key: i, newWidth: a }], { pinnedCols: d, ctrlsSvc: c, colResize: u } = n;
15361    if (this.column.getPinned()) {
15362      const h = d?.leftWidth ?? 0, g = d?.rightWidth ?? 0, p = Yi(c.getGridBodyCtrl().eBodyViewport) - 50;
15363      if (h + g + (r - s) > p)
15364        return;
15365    }
15366    this.lastResizeAmount = r, u?.setColumnWidths(l, this.resizeWithShiftKey, e, "uiColumnResized"), e && this.toggleColumnResizing(!1);
15367  }
15368  onResizeStart(e) {
15369    this.resizeStartWidth = this.column.getActualWidth(), this.lastResizeAmount = 0, this.resizeWithShiftKey = e, this.toggleColumnResizing(!0);
15370  }
15371  toggleColumnResizing(e) {
15372    this.comp.addOrRemoveCssClass("ag-column-resizing", e);
15373  }
15374  // optionally inverts the drag, depending on pinned and RTL
15375  // note - this method is duplicated in RenderedHeaderGroupCell - should refactor out?
15376  normaliseResizeAmount(e) {
15377    let t = e;
15378    const i = this.pinned !== "left", s = this.pinned === "right";
15379    return this.gos.get("enableRtl") ? i && (t *= -1) : s && (t *= -1), t;
15380  }
15381}, dv = class extends y {
15382  constructor() {
15383    super(...arguments), this.beanName = "colResize";
15384  }
15385  setColumnWidths(e, t, i, s) {
15386    const o = [], { colModel: n, gos: r, visibleCols: a } = this.beans;
15387    e.forEach((l) => {
15388      const d = n.getColDefCol(l.key) || n.getCol(l.key);
15389      if (!d)
15390        return;
15391      if (o.push({
15392        width: l.newWidth,
15393        ratios: [1],
15394        columns: [d]
15395      }), r.get("colResizeDefault") === "shift" && (t = !t), t) {
15396        const u = a.getColAfter(d);
15397        if (!u)
15398          return;
15399        const h = d.getActualWidth() - l.newWidth, g = u.getActualWidth() + h;
15400        o.push({
15401          width: g,
15402          ratios: [1],
15403          columns: [u]
15404        });
15405      }
15406    }), o.length !== 0 && this.resizeColumnSets({
15407      resizeSets: o,
15408      finished: i,
15409      source: s
15410    });
15411  }
15412  // method takes sets of columns and resizes them. either all sets will be resized, or nothing
15413  // be resized. this is used for example when user tries to resize a group and holds shift key,
15414  // then both the current group (grows), and the adjacent group (shrinks), will get resized,
15415  // so that's two sets for this method.
15416  resizeColumnSets(e) {
15417    const { resizeSets: t, finished: i, source: s } = e;
15418    if (!(!t || t.every((c) => cv(c)))) {
15419      if (i) {
15420        const c = t && t.length > 0 ? t[0].columns : null;
15421        Ci(this.eventSvc, c, i, s);
15422      }
15423      return;
15424    }
15425    const n = [], r = [];
15426    t.forEach((c) => {
15427      const { width: u, columns: h, ratios: g } = c, p = {}, f = {};
15428      h.forEach((w) => r.push(w));
15429      let m = !0, C = 0;
15430      for (; m; ) {
15431        if (C++, C > 1e3) {
15432          z(31);
15433          break;
15434        }
15435        m = !1;
15436        const w = [];
15437        let S = 0, v = u;
15438        h.forEach((T, D) => {
15439          if (f[T.getId()])
15440            v -= p[T.getId()];
15441          else {
15442            w.push(T);
15443            const E = g[D];
15444            S += E;
15445          }
15446        });
15447        const P = 1 / S;
15448        w.forEach((T, D) => {
15449          const R = D === w.length - 1;
15450          let E;
15451          R ? E = v : (E = Math.round(g[D] * u * P), v -= E);
15452          const k = T.getMinWidth(), K = T.getMaxWidth();
15453          E < k ? (E = k, f[T.getId()] = !0, m = !0) : K > 0 && E > K && (E = K, f[T.getId()] = !0, m = !0), p[T.getId()] = E;
15454        });
15455      }
15456      h.forEach((w) => {
15457        const S = p[w.getId()];
15458        w.getActualWidth() !== S && (w.setActualWidth(S, s), n.push(w));
15459      });
15460    });
15461    const a = n.length > 0;
15462    let l = [];
15463    if (a) {
15464      const { colFlex: c, visibleCols: u, colViewport: h } = this.beans;
15465      l = c?.refreshFlexedColumns({
15466        resizingCols: r,
15467        skipSetLeft: !0
15468      }) ?? [], u.setLeftValues(s), u.updateBodyWidths(), h.checkViewportColumns();
15469    }
15470    const d = r.concat(l);
15471    (a || i) && Ci(this.eventSvc, d, i, s, l);
15472  }
15473  resizeHeader(e, t, i) {
15474    if (!e.isResizable())
15475      return;
15476    const s = e.getActualWidth(), o = e.getMinWidth(), n = e.getMaxWidth(), r = Math.min(Math.max(s + t, o), n);
15477    this.setColumnWidths([{ key: e, newWidth: r }], i, !0, "uiColumnResized");
15478  }
15479  createResizeFeature(e, t, i, s, o) {
15480    return new lv(e, t, i, s, o);
15481  }
15482  createGroupResizeFeature(e, t, i, s) {
15483    return new av(e, t, i, s);
15484  }
15485};
15486function cv(e) {
15487  const { columns: t, width: i } = e;
15488  let s = 0, o = 0, n = !0;
15489  t.forEach((l) => {
15490    const d = l.getMinWidth();
15491    s += d || 0;
15492    const c = l.getMaxWidth();
15493    c > 0 ? o += c : n = !1;
15494  });
15495  const r = i >= s, a = !n || i <= o;
15496  return r && a;
15497}
15498var uv = {
15499  moduleName: "ColumnResize",
15500  version: I,
15501  beans: [dv],
15502  apiFunctions: {
15503    setColumnWidths: rv
15504  },
15505  dependsOn: [BC, $d]
15506}, hv = class extends y {
15507  constructor(e, t) {
15508    super(), this.removeChildListenersFuncs = [], this.columnGroup = t, this.comp = e;
15509  }
15510  postConstruct() {
15511    this.addListenersToChildrenColumns(), this.addManagedListeners(this.columnGroup, {
15512      displayedChildrenChanged: this.onDisplayedChildrenChanged.bind(this)
15513    }), this.onWidthChanged(), this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this));
15514  }
15515  addListenersToChildrenColumns() {
15516    this.removeListenersOnChildrenColumns();
15517    const e = this.onWidthChanged.bind(this);
15518    this.columnGroup.getLeafColumns().forEach((t) => {
15519      t.addEventListener("widthChanged", e), t.addEventListener("visibleChanged", e), this.removeChildListenersFuncs.push(() => {
15520        t.removeEventListener("widthChanged", e), t.removeEventListener("visibleChanged", e);
15521      });
15522    });
15523  }
15524  removeListenersOnChildrenColumns() {
15525    this.removeChildListenersFuncs.forEach((e) => e()), this.removeChildListenersFuncs = [];
15526  }
15527  onDisplayedChildrenChanged() {
15528    this.addListenersToChildrenColumns(), this.onWidthChanged();
15529  }
15530  onWidthChanged() {
15531    const e = this.columnGroup.getActualWidth();
15532    this.comp.setWidth(`${e}px`), this.comp.addOrRemoveCssClass("ag-hidden", e === 0);
15533  }
15534}, gv = class extends tr {
15535  constructor() {
15536    super(...arguments), this.onSuppressColMoveChange = () => {
15537      !this.isAlive() || this.isSuppressMoving() ? this.removeDragSource() : this.dragSource || this.setDragSource(this.eGui);
15538    };
15539  }
15540  setComp(e, t, i, s, o) {
15541    const { column: n, beans: r } = this, { context: a, colNames: l, colHover: d, colResize: c } = r;
15542    this.comp = e, o = ls(this, a, o), this.setGui(t, o), this.displayName = l.getDisplayNameForColumnGroup(n, "header"), this.addClasses(), this.setupMovingCss(o), this.setupExpandable(o), this.setupTooltip(), this.setupAutoHeight({
15543      wrapperElement: s,
15544      compBean: o
15545    }), this.setupUserComp(), this.addHeaderMouseListeners(o), this.addManagedPropertyListener("groupHeaderHeight", this.refreshMaxHeaderHeight.bind(this)), this.refreshMaxHeaderHeight();
15546    const u = this.rowCtrl.pinned, h = n.getProvidedColumnGroup().getLeafColumns();
15547    d?.createHoverFeature(o, h, t), o.createManagedBean(new er(n, t, r)), o.createManagedBean(new hv(e, n)), c ? this.resizeFeature = o.createManagedBean(
15548      c.createGroupResizeFeature(e, i, u, n)
15549    ) : e.setResizableDisplayed(!1), o.createManagedBean(
15550      new xi(t, {
15551        shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),
15552        onTabKeyDown: () => {
15553        },
15554        handleKeyDown: this.handleKeyDown.bind(this),
15555        onFocusIn: this.onFocusIn.bind(this)
15556      })
15557    ), this.addHighlightListeners(o, h), o.addManagedPropertyListener("suppressMovableColumns", this.onSuppressColMoveChange), this.addResizeAndMoveKeyboardListeners(o), o.addDestroyFunc(() => this.clearComponent());
15558  }
15559  refreshMaxHeaderHeight() {
15560    const { gos: e, comp: t } = this, i = e.get("groupHeaderHeight");
15561    i != null ? i === 0 ? t.setHeaderWrapperHidden(!0) : t.setHeaderWrapperMaxHeight(i) : (t.setHeaderWrapperHidden(!1), t.setHeaderWrapperMaxHeight(null));
15562  }
15563  addHighlightListeners(e, t) {
15564    if (this.beans.gos.get("suppressMoveWhenColumnDragging"))
15565      for (const i of t)
15566        e.addManagedListeners(i, {
15567          headerHighlightChanged: this.onLeafColumnHighlightChanged.bind(this, i)
15568        });
15569  }
15570  onLeafColumnHighlightChanged(e) {
15571    const t = this.column.getDisplayedLeafColumns(), i = t[0] === e, s = W(t) === e;
15572    if (!i && !s)
15573      return;
15574    const o = e.getHighlighted(), n = !!this.rowCtrl.findHeaderCellCtrl((l) => l.column.isMoving());
15575    let r = !1, a = !1;
15576    if (n) {
15577      const l = this.beans.gos.get("enableRtl"), d = o === 1, c = o === 0;
15578      i && (l ? a = d : r = c), s && (l ? r = c : a = d);
15579    }
15580    this.comp.addOrRemoveCssClass("ag-header-highlight-before", r), this.comp.addOrRemoveCssClass("ag-header-highlight-after", a);
15581  }
15582  resizeHeader(e, t) {
15583    const { resizeFeature: i } = this;
15584    if (!i)
15585      return;
15586    const s = i.getInitialValues(t);
15587    i.resizeColumns(s, s.resizeStartWidth + e, "uiColumnResized", !0);
15588  }
15589  resizeLeafColumnsToFit(e) {
15590    this.resizeFeature?.resizeLeafColumnsToFit(e);
15591  }
15592  setupUserComp() {
15593    const { colGroupSvc: e, userCompFactory: t, gos: i } = this.beans, s = i.addGridCommonParams({
15594      displayName: this.displayName,
15595      columnGroup: this.column,
15596      setExpanded: (n) => {
15597        e.setColumnGroupOpened(this.column.getProvidedColumnGroup(), n, "gridInitializing");
15598      },
15599      setTooltip: (n, r) => {
15600        i.assertModuleRegistered("Tooltip", 3), this.setupTooltip(n, r);
15601      }
15602    }), o = Sp(t, s);
15603    o && this.comp.setUserCompDetails(o);
15604  }
15605  addHeaderMouseListeners(e) {
15606    const t = (o) => this.handleMouseOverChange(o.type === "mouseenter"), i = () => this.dispatchColumnMouseEvent("columnHeaderClicked", this.column.getProvidedColumnGroup()), s = (o) => this.handleContextMenuMouseEvent(o, void 0, this.column.getProvidedColumnGroup());
15607    e.addManagedListeners(this.eGui, {
15608      mouseenter: t,
15609      mouseleave: t,
15610      click: i,
15611      contextmenu: s
15612    });
15613  }
15614  handleMouseOverChange(e) {
15615    this.eventSvc.dispatchEvent({
15616      type: e ? "columnHeaderMouseOver" : "columnHeaderMouseLeave",
15617      column: this.column.getProvidedColumnGroup()
15618    });
15619  }
15620  setupTooltip(e, t) {
15621    this.tooltipFeature = this.beans.tooltipSvc?.setupHeaderGroupTooltip(
15622      this.tooltipFeature,
15623      this,
15624      e,
15625      t
15626    );
15627  }
15628  setupExpandable(e) {
15629    const t = this.column.getProvidedColumnGroup();
15630    this.refreshExpanded();
15631    const i = this.refreshExpanded.bind(this);
15632    e.addManagedListeners(t, {
15633      expandedChanged: i,
15634      expandableChanged: i
15635    });
15636  }
15637  refreshExpanded() {
15638    const { column: e } = this;
15639    this.expandable = e.isExpandable();
15640    const t = e.isExpanded();
15641    this.expandable ? this.comp.setAriaExpanded(t ? "true" : "false") : this.comp.setAriaExpanded(void 0);
15642  }
15643  addClasses() {
15644    const { column: e } = this, t = e.getColGroupDef(), i = dd(t, this.gos, null, e);
15645    e.isPadding() ? (i.push("ag-header-group-cell-no-group"), e.getLeafColumns().every((o) => o.isSpanHeaderHeight()) && i.push("ag-header-span-height")) : (i.push("ag-header-group-cell-with-group"), t?.wrapHeaderText && i.push("ag-header-cell-wrap-text")), i.forEach((s) => this.comp.addOrRemoveCssClass(s, !0));
15646  }
15647  setupMovingCss(e) {
15648    const { column: t } = this, s = t.getProvidedColumnGroup().getLeafColumns(), o = () => this.comp.addOrRemoveCssClass("ag-header-cell-moving", t.isMoving());
15649    s.forEach((n) => {
15650      e.addManagedListeners(n, { movingChanged: o });
15651    }), o();
15652  }
15653  onFocusIn(e) {
15654    this.eGui.contains(e.relatedTarget) || this.focusThis();
15655  }
15656  handleKeyDown(e) {
15657    super.handleKeyDown(e);
15658    const t = this.getWrapperHasFocus();
15659    if (!(!this.expandable || !t) && e.key === b.ENTER) {
15660      const i = this.column, s = !i.isExpanded();
15661      this.beans.colGroupSvc.setColumnGroupOpened(
15662        i.getProvidedColumnGroup(),
15663        s,
15664        "uiColumnExpanded"
15665      );
15666    }
15667  }
15668  // unlike columns, this will only get called once, as we don't react on props on column groups
15669  // (we will always destroy and recreate this comp if something changes)
15670  setDragSource(e) {
15671    !this.isAlive() || this.isSuppressMoving() || (this.removeDragSource(), e && (this.dragSource = this.beans.colMoves?.setDragSourceForHeader(e, this.column, this.displayName) ?? null));
15672  }
15673  isSuppressMoving() {
15674    return this.gos.get("suppressMovableColumns") || this.column.getLeafColumns().some((e) => e.getColDef().suppressMovable || e.getColDef().lockPosition);
15675  }
15676  destroy() {
15677    this.tooltipFeature = this.destroyBean(this.tooltipFeature), super.destroy();
15678  }
15679};
15680function pv(e, t, i) {
15681  e.colGroupSvc?.setColumnGroupOpened(t, i, "api");
15682}
15683function fv(e, t, i) {
15684  return e.colGroupSvc?.getColumnGroup(t, i) ?? null;
15685}
15686function mv(e, t) {
15687  return e.colGroupSvc?.getProvidedColGroup(t) ?? null;
15688}
15689function Cv(e, t, i) {
15690  return e.colNames.getDisplayNameForColumnGroup(t, i) || "";
15691}
15692function vv(e) {
15693  return e.colGroupSvc?.getColumnGroupState() ?? [];
15694}
15695function wv(e, t) {
15696  e.colGroupSvc?.setColumnGroupState(t, "api");
15697}
15698function Sv(e) {
15699  e.colGroupSvc?.resetColumnGroupState("api");
15700}
15701function bv(e) {
15702  return e.visibleCols.treeLeft;
15703}
15704function yv(e) {
15705  return e.visibleCols.treeCenter;
15706}
15707function Rv(e) {
15708  return e.visibleCols.treeRight;
15709}
15710function Fv(e) {
15711  return e.visibleCols.getAllTrees();
15712}
15713function xv(e, t) {
15714  for (let i = 0; i < t.length; i++) {
15715    const s = e.indexOf(t[i]);
15716    s >= 0 && (e[s] = e[e.length - 1], e.pop());
15717  }
15718}
15719var Pv = class extends y {
15720  constructor() {
15721    super(...arguments), this.beanName = "visibleCols", this.colsAndGroupsMap = {}, this.leftCols = [], this.rightCols = [], this.centerCols = [], this.allCols = [], this.bodyWidth = 0, this.leftWidth = 0, this.rightWidth = 0, this.isBodyWidthDirty = !0;
15722  }
15723  refresh(e, t = !1) {
15724    const { colModel: i, colGroupSvc: s, colViewport: o } = this.beans;
15725    t || this.buildTrees(i, s), s?.updateOpenClosedVisibility();
15726    const n = Oo(this.treeLeft);
15727    this.leftCols = n, this.centerCols = Oo(this.treeCenter);
15728    const r = Oo(this.treeRight);
15729    this.rightCols = r, this.joinColsAriaOrder(i), this.joinCols(), this.setLeftValues(e), this.autoHeightCols = this.allCols.filter((a) => a.isAutoHeight()), this.beans.colFlex?.refreshFlexedColumns(), this.updateBodyWidths(), o.checkViewportColumns(!1), this.setFirstRightAndLastLeftPinned(i, n, r, e), this.eventSvc.dispatchEvent({
15730      type: "displayedColumnsChanged",
15731      source: e
15732    });
15733  }
15734  // after setColumnWidth or updateGroupsAndPresentedCols
15735  updateBodyWidths() {
15736    const e = tt(this.centerCols), t = tt(this.leftCols), i = tt(this.rightCols);
15737    this.isBodyWidthDirty = this.bodyWidth !== e, (this.bodyWidth !== e || this.leftWidth !== t || this.rightWidth !== i) && (this.bodyWidth = e, this.leftWidth = t, this.rightWidth = i, this.eventSvc.dispatchEvent({
15738      type: "columnContainerWidthChanged"
15739    }), this.eventSvc.dispatchEvent({
15740      type: "displayedColumnsWidthChanged"
15741    }));
15742  }
15743  // sets the left pixel position of each column
15744  setLeftValues(e) {
15745    this.setLeftValuesOfCols(e), this.setLeftValuesOfGroups();
15746  }
15747  setFirstRightAndLastLeftPinned(e, t, i, s) {
15748    let o, n;
15749    this.gos.get("enableRtl") ? (o = t ? t[0] : null, n = i ? W(i) : null) : (o = t ? W(t) : null, n = i ? i[0] : null), e.getCols().forEach((r) => {
15750      r.setLastLeftPinned(r === o, s), r.setFirstRightPinned(r === n, s);
15751    });
15752  }
15753  buildTrees(e, t) {
15754    const i = e.getColsToShow(), s = i.filter((l) => l.getPinned() == "left"), o = i.filter((l) => l.getPinned() == "right"), n = i.filter((l) => l.getPinned() != "left" && l.getPinned() != "right"), r = new sd(), a = (l) => t ? t.createColumnGroups(l) : l.columns;
15755    this.treeLeft = a({
15756      columns: s,
15757      idCreator: r,
15758      pinned: "left",
15759      oldDisplayedGroups: this.treeLeft
15760    }), this.treeRight = a({
15761      columns: o,
15762      idCreator: r,
15763      pinned: "right",
15764      oldDisplayedGroups: this.treeRight
15765    }), this.treeCenter = a({
15766      columns: n,
15767      idCreator: r,
15768      pinned: null,
15769      oldDisplayedGroups: this.treeCenter
15770    }), this.updateColsAndGroupsMap();
15771  }
15772  clear() {
15773    this.leftCols = [], this.rightCols = [], this.centerCols = [], this.allCols = [], this.ariaOrderColumns = [];
15774  }
15775  joinColsAriaOrder(e) {
15776    const t = e.getCols(), i = [], s = [], o = [];
15777    for (const n of t) {
15778      const r = n.getPinned();
15779      r ? r === !0 || r === "left" ? i.push(n) : o.push(n) : s.push(n);
15780    }
15781    this.ariaOrderColumns = i.concat(s).concat(o);
15782  }
15783  getAriaColIndex(e) {
15784    let t;
15785    return ee(e) ? t = e.getLeafColumns()[0] : t = e, this.ariaOrderColumns.indexOf(t) + 1;
15786  }
15787  setLeftValuesOfGroups() {
15788    [this.treeLeft, this.treeRight, this.treeCenter].forEach((e) => {
15789      e.forEach((t) => {
15790        ee(t) && t.checkLeft();
15791      });
15792    });
15793  }
15794  setLeftValuesOfCols(e) {
15795    const { colModel: t } = this.beans;
15796    if (!t.getColDefCols())
15797      return;
15798    const s = t.getCols().slice(0), o = this.gos.get("enableRtl");
15799    [this.leftCols, this.rightCols, this.centerCols].forEach((n) => {
15800      if (o) {
15801        let r = tt(n);
15802        n.forEach((a) => {
15803          r -= a.getActualWidth(), a.setLeft(r, e);
15804        });
15805      } else {
15806        let r = 0;
15807        n.forEach((a) => {
15808          a.setLeft(r, e), r += a.getActualWidth();
15809        });
15810      }
15811      xv(s, n);
15812    }), s.forEach((n) => {
15813      n.setLeft(null, e);
15814    });
15815  }
15816  joinCols() {
15817    this.gos.get("enableRtl") ? this.allCols = this.rightCols.concat(this.centerCols).concat(this.leftCols) : this.allCols = this.leftCols.concat(this.centerCols).concat(this.rightCols);
15818  }
15819  getAllTrees() {
15820    return this.treeLeft && this.treeRight && this.treeCenter ? this.treeLeft.concat(this.treeCenter).concat(this.treeRight) : null;
15821  }
15822  // gridPanel -> ensureColumnVisible
15823  isColDisplayed(e) {
15824    return this.allCols.indexOf(e) >= 0;
15825  }
15826  getLeftColsForRow(e) {
15827    const {
15828      leftCols: t,
15829      beans: { colModel: i }
15830    } = this;
15831    return i.colSpanActive ? this.getColsForRow(e, t) : t;
15832  }
15833  getRightColsForRow(e) {
15834    const {
15835      rightCols: t,
15836      beans: { colModel: i }
15837    } = this;
15838    return i.colSpanActive ? this.getColsForRow(e, t) : t;
15839  }
15840  getColsForRow(e, t, i, s) {
15841    const o = [];
15842    let n = null;
15843    for (let r = 0; r < t.length; r++) {
15844      const a = t[r], l = t.length - r, d = Math.min(a.getColSpan(e), l), c = [a];
15845      if (d > 1) {
15846        const h = d - 1;
15847        for (let g = 1; g <= h; g++)
15848          c.push(t[r + g]);
15849        r += h;
15850      }
15851      let u;
15852      i ? (u = !1, c.forEach((h) => {
15853        i(h) && (u = !0);
15854      })) : u = !0, u && (o.length === 0 && n && s && s(a) && o.push(n), o.push(a)), n = a;
15855    }
15856    return o;
15857  }
15858  getContainerWidth(e) {
15859    switch (e) {
15860      case "left":
15861        return this.leftWidth;
15862      case "right":
15863        return this.rightWidth;
15864      default:
15865        return this.bodyWidth;
15866    }
15867  }
15868  getColBefore(e) {
15869    const t = this.allCols, i = t.indexOf(e);
15870    return i > 0 ? t[i - 1] : null;
15871  }
15872  isPinningLeft() {
15873    return this.leftCols.length > 0;
15874  }
15875  isPinningRight() {
15876    return this.rightCols.length > 0;
15877  }
15878  updateColsAndGroupsMap() {
15879    this.colsAndGroupsMap = {};
15880    const e = (t) => {
15881      this.colsAndGroupsMap[t.getUniqueId()] = t;
15882    };
15883    Lt(this.treeCenter, !1, e), Lt(this.treeLeft, !1, e), Lt(this.treeRight, !1, e);
15884  }
15885  isVisible(e) {
15886    return this.colsAndGroupsMap[e.getUniqueId()] === e;
15887  }
15888  getFirstColumn() {
15889    const e = this.gos.get("enableRtl"), t = ["leftCols", "centerCols", "rightCols"];
15890    e && t.reverse();
15891    for (let i = 0; i < t.length; i++) {
15892      const s = this[t[i]];
15893      if (s.length)
15894        return e ? W(s) : s[0];
15895    }
15896    return null;
15897  }
15898  // used by:
15899  // + rowRenderer -> for navigation
15900  getColAfter(e) {
15901    const t = this.allCols, i = t.indexOf(e);
15902    return i < t.length - 1 ? t[i + 1] : null;
15903  }
15904  // used by:
15905  // + angularGrid -> setting pinned body width
15906  // note: this should be cached
15907  getColsLeftWidth() {
15908    return tt(this.leftCols);
15909  }
15910  // note: this should be cached
15911  getDisplayedColumnsRightWidth() {
15912    return tt(this.rightCols);
15913  }
15914  isColAtEdge(e, t) {
15915    const i = this.allCols;
15916    if (!i.length)
15917      return !1;
15918    const s = t === "first";
15919    let o;
15920    if (ee(e)) {
15921      const n = e.getDisplayedLeafColumns();
15922      if (!n.length)
15923        return !1;
15924      o = s ? n[0] : W(n);
15925    } else
15926      o = e;
15927    return (s ? i[0] : W(i)) === o;
15928  }
15929};
15930function Lt(e, t, i) {
15931  if (e)
15932    for (let s = 0; s < e.length; s++) {
15933      const o = e[s];
15934      if (ee(o)) {
15935        const n = t ? o.getDisplayedChildren() : o.getChildren();
15936        Lt(n, t, i);
15937      }
15938      i(o);
15939    }
15940}
15941function Oo(e) {
15942  const t = [];
15943  return Lt(e, !0, (i) => {
15944    yt(i) && t.push(i);
15945  }), t;
15946}
15947var Ev = class extends y {
15948  constructor() {
15949    super(...arguments), this.beanName = "colGroupSvc";
15950  }
15951  getColumnGroupState() {
15952    const e = [], t = this.beans.colModel.getColTree();
15953    return rt(null, t, (i) => {
15954      fe(i) && e.push({
15955        groupId: i.getGroupId(),
15956        open: i.isExpanded()
15957      });
15958    }), e;
15959  }
15960  resetColumnGroupState(e) {
15961    const t = this.beans.colModel.getColDefColTree();
15962    if (!t)
15963      return;
15964    const i = [];
15965    rt(null, t, (s) => {
15966      if (fe(s)) {
15967        const o = s.getColGroupDef(), n = {
15968          groupId: s.getGroupId(),
15969          open: o ? o.openByDefault : void 0
15970        };
15971        i.push(n);
15972      }
15973    }), this.setColumnGroupState(i, e);
15974  }
15975  setColumnGroupState(e, t) {
15976    const { colModel: i, colAnimation: s, visibleCols: o, eventSvc: n } = this.beans;
15977    if (!i.getColTree())
15978      return;
15979    s?.start();
15980    const a = [];
15981    e.forEach((l) => {
15982      const d = l.groupId, c = l.open, u = this.getProvidedColGroup(d);
15983      u && u.isExpanded() !== c && (u.setExpanded(c), a.push(u));
15984    }), o.refresh(t, !0), a.length && n.dispatchEvent({
15985      type: "columnGroupOpened",
15986      columnGroup: a.length === 1 ? a[0] : void 0,
15987      columnGroups: a
15988    }), s?.finish();
15989  }
15990  // called by headerRenderer - when a header is opened or closed
15991  setColumnGroupOpened(e, t, i) {
15992    let s;
15993    fe(e) ? s = e.getId() : s = e || "", this.setColumnGroupState([{ groupId: s, open: t }], i);
15994  }
15995  getProvidedColGroup(e) {
15996    let t = null;
15997    return rt(null, this.beans.colModel.getColTree(), (i) => {
15998      fe(i) && i.getId() === e && (t = i);
15999    }), t;
16000  }
16001  getGroupAtDirection(e, t) {
16002    const i = e.getProvidedColumnGroup().getLevel() + e.getPaddingLevel(), s = e.getDisplayedLeafColumns(), o = t === "After" ? W(s) : s[0], n = `getCol${t}`;
16003    for (; ; ) {
16004      const r = this.beans.visibleCols[n](o);
16005      if (!r)
16006        return null;
16007      const a = this.getColGroupAtLevel(r, i);
16008      if (a !== e)
16009        return a;
16010    }
16011  }
16012  getColGroupAtLevel(e, t) {
16013    let i = e.getParent(), s, o;
16014    for (; s = i.getProvidedColumnGroup().getLevel(), o = i.getPaddingLevel(), !(s + o <= t); )
16015      i = i.getParent();
16016    return i;
16017  }
16018  updateOpenClosedVisibility() {
16019    const e = this.beans.visibleCols.getAllTrees();
16020    Lt(e, !1, (t) => {
16021      ee(t) && t.calculateDisplayedColumns();
16022    });
16023  }
16024  // returns the group with matching colId and instanceId. If instanceId is missing,
16025  // matches only on the colId.
16026  getColumnGroup(e, t) {
16027    if (!e)
16028      return null;
16029    if (ee(e))
16030      return e;
16031    const i = this.beans.visibleCols.getAllTrees(), s = typeof t == "number";
16032    let o = null;
16033    return Lt(i, !1, (n) => {
16034      if (ee(n)) {
16035        const r = n;
16036        let a;
16037        s ? a = e === r.getGroupId() && t === r.getPartId() : a = e === r.getGroupId(), a && (o = r);
16038      }
16039    }), o;
16040  }
16041  createColumnGroups(e) {
16042    const { columns: t, idCreator: i, pinned: s, oldDisplayedGroups: o, isStandaloneStructure: n } = e, r = this.mapOldGroupsById(o), a = [];
16043    let l = t;
16044    for (; l.length; ) {
16045      const d = l;
16046      l = [];
16047      let c = 0;
16048      const u = (h) => {
16049        const g = c;
16050        c = h;
16051        const p = d[g], m = (ee(p) ? p.getProvidedColumnGroup() : p).getOriginalParent();
16052        if (m == null) {
16053          for (let w = g; w < h; w++)
16054            a.push(d[w]);
16055          return;
16056        }
16057        const C = this.createColumnGroup(
16058          m,
16059          i,
16060          r,
16061          s,
16062          n
16063        );
16064        for (let w = g; w < h; w++)
16065          C.addChild(d[w]);
16066        l.push(C);
16067      };
16068      for (let h = 1; h < d.length; h++) {
16069        const g = d[h], f = (ee(g) ? g.getProvidedColumnGroup() : g).getOriginalParent(), m = d[c], w = (ee(m) ? m.getProvidedColumnGroup() : m).getOriginalParent();
16070        f !== w && u(h);
16071      }
16072      c < d.length && u(d.length);
16073    }
16074    return n || this.setupParentsIntoCols(a, null), a;
16075  }
16076  createProvidedColumnGroup(e, t, i, s, o, n, r) {
16077    const a = o.getUniqueKey(t.groupId || null, null), l = this.createMergedColGroupDef(t, a), d = new Fs(l, a, !1, i);
16078    this.createBean(d);
16079    const c = this.findExistingGroup(t, n);
16080    c && n.splice(c.idx, 1);
16081    const u = c?.group;
16082    u && d.setExpanded(u.isExpanded());
16083    const h = td(
16084      this.beans,
16085      l.children,
16086      i + 1,
16087      e,
16088      s,
16089      o,
16090      n,
16091      r
16092    );
16093    return d.setChildren(h), d;
16094  }
16095  balanceColumnTree(e, t, i, s) {
16096    const o = [];
16097    for (let n = 0; n < e.length; n++) {
16098      const r = e[n];
16099      if (fe(r)) {
16100        const a = r, l = this.balanceColumnTree(
16101          a.getChildren(),
16102          t + 1,
16103          i,
16104          s
16105        );
16106        a.setChildren(l), o.push(a);
16107      } else {
16108        let a, l;
16109        for (let d = i - 1; d >= t; d--) {
16110          const c = s.getUniqueKey(null, null), u = this.createMergedColGroupDef(null, c), h = new Fs(u, c, !0, t);
16111          this.createBean(h), l && l.setChildren([h]), l = h, a || (a = l);
16112        }
16113        if (a && l)
16114          if (o.push(a), e.some((c) => fe(c))) {
16115            l.setChildren([r]);
16116            continue;
16117          } else {
16118            l.setChildren(e);
16119            break;
16120          }
16121        o.push(r);
16122      }
16123    }
16124    return o;
16125  }
16126  findDepth(e) {
16127    let t = 0, i = e;
16128    for (; i && i[0] && fe(i[0]); )
16129      t++, i = i[0].getChildren();
16130    return t;
16131  }
16132  findMaxDepth(e, t) {
16133    let i = t;
16134    for (let s = 0; s < e.length; s++) {
16135      const o = e[s];
16136      if (fe(o)) {
16137        const n = o, r = this.findMaxDepth(n.getChildren(), t + 1);
16138        i < r && (i = r);
16139      }
16140    }
16141    return i;
16142  }
16143  /**
16144   * Inserts dummy group columns in the hierarchy above auto-generated columns
16145   * in order to ensure auto-generated columns are leaf nodes (and therefore are
16146   * displayed correctly)
16147   */
16148  balanceTreeForAutoCols(e, t) {
16149    const i = [];
16150    return e.forEach((s) => {
16151      let o = s;
16152      for (let n = t - 1; n >= 0; n--) {
16153        const r = new Fs(null, `FAKE_PATH_${s.getId()}}_${n}`, !0, n);
16154        this.createBean(r), r.setChildren([o]), o.originalParent = r, o = r;
16155      }
16156      t === 0 && (s.originalParent = null), i.push(o);
16157    }), i;
16158  }
16159  createMergedColGroupDef(e, t) {
16160    const i = {}, { gos: s, validation: o } = this.beans;
16161    return Object.assign(i, s.get("defaultColGroupDef")), Object.assign(i, e), o?.validateColDef(i, t), i;
16162  }
16163  findExistingGroup(e, t) {
16164    if (e.groupId != null)
16165      for (let s = 0; s < t.length; s++) {
16166        const o = t[s];
16167        if (o.getColGroupDef() && o.getId() === e.groupId)
16168          return { idx: s, group: o };
16169      }
16170  }
16171  createColumnGroup(e, t, i, s, o) {
16172    const n = e.getGroupId(), r = t.getInstanceIdForKey(n), a = vd(n, r);
16173    let l = i[a];
16174    return l && l.getProvidedColumnGroup() !== e && (l = null), A(l) ? l.reset() : (l = new wd(e, n, r, s), o || this.createBean(l)), l;
16175  }
16176  // returns back a 2d map of ColumnGroup as follows: groupId -> instanceId -> ColumnGroup
16177  mapOldGroupsById(e) {
16178    const t = {}, i = (s) => {
16179      s.forEach((o) => {
16180        if (ee(o)) {
16181          const n = o;
16182          t[o.getUniqueId()] = n, i(n.getChildren());
16183        }
16184      });
16185    };
16186    return e && i(e), t;
16187  }
16188  setupParentsIntoCols(e, t) {
16189    e.forEach((i) => {
16190      if (i.parent = t, ee(i)) {
16191        const s = i;
16192        this.setupParentsIntoCols(s.getChildren(), s);
16193      }
16194    });
16195  }
16196}, Dv = {
16197  moduleName: "ColumnGroup",
16198  version: I,
16199  dynamicBeans: { headerGroupCellCtrl: gv },
16200  beans: [Ev],
16201  apiFunctions: {
16202    getAllDisplayedColumnGroups: Fv,
16203    getCenterDisplayedColumnGroups: yv,
16204    getColumnGroup: fv,
16205    getColumnGroupState: vv,
16206    getDisplayNameForColumnGroup: Cv,
16207    getLeftDisplayedColumnGroups: bv,
16208    getProvidedColumnGroup: mv,
16209    getRightDisplayedColumnGroups: Rv,
16210    resetColumnGroupState: Sv,
16211    setColumnGroupOpened: pv,
16212    setColumnGroupState: wv
16213  }
16214}, Av = {
16215  moduleName: "CheckboxCellRenderer",
16216  version: I,
16217  userComponents: {
16218    agCheckboxCellRenderer: Im
16219  }
16220};
16221function Tv(e, t) {
16222  const i = e.colModel.getColDefCol(t);
16223  return i ? i.getColDef() : null;
16224}
16225function Mv(e) {
16226  return e.colModel.getColumnDefs();
16227}
16228function Iv(e, t, i) {
16229  return e.colNames.getDisplayNameForColumn(t, i) || "";
16230}
16231function kv(e, t) {
16232  return e.colModel.getColDefCol(t);
16233}
16234function Lv(e) {
16235  return e.colModel.getColDefCols();
16236}
16237function Ov(e, t) {
16238  return He(e, t, "api");
16239}
16240function Gv(e) {
16241  return es(e);
16242}
16243function Hv(e) {
16244  kg(e, "api");
16245}
16246function Bv(e) {
16247  return e.visibleCols.isPinningLeft() || e.visibleCols.isPinningRight();
16248}
16249function Nv(e) {
16250  return e.visibleCols.isPinningLeft();
16251}
16252function Vv(e) {
16253  return e.visibleCols.isPinningRight();
16254}
16255function Wv(e, t) {
16256  return e.visibleCols.getColAfter(t);
16257}
16258function zv(e, t) {
16259  return e.visibleCols.getColBefore(t);
16260}
16261function _v(e, t, i) {
16262  e.colModel.setColsVisible(t, i, "api");
16263}
16264function Uv(e, t, i) {
16265  e.pinnedCols?.setColsPinned(t, i, "api");
16266}
16267function $v(e) {
16268  return e.colModel.getCols();
16269}
16270function Kv(e) {
16271  return e.visibleCols.leftCols;
16272}
16273function jv(e) {
16274  return e.visibleCols.centerCols;
16275}
16276function qv(e) {
16277  return e.visibleCols.rightCols;
16278}
16279function Yv(e) {
16280  return e.visibleCols.allCols;
16281}
16282function Qv(e) {
16283  return e.colViewport.getViewportColumns();
16284}
16285function fn(e, t) {
16286  if (!e)
16287    return;
16288  const i = e, s = {};
16289  return Object.keys(i).forEach((o) => {
16290    if (t && t.indexOf(o) >= 0 || zl.has(o))
16291      return;
16292    const n = i[o];
16293    typeof n == "object" && n !== null && n.constructor === Object ? s[o] = fn(n) : s[o] = n;
16294  }), s;
16295}
16296var Zv = class extends y {
16297  constructor() {
16298    super(...arguments), this.beanName = "colDefFactory";
16299  }
16300  wireBeans(e) {
16301    this.rowGroupColsSvc = e.rowGroupColsSvc, this.pivotColsSvc = e.pivotColsSvc;
16302  }
16303  getColumnDefs(e, t, i, s) {
16304    const o = e.slice();
16305    t ? o.sort((a, l) => i.indexOf(a) - i.indexOf(l)) : i && o.sort((a, l) => s.indexOf(a) - s.indexOf(l));
16306    const n = this.rowGroupColsSvc?.columns, r = this.pivotColsSvc?.columns;
16307    return this.buildColumnDefs(o, n, r);
16308  }
16309  buildColumnDefs(e, t = [], i = []) {
16310    const s = [], o = {};
16311    return e.forEach((n) => {
16312      const r = this.createDefFromColumn(n, t, i);
16313      let a = !0, l = r, d = n.getOriginalParent(), c = null;
16314      for (; d; ) {
16315        let u = null;
16316        if (d.isPadding()) {
16317          d = d.getOriginalParent();
16318          continue;
16319        }
16320        const h = o[d.getGroupId()];
16321        if (h) {
16322          h.children.push(l), a = !1;
16323          break;
16324        }
16325        if (u = this.createDefFromGroup(d), u && (u.children = [l], o[u.groupId] = u, l = u, d = d.getOriginalParent()), d != null && c === d) {
16326          a = !1;
16327          break;
16328        }
16329        c = d;
16330      }
16331      a && s.push(l);
16332    }), s;
16333  }
16334  createDefFromGroup(e) {
16335    const t = fn(e.getColGroupDef(), ["children"]);
16336    return t && (t.groupId = e.getGroupId()), t;
16337  }
16338  createDefFromColumn(e, t, i) {
16339    const s = fn(e.getColDef());
16340    return s.colId = e.getColId(), s.width = e.getActualWidth(), s.rowGroup = e.isRowGroupActive(), s.rowGroupIndex = e.isRowGroupActive() ? t.indexOf(e) : null, s.pivot = e.isPivotActive(), s.pivotIndex = e.isPivotActive() ? i.indexOf(e) : null, s.aggFunc = e.isValueActive() ? e.getAggFunc() : null, s.hide = e.isVisible() ? void 0 : !0, s.pinned = e.isPinned() ? e.getPinned() : null, s.sort = e.getSort() ? e.getSort() : null, s.sortIndex = e.getSortIndex() != null ? e.getSortIndex() : null, s;
16341  }
16342}, Xv = class extends y {
16343  constructor() {
16344    super(...arguments), this.beanName = "colFlex";
16345  }
16346  refreshFlexedColumns(e = {}) {
16347    const t = e.source ? e.source : "flex";
16348    e.viewportWidth != null && (this.flexViewportWidth = e.viewportWidth);
16349    const i = this.flexViewportWidth;
16350    if (!i)
16351      return [];
16352    const { visibleCols: s } = this.beans, o = s.centerCols;
16353    let n = -1;
16354    if (e.resizingCols) {
16355      const p = new Set(e.resizingCols);
16356      for (let f = o.length - 1; f >= 0; f--)
16357        if (p.has(o[f])) {
16358          n = f;
16359          break;
16360        }
16361    }
16362    let r = !1;
16363    const a = o.map((p, f) => {
16364      const m = p.getFlex(), C = m != null && m > 0 && f > n;
16365      return r || (r = C), {
16366        col: p,
16367        isFlex: C,
16368        flex: Math.max(0, m ?? 0),
16369        initialSize: p.getActualWidth(),
16370        min: p.getMinWidth(),
16371        max: p.getMaxWidth(),
16372        targetSize: 0
16373      };
16374    });
16375    if (!r)
16376      return [];
16377    let l = a.length, d = a.reduce((p, f) => p + f.flex, 0), c = i;
16378    const u = (p, f) => {
16379      p.frozenSize = f, p.col.setActualWidth(f, t), c -= f, d -= p.flex, l -= 1;
16380    }, h = (p) => p.frozenSize != null;
16381    for (const p of a)
16382      p.isFlex || u(p, p.initialSize);
16383    for (; l > 0; ) {
16384      const p = Math.round(d < 1 ? c * d : c);
16385      let f, m = 0, C = 0;
16386      for (const v of a) {
16387        if (h(v))
16388          continue;
16389        f = v, C += p * (v.flex / d);
16390        const P = C - m, T = Math.round(P);
16391        v.targetSize = T, m += T;
16392      }
16393      f && (f.targetSize += p - m);
16394      let w = 0;
16395      for (const v of a) {
16396        if (h(v))
16397          continue;
16398        const P = v.targetSize, T = Math.min(Math.max(P, v.min), v.max);
16399        w += T - P, v.violationType = T === P ? void 0 : T < P ? "max" : "min", v.targetSize = T;
16400      }
16401      const S = w === 0 ? "all" : w > 0 ? "min" : "max";
16402      for (const v of a)
16403        h(v) || (S === "all" || v.violationType === S) && u(v, v.targetSize);
16404    }
16405    e.skipSetLeft || s.setLeftValues(t), e.updateBodyWidths && s.updateBodyWidths();
16406    const g = a.filter((p) => p.isFlex && !p.violationType).map((p) => p.col);
16407    if (e.fireResizedEvent) {
16408      const p = a.filter((m) => m.initialSize !== m.frozenSize).map((m) => m.col), f = a.filter((m) => m.flex).map((m) => m.col);
16409      Ci(this.eventSvc, p, !0, t, f);
16410    }
16411    return g;
16412  }
16413  initCol(e) {
16414    const { flex: t, initialFlex: i } = e.colDef;
16415    t !== void 0 ? e.flex = t : i !== void 0 && (e.flex = i);
16416  }
16417  // this method should only be used by the colModel to
16418  // change flex when required by the applyColumnState method.
16419  setColFlex(e, t) {
16420    e.flex = t ?? null, e.dispatchStateUpdatedEvent("flex");
16421  }
16422}, Jv = class extends y {
16423  constructor() {
16424    super(...arguments), this.beanName = "dataTypeSvc", this.dataTypeDefinitions = {}, this.isPendingInference = !1, this.isColumnTypeOverrideInDataTypeDefinitions = !1, this.columnStateUpdatesPendingInference = {}, this.columnStateUpdateListenerDestroyFuncs = [];
16425  }
16426  wireBeans(e) {
16427    this.colModel = e.colModel;
16428  }
16429  postConstruct() {
16430    this.processDataTypeDefinitions(), this.addManagedPropertyListener("dataTypeDefinitions", (e) => {
16431      this.processDataTypeDefinitions(), this.colModel.recreateColumnDefs(ni(e.source));
16432    });
16433  }
16434  processDataTypeDefinitions() {
16435    const e = this.getDefaultDataTypes(), t = {};
16436    this.dataTypeDefinitions = t;
16437    const i = {};
16438    this.formatValueFuncs = i;
16439    const s = (r) => (a) => {
16440      const { column: l, node: d, value: c } = a;
16441      let u = l.getColDef().valueFormatter;
16442      return u === r.groupSafeValueFormatter && (u = r.valueFormatter), this.beans.valueSvc.formatValue(l, d, c, u);
16443    };
16444    Object.entries(e).forEach(([r, a]) => {
16445      const l = {
16446        ...a,
16447        groupSafeValueFormatter: va(a, this.gos)
16448      };
16449      t[r] = l, i[r] = s(l);
16450    });
16451    const o = this.gos.get("dataTypeDefinitions") ?? {}, n = {};
16452    this.dataTypeMatchers = n, Object.entries(o).forEach(([r, a]) => {
16453      const l = this.processDataTypeDefinition(
16454        a,
16455        o,
16456        [r],
16457        e
16458      );
16459      l && (t[r] = l, a.dataTypeMatcher && (n[r] = a.dataTypeMatcher), i[r] = s(l));
16460    }), this.checkObjectValueHandlers(e), ["dateString", "text", "number", "boolean", "date"].forEach((r) => {
16461      const a = n[r];
16462      a && delete n[r], n[r] = a ?? e[r].dataTypeMatcher;
16463    });
16464  }
16465  processDataTypeDefinition(e, t, i, s) {
16466    let o;
16467    const n = e.extendsDataType;
16468    if (e.columnTypes && (this.isColumnTypeOverrideInDataTypeDefinitions = !0), e.extendsDataType === e.baseDataType) {
16469      let r = s[n];
16470      const a = t[n];
16471      if (r && a && (r = a), !Ca(e, r, n))
16472        return;
16473      o = ma(r, e);
16474    } else {
16475      if (i.includes(n)) {
16476        x(44);
16477        return;
16478      }
16479      const r = t[n];
16480      if (!Ca(e, r, n))
16481        return;
16482      const a = this.processDataTypeDefinition(
16483        r,
16484        t,
16485        [...i, n],
16486        s
16487      );
16488      if (!a)
16489        return;
16490      o = ma(a, e);
16491    }
16492    return {
16493      ...o,
16494      groupSafeValueFormatter: va(o, this.gos)
16495    };
16496  }
16497  updateColDefAndGetColumnType(e, t, i) {
16498    let { cellDataType: s } = t;
16499    const { field: o } = t;
16500    if (s === void 0 && (s = e.cellDataType), (s == null || s === !0) && (s = this.canInferCellDataType(e, t) ? this.inferCellDataType(o, i) : !1), !s) {
16501      e.cellDataType = !1;
16502      return;
16503    }
16504    const n = this.dataTypeDefinitions[s];
16505    if (!n) {
16506      x(47, { cellDataType: s });
16507      return;
16508    }
16509    return e.cellDataType = s, n.groupSafeValueFormatter && (e.valueFormatter = n.groupSafeValueFormatter), n.valueParser && (e.valueParser = n.valueParser), n.suppressDefaultProperties || this.setColDefPropertiesForBaseDataType(e, s, n, i), n.columnTypes;
16510  }
16511  addColumnListeners(e) {
16512    if (!this.isPendingInference)
16513      return;
16514    const t = this.columnStateUpdatesPendingInference[e.getColId()];
16515    if (!t)
16516      return;
16517    const i = (s) => {
16518      t.add(s.key);
16519    };
16520    e.addEventListener("columnStateUpdated", i), this.columnStateUpdateListenerDestroyFuncs.push(
16521      () => e.removeEventListener("columnStateUpdated", i)
16522    );
16523  }
16524  canInferCellDataType(e, t) {
16525    const { gos: i } = this;
16526    if (!me(i))
16527      return !1;
16528    const s = { cellRenderer: !0, valueGetter: !0, valueParser: !0, refData: !0 };
16529    if (Go(t, s))
16530      return !1;
16531    const o = t.type === null ? e.type : t.type;
16532    if (o) {
16533      const n = i.get("columnTypes") ?? {};
16534      if (Ns(o).some((a) => {
16535        const l = n[a.trim()];
16536        return l && Go(l, s);
16537      }))
16538        return !1;
16539    }
16540    return !Go(e, s);
16541  }
16542  inferCellDataType(e, t) {
16543    if (!e)
16544      return;
16545    let i;
16546    const s = this.getInitialData();
16547    if (s) {
16548      const n = e.indexOf(".") >= 0 && !this.gos.get("suppressFieldDotNotation");
16549      i = Vi(s, e, n);
16550    } else
16551      this.initWaitForRowData(t);
16552    if (i == null)
16553      return;
16554    const [o] = Object.entries(this.dataTypeMatchers).find(
16555      ([n, r]) => r(i)
16556    ) ?? ["object"];
16557    return o;
16558  }
16559  getInitialData() {
16560    const e = this.gos.get("rowData");
16561    if (e?.length)
16562      return e[0];
16563    if (this.initialData)
16564      return this.initialData;
16565    {
16566      const t = this.beans.rowModel.rootNode?.allLeafChildren;
16567      if (t?.length)
16568        return t[0].data;
16569    }
16570    return null;
16571  }
16572  initWaitForRowData(e) {
16573    if (this.columnStateUpdatesPendingInference[e] = /* @__PURE__ */ new Set(), this.isPendingInference)
16574      return;
16575    this.isPendingInference = !0;
16576    const t = this.isColumnTypeOverrideInDataTypeDefinitions, { colAutosize: i, eventSvc: s } = this.beans;
16577    t && i && (i.shouldQueueResizeOperations = !0);
16578    const [o] = this.addManagedEventListeners({
16579      rowDataUpdateStarted: (n) => {
16580        const { firstRowData: r } = n;
16581        r && (o?.(), this.isPendingInference = !1, this.processColumnsPendingInference(r, t), this.columnStateUpdatesPendingInference = {}, t && i?.processResizeOperations(), s.dispatchEvent({
16582          type: "dataTypesInferred"
16583        }));
16584      }
16585    });
16586  }
16587  processColumnsPendingInference(e, t) {
16588    this.initialData = e;
16589    const i = [];
16590    this.destroyColumnStateUpdateListeners();
16591    const s = {}, o = {};
16592    Object.entries(this.columnStateUpdatesPendingInference).forEach(([n, r]) => {
16593      const a = this.colModel.getCol(n);
16594      if (!a)
16595        return;
16596      const l = a.getColDef();
16597      if (!this.resetColDefIntoCol(a, "cellDataTypeInferred"))
16598        return;
16599      const d = a.getColDef();
16600      if (t && d.type && d.type !== l.type) {
16601        const c = tw(a, r);
16602        c.rowGroup && c.rowGroupIndex == null && (s[n] = c), c.pivot && c.pivotIndex == null && (o[n] = c), i.push(c);
16603      }
16604    }), t && i.push(
16605      ...this.generateColumnStateForRowGroupAndPivotIndexes(
16606        s,
16607        o
16608      )
16609    ), i.length && He(this.beans, { state: i }, "cellDataTypeInferred"), this.initialData = null;
16610  }
16611  generateColumnStateForRowGroupAndPivotIndexes(e, t) {
16612    const i = {}, { rowGroupColsSvc: s, pivotColsSvc: o } = this.beans;
16613    return s?.restoreColumnOrder(i, e), o?.restoreColumnOrder(i, t), Object.values(i);
16614  }
16615  resetColDefIntoCol(e, t) {
16616    const i = e.getUserProvidedColDef();
16617    if (!i)
16618      return !1;
16619    const s = rn(this.beans, i, e.getColId());
16620    return e.setColDef(s, i, t), !0;
16621  }
16622  checkObjectValueHandlers(e) {
16623    const t = this.dataTypeDefinitions.object, i = e.object;
16624    this.hasObjectValueParser = t.valueParser !== i.valueParser, this.hasObjectValueFormatter = t.valueFormatter !== i.valueFormatter;
16625  }
16626  getDateStringTypeDefinition(e) {
16627    const { dateString: t } = this.dataTypeDefinitions;
16628    return e ? this.getDataTypeDefinition(e) ?? t : t;
16629  }
16630  getDateParserFunction(e) {
16631    return this.getDateStringTypeDefinition(e).dateParser;
16632  }
16633  getDateFormatterFunction(e) {
16634    return this.getDateStringTypeDefinition(e).dateFormatter;
16635  }
16636  getDataTypeDefinition(e) {
16637    const t = e.getColDef();
16638    if (t.cellDataType)
16639      return this.dataTypeDefinitions[t.cellDataType];
16640  }
16641  getBaseDataType(e) {
16642    return this.getDataTypeDefinition(e)?.baseDataType;
16643  }
16644  checkType(e, t) {
16645    if (t == null)
16646      return !0;
16647    const i = this.getDataTypeDefinition(e)?.dataTypeMatcher;
16648    return i ? i(t) : !0;
16649  }
16650  validateColDef(e) {
16651    const t = (i) => x(48, { property: i });
16652    if (e.cellDataType === "object") {
16653      const { object: i } = this.dataTypeDefinitions;
16654      e.valueFormatter === i.groupSafeValueFormatter && !this.hasObjectValueFormatter && t("Formatter"), e.editable && e.valueParser === i.valueParser && !this.hasObjectValueParser && t("Parser");
16655    }
16656  }
16657  getFormatValue(e) {
16658    return this.formatValueFuncs[e];
16659  }
16660  isColPendingInference(e) {
16661    return this.isPendingInference && !!this.columnStateUpdatesPendingInference[e];
16662  }
16663  setColDefPropertiesForBaseDataType(e, t, i, s) {
16664    const o = this.formatValueFuncs[t];
16665    switch (i.baseDataType) {
16666      case "number": {
16667        e.cellEditor = "agNumberCellEditor";
16668        break;
16669      }
16670      case "boolean": {
16671        e.cellEditor = "agCheckboxCellEditor", e.cellRenderer = "agCheckboxCellRenderer", e.suppressKeyboardEvent = (n) => !!n.colDef.editable && n.event.key === b.SPACE;
16672        break;
16673      }
16674      case "date": {
16675        e.cellEditor = "agDateCellEditor", e.keyCreator = o;
16676        break;
16677      }
16678      case "dateString": {
16679        e.cellEditor = "agDateStringCellEditor", e.keyCreator = o;
16680        break;
16681      }
16682      case "object": {
16683        e.cellEditorParams = {
16684          useFormatter: !0
16685        }, e.comparator = (n, r) => {
16686          const a = this.colModel.getColDefCol(s), l = a?.getColDef();
16687          if (!a || !l)
16688            return 0;
16689          const d = n == null ? "" : o({ column: a, node: null, value: n }), c = r == null ? "" : o({ column: a, node: null, value: r });
16690          return d === c ? 0 : d > c ? 1 : -1;
16691        }, e.keyCreator = o;
16692        break;
16693      }
16694    }
16695    this.beans.filterManager?.setColDefPropertiesForDataType(e, i, o);
16696  }
16697  getDefaultDataTypes() {
16698    const e = (i) => !!i.match("^\\d{4}-\\d{2}-\\d{2}$"), t = this.getLocaleTextFunc();
16699    return {
16700      number: {
16701        baseDataType: "number",
16702        // can be empty space with legacy copy
16703        valueParser: (i) => i.newValue?.trim?.() === "" ? null : Number(i.newValue),
16704        valueFormatter: (i) => i.value == null ? "" : typeof i.value != "number" || isNaN(i.value) ? t("invalidNumber", "Invalid Number") : String(i.value),
16705        dataTypeMatcher: (i) => typeof i == "number"
16706      },
16707      text: {
16708        baseDataType: "text",
16709        valueParser: (i) => i.newValue === "" ? null : Xo(i.newValue),
16710        dataTypeMatcher: (i) => typeof i == "string"
16711      },
16712      boolean: {
16713        baseDataType: "boolean",
16714        valueParser: (i) => i.newValue == null ? i.newValue : i.newValue?.trim?.() === "" ? null : String(i.newValue).toLowerCase() === "true",
16715        valueFormatter: (i) => i.value == null ? "" : String(i.value),
16716        dataTypeMatcher: (i) => typeof i == "boolean"
16717      },
16718      date: {
16719        baseDataType: "date",
16720        valueParser: (i) => Re(i.newValue == null ? null : String(i.newValue)),
16721        valueFormatter: (i) => i.value == null ? "" : !(i.value instanceof Date) || isNaN(i.value.getTime()) ? t("invalidDate", "Invalid Date") : ke(i.value, !1) ?? "",
16722        dataTypeMatcher: (i) => i instanceof Date
16723      },
16724      dateString: {
16725        baseDataType: "dateString",
16726        dateParser: (i) => Re(i) ?? void 0,
16727        dateFormatter: (i) => ke(i ?? null, !1) ?? void 0,
16728        valueParser: (i) => e(String(i.newValue)) ? i.newValue : null,
16729        valueFormatter: (i) => e(String(i.value)) ? i.value : "",
16730        dataTypeMatcher: (i) => typeof i == "string" && e(i)
16731      },
16732      object: {
16733        baseDataType: "object",
16734        valueParser: () => null,
16735        valueFormatter: (i) => Xo(i.value) ?? ""
16736      }
16737    };
16738  }
16739  destroyColumnStateUpdateListeners() {
16740    this.columnStateUpdateListenerDestroyFuncs.forEach((e) => e()), this.columnStateUpdateListenerDestroyFuncs = [];
16741  }
16742  destroy() {
16743    this.dataTypeDefinitions = {}, this.dataTypeMatchers = {}, this.formatValueFuncs = {}, this.columnStateUpdatesPendingInference = {}, this.destroyColumnStateUpdateListeners(), super.destroy();
16744  }
16745};
16746function ma(e, t) {
16747  const i = {
16748    ...e,
16749    ...t
16750  };
16751  return e.columnTypes && t.columnTypes && t.appendColumnTypes && (i.columnTypes = [
16752    ...Ns(e.columnTypes),
16753    ...Ns(t.columnTypes)
16754  ]), i;
16755}
16756function Ca(e, t, i) {
16757  return t ? t.baseDataType !== e.baseDataType ? (x(46), !1) : !0 : (x(45, { parentCellDataType: i }), !1);
16758}
16759function va(e, t) {
16760  if (e.valueFormatter)
16761    return (i) => {
16762      if (i.node?.group) {
16763        const s = (i.colDef.pivotValueColumn ?? i.column).getAggFunc();
16764        if (s) {
16765          if (s === "first" || s === "last")
16766            return e.valueFormatter(i);
16767          if (e.baseDataType === "number" && s !== "count") {
16768            if (typeof i.value == "number")
16769              return e.valueFormatter(i);
16770            if (typeof i.value == "object") {
16771              if (!i.value)
16772                return;
16773              if ("toNumber" in i.value)
16774                return e.valueFormatter({
16775                  ...i,
16776                  value: i.value.toNumber()
16777                });
16778              if ("value" in i.value)
16779                return e.valueFormatter({
16780                  ...i,
16781                  value: i.value.value
16782                });
16783            }
16784          }
16785          return;
16786        }
16787        if (t.get("groupDisplayType") === "groupRows" && !t.get("treeData"))
16788          return;
16789      } else if (t.get("groupHideOpenParents") && i.column.isRowGroupActive() && typeof i.value == "string" && !e.dataTypeMatcher?.(i.value))
16790        return;
16791      return e.valueFormatter(i);
16792    };
16793}
16794function ew(e, t, i, s) {
16795  if (!t[i])
16796    return !1;
16797  const o = e[i];
16798  return o === null ? (t[i] = !1, !1) : s === void 0 ? !!o : o === s;
16799}
16800function Go(e, t) {
16801  return [
16802    ["cellRenderer", "agSparklineCellRenderer"],
16803    ["valueGetter", void 0],
16804    ["valueParser", void 0],
16805    ["refData", void 0]
16806  ].some(
16807    ([i, s]) => ew(e, t, i, s)
16808  );
16809}
16810function tw(e, t) {
16811  const i = Yl(e);
16812  return t.forEach((s) => {
16813    delete i[s], s === "rowGroup" ? delete i.rowGroupIndex : s === "pivot" && delete i.pivotIndex;
16814  }), i;
16815}
16816var iw = {
16817  moduleName: "DataType",
16818  version: I,
16819  beans: [Jv],
16820  dependsOn: [Av]
16821}, sw = {
16822  moduleName: "ColumnFlex",
16823  version: I,
16824  beans: [Xv]
16825}, ow = {
16826  moduleName: "ColumnApi",
16827  version: I,
16828  beans: [Zv],
16829  apiFunctions: {
16830    getColumnDef: Tv,
16831    getDisplayNameForColumn: Iv,
16832    getColumn: kv,
16833    getColumns: Lv,
16834    applyColumnState: Ov,
16835    getColumnState: Gv,
16836    resetColumnState: Hv,
16837    isPinning: Bv,
16838    isPinningLeft: Nv,
16839    isPinningRight: Vv,
16840    getDisplayedColAfter: Wv,
16841    getDisplayedColBefore: zv,
16842    setColumnsVisible: _v,
16843    setColumnsPinned: Uv,
16844    getAllGridColumns: $v,
16845    getDisplayedLeftColumns: Kv,
16846    getDisplayedCenterColumns: jv,
16847    getDisplayedRightColumns: qv,
16848    getAllDisplayedColumns: Yv,
16849    getAllDisplayedVirtualColumns: Qv,
16850    getColumnDefs: Mv
16851  }
16852};
16853function nw(e) {
16854  if (!e || e == null)
16855    return null;
16856  const t = /([a-z])([A-Z])/g, i = /([A-Z]+)([A-Z])([a-z])/g;
16857  return e.replace(t, "$1 $2").replace(i, "$1 $2$3").replace(/\./g, " ").split(" ").map((o) => o.substring(0, 1).toUpperCase() + (o.length > 1 ? o.substring(1, o.length) : "")).join(" ");
16858}
16859var rw = class extends y {
16860  constructor() {
16861    super(...arguments), this.beanName = "colNames";
16862  }
16863  getDisplayNameForColumn(e, t, i = !1) {
16864    if (!e)
16865      return null;
16866    const s = this.getHeaderName(e.getColDef(), e, null, null, t), { aggColNameSvc: o } = this.beans;
16867    return i && o ? o.getHeaderName(e, s) : s;
16868  }
16869  getDisplayNameForProvidedColumnGroup(e, t, i) {
16870    const s = t?.getColGroupDef();
16871    return s ? this.getHeaderName(s, null, e, t, i) : null;
16872  }
16873  getDisplayNameForColumnGroup(e, t) {
16874    return this.getDisplayNameForProvidedColumnGroup(e, e.getProvidedColumnGroup(), t);
16875  }
16876  // location is where the column is going to appear, ie who is calling us
16877  getHeaderName(e, t, i, s, o) {
16878    const n = e.headerValueGetter;
16879    if (n) {
16880      const r = this.gos.addGridCommonParams({
16881        colDef: e,
16882        column: t,
16883        columnGroup: i,
16884        providedColumnGroup: s,
16885        location: o
16886      });
16887      return typeof n == "function" ? n(r) : typeof n == "string" ? this.beans.expressionSvc?.evaluate(n, r) ?? null : "";
16888    } else {
16889      if (e.headerName != null)
16890        return e.headerName;
16891      if (e.field)
16892        return nw(e.field);
16893    }
16894    return "";
16895  }
16896}, aw = class extends y {
16897  constructor() {
16898    super(...arguments), this.beanName = "colViewport", this.colsWithinViewport = [], this.headerColsWithinViewport = [], this.colsWithinViewportHash = "", this.rowsOfHeadersToRenderLeft = {}, this.rowsOfHeadersToRenderRight = {}, this.rowsOfHeadersToRenderCenter = {};
16899  }
16900  wireBeans(e) {
16901    this.visibleCols = e.visibleCols, this.colModel = e.colModel;
16902  }
16903  postConstruct() {
16904    this.suppressColumnVirtualisation = this.gos.get("suppressColumnVirtualisation");
16905  }
16906  setScrollPosition(e, t, i = !1) {
16907    const { visibleCols: s } = this, o = s.isBodyWidthDirty;
16908    if (!(e === this.scrollWidth && t === this.scrollPosition && !o)) {
16909      if (this.scrollWidth = e, this.scrollPosition = t, s.isBodyWidthDirty = !0, this.gos.get("enableRtl")) {
16910        const r = s.bodyWidth;
16911        this.viewportLeft = r - t - e, this.viewportRight = r - t;
16912      } else
16913        this.viewportLeft = t, this.viewportRight = e + t;
16914      this.colModel.ready && this.checkViewportColumns(i);
16915    }
16916  }
16917  getHeadersToRender(e, t) {
16918    let i;
16919    switch (e) {
16920      case "left":
16921        i = this.rowsOfHeadersToRenderLeft[t];
16922        break;
16923      case "right":
16924        i = this.rowsOfHeadersToRenderRight[t];
16925        break;
16926      default:
16927        i = this.rowsOfHeadersToRenderCenter[t];
16928        break;
16929    }
16930    return i || [];
16931  }
16932  extractViewportColumns() {
16933    const e = this.visibleCols.centerCols;
16934    this.isColumnVirtualisationSuppressed() ? (this.colsWithinViewport = e, this.headerColsWithinViewport = e) : (this.colsWithinViewport = e.filter(this.isColumnInRowViewport.bind(this)), this.headerColsWithinViewport = e.filter(this.isColumnInHeaderViewport.bind(this)));
16935  }
16936  isColumnVirtualisationSuppressed() {
16937    return this.suppressColumnVirtualisation || this.viewportRight === 0;
16938  }
16939  clear(e) {
16940    this.rowsOfHeadersToRenderLeft = {}, this.rowsOfHeadersToRenderRight = {}, this.rowsOfHeadersToRenderCenter = {}, e || (this.colsWithinViewportHash = "");
16941  }
16942  isColumnInHeaderViewport(e) {
16943    return e.isAutoHeaderHeight() || lw(e) ? !0 : this.isColumnInRowViewport(e);
16944  }
16945  isColumnInRowViewport(e) {
16946    if (e.isAutoHeight())
16947      return !0;
16948    const t = e.getLeft() || 0, i = t + e.getActualWidth(), s = this.viewportLeft - 200, o = this.viewportRight + 200, n = t < s && i < s, r = t > o && i > o;
16949    return !n && !r;
16950  }
16951  // used by Grid API only
16952  getViewportColumns() {
16953    const { leftCols: e, rightCols: t } = this.visibleCols;
16954    return this.colsWithinViewport.concat(e).concat(t);
16955  }
16956  // + rowRenderer
16957  // if we are not column spanning, this just returns back the virtual centre columns,
16958  // however if we are column spanning, then different rows can have different virtual
16959  // columns, so we have to work out the list for each individual row.
16960  getColsWithinViewport(e) {
16961    if (!this.colModel.colSpanActive)
16962      return this.colsWithinViewport;
16963    const t = (n) => {
16964      const r = n.getLeft();
16965      return A(r) && r > this.viewportLeft;
16966    }, i = this.isColumnVirtualisationSuppressed() ? void 0 : this.isColumnInRowViewport.bind(this), { visibleCols: s } = this, o = s.centerCols;
16967    return s.getColsForRow(e, o, i, t);
16968  }
16969  // checks what columns are currently displayed due to column virtualisation. dispatches an event
16970  // if the list of columns has changed.
16971  // + setColumnWidth(), setViewportPosition(), setColumnDefs(), sizeColumnsToFit()
16972  checkViewportColumns(e = !1) {
16973    this.extractViewport() && this.eventSvc.dispatchEvent({
16974      type: "virtualColumnsChanged",
16975      afterScroll: e
16976    });
16977  }
16978  calculateHeaderRows() {
16979    this.clear(!0);
16980    const e = {}, { leftCols: t, rightCols: i, treeLeft: s, treeRight: o, treeCenter: n } = this.visibleCols;
16981    this.headerColsWithinViewport.concat(t).concat(i).forEach((l) => e[l.getId()] = !0);
16982    const a = (l, d, c) => {
16983      let u = !1;
16984      for (let h = 0; h < l.length; h++) {
16985        const g = l[h];
16986        let p = !1;
16987        if (yt(g))
16988          p = e[g.getId()] === !0;
16989        else {
16990          const m = g.getDisplayedChildren();
16991          m && (p = a(m, d, c + 1));
16992        }
16993        p && (u = !0, d[c] || (d[c] = []), d[c].push(g));
16994      }
16995      return u;
16996    };
16997    a(s, this.rowsOfHeadersToRenderLeft, 0), a(o, this.rowsOfHeadersToRenderRight, 0), a(n, this.rowsOfHeadersToRenderCenter, 0);
16998  }
16999  extractViewport() {
17000    const e = (s) => `${s.getId()}-${s.getPinned() || "normal"}`;
17001    this.extractViewportColumns();
17002    const t = this.getViewportColumns().map(e).join("#"), i = this.colsWithinViewportHash !== t;
17003    return i && (this.colsWithinViewportHash = t, this.calculateHeaderRows()), i;
17004  }
17005};
17006function lw(e) {
17007  for (; e; ) {
17008    if (e.isAutoHeaderHeight())
17009      return !0;
17010    e = e.getParent();
17011  }
17012  return !1;
17013}
17014var dw = class extends y {
17015  constructor() {
17016    super(...arguments), this.beanName = "agCompUtils";
17017  }
17018  adaptFunction(e, t) {
17019    if (!e.cellRenderer)
17020      return null;
17021    class i {
17022      refresh() {
17023        return !1;
17024      }
17025      getGui() {
17026        return this.eGui;
17027      }
17028      init(o) {
17029        const n = t(o), r = typeof n;
17030        if (r === "string" || r === "number" || r === "boolean") {
17031          this.eGui = Qi("<span>" + n + "</span>");
17032          return;
17033        }
17034        if (n == null) {
17035          this.eGui = Qi("<span></span>");
17036          return;
17037        }
17038        this.eGui = n;
17039      }
17040    }
17041    return i;
17042  }
17043}, cw = {
17044  moduleName: "CellRendererFunction",
17045  version: I,
17046  beans: [dw]
17047}, uw = class extends y {
17048  constructor() {
17049    super(...arguments), this.beanName = "registry", this.agGridDefaults = {}, this.agGridDefaultParams = {}, this.jsComps = {}, this.dynamicBeans = {}, this.selectors = {}, this.icons = {};
17050  }
17051  postConstruct() {
17052    const e = this.gos.get("components");
17053    e != null && Object.entries(e).forEach(([t, i]) => {
17054      this.jsComps[t] = i;
17055    });
17056  }
17057  registerModule(e) {
17058    const { icons: t, userComponents: i, dynamicBeans: s, selectors: o } = e;
17059    if (i) {
17060      const n = (r, a, l) => {
17061        this.agGridDefaults[r] = a, l && (this.agGridDefaultParams[r] = l);
17062      };
17063      for (const r of Object.keys(i)) {
17064        const a = i[r];
17065        typeof a == "object" ? n(r, a.classImp, a.params) : n(r, a);
17066      }
17067    }
17068    if (s)
17069      for (const n of Object.keys(s))
17070        this.dynamicBeans[n] = s[n];
17071    if (o?.forEach((n) => {
17072      this.selectors[n.selector] = n;
17073    }), t)
17074      for (const n of Object.keys(t))
17075        this.icons[n] = t[n];
17076  }
17077  getUserComponent(e, t) {
17078    const i = (a, l, d) => ({
17079      componentFromFramework: l,
17080      component: a,
17081      params: d
17082    }), { frameworkOverrides: s } = this.beans, o = s.frameworkComponent(t, this.gos.get("components"));
17083    if (o != null)
17084      return i(o, !0);
17085    const n = this.jsComps[t];
17086    if (n) {
17087      const a = s.isFrameworkComponent(n);
17088      return i(n, a);
17089    }
17090    const r = this.agGridDefaults[t];
17091    return r ? i(r, !1, this.agGridDefaultParams[t]) : (this.beans.validation?.missingUserComponent(e, t, this.agGridDefaults, this.jsComps), null);
17092  }
17093  createDynamicBean(e, t, ...i) {
17094    const s = this.dynamicBeans[e];
17095    if (s == null) {
17096      if (t)
17097        throw new Error(wt(256));
17098      return;
17099    }
17100    return new s(...i);
17101  }
17102  getSelector(e) {
17103    return this.selectors[e];
17104  }
17105  getIcon(e) {
17106    return this.icons[e];
17107  }
17108}, hw = 23, gw = class extends y {
17109  constructor() {
17110    super(...arguments), this.beanName = "ctrlsSvc", this.params = {}, this.ready = !1, this.readyCallbacks = [];
17111  }
17112  postConstruct() {
17113    this.addEventListener(
17114      "ready",
17115      () => {
17116        this.updateReady(), this.ready && (this.readyCallbacks.forEach((e) => e(this.params)), this.readyCallbacks.length = 0);
17117      },
17118      this.beans.frameworkOverrides.runWhenReadyAsync?.() ?? !1
17119    );
17120  }
17121  updateReady() {
17122    const e = Object.values(this.params);
17123    this.ready = e.length === hw && e.every((t) => t?.isAlive() ?? !1);
17124  }
17125  whenReady(e, t) {
17126    this.ready ? t(this.params) : this.readyCallbacks.push(t), e.addDestroyFunc(() => {
17127      const i = this.readyCallbacks.indexOf(t);
17128      i >= 0 && this.readyCallbacks.splice(i, 1);
17129    });
17130  }
17131  register(e, t) {
17132    this.params[e] = t, this.updateReady(), this.ready && this.dispatchLocalEvent({ type: "ready" }), t.addDestroyFunc(() => {
17133      this.updateReady();
17134    });
17135  }
17136  get(e) {
17137    return this.params[e];
17138  }
17139  getGridBodyCtrl() {
17140    return this.params.gridBodyCtrl;
17141  }
17142  getHeaderRowContainerCtrls() {
17143    const { leftHeader: e, centerHeader: t, rightHeader: i } = this.params;
17144    return [e, i, t];
17145  }
17146  getHeaderRowContainerCtrl(e) {
17147    const t = this.params;
17148    switch (e) {
17149      case "left":
17150        return t.leftHeader;
17151      case "right":
17152        return t.rightHeader;
17153      default:
17154        return t.centerHeader;
17155    }
17156  }
17157  getScrollFeature() {
17158    return this.getGridBodyCtrl().scrollFeature;
17159  }
17160}, pw = (
17161  /*css*/
17162  ':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}
17162.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom,.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-floating-bottom{border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;
17162&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);height:var(--ag-row-height);white-space:nowrap;width:100%;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px))}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row-hover.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}
17162.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}
17162.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}:where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);cursor:pointer;font-family:inherit;padding:var(--ag-spacing) calc(var(--ag-spacing)*2);&:hover{background-color:var(--ag-row-hover-color)}&:active{border-color:var(--ag-accent-color)}&:disabled{background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{&:hover{background-color:var(--ag-icon-button-hover-color);border-radius:1px;box-shadow:0 0 0 4px var(--ag-icon-button-hover-color)}}.ag-filter-active{--ag-icon-button-hover-color:color-mix(in srgb,transparent,var(--ag-accent-color) 28%);background-color:color-mix(in srgb,transparent,var(--ag-accent-color) 14%);border-radius:1px;outline:solid 4px color-mix(in srgb,transparent,var(--ag-accent-color) 14%);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z")}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}:where(.ag-ltr) :where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize}&.ag-resizer-topRight{cursor:nesw-resize}&.ag-resizer-bottomRight{cursor:nwse-resize}&.ag-resizer-bottomLeft{cursor:nesw-resize}}:where(.ag-rtl) :where(.ag-resizer){&.ag-resizer-topLeft{cursor:nesw-resize}&.ag-resizer-topRight{cursor:nwse-resize}&.ag-resizer-bottomRight{cursor:nesw-resize}&.ag-resizer-bottomLeft{cursor:nwse-resize}}'
17163), rr = typeof window != "object" || !window?.document?.fonts?.forEach, mn = /* @__PURE__ */ new WeakMap(), Si = (e, t, i) => {
17164  if (rr)
17165    return;
17166  const s = t.getRootNode() === document ? document.head : t;
17167  let o = mn.get(s);
17168  if (o || (o = { css: /* @__PURE__ */ new Set() }, mn.set(s, o)), o.css.has(e))
17169    return;
17170  const n = document.createElement("style");
17171  n.dataset.agGlobalCss = i, n.textContent = e, o.last ? o.last.insertAdjacentElement("afterend", n) : s.insertBefore(n, s.querySelector(":not(title, meta)")), o.css.add(e), o.last = n;
17172}, Kd = (e) => {
17173  Si(pw, e, "core"), Array.from(Vp()).sort((t, i) => t.moduleName.localeCompare(i.moduleName)).forEach(
17174    (t) => t.css?.forEach((i) => Si(i, e, `module-${t.moduleName}`))
17175  );
17176}, Cn = /* @__PURE__ */ new Set(), fw = (e) => {
17177  Cn.add(e);
17178}, mw = (e) => {
17179  if (Cn.delete(e), Cn.size === 0) {
17180    mn = /* @__PURE__ */ new WeakMap();
17181    for (const t of document.head.querySelectorAll("style[data-ag-global-css]"))
17182      t.remove();
17183  }
17184}, he = (e) => new jd(e), ft = "$default", Cw = 0, jd = class {
17185  constructor({ feature: e, params: t, modeParams: i = {}, css: s, cssImports: o }) {
17186    this.feature = e, this.css = s, this.cssImports = o, this.modeParams = {
17187      // NOTE: it's important that default is defined first, putting it
17188      // first in iteration order, because when merging params the default
17189      // params override any prior modal params, so modal params in this
17190      // part need to come after default params to prevent them from being
17191      // immediately overridden.
17192      [ft]: {
17193        ...i[ft] ?? {},
17194        ...t ?? {}
17195      },
17196      ...i
17197    };
17198  }
17199  use(e) {
17200    let t = this._inject;
17201    if (t == null) {
17202      let { css: i } = this;
17203      if (i) {
17204        const s = `ag-theme-${this.feature ?? "part"}-${++Cw}`;
17205        typeof i == "function" && (i = i()), i = `:where(.${s}) {
17206${i}
17207}
17208`;
17209        for (const o of this.cssImports ?? [])
17210          i = `@import url(${JSON.stringify(o)});
17211${i}`;
17212        t = { css: i, class: s };
17213      } else
17214        t = !1;
17215      this._inject = t;
17216    }
17217    return t && e && Si(t.css, e, t.class), t ? t.class : !1;
17218  }
17219}, vw = (e) => e.replace(/[A-Z]/g, (t) => `-${t}`).toLowerCase(), qd = (e) => `--ag-${vw(e)}`, dt = (e) => `var(${qd(e)})`, ww = (e, t, i) => Math.max(t, Math.min(i, e)), Sw = (e) => {
17220  const t = /* @__PURE__ */ new Map();
17221  return (i) => {
17222    const s = i;
17223    return t.has(s) || t.set(s, e(i)), t.get(s);
17224  };
17225}, mt = (e) => ({ ref: "accentColor", mix: e }), be = (e) => ({ ref: "foregroundColor", mix: e }), Me = (e) => ({
17226  ref: "foregroundColor",
17227  mix: e,
17228  onto: "backgroundColor"
17229}), bw = { ref: "foregroundColor" }, at = { ref: "accentColor" }, bi = {
17230  backgroundColor: "#fff",
17231  foregroundColor: "#181d1f",
17232  borderColor: be(0.15),
17233  chromeBackgroundColor: Me(0.02),
17234  browserColorScheme: "light"
17235}, yw = {
17236  ...bi,
17237  textColor: bw,
17238  accentColor: "#2196f3",
17239  invalidColor: "#e02525",
17240  wrapperBorder: !0,
17241  rowBorder: !0,
17242  headerRowBorder: !0,
17243  footerRowBorder: {
17244    ref: "rowBorder"
17245  },
17246  columnBorder: {
17247    style: "solid",
17248    width: 1,
17249    color: "transparent"
17250  },
17251  headerColumnBorder: !1,
17252  headerColumnBorderHeight: "100%",
17253  pinnedColumnBorder: !0,
17254  pinnedRowBorder: !0,
17255  sidePanelBorder: !0,
17256  sideBarPanelWidth: 250,
17257  sideBarBackgroundColor: {
17258    ref: "chromeBackgroundColor"
17259  },
17260  sideButtonBarBackgroundColor: {
17261    ref: "sideBarBackgroundColor"
17262  },
17263  sideButtonBarTopPadding: 0,
17264  sideButtonSelectedUnderlineWidth: 2,
17265  sideButtonSelectedUnderlineColor: "transparent",
17266  sideButtonSelectedUnderlineTransitionDuration: 0,
17267  sideButtonBackgroundColor: "transparent",
17268  sideButtonTextColor: { ref: "textColor" },
17269  sideButtonHoverBackgroundColor: { ref: "sideButtonBackgroundColor" },
17270  sideButtonHoverTextColor: { ref: "sideButtonTextColor" },
17271  sideButtonSelectedBackgroundColor: { ref: "backgroundColor" },
17272  sideButtonSelectedTextColor: { ref: "sideButtonTextColor" },
17273  sideButtonSelectedBorder: !0,
17274  sideButtonLeftPadding: { ref: "spacing" },
17275  sideButtonRightPadding: { ref: "spacing" },
17276  sideButtonVerticalPadding: { calc: "spacing * 3" },
17277  fontFamily: [
17278    "-apple-system",
17279    "BlinkMacSystemFont",
17280    "Segoe UI",
17281    "Roboto",
17282    "Oxygen-Sans",
17283    "Ubuntu",
17284    "Cantarell",
17285    "Helvetica Neue",
17286    "sans-serif"
17287  ],
17288  headerBackgroundColor: {
17289    ref: "chromeBackgroundColor"
17290  },
17291  headerFontFamily: {
17292    ref: "fontFamily"
17293  },
17294  cellFontFamily: {
17295    ref: "fontFamily"
17296  },
17297  headerFontWeight: 500,
17298  headerFontSize: {
17299    ref: "fontSize"
17300  },
17301  dataFontSize: {
17302    ref: "fontSize"
17303  },
17304  headerTextColor: {
17305    ref: "textColor"
17306  },
17307  headerCellHoverBackgroundColor: "transparent",
17308  headerCellMovingBackgroundColor: { ref: "headerCellHoverBackgroundColor" },
17309  headerCellBackgroundTransitionDuration: "0.2s",
17310  cellTextColor: {
17311    ref: "textColor"
17312  },
17313  subtleTextColor: {
17314    ref: "textColor",
17315    mix: 0.5
17316  },
17317  rangeSelectionBorderStyle: "solid",
17318  rangeSelectionBorderColor: at,
17319  rangeSelectionBackgroundColor: mt(0.2),
17320  rangeSelectionChartBackgroundColor: "#0058FF1A",
17321  rangeSelectionChartCategoryBackgroundColor: "#00FF841A",
17322  rangeSelectionHighlightColor: mt(0.5),
17323  rowHoverColor: mt(0.08),
17324  columnHoverColor: mt(0.05),
17325  selectedRowBackgroundColor: mt(0.12),
17326  modalOverlayBackgroundColor: {
17327    ref: "backgroundColor",
17328    mix: 0.66
17329  },
17330  oddRowBackgroundColor: {
17331    ref: "backgroundColor"
17332  },
17333  borderRadius: 4,
17334  wrapperBorderRadius: 8,
17335  cellHorizontalPadding: {
17336    calc: "spacing * 2 * cellHorizontalPaddingScale"
17337  },
17338  cellWidgetSpacing: {
17339    calc: "spacing * 1.5"
17340  },
17341  cellHorizontalPaddingScale: 1,
17342  rowGroupIndentSize: {
17343    calc: "cellWidgetSpacing + iconSize"
17344  },
17345  valueChangeDeltaUpColor: "#43a047",
17346  valueChangeDeltaDownColor: "#e53935",
17347  valueChangeValueHighlightBackgroundColor: "#16a08580",
17348  spacing: 8,
17349  fontSize: 14,
17350  rowHeight: {
17351    calc: "max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"
17352  },
17353  rowVerticalPaddingScale: 1,
17354  headerHeight: {
17355    calc: "max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"
17356  },
17357  headerVerticalPaddingScale: 1,
17358  popupShadow: "0 0 16px #00000026",
17359  cardShadow: "0 1px 4px 1px #00000018",
17360  dropdownShadow: { ref: "cardShadow" },
17361  dragAndDropImageBackgroundColor: {
17362    ref: "backgroundColor"
17363  },
17364  dragAndDropImageBorder: !0,
17365  dragAndDropImageShadow: {
17366    ref: "popupShadow"
17367  },
17368  dragHandleColor: be(0.7),
17369  focusShadow: {
17370    spread: 3,
17371    color: mt(0.5)
17372  },
17373  headerColumnResizeHandleHeight: "30%",
17374  headerColumnResizeHandleWidth: 2,
17375  headerColumnResizeHandleColor: {
17376    ref: "borderColor"
17377  },
17378  widgetContainerHorizontalPadding: {
17379    calc: "spacing * 1.5"
17380  },
17381  widgetContainerVerticalPadding: {
17382    calc: "spacing * 1.5"
17383  },
17384  widgetHorizontalSpacing: {
17385    calc: "spacing * 1.5"
17386  },
17387  widgetVerticalSpacing: {
17388    ref: "spacing"
17389  },
17390  listItemHeight: {
17391    calc: "iconSize + widgetVerticalSpacing"
17392  },
17393  iconSize: 16,
17394  toggleButtonWidth: 28,
17395  toggleButtonHeight: 18,
17396  toggleButtonOnBackgroundColor: at,
17397  toggleButtonOffBackgroundColor: Me(0.3),
17398  toggleButtonSwitchBackgroundColor: {
17399    ref: "backgroundColor"
17400  },
17401  toggleButtonSwitchInset: 2,
17402  menuBorder: {
17403    color: be(0.2)
17404  },
17405  menuBackgroundColor: Me(0.03),
17406  menuTextColor: Me(0.95),
17407  menuShadow: {
17408    ref: "popupShadow"
17409  },
17410  menuSeparatorColor: {
17411    ref: "borderColor"
17412  },
17413  setFilterIndentSize: {
17414    ref: "iconSize"
17415  },
17416  chartMenuPanelWidth: 260,
17417  chartMenuLabelColor: be(0.8),
17418  iconButtonHoverColor: be(0.1),
17419  dialogShadow: {
17420    ref: "popupShadow"
17421  },
17422  cellEditingBorder: {
17423    color: at
17424  },
17425  cellEditingShadow: { ref: "cardShadow" },
17426  dialogBorder: {
17427    color: be(0.2)
17428  },
17429  panelBackgroundColor: {
17430    ref: "backgroundColor"
17431  },
17432  panelTitleBarBackgroundColor: {
17433    ref: "headerBackgroundColor"
17434  },
17435  panelTitleBarBorder: !0,
17436  columnSelectIndentSize: {
17437    ref: "iconSize"
17438  },
17439  toolPanelSeparatorBorder: !0,
17440  tooltipBackgroundColor: {
17441    ref: "chromeBackgroundColor"
17442  },
17443  tooltipTextColor: {
17444    ref: "textColor"
17445  },
17446  tooltipBorder: !0,
17447  columnDropCellBackgroundColor: be(0.07),
17448  columnDropCellTextColor: {
17449    ref: "textColor"
17450  },
17451  columnDropCellDragHandleColor: {
17452    ref: "textColor"
17453  },
17454  columnDropCellBorder: {
17455    color: be(0.13)
17456  },
17457  selectCellBackgroundColor: be(0.07),
17458  selectCellBorder: {
17459    color: be(0.13)
17460  },
17461  advancedFilterBuilderButtonBarBorder: !0,
17462  advancedFilterBuilderIndentSize: {
17463    calc: "spacing * 2 + iconSize"
17464  },
17465  advancedFilterBuilderJoinPillColor: "#f08e8d",
17466  advancedFilterBuilderColumnPillColor: "#a6e194",
17467  advancedFilterBuilderOptionPillColor: "#f3c08b",
17468  advancedFilterBuilderValuePillColor: "#85c0e4",
17469  filterToolPanelGroupIndent: {
17470    ref: "spacing"
17471  },
17472  iconButtonHoverBackgroundColor: be(0.1),
17473  rowLoadingSkeletonEffectColor: be(0.15)
17474}, Rw = [
17475  "colorScheme",
17476  "color",
17477  "length",
17478  "scale",
17479  "borderStyle",
17480  "border",
17481  "shadow",
17482  "image",
17483  "fontFamily",
17484  "fontWeight",
17485  "duration"
17486], Fw = Sw((e) => (e = e.toLowerCase(), Rw.find((t) => e.endsWith(t.toLowerCase())) ?? "length")), to = (e) => typeof e == "string" ? e : typeof e == "number" ? String(e) : !1, ar = (e) => {
17487  if (typeof e == "string")
17488    return e;
17489  if (e && "ref" in e) {
17490    const t = dt(e.ref);
17491    return e.mix == null ? t : `color-mix(in srgb, ${e.onto ? dt(e.onto) : "transparent"}, ${t} ${ww(e.mix * 100, 0, 100)}%)`;
17492  }
17493  return !1;
17494}, xw = to, ei = (e) => typeof e == "string" ? e : typeof e == "number" ? `${e}px` : e && "calc" in e ? `calc(${e.calc.replace(/ ?[*/+] ?/g, " $& ").replace(/-?[a-z][a-z0-9]*\b(?![-(])/gi, (i) => i[0] === "-" ? i : ` ${dt(i)} `)})` : e && "ref" in e ? dt(e.ref) : !1, Pw = to, Ew = (e, t) => typeof e == "string" ? e : e === !0 ? "solid 1px var(--ag-border-color)" : e === !1 ? t === "columnBorder" ? "solid 1px transparent" : "none" : e && "ref" in e ? dt(e.ref) : Yd(e.style ?? "solid") + " " + ei(e.width ?? 1) + " " + ar(e.color ?? { ref: "borderColor" }), Dw = (e) => typeof e == "string" ? e : e === !1 ? "none" : e && "ref" in e ? dt(e.ref) : [
17495  ei(e.offsetX ?? 0),
17496  ei(e.offsetY ?? 0),
17497  ei(e.radius ?? 0),
17498  ei(e.spread ?? 0),
17499  ar(e.color ?? { ref: "foregroundColor" })
17500].join(" "), Yd = to, Qd = (e) => typeof e == "string" ? e : e && "googleFont" in e ? Qd(e.googleFont) : e && "ref" in e ? dt(e.ref) : Array.isArray(e) ? e.map((t) => (typeof t == "object" && "googleFont" in t && (t = t.googleFont), Aw(t))).join(", ") : !1, Aw = (e) => (
17501  // don't quote var() expressions or quote safe identifier names, so that
17502  // people can specify fonts like sans-serif which are keywords not strings,
17503  // or var(--my-var)
17504  /^[\w-]+$|\w\(/.test(e) ? e : JSON.stringify(e)
17505), Tw = to, Zd = (e) => typeof e == "string" ? e : e && "url" in e ? `url(${JSON.stringify(e.url)})` : e && "svg" in e ? Zd({ url: `data:image/svg+xml,${encodeURIComponent(e.svg)}` }) : e && "ref" in e ? dt(e.ref) : !1, Mw = (e, t) => typeof e == "string" ? e : typeof e == "number" ? (e >= 10 && z(104, { value: e, param: t }), `${e}s`) : e && "ref" in e ? dt(e.ref) : !1, Iw = {
17506  color: ar,
17507  colorScheme: xw,
17508  length: ei,
17509  scale: Pw,
17510  border: Ew,
17511  borderStyle: Yd,
17512  shadow: Dw,
17513  image: Zd,
17514  fontFamily: Qd,
17515  fontWeight: Tw,
17516  duration: Mw
17517}, kw = (e, t) => {
17518  const i = Fw(e);
17519  return Iw[i](t, e);
17520}, Lw = () => new Xd(), Xd = class Jd {
17521  constructor(t = []) {
17522    this.parts = t;
17523  }
17524  withPart(t) {
17525    return typeof t == "function" && (t = t()), t instanceof jd ? new Jd([...this.parts, t]) : (en(259, { part: t }, "Invalid part"), this);
17526  }
17527  withoutPart(t) {
17528    return this.withPart(he({ feature: t }));
17529  }
17530  withParams(t, i = ft) {
17531    return this.withPart(
17532      he({
17533        modeParams: { [i]: t }
17534      })
17535    );
17536  }
17537  /**
17538   * Called by a grid instance when it starts using the theme. This installs
17539   * the theme's parts into document head, or the shadow DOM if the provided
17540   * container is within a shadow root.
17541   */
17542  _startUse({ container: t, loadThemeGoogleFonts: i }) {
17543    if (rr)
17544      return;
17545    Gw(), Kd(t);
17546    const s = Ow(this);
17547    if (s.length > 0)
17548      for (const o of s)
17549        i && Bw(o);
17550    for (const o of this.parts)
17551      o.use(t);
17552  }
17553  /**
17554   * Return CSS that that applies the params of this theme to elements with
17555   * the provided class name
17556   */
17557  _getCssClass() {
17558    return this._cssClassCache ?? (this._cssClassCache = wa(this.parts).map((t) =>
17558 t.use()).filter(Boolean).join(" "));
17559  }
17560  _getModeParams() {
17561    let t = this._paramsCache;
17562    if (!t) {
17563      const i = {
17564        // NOTE: defining the default mode here is important, it ensures
17565        // that the default mode is first in iteration order, which puts
17566        // it first in outputted CSS, allowing other modes to override it
17567        [ft]: { ...yw }
17568      };
17569      for (const s of wa(this.parts))
17570        for (const [o, n] of Object.entries(s.modeParams))
17571          if (n) {
17572            const r = i[o] ?? (i[o] = {}), a = /* @__PURE__ */ new Set();
17573            for (const [l, d] of Object.entries(n))
17574              d !== void 0 && (r[l] = d, a.add(l));
17575            if (o === ft) {
17576              for (const [l, d] of Object.entries(i))
17577                if (l !== ft)
17578                  for (const c of a)
17579                    delete d[c];
17580            }
17581          }
17582      this._paramsCache = t = i;
17583    }
17584    return t;
17585  }
17586  /**
17587   * Return the CSS chunk that is inserted into the grid DOM, and will
17588   * therefore be removed automatically when the grid is destroyed or it
17589   * starts to use a new theme.
17590   *
17591   * @param className a unique class name on the grid wrapper used to scope the returned CSS to the grid instance
17592   */
17593  _getPerGridCss(t) {
17594    const i = "##SELECTOR##";
17595    let s = this._paramsCssCache;
17596    if (!s) {
17597      let o = "", n = "";
17598      for (const [a, l] of Object.entries(this._getModeParams())) {
17599        if (a !== ft) {
17600          const c = `:where([data-ag-theme-mode="${typeof CSS == "object" ? CSS.escape(a) : a}"]) & {
17601`;
17602          o += c, n += c;
17603        }
17604        for (const [d, c] of Object.entries(l)) {
17605          const u = kw(d, c);
17606          if (u === !1)
17607            z(107, { key: d, value: c });
17608          else {
17609            const h = qd(d), g = h.replace("--ag-", "--ag-inherited-");
17610            o += `	${h}: var(${g}, ${u});
17611`, n += `	${g}: var(${h});
17612`;
17613          }
17614        }
17615        a !== ft && (o += `}
17616`, n += `}
17617`);
17618      }
17619      let r = `${i} {
17620${o}}
17621`;
17622      r += `:has(> ${i}):not(${i}) {
17623${n}}
17624`, this._paramsCssCache = s = r;
17625    }
17626    return s.replaceAll(i, `:where(.${t})`);
17627  }
17628}, wa = (e) => {
17629  const t = /* @__PURE__ */ new Map();
17630  for (const s of e)
17631    t.set(s.feature, s);
17632  const i = [];
17633  for (const s of e)
17634    (!s.feature || t.get(s.feature) === s) && i.push(s);
17635  return i;
17636}, Ow = (e) => {
17637  const t = /* @__PURE__ */ new Set(), i = (n) => {
17638    if (Array.isArray(n))
17639      n.forEach(i);
17640    else {
17641      const r = n?.googleFont;
17642      typeof r == "string" && t.add(r);
17643    }
17644  };
17645  return Object.values(e._getModeParams()).flatMap((n) => Object.values(n)).forEach(i), Array.from(t).sort();
17646}, Sa = !1, Gw = () => {
17647  if (!Sa) {
17648    Sa = !0;
17649    for (const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))
17650      e.remove();
17651  }
17652}, Hw = /* @__PURE__ */ new Set(), Bw = async (e) => {
17653  Hw.add(e);
17654  const t = `@import url('https://${Nw}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
17655`;
17656  Si(t, document.head, `googleFont:${e}`);
17657}, Nw = "fonts.googleapis.com", Vw = (
17658  /*css*/
17659  '.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}'
17660), Ww = he({
17661  feature: "checkboxStyle",
17662  params: {
17663    checkboxBorderWidth: 1,
17664    checkboxBorderRadius: {
17665      ref: "borderRadius"
17666    },
17667    checkboxUncheckedBackgroundColor: {
17668      ref: "backgroundColor"
17669    },
17670    checkboxUncheckedBorderColor: Me(0.3),
17671    checkboxCheckedBackgroundColor: at,
17672    checkboxCheckedBorderColor: at,
17673    checkboxCheckedShapeImage: {
17674      svg: '<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'
17675    },
17676    checkboxCheckedShapeColor: {
17677      ref: "backgroundColor"
17678    },
17679    checkboxIndeterminateBackgroundColor: Me(0.3),
17680    checkboxIndeterminateBorderColor: Me(0.3),
17681    checkboxIndeterminateShapeImage: {
17682      svg: '<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'
17683    },
17684    checkboxIndeterminateShapeColor: {
17685      ref: "backgroundColor"
17686    },
17687    radioCheckedShapeImage: {
17688      svg: '<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'
17689    }
17690  },
17691  css: Vw
17692});
17693({
17694  ...bi
17695});
17696({
17697  ...bi
17698});
17699var ec = {
17700  ...bi,
17701  backgroundColor: "hsl(217, 0%, 17%)",
17702  foregroundColor: "#FFF",
17703  chromeBackgroundColor: Me(0.05),
17704  rowHoverColor: mt(0.15),
17705  selectedRowBackgroundColor: mt(0.2),
17706  menuBackgroundColor: Me(0.1),
17707  browserColorScheme: "dark",
17708  popupShadow: "0 0px 20px #000A",
17709  cardShadow: "0 1px 4px 1px #000A",
17710  advancedFilterBuilderJoinPillColor: "#7a3a37",
17711  advancedFilterBuilderColumnPillColor: "#355f2d",
17712  advancedFilterBuilderOptionPillColor: "#5a3168",
17713  advancedFilterBuilderValuePillColor: "#374c86",
17714  checkboxUncheckedBorderColor: Me(0.4),
17715  toggleButtonOffBackgroundColor: Me(0.4)
17716}, zw = {
17717  ...ec,
17718  backgroundColor: "#1f2836"
17719}, _w = /* @__PURE__ */ he({
17720  feature: "colorScheme",
17721  params: bi,
17722  modeParams: {
17723    light: bi,
17724    dark: ec,
17725    "dark-blue": zw
17726  }
17727}), tc = (
17728  /*css*/
17729  ':where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}'
17730), Uw = (
17731  /*css*/
17732  `.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M24 5.333H8V8l8.667 8L8 24v2.667h16v-4h-9.333L21.334 16l-6.667-6.667H24z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='M13.333 11.556h5.333V8h3.556L16 1.778 9.778 8h3.556zm-1.777 1.777H8V9.777l-6.222 6.222L8 22.221v-3.556h3.556zM30.222 16 24 9.778v3.556h-3.556v5.333H24v3.556l6.222-6.222zm-11.555 4.444h-5.333V24H9.778L16 30.222 22.222 24h-3.556z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 2.667C8.627 2.667 2.667 8.627 2.667 16S8.627 29.333 16 29.333 29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M5.333 10.667h5.333V5.334H5.333zm8 16h5.333v-5.333h-5.333zm-8 0h5.333v-5.333H5.333zm0-8h5.333v-5.333H5.333zm8 0h5.333v-5.333h-5.333zm8-13.334v5.333h5.333V5.333zm-8 5.334h5.333V5.334h-5.333zm8 8h5.333v-5.333h-5.333zm0 8h5.333v-5.333h-5.333z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m25.333 8.547-1.88-1.88L16 14.12 8.547 6.667l-1.88 1.88L14.12 16l-7.453 7.453 1.88 1.88L16 17.88l7.453 7.453 1.88-1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753
17732-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m19 3-6 6 2 2 7-7V3m-10 9.5a.503.503 0 0 1-.5-.5c0-.274.226-.5.5-.5s.5.226.5.5-.226.5-.5.5M6 20c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2M6 8c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2m3.64-.36c.23-.5.36-1.05.36-1.64 0-2.194-1.806-4-4-4S2 3.806 2 6s1.806 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.194 0-4 1.806-4 4s1.806 4 4 4 4-1.806 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1z' style='fill-rule:nonzero' transform='translate(4 4)'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.
177321.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M21.106 15.088A5.19 5.19 0 0 0 16 10.814a5.17 5.17 0 0 0-3.668 1.522L9.866 9.868a12.2 12.2 0 0 1 6.133-1.646c5.186 0 9.614 3.225 11.408 7.778a12.34 12.34 0 0 1-5.276 6.133l-2.468-2.466a5.17 5.17 0 0 0 1.449-2.802h-2.123c-.148.508-.42.964-.782 1.33l-1.33-1.33h-2.514l2.196 2.196q-.272.049-.56.05a3.11 3.11 0 0 1-2.99-2.245h-2.123a5.19 5.19 0 0 0 7.3 3.836l2.247 2.247a12.2 12.2 0 0 1-4.434.828c-5.186 0-9.614-3.225-11.408-7.778a12.3 12.3 0 0 1 3.781-5.111l2.924 2.924a5.1 5.1 0 0 0-.404 1.275h4.206l-1.296-1.296a3.1 3.1 0 0 1 2.196-.903c1.404 0 2.587.924 2.976 2.199h2.13z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16 8.222c-5.186 0-9.614 3.225-11.408 7.778 1.794 4.553 6.222 7.778 11.408 7.778S25.614 20.553 27.408 16C25.614 11.447 21.186 8.222 16 8.222m0 12.964c-2.862 0-5.186-2.324-5.186-5.186s2.324-5.186 5.186-5.186 5.186 2.324 5.186 5.186-2.324 5.186-5.186 5.186m0-8.297c-1.721 0-3.111 1.39-3.111 3.111s1.39 3.111 3.111 3.111 3.111-1.39 3.111-3.111-1.39-3.111-3.111-3.111'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M13.333 24h5.333v-2.667h-5.333zM4 8v2.667h24V8zm4 9.333h16v-2.667H8z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M18.667 21.333h8.889A3.555 3.555 0 0 1 24 24.889h-5.333zm8.888-7.111v3.556h-8.889v-3.556zM24 7.111a3.555 3.555 0 0 1 3.556 3.556h-16V7.111zm-8.889 17.778h-3.556v-3.556h3.556zm0-7.111h-3.556v-3.556h3.556zM8 10.667H4.444A3.555 3.555 0 0 1 8 7.111z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227v-2.667z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333c-3.68 0-6.667 2.987-6.667 6.667s2.987 6.667 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333c2.28 0 4.133 1.853 4.133 4.133s-1.853 4.133-4.133 4.133h-5.333v2.533h5.333c3.68 0 6.667-2.987 6.667-6.667s-2.987-6.667-6.667-6.667z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='m17.778 11.708 3.25-3.251 2.516 2.516-3.251 3.25h4.597v3.556h-4.597l3.251 3.25-2.516 2.516-3.25-3.251v4.597h-3.556v-4.597l-3.25 3.251-2.516-2.516 3.251-3.25H7.11v-3.556h4.597l-3.251-3.25 2.516-2.516 3.25 3.251V7.111h3.556zm-3.251 7.847h2.944l2.084-2.084v-2.944l-2.084-2.084h-2.944l-2.084 2.084v2.944z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='M4 4h24v2.667H4z'/%3
17732E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M4 24h24v-2.667H4zm0-6.667h24v-2.667H4zM4 8v2.667h24V8z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 26.667a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 24q0-1.1.784-1.883A2.57 2.57 0 0 1 16 21.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 16q0-1.1.784-1.883A2.57 2.57 0 0 1 16 13.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 8q0-1.1.784-1.883A2.57 2.57 0 0 1 16 5.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='M8 25.333h16V28H8z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='M4 24h16v-2.667H4zM4 8v2.667h24V8zm0 9.333h24v-2.667H4z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M25.333 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4zM16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z
vendor: 6,162 bytes, line 17732
17732'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m11.106 22.093-4.444 4.444-1.259-1.259 4.444-4.444zm5.872-16.63 9.618 9.62-.962.962-.962-.962-7.694 3.847 1.924 1.924-2.74 2.74-7.696-7.696 2.741-2.74 1.924 1.925 3.847-7.696-.962-.962z'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M26.667 30.223H5.334a3.556 3.556 0 0 1-3.556-3.556V5.334a3.556 3.556 0 0 1 3.556-3.556h21.333a3.556 3.556 0 0 1 3.556 3.556v21.333a3.556 3.556 0 0 1-3.556 3.556m-16-8.89H5.334v5.333h5.333zm16-7.11H12.444v12.444h14.223zm-9.15 6.85-2.039 2.037 2.039 2.039-1.257 1.257-3.295-3.296 3.295-3.295q.63.628 1.257 1.257zm-6.85-6.85H5.334v5.333h5.333zm15.74 3.816-1.257 1.256-2.039-2.037-2.037 2.037-1.257-1.256 3.295-3.296zM10.667 5.333H5.334v5.333h5.333zm8.889 0h-7.112v5.333h7.112zm7.111 0h-5.333v5.333h5.333z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M9.333 12.667 16 19.334l6.667-6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M19.333 9.333 12.666 16l6.667 6.667V9.334z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='M12.667 22.667 19.334 16l-6.667-6.667v13.333z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='M9.333 19.333 16 12.666l6.667 6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='m11.727 21.167-5.56-5.56-1.893 1.88 7.453 7.453 16-16-1.88-1.88z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6.667 14.667h18.667v2.667H6.667z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M22.12 11.06 16 17.167 9.88 11.06 8 12.94l8 8 8-8z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M26.667 12H5.334v2.667h21.333zM5.333 20h21.333v-2.667H5.333z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}
17732`
17733), $w = /* @__PURE__ */ he({
17734  feature: "iconSet",
17735  css: () => tc + Uw
17736}), ic = {
17737  aggregation: '<path d="M18 7V4H6l6 8-6 8h12v-3"/>',
17738  arrows: '<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',
17739  asc: '<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',
17740  cancel: '<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',
17741  chart: '<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',
17742  "color-picker": '<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',
17743  columns: '<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',
17744  contracted: '<path d="m9 18 6-6-6-6"/>',
17745  copy: '<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',
17746  cross: '<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',
17747  csv: '<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',
17748  cut: '<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',
17749  desc: '<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',
17750  down: '<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',
17751  excel: '<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',
17752  expanded: '<path d="m15 18-6-6 6-6"/>',
17753  "eye-slash": '<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',
17754  eye: '<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',
17755  filter: '<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',
17756  first: '<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',
17757  group: '<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',
17758  last: '<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',
17759  left: '<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',
17760  linked: '<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',
17761  loading: '<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',
17762  maximize: '<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',
17763  menu: '<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',
17764  "menu-alt": '<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',
17765  minimize: '<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',
17766  minus: '<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',
17767  next: '<path d="m9 18 6-6-6-6"/>',
17768  none: '<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',
17769  "not-allowed": '<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',
17770  paste: '<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',
17771  pin: '<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',
17772  pivot: '<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',
17773  plus: '<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',
17774  previous: '<path d="m15 18-6-6 6-6"/>',
17775  right: '<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',
17776  save: '<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',
17777  "small-left": '<path d="m15 18-6-6 6-6"/>',
17778  "small-right": '<path d="m9 18 6-6-6-6"/>',
17779  tick: '<path d="M20 6 9 17l-5-5"/>',
17780  "tree-closed": '<path d="m9 18 6-6-6-6"/>',
17781  "tree-indeterminate": '<path d="M5 12h14"/>',
17782  "tree-open": '<path d="m6 9 6 6 6-6"/>',
17783  unlinked: '<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',
17784  up: '<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',
17785  grip: '<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',
17786  settings: '<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'
17787}, sc = {
17788  "small-down": '<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32">
17788<path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',
17789  "small-up": '<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>'
17790}, Kw = (e = {}) => {
17791  let t = tc;
17792  for (const i of [...Object.keys(ic), ...Object.keys(sc)]) {
17793    const s = jw(i, e.strokeWidth);
17794    t += `.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(s)}'); }
17795`;
17796  }
17797  return t;
17798}, jw = (e, t = 1.5) => {
17799  const i = sc[e];
17800  if (i)
17801    return i;
17802  const s = ic[e];
17803  if (!s)
17804    throw new Error(`Missing icon data for ${e}`);
17805  return `<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>` + s + "</svg>";
17806}, qw = (e = {}) => he({
17807  feature: "iconSet",
17808  css: () => Kw(e)
17809}), Yw = /* @__PURE__ */ qw(), lr = (
17810  /*css*/
17811  ':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}'
17812), Qw = (
17813  /*css*/
17814  ":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){&:focus{box-shadow:var(--ag-focus-shadow)}}"
17815), Zw = (
17816  /*css*/
17817  ":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){border-left:none;border-right:none;border-top:none}"
17818), dr = {
17819  inputBackgroundColor: "transparent",
17820  inputBorder: !1,
17821  inputBorderRadius: 0,
17822  inputTextColor: {
17823    ref: "textColor"
17824  },
17825  inputPlaceholderTextColor: {
17826    ref: "inputTextColor",
17827    mix: 0.5
17828  },
17829  inputPaddingStart: 0,
17830  inputHeight: {
17831    calc: "max(iconSize, fontSize) + spacing * 2"
17832  },
17833  inputFocusBackgroundColor: {
17834    ref: "inputBackgroundColor"
17835  },
17836  inputFocusBorder: {
17837    ref: "inputBorder"
17838  },
17839  inputFocusShadow: "none",
17840  inputFocusTextColor: {
17841    ref: "inputTextColor"
17842  },
17843  inputDisabledBackgroundColor: {
17844    ref: "inputBackgroundColor"
17845  },
17846  inputDisabledBorder: {
17847    ref: "inputBorder"
17848  },
17849  inputDisabledTextColor: {
17850    ref: "inputTextColor"
17851  },
17852  inputInvalidBackgroundColor: {
17853    ref: "inputBackgroundColor"
17854  },
17855  inputInvalidBorder: {
17856    ref: "inputBorder"
17857  },
17858  inputInvalidTextColor: {
17859    ref: "inputTextColor"
17860  },
17861  inputIconColor: {
17862    ref: "inputTextColor"
17863  }
17864};
17865he({
17866  feature: "inputStyle",
17867  params: dr,
17868  css: lr
17869});
17870var Xw = /* @__PURE__ */ he({
17871  feature: "inputStyle",
17872  params: {
17873    ...dr,
17874    inputBackgroundColor: {
17875      ref: "backgroundColor"
17876    },
17877    inputBorder: !0,
17878    inputBorderRadius: {
17879      ref: "borderRadius"
17880    },
17881    inputPaddingStart: {
17882      ref: "spacing"
17883    },
17884    inputFocusBorder: {
17885      color: at
17886    },
17887    inputFocusShadow: {
17888      ref: "focusShadow"
17889    },
17890    inputDisabledBackgroundColor: Me(0.06),
17891    inputDisabledTextColor: {
17892      ref: "textColor",
17893      mix: 0.5
17894    },
17895    inputInvalidBorder: {
17896      color: { ref: "invalidColor" }
17897    }
17898  },
17899  css: () => lr + Qw
17900});
17901({
17902  ...dr,
17903  inputBorder: be(0.3)
17904});
17905var cs = (
17906  /*css*/
17907  '.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}'
17908), Jw = (
17909  /*css*/
17910  ".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:0;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}"
17911), us = {
17912  tabBarBackgroundColor: "transparent",
17913  tabBarHorizontalPadding: 0,
17914  tabBarTopPadding: 0,
17915  tabBackgroundColor: "transparent",
17916  tabTextColor: {
17917    ref: "textColor"
17918  },
17919  tabHorizontalPadding: {
17920    ref: "spacing"
17921  },
17922  tabTopPadding: {
17923    ref: "spacing"
17924  },
17925  tabBottomPadding: {
17926    ref: "spacing"
17927  },
17928  tabSpacing: "0",
17929  tabHoverBackgroundColor: {
17930    ref: "tabBackgroundColor"
17931  },
17932  tabHoverTextColor: {
17933    ref: "tabTextColor"
17934  },
17935  tabSelectedBackgroundColor: {
17936    ref: "tabBackgroundColor"
17937  },
17938  tabSelectedTextColor: {
17939    ref: "tabTextColor"
17940  },
17941  tabSelectedBorderWidth: 1,
17942  tabSelectedBorderColor: "transparent",
17943  tabSelectedUnderlineColor: "transparent",
17944  tabSelectedUnderlineWidth: 0,
17945  tabSelectedUnderlineTransitionDuration: 0,
17946  tabBarBorder: !1
17947};
17948he({
17949  feature: "tabStyle",
17950  params: us,
17951  css: cs
17952});
17953var eS = /* @__PURE__ */ he({
17954  feature: "tabStyle",
17955  params: {
17956    ...us,
17957    tabBarBorder: !0,
17958    tabBarBackgroundColor: be(0.05),
17959    tabTextColor: {
17960      ref: "textColor",
17961      mix: 0.7
17962    },
17963    tabSelectedTextColor: {
17964      ref: "textColor"
17965    },
17966    tabHoverTextColor: {
17967      ref: "textColor"
17968    },
17969    tabSelectedBorderColor: {
17970      ref: "borderColor"
17971    },
17972    tabSelectedBackgroundColor: {
17973      ref: "backgroundColor"
17974    }
17975  },
17976  css: cs
17977});
17978({
17979  ...us
17980});
17981({
17982  ...us
17983});
17984({
17985  ...us
17986});
17987var oc = /* @__PURE__ */ Lw().withPart(Ww).withPart(_w).withPart(Yw).withPart(eS).withPart(() => Xw).withParams({
17988  fontFamily: [
17989    { googleFont: "IBM Plex Sans" },
17990    "-apple-system",
17991    "BlinkMacSystemFont",
17992    "Segoe UI",
17993    "Roboto",
17994    "Oxygen-Sans",
17995    "Ubuntu"
17996  ]
17997}), ba = {
17998  cssName: "--ag-row-height",
17999  changeKey: "rowHeightChanged",
18000  defaultValue: 42
18001}, ya = {
18002  cssName: "--ag-header-height",
18003  changeKey: "headerHeightChanged",
18004  defaultValue: 48
18005}, Ra = {
18006  cssName: "--ag-list-item-height",
18007  changeKey: "listItemHeightChanged",
18008  defaultValue: 24
18009}, Ho = {
18010  cssName: "--ag-row-border",
18011  changeKey: "rowBorderWidthChanged",
18012  defaultValue: 1,
18013  border: !0
18014}, tS = 0, iS = class extends y {
18015  constructor() {
18016    super(...arguments), this.beanName = "environment", this.sizeEls = /* @__PURE__ */ new Map(), this.lastKnownValues = /* @__PURE__ */ new Map(), this.sizesMeasured = !1, this.paramsClass = `ag-theme-params-${++tS}`, this.globalCSS = [];
18017  }
18018  wireBeans(e) {
18019    this.eGridDiv = e.eGridDiv;
18020  }
18021  postConstruct() {
18022    this.addManagedPropertyListener("theme", () => this.handleThemeGridOptionChange()), this.handleThemeGridOptionChange(), this.addManagedPropertyListener("rowHeight", () =>
18022 this.refreshRowHeightVariable()), this.getSizeEl(ba), this.getSizeEl(ya), this.getSizeEl(Ra), this.getSizeEl(Ho), this.refreshRowBorderWidthVariable(), this.addDestroyFunc(() => mw(this));
18023  }
18024  getDefaultRowHeight() {
18025    return this.getCSSVariablePixelValue(ba);
18026  }
18027  getDefaultHeaderHeight() {
18028    return this.getCSSVariablePixelValue(ya);
18029  }
18030  getDefaultColumnMinWidth() {
18031    return Math.min(36, this.getDefaultRowHeight());
18032  }
18033  getDefaultListItemHeight() {
18034    return this.getCSSVariablePixelValue(Ra);
18035  }
18036  getRowBorderWidth() {
18037    return this.getCSSVariablePixelValue(Ho);
18038  }
18039  applyThemeClasses(e) {
18040    const { gridTheme: t } = this;
18041    let i = "";
18042    if (t)
18043      i = `${this.paramsClass} ${t._getCssClass()}`;
18044    else {
18045      let s = this.eGridDiv;
18046      for (; s; ) {
18047        for (const o of Array.from(s.classList))
18048          o.startsWith("ag-theme-") && (i = i ? `${i} ${o}` : o);
18049        s = s.parentElement;
18050      }
18051    }
18052    for (const s of Array.from(e.classList))
18053      s.startsWith("ag-theme-") && e.classList.remove(s);
18054    if (i) {
18055      const s = e.className;
18056      e.className = s + (s ? " " : "") + i;
18057    }
18058  }
18059  refreshRowHeightVariable() {
18060    const { eGridDiv: e } = this, t = e.style.getPropertyValue("--ag-line-height").trim(), i = this.gos.get("rowHeight");
18061    if (i == null || isNaN(i) || !isFinite(i))
18062      return t !== null && e.style.setProperty("--ag-line-height", null), -1;
18063    const s = `${i}px`;
18064    return t != s ? (e.style.setProperty("--ag-line-height", s), i) : t != "" ? parseFloat(t) : -1;
18065  }
18066  addGlobalCSS(e, t) {
18067    this.gridTheme ? Si(e, this.eGridDiv, t) : this.globalCSS.push([e, t]);
18068  }
18069  getCSSVariablePixelValue(e) {
18070    const t = this.lastKnownValues.get(e);
18071    if (t != null)
18072      return t;
18073    const i = this.measureSizeEl(e);
18074    return i === "detached" || i === "no-styles" ? e.defaultValue : (this.lastKnownValues.set(e, i), i);
18075  }
18076  measureSizeEl(e) {
18077    const t = this.getSizeEl(e);
18078    if (t.offsetParent == null)
18079      return "detached";
18080    const i = t.offsetWidth;
18081    return i === Bo ? "no-styles" : (this.sizesMeasured = !0, i);
18082  }
18083  getMeasurementContainer() {
18084    let e = this.eMeasurementContainer;
18085    return e || (e = this.eMeasurementContainer = document.createElement("div"), e.className = "ag-measurement-container", this.eGridDiv.appendChild(e)), e;
18086  }
18087  getSizeEl(e) {
18088    let t = this.sizeEls.get(e);
18089    if (t)
18090      return t;
18091    const i = this.getMeasurementContainer();
18092    t = document.createElement("div");
18093    const { border: s } = e;
18094    s ? (t.className = "ag-measurement-element-border", t.style.setProperty(
18095      "--ag-internal-measurement-border",
18096      `var(${e.cssName}, solid ${Bo}px`
18097    )) : t.style.width = `var(${e.cssName}, ${Bo}px)`, i.appendChild(t), this.sizeEls.set(e, t);
18098    let o = this.measureSizeEl(e);
18099    o === "no-styles" && x(9, { variable: e });
18100    const n = Rt(this.beans, t, () => {
18101      const r = this.measureSizeEl(e);
18102      r === "detached" || r === "no-styles" || (this.lastKnownValues.set(e, r), r !== o && (o = r, this.fireGridStylesChangedEvent(e.changeKey)));
18103    });
18104    return this.addDestroyFunc(() => n()), t;
18105  }
18106  fireGridStylesChangedEvent(e) {
18107    e === "rowBorderWidthChanged" && this.refreshRowBorderWidthVariable(), this.eventSvc.dispatchEvent({
18108      type: "gridStylesChanged",
18109      [e]: !0
18110    });
18111  }
18112  refreshRowBorderWidthVariable() {
18113    const e = this.getCSSVariablePixelValue(Ho);
18114    this.eGridDiv.style.setProperty("--ag-internal-row-border-width", `${e}px`);
18115  }
18116  handleThemeGridOptionChange() {
18117    const { gos: e, eGridDiv: t, globalCSS: i, gridTheme: s } = this, o = e.get("theme");
18118    let n;
18119    if (o === "legacy")
18120      n = void 0;
18121    else {
18122      const r = o ?? oc;
18123      r instanceof Xd ? n = r : z(240, { theme: r });
18124    }
18125    if (n !== s) {
18126      if (n) {
18127        fw(this), Kd(t);
18128        for (const [a, l] of i)
18129          Si(a, t, l);
18130        i.length = 0;
18131      }
18132      this.gridTheme = n, n?._startUse({
18133        loadThemeGoogleFonts: e.get("loadThemeGoogleFonts"),
18134        container: t
18135      });
18136      let r = this.eParamsStyle;
18137      r || (r = this.eParamsStyle = document.createElement("style"), t.appendChild(r)), rr || (r.textContent = n?._getPerGridCss(this.paramsClass) || ""), this.applyThemeClasses(t), this.fireGridStylesChangedEvent("themeChanged");
18138    }
18139    n && getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded") && z(o ? 106 : 239);
18140  }
18141}, Bo = 15538, sS = class extends y {
18142  constructor() {
18143    super(...arguments), this.beanName = "eventSvc", this.globalEventService = new Fi();
18144  }
18145  postConstruct() {
18146    const { globalListener: e, globalSyncListener: t } = this.beans;
18147    e && this.addGlobalListener(e, !0), t && this.addGlobalListener(t, 
18147!1);
18148  }
18149  addEventListener(e, t, i) {
18150    this.globalEventService.addEventListener(e, t, i);
18151  }
18152  removeEventListener(e, t, i) {
18153    this.globalEventService.removeEventListener(e, t, i);
18154  }
18155  addGlobalListener(e, t = !1) {
18156    this.globalEventService.addGlobalListener(e, t);
18157  }
18158  removeGlobalListener(e, t = !1) {
18159    this.globalEventService.removeGlobalListener(e, t);
18160  }
18161  /** @deprecated DO NOT FIRE LOCAL EVENTS OFF THE EVENT SERVICE */
18162  dispatchLocalEvent() {
18163  }
18164  dispatchEvent(e) {
18165    this.globalEventService.dispatchEvent(this.gos.addGridCommonParams(e));
18166  }
18167  dispatchEventOnce(e) {
18168    this.globalEventService.dispatchEventOnce(this.gos.addGridCommonParams(e));
18169  }
18170};
18171function nc(e) {
18172  return e ? e.getLeafColumns().some((t) => t.isSpanHeaderHeight()) : !1;
18173}
18174function vn(e, t) {
18175  let i;
18176  if (ee(e) && nc(e) && e.isPadding()) {
18177    const s = e;
18178    i = s.getLeafColumns()[0];
18179    let o = i;
18180    for (; o !== s; )
18181      t++, o = o.getParent();
18182  }
18183  return {
18184    column: i || e,
18185    headerRowIndex: t
18186  };
18187}
18188var oS = class extends y {
18189  constructor() {
18190    super(...arguments), this.beanName = "headerNavigation", this.currentHeaderRowWithoutSpan = -1;
18191  }
18192  postConstruct() {
18193    const e = this.beans;
18194    e.ctrlsSvc.whenReady(this, (i) => {
18195      this.gridBodyCon = i.gridBodyCtrl;
18196    });
18197    const t = te(e);
18198    this.addManagedElementListeners(t, {
18199      mousedown: () => {
18200        this.currentHeaderRowWithoutSpan = -1;
18201      }
18202    });
18203  }
18204  getHeaderPositionForColumn(e, t) {
18205    let i;
18206    const { colModel: s, colGroupSvc: o, ctrlsSvc: n } = this.beans;
18207    if (typeof e == "string" ? (i = s.getCol(e), i || (i = o?.getColumnGroup(e) ?? null)) : i = e, !i)
18208      return null;
18209    const a = n.getHeaderRowContainerCtrl()?.getAllCtrls(), l = W(a || []).type === "filter", d = st(this.beans) - 1;
18210    let c = -1, u = i;
18211    for (; u; )
18212      c++, u = u.getParent();
18213    let h = c;
18214    return t && l && h === d - 1 && h++, h === -1 ? null : {
18215      headerRowIndex: h,
18216      column: i
18217    };
18218  }
18219  /*
18220   * This method navigates grid header vertically
18221   * @return {boolean} true to preventDefault on the event that caused this navigation.
18222   */
18223  navigateVertically(e, t, i) {
18224    const s = this.beans.focusSvc;
18225    if (t || (t = s.focusedHeader), !t)
18226      return !1;
18227    const { headerRowIndex: o } = t, n = t.column, r = st(this.beans), a = e === "UP", l = this.getHeaderRowType(o);
18228    let {
18229      headerRowIndex: d,
18230      column: c,
18231      headerRowIndexWithoutSpan: u
18232    } = a ? nS(l, n, o) : rS(l, n, o), h = !1;
18233    return d < 0 && (d = 0, c = n, h = !0), d >= r ? (d = -1, this.currentHeaderRowWithoutSpan = -1) : u !== void 0 && (this.currentHeaderRowWithoutSpan = u), !h && !c ? !1 : s.focusHeaderPosition({
18234      headerPosition: { headerRowIndex: d, column: c },
18235      allowUserOverride: !0,
18236      event: i
18237    });
18238  }
18239  /*
18240   * This method navigates grid header horizontally
18241   * @return {boolean} true to preventDefault on the event that caused this navigation.
18242   */
18243  navigateHorizontally(e, t = !1, i) {
18244    const { focusSvc: s, gos: o } = this.beans, n = s.focusedHeader;
18245    let r, a;
18246    if (this.currentHeaderRowWithoutSpan !== -1 ? n.headerRowIndex = this.currentHeaderRowWithoutSpan : this.currentHeaderRowWithoutSpan = n.headerRowIndex, e === "LEFT" !== o.get("enableRtl") ? (a = "Before", r = this.findHeader(n, a)) : (a = "After", r = this.findHeader(n, a)), r || !t)
18247      return s.focusHeaderPosition({
18248        headerPosition: r,
18249        direction: a,
18250        fromTab: t,
18251        allowUserOverride: !0,
18252        event: i
18253      });
18254    if (t) {
18255      const l = o.getCallback("tabToNextHeader");
18256      if (l)
18257        return s.focusHeaderPositionFromUserFunc({
18258          userFunc: l,
18259          headerPosition: r,
18260          direction: a
18261        });
18262    }
18263    return this.focusNextHeaderRow(n, a, i);
18264  }
18265  focusNextHeaderRow(e, t, i) {
18266    const s = e.headerRowIndex;
18267    let o = null, n;
18268    const r = this.beans;
18269    if (t === "Before" ? s > 0 && (n = s - 1, this.currentHeaderRowWithoutSpan -= 1, o = this.findColAtEdgeForHeaderRow(n, "end")) : (n = s + 1, this.currentHeaderRowWithoutSpan < st(r) ? this.currentHeaderRowWithoutSpan += 1 : this.currentHeaderRowWithoutSpan = -1, o = this.findColAtEdgeForHeaderRow(n, "start")), !o)
18270      return !1;
18271    const { column: a, headerRowIndex: l } = vn(
18272      o.column,
18273      o?.headerRowIndex
18274    );
18275    return r.focusSvc.focusHeaderPosition({
18276      headerPosition: { column: a, headerRowIndex: l },
18277      direction: t,
18278      fromTab: !0,
18279      allowUserOverride: !0,
18280      event: i
18281    });
18282  }
18283  scrollToColumn(e, t = "After") {
18284    if (e.getPinned())
18285      return;
18286    let i;
18287    if (ee(e)) {
18288      const s = e.getDisplayedLeafColumns();
18289      i = t === "Before" ? W(s) : s[0];
18290    } else
18291      i = e;
18292    this.gridBodyCon.scrollFeature.ensureColumnVisible(i);
18293  }
18294  findHeader(e, t) {
18295    let i, s;
18296    const { colGroupSvc: o, visibleCols: n } = this.beans;
18297    if (ee(e.column) ? i = o?.getGroupAtDirection(e.column, t) ?? void 0 : (s = `getCol${t}`, i = n[s](e.column)), !i)
18298      return;
18299    const { headerRowIndex: r } = e;
18300    if (this.getHeaderRowType(r) !== "filter") {
18301      const d = [i];
18302      for (; i.getParent(); )
18303        i = i.getParent(), d.push(i);
18304      i = d[Math.max(0, d.length - 1 - r)];
18305    }
18306    const { column: a, headerRowIndex: l } = vn(i, r);
18307    return {
18308      column: a,
18309      headerRowIndex: l
18310    };
18311  }
18312  getHeaderRowType(e) {
18313    const t = this.beans.ctrlsSvc.getHeaderRowContainerCtrl();
18314    if (t)
18315      return t.getRowType(e);
18316  }
18317  findColAtEdgeForHeaderRow(e, t) {
18318    const { visibleCols: i, ctrlsSvc: s, colGroupSvc: o } = this.beans, n = i.allCols, r = n[t === "start" ? 0 : n.length - 1];
18319    if (!r)
18320      return;
18321    const l = s.getHeaderRowContainerCtrl(r.getPinned())?.getRowType(e);
18322    if (l == "group") {
18323      const d = o?.getColGroupAtLevel(r, e);
18324      return {
18325        headerRowIndex: e,
18326        column: d
18327      };
18328    }
18329    return {
18330      // if type==null, means the header level didn't exist
18331      headerRowIndex: l == null ? -1 : e,
18332      column: r
18333    };
18334  }
18335};
18336function nS(e, t, i) {
18337  const s = e === "filter", o = e === "column";
18338  let n = s ? t : t.getParent(), r = i - 1, a = r;
18339  if (o && nc(t.getParent())) {
18340    for (; n && n.isPadding(); )
18341      n = n.getParent(), r--;
18342    a = r, r < 0 && (n = t, r = i, a = void 0);
18343  }
18344  return { column: n, headerRowIndex: r, headerRowIndexWithoutSpan: a };
18345}
18346function rS(e, t, i, s = "After") {
18347  let o = t, n = i + 1;
18348  const r = n;
18349  if (e === "group") {
18350    const a = t.getDisplayedLeafColumns(), l = s === "After" ? a[0] : W(a), d = [];
18351    let c = l;
18352    for (; c.getParent() !== t; )
18353      c = c.getParent(), d.push(c);
18354    if (o = l, l.isSpanHeaderHeight())
18355      for (let u = d.length - 1; u >= 0; u--) {
18356        const h = d[u];
18357        if (!h.isPadding()) {
18358          o = h;
18359          break;
18360        }
18361        n++;
18362      }
18363    else
18364      o = W(d), o || (o = l);
18365  }
18366  return { column: o, headerRowIndex: n, headerRowIndexWithoutSpan: r };
18367}
18368var aS = class extends y {
18369  constructor() {
18370    super(...arguments), this.beanName = "focusSvc";
18371  }
18372  wireBeans(e) {
18373    this.colModel = e.colModel, this.visibleCols = e.visibleCols, this.rowRenderer = e.rowRenderer, this.navigation = e.navigation, this.filterManager = e.filterManager, this.overlays = e.overlays;
18374  }
18375  postConstruct() {
18376    const e = this.clearFocusedCell.bind(this);
18377    this.addManagedEventListeners({
18378      columnPivotModeChanged: e,
18379      newColumnsLoaded: this.onColumnEverythingChanged.bind(this),
18380      columnGroupOpened: e,
18381      columnRowGroupChanged: e
18382    }), this.addDestroyFunc(Qp(this.beans));
18383  }
18384  onColumnEverythingChanged() {
18385    if (!this.focusedCell)
18386      return;
18387    const e = this.focusedCell.column, t = this.colModel.getCol(e.getId());
18388    e !== t && this.clearFocusedCell();
18389  }
18390  // we check if the browser is focusing something, and if it is, and
18391  // it's the cell we think is focused, then return the cell. so this
18392  // methods returns the cell if a) we think it has focus and b) the
18393  // browser thinks it has focus. this then returns nothing if we
18394  // first focus a cell, then second click outside the grid, as then the
18395  // grid cell will still be focused as far as the grid is concerned,
18396  // however the browser focus will have moved somewhere else.
18397  getFocusCellToUseAfterRefresh() {
18398    return this.gos.get("suppressFocusAfterRefresh") || !this.focusedCell || this.isDomDataMissingInHierarchy(Z(this.beans), ss) ? null : this.focusedCell;
18399  }
18400  getFocusHeaderToUseAfterRefresh() {
18401    return this.gos.get("suppressFocusAfterRefresh") || !this.focused
18401Header || this.isDomDataMissingInHierarchy(Z(this.beans), Id) ? null : this.focusedHeader;
18402  }
18403  isDomDataMissingInHierarchy(e, t) {
18404    let i = e;
18405    for (; i; ) {
18406      if (Os(this.gos, i, t))
18407        return !1;
18408      i = i.parentNode;
18409    }
18410    return !0;
18411  }
18412  getFocusedCell() {
18413    return this.focusedCell;
18414  }
18415  shouldRestoreFocus(e) {
18416    return this.isCellRestoreFocused(e) ? (setTimeout(() => {
18417      this.restoredFocusedCell = null;
18418    }, 0), !0) : !1;
18419  }
18420  clearRestoreFocus() {
18421    this.restoredFocusedCell = null, this.awaitRestoreFocusedCell = !1;
18422  }
18423  restoreFocusedCell(e, t) {
18424    this.awaitRestoreFocusedCell = !0, setTimeout(() => {
18425      this.awaitRestoreFocusedCell && (this.setRestoreFocusedCell(e), t());
18426    });
18427  }
18428  isCellRestoreFocused(e) {
18429    return this.restoredFocusedCell == null ? !1 : ln(e, this.restoredFocusedCell);
18430  }
18431  setRestoreFocusedCell(e) {
18432    this.beans.frameworkOverrides.renderingEngine === "react" && (this.restoredFocusedCell = e);
18433  }
18434  getFocusEventParams(e) {
18435    const { rowIndex: t, rowPinned: i, column: s } = e, o = {
18436      rowIndex: t,
18437      rowPinned: i,
18438      column: s,
18439      isFullWidthCell: !1
18440    }, n = this.rowRenderer.getRowByPosition({ rowIndex: t, rowPinned: i });
18441    return n && (o.isFullWidthCell = n.isFullWidth()), o;
18442  }
18443  clearFocusedCell() {
18444    if (this.restoredFocusedCell = null, this.focusedCell == null)
18445      return;
18446    const e = this.getFocusEventParams(this.focusedCell);
18447    this.focusedCell = null, this.eventSvc.dispatchEvent({
18448      type: "cellFocusCleared",
18449      ...e
18450    });
18451  }
18452  setFocusedCell(e) {
18453    const { column: t, rowIndex: i, rowPinned: s, forceBrowserFocus: o = !1, preventScrollOnBrowserFocus: n = !1 } = e, r = this.colModel.getCol(t);
18454    if (!r) {
18455      this.focusedCell = null;
18456      return;
18457    }
18458    this.focusedCell = {
18459      rowIndex: i,
18460      rowPinned: ot(s),
18461      column: r
18462    }, this.eventSvc.dispatchEvent({
18463      type: "cellFocused",
18464      ...this.getFocusEventParams(this.focusedCell),
18465      forceBrowserFocus: o,
18466      preventScrollOnBrowserFocus: n
18467    });
18468  }
18469  isCellFocused(e) {
18470    return this.focusedCell == null ? !1 : ln(e, this.focusedCell);
18471  }
18472  isRowNodeFocused(e) {
18473    return this.isRowFocused(e.rowIndex, e.rowPinned);
18474  }
18475  isHeaderWrapperFocused(e) {
18476    if (this.focusedHeader == null)
18477      return !1;
18478    const {
18479      column: t,
18480      rowCtrl: { rowIndex: i, pinned: s }
18481    } = e, { column: o, headerRowIndex: n } = this.focusedHeader;
18482    return t === o && i === n && s == o.getPinned();
18483  }
18484  focusHeaderPosition(e) {
18485    if (li(this.beans))
18486      return !1;
18487    const { direction: t, fromTab: i, allowUserOverride: s, event: o, fromCell: n, rowWithoutSpanValue: r } = e;
18488    let { headerPosition: a } = e;
18489    if (n && this.filterManager?.isAdvFilterHeaderActive())
18490      return this.focusAdvancedFilter(a);
18491    if (s) {
18492      const l = this.focusedHeader, d = st(this.beans);
18493      if (i) {
18494        const c = this.gos.getCallback("tabToNextHeader");
18495        c && (a = this.getHeaderPositionFromUserFunc({
18496          userFunc: c,
18497          direction: t,
18498          currentPosition: l,
18499          headerPosition: a,
18500          headerRowCount: d
18501        }));
18502      } else {
18503        const c = this.gos.getCallback("navigateToNextHeader");
18504        if (c && o) {
18505          const u = {
18506            key: o.key,
18507            previousHeaderPosition: l,
18508            nextHeaderPosition: a,
18509            headerRowCount: d,
18510            event: o
18511          };
18512          a = c(u);
18513        }
18514      }
18515    }
18516    return a ? this.focusProvidedHeaderPosition({
18517      headerPosition: a,
18518      direction: t,
18519      event: o,
18520      fromCell: n,
18521      rowWithoutSpanValue: r
18522    }) : !1;
18523  }
18524  focusHeaderPositionFromUserFunc(e) {
18525    if (li(this.beans))
18526      return !1;
18527    const { userFunc: t, headerPosition: i, direction: s, event: o } = e, n = this.focusedHeader, r = st(this.beans), a = this.getHeaderPositionFromUserFunc({
18528      userFunc: t,
18529      direction: s,
18530      currentPosition: n,
18531      headerPosition: i,
18532      headerRowCount: r
18533    });
18534    return !!a && this.focusProvidedHeaderPosition({
18535      headerPosition: a,
18536      direction: s,
18537      event: o
18538    });
18539  }
18540  getHeaderPositionFromUserFunc(e) {
18541    const { userFunc: t, direction: i, currentPosition: s, headerPosition: o, headerRowCount: n } = e, a = t({
18542      backwards: i === "Before",
18543      previousHeaderPosition: s,
18544      nextHeaderPosition: o,
18545      headerRowCount: n
18546    });
18547    return a === !0 ? s : a === !1 ? null : a;
18548  }
18549  focusProvidedHeaderPosition(e) {
18550    const { headerPosition: t, direction: i, fromCell: s, rowWithoutSpanValue: o, event: n } = e, { column: r, headerRowIndex: a } = t, { filterManager: l, ctrlsSvc: d, headerNavigation: c } = this.beans;
18551    if (a === -1)
18552      return l?.isAdvFilterHeaderActive() ? this.focusAdvancedFilter(t) : this.focusGridView(r);
18553    c?.scrollToColumn(r, i);
18554    const h = d.getHeaderRowContainerCtrl(r.getPinned())?.focusHeader(t.headerRowIndex, r, n) || !1;
18555    return c && h && (o != null || s) && (c.currentHeaderRowWithoutSpan = o ?? -1), h;
18556  }
18557  focusFirstHeader() {
18558    if (this.overlays?.isExclusive() && this.focusOverlay())
18559      return !0;
18560    let e = this.visibleCols.allCols[0];
18561    if (!e)
18562      return !1;
18563    const { colGroupSvc: t } = this.beans;
18564    t && e.getParent() && (e = t.getColGroupAtLevel(e, 0));
18565    const i = vn(e, 0);
18566    return this.focusHeaderPosition({
18567      headerPosition: i,
18568      rowWithoutSpanValue: 0
18569    });
18570  }
18571  focusLastHeader(e) {
18572    if (this.overlays?.isExclusive() && this.focusOverlay(!0))
18573      return !0;
18574    const t = st(this.beans) - 1, i = W(this.visibleCols.allCols);
18575    return this.focusHeaderPosition({
18576      headerPosition: { headerRowIndex: t, column: i },
18577      rowWithoutSpanValue: -1,
18578      event: e
18579    });
18580  }
18581  focusPreviousFromFirstCell(e) {
18582    return this.filterManager?.isAdvFilterHeaderActive() ? this.focusAdvancedFilter(null) : this.focusLastHeader(e);
18583  }
18584  isAnyCellFocused() {
18585    return !!this.focusedCell;
18586  }
18587  isRowFocused(e, t) {
18588    return this.focusedCell == null ? !1 : this.focusedCell.rowIndex === e && this.focusedCell.rowPinned === ot(t);
18589  }
18590  focusOverlay(e) {
18591    const t = this.overlays?.isVisible() && this.overlays.eWrapper?.getGui();
18592    return !!t && Ht(t, e);
18593  }
18594  focusGridView(e, t = !1, i = !0) {
18595    if (this.overlays?.isExclusive())
18596      return i && this.focusOverlay(t);
18597    if (hd(this.beans))
18598      return t && !li(this.beans) ? this.focusLastHeader() : i && this.focusOverlay(t) ? !0 : vi(this.beans, !1);
18599    const s = t ? Rf(this.beans) : yf(this.beans);
18600    if (s) {
18601      const { rowIndex: o, rowPinned: n } = s;
18602      if (e ?? (e = this.focusedHeader?.column), e && o !== void 0 && o !== null)
18603        return this.navigation?.ensureCellVisible({ rowIndex: o, column: e, rowPinned: n }), t && this.rowRenderer.getRowByPosition(s)?.isFullWidth() && this.navigation?.tryToFocusFullWidthRow(s, t) || (this.setFocusedCell({
18604          rowIndex: o,
18605          column: e,
18606          rowPinned: ot(n),
18607          forceBrowserFocus: !0
18608        }), this.beans.rangeSvc?.setRangeToCell({ rowIndex: o, rowPinned: n, column: e })), !0;
18609    }
18610    return !!(i && this.focusOverlay(t) || t && this.focusLastHeader());
18611  }
18612  focusAdvancedFilter(e) {
18613    return this.advFilterFocusColumn = e?.column, this.beans.advancedFilter?.getCtrl().focusHeaderComp() ?? !1;
18614  }
18615  focusNextFromAdvancedFilter(e, t) {
18616    const i = (t ? void 0 : this.advFilterFocusColumn) ?? this.visibleCols.allCols?.[0];
18617    return e ? this.focusHeaderPosition({
18618      headerPosition: {
18619        column: i,
18620        headerRowIndex: st(this.beans) - 1
18621      }
18622    }) : this.focusGridView(i);
18623  }
18624  clearAdvancedFilterColumn() {
18625    this.advFilterFocusColumn = void 0;
18626  }
18627}, lS = class extends y {
18628  constructor() {
18629    super(...arguments), this.beanName = "scrollVisibleSvc";
18630  }
18631  wireBeans(e) {
18632    this.ctrlsSvc = e.ctrlsSvc, this.colAnimation = e.colAnimation;
18633  }
18634  postConstruct() {
18635    this.getScrollbarWidth(), this.addManagedEventListeners({
18636      displayedColumnsChanged: this.updateScrollVisible.bind(this),
18637      displayedColumnsWidthChanged: this.updateScrollVisible.bind(this)
18638    });
18639  }
18640  updateScrollVisible() {
18641    const { colAnimation: e } = this;
18642    e?.isActive() ? e.executeLaterVMTurn(() => {
18643      e.executeLaterVMTurn(() => this.updateScrollVisibleImpl());
18644    }) : this.updateScrollVisibleImpl();
18645  }
18646  updateScrollVisibleImpl() {
18647    const e = this.ctrlsSvc.get("center");
18648    if (!e || this.colAnimation?.isActive())
18649      return;
18650    const t = {
18651      horizontalScrollShowing: e.isHorizontalScrollShowing(),
18652      verticalScrollShowing: this.verticalScrollShowing
18653    };
18654    this.setScrollsVisible(t), this.updateScrollGap();
18655  }
18656  updateScrollGap() {
18657    const e = this.ctrlsSvc.get("center"), t = e.hasHorizontalScrollGap(), i = e.hasVerticalScrollGap();
18658    (this.horizontalScrollGap !== t || this.verticalScrollGap !== i) && (this.horizontalScrollGap = t, this.verticalScrollGap = i, this.eventSvc.dispatchEvent({
18659      type: "scrollGapChanged"
18660    }));
18661  }
18662  setScrollsVisible(e) {
18663    (this.horizontalScrollShowing !== e.horizontalScrollShowing || this.verticalScrollShowing !== e.verticalScrollShowing) && (this.horizontalScrollShowing = e.horizontalScrollShowing, this.verticalScrollShowing = e.verticalScrollShowing, this.eventSvc.dispatchEvent({
18664      type: "scrollVisibilityChanged"
18665    }));
18666  }
18667  // the user might be using some non-standard scrollbar, eg a scrollbar that has zero
18668  // width and overlays (like the Safari scrollbar, but presented in Chrome). so we
18669  // allow the user to provide the scroll width before we work it out.
18670  getScrollbarWidth() {
18671    if (this.scrollbarWidth == null) {
18672      const e = this.gos.get("scrollbarWidth"), i = typeof e == "number" && e >= 0 ? e : Wh();
18673      i != null && (this.scrollbarWidth = i, this.eventSvc.dispatchEvent({
18674        type: "scrollbarWidthChanged"
18675      }));
18676    }
18677    return this.scrollbarWidth;
18678  }
18679}, dS = class extends y {
18680  constructor() {
18681    super(...arguments), this.beanName = "gridDestroySvc", this.destroyCalled = !1;
18682  }
18683  destroy() {
18684    if (this.destroyCalled)
18685      return;
18686    const { stateSvc: e, ctrlsSvc: t, context: i } = this.beans;
18687    this.eventSvc.dispatchEvent({
18688      type: "gridPreDestroyed",
18689      state: e?.getState() ?? {}
18690    }), this.destroyCalled = !0, t.get("gridCtrl")?.destroyGridUi(), i.destroy(), super.destroy();
18691  }
18692}, _i = /* @__PURE__ */ new Set(["gridPreDestroyed", "fillStart", "pasteStart"]), cS = {
18693  suppressContextMenu: !1,
18694  preventDefaultOnContextMenu: !1,
18695  allowContextMenuWithControlKey: !1,
18696  suppressMenuHide: !0,
18697  enableBrowserTooltips: !1,
18698  tooltipTrigger: "hover",
18699  tooltipShowDelay: 2e3,
18700  tooltipHideDelay: 1e4,
18701  tooltipMouseTrack: !1,
18702  tooltipShowMode: "standard",
18703  tooltipInteraction: !1,
18704  copyHeadersToClipboard: !1,
18705  copyGroupHeadersToClipboard: !1,
18706  clipboardDelimiter: "	",
18707  suppressCopyRowsToClipboard: !1,
18708  suppressCopySingleCellRanges: !1,
18709  suppressLastEmptyLineOnPaste: !1,
18710  suppressClipboardPaste: !1,
18711  suppressClipboardApi: !1,
18712  suppressCutToClipboard: !1,
18713  maintainColumnOrder: !1,
18714  enableStrictPivotColumnOrder: !1,
18715  suppressFieldDotNotation: !1,
18716  allowDragFromColumnsToolPanel: !1,
18717  suppressMovableColumns: !1,
18718  suppressColumnMoveAnimation: !1,
18719  suppressMoveWhenColumnDragging: !1,
18720  suppressDragLeaveHidesColumns: !1,
18721  suppressRowGroupHidesColumns: !1,
18722  suppressAutoSize: !1,
18723  autoSizePadding: 20,
18724  skipHeaderOnAutoSize: !1,
18725  singleClickEdit: !1,
18726  suppressClickEdit: !1,
18727  readOnlyEdit: !1,
18728  stopEditingWhenCellsLoseFocus: !1,
18729  enterNavigatesVertically: !1,
18730  enterNavigatesVerticallyAfterEdit: !1,
18731  enableCellEditingOnBackspace: !1,
18732  undoRedoCellEditing: !1,
18733  undoRedoCellEditingLimit: 10,
18734  suppressCsvExport: !1,
18735  suppressExcelExport: !1,
18736  cacheQuickFilter: !1,
18737  includeHiddenColumnsInQuickFilter: !1,
18738  excludeChildrenWhenTreeDataFiltering: !1,
18739  enableAdvancedFilter: !1,
18740  includeHiddenColumnsInAdvancedFilter: !1,
18741  enableCharts: !1,
18742  masterDetail: !1,
18743  keepDetailRows: !1,
18744  keepDetailRowsCount: 10,
18745  detailRowAutoHeight: !1,
18746  tabIndex: 0,
18747  rowBuffer: 10,
18748  valueCache: !1,
18749  valueCacheNeverExpires: !1,
18750  enableCellExpressions: !1,
18751  suppressTouch: !1,
18752  suppressFocusAfterRefresh: !1,
18753  suppressBrowserResizeObserver: !1,
18754  suppressPropertyNamesCheck: !1,
18755  suppressChangeDetection: !1,
18756  debug: !1,
18757  suppressLoadingOverlay: !1,
18758  suppressNoRowsOverlay: !1,
18759  pagination: !1,
18760  paginationPageSize: 100,
18761  paginationPageSizeSelector: !0,
18762  paginationAutoPageSize: !1,
18763  paginateChildRows: !1,
18764  suppressPaginationPanel: !1,
18765  pivotMode: !1,
18766  pivotPanelShow: "never",
18767  pivotDefaultExpanded: 0,
18768  pivotSuppressAutoColumn: !1,
18769  suppressExpandablePivotGroups: !1,
18770  functionsReadOnly: !1,
18771  suppressAggFuncInHeader: !1,
18772  alwaysAggregateAtRootLevel: !1,
18773  aggregateOnlyChangedColumns: !1,
18774  suppressAggFilteredOnly: !1,
18775  removePivotHeaderRowWhenSingleValueColumn: !1,
18776  animateRows: !0,
18777  cellFlashDuration: 500,
18778  cellFadeDuration: 1e3,
18779  allowShowChangeAfterFilter: !1,
18780  domLayout: "normal",
18781  ensureDomOrder: !1,
18782  enableRtl: !1,
18783  suppressColumnVirtualisation: !1,
18784  suppressMaxRenderedRowRestriction: !1,
18785  suppressRowVirtualisation: !1,
18786  rowDragManaged: !1,
18787  suppressRowDrag: !1,
18788  suppressMoveWhenRowDragging: !1,
18789  rowDragEntireRow: !1,
18790  rowDragMultiRow: !1,
18791  embedFullWidthRows: !1,
18792  groupDisplayType: "singleColumn",
18793  groupDefaultExpanded: 0,
18794  groupMaintainOrder: !1,
18795  groupSelectsChildren: !1,
18796  groupSuppressBlankHeader: !1,
18797  groupSelectsFiltered: !1,
18798  showOpenedGroup: !1,
18799  groupRemoveSingleChildren: !1,
18800  groupRemoveLowestSingleChildren: !1,
18801  groupHideOpenParents: !1,
18802  groupAllowUnbalanced: !1,
18803  rowGroupPanelShow: "never",
18804  suppressMakeColumnVisibleAfterUnGroup: !1,
18805  treeData: !1,
18806  rowGroupPanelSuppressSort: !1,
18807  suppressGroupRowsSticky: !1,
18808  rowModelType: "clientSide",
18809  asyncTransactionWaitMillis: 50,
18810  suppressModelUpdateAfterUpdateTransaction: !1,
18811  cacheOverflowSize: 1,
18812  infiniteInitialRowCount: 1,
18813  serverSideInitialRowCount: 1,
18814  cacheBlockSize: 100,
18815  maxBlocksInCache: -1,
18816  maxConcurrentDatasourceRequests: 2,
18817  blockLoadDebounceMillis: 0,
18818  purgeClosedRowNodes: !1,
18819  serverSideSortAllLevels: !1,
18820  serverSideOnlyRefreshFilteredGroups: !1,
18821  serverSidePivotResultFieldSeparator: "_",
18822  viewportRowModelPageSize: 5,
18823  viewportRowModelBufferSize: 5,
18824  alwaysShowHorizontalScroll: !1,
18825  alwaysShowVerticalScroll: !1,
18826  debounceVerticalScrollbar: !1,
18827  suppressHorizontalScroll: !1,
18828  suppressScrollOnNewData: !1,
18829  suppressScrollWhenPopupsAreOpen: !1,
18830  suppressAnimationFrame: !1,
18831  suppressMiddleClickScrolls: !1,
18832  suppressPreventDefaultOnMouseWheel: !1,
18833  rowMultiSelectWithClick: !1,
18834  suppressRowDeselection: !1,
18835  suppressRowClickSelection: !1,
18836  suppressCellFocus: !1,
18837  suppressHeaderFocus: !1,
18838  suppressMultiRangeSelection: !1,
18839  enableCellTextSelection: !1,
18840  enableRangeSelection: !1,
18841  enableRangeHandle: !1,
18842  enableFillHandle: !1,
18843  fillHandleDirection: "xy",
18844  suppressClearOnFillReduction: !1,
18845  accentedSort: !1,
18846  unSortIcon: !1,
18847  suppressMultiSort: !1,
18848  alwaysMultiSort: !1,
18849  suppressMaintainUnsortedOrder: !1,
18850  suppressRowHoverHighlight: !1,
18851  suppressRowTransform: !1,
18852  columnHoverHighlight: !1,
18853  deltaSort: !1,
18854  enableGroupEdit: !1,
18855  groupLockGroupColumns: 0,
18856  serverSideEnableClientSideSort: !1,
18857  suppressServerSideFullWidthLoadingRow: !1,
18858  pivotMaxGeneratedColumns: -1,
18859  columnMenu: "new",
18860  reactiveCustomComponents: !0,
18861  suppressSetFilterByDefault: !1
18862}, uS = 0, hS = 0, gS = class extends y {
18863  constructor() {
18864    super(...arguments), this.beanName = "gos", this.domDataKey = "__AG_" + Math.random().toString(), this.gridInstanceId = hS++, this.propEventSvc = new Fi(), this.globalEventHandlerFactory = (e) => (t, i) => {
18865      if (!this.isAlive())
18866        return;
18867      const s = _i.has(t);
18868      if (s && !e || !s && e)
18869        return;
18870      const o = zn(t), n = this.gridOptions[o];
18871      typeof n == "function" && this.beans.frameworkOverrides.wrapOutgoing(() => {
18872        n(i);
18873      });
18874    };
18875  }
18876  wireBeans(e) {
18877    this.gridOptions = e.gridOptions, this.validation = e.validation, this.api = e.gridApi, this.gridId = e.context.getGridId();
18878  }
18879  // This is quicker then having code call gridOptionsService.get('context')
18880  get gridOptionsContext() {
18881    return this.gridOptions.context;
18882  }
18883  postConstruct() {
18884    this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this), !0), this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this), !1), this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides), this.addManagedEventListeners({
18885      gridOptionsChanged: ({ options: e }) => {
18886        this.updateGridOptions({ options: e, force: !0, source: "gridOptionsUpdated" });
18887      }
18888    });
18889  }
18890  /**
18891   * Get the raw value of the GridOptions property provided.
18892   * @param property
18893   */
18894  get(e) {
18895    return this.gridOptions[e] ?? cS[e];
18896  }
18897  /**
18898   * Get the GridOption callback but wrapped so that the common params of api and context are automatically applied to the params.
18899   * @param property GridOption callback properties based on the fact that this property has a callback with params extending AgGridCommon
18900   */
18901  getCallback(e) {
18902    return this.mergeGridCommonParams(this.gridOptions[e]);
18903  }
18904  /**
18905   * Returns `true` if a value has been specified for this GridOption.
18906   * @param property GridOption property
18907   */
18908  exists(e) {
18909    return A(this.gridOptions[e]);
18910  }
18911  /**
18912   * Wrap the user callback and attach the api and context to the params object on the way through.
18913   * @param callback User provided callback
18914   * @returns Wrapped callback where the params object not require api and context
18915   */
18916  mergeGridCommonParams(e) {
18917    return e && ((i) => e(this.addGridCommonParams(i)));
18918  }
18919  updateGridOptions({
18920    options: e,
18921    force: t,
18922    source: i = "api"
18923  }) {
18924    const s = { id: uS++, properties: [] }, o = [], { gridOptions: n, validation: r } = this;
18925    Object.entries(e).forEach(([a, l]) => {
18926      r?.warnOnInitialPropertyUpdate(i, a);
18927      const d = t || typeof l == "object" && i === "api", c = n[a];
18928      if (d || c !== l) {
18929        n[a] = l;
18930        const u = {
18931          type: a,
18932          currentValue: l,
18933          previousValue: c,
18934          changeSet: s,
18935          source: i
18936        };
18937        o.push(u);
18938      }
18939    }), r?.processGridOptions(this.gridOptions), s.properties = o.map((a) => a.type), o.forEach((a) => {
18940      bt(this, `Updated property ${a.type} from`, a.previousValue, " to ", a.currentValue), this.propEventSvc.dispatchEvent(a);
18941    });
18942  }
18943  addPropertyEventListener(e, t) {
18944    this.propEventSvc.addEventListener(e, t);
18945  }
18946  removePropertyEventListener(e, t) {
18947    this.propEventSvc.removeEventListener(e, t);
18948  }
18949  getDomDataKey() {
18950    return this.domDataKey;
18951  }
18952  getGridCommonParams() {
18953    return {
18954      api: this.api,
18955      context: this.gridOptionsContext
18956    };
18957  }
18958  addGridCommonParams(e) {
18959    const t = e;
18960    return t.api = this.api, t.context = this.gridOptionsContext, t;
18961  }
18962  assertModuleRegistered(e, t) {
18963    const i = Array.isArray(e) ? e.some((s) => this.isModuleRegistered(s)) : this.isModuleRegistered(e);
18964    return i || z(200, {
18965      ...this.getModuleErrorParams(),
18966      moduleName: e,
18967      reasonOrId: t
18968    }), i;
18969  }
18970  getModuleErrorParams() {
18971    return {
18972      gridId: this.gridId,
18973      gridScoped: Kn(),
18974      rowModelType: this.get("rowModelType")
18975    };
18976  }
18977  isModuleRegistered(e) {
18978    return ad(e, this.gridId, this.get("rowModelType"));
18979  }
18980};
18981function pS(e) {
18982  return (
18983    /* html */
18984    `<div class="ag-cell-label-container" role="presentation">
18985        <span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
18986        <span data-ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>
18987        <div data-ref="eLabel" class="ag-header-cell-label" role="presentation">
18988            <span data-ref="eText" class="ag-header-cell-text"></span>
18989            <span data-ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
18990            ${e ? '<ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>' : ""}
18991        </div>
18992    </div>`
18993  );
18994}
18995var fS = class extends _ {
18996  constructor() {
18997    super(...arguments), this.eFilter = M, this.eFilterButton = M, this.eSortIndicator = M, this.eMenu = M, this.eLabel = M, this.eText = M, this.eSortOrder = M, this.eSortAsc = M, this.eSortDesc = M, this.eSortMixed = M, this.eSortNone = M, this.isLoadingInnerComponent = !1;
18998  }
18999  refresh(e) {
19000    const t = this.params;
19001    return this.params = e, this.workOutTemplate() != this.currentTemplate || this.workOutShowMenu() != this.currentShowMenu || e.enableSorting != this.currentSort || this.currentSuppressMenuHide != null && this.shouldSuppressMenuHide() != this.currentSuppressMenuHide || t.enableFilterButton != e.enableFilterButton || t.enableFilterIcon != e.enableFilterIcon ? !1 : (this.setDisplayName(e), !0);
19002  }
19003  workOutTemplate() {
19004    const { params: e, beans: t } = this, i = e.template ?? pS(!!t.sortSvc);
19005    return i?.trim ? i.trim() : i;
19006  }
19007  init(e) {
19008    this.params = e;
19009    const { sortSvc: t, touchSvc: i, userCompFactory: s } = this.beans;
19010    this.currentTemplate = this.workOutTemplate(), this.setTemplate(this.currentTemplate, t ? [t.getSortIndicatorSelector()] : void 0), i?.setupForHeader(this), this.setMenu(), this.setupSort(), this.setupFilterIcon(), this.setupFilterButton(), this.workOutInnerHeaderComponent(s, e), this.setDisplayName(e);
19011  }
19012  workOutInnerHeaderComponent(e, t) {
19013    const i = wp(e, t, t);
19014    i && (this.isLoadingInnerComponent = !0, i.newAgStackInstance().then((s) => {
19015      this.isLoadingInnerComponent = !1, s && (this.isAlive() ? (this.innerHeaderComponent = s, this.eText.appendChild(s.getGui())) : this.destroyBean(s));
19016    }));
19017  }
19018  setDisplayName(e) {
19019    const { displayName: t } = e, i = this.currentDisplayName;
19020    if (this.currentDisplayName = t, i === t || this.innerHeaderComponent || this.isLoadingInnerComponent)
19021      return;
19022    const s = Ze(t, !0);
19023    this.eText.textContent = s;
19024  }
19025  addInIcon(e, t, i) {
19026    if (t == null)
19027      return;
19028    const s = Te(e, this.beans, i);
19029    s && t.appendChild(s);
19030  }
19031  workOutShowMenu() {
19032    return this.params.enableMenu && !!this.beans.menuSvc?.isHeaderMenuButtonEnabled();
19033  }
19034  shouldSuppressMenuHide() {
19035    return !!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled();
19036  }
19037  setMenu() {
19038    if (!this.eMenu)
19039      return;
19040    if (this.currentShowMenu = this.workOutShowMenu(), !this.currentShowMenu) {
19041      qe(this.eMenu), this.eMenu = void 0;
19042      return;
19043    }
19044    const { gos: e, eMenu: t, params: i } = this, s = Pe(e);
19045    this.addInIcon(s ? "menu" : "menuAlt", t, i.column), t.classList.toggle("ag-header-menu-icon", !s);
19046    const o = this.shouldSuppressMenuHide();
19047    this.currentSuppressMenuHide = o, this.addManagedElementListeners(t, { click: () => i.showColumnMenu(t) }), t.classList.toggle("ag-header-menu-always-show", o);
19048  }
19049  onMenuKeyboardShortcut(e) {
19050    const { params: t, gos: i, beans: s, eMenu: o, eFilterButton: n } = this, r = t.column, a = Pe(i);
19051    if (e && !a) {
19052      if (s.menuSvc?.isFilterMenuInHeaderEnabled(r))
19053        return t.showFilter(n ?? o ?? this.getGui()), !0;
19054    } else if (t.enableMenu)
19055      return t.showColumnMenu(o ?? n ?? this.getGui()), !0;
19056    return !1;
19057  }
19058  setupSort() {
19059    const { sortSvc: e } = this.beans;
19060    if (!e)
19061      return;
19062    const { enableSorting: t, column: i } = this.params;
19063    if (this.currentSort = t, !this.eSortIndicator) {
19064      this.eSortIndicator = this.createBean(e.createSortIndicator(!0));
19065      const { eSortIndicator: s, eSortOrder: o, eSortAsc: n, eSortDe
19065sc: r, eSortMixed: a, eSortNone: l } = this;
19066      s.attachCustomElements(o, n, r, a, l);
19067    }
19068    this.eSortIndicator.setupSort(i), this.currentSort && e.setupHeader(this, i, this.eLabel);
19069  }
19070  setupFilterIcon() {
19071    const { eFilter: e, params: t } = this;
19072    e && this.configureFilter(t.enableFilterIcon, e, this.onFilterChangedIcon.bind(this), "filterActive");
19073  }
19074  setupFilterButton() {
19075    const { eFilterButton: e, params: t } = this;
19076    if (!e)
19077      return;
19078    this.configureFilter(
19079      t.enableFilterButton,
19080      e,
19081      this.onFilterChangedButton.bind(this),
19082      "filter"
19083    ) ? this.addManagedElementListeners(e, {
19084      click: () => t.showFilter(e)
19085    }) : this.eFilterButton = void 0;
19086  }
19087  configureFilter(e, t, i, s) {
19088    if (!e)
19089      return qe(t), !1;
19090    const o = this.params.column;
19091    return this.addInIcon(s, t, o), this.addManagedListeners(o, { filterChanged: i }), i(), !0;
19092  }
19093  onFilterChangedIcon() {
19094    const e = this.params.column.isFilterActive();
19095    Q(this.eFilter, e, { skipAriaHidden: !0 });
19096  }
19097  onFilterChangedButton() {
19098    const e = this.params.column.isFilterActive();
19099    this.eFilterButton.classList.toggle("ag-filter-active", e);
19100  }
19101  getAnchorElementForMenu(e) {
19102    const { eFilterButton: t, eMenu: i } = this;
19103    return e ? t ?? i ?? this.getGui() : i ?? t ?? this.getGui();
19104  }
19105  destroy() {
19106    super.destroy(), this.innerHeaderComponent && (this.destroyBean(this.innerHeaderComponent), this.innerHeaderComponent = void 0);
19107  }
19108}, mS = class extends _ {
19109  constructor() {
19110    super(
19111      /* html */
19112      `<div class="ag-header-group-cell-label" role="presentation">
19113            <span data-ref="agLabel" class="ag-header-group-text" role="presentation"></span>
19114            <span data-ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
19115            <span data-ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
19116        </div>`
19117    ), this.agOpened = M, this.agClosed = M, this.agLabel = M, this.isLoadingInnerComponent = !1;
19118  }
19119  init(e) {
19120    const { userCompFactory: t } = this.beans;
19121    this.params = e, this.checkWarnings(), this.workOutInnerHeaderGroupComponent(t, e), this.setupLabel(e), this.addGroupExpandIcon(e), this.setupExpandIcons();
19122  }
19123  checkWarnings() {
19124    this.params.template && x(89);
19125  }
19126  workOutInnerHeaderGroupComponent(e, t) {
19127    const i = bp(e, t, t);
19128    i && (this.isLoadingInnerComponent = !0, i.newAgStackInstance().then((s) => {
19129      this.isLoadingInnerComponent = !1, s && (this.isAlive() ? (this.innerHeaderGroupComponent = s, this.agLabel.appendChild(s.getGui())) : this.destroyBean(s));
19130    }));
19131  }
19132  setupExpandIcons() {
19133    const {
19134      agOpened: e,
19135      agClosed: t,
19136      params: { columnGroup: i },
19137      beans: s
19138    } = this;
19139    this.addInIcon("columnGroupOpened", e), this.addInIcon("columnGroupClosed", t);
19140    const o = (l) => {
19141      if (nt(l))
19142        return;
19143      const d = !i.isExpanded();
19144      s.colGroupSvc.setColumnGroupOpened(
19145        i.getProvidedColumnGroup(),
19146        d,
19147        "uiColumnExpanded"
19148      );
19149    };
19150    this.addTouchAndClickListeners(s, t, o), this.addTouchAndClickListeners(s, e, o);
19151    const n = (l) => {
19152      mi(l);
19153    };
19154    this.addManagedElementListeners(t, { dblclick: n }), this.addManagedElementListeners(e, { dblclick: n }), this.addManagedElementListeners(this.getGui(), { dblclick: o }), this.updateIconVisibility();
19155    const r = i.getProvidedColumnGroup(), a = this.updateIconVisibility.bind(this);
19156    this.addManagedListeners(r, {
19157      expandedChanged: a,
19158      expandableChanged: a
19159    });
19160  }
19161  addTouchAndClickListeners(e, t, i) {
19162    e.touchSvc?.setupForHeaderGroup(this, t, i), this.addManagedElementListeners(t, { click: i });
19163  }
19164  updateIconVisibility() {
19165    const {
19166      agOpened: e,
19167      agClosed: t,
19168      params: { columnGroup: i }
19169    } = this;
19170    if (i.isExpandable()) {
19171      const s = i.isExpanded();
19172      Q(e, s), Q(t, !s);
19173    } else
19174      Q(e, !1), Q(t, !1);
19175  }
19176  addInIcon(e, t) {
19177    const i = Te(e, this.beans, null);
19178    i && t.appendChild(i);
19179  }
19180  addGroupExpandIcon(e) {
19181    if (!e.columnGroup.isExpandable()) {
19182      const { agOpened: t, agClosed: i } = this;
19183      Q(t, !1), Q(i, !1);
19184      return;
19185    }
19186  }
19187  setupLabel(e) {
19188    const { displayName: t, columnGroup: i } = e, s = this.innerHeaderGroupComponent || this.isLoadingInnerComponent;
19189    if (A(t) && !s) {
19190      const o = Ze(t, !0);
19191      this.agLabel.textContent = o;
19192    }
19193    this.addOrRemoveCssClass("ag-sticky-label", !i.getColGroupDef()?.suppressStickyLabel);
19194  }
19195  destroy() {
19196    super.destroy(), this.innerHeaderGroupComponent && (this.destroyBean(this.innerHeaderGroupComponent), this.innerHeaderGroupComponent = void 0);
19197  }
19198}, CS = {
19199  moduleName: "ColumnHeaderComp",
19200  version: I,
19201  userComponents: {
19202    agColumnHeader: fS
19203  },
19204  icons: {
19205    // button to launch legacy column menu
19206    menu: "menu",
19207    // button to launch new enterprise column menu
19208    menuAlt: "menu-alt"
19209  }
19210}, vS = {
19211  moduleName: "ColumnGroupHeaderComp",
19212  version: I,
19213  userComponents: {
19214    agColumnGroupHeader: mS
19215  },
19216  icons: {
19217    // header column group shown when expanded (click to contract)
19218    columnGroupOpened: "expanded",
19219    // header column group shown when contracted (click to expand)
19220    columnGroupClosed: "contracted"
19221  }
19222}, wS = {
19223  moduleName: "AnimationFrame",
19224  version: I,
19225  beans: [jp]
19226}, SS = class extends y {
19227  constructor() {
19228    super(...arguments), this.beanName = "touchSvc";
19229  }
19230  mockBodyContextMenu(e, t) {
19231    this.mockContextMenu(e, e.eBodyViewport, t);
19232  }
19233  mockHeaderContextMenu(e, t) {
19234    this.mockContextMenu(e, e.eGui, t);
19235  }
19236  mockRowContextMenu(e) {
19237    if (!Tt())
19238      return;
19239    const t = (i, s, o) => {
19240      const { rowCtrl: n, cellCtrl: r }
19240 = e.getControlsForEventTarget(o?.target ?? null);
19241      r?.column && r.dispatchCellContextMenuEvent(o ?? null), this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0, o, n, r);
19242    };
19243    this.mockContextMenu(e, e.element, t);
19244  }
19245  handleCellDoubleClick(e, t) {
19246    return (() => {
19247      if (!Tt() || Nl("dblclick"))
19248        return !1;
19249      const s = (/* @__PURE__ */ new Date()).getTime(), o = s - e.lastIPadMouseClickEvent < 200;
19250      return e.lastIPadMouseClickEvent = s, o;
19251    })() ? (e.onCellDoubleClicked(t), t.preventDefault(), !0) : !1;
19252  }
19253  setupForHeader(e) {
19254    const { gos: t, sortSvc: i } = this.beans;
19255    if (t.get("suppressTouch"))
19256      return;
19257    const { params: s, eMenu: o, eFilterButton: n } = e, r = new Zt(e.getGui(), !0), a = e.shouldSuppressMenuHide(), l = a && A(o), d = l ? new Zt(o, !0) : r;
19258    if (s.enableMenu) {
19259      const c = l ? "tap" : "longTap", u = (h) => s.showColumnMenuAfterMouseClick(h.touchStart);
19260      e.addManagedListeners(d, { [c]: u });
19261    }
19262    if (s.enableSorting) {
19263      const c = (u) => {
19264        const h = u.touchStart.target;
19265        a && (o?.contains(h) || n?.contains(h)) || i?.progressSort(s.column, !1, "uiColumnSorted");
19266      };
19267      e.addManagedListeners(r, { tap: c });
19268    }
19269    if (s.enableFilterButton && n) {
19270      const c = new Zt(n, !0);
19271      e.addManagedListeners(c, {
19272        tap: () => s.showFilter(n)
19273      }), e.addDestroyFunc(() => c.destroy());
19274    }
19275    e.addDestroyFunc(() => r.destroy()), l && e.addDestroyFunc(() => d.destroy());
19276  }
19277  setupForHeaderGroup(e, t, i) {
19278    const s = new Zt(t, !0);
19279    e.addManagedListeners(s, { tap: i }), e.addDestroyFunc(() => s.destroy());
19280  }
19281  mockContextMenu(e, t, i) {
19282    if (!Tt())
19283      return;
19284    const s = new Zt(t), o = (n) => {
19285      i(void 0, n.touchStart, n.touchEvent);
19286    };
19287    e.addManagedListeners(s, { longTap: o }), e.addDestroyFunc(() => s.destroy());
19288  }
19289}, bS = {
19290  moduleName: "Touch",
19291  version: I,
19292  beans: [SS]
19293}, yS = class extends y {
19294  constructor() {
19295    super(...arguments), this.beanName = "cellNavigation";
19296  }
19297  // returns null if no cell to focus on, ie at the end of the grid
19298  getNextCellToFocus(e, t, i = !1) {
19299    return i ? this.getNextCellToFocusWithCtrlPressed(e, t) : this.getNextCellToFocusWithoutCtrlPressed(e, t);
19300  }
19301  getNextCellToFocusWithCtrlPressed(e, t) {
19302    const i = e === b.UP, s = e === b.DOWN, o = e === b.LEFT;
19303    let n, r;
19304    const { pageBounds: a, gos: l, visibleCols: d } = this.beans;
19305    if (i || s)
19306      r = i ? a.getFirstRow() : a.getLastRow(), n = t.column;
19307    else {
19308      const c = d.allCols, u = l.get("enableRtl");
19309      r = t.rowIndex, n = o !== u ? c[0] : W(c);
19310    }
19311    return {
19312      rowIndex: r,
19313      rowPinned: null,
19314      column: n
19315    };
19316  }
19317  getNextCellToFocusWithoutCtrlPressed(e, t) {
19318    let i = t, s = !1;
19319    for (; !s; ) {
19320      switch (e) {
19321        case b.UP:
19322          i = this.getCellAbove(i);
19323          break;
19324        case b.DOWN:
19325          i = this.getCellBelow(i);
19326          break;
19327        case b.RIGHT:
19328          i = this.gos.get("enableRtl") ? this.getCellToLeft(i) : this.getCellToRight(i);
19329          break;
19330        case b.LEFT:
19331          i = this.gos.get("enableRtl") ? this.getCellToRight(i) : this.getCellToLeft(i);
19332          break;
19333        default:
19334          i = null, x(8, { key: e });
19335          break;
19336      }
19337      i ? s = this.isCellGoodToFocusOn(i) : s = !0;
19338    }
19339    return i;
19340  }
19341  isCellGoodToFocusOn(e) {
19342    const t = e.column;
19343    let i;
19344    const { pinnedRowModel: s, rowModel: o } = this.beans;
19345    switch (e.rowPinned) {
19346      case "top":
19347        i = s?.getPinnedTopRow(e.rowIndex);
19348        break;
19349      case "bottom":
19350        i = s?.getPinnedBottomRow(e.rowIndex);
19351        break;
19352      default:
19353        i = o.getRow(e.rowIndex);
19354        break;
19355    }
19356    return i ? !this.isSuppressNavigable(t, i) : !1;
19357  }
19358  getCellToLeft(e) {
19359    if (!e)
19360      return null;
19361    const t = this.beans.visibleCols.getColBefore(e.column);
19362    return t ? {
19363      rowIndex: e.rowIndex,
19364      column: t,
19365      rowPinned: e.rowPinned
19366    } : null;
19367  }
19368  getCellToRight(e) {
19369    if (!e)
19370      return null;
19371    const t = this.beans.visibleCols.getColAfter(e.column);
19372    return t ? {
19373      rowIndex: e.rowIndex,
19374      column: t,
19375      rowPinned: e.rowPinned
19376    } : null;
19377  }
19378  getRowBelow(e) {
19379    const t = e.rowIndex, i = e.rowPinned;
19380    let s = !1;
19381    const { pageBounds: o, pinnedRowModel: n, rowModel: r }
19381 = this.beans;
19382    if (this.isLastRowInContainer(e))
19383      switch (i) {
19384        case "bottom":
19385          return null;
19386        case "top":
19387          return r.isRowsToRender() ? { rowIndex: o.getFirstRow(), rowPinned: null } : n?.isRowsToRender("bottom") ? { rowIndex: 0, rowPinned: "bottom" } : null;
19388        default:
19389          return n?.isRowsToRender("bottom") ? { rowIndex: 0, rowPinned: "bottom" } : null;
19390      }
19391    else i && (s = !0);
19392    const a = r.getRow(e.rowIndex), l = s ? void 0 : this.getNextStickyPosition(a);
19393    return l || { rowIndex: t + 1, rowPinned: i };
19394  }
19395  getNextStickyPosition(e, t) {
19396    const { gos: i, rowRenderer: s } = this.beans;
19397    if (!Ol(i) || !e || !e.sticky)
19398      return;
19399    const o = s.getStickyTopRowCtrls().some((d) => d.rowNode.rowIndex === e.rowIndex);
19400    let n = [];
19401    o ? n = [...s.getStickyTopRowCtrls()].sort(
19402      (d, c) => d.rowNode.rowIndex - c.rowNode.rowIndex
19403    ) : n = [...s.getStickyBottomRowCtrls()].sort(
19404      (d, c) => c.rowNode.rowIndex - d.rowNode.rowIndex
19405    );
19406    const r = t ? -1 : 1, a = n.findIndex((d) => d.rowNode.rowIndex === e.rowIndex), l = n[a + r];
19407    if (l)
19408      return { rowIndex: l.rowNode.rowIndex, rowPinned: null };
19409  }
19410  getCellBelow(e) {
19411    if (!e)
19412      return null;
19413    const t = this.getRowBelow(e);
19414    return t ? {
19415      rowIndex: t.rowIndex,
19416      column: e.column,
19417      rowPinned: t.rowPinned
19418    } : null;
19419  }
19420  isLastRowInContainer(e) {
19421    const t = e.rowPinned, i = e.rowIndex, { pinnedRowModel: s, pageBounds: o } = this.beans;
19422    return t === "top" ? (s?.getPinnedTopRowCount() ?? -1) <= i : t === "bottom" ? (s?.getPinnedBottomRowCount() ?? -1) <= i : o.getLastRow() <= i;
19423  }
19424  getRowAbove(e) {
19425    const t = e.rowIndex, i = e.rowPinned, { pageBounds: s, pinnedRowModel: o, rowModel: n } = this.beans, r = i ? t === 0 : t === s.getFirstRow();
19426    let a = !1;
19427    const l = () => ({ rowIndex: o?.getPinnedTopRowCount() ?? -1, rowPinned: "top" });
19428    if (r)
19429      return i === "top" ? null : i && n.isRowsToRender() ? { rowIndex: s.getLastRow(), rowPinned: null } : o?.isRowsToRender("top") ? l() : null;
19430    i && (a = !0);
19431    const d = n.getRow(e.rowIndex), c = a ? void 0 : this.getNextStickyPosition(d, !0);
19432    return c || { rowIndex: t - 1, rowPinned: i };
19433  }
19434  getCellAbove(e) {
19435    if (!e)
19436      return null;
19437    const t = this.getRowAbove({ rowIndex: e.rowIndex, rowPinned: e.rowPinned });
19438    return t ? {
19439      rowIndex: t.rowIndex,
19440      column: e.column,
19441      rowPinned: t.rowPinned
19442    } : null;
19443  }
19444  getNextTabbedCell(e, t) {
19445    return t ? this.getNextTabbedCellBackwards(e) : this.getNextTabbedCellForwards(e);
19446  }
19447  getNextTabbedCellForwards(e) {
19448    const { visibleCols: t, pagination: i } = this.beans, s = t.allCols;
19449    let o = e.rowIndex, n = e.rowPinned, r = t.getColAfter(e.column);
19450    if (!r) {
19451      r = s[0];
19452      const a = this.getRowBelow(e);
19453      if (Y(a) || !a.rowPinned && !(i?.isRowInPage(a) ?? !0))
19454        return null;
19455      o = a ? a.rowIndex : null, n = a ? a.rowPinned : null;
19456    }
19457    return { rowIndex: o, column: r, rowPinned: n };
19458  }
19459  getNextTabbedCellBackwards(e) {
19460    const { visibleCols: t, pagination: i } = this.beans, s = t.allCols;
19461    let o = e.rowIndex, n = e.rowPinned, r = t.getColBefore(e.column);
19462    if (!r) {
19463      r = W(s);
19464      const a = this.getRowAbove({ rowIndex: e.rowIndex, rowPinned: e.rowPinned });
19465      if (Y(a) || !a.rowPinned && !(i?.isRowInPage(a) ?? !0))
19466        return null;
19467      o = a ? a.rowIndex : null, n = a ? a.rowPinned : null;
19468    }
19469    return { rowIndex: o, column: r, rowPinned: n };
19470  }
19471  isSuppressNavigable(e, t) {
19472    const { suppressNavigable: i } = e.colDef;
19473    if (typeof i == "boolean")
19474      return i;
19475    if (typeof i == "function") {
19476      const s = e.createColumnFunctionCallbackParams(t);
19477      return i(s);
19478    }
19479    return !1;
19480  }
19481};
19482function RS(e) {
19483  return e.focusSvc.getFocusedCell();
19484}
19485function FS(e) {
19486  return e.focusSvc.clearFocusedCell();
19487}
19488function xS(e, t, i, s) {
19489  e.focusSvc.setFocusedCell({ rowIndex: t, column: i, rowPinned: s, forceBrowserFocus: !0 });
19490}
19491function PS(e, t) {
19492  return e.navigation?.tabToNextCell(!1, t) ?? !1;
19493}
19494function ES(e, t) {
19495  return e.navigation?.tabToNextCell(!0, t) ?? !1;
19496}
19497function DS(e, t, i = !1) {
19498  const s = e.headerNavigation?.getHeaderPositionForColumn(t, i);
19499  s && e.focusSvc.focusHeaderPosition({ headerPosition: s });
19500}
19501var AS = class extends y {
19502  constructor() {
19503    super(), this.beanName = "navigation", this.onPageDown = Qr(this.onPageDown, 100), this.onPageUp = Qr(this.onPageUp, 100);
19504  }
19505  postConstruct() {
19506    this.beans.ctrlsSvc.whenReady(this, (e) => {
19507      this.gridBodyCon = e.gridBodyCtrl;
19508    });
19509  }
19510  handlePageScrollingKey(e, t = !1) {
19511    const i = e.key, s = e.altKey, o = e.ctrlKey || e.metaKey, n = !!this.beans.rangeSvc && e.shiftKey, r = mf(this.gos, e);
19512    let a = !1;
19513    switch (i) {
19514      case b.PAGE_HOME:
19515      case b.PAGE_END:
19516        !o && !s && (this.onHomeOrEndKey(i), a = !0);
19517        break;
19518      case b.LEFT:
19519      case b.RIGHT:
19520      case b.UP:
19521      case b.DOWN:
19522        if (!r)
19523          return !1;
19524        o && !s && !n && (this.onCtrlUpDownLeftRight(i, r), a = !0);
19525        break;
19526      case b.PAGE_DOWN:
19527      case b.PAGE_UP:
19528        !o && !s && (a = this.handlePageUpDown(i, r, t));
19529        break;
19530    }
19531    return a && e.preventDefault(), a;
19532  }
19533  handlePageUpDown(e, t, i) {
19534    return i && (t = this.beans.focusSvc.getFocusedCell()), t ? (e === b.PAGE_UP ? this.onPageUp(t) : this.onPageDown(t), !0) : !1;
19535  }
19536  navigateTo(e) {
19537    const { scrollIndex: t, scrollType: i, scrollColumn: s, focusIndex: o, focusColumn: n } = e, { scrollFeature: r }
19537 = this.gridBodyCon;
19538    A(s) && !s.isPinned() && r.ensureColumnVisible(s), A(t) && r.ensureIndexVisible(t, i), e.isAsync || r.ensureIndexVisible(o);
19539    const { focusSvc: a, rangeSvc: l } = this.beans;
19540    a.setFocusedCell({
19541      rowIndex: o,
19542      column: n,
19543      rowPinned: null,
19544      forceBrowserFocus: !0
19545    }), l?.setRangeToCell({ rowIndex: o, rowPinned: null, column: n });
19546  }
19547  // this method is throttled, see the `constructor`
19548  onPageDown(e) {
19549    const t = this.beans, i = No(t), s = this.getViewportHeight(), { pageBounds: o, rowModel: n, rowAutoHeight: r } = t, a = o.getPixelOffset(), l = i.top + s, d = n.getRowIndexAtPixel(l + a);
19550    r?.active ? this.navigateToNextPageWithAutoHeight(e, d) : this.navigateToNextPage(e, d);
19551  }
19552  // this method is throttled, see the `constructor`
19553  onPageUp(e) {
19554    const t = this.beans, i = No(t), { pageBounds: s, rowModel: o, rowAutoHeight: n } = t, r = s.getPixelOffset(), a = i.top, l = o.getRowIndexAtPixel(a + r);
19555    n?.active ? this.navigateToNextPageWithAutoHeight(e, l, !0) : this.navigateToNextPage(e, l, !0);
19556  }
19557  navigateToNextPage(e, t, i = !1) {
19558    const { pageBounds: s, rowModel: o } = this.beans, n = this.getViewportHeight(), r = s.getFirstRow(), a = s.getLastRow(), l = s.getPixelOffset(), d = o.getRow(e.rowIndex), c = i ? (
19559      // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
19560      d?.rowHeight - n - l
19561    ) : n - l, u = d?.rowTop + c;
19562    let h = o.getRowIndexAtPixel(u + l);
19563    if (h === e.rowIndex) {
19564      const p = i ? -1 : 1;
19565      t = h = e.rowIndex + p;
19566    }
19567    let g;
19568    i ? (g = "bottom", h < r && (h = r), t < r && (t = r)) : (g = "top", h > a && (h = a), t > a && (t = a)), this.isRowTallerThanView(o.getRow(h)) && (t = h, g = "top"), this.navigateTo({
19569      scrollIndex: t,
19570      scrollType: g,
19571      scrollColumn: null,
19572      focusIndex: h,
19573      focusColumn: e.column
19574    });
19575  }
19576  navigateToNextPageWithAutoHeight(e, t, i = !1) {
19577    this.navigateTo({
19578      scrollIndex: t,
19579      scrollType: i ? "bottom" : "top",
19580      scrollColumn: null,
19581      focusIndex: t,
19582      focusColumn: e.column
19583    }), setTimeout(() => {
19584      const s = this.getNextFocusIndexForAutoHeight(e, i);
19585      this.navigateTo({
19586        scrollIndex: t,
19587        scrollType: i ? "bottom" : "top",
19588        scrollColumn: null,
19589        focusIndex: s,
19590        focusColumn: e.column,
19591        isAsync: !0
19592      });
19593    }, 50);
19594  }
19595  getNextFocusIndexForAutoHeight(e, t = !1) {
19596    const i = t ? -1 : 1, s = this.getViewportHeight(), { pageBounds: o, rowModel: n } = this.beans, r = o.getLastRow();
19597    let a = 0, l = e.rowIndex;
19598    for (; l >= 0 && l <= r; ) {
19599      const d = n.getRow(l);
19600      if (d) {
19601        const c = d.rowHeight ?? 0;
19602        if (a + c > s)
19603          break;
19604        a += c;
19605      }
19606      l += i;
19607    }
19608    return Math.max(0, Math.min(l, r));
19609  }
19610  getViewportHeight() {
19611    const e = this.beans, t = No(e), i = this.beans.scrollVisibleSvc.getScrollbarWidth();
19612    let s = t.bottom - t.top;
19613    return e.ctrlsSvc.get("center").isHorizontalScrollShowing() && (s -= i), s;
19614  }
19615  isRowTallerThanView(e) {
19616    if (!e)
19617      return !1;
19618    const t = e.rowHeight;
19619    return typeof t != "number" ? !1 : t > this.getViewportHeight();
19620  }
19621  onCtrlUpDownLeftRight(e, t) {
19622    const i = this.beans.cellNavigation.getNextCellToFocus(e, t, !0), { rowIndex: s } = i, o = i.column;
19623    this.navigateTo({
19624      scrollIndex: s,
19625      scrollType: null,
19626      scrollColumn: o,
19627      focusIndex: s,
19628      focusColumn: o
19629    });
19630  }
19631  // home brings focus to top left cell, end brings focus to bottom right, grid scrolled to bring
19632  // same cell into view (which means either scroll all the way up, or all the way down).
19633  onHomeOrEndKey(e) {
19634    const t = e === b.PAGE_HOME, { visibleCols: i, pageBounds: s } = this.beans, o = i.allCols, n = t ? o[0] : W(o), r = t ? s.getFirstRow() : s.getLastRow();
19635    this.navigateTo({
19636      scrollIndex: r,
19637      scrollType: null,
19638      scrollColumn: n,
19639      focusIndex: r,
19640      focusColumn: n
19641    });
19642  }
19643  // result of keyboard event
19644  onTabKeyDown(e, t) {
19645    const i = t.shiftKey, s = this.tabToNextCellCommon(e, i, t), o = this.beans, { ctrlsSvc: n, pageBounds: r, focusSvc: a, gos: l } = o;
19646    if (s !== !1) {
19647      s ? t.preventDefault() : s === null && n.get("gridCtrl").allowFocusForNextCoreContainer(i);
19648      return;
19649    }
19650    if (i) {
19651      const { rowIndex: d, rowPinned: c } = e.getRowPosition();
19652      (c ? d === 0 : d === r.getFirstRow()) && (l.get("headerHeight") === 0 || li(o) ? vi(o, !0, !0) : (t.preventDefault(), a.focusPreviousFromFirstCell(t)));
19653    } else
19654      e instanceof Ps && e.focusCell(!0), (!i && a.focusOverlay(!1) || vi(o, i)) && t.preventDefault();
19655  }
19656  // comes from API
19657  tabToNextCell(e, t) {
19658    const i = this.beans, { focusSvc: s, rowRenderer: o } = i, n = s.getFocusedCell();
19659    if (!n)
19660      return !1;
19661    let r = Xt(i, n);
19662    return !r && (r = o.getRowByPosition(n), !r || !r.isFullWidth()) ? !1 : !!this.tabToNextCellCommon(r, e, t);
19663  }
19664  tabToNextCellCommon(e, t, i) {
19665    let s = e.editing;
19666    if (!s && e instanceof Ps) {
19667      const r = e.rowCtrl;
19668      r && (s = r.editing);
19669    }
19670    let o;
19671    return s ? this.gos.get("editType") === "fullRow" ? o = this.moveToNextEditingRow(e, t, i) : o = this.moveToNextEditingCell(e, t, i) : o = this.moveToNext
19671CellNotEditing(e, t), o === null ? o : o || !!this.beans.focusSvc.focusedHeader;
19672  }
19673  // returns null if no navigation should be performed
19674  moveToNextEditingCell(e, t, i = null) {
19675    const s = e.cellPosition;
19676    e.eGui.focus(), e.stopEditing();
19677    const o = this.findNextCellToFocusOn(s, t, !0);
19678    return o === !1 ? null : o == null ? !1 : (this.beans.editSvc?.startEditing(o, null, !0, i), o.focusCell(!1), !0);
19679  }
19680  // returns null if no navigation should be performed
19681  moveToNextEditingRow(e, t, i = null) {
19682    const s = e.cellPosition, o = this.findNextCellToFocusOn(s, t, !0);
19683    if (o === !1)
19684      return null;
19685    if (o == null)
19686      return !1;
19687    const n = o.cellPosition, r = this.isCellEditable(s), a = this.isCellEditable(n), l = n && s.rowIndex === n.rowIndex && s.rowPinned === n.rowPinned, { editSvc: d, rowEditSvc: c } = this.beans;
19688    if (r && d?.setFocusOutOnEditor(e), !l) {
19689      const u = e.rowCtrl;
19690      d?.stopRowEditing(u);
19691      const h = o.rowCtrl;
19692      c?.startEditing(h, void 0, void 0, i);
19693    }
19694    return a ? (d?.setFocusInOnEditor(o), o.focusCell()) : o.focusCell(!0), !0;
19695  }
19696  // returns null if no navigation should be performed
19697  moveToNextCellNotEditing(e, t) {
19698    const i = this.beans.visibleCols.allCols;
19699    let s;
19700    e instanceof un ? s = {
19701      ...e.getRowPosition(),
19702      column: t ? i[0] : W(i)
19703    } : s = e.cellPosition;
19704    const o = this.findNextCellToFocusOn(s, t, !1);
19705    if (o === !1)
19706      return null;
19707    if (o instanceof Ps)
19708      o.focusCell(!0);
19709    else if (o)
19710      return this.tryToFocusFullWidthRow(o.getRowPosition(), t);
19711    return A(o);
19712  }
19713  /**
19714   * called by the cell, when tab is pressed while editing.
19715   * @return: RenderedCell when navigation successful, false if navigation should not be performed, otherwise null
19716   */
19717  findNextCellToFocusOn(e, t, i) {
19718    let s = e;
19719    const o = this.beans, { cellNavigation: n, gos: r, focusSvc: a, rowRenderer: l, rangeSvc: d } = o;
19720    for (; ; ) {
19721      e !== s && (e = s), t || (s = this.getLastCellOfColSpan(s)), s = n.getNextTabbedCell(s, t);
19722      const c = r.getCallback("tabToNextCell");
19723      if (A(c)) {
19724        const p = c({
19725          backwards: t,
19726          editing: i,
19727          previousCellPosition: e,
19728          nextCellPosition: s || null
19729        });
19730        if (p === !0)
19731          s = e;
19732        else {
19733          if (p === !1)
19734            return !1;
19735          s = {
19736            rowIndex: p.rowIndex,
19737            column: p.column,
19738            rowPinned: p.rowPinned
19739          };
19740        }
19741      }
19742      if (!s)
19743        return null;
19744      if (s.rowIndex < 0) {
19745        const g = st(o);
19746        return a.focusHeaderPosition({
19747          headerPosition: {
19748            headerRowIndex: g + s.rowIndex,
19749            column: s.column
19750          },
19751          fromCell: !0
19752        }), null;
19753      }
19754      const u = r.get("editType") === "fullRow";
19755      if (i && !u && !this.isCellEditable(s))
19756        continue;
19757      this.ensureCellVisible(s);
19758      const h = Xt(o, s);
19759      if (!h) {
19760        const g = l.getRowByPosition(s);
19761        if (!g || !g.isFullWidth() || i)
19762          continue;
19763        return g;
19764      }
19765      if (!n.isSuppressNavigable(h.column, h.rowNode))
19766        return d?.setRangeToCell(s), h;
19767    }
19768  }
19769  isCellEditable(e) {
19770    const t = this.lookupRowNodeForCell(e);
19771    return t ? e.column.isCellEditable(t) : !1;
19772  }
19773  lookupRowNodeForCell({ rowIndex: e, rowPinned: t }) {
19774    const { pinnedRowModel: i, rowModel: s } = this.beans;
19775    return t === "top" ? i?.getPinnedTopRow(e) : t === "bottom" ? i?.getPinnedBottomRow(e) : s.getRow(e);
19776  }
19777  // we use index for rows, but column object for columns, as the next column (by index) might not
19778  // be visible (header grouping) so it's not reliable, so using the column object instead.
19779  navigateToNextCell(e, t, i, s) {
19780    let o = i, n = !1;
19781    const r = this.beans, { cellNavigation: a, focusSvc: l, gos: d } = r;
19782    for (; o && (o === i || !this.isValidNavigateCell(o)); )
19783      d.get("enableRtl") ? t === b.LEFT && (o = this.getLastCellOfColSpan(o)) : t === b.RIGHT && (o = this.getLastCellOfColSpan(o)), o = a.getNextCellToFocus(t, o), n = Y(
19783o);
19784    if (n && e && e.key === b.UP && (o = {
19785      rowIndex: -1,
19786      rowPinned: null,
19787      column: i.column
19788    }), s) {
19789      const u = d.getCallback("navigateToNextCell");
19790      if (A(u)) {
19791        const g = u({
19792          key: t,
19793          previousCellPosition: i,
19794          nextCellPosition: o || null,
19795          event: e
19796        });
19797        A(g) ? o = {
19798          rowPinned: g.rowPinned,
19799          rowIndex: g.rowIndex,
19800          column: g.column
19801        } : o = null;
19802      }
19803    }
19804    if (!o)
19805      return;
19806    if (o.rowIndex < 0) {
19807      const u = st(r);
19808      l.focusHeaderPosition({
19809        headerPosition: { headerRowIndex: u + o.rowIndex, column: i.column },
19810        event: e || void 0,
19811        fromCell: !0
19812      });
19813      return;
19814    }
19815    const c = this.getNormalisedPosition(o);
19816    c ? this.focusPosition(c) : this.tryToFocusFullWidthRow(o);
19817  }
19818  getNormalisedPosition(e) {
19819    this.ensureCellVisible(e);
19820    const t = Xt(this.beans, e);
19821    return t ? (e = t.cellPosition, this.ensureCellVisible(e), e) : null;
19822  }
19823  tryToFocusFullWidthRow(e, t) {
19824    const { visibleCols: i, rowRenderer: s, focusSvc: o, eventSvc: n } = this.beans, r = i.allCols, a = s.getRowByPosition(e);
19825    if (!a || !a.isFullWidth())
19826      return !1;
19827    const l = o.getFocusedCell(), d = {
19828      rowIndex: e.rowIndex,
19829      rowPinned: e.rowPinned,
19830      column: e.column || (t ? W(r) : r[0])
19831    };
19832    this.focusPosition(d);
19833    const c = t ?? (l != null && Sf(d, l));
19834    return n.dispatchEvent({
19835      type: "fullWidthRowFocused",
19836      rowIndex: d.rowIndex,
19837      rowPinned: d.rowPinned,
19838      column: d.column,
19839      isFullWidthCell: !0,
19840      fromBelow: c
19841    }), !0;
19842  }
19843  focusPosition(e) {
19844    const { focusSvc: t, rangeSvc: i } = this.beans;
19845    t.setFocusedCell({
19846      rowIndex: e.rowIndex,
19847      column: e.column,
19848      rowPinned: e.rowPinned,
19849      forceBrowserFocus: !0
19850    }), i?.setRangeToCell(e);
19851  }
19852  isValidNavigateCell(e) {
19853    return !!dn(this.beans, e);
19854  }
19855  getLastCellOfColSpan(e) {
19856    const t = Xt(this.beans, e);
19857    if (!t)
19858      return e;
19859    const i = t.getColSpanningList();
19860    return i.length === 1 ? e : {
19861      rowIndex: e.rowIndex,
19862      column: W(i),
19863      rowPinned: e.rowPinned
19864    };
19865  }
19866  ensureCellVisible(e) {
19867    const t = Ol(this.gos), i = this.beans.rowModel.getRow(e.rowIndex), s = t && i?.sticky, { scrollFeature: o } = this.gridBodyCon;
19868    !s && Y(e.rowPinned) && o.ensureIndexVisible(e.rowIndex), e.column.isPinned() || o.ensureColumnVisible(e.column);
19869  }
19870};
19871function No(e) {
19872  return e.ctrlsSvc.getScrollFeature().getVScrollPosition();
19873}
19874var TS = {
19875  moduleName: "KeyboardNavigation",
19876  version: I,
19877  beans: [AS, yS, oS],
19878  apiFunctions: {
19879    getFocusedCell: RS,
19880    clearFocusedCell: FS,
19881    setFocusedCell: xS,
19882    setFocusedHeader: DS,
19883    tabToNextCell: PS,
19884    tabToPreviousCell: ES
19885  }
19886}, MS = class extends y {
19887  constructor() {
19888    super(...arguments), this.beanName = "pageBoundsListener";
19889  }
19890  postConstruct() {
19891    this.addManagedEventListeners({
19892      modelUpdated: this.onModelUpdated.bind(this),
19893      recalculateRowBounds: this.calculatePages.bind(this)
19894    }), this.onModelUpdated();
19895  }
19896  onModelUpdated(e) {
19897    this.calculatePages(), this.eventSvc.dispatchEvent({
19898      type: "paginationChanged",
19899      animate: e?.animate ?? !1,
19900      newData: e?.newData ?? !1,
19901      newPage: e?.newPage ?? !1,
19902      newPageSize: e?.newPageSize ?? !1,
19903      keepRenderedRows: e?.keepRenderedRows ?? !1
19904    });
19905  }
19906  calculatePages() {
19907    const { pageBounds: e, pagination: t, rowModel: i } = this.beans;
19908    t ? t.calculatePages() : e.calculateBounds(0, i.getRowCount() - 1);
19909  }
19910}, IS = class extends y {
19911  constructor() {
19912    super(...arguments), this.beanName = "pageBounds", this.pixelOffset = 0;
19913  }
19914  getFirstRow() {
19915    return this.topRowBounds?.rowIndex ?? -1;
19916  }
19917  getLastRow() {
19918    return this.bottomRowBounds?.rowIndex ?? -1;
19919  }
19920  getCurrentPageHeight() {
19921    const { topRowBounds: e, bottomRowBounds: t } = this;
19922    return !e || !t ? 0 : Math.max(t.rowTop + t.rowHeight - e.rowTop, 0);
19923  }
19924  getCurrentPagePixelRange() {
19925    const { topRowBounds: e, bottomRowBounds: t } = this, i = e?.rowTop ?? 0, s = t ? t.rowTop + t.rowHeight : 0;
19926    return { pageFirstPixel: i, pageLastPixel: s };
19927  }
19928  calculateBounds(e, t) {
19929    const { rowModel: i } = this.beans, s = i.getRowBounds(e);
19930    s && (s.rowIndex = e), this.topRowBounds = s;
19931    const o = i.getRowBounds(t);
19932    o && (o.rowIndex = t), this.bottomRowBounds = o, this.calculatePixelOffset();
19933  }
19934  getPixelOffset() {
19935    return this.pixelOffset;
19936  }
19937  calculatePixelOffset() {
19938    const e = this.topRowBounds?.rowTop ?? 0;
19939    this.pixelOffset !== e && (this.pixelOffset = e, this.eventSvc.dispatchEvent({ type: "paginationPixelOff
19939setChanged" }));
19940  }
19941}, kS = (
19942  /*css*/
19943  ".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}"
19944), LS = class extends y {
19945  constructor(e, t) {
19946    super(), this.element = e, this.isLeft = t, this.getWidth = t ? () => this.beans.pinnedCols.leftWidth : () => this.beans.pinnedCols.rightWidth;
19947  }
19948  postConstruct() {
19949    this.addManagedEventListeners({
19950      [`${this.isLeft ? "left" : "right"}PinnedWidthChanged`]: this.onPinnedWidthChanged.bind(this)
19951    });
19952  }
19953  onPinnedWidthChanged() {
19954    const e = this.getWidth(), t = e > 0;
19955    Q(this.element, t), Ye(this.element, e);
19956  }
19957}, OS = class extends y {
19958  constructor() {
19959    super(...arguments), this.beanName = "pinnedCols";
19960  }
19961  postConstruct() {
19962    this.beans.ctrlsSvc.whenReady(this, (t) => {
19963      this.gridBodyCtrl = t.gridBodyCtrl;
19964    });
19965    const e = this.checkContainerWidths.bind(this);
19966    this.addManagedEventListeners({
19967      displayedColumnsChanged: e,
19968      displayedColumnsWidthChanged: e
19969    }), this.addManagedPropertyListener("domLayout", e);
19970  }
19971  checkContainerWidths() {
19972    const { gos: e, visibleCols: t, eventSvc: i } = this.beans, s = de(e, "print"), o = s ? 0 : t.getColsLeftWidth(), n = s ? 0 : t.getDisplayedColumnsRightWidth();
19973    o != this.leftWidth && (this.leftWidth = o, i.dispatchEvent({ type: "leftPinnedWidthChanged" })), n != this.rightWidth && (this.rightWidth = n, i.dispatchEvent({ type: "rightPinnedWidthChanged" }));
19974  }
19975  keepPinnedColumnsNarrowerThanViewport() {
19976    const e = this.gridBodyCtrl.eBodyViewport, t = Yi(e);
19977    if (t <= 50)
19978      return;
19979    let i = this.getPinnedColumnsOverflowingViewport(t - 50);
19980    const s = this.gos.getCallback("processUnpinnedColumns");
19981    i.length && (s && (i = s({
19982      columns: i,
19983      viewportWidth: t
19984    })), this.setColsPinned(i, null, "viewportSizeFeature"));
19985  }
19986  createPinnedWidthFeature(e, t) {
19987    return new LS(e, t);
19988  }
19989  setColsPinned(e, t, i) {
19990    const { colModel: s, colAnimation: o, visibleCols: n, gos: r } = this.beans;
19991    if (!s.cols || !e?.length)
19992      return;
19993    if (de(r, "print")) {
19994      x(37);
19995      return;
19996    }
19997    o?.start();
19998    let a;
19999    t === !0 || t === "left" ? a = "left" : t === "right" ? a = "right" : a = null;
20000    const l = [];
20001    e.forEach((d) => {
20002      if (!d)
20003        return;
20004      const c = s.getCol(d);
20005      c && c.getPinned() !== a && (this.setColPinned(c, a), l.push(c));
20006    }), l.length && (n.refresh(i), jl(this.eventSvc, l, i)), o?.finish();
20007  }
20008  initCol(e) {
20009    const { pinned: t, initialPinned: i } = e.colDef;
20010    t !== void 0 ? this.setColPinned(e, t) : this.setColPinned(e, i);
20011  }
20012  setColPinned(e, t) {
20013    t === !0 || t === "left" ? e.pinned = "left" : t === "right" ? e.pinned = "right" : e.pinned = null, e.dispatchStateUpdatedEvent("pinned");
20014  }
20015  setupHeaderPinnedWidth(e) {
20016    const { scrollVisibleSvc: t } = this.beans;
20017    if (e.pinned == null)
20018      return;
20019    const i = e.pinned === "left", s = e.pinned === "right";
20020    e.hidden = !0;
20021    const o = () => {
20022      const n = i ? this.leftWidth : this.rightWidth;
20023      if (n == null)
20024        return;
20025      const r = n == 0, a = e.hidden !== r, l = this.gos.get("enableRtl"), d = t.getScrollbarWidth(), u = t.verticalScrollShowing && (l && i || !l && s) ? n + d : n;
20026      e.comp.setPinnedContainerWidth(`${u}px`), e.comp.setDisplayed(!r), a && (e.hidden = r, e.refresh());
20027    };
20028    e.addManagedEventListeners({
20029      leftPinnedWidthChanged: o,
20030      rightPinnedWidthChanged: o,
20031      scrollVisibilityChanged: o,
20032      scrollbarWidthChanged: o
20033    });
20034  }
20035  getHeaderResizeDiff(e, t) {
20036    if (t.getPinned()) {
20037      const { leftWidth: s, rightWidth: o } = this, n = Yi(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport) - 50;
20038      if (s + o + e > n)
20039        if (n > s + o)
20040          e = n - s - o;
20041        else
20042          return 0;
20043    }
20044    return e;
20045  }
20046  getPinnedColumnsOverflowingViewport(e) {
20047    const t = this.rightWidth ?? 0, i = this.leftWidth ?? 0, s = t + i;
20048    if (s < e)
20049      return [];
20050    const { visibleCols: o } = this.beans, n = [...o.leftCols], r = [...o.rightCols];
20051    let a = 0, l = 0;
20052    const d = 0, c = [];
20053    let u = s - d - e;
20054    for (; (l < n.length || a < r.length) && u > 0; ) {
20055      if (a < r.length) {
20056        const h = r[a++];
20057        u -= h.getActualWidth(), c.push(h);
20058      }
20059      if (l < n.length && u > 0) {
20060        const h = n[l++];
20061        u -= h.getActualWidth(), c.push(h);
20062      }
20063    }
20064    return c;
20065  }
20066}, GS = {
20067  moduleName: "PinnedColumn",
20068  version: I,
20069  beans: [OS],
20070  css: [kS]
20071}, HS = class extends y {
20072  constructor() {
20073    super(), this.beanName = "ariaAnnounce", this.descriptionContainer = null, this.pendingAnnouncements = /* @__PURE__ */ new Map(), this.lastAnnouncement = "", this.updateAnnouncement = Ce(this, this.updateAnnouncement.bind(this), 200);
20074  }
20075  postConstruct() {
20076    const e = this.beans, t = te(e), i = this.descriptionContainer = t.createElement("div");
20077    i.classList.add("ag-aria-description-container"), ll(i, "polite"), Ah(i, "additions text"), Dh(i, !0), e.eGridDiv.appendChild(i);
20078  }
20079  /**
20080   * @param key used for debouncing calls
20081   */
20082  announceValue(e, t) {
20083    this.pendingAnnouncements.set(t, e), this.updateAnnouncement();
20084  }
20085  updateAnnouncement() {
20086    if (!this.descriptionContainer)
20087      return;
20088    const e = Array.from(this.pendingAnnouncements.values()).join(". ");
20089    this.pendingAnnouncements.clear(), this.descriptionContainer.textContent = "", setTimeout(() => {
20090      if (this.isAlive() && this.descriptionContainer) {
20091        let t = e;
20092        this.lastAnnouncement === t && (t = `${t}.`), this.lastAnnouncement = t, this.descriptionContainer.textContent = t;
20093      }
20094    }, 50);
20095  }
20096  destroy() {
20097    super.destroy();
20098    const { descriptionContainer: e } = this;
20099    e && (ue(e), e.parentElement?.removeChild(e)), this.descriptionContainer = null, this.pendingAnnouncements.clear();
20100  }
20101}, BS = {
20102  moduleName: "Aria",
20103  version: I,
20104  beans: [HS]
20105};
20106function NS(e) {
20107  e.overlays?.showLoadingOverlay();
20108}
20109function VS(e) {
20110  e.overlays?.showNoRowsOverlay();
20111}
20112function WS(e) {
20113  e.overlays?.hideOverlay();
20114}
20115var zS = (
20116  /*css*/
20117  ".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}"
20118), rc = class extends _ {
20119  constructor() {
20120    super(
20121      /* html */
20122      `
20123            <div class="ag-overlay" role="presentation">
20124                <div class="ag-overlay-panel" role="presentation">
20125                    <div class="ag-overlay-wrapper" data-ref="eOverlayWrapper" role="presentation"></div>
20126                </div>
20127            </div>`
20128    ), this.eOverlayWrapper = M, this.activePromise = null, this.activeOverlay = null, this.updateListenerDestroyFunc = null, this.activeCssClass = null, this.elToFocusAfter = null, this.registerCSS(zS);
20129  }
20130  handleKeyDown(e) {
20131    if (e.key !== b.TAB || e.defaultPrevented || nt(e))
20132      return;
20133    const t = this.beans;
20134    if (zt(t, this.eOverlayWrapper, !1, e.shiftKey))
20135      return;
20136    let s = !1;
20137    e.shiftKey ? s = t.focusSvc.focusGridView(W(t.visibleCols.allCols), !0, !1) : s = vi(t, !1), s && e.preventDefault();
20138  }
20139  updateLayoutClasses(e, t) {
20140    const i = this.eOverlayWrapper.classList, { AUTO_HEIGHT: s, NORMAL: o, PRINT: n } = Oe;
20141    i.toggle(s, t.autoHeight), i.toggle(o, t.normal), i.toggle(n, t.print);
20142  }
20143  postConstruct() {
20144    this.createManagedBean(new qn(this)), this.setDisplayed(!1, { skipAriaHidden: !0 }), this.beans.overlays.setOverlayWrapperComp(this), this.addManagedElementListeners(this.getFocusableElement(), { keydown: this.handleKeyDown.bind(this) });
20145  }
20146  setWrapperTypeClass(e) {
20147    const t = this.eOverlayWrapper.classList;
20148    this.activeCssClass && t.toggle(this.activeCssClass, !1), this.activeCssClass = e, t.toggle(e, !0);
20149  }
20150  showOverlay(e, t, i, s) {
20151    if (this.setWrapperTypeClass(t), this.destroyActiveOverlay(), this.elToFocusAfter = null, this.activePromise = e, !!e) {
20152      if (this.setDisplayed(!0, { skipAriaHidden: !0 }), i && this.isGridFocused()) {
20153        const o = Z(this.beans);
20154        o && !Ll(this.beans) && (this.elToFocusAfter = o);
20155      }
20156      e.then((o) => {
20157        if (this.activePromise !== e) {
20158          this.activeOverlay !== o && (this.destroyBean(o), o = null);
20159          return;
20160        }
20161        if (this.activePromise = null, !!o) {
20162          if (this.activeOverlay !== o && (this.eOverlayWrapper.appendChild(o.getGui()), this.activeOverlay = o, s)) {
20163            const n = o;
20164            this.updateListenerDestroyFunc = this.addManagedPropertyListener(s, ({ currentValue: r }) => {
20165              n.refresh?.(this.gos.addGridCommonParams({ ...r ?? {} }));
20166            });
20167          }
20168          i && this.isGridFocused() && Ht(this.eOverlayWrapper);
20169        }
20170      });
20171    }
20172  }
20173  updateOverlayWrapperPaddingTop(e) {
20174    this.eOverlayWrapper.style.setProperty("padding-top", `${e}px`);
20175  }
20176  destroyActiveOverlay() {
20177    this.activePromise = null;
20178    const e = this.activeOverlay;
20179    if (!e)
20180      return;
20181    let t = this.elToFocusAfter;
20182    this.activeOverlay = null, this.elToFocusAfter = null, t && !this.isGridFocused() && (t = null);
20183    const i = this.updateListenerDestroyFunc;
20184    i && (i(), this.updateListenerDestroyFunc = null), this.destroyBean(e), ue(this.eOverlayWrapper), t?.focus?.({ preventScroll: !0 });
20185  }
20186  hideOverlay() {
20187    this.destroyActiveOverlay(), this.setDisplayed(!1, { skipAriaHidden: !0 });
20188  }
20189  isGridFocused() {
20190    const e = Z(this.beans);
20191    return !!e && this.beans.eGridDiv.contains(e);
20192  }
20193  destroy() {
20194    this.elToFocusAfter = null, this.destroyActiveOverlay(), this.beans.overlays.setOverlayWrapperComp(void 0), super.destroy();
20195  }
20196}, _S = {
20197  selector: "AG-OVERLAY-WRAPPER",
20198  component: rc
20199}, US = class extends y {
20200  constructor() {
20201    super(...arguments), this.beanName = "overlays", this.state = 0, this.showInitialOverlay = !0, this.wrapperPadding = 0;
20202  }
20203  postConstruct() {
20204    this.isClientSide = me(this.gos);
20205    const e = () => this.updateOverlayVisibility();
20206    this.addManagedEventListeners({
20207      newColumnsLoaded: e,
20208      rowDataUpdated: e,
20209      gridSizeChanged: this.refreshWrapperPadding.bind(this),
20210      rowCountReady: () => {
20211        this.showInitialOverlay = !1, this.updateOverlayVisibility();
20212      }
20213    }), this.addManagedPropertyListener("loading", e);
20214  }
20215  setOverlayWrapperComp(e) {
20216    this.eWrapper = e, this.updateOverlayVisibility();
20217  }
20218  /** Returns true if the overlay is visible. */
20219  isVisible() {
20220    return this.state !== 0 && !!this.eWrapper;
20221  }
20222  /** Returns true if the overlay is visible and is exclusive (popup over the grid) */
20223  isExclusive() {
20224    return this.state === 1 && !!this.eWrapper;
20225  }
20226  showLoadingOverlay() {
20227    this.showInitialOverlay = !1;
20228    const e = this.gos, t = e.get("loading");
20229    !t && (t !== void 0 || e.get("suppressLoadingOverlay")) || this.doShowLoadingOverlay();
20230  }
20231  showNoRowsOverlay() {
20232    this.showInitialOverlay = !1;
20233    const e = this.gos;
20234    e.get("loading") || e.get("suppressNoRowsOverlay") || this.doShowNoRowsOverlay();
20235  }
20236  hideOverlay() {
20237    if (this.showInitialOverlay = !1, this.gos.get("loading")) {
20238      x(99);
20239      return;
20240    }
20241    this.doHideOverlay();
20242  }
20243  getOverlayWrapperSelector() {
20244    return _S;
20245  }
20246  getOverlayWrapperCompClass() {
20247    return rc;
20248  }
20249  updateOverlayVisibility() {
20250    if (!this.eWrapper) {
20251      this.state = 0;
20252      return;
20253    }
20254    const {
20255      state: e,
20256      isClientSide: t,
20257      beans: { gos: i, colModel: s, rowModel: o }
20258    } = this;
20259    let n = this.gos.get("loading");
20260    n !== void 0 && (this.showInitialOverlay = !1), this.showInitialOverlay && n === void 0 && !i.get("suppressLoadingOverlay") && (n = !i.get("columnDefs") || !s.ready || !i.get("rowData") && t), n ? e !== 1 && this.doShowLoadingOverlay() : (this.showInitialOverlay = !1, o.isEmpty() && !i.get("suppressNoRowsOverlay") && t ? e !== 2 && this.doShowNoRowsOverlay() : e !== 0 && this.doHideOverlay());
20261  }
20262  doShowLoadingOverlay() {
20263    this.eWrapper && (this.state = 1, this.showOverlay(
20264      Tp(this.beans.userCompFactory, {}),
20265      "ag-overlay-loading-wrapper",
20266      "loadingOverlayComponentParams"
20267    ), this.updateExclusive());
20268  }
20269  doShowNoRowsOverlay() {
20270    this.eWrapper && (this.state = 2, this.showOverlay(
20271      Mp(this.beans.userCompFactory, {}),
20272      "ag-overlay-no-rows-wrapper",
20273      "noRowsOverlayComponentParams"
20274    ), this.updateExclusive());
20275  }
20276  doHideOverlay() {
20277    this.eWrapper && (this.state = 0, this.eWrapper.hideOverlay(), this.updateExclusive());
20278  }
20279  showOverlay(e, t, i) {
20280    const s = e?.newAgStackInstance() ?? null;
20281    this.eWrapper?.showOverlay(s, t, this.isExclusive(), i), this.refreshWrapperPadding();
20282  }
20283  updateExclusive() {
20284    const e = this.exclusive;
20285    this.exclusive = this.isExclusive(), this.exclusive !== e && this.eventSvc.dispatchEvent({
20286      type: "overlayExclusiveChanged"
20287    });
20288  }
20289  refreshWrapperPadding() {
20290    const e = this.eWrapper;
20291    if (!e)
20292      return;
20293    let t = 0;
20294    this.state === 2 ? t = this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight || 0 : this.wrapperPadding !== 0 && (t = 0), this.wrapperPadding !== t && (this.wrapperPadding = t, e.updateOverlayWrapperPaddingTop(t));
20295  }
20296}, $S = {
20297  moduleName: "Overlay",
20298  version: I,
20299  userComponents: {
20300    agLoadingOverlay: Fm,
20301    agNoRowsOverlay: xm
20302  },
20303  apiFunctions: {
20304    showLoadingOverlay: NS,
20305    showNoRowsOverlay: VS,
20306    hideOverlay: WS
20307  },
20308  beans: [US]
20309}, KS = class extends y {
20310  constructor() {
20311    super(...arguments), this.beanName = "rowContainerHeight", this.scrollY = 0, this.uiBodyHeight = 0;
20312  }
20313  postConstruct() {
20314    this.addManagedEventListeners({ bodyHeightChanged: this.updateOffset.bind(this) }), this.maxDivHeight = Vh(), bt(this.gos, "RowContainerHeightService - maxDivHeight = " + this.maxDivHeight);
20315  }
20316  updateOffset() {
20317    if (!this.stretching)
20318      return;
20319    const e = this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top, t = this.getUiBodyHeight();
20320    (e !== this.scrollY || t !== this.uiBodyHeight) && (this.scrollY = e, this.uiBodyHeight = t, this.calculateOffset());
20321  }
20322  calculateOffset() {
20323    this.setUiContainerHeight(this.maxDivHeight), this.pixelsToShave = this.modelHeight - this.uiContainerHeight, this.maxScrollY = this.uiContainerHeight - this.uiBodyHeight;
20324    const e = this.scrollY / this.maxScrollY, t = e * this.pixelsToShave;
20325    bt(
20326      this.gos,
20327      `RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`
20328    ), this.setDivStretchOffset(t);
20329  }
20330  setUiContainerHeight(e) {
20331    e !== this.uiContainerHeight && (this.uiContainerHeight = e, this.eventSvc.dispatchEvent({ type: "rowContainerHeightChanged" }));
20332  }
20333  clearOffset() {
20334    this.setUiContainerHeight(this.modelHeight), this.pixelsToShave = 0, this.setDivStretchOffset(0);
20335  }
20336  setDivStretchOffset(e) {
20337    const t = typeof e == "number" ? Math.floor(e) : null;
20338    this.divStretchOffset !== t && (this.divStretchOffset = t, this.eventSvc.dispatchEvent({ type: "heightScaleChanged" }));
20339  }
20340  setModelHeight(e) {
20341    this.modelHeight = e, this.stretching = e != null && // null happens when in print layout
20342    this.maxDivHeight > 0 && e > this.maxDivHeight, this.stretching ? this.calculateOffset() : this.clearOffset();
20343  }
20344  getRealPixelPosition(e) {
20345    return e - this.divStretchOffset;
20346  }
20347  getUiBodyHeight() {
20348    const e = this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();
20349    return e.bottom - e.top;
20350  }
20351  getScrollPositionForPixel(e) {
20352    if (this.pixelsToShave <= 0)
20353      return e;
20354    const t = this.modelHeight - this.getUiBodyHeight(), i = e / t;
20355    return this.maxScrollY * i;
20356  }
20357}, jS = 400, qS = class extends y {
20358  constructor() {
20359    super(...arguments), this.beanName = "rowRenderer", this.destroyFuncsForColumnListeners = [], this.rowCtrlsByRowIndex = {}, this.zombieRowCtrls = {}, this.allRowCtrls = [], this.topRowCtrls = [], this.bottomRowCtrls = [], this.refreshInProgress = !1, this.dataFirstRenderedFired = !1, this.setupRangeSelectionListeners = () => {
20360      const e = () => {
20361        this.getAllCellCtrls().forEach((n) => n.onCellSelectionChanged());
20362      }, t = () => {
20363        this.getAllCellCtrls().forEach((n) => n.updateRangeBordersIfRangeCount());
20364      }, i = () => {
20365        this.eventSvc.addEventListener("cellSelectionChanged", e), this.eventSvc.addEventListener("columnMoved", t), this.eventSvc.addEventListener("columnPinned", t), this.eventSvc.addEventListener("columnVisible", t);
20366      }, s = () => {
20367        this.eventSvc.removeEventListener("cellSelectionChanged", e), this.eventSvc.removeEventListener("columnMoved", t), this.eventSvc.removeEventListener("columnPinned", t), this.eventSvc.removeEventListener("columnVisible", t);
20368      };
20369      this.addDestroyFunc(() => s()), this.addManagedPropertyListeners(["enableRangeSelection", "cellSelection"], () => {
20370        lt(this.gos) ? i() : s();
20371      }), lt(this.gos) && i();
20372    };
20373  }
20374  wireBeans(e) {
20375    this.pageBounds = e.pageBounds, this.colModel = e.colModel, this.pinnedRowModel = e.pinnedRowModel, this.rowModel = e.rowModel, this.focusSvc = e.focusSvc, this.rowContainerHeight = e.rowContainerHeight, this.ctrlsSvc = e.ctrlsSvc;
20376  }
20377  postConstruct() {
20378    this.ctrlsSvc.whenReady(this, (e) => {
20379      this.gridBodyCtrl = e.gridBodyCtrl, this.initialise();
20380    });
20381  }
20382  initialise() {
20383    this.addManagedEventListeners({
20384      paginationChanged: this.onPageLoaded.bind(this),
20385      pinnedRowDataChanged: this.onPinnedRowDataChanged.bind(this),
20386      displayedColumnsChanged: this.onDisplayedColumnsChanged.bind(this),
20387      bodyScroll: this.onBodyScroll.bind(this),
20388      bodyHeightChanged: this.redraw.bind(this, {})
20389    }
20389), this.addManagedPropertyListeners(["domLayout", "embedFullWidthRows"], () => this.onDomLayoutChanged()), this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction", "rowBuffer"], () => this.redraw()), this.addManagedPropertyListener("suppressCellFocus", (i) => this.onSuppressCellFocusChanged(i.currentValue)), this.addManagedPropertyListeners(
20390      [
20391        "groupSuppressBlankHeader",
20392        "getBusinessKeyForNode",
20393        "fullWidthCellRenderer",
20394        "fullWidthCellRendererParams",
20395        "suppressStickyTotalRow",
20396        "groupRowRenderer",
20397        "groupRowRendererParams",
20398        // maybe only needs to refresh FW rows...
20399        "loadingCellRenderer",
20400        "loadingCellRendererParams",
20401        "detailCellRenderer",
20402        "detailCellRendererParams",
20403        "enableRangeSelection",
20404        "enableCellTextSelection"
20405      ],
20406      () => this.redrawRows()
20407    ), this.addManagedPropertyListener("cellSelection", ({ currentValue: i, previousValue: s }) => {
20408      (!s && i || s && !i) && this.redrawRows();
20409    });
20410    const { stickyRowSvc: e, gos: t } = this.beans;
20411    if (e)
20412      this.stickyRowFeature = e.createStickyRowFeature(
20413        this,
20414        this.createRowCon.bind(this),
20415        this.destroyRowCtrls.bind(this)
20416      );
20417    else {
20418      const i = this.gridBodyCtrl;
20419      i.setStickyTopHeight(0), i.setStickyBottomHeight(0);
20420    }
20421    this.registerCellEventListeners(), this.initialiseCache(), this.printLayout = de(t, "print"), this.embedFullWidthRows = this.printLayout || t.get("embedFullWidthRows"), this.redrawAfterModelUpdate();
20422  }
20423  initialiseCache() {
20424    if (this.gos.get("keepDetailRows")) {
20425      const e = this.getKeepDetailRowsCount(), t = e ?? 3;
20426      this.cachedRowCtrls = new YS(t);
20427    }
20428  }
20429  getKeepDetailRowsCount() {
20430    return this.gos.get("keepDetailRowsCount");
20431  }
20432  getStickyTopRowCtrls() {
20433    return this.stickyRowFeature?.stickyTopRowCtrls ?? [];
20434  }
20435  getStickyBottomRowCtrls() {
20436    return this.stickyRowFeature?.stickyBottomRowCtrls ?? [];
20437  }
20438  updateAllRowCtrls() {
20439    const e = Object.values(this.rowCtrlsByRowIndex), t = Object.values(this.zombieRowCtrls), i = this.cachedRowCtrls?.getEntries() ?? [];
20440    t.length > 0 || i.length > 0 ? this.allRowCtrls = [...e, ...t, ...i] : this.allRowCtrls = e;
20441  }
20442  onCellFocusChanged(e) {
20443    this.getAllCellCtrls().forEach((t) => t.onCellFocused(e)), this.getFullWidthRowCtrls().forEach((t) => t.onFullWidthRowFocused(e));
20444  }
20445  onSuppressCellFocusChanged(e) {
20446    this.getAllCellCtrls().forEach((t) => t.onSuppressCellFocusChanged(e)), this.getFullWidthRowCtrls().forEach((t) => t.onSuppressCellFocusChanged(e));
20447  }
20448  // in a clean design, each cell would register for each of these events. however when scrolling, all the cells
20449  // registering and de-registering for events is a performance bottleneck. so we register here once and inform
20450  // all active cells.
20451  registerCellEventListeners() {
20452    this.addManagedEventListeners({
20453      cellFocused: (e) => {
20454        this.onCellFocusChanged(e);
20455      },
20456      cellFocusCleared: () => this.onCellFocusChanged(),
20457      flashCells: (e) => {
20458        const { cellFlashSvc: t } = this.beans;
20459        t && this.getAllCellCtrls().forEach((i) => t.onFlashCells(i, e));
20460      },
20461      columnHoverChanged: () => {
20462        this.getAllCellCtrls().forEach((e) => e.onColumnHover());
20463      },
20464      displayedColumnsChanged: () => {
20465        this.getAllCellCtrls().forEach((e) => e.onDisplayedColumnsChanged());
20466      },
20467      displayedColumnsWidthChanged: () => {
20468        this.printLayout && this.getAllCellCtrls().forEach((e) => e.onLeftChanged());
20469      }
20470    }), this.setupRangeSelectionListeners(), this.refreshListenersToColumnsForCellComps(), this.addManagedEventListeners({
20471      gridColumnsChanged: this.refreshListenersToColumnsForCellComps.bind(this)
20472    }), this.addDestroyFunc(this.removeGridColumnListeners.bind(this));
20473  }
20474  // executes all functions in destroyFuncsForColumnListeners and then clears the list
20475  removeGridColumnListeners() {
20476    this.destroyFuncsForColumnListeners.forEach((e) =>
20476 e()), this.destroyFuncsForColumnListeners.length = 0;
20477  }
20478  // this function adds listeners onto all the grid columns, which are the column that we could have cellComps for.
20479  // when the grid columns change, we add listeners again. in an ideal design, each CellComp would just register to
20480  // the column it belongs to on creation, however this was a bottleneck with the number of cells, so do it here
20481  // once instead.
20482  refreshListenersToColumnsForCellComps() {
20483    this.removeGridColumnListeners(), this.colModel.getCols().forEach((t) => {
20484      const i = (l) => {
20485        this.getAllCellCtrls().forEach((d) => {
20486          d.column === t && l(d);
20487        });
20488      }, s = () => {
20489        i((l) => l.onLeftChanged());
20490      }, o = () => {
20491        i((l) => l.onWidthChanged());
20492      }, n = () => {
20493        i((l) => l.onFirstRightPinnedChanged());
20494      }, r = () => {
20495        i((l) => l.onLastLeftPinnedChanged());
20496      }, a = () => {
20497        i((l) => l.onColDefChanged());
20498      };
20499      t.addEventListener("leftChanged", s), t.addEventListener("widthChanged", o), t.addEventListener("firstRightPinnedChanged", n), t.addEventListener("lastLeftPinnedChanged", r), t.addEventListener("colDefChanged", a), this.destroyFuncsForColumnListeners.push(() => {
20500        t.removeEventListener("leftChanged", s), t.removeEventListener("widthChanged", o), t.removeEventListener("firstRightPinnedChanged", n), t.removeEventListener("lastLeftPinnedChanged", r), t.removeEventListener("colDefChanged", a);
20501      });
20502    });
20503  }
20504  onDomLayoutChanged() {
20505    const e = de(this.gos, "print"), t = e || this.gos.get("embedFullWidthRows"), i = t !== this.embedFullWidthRows || this.printLayout !== e;
20506    this.printLayout = e, this.embedFullWidthRows = t, i && this.redrawAfterModelUpdate({ domLayoutChanged: !0 });
20507  }
20508  // for row models that have datasources, when we update the datasource, we need to force the rowRenderer
20509  // to redraw all rows. otherwise the old rows from the old datasource will stay displayed.
20510  datasourceChanged() {
20511    this.firstRenderedRow = 0, this.lastRenderedRow = -1;
20512    const e = Object.keys(this.rowCtrlsByRowIndex);
20513    this.removeRowCtrls(e);
20514  }
20515  onPageLoaded(e) {
20516    const t = {
20517      recycleRows: e.keepRenderedRows,
20518      animate: e.animate,
20519      newData: e.newData,
20520      newPage: e.newPage,
20521      // because this is a model updated event (not pinned rows), we
20522      // can skip updating the pinned rows. this is needed so that if user
20523      // is doing transaction updates, the pinned rows are not getting constantly
20524      // trashed - or editing cells in pinned rows are not refreshed and put into read mode
20525      onlyBody: !0
20526    };
20527    this.redrawAfterModelUpdate(t);
20528  }
20529  /**
20530   * @param column AgColumn
20531   * @returns An array with HTMLElement for every cell of the column passed as param.
20532   * If the cell is spanning across multiple columns, it only returns the html element
20533   * if the column passed is the first column of the span (used for auto width calculation).
20534   */
20535  getAllCellsNotSpanningForColumn(e) {
20536    const t = [];
20537    return this.getAllRowCtrls().forEach((i) => {
20538      const s = i.getCellCtrl(e, !0)?.eGui;
20539      s && t.push(s);
20540    }), t;
20541  }
20542  refreshFloatingRowComps() {
20543    this.refreshFloatingRows(this.topRowCtrls, "top"), this.refreshFloatingRows(this.bottomRowCtrls, "bottom");
20544  }
20545  /**
20546   * Determines which row controllers need to be destroyed and re-created vs which ones can
20547   * be re-used.
20548   *
20549   * This is operation is to pinned/floating rows as `this.recycleRows` is to normal/body rows.
20550   *
20551   * All `RowCtrl` instances in `rowCtrls` that don't correspond to `RowNode` instances in `rowNodes` are destroyed.
20552   * All `RowNode` instances in `rowNodes` that don't correspond to `RowCtrl` instances in `rowCtrls` are created.
20553   * All instances in `rowCtrls` must be in the same order as their corresponding nodes in `rowNodes`.
20554   *
20555   * @param rowCtrls The list of existing row controllers
20556   * @param rowNodes The canonical list of row nodes that should have associated controllers
20557   */
20558  refreshFloatingRows(e, t) {
20559    const { pinnedRowModel: i, beans: s, printLayout: o } = this, n = Object.fromEntries(e.map((a) => [a.rowNode.id, a]));
20560    i?.forEachPinnedRow(t, (a, l) => {
20561      const d = e[l];
20562      d && i.getPinnedRowById(d.rowNode.id, t) === void 0 && (d.destroyFirstPass(), d.destroySecondPass()), a.id in n ? (e[l] = n[a.id], delete n[a.id]) : e[l] = new un(a, s, !1, !1, o);
20563    });
20564    const r = (t === "top" ? i?.getPinnedTopRowCount() : i?.getPinnedBottomRowCount()) ?? 0;
20565    e.length = r;
20566  }
20567  onPinnedRowDataChanged() {
20568    const e = {
20569      recycleRows: !0
20570    };
20571    this.redrawAfterModelUpdate(e);
20572  }
20573  redrawRow(e, t = !1) {
20574    if (e.sticky)
20575      this.stickyRowFeature?.refreshStickyNode(e);
20576    else if (this.cachedRowCtrls?.has(e)) {
20577      this.cachedRowCtrls.removeRow(e);
20578      return;
20579    } else {
20580      const i = (s) => {
20581        const o = s[e.rowIndex];
20582        o && o.rowNode === e && (o.destroyFirstPass(), o.destroySecondPass(), s[e.rowIndex] = this.createRowCon(e, !1, !1));
20583      };
20584      switch (e.rowPinned) {
20585        case "top":
20586          i(this.topRowCtrls);
20587          break;
20588        case "bottom":
20589          i(this.bottomRowCtrls);
20590          break;
20591        default:
20592          i(this.rowCtrlsByRowIndex), this.updateAllRowCtrls();
20593      }
20594    }
20595    t || this.dispatchDisplayedRowsChanged(!1);
20596  }
20597  redrawRows(e) {
20598    if (e != null) {
20599      e?.forEach((i) => this.redrawRow(i, !0)), this.dispatchDisplayedRowsChanged(!1);
20600      return;
20601    }
20602    this.redrawAfterModelUpdate();
20603  }
20604  getCellToRestoreFocusToAfterRefresh(e) {
20605    const t = e?.suppressKeepFocus ? null : this.focusSvc.getFocusCellToUseAfterRefresh();
20606    if (t == null)
20607      return null;
20608    const i = Z(this.beans), s = Os(this.gos, i, _s), o = Os(this.gos, i, ss);
20609    return s || o ? t : null;
20610  }
20611  // gets called from:
20612  // +) initialisation (in registerGridComp) params = null
20613  // +) onDomLayoutChanged, params = null
20614  // +) onPageLoaded, recycleRows, animate, newData, newPage from event, onlyBody=true
20615  // +) onPinnedRowDataChanged, recycleRows = true
20616  // +) redrawRows (from Grid API), recycleRows = true/false
20617  redrawAfterModelUpdate(e = {}) {
20618    this.getLockOnRefresh();
20619    const t = this.getCellToRestoreFocusToAfterRefresh(e);
20620    this.updateContainerHeights(), this.scrollToTopIfNewData(e);
20621    const i = !e.domLayoutChanged && !!e.recycleRows, s = e.animate && si(this.gos), o = i ? this.getRowsToRecycle() : null;
20622    i || this.removeAllRowComps(), this.workOutFirstAndLastRowsToRender();
20623    const { stickyRowFeature: n } = this;
20624    if (n) {
20625      n.checkStickyRows();
20626      const r = n.extraTopHeight + n.extraBottomHeight;
20627      r && this.updateContainerHeights(r);
20628    }
20629    this.recycleRows(o, s), this.gridBodyCtrl.updateRowCount(), e.onlyBody || this.refreshFloatingRowComps(), this.dispatchDisplayedRowsChanged(), t != null && this.restoreFocusedCell(t), this.releaseLockOnRefresh();
20630  }
20631  scrollToTopIfNewData(e) {
20632    const t = e.newData || e.newPage, i = this.gos.get("suppressScrollOnNewData");
20633    t && !i && (this.gridBodyCtrl.scrollFeature.scrollToTop(), this.stickyRowFeature?.resetOffsets());
20634  }
20635  updateContainerHeights(e = 0) {
20636    const { rowContainerHeight: t } = this;
20637    if (this.printLayout) {
20638      t.setModelHeight(null);
20639      return;
20640    }
20641    let i = this.pageBounds.getCurrentPageHeight();
20642    i === 0 && (i = 1), t.setModelHeight(i + e);
20643  }
20644  getLockOnRefresh() {
20645    if (this.refreshInProgress)
20646      throw new Error(wt(252));
20647    this.refreshInProgress = !0, this.beans.frameworkOverrides.getLockOnRefresh?.();
20648  }
20649  releaseLockOnRefresh() {
20650    this.refreshInProgress = !1, this.beans.frameworkOverrides.releaseLockOnRefresh?.();
20651  }
20652  isRefreshInProgress() {
20653    return this.refreshInProgress;
20654  }
20655  // sets the focus to the provided cell, if the cell is provided. this way, the user can call refresh without
20656  // worry about the focus been lost. this is important when the user is using keyboard navigation to do edits
20657  // and the cellEditor is calling 'refresh' to get other cells to update (as other cells might depend on the
20658  // edited cell).
20659  restoreFocusedCell(e) {
20660    e && this.focusSvc.restoreFocusedCell(e, () => {
20661      this.onCellFocusChanged(
20662        this.gos.addGridCommonParams({
20663          rowIndex: e.rowIndex,
20664          column: e.column,
20665          rowPinned: e.rowPinned,
20666          forceBrowserFocus: !0,
20667          preventScrollOnBrowserFocus: !0,
20668          type: "cellFocused"
20669        })
20670      );
20671    });
20672  }
20673  getAllCellCtrls() {
20674    const e = [], t = this.getAllRowCtrls(), i = t.length;
20675    for (let s = 0; s < i; s++) {
20676      const o = t[s].getAllCellCtrls(), n = o.length;
20677      for (let r = 0; r < n; r++)
20678        e.push(o[r]);
20679    }
20680    return e;
20681  }
20682  getAllRowCtrls() {
20683    const e = this.getStickyTopRowCtrls(), t = this.getStickyBottomRowCtrls();
20684    return [
20685      ...this.topRowCtrls,
20686      ...this.bottomRowCtrls,
20687      ...e,
20688      ...t,
20689      ...Object.values(this.rowCtrlsByRowIndex)
20690    ];
20691  }
20692  addRenderedRowListener(e, t, i) {
20693    const s = this.rowCtrlsByRowIndex[t];
20694    s && s.addEventListener(e, i);
20695  }
20696  refreshCells(e = {}) {
20697    const t = {
20698      forceRefresh: e.force,
20699      newData: !1,
20700      suppressFlash: e.suppressFlash
20701    };
20702    for (const i of this.getCellCtrls(e.rowNodes, e.columns))
20703      i.refreshOrDestroyCell(t);
20704    this.refreshFullWidth(e.rowNodes);
20705  }
20706  refreshFullWidth(e) {
20707    if (!e)
20708      return;
20709    let t = null;
20710    this.stickyRowFeature && (t = this.getCellToRestoreFocusToAfterRefresh() || null);
20711    for (const i of this.getRowCtrls(e)) {
20712      if (!i.isFullWidth())
20713        continue;
20714      i.refreshFullWidth() || this.redrawRow(i.rowNode, !0);
20715    }
20716    this.dispatchDisplayedRowsChanged(!1), t && this.restoreFocusedCell(t);
20717  }
20718  /**
20719   * @param rowNodes if provided, returns the RowCtrls for the provided rowNodes. otherwise returns all RowCtrls.
20720   */
20721  getRowCtrls(e) {
20722    const t = wn(e), i = this.getAllRowCtrls();
20723    return !e || !t ? i : i.filter((s) => {
20724      const o = s.rowNode;
20725      return Sn(o, t);
20726    });
20727  }
20728  // returns CellCtrl's that match the provided rowNodes and columns. eg if one row node
20729  // and two columns provided, that identifies 4 cells, so 4 CellCtrl's returned.
20730  getCellCtrls(e, t) {
20731    let i;
20732    A(t) && (i = {}, t.forEach((o) => {
20733      const n = this.colModel.getCol(o);
20734      A(n) && (i[n.getId()] = !0);
20735    }));
20736    const s = [];
20737    return this.getRowCtrls(e).forEach((o) => {
20738      o.getAllCellCtrls().forEach((n) => {
20739        const r = n.column.getId();
20740        i && !i[r] || s.push(n);
20741      });
20742    }), s;
20743  }
20744  destroy() {
20745    this.removeAllRowComps(!0), super.destroy();
20746  }
20747  removeAllRowComps(e = !1) {
20748    const t = Object.keys(this.rowCtrlsByRowIndex);
20749    this.removeRowCtrls(t, e), this.stickyRowFeature?.destroyStickyCtrls();
20750  }
20751  getRowsToRecycle() {
20752    const e = [];
20753    for (const [i, s] of Object.entries(this.rowCtrlsByRowIndex))
20754      s.rowNode.id == null && e.push(i);
20755    this.removeRowCtrls(e);
20756    const t = {};
20757    for (const i of Object.values(this.rowCtrlsByRowIndex)) {
20758      const s = i.rowNode;
20759      t[s.id] = i;
20760    }
20761    return this.rowCtrlsByRowIndex = {}, t;
20762  }
20763  // takes array of row indexes
20764  removeRowCtrls(e, t = !1) {
20765    e.forEach((i) => {
20766      const s = this.rowCtrlsByRowIndex[i];
20767      s && (s.destroyFirstPass(t), s.destroySecondPass()), delete this.rowCtrlsByRowIndex[i];
20768    });
20769  }
20770  onBodyScroll(e) {
20771    e.direction === "vertical" && this.redraw({ afterScroll: !0 });
20772  }
20773  // gets called when rows don't change, but viewport does, so after:
20774  // 1) height of grid body changes, ie number of displayed rows has changed
20775  // 2) grid scrolled to new position
20776  // 3) ensure index visible (which is a scroll)
20777  redraw(e = {}) {
20778    const { afterScroll: t } = e;
20779    let i;
20780    const s = this.stickyRowFeature;
20781    s && (i = this.getCellToRestoreFocusToAfterRefresh() || void 0);
20782    const o = this.firstRenderedRow, n = this.lastRenderedRow;
20783    this.workOutFirstAndLastRowsToRender();
20784    let r = !1;
20785    if (s) {
20786      r = s.checkStickyRows();
20787      const l = s.extraTopHeight + s.extraBottomHeight;
20788      l && this.updateContainerHeights(l);
20789    }
20790    const a = this.firstRenderedRow !== o || this.lastRenderedRow !== n;
20791    if (!(t && !r && !a) && (this.getLockOnRefresh(), this.recycleRows(null, !1, t), this.releaseLockOnRefresh(), this.dispatchDisplayedRowsChanged(t && !r), i != null)) {
20792      const l = this.getCellToRestoreFocusToAfterRefresh();
20793      i != null && l == null && (this.beans.animationFrameSvc?.flushAllFrames(), this.restoreFocusedCell(i));
20794    }
20795  }
20796  removeRowCompsNotToDraw(e, t) {
20797    const i = {};
20798    e.forEach((n) => i[n] = !0);
20799    const o = Object.keys(this.rowCtrlsByRowIndex).filter((n) => !i[n]);
20800    this.removeRowCtrls(o, t);
20801  }
20802  calculateIndexesToDraw(e) {
20803    const t = [];
20804    for (let o = this.firstRenderedRow; o <= this.lastRenderedRow; o++)
20805      t.push(o);
20806    const i = (o) => {
20807      const n = o.rowNode.rowIndex;
20808      n != null && (n < this.firstRenderedRow || n > this.lastRenderedRow) && this.doNotUnVirtualiseRow(o) && t.push(n);
20809    };
20810    for (const o of Object.values(this.rowCtrlsByRowIndex))
20811      i(o);
20812    if (e)
20813      for (const o of Object.values(e))
20814        i(o);
20815    t.sort((o, n) => o - n);
20816    const s = [];
20817    for (let o = 0; o < t.length; o++) {
20818      const n = t[o], r = this.rowModel.getRow(n);
20819      r && !r.sticky && s.push(n);
20820    }
20821    return s;
20822  }
20823  recycleRows(e, t = !1, i = !1) {
20824    const s = this.calculateIndexesToDraw(e);
20825    if ((this.printLayout || i) && (t = !1), this.removeRowCompsNotToDraw(s, !t), s.forEach((o) => {
20826      this.createOrUpdateRowCtrl(o, e, t, i);
20827    }), e) {
20828      const { animationFrameSvc: o } = this.beans;
20829      o && i && !this.gos.get("suppressAnimationFrame") && !this.printLayout ? o.addDestroyTask(() => {
20830        this.destroyRowCtrls(e, t), this.updateAllRowCtrls(), this.dispatchDisplayedRowsChanged();
20831      }) : this.destroyRowCtrls(e, t);
20832    }
20833    this.updateAllRowCtrls();
20834  }
20835  dispatchDisplayedRowsChanged(e = !1) {
20836    this.eventSvc.dispatchEvent({
20837      type: "displayedRowsChanged",
20838      afterScroll: e
20839    });
20840  }
20841  onDisplayedColumnsChanged() {
20842    const { visibleCols: e } = this.beans, t = e.isPinningLeft(), i = e.isPinningRight();
20843    (this.pinningLeft !== t || i !== this.pinningRight) && (this.pinningLeft = t, this.pinningRight = i, this.embedFullWidthRows && this.redrawFullWidthEmbeddedRows());
20844  }
20845  // when embedding, what gets showed in each section depends on what is pinned. eg if embedding group expand / collapse,
20846  // then it should go into the pinned left area if pinning left, or the center area if not pinning.
20847  redrawFullWidthEmbeddedRows() {
20848    const e = [];
20849    this.getFullWidthRowCtrls().forEach((t) => {
20850      const i = t.rowNode.rowIndex;
20851      e.push(i.toString());
20852    }), this.refreshFloatingRowComps(), this.removeRowCtrls(e), this.redraw({ afterScroll: !0 });
20853  }
20854  getFullWidthRowCtrls(e) {
20855    const t = wn(e);
20856    return this.getAllRowCtrls().filter((i) => {
20857      if (!i.isFullWidth())
20858        return !1;
20859      const s = i.rowNode;
20860      return !(t != null && !Sn(s, t));
20861    });
20862  }
20863  createOrUpdateRowCtrl(e, t, i, s) {
20864    let o, n = this.rowCtrlsByRowIndex[e];
20865    if (n || (o = this.rowModel.getRow(e), A(o) && A(t) && t[o.id] && o.alreadyRendered && (n = t[o.id], t[o.id] = null)), !n)
20866      if (o || (o = this.rowModel.getRow(e)), A(o))
20867        n = this.createRowCon(o, i, s);
20868      else
20869        return;
20870    return o && (o.alreadyRendered = !0), this.rowCtrlsByRowIndex[e] = n, n;
20871  }
20872  destroyRowCtrls(e, t) {
20873    const i = [];
20874    if (e) {
20875      for (const s of Object.values(e))
20876        if (s) {
20877          if (this.cachedRowCtrls && s.isCacheable()) {
20878            this.cachedRowCtrls.addRow(s);
20879            continue;
20880          }
20881          if (s.destroyFirstPass(!t), t) {
20882            const o = s.instanceId;
20883            this.zombieRowCtrls[o] = s, i.push(() => {
20884              s.destroySecondPass(), delete this.zombieRowCtrls[o];
20885            });
20886          } else
20887            s.destroySecondPass();
20888        }
20889    }
20890    t && (i.push(() => {
20891      this.updateAllRowCtrls(), this.dispatchDisplayedRowsChanged();
20892    }), window.setTimeout(() => i.forEach((s) => s()), jS));
20893  }
20894  getRowBuffer() {
20895    return this.gos.get("rowBuffer");
20896  }
20897  getRowBufferInPixels() {
20898    const e = this.getRowBuffer(), t = kt(this.beans);
20899    return e * t;
20900  }
20901  workOutFirstAndLastRowsToRender() {
20902    const { rowContainerHeight: e, pageBounds: t, rowModel: i } = this;
20903    e.updateOffset();
20904    let s, o;
20905    if (!i.isRowsToRender())
20906      s = 0, o = -1;
20907    else if (this.printLayout)
20908      this.beans.environment.refreshRowHeightVariable(), s = t.getFirstRow(), o = t.getLastRow();
20909    else {
20910      const c = this.getRowBufferInPixels(), u = this.ctrlsSvc.getScrollFeature(), h = this.gos.get("suppressRowVirtualisation");
20911      let g = !1, p, f;
20912      do {
20913        const v = t.getPixelOffset(), { pageFirstPixel: P, pageLastPixel: T } = t.getCurrentPagePixelRange(), D = e.divStretchOffset, R = u.getVScrollPosition(), E = R.top, k = R.bottom;
20914        h ? (p = P + D, f = T + D) : (p = Math.max(E + v - c, P) + D, f = Math.min(k + v + c, T) + D), this.firstVisibleVPixel = Math.max(E + v, P) + D, this.lastVisibleVPixel = Math.min(k + v, T) + D, g = this.ensureAllRowsInRangeHaveHeightsCalculated(p, f);
20915      } while (g);
20916      let m = i.getRowIndexAtPixel(p), C = i.getRowIndexAtPixel(f);
20917      const w = t.getFirstRow(), S = t.getLastRow();
20918      m < w && (m = w), C > S && (C = S), s = m, o = C;
20919    }
20920    const n = de(this.gos, "normal"), r = this.gos.get("suppressMaxRenderedRowRestriction"), a = Math.max(this.getRowBuffer(), 500);
20921    n && !r && o - s > a && (o = s + a);
20922    const l = s !== this.firstRenderedRow, d = o !== this.lastRenderedRow;
20923    (l || d) && (this.firstRenderedRow = s, this.lastRenderedRow = o, this.eventSvc.dispatchEvent({
20924      type: "viewportChanged",
20925      firstRow: s,
20926      lastRow: o
20927    }));
20928  }
20929  /**
20930   * This event will only be fired once, and is queued until after the browser next renders.
20931   * This allows us to fire an event during the start of the render cycle, when we first see data being rendered
20932   * but not execute the event until all of the data has finished being rendered to the dom.
20933   */
20934  dispatchFirstDataRenderedEvent() {
20935    this.dataFirstRenderedFired || (this.dataFirstRenderedFired = !0, window.requestAnimationFrame(() => {
20936      this.beans.eventSvc.dispatchEvent({
20937        type: "firstDataRendered",
20938        firstRow: this.firstRenderedRow,
20939        lastRow: this.lastRenderedRow
20940      });
20941    }));
20942  }
20943  ensureAllRowsInRangeHaveHeightsCalculated(e, t) {
20944    const i = this.pinnedRowModel?.ensureRowHeightsValid(), s = this.stickyRowFeature?.ensureRowHeightsValid(), { pageBounds: o, rowModel: n } = this, r = n.ensureRowHeightsValid(
20945      e,
20946      t,
20947      o.getFirstRow(),
20948      o.getLastRow()
20949    );
20950    return (r || s) && this.eventSvc.dispatchEvent({
20951      type: "recalculateRowBounds"
20952    }), s || r || i ? (this.updateContainerHeights(), !0) : !1;
20953  }
20954  // check that none of the rows to remove are editing or focused as:
20955  // a) if editing, we want to keep them, otherwise the user will loose the context of the edit,
20956  //    eg user starts editing, enters some text, then scrolls down and then up, next time row rendered
20957  //    the edit is reset - so we want to keep it rendered.
20958  // b) if focused, we want ot keep keyboard focus, so if user ctrl+c, it goes to clipboard,
20959  //    otherwise the user can range select and drag (with focus cell going out of the viewport)
20960  //    and then ctrl+c, nothing will happen if cell is removed from dom.
20961  // c) if detail record of master detail, as users complained that the context of detail rows
20962  //    was getting lost when detail row out of view. eg user expands to show detail row,
20963  //    then manipulates the detail panel (eg sorts the detail grid), then context is lost
20964  //    after detail panel is scrolled out of / into view.
20965  doNotUnVirtualiseRow(e) {
20966    const s = e.rowNode, o = this.focusSvc.isRowNodeFocused(s), n = e.editing, r = s.detail;
20967    return o || n || r ? !!this.isRowPresent(s) : !1;
20968  }
20969  isRowPresent(e) {
20970    return this.rowModel.isRowPresent(e) ? this.beans.pagination?.isRowPresent(e) ?? !0 : !1;
20971  }
20972  createRowCon(e, t, i) {
20973    const s = this.cachedRowCtrls?.getRow(e) ?? null;
20974    if (s)
20975      return s;
20976    const o = this.gos.get("suppressAnimationFrame"), n = i && !o && !this.printLayout && !!this.beans.animationFrameSvc;
20977    return new un(e, this.beans, t, n, this.printLayout);
20978  }
20979  getRenderedNodes() {
20980    const e = this.rowCtrlsByRowIndex;
20981    return Object.values(e).map((t) => t.rowNode);
20982  }
20983  getRowByPosition(e) {
20984    let t;
20985    const { rowIndex: i } = e;
20986    switch (e.rowPinned) {
20987      case "top":
20988        t = this.topRowCtrls[i];
20989        break;
20990      case "bottom":
20991        t = this.bottomRowCtrls[i];
20992        break;
20993      default:
20994        t = this.rowCtrlsByRowIndex[i], t || (t = this.getStickyTopRowCtrls().find((s) => s.rowNode.rowIndex === i) || null, t || (t = this.getStickyBottomRowCtrls().find((s) => s.rowNode.rowIndex === i) || null));
20995        break;
20996    }
20997    return t;
20998  }
20999  // returns true if any row between startIndex and endIndex is rendered. used by
21000  // SSRM or IRM, as they don't want to purge visible blocks from cache.
21001  isRangeInRenderedViewport(e, t) {
21002    if (e == null || t == null)
21003      return !1;
21004    const s = e > this.lastRenderedRow;
21005    return !(t < this.firstRenderedRow) && !s;
21006  }
21007}, YS = class {
21008  constructor(e) {
21009    this.entriesMap = {}, this.entriesList = [], this.maxCount = e;
21010  }
21011  addRow(e) {
21012    if (this.entriesMap[e.rowNode.id] = e, this.entriesList.push(e), e.setCached(!0), this.entriesList.length > this.maxCount) {
21013      const t = this.entriesList[0];
21014      t.destroyFirstPass(), t.destroySecondPass(), this.removeFromCache(t);
21015    }
21016  }
21017  getRow(e) {
21018    if (e == null || e.id == null)
21019      return null;
21020    const t = this.entriesMap[e.id];
21021    return t ? (this.removeFromCache(t), t.setCached(!1), t.rowNode != e ? null : t) : null;
21022  }
21023  has(e) {
21024    return this.entriesMap[e.id] != null;
21025  }
21026  removeRow(e) {
21027    const t = e.id, i = this.entriesMap[t];
21028    delete this.entriesMap[t], Ve(this.entriesList, i);
21029  }
21030  removeFromCache(e) {
21031    const t = e.rowNode.id;
21032    delete this.entriesMap[t], Ve(this.entriesList, e);
21033  }
21034  getEntries() {
21035    return this.entriesList;
21036  }
21037};
21038function wn(e) {
21039  if (!e)
21040    return;
21041  const t = {
21042    top: {},
21043    bottom: {},
21044    normal: {}
21045  };
21046  return e.forEach((i) => {
21047    const s = i.id;
21048    switch (i.rowPinned) {
21049      case "top":
21050        t.top[s] = i;
21051        break;
21052      case "bottom":
21053        t.bottom[s] = i;
21054        break;
21055      default:
21056        t.normal[s] = i;
21057        break;
21058    }
21059  }), t;
21060}
21061function Sn(e, t) {
21062  const i = e.id;
21063  switch (e.rowPinned) {
21064    case "top":
21065      return t.top[i] != null;
21066    case "bottom":
21067      return t.bottom[i] != null;
21068    default:
21069      return t.normal[i] != null;
21070  }
21071}
21072var QS = class extends y {
21073  constructor() {
21074    super(...arguments), this.beanName = "rowNodeSorter";
21075  }
21076  postConstruct() {
21077    const { gos: e } = this;
21078    this.isAccentedSort = e.get("accentedSort"), this.primaryColumnsSortGroups = Ke(e), this.addManagedPropertyListener(
21079      "accentedSort",
21080      (t) => this.isAccentedSort = t.currentValue
21081    ), this.addManagedPropertyListener(
21082      "autoGroupColumnDef",
21083      () => this.primaryColumnsSortGroups = Ke(e)
21084    );
21085  }
21086  doFullSort(e, t) {
21087    const i = e.map((s, o) => ({
21088      currentPos: o,
21089      rowNode: s
21090    }));
21091    return i.sort(this.compareRowNodes.bind(this, t)), i.map((s) => s.rowNode);
21092  }
21093  compareRowNodes(e, t, i) {
21094    const s = t.rowNode, o = i.rowNode;
21095    for (let n = 0, r = e.length; n < r; n++) {
21096      const a = e[n], l = a.sort === "desc", d = this.getValue(s, a.column), c = this.getValue(o, a.column);
21097      let u;
21098      const h = this.getComparator(a, s);
21099      if (h ? u = h(d, c, s, o, l) : u = Qh(d, c, this.isAccentedSort), !isNaN(u) && u !== 0)
21100        return a.sort === "asc" ? u : u * -1;
21101    }
21102    return t.currentPos - i.currentPos;
21103  }
21104  getComparator(e, t) {
21105    const i = e.column, s = i.getColDef().comparator;
21106    if (s != null)
21107      return s;
21108    if (!i.getColDef().showRowGroup)
21109      return;
21110    const o = !t.group && i.getColDef().field;
21111    if (!o)
21112      return;
21113    const n = this.beans.colModel.getColDefCol(o);
21114    if (n)
21115      return n.getColDef().comparator;
21116  }
21117  getValue(e, t) {
21118    const { valueSvc: i, colModel: s, showRowGroupCols: o, gos: n } = this.beans;
21119    if (!this.primaryColumnsSortGroups)
21120      return i.getValue(t, e, !1);
21121    if (e.rowGroupColumn === t) {
21122      if (Wn(n, s.isPivotActive())) {
21123        const d = e.allLeafChildren?.[0];
21124        return d ? i.getValue(t, d, !1) : void 0;
21125      }
21126      const l = o?.getShowRowGroupCol(t.getId());
21127      return l ? e.groupData?.[l.getId()] : void 0;
21128    }
21129    if (!(e.group && t.getColDef().showRowGroup))
21130      return i.getValue(t, e, !1);
21131  }
21132};
21133function ZS(e) {
21134  e.sortSvc?.onSortChanged("api");
21135}
21136function Ti(e, t) {
21137  return (
21138    /* html */
21139    `<span data-ref="eSort${e}" class="ag-sort-indicator-icon ag-sort-${t} ag-hidden" aria-hidden="true"></span>`
21140  );
21141}
21142var XS = (
21143  /* html */
21144  `<span class="ag-sort-indicator-container">
21145        ${Ti("Order", "order")}
21146        ${Ti("Asc", "ascending-icon")}
21147        ${Ti("Desc", "descending-icon")}
21148        ${Ti("Mixed", "mixed-icon")}
21149        ${Ti("None", "none-icon")}
21150    </span>`
21151), cr = class extends _ {
21152  constructor(e) {
21153    super(), this.eSortOrder = M, this.eSortAsc = M, this.eSortDe
21153sc = M, this.eSortMixed = M, this.eSortNone = M, e || this.setTemplate(XS);
21154  }
21155  attachCustomElements(e, t, i, s, o) {
21156    this.eSortOrder = e, this.eSortAsc = t, this.eSortDesc = i, this.eSortMixed = s, this.eSortNone = o;
21157  }
21158  setupSort(e, t = !1) {
21159    if (this.column = e, this.suppressOrder = t, this.setupMultiSortIndicator(), !e.isSortable() && !e.getColDef().showRowGroup)
21160      return;
21161    this.addInIcon("sortAscending", this.eSortAsc, e), this.addInIcon("sortDescending", this.eSortDesc, e), this.addInIcon("sortUnSort", this.eSortNone, e);
21162    const i = this.updateIcons.bind(this), s = this.onSortChanged.bind(this);
21163    this.addManagedPropertyListener("unSortIcon", i), this.addManagedEventListeners({
21164      newColumnsLoaded: i,
21165      // Watch global events, as row group columns can effect their display column.
21166      sortChanged: s,
21167      // when grouping changes so can sort indexes and icons
21168      columnRowGroupChanged: s
21169    }), this.onSortChanged();
21170  }
21171  addInIcon(e, t, i) {
21172    if (t == null)
21173      return;
21174    const s = Te(e, this.beans, i);
21175    s && t.appendChild(s);
21176  }
21177  onSortChanged() {
21178    this.updateIcons(), this.suppressOrder || this.updateSortOrder();
21179  }
21180  updateIcons() {
21181    const { eSortAsc: e, eSortDesc: t, eSortNone: i, column: s, gos: o, beans: n } = this, r = n.sortSvc.getDisplaySortForColumn(s);
21182    if (e && Q(e, r === "asc", { skipAriaHidden: !0 }), t && Q(t, r === "desc", { skipAriaHidden: !0 }), i) {
21183      const a = !s.getColDef().unSortIcon && !o.get("unSortIcon"), l = r == null;
21184      Q(i, !a && l, { skipAriaHidden: !0 });
21185    }
21186  }
21187  setupMultiSortIndicator() {
21188    const { eSortMixed: e, column: t, gos: i } = this;
21189    this.addInIcon("sortUnSort", e, t);
21190    const s = t.getColDef().showRowGroup;
21191    Ke(i) && s && (this.addManagedEventListeners({
21192      // Watch global events, as row group columns can effect their display column.
21193      sortChanged: this.updateMultiSortIndicator.bind(this),
21194      // when grouping changes so can sort indexes and icons
21195      columnRowGroupChanged: this.updateMultiSortIndicator.bind(this)
21196    }), this.updateMultiSortIndicator());
21197  }
21198  updateMultiSortIndicator() {
21199    const { eSortMixed: e, beans: t, column: i } = this;
21200    if (e) {
21201      const s = t.sortSvc.getDisplaySortForColumn(i) === "mixed";
21202      Q(e, s, { skipAriaHidden: !0 });
21203    }
21204  }
21205  // we listen here for global sort events, NOT column sort events, as we want to do this
21206  // when sorting has been set on all column (if we listened just for our col (where we
21207  // set the asc / desc icons) then it's possible other cols are yet to get their sorting state.
21208  updateSortOrder() {
21209    const {
21210      eSortOrder: e,
21211      column: t,
21212      beans: { sortSvc: i }
21213    } = this;
21214    if (!e)
21215      return;
21216    const s = i.getColumnsWithSortingOrdered(), o = i.getDisplaySortIndexForColumn(t) ?? -1, n = s.some(
21217      (a) => i.getDisplaySortIndexForColumn(a) ?? !1
21218    ), r = o >= 0 && n;
21219    Q(e, r, { skipAriaHidden: !0 }), o >= 0 ? e.textContent = (o + 1).toString() : ue(e);
21220  }
21221}, JS = {
21222  selector: "AG-SORT-INDICATOR",
21223  component: cr
21224}, os = ["asc", "desc", null], eb = class extends y {
21225  constructor() {
21226    super(...arguments), this.beanName = "sortSvc";
21227  }
21228  progressSort(e, t, i) {
21229    const s = this.getNextSortDirection(e);
21230    this.setSortForColumn(e, s, t, i);
21231  }
21232  progressSortFromEvent(e, t) {
21233    const s = this.gos.get("multiSortKey") === "ctrl" ? t.ctrlKey || t.metaKey : t.shiftKey;
21234    this.progressSort(e, s, "uiColumnSorted");
21235  }
21236  setSortForColumn(e, t, i, s) {
21237    t !== "asc" && t !== "desc" && (t = null);
21238    const { gos: o, showRowGroupCols: n } = this.beans, r = Ke(o);
21239    let a = [e];
21240    if (r && e.getColDef().showRowGroup) {
21241      const u = n?.getSourceColumnsForGroupColumn?.(e)?.filter((h) => h.isSortable());
21242      u && (a = [e, ...u]);
21243    }
21244    a.forEach((c) => this.setColSort(c, t, s));
21245    const l = (i || o.get("alwaysMultiSort")) && !o.get("suppressMultiSort"), d = [];
21246    if (!l) {
21247      const c = this.clearSortBarTheseColumns(a, s);
21248      d.push(...c);
21249    }
21250    this.updateSortIndex(e), d.push(...a), this.dispatchSortChangedEvents(s, d);
21251  }
21252  updateSortIndex(e) {
21253    const { gos: t, colModel: i, showRowGroupCols: s } = this.beans, o = Ke(t), n = s?.getShowRowGroupCol(e.getId()), r = o && n || e, a = this.getColumnsWithSortingOrdered();
21254    i.getAllCols().forEach((c) => this.setColSortIndex(c, null));
21255    const l = a.filter((c) => o && c.getColDef().showRowGroup ? !1 : c !== r);
21256    (r.getSort() ? [...l, r] : l).forEach((c, u) => this.setColSortIndex(c, u));
21257  }
21258  // gets called by API, so if data changes, use can call this, which will end up
21259  // working out the sort order again of the rows.
21260  onSortChanged(e, t) {
21261    this.dispatchSortChangedEvents(e, t);
21262  }
21263  isSortActive() {
21264    const t = this.beans.colModel.getAllCols().filter((i) => !!i.getSort());
21265    return t && t.length > 0;
21266  }
21267  dispatchSortChangedEvents(e, t) {
21268    const i = {
21269      type: "sortChanged",
21270      source: e
21271    };
21272    t && (i.columns = t), this.eventSvc.dispatchEvent(i);
21273  }
21274  clearSortBarTheseColumns(e, t) {
21275    const i = [];
21276    return this.beans.colModel.getAllCols().forEach((s) => {
21277      e.includes(s) || (s.getSort() && i.push(s), this.setColSort(s, void 0, t));
21278    }), i;
21279  }
21280  getNextSortDirection(e) {
21281    const t = e.getColDef().sortingOrder ?? this.gos.get("sortingOrder") ?? os, i = t.indexOf(e.getSort()), s = i < 0, o = i == t.length - 1;
21282    return s || o ? t[0] : t[i + 1];
21283  }
21284  /**
21285   * @returns a map of sort indexes for every sorted column, if groups sort primaries then they will have equivalent indices
21286   */
21287  getIndexedSortMap() {
21288    const { gos: e, colModel: t, showRowGroupCols: i, rowGroupColsSvc: s } = this.beans;
21289    let o = t.getAllCols().filter((d) => !!d.getSort());
21290    if (t.isPivotMode()) {
21291      const d = Ke(e);
21292      o = o.filter((c) => {
21293        const u = !!c.getAggFunc(), h = !c.isPrimary(), g = d ? i?.getShowRowGroupCol(c.getId()) : c.getColDef().showRowGroup;
21294        return u || h || g;
21295      });
21296    }
21297    const n = s?.columns.filter((d) => !!d.getSort()) ?? [], r = {};
21298    o.forEach((d, c) => r[d.getId()] = c), o.sort((d, c) => {
21299      const u = d.getSortIndex(), h = c.getSortIndex();
21300      if (u != null && h != null)
21301        return u - h;
21302      if (u == null && h == null) {
21303        const g = r[d.getId()], p = r[c.getId()];
21304        return g > p ? 1 : -1;
21305      } else return h == null ? -1 : 1;
21306    });
21307    const a = Ke(e) && !!n.length;
21308    a && (o = [
21309      ...new Set(
21310        // if linked sorting, replace all columns with the display group column for index purposes, and ensure uniqueness
21311        o.map((d) => i?.getShowRowGroupCol(d.getId()) ?? d)
21312      )
21313    ]);
21314    const l = /* @__PURE__ */ new Map();
21315    return o.forEach((d, c) => l.set(d, c)), a && n.forEach((d) => {
21316      const c = i.getShowRowGroupCol(d.getId());
21317      l.set(d, l.get(c));
21318    }), l;
21319  }
21320  getColumnsWithSortingOrdered() {
21321    return [...this.getIndexedSortMap().entries()].sort(([e, t], [i, s]) => t - s).map(([e]) => e);
21322  }
21323  // used by server side row models, to sent sort to server
21324  getSortModel() {
21325    return this.getColumnsWithSortingOrdered().filter((e) => e.getSort()).map((e) => ({
21326      sort: e.getSort(),
21327      colId: e.getId()
21328    }));
21329  }
21330  getSortOptions() {
21331    return this.getColumnsWithSortingOrdered().filter((e) => e.getSort()).map((e) => ({
21332      sort: e.getSort(),
21333      column: e
21334    }));
21335  }
21336  canColumnDisplayMixedSort(e) {
21337    const t = Ke(this.gos), i = !!e.getColDef().showRowGroup;
21338    return t && i;
21339  }
21340  getDisplaySortForColumn(e) {
21341    const t = this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);
21342    if (!this.canColumnDisplayMixedSort(e) || !t?.length)
21343      return e.getSort();
21344    const s = e.getColDef().field != null || !!e.getColDef().valueGetter ? [e, ...t] : t, o = s[0].getSort();
21345    return s.every((r) => r.getSort() == o) ? o : "mixed";
21346  }
21347  getDisplaySortIndexForColumn(e) {
21348    return this.getIndexedSortMap().get(e);
21349  }
21350  setupHeader(e, t, i) {
21351    let s = 0;
21352    e.addManagedListeners(t, {
21353      movingChanged: () => {
21354        s = (/* @__PURE__ */ new Date()).getTime();
21355      }
21356    }), i && e.addManagedElementListeners(i, {
21357      click: (n) => {
21358        const r = t.isMoving(), l = (/* @__PURE__ */ new Date()).getTime() - s < 50;
21359        r || l || this.progressSortFromEvent(t, n);
21360      }
21361    });
21362    const o = () => {
21363      const n = t.getSort();
21364      if (e.addOrRemoveCssClass("ag-header-cell-sorted-asc", n === "asc"), e.addOrRemoveCssClass("ag-header-cell-sorted-desc", n === "desc"), e.addOrRemoveCssClass("ag-header-cell-sorted-none", !n), t.getColDef().showRowGroup) {
21365        const l = !this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(
21366          (d) =>
21366 t.getSort() == d.getSort()
21367        );
21368        e.addOrRemoveCssClass("ag-header-cell-sorted-mixed", l);
21369      }
21370    };
21371    e.addManagedEventListeners({
21372      sortChanged: o,
21373      columnRowGroupChanged: o
21374    });
21375  }
21376  initCol(e) {
21377    const { sort: t, initialSort: i, sortIndex: s, initialSortIndex: o } = e.colDef;
21378    t !== void 0 ? (t === "asc" || t === "desc") && (e.sort = t) : (i === "asc" || i === "desc") && (e.sort = i), s !== void 0 ? s !== null && (e.sortIndex = s) : o !== null && (e.sortIndex = o);
21379  }
21380  updateColSort(e, t, i) {
21381    t !== void 0 && (t === "desc" || t === "asc" ? this.setColSort(e, t, i) : this.setColSort(e, void 0, i));
21382  }
21383  setColSort(e, t, i) {
21384    e.sort !== t && (e.sort = t, e.dispatchColEvent("sortChanged", i)), e.dispatchStateUpdatedEvent("sort");
21385  }
21386  setColSortIndex(e, t) {
21387    e.sortIndex = t, e.dispatchStateUpdatedEvent("sortIndex");
21388  }
21389  createSortIndicator(e) {
21390    return new cr(e);
21391  }
21392  getSortIndicatorSelector() {
21393    return JS;
21394  }
21395}, ac = {
21396  moduleName: "Sort",
21397  version: I,
21398  beans: [eb, QS],
21399  apiFunctions: {
21400    onSortChanged: ZS
21401  },
21402  userComponents: {
21403    agSortIndicator: cr
21404  },
21405  icons: {
21406    // show on column header when column is sorted ascending
21407    sortAscending: "asc",
21408    // show on column header when column is sorted descending
21409    sortDescending: "desc",
21410    // show on column header when column has no sort, only when enabled with gridOptions.unSortIcon=true
21411    sortUnSort: "none"
21412  }
21413}, tb = class extends y {
21414  constructor() {
21415    super(...arguments), this.beanName = "syncSvc", this.waitingForColumns = !1;
21416  }
21417  postConstruct() {
21418    this.addManagedPropertyListener("columnDefs", (e) => this.setColumnDefs(e));
21419  }
21420  start() {
21421    this.beans.ctrlsSvc.whenReady(this, () => {
21422      const e = this.gos.get("columnDefs");
21423      e ? this.setColumnsAndData(e) : this.waitingForColumns = !0, this.gridReady();
21424    });
21425  }
21426  setColumnsAndData(e) {
21427    const { colModel: t, rowModel: i } = this.beans;
21428    t.setColumnDefs(e ?? [], "gridInitializing"), i.start();
21429  }
21430  gridReady() {
21431    const { eventSvc: e, gos: t } = this;
21432    e.dispatchEvent({
21433      type: "gridReady"
21434    }), bt(t, `initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`);
21435  }
21436  setColumnDefs(e) {
21437    const t = this.gos.get("columnDefs");
21438    if (t) {
21439      if (this.waitingForColumns) {
21440        this.waitingForColumns = !1, this.setColumnsAndData(t);
21441        return;
21442      }
21443      this.beans.colModel.setColumnDefs(t, ni(e.source));
21444    }
21445  }
21446};
21447function ib(e) {
21448  e.valueCache?.expire();
21449}
21450function sb(e, t) {
21451  const { colKey: i, rowNode: s, useFormatter: o } = t, n = e.colModel.getColDefCol(i) ?? e.colModel.getCol(i);
21452  if (Y(n))
21453    return null;
21454  const r = e.valueSvc.getValueForDisplay(n, s);
21455  return o ? e.valueSvc.formatValue(n, s, r) ?? Ze(r, !0) : r;
21456}
21457var Ks = class {
21458  constructor(e, t) {
21459    this.active = !0, this.nodeIdsToColumns = {}, this.mapToItems = {}, this.keepingColumns = e, this.pathRoot = {
21460      rowNode: t,
21461      children: null
21462    }, this.mapToItems[t.id] = this.pathRoot;
21463  }
21464  depthFirstSearchChangedPath(e, t) {
21465    const { rowNode: i, children: s } = e;
21466    if (s)
21467      for (let o = 0; o < s.length; ++o)
21468        this.depthFirstSearchChangedPath(s[o], t);
21469    t(i);
21470  }
21471  depthFirstSearchEverything(e, t, i) {
21472    const s = e.childrenAfterGroup;
21473    if (s)
21474      for (let o = 0, n = s.length; o < n; ++o) {
21475        const r = s[o];
21476        r.childrenAfterGroup ? this.depthFirstSearchEverything(r, t, i) : i && t(r);
21477      }
21478    t(e);
21479  }
21480  // traverseLeafNodes -> used when NOT doing changed path, ie traversing everything. the callback
21481  // will be called for child nodes in addition to parent nodes.
21482  forEachChangedNodeDepthFirst(e, t = !1, i = !1) {
21483    this.active && !i ? this.depthFirstSearchChangedPath(this.pathRoot, e) : this.depthFirstSearchEverything(this.pathRoot.rowNode, e, t);
21484  }
21485  executeFromRootNode(e) {
21486    e(this.pathRoot.rowNode);
21487  }
21488  createPathItems(e) {
21489    let t = e, i = 0;
21490    for (; !this.mapToItems[t.id]; ) {
21491      const s = {
21492        rowNode: t,
21493        children: null
21494      };
21495      this.mapToItems[t.id] = s, i++, t = t.parent;
21496    }
21497    return i;
21498  }
21499  populateColumnsMap(e, t) {
21500    if (!this.keepingColumns || !t)
21501      return;
21502    let i = e;
21503    for (; i; )
21504      this.nodeIdsToColumns[i.id] || (this.nodeIdsToColumns[i.id] = {}), t.forEach((s) => this.nodeIdsToColumns[i.id][s.getId()] = !0), i = i.parent;
21505  }
21506  linkPathItems(e, t) {
21507    let i = e;
21508    for (let s = 0; s < t; s++) {
21509      const o = this.mapToItems[i.id], n = this.mapToItems[i.parent.id];
21510      n.children || (n.children = []), n.children.push(o), i = i.parent;
21511    }
21512  }
21513  // called by
21514  // 1) change detection (provides cols) and
21515  // 2) groupStage if doing transaction update (doesn't provide cols)
21516  addParentNode(e, t) {
21517    if (!e || e.isRowPinned())
21518      return;
21519    const i = this.createPathItems(e);
21520    this.linkPathItems(e, i), this.populateColumnsMap(e, t);
21521  }
21522  canSkip(e) {
21523    return this.active && !this.mapToItems[e.id];
21524  }
21525  getValueColumnsForNode(e, t) {
21526    if (!this.keepingColumns)
21527      return t;
21528    const i = this.nodeIdsToColumns[e.id];
21529    return t.filter((o) => i[o.getId()]);
21530  }
21531  getNotValueColumnsForNode(e, t) {
21532    if (!this.keepingColumns)
21533      return null;
21534    const i = this.nodeIdsToColumns[e.id];
21535    return t.filter((o) => !i[o.getId()]);
21536  }
21537}, ob = "paste", nb = class extends y {
21538  constructor() {
21539    super(...arguments), this.beanName = "changeDetectionSvc", this.clientSideRowModel = null;
21540  }
21541  postConstruct() {
21542    const { gos: e, rowModel: t } = this.beans;
21543    me(e) && (this.clientSideRowModel = t), this.addManagedEventListeners({ cellValueChanged: this.onCellValueChanged.bind(this) });
21544  }
21545  onCellValueChanged(e) {
21546    const { gos: t, rowRenderer: i } = this.beans;
21547    if (e.source === ob || t.get("suppressChangeDetection"))
21548      return;
21549    const s = e.node, o = [s], n = this.clientSideRowModel, r = n?.rootNode;
21550    if (r && !s.isRowPinned()) {
21551      const a = t.get("aggregateOnlyChangedColumns"), l = new Ks(a, r);
21552      l.addParentNode(s.parent, [e.column]), n.doAggregate(l), l.forEachChangedNodeDepthFirst((d) => {
21553        o.push(d);
21554      });
21555    }
21556    i.refreshCells({ rowNodes: o });
21557  }
21558}, rb = class extends y {
21559  constructor() {
21560    super(...arguments), this.beanName = "expressionSvc", this.cache = {};
21561  }
21562  evaluate(e, t) {
21563    if (typeof e == "string")
21564      return this.evaluateExpression(e, t);
21565    z(15, { expression: e });
21566  }
21567  evaluateExpression(e, t) {
21568    try {
21569      return this.createExpressionFunction(e)(
21570        t.value,
21571        t.context,
21572        t.oldValue,
21573        t.newValue,
21574        t.value,
21575        t.node,
21576        t.data,
21577        t.colDef,
21578        t.rowIndex,
21579        t.api,
21580        t.getValue,
21581        t.column,
21582        t.columnGroup
21583      );
21584    } catch (i) {
21585      return z(16, { expression: e, params: t, e: i }), null;
21586    }
21587  }
21588  createExpressionFunction(e) {
21589    const t = this.cache;
21590    if (t[e])
21591      return t[e];
21592    const i = this.createFunctionBody(e), s = new Function(
21593      "x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",
21594      i
21595    );
21596    return t[e] = s, s;
21597  }
21598  createFunctionBody(e) {
21599    return e.indexOf("return") >= 0 ? e : "return " + e + ";";
21600  }
21601}, ab = class extends y {
21602  constructor() {
21603    super(...arguments), this.beanName = "valueCache", this.cacheVersion = 0;
21604  }
21605  postConstruct() {
21606    const e = this.gos;
21607    this.active = e.get("valueCache"), this.neverExpires = e.get("valueCacheNeverExpires");
21608  }
21609  onDataChanged() {
21610    this.neverExpires || this.expire();
21611  }
21612  expire() {
21613    this.cacheVersion++;
21614  }
21615  setValue(e, t, i) {
21616    if (this.active) {
21617      const s = this.cacheVersion;
21618      e.__cacheVersion !== s && (e.__cacheVersion = s, e.__cacheData = {}), e.__cacheData[t] = i;
21619    }
21620  }
21621  getValue(e, t) {
21622    if (!(!this.active || e.__cacheVersion !== this.cacheVersion))
21623      return e.__cacheData[t];
21624  }
21625}, lb = {
21626  moduleName: "ValueCache",
21627  version: I,
21628  beans: [ab],
21629  apiFunctions: {
21630    expireValueCache: ib
21631  }
21632}, db = {
21633  moduleName: "Expression",
21634  version: I,
21635  beans: [rb]
21636}, cb = {
21637  moduleName: "ChangeDetection",
21638  version: I,
21639  beans: [nb]
21640}, ub = {
21641  moduleName: "CellApi",
21642  version: I,
21643  apiFunctions: {
21644    getCellValue: sb
21645  }
21646}, hb = class extends y {
21647  constructor() {
21648    super(...arguments), this.beanName = "valueSvc", this.initialised = !1, this.isSsrm = !1;
21649  }
21650  wireBeans(e) {
21651    this.expressionSvc = e.expressionSvc, this.colModel = e.colModel, this.valueCache = e.valueCache, this.dataTypeSvc = e.dataTypeSvc;
21652  }
21653  postConstruct() {
21654    this.initialised || this.init();
21655  }
21656  init() {
21657    this.executeValueGetter = this.valueCache ? this.executeValueGetterWithValueCache.bind(this) : this.executeValueGetterWithoutValueCache.bind(this), this.isSsrm = as(this.gos), this.cellExpressions = this.gos.get("enableCellExpressions"), this.isTreeData = this.gos.get("treeData"), this.initialised = !0;
21658    const e = (t) => this.callColumnCellValueChangedHandler(t);
21659    this.eventSvc.addEventListener("cellValueChanged", e, !0), this.addDestroyFunc(() => this.eventSvc.removeEventListener("cellValueChanged", e, !0)), this.addManagedPropertyListener("treeData", (t) => this.isTreeData = t.currentValue);
21660  }
21661  /**
21662   * Use this function to get a displayable cell value.
21663   * This hides values in expanded group rows which are instead displayed by the footer row.
21664   */
21665  getValueForDisplay(e, t) {
21666    const i = t.leafGroup && this.colModel.isPivotMode(), s = t.group && t.expanded && !t.footer && !i, o = this.gos.get("groupSuppressBlankHeader");
21667    if (!s || o)
21668      return this.getValue(e, t);
21669    let n = !1;
21670    const r = this.gos.get("groupTotalRow");
21671    typeof r != "function" ? n = !!r : n = !!this.gos.getCallback("groupTotalRow")({ node: this });
21672    const a = s && n;
21673    return this.getValue(e, t, a);
21674  }
21675  getValue(e, t, i = !1) {
21676    if (this.initialised || this.init(), !t)
21677      return;
21678    const s = e.getColDef(), o = s.field, n = e.getColId(), r = t.data;
21679    let a;
21680    const l = t.groupData && t.groupData[n] !== void 0, d = !i && t.aggData && t.aggData[n] !== void 0, c = this.isSsrm && i && !!e.getColDef().aggFunc, u = this.isSsrm && t.footer && t.field && (e.getColDef().showRowGroup === !0 || e.getColDef().showRowGroup === t.field);
21681    if (this.isTreeData && d ? a = t.aggData[n] : this.isTreeData && s.valueGetter ? a = this.executeValueGetter(s.valueGetter, r, e, t) : this.isTreeData && o && r ? a = Vi(r, o, e.isFieldContainsDots()) : l ? a = t.groupData[n] : d ? a = t.aggData[n] : s.valueGetter ? a = this.executeValueGetter(s.valueGetter, r, e, t) : u ? a = Vi(r, t.field, e.isFieldContainsDots()) : o && r && !c && (a = Vi(r, o, e.isFieldContainsDots())), this.cellExpressions && typeof a == "string" && a.indexOf("=") === 0) {
21682      const h = a.substring(1);
21683      a = this.executeValueGetter(h, r, e, t);
21684    }
21685    if (a == null) {
21686      const h = this.getOpenedGroup(t, e);
21687      if (h != null)
21688        return h;
21689    }
21690    return a;
21691  }
21692  parseValue(e, t, i, s) {
21693    const o = e.getColDef(), n = o.valueParser;
21694    if (A(n)) {
21695      const r = this.gos.addGridCommonParams({
21696        node: t,
21697        data: t?.data,
21698        oldValue: s,
21699        newValue: i,
21700        colDef: o,
21701        column: e
21702      });
21703      return typeof n == "function" ? n(r) : this.expressionSvc?.evaluate(n, r);
21704    }
21705    return i;
21706  }
21707  getDeleteValue(e, t) {
21708    return A(e.getColDef().valueParser) ? this.parseValue(e, t, "", this.getValueForDisplay(e, t)) ?? null : null;
21709  }
21710  formatValue(e, t, i, s, o = !0) {
21711    let n = null, r;
21712    const a = e.getColDef();
21713    if (s ? r = s : o && (r = a.valueFormatter), r) {
21714      const l = this.gos.addGridCommonParams({
21715        value: i,
21716        node: t,
21717        data: t ? t.data : null,
21718        colDef: a,
21719        column: e
21720      });
21721      typeof r == "function" ? n = r(l) : n = this.expressionSvc ? this.expressionSvc.evaluate(r, l) : null;
21722    } else if (a.refData)
21723      return a.refData[i] || "";
21724    return n == null && Array.isArray(i) && (n = i.join(", ")), n;
21725  }
21726  getOpenedGroup(e, t) {
21727    if (!this.gos.get("showOpenedGroup") || !t.getColDef().showRowGroup)
21728      return;
21729    const s = t.getColDef().showRowGroup;
21730    let o = e.parent;
21731    for (; o != null; ) {
21732      if (o.rowGroupColumn && (s === !0 || s === o.rowGroupColumn.getColId()))
21733        return o.key;
21734      o = o.parent;
21735    }
21736  }
21737  /**
21738   * Sets the value of a GridCell
21739   * @param rowNode The `RowNode` to be updated
21740   * @param colKey The `Column` to be updated
21741   * @param newValue The new value to be set
21742   * @param eventSource The event source
21743   * @returns `True` if the value has been updated, otherwise`False`.
21744   */
21745  setValue(e, t, i, s) {
21746    const o = this.colModel.getColDefCol(t);
21747    if (!e || !o)
21748      return !1;
21749    Y(e.data) && (e.data = {});
21750    const { field: n, valueSetter: r } = o.getColDef();
21751    if (Y(n) && Y(r))
21752      return x(17), !1;
21753    if (this.dataTypeSvc && !this.dataTypeSvc.checkType(o, i))
21754      return x(135), !1;
21755    const a = this.gos.addGridCommonParams({
21756      node: e,
21757      data: e.data,
21758      oldValue: this.getValue(o, e),
21759      newValue: i,
21760      colDef: o.getColDef(),
21761      column: o
21762    });
21763    a.newValue = i;
21764    let l;
21765    if (A(r) ? typeof r == "function" ? l = r(a) : l = this.expressionSvc?.evaluate(r, a) : l = this.setValueUsingField(e.data, n, i, o.isFieldContainsDots()), l === void 0 && (l = !0), !l)
21766      return !1;
21767    e.resetQuickFilterAggregateText(), this.valueCache?.onDataChanged();
21768    const d = this.getValue(o, e);
21769    return this.eventSvc.dispatchEvent({
21770      type: "cellValueChanged",
21771      event: null,
21772      rowIndex: e.rowIndex,
21773      rowPinned: e.rowPinned,
21774      column: a.column,
21775      colDef: a.colDef,
21776      data: e.data,
21777      node: e,
21778      oldValue: a.oldValue,
21779      newValue: d,
21780      value: d,
21781      source: s
21782    }), !0;
21783  }
21784  callColumnCellValueChangedHandler(e) {
21785    const t = e.colDef.onCellValueChanged;
21786    typeof t == "function" && this.beans.frameworkOverrides.wrapOutgoing(() => {
21787      t({
21788        node: e.node,
21789        data: e.data,
21790        oldValue: e.oldValue,
21791        newValue: e.newValue,
21792        colDef: e.colDef,
21793        column: e.column,
21794        api: e.api,
21795        context: e.context
21796      });
21797    });
21798  }
21799  setValueUsingField(e, t, i, s) {
21800    if (!t)
21801      return !1;
21802    let o = !1;
21803    if (!s)
21804      o = e[t] === i, o || (e[t] = i);
21805    else {
21806      const n = t.split(".");
21807      let r = e;
21808      for (; n.length > 0 && r; ) {
21809        const a = n.shift();
21810        n.length === 0 ? (o = r[a] === i, o || (r[a] = i)) : r = r[a];
21811      }
21812    }
21813    return !o;
21814  }
21815  executeValueGetterWithValueCache(e, t, i, s) {
21816    const o = i.getColId(), n = this.valueCache.getValue(s, o);
21817    if (n !== void 0)
21818      return n;
21819    const r = this.executeValueGetterWithoutValueCache(e, t, i, s);
21820    return this.valueCache.setValue(s, o, r), r;
21821  }
21822  executeValueGetterWithoutValueCache(e, t, i, s) {
21823    const o = this.gos.addGridCommonParams({
21824      data: t,
21825      node: s,
21826      column: i,
21827      colDef: i.getColDef(),
21828      getValue: this.getValueCallback.bind(this, s)
21829    });
21830    let n;
21831    return typeof e == "function" ? n = e(o) : n = this.expressionSvc?.evaluate(e, o), n;
21832  }
21833  getValueCallback(e, t) {
21834    const i = this.colModel.getColDefCol(t);
21835    return i ? this.getValue(i, e) : null;
21836  }
21837  // used by row grouping and pivot, to get key for a row. col can be a pivot col or a row grouping col
21838  getKeyForNode(e, t) {
21839    const i = this.getValue(e, t), s = e.getColDef().keyCreator;
21840    let o = i;
21841    if (s) {
21842      const n = this.gos.addGridCommonParams({
21843        value: i,
21844        colDef: e.getColDef(),
21845        column: e,
21846        node: t,
21847        data: t.data
21848      });
21849      o = s(n);
21850    }
21851    return typeof o == "string" || o == null || (o = String(o), o === "[object Object]" && x(121)), o;
21852  }
21853}, gb = {
21854  moduleName: "CommunityCore",
21855  version: I,
21856  beans: [
21857    dS,
21858    bC,
21859    uw,
21860    Jg,
21861    KS,
21862    Pv,
21863    sS,
21864    gS,
21865    Yg,
21866    IS,
21867    MS,
21868    qS,
21869    hb,
21870    aS,
21871    iS,
21872    lS,
21873    gw,
21874    tb,
21875    rw,
21876    aw
21877  ],
21878  icons: {
21879    // icon on select dropdowns (select cell editor, charts tool panels)
21880    selectOpen: "small-down",
21881    /** @deprecated v33 */
21882    smallDown: "small-down",
21883    /** @deprecated v33 */
21884    colorPicker: "color-picker",
21885    /** @deprecated v33 */
21886    smallUp: "small-up",
21887    /** @deprecated v33 */
21888    checkboxChecked: "small-up",
21889    /** @deprecated v33 */
21890    checkboxIndeterminate: "checkbox-indeterminate",
21891    /** @deprecated v33 */
21892    checkboxUnchecked: "checkbox-unchecked",
21893    /** @deprecated v33 */
21894    radioButtonOn: "radio-button-on",
21895    /** @deprecated v33 */
21896    radioButtonOff: "radio-button-off",
21897    /** @deprecated v33 */
21898    smallLeft: "small-left",
21899    /** @deprecated v33 */
21900    smallRight: "small-right"
21901  },
21902  apiFunctions: {
21903    getGridId: yC,
21904    destroy: RC,
21905    isDestroyed: FC,
21906    getGridOption: xC,
21907    setGridOption: PC,
21908    updateGridOptions: Nd
21909  },
21910  dependsOn: [
21911    iw,
21912    ov,
21913    uv,
21914    ac,
21915    CS,
21916    Dv,
21917    vS,
21918    $S,
21919    cb,
21920    wS,
21921    TS,
21922    GS,
21923    BS,
21924    bS,
21925    cw,
21926    sw,
21927    db
21928  ]
21929}, ur = class Dt {
21930  /**
21931   * @param providedOptions
21932   * @returns Shallow copy of the provided options with global options merged in.
21933   */
21934  static applyGlobalGridOptions(t) {
21935    if (!Dt.gridOptions)
21936      return { ...t };
21937    let i = {};
21938    return ce(i, Dt.gridOptions, !0, !0), Dt.mergeStrategy === "deep" ? ce(i, t, !0, !0) : i = { ...i, ...t }, Dt.gridOptions.context && (i.context = Dt.gridOptions.context), t.context && (Dt.mergeStrategy === "deep" && i.context && ce(t.context, i.context, !0, !0), i.context = t.context), i;
21939  }
21940};
21941ur.gridOptions = void 0;
21942ur.mergeStrategy = "shallow";
21943var pb = ur;
21944function fb(e, t, i) {
21945  if (!t)
21946    return z(11), {};
21947  const s = i;
21948  let o;
21949  if (!s?.setThemeOnGridDiv) {
21950    const r = document.createElement("div");
21951    r.style.height = "100%", e.appendChild(r), e = r, o = () => e.remove();
21952  }
21953  return new Cb().create(
21954    e,
21955    t,
21956    (r) => {
21957      const a = new wC(e);
21958      r.createBean(a);
21959    },
21960    void 0,
21961    i,
21962    o
21963  );
21964}
21965var mb = 1, Cb = class {
21966  create(e, t, i, s, o, n) {
21967    const r = pb.applyGlobalGridOptions(t), a = r.gridId ?? String(mb++), l = r.rowModelType ?? "clientSide", d = this.getRegisteredModules(o, a, l), c = this.createBeansList(l, d, a), u = this.createProvidedBeans(e, r, o);
21968    if (!c)
21969      return;
21970    const h = {
21971      providedBeanInstances: u,
21972      beanClasses: c,
21973      gridId: a,
21974      beanInitComparator: sC,
21975      beanDestroyComparator: oC,
21976      derivedBeans: [tC],
21977      destroyCallback: n
21978    }, g = new zp(h);
21979    return this.registerModuleFeatures(g, d), i(g), g.getBean("syncSvc").start(), s && s(g), g.getBean("gridApi");
21980  }
21981  getRegisteredModules(e, t, i) {
21982    return is(gb, void 0), e?.modules?.forEach((s) => is(s, t)), Np(t, i);
21983  }
21984  registerModuleFeatures(e, t) {
21985    const i = e.getBean("registry"), s = e.getBean("apiFunctionSvc");
21986    t.forEach((o) => {
21987      i.registerModule(o);
21988      const n = o.apiFunctions;
21989      n && Object.keys(n).forEach((a) => {
21990        s?.addFunction(a, n[a]);
21991      });
21992    });
21993  }
21994  createProvidedBeans(e, t, i) {
21995    let s = i ? i.frameworkOverrides : null;
21996    Y(s) && (s = new Hd());
21997    const o = {
21998      gridOptions: t,
21999      eGridDiv: e,
22000      globalListener: i ? i.globalListener : null,
22001      globalSyncListener: i ? i.globalSyncListener : null,
22002      frameworkOverrides: s
22003    };
22004    return i && i.providedBeanInstances && Object.assign(o, i.providedBeanInstances), o;
22005  }
22006  createBeansList(e, t, i) {
22007    const o = {
22008      clientSide: "ClientSideRowModel",
22009      infinite: "InfiniteRowModel",
22010      serverSide: "ServerSideRowModel",
22011      viewport: "ViewportRowModel"
22012    }[e];
22013    if (!o) {
22014      en(201, { rowModelType: e }, `Unknown rowModelType ${e}.`);
22015      return;
22016    }
22017    if (!ad(o, i, e)) {
22018      en(
22019        200,
22020        {
22021          reasonOrId: `rowModelType = '${e}'`,
22022          moduleName: o,
22023          gridScoped: Kn(),
22024          gridId: i,
22025          rowModelType: e
22026        },
22027        `Missing module ${o}Module for rowModelType ${e}. 
22028If upgrading from before v33, see ${pi}/upgrading-to-ag-grid-33/#changes-to-modules/`
22029      );
22030      return;
22031    }
22032    const n = /* @__PURE__ */ new Set();
22033    return t.forEach((r) => r.beans?.forEach((a) => n.add(a))), Array.from(n);
22034  }
22035};
22036function Xe(e) {
22037  const t = e.rowModel;
22038  return t.getType() === "clientSide" ? t : void 0;
22039}
22040function io(e) {
22041  const t = e.rowModel;
22042  return t.getType() === "infinite" ? t : void 0;
22043}
22044function lc(e) {
22045  const t = e.rowModel;
22046  return t.getType() === "serverSide" ? t : void 0;
22047}
22048var vb = [
22049  "columnEverythingChanged",
22050  "newColumnsLoaded",
22051  "columnPivotModeChanged",
22052  "pivotMaxColumnsExceeded",
22053  "columnRowGroupChanged",
22054  "expandOrCollapseAll",
22055  "columnPivotChanged",
22056  "gridColumnsChanged",
22057  "columnValueChanged",
22058  "columnMoved",
22059  "columnVisible",
22060  "columnPinned",
22061  "columnGroupOpened",
22062  "columnResized",
22063  "displayedColumnsChanged",
22064  "virtualColumnsChanged",
22065  "columnHeaderMouseOver",
22066  "columnHeaderMouseLeave",
22067  "columnHeaderClicked",
22068  "columnHeaderContextMenu",
22069  "asyncTransactionsFlushed",
22070  "rowGroupOpened",
22071  "rowDataUpdated",
22072  "pinnedRowDataChanged",
22073  "rangeSelectionChanged",
22074  "cellSelectionChanged",
22075  "chartCreated",
22076  "chartRangeSelectionChanged",
22077  "chartOptionsChanged",
22078  "chartDestroyed",
22079  "toolPanelVisibleChanged",
22080  "toolPanelSizeChanged",
22081  "modelUpdated",
22082  "cutStart",
22083  "cutEnd",
22084  "pasteStart",
22085  "pasteEnd",
22086  "fillStart",
22087  "fillEnd",
22088  "cellSelectionDeleteStart",
22089  "cellSelectionDeleteEnd",
22090  "rangeDeleteStart",
22091  "rangeDeleteEnd",
22092  "undoStarted",
22093  "undoEnded",
22094  "redoStarted",
22095  "redoEnded",
22096  "cellClicked",
22097  "cellDoubleClicked",
22098  "cellMouseDown",
22099  "cellContextMenu",
22100  "cellValueChanged",
22101  "cellEditRequest",
22102  "rowValueChanged",
22103  "headerFocused",
22104  "cellFocused",
22105  "rowSelected",
22106  "selectionChanged",
22107  "tooltipShow",
22108  "tooltipHide",
22109  "cellKeyDown",
22110  "cellMouseOver",
22111  "cellMouseOut",
22112  "filterChanged",
22113  "filterModified",
22114  "filterOpened",
22115  "advancedFilterBuilderVisibleChanged",
22116  "sortChanged",
22117  "virtualRowRemoved",
22118  "rowClicked",
22119  "rowDoubleClicked",
22120  "gridReady",
22121  "gridPreDestroyed",
22122  "gridSizeChanged",
22123  "viewportChanged",
22124  "firstDataRendered",
22125  "dragStarted",
22126  "dragStopped",
22127  "dragCancelled",
22128  "rowEditingStarted",
22129  "rowEditingStopped",
22130  "cellEditingStarted",
22131  "cellEditingStopped",
22132  "bodyScroll",
22133  "bodyScrollEnd",
22134  "paginationChanged",
22135  "componentStateChanged",
22136  "storeRefreshed",
22137  "stateUpdated",
22138  "columnMenuVisibleChanged",
22139  "contextMenuVisibleChanged",
22140  "rowDragEnter",
22141  "rowDragMove",
22142  "rowDragLeave",
22143  "rowDragEnd",
22144  "rowDragCancel"
22145], wb = [
22146  "scrollbarWidthChanged",
22147  "keyShortcutChangedCellStart",
22148  "keyShortcutChangedCellEnd",
22149  "pinnedHeightChanged",
22150  "cellFocusCleared",
22151  "fullWidthRowFocused",
22152  "checkboxChanged",
22153  "heightScaleChanged",
22154  "suppressMovableColumns",
22155  "suppressMenuHide",
22156  "suppressFieldDotNotation",
22157  "columnPanelItemDragStart",
22158  "columnPanelItemDragEnd",
22159  "bodyHeightChanged",
22160  "columnContainerWidthChanged",
22161  "displayedColumnsWidthChanged",
22162  "scrollVisibilityChanged",
22163  "scrollGapChanged",
22164  "columnHoverChanged",
22165  "flashCells",
22166  "paginationPixelOffsetChanged",
22167  "displayedRowsChanged",
22168  "leftPinnedWidthChanged",
22169  "rightPinnedWidthChanged",
22170  "rowContainerHeightChanged",
22171  "headerHeightChanged",
22172  "columnGroupHeaderHeightChanged",
22173  "columnHeaderHeightChanged",
22174  "gridStylesChanged",
22175  "storeUpdated",
22176  "filterDestroyed",
22177  "rowDataUpdateStarted",
22178  "rowCountReady",
22179  "advancedFilterEnabledChanged",
22180  "dataTypesInferred",
22181  "fieldValueChanged",
22182  "fieldPickerValueSelected",
22183  "richSelectListRowSelected",
22184  "sideBarUpdated",
22185  "alignedGridScroll",
22186  "alignedGridColumn",
22187  "gridOptionsChanged",
22188  "chartTitleEdit",
22189  "recalculateRowBounds",
22190  "stickyTopOffsetChanged",
22191  "overlayExclusiveChanged",
22192  "beforeRefreshModel"
22193], dc = [...vb, ...wb], Sb = class extends y {
22194  constructor() {
22195    super(...arguments), this.beanName = "localeSvc";
22196  }
22197  getLocaleTextFunc() {
22198    const e = this.gos, t = e.getCallback("getLocaleText");
22199    if (t)
22200      return (s, o, n) => t({
22201        key: s,
22202        defaultValue: o,
22203        variableValues: n
22204      });
22205    const i = e.get("localeText");
22206    return (s, o, n) => {
22207      let r = i && i[s];
22208      if (r && n && n.length) {
22209        let a = 0;
22210        for (; !(a >= n.length || r.indexOf("${variable}") === -1); )
22211          r = r.replace("${variable}", n[a++]);
22212      }
22213      return r ?? o;
22214    };
22215  }
22216}, bb = [
22217  "overlayLoadingTemplate",
22218  "overlayNoRowsTemplate",
22219  "gridId",
22220  "quickFilterText",
22221  "rowModelType",
22222  "editType",
22223  "domLayout",
22224  "clipboardDelimiter",
22225  "rowGroupPanelShow",
22226  "multiSortKey",
22227  "pivotColumnGroupTotals",
22228  "pivotRowTotals",
22229  "pivotPanelShow",
22230  "fillHandleDirection",
22231  "groupDisplayType",
22232  "treeDataDisplayType",
22233  "colResizeDefault",
22234  "tooltipTrigger",
22235  "serverSidePivotResultFieldSeparator",
22236  "columnMenu",
22237  "tooltipShowMode",
22238  "grandTotalRow"
22239  // 'treeDataChildrenField',
22240], yb = [
22241  "components",
22242  "rowStyle",
22243  "context",
22244  "autoGroupColumnDef",
22245  "localeText",
22246  "icons",
22247  "datasource",
22248  "dragAndDropImageComponentParams",
22249  "serverSideDatasource",
22250  "viewportDatasource",
22251  "groupRowRendererParams",
22252  "aggFuncs",
22253  "fullWidthCellRendererParams",
22254  "defaultColGroupDef",
22255  "defaultColDef",
22256  "defaultCsvExportParams",
22257  "defaultExcelExportParams",
22258  "columnTypes",
22259  "rowClassRules",
22260  "detailCellRendererParams",
22261  "loadingCellRendererParams",
22262  "loadingOverlayComponentParams",
22263  "noRowsOverlayComponentParams",
22264  "popupParent",
22265  "statusBar",
22266  "chartThemeOverrides",
22267  "customChartThemes",
22268  "chartToolPanelsDef",
22269  "dataTypeDefinitions",
22270  "advancedFilterParent",
22271  "advancedFilterBuilderParams",
22272  "initialState",
22273  "autoSizeStrategy",
22274  "selectionColumnDef"
22275], Rb = [
22276  "sortingOrder",
22277  "alignedGrids",
22278  "rowData",
22279  "columnDefs",
22280  "excelStyles",
22281  "pinnedTopRowData",
22282  "pinnedBottomRowData",
22283  "chartThemes",
22284  "rowClass",
22285  "paginationPageSizeSelector"
22286], cc = [
22287  "rowHeight",
22288  "detailRowHeight",
22289  "rowBuffer",
22290  "headerHeight",
22291  "groupHeaderHeight",
22292  "groupLockGroupColumns",
22293  "floatingFiltersHeight",
22294  "pivotHeaderHeight",
22295  "pivotGroupHeaderHeight",
22296  "groupDefaultExpanded",
22297  "pivotDefaultExpanded",
22298  "viewportRowModelPageSize",
22299  "viewportRowModelBufferSize",
22300  "autoSizePadding",
22301  "maxBlocksInCache",
22302  "maxConcurrentDatasourceRequests",
22303  "tooltipShowDelay",
22304  "tooltipHideDelay",
22305  "cacheOverflowSize",
22306  "paginationPageSize",
22307  "cacheBlockSize",
22308  "infiniteInitialRowCount",
22309  "serverSideInitialRowCount",
22310  "scrollbarWidth",
22311  "asyncTransactionWaitMillis",
22312  "blockLoadDebounceMillis",
22313  "keepDetailRowsCount",
22314  "undoRedoCellEditingLimit",
22315  "cellFlashDuration",
22316  "cellFadeDuration",
22317  "tabIndex",
22318  "pivotMaxGeneratedColumns"
22319], Fb = ["theme", "rowSelection"], xb = [
22320  "cellSelection",
22321  "sideBar",
22322  "suppressGroupChangesColumnVisibility",
22323  "groupAggFiltering",
22324  "suppressStickyTotalRow",
22325  "groupHideParentOfSingleChild"
22326], uc = [
22327  "loadThemeGoogleFonts",
22328  "suppressMakeColumnVisibleAfterUnGroup",
22329  "suppressRowClickSelection",
22330  "suppressCellFocus",
22331  "suppressHeaderFocus",
22332  "suppressHorizontalScroll",
22333  "groupSelectsChildren",
22334  "alwaysShowHorizontalScroll",
22335  "alwaysShowVerticalScroll",
22336  "debug",
22337  "enableBrowserTooltips",
22338  "enableCellExpressions",
22339  "groupSuppressBlankHeader",
22340  "suppressMenuHide",
22341  "suppressRowDeselection",
22342  "unSortIcon",
22343  "suppressMultiSort",
22344  "alwaysMultiSort",
22345  "singleClickEdit",
22346  "suppressLoadingOverlay",
22347  "suppressNoRowsOverlay",
22348  "suppressAutoSize",
22349  "skipHeaderOnAutoSize",
22350  "suppressColumnMoveAnimation",
22351  "suppressMoveWhenColumnDragging",
22352  "suppressMovableColumns",
22353  "suppressFieldDotNotation",
22354  "enableRangeSelection",
22355  "enableRangeHandle",
22356  "enableFillHandle",
22357  "suppressClearOnFillReduction",
22358  "deltaSort",
22359  "suppressTouch",
22360  "allowContextMenuWithControlKey",
22361  "suppressContextMenu",
22362  "suppressDragLeaveHidesColumns",
22363  "suppressRowGroupHidesColumns",
22364  "suppressMiddleClickScrolls",
22365  "suppressPreventDefaultOnMouseWheel",
22366  "suppressCopyRowsToClipboard",
22367  "copyHeadersToClipboard",
22368  "copyGroupHeadersToClipboard",
22369  "pivotMode",
22370  "suppressAggFuncInHeader",
22371  "suppressColumnVirtualisation",
22372  "alwaysAggregateAtRootLevel",
22373  "suppressFocusAfterRefresh",
22374  "functionsReadOnly",
22375  "animateRows",
22376  "groupSelectsFiltered",
22377  "groupRemoveSingleChildren",
22378  "groupRemoveLowestSingleChildren",
22379  "enableRtl",
22380  "suppressClickEdit",
22381  "rowDragEntireRow",
22382  "rowDragManaged",
22383  "suppressRowDrag",
22384  "suppressMoveWhenRowDragging",
22385  "rowDragMultiRow",
22386  "enableGroupEdit",
22387  "embedFullWidthRows",
22388  "suppressPaginationPanel",
22389  "groupHideOpenParents",
22390  "groupAllowUnbalanced",
22391  "pagination",
22392  "paginationAutoPageSize",
22393  "suppressScrollOnNewData",
22394  "suppressScrollWhenPopupsAreOpen",
22395  "purgeClosedRowNodes",
22396  "cacheQuickFilter",
22397  "includeHiddenColumnsInQuickFilter",
22398  "ensureDomOrder",
22399  "accentedSort",
22400  "suppressChangeDetection",
22401  "valueCache",
22402  "valueCacheNeverExpires",
22403  "aggregateOnlyChangedColumns",
22404  "suppressAnimationFrame",
22405  "suppressExcelExport",
22406  "suppressCsvExport",
22407  "includeHiddenColumnsInAdvancedFilter",
22408  "suppressMultiRangeSelection",
22409  "enterNavigatesVerticallyAfterEdit",
22410  "enterNavigatesVertically",
22411  "suppressPropertyNamesCheck",
22412  "rowMultiSelectWithClick",
22413  "suppressRowHoverHighlight",
22414  "suppressRowTransform",
22415  "suppressClipboardPaste",
22416  "suppressLastEmptyLineOnPaste",
22417  "enableCharts",
22418  "suppressMaintainUnsortedOrder",
22419  "enableCellTextSelection",
22420  "suppressBrowserResizeObserver",
22421  "suppressMaxRenderedRowRestriction",
22422  "excludeChildrenWhenTreeDataFiltering",
22423  "tooltipMouseTrack",
22424  "tooltipInteraction",
22425  "keepDetailRows",
22426  "paginateChildRows",
22427  "preventDefaultOnContextMenu",
22428  "undoRedoCellEditing",
22429  "allowDragFromColumnsToolPanel",
22430  "pivotSuppressAutoColumn",
22431  "suppressExpandablePivotGroups",
22432  "debounceVerticalScrollbar",
22433  "detailRowAutoHeight",
22434  "serverSideSortAllLevels",
22435  "serverSideEnableClientSideSort",
22436  "serverSideOnlyRefreshFilteredGroups",
22437  "suppressAggFilteredOnly",
22438  "showOpenedGroup",
22439  "suppressClipboardApi",
22440  "suppressModelUpdateAfterUpdateTransaction",
22441  "stopEditingWhenCellsLoseFocus",
22442  "groupMaintainOrder",
22443  "columnHoverHighlight",
22444  "readOnlyEdit",
22445  "suppressRowVirtualisation",
22446  "enableCellEditingOnBackspace",
22447  "resetRowDataOnUpdate",
22448  "removePivotHeaderRowWhenSingleValueColumn",
22449  "suppressCopySingleCellRanges",
22450  "suppressGroupRowsSticky",
22451  "suppressCutToClipboard",
22452  "rowGroupPanelSuppressSort",
22453  "allowShowChangeAfterFilter",
22454  "enableAdvancedFilter",
22455  "masterDetail",
22456  "treeData",
22457  "reactiveCustomComponents",
22458  "applyQuickFilterBeforePivotOrAgg",
22459  "suppressServerSideFullWidthLoadingRow",
22460  "suppressAdvancedFilterEval",
22461  "loading",
22462  "maintainColumnOrder",
22463  "enableStrictPivotColumnOrder",
22464  "suppressSetFilterByDefault"
22465], Pb = [
22466  "doesExternalFilterPass",
22467  "processPivotResultColDef",
22468  "processPivotResultColGroupDef",
22469  "getBusinessKeyForNode",
22470  "isRowSelectable",
22471  "rowDragText",
22472  "groupRowRenderer",
22473  "dragAndDropImageComponent",
22474  "fullWidthCellRenderer",
22475  "loadingCellRenderer",
22476  "loadingOverlayComponent",
22477  "noRowsOverlayComponent",
22478  "detailCellRenderer",
22479  "quickFilterParser",
22480  "quickFilterMatcher",
22481  "getLocaleText",
22482  "isExternalFilterPresent",
22483  "getRowHeight",
22484  "getRowClass",
22485  "getRowStyle",
22486  "getContextMenuItems",
22487  "getMainMenuItems",
22488  "processRowPostCreate",
22489  "processCellForClipboard",
22490  "getGroupRowAgg",
22491  "isFullWidthRow",
22492  "sendToClipboard",
22493  "focusGridInnerElement",
22494  "navigateToNextHeader",
22495  "tabToNextHeader",
22496  "navigateToNextCell",
22497  "tabToNextCell",
22498  "processCellFromClipboard",
22499  "getDocument",
22500  "postProcessPopup",
22501  "getChildCount",
22502  "getDataPath",
22503  "isRowMaster",
22504  "postSortRows",
22505  "processHeaderForClipboard",
22506  "processUnpinnedColumns",
22507  "processGroupHeaderForClipboard",
22508  "paginationNumberFormatter",
22509  "processDataFromClipboard",
22510  "getServerSideGroupKey",
22511  "isServerSideGroup",
22512  "createChartContainer",
22513  "getChartToolbarItems",
22514  "fillOperation",
22515  "isApplyServerSideTransaction",
22516  "getServerSideGroupLevelParams",
22517  "isServerSideGroupOpenByDefault",
22518  "isGroupOpenByDefault",
22519  "initialGroupOrderComparator",
22520  "loadingCellRendererSelector",
22521  "getRowId",
22522  "chartMenuItems",
22523  "groupTotalRow",
22524  "alwaysPassFilter"
22525], bn = [
22526  ...Rb,
22527  ...yb,
22528  ...bb,
22529  ...cc,
22530  ...Pb,
22531  ...uc,
22532  ...xb,
22533  ...Fb
22534], Eb = class {
22535  wrap(e, t, i, s) {
22536    const o = this.createWrapper(e, s);
22537    return t?.forEach((n) => {
22538      this.createMethod(o, n, !0);
22539    }), i?.forEach((n) => {
22540      this.createMethod(o, n, !1);
22541    }), o;
22542  }
22543  createMethod(e, t, i) {
22544    e.addMethod(t, this.createMethodProxy(e, t, i));
22545  }
22546  createMethodProxy(e, t, i) {
22547    return function() {
22548      return e.hasMethod(t) ? e.callMethod(t, arguments) : (i && x(49, { methodName: t }), null);
22549    };
22550  }
22551}, Db = class extends Pi {
22552  constructor() {
22553    super(
22554      /* html */
22555      '<div class="ag-tooltip"></div>'
22556    );
22557  }
22558  // will need to type params
22559  init(e) {
22560    const { value: t } = e;
22561    this.getGui().textContent = Ze(t, !0);
22562  }
22563};
22564function hc(e) {
22565  const { inputValue: t, allSuggestions: i, hideIrrelevant: s, filterByPercentageOfBestMatch: o, addSequentialWeight: n } = e;
22566  let r = i.map((d, c) => ({
22567    value: d,
22568    relevance: Tb(t.toLowerCase(), d.toLocaleLowerCase(), n),
22569    idx: c
22570  }));
22571  if (r.sort((d, c) => c.relevance - d.relevance), s && (r = r.filter((d) => d.relevance !== 0)), r.length > 0 && o && o > 0) {
22572    const c = r[0].relevance * o;
22573    r = r.filter((u) => c - u.relevance < 0);
22574  }
22575  const a = [], l = [];
22576  for (const d of r)
22577    a.push(d.value), l.push(d.idx);
22578  return { values: a, indices: l };
22579}
22580function Ab(e) {
22581  const t = [], i = e.length;
22582  for (let s = 1; s <= i; s++)
22583    for (let o = 0; o <= i - s; o++) {
22584      const n = o + s - 1;
22585      t.push(e.slice(o, n + 1));
22586    }
22587  return t;
22588}
22589function Tb(e, t, i = !1) {
22590  const s = e.replace(/\s/g, ""), o = t.replace(/\s/g, ""), n = s.length, r = o.length, a = new Array(n + 1).fill(null).map(() => new Array(r + 1).fill(0));
22591  for (let u = 0; u <= n; u += 1)
22592    a[u][0] = u;
22593  for (let u = 0; u <= r; u += 1)
22594    a[0][u] = u;
22595  for (let u = 1; u <= n; u++)
22596    for (let h = 1; h <= r; h++)
22597      s[u - 1] === o[h - 1] ? a[u][h] = a[u - 1][h - 1] : a[u][h] = 1 + Math.min(a[u][h - 1], Math.min(a[u - 1][h], a[u - 1][h - 1]));
22598  const l = a[n][r];
22599  let c = Math.max(n, r) - l;
22600  if (i) {
22601    const u = Ab(s);
22602    for (let h = 0; h < u.length; h++) {
22603      const g = u[h];
22604      o.indexOf(g) !== -1 && (c += 1, c *= g.length);
22605    }
22606  }
22607  return c;
22608}
22609function Mb(e, t) {
22610  if (typeof e != "number")
22611    return "";
22612  const i = t(), s = i("thousandSeparator", ","), o = i("decimalSeparator", ".");
22613  return e.toString().replace(".", o).replace(/(\d)(?=(\d{3})+(?!\d))/g, `$1${s}`);
22614}
22615var Ib = class extends y {
22616  getFileName(e) {
22617    const t = this.getDefaultFileExtension();
22618    return (e == null || !e.length) && (e = this.getDefaultFileName()), e.indexOf(".") === -1 ? `${e}.${t}` : e;
22619  }
22620  getData(e) {
22621    const t = this.createSerializingSession(e);
22622    return this.beans.gridSerializer.serialize(t, e);
22623  }
22624  getDefaultFileName() {
22625    return `export.${this.getDefaultFileExtension()}`;
22626  }
22627}, kb = class {
22628  constructor(e) {
22629    this.groupColumns = [];
22630    const {
22631      colModel: t,
22632      rowGroupColsSvc: i,
22633      colNames: s,
22634      valueSvc: o,
22635      gos: n,
22636      processCellCallback: r,
22637      processHeaderCallback: a,
22638      processGroupHeaderCallback: l,
22639      processRowGroupCallback: d
22640    } = e;
22641    this.colModel = t, this.rowGroupColsSvc = i, this.colNames = s, this.valueSvc = o, this.gos = n, this.processCellCallback = r, this.processHeaderCallback = a, this.processGroupHeaderCallback = l, this.processRowGroupCallback = d;
22642  }
22643  prepare(e) {
22644    this.groupColumns = e.filter((t) => !!t.getColDef().showRowGroup);
22645  }
22646  extractHeaderValue(e) {
22647    return this.getHeaderName(this.processHeaderCallback, e) ?? "";
22648  }
22649  extractRowCellValue(e, t, i, s, o) {
22650    const r = (!this.gos.get("groupHideOpenParents") || o.footer) && this.shouldRenderGroupSummaryCell(o, e, t) ? this.createValueForGroupNode(e, o) : this.valueSvc.getValue(e, o);
22651    return this.processCell({
22652      accumulatedRowIndex: i,
22653      rowNode: o,
22654      column: e,
22655      value: r,
22656      processCellCallback: this.processCellCallback,
22657      type: s
22658    });
22659  }
22660  shouldRenderGroupSummaryCell(e, t, i) {
22661    if (!(e.group && !this.gos.get("treeData")))
22662      return !1;
22663    if (this.groupColumns.indexOf(t) !== -1) {
22664      if (e.groupData?.[t.getId()] !== void 0 || as(this.gos) && e.group)
22665        return !0;
22666      if (e.footer && e.level === -1) {
22667        const r = t.getColDef();
22668        return r == null || r.showRowGroup === !0 || r.showRowGroup === this.rowGroupColsSvc?.columns[0].getId();
22669      }
22670    }
22671    const n = Wn(this.gos, this.colModel.isPivotMode());
22672    return i === 0 && n;
22673  }
22674  getHeaderName(e, t) {
22675    return e ? e(this.gos.addGridCommonParams({ column: t })) : this.colNames.getDisplayNameForColumn(t, "csv", !0);
22676  }
22677  createValueForGroupNode(e, t) {
22678    if (this.processRowGroupCallback)
22679      return this.processRowGroupCallback(this.gos.addGridCommonParams({ column: e, node: t }));
22680    const i = this.gos.get("treeData"), s = (a) => {
22681      if (i)
22682        return a.key;
22683      const l = a.groupData?.[e.getId()];
22684      return !l || !a.rowGroupColumn || a.rowGroupColumn.getColDef().useValueFormatterForExport === !1 ? l : this.valueSvc.formatValue(a.rowGroupColumn, a, l) ?? l;
22685    }, o = t.footer, n = [s(t)];
22686    if (!cg(this.gos))
22687      for (; t.parent; )
22688        t = t.parent, n.push(s(t));
22689    const r = n.reverse().join(" -> ");
22690    return o ? `Total ${r}` : r;
22691  }
22692  processCell(e) {
22693    const { accumulatedRowIndex: t, rowNode: i, column: s, value: o, processCellCallback: n, type: r } = e;
22694    return n ? {
22695      value: n(
22696        this.gos.addGridCommonParams({
22697          accumulatedRowIndex: t,
22698          column: s,
22699          node: i,
22700          value: o,
22701          type: r,
22702          parseValue: (a) => this.valueSvc.parseValue(
22703            s,
22704            i,
22705            a,
22706            this.valueSvc.getValue(s, i)
22707          ),
22708          formatValue: (a) => this.valueSvc.formatValue(s, i, a) ?? a
22709        })
22710      ) ?? ""
22711    } : s.getColDef().useValueFormatterForExport !== !1 ? {
22712      value: o ?? "",
22713      valueFormatted: this.valueSvc.formatValue(s, i, o)
22714    } : { value: o ?? "" };
22715  }
22716};
22717function Lb(e, t) {
22718  const i = document.defaultView || window;
22719  if (!i) {
22720    x(52);
22721    return;
22722  }
22723  const s = document.createElement("a"), o = i.URL.createObjectURL(t);
22724  s.setAttribute("href", o), s.setAttribute("download", e), s.style.display = "none", document.body.appendChild(s), s.dispatchEvent(
22725    new MouseEvent("click", {
22726      bubbles: !1,
22727      cancelable: !0,
22728      view: i
22729    })
22730  ), document.body.removeChild(s), i.setTimeout(() => {
22731    i.URL.revokeObjectURL(o);
22732  }, 0);
22733}
22734var Ob = {
22735  enableBrowserTooltips: !0,
22736  tooltipTrigger: !0,
22737  tooltipMouseTrack: !0,
22738  tooltipShowMode: !0,
22739  tooltipInteraction: !0,
22740  defaultColGroupDef: !0,
22741  suppressAutoSize: !0,
22742  skipHeaderOnAutoSize: !0,
22743  autoSizeStrategy: !0,
22744  components: !0,
22745  stopEditingWhenCellsLoseFocus: !0,
22746  undoRedoCellEditing: !0,
22747  undoRedoCellEditingLimit: !0,
22748  excelStyles: !0,
22749  cacheQuickFilter: !0,
22750  customChartThemes: !0,
22751  chartThemeOverrides: !0,
22752  chartToolPanelsDef: !0,
22753  loadingCellRendererSelector: !0,
22754  localeText: !0,
22755  keepDetailRows: !0,
22756  keepDetailRowsCount: !0,
22757  detailRowHeight: !0,
22758  detailRowAutoHeight: !0,
22759  tabIndex: !0,
22760  valueCache: !0,
22761  valueCacheNeverExpires: !0,
22762  enableCellExpressions: !0,
22763  suppressTouch: !0,
22764  suppressBrowserResizeObserver: !0,
22765  suppressPropertyNamesCheck: !0,
22766  debug: !0,
22767  dragAndDropImageComponent: !0,
22768  loadingOverlayComponent: !0,
22769  suppressLoadingOverlay: !0,
22770  noRowsOverlayComponent: !0,
22771  paginationPageSizeSelector: !0,
22772  paginateChildRows: !0,
22773  pivotPanelShow: !0,
22774  pivotSuppressAutoColumn: !0,
22775  suppressExpandablePivotGroups: !0,
22776  aggFuncs: !0,
22777  allowShowChangeAfterFilter: !0,
22778  ensureDomOrder: !0,
22779  enableRtl: !0,
22780  suppressColumnVirtualisation: !0,
22781  suppressMaxRenderedRowRestriction: !0,
22782  suppressRowVirtualisation: !0,
22783  rowDragText: !0,
22784  groupLockGroupColumns: !0,
22785  suppressGroupRowsSticky: !0,
22786  rowModelType: !0,
22787  cacheOverflowSize: !0,
22788  infiniteInitialRowCount: !0,
22789  serverSideInitialRowCount: !0,
22790  maxBlocksInCache: !0,
22791  maxConcurrentDatasourceRequests: !0,
22792  blockLoadDebounceMillis: !0,
22793  serverSideOnlyRefreshFilteredGroups: !0,
22794  serverSidePivotResultFieldSeparator: !0,
22795  viewportRowModelPageSize: !0,
22796  viewportRowModelBufferSize: !0,
22797  debounceVerticalScrollbar: !0,
22798  suppressAnimationFrame: !0,
22799  suppressPreventDefaultOnMouseWheel: !0,
22800  scrollbarWidth: !0,
22801  icons: !0,
22802  suppressRowTransform: !0,
22803  gridId: !0,
22804  enableGroupEdit: !0,
22805  initialState: !0,
22806  processUnpinnedColumns: !0,
22807  createChartContainer: !0,
22808  getLocaleText: !0,
22809  getRowId: !0,
22810  reactiveCustomComponents: !0,
22811  columnMenu: !0,
22812  suppressSetFilterByDefault: !0,
22813  getDataPath: !0
22814}, Se = "clientSide", ge = "serverSide", qt = "infinite", Gb = {
22815  onGroupExpandedOrCollapsed: [Se],
22816  refreshClientSideRowModel: [Se],
22817  isRowDataEmpty: [Se],
22818  forEachLeafNode: [Se],
22819  forEachNodeAfterFilter: [Se],
22820  forEachNodeAfterFilterAndSort: [Se],
22821  resetRowHeights: [Se],
22822  applyTransaction: [Se],
22823  applyTransactionAsync: [Se],
22824  flushAsyncTransactions: [Se],
22825  getBestCostNodeSelection: [Se],
22826  getServerSideSelectionState: [ge],
22827  setServerSideSelectionState: [ge],
22828  applyServerSideTransaction: [ge],
22829  applyServerSideTransactionAsync: [ge],
22830  applyServerSideRowData: [ge],
22831  retryServerSideLoads: [ge],
22832  flushServerSideAsyncTransactions: [ge],
22833  refreshServerSide: [ge],
22834  getServerSideGroupLevelState: [ge],
22835  refreshInfiniteCache: [qt],
22836  purgeInfiniteCache: [qt],
22837  getInfiniteRowCount: [qt],
22838  isLastRowIndexKnown: [qt, ge],
22839  expandAll: [Se, ge],
22840  collapseAll: [Se, ge],
22841  onRowHeightChanged: [Se, ge],
22842  setRowCount: [qt, ge],
22843  getCacheBlockState: [qt, ge]
22844}, Hb = {
22845  showLoadingOverlay: {
22846    version: "v32",
22847    message: '`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'
22848  },
22849  clearRangeSelection: {
22850    version: "v32.2",
22851    message: "Use `clearCellSelection` instead."
22852  },
22853  getInfiniteRowCount: {
22854    version: "v32.2",
22855    old: "getInfiniteRowCount()",
22856    new: "getDisplayedRowCount()"
22857  },
22858  selectAllFiltered: {
22859    version: "v33",
22860    old: "selectAllFiltered()",
22861    new: 'selectAll("filtered")'
22862  },
22863  deselectAllFiltered: {
22864    version: "v33",
22865    old: "deselectAllFiltered()",
22866    new: 'deselectAll("filtered")'
22867  },
22868  selectAllOnCurrentPage: {
22869    version: "v33",
22870    old: "selectAllOnCurrentPage()",
22871    new: 'selectAll("currentPage")'
22872  },
22873  deselectAllOnCurrentPage: {
22874    version: "v33",
22875    old: "deselectAllOnCurrentPage()",
22876    new: 'deselectAll("currentPage")'
22877  }
22878};
22879function Bb(e, t, i) {
22880  const s = Hb[e];
22881  if (s) {
22882    const { version: n, new: r, old: a, message: l } = s, d = a ?? e;
22883    return (...c) => {
22884      const u = r ? `Please use ${r} instead. ` : "";
22885      return Ni(`Since ${n} api.${d} is deprecated. ${u}${l ?? ""}`), t.apply(t, c);
22886    };
22887  }
22888  const o = Gb[e];
22889  return o ? (...n) => {
22890    const r = i.rowModel.getType();
22891    if (!o.includes(r)) {
22892      ii(
22893        `api.${e} can only be called when gridOptions.rowModelType is ${o.join(" or ")}`
22894      );
22895      return;
22896    }
22897    return t.apply(t, n);
22898  } : t;
22899}
22900var Nb = {
22901  AdvancedFilter: 1,
22902  AllEnterprise: 1,
22903  CellSelection: 1,
22904  Clipboard: 1,
22905  ColumnMenu: 1,
22906  ColumnsToolPanel: 1,
22907  ContextMenu: 1,
22908  ExcelExport: 1,
22909  FiltersToolPanel: 1,
22910  GridCharts: 1,
22911  IntegratedCharts: 1,
22912  GroupFilter: 1,
22913  MasterDetail: 1,
22914  Menu: 1,
22915  MultiFilter: 1,
22916  Pivot: 1,
22917  RangeSelection: 1,
22918  RichSelect: 1,
22919  RowGrouping: 1,
22920  RowGroupingPanel: 1,
22921  ServerSideRowModelApi: 1,
22922  ServerSideRowModel: 1,
22923  SetFilter: 1,
22924  SideBar: 1,
22925  Sparklines: 1,
22926  StatusBar: 1,
22927  TreeData: 1,
22928  ViewportRowModel: 1
22929}, Vo = [
22930  "TextFilter",
22931  "NumberFilter",
22932  "DateFilter",
22933  "SetFilter",
22934  "MultiFilter",
22935  "GroupFilter",
22936  "CustomFilter"
22937], Vb = {
22938  EditCore: [
22939    "TextEditor",
22940    "NumberEditor",
22941    "DateEditor",
22942    "CheckboxEditor",
22943    "LargeTextEditor",
22944    "SelectEditor",
22945    "RichSelect",
22946    "CustomEditor"
22947  ],
22948  CheckboxCellRenderer: ["AllCommunity"],
22949  ClientSideRowModelHierarchy: ["RowGrouping", "Pivot", "TreeData"],
22950  ColumnFilter: Vo,
22951  ColumnGroupHeaderComp: ["AllCommunity"],
22952  ColumnGroup: ["AllCommunity"],
22953  ColumnHeaderComp: ["AllCommunity"],
22954  ColumnMove: ["AllCommunity"],
22955  ColumnResize: ["AllCommunity"],
22956  CommunityCore: ["AllCommunity"],
22957  CsrmSsrmSharedApi: ["ClientSideRowModelApi", "ServerSideRowModelApi"],
22958  EnterpriseCore: ["AllEnterprise"],
22959  FilterCore: [...Vo, "QuickFilter", "ExternalFilter", "AdvancedFilter"],
22960  GroupCellRenderer: ["RowGrouping", "Pivot", "TreeData", "MasterDetail", "ServerSideRowModel"],
22961  KeyboardNavigation: ["AllCommunity"],
22962  LoadingCellRenderer: ["ServerSideRowModel"],
22963  MenuCore: ["ColumnMenu", "ContextMenu"],
22964  MenuItem: ["ColumnMenu", "ContextMenu", "MultiFilter", "IntegratedCharts", "ColumnsToolPanel"],
22965  Overlay: ["AllCommunity"],
22966  PinnedColumn: ["AllCommunity"],
22967  SharedAggregation: ["RowGrouping", "Pivot", "TreeData", "ServerSideRowModel"],
22968  SharedDragAndDrop: ["AllCommunity"],
22969  SharedMasterDetail: ["MasterDetail", "ServerSideRowModel"],
22970  SharedMenu: [...Vo, "ColumnMenu", "ContextMenu"],
22971  SharedPivot: ["Pivot", "ServerSideRowModel"],
22972  SharedRowGrouping: ["RowGrouping", "ServerSideRowModel"],
22973  SharedRowSelection: ["RowSelection", "ServerSideRowModel"],
22974  SkeletonCellRenderer: ["ServerSideRowModel"],
22975  Sort: ["AllCommunity"],
22976  SsrmInfiniteSharedApi: ["InfiniteRowModel", "ServerSideRowModelApi"],
22977  SharedTreeData: ["TreeData", "ServerSideRowModel"]
22978}, Wb = {
22979  InfiniteRowModel: "infinite",
22980  ClientSideRowModelApi: "clientSide",
22981  ClientSideRowModel: "clientSide",
22982  ServerSideRowModelApi: "serverSide",
22983  ServerSideRowModel: "serverSide",
22984  ViewportRowModel: "viewport"
22985};
22986function zb(e, t) {
22987  const i = [];
22988  return (Array.isArray(e) ? e : [e]).forEach((s) => {
22989    const o = Vb[s];
22990    o ? o.forEach((n) => {
22991      const r = Wb[n];
22992      (!r || r === t) && i.push(n);
22993    }) : i.push(s);
22994  }), i;
22995}
22996var di = {
22997  agSetColumnFilter: "SetFilter",
22998  agSetColumnFloatingFilter: "SetFilter",
22999  agMultiColumnFilter: "MultiFilter",
23000  agMultiColumnFloatingFilter: "MultiFilter",
23001  agGroupColumnFilter: "GroupFilter",
23002  agGroupColumnFloatingFilter: "GroupFilter",
23003  agGroupCellRenderer: "GroupCellRenderer",
23004  agGroupRowRenderer: "GroupCellRenderer",
23005  agRichSelect: "RichSelect",
23006  agRichSelectCellEditor: "RichSelect",
23007  agDetailCellRenderer: "SharedMasterDetail",
23008  agSparklineCellRenderer: "Sparklines",
23009  agDragAndDropImage: "SharedDragAndDrop",
23010  agColumnHeader: "ColumnHeaderComp",
23011  agColumnGroupHeader: "ColumnGroupHeaderComp",
23012  agSortIndicator: "Sort",
23013  agAnimateShowChangeCellRenderer: "HighlightChanges",
23014  agAnimateSlideCellRenderer: "HighlightChanges",
23015  agLoadingCellRenderer: "LoadingCellRenderer",
23016  agSkeletonCellRenderer: "SkeletonCellRenderer",
23017  agCheckboxCellRenderer: "CheckboxCellRenderer",
23018  agLoadingOverlay: "Overlay",
23019  agNoRowsOverlay: "Overlay",
23020  agTooltipComponent: "Tooltip",
23021  agReadOnlyFloatingFilter: "CustomFilter",
23022  agTextColumnFilter: "TextFilter",
23023  agNumberColumnFilter: "NumberFilter",
23024  agDateColumnFilter: "DateFilter",
23025  agDateInput: "DateFilter",
23026  agTextColumnFloatingFilter: "TextFilter",
23027  agNumberColumnFloatingFilter: "NumberFilter",
23028  agDateColumnFloatingFilter: "DateFilter",
23029  agCellEditor: "TextEditor",
23030  agSelectCellEditor: "SelectEditor",
23031  agTextCellEditor: "TextEditor",
23032  agNumberCellEditor: "NumberEditor",
23033  agDateCellEditor: "DateEditor",
23034  agDateStringCellEditor: "DateEditor",
23035  agCheckboxCellEditor: "CheckboxEditor",
23036  agLargeTextCellEditor: "LargeTextEditor",
23037  agMenuItem: "MenuItem",
23038  agColumnsToolPanel: "ColumnsToolPanel",
23039  agFiltersToolPanel: "FiltersToolPanel",
23040  agAggregationComponent: "StatusBar",
23041  agSelectedRowCountComponent: "StatusBar",
23042  agTotalRowCountComponent: "StatusBar",
23043  agFilteredRowCountComponent: "StatusBar",
23044  agTotalAndFilteredRowCountComponent: "StatusBar"
23045}, _b = (e) => `import { ModuleRegistry } from 'ag-grid-community'; 
23046${e.map(
23047  (i) => `import { ${js(i)} } from '${Nb[i] ? "ag-grid-enterprise" : "ag-grid-community"}';`
23048).join(` 
23049`)} 
23050
23051ModuleRegistry.registerModules([ ${e.map(js).join(", ")} ]); 
23052
23053For more info see: ${pi}/modules/`;
23054function js(e) {
23055  return `${e}Module`;
23056}
23057var Fa = ({
23058  reasonOrId: e,
23059  moduleName: t,
23060  gridScoped: i,
23061  gridId: s,
23062  rowModelType: o,
23063  additionalText: n
23064}) => {
23065  const r = zb(t, o);
23066  return `Unable to use ${typeof e == "string" ? e : jb[e]} as ${r.length > 1 ? "one of " + r.map(js).join(", ") : js(r[0])} is not registered${i ? " for gridId: " + s : ""}. Check if you have registered the module:
23067${_b(r)}` + (n ? ` 
23068
23069${n}` : "");
23070}, xa = (e) => `${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
23071
23072import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
23073import { ModuleRegistry } from 'ag-grid-community';
23074import { ${e} } from 'ag-grid-enterprise';
23075    
23076ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
23077    `, Ub = (e) => `AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`, $b = {
23078  1: () => "`rowData` must be an array",
23079  2: ({ nodeId: e }) => `Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,
23080  3: () => "Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",
23081  4: ({ id: e }) => `Could not find row id=${e}, data item was not found for this id`,
23082  5: ({ data: e }) => [
23083    "Could not find data item as object was not found.",
23084    e,
23085    " Consider using getRowId to help the Grid find matching row data"
23086  ],
23087  6: () => "'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",
23088  7: () => "Pivoting is not supported with aligned grids as it may produce different c
23088olumns in each grid.",
23089  8: ({ key: e }) => `Unknown key for navigation ${e}`,
23090  9: ({ variable: e }) => `No value for ${e.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e.defaultValue} will be used and updated when styles load.`,
23091  10: ({ eventType: e }) => `As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,
23092  11: () => "No gridOptions provided to createGrid",
23093  12: ({ colKey: e }) => ["column ", e, " not found"],
23094  13: () => "Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",
23095  14: ({ groupPrefix: e }) => `Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,
23096  15: ({ expression: e }) => ["value should be either a string or a function", e],
23097  16: ({ expression: e, params: t, e: i }) => [
23098    "Processing of the expression failed",
23099    "Expression = ",
23100    e,
23101    "Params = ",
23102    t,
23103    "Exception = ",
23104    i
23105  ],
23106  17: () => "you need either field or valueSetter set on colDef for editing to work",
23107  18: () => "alignedGrids contains an undefined option.",
23108  19: () => "alignedGrids - No api found on the linked grid.",
23109  20: () => `You may want to configure via a callback to avoid setup race conditions:
23110                     "alignedGrids: () => [linkedGrid]"`,
23111  21: () => "pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",
23112  22: ({ key: e }) => `${e} is an initial property and cannot be updated.`,
23113  23: () => "The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",
23114  24: () => "row height must be a number if not using standard row model",
23115  25: ({ id: e }) => ["The getRowId callback must return a string. The ID ", e, " is being cast to a string."],
23116  26: ({ fnName: e, preDestroyLink: t }) => `Grid API function ${e}() cannot be called as the grid has been destroyed.
23117 Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
23118 To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,
23119  27: ({ fnName: e, module: t }) => `API function '${e}' not registered to module '${t}'`,
23120  28: () => "setRowCount cannot be used while using row grouping.",
23121  29: () => "tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",
23122  30: ({ toIndex: e }) => [
23123    "tried to insert columns in invalid location, toIndex = ",
23124    e,
23125    "remember that you should not count the moving columns when calculating the new index"
23126  ],
23127  31: () => "infinite loop in resizeColumnSets",
23128  32: () => "applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",
23129  33: () => "stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",
23130  34: ({ key: e }) => `the column type '${e}' is a default column type and cannot be overridden.`,
23131  35: () => "Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",
23132  36: ({ t: e }) => "colDef.type '" + e + "' does not correspond to defined gridOptions.columnTypes",
23133  37: () => "Changing the column pinning status is not allowed with domLayout='print'",
23134  38: ({ iconName: e }) => `provided icon '${e}' needs to be a string or a function`,
23135  39: () => "Applying column order broke a group where columns should be married together. Applying new order has been discarded.",
23136  40: ({ e, method: t }) => `${e}
23137${Ub(t)}`,
23138  41: () => "Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",
23139  42: () => "Browser does not support document.execCommand('copy') for clipboard operations",
23140  43: ({ iconName: e }) => `As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,
23141  44: () => 'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',
23142  45: ({ parentCellDataType: e }) => `The data type definition ${e} does not exist.`,
23143  46: () => 'The "baseDataType" property of a data type definition must match that of its parent.',
23144  47: ({ cellDataType: e }) => `Missing data type definition - "${e}"`,
23145  48: ({ property: e }) => `Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,
23146  49: ({ methodName: e }) => `Framework component is missing the method ${e}()`,
23147  50: ({ compName: e }) => `Could not find component ${e}, did you forget to configure this component?`,
23148  51: () => "Export cancelled. Export is not allowed as per your configuration.",
23149  52: () => "There is no `window` associated with the current `document`",
23150  53: () => "unknown value type during csv conversion",
23151  54: () => "Could not find document body, it is needed for drag and drop and context menu.",
23152  55: () => "addRowDropZone - A container target needs to be provided",
23153  56: () => "addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",
23154  57: () => "unable to show popup filter, filter instantiation failed",
23155  58: () => "no values found for select cellEditor",
23156  59: () => "cannot select pinned rows",
23157  60: () => "cannot select node until it has finished loading",
23158  61: () => "since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",
23159  62: ({ colId: e }) => `setFilterModel() - no column found for colId: ${e}`,
23160  63: ({ colId: e }) => `setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,
23161  64: ({ colId: e }) => `setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,
23162  65: () => "filter missing setModel method, which is needed for setFilterModel",
23163  66: () => "filter API missing getModel method, which is needed for getFilterModel",
23164  67: () => "Filter is missing isFilterActive() method",
23165  68: () => "Column Filter API methods have been disabled as Advanced Filters are enabled.",
23166  69: ({ guiFromFilter: e }) => `getGui method from filter returned ${e}; it should be a DOM element.`,
23167  70: ({ newFilter: e }) => `Grid option quickFilterText only supports string inputs, received: ${typeof e}`,
23168  71: () => "debounceMs is ignored when apply button is present",
23169  72: ({ keys: e }) => ["ignoring FilterOptionDef as it doesn't contain one of ", e],
23170  73: () =>
23170 "invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",
23171  74: () => "no filter options for filter",
23172  75: () => "Unknown button type specified",
23173  76: ({ filterModelType: e }) => [
23174    'Unexpected type of filter "',
23175    e,
23176    '", it looks like the filter was configured with incorrect Filter Options'
23177  ],
23178  77: () => "Filter model is missing 'conditions'",
23179  78: () => 'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',
23180  79: () => '"filterParams.maxNumConditions" must be greater than or equal to zero.',
23181  80: () => '"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',
23182  81: () => '"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',
23183  82: ({ param: e }) => `DateFilter ${e} is not a number`,
23184  83: () => "DateFilter minValidYear should be <= maxValidYear",
23185  84: () => "DateFilter minValidDate should be <= maxValidDate",
23186  85: () => "DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",
23187  86: () => "DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",
23188  87: () => "DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",
23189  88: ({ index: e }) => `Invalid row index for ensureIndexVisible: ${e}`,
23190  89: () => "A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",
23191  90: () => "datasource is missing getRows method",
23192  91: () => "Filter is missing method doesFilterPass",
23193  92: ({ methodName: e }) => `AnimationFrameService.${e} called but animation frames are off`,
23194  93: () => "cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",
23195  94: ({
23196    paginationPageSizeOption: e,
23197    pageSizeSet: t,
23198    pageSizesSet: i,
23199    pageSizeOptions: s
23200  }) => `'paginationPageSize=${e}'${t ? "" : " (default value)"}, but ${e} is not included in${i ? "" : " the default"} paginationPageSizeSelector=[${s.join(", ")}].`,
23201  95: ({
23202    paginationPageSizeOption: e,
23203    paginationPageSizeSelector: t
23204  }) => `Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,
23205  96: ({ id: e, data: t }) => [
23206    "Duplicate ID",
23207    e,
23208    "found for pinned row with data",
23209    t,
23210    "When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."
23211  ],
23212  97: ({ colId: e }) => `cellEditor for column ${e} is missing getGui() method`,
23213  98: () => "popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",
23214  99: () => "Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",
23215  100: ({ rowModelType: e }) => `selectAll only available when rowModelType='clientSide', ie not ${e}`,
23216  101: ({
23217    propertyName: e,
23218    componentName: t,
23219    agGridDefaults: i,
23220    jsComps: s
23221  }) => {
23222    const o = [], n = [
23223      // Don't include the old names / internals in potential suggestions
23224      ...Object.keys(i).filter(
23225        (a) => !["agCellEditor", "agGroupRowRenderer", "agSortIndicator"].includes(a)
23226      ),
23227      ...Object.keys(s)
23228    ], r = hc({
23229      inputValue: t,
23230      allSuggestions: n,
23231      hideIrrelevant: !0,
23232      filterByPercentageOfBestMatch: 0.8
23233    }).values;
23234    return o.push(
23235      `Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
23236`
23237    ), r.length > 0 && o.push(`         Did you mean: [${r.slice(0, 3)}]?
23238`), o.push("If using a custom component check it has been registered correctly."), o;
23239  },
23240  102: () => "selecting just filtered only works when gridOptions.rowModelType='clientSide'",
23241  103: () => "Invalid selection state. When using client-side row model, the state must conform to `string[]`.",
23242  104: ({ value: e, param: t }) => `Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,
23243  105: ({ e }) => ["chart rendering failed", e],
23244  106: () => `Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${pi}/theming-migration/`,
23245  107: ({ key: e, value: t }) => `Invalid value for theme param ${e} - ${t}`,
23246  108: ({ e }) => ["chart update failed", e],
23247  109: ({ aggFuncOrString: e }) => `unrecognised aggregation function ${e}`,
23248  110: () =>
23248 "groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",
23249  111: () => "Invalid selection state. When `groupSelectsChildren` is enabled, the state must conform to `IServerSideGroupSelectionState`.",
23250  113: () => "Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",
23251  114: ({ component: e }) => `Could not find component with name of ${e}. Is it in Vue.components?`,
23252  115: () => "The provided selection state should be an object.",
23253  116: () => "Invalid selection state. The state must conform to `IServerSideSelectionState`.",
23254  117: () => "selectAll must be of boolean type.",
23255  118: () => "Infinite scrolling must be enabled in order to set the row count.",
23256  119: () => "Unable to instantiate filter",
23257  120: () => "MultiFloatingFilterComp expects MultiFilter as its parent",
23258  121: () => "a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",
23259  122: () => "could not find the document, document is empty",
23260  123: () => "Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",
23261  124: () => "No active charts to update.",
23262  125: ({ chartId: e }) => `Unable to update chart. No active chart found with ID: ${e}.`,
23263  126: () => "unable to restore chart as no chart model is provided",
23264  127: ({ allRange: e }) => `unable to create chart as ${e ? "there are no columns in the grid" : "no range is selected"}.`,
23265  128: ({ feature: e }) => `${e} is only available if using 'multiRow' selection mode.`,
23266  129: ({ feature: e, rowModel: t }) => `${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,
23267  130: () => 'cannot multi select unless selection mode is "multiRow"',
23268  131: () => "cannot range select while selecting multiple rows",
23269  132: () => "Row selection features are not available unless `rowSelection` is enabled.",
23270  133: ({ iconName: e }) => `icon '${e}' function should return back a string or a dom object`,
23271  134: ({ iconName: e }) => `Did not find icon '${e}'`,
23272  135: () => "Data type of the new value does not match the cell data type of the column",
23273  136: () => "Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",
23274  137: ({ type: e, currentChartType: t }) => `Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,
23275  138: ({ chartType: e }) => `invalid chart type supplied: ${e}`,
23276  139: ({ customThemeName: e }) => `a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,
23277  140: ({ name: e }) => `no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,
23278  141: () => "cross filtering with row grouping is not supported.",
23279  142: () => "cross filtering is only supported in the client side row model.",
23280  143: ({ panel: e }) => `'${e}' is not a valid Chart Tool Panel name`,
23281  144: ({ type: e }) => `Invalid charts data panel group name supplied: '${e}'`,
23282  145: ({ group: e }) => `As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,
23283  146: ({ comp: e }) => `Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,
23284  147: ({ group: e }) => `Invalid charts customize panel group name supplied: '${e}'`,
23285  148: ({ group: e }) => `invalid chartGroupsDef config '${e}'`,
23286  149: ({ group: e, chartType: t }) => `invalid chartGroupsDef config '${e}.${t}'`,
23287  150: () => "'seriesChartTypes' are required when the 'customCombo' chart type is specified.",
23288  151: ({ chartType: e }) => `invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,
23289  152: ({ colId: e }) => `no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,
23290  153: ({ chartDataType: e }) => `unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,
23291  154: ({ colId: e }) => `cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,
23292  155: ({ option: e }) => `'${e}' is not a valid Chart Toolbar Option`,
23293  156: ({ panel: e }) => `Invalid panel in chartToolPanelsDef.panels: '${e}'`,
23294  157: ({ unrecognisedGroupIds: e }) => ["unable to find group(s) for supplied groupIds:", e],
23295  158: () => "can not expand a column item that does not represent a column group header",
23296  159: () => "Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",
23297  160: () => "Export cancelled. Export is not allowed as per your configuration.",
23298  161: () => "The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel
vendor: 5,757 bytes, lines 23298-23366
23298()'",
23299  162: ({ id: e, dataType: t }) => `Unrecognized data type for excel export [${e}.dataType=${t}]`,
23300  163: ({ featureName: e }) => `Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
23301 Please turn off ${e} to enable Excel table exports.`,
23302  164: () => "Unable to add data table to Excel sheet: A table already exists.",
23303  165: () => "Unable to add data table to Excel sheet: Missing required parameters.",
23304  166: ({ unrecognisedGroupIds: e }) => ["unable to find groups for these supplied groupIds:", e],
23305  167: ({ unrecognisedColIds: e }) => ["unable to find columns for these supplied colIds:", e],
23306  168: () => "detailCellRendererParams.template should be function or string",
23307  169: () => 'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',
23308  170: ({ providedStrategy: e }) => `invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,
23309  171: () => "could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",
23310  172: () => "could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",
23311  173: ({ group: e }) => `invalid chartGroupsDef config '${e}'`,
23312  174: ({ group: e, chartType: t }) => `invalid chartGroupsDef config '${e}.${t}'`,
23313  175: ({ menuTabName: e, itemsToConsider: t }) => [
23314    `Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,
23315    t
23316  ],
23317  176: ({ key: e }) => `unknown menu item type ${e}`,
23318  177: () => "valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'.",
23319  178: ({ colId: e }) => `column ${e} is not visible`,
23320  179: () => "totalValueGetter should be either a function or a string (expression)",
23321  180: () => "agRichSelectCellEditor requires cellEditorParams.values to be set",
23322  181: () => "agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",
23323  182: () => 'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',
23324  183: () => "Group Column Filter only works on group columns. Please use a different filter.",
23325  184: ({ parentGroupData: e, childNodeData: t }) => ["duplicate group keys for row data, keys should be unique", [e, t]],
23326  185: ({ data: e }) => ["getDataPath() should not return an empty path", [e]],
23327  186: ({
23328    rowId: e,
23329    rowData: t,
23330    duplicateRowsData: i
23331  }) => ["duplicate group keys for row data, keys should be unique", e, t, ...i],
23332  187: ({ rowId: e, firstData: t, secondData: i }) => [
23333    `Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,
23334    "first instance",
23335    t,
23336    "second instance",
23337    i
23338  ],
23339  188: () => "getRowId callback must be provided for Server Side Row Model selection to work correctly.",
23340  189: ({ startRow: e }) => `invalid value ${e} for startRow, the value should be >= 0`,
23341  190: ({ rowGroupId: e, data: t }) => [
23342    "null and undefined values are not allowed for server side row model keys",
23343    e ? `column = ${e}` : "",
23344    "data is ",
23345    t
23346  ],
23347  191: () => "cannot multi select unless selection mode is 'multiRow'",
23348  192: () => "cannot use range selection when multi selecting rows",
23349  193: () => "cannot multi select unless selection mode is 'multiRow'",
23350  194: ({ method: e }) => `calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,
23351  195: ({ justCurrentPage: e }) => `selecting just ${e ? "current page" : "filtered"} only works when gridOptions.rowModelType='clientSide'`,
23352  196: ({ key: e }) => `Provided ids must be of string type. Invalid id provided: ${e}`,
23353  197: () => "`toggledNodes` must be an array of string ids.",
23354  198: () => "cannot multi select unless selection mode is 'multiRow'",
23355  199: () => "getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",
23356  200: Fa,
23357  201: ({ rowModelType: e }) => `Could not find row model for rowModelType = ${e}`,
23358  202: () => "`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",
23359  203: () => "Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",
23360  204: () => "Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",
23361  205: ({ duplicateIdText: e }) => `Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,
23362  206: () => "getRowId callback must be implemented for transactions to work. Transaction was ignored.",
23363  207: () => 'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',
23364  208: () => "Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",
23365  209: () => `Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${pi}/filter-set-filter-list/#filter-value-types`,
23366  210: () => "Set Filter has a Key Creator, but provided values are primitives. Did 
23366you mean to provide complex objects?",
23367  211: () => "property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",
23368  212: () => "please review all your toolPanel components, it seems like at least one of them doesn't have an id",
23369  213: () => "Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",
23370  214: ({ key: e }) => `unable to lookup Tool Panel as invalid key supplied: ${e}`,
23371  215: ({ key: e, defaultByKey: t }) => `the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t).join(",")}`,
23372  216: ({ name: e }) => `Missing component for '${e}'`,
23373  217: ({ invalidColIds: e }) => ["unable to find grid columns for the supplied colDef(s):", e],
23374  218: ({ property: e, defaultOffset: t }) => `${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,
23375  219: ({ property: e }) => `Property ${e} does not exist on the target object.`,
23376  220: ({ lineDash: e }) => `'${e}' is not a valid 'lineDash' option.`,
23377  221: () => "agAggregationComponent should only be used with the client and server side row model.",
23378  222: () => "agFilteredRowCountComponent should only be used with the client side row model.",
23379  223: () => "agSelectedRowCountComponent should only be used with the client and server side row model.",
23380  224: () => "agTotalAndFilteredRowCountComponent should only be used with the client side row model.",
23381  225: () => "agTotalRowCountComponent should only be used with the client side row model.",
23382  226: () => "viewport is missing init method.",
23383  227: () => "menu item icon must be DOM node or string",
23384  228: ({ menuItemOrString: e }) => `unrecognised menu item ${e}`,
23385  229: ({ index: e }) => ["invalid row index for ensureIndexVisible: ", e],
23386  230: () => "detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/",
23387  // @deprecated v32 mark for removal as part of v32 deprecated features
23388  231: () => "As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",
23389  232: () => "Using both rowData and v-model. rowData will be ignored.",
23390  233: ({ methodName: e }) => `Framework component is missing the method ${e}()`,
23391  234: () => 'Group Column Filter does not work with the colDef property "field". This property will be ignored.',
23392  235: () => 'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',
23393  236: () => 'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',
23394  237: () => "Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",
23395  238: () => "setRowCount can only accept a positive row count.",
23396  239: () => 'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',
23397  240: ({ theme: e }) => `theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,
23398  241: () => "cannot select multiple rows when rowSelection.mode is set to 'singleRow'",
23399  242: () => "cannot select multiple rows when using rangeSelect",
23400  243: () => "Failed to deserialize state - each provided state object must be an object.",
23401  244: () => "Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",
23402  245: () => "Failed to deserialize state - `toggledNodes` must be an array.",
23403  246: () => "Failed to deserialize state - Every `toggledNode` requires an associated string id.",
23404  247: () =>
23404 `Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. 
23405Please rebuild the selection state and reapply it.`,
23406  248: () => "SetFloatingFilter expects SetFilter as its parent",
23407  249: () => "Must supply a Value Formatter in Set Filter params when using a Key Creator",
23408  250: () => "Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",
23409  251: ({ chartType: e }) => `AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,
23410  252: () => `cannot get grid to draw rows when it is in the middle of drawing rows. 
23411Your code probably called a grid API method while the grid was in the render stage. 
23412To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). 
23413To see what part of your code that caused the refresh check this stacktrace.`,
23414  253: ({ version: e }) => ["Illegal version string: ", e],
23415  254: () => "Cannot create chart: no chart themes available.",
23416  255: ({ point: e }) => `Lone surrogate U+${e.toString(16).toUpperCase()} is not a scalar value`,
23417  256: () => "Unable to initialise. See validation error, or load ValidationModule if missing.",
23418  257: () => xa("IntegratedChartsModule"),
23419  258: () => xa("SparklinesModule"),
23420  259: ({ part: e }) => `the argument to theme.withPart must be a Theming API part object, received: ${e}`,
23421  260: ({
23422    propName: e,
23423    compName: t,
23424    gridScoped: i,
23425    gridId: s,
23426    rowModelType: o
23427  }) => Fa({
23428    reasonOrId: `AG Grid '${e}' component: ${t}`,
23429    moduleName: di[t],
23430    gridId: s,
23431    gridScoped: i,
23432    rowModelType: o
23433  }),
23434  261: () => "As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",
23435  262: () => 'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor',
23436  263: () => 'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',
23437  264: () => 'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus'
23438};
23439function Kb(e, t) {
23440  const i = $b[e];
23441  if (!i)
23442    return [`Missing error text for error id ${e}!`];
23443  const s = i(t), n = `
23444See ${Tl(e, t)}`;
23445  return Array.isArray(s) ? s.concat(n) : [s, n];
23446}
23447var jb = {
23448  1: "Charting Aggregation",
23449  2: "pivotResultFields",
23450  3: "setTooltip"
23451}, qb = () => ({
23452  checkboxSelection: { version: "32.2", message: "Use `rowSelection.checkboxes` in `GridOptions` instead." },
23453  headerCheckboxSelection: {
23454    version: "32.2",
23455    message: "Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."
23456  },
23457  headerCheckboxSelectionFilteredOnly: {
23458    version: "32.2",
23459    message: 'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'
23460  },
23461  headerCheckboxSelectionCurrentPageOnly: {
23462    version: "32.2",
23463    message: 'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'
23464  },
23465  showDisabledCheckboxes: {
23466    version: "32.2",
23467    message: "Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."
23468  }
23469}), Yb = () => ({
23470  aggFunc: { module: "SharedAggregation" },
23471  autoHeight: {
23472    supportedRowModels: ["clientSide", "serverSide"],
23473    module: "RowAutoHeight"
23474  },
23475  cellClass: { module: "CellStyle" },
23476  cellClassRules: { module: "CellStyle" },
23477  cellEditor: ({ cellEditor: e, editable: t }) => {
23478    if (!t)
23479      return null;
23480    if (typeof e == "string") {
23481      const i = di[e];
23482      if (i)
23483        return { module: i };
23484    }
23485    return { module: "CustomEditor" };
23486  },
23487  cellRenderer: ({ cellRenderer: e }) => {
23488    if (typeof e != "string")
23489      return null;
23490    const t = di[e];
23491    return t ? { module: t } : null;
23492  },
23493  cellRendererParams: {
23494    validate: (e) => (e.rowGroup != null || e.rowGroupIndex != null || e.cellRenderer === "agGroupCellRenderer") && "checkbox" in e.cellRendererParams ? 'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.' : null
23495  },
23496  cellStyle: { module: "CellStyle" },
23497  children: () => gc(),
23498  columnChooserParams: {
23499    module: "ColumnMenu"
23500  },
23501  contextMenuItems: { module: "ContextMenu" },
23502  dndSource: { module: "DragAndDrop" },
23503  dndSourceOnRowDrag: { module: "DragAndDrop" },
23504  editable: ({ editable: e, cellEditor: t }) => e && !t ? {
23505    module: "TextEditor"
23506  } : null,
23507  enableCellChangeFlash: { module: "HighlightChanges" },
23508  enablePivot: { module: "SharedPivot" },
23509  enableRowGroup: { module: "SharedRowGrouping" },
23510  enableValue: { module: "SharedAggregation" },
23511  filter: ({ filter: e }) => {
23512    if (e && typeof e != "string" && typeof e != "boolean")
23513      return { module: "CustomFilter" };
23514    if (typeof e == "string") {
23515      const t = di[e];
23516      if (t)
23517        return { module: t };
23518    }
23519    return { module: "ColumnFilter" };
23520  },
23521  floatingFilter: { module: "ColumnFilter" },
23522  headerCheckboxSelection: {
23523    supportedRowModels: ["clientSide", "serverSide"],
23524    validate: (e, { rowSelection: t }) => t === "multiple" ? null : "headerCheckboxSelection is only supported with rowSelection=multiple"
23525  },
23526  headerCheckboxSelectionCurrentPageOnly: {
23527    supportedRowModels: ["clientSide"],
23528    validate: (e, { rowSelection: t }) => t === "multiple" ? null : "headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"
23529  },
23530  headerCheckboxSelectionFilteredOnly: {
23531    supportedRowModels: ["clientSide"],
23532    validate: (e, { rowSelection: t }) => t === "multiple" ? null : "headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"
23533  },
23534  headerTooltip: { module: "Tooltip" },
23535  headerValueGetter: {
23536    validate: (e) => {
23537      const t = e.headerValueGetter;
23538      return typeof t == "function" || typeof t == "string" ? null : "headerValueGetter must be a function or a valid string expression";
23539    }
23540  },
23541  icons: {
23542    validate: ({ icons: e }) => {
23543      if (e) {
23544        if (e.smallDown)
23545          return wt(262);
23546        if (e.smallLeft)
23547          return wt(263);
23548        if (e.smallRight)
23549          return wt(264);
23550      }
23551      return null;
23552    }
23553  },
23554  mainMenuItems: { module: "ColumnMenu" },
23555  menuTabs: (e) => {
23556    const t = ["columnsMenuTab", "generalMenuTab"];
23557    return e.menuTabs?.some((i) => t.includes(i)) ? {
23558      module: "ColumnMenu"
23559    } : null;
23560  },
23561  pivot: { module: "SharedPivot" },
23562  pivotIndex: { module: "SharedPivot" },
23563  rowDrag: { module: "RowDrag" },
23564  rowGroup: { module: "SharedRowGrouping" },
23565  rowGroupIndex: { module: "SharedRowGrouping" },
23566  sortingOrder: {
23567    validate: (e) => {
23568      const t = e.sortingOrder;
23569      if (Array.isArray(t) && t.length > 0) {
23570        const i = t.filter((s) => !os.includes(s));
23571        if (i.length > 0)
23572          return `sortingOrder must be an array with elements from [${os.map(Ls).join()}], currently it includes [${i.map(Ls).join()}]`;
23573      } else if (!Array.isArray(t) || t.length <= 0)
23574        return `sortingOrder must be an array with at least one element, currently it's ${t}`;
23575      return null;
23576    }
23577  },
23578  tooltipField: { module: "Tooltip" },
23579  tooltipValueGetter: { module: "Tooltip" },
23580  type: {
23581    validate: (e) => {
23582      const t = e.type;
23583      return t instanceof Array ? t.some((s) => typeof s != "string") ? "if colDef.type is supplied an array it should be of type 'string[]'" : null : typeof t == "string" ? null : "colDef.type should be of type 'string' | 'string[]'";
23584    }
23585  },
23586  rowSpan: {
23587    validate: (e, { suppressRowTransform: t }) => t ? null : "colDef.rowSpan requires suppressRowTransform to be enabled."
23588  }
23589}), Qb = {
23590  headerName: void 0,
23591  columnGroupShow: void 0,
23592  headerClass: void 0,
23593  toolPanelClass: void 0,
23594  headerValueGetter: void 0,
23595  pivotKeys: void 0,
23596  groupId: void 0,
23597  colId: void 0,
23598  sort: void 0,
23599  initialSort: void 0,
23600  field: void 0,
23601  type: void 0,
23602  cellDataType: void 0,
23603  tooltipComponent: void 0,
23604  tooltipField: void 0,
23605  headerTooltip: void 0,
23606  cellClass: void 0,
23607  showRowGroup: void 0,
23608  filter: void 0,
23609  initialAggFunc: void 0,
23610  defaultAggFunc: void 0,
23611  aggFunc: void 0,
23612  pinned: void 0,
23613  initialPinned: void 0,
23614  chartDataType: void 0,
23615  cellAriaRole: void 0,
23616  cellEditorPopupPosition: void 0,
23617  headerGroupComponent: void 0,
23618  headerGroupComponentParams: void 0,
23619  cellStyle: void 0,
23620  cellRenderer: void 0,
23621  cellRendererParams: void 0,
23622  cellEditor: void 0,
23623  cellEditorParams: void 0,
23624  filterParams: void 0,
23625  pivotValueColumn: void 0,
23626  headerComponent: void 0,
23627  headerComponentParams: void 0,
23628  floatingFilterComponent: void 0,
23629  floatingFilterComponentParams: void 0,
23630  tooltipComponentParams: void 0,
23631  refData: void 0,
23632  columnChooserParams: void 0,
23633  children: void 0,
23634  sortingOrder: void 0,
23635  allowedAggFuncs: void 0,
23636  menuTabs: void 0,
23637  pivotTotalColumnIds: void 0,
23638  cellClassRules: void 0,
23639  icons: void 0,
23640  sortIndex: void 0,
23641  initialSortIndex: void 0,
23642  flex: void 0,
23643  initialFlex: void 0,
23644  width: void 0,
23645  initialWidth: void 0,
23646  minWidth: void 0,
23647  maxWidth: void 0,
23648  rowGroupIndex: void 0,
23649  initialRowGroupIndex: void 0,
23650  pivotIndex: void 0,
23651  initialPivotIndex: void 0,
23652  suppressColumnsToolPanel: void 0,
23653  suppressFiltersToolPanel: void 0,
23654  openByDefault: void 0,
23655  marryChildren: void 0,
23656  suppressStickyLabel: void 0,
23657  hide: void 0,
23658  initialHide: void 0,
23659  rowGroup: void 0,
23660  initialRowGroup: void 0,
23661  pivot: void 0,
23662  initialPivot: void 0,
23663  checkboxSelection: void 0,
23664  showDisabledCheckboxes: void 0,
23665  headerCheckboxSelection: void 0,
23666  headerCheckboxSelectionFilteredOnly: void 0,
23667  headerCheckboxSelectionCurrentPageOnly: void 0,
23668  suppressHeaderMenuButton: void 0,
23669  suppressMovable: void 0,
23670  lockPosition: void 0,
23671  lockVisible: void 0,
23672  lockPinned: void 0,
23673  unSortIcon: void 0,
23674  suppressSizeToFit: void 0,
23675  suppressAutoSize: void 0,
23676  enableRowGroup: void 0,
23677  enablePivot: void 0,
23678  enableValue: void 0,
23679  editable: void 0,
23680  suppressPaste: void 0,
23681  suppressNavigable: void 0,
23682  enableCellChangeFlash: void 0,
23683  rowDrag: void 0,
23684  dndSource: void 0,
23685  autoHeight: void 0,
23686  wrapText: void 0,
23687  sortable: void 0,
23688  resizable: void 0,
23689  singleClickEdit: void 0,
23690  floatingFilter: void 0,
23691  cellEditorPopup: void 0,
23692  suppressFillHandle: void 0,
23693  wrapHeaderText: void 0,
23694  autoHeaderHeight: void 0,
23695  dndSourceOnRowDrag: void 0,
23696  valueGetter: void 0,
23697  valueSetter: void 0,
23698  filterValueGetter: void 0,
23699  keyCreator: void 0,
23700  valueFormatter: void 0,
23701  valueParser: void 0,
23702  comparator: void 0,
23703  equals: void 0,
23704  pivotComparator: void 0,
23705  suppressKeyboardEvent: void 0,
23706  suppressHeaderKeyboardEvent: void 0,
23707  colSpan: void 0,
23708  rowSpan: void 0,
23709  getQuickFilterText: void 0,
23710  onCellValueChanged: void 0,
23711  onCellClicked: void 0,
23712  onCellDoubleClicked: void 0,
23713  onCellContextMenu: void 0,
23714  rowDragText: void 0,
23715  tooltipValueGetter: void 0,
23716  cellRendererSelector: void 0,
23717  cellEditorSelector: void 0,
23718  suppressSpanHeaderHeight: void 0,
23719  useValueFormatterForExport: void 0,
23720  useValueParserForImport: void 0,
23721  mainMenuItems: void 0,
23722  contextMenuItems: void 0,
23723  suppressFloatingFilterButton: void 0,
23724  suppressHeaderFilterButton: void 0,
23725  suppressHeaderContextMenu: void 0,
23726  loadingCellRenderer: void 0,
23727  loadingCellRendererParams: void 0,
23728  loadingCellRendererSelector: void 0,
23729  context: void 0
23730}, Zb = () => Object.keys(Qb), gc = () => ({
23731  objectName: "colDef",
23732  allProperties: Zb(),
23733  docsUrl: "column-properties/",
23734  deprecations: qb(),
23735  validations: Yb()
23736}), Xb = () => ({
23737  suppressLoadingOverlay: { version: "32", message: "Use `loading`=false instead." },
23738  enableFillHandle: { version: "32.2", message: "Use `cellSelection.handle` instead." },
23739  enableRangeHandle: { version: "32.2", message: "Use `cellSelection.handle` instead." },
23740  enableRangeSelection: { version: "32.2", message: "Use `cellSelection = true` instead." },
23741  suppressMultiRangeSelection: {
23742    version: "32.2",
23743    message: "Use `cellSelection.suppressMultiRanges` instead."
23744  },
23745  suppressClearOnFillReduction: {
23746    version: "32.2",
23747    message: "Use `cellSelection.handle.suppressClearOnFillReduction` instead."
23748  },
23749  fillHandleDirection: { version: "32.2", message: "Use `cellSelection.handle.direction` instead." },
23750  fillOperation: { version: "32.2", message: "Use `cellSelection.handle.setFillValue` instead." },
23751  suppressRowClickSelection: {
23752    version: "32.2",
23753    message: "Use `rowSelection.enableClickSelection` instead."
23754  },
23755  suppressRowDeselection: { version: "32.2", message: "Use `rowSelection.enableClickSelection` instead." },
23756  rowMultiSelectWithClick: {
23757    version: "32.2",
23758    message: "Use `rowSelection.enableSelectionWithoutKeys` instead."
23759  },
23760  groupSelectsChildren: {
23761    version: "32.2",
23762    message: 'Use `rowSelection.groupSelects = "descendants"` instead.'
23763  },
23764  groupSelectsFiltered: {
23765    version: "32.2",
23766    message: 'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'
23767  },
23768  isRowSelectable: { version: "32.2", message: "Use `selectionOptions.isRowSelectable` instead." },
23769  suppressCopySingleCellRanges: { version: "32.2", message: "Use `rowSelection.copySelectedRows` instead." },
23770  suppressCopyRowsToClipboard: { version: "32.2", message: "Use `rowSelection.copySelectedRows` instead." },
23771  onRangeSelectionChanged: { version: "32.2", message: "Use `onCellSelectionChanged` instead." },
23772  onRangeDeleteStart: { version: "32.2", message: "Use `onCellSelectionDeleteStart` instead." },
23773  onRangeDeleteEnd: { version: "32.2", message: "Use `onCellSelectionDeleteEnd` instead." },
23774  suppressBrowserResizeObserver: {
23775    version: "32.2",
23776    message: "The grid always uses the browser's ResizeObserver, this grid option has no effect."
23777  },
23778  onColumnEverythingChanged: {
23779    version: "32.2",
23780    message: "Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."
23781  },
23782  groupRemoveSingleChildren: {
23783    version: "33",
23784    message: "Use `groupHideParentOfSingleChild` instead."
23785  },
23786  groupRemoveLowestSingleChildren: {
23787    version: "33",
23788    message: 'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'
23789  },
23790  suppressRowGroupHidesColumns: {
23791    version: "33",
23792    message: 'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'
23793  },
23794  suppressMakeColumnVisibleAfterUnGroup: {
23795    version: "33",
23796    message: 'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'
23797  },
23798  unSortIcon: { version: "33", message: "Use `defaultColDef.unSortIcon` instead." },
23799  sortingOrder: { version: "33", message: "Use `defaultColDef.sortingOrder` instead." },
23800  suppressPropertyNamesCheck: {
23801    version: "33",
23802    message: "`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."
23803  }
23804});
23805function Ue(e, t, i, s = Number.MAX_VALUE) {
23806  return typeof t == "number" || t == null ? t == null || t >= i && t <= s ? null : s === Number.MAX_VALUE ? `${e}: value should be greater than or equal to ${i}` : `${e}: value should be between ${i} and ${s}` : `${e}: value should be a number`;
23807}
23808var Jb = () => {
23809  const e = {
23810    alignedGrids: { module: "AlignedGrids" },
23811    allowContextMenuWithControlKey: { module: "ContextMenu" },
23812    autoSizePadding: {
23813      validate({ autoSizePadding: i }) {
23814        return Ue("autoSizePadding", i, 0);
23815      }
23816    },
23817    autoSizeStrategy: { module: "ColumnAutoSize" },
23818    cacheBlockSize: {
23819      supportedRowModels: ["serverSide", "infinite"],
23820      validate({ cacheBlockSize: i }) {
23821        return Ue("cacheBlockSize", i, 1);
23822      }
23823    },
23824    cacheOverflowSize: {
23825      validate({ cacheOverflowSize: i }) {
23826        return Ue("cacheOverflowSize", i, 1);
23827      }
23828    },
23829    cellSelection: {
23830      module: "CellSelection"
23831    },
23832    columnHoverHighlight: { module: "ColumnHover" },
23833    datasource: {
23834      supportedRowModels: ["infinite"],
23835      module: "InfiniteRowModel"
23836    },
23837    doesExternalFilterPass: { module: "ExternalFilter" },
23838    domLayout: {
23839      validate: (i) => {
23840        const s = i.domLayout, o = ["autoHeight", "normal", "print"];
23841        return s && !o.includes(s) ? `domLayout must be one of [${o.join()}], currently it's ${s}` : null;
23842      }
23843    },
23844    editType: {
23845      module: "EditCore"
23846    },
23847    enableAdvancedFilter: { module: "AdvancedFilter" },
23848    enableCharts: { module: "IntegratedCharts" },
23849    enableFillHandle: {
23850      dependencies: {
23851        enableRangeSelection: { required: [!0] }
23852      }
23853    },
23854    enableRangeHandle: {
23855      dependencies: {
23856        enableRangeSelection: { required: [!0] }
23857      }
23858    },
23859    enableRangeSelection: {
23860      module: "CellSelection",
23861      dependencies: {
23862        rowDragEntireRow: { required: [!1, void 0] }
23863      }
23864    },
23865    getContextMenuItems: { module: "ContextMenu" },
23866    getLocaleText: { module: "Locale" },
23867    getMainMenuItems: { module: "ColumnMenu" },
23868    getRowClass: { module: "RowStyle" },
23869    getRowStyle: { module: "RowStyle" },
23870    grandTotalRow: { module: "SharedRowGrouping" },
23871    groupDefaultExpanded: {
23872      supportedRowModels: ["clientSide"]
23873    },
23874    groupHideOpenParents: {
23875      supportedRowModels: ["clientSide", "serverSide"],
23876      dependencies: {
23877        groupTotalRow: { required: [void 0, "bottom"] },
23878        treeData: {
23879          required: [void 0, !1],
23880          reason: "Tree Data has values at the group level so it doesn't make sense to hide them."
23881        }
23882      }
23883    },
23884    groupHideParentOfSingleChild: {
23885      dependencies: {
23886        groupHideOpenParents: { required: [void 0, !1] }
23887      }
23888    },
23889    groupRemoveLowestSingleChildren: {
23890      dependencies: {
23891        groupHideOpenParents: { required: [void 0, !1] },
23892        groupRemoveSingleChildren: { required: [void 0, !1] }
23893      }
23894    },
23895    groupRemoveSingleChildren: {
23896      dependencies: {
23897        groupHideOpenParents: { required: [void 0, !1] },
23898        groupRemoveLowestSingleChildren: { required: [void 0, !1] }
23899      }
23900    },
23901    groupSelectsChildren: {
23902      dependencies: {
23903        rowSelection: { required: ["multiple"] }
23904      }
23905    },
23906    icons: {
23907      validate: ({ icons: i }) => {
23908        if (i) {
23909          if (i.smallDown)
23910            return wt(262);
23911          if (i.smallLeft)
23912            return wt(263);
23913          if (i.smallRight)
23914            return wt(264);
23915        }
23916        return null;
23917      }
23918    },
23919    infiniteInitialRowCount: {
23920      validate({ infiniteInitialRowCount: i }) {
23921        return Ue("infiniteInitialRowCount", i, 1);
23922      }
23923    },
23924    initialGroupOrderComparator: {
23925      supportedRowModels: ["clientSide"]
23926    },
23927    initialState: { module: "GridState" },
23928    isExternalFilterPresent: { module: "ExternalFilter" },
23929    keepDetailRowsCount: {
23930      validate({ keepDetailRowsCount: i }) {
23931        return Ue("keepDetailRowsCount", i, 1);
23932      }
23933    },
23934    localeText: {
23935      module: "Locale"
23936    },
23937    masterDetail: { module: "SharedMasterDetail" },
23938    pagination: { module: "Pagination" },
23939    paginationPageSize: {
23940      validate({ paginationPageSize: i }) {
23941        return Ue("paginationPageSize", i, 1);
23942      }
23943    },
23944    paginationPageSizeSelector: {
23945      validate: (i) => {
23946        const s = i.paginationPageSizeSelector;
23947        return typeof s == "boolean" || s == null || s.length ? null : `'paginationPageSizeSelector' cannot be an empty array.
23948                    If you want to hide the page size selector, set paginationPageSizeSelector to false.`;
23949      }
23950    },
23951    pinnedTopRowData: {
23952      module: "PinnedRow"
23953    },
23954    pinnedBottomRowData: {
23955      module: "PinnedRow"
23956    },
23957    pivotMode: {
23958      dependencies: {
23959        treeData: {
23960          required: [!1, void 0],
23961          reason: "Pivot Mode is not supported with Tree Data."
23962        }
23963      },
23964      module: "SharedPivot"
23965    },
23966    pivotPanelShow: { module: "RowGroupingPanel" },
23967    quickFilterText: {
23968      supportedRowModels: ["clientSide"],
23969      module: "QuickFilter"
23970    },
23971    rowBuffer: {
23972      validate({ rowBuffer: i }) {
23973        return Ue("rowBuffer", i, 0);
23974      }
23975    },
23976    rowClass: {
23977      validate: (i) => typeof i.rowClass == "function" ? "rowClass should not be a function, please use getRowClass instead" : null,
23978      module: "RowStyle"
23979    },
23980    rowClassRules: { module: "RowStyle" },
23981    rowData: {
23982      supportedRowModels: ["clientSide"],
23983      module: "ClientSideRowModel"
23984    },
23985    rowDragManaged: {
23986      supportedRowModels: ["clientSide"],
23987      dependencies: {
23988        treeData: {
23989          required: [!1, void 0]
23990        },
23991        pagination: {
23992          required: [!1, void 0]
23993        }
23994      },
23995      module: "RowDrag"
23996    },
23997    rowGroupPanelShow: { module: "RowGroupingPanel" },
23998    rowSelection: {
23999      validate({ rowSelection: i }) {
24000        return i && typeof i == "string" ? 'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.' : i && typeof i != "object" ? "Expected `RowSelectionOptions` object for the `rowSelection` property." : i && i.mode !== "multiRow" && i.mode !== "singleRow" ? `Selection mode "${i.mode}
24000" is invalid. Use one of 'singleRow' or 'multiRow'.` : null;
24001      },
24002      module: "SharedRowSelection"
24003    },
24004    rowStyle: {
24005      validate: (i) => {
24006        const s = i.rowStyle;
24007        return s && typeof s == "function" ? "rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead" : null;
24008      },
24009      module: "RowStyle"
24010    },
24011    serverSideDatasource: {
24012      supportedRowModels: ["serverSide"],
24013      module: "ServerSideRowModel"
24014    },
24015    serverSideInitialRowCount: {
24016      supportedRowModels: ["serverSide"],
24017      validate({ serverSideInitialRowCount: i }) {
24018        return Ue("serverSideInitialRowCount", i, 1);
24019      }
24020    },
24021    serverSideOnlyRefreshFilteredGroups: {
24022      supportedRowModels: ["serverSide"]
24023    },
24024    serverSideSortAllLevels: {
24025      supportedRowModels: ["serverSide"]
24026    },
24027    sideBar: { module: "SideBar" },
24028    sortingOrder: {
24029      validate: (i) => {
24030        const s = i.sortingOrder;
24031        if (Array.isArray(s) && s.length > 0) {
24032          const o = s.filter((n) => !os.includes(n));
24033          if (o.length > 0)
24034            return `sortingOrder must be an array with elements from [${os.map(Ls).join()}], currently it includes [${o.map(Ls).join()}]`;
24035        } else if (!Array.isArray(s) || s.length <= 0)
24036          return `sortingOrder must be an array with at least one element, currently it's ${s}`;
24037        return null;
24038      }
24039    },
24040    statusBar: { module: "StatusBar" },
24041    tooltipHideDelay: {
24042      validate: (i) => i.tooltipHideDelay && i.tooltipHideDelay < 0 ? "tooltipHideDelay should not be lower than 0" : null
24043    },
24044    tooltipShowDelay: {
24045      validate: (i) => i.tooltipShowDelay && i.tooltipShowDelay < 0 ? "tooltipShowDelay should not be lower than 0" : null
24046    },
24047    treeData: {
24048      supportedRowModels: ["clientSide", "serverSide"],
24049      module: "SharedTreeData",
24050      validate: (i) => {
24051        const s = i.rowModelType ?? "clientSide";
24052        switch (s) {
24053          case "clientSide": {
24054            const o = `treeData requires 'getDataPath' in the ${s} row model.`;
24055            return i.treeDataChildrenField || i.getDataPath ? null : o;
24056          }
24057          case "serverSide": {
24058            const o = `treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${s} row model.`;
24059            return i.isServerSideGroup && i.getServerSideGroupKey ? null : o;
24060          }
24061        }
24062        return null;
24063      }
24064    },
24065    treeDataChildrenField: {
24066      module: "SharedTreeData"
24067    },
24068    undoRedoCellEditing: { module: "UndoRedoEdit" },
24069    valueCache: { module: "ValueCache" },
24070    viewportDatasource: {
24071      supportedRowModels: ["viewport"],
24072      module: "ViewportRowModel"
24073    },
24074    viewportRowModelBufferSize: {
24075      validate({ viewportRowModelBufferSize: i }) {
24076        return Ue("viewportRowModelBufferSize", i, 0);
24077      }
24078    },
24079    viewportRowModelPageSize: {
24080      validate({ viewportRowModelPageSize: i }) {
24081        return Ue("viewportRowModelPageSize", i, 1);
24082      }
24083    },
24084    rowDragEntireRow: {
24085      dependencies: {
24086        cellSelection: { required: [void 0] }
24087      }
24088    }
24089  }, t = {};
24090  return uc.forEach((i) => {
24091    t[i] = { expectedType: "boolean" };
24092  }), cc.forEach((i) => {
24093    t[i] = { expectedType: "number" };
24094  }), ce(t, e), t;
24095}, ey = () => ({
24096  objectName: "gridOptions",
24097  allProperties: [...bn, ...dc.map((e) => zn(e))],
24098  propertyExceptions: ["api", "treeDataChildrenField"],
24099  docsUrl: "grid-options/",
24100  deprecations: Xb(),
24101  validations: Jb()
24102}), ty = {
24103  expanded: 1,
24104  contracted: 1,
24105  "tree-closed": 1,
24106  "tree-open": 1,
24107  "tree-indeterminate": 1,
24108  pin: 1,
24109  "eye-slash": 1,
24110  arrows: 1,
24111  left: 1,
24112  right: 1,
24113  group: 1,
24114  aggregation: 1,
24115  pivot: 1,
24116  "not-allowed": 1,
24117  chart: 1,
24118  cross: 1,
24119  cancel: 1,
24120  tick: 1,
24121  first: 1,
24122  previous: 1,
24123  next: 1,
24124  last: 1,
24125  linked: 1,
24126  unlinked: 1,
24127  "color-picker": 1,
24128  loading: 1,
24129  menu: 1,
24130  "menu-alt": 1,
24131  filter: 1,
24132  columns: 1,
24133  maximize: 1,
24134  minimize: 1,
24135  copy: 1,
24136  cut: 1,
24137  paste: 1,
24138  grip: 1,
24139  save: 1,
24140  csv: 1,
24141  excel: 1,
24142  "small-down": 1,
24143  "small-left": 1,
24144  "small-right": 1,
24145  "small-up": 1,
24146  asc: 1,
24147  desc: 1,
24148  none: 1,
24149  up: 1,
24150  down: 1,
24151  plus: 1,
24152  minus: 1,
24153  settings: 1,
24154  "checkbox-checked": 1,
24155  "checkbox-indeterminate": 1,
24156  "checkbox-unchecked": 1,
24157  "radio-button-on": 1,
24158  "radio-button-off": 1,
24159  eye: 1
24160}, iy = {
24161  chart: "MenuCore",
24162  cancel: "EnterpriseCore",
24163  first: "Pagination",
24164  previous: "Pagination",
24165  next: "Pagination",
24166  last: "Pagination",
24167  linked: "IntegratedCharts",
24168  loadingMenuItems: "MenuCore",
24169  unlinked: "IntegratedCharts",
24170  menu: "ColumnHeaderComp",
24171  legacyMenu: "ColumnMenu",
24172  filter: "ColumnFilter",
24173  filterActive: "ColumnFilter",
24174  filterTab: "ColumnMenu",
24175  filtersToolPanel: "FiltersToolPanel",
24176  columns: ["MenuCore"],
24177  columnsToolPanel: ["ColumnsToolPanel"],
24178  maximize: "EnterpriseCore",
24179  minimize: "EnterpriseCore",
24180  save: "MenuCore",
24181  columnGroupOpened: "ColumnGroupHeaderComp",
24182  columnGroupClosed: "ColumnGroupHeaderComp",
24183  accordionOpen: "EnterpriseCore",
24184  accordionClosed: "EnterpriseCore",
24185  accordionIndeterminate: "EnterpriseCore",
24186  columnSelectClosed: ["ColumnsToolPanel", "ColumnMenu"],
24187  columnSelectOpen: ["ColumnsToolPanel", "ColumnMenu"],
24188  columnSelectIndeterminate: ["ColumnsToolPanel", "ColumnMenu"],
24189  columnMovePin: "SharedDragAndDrop",
24190  columnMoveHide: "SharedDragAndDrop",
24191  columnMoveMove: "SharedDragAndDrop",
24192  columnMoveLeft: "SharedDragAndDrop",
24193  columnMoveRight: "SharedDragAndDrop",
24194  columnMoveGroup: "SharedDragAndDrop",
24195  columnMoveValue: "SharedDragAndDrop",
24196  columnMovePivot: "SharedDragAndDrop",
24197  dropNotAllowed: "SharedDragAndDrop",
24198  groupContracted: "GroupCellRenderer",
24199  groupExpanded: "GroupCellRenderer",
24200  setFilterGroupClosed: "SetFilter",
24201  setFilterGroupOpen: "SetFilter",
24202  setFilterGroupIndeterminate: "SetFilter",
24203  close: "EnterpriseCore",
24204  check: "MenuItem",
24205  colorPicker: "CommunityCore",
24206  groupLoading: "LoadingCellRenderer",
24207  menuAlt: "ColumnHeaderComp",
24208  menuPin: "MenuCore",
24209  menuValue: "MenuCore",
24210  menuAddRowGroup: ["MenuCore", "ColumnsToolPanel"],
24211  menuRemoveRowGroup: ["MenuCore", "ColumnsToolPanel"],
24212  clipboardCopy: "MenuCore",
24213  clipboardCut: "MenuCore",
24214  clipboardPaste: "MenuCore",
24215  pivotPanel: ["ColumnsToolPanel", "RowGroupingPanel"],
24216  rowGroupPanel: ["ColumnsToolPanel", "RowGroupingPanel"],
24217  valuePanel: "ColumnsToolPanel",
24218  columnDrag: "EnterpriseCore",
24219  rowDrag: ["RowDrag", "DragAndDrop"],
24220  csvExport: "MenuCore",
24221  excelExport: "MenuCore",
24222  smallDown: "CommunityCore",
24223  selectOpen: "CommunityCore",
24224  richSelectOpen: "RichSelect",
24225  richSelectRemove: "RichSelect",
24226  smallLeft: "CommunityCore",
24227  smallRight: "CommunityCore",
24228  subMenuOpen: "MenuItem",
24229  subMenuOpenRtl: "MenuItem",
24230  panelDelimiter: "RowGroupingPanel",
24231  panelDelimiterRtl: "RowGroupingPanel",
24232  smallUp: "CommunityCore",
24233  sortAscending: ["MenuCore", "Sort"],
24234  sortDescending: ["MenuCore", "Sort"],
24235  sortUnSort: ["MenuCore", "Sort"],
24236  advancedFilterBuilder: "AdvancedFilter",
24237  advancedFilterBuilderDrag: "AdvancedFilter",
24238  advancedFilterBuilderInvalid: "AdvancedFilter",
24239  advancedFilterBuilderMoveUp: "AdvancedFilter",
24240  advancedFilterBuilderMoveDown: "AdvancedFilter",
24241  advancedFilterBuilderAdd: "AdvancedFilter",
24242  advancedFilterBuilderRemove: "AdvancedFilter",
24243  advancedFilterBuilderSelectOpen: "AdvancedFilter",
24244  chartsMenu: "IntegratedCharts",
24245  chartsMenuEdit: "IntegratedCharts",
24246  chartsMenuAdvancedSettings: "IntegratedCharts",
24247  chartsMenuAdd: "IntegratedCharts",
24248  chartsColorPicker: "IntegratedCharts",
24249  chartsThemePrevious: "IntegratedCharts",
24250  chartsThemeNext: "IntegratedCharts",
24251  chartsDownload: "IntegratedCharts",
24252  checkboxChecked: "CommunityCore",
24253  checkboxIndeterminate: "CommunityCore",
24254  checkboxUnchecked: "CommunityCore",
24255  radioButtonOn: "CommunityCore",
24256  radioButtonOff: "CommunityCore"
24257}, sy = /* @__PURE__ */ new Set([
24258  "colorPicker",
24259  "smallUp",
24260  "checkboxChecked",
24261  "checkboxIndeterminate",
24262  "checkboxUnchecked",
24263  "radioButtonOn",
24264  "radioButtonOff",
24265  "smallDown",
24266  "smallLeft",
24267  "smallRight"
24268]), oy = {
24269  pinSubMenu: "PinnedColumn",
24270  pinLeft: "PinnedColumn",
24271  pinRight: "PinnedColumn",
24272  clearPinned: "PinnedColumn",
24273  valueAggSubMenu: "SharedAggregation",
24274  autoSizeThis: "ColumnAutoSize",
24275  autoSizeAll: "ColumnAutoSize",
24276  rowGroup: "SharedRowGrouping",
24277  rowUnGroup: "SharedRowGrouping",
24278  resetColumns: "CommunityCore",
24279  expandAll: ["ClientSideRowModelHierarchy", "ServerSideRowModel"],
24280  contractAll: ["ClientSideRowModelHierarchy", "ServerSideRowModel"],
24281  copy: "Clipboard",
24282  copyWithHeaders: "Clipboard",
24283  copyWithGroupHeaders: "Clipboard",
24284  cut: "Clipboard",
24285  paste: "Clipboard",
24286  export: ["CsvExport", "ExcelExport"],
24287  csvExport: "CsvExport",
24288  excelExport: "ExcelExport",
24289  separator: "CommunityCore",
24290  pivotChart: "IntegratedCharts",
24291  chartRange: "IntegratedCharts",
24292  columnFilter: "ColumnFilter",
24293  columnChooser: "ColumnMenu",
24294  sortAscending: "Sort",
24295  sortDescending: "Sort",
24296  sortUnSort: "Sort"
24297}, ny = class extends y {
24298  constructor() {
24299    super(...arguments), this.beanName = "validation";
24300  }
24301  wireBeans(e) {
24302    this.gridOptions = e.gridOptions, Xh(this);
24303  }
24304  postConstruct() {
24305    this.processGridOptions(this.gridOptions);
24306  }
24307  warnOnInitialPropertyUpdate(e, t) {
24308    e === "api" && Ob[t] && x(22, { key: t });
24309  }
24310  processGridOptions(e) {
24311    this.processOptions(e, ey());
24312  }
24313  validateApiFunction(e, t) {
24314    return Bb(e, t, this.beans);
24315  }
24316  missingUserComponent(e, t, i, s) {
24317    const o = di[t];
24318    o ? this.gos.assertModuleRegistered(
24319      o,
24320      `AG Grid '${e}' component: ${t}`
24321    ) : x(101, {
24322      propertyName: e,
24323      componentName: t,
24324      agGridDefaults: i,
24325      jsComps: s
24326    });
24327  }
24328  checkRowEvents(e) {
24329    ay.has(e) && x(10, { eventType: e });
24330  }
24331  validateIcon(e) {
24332    if (sy.has(e) && x(43, { iconName: e }), ty[e])
24333      return;
24334    const t = iy[e];
24335    if (t) {
24336      z(200, {
24337        reasonOrId: `icon '${e}'`,
24338        moduleName: t,
24339        gridScoped: Kn(),
24340        gridId: this.beans.context.getGridId(),
24341        rowModelType: this.gos.get("rowModelType"),
24342        additionalText: "Alternatively, use the CSS icon name directly."
24343      });
24344      return;
24345    }
24346    x(134, { iconName: e });
24347  }
24348  validateMenuItem(e) {
24349    const t = oy[e];
24350    t && this.gos.assertModuleRegistered(t, `menu item '${e}'`);
24351  }
24352  isProvidedUserComp(e) {
24353    return !!di[e];
24354  }
24355  validateColDef(e, t, i) {
24356    (i || !this.beans.dataTypeSvc?.isColPendingInference(t)) && this.processOptions(e, gc());
24357  }
24358  processOptions(e, t) {
24359    const { validations: i, deprecations: s, allProperties: o, propertyExceptions: n, objectName: r, docsUrl: a } = t;
24360    o && this.gridOptions.suppressPropertyNamesCheck !== !0 && this.checkProperties(
24361      e,
24362      [...n ?? [], ...Object.keys(s)],
24363      o,
24364      r,
24365      a
24366    );
24367    const l = /* @__PURE__ */ new Set(), d = (u) => {
24368      const h = i[u];
24369      if (h)
24370        if (typeof h == "function") {
24371          const g = h(e, this.gridOptions, this.beans);
24372          if (!g)
24373            return;
24374          if ("objectName" in g) {
24375            const p = e[u];
24376            if (Array.isArray(p)) {
24377              p.forEach((f) => {
24378                this.processOptions(f, g);
24379              });
24380              return;
24381            }
24382            this.processOptions(e[u], g);
24383            return;
24384          }
24385          return g;
24386        } else
24387          return h;
24388      else return;
24389    };
24390    Object.keys(e).forEach((u) => {
24391      const h = s[u];
24392      if (h) {
24393        const { message: v, version: P } = h;
24394        l.add(`As of v${P}, ${String(u)} is deprecated. ${v ?? ""}`);
24395      }
24396      const g = e[u];
24397      if (g == null || g === !1)
24398        return;
24399      const p = d(u);
24400      if (!p)
24401        return;
24402      const { module: f, dependencies: m, validate: C, supportedRowModels: w, expectedType: S } = p;
24403      if (S) {
24404        const v = typeof g;
24405        if (v !== S) {
24406          l.add(
24407            `${String(u)} should be of type '${S}' but received '${v}' (${g}).`
24408          );
24409          return;
24410        }
24411      }
24412      if (w) {
24413        const v = this.gridOptions.rowModelType ?? "clientSide";
24414        if (!w.includes(v)) {
24415          l.add(
24416            `${String(u)} is not supported with the '${v}' row model. It is only valid with: ${w.join(", ")}.`
24417          );
24418          return;
24419        }
24420      }
24421      if (f) {
24422        const v = Array.isArray(f) ? f : [f];
24423        let P = !0;
24424        if (v.forEach((T) => {
24425          this.gos.assertModuleRegistered(T, String(u)) || (P = !1);
24426        }), !P)
24427          return;
24428      }
24429      if (m) {
24430        const v = this.checkForRequiredDependencies(u, m, e);
24431        if (v) {
24432          l.add(v);
24433          return;
24434        }
24435      }
24436      if (C) {
24437        const v = C(e, this.gridOptions, this.beans);
24438        if (v) {
24439          l.add(v);
24440          return;
24441        }
24442      }
24443    }), l.size > 0 && l.forEach((u) => {
24444      Ni(u);
24445    });
24446  }
24447  checkForRequiredDependencies(e, t, i) {
24448    const o = Object.entries(t).filter(([n, r]) => {
24449      const a = i[n];
24450      return !r.required.includes(a);
24451    });
24452    return o.length === 0 ? null : o.map(
24453      ([n, r]) => `'${String(e)}' requires '${n}' to be one of [${r.required.map((a) => a === null ? "null" : a === void 0 ? "undefined" : a).join(", ")}]. ${r.reason ?? ""}`
24454    ).join(`
24455           `);
24456  }
24457  checkProperties(e, t, i, s, o) {
24458    const n = ["__ob__", "__v_skip", "__metadata__"], r = ry(
24459      Object.getOwnPropertyNames(e),
24460      [...n, ...t, ...i],
24461      i
24462    );
24463    if (Object.entries(r).forEach(([a, l]) => {
24464      let d = `invalid ${s} property '${a}' did you mean any of these: ${l.slice(0, 8).join(", ")}.`;
24465      i.includes("context") && (d += `
24466If you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`), Ni(d);
24467    }), Object.keys(r).length > 0 && o) {
24468      const a = this.beans.frameworkOverrides.getDocLink(o);
24469      Ni(`to see all the valid ${s} properties please check: ${a}`);
24470    }
24471  }
24472  getConsoleMessage(e, t) {
24473    return Kb(e, t);
24474  }
24475};
24476function ry(e, t, i) {
24477  const s = {}, o = e.filter(
24478    (n) => !t.some((r) => r === n)
24479  );
24480  return o.length > 0 && o.forEach(
24481    (n) => s[n] = hc({ inputValue: n, allSuggestions: i }).values
24482  ), s;
24483}
24484var ay = /* @__PURE__ */ new Set([
24485  "firstChildChanged",
24486  "lastChildChanged",
24487  "childIndexChanged"
24488]), ly = {
24489  moduleName: "Validation",
24490  version: I,
24491  beans: [ny]
24492};
24493function pc(e) {
24494  e.sibling && (e.sibling.childrenAfterFilter = e.childrenAfterFilter);
24495}
24496var dy = class extends y {
24497  constructor() {
24498    super(...arguments), this.beanName = "filterStage", this.refreshProps = /* @__PURE__ */ new Set(["excludeChildrenWhenTreeDataFiltering"]), this.step = "filter";
24499  }
24500  wireBeans(e) {
24501    this.filterManager = e.filterManager;
24502  }
24503  execute(e) {
24504    const { changedPath: t } = e;
24505    this.filter(t);
24506  }
24507  filter(e) {
24508    const t = !!this.filterManager?.isChildFilterPresent();
24509    this.filterNodes(t, e);
24510  }
24511  filterNodes(e, t) {
24512    const i = (s, o) => {
24513      s.hasChildren() && e && !o ? s.childrenAfterFilter = s.childrenAfterGroup.filter((n) => {
24514        const r = n.childrenAfterFilter && n.childrenAfterFilter.length > 0, a = n.data && this.filterManager.doesRowPassFilter({ rowNode: n });
24515        return r || a;
24516      }) : s.childrenAfterFilter = s.childrenAfterGroup, pc(s);
24517    };
24518    if (this.doingTreeDataFiltering()) {
24519      const s = (n, r) => {
24520        if (n.childrenAfterGroup)
24521          for (let a = 0; a < n.childrenAfterGroup.length; a++) {
24522            const l = n.childrenAfterGroup[a], d = r || this.filterManager.doesRowPassFilter({ rowNode: l });
24523            l.childrenAfterGroup ? s(n.childrenAfterGroup[a], d) : i(l, d);
24524          }
24525        i(n, r);
24526      }, o = (n) => s(n, !1);
24527      t.executeFromRootNode(o);
24528    } else {
24529      const s = (o) => i(o, !1);
24530      t.forEachChangedNodeDepthFirst(s, !0);
24531    }
24532  }
24533  doingTreeDataFiltering() {
24534    return this.gos.get("treeData") && !this.gos.get("excludeChildrenWhenTreeDataFiltering");
24535  }
24536}, cy = class extends tr {
24537  constructor() {
24538    super(...arguments), this.iconCreated = !1;
24539  }
24540  setComp(e, t, i, s, o) {
24541    this.comp = e;
24542    const n = ls(this, this.beans.context, o);
24543    this.eButtonShowMainFilter = i, this.eFloatingFilterBody = s, this.setGui(t, n), this.setupActive(), this.setupWidth(n), this.setupLeft(n), this.setupHover(n), this.setupFocus(n), this.setupAria(), this.setupFilterButton(), this.setupUserComp(), this.setupSyncWithFilter(n), this.setupUi(), n.addManagedElementListeners(this.eButtonShowMainFilter, { click: this.showParentFilter.bind(this) }), this.setupFilterChangedListener(n), n.addManagedListeners(this.column, { colDefChanged: () => this.onColDefChanged(n) }), n.addDestroyFunc(() => {
24544      this.eButtonShowMainFilter = null, this.eFloatingFilterBody = null, this.userCompDetail
24544s = null, this.clearComponent();
24545    });
24546  }
24547  // empty abstract method
24548  resizeHeader() {
24549  }
24550  moveHeader() {
24551  }
24552  setupActive() {
24553    const e = this.column.getColDef(), t = !!e.filter, i = !!e.floatingFilter;
24554    this.active = t && i;
24555  }
24556  setupUi() {
24557    if (this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton && this.active), this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body", this.suppressFilterButton), this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body", !this.suppressFilterButton), !this.active || this.iconCreated)
24558      return;
24559    const e = Te("filter", this.beans, this.column);
24560    e && (this.iconCreated = !0, this.eButtonShowMainFilter.appendChild(e));
24561  }
24562  setupFocus(e) {
24563    e.createManagedBean(
24564      new xi(this.eGui, {
24565        shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),
24566        onTabKeyDown: this.onTabKeyDown.bind(this),
24567        handleKeyDown: this.handleKeyDown.bind(this),
24568        onFocusIn: this.onFocusIn.bind(this)
24569      })
24570    );
24571  }
24572  setupAria() {
24573    const e = this.getLocaleTextFunc();
24574    Zs(this.eButtonShowMainFilter, e("ariaFilterMenuOpen", "Open Filter Menu"));
24575  }
24576  onTabKeyDown(e) {
24577    const { beans: t } = this;
24578    if (Z(t) === this.eGui)
24579      return;
24580    const o = zt(t, this.eGui, null, e.shiftKey);
24581    if (o) {
24582      t.headerNavigation?.scrollToColumn(this.column), e.preventDefault(), o.focus();
24583      return;
24584    }
24585    const n = this.findNextColumnWithFloatingFilter(e.shiftKey);
24586    n && t.focusSvc.focusHeaderPosition({
24587      headerPosition: {
24588        headerRowIndex: this.rowCtrl.rowIndex,
24589        column: n
24590      },
24591      event: e
24592    }) && e.preventDefault();
24593  }
24594  findNextColumnWithFloatingFilter(e) {
24595    const t = this.beans.visibleCols;
24596    let i = this.column;
24597    do
24598      if (i = e ? t.getColBefore(i) : t.getColAfter(i), !i)
24599        break;
24600    while (!i.getColDef().filter || !i.getColDef().floatingFilter);
24601    return i;
24602  }
24603  handleKeyDown(e) {
24604    super.handleKeyDown(e);
24605    const t = this.getWrapperHasFocus();
24606    switch (e.key) {
24607      case b.UP:
24608      case b.DOWN:
24609        t || e.preventDefault();
24610      case b.LEFT:
24611      case b.RIGHT:
24612        if (t)
24613          return;
24614        e.stopPropagation();
24615      case b.ENTER:
24616        t && Ht(this.eGui) && e.preventDefault();
24617        break;
24618      case b.ESCAPE:
24619        t || this.eGui.focus();
24620    }
24621  }
24622  onFocusIn(e) {
24623    if (this.eGui.contains(e.relatedTarget))
24624      return;
24625    const i = !!e.relatedTarget && !e.relatedTarget.classList.contains("ag-floating-filter"), s = !!e.relatedTarget && Mt(e.relatedTarget, "ag-floating-filter");
24626    if (i && s && e.target === this.eGui) {
24627      const o = this.lastFocusEvent, n = !!(o && o.key === b.TAB);
24628      if (o && n) {
24629        const r = o.shiftKey;
24630        Ht(this.eGui, r);
24631      }
24632    }
24633    this.focusThis();
24634  }
24635  setupHover(e) {
24636    this.beans.colHover?.addHeaderFilterColumnHoverListener(e, this.comp, this.column, this.eGui);
24637  }
24638  setupLeft(e) {
24639    const t = new er(this.column, this.eGui, this.beans);
24640    e.createManagedBean(t);
24641  }
24642  setupFilterButton() {
24643    this.suppressFilterButton = !this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column), this.highlightFilterButtonWhenActive = !Pe(this.gos);
24644  }
24645  setupUserComp() {
24646    if (!this.active)
24647      return;
24648    const e = this.beans.filterManager?.getFloatingFilterCompDetails(
24649      this.column,
24650      () => this.showParentFilter()
24651    );
24652    e && this.setCompDetails(e);
24653  }
24654  setCompDetails(e) {
24655    this.userCompDetails = e, this.comp.setCompDetails(e);
24656  }
24657  showParentFilter() {
24658    const e = this.suppressFilterButton ? this.eFloatingFilterBody : this.eButtonShowMainFilter;
24659    this.beans.menuSvc?.showFilterMenu({
24660      column: this.column,
24661      buttonElement: e,
24662      containerType: "floatingFilter",
24663      positionBy: "button"
24664    });
24665  }
24666  setupSyncWithFilter(e) {
24667    if (!this.active)
24668      return;
24669    const { filterManager: t } = this.beans, i = (s) => {
24670      if (s?.source === "filterDestroyed" && !this.isAlive())
24671        return;
24672      const o = this.comp.getFloatingFilterComp();
24673      o && o.then((n) => {
24674        if (n) {
24675          const r = t?.getCurrentFloatingFilterParentModel(this.column), a = s ? {
24676            // event can have additional params like `afterDataChange` which need to be passed through
24677            ...s,
24678            columns: s.columns ?? [],
24679            source: s.source === "api" ? "api" : "columnFilter"
24680          } : null;
24681          n.onParentModelChanged(r, a);
24682        }
24683      });
24684    };
24685    [this.destroySyncListener] = e.addManagedListeners(this.column, { filterChanged: i }), t?.isFilterActive(this.column) && i(null);
24686  }
24687  setupWidth(e) {
24688    const t = () => {
24689      const i = `${this.column.getActualWidth()}px`;
24690      this.comp.setWidth(i);
24691    };
24692    e.addManagedListeners(this.column, { widthChanged: t }), t();
24693  }
24694  setupFilterChangedListener(e) {
24695    this.active && ([this.destroyFilterChangedListener] = e.addManagedListeners(this.column, {
24696      filterChanged: this.updateFilterButton.bind(this)
24697    }), this.updateFilterButton());
24698  }
24699  updateFilterButton() {
24700    if (!this.suppressFilterButton && this.comp) {
24701      const e = !!this.beans.filterManager?.isFilterAllowed(this.column);
24702      this.comp.setButtonWrapperDisplayed(e), this.highlightFilterButtonWhenActive && e && this.eButtonShowMainFilter.classList.toggle("ag-filter-active", this.column.isFilterActive());
24703    }
24704  }
24705  onColDefChanged(e) {
24706    const t = this.active;
24707    this.setupActive();
24708    const i = !t && this.active;
24709    t && !this.active && (this.destroySyncListener(), this.destroyFilterChangedListener());
24710    const s = this.active ? this.beans.filterManager?.getFloatingFilterCompDetails(this.column, () => this.showParentFilter()) : null, o = this.comp.getFloatingFilterComp();
24711    !o || !s ? this.updateCompDetails(e, s, i) : o.then((n) => {
24712      !n || this.beans.filterManager?.areFilterCompsDifferent(this.userCompDetails ?? null, s) ? this.updateCompDetails(e, s, i) : this.updateFloatingFilterParams(s);
24713    });
24714  }
24715  updateCompDetails(e, t, i) {
24716    this.isAlive() && (this.setCompDetails(t), this.setupFilterButton(), this.setupUi(), i && (this.setupSyncWithFilter(e), this.setupFilterChangedListener(e)));
24717  }
24718  updateFloatingFilterParams(e) {
24719    if (!e)
24720      return;
24721    const t = e.params;
24722    this.comp.getFloatingFilterComp()?.then((i) => {
24723      i?.refresh && typeof i.refresh == "function" && i.refresh(t);
24724    });
24725  }
24726  addResizeAndMoveKeyboardListeners() {
24727  }
24728  destroy() {
24729    super.destroy(), this.destroySyncListener = null, this.destroyFilterChangedListener = null;
24730  }
24731};
24732function uy(e, t) {
24733  const i = e.colModel.getCol(t);
24734  if (!i) {
24735    z(12, { colKey: t });
24736    return;
24737  }
24738  e.menuSvc?.showColumnMenu({
24739    column: i,
24740    positionBy: "auto"
24741  });
24742}
24743function hy(e) {
24744  e.menuSvc?.hidePopupMenu();
24745}
24746var gy = {
24747  moduleName: "SharedMenu",
24748  version: I,
24749  beans: [Rm],
24750  apiFunctions: {
24751    showColumnMenu: uy,
24752    hidePopupMenu: hy
24753  }
24754}, py = 0, fy = 200, my = class extends y {
24755  constructor() {
24756    super(...arguments), this.beanName = "popupSvc", this.popupList = [];
24757  }
24758  postConstruct() {
24759    this.beans.ctrlsSvc.whenReady(this, (e) => {
24760      this.gridCtrl = e.gridCtrl;
24761    }), this.addManagedEventListeners({ gridStylesChanged: this.handleThemeChange.bind(this) });
24762  }
24763  getPopupParent() {
24764    const e = this.gos.get("popupParent");
24765    return e || this.gridCtrl.getGui();
24766  }
24767  positionPopupForMenu(e) {
24768    const { eventSource: t, ePopup: i } = e, s = this.getPopupIndex(i);
24769    if (s !== -1) {
24770      const g = this.popupList[s];
24771      g.alignedToElement = t;
24772    }
24773    const o = t.getBoundingClientRect(), n = this.getParentRect(), r = this.keepXYWithinBounds(
24774      i,
24775      o.top - n.top,
24776      0
24777      /* vertical */
24778    ), a = i.clientWidth > 0 ? i.clientWidth : 200;
24779    i.style.minWidth = `${a}px`;
24780    const d = n.right - n.left - a;
24781    let c;
24782    this.gos.get("enableRtl") ? (c = h(), c < 0 && (c = u(), this.setAlignedStyles(i, "left")), c > d && (c = 0, this.setAlignedStyles(i, "right"))) : (c = u(), c > d && (c = h(), this.setAlignedStyles(i, "right")), c < 0 && (c = 0, this.setAlignedStyles(i, "left"))), i.style.left = `${c}px`, i.style.top = `${r}px`;
24783    function u() {
24784      return o.right - n.left - 2;
24785    }
24786    function h() {
24787      return o.left - n.left - a;
24788    }
24789  }
24790  positionPopupUnderMouseEvent(e) {
24791    const { ePopup: t, nudgeX: i, nudgeY: s, skipObserver: o } = e;
24792    this.positionPopup({
24793      ePopup: t,
24794      nudgeX: i,
24795      nudgeY: s,
24796      keepWithinBounds: !0,
24797      skipObserver: o,
24798      updatePosition: () => this.calculatePointerAlign(e.mouseEvent),
24799      postProcessCallback: () => this.callPostProcessPopup(
24800        e.type,
24801        e.ePopup,
24802        null,
24803        e.mouseEvent,
24804        e.column,
24805        e.rowNode
24806      )
24807    });
24808  }
24809  calculatePointerAlign(e) {
24810    const t = this.getParentRect();
24811    return {
24812      x: e.clientX - t.left,
24813      y: e.clientY - t.top
24814    };
24815  }
24816  positionPopupByComponent(e) {
24817    const {
24818      ePopup: t,
24819      nudgeX: i,
24820      nudgeY: s,
24821      keepWithinBounds: o,
24822      eventSource: n,
24823      alignSide: r = "left",
24824      position: a = "over",
24825      column: l,
24826      rowNode: d,
24827      type: c
24828    } = e, u = n.getBoundingClientRect(), h = this.getParentRect(), g = this.getPopupIndex(t);
24829    if (g !== -1) {
24830      const f = this.popupList[g];
24831      f.alignedToElement = n;
24832    }
24833    const p = () => {
24834      let f = u.left - h.left;
24835      r === "right" && (f -= t.offsetWidth - u.width);
24836      let m;
24837      return a === "over" ? (m = u.top - h.top, this.setAlignedStyles(t, "over")) : (this.setAlignedStyles(t, "under"), this.shouldRenderUnderOrAbove(t, u, h, e.nudgeY || 0) === "under" ? m = u.top - h.top + u.height : m = u.top - t.offsetHeight - (s || 0) * 2 - h.top), { x: f, y: m };
24838    };
24839    this.positionPopup({
24840      ePopup: t,
24841      nudgeX: i,
24842      nudgeY: s,
24843      keepWithinBounds: o,
24844      updatePosition: p,
24845      postProcessCallback: () => this.callPostProcessPopup(c, t, n, null, l, d)
24846    });
24847  }
24848  shouldRenderUnderOrAbove(e, t, i, s) {
24849    const o = i.bottom - t.bottom, n = t.top - i.top, r = e.offsetHeight + s;
24850    return o > r ? "under" : n > r || n > o ? "above" : "under";
24851  }
24852  setAlignedStyles(e, t) {
24853    const i = this.getPopupIndex(e);
24854    if (i === -1)
24855      return;
24856    const s = this.popupList[i], { alignedToElement: o } = s;
24857    !o || (["right", "left", "over", "above", "under"].forEach((r) => {
24858      o.classList.remove(`ag-has-popup-positioned-${r}`), e.classList.remove(`ag-popup-positioned-${r}`);
24859    }), !t) || (o.classList.add(`ag-has-popup-positioned-${t}`), e.classList.add(`ag-popup-positioned-${t}`));
24860  }
24861  callPostProcessPopup(e, t, i, s, o, n) {
24862    const r = this.gos.getCallback("postProcessPopup");
24863    r && r({
24864      column: o,
24865      rowNode: n,
24866      ePopup: t,
24867      type: e,
24868      eventSource: i,
24869      mouseEvent: s
24870    });
24871  }
24872  positionPopup(e) {
24873    const { ePopup: t, keepWithinBounds: i, nudgeX: s, nudgeY: o, skipObserver: n, updatePosition: r } = e, a = { width: 0, height: 0 }, l = (d = !1) => {
24874      let { x: c, y: u } = r();
24875      d && t.clientWidth === a.width && t.clientHeight === a.height || (a.width = t.clientWidth, a.height = t.clientHeight, s && (c += s), o && (u += o), i && (c = this.keepXYWithinBounds(
24876        t,
24877        c,
24878        1
24879        /* horizontal */
24880      ), u = this.keepXYWithinBounds(
24881        t,
24882        u,
24883        0
24884        /* vertical */
24885      )), t.style.left = `${c}px`, t.style.top = `${u}px`, e.postProcessCallback && e.postProcessCallback());
24886    };
24887    if (l(), !n) {
24888      const d = Rt(this.beans, t, () => l(!0));
24889      setTimeout(() => d(), fy);
24890    }
24891  }
24892  getActivePopups() {
24893    return this.popupList.map((e) => e.element);
24894  }
24895  getParentRect() {
24896    const e = te(this.beans);
24897    let t = this.getPopupParent();
24898    return t === e.body ? t = e.documentElement : getComputedStyle(t).position === "static" && (t = t.offsetParent), wl(t);
24899  }
24900  keepXYWithinBounds(e, t, i) {
24901    const s = i === 0, o = s ? "clientHeight" : "clientWidth", n = s ? "top" : "left", r = s ? "height" : "width", a = s ? "scrollTop" : "scrollLeft", l = te(this.beans), d = l.documentElement, c = this.getPopupParent(), u = e.getBoundingClientRect(), h = c.getBoundingClientRect(), g = l.documentElement.getBoundingClientRect(), p = c === l.body, f = Math.
24901ceil(u[r]);
24902    let C = p ? (s ? vl : As)(d) + d[a] : c[o];
24903    p && (C -= Math.abs(g[n] - h[n]));
24904    const w = C - f;
24905    return Math.min(Math.max(t, 0), Math.abs(w));
24906  }
24907  addPopup(e) {
24908    const t = te(this.beans), { eChild: i, ariaLabel: s, alwaysOnTop: o, positionCallback: n, anchorToElement: r } = e;
24909    if (!t)
24910      return x(122), { hideFunc: () => {
24911      } };
24912    const a = this.getPopupIndex(i);
24913    if (a !== -1)
24914      return { hideFunc: this.popupList[a].hideFunc };
24915    this.initialisePopupPosition(i);
24916    const l = this.createPopupWrapper(i, s, !!o), d = this.addEventListenersToPopup({ ...e, wrapperEl: l });
24917    return n && n(), this.addPopupToPopupList(i, l, d, r), {
24918      hideFunc: d
24919    };
24920  }
24921  initialisePopupPosition(e) {
24922    const i = this.getPopupParent().getBoundingClientRect();
24923    A(e.style.top) || (e.style.top = `${i.top * -1}px`), A(e.style.left) || (e.style.left = `${i.left * -1}px`);
24924  }
24925  createPopupWrapper(e, t, i) {
24926    const s = this.getPopupParent(), o = document.createElement("div"), { environment: n, gos: r } = this.beans;
24927    return n.applyThemeClasses(o), o.classList.add("ag-popup"), e.classList.add(r.get("enableRtl") ? "ag-rtl" : "ag-ltr", "ag-popup-child"), e.hasAttribute("role") || ve(e, "dialog"), Zs(e, t), o.appendChild(e), s.appendChild(o), i ? this.setAlwaysOnTop(e, !0) : this.bringPopupToFront(e), o;
24928  }
24929  handleThemeChange(e) {
24930    if (e.themeChanged) {
24931      const t = this.beans.environment;
24932      for (const i of this.popupList)
24933        t.applyThemeClasses(i.wrapper);
24934    }
24935  }
24936  addEventListenersToPopup(e) {
24937    const t = this.beans, i = te(t), s = this.getPopupParent(), { wrapperEl: o, eChild: n, closedCallback: r, afterGuiAttached: a, closeOnEsc: l, modal: d } = e;
24938    let c = !1;
24939    const u = (f) => {
24940      if (!o.contains(Z(t)))
24941        return;
24942      f.key === b.ESCAPE && !nt(f) && p({ keyboardEvent: f });
24943    }, h = (f) => p({ mouseEvent: f }), g = (f) => p({ touchEvent: f }), p = (f = {}) => {
24944      const { mouseEvent: m, touchEvent: C, keyboardEvent: w, forceHide: S } = f;
24945      !S && // we don't hide popup if the event was on the child, or any
24946      // children of this child
24947      (this.isEventFromCurrentPopup({ mouseEvent: m, touchEvent: C }, n) || // this method should only be called once. the client can have different
24948      // paths, each one wanting to close, so this method may be called multiple times.
24949      c) || (c = !0, s.removeChild(o), i.removeEventListener("keydown", u), i.removeEventListener("mousedown", h), i.removeEventListener("touchstart", g), i.removeEventListener("contextmenu", h), this.eventSvc.removeEventListener("dragStarted", h), r && r(m || C || w), this.removePopupFromPopupList(n));
24950    };
24951    return a && a({ hidePopup: p }), window.setTimeout(() => {
24952      l && i.addEventListener("keydown", u), d && (i.addEventListener("mousedown", h), this.eventSvc.addEventListener("dragStarted", h), i.addEventListener("touchstart", g), i.addEventListener("contextmenu", h));
24953    }, 0), p;
24954  }
24955  addPopupToPopupList(e, t, i, s) {
24956    this.popupList.push({
24957      element: e,
24958      wrapper: t,
24959      hideFunc: i,
24960      instanceId: py++,
24961      isAnchored: !!s
24962    }), s && this.setPopupPositionRelatedToElement(e, s);
24963  }
24964  getPopupIndex(e) {
24965    return this.popupList.findIndex((t) => t.element === e);
24966  }
24967  setPopupPositionRelatedToElement(e, t) {
24968    const i = this.getPopupIndex(e);
24969    if (i === -1)
24970      return;
24971    const s = this.popupList[i];
24972    if (s.stopAnchoringPromise && s.stopAnchoringPromise.then((n) => n && n()), s.stopAnchoringPromise = void 0, s.isAnchored = !1, !t)
24973      return;
24974    const o = this.keepPopupPositionedRelativeTo({
24975      element: t,
24976      ePopup: e,
24977      hidePopup: s.hideFunc
24978    });
24979    return s.stopAnchoringPromise = o, s.isAnchored = !0, o;
24980  }
24981  removePopupFromPopupList(e) {
24982    this.setAlignedStyles(e, null), this.setPopupPositionRelatedToElement(e, null), this.popupList = this.popupList.filter((t) => t.element !== e);
24983  }
24984  keepPopupPositionedRelativeTo(e) {
24985    const t = this.getPopupParent(), i = t.getBoundingClientRect(), { element: s, ePopup: o } = e, n = s.getBoundingClientRect(), r = (u) => parseInt(u.substring(0, u.length - 1), 10), a = (u, h) => {
24986      const g = i[u] - n[u], p = r(o.style[u]);
24987      return {
24988        initialDiff: g,
24989        lastDiff: g,
24990        initial: p,
24991        last: p,
24992        direction: h
24993      };
24994    }, l = a(
24995      "top",
24996      0
24997      /* vertical */
24998    ), d = a(
24999      "left",
25000      1
25001      /* horizontal */
25002    ), c = this.beans.frameworkOverrides;
25003    return new ye((u) => {
25004      c.wrapIncoming(() => {
25005        c.setInterval(() => {
25006          const h = t.getBoundingClientRect(), g = s.getBoundingClientRect();
25007          if (g.top == 0 && g.left == 0 && g.height == 0 && g.width == 0) {
25008            e.hidePopup();
25009            return;
25010          }
25011          const f = (m, C) => {
25012            const w = r(o.style[C]);
25013            m.last !== w && (m.initial = w, m.last = w);
25014            const S = h[C] - g[C];
25015            if (S != m.lastDiff) {
25016              const v = this.keepXYWithinBounds(
25017                o,
25018                m.initial + m.initialDiff - S,
25019                m.direction
25020              );
25021              o.style[C] = `${v}px`, m.last = v;
25022            }
25023            m.lastDiff = S;
25024          };
25025          f(l, "top"), f(d, "left");
25026        }, 200).then((h) => {
25027          u(() => {
25028            h != null && window.clearInterval(h);
25029          });
25030        });
25031      }, "popupPositioning");
25032    });
25033  }
25034  hasAnchoredPopup() {
25035    return this.popupList.some((e) => e.isAnchored);
25036  }
25037  isEventFromCurrentPopup(e, t) {
25038    const { mouseEvent: i, touchEvent: s } = e, o = i || s;
25039    if (!o)
25040      return !1;
25041    const n = this.getPopupIndex(t);
25042    if (n === -1)
25043      return !1;
25044    for (let r = n; r < this.popupList.length; r++) {
25045      const a = this.popupList[r];
25046      if (bg(a.element, o))
25047        return !0;
25048    }
25049    return this.isElementWithinCustomPopup(o.target);
25050  }
25051  isElementWithinCustomPopup(e) {
25052    const t = te(this.beans);
25053    for (; e && e !== t.body; ) {
25054      if (e.classList.contains("ag-custom-component-popup") || e.parentElement === null)
25055        return !0;
25056      e = e.parentElement;
25057    }
25058    return !1;
25059  }
25060  getWrapper(e) {
25061    for (; !e.classList.contains("ag-popup") && e.parentElement; )
25062      e = e.parentElement;
25063    return e.classList.contains("ag-popup") ? e : null;
25064  }
25065  setAlwaysOnTop(e, t) {
25066    const i = this.getWrapper(e);
25067    i && (i.classList.toggle("ag-always-on-top", !!t), t && this.bringPopupToFront(i));
25068  }
25069  /** @return true if moved */
25070  bringPopupToFront(e) {
25071    const t = this.getPopupParent(), i = Array.prototype.slice.call(t.querySelectorAll(".ag-popup")), s = i.length, o = this.getWrapper(e);
25072    if (!o || s <= 1 || !t.contains(e))
25073      return;
25074    const n = [], r = [];
25075    for (const h of i)
25076      h !== o && (h.classList.contains("ag-always-on-top") ? r.push(h) : n.push(h));
25077    const a = [], l = r.length, u = o.classList.contains("ag-always-on-top") || !l ? [...n, ...r, o] : [...n, o, ...r];
25078    for (let h = 0; h <= s; h++) {
25079      const g = u[h];
25080      if (i[h] === u[h] || g === o)
25081        continue;
25082      g.querySelectorAll("div").forEach((f) => {
25083        f.scrollTop !== 0 && a.push([f, f.scrollTop]);
25084      }), h === 0 ? t.insertAdjacentElement("afterbegin", g) : u[h - 1].insertAdjacentElement("afterend", g);
25085    }
25086    for (; a.length; ) {
25087      const h = a.pop();
25088      h[0].scrollTop = h[1];
25089    }
25090  }
25091}, so = {
25092  moduleName: "Popup",
25093  version: I,
25094  beans: [my]
25095}, Cy = (
25096  /*css*/
25097  ".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-set-floating-filter-input [disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}
25097:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}"
25098);
25099function vy(e) {
25100  const t = e.filterManager;
25101  return !!t?.isColumnFilterPresent() || !!t?.isAggregateFilterPresent();
25102}
25103function wy(e, t) {
25104  return e.filterManager?.getColumnFilterInstance(t) ?? Promise.resolve(void 0);
25105}
25106function Sy(e, t) {
25107  const i = e.colModel.getColDefCol(t);
25108  if (i)
25109    return e.filterManager?.destroyFilter(i, "api");
25110}
25111function by(e, t) {
25112  e.frameworkOverrides.wrapIncoming(() => e.filterManager?.setFilterModel(t));
25113}
25114function yy(e) {
25115  return e.filterManager?.getFilterModel() ?? {};
25116}
25117function Ry(e, t) {
25118  return e.filterManager?.getColumnFilterModel(t) ?? null;
25119}
25120function Fy(e, t, i) {
25121  return e.filterManager?.setColumnFilterModel(t, i) ?? Promise.resolve();
25122}
25123function xy(e, t) {
25124  const i = e.colModel.getCol(t);
25125  if (!i) {
25126    z(12, { colKey: t });
25127    return;
25128  }
25129  e.menuSvc?.showFilterMenu({
25130    column: i,
25131    containerType: "columnFilter",
25132    positionBy: "auto"
25133  });
25134}
25135var Pa = {
25136  january: "January",
25137  february: "February",
25138  march: "March",
25139  april: "April",
25140  may: "May",
25141  june: "June",
25142  july: "July",
25143  august: "August",
25144  september: "September",
25145  october: "October",
25146  november: "November",
25147  december: "December"
25148}, Ea = [
25149  "january",
25150  "february",
25151  "march",
25152  "april",
25153  "may",
25154  "june",
25155  "july",
25156  "august",
25157  "september",
25158  "october",
25159  "november",
25160  "december"
25161];
25162function Py(e, t) {
25163  return e == null ? -1 : t == null ? 1 : parseFloat(e) - parseFloat(t);
25164}
25165var Ey = class extends y {
25166  constructor() {
25167    super(...arguments), this.beanName = "colFilter", this.allColumnFilters = /* @__PURE__ */ new Map(), this.allColumnListeners = /* @__PURE__ */ new Map(), this.activeAggregateFilters = [], this.activeColumnFilters = [], this.processingFilterChange = !1, this.filterModelUpdateQueue = [], this.columnFilterModelUpdateQueue = [];
25168  }
25169  postConstruct() {
25170    this.addManagedEventListeners({
25171      gridColumnsChanged: this.onColumnsChanged.bind(this),
25172      beforeRefreshModel: ({ params: e }) => {
25173        (e.rowDataUpdated || e.changedProps?.has("treeData")) && this.onNewRowsLoaded("rowDataUpdated");
25174      },
25175      dataTypesInferred: this.processFilterModelUpdateQueue.bind(this)
25176    }), this.initialFilterModel = {
25177      ...this.gos.get("initialState")?.filter?.filterModel ?? {}
25178    };
25179  }
25180  setFilterModel(e, t = "api") {
25181    const { colModel: i, dataTypeSvc: s, filterManager: o } = this.beans;
25182    if (s?.isPendingInference) {
25183      this.filterModelUpdateQueue.push({ model: e, source: t });
25184      return;
25185    }
25186    const n = [], r = this.getFilterModel(!0);
25187    if (e) {
25188      const a = new Set(Object.keys(e));
25189      this.allColumnFilters.forEach((l, d) => {
25190        const c = e[d];
25191        n.push(bs(l.filterPromise, c)), a.delete(d);
25192      }), a.forEach((l) => {
25193        const d = i.getColDefCol(l) || i.getCol(l);
25194        if (!d) {
25195          x(62, { colId: l });
25196          return;
25197        }
25198        if (!d.isFilterAllowed()) {
25199          x(63, { colId: l });
25200          return;
25201        }
25202        const c = this.getOrCreateFilterWrapper(d);
25203        if (!c) {
25204          x(64, { colId: l });
25205          return;
25206        }
25207        n.push(bs(c.filterPromise, e[l]));
25208      });
25209    } else
25210      this.allColumnFilters.forEach((a) => {
25211        n.push(bs(a.filterPromise, null));
25212      });
25213    ye.all(n).then(() => {
25214      const a = this.getFilterModel(!0), l = [];
25215      this.allColumnFilters.forEach((d, c) => {
25216        const u = r ? r[c] : null, h = a ? a[c] : null;
25217        Zi(u, h) || l.push(d.column);
25218      }), l.length > 0 && o?.onFilterChanged({ columns: l, source: t });
25219    });
25220  }
25221  getFilterModel(e) {
25222    const t = {}, {
25223      allColumnFilters: i,
25224      initialFilterModel: s,
25225      beans: { colModel: o }
25226    } = this;
25227    return i.forEach((n, r) => {
25228      const a = this.getModelFromFilterWrapper(n);
25229      A(a) && (t[r] = a);
25230    }), e || Object.entries(s).forEach(([n, r]) => {
25231      A(r) && !i.has(n) && o.getCol(n)?.isFilterAllowed() && (t[n] = r);
25232    }), t;
25233  }
25234  getModelFromFilterWrapper(e) {
25235    const { filter: t } = e;
25236    return t ? typeof t.getModel != "function" ? (x(66), null) : t.getModel() : this.getModelFromInitialState(e.column);
25237  }
25238  getModelFromInitialState(e) {
25239    return this.initialFilterModel[e.getColId()] ?? null;
25240  }
25241  isColumnFilterPresent() {
25242    return this.activeColumnFilters.length > 0;
25243  }
25244  isAggregateFilterPresent() {
25245    return !!this.activeAggregateFilters.length;
25246  }
25247  disableColumnFilters() {
25248    const { allColumnFilters: e } = this;
25249    return e.size ? (e.forEach(
25250      (t) => this.disposeFilterWrapper(t, "advancedFilterEnabled")
25251    ), !0) : !1;
25252  }
25253  doAggregateFiltersPass(e, t) {
25254    return this.doColumnFiltersPass(e, t, !0);
25255  }
25256  updateActiveFilters() {
25257    const e = (a) => a ? a.isFilterActive ? a.isFilterActive() : (x(67), !1) : !1, { colModel: t, gos: i } = this.beans, s = !!sn(i), o = (a) => {
25258      if (!a.isPrimary())
25259        return !0;
25260      const d = !t.isPivotActive();
25261      return !a.isValueActive() || !d ? !1 : t.isPivotMode() ? !0 : s;
25262    }, n = [], r = [];
25263    return this.forEachColumnFilter((a, l) => {
25264      e(a) && (o(l.column) ? n.push(a) : r.push(a));
25265    }).then(() => {
25266      this.activeAggregateFilters = n, this.activeColumnFilters = r;
25267    });
25268  }
25269  updateFilterFlagInColumns(e, t) {
25270    return this.forEachColumnFilter(
25271      (i, s) => this.setColFilterActive(s.column, i.isFilterActive(), e, t)
25272    );
25273  }
25274  forEachColumnFilter(e) {
25275    const t = [];
25276    return this.allColumnFilters.forEach((i) => {
25277      const s = i.filterPromise;
25278      s && t.push(s.then((o) => e(o, i)));
25279    }), ye.all(t);
25280  }
25281  doColumnFiltersPass(e, t, i) {
25282    const { data: s, aggData: o } = e, n = i ? this.activeAggregateFilters : this.activeColumnFilters, r = i ? o : s;
25283    for (let a = 0; a < n.length; a++) {
25284      const l = n[a];
25285      if (!(l == null || l === t)) {
25286        if (typeof l.doesFilterPass != "function") {
25287          z(91);
25288          continue;
25289        }
25290        if (!l.doesFilterPass({ node: e, data: r }))
25291          return !1;
25292      }
25293    }
25294    return !0;
25295  }
25296  // sometimes (especially in React) the filter can call onFilterChanged when we are in the middle
25297  // of a render cycle. this would be bad, so we wait for render cycle to complete when this happens.
25298  // this happens in react when we change React State in the grid (eg setting RowCtrl's in RowContainer)
25299  // which results in React State getting applied in the main application, triggering a useEffect() to
25300  // be kicked off adn then the application calling the grid's API. in AG-6554, the custom filter was
25301  // getting it's useEffect() triggered in this way.
25302  callOnFilterChangedOutsideRenderCycle(e) {
25303    const { rowRenderer: t, filterManager: i } = this.beans, s = () => {
25304      this.isAlive() && i?.onFilterChanged(e);
25305    };
25306    t.isRefreshInProgress() ? setTimeout(s, 0) : s();
25307  }
25308  updateBeforeFilterChanged(e = {}) {
25309    const { filterInstance: t, additionalEventAttributes: i } = e;
25310    return this.updateDependentFilters(), this.updateActiveFilters().then(
25311      () => this.updateFilterFlagInColumns("filterChanged", i).then(() => {
25312        this.allColumnFilters.forEach((s) => {
25313          s.filterPromise && s.filterPromise.then((o) => {
25314            o && o !== t && o.onAnyFilterChanged && o.onAnyFilterChanged();
25315          });
25316        }), this.processingFilterChange = !0;
25317      })
25318    );
25319  }
25320  updateAfterFilterChanged() {
25321    this.processingFilterChange = !1;
25322  }
25323  isSuppressFlashingCellsBecauseFiltering() {
25324    return !(this.gos.get("allowShowChangeAfterFilter") ?? !1) && this.processingFilterChange;
25325  }
25326  onNewRowsLoaded(e) {
25327    this.forEachColumnFilter((t) => {
25328      t.onNewRowsLoaded?.();
25329    }).then(() => this.updateFilterFlagInColumns(e, { afterDataChange: !0 })).then(() => this.updateActiveFilters());
25330  }
25331  createGetValue(e) {
25332    const { filterValueSvc: t, colModel: i } = this.beans;
25333    return (s, o) => {
25334      const n = o ? i.getCol(o) : e;
25335      return n ? t.getValue(n, s) : void 0;
25336    };
25337  }
25338  isFilterActive(e) {
25339    const { filter: t } = this.cachedFilter(e) ?? {};
25340    return t ? t.isFilterActive() : this.getModelFromInitialState(e) != null;
25341  }
25342  getOrCreateFilterWrapper(e) {
25343    if (!e.isFilterAllowed())
25344      return null;
25345    let t = this.cachedFilter(e);
25346    return t || (t = this.createFilterWrapper(e), this.setColumnFilterWrapper(e, t)), t;
25347  }
25348  cachedFilter(e) {
25349    return this.allColumnFilters.get(e.getColId());
25350  }
25351  getDefaultFilter(e) {
25352    let t;
25353    const { gos: i, dataTypeSvc: s } = this.beans;
25354    if (xo(i))
25355      t = "agSetColumnFilter";
25356    else {
25357      const o = s?.getBaseDataType(e);
25358      o === "number" ? t = "agNumberColumnFilter" : o === "date" || o === "dateString" ? t = "agDateColumnFilter" : t = "agTextColumnFilter";
25359    }
25360    return t;
25361  }
25362  getDefaultFloatingFilter(e) {
25363    let t;
25364    const { gos: i, dataTypeSvc: s } = this.beans;
25365    if (xo(i))
25366      t = "agSetColumnFloatingFilter";
25367    else {
25368      const o = s?.getBaseDataType(e);
25369      o === "number" ? t = "agNumberColumnFloatingFilter" : o === "date" || o === "dateString" ? t = "agDateColumnFloatingFilter" : t = "agTextColumnFloatingFilter";
25370    }
25371    return t;
25372  }
25373  createFilterInstance(e, t) {
25374    const i = this.getDefaultFilter(e), s = e.getColDef();
25375    let o;
25376    const n = {
25377      ...this.createFilterParams(e, s),
25378      filterModifiedCallback: () => this.filterModifiedCallbackFactory(o, e)(),
25379      filterChangedCallback: (a) => this.filterChangedCallbackFactory(o, e)(a),
25380      doesRowPassOtherFilter: (a) => this.beans.filterManager?.doesRowPassOtherFilters(o, a) ?? !0
25381    }, r = Dp(this.beans.userCompFactory, s, n, i);
25382    return r ? {
25383      filterPromise: () => {
25384        const a = r.newAgStackInstance();
25385        return a.then((l) => {
25386          o = l, t && (t.filter = l ?? void 0);
25387        }), a;
25388      },
25389      compDetails: r
25390    } : { filterPromise: null, compDetails: null };
25391  }
25392  createFilterParams(e, t) {
25393    return this.gos.addGridCommonParams({
25394      column: e,
25395      colDef: t,
25396      rowModel: this.beans.rowModel,
25397      filterChangedCallback: () => {
25398      },
25399      filterModifiedCallback: () => {
25400      },
25401      getValue: this.createGetValue(e),
25402      doesRowPassOtherFilter: () => !0
25403    });
25404  }
25405  createFilterWrapper(e) {
25406    const t = {
25407      column: e,
25408      filterPromise: null,
25409      compDetails: null
25410    }, { filterPromise: i, compDetails: s } = this.createFilterInstance(e, t);
25411    return t.filterPromise = i?.() ?? null, t.compDetails = s, t;
25412  }
25413  onColumnsChanged() {
25414    const e = [], { colModel: t, filterManager: i } = this.beans;
25415    this.allColumnFilters.forEach((o, n) => {
25416      let r;
25417      o.column.isPrimary() ? r = t.getColDefCol(n) : r = t.getCol(n), !(r && r === o.column) && (e.push(o.column), this.disposeFilterWrapper(o, "columnChanged"), this.disposeColumnListener(n));
25418    });
25419    const s = e.every(
25420      (o) => o.getColDef().filter === "agGroupColumnFilter"
25421    );
25422    e.length > 0 && !s ? i?.onFilterChanged({ columns: e, source: "api" }) : this.updateDependentFilters();
25423  }
25424  updateDependentFilters() {
25425    this.beans.autoColSvc?.getAutoCols()?.forEach((e) => {
25426      e.getColDef().filter === "agGroupColumnFilter" && this.getOrCreateFilterWrapper(e);
25427    });
25428  }
25429  // for group filters, can change dynamically whether they are allowed or not
25430  isFilterAllowed(e) {
25431    if (!e.isFilterAllowed())
25432      return !1;
25433    const { filter: i } = this.allColumnFilters.get(e.getColId()) ?? {};
25434    return i && typeof i?.isFilterAllowed == "function" ? i.isFilterAllowed() : !0;
25435  }
25436  getFloatingFilterCompDetails(e, t) {
25437    const i = (c) => {
25438      const u = this.getOrCreateFilterWrapper(e)?.filterPromise;
25439      u?.then((h) => {
25440        c(ts(h));
25441      });
25442    }, s = e.getColDef(), o = {
25443      ...this.createFilterParams(e, s),
25444      filterChangedCallback: () => i(
25445        (c) => this.filterChangedCallbackFactory(c, e)()
25446      )
25447    }, { userCompFactory: n, frameworkOverrides: r } = this.beans, a = Op(
25448      n,
25449      s,
25450      o
25451    );
25452    let l = kf(
25453      r,
25454      s,
25455      () => this.getDefaultFloatingFilter(e)
25456    );
25457    return l == null && (l = "agReadOnlyFloatingFilter"), kp(n, s, {
25458      column: e,
25459      filterParams: a,
25460      currentParentModel: () => this.getCurrentFloatingFilterParentModel(e),
25461      parentFilterInstance: i,
25462      showParentFilter: t
25463    }, l);
25464  }
25465  getCurrentFloatingFilterParentModel(e) {
25466    return this.getModelFromFilterWrapper(this.cachedFilter(e) ?? { column: e });
25467  }
25468  // destroys the filter, so it no longer takes part
25469  destroyFilter(e, t = "api") {
25470    const i = e.getColId(), s = this.allColumnFilters.get(i);
25471    this.disposeColumnListener(i), delete this.initialFilterModel[i], s && (this.disposeFilterWrapper(s, t), this.beans.filterManager?.onFilterChanged({
25472      columns: [e],
25473      source: "api"
25474    }));
25475  }
25476  disposeColumnListener(e) {
25477    const t = this.allColumnListeners.get(e);
25478    t && (this.allColumnListeners.delete(e), t());
25479  }
25480  disposeFilterWrapper(e, t) {
25481    e.filterPromise?.then((i) => {
25482      this.destroyBean(i), this.setColFilterActive(e.column, !1, "filterDestroyed"), this.allColumnFilters.delete(e.column.getColId()), this.eventSvc.dispatchEvent({
25483        type: "filterDestroyed",
25484        source: t,
25485        column: e.column
25486      });
25487    });
25488  }
25489  filterModifiedCallbackFactory(e, t) {
25490    return () => {
25491      this.eventSvc.dispatchEvent({
25492        type: "filterModified",
25493        column: t,
25494        filterInstance: e
25495      });
25496    };
25497  }
25498  filterChangedCallbackFactory(e, t) {
25499    return (i) => {
25500      const s = i?.source ?? "columnFilter", o = {
25501        filter: e,
25502        additionalEventAttributes: i,
25503        columns: [t],
25504        source: s
25505      };
25506      this.callOnFilterChangedOutsideRenderCycle(o);
25507    };
25508  }
25509  checkDestroyFilter(e) {
25510    const t = this.allColumnFilters.get(e);
25511    if (!t)
25512      return;
25513    const i = t.column, { compDetails: s } = i.isFilterAllowed() ? this.createFilterInstance(i) : { compDetails: null };
25514    if (this.areFilterCompsDifferent(t.compDetails, s)) {
25515      this.destroyFilter(i, "paramsUpdated");
25516      return;
25517    }
25518    const o = i.getColDef().filterParams;
25519    if (!t.filterPromise) {
25520      this.destroyFilter(i, "paramsUpdated");
25521      return;
25522    }
25523    t.filterPromise.then((n) => {
25524      (n?.refresh ? n.refresh({
25525        ...this.createFilterParams(i, i.getColDef()),
25526        filterModifiedCallback: this.filterModifiedCallbackFactory(n, i),
25527        filterChangedCallback: this.filterChangedCallbackFactory(n, i),
25528        doesRowPassOtherFilter: (a) => this.beans.filterManager?.doesRowPassOtherFilters(n, a) ?? !0,
25529        ...o
25530      }) : !0) === !1 && this.destroyFilter(i, "paramsUpdated");
25531    });
25532  }
25533  setColumnFilterWrapper(e, t) {
25534    const i = e.getColId();
25535    this.allColumnFilters.set(i, t), this.allColumnListeners.set(
25536      i,
25537      this.addManagedListeners(e, { colDefChanged: () => this.checkDestroyFilter(i) })[0]
25538    );
25539  }
25540  areFilterCompsDifferent(e, t) {
25541    if (!t || !e)
25542      return !0;
25543    const { componentClass: i } = e, { componentClass: s } = t;
25544    return !(i === s || // react hooks returns new wrappers, so check nested render method
25545    i?.render && s?.render && i.render === s.render);
25546  }
25547  hasFloatingFilters() {
25548    return this.beans.colModel.getCols().some((t) => t.getColDef().floatingFilter);
25549  }
25550  getColumnFilterInstance(e) {
25551    return new Promise((t) => {
25552      this.getFilterInstanceImpl(e).then((i) => {
25553        t(ts(i));
25554      });
25555    });
25556  }
25557  getFilterInstanceImpl(e) {
25558    const t = this.beans.colModel.getColDefCol(e);
25559    return t ? this.getOrCreateFilterWrapper(t)?.filterPromise ?? ye.resolve(null) : ye.resolve(void 0);
25560  }
25561  processFilterModelUpdateQueue() {
25562    this.filterModelUpdateQueue.forEach(({ model: e, source: t }) => this.setFilterModel(e, t)), this.filterModelUpdateQueue = [], this.columnFilterModelUpdateQueue.forEach(({ key: e, model: t, resolve: i }) => {
25563      this.setColumnFilterModel(e, t).then(() => i());
25564    }), this.columnFilterModelUpdateQueue = [];
25565  }
25566  getColumnFilterModel(e) {
25567    const t = this.getFilterWrapper(e);
25568    return t ? this.getModelFromFilterWrapper(t) : null;
25569  }
25570  setColumnFilterModel(e, t) {
25571    const { colModel: i, dataTypeSvc: s } = this.beans;
25572    if (s?.isPendingInference) {
25573      let a = () => {
25574      };
25575      const l = new Promise((d) => {
25576        a = d;
25577      });
25578      return this.columnFilterModelUpdateQueue.push({ key: e, model: t, resolve: a }), l;
25579    }
25580    const o = i.getColDefCol(e), n = o ? this.getOrCreateFilterWrapper(o) : null;
25581    return n ? ((a) => new Promise((l) => {
25582      a.then((d) => l(d));
25583    }))(bs(n.filterPromise, t)) : Promise.resolve();
25584  }
25585  getFilterWrapper(e) {
25586    const t = this.beans.colModel.getColDefCol(e);
25587    return t ? this.cachedFilter(t) ?? null : null;
25588  }
25589  setColDefPropertiesForDataType(e, t, i) {
25590    const s = xo(this.gos), o = this.getLocaleTextFunc(), n = (r) => {
25591      const { filterParams: a } = e;
25592      e.filterParams = typeof a == "object" ? {
25593        ...a,
25594        ...r
25595      } : r;
25596    };
25597    switch (t.baseDataType) {
25598      case "number": {
25599        s && n({
25600          comparator: Py
25601        });
25602        break;
25603      }
25604      case "boolean": {
25605        n(s ? {
25606          valueFormatter: (r) => A(r.value) ? o(String(r.value), r.value ? "True" : "False") : o("blanks", "(Blanks)")
25607        } : {
25608          maxNumConditions: 1,
25609          debounceMs: 0,
25610          filterOptions: [
25611            "empty",
25612            {
25613              displayKey: "true",
25614              displayName: "True",
25615              predicate: (r, a) => a,
25616              numberOfInputs: 0
25617            },
25618            {
25619              displayKey: "false",
25620              displayName: "False",
25621              predicate: (r, a) => a === !1,
25622              numberOfInputs: 0
25623            }
25624          ]
25625        });
25626        break;
25627      }
25628      case "date": {
25629        s && n({
25630          valueFormatter: (r) => {
25631            const a = i(r);
25632            return A(a) ? a : o("blanks", "(Blanks)");
25633          },
25634          treeList: !0,
25635          treeListFormatter: (r, a) => {
25636            if (a === 1 && r != null) {
25637              const l = Ea[Number(r) - 1];
25638              return o(l, Pa[l]);
25639            }
25640            return r ?? o("blanks", "(Blanks)");
25641          }
25642        });
25643        break;
25644      }
25645      case "dateString": {
25646        const r = t.dateParser;
25647        n(s ? {
25648          valueFormatter: (a) => {
25649            const l = i(a);
25650            return A(l) ? l : o("blanks", "(Blanks)");
25651          },
25652          treeList: !0,
25653          treeListPathGetter: (a) => {
25654            const l = r(a ?? void 0);
25655            return l ? [String(l.getFullYear()), String(l.getMonth() + 1), String(l.getDate())] : null;
25656          },
25657          treeListFormatter: (a, l) => {
25658            if (l === 1 && a != null) {
25659              const d = Ea[Number(a) - 1];
25660              return o(d, Pa[d]);
25661            }
25662            return a ?? o("blanks", "(Blanks)");
25663          }
25664        } : {
25665          comparator: (a, l) => {
25666            const d = r(l);
25667            return l == null || d < a ? -1 : d > a ? 1 : 0;
25668          }
25669        });
25670        break;
25671      }
25672      case "object": {
25673        s ? n({
25674          valueFormatter: (r) => {
25675            const a = i(r);
25676            return A(a) ? a : o("blanks", "(Blanks)");
25677          }
25678        }) : e.filterValueGetter = (r) => i({
25679          column: r.column,
25680          node: r.node,
25681          value: this.beans.valueSvc.getValue(r.column, r.node)
25682        });
25683        break;
25684      }
25685    }
25686  }
25687  // additionalEventAttributes is used by provided simple floating filter, so it can add 'floatingFilter=true' to the event
25688  setColFilterActive(e, t, i, s) {
25689    e.filterActive !== t && (e.filterActive = t, e.dispatchColEvent("filterActiveChanged", i)), e.dispatchColEvent("filterChanged", i, s);
25690  }
25691  destroy() {
25692    super.destroy(), this.allColumnFilters.forEach((e) => this.disposeFilterWrapper(e, "gridDestroyed")), this.allColumnListeners.clear();
25693  }
25694};
25695function bs(e, t) {
25696  return e ? new ye((i) => {
25697    e.then((s) => {
25698      typeof s.setModel != "function" && (x(65), i()), (s.setModel(t) || ye.resolve()).then(() => i());
25699    });
25700  }) : ye.resolve();
25701}
25702function Dy(e) {
25703  return !!e.filterManager?.isAnyFilterPresent();
25704}
25705function Ay(e, t = "api") {
25706  e.filterManager?.onFilterChanged({ source: t });
25707}
25708var Ty = class extends y {
25709  constructor() {
25710    super(...arguments), this.beanName = "filterManager", this.advFilterModelUpdateQueue = [];
25711  }
25712  wireBeans(e) {
25713    this.quickFilter = e.quickFilter, this.advancedFilter = e.advancedFilter, this.colFilter = e.colFilter;
25714  }
25715  postConstruct() {
25716    const e = this.refreshFiltersForAggregations.bind(this), t = this.updateAdvFilterColumns.bind(this);
25717    this.addManagedEventListeners({
25718      columnValueChanged: e,
25719      columnPivotChanged: e,
25720      columnPivotModeChanged: e,
25721      newColumnsLoaded: t,
25722      columnVisible: t,
25723      advancedFilterEnabledChanged: ({ enabled: s }) => this.onAdvFilterEnabledChanged(s),
25724      dataTypesInferred: this.processFilterModelUpdateQueue.bind(this)
25725    }), this.externalFilterPresent = this.isExternalFilterPresentCallback(), this.addManagedPropertyListeners(["isExternalFilterPresent", "doesExternalFilterPass"], () => {
25726      this.onFilterChanged({ source: "api" });
25727    }), this.updateAggFiltering(), this.addManagedPropertyListener("groupAggFiltering", () => {
25728      this.updateAggFiltering(), this.onFilterChanged();
25729    }), this.quickFilter && this.addManagedListeners(this.quickFilter, {
25730      quickFilterChanged: () => this.onFilterChanged({ source: "quickFilter" })
25731    });
25732    const { gos: i } = this;
25733    this.alwaysPassFilter = i.get("alwaysPassFilter"), this.addManagedPropertyListener("alwaysPassFilter", () => {
25734      this.alwaysPassFilter = i.get("alwaysPassFilter"), this.onFilterChanged({ source: "api" });
25735    });
25736  }
25737  isExternalFilterPresentCallback() {
25738    const e = this.gos.getCallback("isExternalFilterPresent");
25739    return typeof e == "function" && e({});
25740  }
25741  doesExternalFilterPass(e) {
25742    const t = this.gos.get("doesExternalFilterPass");
25743    return typeof t == "function" && t(e);
25744  }
25745  setFilterModel(e, t = "api") {
25746    if (this.isAdvFilterEnabled()) {
25747      this.warnAdvFilters();
25748      return;
25749    }
25750    this.colFilter?.setFilterModel(e, t);
25751  }
25752  getFilterModel() {
25753    return this.colFilter?.getFilterModel() ?? {};
25754  }
25755  isColumnFilterPresent() {
25756    return !!this.colFilter?.isColumnFilterPresent();
25757  }
25758  isAggregateFilterPresent() {
25759    return !!this.colFilter?.isAggregateFilterPresent();
25760  }
25761  isChildFilterPresent() {
25762    return this.isColumnFilterPresent() || this.isQuickFilterPresent() || this.externalFilterPresent || this.isAdvFilterPresent();
25763  }
25764  isAnyFilterPresent() {
25765    return this.isChildFilterPresent() || this.isAggregateFilterPresent();
25766  }
25767  isAdvFilterPresent() {
25768    return this.isAdvFilterEnabled() && this.advancedFilter.isFilterPresent();
25769  }
25770  onAdvFilterEnabledChanged(e) {
25771    e ? this.colFilter?.disableColumnFilters() && this.onFilterChanged({ source: "advancedFilter" }) : this.advancedFilter?.isFilterPresent() && (this.advancedFilter.setModel(null), this.onFilterChanged({ source: "advancedFilter" }));
25772  }
25773  isAdvFilterEnabled() {
25774    return !!this.advancedFilter?.isEnabled();
25775  }
25776  isAdvFilterHeaderActive() {
25777    return this.isAdvFilterEnabled() && this.advancedFilter.isHeaderActive();
25778  }
25779  resetQuickFilterCache() {
25780    this.quickFilter?.resetCache();
25781  }
25782  refreshFiltersForAggregations() {
25783    sn(this.gos) && this.onFilterChanged();
25784  }
25785  onFilterChanged(e = {}) {
25786    const { source: t, additionalEventAttributes: i, columns: s = [] } = e;
25787    this.externalFilterPresent = this.isExternalFilterPresentCallback(), (this.colFilter ? this.colFilter.updateBeforeFilterChanged(e) : ye.resolve()).then(() => {
25788      const o = {
25789        source: t,
25790        type: "filterChanged",
25791        columns: s
25792      };
25793      i && ce(o, i), this.eventSvc.dispatchEvent(o), this.colFilter?.updateAfterFilterChanged();
25794    });
25795  }
25796  isSuppressFlashingCellsBecauseFiltering() {
25797    return !!this.colFilter?.isSuppressFlashingCellsBecauseFiltering();
25798  }
25799  isQuickFilterPresent() {
25800    return !!this.quickFilter?.isFilterPresent();
25801  }
25802  updateAggFiltering() {
25803    this.aggFiltering = !!sn(this.gos);
25804  }
25805  isAggregateQuickFilterPresent() {
25806    return this.isQuickFilterPresent() && this.shouldApplyQuickFilterAfterAgg();
25807  }
25808  isNonAggregateQuickFilterPresent() {
25809    return this.isQuickFilterPresent() && !this.shouldApplyQuickFilterAfterAgg();
25810  }
25811  shouldApplyQuickFilterAfterAgg() {
25812    return (this.aggFiltering || this.beans.colModel.isPivotMode()) && !this.gos.get("applyQuickFilterBeforePivotOrAgg");
25813  }
25814  doesRowPassOtherFilters(e, t) {
25815    return this.doesRowPassFilter({ rowNode: t, filterInstanceToSkip: e });
25816  }
25817  doesRowPassAggregateFilters(e) {
25818    const { rowNode: t } = e;
25819    return this.alwaysPassFilter?.(t) ? !0 : !(this.isAggregateQuickFilterPresent() && !this.quickFilter.doesRowPass(t) || this.isAggregateFilterPresent() && !this.colFilter.doAggregateFiltersPass(t, e.filterInstanceToSkip));
25820  }
25821  doesRowPassFilter(e) {
25822    const { rowNode: t } = e;
25823    return this.alwaysPassFilter?.(t) ? !0 : !(this.isNonAggregateQuickFilterPresent() && !this.quickFilter.doesRowPass(t) || this.externalFilterPresent && !this.doesExternalFilterPass(t) || this.isColumnFilterPresent() && !this.colFilter.doColumnFiltersPass(t, e.filterInstanceToSkip) || this.isAdvFilterPresent() && !this.advancedFilter.doesFilterPass(t));
25824  }
25825  isFilterActive(e) {
25826    return !!this.colFilter?.isFilterActive(e);
25827  }
25828  getOrCreateFilterWrapper(e) {
25829    return this.colFilter?.getOrCreateFilterWrapper(e) ?? null;
25830  }
25831  getDefaultFloatingFilter(e) {
25832    return this.colFilter.getDefaultFloatingFilter(e);
25833  }
25834  createFilterParams(e, t) {
25835    return this.colFilter.createFilterParams(e, t);
25836  }
25837  // for group filters, can change dynamically whether they are allowed or not
25838  isFilterAllowed(e) {
25839    return this.isAdvFilterEnabled() ? !1 : !!this.colFilter?.isFilterAllowed(e);
25840  }
25841  getFloatingFilterCompDetails(e, t) {
25842    return this.colFilter?.getFloatingFilterCompDetails(e, t);
25843  }
25844  getCurrentFloatingFilterParentModel(e) {
25845    return this.colFilter?.getCurrentFloatingFilterParentModel(e);
25846  }
25847  // destroys the filter, so it no longer takes part
25848  destroyFilter(e, t = "api") {
25849    this.colFilter?.destroyFilter(e, t);
25850  }
25851  areFilterCompsDifferent(e, t) {
25852    return !!this.colFilter?.areFilterCompsDifferent(e, t);
25853  }
25854  getAdvFilterModel() {
25855    return this.isAdvFilterEnabled() ? this.advancedFilter.getModel() : null;
25856  }
25857  setAdvFilterModel(e) {
25858    if (this.isAdvFilterEnabled()) {
25859      if (this.beans.dataTypeSvc?.isPendingInference) {
25860        this.advFilterModelUpdateQueue.push(e);
25861        return;
25862      }
25863      this.advancedFilter.setModel(e ?? null), this.onFilterChanged({ source: "advancedFilter" });
25864    }
25865  }
25866  toggleAdvFilterBuilder(e, t) {
25867    this.isAdvFilterEnabled() && this.advancedFilter.getCtrl().toggleFilterBuilder({ source: t, force: e });
25868  }
25869  updateAdvFilterColumns() {
25870    this.isAdvFilterEnabled() && this.advancedFilter.updateValidity() && this.onFilterChanged({ source: "advancedFilter" });
25871  }
25872  hasFloatingFilters() {
25873    return this.isAdvFilterEnabled() ? !1 : !!this.colFilter?.hasFloatingFilters();
25874  }
25875  getColumnFilterInstance(e) {
25876    return this.isAdvFilterEnabled() ? (this.warnAdvFilters(), Promise.resolve(void 0)) : this.colFilter?.getColumnFilterInstance(e) ?? Promise.resolve(void 0);
25877  }
25878  warnAdvFilters() {
25879    x(68);
25880  }
25881  setupAdvFilterHeaderComp(e) {
25882    this.advancedFilter?.getCtrl().setupHeaderComp(e);
25883  }
25884  getHeaderRowCount() {
25885    return this.isAdvFilterHeaderActive() ? 1 : 0;
25886  }
25887  getHeaderHeight() {
25888    return this.isAdvFilterHeaderActive() ? this.advancedFilter.getCtrl().getHeaderHeight() : 0;
25889  }
25890  processFilterModelUpdateQueue() {
25891    this.advFilterModelUpdateQueue.forEach((e) => this.setAdvFilterModel(e)), this.advFilterModelUpdateQueue = [];
25892  }
25893  getColumnFilterModel(e) {
25894    return this.colFilter?.getColumnFilterModel(e);
25895  }
25896  setColumnFilterModel(e, t) {
25897    return this.isAdvFilterEnabled() ? (this.warnAdvFilters(), Promise.resolve()) : this.colFilter?.setColumnFilterModel(e, t) ?? Promise.resolve();
25898  }
25899  setColDefPropertiesForDataType(e, t, i) {
25900    this.colFilter?.setColDefPropertiesForDataType(e, t, i);
25901  }
25902}, My = class extends y {
25903  constructor() {
25904    super(...arguments), this.beanName = "filterMenuFactory";
25905  }
25906  wireBeans(e) {
25907    this.popupSvc = e.popupSvc;
25908  }
25909  hideActiveMenu() {
25910    this.hidePopup?.();
25911  }
25912  showMenuAfterMouseEvent(e, t, i) {
25913    this.showPopup(
25914      e,
25915      (s) => {
25916        this.popupSvc?.positionPopupUnderMouseEvent({
25917          column: e,
25918          type: i,
25919          mouseEvent: t,
25920          ePopup: s
25921        });
25922      },
25923      i,
25924      t.target,
25925      Pe(this.gos)
25926    );
25927  }
25928  showMenuAfterButtonClick(e, t, i) {
25929    let s = -1, o = "left";
25930    const n = Pe(this.gos);
25931    !n && this.gos.get("enableRtl") && (s = 1, o = "right");
25932    const r = n ? void 0 : 4 * s, a = n ? void 0 : 4;
25933    this.showPopup(
25934      e,
25935      (l) => {
25936        this.popupSvc?.positionPopupByComponent({
25937          type: i,
25938          eventSource: t,
25939          ePopup: l,
25940          nudgeX: r,
25941          nudgeY: a,
25942          alignSide: o,
25943          keepWithinBounds: !0,
25944          position: "under",
25945          column: e
25946        });
25947      },
25948      i,
25949      t,
25950      n
25951    );
25952  }
25953  showPopup(e, t, i, s, o) {
25954    const n = e ? this.createBean(new Df(e, "COLUMN_MENU")) : void 0;
25955    if (this.activeMenu = n, !n?.hasFilter() || !e) {
25956      z(57);
25957      return;
25958    }
25959    const r = document.createElement("div");
25960    ve(r, "presentation"), r.classList.add("ag-menu"), o || r.classList.add("ag-filter-menu"), [this.tabListener] = this.addManagedElementListeners(r, {
25961      keydown: (p) => this.trapFocusWithin(p, r)
25962    }), r.appendChild(n?.getGui());
25963    let a;
25964    const l = () => n?.afterGuiDetached(), d = mg(this.gos) ? s ?? this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody : void 0, c = (p) => {
25965      da(e, !1, "contextMenu");
25966      const f = p instanceof KeyboardEvent;
25967      this.tabListener && (this.tabListener = this.tabListener()), f && s && Ne(s) && ud(s)?.focu
25967s({ preventScroll: !0 }), l(), this.destroyBean(this.activeMenu), this.dispatchVisibleChangedEvent(!1, i, e);
25968    }, u = this.getLocaleTextFunc(), h = o && i !== "columnFilter" ? u("ariaLabelColumnMenu", "Column Menu") : u("ariaLabelColumnFilter", "Column Filter"), g = this.popupSvc?.addPopup({
25969      modal: !0,
25970      eChild: r,
25971      closeOnEsc: !0,
25972      closedCallback: c,
25973      positionCallback: () => t(r),
25974      anchorToElement: d,
25975      ariaLabel: h
25976    });
25977    g && (this.hidePopup = a = g.hideFunc), n.afterInit().then(() => {
25978      t(r), n.afterGuiAttached({ container: i, hidePopup: a });
25979    }), da(e, !0, "contextMenu"), this.dispatchVisibleChangedEvent(!0, i, e);
25980  }
25981  trapFocusWithin(e, t) {
25982    e.key !== b.TAB || e.defaultPrevented || zt(this.beans, t, !1, e.shiftKey) || (e.preventDefault(), Ht(t, e.shiftKey));
25983  }
25984  dispatchVisibleChangedEvent(e, t, i) {
25985    this.eventSvc.dispatchEvent({
25986      type: "columnMenuVisibleChanged",
25987      visible: e,
25988      switchingTab: !1,
25989      key: t,
25990      column: i ?? null,
25991      columnGroup: null
25992    });
25993  }
25994  isMenuEnabled(e) {
25995    return e.isFilterAllowed() && (e.getColDef().menuTabs ?? ["filterMenuTab"]).includes("filterMenuTab");
25996  }
25997  showMenuAfterContextMenuEvent() {
25998  }
25999  destroy() {
26000    this.destroyBean(this.activeMenu), super.destroy();
26001  }
26002}, Iy = class extends y {
26003  constructor() {
26004    super(...arguments), this.beanName = "filterValueSvc";
26005  }
26006  getValue(e, t) {
26007    if (!t)
26008      return;
26009    const i = e.getColDef(), { filterValueGetter: s } = i;
26010    return s ? this.executeFilterValueGetter(s, t.data, e, t, i) : this.beans.valueSvc.getValue(e, t);
26011  }
26012  executeFilterValueGetter(e, t, i, s, o) {
26013    const { expressionSvc: n, valueSvc: r } = this.beans, a = this.gos.addGridCommonParams({
26014      data: t,
26015      node: s,
26016      column: i,
26017      colDef: o,
26018      getValue: r.getValueCallback.bind(r, s)
26019    });
26020    return typeof e == "function" ? e(a) : n?.evaluate(e, a);
26021  }
26022}, ky = class extends _ {
26023  constructor() {
26024    super(
26025      /* html */
26026      `
26027            <div class="ag-floating-filter-input" role="presentation">
26028                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>
26029            </div>`,
26030      [eo]
26031    ), this.eFloatingFilterText = M;
26032  }
26033  init(e) {
26034    this.params = e;
26035    const t = this.beans.colNames.getDisplayNameForColumn(e.column, "header", !0);
26036    this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput", "Filter Input")}`);
26037  }
26038  onParentModelChanged(e) {
26039    if (e == null) {
26040      this.eFloatingFilterText.setValue("");
26041      return;
26042    }
26043    this.params.parentFilterInstance((t) => {
26044      if (t.getModelAsString) {
26045        const i = t.getModelAsString(e);
26046        this.eFloatingFilterText.setValue(i);
26047      }
26048    });
26049  }
26050  refresh(e) {
26051    this.init(e);
26052  }
26053}, fc = class {
26054  constructor() {
26055    this.customFilterOptions = {};
26056  }
26057  init(e, t) {
26058    this.filterOptions = e.filterOptions || t, this.mapCustomOptions(), this.selectDefaultItem(e);
26059  }
26060  mapCustomOptions() {
26061    const { filterOptions: e } = this;
26062    e && e.forEach((t) => {
26063      if (typeof t == "string")
26064        return;
26065      const i = [["displayKey"], ["displayName"], ["predicate", "test"]], s = (o) => o.some((n) => t[n] != null) ? !0 : (x(72, { keys: o }), !1);
26066      if (!i.every(s)) {
26067        this.filterOptions = e.filter((o) => o === t) || [];
26068        return;
26069      }
26070      this.customFilterOptions[t.displayKey] = t;
26071    });
26072  }
26073  selectDefaultItem(e) {
26074    const { filterOptions: t } = this;
26075    if (e.defaultOption)
26076      this.defaultOption = e.defaultOption;
26077    else if (t.length >= 1) {
26078      const i = t[0];
26079      typeof i == "string" ? this.defaultOption = i : i.displayKey ? this.defaultOption = i.displayKey : x(73);
26080    } else
26081      x(74);
26082  }
26083  getCustomOption(e) {
26084    return this.customFilterOptions[e];
26085  }
26086};
26087function Ui(e, t, i) {
26088  return i == null ? e.splice(t) : e.splice(t, i);
26089}
26090function qs(e) {
26091  return e == null || typeof e == "string" && e.trim().length === 0;
26092}
26093function Ly(e) {
26094  return e === "AND" || e === "OR" ? e : "AND";
26095}
26096function Oy(e, t, i) {
26097  if (e == null)
26098    return;
26099  const { predicate: s } = e;
26100  if (s != null && !t.some((o) => o == null))
26101    return s(t, i);
26102}
26103function Gy(e, t) {
26104  let i = e.length;
26105  return i > t && (e.splice(t), x(78), i = t), i;
26106}
26107var mc = class extends If {
26108  constructor() {
26109    super(...arguments), this.eTypes = [], this.eJoinOperatorPanels = [], this.eJoinOperatorsAnd = [], this.eJoinOperatorsOr = [], this.eConditionBodies = [], this.listener = () => this.onUiChanged(), this.lastUiCompletePosition = null, this.joinOperatorId = 0;
26110  }
26111  getNumberOfInputs(e) {
26112    const t = this.optionsFactory.getCustomOption(e);
26113    if (t) {
26114      const { numberOfInputs: s } = t;
26115      return s ?? 1;
26116    }
26117    return e && ["empty", "notBlank", "blank"].indexOf(e) >= 0 ? 0 : e === "inRange" ? 2 : 1;
26118  }
26119  // floating filter calls this when user applies filter from floating filter
26120  onFloatingFilterChanged(e, t) {
26121    this.setTypeFromFloatingFilter(e), this.setValueFromFloatingFilter(t), this.onUiChanged(!0);
26122  }
26123  setTypeFromFloatingFilter(e) {
26124    this.eTypes.forEach((t, i) => {
26125      const s = i === 0 ? e : this.optionsFactory.defaultOption;
26126      t.setValue(s, !0);
26127    });
26128  }
26129  getModelFromUi() {
26130    const e = this.getUiCompleteConditions();
26131    return e.length === 0 ? null : this.maxNumConditions > 1 && e.length > 1 ? {
26132      filterType: this.filterType,
26133      operator: this.getJoinOperator(),
26134      conditions: e
26135    } : e[0];
26136  }
26137  getConditionTypes() {
26138    return this.eTypes.map((e) => e.getValue());
26139  }
26140  getConditionType(e) {
26141    return this.eTypes[e].getValue();
26142  }
26143  getJoinOperator() {
26144    const { eJoinOperatorsOr: e, defaultJoinOperator: t } = this;
26145    return e.length === 0 ? t : e[0].getValue() === !0 ? "OR" : "AND";
26146  }
26147  areModelsEqual(e, t) {
26148    if (!e && !t)
26149      return !0;
26150    if (!e && t || e && !t)
26151      return !1;
26152    const i = !e.operator, s = !t.operator;
26153    if (!i && s || i && !s)
26154      return !1;
26155    let n;
26156    if (i) {
26157      const r = e, a = t;
26158      n = this.areSimpleModelsEqual(r, a);
26159    } else {
26160      const r = e, a = t;
26161      n = r.operator === a.operator && Wt(
26162        r.conditions,
26163        a.conditions,
26164        (l, d) => this.areSimpleModelsEqual(l, d)
26165      );
26166    }
26167    return n;
26168  }
26169  shouldRefresh(e) {
26170    const t = this.getModel(), i = t ? t.conditions ?? [t] : null, s = e.filterOptions?.map((n) => typeof n == "string" ? n : n.displayKey) ?? this.getDefaultFilterOptions();
26171    return !(!(!i || i.every((n) => s.find((r) => r === n.type) !== void 0)) || typeof e.maxNumConditions == "number" && i && i.length > e.maxNumConditions);
26172  }
26173  refresh(e) {
26174    return !this.shouldRefresh(e) || !super.refresh(e) ? !1 : (this.setParams(e), this.removeConditionsAndOperators(0), this.createOption(), this.setModel(this.getModel()), !0);
26175  }
26176  setModelIntoUi(e) {
26177    if (e.operator) {
26178      const i = e;
26179      let s = i.conditions;
26180      s == null && (s = [], x(77));
26181      const o = Gy(s, this.maxNumConditions), n = this.getNumConditions();
26182      if (o < n)
26183        this.removeConditionsAndOperators(o);
26184      else if (o > n)
26185        for (let a = n; a < o; a++)
26186          this.createJoinOperatorPanel(), this.createOption();
26187      const r = i.operator === "OR";
26188      this.eJoinOperatorsAnd.forEach((a) => a.setValue(!r, !0)), this.eJoinOperatorsOr.forEach((a) =>
26188 a.setValue(r, !0)), s.forEach((a, l) => {
26189        this.eTypes[l].setValue(a.type, !0), this.setConditionIntoUi(a, l);
26190      });
26191    } else {
26192      const i = e;
26193      this.getNumConditions() > 1 && this.removeConditionsAndOperators(1), this.eTypes[0].setValue(i.type, !0), this.setConditionIntoUi(i, 0);
26194    }
26195    return this.lastUiCompletePosition = this.getNumConditions() - 1, this.createMissingConditionsAndOperators(), this.onUiChanged(), ye.resolve();
26196  }
26197  doesFilterPass(e) {
26198    const t = this.getModel();
26199    if (t == null)
26200      return !0;
26201    const { operator: i } = t, s = [];
26202    if (i) {
26203      const n = t;
26204      s.push(...n.conditions ?? []);
26205    } else
26206      s.push(t);
26207    return s[i && i === "OR" ? "some" : "every"]((n) => this.individualConditionPasses(e, n));
26208  }
26209  setParams(e) {
26210    super.setParams(e), this.setNumConditions(e), this.defaultJoinOperator = Ly(e.defaultJoinOperator), this.filterPlaceholder = e.filterPlaceholder, this.optionsFactory = new fc(), this.optionsFactory.init(e, this.getDefaultFilterOptions()), this.createFilterListOptions(), this.createOption(), this.createMissingConditionsAndOperators(), this.isReadOnly() && this.eFilterBody.setAttribute("tabindex", "-1");
26211  }
26212  setNumConditions(e) {
26213    let t = e.maxNumConditions ?? 2;
26214    t < 1 && (x(79), t = 1), this.maxNumConditions = t;
26215    let i = e.numAlwaysVisibleConditions ?? 1;
26216    i < 1 && (x(80), i = 1), i > t && (x(81), i = t), this.numAlwaysVisibleConditions = i;
26217  }
26218  createOption() {
26219    const e = this.createManagedBean(new nr());
26220    this.eTypes.push(e), e.addCssClass("ag-filter-select"), this.eFilterBody.appendChild(e.getGui());
26221    const t = this.createValueElement();
26222    this.eConditionBodies.push(t), this.eFilterBody.appendChild(t), this.putOptionsIntoDropdown(e), this.resetType(e);
26223    const i = this.getNumConditions() - 1;
26224    this.forEachPositionInput(i, (s) => this.resetInput(s)), this.addChangedListeners(e, i);
26225  }
26226  createJoinOperatorPanel() {
26227    const e = document.createElement("div");
26228    this.eJoinOperatorPanels.push(e), e.classList.add("ag-filter-condition");
26229    const t = this.createJoinOperator(this.eJoinOperatorsAnd, e, "and"), i = this.createJoinOperator(this.eJoinOperatorsOr, e, "or");
26230    this.eFilterBody.appendChild(e);
26231    const s = this.eJoinOperatorPanels.length - 1, o = this.joinOperatorId++;
26232    this.resetJoinOperatorAnd(t, s, o), this.resetJoinOperatorOr(i, s, o), this.isReadOnly() || (t.onValueChange(this.listener), i.onValueChange(this.listener));
26233  }
26234  createJoinOperator(e, t, i) {
26235    const s = this.createManagedBean(new Nm());
26236    e.push(s);
26237    const o = "ag-filter-condition-operator";
26238    return s.addCssClass(o), s.addCssClass(`${o}-${i}`), t.appendChild(s.getGui()), s;
26239  }
26240  createFilterListOptions() {
26241    this.filterListOptions = this.optionsFactory.filterOptions.map(
26242      (e) => typeof e == "string" ? this.createBoilerplateListOption(e) : this.createCustomListOption(e)
26243    );
26244  }
26245  putOptionsIntoDropdown(e) {
26246    const { filterListOptions: t } = this;
26247    t.forEach((i) => {
26248      e.addOption(i);
26249    }), e.setDisabled(t.length <= 1);
26250  }
26251  createBoilerplateListOption(e) {
26252    return { value: e, text: this.translate(e) };
26253  }
26254  createCustomListOption(e) {
26255    const { displayKey: t } = e, i = this.optionsFactory.getCustomOption(e.displayKey);
26256    return {
26257      value: t,
26258      text: i ? this.getLocaleTextFunc()(i.displayKey, i.displayName) : this.translate(t)
26259    };
26260  }
26261  createBodyTemplate() {
26262    return "";
26263  }
26264  getAgComponents() {
26265    return [];
26266  }
26267  getCssIdentifier() {
26268    return "simple-filter";
26269  }
26270  updateUiVisibility() {
26271    const e = this.getJoinOperator();
26272    this.updateNumConditions(), this.updateConditionStatusesAndValues(this.lastUiCompletePosition, e);
26273  }
26274  updateNumConditions() {
26275    let e = -1, t = !0;
26276    for (let i = 0; i < this.getNumConditions(); i++)
26277      this.isConditionUiComplete(i) ? e = i : t = !1;
26278    if (this.shouldAddNewConditionAtEnd(t))
26279      this.createJoinOperatorPanel(), this.createOption();
26280    else {
26281      const i = this.lastUiCompletePosition ?? this.getNumConditions() - 2;
26282      if (e < i) {
26283        this.removeConditionsAndOperators(i + 1);
26284        const s = e + 1, o = i - s;
26285        o > 0 && this.removeConditionsAndOperators(s, o), this.createMissingConditionsAndOperators();
26286      }
26287    }
26288    this.lastUiCompletePosition = e;
26289  }
26290  updateConditionStatusesAndValues(e, t) {
26291    this.eTypes.forEach((s, o) => {
26292      const n = this.isConditionDisabled(o, e);
26293      s.setDisabled(n || this.filterListOptions.length <= 1), o === 1 && (qi(this.eJoinOperatorPanels[0], n), this.eJoinOperatorsAnd[0].setDisabled(n), this.eJoinOperatorsOr[0].setDisabled(n));
26294    }), this.eConditionBodies.forEach((s, o) => {
26295      Q(s, this.isConditionBodyVisible(o));
26296    });
26297    const i = (t ?? this.getJoinOperator()) === "OR";
26298    this.eJoinOperatorsAnd.forEach((s) => {
26299      s.setValue(!i, !0);
26300    }), this.eJoinOperatorsOr.forEach((s) => {
26301      s.setValue(i, !0);
26302    }), this.forEachInput((s, o, n, r) => {
26303      this.setElementDisplayed(s, o < r), this.setElementDisabled(s, this.isConditionDisabled(n, e));
26304    }), this.resetPlaceholder();
26305  }
26306  shouldAddNewConditionAtEnd(e) {
26307    return e && this.getNumConditions() < this.maxNumConditions && !this.isReadOnly();
26308  }
26309  removeConditionsAndOperators(e, t) {
26310    if (e >= this.getNumConditions())
26311      return;
26312    const { eTypes: i, eConditionBodies: s, eJoinOperatorPanels: o, eJoinOperatorsAnd: n, eJoinOperatorsOr: r } = this;
26313    this.removeComponents(i, e, t), this.removeElements(s, e, t), this.removeValueElements(e, t);
26314    const a = Math.max(e - 1, 0);
26315    this.removeElements(o, a, t), this.removeComponents(n, a, t), this.removeComponents(r, a, t);
26316  }
26317  removeElements(e, t, i) {
26318    Ui(e, t, i).forEach((o) => qe(o));
26319  }
26320  removeComponents(e, t, i) {
26321    Ui(e, t, i).forEach((o) => {
26322      qe(o.getGui()), this.destroyBean(o);
26323    });
26324  }
26325  afterGuiAttached(e) {
26326    if (super.afterGuiAttached(e), this.resetPlaceholder(), !e?.suppressFocus) {
26327      const { eFilterBody: t, eTypes: i } = this;
26328      let s;
26329      if (!this.isReadOnly()) {
26330        const o = this.getInputs(0)[0];
26331        o instanceof At && this.isConditionBodyVisible(0) ? s = o.getInputElement() : s = i[0]?.getFocusableElement();
26332      }
26333      (s ?? t).focus({ preventScroll: !0 });
26334    }
26335  }
26336  afterGuiDetached() {
26337    super.afterGuiDetached();
26338    const e = this.getModel();
26339    this.resetUiToActiveModel(e);
26340    let t = -1, i = -1, s = !1;
26341    const o = this.getJoinOperator();
26342    for (let r = this.getNumConditions() - 1; r >= 0; r--)
26343      if (this.isConditionUiComplete(r))
26344        t === -1 && (t = r, i = r);
26345      else {
26346        const a = r >= this.numAlwaysVisibleConditions && !this.isConditionUiComplete(r - 1), l = r < t;
26347        (a || l) && (this.removeConditionsAndOperators(r, 1), s = !0, l && i--);
26348      }
26349    let n = !1;
26350    this.getNumConditions() < this.numAlwaysVisibleConditions && (this.createMissingConditionsAndOperators(), n = !0), this.shouldAddNewConditionAtEnd(i === this.getNumConditions() - 1) && (this.createJoinOperatorPanel(), this.createOption(), n = !0), n && this.updateConditionStatusesAndValues(i, o), s && this.updateJoinOperatorsDisabled(), this.lastUiCompletePosition = i;
26351  }
26352  getPlaceholderText(e, t) {
26353    let i = this.translate(e);
26354    if (typeof this.filterPlaceholder == "function") {
26355      const s = this.eTypes[t].getValue(), o = this.translate(s);
26356      i = this.filterPlaceholder({
26357        filterOptionKey: s,
26358        filterOption: o,
26359        placeholder: i
26360      });
26361    } else typeof this.filterPlaceholder == "string" && (i = this.filterPlaceholder);
26362    return i;
26363  }
26364  // allow sub-classes to reset HTML placeholders after UI update.
26365  resetPlaceholder() {
26366    const e = this.getLocaleTextFunc();
26367    this.forEachInput((t, i, s, o) => {
26368      if (!(t instanceof At))
26369        return;
26370      const n = i === 0 && o > 1 ? "inRangeStart" : i === 0 ? "filterOoo" : "inRangeEnd", r = i === 0 && o > 1 ? e("ariaFilterFromValue", "Filter from value") : i === 0 ? e("ariaFilterValue", "Filter Value") : e("ariaFilterToValue", "Filter to Value");
26371      t.setInputPlaceholder(this.getPlaceholderText(n, s)), t.setInputAriaLabel(r);
26372    });
26373  }
26374  // eslint-disable-next-line @typescript-eslint/no-unused-vars
26375  setElementValue(e, t, i) {
26376    e instanceof At && e.setValue(t != null ? String(t) : null, !0);
26377  }
26378  setElementDisplayed(e, t) {
26379    e instanceof _ && Q(e.getGui(), t);
26380  }
26381  setElementDisabled(e, t) {
26382    e instanceof _ && qi(e.getGui(), t);
26383  }
26384  attachElementOnChange(e, t) {
26385    e instanceof At && e.onValueChange(t);
26386  }
26387  forEachInput(e) {
26388    this.getConditionTypes().forEach((t, i) => {
26389      this.forEachPositionTypeInput(i, t, e);
26390    });
26391  }
26392  forEachPositionInput(e, t) {
26393    const i = this.getConditionType(e);
26394    this.forEachPositionTypeInput(e, i, t);
26395  }
26396  forEachPositionTypeInput(e, t, i) {
26397    const s = this.getNumberOfInputs(t), o = this.getInputs(e);
26398    for (let n = 0; n < o.length; n++) {
26399      const r = o[n];
26400      r != null && i(r, n, e, s);
26401    }
26402  }
26403  isConditionDisabled(e, t) {
26404    return this.isReadOnly() ? !0 : e === 0 ? !1 : e > t + 1;
26405  }
26406  isConditionBodyVisible(e) {
26407    const t = this.getConditionType(e);
26408    return this.getNumberOfInputs(t) > 0;
26409  }
26410  // returns true if the UI represents a working filter, eg all parts are filled out.
26411  // eg if text filter and textfield blank then returns false.
26412  isConditionUiComplete(e) {
26413    return !(e >= this.getNumConditions() || this.getConditionType(e) === "empty" || this.getValues(e).some((i) => i == null));
26414  }
26415  getNumConditions() {
26416    return this.eTypes.length;
26417  }
26418  getUiCompleteConditions() {
26419    const e = [];
26420    for (let t = 0; t < this.getNumConditions(); t++)
26421      this.isConditionUiComplete(t) && e.push(this.createCondition(t));
26422    return e;
26423  }
26424  createMissingConditionsAndOperators() {
26425    if (!this.isReadOnly())
26426      for (let e = this.getNumConditions(); e < this.numAlwaysVisibleConditions; e++)
26427        this.createJoinOperatorPanel(), this.createOption();
26428  }
26429  resetUiToDefaults(e) {
26430    return this.removeConditionsAndOperators(this.isReadOnly() ? 1 : this.numAlwaysVisibleConditions), this.eTypes.forEach((t) => this.resetType(t)), this.eJoinOperatorsAnd.forEach(
26431      (t, i) => this.resetJoinOperatorAnd(t, i, this.joinOperatorId + i)
26432    ), this.eJoinOperatorsOr.forEach(
26433      (t, i) => this.resetJoinOperatorOr(t, i, this.joinOperatorId + i)
26434    ), this.joinOperatorId++, this.forEachInput((t) => this.resetInput(t)), this.resetPlaceholder(), this.createMissingConditionsAndOperators(), this.lastUiCompletePosition = null, e || this.onUiChanged(), ye.resolve();
26435  }
26436  resetType(e) {
26437    const i = this.getLocaleTextFunc()("ariaFilteringOperator", "Filtering operator");
26438    e.setValue(this.optionsFactory.defaultOption, !0).setAriaLabel(i).setDisabled(this.isReadOnly() || this.filterListOptions.length <= 1);
26439  }
26440  resetJoinOperatorAnd(e, t, i) {
26441    this.resetJoinOperator(
26442      e,
26443      t,
26444      this.defaultJoinOperator === "AND",
26445      this.translate("andCondition"),
26446      i
26447    );
26448  }
26449  resetJoinOperatorOr(e, t, i) {
26450    this.resetJoinOperator(
26451      e,
26452      t,
26453      this.defaultJoinOperator === "OR",
26454      this.translate("orCondition"),
26455      i
26456    );
26457  }
26458  resetJoinOperator(e, t, i, s, o) {
26459    this.updateJoinOperatorDisabled(
26460      e.setValue(i, !0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(s),
26461      t
26462    );
26463  }
26464  updateJoinOperatorsDisabled() {
26465    const e = (t, i) => this.updateJoinOperatorDisabled(t, i);
26466    this.eJoinOperatorsAnd.forEach(e), this.eJoinOperatorsOr.forEach(e);
26467  }
26468  updateJoinOperatorDisabled(e, t) {
26469    e.setDisabled(this.isReadOnly() || t > 0);
26470  }
26471  resetInput(e) {
26472    this.setElementValue(e, null), this.setElementDisabled(e, this.isReadOnly());
26473  }
26474  // puts model values into the UI
26475  setConditionIntoUi(e, t) {
26476    const i = this.mapValuesFromModel(e);
26477    this.forEachInput((s, o, n) => {
26478      n === t && this.setElementValue(s, i[o] != null ? i[o] : null);
26479    });
26480  }
26481  // after floating filter changes, this sets the 'value' section. this is implemented by the base class
26482  // (as that's where value is controlled), the 'type' part from the floating filter is dealt with in this class.
26483  setValueFromFloatingFilter(e) {
26484    this.forEachInput((t, i, s) => {
26485      this.setElementValue(t, i === 0 && s === 0 ? e : null, !0);
26486    });
26487  }
26488  addChangedListeners(e, t) {
26489    this.isReadOnly() || (e.onValueChange(this.listener), this.forEachPositionInput(t, (i) => {
26490      this.attachElementOnChange(i, this.listener);
26491    }));
26492  }
26493  /** returns true if the row passes the said condition */
26494  individualConditionPasses(e, t) {
26495    const i = this.getCellValue(e.node), s = this.mapValuesFromModel(t), o = this.optionsFactory.getCustomOption(t.type), n = Oy(o, s, i);
26496    return n ?? (i == null ? this.evaluateNullValue(t.type) : this.evaluateNonNullValue(s, i, t, e));
26497  }
26498  hasInvalidInputs() {
26499    return !1;
26500  }
26501}, Cc = class extends mc {
26502  setParams(e) {
26503    super.setParams(e), this.scalarFilterParams = e;
26504  }
26505  evaluateNullValue(e) {
26506    const {
26507      includeBlanksInEquals: t,
26508      includeBlanksInNotEqual: i,
26509      includeBlanksInGreaterThan: s,
26510      includeBlanksInLessThan: o,
26511      includeBlanksInRange: n
26512    } = this.scalarFilterParams;
26513    switch (e) {
26514      case "equals":
26515        if (t)
26516          return !0;
26517        break;
26518      case "notEqual":
26519        if (i)
26520          return !0;
26521        break;
26522      case "greaterThan":
26523      case "greaterThanOrEqual":
26524        if (s)
26525          return !0;
26526        break;
26527      case "lessThan":
26528      case "lessThanOrEqual":
26529        if (o)
26530          return !0;
26531        break;
26532      case "inRange":
26533        if (n)
26534          return !0;
26535        break;
26536      case "blank":
26537        return !0;
26538      case "notBlank":
26539        return !1;
26540    }
26541    return !1;
26542  }
26543  evaluateNonNullValue(e, t, i) {
26544    const s = this.comparator(), o = e[0] != null ? s(e[0], t) : 0;
26545    switch (i.type) {
26546      case "equals":
26547        return o === 0;
26548      case "notEqual":
26549        return o !== 0;
26550      case "greaterThan":
26551        return o > 0;
26552      case "greaterThanOrEqual":
26553        return o >= 0;
26554      case "lessThan":
26555        return o < 0;
26556      case "lessThanOrEqual":
26557        return o <= 0;
26558      case "inRange": {
26559        const n = s(e[1], t);
26560        return this.scalarFilterParams.inRangeInclusive ? o >= 0 && n <= 0 : o > 0 && n < 0;
26561      }
26562      case "blank":
26563        return qs(t);
26564      case "notBlank":
26565        return !qs(t);
26566      default:
26567        return x(76, { filterModelType: i.type }), !0;
26568    }
26569  }
26570}, vc = class {
26571  constructor(e, t, i, s, o) {
26572    this.alive = !0, this.context = e, this.eParent = s;
26573    const n = Ap(t, i);
26574    n && n.newAgStackInstance().then((r) => {
26575      if (!this.alive) {
26576        e.destroyBean(r);
26577        return;
26578      }
26579      if (this.dateComp = r, !r)
26580        return;
26581      s.appendChild(r.getGui()), r?.afterGuiAttached?.();
26582      const { tempValue: a, disabled: l } = this;
26583      a && r.setDate(a), l != null && r.setDisabled?.(l), o?.(this);
26584    });
26585  }
26586  destroy() {
26587    this.alive = !1, this.dateComp = this.context.destroyBean(this.dateComp);
26588  }
26589  getDate() {
26590    return this.dateComp ? this.dateComp.getDate() : this.tempValue;
26591  }
26592  setDate(e) {
26593    const t = this.dateComp;
26594    t ? t.setDate(e) : this.tempValue = e;
26595  }
26596  setDisabled(e) {
26597    const t = this.dateComp;
26598    t ? t.setDisabled?.(e) : this.disabled = e;
26599  }
26600  setDisplayed(e) {
26601    Q(this.eParent, e);
26602  }
26603  setInputPlaceholder(e) {
26604    this.dateComp?.setInputPlaceholder?.(e);
26605  }
26606  setInputAriaLabel(e) {
26607    this.dateComp?.setInputAriaLabel?.(e);
26608  }
26609  afterGuiAttached(e) {
26610    this.dateComp?.afterGuiAttached?.(e);
26611  }
26612  updateParams(e) {
26613    this.dateComp?.refresh?.(e);
26614  }
26615}, wc = [
26616  "equals",
26617  "notEqual",
26618  "lessThan",
26619  "greaterThan",
26620  "inRange",
26621  "blank",
26622  "notBlank"
26623], hr = class {
26624  constructor(e, t, i) {
26625    this.getLocaleTextFunc = e, this.optionsFactory = t, this.valueFormatter = i;
26626  }
26627  // used by:
26628  // 1) NumberFloatingFilter & TextFloatingFilter: Always, for both when editable and read only.
26629  // 2) DateFloatingFilter: Only when read only (as we show text rather than a date picker when read only)
26630  getModelAsString(e) {
26631    if (!e)
26632      return null;
26633    const t = e.operator != null, i = this.getLocaleTextFunc();
26634    if (t) {
26635      const s = e, n = (s.conditions ?? []).map((a) => this.getModelAsString(a)), r = s.operator === "AND" ? "andCondition" : "orCondition";
26636      return n.join(
26637        ` ${i(r, Rd[r])} `
26638      );
26639    } else {
26640      if (e.type === "blank" || e.type === "notBlank")
26641        return i(e.type, e.type);
26642      {
26643        const s = e, o = this.optionsFactory.getCustomOption(s.type), { displayKey: n, displayName: r, numberOfInputs: a } = o || {};
26644        return n && r && a === 0 ? (i(n, r), r) : this.conditionToString(s, o);
26645      }
26646    }
26647  }
26648  updateParams(e) {
26649    this.optionsFactory = e.optionsFactory;
26650  }
26651  formatValue(e) {
26652    const t = this.valueFormatter;
26653    return t ? t(e ?? null) ?? "" : String(e);
26654  }
26655}, Sc = class extends hr {
26656  constructor(e, t, i) {
26657    super(t, i), this.dateFilterParams = e;
26658  }
26659  conditionToString(e, t) {
26660    const { type: i } = e, { numberOfInputs: s } = t || {}, o = i == "inRange" || s === 2, n = Re(e.dateFrom), r = Re(e.dateTo), a = this.dateFilterParams.inRangeFloatingFilterDateFormat;
26661    if (o) {
26662      const l = n !== null ? zi(n, a) : "null", d = r !== null ? zi(r, a) : "null";
26663      return `${l}-${d}`;
26664    }
26665    return n != null ? zi(n, a) : `${i}`;
26666  }
26667  updateParams(e) {
26668    super.updateParams(e), this.dateFilterParams = e.dateFilterParams;
26669  }
26670}, Da = 1e3, Aa = 1 / 0, Hy = class extends Cc {
26671  constructor() {
26672    super("dateFilter"), this.eConditionPanelsFrom = [], this.eConditionPanelsTo = [], this.dateConditionFromComps = [], this.dateConditionToComps = [], this.minValidYear = Da, this.maxValidYear = Aa, this.minValidDate = null, this.maxValidDate = null, this.filterType = "date";
26673  }
26674  afterGuiAttached(e) {
26675    super.afterGuiAttached(e), this.dateConditionFromComps[0].afterGuiAttached(e);
26676  }
26677  mapValuesFromModel(e) {
26678    const { dateFrom: t, dateTo: i, type: s } = e || {};
26679    return [
26680      t && Re(t) || null,
26681      i && Re(i) || null
26682    ].slice(0, this.getNumberOfInputs(s));
26683  }
26684  comparator() {
26685    return this.dateFilterParams.comparator ?? By;
26686  }
26687  setParams(e) {
26688    this.dateFilterParams = e, super.setParams(e);
26689    const t = (i, s) => {
26690      if (e[i] != null)
26691        if (isNaN(e[i]))
26692          x(82, { param: i });
26693        else
26694          return e[i] == null ? s : Number(e[i]);
26695      return s;
26696    };
26697    this.minValidYear = t("minValidYear", Da), this.maxValidYear = t("maxValidYear", Aa), this.minValidYear > this.maxValidYear && x(83), this.minValidDate = e.minValidDate ? e.minValidDate instanceof Date ? e.minValidDate : Re(e.minValidDate) : null, this.maxValidDate = e.maxValidDate ? e.maxValidDate instanceof Date ? e.maxValidDate : Re(e.maxValidDate) : null, this.minValidDate && this.maxValidDate && this.minValidDate > this.maxValidDate && x(84), this.filterModelFormatter = new Sc(
26698      this.dateFilterParams,
26699      this.getLocaleTextFunc.bind(this),
26700      this.optionsFactory
26701    );
26702  }
26703  createDateCompWrapper(e) {
26704    const { userCompFactory: t, context: i } = this.beans, s = new vc(
26705      i,
26706      t,
26707      {
26708        onDateChanged: () => this.onUiChanged(),
26709        filterParams: this.dateFilterParams,
26710        location: "filter"
26711      },
26712      e
26713    );
26714    return this.addDestroyFunc(() => s.destroy()), s;
26715  }
26716  setElementValue(e, t) {
26717    e.setDate(t);
26718  }
26719  setElementDisplayed(e, t) {
26720    e.setDisplayed(t);
26721  }
26722  setElementDisabled(e, t) {
26723    e.setDisabled(t);
26724  }
26725  getDefaultFilterOptions() {
26726    return wc;
26727  }
26728  createValueElement() {
26729    const t = te(this.beans).createElement("div");
26730    return t.classList.add("ag-filter-body"), this.createFromToElement(t, this.eConditionPanelsFrom, this.dateConditionFromComps, "from"), this.createFromToElement(t, this.eConditionPanelsTo, this.dateConditionToComps, "to"), t;
26731  }
26732  createFromToElement(e, t, i, s) {
26733    const n = te(this.beans).createElement("div");
26734    n.classList.add(`ag-filter-${s}`), n.classList.add(`ag-filter-date-${s}`), t.push(n), e.appendChild(n), i.push(this.createDateCompWrapper(n));
26735  }
26736  removeValueElements(e, t) {
26737    this.removeDateComps(this.dateConditionFromComps, e, t), this.removeDateComps(this.dateConditionToComps, e, t), Ui(this.eConditionPanelsFrom, e, t), Ui(this.eConditionPanelsTo, e, t);
26738  }
26739  removeDateComps(e, t, i) {
26740    Ui(e, t, i).forEach((o) => o.destroy());
26741  }
26742  isValidDateValue(e) {
26743    if (e === null)
26744      return !1;
26745    const { minValidDate: t, maxValidDate: i, minValidYear: s, maxValidYear: o } = this;
26746    if (t) {
26747      if (e < t)
26748        return !1;
26749    } else if (e.getUTCFullYear() < s)
26750      return !1;
26751    if (i) {
26752      if (e > i)
26753        return !1;
26754    } else if (e.getUTCFullYear() > o)
26755      return !1;
26756    return !0;
26757  }
26758  isConditionUiComplete(e) {
26759    if (!super.isConditionUiComplete(e))
26760      return !1;
26761    let t = !0;
26762    return this.forEachInput((i, s, o, n) => {
26763      o !== e || !t || s >= n || (t = t && this.isValidDateValue(i.getDate()));
26764    }), t;
26765  }
26766  areSimpleModelsEqual(e, t) {
26767    return e.dateFrom === t.dateFrom && e.dateTo === t.dateTo && e.type === t.type;
26768  }
26769  createCondition(e) {
26770    const t = this.getConditionType(e), i = {}, s = this.getValues(e);
26771    return s.length > 0 && (i.dateFrom = ke(s[0])), s.length > 1 && (i.dateTo = ke(s[1])), {
26772      dateFrom: null,
26773      dateTo: null,
26774      filterType: this.filterType,
26775      type: t,
26776      ...i
26777    };
26778  }
26779  resetPlaceholder() {
26780    const e = this.getLocaleTextFunc(), t = this.translate("dateFormatOoo"), i = e("ariaFilterValue", "Filter Value");
26781    this.forEachInput((s) => {
26782      s.setInputPlaceholder(t), s.setInputAriaLabel(i);
26783    });
26784  }
26785  getInputs(e) {
26786    const { dateConditionFromComps: t, dateConditionToComps: i } = this;
26787    return e >= t.length ? [null, null] : [t[e], i[e]];
26788  }
26789  getValues(e) {
26790    const t = [];
26791    return this.forEachPositionInput(e, (i, s, o, n) => {
26792      s < n && t.push(i.getDate());
26793    }), t;
26794  }
26795  translate(e) {
26796    return e === "lessThan" ? super.translate("before") : e === "greaterThan" ? super.translate("after") : super.translate(e);
26797  }
26798  getModelAsString(e) {
26799    return this.filterModelFormatter.getModelAsString(e) ?? "";
26800  }
26801};
26802function By(e, t) {
26803  const i = t;
26804  return t == null || i < e ? -1 : i > e ? 1 : 0;
26805}
26806var bc = class extends _ {
26807  constructor() {
26808    super(...arguments), this.defaultDebounceMs = 0;
26809  }
26810  setLastTypeFromModel(e) {
26811    if (!e) {
26812      this.lastType = this.optionsFactory.defaultOption;
26813      return;
26814    }
26815    const t = e.operator;
26816    let i;
26817    t ? i = e.conditions[0] : i = e, this.lastType = i.type;
26818  }
26819  canWeEditAfterModelFromParentFilter(e) {
26820    if (!e)
26821      return this.isTypeEditable(this.lastType);
26822    if (e.operator)
26823      return !1;
26824    const i = e;
26825    return this.isTypeEditable(i.type);
26826  }
26827  init(e) {
26828    this.setSimpleParams(e, !1);
26829  }
26830  setSimpleParams(e, t = !0) {
26831    const i = new fc();
26832    this.optionsFactory = i, i.init(e.filterParams, this.getDefaultOptions());
26833    const s = i.defaultOption;
26834    t || (this.lastType = s), this.readOnly = !!e.filterParams.readOnly;
26835    const o = this.isTypeEditable(s);
26836    this.setEditable(o);
26837  }
26838  refresh(e) {
26839    this.setSimpleParams(e);
26840  }
26841  hasSingleInput(e) {
26842    const t = this.optionsFactory.getCustomOption(e)?.numberOfInputs;
26843    return t == null || t == 1;
26844  }
26845  isTypeEditable(e) {
26846    const t = ["inRange", "empty", "blank", "notBlank"];
26847    return !!e && !this.readOnly && this.hasSingleInput(e) && t.indexOf(e) < 0;
26848  }
26849  getAriaLabel(e) {
26850    return `${this.beans.colNames.getDisplayNameForColumn(e.column, "header", !0)} ${this.getLocaleTextFunc()("ariaFilterInput", "Filter Input")}`;
26851  }
26852}, Ny = class extends bc {
26853  constructor() {
26854    super(
26855      /* html */
26856      `
26857            <div class="ag-floating-filter-input" role="presentation">
26858                <ag-input-text-field data-ref="eReadOnlyText"></ag-input-text-field>
26859                <div data-ref="eDateWrapper" style="display: flex;"></div>
26860            </div>`,
26861      [eo]
26862    ), this.eReadOnlyText = M, this.eDateWrapper = M;
26863  }
26864  getDefaultOptions() {
26865    return wc;
26866  }
26867  init(e) {
26868    super.init(e), this.params = e, this.filterParams = e.filterParams, this.createDateComponent(), this.filterModelFormatter = new Sc(
26869      this.filterParams,
26870      this.getLocaleTextFunc.bind(this),
26871      this.optionsFactory
26872    );
26873    const t = this.getLocaleTextFunc();
26874    this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput", "Date Filter Input"));
26875  }
26876  refresh(e) {
26877    super.refresh(e), this.params = e, this.filterParams = e.filterParams;
26878    const t = this.gos.addGridCommonParams(this.getDateComponentParams());
26879    this.dateComp.updateParams(t), this.filterModelFormatter.updateParams({
26880      optionsFactory: this.optionsFactory,
26881      dateFilterParams: this.filterParams
26882    }), this.updateCompOnModelChange(e.currentParentModel());
26883  }
26884  updateCompOnModelChange(e) {
26885    const t = !this.readOnly && this.canWeEditAfterModelFromParentFilter(e);
26886    if (this.setEditable(t), t) {
26887      const i = e ? Re(e.dateFrom) : null;
26888      this.dateComp.setDate(i), this.eReadOnlyText.setValue("");
26889    } else
26890      this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)), this.dateComp.setDate(null);
26891  }
26892  setEditable(e) {
26893    Q(this.eDateWrapper, e), Q(this.eReadOnlyText.getGui(), !e);
26894  }
26895  onParentModelChanged(e, t) {
26896    t?.afterFloatingFilter || t?.afterDataChange || (super.setLastTypeFromModel(e), this.updateCompOnModelChange(e));
26897  }
26898  onDateChanged() {
26899    const e = this.dateComp.getDate(), t = ke(e);
26900    this.params.parentFilterInstance((i) => {
26901      if (i) {
26902        const s = Re(t);
26903        i.onFloatingFilterChanged(this.lastType || null, s);
26904      }
26905    });
26906  }
26907  getDateComponentParams() {
26908    const { filterParams: e, column: t } = this.params, i = jn(e, this.defaultDebounceMs);
26909    return {
26910      onDateChanged: Ce(this, this.onDateChanged.bind(this), i),
26911      filterParams: t.getColDef().filterParams,
26912      location: "floatingFilter"
26913    };
26914  }
26915  createDateComponent() {
26916    const {
26917      beans: { context: e, userCompFactory: t },
26918      eDateWrapper: i
26919    } = this;
26920    this.dateComp = new vc(
26921      e,
26922      t,
26923      this.getDateComponentParams(),
26924      i,
26925      (s) => {
26926        s.setInputAriaLabel(this.getAriaLabel(this.params));
26927      }
26928    ), this.addDestroyFunc(() => this.dateComp.destroy());
26929  }
26930}, Vy = class extends _ {
26931  constructor() {
26932    super(
26933      /* html */
26934      `
26935            <div class="ag-filter-filter">
26936                <ag-input-text-field class="ag-date-filter" data-ref="eDateInput"></ag-input-text-field>
26937            </div>`,
26938      [eo]
26939    ), this.eDateInput = M, this.isApply = !1, this.applyOnFocusOut = !1;
26940  }
26941  init(e) {
26942    this.params = e, this.setParams(e);
26943    const t = this.eDateInput.getInputElement();
26944    this.addManagedListeners(t, {
26945      // ensures that the input element is focussed when a clear button is clicked,
26946      // unless using safari as there is no clear button and focus does not work properly
26947      mouseDown: () => {
26948        this.eDateInput.isDisabled() || this.usingSafariDatePicker || t.focus({ preventScroll: !0 });
26949      },
26950      input: this.handleInput.bind(this, !1),
26951      change: this.handleInput.bind(this, !0),
26952      focusout: this.handleFocusOut.bind(this)
26953    });
26954  }
26955  handleInput(e, t) {
26956    if (t.target === Z(this.beans) && !this.eDateInput.isDisabled()) {
26957      if (this.isApply) {
26958        this.applyOnFocusOut = !e, e && this.params.onDateChanged();
26959        return;
26960      }
26961      e || this.params.onDateChanged();
26962    }
26963  }
26964  handleFocusOut() {
26965    this.applyOnFocusOut && (this.applyOnFocusOut = !1, this.params.onDateChanged());
26966  }
26967  setParams(e) {
26968    const t = this.eDateInput.getInputElement(), i = this.shouldUseBrowserDatePicker(e);
26969    this.usingSafariDatePicker = i && Nt(), t.type = i ? "date" : "text";
26970    const { minValidYear: s, maxValidYear: o, minValidDate: n, maxValidDate: r, buttons: a } = e.filterParams || {};
26971    if (n && s && x(85), r && o && x(86), n && r) {
26972      const [l, d] = [n, r].map(
26973        (c) => c instanceof Date ? c : Re(c)
26974      );
26975      l && d && l.getTime() > d.getTime() && x(87);
26976    }
26977    n ? n instanceof Date ? t.min = zi(n) : t.min = n : s && (t.min = `${s}-01-01`), r ? r instanceof Date ? t.max = zi(r) : t.max = r : o && (t.max = `${o}-12-31`), this.isApply = e.location === "floatingFilter" && !!a?.includes("apply");
26978  }
26979  refresh(e) {
26980    this.params = e, this.setParams(e);
26981  }
26982  getDate() {
26983    return Re(this.eDateInput.getValue());
26984  }
26985  setDate(e) {
26986    this.eDateInput.setValue(ke(e, !1));
26987  }
26988  setInputPlaceholder(e) {
26989    this.eDateInput.setInputPlaceholder(e);
26990  }
26991  setInputAriaLabel(e) {
26992    this.eDateInput.setAriaLabel(e);
26993  }
26994  setDisabled(e) {
26995    this.eDateInput.setDisabled(e);
26996  }
26997  afterGuiAttached(e) {
26998    (!e || !e.suppressFocus) && this.eDateInput.getInputElement().focus({ preventScroll: !0 });
26999  }
27000  shouldUseBrowserDatePicker(e) {
27001    return e?.filterParams?.browserDatePicker ?? !0;
27002  }
27003}, yc = [
27004  "equals",
27005  "notEqual",
27006  "greaterThan",
27007  "greaterThanOrEqual",
27008  "lessThan",
27009  "lessThanOrEqual",
27010  "inRange",
27011  "blank",
27012  "notBlank"
27013], Rc = class extends hr {
27014  conditionToString(e, t) {
27015    const { numberOfInputs: i } = t || {}, { filter: s, filterTo: o, type: n } = e, r = n == "inRange" || i === 2, a = this.formatValue.bind(this);
27016    return r ? `${a(s)}-${a(o)}` : s != null ? a(s) : `${n}`;
27017  }
27018};
27019function yn(e) {
27020  const { allowedCharPattern: t } = e ?? {};
27021  return t ?? null;
27022}
27023var Wy = class extends Cc {
27024  constructor() {
27025    super("numberFilter"), this.eValuesFrom = [], this.eValuesTo = [], this.filterType = "number", this.defaultDebounceMs = 500;
27026  }
27027  refresh(e) {
27028    return this.numberFilterParams.allowedCharPattern !== e.allowedCharPattern ? !1 : super.refresh(e);
27029  }
27030  mapValuesFromModel(e) {
27031    const { filter: t, filterTo: i, type: s } = e || {};
27032    return [this.processValue(t), this.processValue(i)].slice(0, this.getNumberOfInputs(s));
27033  }
27034  comparator() {
27035    return (e, t) => e === t ? 0 : e < t ? 1 : -1;
27036  }
27037  setParams(e) {
27038    this.numberFilterParams = e, super.setParams(e), this.filterModelFormatter = new Rc(
27039      this.getLocaleTextFunc.bind(this),
27040      this.optionsFactory,
27041      this.numberFilterParams.numberFormatter
27042    );
27043  }
27044  getDefaultFilterOptions() {
27045    return yc;
27046  }
27047  setElementValue(e, t, i) {
27048    const { numberFormatter: s } = this.numberFilterParams, o = !i && s ? s(t ?? null) : t;
27049    super.setElementValue(e, o);
27050  }
27051  createValueElement() {
27052    const e = yn(this.numberFilterParams), t = document.createElement("div");
27053    return t.classList.add("ag-filter-body"), ve(t, "presentation"), this.createFromToElement(t, this.eValuesFrom, "from", e), this.createFromToElement(t, this.eValuesTo, "to", e), t;
27054  }
27055  createFromToElement(e, t, i, s) {
27056    const o = this.createManagedBean(
27057      s ? new _t({ allowedCharPattern: s }) : new or()
27058    );
27059    o.addCssClass(`ag-filter-${i}`), o.addCssClass("ag-filter-filter"), t.push(o), e.appendChild(o.getGui());
27060  }
27061  removeValueElements(e, t) {
27062    const i = (s) => this.removeComponents(s, e, t);
27063    i(this.eValuesFrom), i(this.eValuesTo);
27064  }
27065  getValues(e) {
27066    const t = [];
27067    return this.forEachPositionInput(e, (i, s, o, n) => {
27068      s < n && t.push(this.processValue(this.stringToFloat(i.getValue())));
27069    }), t;
27070  }
27071  areSimpleModelsEqual(e, t) {
27072    return e.filter === t.filter && e.filterTo === t.filterTo && e.type === t.type;
27073  }
27074  processValue(e) {
27075    return e == null || isNaN(e) ? null : e;
27076  }
27077  stringToFloat(e) {
27078    if (typeof e == "number")
27079      return e;
27080    let t = ot(e);
27081    t != null && t.trim() === "" && (t = null);
27082    const i = this.numberFilterParams.numberParser;
27083    return i ? i(t) : t == null || t.trim() === "-" ? null : parseFloat(t);
27084  }
27085  createCondition(e) {
27086    const t = this.getConditionType(e), i = {
27087      filterType: this.filterType,
27088      type: t
27089    }, s = this.getValues(e);
27090    return s.length > 0 && (i.filter = s[0]), s.length > 1 && (i.filterTo = s[1]), i;
27091  }
27092  getInputs(e) {
27093    const { eValuesFrom: t, eValuesTo: i } = this;
27094    return e >= t.length ? [null, null] : [t[e], i[e]];
27095  }
27096  getModelAsString(e) {
27097    return this.filterModelFormatter.getModelAsString(e) ?? "";
27098  }
27099  hasInvalidInputs() {
27100    let e = !1;
27101    return this.forEachInput((t) => {
27102      if (!t.getInputElement().validity.valid) {
27103        e = !0;
27104        return;
27105      }
27106    }), e;
27107  }
27108}, Fc = class extends y {
27109  constructor(e) {
27110    super(), this.params = e, this.eInput = M, this.onValueChanged = () => {
27111    };
27112  }
27113  setupGui(e) {
27114    this.eInput = this.createManagedBean(new _t(this.params?.config));
27115    const t = this.eInput.getGui();
27116    e.appendChild(t);
27117    const i = (s) => this.onValueChanged(s);
27118    this.addManagedListeners(t, {
27119      input: i,
27120      keydown: i
27121    });
27122  }
27123  setEditable(e) {
27124    this.eInput.setDisabled(!e);
27125  }
27126  getValue() {
27127    return this.eInput.getValue();
27128  }
27129  setValue(e, t) {
27130    this.eInput.setValue(e, t);
27131  }
27132  setValueChangedListener(e) {
27133    this.onValueChanged = e;
27134  }
27135  setParams({ ariaLabel: e, autoComplete: t }) {
27136    const { eInput: i } = this;
27137    i.setInputAriaLabel(e), t !== void 0 && i.setAutoComplete(t);
27138  }
27139};
27140function xc(e) {
27141  const t = e?.trim();
27142  return t === "" ? e : t;
27143}
27144var Pc = class extends bc {
27145  constructor() {
27146    super(...arguments), this.eFloatingFilterInputContainer = M, this.defaultDebounceMs = 500;
27147  }
27148  postConstruct() {
27149    this.setTemplate(
27150      /* html */
27151      `
27152            <div class="ag-floating-filter-input" role="presentation" data-ref="eFloatingFilterInputContainer"></div>
27153        `
27154    );
27155  }
27156  onParentModelChanged(e, t) {
27157    t?.afterFloatingFilter || t?.afterDataChange || (this.setLastTypeFromModel(e), this.setEditable(this.canWeEditAfterModelFromParentFilter(e)), this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e)));
27158  }
27159  init(e) {
27160    this.setupFloatingFilterInputService(e), super.init(e), this.setTextInputParams(e);
27161  }
27162  setupFloatingFilterInputService(e) {
27163    this.inputSvc = this.createFloatingFilterInputService(e), this.inputSvc.setupGui(this.eFloatingFilterInputContainer);
27164  }
27165  setTextInputParams(e) {
27166    this.params = e;
27167    const t = e.browserAutoComplete ?? !1, { inputSvc: i, defaultDebounceMs: s, readOnly: o } = this;
27168    if (i.setParams({
27169      ariaLabel: this.getAriaLabel(e),
27170      autoComplete: t
27171    }), this.applyActive = $s(e.filterParams), !o) {
27172      const n = jn(e.filterParams, s), r = Ce(
27173        this,
27174        this.syncUpWithParentFilter.bind(this),
27175        n
27176      );
27177      i.setValueChangedListener(r);
27178    }
27179  }
27180  refresh(e) {
27181    super.refresh(e), this.setTextInputParams(e);
27182  }
27183  recreateFloatingFilterInputService(e) {
27184    const { inputSvc: t } = this, i = t.getValue();
27185    ue(this.eFloatingFilterInputContainer), this.destroyBean(t), this.setupFloatingFilterInputService(e), t.setValue(i, !0);
27186  }
27187  syncUpWithParentFilter(e) {
27188    const t = e.key === b.ENTER;
27189    if (this.applyActive && !t)
27190      return;
27191    const { inputSvc: i, params: s } = this;
27192    let o = i.getValue();
27193    s.filterParams.trimInput && (o = xc(o), i.setValue(o, !0)), s.parentFilterInstance((n) => {
27194      n?.onFloatingFilterChanged(this.lastType || null, o || null);
27195    });
27196  }
27197  setEditable(e) {
27198    this.inputSvc.setEditable(e);
27199  }
27200}, zy = class extends y {
27201  constructor() {
27202    super(...arguments), this.onValueChanged = () => {
27203    }, this.numberInputActive = !0;
27204  }
27205  setupGui(e) {
27206    this.eNumberInput = this.createManagedBean(new or()), this.eTextInput = this.createManagedBean(new _t()), this.eTextInput.setDisabled(!0);
27207    const t = this.eNumberInput.getGui(), i = this.eTextInput.getGui();
27208    e.appendChild(t), e.appendChild(i), this.setupListeners(t, (s) => this.onValueChanged(s)), this.setupListeners(i, (s) => this.onValueChanged(s));
27209  }
27210  setEditable(e) {
27211    this.numberInputActive = e, this.eNumberInput.setDisplayed(this.numberInputActive), this.eTextInput.setDisplayed(!this.numberInputActive);
27212  }
27213  setAutoComplete(e) {
27214    this.eNumberInput.setAutoComplete(e), this.eTextInput.setAutoComplete(e);
27215  }
27216  getValue() {
27217    return this.getActiveInputElement().getValue();
27218  }
27219  setValue(e, t) {
27220    this.getActiveInputElement().setValue(e, t);
27221  }
27222  getActiveInputElement() {
27223    return this.numberInputActive ? this.eNumberInput : this.eTextInput;
27224  }
27225  setValueChangedListener(e) {
27226    this.onValueChanged = e;
27227  }
27228  setupListeners(e, t) {
27229    this.addManagedListeners(e, {
27230      input: t,
27231      keydown: t
27232    });
27233  }
27234  setParams(e) {
27235    this.setAriaLabel(e.ariaLabel), e.autoComplete !== void 0 && this.setAutoComplete(e.autoComplete);
27236  }
27237  setAriaLabel(e) {
27238    this.eNumberInput.setInputAriaLabel(e), this.eTextInput.setInputAriaLabel(e);
27239  }
27240}, _y = class extends Pc {
27241  init(e) {
27242    super.init(e), this.filterModelFormatter = new Rc(
27243      this.getLocaleTextFunc.bind(this),
27244      this.optionsFactory,
27245      e.filterParams?.numberFormatter
27246    );
27247  }
27248  refresh(e) {
27249    yn(e.filterParams) !== this.allowedCharPattern && this.recreateFloatingFilterInputService(e), super.refresh(e), this.filterModelFormatter.updateParams({ optionsFactory: this.optionsFactory });
27250  }
27251  getDefaultOptions() {
27252    return yc;
27253  }
27254  createFloatingFilterInputService(e) {
27255    return this.allowedCharPattern = yn(e.filterParams), this.allowedCharPattern ? this.createManagedBean(
27256      new Fc({
27257        config: { allowedCharPattern: this.allowedCharPattern }
27258      })
27259    ) : this.createManagedBean(new zy());
27260  }
27261}, Ec = [
27262  "contains",
27263  "notContains",
27264  "equals",
27265  "notEqual",
27266  "startsWith",
27267  "endsWith",
27268  "blank",
27269  "notBlank"
27270], Dc = class extends hr {
27271  conditionToString(e, t) {
27272    const { numberOfInputs: i } = t || {}, { filter: s, filterTo: o, type: n } = e;
27273    return n == "inRange" || i === 2 ? `${s}-${o}` : s != null ? `${s}` : `${n}`;
27274  }
27275}, Uy = class extends mc {
27276  constructor() {
27277    super("textFilter"), this.filterType = "text", this.defaultFormatter = (e) => e, this.defaultLowercaseFormatter = (e) => e == null ? null : e.toString().toLowerCase(), this.defaultMatcher = ({ filterOption: e, value: t, filterText: i }) => {
27278      if (i == null)
27279        return !1;
27280      switch (e) {
27281        case "contains":
27282          return t.indexOf(i) >= 0;
27283        case "notContains":
27284          return t.indexOf(i) < 0;
27285        case "equals":
27286          return t === i;
27287        case "notEqual":
27288          return t != i;
27289        case "startsWith":
27290          return t.indexOf(i) === 0;
27291        case "endsWith": {
27292          const s = t.lastIndexOf(i);
27293          return s >= 0 && s === t.length - i.length;
27294        }
27295        default:
27296          return !1;
27297      }
27298    }, this.eValuesFrom = [], this.eValuesTo = [], this.defaultDebounceMs = 500;
27299  }
27300  setParams(e) {
27301    this.textFilterParams = e, super.setParams(e), this.matcher = e.textMatcher || this.defaultMatcher, this.formatter = e.textFormatter || (e.caseSensitive ? this.defaultFormatter : this.defaultLowercaseFormatter), this.filterModelFormatter = new Dc(
27302      this.getLocaleTextFunc.bind(this),
27303      this.optionsFactory
27304    );
27305  }
27306  createCondition(e) {
27307    const t = this.getConditionType(e), i = {
27308      filterType: this.filterType,
27309      type: t
27310    }, s = this.getValuesWithSideEffects(e, !0);
27311    return s.length > 0 && (i.filter = s[0]), s.length > 1 && (i.filterTo = s[1]), i;
27312  }
27313  areSimpleModelsEqual(e, t) {
27314    return e.filter === t.filter && e.filterTo === t.filterTo && e.type === t.type;
27315  }
27316  getInputs(e) {
27317    const { eValuesFrom: t, eValuesTo: i } = this;
27318    return e >= t.length ? [null, null] : [t[e], i[e]];
27319  }
27320  getValues(e) {
27321    return this.getValuesWithSideEffects(e, !1);
27322  }
27323  getValuesWithSideEffects(e, t) {
27324    const i = [];
27325    return this.forEachPositionInput(e, (s, o, n, r) => {
27326      if (o < r) {
27327        let a = ot(s.getValue());
27328        t && this.textFilterParams.trimInput && (a = xc(a) ?? null, s.setValue(a, !0)), i.push(a);
27329      }
27330    }), i;
27331  }
27332  getDefaultFilterOptions() {
27333    return Ec;
27334  }
27335  createValueElement() {
27336    const e = document.createElement("div");
27337    return e.classList.add("ag-filter-body"), ve(e, "presentation"), this.createFromToElement(e, this.eValuesFrom, "from"), this.createFromToElement(e, this.eValuesTo, "to"), e;
27338  }
27339  createFromToElement(e, t, i) {
27340    const s = this.createManagedBean(new _t());
27341    s.addCssClass(`ag-filter-${i}`), s.addCssClass("ag-filter-filter"), t.push(s), e.appendChild(s.getGui());
27342  }
27343  removeValueElements(e, t) {
27344    const i = (s) => this.removeComponents(s, e, t);
27345    i(this.eValuesFrom), i(this.eValuesTo);
27346  }
27347  mapValuesFromModel(e) {
27348    const { filter: t, filterTo: i, type: s } = e || {};
27349    return [t || null, i || null].slice(0, this.getNumberOfInputs(s));
27350  }
27351  evaluateNullValue(e) {
27352    return e ? ["notEqual", "notContains", "blank"].indexOf(e) >= 0 : !1;
27353  }
27354  evaluateNonNullValue(e, t, i, s) {
27355    const o = e.map((h) => this.formatter(h)) || [], n = this.formatter(t), { api: r, colDef: a, column: l, context: d, textFormatter: c } = this.textFilterParams;
27356    if (i.type === "blank")
27357      return qs(t);
27358    if (i.type === "notBlank")
27359      return !qs(t);
27360    const u = {
27361      api: r,
27362      colDef: a,
27363      column: l,
27364      context: d,
27365      node: s.node,
27366      data: s.data,
27367      filterOption: i.type,
27368      value: n,
27369      textFormatter: c
27370    };
27371    return o.some((h) => this.matcher({ ...u, filterText: h }));
27372  }
27373  getModelAsString(e) {
27374    return this.filterModelFormatter.getModelAsString(e) ?? "";
27375  }
27376}, $y = class extends Pc {
27377  init(e) {
27378    super.init(e), this.filterModelFormatter = new Dc(
27379      this.getLocaleTextFunc.bind(this),
27380      this.optionsFactory
27381    );
27382  }
27383  refresh(e) {
27384    super.refresh(e), this.filterModelFormatter.updateParams({ optionsFactory: this.optionsFactory });
27385  }
27386  getDefaultOptions() {
27387    return Ec;
27388  }
27389  createFloatingFilterInputService() {
27390    return this.createManagedBean(new Fc());
27391  }
27392};
27393function Ky(e) {
27394  return !!e.filterManager?.isQuickFilterPresent();
27395}
27396function jy(e) {
27397  return e.gos.get("quickFilterText");
27398}
27399function qy(e) {
27400  e.filterManager?.resetQuickFilterCache();
27401}
27402var Yy = class extends y {
27403  constructor() {
27404    super(...arguments), this.beanName = "quickFilter", this.quickFilter = null, this.quickFilterParts = null;
27405  }
27406  postConstruct() {
27407    const e = this.resetCache.bind(this), t = this.gos;
27408    this.addManagedEventListeners({
27409      columnPivotModeChanged: e,
27410      newColumnsLoaded: e,
27411      columnRowGroupChanged: e,
27412      columnVisible: () => {
27413        t.get("includeHiddenColumnsInQuickFilter") || this.resetCache();
27414      }
27415    }), this.addManagedPropertyListener("quickFilterText", (i) => this.setFilter(i.currentValue)), this.addManagedPropertyListeners(
27416      ["includeHiddenColumnsInQuickFilter", "applyQuickFilterBeforePivotOrAgg"],
27417      () => this.onColumnConfigChanged()
27418    ), this.quickFilter = this.parseFilter(t.get("quickFilterText")), this.parser = t.get("quickFilterParser"), this.matcher = t.get("quickFilterMatcher"), this.setFilterParts(), this.addManagedPropertyListeners(["quickFilterMatcher", "quickFilterParser"], () => this.setParserAndMatcher());
27419  }
27420  // if we are using autoGroupCols, then they should be included for quick filter. this covers the
27421  // following scenarios:
27422  // a) user provides 'field' into autoGroupCol of normal grid, so now because a valid col to filter leafs on
27423  // b) using tree data and user depends on autoGroupCol for first col, and we also want to filter on this
27424  //    (tree data is a bit different, as parent rows can be filtered on, unlike row grouping)
27425  refreshCols() {
27426    const { autoColSvc: e, colModel: t, gos: i, pivotResultCols: s } = this.beans, o = t.isPivotMode(), n = e?.getAutoCols(), r = t.getColDefCols();
27427    let a = (o && !i.get("applyQuickFilterBeforePivotOrAgg") ? s?.getPivotResultCols()?.list : r) ?? [];
27428    n && (a = a.concat(n)), this.colsToUse = i.get("includeHiddenColumnsInQuickFilter") ? a : a.filter((l) => l.isVisible() || l.isRowGroupActive());
27429  }
27430  isFilterPresent() {
27431    return this.quickFilter !== null;
27432  }
27433  doesRowPass(e) {
27434    const t = this.gos.get("cacheQuickFilter");
27435    return this.matcher ? this.doesRowPassMatcher(t, e) : this.quickFilterParts.every(
27436      (i) => t ? this.doesRowPassCache(e, i) : this.doesRowPassNoCache(e, i)
27437    );
27438  }
27439  resetCache() {
27440    this.beans.rowModel.forEachNode((e) => e.quickFilterAggregateText = null);
27441  }
27442  setFilterParts() {
27443    const { quickFilter: e, parser: t } = this;
27444    e ? this.quickFilterParts = t ? t(e) : e.split(" ") : this.quickFilterParts = null;
27445  }
27446  parseFilter(e) {
27447    return A(e) ? e.toUpperCase() : null;
27448  }
27449  setFilter(e) {
27450    if (e != null && typeof e != "string") {
27451      x(70, { newFilter: e });
27452      return;
27453    }
27454    const t = this.parseFilter(e);
27455    this.quickFilter !== t && (this.quickFilter = t, this.setFilterParts(), this.dispatchLocalEvent({ type: "quickFilterChanged" }));
27456  }
27457  setParserAndMatcher() {
27458    const e = this.gos.get("quickFilterParser"), t = this.gos.get("quickFilterMatcher"), i = e !== this.parser || t !== this.matcher;
27459    this.parser = e, this.matcher = t, i && (this.setFilterParts(), this.dispatchLocalEvent({ type: "quickFilterChanged" }));
27460  }
27461  onColumnConfigChanged() {
27462    this.refreshCols(), this.resetCache(), this.isFilterPresent() && this.dispatchLocalEvent({ type: "quickFilterChanged" });
27463  }
27464  doesRowPassNoCache(e, t) {
27465    return this.colsToUse.some((i) => {
27466      const s = this.getTextForColumn(i, e);
27467      return A(s) && s.indexOf(t) >= 0;
27468    });
27469  }
27470  doesRowPassCache(e, t) {
27471    return this.checkGenerateAggText(e), e.quickFilterAggregateText.indexOf(t) >= 0;
27472  }
27473  doesRowPassMatcher(e, t) {
27474    let i;
27475    e ? (this.checkGenerateAggText(t), i = t.quickFilterAggregateText) : i = this.getAggText(t);
27476    const { quickFilterParts: s, matcher: o } = this;
27477    return o(s, i);
27478  }
27479  checkGenerateAggText(e) {
27480    e.quickFilterAggregateText || (e.quickFilterAggregateText = this.getAggText(e));
27481  }
27482  getTextForColumn(e, t) {
27483    let i = this.beans.filterValueSvc.getValue(e, t);
27484    const s = e.getColDef();
27485    if (s.getQuickFilterText) {
27486      const o = this.gos.addGridCommonParams({
27487        value: i,
27488        node: t,
27489        data: t.data,
27490        column: e,
27491        colDef: s
27492      });
27493      i = s.getQuickFilterText(o);
27494    }
27495    return A(i) ? i.toString().toUpperCase() : null;
27496  }
27497  getAggText(e) {
27498    const t = [];
27499    return this.colsToUse.forEach((i) => {
27500      const s = this.getTextForColumn(i, e);
27501      A(s) && t.push(s);
27502    }), t.join(`
27503`);
27504  }
27505}, Qy = {
27506  moduleName: "ClientSideRowModelFilter",
27507  version: I,
27508  rowModels: ["clientSide"],
27509  beans: [dy]
27510}, gr = {
27511  moduleName: "FilterCore",
27512  version: I,
27513  beans: [Ty],
27514  apiFunctions: {
27515    isAnyFilterPresent: Dy,
27516    onFilterChanged: Ay
27517  },
27518  css: [Cy],
27519  dependsOn: [Qy]
27520}, Ac = {
27521  moduleName: "FilterValue",
27522  version: I,
27523  beans: [Iy]
27524}, oo = {
27525  moduleName: "ColumnFilter",
27526  version: I,
27527  beans: [Ey, My],
27528  dynamicBeans: { headerFilterCellCtrl: cy },
27529  icons: {
27530    // open filter button - header, floating filter, menu
27531    filter: "filter",
27532    // filter is applied - header (legacy column menu), filter tool panel
27533    filterActive: "filter"
27534  },
27535  apiFunctions: {
27536    isColumnFilterPresent: vy,
27537    getColumnFilterInstance: wy,
27538    destroyFilter: Sy,
27539    setFilterModel: by,
27540    getFilterModel: yy,
27541    getColumnFilterModel: Ry,
27542    setColumnFilterModel: Fy,
27543    showColumnFilter: xy
27544  },
27545  dependsOn: [gr, so, Ac, gy]
27546}, Zy = {
27547  moduleName: "CustomFilter",
27548  version: I,
27549  userComponents: { agReadOnlyFloatingFilter: ky },
27550  dependsOn: [oo]
27551}, Xy = {
27552  moduleName: "TextFilter",
27553  version: I,
27554  dependsOn: [oo],
27555  userComponents: {
27556    agTextColumnFilter: Uy,
27557    agTextColumnFloatingFilter: $y
27558  }
27559}, Jy = {
27560  moduleName: "NumberFilter",
27561  version: I,
27562  dependsOn: [oo],
27563  userComponents: {
27564    agNumberColumnFilter: Wy,
27565    agNumberColumnFloatingFilter: _y
27566  }
27567}, e0 = {
27568  moduleName: "DateFilter",
27569  version: I,
27570  dependsOn: [oo],
27571  userComponents: {
27572    agDateColumnFilter: Hy,
27573    agDateInput: Vy,
27574    agDateColumnFloatingFilter: Ny
27575  }
27576}, t0 = {
27577  moduleName: "QuickFilter",
27578  version: I,
27579  rowModels: ["clientSide"],
27580  beans: [Yy],
27581  apiFunctions: {
27582    isQuickFilterPresent: Ky,
27583    getQuickFilter: jy,
27584    resetQuickFilter: qy
27585  },
27586  dependsOn: [gr, Ac]
27587}, i0 = {
27588  moduleName: "ExternalFilter",
27589  version: I,
27590  dependsOn: [gr]
27591}, Li = class {
27592  constructor(e) {
27593    this.cellValueChanges = e;
27594  }
27595}, Wo = class extends Li {
27596  constructor(e, t, i, s) {
27597    super(e), this.initialRange = t, this.finalRange = i, this.ranges = s;
27598  }
27599}, s0 = 10, Ta = class {
27600  constructor(e) {
27601    this.actionStack = [], this.maxStackSize = e || s0, this.actionStack = new Array(this.maxStackSize);
27602  }
27603  pop() {
27604    return this.actionStack.pop();
27605  }
27606  push(e) {
27607    e.cellValueChanges && e.cellValueChanges.length > 0 && (this.actionStack.length === this.maxStackSize && this.actionStack.shift(), this.actionStack.push(e));
27608  }
27609  clear() {
27610    this.actionStack = [];
27611  }
27612  getCurrentStackSize() {
27613    return this.actionStack.length;
27614  }
27615}, o0 = class extends y {
27616  constructor() {
27617    super(...arguments), this.beanName = "undoRedo", this.cellValueChanges = [], this.activeCellEdit = null, this.activeRowEdit = null, this.isPasting = !1, this.isRangeInAction = !1, this.onCellValueChanged = (e) => {
27618      const t = { column: e.column, rowIndex: e.rowIndex, rowPinned: e.rowPinned }, i = this.activeCellEdit !== null && ln(this.activeCellEdit, t), s = this.activeRowEdit !== null && bf(this.activeRowEdit, t);
27619      if (!(i || s || this.isPasting || this.isRangeInAction))
27620        return;
27621      const { rowPinned: n, rowIndex: r, column: a, oldValue: l, value: d } = e, c = {
27622        rowPinned: n,
27623        rowIndex: r,
27624        columnId: a.getColId(),
27625        newValue: d,
27626        oldValue: l
27627      };
27628      this.cellValueChanges.push(c);
27629    }, this.clearStacks = () => {
27630      this.undoStack.clear(), this.redoStack.clear();
27631    };
27632  }
27633  postConstruct() {
27634    const { gos: e, ctrlsSvc: t } = this.beans;
27635    if (!e.get("undoRedoCellEditing"))
27636      return;
27637    const i = e.get("undoRedoCellEditingLimit");
27638    if (i <= 0)
27639      return;
27640    this.undoStack = new Ta(i), this.redoStack = new Ta(i), this.addListeners();
27641    const s = this.clearStacks.bind(this);
27642    this.addManagedEventListeners({
27643      cellValueChanged: this.onCellValueChanged.bind(this),
27644      // undo / redo is restricted to actual editing so we clear the stacks when other operations are
27645      // performed that change the order of the row / cols.
27646      modelUpdated: (o) => {
27647        o.keepUndoRedoStack || this.clearStacks();
27648      },
27649      columnPivotModeChanged: s,
27650      newColumnsLoaded: s,
27651      columnGroupOpened: s,
27652      columnRowGroupChanged: s,
27653      columnMoved: s,
27654      columnPinned: s,
27655      columnVisible: s,
27656      rowDragEnd: s
27657    }), t.whenReady(this, (o) => {
27658      this.gridBodyCtrl = o.gridBodyCtrl;
27659    });
27660  }
27661  getCurrentUndoStackSize() {
27662    return this.undoStack?.getCurrentStackSize() ?? 0;
27663  }
27664  getCurrentRedoStackSize() {
27665    return this.redoStack?.getCurrentStackSize() ?? 0;
27666  }
27667  undo(e) {
27668    const { eventSvc: t, undoStack: i, redoStack: s } = this;
27669    t.dispatchEvent({
27670      type: "undoStarted",
27671      source: e
27672    });
27673    const o = this.undoRedo(i, s, "initialRange", "oldValue", "undo");
27674    t.dispatchEvent({
27675      type: "undoEnded",
27676      source: e,
27677      operationPerformed: o
27678    });
27679  }
27680  redo(e) {
27681    const { eventSvc: t, undoStack: i, redoStack: s } = this;
27682    t.dispatchEvent({
27683      type: "redoStarted",
27684      source: e
27685    });
27686    const o = this.undoRedo(s, i, "finalRange", "newValue", "redo");
27687    t.dispatchEvent({
27688      type: "redoEnded",
27689      source: e,
27690      operationPerformed: o
27691    });
27692  }
27693  undoRedo(e, t, i, s, o) {
27694    if (!e)
27695      return !1;
27696    const n = e.pop();
27697    return !n || !n.cellValueChanges ? !1 : (this.processAction(
27698      n,
27699      (r) => r[s],
27700      o
27701    ), n instanceof Wo ? this.processRange(n.ranges || [n[i]]) : this.processCell(n.cellValueChanges), t.push(n), !0);
27702  }
27703  processAction(e, t, i) {
27704    e.cellValueChanges.forEach((s) => {
27705      const { rowIndex: o, rowPinned: n, columnId: r } = s, a = { rowIndex: o, rowPinned: n }, l = dn(this.beans, a);
27706      l.displayed && l.setDataValue(r, t(s), i);
27707    });
27708  }
27709  processRange(e) {
27710    let t;
27711    const i = this.beans.rangeSvc;
27712    i.removeAllCellRanges(!0), e.forEach((s, o) => {
27713      if (!s)
27714        return;
27715      const n = s.startRow, r = s.endRow;
27716      o === e.length - 1 && (t = {
27717        rowPinned: n.rowPinned,
27718        rowIndex: n.rowIndex,
27719        columnId: s.startColumn.getColId()
27720      }, this.setLastFocusedCell(t));
27721      const a = {
27722        rowStartIndex: n.rowIndex,
27723        rowStartPinned: n.rowPinned,
27724        rowEndIndex: r.rowIndex,
27725        rowEndPinned: r.rowPinned,
27726        columnStart: s.startColumn,
27727        columns: s.columns
27728      };
27729      i.addCellRange(a);
27730    });
27731  }
27732  processCell(e) {
27733    const t = e[0], { rowIndex: i, rowPinned: s } = t, o = { rowIndex: i, rowPinned: s }, n = dn(this.beans, o), r = {
27734      rowPinned: t.rowPinned,
27735      rowIndex: n.rowIndex,
27736      columnId: t.columnId
27737    };
27738    this.setLastFocusedCell(r);
27739  }
27740  setLastFocusedCell(e) {
27741    const { rowIndex: t, columnId: i, rowPinned: s } = e, { colModel: o, focusSvc: n, rangeSvc: r } = this.beans, a = o.getCol(i);
27742    if (!a)
27743      return;
27744    const { scrollFeature: l } = this.gridBodyCtrl;
27745    l.ensureIndexVisible(t), l.ensureColumnVisible(a);
27746    const d = { rowIndex: t, column: a, rowPinned: s };
27747    n.setFocusedCell({ ...d, forceBrowserFocus: !0 }), r?.setRangeToCell(d);
27748  }
27749  addListeners() {
27750    this.addManagedEventListeners({
27751      rowEditingStarted: (e) => {
27752        this.activeRowEdit = { rowIndex: e.rowIndex, rowPinned: e.rowPinned };
27753      },
27754      rowEditingStopped: () => {
27755        const e = new Li(this.cellValueChanges);
27756        this.pushActionsToUndoStack(e), this.activeRowEdit = null;
27757      },
27758      cellEditingStarted: (e) => {
27759        this.activeCellEdit = { column: e.column, rowIndex: e.rowIndex, rowPinned: e.rowPinned };
27760      },
27761      cellEditingStopped: (e) => {
27762        if (this.activeCellEdit = null, e.valueChanged && !this.activeRowEdit && !this.isPasting && !this.isRangeInAction) {
27763          const i = new Li(this.cellValueChanges);
27764          this.pushActionsToUndoStack(i);
27765        }
27766      },
27767      pasteStart: () => {
27768        this.isPasting = !0;
27769      },
27770      pasteEnd: () => {
27771        const e = new Li(this.cellValueChanges);
27772        this.pushActionsToUndoStack(e), this.isPasting = !1;
27773      },
27774      fillStart: () => {
27775        this.isRangeInAction = !0;
27776      },
27777      fillEnd: (e) => {
27778        const t = new Wo(this.cellValueChanges, e.initialRange, e.finalRange);
27779        this.pushActionsToUndoStack(t), this.isRangeInAction = !1;
27780      },
27781      keyShortcutChangedCellStart: () => {
27782        this.isRangeInAction = !0;
27783      },
27784      keyShortcutChangedCellEnd: () => {
27785        let e;
27786        const { rangeSvc: t, gos: i } = this.beans;
27787        t && lt(i) ? e = new Wo(this.cellValueChanges, void 0, void 0, [
27788          ...t.getCellRanges()
27789        ]) : e = new Li(this.cellValueChanges), this.pushActionsToUndoStack(e), this.isRangeInAction = !1;
27790      }
27791    });
27792  }
27793  pushActionsToUndoStack(e) {
27794    this.undoStack.push(e), this.cellValueChanges = [], this.redoStack.clear();
27795  }
27796}, n0 = (
27797  /*css*/
27798  ".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;width:100%}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}"
27799), r0 = class extends Pi {
27800  constructor() {
27801    super(
27802      /* html */
27803      `
27804            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
27805                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
27806            </div>`,
27807      [sr]
27808    ), this.eCheckbox = M;
27809  }
27810  init(e) {
27811    this.params = e;
27812    const t = e.value ?? void 0, i = this.eCheckbox;
27813    i.setValue(t), i.getInputElement().setAttribute("tabindex", "-1"), this.setAriaLabel(t), this.addManagedListeners(i, {
27814      fieldValueChanged: (o) => this.setAriaLabel(o.selected)
27815    });
27816  }
27817  getValue() {
27818    return this.eCheckbox.getValue();
27819  }
27820  focusIn() {
27821    this.eCheckbox.getFocusableElement().focus();
27822  }
27823  afterGuiAttached() {
27824    this.params.cellStartedEdit && this.focusIn();
27825  }
27826  isPopup() {
27827    return !1;
27828  }
27829  setAriaLabel(e) {
27830    const t = this.getLocaleTextFunc(), i = Ln(t, e), s = t("ariaToggleCellValue", "Press SPACE to toggle cell value");
27831    this.eCheckbox.setInputAriaLabel(`${s} (${i})`);
27832  }
27833}, no = class extends Pi {
27834  constructor(e) {
27835    super(
27836      /* html */
27837      `
27838            <div class="ag-cell-edit-wrapper">
27839                ${e.getTemplate()}
27840            </div>`,
27841      e.getAgComponents()
27842    ), this.cellEditorInput = e, this.eInput = M;
27843  }
27844  init(e) {
27845    this.params = e;
27846    const { cellStartedEdit: t, eventKey: i, suppressPreventDefault: s } = e, o = this.eInput;
27847    this.cellEditorInput.init(o, e);
27848    let n, r = !0;
27849    t ? (this.focusAfterAttached = !0, i === b.BACKSPACE || i === b.DELET
27849E ? n = "" : i && i.length === 1 ? s ? r = !1 : n = i : (n = this.cellEditorInput.getStartValue(), i !== b.F2 && (this.highlightAllOnFocus = !0))) : (this.focusAfterAttached = !1, n = this.cellEditorInput.getStartValue()), r && n != null && o.setStartValue(n), this.addManagedElementListeners(o.getGui(), {
27850      keydown: (a) => {
27851        const { key: l } = a;
27852        (l === b.PAGE_UP || l === b.PAGE_DOWN) && a.preventDefault();
27853      }
27854    });
27855  }
27856  afterGuiAttached() {
27857    const e = this.getLocaleTextFunc(), t = this.eInput;
27858    if (t.setInputAriaLabel(e("ariaInputEditor", "Input Editor")), !this.focusAfterAttached)
27859      return;
27860    Nt() || t.getFocusableElement().focus();
27861    const i = t.getInputElement();
27862    this.highlightAllOnFocus ? i.select() : this.cellEditorInput.setCaret?.();
27863  }
27864  // gets called when tabbing through cells and in full row edit mode
27865  focusIn() {
27866    const e = this.eInput, t = e.getFocusableElement(), i = e.getInputElement();
27867    t.focus(), i.select();
27868  }
27869  getValue() {
27870    return this.cellEditorInput.getValue();
27871  }
27872  isPopup() {
27873    return !1;
27874  }
27875}, a0 = class {
27876  getTemplate() {
27877    return (
27878      /* html */
27879      '<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'
27880    );
27881  }
27882  getAgComponents() {
27883    return [Od];
27884  }
27885  init(e, t) {
27886    this.eInput = e, this.params = t;
27887    const { min: i, max: s, step: o } = t;
27888    i != null && e.setMin(i), s != null && e.setMax(s), o != null && e.setStep(o);
27889  }
27890  getValue() {
27891    const { eInput: e, params: t } = this, i = e.getDate();
27892    return !A(i) && !A(t.value) ? t.value : i ?? null;
27893  }
27894  getStartValue() {
27895    const { value: e } = this.params;
27896    if (e instanceof Date)
27897      return ke(e, !1);
27898  }
27899}, l0 = class extends no {
27900  constructor() {
27901    super(new a0());
27902  }
27903}, d0 = class {
27904  constructor(e) {
27905    this.getDataTypeService = e;
27906  }
27907  getTemplate() {
27908    return (
27909      /* html */
27910      '<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'
27911    );
27912  }
27913  getAgComponents() {
27914    return [Od];
27915  }
27916  init(e, t) {
27917    this.eInput = e, this.params = t;
27918    const { min: i, max: s, step: o } = t;
27919    i != null && e.setMin(i), s != null && e.setMax(s), o != null && e.setStep(o);
27920  }
27921  getValue() {
27922    const { params: e, eInput: t } = this, i = this.formatDate(t.getDate());
27923    return !A(i) && !A(e.value) ? e.value : e.parseValue(i ?? "");
27924  }
27925  getStartValue() {
27926    return ke(this.parseDate(this.params.value ?? void 0) ?? null, !1);
27927  }
27928  parseDate(e) {
27929    const t = this.getDataTypeService();
27930    return t ? t.getDateParserFunction(this.params.column)(e) : Re(e) ?? void 0;
27931  }
27932  formatDate(e) {
27933    const t = this.getDataTypeService();
27934    return t ? t.getDateFormatterFunction(this.params.column)(e) : ke(e ?? null, !1) ?? void 0;
27935  }
27936}, c0 = class extends no {
27937  constructor() {
27938    super(new d0(() => this.beans.dataTypeSvc));
27939  }
27940}, u0 = class extends Pi {
27941  constructor() {
27942    super(
27943      /* html */
27944      `<div class="ag-large-text">
27945        <ag-input-text-area data-ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
27946        </div>`,
27947      [Wm]
27948    ), this.eTextArea = M;
27949  }
27950  init(e) {
27951    this.params = e, this.focusAfterAttached = e.cellStartedEdit, this.eTextArea.setMaxLength(e.maxLength || 200).setCols(e.cols || 60).setRows(e.rows || 10), e.value != null && this.eTextArea.setValue(e.value.toString(), !0), this.addGuiEventListener("keydown", this.onKeyDown.bind(this)), this.activateTabIndex();
27952  }
27953  onKeyDown(e) {
27954    const t = e.key;
27955    (t === b.LEFT || t === b.UP || t === b.RIGHT || t === b.DOWN || e.shiftKey && t === b.ENTER) && e.stopPropagation();
27956  }
27957  afterGuiAttached() {
27958    const e = this.getLocaleTextFunc();
27959    this.eTextArea.setInputAriaLabel(e("ariaInputEditor", "Input Editor")), this.focusAfterAttached && this.eTextArea.getFocusableElement().focus();
27960  }
27961  getValue() {
27962    const e = this.eTextArea.getValue(), t = this.params;
27963    return !A(e) && !A(t.value) ? t.value : t.parseValue(e);
27964  }
27965}, h0 = class {
27966  getTemplate() {
27967    return (
27968      /* html */
27969      '<ag-input-number-field class="ag-cell-editor" data-ref="eInput"></ag-input-number-field>'
27970    );
27971  }
27972  getAgComponents() {
27973    return [zm];
27974  }
27975  init(e, t) {
27976    this.eInput = e, this.params = t;
27977    const { max: i, min: s, precision: o, step: n } = t;
27978    i != null && e.setMax(i), s != null && e.setMin(s), o != null && e.setPrecision(o), n != null && e.setStep(n);
27979    const r = e.getInputElement();
27980    t.preventStepping ? e.addManagedElementListeners(r, { keydown: this.preventStepping }) : t.showStepperButtons && r.classList.add("ag-number-field-input-stepper");
27981  }
27982  preventStepping(e) {
27983    (e.key === b.UP || e.key === b.DOWN) && e.preventDefault();
27984  }
27985  getValue() {
27986    const { eInput: e, params: t } = this, i = e.getValue();
27987    if (!A(i) && !A(t.value))
27988      return t.value;
27989    let s = t.parseValue(i);
27990    if (s == null)
27991      return s;
27992    if (typeof s == "string") {
27993      if (s === "")
27994        return null;
27995      s = Number(s);
27996    }
27997    return isNaN(s) ? null : s;
27998  }
27999  getStartValue() {
28000    return this.params.value;
28001  }
28002  setCaret() {
28003    Nt() && this.eInput.getInputElement().focus({ preventScroll: !0 });
28004  }
28005}, g0 = class extends no {
28006  constructor() {
28007    super(new h0());
28008  }
28009}, p0 = class extends Pi {
28010  constructor() {
28011    super(
28012      /* html */
28013      `<div class="ag-cell-edit-wrapper">
28014                <ag-select class="ag-cell-editor" data-ref="eSelect"></ag-select>
28015            </div>`,
28016      [Xm]
28017    ), this.eSelect = M, this.startedByEnter = !1;
28018  }
28019  wireBeans(e) {
28020    this.valueSvc = e.valueSvc;
28021  }
28022  init(e) {
28023    this.focusAfterAttached = e.cellStartedEdit;
28024    const { eSelect: t, valueSvc: i, gos: s } = this, { values: o, value: n, eventKey: r } = e;
28025    if (Y(o)) {
28026      x(58);
28027      return;
28028    }
28029    this.startedByEnter = r != null ? r === b.ENTER : !1;
28030    let a = !1;
28031    o.forEach((u) => {
28032      const h = { value: u }, g = i.formatValue(e.column, null, u), p = g != null;
28033      h.text = p ? g : u, t.addOption(h), a = a || n === u;
28034    }), a ? t.setValue(e.value, !0) : e.values.length && t.setValue(e.values[0], !0);
28035    const { valueListGap: l, valueListMaxWidth: d, valueListMaxHeight: c } = e;
28036    l != null && t.setPickerGap(l), c != null && t.setPickerMaxHeight(c), d != null && t.setPickerMaxWidth(d), s.get("editType") !== "fullRow" && this.addManagedListeners(this.eSelect, { selectedItem: () => e.stopEditing() });
28037  }
28038  afterGuiAttached() {
28039    this.focusAfterAttached && this.eSelect.getFocusableElement().focus(), this.startedByEnter && setTimeout(() => {
28040      this.isAlive() && this.eSelect.showPicker();
28041    });
28042  }
28043  focusIn() {
28044    this.eSelect.getFocusableElement().focus();
28045  }
28046  getValue() {
28047    return this.eSelect.getValue();
28048  }
28049  isPopup() {
28050    return !1;
28051  }
28052}, f0 = class {
28053  getTemplate() {
28054    return (
28055      /* html */
28056      '<ag-input-text-field class="ag-cell-editor" data-ref="eInput"></ag-input-text-field>'
28057    );
28058  }
28059  getAgComponents() {
28060    return [eo];
28061  }
28062  init(e, t) {
28063    this.eInput = e, this.params = t;
28064    const i = t.maxLength;
28065    i != null && e.setMaxLength(i);
28066  }
28067  getValue() {
28068    const { eInput: e, params: t } = this, i = e.getValue();
28069    return !A(i) && !A(t.value) ? t.value : t.parseValue(i);
28070  }
28071  getStartValue() {
28072    const e = this.params;
28073    return e.useFormatter || e.column.getColDef().refData ? e.formatValue(e.value) : e.value;
28074  }
28075  setCaret() {
28076    const e = this.eInput, t = e.getValue(), i = A(t) && t.length || 0;
28077    i && e.getInputElement().setSelectionRange(i, i);
28078  }
28079}, Ma = class extends no {
28080  constructor() {
28081    super(new f0());
28082  }
28083};
28084function m0(e) {
28085  return e.ctrlsSvc.getScrollFeature().getVScrollPosition();
28086}
28087function C0(e) {
28088  return e.ctrlsSvc.getScrollFeature().getHScrollPosition();
28089}
28090function Tc(e, t, i = "auto") {
28091  e.frameworkOverrides.wrapIncoming(
28092    () => e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t, i),
28093    "ensureVisible"
28094  );
28095}
28096function Mc(e, t, i) {
28097  e.frameworkOverrides.wrapIncoming(
28098    () => e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t, i),
28099    "ensureVisible"
28100  );
28101}
28102function v0(e, t, i = null) {
28103  e.frameworkOverrides.wrapIncoming(
28104    () => e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t, i),
28105    "ensureVisible"
28106  );
28107}
28108function w0(e) {
28109  e.undoRedo?.undo("api");
28110}
28111function S0(e) {
28112  e.undoRedo?.redo("api");
28113}
28114function b0(e, t = {}) {
28115  const i = [];
28116  return e.rowRenderer.getCellCtrls(t.rowNodes, t.columns).forEach((s) => {
28117    const o = s.comp?.getCellEditor();
28118    o && i.push(ts(o));
28119  }), i;
28120}
28121function y0(e) {
28122  const t = [];
28123  return e.rowRenderer.getAllCellCtrls().forEach((i) => {
28124    if (i.editing) {
28125      const { cellPosition: s } = i;
28126      t.push(s);
28127    }
28128  }), t;
28129}
28130function R0(e, t = !1) {
28131  e.editSvc?.stopAllEditing(t);
28132}
28133function F0(e, t) {
28134  const i = e.colModel.getCol(t.colKey);
28135  if (!i) {
28136    x(12, { colKey: t.colKey });
28137    return;
28138  }
28139  const s = {
28140    rowIndex: t.rowIndex,
28141    rowPinned: t.rowPinned || null,
28142    column: i
28143  };
28144  t.rowPinned == null && Mc(e, t.rowIndex), Tc(e, t.colKey);
28145  const n = Xt(e, s);
28146  if (!n)
28147    return;
28148  const { focusSvc: r, gos: a, editSvc: l } = e, d = () => {
28149    const u = Z(e), h = n.eGui;
28150    return u !== h && !!h?.contains(u);
28151  }, c = a.get("stopEditingWhenCellsLoseFocus") && d();
28152  (c || !r.isCellFocused(s)) && r.setFocusedCell({
28153    ...s,
28154    forceBrowserFocus: c,
28155    preventScrollOnBrowserFocus: !0
28156  }), l?.startRowOrCellEdit(n, t.key);
28157}
28158function x0(e) {
28159  return e.undoRedo?.getCurrentUndoStackSize() ?? 0;
28160}
28161function P0(e) {
28162  return e.undoRedo?.getCurrentRedoStackSize() ?? 0;
28163}
28164var E0 = class extends Pi {
28165  constructor(e) {
28166    super(
28167      /* html */
28168      '<div class="ag-popup-editor" tabindex="-1"/>'
28169    ), this.params = e;
28170  }
28171  postConstruct() {
28172    Gt(this.gos, this.getGui(), "popupEditorWrapper", !0), this.addKeyDownListener();
28173  }
28174  addKeyDownListener() {
28175    const e = this.getGui(), t = this.params, i = (s) => {
28176      hn(this.gos, s, t.node, t.column, !0) || t.onKeyDown(s);
28177    };
28178    this.addManagedElementListeners(e, { keydown: i });
28179  }
28180}, D0 = class extends y {
28181  constructor() {
28182    super(...arguments), this.beanName = "editSvc";
28183  }
28184  startEditing(e, t = null, i = !1, s = null) {
28185    if (!e.isCellEditable() || e.editing)
28186      return !0;
28187    if (!e.comp)
28188      return e.onCompAttachedFuncs.push(() => {
28189        this.startEditing(e, t, i, s);
28190      }), !0;
28191    const o = this.createCellEditorParams(e, t, i), n = e.column.getColDef(), r = oa(this.beans.userCompFactory, n, o), a = r?.popupFromSelector != null ? r.popupFromSelector : !!n.cellEditorPopup, l = r?.popupPositionFromSelector != null ? r.popupPositionFromSelector : n.cellEditorPopupPosition;
28192    return Ia(e, !0, r), e.comp.setEditDetails(r, a, l, this.gos.get("reactiveCustomComponents")), this.eventSvc.dispatchEvent(e.createEvent(s, "cellEditingStarted")), !r?.params?.suppressPreventDefault;
28193  }
28194  /**
28195   * Ends the Cell Editing
28196   * @param cancel `True` if the edit process is being canceled.
28197   * @returns `True` if the value of the `GridCell` has been updated, otherwise `False`.
28198   */
28199  stopEditing(e, t = !1) {
28200    if (e.onEditorAttachedFuncs = [], !e.editing)
28201      return !1;
28202    const { comp: i, column: s, rowNode: o } = e, { newValue: n, newValueExists: r } = A0(t, i), a = this.beans.valueSvc.getValueForDisplay(s, o);
28203    let l = !1;
28204    return r && (l = T0(e, a, n, o, s)), Ia(e, !1, void 0), i.setEditDetails(), e.updateAndFormatValue(!1), e.refreshCell({ forceRefresh: !0, suppressFlash: !0 }), this.eventSvc.dispatchEvent({
28205      ...e.createEvent(null, "cellEditingStopped"),
28206      oldValue: a,
28207      newValue: n,
28208      valueChanged: l
28209    }), l;
28210  }
28211  handleColDefChanged(e) {
28212    const t = e.comp?.getCellEditor();
28213    if (t?.refresh) {
28214      const { eventKey: i, cellStartedEdit: s } = e.editCompDetails.params, o = this.createCellEditorParams(e, i, s), n = e.column.getColDef(), r = oa(this.beans.userCompFactory, n, o);
28215      t.refresh(r.params);
28216    }
28217  }
28218  setFocusOutOnEditor(e) {
28219    if (!e.editing)
28220      return;
28221    const t = e.comp.getCellEditor();
28222    t && t.focusOut && t.focusOut();
28223  }
28224  setFocusInOnEditor(e) {
28225    if (!e.editing)
28226      return;
28227    const t = e.comp, i = t.getCellEditor();
28228    i?.focusIn ? i.focusIn() : (e.focusCell(!0), e.onEditorAttachedFuncs.push(() => t.getCellEditor()?.focusIn?.()));
28229  }
28230  stopEditingAndFocus(e, t = !1, i = !1) {
28231    this.stopRowOrCellEdit(e), e.focusCell(!0), t || this.navigateAfterEdit(i, e.cellPosition);
28232  }
28233  createPopupEditorWrapper(e) {
28234    return new E0(e);
28235  }
28236  stopAllEditing(e = !1) {
28237    this.beans.rowRenderer.getAllRowCtrls().forEach((t) => this.stopRowEditing(t, e));
28238  }
28239  stopRowEditing(e, t = !1) {
28240    if (e.stoppingRowEdit)
28241      return;
28242    const i = e.getAllCellCtrls(), s = e.editing;
28243    e.stoppingRowEdit = !0;
28244    let o = !1;
28245    for (const n of i) {
28246      const r = n.stopEditing(t);
28247      s && !t && !o && r && (o = !0);
28248    }
28249    o && this.eventSvc.dispatchEvent(e.createRowEvent("rowValueChanged")), s && this.beans.rowEditSvc?.setEditing(e, !1), e.stoppingRowEdit = !1;
28250  }
28251  addStopEditingWhenGridLosesFocus(e) {
28252    if (!this.gos.get("stopEditingWhenCellsLoseFocus"))
28253      return;
28254    const t = (i) => {
28255      const s = i.relatedTarget;
28256      if (Zo(s) === null) {
28257        this.stopAllEditing();
28258        return;
28259      }
28260      let o = (
28261        // see if click came from inside the viewports
28262        e.some((n) => n.contains(s)) && // and also that it's not from a detail grid
28263        md(this.gos, s)
28264      );
28265      if (!o) {
28266        const n = this.beans.popupSvc;
28267        o = !!n && (n.getActivePopups().some((r) => r.contains(s)) || n.isElementWithinCustomPopup(s));
28268      }
28269      o || this.stopAllEditing();
28270    };
28271    e.forEach((i) => this.addManagedElementListeners(i, { focusout: t }));
28272  }
28273  setInlineEditingCss(e) {
28274    const t = e.editing || e.getAllCellCtrls().some((i) => i.editing);
28275    e.forEachGui(void 0, (i) => {
28276      i.rowComp.addOrRemoveCssClass("ag-row-inline-editing", t), i.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing", !t);
28277    });
28278  }
28279  isCellEditable(e, t) {
28280    if (t.group) {
28281      if (this.gos.get("treeData")) {
28282        if (!t.data && !this.gos.get("enableGroupEdit"))
28283          return !1;
28284      } else if (!this.gos.get("enableGroupEdit"))
28285        return !1;
28286    }
28287    return e.isColumnFunc(t, e.colDef.editable);
28288  }
28289  // called by rowRenderer when user navigates via tab key
28290  startRowOrCellEdit(e, t, i = null) {
28291    return e.comp ? this.gos.get("editType") === "fullRow" ? this.beans.rowEditSvc?.startEditing(e.rowCtrl, t, e) ?? !0 : this.startEditing(e, t, !0, i) : (e.onCompAttachedFuncs.push(() => {
28292      this.startRowOrCellEdit(e, t, i);
28293    }), !0);
28294  }
28295  // pass in 'true' to cancel the editing.
28296  stopRowOrCellEdit(e, t = !1) {
28297    this.gos.get("editType") === "fullRow" ? this.stopRowEditing(e.rowCtrl, t) : this.stopEditing(e, t);
28298  }
28299  createCellEditorParams(e, t, i) {
28300    const {
28301      column: s,
28302      rowNode: o,
28303      eGui: n,
28304      cellPosition: { rowIndex: r }
28305    } = e, { valueSvc: a, gos: l } = this.beans;
28306    return l.addGridCommonParams({
28307      value: a.getValueForDisplay(s, o),
28308      eventKey: t,
28309      column: s,
28310      colDef: s.getColDef(),
28311      rowIndex: r,
28312      node: o,
28313      data: o.data,
28314      cellStartedEdit: i,
28315      onKeyDown: e.onKeyDown.bind(e),
28316      stopEditing: e.stopEditingAndFocus.bind(e),
28317      eGridCell: n,
28318      parseValue: (d) => a.parseValue(s, o, d, e.value),
28319      formatValue: e.formatValue.bind(e)
28320    });
28321  }
28322  navigateAfterEdit(e, t) {
28323    if (this.gos.get("enterNavigatesVerticallyAfterEdit")) {
28324      const s = e ? b.UP : b.DOWN;
28325      this.beans.navigation?.navigateToNextCell(null, s, t, !1);
28326    }
28327  }
28328};
28329function Ia(e, t, i) {
28330  e.editCompDetails = i, e.editing !== t && (e.editing = t);
28331}
28332function A0(e, t) {
28333  const i = { newValueExists: !1 };
28334  if (e)
28335    return i;
28336  const s = t.getCellEditor();
28337  return !s || s.isCancelAfterEnd && s.isCancelAfterEnd() ? i : {
28338    newValue: s.getValue(),
28339    newValueExists: !0
28340  };
28341}
28342function T0(e, t, i, s, o) {
28343  if (i === t)
28344    return !1;
28345  e.suppressRefreshCell = !0;
28346  const n = s.setDataValue(o, i, "edit");
28347  return e.suppressRefreshCell = !1, n;
28348}
28349var M0 = class extends y {
28350  constructor() {
28351    super(...arguments), this.beanName = "rowEditSvc";
28352  }
28353  startEditing(e, t = null, i = null, s = null) {
28354    if (e.editing)
28355      return !0;
28356    let o = !0, n = !1;
28357    const { editSvc: r } = this.beans;
28358    return e.getAllCellCtrls().forEach((a) => {
28359      const l = a === i;
28360      l ? o = r?.startEditing(a, t, l, s) ?? !0 : r?.startEditing(a, null, l, s), n || (n = a.editing);
28361    }), n && this.setEditing(e, !0), o;
28362  }
28363  setEditing(e, t) {
28364    e.editing = t, e.forEachGui(void 0, (s) => s.rowComp.addOrRemoveCssClass("ag-row-editing", t));
28365    const i = t ? e.createRowEvent("rowEditingStarted") : e.createRowEvent("rowEditingStopped");
28366    this.eventSvc.dispatchEvent(i);
28367  }
28368}, xt = {
28369  moduleName: "EditCore",
28370  version: I,
28371  beans: [D0, M0],
28372  apiFunctions: {
28373    getCellEditorInstances: b0,
28374    getEditingCells: y0,
28375    stopEditing: R0,
28376    startEditingCell: F0
28377  },
28378  dependsOn: [so],
28379  css: [n0]
28380}, I0 = {
28381  moduleName: "UndoRedoEdit",
28382  version: I,
28383  beans: [o0],
28384  apiFunctions: {
28385    undoCellEditing: w0,
28386    redoCellEditing: S0,
28387    getCurrentUndoSize: x0,
28388    getCurrentRedoSize: P0
28389  },
28390  dependsOn: [xt]
28391}, k0 = {
28392  moduleName: "TextEditor",
28393  version: I,
28394  userComponents: { agCellEditor: Ma, agTextCellEditor: Ma },
28395  dependsOn: [xt]
28396}, L0 = {
28397  moduleName: "NumberEditor",
28398  version: I,
28399  userComponents: {
28400    agNumberCellEditor: {
28401      classImp: g0,
28402      params: {
28403        suppressPreventDefault: !0
28404      }
28405    }
28406  },
28407  dependsOn: [xt]
28408}, O0 = {
28409  moduleName: "DateEditor",
28410  version: I,
28411  userComponents: {
28412    agDateCellEditor: l0,
28413    agDateStringCellEditor: c0
28414  },
28415  dependsOn: [xt]
28416}, G0 = {
28417  moduleName: "CheckboxEditor",
28418  version: I,
28419  userComponents: {
28420    agCheckboxCellEditor: r0
28421  },
28422  dependsOn: [xt]
28423}, H0 = {
28424  moduleName: "SelectEditor",
28425  version: I,
28426  userComponents: { agSelectCellEditor: p0 },
28427  dependsOn: [xt]
28428}, B0 = {
28429  moduleName: "LargeTextEditor",
28430  version: I,
28431  userComponents: { agLargeTextCellEditor: u0 },
28432  dependsOn: [xt]
28433}, N0 = {
28434  moduleName: "CustomEditor",
28435  version: I,
28436  dependsOn: [xt]
28437};
28438function V0(e, t) {
28439  if (!t.nodes.every((a) => a.rowPinned ? (x(59), !1) : a.id === void 0 ? (x(60), !1) : !0))
28440    return;
28441  const { nodes: s, source: o, newValue: n } = t, r = s;
28442  e.selectionSvc?.setNodesSelected({ nodes: r, source: o ?? "api", newValue: n });
28443}
28444function W0(e, t, i = "apiSelectAll") {
28445  e.selectionSvc?.selectAllRowNodes({ source: i, selectAll: t });
28446}
28447function z0(e, t, i = "apiSelectAll") {
28448  e.selectionSvc?.deselectAllRowNodes({ source: i, selectAll: t });
28449}
28450function _0(e, t = "apiSelectAllFiltered") {
28451  e.selectionSvc?.selectAllRowNodes({ source: t, selectAll: "filtered" });
28452}
28453function U0(e, t = "apiSelectAllFiltered") {
28454  e.selectionSvc?.deselectAllRowNodes({ source: t, selectAll: "filtered" });
28455}
28456function $0(e, t = "apiSelectAllCurrentPage") {
28457  e.selectionSvc?.selectAllRowNodes({ source: t, selectAll: "currentPage" });
28458}
28459function K0(e, t = "apiSelectAllCurrentPage") {
28460  e.selectionSvc?.deselectAllRowNodes({ source: t, selectAll: "currentPage" });
28461}
28462function j0(e) {
28463  return e.selectionSvc?.getSelectedNodes() ?? [];
28464}
28465function q0(e) {
28466  return e.selectionSvc?.getSelectedRows() ?? [];
28467}
28468var Y0 = class extends Bm {
28469  constructor() {
28470    super(...arguments), this.beanName = "selectionSvc", this.selectedNodes = /* @__PURE__ */ new Map();
28471  }
28472  postConstruct() {
28473    super.postConstruct();
28474    const { gos: e } = this;
28475    this.mode = Gs(e), this.groupSelectsDescendants = Ji(e), this.groupSelectsFiltered = Hs(e) === "filteredDescendants", this.addManagedPropertyListeners(["groupSelectsChildren", "groupSelectsFiltered", "rowSelection"], () => {
28476      const t = Ji(e), i = Gs(e), s = Hs(e) === "filteredDescendants";
28477      (t !== this.groupSelectsDescendants || s !== this.groupSelectsFiltered || i !== this.mode) && (this.deselectAllRowNodes({ source: "api" }), this.groupSelectsDescendants = t, this.groupSelectsFiltered = s, this.mode = i);
28478    }), this.addManagedEventListeners({ rowSelected: this.onRowSelected.bind(this) });
28479  }
28480  destroy() {
28481    super.destroy(), this.resetNodes();
28482  }
28483  handleSelectionEvent(e, t, i) {
28484    if (this.isRowSelectionBlocked(t))
28485      return 0;
28486    const s = this.inferNodeSelections(t, e.shiftKey, e.metaKey || e.ctrlKey, i);
28487    return s == null ? 0 : "select" in s ? (s.reset ? this.resetNodes() : this.selectRange(s.deselect, !1, i), this.selectRange(s.select, !0, i)) : this.setNodesSelected({
28488      nodes: [s.node],
28489      newValue: s.newValue,
28490      clearSelection: s.clearSelection,
28491      event: e,
28492      source: i
28493    });
28494  }
28495  setNodesSelected({
28496    newValue: e,
28497    clearSelection: t,
28498    suppressFinishActions: i,
28499    nodes: s,
28500    event: o,
28501    source: n
28502  }) {
28503    if (!It(this.gos) && e)
28504      return x(132), 0;
28505    if (s.length === 0)
28506      return 0;
28507    if (s.length > 1 && !this.isMultiSelect())
28508      return x(130), 0;
28509    let r = 0;
28510    for (let a = 0; a < s.length; a++) {
28511      const l = s[a], d = l.footer ? l.sibling : l, c = this.groupSelectsFiltered && d.group;
28512      if (d.rowPinned) {
28513        x(59);
28514        continue;
28515      }
28516      if (d.id === void 0) {
28517        x(60);
28518        continue;
28519      }
28520      c || this.selectRowNode(d, e, o, n) && r++, this.groupSelectsDescendants && d.childrenAfterGroup?.length && (r += this.selectChildren(d, e, n));
28521    }
28522    return i || (e && (t || !this.isMultiSelect()) && (r += this.clearOtherNodes(s[0], n)), r > 0 && (this.updateGroupsFromChildrenSelections(n), this.dispatchSelectionChanged(n))), r;
28523  }
28524  // not to be mixed up with 'cell range selection' where you drag the mouse, this is row range selection, by
28525  // holding down 'shift'.
28526  selectRange(e, t, i) {
28527    let s = 0;
28528    return e.forEach((o) => {
28529      if (o.group && this.groupSelectsDescendants)
28530        return;
28531      this.selectRowNode(o, t, void 0, i) && s++;
28532    }), s > 0 && (this.updateGroupsFromChildrenSelections(i), this.dispatchSelectionChanged(i)), s;
28533  }
28534  selectChildren(e, t, i) {
28535    const s = this.groupSelectsFiltered ? e.childrenAfterAggFilter : e.childrenAfterGroup;
28536    return s ? this.setNodesSelected({
28537      newValue: t,
28538      clearSelection: !1,
28539      suppressFinishActions: !0,
28540      source: i,
28541      nodes: s
28542    }) : 0;
28543  }
28544  getSelectedNodes() {
28545    return Array.from(this.selectedNodes.values());
28546  }
28547  getSelectedRows() {
28548    const e = [];
28549    return this.selectedNodes.forEach((t) => e.push(t.data)), e;
28550  }
28551  getSelectionCount() {
28552    return this.selectedNodes.size;
28553  }
28554  /**
28555   * This method is used by the CSRM to remove groups which are being disposed of,
28556   * events do not need fired in this case
28557   */
28558  filterFromSelection(e) {
28559    const t = /* @__PURE__ */ new Map();
28560    this.selectedNodes.forEach((i, s) => {
28561      e(i) && t.set(s, i);
28562    }), this.selectedNodes = t;
28563  }
28564  updateGroupsFromChildrenSelections(e, t) {
28565    if (!this.groupSelectsDescendants)
28566      return !1;
28567    const { gos: i, rowModel: s } = this.beans;
28568    if (!me(i))
28569      return !1;
28570    const o = s.rootNode;
28571    if (!o)
28572      return !1;
28573    t || (t = new Ks(!0, o), t.active = !1);
28574    let n = !1;
28575    return t.forEachChangedNodeDepthFirst((r) => {
28576      if (r !== o) {
28577        const a = this.calculateSelectedFromChildren(r);
28578        n = this.selectRowNode(r, a === null ? !1 : a, void 0, e) || n;
28579      }
28580    }), n;
28581  }
28582  clearOtherNodes(e, t) {
28583    const i = /* @__PURE__ */ new Map();
28584    let s = 0;
28585    return this.selectedNodes.forEach((o) => {
28586      if (o && o.id !== e.id) {
28587        const n = this.selectedNodes.get(o.id);
28588        s += this.setNodesSelected({
28589          nodes: [n],
28590          newValue: !1,
28591          clearSelection: !1,
28592          suppressFinishActions: !0,
28593          source: t
28594        }), this.groupSelectsDescendants && o.parent && i.set(o.parent.id, o.parent);
28595      }
28596    }), i.forEach((o) => {
28597      const n = this.calculateSelectedFromChildren(o);
28598      this.selectRowNode(o, n === null ? !1 : n, void 0, t);
28599    }), s;
28600  }
28601  onRowSelected(e) {
28602    const t = e.node;
28603    this.groupSelectsDescendants && t.group || (t.isSelected() ? this.selectedNodes.set(t.id, t) : this.selectedNodes.delete(t.id));
28604  }
28605  syncInRowNode(e, t) {
28606    this.syncInOldRowNode(e, t), this.syncInNewRowNode(e);
28607  }
28608  createDaemonNode(e) {
28609    if (!e.id)
28610      return;
28611    const t = new wi(this.beans);
28612    return t.id = e.id, t.data = e.data, t.__daemon = !0, t.__selected = e.__selected, t.level = e.level, t;
28613  }
28614  // if the id has changed for the node, then this means the rowNode
28615  // is getting used for a different data item, which breaks
28616  // our selectedNodes, as the node now is mapped by the old id
28617  // which is inconsistent. so to keep the old node as selected,
28618  // we swap in the clone (with the old id and old data). this means
28619  // the oldNode is effectively a daemon we keep a reference to,
28620  // so if client calls api.getSelectedNodes(), it gets the daemon
28621  // in the result. when the client un-selects, the reference to the
28622  // daemon is removed. the daemon, because it's an oldNode, is not
28623  // used by the grid for rendering, it's a copy of what the node used
28624  // to be like before the id was changed.
28625  syncInOldRowNode(e, t) {
28626    t && e.id !== t.id && this.selectedNodes.get(t.id) == e && this.selectedNodes.set(t.id, t);
28627  }
28628  syncInNewRowNode(e) {
28629    this.selectedNodes.has(e.id) ? (e.__selected = !0, this.selectedNodes.set(e.id, e)) : e.__selected = !1;
28630  }
28631  reset(e) {
28632    const t = this.getSelectionCount();
28633    this.resetNodes(), t && this.dispatchSelectionChanged(e);
28634  }
28635  resetNodes() {
28636    this.selectedNodes.forEach((e) => {
28637      this.selectRowNode(e, !1);
28638    }), this.selectedNodes.clear();
28639  }
28640  // returns a list of all nodes at 'best cost' - a feature to be used
28641  // with groups / trees. if a group has all it's children selected,
28642  // then the group appears in the result, but not the children.
28643  // Designed for use with 'children' as the group selection type,
28644  // where groups don't actually appear in the selection normally.
28645  getBestCostNodeSelection() {
28646    const { gos: e, rowModel: t } = this.beans;
28647    if (!me(e))
28648      return;
28649    const i = t.getTopLevelNodes();
28650    if (i === null)
28651      return;
28652    const s = [];
28653    function o(n) {
28654      for (let r = 0, a = n.length; r < a; r++) {
28655        const l = n[r];
28656        l.isSelected() ? s.push(l) : l.group && l.childrenAfterGroup && o(l.childrenAfterGroup);
28657      }
28658    }
28659    return o(i), s;
28660  }
28661  isEmpty() {
28662    return this.getSelectionCount() === 0;
28663  }
28664  deselectAllRowNodes(e) {
28665    const t = (n) => this.selectRowNode(n.footer ? n.sibling : n, !1, void 0, s), i = me(this.gos), { source: s, selectAll: o } = e;
28666    if (o === "currentPage" || o === "filtered") {
28667      if (!i) {
28668        z(102);
28669        return;
28670      }
28671      this.getNodesToSelect(o).forEach(t);
28672    } else
28673      this.selectedNodes.forEach(t), this.reset(s);
28674    i && this.groupSelectsDescendants && this.updateGroupsFromChildrenSelections(s), this.dispatchSelectionChanged(s);
28675  }
28676  getSelectedCounts(e) {
28677    let t = 0, i = 0;
28678    const s = (o) => {
28679      this.groupSelectsDescendants && o.group || (o.isSelected() ? t++ : o.selectable && i++);
28680    };
28681    return this.getNodesToSelect(e).forEach(s), { selectedCount: t, notSelectedCount: i };
28682  }
28683  getSelectAllState(e) {
28684    const { selectedCount: t, notSelectedCount: i } = this.getSelectedCounts(e);
28685    return t === 0 && i === 0 ? !1 : t > 0 && i > 0 ? null : t > 0;
28686  }
28687  hasNodesToSelect(e) {
28688    return this.getNodesToSelect(e).filter((t) => t.selectable).length > 0;
28689  }
28690  /**
28691   * @param selectAll See `MultiRowSelectionOptions.selectAll`
28692   * @returns all nodes including unselectable nodes which are the target of this selection attempt
28693   */
28694  getNodesToSelect(e) {
28695    if (!this.canSelectAll())
28696      return [];
28697    const t = [];
28698    if (e === "currentPage")
28699      return this.forEachNodeOnPage((s) => {
28700        if (!s.group) {
28701          t.push(s);
28702          return;
28703        }
28704        if (!s.expanded && !s.footer) {
28705          const o = (n) => {
28706            t.push(n), n.childrenAfterFilter?.length && n.childrenAfterFilter.forEach(o);
28707          };
28708          o(s);
28709          return;
28710        }
28711        this.groupSelectsDescendants || t.push(s);
28712      }), t;
28713    const i = this.beans.rowModel;
28714    return e === "filtered" ? (i.forEachNodeAfterFilter((s) => {
28715      t.push(s);
28716    }), t) : (i.forEachNode((s) => {
28717      t.push(s);
28718    }), t);
28719  }
28720  forEachNodeOnPage(e) {
28721    const { pageBounds: t, rowModel: i } = this.beans, s = t.getFirstRow(), o = t.getLastRow();
28722    for (let n = s; n <= o; n++) {
28723      const r = i.getRow(n);
28724      r && e(r);
28725    }
28726  }
28727  selectAllRowNodes(e) {
28728    const { gos: t } = this;
28729    if (!It(t)) {
28730      x(132);
28731      return;
28732    }
28733    if (gg(t) && !Xs(t)) {
28734      x(130);
28735      return;
28736    }
28737    if (!this.canSelectAll())
28738      return;
28739    const { source: i, selectAll: s } = e;
28740    this.getNodesToSelect(s).forEach((o) => {
28741      this.selectRowNode(o.footer ? o.sibling : o, !0, void 0, i);
28742    }), me(t) && this.groupSelectsDescendants && this.updateGroupsFromChildrenSelections(i), this.dispatchSelectionChanged(i);
28743  }
28744  getSelectionState() {
28745    const e = [];
28746    return this.selectedNodes.forEach((t) => {
28747      t?.id && e.push(t.id);
28748    }), e.length ? e : null;
28749  }
28750  setSelectionState(e, t) {
28751    if (!Array.isArray(e)) {
28752      z(103);
28753      return;
28754    }
28755    const i = new Set(e), s = [];
28756    this.beans.rowModel.forEachNode((o) => {
28757      i.has(o.id) && s.push(o);
28758    }), this.setNodesSelected({
28759      newValue: !0,
28760      nodes: s,
28761      source: t
28762    });
28763  }
28764  canSelectAll() {
28765    const { gos: e, rowModel: t } = this.beans;
28766    return me(e) ? !0 : (z(100, { rowModelType: t.getType() }), !1);
28767  }
28768  /**
28769   * Updates the selectable state for a node by invoking isRowSelectable callback.
28770   * If the node is not selectable, it will be deselected.
28771   *
28772   * Callers:
28773   *  - property isRowSelectable changed
28774   *  - after grouping / treeData via `updateSelectableAfterGrouping`
28775   */
28776  updateSelectable(e) {
28777    const { gos: t, rowModel: i } = this.beans;
28778    if (!It(t))
28779      return;
28780    const s = "selectableChanged", o = e !== void 0, n = me(t) && this.groupSelectsDescendants, r = [], a = (l) => {
28781      if (o && !l.group)
28782        return;
28783      if (n && l.group) {
28784        const c = l.childrenAfterGroup?.some((u) => u.selectable) ?? !1;
28785        this.setRowSelectable(l, c, !0);
28786        return;
28787      }
28788      !this.updateRowSelectable(l, !0) && l.isSelected() && r.push(l);
28789    };
28790    if (n) {
28791      if (e === void 0) {
28792        const l = i.rootNode;
28793        e = l ? new Ks(!1, l) : void 0;
28794      }
28795      e?.forEachChangedNodeDepthFirst(a, !o, !o);
28796    } else
28797      i.forEachNode(a);
28798    r.length && this.setNodesSelected({
28799      nodes: r,
28800      newValue: !1,
28801      source: s
28802    }), !o && n && this.updateGroupsFromChildrenSelections?.(s);
28803  }
28804  // only called by CSRM
28805  updateSelectableAfterGrouping(e) {
28806    this.updateSelectable(e), this.groupSelectsDescendants && this.updateGroupsFromChildrenSelections?.("rowGroupChanged", e) && this.eventSvc.dispatchEvent({
28807      type: "selectionChanged",
28808      source: "rowGroupChanged"
28809    });
28810  }
28811}, Q0 = {
28812  moduleName: "SharedRowSelection",
28813  version: I,
28814  beans: [Hg],
28815  apiFunctions: {
28816    setNodesSelected: V0,
28817    selectAll: W0,
28818    deselectAll: z0,
28819    selectAllFiltered: _0,
28820    deselectAllFiltered: U0,
28821    selectAllOnCurrentPage: $0,
28822    deselectAllOnCurrentPage: K0,
28823    getSelectedNodes: j0,
28824    getSelectedRows: q0
28825  }
28826}, Z0 = {
28827  moduleName: "RowSelection",
28828  version: I,
28829  rowModels: ["clientSide", "infinite", "viewport"],
28830  beans: [Y0],
28831  dependsOn: [Q0]
28832};
28833function X0(e) {
28834  e.expansionSvc?.expandAll(!0);
28835}
28836function J0(e) {
28837  e.expansionSvc?.expandAll(!1);
28838}
28839function eR(e) {
28840  const t = Xe(e), i = lc(e);
28841  t ? t.onRowHeightChanged() : i && i.onRowHeightChanged();
28842}
28843function tR(e, t, i) {
28844  const s = lc(e);
28845  if (s) {
28846    if (e.rowGroupColsSvc?.columns.length === 0) {
28847      if (t < 0) {
28848        z(238);
28849        return;
28850      }
28851      s.setRowCount(t, i);
28852      return;
28853    }
28854    z(28);
28855    return;
28856  }
28857  const o = io(e);
28858  if (o) {
28859    o.setRowCount(t, i);
28860    return;
28861  }
28862}
28863function iR(e) {
28864  return as(e.gos) ? e.rowModel.getBlockStates() : e.rowNodeBlockLoader?.getBlockState() ?? {};
28865}
28866function sR(e) {
28867  return e.rowModel.isLastRowIndexKnown();
28868}
28869var oR = {
28870  moduleName: "CsrmSsrmSharedApi",
28871  version: I,
28872  apiFunctions: {
28873    expandAll: X0,
28874    collapseAll: J0,
28875    onRowHeightChanged: eR
28876  }
28877}, nR = {
28878  moduleName: "SsrmInfiniteSharedApi",
28879  version: I,
28880  apiFunctions: {
28881    setRowCount: tR,
28882    getCacheBlockState: iR,
28883    isLastRowIndexKnown: sR
28884  }
28885}, rR = class extends y {
28886  constructor() {
28887    super(...arguments), this.beanName = "alignedGridsSvc", this.consuming = !1;
28888  }
28889  getAlignedGridApis() {
28890    let e = this.gos.get("alignedGrids") ?? [];
28891    const t = typeof e == "function";
28892    return typeof e == "function" && (e = e()), e.map((s) => {
28893      if (!s) {
28894        z(18), t || z(20);
28895        return;
28896      }
28897      if (this.isGridApi(s))
28898        return s;
28899      const o = s;
28900      return "current" in o ? o.current?.api : (o.api || z(19), o.api);
28901    }).filter((s) => !!s && !s.isDestroyed());
28902  }
28903  isGridApi(e) {
28904    return !!e && !!e.dispatchEvent;
28905  }
28906  postConstruct() {
28907    const e = this.fireColumnEvent.bind(this);
28908    this.addManagedEventListeners({
28909      columnMoved: e,
28910      columnVisible: e,
28911      columnPinned: e,
28912      columnGroupOpened: e,
28913      columnResized: e,
28914      bodyScroll: this.fireScrollEvent.bind(this),
28915      alignedGridColumn: ({ event: t }) => this.onColumnEvent(t),
28916      alignedGridScroll: ({ event: t }) => this.onScrollEvent(t)
28917    });
28918  }
28919  // common logic across all the fire methods
28920  fireEvent(e) {
28921    this.consuming || this.getAlignedGridApis().forEach((t) => {
28922      t.isDestroyed() || t.dispatchEvent(e);
28923    });
28924  }
28925  // common logic across all consume methods. very little common logic, however extracting
28926  // guarantees consistency across the methods.
28927  onEvent(e) {
28928    this.consuming = !0, e(), this.consuming = !1;
28929  }
28930  fireColumnEvent(e) {
28931    this.fireEvent({
28932      type: "alignedGridColumn",
28933      event: e
28934    });
28935  }
28936  fireScrollEvent(e) {
28937    e.direction === "horizontal" && this.fireEvent({
28938      type: "alignedGridScroll",
28939      event: e
28940    });
28941  }
28942  onScrollEvent(e) {
28943    this.onEvent(() => {
28944      this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left, !0);
28945    });
28946  }
28947  extractDataFromEvent(e, t) {
28948    const i = [];
28949    return e.columns ? e.columns.forEach((s) => {
28950      i.push(t(s));
28951    }) : e.column && i.push(t(e.column)), i;
28952  }
28953  getMasterColumns(e) {
28954    return this.extractDataFromEvent(e, (t) => t);
28955  }
28956  getColumnIds(e) {
28957    return this.extractDataFromEvent(e, (t) => t.getColId());
28958  }
28959  onColumnEvent(e) {
28960    this.onEvent(() => {
28961      switch (e.type) {
28962        case "columnMoved":
28963        case "columnVisible":
28964        case "columnPinned":
28965        case "columnResized": {
28966          this.processColumnEvent(e);
28967          break;
28968        }
28969        case "columnGroupOpened": {
28970          this.processGroupOpenedEvent(e);
28971          break;
28972        }
28973        case "columnPivotChanged":
28974          x(21);
28975          break;
28976      }
28977    });
28978  }
28979  processGroupOpenedEvent(e) {
28980    const { colGroupSvc: t } = this.beans;
28981    t && e.columnGroups.forEach((i) => {
28982      let s = null;
28983      i && (s = t.getProvidedColGroup(i.getGroupId())), !(i && !s) && t.setColumnGroupOpened(s, i.isExpanded(), "alignedGridChanged");
28984    });
28985  }
28986  processColumnEvent(e) {
28987    const t = e.column;
28988    let i = null;
28989    const s = this.beans, { colResize: o, ctrlsSvc: n, colModel: r } = s;
28990    if (t && (i = r.getColDefCol(t.getColId())), t && !i)
28991      return;
28992    const a = this.getMasterColumns(e);
28993    switch (e.type) {
28994      case "columnMoved":
28995        {
28996          const u = e.api.getColumnState().map((h) => ({ colId: h.colId }));
28997          He(s, { state: u, applyOrder: !0 }, "alignedGridChanged");
28998        }
28999        break;
29000      case "columnVisible":
29001        {
29002          const u = e.api.getColumnState().map((h) => ({ colId: h.colId, hide: h.hide }));
29003          He(s, { state: u }, "alignedGridChanged");
29004        }
29005        break;
29006      case "columnPinned":
29007        {
29008          const u = e.api.getColumnState().map((h) => ({ colId: h.colId, pinned: h.pinned }));
29009          He(s, { state: u }, "alignedGridChanged");
29010        }
29011        break;
29012      case "columnResized": {
29013        const c = e, u = {};
29014        a.forEach((h) => {
29015          u[h.getId()] = { key: h.getColId(), newWidth: h.getActualWidth() };
29016        }), c.flexColumns?.forEach((h) => {
29017          u[h.getId()] && delete u[h.getId()];
29018        }), o?.setColumnWidths(
29019          Object.values(u),
29020          !1,
29021          c.finished,
29022          "alignedGridChanged"
29023        );
29024        break;
29025      }
29026    }
29027    const d = n.getGridBodyCtrl().isVerticalScrollShowing();
29028    this.getAlignedGridApis().forEach((c) => {
29029      c.setGridOption("alwaysShowVerticalScroll", d);
29030    });
29031  }
29032}, aR = {
29033  moduleName: "AlignedGrids",
29034  version: I,
29035  beans: [rR]
29036}, lR = class extends Lm {
29037  constructor() {
29038    super(...arguments), this.beanName = "csrmNodeSvc";
29039  }
29040}, zo = class {
29041  constructor() {
29042    this.removals = /* @__PURE__ */ new Set(), this.updates = /* @__PURE__ */ new Map();
29043  }
29044  /** Marks a row as removed. Order of operations is: remove, update, add */
29045  remove(e) {
29046    this.removals.add(e), this.updates.delete(e);
29047  }
29048  /** Marks a row as updated. Order of operations is: remove, update, add */
29049  update(e) {
29050    this.updates.has(e) || (this.removals.delete(e), this.updates.set(e, !1));
29051  }
29052  /** Marks a row as added. Order of operation is: remove, update, add */
29053  add(e) {
29054    this.removals.delete(e), this.updates.set(e, !0);
29055  }
29056};
29057function dR(e) {
29058  if (Y(e.childrenAfterSort))
29059    return;
29060  const t = e.childrenAfterSort;
29061  for (let i = 0; i < t.length; i++) {
29062    const s = t[i], o = i === 0, n = i === e.childrenAfterSort.length - 1;
29063    s.setFirstChild(o), s.lastChild !== n && (s.lastChild = n, s.dispatchRowEvent("lastChildChanged")), s.childIndex !== i && (s.childIndex = i, s.dispatchRowEvent("childIndexChanged"));
29064  }
29065}
29066function Ic(e) {
29067  e.sibling && (e.sibling.childrenAfterSort = e.childrenAfterSort), dR(e);
29068}
29069var cR = class extends y {
29070  constructor() {
29071    super(...arguments), this.beanName = "sortStage", this.refreshProps = /* @__PURE__ */ new Set(["postSortRows", "groupDisplayType", "accentedSort"]), this.step = "sort";
29072  }
29073  execute(e) {
29074    const t = this.beans, i = t.sortSvc.getSortOptions(), s = A(i) && i.length > 0, o = s && !!e.changedRowNodes && // in time we can remove this check, so that delta sort is always
29075    // on if transactions are present. it's off for now so that we can
29076    // selectively turn it on and test it with some select users before
29077    // rolling out to everyone.
29078    this.gos.get("deltaSort"), n = i.some(({ column: r }) => Ke(t.gos) ? r.isPrimary() && r.isRowGroupActive() : !!r.getColDef().showRowGroup);
29079    this.sort(
29080      t,
29081      i,
29082      s,
29083      o,
29084      e.changedRowNodes,
29085      e.changedPath,
29086      n
29087    );
29088  }
29089  sort(e, t, i, s, o, n, r) {
29090    const { gos: a, colModel: l, rowGroupColsSvc: d, groupHideOpenParentsSvc: c, rowNodeSorter: u } = e, h = a.get("groupMaintainOrder"), g = l.getCols().some((C) => C.isRowGroupActive()), p = l.isPivotMode(), f = a.getCallback("postSortRows"), m = (C) => {
29091      c?.pullDownGroupDataForHideOpenParents(C.childrenAfterAggFilter, !0);
29092      const w = p && C.leafGroup, S = h && g && !C.leafGroup && !r;
29093      let v;
29094      if (S) {
29095        const T = d?.columns?.[C.level + 1]?.getSort() === null, D = C.childrenAfterAggFilter.slice(0);
29096        if (C.childrenAfterSort && !T) {
29097          const R = {};
29098          C.childrenAfterSort.forEach((E, k) => {
29099            R[E.id] = k;
29100          }), D.sort(
29101            (E, k) => (R[E.id] ?? 0) - (R[k.id] ?? 0)
29102          );
29103        }
29104        v = D;
29105      } else !i || w ? v = C.childrenAfterAggFilter.slice(0) : s && o ? v = uR(u, C, o, n, t) : v = u.doFullSort(C.childrenAfterAggFilter, t);
29106      if (C.childrenAfterSort = v, Ic(C), f) {
29107        const P = { nodes: C.childrenAfterSort };
29108        f(P);
29109      }
29110    };
29111    n?.forEachChangedNodeDepthFirst(m);
29112  }
29113};
29114function uR(e, t, i, s, o) {
29115  const n = t.childrenAfterAggFilter, r = t.childrenAfterSort;
29116  if (!r)
29117    return e.doFullSort(n, o);
29118  const a = /* @__PURE__ */ new Set(), l = [], d = i.updates;
29119  for (let u = 0, h = n.length; u < h; ++u) {
29120    const g = n[u];
29121    d.has(g) || s && !s.canSkip(g) ? l.push({
29122      currentPos: l.length,
29123      rowNode: g
29124    }) : a.add(g.id);
29125  }
29126  const c = r.filter((u) => a.has(u.id)).map((u, h) => ({ currentPos: h, rowNode: u }));
29127  return l.sort((u, h) => e.compareRowNodes(o, u, h)), hR(e, o, l, c);
29128}
29129function hR(e, t, i, s) {
29130  const o = [];
29131  let n = 0, r = 0;
29132  const a = i.length, l = s.length;
29133  for (; n < a && r < l; ) {
29134    const d = i[n], c = s[r], u = e.compareRowNodes(t, d, c);
29135    let h;
29136    u < 0 ? (h = d, ++n) : (h = c, ++r), o.push(h.rowNode);
29137  }
29138  for (; n < a; )
29139    o.push(i[n++].rowNode);
29140  for (; r < l; )
29141    o.push(s[r++].rowNode);
29142  return o;
29143}
29144var gR = class extends y {
29145  constructor() {
29146    super(...arguments), this.beanName = "rowModel", this.onRowHeightChanged_debounced = Ce(this, this.onRowHeightChanged.bind(this), 100), this.rootNode = null, this.rowsToDisplay = [], this.started = !1, this.shouldSkipSettingDataOnStart = !1, this.isRefreshingModel = !1, this.rowNodesCountReady = !1, this.rowCountReady = !1;
29147  }
29148  wireBeans(e) {
29149    this.colModel = e.colModel, this.valueCache = e.valueCache, this.filterStage = e.filterStage, this.sortStage = e.sortStage, this.flattenStage = e.flattenStage, this.groupStage = e.groupStage, this.aggStage = e.aggStage, this.pivotStage = e.pivotStage, this.filterAggStage = e.filterAggStage;
29150  }
29151  postConstruct() {
29152    this.orderedStages = [
29153      this.groupStage,
29154      this.filterStage,
29155      this.pivotStage,
29156      this.aggStage,
29157      this.sortStage,
29158      this.filterAggStage,
29159      this.flattenStage
29160    ].filter((i) => !!i);
29161    const e = this.refreshModel.bind(this, { step: "group" }), t = this.refreshModel.bind(this, {
29162      step: "group",
29163      // after cols change, row grouping (the first stage) could of changed
29164      afterColumnsChanged: !0,
29165      keepRenderedRows: !0,
29166      // we want animations cos sorting or filtering could be applied
29167      animate: !this.gos.get("suppressAnimationFrame")
29168    });
29169    this.addManagedEventListeners({
29170      newColumnsLoaded: t,
29171      columnRowGroupChanged: e,
29172      columnValueChanged: this.onValueChanged.bind(this),
29173      columnPivotChanged: this.refreshModel.bind(this, { step: "pivot" }),
29174      filterChanged: this.onFilterChanged.bind(this),
29175      sortChanged: this.onSortChanged.bind(this),
29176      columnPivotModeChanged: e,
29177      gridStylesChanged: this.onGridStylesChanges.bind(this),
29178      gridReady: this.onGridReady.bind(this)
29179    }), this.addPropertyListeners(), this.rootNode = new wi(this.beans), this.initRowManager();
29180  }
29181  initRowManager() {
29182    const { gos: e, beans: t, nodeManager: i } = this, s = e.get("treeData"), o = e.get("treeDataChildrenField"), n = o || s;
29183    let r;
29184    n && (r = o ? t.csrmChildrenTreeNodeSvc : t.csrmPathTreeNodeSvc), r || (r = t.csrmNodeSvc), i !== r && (i?.deactivate(), this.nodeManager = r), r.activate(this.rootNode);
29185  }
29186  addPropertyListeners() {
29187    const e = [
29188      "treeData",
29189      "treeDataChildrenField",
29190      ...this.orderedStages.flatMap(({ refreshProps: t }) => [...t])
29191    ];
29192    this.addManagedPropertyListeners(e, (t) => {
29193      const i = t.changeSet?.properties;
29194      i && this.onPropChange(i);
29195    }), this.addManagedPropertyListener("rowData", () => this.onPropChange(["rowData"])), this.addManagedPropertyListener("rowHeight", () => this.resetRowHeights());
29196  }
29197  start() {
29198    this.started = !0, this.shouldSkipSettingDataOnStart ? this.refreshModel({
29199      step: "group",
29200      newData: !0,
29201      rowDataUpdated: !0
29202    }) : this.setInitialData();
29203  }
29204  setInitialData() {
29205    this.gos.get("rowData") && (this.shouldSkipSettingDataOnStart = !0, this.onPropChange(["rowData"]));
29206  }
29207  ensureRowHeightsValid(e, t, i, s) {
29208    let o, n = !1;
29209    do {
29210      o = !1;
29211      const r = this.getRowIndexAtPixel(e), a = this.getRowIndexAtPixel(t), l = Math.max(r, i), d = Math.min(a, s);
29212      for (let c = l; c <= d; c++) {
29213        const u = this.getRow(c);
29214        if (u.rowHeightEstimated) {
29215          const h = Ot(this.beans, u);
29216          u.setRowHeight(h.height), o = !0, n = !0;
29217        }
29218      }
29219      o && this.setRowTopAndRowIndex();
29220    } while (o);
29221    return n;
29222  }
29223  onPropChange(e) {
29224    if (!this.rootNode)
29225      return;
29226    const t = this.gos, i = new Set(e), s = {
29227      step: "nothing",
29228      changedProps: i
29229    }, o = i.has("rowData"), n = i.has("treeData"), a = i.has("treeDataChildrenField") || n && !t.get("treeDataChildrenField");
29230    let l;
29231    if (n && (s.step = "group"), (a || o) && (l = t.get("rowData"), l != null && !Array.isArray(l) && (l = null, x(1))), a && (o || (l = this.nodeManager?.extractRowData() ?? l), this.initRowManager()), l && (!a && this.started && !this.isEmpty() && l.length > 0 && t.exists("getRowId") && // this property is a backwards compatibility property, for those who want
29232    // the old behaviour of Row IDs but NOT Immutable Data.
29233    !t.get("resetRowDataOnUpdate") ? (s.keepRenderedRows = !0, s.animate = !this.gos.get("suppressAnimationFrame"), s.changedRowNodes = new zo(), this.nodeManager.setImmutableRowData(s, l)) : (s.step = "group", s.rowDataUpdated = !0, s.newData = !0, this.beans.selectionSvc?.reset("rowDataChanged"), this.rowNodesCountReady = !0, this.nodeManager.setNewRowData(l))), s.step === "nothing") {
29234      for (const { refreshProps: d, step: c } of this.orderedStages)
29235        if (e.some((u) => d.has(u))) {
29236          s.step = c;
29237          break;
29238        }
29239    }
29240    s.step !== "nothing" && this.refreshModel(s);
29241  }
29242  setRowTopAndRowIndex() {
29243    const { beans: e } = this, t = e.environment.getDefaultRowHeight();
29244    let i = 0;
29245    const s = /* @__PURE__ */ new Set(), o = de(this.gos, "normal"), n = this.rowsToDisplay;
29246    for (let r = 0, a = n.length; r < a; ++r) {
29247      const l = n[r];
29248      if (l.id != null && s.add(l.id), l.rowHeight == null) {
29249        const d = Ot(e, l, o, t);
29250        l.setRowHeight(d.height, d.estimated);
29251      }
29252      l.setRowTop(i), l.setRowIndex(r), i += l.rowHeight;
29253    }
29254    return s;
29255  }
29256  clearRowTopAndRowIndex(e, t) {
29257    const i = e.active, s = (n) => {
29258      n && n.id != null && !t.has(n.id) && n.clearRowTopAndRowIndex();
29259    }, o = (n) => {
29260      if (n !== null && (s(n), s(n.detailNode), s(n.sibling), n.hasChildren() && n.childrenAfterGroup)) {
29261        const r = n.level == -1;
29262        i && !r && !n.expanded || n.childrenAfterGroup.forEach(o);
29263      }
29264    };
29265    o(this.rootNode);
29266  }
29267  // returns false if row was moved, otherwise true
29268  ensureRowsAtPixel(e, t, i = 0) {
29269    const s = this.getRowIndexAtPixel(t), o = this.getRow(s), n = !this.gos.get("suppressAnimationFrame");
29270    if (o === e[0])
29271      return !1;
29272    const r = this.rootNode?.allLeafChildren;
29273    return r ? (e.forEach((a) => {
29274      Ve(r, a);
29275    }), e.forEach((a, l) => {
29276      r.splice(Math.max(s + i, 0) + l, 0, a);
29277    }), e.forEach((a, l) => {
29278      a.sourceRowIndex = l;
29279    }), this.refreshModel({
29280      step: "group",
29281      keepRenderedRows: !0,
29282      animate: n,
29283      rowNodesOrderChanged: !0
29284      // We assume the order changed and we don't need to check if it really did
29285    }), !0) : !1;
29286  }
29287  highlightRowAtPixel(e, t) {
29288    const i = t != null ? this.getRowIndexAtPixel(t) : null, s = i != null ? this.getRow(i) : null;
29289    if (!s || !e || t == null) {
29290      this.clearHighlightedRow();
29291      return;
29292    }
29293    const o = this.getHighlightPosition(t, s), n = this.isHighlightingCurrentPosition(e, s, o), r = this.lastHighlightedRow != null && this.lastHighlightedRow !== s;
29294    (n || r) && (this.clearHighlightedRow(), n) || (this.setRowNodeHighlighted(s, o), this.lastHighlightedRow = s);
29295  }
29296  setRowNodeHighlighted(e, t) {
29297    e.highlighted !== t && (e.highlighted = t, e.dispatchRowEvent("rowHighlightChanged"));
29298  }
29299  getHighlightPosition(e, t) {
29300    if (!t) {
29301      const o = this.getRowIndexAtPixel(e);
29302      if (t = this.getRow(o || 0), !t)
29303        return "Below";
29304    }
29305    const { rowTop: i, rowHeight: s } = t;
29306    return e - i < s / 2 ? "Above" : "Below";
29307  }
29308  getLastHighlightedRowNode() {
29309    return this.lastHighlightedRow;
29310  }
29311  isHighlightingCurrentPosition(e, t, i) {
29312    if (e === t)
29313      return !0;
29314    const s = i === "Above" ? -1 : 1;
29315    return this.getRow(t.rowIndex + s) === e;
29316  }
29317  clearHighlightedRow() {
29318    this.lastHighlightedRow && (this.setRowNodeHighlighted(this.lastHighlightedRow, null), this.lastHighlightedRow = null);
29319  }
29320  isLastRowIndexKnown() {
29321    return !0;
29322  }
29323  getRowCount() {
29324    return this.rowsToDisplay ? this.rowsToDisplay.length : 0;
29325  }
29326  /**
29327   * Returns the number of rows with level === 1
29328   */
29329  getTopLevelRowCount() {
29330    const e = this.rootNode;
29331    if (!e || this.rowsToDisplay.length === 0)
29332      return 0;
29333    if (this.rowsToDisplay && this.rowsToDisplay[0] === e)
29334      return 1;
29335    const i = e.childrenAfterAggFilter, s = e.sibling ? 1 : 0;
29336    return (i ? i.length : 0) + s;
29337  }
29338  /**
29339   * Get the row display index by the top level index
29340   * top level index is the index of rows with level === 1
29341   */
29342  getTopLevelRowDisplayedIndex(e) {
29343    const { rootNode: t, rowsToDisplay: i } = this;
29344    if (!t || !i.length || i[0] === t)
29345      return e;
29346    const { childrenAfterSort: o } = t, n = (a) => {
29347      let l = o[a];
29348      if (this.gos.get("groupHideOpenParents"))
29349        for (; l.expanded && l.childrenAfterSort && l.childrenAfterSort.length > 0; )
29350          l = l.childrenAfterSort[0];
29351      return l.rowIndex;
29352    }, { footerSvc: r } = this.beans;
29353    return r ? r.getTopDisplayIndex(i, e, o, n) : n(e);
29354  }
29355  getRowBounds(e) {
29356    const t = this.rowsToDisplay[e];
29357    return t ? {
29358      rowTop: t.rowTop,
29359      rowHeight: t.rowHeight
29360    } : null;
29361  }
29362  onRowGroupOpened() {
29363    const e = si(this.gos);
29364    this.refreshModel({ step: "map", keepRenderedRows: !0, animate: e });
29365  }
29366  onFilterChanged(e) {
29367    if (e.afterDataChange)
29368      return;
29369    const t = si(this.gos), s = e.columns.length === 0 || e.columns.some((o) =>
29369 o.isPrimary()) ? "filter" : "filter_aggregates";
29370    this.refreshModel({ step: s, keepRenderedRows: !0, animate: t });
29371  }
29372  onSortChanged() {
29373    const e = si(this.gos);
29374    this.refreshModel({
29375      step: "sort",
29376      keepRenderedRows: !0,
29377      animate: e
29378    });
29379  }
29380  getType() {
29381    return "clientSide";
29382  }
29383  onValueChanged() {
29384    this.refreshModel({ step: this.colModel.isPivotActive() ? "pivot" : "aggregate" });
29385  }
29386  createChangePath(e) {
29387    const t = !e?.length, i = new Ks(!1, this.rootNode);
29388    return t && (i.active = !1), i;
29389  }
29390  isSuppressModelUpdateAfterUpdateTransaction(e) {
29391    if (!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))
29392      return !1;
29393    const t = e.rowNodeTransactions;
29394    return t ? !t.some(
29395      (o) => o.add != null && o.add.length > 0 || o.remove != null && o.remove.length > 0
29396    ) : !1;
29397  }
29398  refreshModel(e) {
29399    if (!this.rootNode)
29400      return;
29401    const t = e.rowNodeTransactions, i = e.changedPath ?? (e.changedPath = this.createChangePath(t));
29402    if (this.nodeManager.refreshModel?.(e), this.eventSvc.dispatchEvent({ type: "beforeRefreshModel", params: e }), !this.started || (e.rowDataUpdated && this.eventSvc.dispatchEvent({ type: "rowDataUpdated" }), this.isRefreshingModel || this.colModel.changeEventsDispatching || this.isSuppressModelUpdateAfterUpdateTransaction(e)))
29403      return;
29404    switch (this.isRefreshingModel = !0, e.step) {
29405      case "group":
29406        this.doRowGrouping(
29407          e.rowNodeTransactions,
29408          e.changedRowNodes,
29409          i,
29410          !!e.rowNodesOrderChanged,
29411          !!e.afterColumnsChanged
29412        );
29413      case "filter":
29414        this.doFilter(i);
29415      case "pivot":
29416        this.doPivot(i);
29417      case "aggregate":
29418        this.doAggregate(i);
29419      case "filter_aggregates":
29420        this.doFilterAggregates(i);
29421      case "sort":
29422        this.doSort(e.changedRowNodes, i);
29423      case "map":
29424        this.doRowsToDisplay();
29425    }
29426    const s = this.setRowTopAndRowIndex();
29427    this.clearRowTopAndRowIndex(i, s), this.isRefreshingModel = !1, this.eventSvc.dispatchEvent({
29428      type: "modelUpdated",
29429      animate: e.animate,
29430      keepRenderedRows: e.keepRenderedRows,
29431      newData: e.newData,
29432      newPage: !1,
29433      keepUndoRedoStack: e.keepUndoRedoStack
29434    });
29435  }
29436  isEmpty() {
29437    return !this.rootNode?.allLeafChildren?.length || !this.colModel?.ready;
29438  }
29439  isRowsToRender() {
29440    return this.rowsToDisplay.length > 0;
29441  }
29442  getNodesInRangeForSelection(e, t) {
29443    let i = !1, s = !1;
29444    const o = [], n = Ji(this.gos);
29445    return this.forEachNodeAfterFilterAndSort((r) => {
29446      if (s)
29447        return;
29448      if (i && (r === t || r === e) && (s = !0, r.group && n)) {
29449        o.push(...r.allLeafChildren);
29450        return;
29451      }
29452      if (!i) {
29453        if (r !== t && r !== e)
29454          return;
29455        i = !0;
29456      }
29457      if (!r.group || !n) {
29458        o.push(r);
29459        return;
29460      }
29461    }), o;
29462  }
29463  getTopLevelNodes() {
29464    return this.rootNode?.childrenAfterGroup ?? null;
29465  }
29466  getRow(e) {
29467    return this.rowsToDisplay[e];
29468  }
29469  isRowPresent(e) {
29470    return this.rowsToDisplay.indexOf(e) >= 0;
29471  }
29472  getRowIndexAtPixel(e) {
29473    const t = this.rowsToDisplay;
29474    if (this.isEmpty() || t.length === 0)
29475      return -1;
29476    let i = 0, s = t.length - 1;
29477    if (e <= 0)
29478      return 0;
29479    if (W(t).rowTop <= e)
29480      return t.length - 1;
29481    let n = -1, r = -1;
29482    for (; ; ) {
29483      const a = Math.floor((i + s) / 2), l = t[a];
29484      if (this.isRowInPixel(l, e) || (l.rowTop < e ? i = a + 1 : l.rowTop > e && (s = a - 1), n === i && r === s))
29485        return a;
29486      n = i, r = s;
29487    }
29488  }
29489  isRowInPixel(e, t) {
29490    const i = e.rowTop, s = e.rowTop + e.rowHeight;
29491    return i <= t && s > t;
29492  }
29493  forEachLeafNode(e) {
29494    this.rootNode?.allLeafChildren?.forEach((t, i) => e(t, i));
29495  }
29496  forEachNode(e, t = !1) {
29497    this.recursivelyWalkNodesAndCallback({
29498      nodes: [...this.rootNode?.childrenAfterGroup || []],
29499      callback: e,
29500      recursionType: 0,
29501      index: 0,
29502      includeFooterNodes: t
29503    });
29504  }
29505  forEachNodeAfterFilter(e, t = !1) {
29506    this.recursivelyWalkNodesAndCallback({
29507      nodes: [...this.rootNode?.childrenAfterAggFilter || []],
29508      callback: e,
29509      recursionType: 1,
29510      index: 0,
29511      includeFooterNodes: t
29512    });
29513  }
29514  forEachNodeAfterFilterAndSort(e, t = !1) {
29515    this.recursivelyWalkNodesAndCallback({
29516      nodes: [...this.rootNode?.childrenAfterSort || []],
29517      callback: e,
29518      recursionType: 2,
29519      index: 0,
29520      includeFooterNodes: t
29521    });
29522  }
29523  forEachPivotNode(e, t = !1) {
29524    const i = this.rootNode;
29525    i && this.recursivelyWalkNodesAndCallback({
29526      nodes: [i],
29527      callback: e,
29528      recursionType: 3,
29529      index: 0,
29530      includeFooterNodes: t
29531    });
29532  }
29533  // iterates through each item in memory, and calls the callback function
29534  // nodes - the rowNodes to traverse
29535  // callback - the user provided callback
29536  // recursion type - need this to know what child nodes to recurse, eg if looking at all nodes, or filtered notes etc
29537  // index - works similar to the index in forEach in javascript's array function
29538  recursivelyWalkNodesAndCallback(e) {
29539    const { nodes: t, callback: i, recursionType: s, includeFooterNodes: o } = e;
29540    let { index: n } = e;
29541    const { footerSvc: r } = this.beans;
29542    r?.addNodes(e, t, i, o, this.rootNode, "top");
29543    for (let a = 0; a < t.length; a++) {
29544      const l = t[a];
29545      if (i(l, n++), l.hasChildren() && !l.footer) {
29546        let d = null;
29547        switch (s) {
29548          case 0:
29549            d = l.childrenAfterGroup;
29550            break;
29551          case 1:
29552            d = l.childrenAfterAggFilter;
29553            break;
29554          case 2:
29555            d = l.childrenAfterSort;
29556            break;
29557          case 3:
29558            d = l.leafGroup ? null : l.childrenAfterSort;
29559            break;
29560        }
29561        d && (n = this.recursivelyWalkNodesAndCallback({
29562          nodes: [...d],
29563          callback: i,
29564          recursionType: s,
29565          index: n,
29566          includeFooterNodes: o
29567        }));
29568      }
29569    }
29570    return r?.addNodes(e, t, i, o, this.rootNode, "bottom"), n;
29571  }
29572  // it's possible to recompute the aggregate without doing the other parts
29573  // + api.refreshClientSideRowModel('aggregate')
29574  doAggregate(e) {
29575    const t = this.rootNode;
29576    t && this.aggStage?.execute({ rowNode: t, changedPath: e });
29577  }
29578  doFilterAggregates(e) {
29579    const t = this.rootNode;
29580    this.filterAggStage ? this.filterAggStage.execute({ rowNode: t, changedPath: e }) : t.childrenAfterAggFilter = t.childrenAfterFilter;
29581  }
29582  doSort(e, t) {
29583    const { groupHideOpenParentsSvc: i } = this.beans;
29584    this.sortStage ? this.sortStage.execute({
29585      rowNode: this.rootNode,
29586      changedRowNodes: e,
29587      changedPath: t
29588    }) : t.forEachChangedNodeDepthFirst((s) => {
29589      i?.pullDownGroupDataForHideOpenParents(s.childrenAfterAggFilter, !0), s.childrenAfterSort = s.childrenAfterAggFilter.slice(0), Ic(s);
29590    }), i?.updateGroupDataForHideOpenParents(t);
29591  }
29592  doRowGrouping(e, t, i, s, o) {
29593    const n = this.nodeManager.treeData, r = this.rootNode;
29594    if (!n) {
29595      const a = this.groupStage;
29596      if (a)
29597        a.execute({
29598          rowNode: r,
29599          changedPath: i,
29600          changedRowNodes: t,
29601          rowNodeTransactions: e,
29602          rowNodesOrderChanged: s,
29603          afterColumnsChanged: o
29604        });
29605      else {
29606        const l = r.sibling;
29607        r.childrenAfterGroup = r.allLeafChildren, l && (l.childrenAfterGroup = r.childrenAfterGroup), r.updateHasChildren();
29608      }
29609    }
29610    this.rowNodesCountReady && (this.rowCountReady = !0, this.eventSvc.dispatchEventOnce({ type: "rowCountReady" }));
29611  }
29612  doFilter(e) {
29613    this.filterStage ? this.filterStage.execute({ rowNode: this.rootNode, changedPath: e }) : e.forEachChangedNodeDepthFirst((t) => {
29614      t.childrenAfterFilter = t.childrenAfterGroup, pc(t);
29615    }, !0);
29616  }
29617  doPivot(e) {
29618    this.pivotStage?.execute({ rowNode: this.rootNode, changedPath: e });
29619  }
29620  getRowNode(e) {
29621    if (typeof e == "string" && e.indexOf(cn) == 0) {
29622      let i;
29623      return this.forEachNode((s) => {
29624        s.id === e && (i = s);
29625      }), i;
29626    }
29627    return this.nodeManager.getRowNode(e);
29628  }
29629  batchUpdateRowData(e, t) {
29630    if (this.applyAsyncTransactionsTimeout == null) {
29631      this.rowDataTransactionBatch = [];
29632      const i = this.gos.get("asyncTransactionWaitMillis");
29633      this.applyAsyncTransactionsTimeout = window.setTimeout(() => {
29634        this.isAlive() && this.executeBatchUpdateRowData();
29635      }, i);
29636    }
29637    this.rowDataTransactionBatch.push({ rowDataTransaction: e, callback: t });
29638  }
29639  flushAsyncTransactions() {
29640    this.applyAsyncTransactionsTimeout != null && (clearTimeout(this.applyAsyncTransactionsTimeout), this.executeBatchUpdateRowData());
29641  }
29642  executeBatchUpdateRowData() {
29643    this.valueCache?.onDataChanged();
29644    const e = [], t = [], i = new zo();
29645    let s = !1;
29646    this.rowDataTransactionBatch?.forEach((o) => {
29647      this.rowNodesCountReady = !0;
29648      const { rowNodeTransaction: n, rowsInserted: r } = this.nodeManager.updateRowData(
29649        o.rowDataTransaction,
29650        i
29651      );
29652      r && (s = !0), t.push(n), o.callback && e.push(o.callback.bind(null, n));
29653    }), this.commitTransactions(t, s, i), e.length > 0 && window.setTimeout(() => {
29654      e.forEach((o) => o());
29655    }, 0), t.length > 0 && this.eventSvc.dispatchEvent({
29656      type: "asyncTransactionsFlushed",
29657      results: t
29658    }), this.rowDataTransactionBatch = null, this.applyAsyncTransactionsTimeout = void 0;
29659  }
29660  /**
29661   * Used to apply transaction changes.
29662   * Called by gridApi & rowDragFeature
29663   */
29664  updateRowData(e) {
29665    this.valueCache?.onDataChanged(), this.rowNodesCountReady = !0;
29666    const t = new zo(), { rowNodeTransaction: i, rowsInserted: s } = this.nodeManager.updateRowData(e, t);
29667    return this.commitTransactions([i], s, t), i;
29668  }
29669  /**
29670   * Common to:
29671   * - executeBatchUpdateRowData (batch transactions)
29672   * - updateRowData (single transaction)
29673   * - setImmutableRowData (generated transaction)
29674   *
29675   * @param rowNodeTrans - the transactions to apply
29676   * @param orderChanged - whether the order of the rows has changed, either via generated transaction or user provided addIndex
29677   */
29678  commitTransactions(e, t, i) {
29679    this.refreshModel({
29680      step: "group",
29681      rowDataUpdated: !0,
29682      rowNodeTransactions: e,
29683      rowNodesOrderChanged: t,
29684      keepRenderedRows: !0,
29685      animate: !this.gos.get("suppressAnimationFrame"),
29686      changedRowNodes: i,
29687      changedPath: this.createChangePath(e)
29688    });
29689  }
29690  doRowsToDisplay() {
29691    const { flattenStage: e, rootNode: t } = this;
29692    let i;
29693    if (e)
29694      i = e.execute({ rowNode: t });
29695    else {
29696      i = t?.childrenAfterSort ?? [];
29697      for (const s of i)
29698        s.setUiLevel(0);
29699    }
29700    this.rowsToDisplay = i;
29701  }
29702  onRowHeightChanged() {
29703    this.refreshModel({
29704      step: "map",
29705      keepRenderedRows: !0,
29706      keepUndoRedoStack: !0
29707    });
29708  }
29709  /** This method is debounced. It is used for row auto-height. If we don't debounce,
29710   * then the Row Models will end up recalculating each row position
29711   * for each row height change and result in the Row Renderer laying out rows.
29712   * This is particularly bad if using print layout, and showing eg 1,000 rows,
29713   * each row will change it's height, causing Row Model to update 1,000 times.
29714   */
29715  onRowHeightChangedDebounced() {
29716    this.onRowHeightChanged_debounced();
29717  }
29718  resetRowHeights() {
29719    const e = this.rootNode;
29720    if (!e)
29721      return;
29722    const t = this.resetRowHeightsForAllRowNodes();
29723    e.setRowHeight(e.rowHeight, !0), e.sibling && e.sibling.setRowHeight(e.sibling.rowHeight, !0), t && this.onRowHeightChanged();
29724  }
29725  resetRowHeightsForAllRowNodes() {
29726    let e = !1;
29727    return this.forEachNode((t) => {
29728      t.setRowHeight(t.rowHeight, !0);
29729      const i = t.detailNode;
29730      i && i.setRowHeight(i.rowHeight, !0), t.sibling && t.sibling.setRowHeight(t.sibling.rowHeight, !0), e = !0;
29731    }), e;
29732  }
29733  onGridStylesChanges(e) {
29734    if (e.rowHeightChanged) {
29735      if (this.beans.rowAutoHeight?.active)
29736        return;
29737      this.resetRowHeights();
29738    }
29739  }
29740  onGridReady() {
29741    this.started || this.setInitialData();
29742  }
29743  isRowDataLoaded() {
29744    return this.rowCountReady;
29745  }
29746  destroy() {
29747    super.destroy(), this.clearHighlightedRow(), this.started = !1, this.rootNode = null, this.nodeManager = null, this.rowDataTransactionBatch = null, this.lastHighlightedRow = null, this.orderedStages = ta, this.rowsToDisplay = ta;
29748  }
29749};
29750function pR(e) {
29751  e.expansionSvc?.onGroupExpandedOrCollapsed();
29752}
29753function fR(e, t) {
29754  const i = Xe(e);
29755  i && ((!t || t === "everything") && (t = "group"), i.refreshModel({
29756    step: t,
29757    keepRenderedRows: !0,
29758    animate: !e.gos.get("suppressAnimationFrame")
29759  }));
29760}
29761function mR(e) {
29762  return Xe(e)?.isEmpty() ?? !0;
29763}
29764function CR(e, t) {
29765  Xe(e)?.forEachLeafNode(t);
29766}
29767function vR(e, t) {
29768  Xe(e)?.forEachNodeAfterFilter(t);
29769}
29770function wR(e, t) {
29771  Xe(e)?.forEachNodeAfterFilterAndSort(t);
29772}
29773function SR(e) {
29774  if (e.rowAutoHeight?.active) {
29775    x(3);
29776    return;
29777  }
29778  Xe(e)?.resetRowHeights();
29779}
29780function bR(e, t) {
29781  return e.frameworkOverrides.wrapIncoming(
29782    () => Xe(e)?.updateRowData(t)
29783  );
29784}
29785function yR(e, t, i) {
29786  e.frameworkOverrides.wrapIncoming(
29787    () => Xe(e)?.batchUpdateRowData(t, i)
29788  );
29789}
29790function RR(e) {
29791  e.frameworkOverrides.wrapIncoming(() => Xe(e)?.flushAsyncTransactions());
29792}
29793function FR(e) {
29794  return e.selectionSvc?.getBestCostNodeSelection();
29795}
29796var xR = {
29797  moduleName: "ClientSideRowModel",
29798  version: I,
29799  rowModels: ["clientSide"],
29800  beans: [lR, gR, cR],
29801  dependsOn: [ac]
29802}, PR = {
29803  moduleName: "ClientSideRowModelApi",
29804  version: I,
29805  rowModels: ["clientSide"],
29806  apiFunctions: {
29807    onGroupExpandedOrCollapsed: pR,
29808    refreshClientSideRowModel: fR,
29809    isRowDataEmpty: mR,
29810    forEachLeafNode: CR,
29811    forEachNodeAfterFilter: vR,
29812    forEachNodeAfterFilterAndSort: wR,
29813    resetRowHeights: SR,
29814    applyTransaction: bR,
29815    applyTransactionAsync: yR,
29816    flushAsyncTransactions: RR,
29817    getBestCostNodeSelection: FR
29818  },
29819  dependsOn: [oR]
29820}, ER = class extends y {
29821  constructor() {
29822    super(...arguments), this.beanName = "gridSerializer";
29823  }
29824  wireBeans(e) {
29825    this.visibleCols = e.visibleCols, this.colModel = e.colModel, this.rowModel = e.rowModel, this.pinnedRowModel = e.pinnedRowModel;
29826  }
29827  serialize(e, t = {}) {
29828    const { allColumns: i, columnKeys: s, skipRowGroups: o } = t, n = this.getColumnsToExport(
29829      i,
29830      o,
29831      s
29832    );
29833    return [
29834      // first pass, put in the header names of the cols
29835      this.prepareSession(n),
29836      this.prependContent(t),
29837      this.exportColumnGroups(t, n),
29838      this.exportHeaders(t, n),
29839      this.processPinnedTopRows(t, n),
29840      this.processRows(t, n),
29841      this.processPinnedBottomRows(t, n),
29842      this.appendContent(t)
29843    ].reduce((r, a) => a(r), e).parse();
29844  }
29845  processRow(e, t, i, s) {
29846    const o = t.shouldRowBeSkipped || (() => !1), r = t.rowPositions != null || !!t.onlySelected, a = this.gos.get("groupHideOpenParents") && !r, l = this.colModel.isPivotMode() ? s.leafGroup : !s.group, d = !!s.footer, c = s.allChildrenCount === 1 && s.childrenAfterGroup?.length === 1 && ug(this.gos, s);
29847    if (!l && !d && (t.skipRowGroups || c || a) || t.onlySelected && !s.isSelected() || t.skipPinnedTop && s.rowPinned === "top" || t.skipPinnedBottom && s.rowPinned === "bottom" || s.level === -1 && !l && !d || o(this.gos.addGridCommonParams({ node: s })))
29848      return;
29849    const g = e.onNewBodyRow(s);
29850    if (i.forEach((p, f) => {
29851      g.onColumn(p, f, s);
29852    }), t.getCustomContentBelowRow) {
29853      const p = t.getCustomContentBelowRow(this.gos.addGridCommonParams({ node: s }));
29854      p && e.addCustomContent(p);
29855    }
29856  }
29857  appendContent(e) {
29858    return (t) => {
29859      const i = e.appendContent;
29860      return i && t.addCustomContent(i), t;
29861    };
29862  }
29863  prependContent(e) {
29864    return (t) => {
29865      const i = e.prependContent;
29866      return i && t.addCustomContent(i), t;
29867    };
29868  }
29869  prepareSession(e) {
29870    return (t) => (t.prepare(e), t);
29871  }
29872  exportColumnGroups(e, t) {
29873    return (i) => {
29874      if (!e.skipColumnGroupHeaders) {
29875        const s = new sd(), { colGroupSvc: o } = this.beans, n = o ? o.createColumnGroups({
29876          columns: t,
29877          idCreator: s,
29878          pinned: null,
29879          isStandaloneStructure: !0
29880        }) : t;
29881        this.recursivelyAddHeaderGroups(
29882          n,
29883          i,
29884          e.processGroupHeaderCallback
29885        );
29886      }
29887      return i;
29888    };
29889  }
29890  exportHeaders(e, t) {
29891    return (i) => {
29892      if (!e.skipColumnHeaders) {
29893        const s = i.onNewHeaderRow();
29894        t.forEach((o, n) => {
29895          s.onColumn(o, n, void 0);
29896        });
29897      }
29898      return i;
29899    };
29900  }
29901  processPinnedTopRows(e, t) {
29902    return (i) => {
29903      const s = this.processRow.bind(this, i, e, t);
29904      return e.rowPositions ? e.rowPositions.filter((o) => o.rowPinned === "top").sort((o, n) => o.rowIndex - n.rowIndex).map((o) =>
29904 this.pinnedRowModel?.getPinnedTopRow(o.rowIndex)).forEach(s) : this.pinnedRowModel?.forEachPinnedRow("top", s), i;
29905    };
29906  }
29907  processRows(e, t) {
29908    return (i) => {
29909      const s = this.rowModel, o = me(this.gos), n = as(this.gos), r = !o && e.onlySelected, a = this.processRow.bind(this, i, e, t), { exportedRows: l = "filteredAndSorted" } = e;
29910      if (e.rowPositions)
29911        return e.rowPositions.filter((d) => d.rowPinned == null).sort((d, c) => d.rowIndex - c.rowIndex).map((d) => s.getRow(d.rowIndex)).forEach(a), i;
29912      if (this.colModel.isPivotMode())
29913        return o ? s.forEachPivotNode(a, !0) : n ? s.forEachNodeAfterFilterAndSort(a, !0) : s.forEachNode(a), i;
29914      if (e.onlySelectedAllPages || r) {
29915        const d = this.beans.selectionSvc?.getSelectedNodes() ?? [];
29916        this.replicateSortedOrder(d), d.forEach(a);
29917      } else
29918        l === "all" ? s.forEachNode(a) : o || n ? s.forEachNodeAfterFilterAndSort(a, !0) : s.forEachNode(a);
29919      return i;
29920    };
29921  }
29922  replicateSortedOrder(e) {
29923    const { sortSvc: t, rowNodeSorter: i } = this.beans;
29924    if (!t || !i)
29925      return;
29926    const s = t.getSortOptions(), o = (n, r) => n.rowIndex != null && r.rowIndex != null ? n.rowIndex - r.rowIndex : n.level === r.level ? n.parent?.id === r.parent?.id ? i.compareRowNodes(
29927      s,
29928      {
29929        rowNode: n,
29930        currentPos: n.rowIndex ?? -1
29931      },
29932      {
29933        rowNode: r,
29934        currentPos: r.rowIndex ?? -1
29935      }
29936    ) : o(n.parent, r.parent) : n.level > r.level ? o(n.parent, r) : o(n, r.parent);
29937    e.sort(o);
29938  }
29939  processPinnedBottomRows(e, t) {
29940    return (i) => {
29941      const s = this.processRow.bind(this, i, e, t);
29942      return e.rowPositions ? e.rowPositions.filter((o) => o.rowPinned === "bottom").sort((o, n) => o.rowIndex - n.rowIndex).map((o) => this.pinnedRowModel?.getPinnedBottomRow(o.rowIndex)).forEach(s) : this.pinnedRowModel?.forEachPinnedRow("bottom", s), i;
29943    };
29944  }
29945  getColumnsToExport(e = !1, t = !1, i) {
29946    const { colModel: s, gos: o, visibleCols: n } = this, r = s.isPivotMode();
29947    if (i && i.length)
29948      return s.getColsForKeys(i);
29949    const a = o.get("treeData");
29950    let l = [];
29951    return e && !r ? l = s.getCols() : l = n.allCols, l = l.filter(
29952      (d) => !Qe(d) && (t && !a ? !Un(d) : !0)
29953    ), l;
29954  }
29955  recursivelyAddHeaderGroups(e, t, i) {
29956    const s = [];
29957    e.forEach((o) => {
29958      const n = o;
29959      n.getChildren && n.getChildren().forEach((r) => s.push(r));
29960    }), e.length > 0 && ee(e[0]) && this.doAddHeaderHeader(t, e, i), s && s.length > 0 && this.recursivelyAddHeaderGroups(
29961      s,
29962      t,
29963      i
29964    );
29965  }
29966  doAddHeaderHeader(e, t, i) {
29967    const s = e.onNewHeaderGroupingRow();
29968    let o = 0;
29969    t.forEach((n) => {
29970      const r = n;
29971      let a;
29972      i ? a = i(
29973        this.gos.addGridCommonParams({
29974          columnGroup: r
29975        })
29976      ) : a = this.beans.colNames.getDisplayNameForColumnGroup(r, "header");
29977      const l = r.getLeafColumns().reduce((d, c, u, h) => {
29978        let g = W(d);
29979        return c.getColumnGroupShow() === "open" ? (!g || g[1] != null) && (g = [u], d.push(g)) : g && g[1] == null && (g[1] = u - 1), u === h.length - 1 && g && g[1] == null && (g[1] = u), d;
29980      }, []);
29981      s.onColumn(
29982        r,
29983        a || "",
29984        o++,
29985        r.getLeafColumns().length - 1,
29986        l
29987      );
29988    });
29989  }
29990}, DR = {
29991  moduleName: "SharedExport",
29992  version: I,
29993  beans: [ER]
29994}, ka = `\r
29995`, AR = class extends kb {
29996  constructor(e) {
29997    super(e), this.isFirstLine = !0, this.result = "";
29998    const { suppressQuotes: t, columnSeparator: i } = e;
29999    this.suppressQuotes = t, this.columnSeparator = i;
30000  }
30001  addCustomContent(e) {
30002    e && (typeof e == "string" ? (/^\s*\n/.test(e) || this.beginNewLine(), e = e.replace(/\r?\n/g, ka), this.result += e) : e.forEach((t) => {
30003      this.beginNewLine(), t.forEach((i, s) => {
30004        s !== 0 && (this.result += this.columnSeparator), this.result += this.putInQuotes(i.data.value || ""), i.mergeAcross && this.appendEmptyCells(i.mergeAcross);
30005      });
30006    }));
30007  }
30008  onNewHeaderGroupingRow() {
30009    return this.beginNewLine(), {
30010      onColumn: this.onNewHeaderGroupingRowColumn.bind(this)
30011    };
30012  }
30013  onNewHeaderGroupingRowColumn(e, t, i, s) {
30014    i != 0 && (this.result += this.columnSeparator), this.result += this.putInQuotes(t), this.appendEmptyCells(s);
30015  }
30016  appendEmptyCells(e) {
30017    for (let t = 1; t <= e; t++)
30018      this.result += this.columnSeparator + this.putInQuotes("");
30019  }
30020  onNewHeaderRow() {
30021    return this.beginNewLine(), {
30022      onColumn: this.onNewHeaderRowColumn.bind(this)
30023    };
30024  }
30025  onNewHeaderRowColumn(e, t) {
30026    t != 0 && (this.result += this.columnSeparator), this.result += this.putInQuotes(this.extractHeaderValue(e));
30027  }
30028  onNewBodyRow() {
30029    return this.beginNewLine(), {
30030      onColumn: this.onNewBodyRowColumn.bind(this)
30031    };
30032  }
30033  onNewBodyRowColumn(e, t, i) {
30034    t != 0 && (this.result += this.columnSeparator);
30035    const s = this.extractRowCellValue(e, t, t, "csv", i);
30036    this.result += this.putInQuotes(s.valueFormatted ?? s.value);
30037  }
30038  putInQuotes(e) {
30039    if (this.suppressQuotes)
30040      return e;
30041    if (e == null)
30042      return '""';
30043    let t;
30044    return typeof e == "string" ? t = e : typeof e.toString == "function" ? t = e.toString() : (x(53), t = ""), '"' + t.replace(/"/g, '""') + '"';
30045  }
30046  parse() {
30047    return this.result;
30048  }
30049  beginNewLine() {
30050    this.isFirstLine || (this.result += ka), this.isFirstLine = !1;
30051  }
30052}, TR = class extends Ib {
30053  constructor() {
30054    super(...arguments), this.beanName = "csvCreator";
30055  }
30056  wireBeans(e) {
30057    this.colModel = e.colModel, this.colNames = e.colNames, this.rowGroupColsSvc = e.rowGroupColsSvc, this.valueSvc = e.valueSvc;
30058  }
30059  getMergedParams(e) {
30060    const t = this.gos.get("defaultCsvExportParams");
30061    return Object.assign({}, t, e);
30062  }
30063  export(e) {
30064    if (this.isExportSuppressed()) {
30065      x(51);
30066      return;
30067    }
30068    const t = this.getMergedParams(e), i = this.getData(t), s = new Blob(["\uFEFF", i], { type: "text/plain" }), o = typeof t.fileName == "function" ? t.fileName(this.gos.getGridCommonParams()) : t.fileName;
30069    Lb(this.getFileName(o), s);
30070  }
30071  exportDataAsCsv(e) {
30072    this.export(e);
30073  }
30074  getDataAsCsv(e, t = !1) {
30075    const i = t ? Object.assign({}, e) : this.getMergedParams(e);
30076    return this.getData(i);
30077  }
30078  getDefaultFileExtension() {
30079    return "csv";
30080  }
30081  createSerializingSession(e) {
30082    const { colModel: t, colNames: i, rowGroupColsSvc: s, valueSvc: o, gos: 
30082n } = this, {
30083      processCellCallback: r,
30084      processHeaderCallback: a,
30085      processGroupHeaderCallback: l,
30086      processRowGroupCallback: d,
30087      suppressQuotes: c,
30088      columnSeparator: u
30089    } = e;
30090    return new AR({
30091      colModel: t,
30092      colNames: i,
30093      valueSvc: o,
30094      gos: n,
30095      processCellCallback: r || void 0,
30096      processHeaderCallback: a || void 0,
30097      processGroupHeaderCallback: l || void 0,
30098      processRowGroupCallback: d || void 0,
30099      suppressQuotes: c || !1,
30100      columnSeparator: u || ",",
30101      rowGroupColsSvc: s
30102    });
30103  }
30104  isExportSuppressed() {
30105    return this.gos.get("suppressCsvExport");
30106  }
30107};
30108function MR(e, t) {
30109  return e.csvCreator?.getDataAsCsv(t);
30110}
30111function IR(e, t) {
30112  e.csvCreator?.exportDataAsCsv(t);
30113}
30114var kR = {
30115  moduleName: "CsvExport",
30116  version: I,
30117  beans: [TR],
30118  apiFunctions: {
30119    getDataAsCsv: MR,
30120    exportDataAsCsv: IR
30121  },
30122  dependsOn: [DR]
30123}, LR = class extends y {
30124  constructor(e, t, i) {
30125    super(), this.id = e, this.parentCache = t, this.params = i, this.state = "needsLoading", this.version = 0, this.startRow = e * i.blockSize, this.endRow = this.startRow + i.blockSize;
30126  }
30127  load() {
30128    this.state = "loading", this.loadFromDatasource();
30129  }
30130  setStateWaitingToLoad() {
30131    this.version++, this.state = "needsLoading";
30132  }
30133  pageLoadFailed(e) {
30134    this.isRequestMostRecentAndLive(e) && (this.state = "failed"), this.dispatchLocalEvent({ type: "loadComplete" });
30135  }
30136  pageLoaded(e, t, i) {
30137    this.successCommon(e, { rowData: t, rowCount: i });
30138  }
30139  isRequestMostRecentAndLive(e) {
30140    const t = e === this.version, i = this.isAlive();
30141    return t && i;
30142  }
30143  successCommon(e, t) {
30144    this.dispatchLocalEvent({ type: "loadComplete" }), this.isRequestMostRecentAndLive(e) && (this.state = "loaded", this.processServerResult(t));
30145  }
30146  postConstruct() {
30147    this.rowNodes = [];
30148    const {
30149      params: { blockSize: e, rowHeight: t },
30150      startRow: i,
30151      beans: s,
30152      rowNodes: o
30153    } = this;
30154    for (let n = 0; n < e; n++) {
30155      const r = i + n, a = new wi(s);
30156      a.setRowHeight(t), a.uiLevel = 0, a.setRowIndex(r), a.setRowTop(t * r), o.push(a);
30157    }
30158  }
30159  getBlockStateJson() {
30160    const { id: e, startRow: t, endRow: i, state: s } = this;
30161    return {
30162      id: "" + e,
30163      state: {
30164        blockNumber: e,
30165        startRow: t,
30166        endRow: i,
30167        pageStatus: s
30168      }
30169    };
30170  }
30171  setDataAndId(e, t, i) {
30172    A(t) ? e.setDataAndId(t, i.toString()) : e.setDataAndId(void 0, void 0);
30173  }
30174  loadFromDatasource() {
30175    const e = this.createLoadParams();
30176    if (Y(this.params.datasource.getRows)) {
30177      x(90);
30178      return;
30179    }
30180    window.setTimeout(() => {
30181      this.params.datasource.getRows(e);
30182    }, 0);
30183  }
30184  createLoadParams() {
30185    const {
30186      startRow: e,
30187      endRow: t,
30188      version: i,
30189      params: { sortModel: s, filterModel: o },
30190      gos: n
30191    } = this;
30192    return {
30193      startRow: e,
30194      endRow: t,
30195      successCallback: this.pageLoaded.bind(this, i),
30196      failCallback: this.pageLoadFailed.bind(this, i),
30197      sortModel: s,
30198      filterModel: o,
30199      context: n.getGridCommonParams().context
30200    };
30201  }
30202  forEachNode(e, t, i) {
30203    this.rowNodes.forEach((s, o) => {
30204      this.startRow + o < i && e(s, t.value++);
30205    });
30206  }
30207  getRow(e, t = !1) {
30208    t || (this.lastAccessed = this.params.lastAccessedSequence.value++);
30209    const i = e - this.startRow;
30210    return this.rowNodes[i];
30211  }
30212  processServerResult(e) {
30213    const { rowNodes: t, beans: i } = this;
30214    t.forEach((o, n) => {
30215      const r = e.rowData ? e.rowData[n] : void 0;
30216      !o.id && o.alreadyRendered && r && (t[n] = new wi(i), t[n].setRowIndex(o.rowIndex), t[n].setRowTop(o.rowTop), t[n].setRowHeight(o.rowHeight), o.clearRowTopAndRowIndex()), this.setDataAndId(t[n], r, this.startRow + n);
30217    });
30218    const s = e.rowCount != null && e.rowCount >= 0 ? e.rowCount : void 0;
30219    this.parentCache.pageLoaded(this, s);
30220  }
30221  destroy() {
30222    this.rowNodes.forEach((e) => {
30223      e.clearRowTopAndRowIndex();
30224    }), super.destroy();
30225  }
30226}, OR = 2, GR = class extends y {
30227  constructor(e) {
30228    super(), this.params = e, this.lastRowIndexKnown = !1, this.blocks = {}, this.blockCount = 0, this.rowCount = e.initialRowCount;
30229  }
30230  // the rowRenderer will not pass dontCreatePage, meaning when rendering the grid,
30231  // it will want new pages in the cache as it asks for rows. only when we are inserting /
30232  // removing rows via the api is dontCreatePage set, where we move rows between the pages.
30233  getRow(e, t = !1) {
30234    const i = Math.floor(e / this.params.blockSize);
30235    let s = this.blocks[i];
30236    if (!s) {
30237      if (t)
30238        return;
30239      s = this.createBlock(i);
30240    }
30241    return s.getRow(e);
30242  }
30243  createBlock(e) {
30244    const t = this.params, i = this.createBean(new LR(e, this, t));
30245    return this.blocks[i.id] = i, this.blockCount++, this.purgeBlocksIfNeeded(i), t.rowNodeBlockLoader.addBlock(i), i;
30246  }
30247  // we have this on infinite row model only, not server side row model,
30248  // because for server side, it would leave the children in inconsistent
30249  // state - eg if a node had children, but after the refresh it had data
30250  // for a different row, then the children would be with the wrong row node.
30251  refreshCache() {
30252    if (this.blockCount == 0) {
30253      this.purgeCache();
30254      return;
30255    }
30256    this.getBlocksInOrder().forEach((t) => t.setStateWaitingToLoad()), this.params.rowNodeBlockLoader.checkBlockToLoad();
30257  }
30258  destroy() {
30259    this.getBlocksInOrder().forEach((e) => this.destroyBlock(e)), super.destroy();
30260  }
30261  getRowCount() {
30262    return this.rowCount;
30263  }
30264  isLastRowIndexKnown() {
30265    return this.lastRowIndexKnown;
30266  }
30267  // block calls this, when page loaded
30268  pageLoaded(e, t) {
30269    this.isAlive() && (bt(this.gos, `InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`), this.checkRowCount(e, t), this.onCacheUpdated());
30270  }
30271  purgeBlocksIfNeeded(e) {
30272    const t = this.getBlocksInOrder().filter((r) => r != e), i = (r, a) => a.lastAccessed - r.lastAccessed;
30273    t.sort(i);
30274    const s = this.params.maxBlocksInCache > 0, o = s ? this.params.maxBlocksInCache - 1 : null, n = OR - 1;
30275    t.forEach((r, a) => {
30276      const l = r.state === "needsLoading" && a >= n, d = s ? a >= o : !1;
30277      if (l || d) {
30278        if (this.isBlockCurrentlyDisplayed(r) || this.isBlockFocused(r))
30279          return;
30280        this.removeBlockFromCache(r);
30281      }
30282    });
30283  }
30284  isBlockFocused(e) {
30285    const t = this.beans.focusSvc.getFocusCellToUseAfterRefresh();
30286    if (!t || t.rowPinned != null)
30287      return !1;
30288    const { startRow: i, endRow: s } = e;
30289    return t.rowIndex >= i && t.rowIndex < s;
30290  }
30291  isBlockCurrentlyDisplayed(e) {
30292    const { startRow: t, endRow: i } = e;
30293    return this.beans.rowRenderer.isRangeInRenderedViewport(t, i - 1);
30294  }
30295  removeBlockFromCache(e) {
30296    e && this.destroyBlock(e);
30297  }
30298  checkRowCount(e, t) {
30299    if (typeof t == "number" && t >= 0)
30300      this.rowCount = t, this.lastRowIndexKnown = !0;
30301    else if (!this.lastRowIndexKnown) {
30302      const { blockSize: i, overflowSize: s } = this.params, n = (e.id + 1) * i + s;
30303      this.rowCount < n && (this.rowCount = n);
30304    }
30305  }
30306  setRowCount(e, t) {
30307    this.rowCount = e, A(t) && (this.lastRowIndexKnown = t), this.lastRowIndexKnown || this.rowCount % this.params.blockSize === 0 && this.rowCount++, this.onCacheUpdated();
30308  }
30309  forEachNodeDeep(e) {
30310    const t = { value: 0 };
30311    this.getBlocksInOrder().forEach((i) => i.forEachNode(e, t, this.rowCount));
30312  }
30313  getBlocksInOrder() {
30314    const e = (i, s) => i.id - s.id;
30315    return Object.values(this.blocks).sort(e);
30316  }
30317  destroyBlock(e) {
30318    delete this.blocks[e.id], this.destroyBean(e), this.blockCount--, this.params.rowNodeBlockLoader.removeBlock(e);
30319  }
30320  // gets called 1) row count changed 2) cache purged 3) items inserted
30321  onCacheUpdated() {
30322    this.isAlive() && (this.destroyAllBlocksPastVirtualRowCount(), this.eventSvc.dispatchEvent({
30323      type: "storeUpdated"
30324    }));
30325  }
30326  destroyAllBlocksPastVirtualRowCount() {
30327    const e = [];
30328    this.getBlocksInOrder().forEach((t) => {
30329      t.id * this.params.blockSize >= this.rowCount && e.push(t);
30330    }), e.length > 0 && e.forEach((t) => this.destroyBlock(t));
30331  }
30332  purgeCache() {
30333    this.getBlocksInOrder().forEach((e) => this.removeBlockFromCache(e)), this.lastRowIndexKnown = !1, this.rowCount === 0 && (this.rowCount = this.params.initialRowCount), this.onCacheUpdated();
30334  }
30335  getRowNodesInRange(e, t) {
30336    const i = [];
30337    let s = -1, o = !1;
30338    const n = { value: 0 };
30339    let r = !1;
30340    return this.getBlocksInOrder().forEach((l) => {
30341      if (!r) {
30342        if (o && s + 1 !== l.id) {
30343          r = !0;
30344          return;
30345        }
30346        s = l.id, l.forEachNode(
30347          (d) => {
30348            const c = d === e || d === t;
30349            (o || c) && i.push(d), c && (o = !o);
30350          },
30351          n,
30352          this.rowCount
30353        );
30354      }
30355    }), r || o ? [] : i;
30356  }
30357}, HR = class extends y {
30358  constructor() {
30359    super(...arguments), this.beanName = "rowModel";
30360  }
30361  getRowBounds(e) {
30362    return {
30363      rowHeight: this.rowHeight,
30364      rowTop: this.rowHeight * e
30365    };
30366  }
30367  // we don't implement as lazy row heights is not supported in this row model
30368  ensureRowHeightsValid() {
30369    return !1;
30370  }
30371  postConstruct() {
30372    this.gos.get("rowModelType") === "infinite" && (this.rowHeight = kt(this.beans), this.addEventListeners(), this.addDestroyFunc(() => this.destroyCache()));
30373  }
30374  start() {
30375    this.setDatasource(this.gos.get("datasource"));
30376  }
30377  destroy() {
30378    this.destroyDatasource(), super.destroy();
30379  }
30380  destroyDatasource() {
30381    this.datasource && (this.destroyBean(this.datasource), this.beans.rowRenderer.datasourceChanged(), this.datasource = null);
30382  }
30383  addEventListeners() {
30384    this.addManagedEventListeners({
30385      filterChanged: this.reset.bind(this),
30386      sortChanged: this.reset.bind(this),
30387      newColumnsLoaded: this.onColumnEverything.bind(this),
30388      storeUpdated: this.dispatchModelUpdatedEvent.bind(this)
30389    }), this.addManagedPropertyListener("datasource", () => this.setDatasource(this.gos.get("datasource"))), this.addManagedPropertyListener("cacheBlockSize", () => this.resetCache()), this.addManagedPropertyListener("rowHeight", () => {
30390      this.rowHeight = kt(this.beans), this.cacheParams.rowHeight = this.rowHeight, this.updateRowHeights();
30391    });
30392  }
30393  onColumnEverything() {
30394    let e;
30395    this.cacheParams ? e = !Zi(this.cacheParams.sortModel, this.beans.sortSvc?.getSortModel() ?? []) : e = !0, e && this.reset();
30396  }
30397  getType() {
30398    return "infinite";
30399  }
30400  setDatasource(e) {
30401    this.destroyDatasource(), this.datasource = e, e && this.reset();
30402  }
30403  isEmpty() {
30404    return !this.infiniteCache;
30405  }
30406  isRowsToRender() {
30407    return !!this.infiniteCache;
30408  }
30409  getNodesInRangeForSelection(e, t) {
30410    return this.infiniteCache?.getRowNodesInRange(e, t) ?? [];
30411  }
30412  reset() {
30413    if (!this.datasource)
30414      return;
30415    fi(this.gos) != null || this.beans.selectionSvc?.reset("rowDataChanged"), this.resetCache();
30416  }
30417  dispatchModelUpdatedEvent() {
30418    this.eventSvc.dispatchEvent({
30419      type: "modelUpdated",
30420      // not sure if these should all be false - noticed if after implementing,
30421      // maybe they should be true?
30422      newPage: !1,
30423      newPageSize: !1,
30424      newData: !1,
30425      keepRenderedRows: !0,
30426      animate: !1
30427    });
30428  }
30429  resetCache() {
30430    this.destroyCache();
30431    const e = this.beans, { filterManager: t, sortSvc: i, rowNodeBlockLoader: s, eventSvc: o, gos: 
30431n } = e;
30432    this.cacheParams = {
30433      // the user provided datasource
30434      datasource: this.datasource,
30435      // sort and filter model
30436      filterModel: t?.getFilterModel() ?? {},
30437      sortModel: i?.getSortModel() ?? [],
30438      rowNodeBlockLoader: s,
30439      // properties - this way we take a snapshot of them, so if user changes any, they will be
30440      // used next time we create a new cache, which is generally after a filter or sort change,
30441      // or a new datasource is set
30442      initialRowCount: n.get("infiniteInitialRowCount"),
30443      maxBlocksInCache: n.get("maxBlocksInCache"),
30444      rowHeight: kt(e),
30445      // if user doesn't provide overflow, we use default overflow of 1, so user can scroll past
30446      // the current page and request first row of next page
30447      overflowSize: n.get("cacheOverflowSize"),
30448      // page size needs to be 1 or greater. having it at 1 would be silly, as you would be hitting the
30449      // server for one page at a time. so the default if not specified is 100.
30450      blockSize: n.get("cacheBlockSize"),
30451      // the cache could create this, however it is also used by the pages, so handy to create it
30452      // here as the settings are also passed to the pages
30453      lastAccessedSequence: { value: 0 }
30454    }, this.infiniteCache = this.createBean(new GR(this.cacheParams)), o.dispatchEventOnce({
30455      type: "rowCountReady"
30456    }), this.dispatchModelUpdatedEvent();
30457  }
30458  updateRowHeights() {
30459    this.forEachNode((e) => {
30460      e.setRowHeight(this.rowHeight), e.setRowTop(this.rowHeight * e.rowIndex);
30461    }), this.dispatchModelUpdatedEvent();
30462  }
30463  destroyCache() {
30464    this.infiniteCache = this.destroyBean(this.infiniteCache);
30465  }
30466  getRow(e) {
30467    const t = this.infiniteCache;
30468    if (t && !(e >= t.getRowCount()))
30469      return t.getRow(e);
30470  }
30471  getRowNode(e) {
30472    let t;
30473    return this.forEachNode((i) => {
30474      i.id === e && (t = i);
30475    }), t;
30476  }
30477  forEachNode(e) {
30478    this.infiniteCache?.forEachNodeDeep(e);
30479  }
30480  getTopLevelRowCount() {
30481    return this.getRowCount();
30482  }
30483  getTopLevelRowDisplayedIndex(e) {
30484    return e;
30485  }
30486  getRowIndexAtPixel(e) {
30487    if (this.rowHeight !== 0) {
30488      const t = Math.floor(e / this.rowHeight), i = this.getRowCount() - 1;
30489      return t > i ? i : t;
30490    }
30491    return 0;
30492  }
30493  getRowCount() {
30494    return this.infiniteCache ? this.infiniteCache.getRowCount() : 0;
30495  }
30496  isRowPresent(e) {
30497    return !!this.getRowNode(e.id);
30498  }
30499  refreshCache() {
30500    this.infiniteCache?.refreshCache();
30501  }
30502  purgeCache() {
30503    this.infiniteCache?.purgeCache();
30504  }
30505  // for iRowModel
30506  isLastRowIndexKnown() {
30507    return this.infiniteCache?.isLastRowIndexKnown() ?? !1;
30508  }
30509  setRowCount(e, t) {
30510    this.infiniteCache?.setRowCount(e, t);
30511  }
30512};
30513function BR(e) {
30514  io(e)?.refreshCache();
30515}
30516function NR(e) {
30517  io(e)?.purgeCache();
30518}
30519function VR(e) {
30520  return io(e)?.getRowCount();
30521}
30522var WR = class extends y {
30523  constructor() {
30524    super(...arguments), this.beanName = "rowNodeBlockLoader", this.activeBlockLoadsCount = 0, this.blocks = [], this.active = !0;
30525  }
30526  postConstruct() {
30527    this.maxConcurrentRequests = hg(this.gos);
30528    const e = this.gos.get("blockLoadDebounceMillis");
30529    e && e > 0 && (this.checkBlockToLoadDebounce = Ce(
30530      this,
30531      this.performCheckBlocksToLoad.bind(this),
30532      e
30533    ));
30534  }
30535  addBlock(e) {
30536    this.blocks.push(e), e.addEventListener("loadComplete", this.loadComplete.bind(this)), this.checkBlockToLoad();
30537  }
30538  removeBlock(e) {
30539    Ve(this.blocks, e);
30540  }
30541  destroy() {
30542    super.destroy(), this.active = !1;
30543  }
30544  loadComplete() {
30545    this.activeBlockLoadsCount--, this.checkBlockToLoad();
30546  }
30547  checkBlockToLoad() {
30548    this.checkBlockToLoadDebounce ? this.checkBlockToLoadDebounce() : this.performCheckBlocksToLoad();
30549  }
30550  performCheckBlocksToLoad() {
30551    if (!this.active)
30552      return;
30553    if (this.printCacheStatus(), this.maxConcurrentRequests != null && this.activeBlockLoadsCount >= this.maxConcurrentRequests) {
30554      bt(this.gos, "RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");
30555      return;
30556    }
30557    const e = this.maxConcurrentRequests != null ? this.maxConcurrentRequests - this.activeBlockLoadsCount : 1, t = this.blocks.filter((i) => i.state === "needsLoading").slice(0, e);
30558    this.activeBlockLoadsCount += t.length, t.forEach((i) => i.load()), this.printCacheStatus();
30559  }
30560  getBlockState() {
30561    const e = {};
30562    return this.blocks.forEach((t) => {
30563      const { id: i, state: s } = t.getBlockStateJson();
30564      e[i] = s;
30565    }), e;
30566  }
30567  printCacheStatus() {
30568    bt(
30569      this.gos,
30570      `RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`
30571    );
30572  }
30573}, zR = {
30574  moduleName: "InfiniteRowModel",
30575  version: I,
30576  rowModels: ["infinite"],
30577  apiFunctions: {
30578    refreshInfiniteCache: BR,
30579    purgeInfiniteCache: NR,
30580    getInfiniteRowCount: VR
30581  },
30582  beans: [HR, WR],
30583  dependsOn: [nR]
30584}, _R = "↑", UR = "↓", $R = class extends _ {
30585  constructor() {
30586    super(), this.refreshCount = 0;
30587    const e = document.createElement("span"), t = document.createElement("span");
30588    t.setAttribute("class", "ag-value-change-delta");
30589    const i = document.createElement("span");
30590    i.setAttribute("class", "ag-value-change-value"), e.appendChild(t), e.appendChild(i), this.setTemplateFromElement(e);
30591  }
30592  init(e) {
30593    this.eValue = this.queryForHtmlElement(".ag-value-change-value"), this.eDelta = this.queryForHtmlElement(".ag-value-change-delta"), this.refresh(e, !0);
30594  }
30595  showDelta(e, t) {
30596    const i = Math.abs(t), s = e.formatValue(i), o = A(s) ? s : i, n = t >= 0, r = this.eDelta;
30597    n ? r.textContent = _R + o : r.textContent = UR + o, r.classList.toggle("ag-value-change-delta-up", n), r.classList.toggle("ag-value-change-delta-down", !n);
30598  }
30599  setTimerToRemoveDelta() {
30600    this.refreshCount++;
30601    const e = this.refreshCount;
30602    this.beans.frameworkOverrides.wrapIncoming(() => {
30603      window.setTimeout(() => {
30604        e === this.refreshCount && this.hideDeltaValue();
30605      }, 2e3);
30606    });
30607  }
30608  hideDeltaValue() {
30609    this.eValue.classList.remove("ag-value-change-value-highlight"), ue(this.eDelta);
30610  }
30611  refresh(e, t = !1) {
30612    const { value: i, valueFormatted: s } = e, { eValue: o, lastValue: n, beans: r } = this;
30613    if (i === n || (A(s) ? o.textContent = s : A(i) ? o.textContent = i : ue(o), r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))
30614      return !1;
30615    if (typeof i == "number" && typeof n == "number") {
30616      const a = i - n;
30617      this.showDelta(e, a);
30618    }
30619    return n && o.classList.add("ag-value-change-value-highlight"), t || this.setTimerToRemoveDelta(), this.lastValue = i, !0;
30620  }
30621}, KR = (
30622  /*css*/
30623  ".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}
30623:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}"
30624), jR = class extends _ {
30625  constructor() {
30626    super(), this.refreshCount = 0;
30627    const e = document.createElement("span"), t = document.createElement("span");
30628    t.setAttribute("class", "ag-value-slide-current"), e.appendChild(t), this.setTemplateFromElement(e), this.eCurrent = this.queryForHtmlElement(".ag-value-slide-current"), this.registerCSS(KR);
30629  }
30630  init(e) {
30631    this.refresh(e, !0);
30632  }
30633  addSlideAnimation() {
30634    this.refreshCount++;
30635    const e = this.refreshCount;
30636    this.ePrevious && this.getGui().removeChild(this.ePrevious);
30637    const { beans: t, eCurrent: i } = this, s = te(t).createElement("span");
30638    s.setAttribute("class", "ag-value-slide-previous ag-value-slide-out"), this.ePrevious = s, s.textContent = i.textContent, this.getGui().insertBefore(s, i), t.frameworkOverrides.wrapIncoming(() => {
30639      window.setTimeout(() => {
30640        e === this.refreshCount && this.ePrevious.classList.add("ag-value-slide-out-end");
30641      }, 50), window.setTimeout(() => {
30642        e === this.refreshCount && (this.getGui().removeChild(this.ePrevious), this.ePrevious = null);
30643      }, 3e3);
30644    });
30645  }
30646  refresh(e, t = !1) {
30647    let i = e.value;
30648    if (Y(i) && (i = ""), i === this.lastValue || this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())
30649      return !1;
30650    t || this.addSlideAnimation(), this.lastValue = i;
30651    const s = this.eCurrent;
30652    return A(e.valueFormatted) ? s.textContent = e.valueFormatted : A(e.value) ? s.textContent = i : ue(s), !0;
30653  }
30654}, qR = class extends y {
30655  constructor() {
30656    super(...arguments), this.beanName = "cellFlashSvc";
30657  }
30658  onFlashCells(e, t) {
30659    if (!e.comp)
30660      return;
30661    const i = wf(e.cellPosition);
30662    t.cells[i] && this.animateCell(e, "highlight");
30663  }
30664  flashCell(e, t) {
30665    this.animateCell(e, "data-changed", t?.flashDuration, t?.fadeDuration);
30666  }
30667  animateCell(e, t, i, s) {
30668    const o = e.comp;
30669    if (!o)
30670      return;
30671    const { gos: n } = this;
30672    if (i || (i = n.get("cellFlashDuration")), i === 0)
30673      return;
30674    A(s) || (s = n.get("cellFadeDuration"));
30675    const r = `ag-cell-${t}`, a = `ag-cell-${t}-animation`;
30676    o.addOrRemoveCssClass(r, !0), o.addOrRemoveCssClass(a, !1);
30677    const { eGui: l } = e;
30678    this.beans.frameworkOverrides.wrapIncoming(() => {
30679      window.setTimeout(() => {
30680        e.isAlive() && (o.addOrRemoveCssClass(r, !1), o.addOrRemoveCssClass(a, !0), l.style.transition = `background-color ${s}ms`, window.setTimeout(() => {
30681          e.isAlive() && (o.addOrRemoveCssClass(a, !1), l.style.transition = "");
30682        }, s));
30683      }, i);
30684    });
30685  }
30686};
30687function YR(e, t = {}) {
30688  const { cellFlashSvc: i } = e;
30689  i && e.frameworkOverrides.wrapIncoming(() => {
30690    e.rowRenderer.getCellCtrls(t.rowNodes, t.columns).forEach((s) => i.flashCell(s, t));
30691  });
30692}
30693var QR = {
30694  moduleName: "HighlightChanges",
30695  version: I,
30696  beans: [qR],
30697  userComponents: {
30698    agAnimateShowChangeCellRenderer: $R,
30699    agAnimateSlideCellRenderer: jR
30700  },
30701  apiFunctions: {
30702    flashCells: YR
30703  }
30704};
30705function ZR(e) {
30706  return e.stateSvc?.getState() ?? {};
30707}
30708function XR(e) {
30709  return e = { ...e }, e.version || (e.version = "32.1.0"), e.version === "32.1.0" && (e = JR(e)), e;
30710}
30711function JR(e) {
30712  return e.cellSelection = eF(e, "rangeSelection"), e;
30713}
30714function eF(e, t) {
30715  if (e && typeof e == "object")
30716    return e[t];
30717}
30718var tF = class extends y {
30719  constructor() {
30720    super(...arguments), this.beanName = "stateSvc", this.updateRowGroupExpansionStateTimer = 0, this.suppressEvents = !0, this.queuedUpdateSources = /* @__PURE__ */ new Set(), this.dispatchStateUpdateEventDebounced = Ce(this, () => this.dispatchQueuedStateUpdateEvents(), 0), this.onRowGroupOpenedDebounced = Ce(
30721      this,
30722      () => {
30723        this.updateCachedState("rowGroupExpansion", this.getRowGroupExpansionState());
30724      },
30725      0
30726    ), this.onRowSelectedDebounced = Ce(
30727      this,
30728      () => {
30729        this.staleStateKeys.delete("rowSelection"), this.updateCachedState("rowSelection", this.getRowSelectionState());
30730      },
30731      0
30732    ), this.staleStateKeys = /* @__PURE__ */ new Set();
30733  }
30734  postConstruct() {
30735    this.isClientSideRowModel = me(this.gos), this.cachedState = this.getInitialState(), this.setCachedStateValue("version", I);
30736    const e = this.suppressEventsAndDispatchInitEvent.bind(this);
30737    this.beans.ctrlsSvc.whenReady(
30738      this,
30739      () => e(() => this.setupStateOnGridReady())
30740    );
30741    const [t, i, s] = this.addManagedEventListeners({
30742      newColumnsLoaded: ({ source: o }) => {
30743        o === "gridInitializing" && (t(), e(() => this.setupStateOnColumnsInitialised()));
30744      },
30745      rowCountReady: () => {
30746        i?.(), e(() => this.setupStateOnRowCountReady());
30747      },
30748      firstDataRendered: () => {
30749        s?.(), e(() => this.setupStateOnFirstDataRendered());
30750      }
30751    });
30752  }
30753  destroy() {
30754    super.destroy(), clearTimeout(this.updateRowGroupExpansionStateTimer), this.queuedUpdateSources.clear();
30755  }
30756  getInitialState() {
30757    return XR(this.gos.get("initialState") ?? {});
30758  }
30759  getState() {
30760    return this.staleStateKeys.size && this.refreshStaleState(), this.cachedState;
30761  }
30762  setupStateOnGridReady() {
30763    const e = () => this.updateCachedState("sideBar", this.getSideBarState());
30764    e(), this.addManagedEventListeners({
30765      toolPanelVisibleChanged: e,
30766      sideBarUpdated: e
30767    });
30768  }
30769  setupStateOnColumnsInitialised() {
30770    const e = this.getInitialState();
30771    this.setColumnState(e), this.setColumnGroupState(e), this.updateColumnState([
30772      "aggregation",
30773      "columnOrder",
30774      "columnPinning",
30775      "columnSizing",
30776      "columnVisibility",
30777      "pivot",
30778      "pivot",
30779      "rowGroup",
30780      "sort"
30781    ]), this.updateCachedState("columnGroup", this.getColumnGroupState());
30782    const t = (i) => () => this.updateColumnState([i]);
30783    this.addManagedEventListeners({
30784      columnValueChanged: t("aggregation"),
30785      columnMoved: t("columnOrder"),
30786      columnPinned: t("columnPinning"),
30787      columnResized: t("columnSizing"),
30788      columnVisible: t("columnVisibility"),
30789      columnPivotChanged: t("pivot"),
30790      columnPivotModeChanged: t("pivot"),
30791      columnRowGroupChanged: t("rowGroup"),
30792      sortChanged: t("sort"),
30793      newColumnsLoaded: () => this.updateColumnState([
30794        "aggregation",
30795        "columnOrder",
30796        "columnPinning",
30797        "columnSizing",
30798        "columnVisibility",
30799        "pivot",
30800        "rowGroup",
30801        "sort"
30802      ]),
30803      columnGroupOpened: () => this.updateCachedState("columnGroup", this.getColumnGroupState())
30804    });
30805  }
30806  setupStateOnRowCountReady() {
30807    const {
30808      filter: e,
30809      rowGroupExpansion: t,
30810      rowSelection: i,
30811      pagination: s
30812    } = this.getInitialState();
30813    e && this.setFilterState(e), t && this.setRowGroupExpansionState(t), i && this.setRowSelectionState(i), s && this.setPaginationState(s);
30814    const o = this.updateCachedState.bind(this);
30815    o("filter", this.getFilterState()), o("rowGroupExpansion", this.getRowGroupExpansionState()), o("rowSelection", this.getRowSelectionState()), o("pagination", this.getPaginationState());
30816    const n = () => {
30817      this.updateRowGroupExpansionStateTimer = 0, o("rowGroupExpansion", this.getRowGroupExpansionState());
30818    };
30819    this.addManagedEventListeners({
30820      filterChanged: () => o("filter", this.getFilterState()),
30821      rowGroupOpened: () => this.onRowGroupOpenedDebounced(),
30822      expandOrCollapseAll: n,
30823      // `groupDefaultExpanded` updates expansion state without an expansion event
30824      columnRowGroupChanged: n,
30825      rowDataUpdated: () => {
30826        this.gos.get("groupDefaultExpanded") !== 0 && (this.updateRowGroupExpansionStateTimer || (this.updateRowGroupExpansionStateTimer = setTimeout(n)));
30827      },
30828      selectionChanged: () => {
30829        this.staleStateKeys.add("rowSelection"), this.onRowSelectedDebounced();
30830      },
30831      paginationChanged: (r) => {
30832        (r.newPage || r.newPageSize) && o("pagination", this.getPaginationState());
30833      }
30834    });
30835  }
30836  setupStateOnFirstDataRendered() {
30837    const {
30838      scroll: e,
30839      cellSelection: t,
30840      focusedCell: i,
30841      columnOrder: s
30842    } = this.getInitialState();
30843    i && this.setFocusedCellState(i), t && this.setCellSelectionState(t), e && this.setScrollState(e), this.setColumnPivotState(!!s?.orderedColIds);
30844    const o = this.updateCachedState.bind(this);
30845    o("sideBar", this.getSideBarState()), o("focusedCell", this.getFocusedCellState());
30846    const n = this.getRangeSelectionState();
30847    o("rangeSelection", n), o("cellSelection", n), o("scroll", this.getScrollState()), this.addManagedEventListeners({
30848      cellFocused: () => o("focusedCell", this.getFocusedCellState()),
30849      cellSelectionChanged: (r) => {
30850        if (r.finished) {
30851          const a = this.getRangeSelectionState();
30852          o("rangeSelection", a), o("cellSelection", a);
30853        }
30854      },
30855      bodyScrollEnd: () => o("scroll", this.getScrollState())
30856    });
30857  }
30858  getColumnState() {
30859    const e = this.beans, t = e.colModel.isPivotMode(), i = [], s = [], o = [], n = [], r = [], a = [], l = [], d = [], c = [];
30860    let u = 0;
30861    const h = es(e);
30862    for (let g = 0; g < h.length; g++) {
30863      const {
30864        colId: p,
30865        sort: f,
30866        sortIndex: m,
30867        rowGroup: C,
30868        rowGroupIndex: w,
30869        aggFunc: S,
30870        pivot: v,
30871        pivotIndex: P,
30872        pinned: T,
30873        hide: D,
30874        width: R,
30875        flex: E
30876      } = h[g];
30877      c.push(p), f && (i[m ?? u++] = { colId: p, sort: f }), C && (s[w ?? 0] = p), typeof S == "string" && o.push({ colId: p, aggFunc: S }), v && (n[P ?? 0] = p), T && (T === "right" ? a : r).push(p), D && l.push(p), (E || R) && d.push({ colId: p, flex: E ?? void 0, width: R });
30878    }
30879    return {
30880      sort: i.length ? { sortModel: i } : void 0,
30881      rowGroup: s.length ? { groupColIds: s } : void 0,
30882      aggregation: o.length ? { aggregationModel: o } : void 0,
30883      pivot: n.length || t ? { pivotMode: t, pivotColIds: n } : void 0,
30884      columnPinning: r.length || a.length ? { leftColIds: r, rightColIds: a } : void 0,
30885      columnVisibility: l.length ? { hiddenColIds: l } : void 0,
30886      columnSizing: d.length ? { columnSizingModel: d } : void 0,
30887      columnOrder: c.length ? { orderedColIds: c } : void 0
30888    };
30889  }
30890  setColumnState(e) {
30891    const {
30892      sort: t,
30893      rowGroup: i,
30894      aggregation: s,
30895      pivot: o,
30896      columnPinning: n,
30897      columnVisibility: r,
30898      columnSizing: a,
30899      columnOrder: l,
30900      partialColumnState: d
30901    } = e, c = {}, u = (m) => {
30902      let C = c[m];
30903      return C || (C = { colId: m }, c[m] = C, C);
30904    }, h = d ? {} : {
30905      sort: null,
30906      sortIndex: null,
30907      rowGroup: null,
30908      rowGroupIndex: null,
30909      aggFunc: null,
30910      pivot: null,
30911      pivotIndex: null,
30912      pinned: null,
30913      hide: null,
30914      flex: null
30915    };
30916    t && (t.sortModel.forEach(({ colId: m, sort: C }, w) => {
30917      const S = u(m);
30918      S.sort = C, S.sortIndex = w;
30919    }), h.sort = null, h.sortIndex = null), i && (i.groupColIds.forEach((m, C) => {
30920      const w = u(m);
30921      w.rowGroup = !0, w.rowGroupIndex = C;
30922    }), h.rowGroup = null, h.rowGroupIndex = null), s && (s.aggregationModel.forEach(({ colId: m, aggFunc: C }) => {
30923      u(m).aggFunc = C;
30924    }), h.aggFunc = null), o && (o.pivotColIds.forEach((m, C) => {
30925      const w = u(m);
30926      w.pivot = !0, w.pivotIndex = C;
30927    }), this.gos.updateGridOptions({
30928      options: { pivotMode: o.pivotMode },
30929      source: "gridInitializing"
30930    }), h.pivot = null, h.pivotIndex = null), n && (n.leftColIds.forEach((m) => {
30931      u(m).pinned = "left";
30932    }), n.rightColIds.forEach((m) => {
30933      u(m).pinned = "right";
30934    }), h.pinned = null), r && (r.hiddenColIds.forEach((m) => {
30935      u(m).hide = !0;
30936    }), h.hide = null), a && (a.columnSizingModel.forEach(({ colId: m, flex: C, width: w }) => {
30937      const S = u(m);
30938      S.flex = C ?? null, S.width = w;
30939    }), h.flex = null);
30940    const g = l?.orderedColIds, p = !!g?.length, f = p ? g.map((m) => u(m)) : Object.values(c);
30941    f.length && (this.columnStates = f, He(
30942      this.beans,
30943      {
30944        state: f,
30945        applyOrder: p,
30946        defaultState: h
30947      },
30948      "gridInitializing"
30949    ));
30950  }
30951  setColumnPivotState(e) {
30952    const t = this.columnStates;
30953    this.columnStates = void 0;
30954    const i = this.columnGroupStates;
30955    this.columnGroupStates = void 0;
30956    const s = this.beans, { pivotResultCols: o, colGroupSvc: n } = s;
30957    if (o?.isPivotResultColsPresent()) {
30958      if (t) {
30959        const r = [];
30960        for (const a of t)
30961          o.getPivotResultCol(a.colId) && r.push(a);
30962        He(
30963          s,
30964          {
30965            state: r,
30966            applyOrder: e
30967          },
30968          "gridInitializing"
30969        );
30970      }
30971      i && n?.setColumnGroupState(i, "gridInitializing");
30972    }
30973  }
30974  getColumnGroupState() {
30975    const e = this.beans.colGroupSvc;
30976    if (!e)
30977      return;
30978    const t = e.getColumnGroupState(), i = [];
30979    return t.forEach(({ groupId: s, open: o }) => {
30980      o && i.push(s);
30981    }), i.length ? { openColumnGroupIds: i } : void 0;
30982  }
30983  setColumnGroupState(e) {
30984    const t = this.beans.colGroupSvc;
30985    if (!Object.prototype.hasOwnProperty.call(e, "columnGroup") || !t)
30986      return;
30987    const i = new Set(e.columnGroup?.openColumnGroupIds), o = t.getColumnGroupState().map(({ groupId: n }) => {
30988      const r = i.has(n);
30989      return r && i.delete(n), {
30990        groupId: n,
30991        open: r
30992      };
30993    });
30994    i.forEach((n) => {
30995      o.push({
30996        groupId: n,
30997        open: !0
30998      });
30999    }), o.length && (this.columnGroupStates = o), t.setColumnGroupState(o, "gridInitializing");
31000  }
31001  getFilterState() {
31002    const e = this.beans.filterManager;
31003    let t = e?.getFilterModel();
31004    t && Object.keys(t).length === 0 && (t = void 0);
31005    const i = e?.getAdvFilterModel() ?? void 0;
31006    return t || i ? { filterModel: t, advancedFilterModel: i } : void 0;
31007  }
31008  setFilterState(e) {
31009    const t = this.beans.filterManager, { filterModel: i, advancedFilterModel: s } = e ?? {};
31010    i && t?.setFilterModel(i, "columnFilter"), s && t?.setAdvFilterModel(s);
31011  }
31012  getRangeSelectionState() {
31013    const e = this.beans.rangeSvc?.getCellRanges().map((t) => {
31014      const { id: i, type: s, startRow: o, endRow: n, columns: r, startColumn: a } = t;
31015      return {
31016        id: i,
31017        type: s,
31018        startRow: o,
31019        endRow: n,
31020        colIds: r.map((l) => l.getColId()),
31021        startColId: a.getColId()
31022      };
31023    });
31024    return e?.length ? { cellRanges: e } : void 0;
31025  }
31026  setCellSelectionState(e) {
31027    const { gos: t, rangeSvc: i, colModel: s, visibleCols: o } = this.beans;
31028    if (!lt(t) || !i)
31029      return;
31030    const n = [];
31031    e.cellRanges.forEach((r) => {
31032      const a = [];
31033      if (r.colIds.forEach((d) => {
31034        const c = s.getCol(d);
31035        c && a.push(c);
31036      }), !a.length)
31037        return;
31038      let l = s.getCol(r.startColId);
31039      if (!l) {
31040        const d = o.allCols, c = new Set(a);
31041        l = d.find((u) => c.has(u));
31042      }
31043      n.push({
31044        ...r,
31045        columns: a,
31046        startColumn: l
31047      });
31048    }), i.setCellRanges(n);
31049  }
31050  getScrollState() {
31051    if (!this.isClientSideRowModel)
31052      return;
31053    const e = this.beans.ctrlsSvc.getScrollFeature(), { left: t } = e?.getHScrollPosition() ?? { left: 0 }, { top: i } = e?.getVScrollPosition() ?? { top: 0 };
31054    return i || t ? {
31055      top: i,
31056      left: t
31057    } : void 0;
31058  }
31059  setScrollState(e) {
31060    if (!this.isClientSideRowModel)
31061      return;
31062    const { top: t, left: i } = e, { frameworkOverrides: s, rowRenderer: o, animationFrameSvc: n, ctrlsSvc: r } = this.beans;
31063    s.wrapIncoming(() => {
31064      r.get("center").setCenterViewportScrollLeft(i), r.getScrollFeature()?.setVerticalScrollPosition(t), o.redraw({ afterScroll: !0 }), n?.flushAllFrames();
31065    });
31066  }
31067  getSideBarState() {
31068    return this.beans.sideBar?.comp?.getState();
31069  }
31070  getFocusedCellState() {
31071    if (!this.isClientSideRowModel)
31072      return;
31073    const e = this.beans.focusSvc.getFocusedCell();
31074    if (e) {
31075      const { column: t, rowIndex: i, rowPinned: s } = e;
31076      return {
31077        colId: t.getColId(),
31078        rowIndex: i,
31079        rowPinned: s
31080      };
31081    }
31082  }
31083  setFocusedCellState(e) {
31084    if (!this.isClientSideRowModel)
31085      return;
31086    const { colId: t, rowIndex: i, rowPinned: s } = e, { focusSvc: o, colModel: n } = this.beans;
31087    o.setFocusedCell({
31088      column: n.getCol(t),
31089      rowIndex: i,
31090      rowPinned: s,
31091      forceBrowserFocus: !0,
31092      preventScrollOnBrowserFocus: !0
31093    });
31094  }
31095  getPaginationState() {
31096    const { pagination: e, gos: t } = this.beans;
31097    if (!e)
31098      return;
31099    const i = e.getCurrentPage(), s = t.get("paginationAutoPageSize") ? void 0 : e.getPageSize();
31100    if (!(!i && !s))
31101      return { page: i, pageSize: s };
31102  }
31103  setPaginationState(e) {
31104    const { pagination: t, gos: i } = this.beans;
31105    t && (e.pageSize && !i.get("paginationAutoPageSize") && t.setPageSize(e.pageSize, "initialState"), typeof e.page == "number" && t.setPage(e.page));
31106  }
31107  getRowSelectionState() {
31108    const e = this.beans.selectionSvc;
31109    if (!e)
31110      return;
31111    const t = e.getSelectionState();
31112    return !t || !Array.isArray(t) && (t.selectAll === !1 || t.selectAllChildren === !1) && !t?.toggledNodes?.length ? void 0 : t;
31113  }
31114  setRowSelectionState(e) {
31115    this.beans.selectionSvc?.setSelectionState(e, "gridInitializing");
31116  }
31117  getRowGroupExpansionState() {
31118    const { expansionSvc: e, rowModel: t } = this.beans;
31119    if (!e)
31120      return;
31121    const i = [];
31122    return t.forEachNode(({ expanded: s, id: o }) => {
31123      s && o && i.push(o);
31124    }), i.length ? {
31125      expandedRowGroupIds: i
31126    } : void 0;
31127  }
31128  setRowGroupExpansionState(e) {
31129    this.beans.expansionSvc?.expandRows(e.expandedRowGroupIds);
31130  }
31131  updateColumnState(e) {
31132    const t = this.getColumnState();
31133    let i = !1;
31134    const s = this.cachedState;
31135    Object.entries(t).forEach(([o, n]) => {
31136      Zi(n, s[o]) || (i = !0);
31137    }), this.cachedState = {
31138      ...s,
31139      ...t
31140    }, i && this.dispatchStateUpdateEvent(e);
31141  }
31142  updateCachedState(e, t) {
31143    const i = this.cachedState[e];
31144    this.setCachedStateValue(e, t), Zi(t, i) || this.dispatchStateUpdateEvent([e]);
31145  }
31146  setCachedStateValue(e, t) {
31147    this.cachedState = {
31148      ...this.cachedState,
31149      [e]: t
31150    };
31151  }
31152  refreshStaleState() {
31153    const e = this.staleStateKeys;
31154    e.forEach((t) => {
31155      t === "rowSelection" && this.setCachedStateValue(t, this.getRowSelectionState());
31156    }), e.clear();
31157  }
31158  dispatchStateUpdateEvent(e) {
31159    this.suppressEvents || (e.forEach((t) => this.queuedUpdateSources.add(t)), this.dispatchStateUpdateEventDebounced());
31160  }
31161  dispatchQueuedStateUpdateEvents() {
31162    const e = this.queuedUpdateSources, t = Array.from(e);
31163    e.clear(), this.eventSvc.dispatchEvent({
31164      type: "stateUpdated",
31165      sources: t,
31166      state: this.cachedState
31167    });
31168  }
31169  suppressEventsAndDispatchInitEvent(e) {
31170    this.suppressEvents = !0;
31171    const t = this.beans.colAnimation;
31172    t?.setSuppressAnimation(!0), e(), setTimeout(() => {
31173      this.suppressEvents = !1, this.queuedUpdateSources.clear(), this.isAlive() && (t?.setSuppressAnimation(!1), this.dispatchStateUpdateEvent(["gridInitializing"]));
31174    });
31175  }
31176}, iF = {
31177  moduleName: "GridState",
31178  version: I,
31179  beans: [tF],
31180  apiFunctions: {
31181    getState: ZR
31182  }
31183};
31184function sF(e) {
31185  return e.rowModel.isLastRowIndexKnown();
31186}
31187function oF(e) {
31188  return e.pagination?.getPageSize() ?? 100;
31189}
31190function nF(e) {
31191  return e.pagination?.getCurrentPage() ?? 0;
31192}
31193function rF(e) {
31194  return e.pagination?.getTotalPages() ?? 1;
31195}
31196function aF(e) {
31197  return e.pagination ? e.pagination.getMasterRowCount() : e.rowModel.getRowCount();
31198}
31199function lF(e) {
31200  e.pagination?.goToNextPage();
31201}
31202function dF(e) {
31203  e.pagination?.goToPreviousPage();
31204}
31205function cF(e) {
31206  e.pagination?.goToFirstPage();
31207}
31208function uF(e) {
31209  e.pagination?.goToLastPage();
31210}
31211function hF(e, t) {
31212  e.pagination?.goToPage(t);
31213}
31214var gF = class extends y {
31215  constructor() {
31216    super(...arguments), this.beanName = "paginationAutoPageSizeSvc";
31217  }
31218  postConstruct() {
31219    this.beans.ctrlsSvc.whenReady(this, (e) => {
31220      this.centerRowsCtrl = e.center;
31221      const t = this.checkPageSize.bind(this);
31222      this.addManagedEventListeners({
31223        bodyHeightChanged: t,
31224        scrollVisibilityChanged: t
31225      }), this.addManagedPropertyListener("paginationAutoPageSize", this.onPaginationAutoSizeChanged.bind(this)), this.checkPageSize();
31226    });
31227  }
31228  notActive() {
31229    return !this.gos.get("paginationAutoPageSize") || this.centerRowsCtrl == null;
31230  }
31231  onPaginationAutoSizeChanged() {
31232    this.notActive() ? this.beans.pagination.unsetAutoCalculatedPageSize() : this.checkPageSize();
31233  }
31234  checkPageSize() {
31235    if (this.notActive())
31236      return;
31237    const e = this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();
31238    if (e > 0) {
31239      const t = this.beans, i = () => {
31240        const s = Math.max(kt(t), 1), o = Math.floor(e / s);
31241        t.pagination.setPageSize(o, "autoCalculated");
31242      };
31243      this.isBodyRendered ? Ce(this, i, 50)() : (i(), this.isBodyRendered = !0);
31244    } else
31245      this.isBodyRendered = !1;
31246  }
31247}, Mi = "paginationPageSizeSelector", pF = class extends _ {
31248  constructor() {
31249    super(
31250      /* html */
31251      '<span class="ag-paging-page-size"></span>'
31252    ), this.hasEmptyOption = !1, this.handlePageSizeItemSelected = () => {
31253      if (!this.selectPageSizeComp)
31254        return;
31255      const e = this.selectPageSizeComp.getValue();
31256      if (!e)
31257        return;
31258      const t = Number(e);
31259      isNaN(t) || t < 1 || t === this.pagination.getPageSize() || (this.pagination.setPageSize(t, "pageSizeSelector"), this.hasEmptyOption && this.toggleSelectDisplay(!0), this.selectPageSizeComp.getFocusableElement().focus());
31260    };
31261  }
31262  wireBeans(e) {
31263    this.pagination = e.pagination;
31264  }
31265  postConstruct() {
31266    this.addManagedPropertyListener(Mi, () => {
31267      this.onPageSizeSelectorValuesChange();
31268    }), this.addManagedEventListeners({ paginationChanged: (e) => this.handlePaginationChanged(e) });
31269  }
31270  handlePaginationChanged(e) {
31271    if (!this.selectPageSizeComp || !e?.newPageSize)
31272      return;
31273    const t = this.pagination.getPageSize();
31274    this.getPageSizeSelectorValues().includes(t) ? this.selectPageSizeComp.setValue(t.toString()) : this.hasEmptyOption ? this.selectPageSizeComp.setValue("") : this.toggleSelectDisplay(!0);
31275  }
31276  toggleSelectDisplay(e) {
31277    this.selectPageSizeComp && !e && this.reset(), e && (this.reloadPageSizesSelector(), this.selectPageSizeComp);
31278  }
31279  reset() {
31280    ue(this.getGui()), this.selectPageSizeComp && (this.selectPageSizeComp = this.destroyBean(this.selectPageSizeComp));
31281  }
31282  onPageSizeSelectorValuesChange() {
31283    this.selectPageSizeComp && this.shouldShowPageSizeSelector() && this.reloadPageSizesSelector();
31284  }
31285  shouldShowPageSizeSelector() {
31286    return this.gos.get("pagination") && !this.gos.get("suppressPaginationPanel") && !this.gos.get("paginationAutoPageSize") && this.gos.get(Mi) !== !1;
31287  }
31288  reloadPageSizesSelector() {
31289    const e = this.getPageSizeSelectorValues(), t = this.pagination.getPageSize(), i = !t || !e.includes(t);
31290    if (i) {
31291      const o = this.gos.exists("paginationPageSize"), n = this.gos.get(Mi) !== !0;
31292      x(94, { pageSizeSet: o, pageSizesSet: n, pageSizeOptions: e, paginationPageSizeOption: t }), n || x(95, { paginationPageSizeOption: t, paginationPageSizeSelector: Mi }), e.unshift("");
31293    }
31294    const s = String(i ? "" : t);
31295    this.selectPageSizeComp ? (Wt(this.pageSizeOptions, e) || (this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)), this.pageSizeOptions = e), this.selectPageSizeComp.setValue(s, !0)) : this.createPageSizeSelectorComp(e, s), this.hasEmptyOption = i;
31296  }
31297  createPageSizeSelectOptions(e) {
31298    return e.map((t) => ({
31299      value: String(t)
31300    }));
31301  }
31302  createPageSizeSelectorComp(e, t) {
31303    const i = this.getLocaleTextFunc(), s = i("pageSizeSelectorLabel", "Page Size:"), o = i("ariaPageSizeSelectorLabel", "Page Size");
31304    this.selectPageSizeComp = this.createManagedBean(new nr()).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(s).onValueChange(() => this.handlePageSizeItemSelected()), this.appendChild(this.selectPageSizeComp);
31305  }
31306  getPageSizeSelectorValues() {
31307    const e = [20, 50, 100], t = this.gos.get(Mi);
31308    return !Array.isArray(t) || !t?.length ? e : [...t].sort((i, s) => i - s);
31309  }
31310  destroy() {
31311    this.toggleSelectDisplay(!1), super.destroy();
31312  }
31313}, fF = {
31314  selector: "AG-PAGE-SIZE-SELECTOR",
31315  component: pF
31316}, mF = (
31317  /*css*/
31318  ".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}
31318.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}"
31319), CF = class extends Gd {
31320  constructor() {
31321    super(), this.btFirst = M, this.btPrevious = M, this.btNext = M, this.btLast = M, this.lbRecordCount = M, this.lbFirstRowOnPage = M, this.lbLastRowOnPage = M, this.lbCurrent = M, this.lbTotal = M, this.pageSizeComp = M, this.previousAndFirstButtonsDisabled = !1, this.nextButtonDisabled = !1, this.lastButtonDisabled = !1, this.areListenersSetup = !1, this.allowFocusInnerElement = !1, this.registerCSS(mF);
31322  }
31323  wireBeans(e) {
31324    this.rowModel = e.rowModel, this.pagination = e.pagination, this.ariaAnnounce = e.ariaAnnounce;
31325  }
31326  postConstruct() {
31327    const e = this.gos.get("enableRtl");
31328    this.setTemplate(this.getTemplate(), [fF]);
31329    const { btFirst: t, btPrevious: i, btNext: s, btLast: o } = this;
31330    this.activateTabIndex([t, i, s, o]), t.insertAdjacentElement("afterbegin", Te(e ? "last" : "first", this.beans)), i.insertAdjacentElement("afterbegin", Te(e ? "next" : "previous", this.beans)), s.insertAdjacentElement("afterbegin", Te(e ? "previous" : "next", this.beans)), o.insertAdjacentElement("afterbegin", Te(e ? "first" : "last", this.beans)), this.addManagedPropertyListener("pagination", this.onPaginationChanged.bind(this)), this.addManagedPropertyListener("suppressPaginationPanel", this.onPaginationChanged.bind(this)), this.addManagedPropertyListeners(
31331      ["paginationPageSizeSelector", "paginationAutoPageSize", "suppressPaginationPanel"],
31332      () => this.onPageSizeRelatedOptionsChange()
31333    ), this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()), this.initialiseTabGuard({
31334      // prevent tab guard default logic
31335      onTabKeyDown: () => {
31336      },
31337      focusInnerElement: (n) => {
31338        this.allowFocusInnerElement ? this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n) : Jp(this.beans, n);
31339      },
31340      forceFocusOutWhenTabGuardsAreEmpty: !0
31341    }), this.onPaginationChanged();
31342  }
31343  setAllowFocus(e) {
31344    this.allowFocusInnerElement = e;
31345  }
31346  onPaginationChanged() {
31347    const t = this.gos.get("pagination") && !this.gos.get("suppressPaginationPanel");
31348    this.setDisplayed(t), t && (this.setupListeners(), this.enableOrDisableButtons(), this.updateLabels(), this.onPageSizeRelatedOptionsChange());
31349  }
31350  onPageSizeRelatedOptionsChange() {
31351    this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector());
31352  }
31353  setupListeners() {
31354    this.areListenersSetup || (this.addManagedEventListeners({ paginationChanged: this.onPaginationChanged.bind(this) }), [
31355      { el: this.btFirst, fn: this.onBtFirst.bind(this) },
31356      { el: this.btPrevious, fn: this.onBtPrevious.bind(this) },
31357      { el: this.btNext, fn: this.onBtNext.bind(this) },
31358      { el: this.btLast, fn: this.onBtLast.bind(this) }
31359    ].forEach((e) => {
31360      const { el: t, fn: i } = e;
31361      this.addManagedListeners(t, {
31362        click: i,
31363        keydown: (s) => {
31364          (s.key === b.ENTER || s.key === b.SPACE) && (s.preventDefault(), i());
31365        }
31366      });
31367    }), Xp(this.beans, this, this.getGui()), this.areListenersSetup = !0);
31368  }
31369  onBtFirst() {
31370    this.previousAndFirstButtonsDisabled || this.pagination.goToFirstPage();
31371  }
31372  formatNumber(e) {
31373    const t = this.gos.getCallback("paginationNumberFormatter");
31374    return t ? t({ value: e }) : Mb(e, this.getLocaleTextFunc.bind(this));
31375  }
31376  getTemplate() {
31377    const e = this.getLocaleTextFunc(), t = e("page", "Page"), i = e("to", "to"), s = e("of", "of"), o = e("firstPage", "First Page"), n = e("previousPage", "Previous Page"), r = e("nextPage", "Next Page"), a = e("lastPage", "Last Page"), l = this.getCompId();
31378    return (
31379      /* html */
31380      `<div class="ag-paging-panel ag-unselectable" id="ag-${l}">
31381                <ag-page-size-selector data-ref="pageSizeComp"></ag-page-size-selector>
31382                <span class="ag-paging-row-summary-panel">
31383                    <span id="ag-${l}-first-row" data-ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
31384                    <span id="ag-${l}-to">${i}</span>
31385                    <span id="ag-${l}-last-row" data-ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
31386                    <span id="ag-${l}-of">${s}</span>
31387                    <span id="ag-${l}-row-count" data-ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
31388                </span>
31389                <span class="ag-paging-page-summary-panel" role="presentation">
31390                    <div data-ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
31391                    <div data-ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>
31392                    <span class="ag-paging-description">
31393                        <span id="ag-${l}-start-page">${t}</span>
31394                        <span id="ag-${l}-start-page-number" data-ref="lbCurrent" class="ag-paging-number"></span>
31395                        <span id="ag-${l}-of-page">${s}</span>
31396                        <span id="ag-${l}-of-page-number" data-ref="lbTotal" class="ag-paging-number"></span>
31397                    </span>
31398                    <div data-ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>
31399                    <div data-ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${a}"></div>
31400                </span>
31401            </div>`
31402    );
31403  }
31404  onBtNext() {
31405    this.nextButtonDisabled || this.pagination.goToNextPage();
31406  }
31407  onBtPrevious() {
31408    this.previousAndFirstButtonsDisabled || this.pagination.goToPreviousPage();
31409  }
31410  onBtLast() {
31411    this.lastButtonDisabled || this.pagination.goToLastPage();
31412  }
31413  enableOrDisableButtons() {
31414    const e = this.pagination.getCurrentPage(), t = this.rowModel.isLastRowIndexKnown(), i = this.pagination.getTotalPages();
31415    this.previousAndFirstButtonsDisabled = e === 0, this.toggleButtonDisabled(this.btFirst, this.previousAndFirstButtonsDisabled), this.toggleButtonDisabled(this.btPrevious, this.previousAndFirstButtonsDisabled);
31416    const s = this.isZeroPagesToDisplay(), o = e === i - 1;
31417    this.nextButtonDisabled = o || s, this.lastButtonDisabled = !t || s || e === i - 1, this.toggleButtonDisabled(this.btNext, this.nextButtonDisabled), this.toggleButtonDisabled(this.btLast, this.lastButtonDisabled);
31418  }
31419  toggleButtonDisabled(e, t) {
31420    Th(e, t), e.classList.toggle("ag-disabled", t);
31421  }
31422  isZeroPagesToDisplay() {
31423    const e = this.rowModel.isLastRowIndexKnown(), t = this.pagination.getTotalPages();
31424    return e && t === 0;
31425  }
31426  updateLabels() {
31427    const e = this.rowModel.isLastRowIndexKnown(), t = this.pagination.getTotalPages(), i = this.pagination.getMasterRowCount(), s = e ? i : null;
31428    if (s === 1) {
31429      const w = this.rowModel.getRow(0);
31430      if (w && w.group && !(w.groupData || w.aggData)) {
31431        this.setTotalLabelsToZero();
31432        return;
31433      }
31434    }
31435    const o = this.pagination.getCurrentPage(), n = this.pagination.getPageSize();
31436    let r, a;
31437    this.isZeroPagesToDisplay() ? r = a = 0 : (r = n * o + 1, a = r + n - 1, e && a > s && (a = s));
31438    const l = r + n - 1, d = !e && i < l, c = this.formatNumber(r);
31439    this.lbFirstRowOnPage.textContent = c;
31440    let u;
31441    const h = this.getLocaleTextFunc();
31442    d ? u = h("pageLastRowUnknown", "?") : u = this.formatNumber(a), this.lbLastRowOnPage.textContent = u;
31443    const p = t > 0 ? o + 1 : 0, f = this.formatNumber(p);
31444    this.lbCurrent.textContent = f;
31445    let m, C;
31446    if (e)
31447      m = this.formatNumber(t), C = this.formatNumber(s);
31448    else {
31449      const w = h("more", "more");
31450      m = w, C = w;
31451    }
31452    this.lbTotal.textContent = m, this.lbRecordCount.textContent = C, this.announceAriaStatus(c, u, C, f, m);
31453  }
31454  announceAriaStatus(e, t, i, s, o) {
31455    const n = this.getLocaleTextFunc(), r = n("page", "Page"), a = n("to", "to"), l = n("of", "of"), d = `${e} ${a} ${t} ${l} ${i}`, c = `${r} ${s} ${l} ${o}`;
31456    d !== this.ariaRowStatus && (this.ariaRowStatus = d, this.ariaAnnounce?.announceValue(d, "paginationRow")), c !== this.ariaPageStatus && (this.ariaPageStatus = c, this.ariaAnnounce?.announceValue(c, "paginationPage"));
31457  }
31458  setTotalLabelsToZero() {
31459    const e = this.formatNumber(0);
31460    this.lbFirstRowOnPage.textContent = e, this.lbCurrent.textContent = e, this.lbLastRowOnPage.textContent = e, this.lbTotal.textContent = e, this.lbRecordCount.textContent = e, this.announceAriaStatus(e, e, e, e, e);
31461  }
31462}, vF = {
31463  selector: "AG-PAGINATION",
31464  component: CF
31465}, wF = class extends y {
31466  constructor() {
31467    super(...arguments), this.beanName = "pagination", this.currentPage = 0, this.topDisplayedRowIndex = 0, this.bottomDis
31467playedRowIndex = 0, this.masterRowCount = 0;
31468  }
31469  postConstruct() {
31470    const e = this.gos;
31471    this.active = e.get("pagination"), this.pageSizeFromGridOptions = e.get("paginationPageSize"), this.paginateChildRows = this.isPaginateChildRows(), this.addManagedPropertyListener("pagination", this.onPaginationGridOptionChanged.bind(this)), this.addManagedPropertyListener("paginationPageSize", this.onPageSizeGridOptionChanged.bind(this));
31472  }
31473  getPaginationSelector() {
31474    return vF;
31475  }
31476  isPaginateChildRows() {
31477    const e = this.gos;
31478    return e.get("groupHideParentOfSingleChild") || // following two properties deprecated v32.3.0
31479    e.get("groupRemoveSingleChildren") || e.get("groupRemoveLowestSingleChildren") ? !0 : e.get("paginateChildRows");
31480  }
31481  onPaginationGridOptionChanged() {
31482    this.active = this.gos.get("pagination"), this.calculatePages(), this.dispatchPaginationChangedEvent({ keepRenderedRows: !0 });
31483  }
31484  onPageSizeGridOptionChanged() {
31485    this.setPageSize(this.gos.get("paginationPageSize"), "gridOptions");
31486  }
31487  goToPage(e) {
31488    const t = this.currentPage;
31489    !this.active || t === e || typeof t != "number" || (this.currentPage = e, this.calculatePages(), this.dispatchPaginationChangedEvent({ newPage: !0 }));
31490  }
31491  isRowPresent(e) {
31492    return e.rowIndex >= this.topDisplayedRowIndex && e.rowIndex <= this.bottomDisplayedRowIndex;
31493  }
31494  getPageForIndex(e) {
31495    return Math.floor(e / this.pageSize);
31496  }
31497  goToPageWithIndex(e) {
31498    if (!this.active)
31499      return;
31500    const t = this.getPageForIndex(e);
31501    this.goToPage(t);
31502  }
31503  isRowInPage(e) {
31504    return this.active ? this.getPageForIndex(e.rowIndex) === this.currentPage : !0;
31505  }
31506  getCurrentPage() {
31507    return this.currentPage;
31508  }
31509  goToNextPage() {
31510    this.goToPage(this.currentPage + 1);
31511  }
31512  goToPreviousPage() {
31513    this.goToPage(this.currentPage - 1);
31514  }
31515  goToFirstPage() {
31516    this.goToPage(0);
31517  }
31518  goToLastPage() {
31519    const e = this.beans.rowModel.getRowCount(), t = Math.floor(e / this.pageSize);
31520    this.goToPage(t);
31521  }
31522  getPageSize() {
31523    return this.pageSize;
31524  }
31525  getTotalPages() {
31526    return this.totalPages;
31527  }
31528  /** This is only for state setting before data has been loaded */
31529  setPage(e) {
31530    this.currentPage = e;
31531  }
31532  get pageSize() {
31533    return A(this.pageSizeAutoCalculated) && this.gos.get("paginationAutoPageSize") ? this.pageSizeAutoCalculated : A(this.pageSizeFromPageSizeSelector) ? this.pageSizeFromPageSizeSelector : A(this.pageSizeFromInitialState) ? this.pageSizeFromInitialState : A(this.pageSizeFromGridOptions) ? this.pageSizeFromGridOptions : this.defaultPageSize;
31534  }
31535  calculatePages() {
31536    this.active ? this.paginateChildRows ? this.calculatePagesAllRows() : this.calculatePagesMasterRowsOnly() : this.calculatedPagesNotActive(), this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex, this.bottomDisplayedRowIndex);
31537  }
31538  unsetAutoCalculatedPageSize() {
31539    if (this.pageSizeAutoCalculated === void 0)
31540      return;
31541    const e = this.pageSizeAutoCalculated;
31542    this.pageSizeAutoCalculated = void 0, this.pageSize !== e && (this.calculatePages(), this.dispatchPaginationChangedEvent({ newPageSize: !0 }));
31543  }
31544  setPageSize(e, t) {
31545    const i = this.pageSize;
31546    switch (t) {
31547      case "autoCalculated":
31548        this.pageSizeAutoCalculated = e;
31549        break;
31550      case "pageSizeSelector":
31551        this.pageSizeFromPageSizeSelector = e, this.currentPage !== 0 && this.goToFirstPage();
31552        break;
31553      case "initialState":
31554        this.pageSizeFromInitialState = e;
31555        break;
31556      case "gridOptions":
31557        this.pageSizeFromGridOptions = e, this.pageSizeFromInitialState = void 0, this.pageSizeFromPageSizeSelector = void 0, this.currentPage !== 0 && this.goToFirstPage();
31558        break;
31559    }
31560    i !== this.pageSize && (this.calculatePages(), this.dispatchPaginationChangedEvent({ newPageSize: !0, keepRenderedRows: !0 }));
31561  }
31562  setZeroRows() {
31563    this.masterRowCount = 0, this.topDisplayedRowIndex = 0, this.bottomDisplayedRowIndex = -1, this.currentPage = 0, this.totalPages = 0;
31564  }
31565  adjustCurrentPageIfInvalid() {
31566    const e = this.totalPages;
31567    this.currentPage >= e && (this.currentPage = e - 1);
31568    const t = this.currentPage;
31569    (!isFinite(t) || isNaN(t) || t < 0) && (this.currentPage = 0);
31570  }
31571  calculatePagesMasterRowsOnly() {
31572    const e = this.beans.rowModel, t = e.getTopLevelRowCount();
31573    if (this.masterRowCount = t, t <= 0) {
31574      this.setZeroRows();
31575      return;
31576    }
31577    const i = this.pageSize, s = t - 1;
31578    this.totalPages = Math.floor(s / i) + 1, this.adjustCurrentPageIfInvalid();
31579    const o = this.currentPage, n = i * o;
31580    let r = i * (o + 1) - 1;
31581    if (r > s && (r = s), this.topDisplayedRowIndex = e.getTopLevelRowDisplayedIndex(n), r === s)
31582      this.bottomDisplayedRowIndex = e.getRowCount() - 1;
31583    else {
31584      const a = e.getTopLevelRowDisplayedIndex(r + 1);
31585      this.bottomDisplayedRowIndex = a - 1;
31586    }
31587  }
31588  getMasterRowCount() {
31589    return this.masterRowCount;
31590  }
31591  calculatePagesAllRows() {
31592    const e = this.beans.rowModel.getRowCount();
31593    if (this.masterRowCount = e, e === 0) {
31594      this.setZeroRows();
31595      return;
31596    }
31597    const { pageSize: t, currentPage: i } = this, s = e - 1;
31598    this.totalPages = Math.floor(s / t) + 1, this.adjustCurrentPageIfInvalid(), this.topDisplayedRowIndex = t * i, this.bottomDisplayedRowIndex = t * (i + 1) - 1, this.bottomDisplayedRowIndex > s && (this.bottomDisplayedRowIndex = s);
31599  }
31600  calculatedPagesNotActive() {
31601    this.setPageSize(void 0, "autoCalculated"), this.totalPages = 1, this.currentPage = 0, this.topDisplayedRowIndex = 0, this.bottomDisplayedRowIndex = this.beans.rowModel.getRowCount() - 1;
31602  }
31603  dispatchPaginationChangedEvent(e) {
31604    const { keepRenderedRows: t = !1, newPage: i = !1, newPageSize: s = !1 } = e;
31605    this.eventSvc.dispatchEvent({
31606      type: "paginationChanged",
31607      animate: !1,
31608      newData: !1,
31609      newPage: i,
31610      newPageSize: s,
31611      keepRenderedRows: t
31612    });
31613  }
31614}, SF = {
31615  moduleName: "Pagination",
31616  version: I,
31617  beans: [wF, gF],
31618  icons: {
31619    // "go to first" button in pagination controls
31620    first: "first",
31621    // "go to previous" button in pagination controls
31622    previous: "previous",
31623    // "go to next" button in pagination controls
31624    next: "next",
31625    // "go to last" button in pagination controls
31626    last: "last"
31627  },
31628  apiFunctions: {
31629    paginationIsLastPageFound: sF,
31630    paginationGetPageSize: oF,
31631    paginationGetCurrentPage: nF,
31632    paginationGetTotalPages: rF,
31633    paginationGetRowCount: aF,
31634    paginationGoToNextPage: lF,
31635    paginationGoToPreviousPage: dF,
31636    paginationGoToFirstPage: cF,
31637    paginationGoToLastPage: uF,
31638    paginationGoToPage: hF
31639  },
31640  dependsOn: [so]
31641};
31642function bF(e, t = {}) {
31643  const i = t ? t.rowNodes : void 0;
31644  e.frameworkOverrides.wrapIncoming(() => e.rowRenderer.redrawRows(i));
31645}
31646function kc(e, t, i, s, o) {
31647  t && (s && t.parent && t.parent.level !== -1 && kc(e, t.parent, i, s, o), t.setExpanded(i, void 0, o));
31648}
31649function yF(e, t) {
31650  return e.rowModel.getRowNode(t);
31651}
31652function RF(e, t, i, s) {
31653  e.rowRenderer.addRenderedRowListener(t, i, s);
31654}
31655function FF(e) {
31656  return e.rowRenderer.getRenderedNodes();
31657}
31658function xF(e, t, i) {
31659  e.rowModel.forEachNode(t, i);
31660}
31661function PF(e) {
31662  return e.rowRenderer.firstRenderedRow;
31663}
31664function EF(e) {
31665  return e.rowRenderer.lastRenderedRow;
31666}
31667function DF(e, t) {
31668  return e.rowModel.getRow(t);
31669}
31670function AF(e) {
31671  return e.rowModel.getRowCount();
31672}
31673var Lc = {
31674  moduleName: "RowApi",
31675  version: I,
31676  apiFunctions: {
31677    redrawRows: bF,
31678    setRowNodeExpanded: kc,
31679    getRowNode: yF,
31680    addRenderedRowListener: RF,
31681    getRenderedNodes: FF,
31682    forEachNode: xF,
31683    getFirstDisplayedRowIndex: PF,
31684    getLastDisplayedRowIndex: EF,
31685    getDisplayedRowAtIndex: DF,
31686    getDisplayedRowCount: AF
31687  }
31688}, TF = {
31689  moduleName: "ScrollApi",
31690  version: I,
31691  apiFunctions: {
31692    getVerticalPixelRange: m0,
31693    getHorizontalPixelRange: C0,
31694    ensureColumnVisible: Tc,
31695    ensureIndexVisible: Mc,
31696    ensureNodeVisible: v0
31697  }
31698};
31699function MF(e, t, i) {
31700  if (!t)
31701    return;
31702  const s = e.ctrlsSvc.getGridBodyCtrl().eGridBody, o = `aria-${t}`;
31703  i === null ? s.removeAttribute(o) : s.setAttribute(o, i);
31704}
31705function IF(e, t = {}) {
31706  e.frameworkOverrides.wrapIncoming(() => e.rowRenderer.refreshCells(t));
31707}
31708function kF(e) {
31709  e.frameworkOverrides.wrapIncoming(
31710    () => e.ctrlsSvc.getHeaderRowContainerCtrls().forEach((t) => t.refresh())
31711  );
31712}
31713function LF(e) {
31714  return e.animationFrameSvc?.isQueueEmpty() ?? !0;
31715}
31716function OF(e) {
31717  e.animationFrameSvc?.flushAllFrames();
31718}
31719function GF(e) {
31720  return {
31721    rowHeight: kt(e),
31722    headerHeight: ds(e)
31723  };
31724}
31725function HF(e, t = {}) {
31726  const i = [];
31727  if (e.rowRenderer.getCellCtrls(t.rowNodes, t.columns).forEach((n) => {
31728    const r = n.getCellRenderer();
31729    r != null && i.push(ts(r));
31730  }), t.columns?.length)
31731    return i;
31732  const s = [], o = wn(t.rowNodes);
31733  return e.rowRenderer.getAllRowCtrls().forEach((n) => {
31734    if (o && !Sn(n.rowNode, o) || !n.isFullWidth())
31735      return;
31736    const r = n.getFullWidthCellRenderers();
31737    for (let a = 0; a < r.length; a++) {
31738      const l = r[a];
31739      l != null && s.push(ts(l));
31740    }
31741  }), [...s, ...i];
31742}
31743var BF = {
31744  moduleName: "RenderApi",
31745  version: I,
31746  apiFunctions: {
31747    setGridAriaProperty: MF,
31748    refreshCells: IF,
31749    refreshHeader: kF,
31750    isAnimationFrameQueueEmpty: LF,
31751    flushAllAnimationFrames: OF,
31752    getSizesForCurrentTheme: GF,
31753    getCellRendererInstances: HF
31754  }
31755};
31756function NF(e, t) {
31757  typeof t == "number" ? e.colAutosize?.sizeColumnsToFit(t, "api") : e.colAutosize?.sizeColumnsToFitGridBody(t);
31758}
31759function VF(e, t, i) {
31760  e.colAutosize?.autoSizeCols({ colKeys: t, skipHeader: i, source: "api" });
31761}
31762function WF(e, t) {
31763  e.colAutosize?.autoSizeAllColumns("api", t);
31764}
31765var zF = class extends y {
31766  constructor() {
31767    super(...arguments), this.beanName = "colAutosize", this.timesDelayed = 0, this.shouldQueueResizeOperations = !1, this.resizeOperationQueue = [];
31768  }
31769  postConstruct() {
31770    this.addManagedEventListeners({ firstDataRendered: () => this.onFirstDataRendered() });
31771  }
31772  autoSizeCols(e) {
31773    if (this.shouldQueueResizeOperations) {
31774      this.pushResizeOperation(() => this.autoSizeCols(e));
31775      return;
31776    }
31777    const { colKeys: t, skipHeader: i, skipHeaderGroups: s, stopAtGroup: o, source: n = "api" } = e, { animationFrameSvc: r, renderStatus: a, colModel: l, autoWidthCalc: d, visibleCols: c } = this.beans;
31778    if (r?.flushAllFrames(), this.timesDelayed < 5 && a && !a.areHeaderCellsRendered()) {
31779      this.timesDelayed++, setTimeout(() => {
31780        this.isAlive() && this.autoSizeCols(e);
31781      });
31782      return;
31783    }
31784    this.timesDelayed = 0;
31785    const u = [];
31786    let h = -1;
31787    const g = i ?? this.gos.get("skipHeaderOnAutoSize"), p = s ?? g;
31788    for (; h !== 0; ) {
31789      h = 0;
31790      const f = [];
31791      t.forEach((m) => {
31792        if (!m)
31793          return;
31794        const C = l.getCol(m);
31795        if (!C || u.indexOf(C) >= 0)
31796          return;
31797        const w = d.getPreferredWidthForColumn(C, g);
31798        if (w > 0) {
31799          const S = _F(C, w);
31800          C.setActualWidth(S, n), u.push(C), h++;
31801        }
31802        f.push(C);
31803      }), f.length && c.refresh(n);
31804    }
31805    p || this.autoSizeColumnGroupsByColumns(t, n, o), Ci(this.eventSvc, u, !0, "autosizeColumns");
31806  }
31807  autoSizeColumn(e, t, i) {
31808    e && this.autoSizeCols({ colKeys: [e], skipHeader: i, skipHeaderGroups: !0, source: t });
31809  }
31810  autoSizeColumnGroupsByColumns(e, t, i) {
31811    const { colModel: s, ctrlsSvc: o } = this.beans, n = /* @__PURE__ */ new Set();
31812    s.getColsForKeys(e).forEach((d) => {
31813      let c = d.getParent();
31814      for (; c && c != i; )
31815        c.isPadding() || n.add(c), c = c.getParent();
31816    });
31817    let a;
31818    const l = [];
31819    for (const d of n) {
31820      for (const c of o.getHeaderRowContainerCtrls())
31821        if (a = c.getHeaderCtrlForColumn(d), a)
31822          break;
31823      a && a.resizeLeafColumnsToFit(t);
31824    }
31825    return l;
31826  }
31827  autoSizeAllColumns(e, t) {
31828    if (this.shouldQueueResizeOperations) {
31829      this.pushResizeOperation(() => this.autoSizeAllColumns(e, t));
31830      return;
31831    }
31832    const i = this.beans.visibleCols.allCols;
31833    this.autoSizeCols({ colKeys: i, skipHeader: t, source: e });
31834  }
31835  addColumnAutosize(e, t) {
31836    const i = this.gos.get("skipHeaderOnAutoSize"), s = () => {
31837      this.autoSizeColumn(t, "uiColumnResized", i);
31838    };
31839    e.addEventListener("dblclick", s);
31840    const o = new Zt(e);
31841    return o.addEventListener("doubleTap", s), () => {
31842      e.removeEventListener("dblclick", s), o.removeEventListener("doubleTap", s), o.destroy();
31843    };
31844  }
31845  addColumnGroupResize(e, t, i) {
31846    const s = this.gos.get("skipHeaderOnAutoSize"), o = () => {
31847      const n = [];
31848      t.getDisplayedLeafColumns().forEach((a) => {
31849        a.getColDef().suppressAutoSize || n.push(a.getColId());
31850      }), n.length > 0 && this.autoSizeCols({
31851        colKeys: n,
31852        skipHeader: s,
31853        stopAtGroup: t,
31854        source: "uiColumnResized"
31855      }), i();
31856    };
31857    return e.addEventListener("dblclick", o), () => e.removeEventListener("dblclick", o);
31858  }
31859  // method will call itself if no available width. this covers if the grid
31860  // isn't visible, but is just about to be visible.
31861  sizeColumnsToFitGridBody(e, t) {
31862    if (!this.isAlive())
31863      return;
31864    const { ctrlsSvc: i, scrollVisibleSvc: s } = this.beans, o = i.getGridBodyCtrl(), r = o.isVerticalScrollShowing() ? s.getScrollbarWidth() : 0, l = Yi(o.eGridBody) - r;
31865    if (l > 0) {
31866      this.sizeColumnsToFit(l, "sizeColumnsToFit", !1, e);
31867      return;
31868    }
31869    t === void 0 ? window.setTimeout(() => {
31870      this.sizeColumnsToFitGridBody(e, 100);
31871    }, 0) : t === 100 ? window.setTimeout(() => {
31872      this.sizeColumnsToFitGridBody(e, 500);
31873    }, 100) : t === 500 ? window.setTimeout(() => {
31874      this.sizeColumnsToFitGridBody(e, -1);
31875    }, 500) : x(29);
31876  }
31877  // called from api
31878  sizeColumnsToFit(e, t = "sizeColumnsToFit", i, s) {
31879    if (this.shouldQueueResizeOperations) {
31880      this.pushResizeOperation(() => this.sizeColumnsToFit(e, t, i, s));
31881      return;
31882    }
31883    const o = {};
31884    s && s?.columnLimits?.forEach(({ key: g, ...p }) => {
31885      o[typeof g == "string" ? g : g.getColId()] = p;
31886    });
31887    const n = this.beans.visibleCols.allCols, r = e === tt(n);
31888    if (e <= 0 || !n.length || r)
31889      return;
31890    const a = [], l = [];
31891    n.forEach((g) => {
31892      g.getColDef().suppressSizeToFit === !0 ? l.push(g) : a.push(g);
31893    });
31894    const d = a.slice(0);
31895    let c = !1;
31896    const u = (g) => {
31897      Ve(a, g), l.push(g);
31898    };
31899    for (a.forEach((g) => {
31900      g.resetActualWidth(t);
31901      const p = o?.[g.getId()], f = p?.minWidth ?? s?.defaultMinWidth, m = p?.maxWidth ?? s?.defaultMaxWidth, C = g.getActualWidth();
31902      typeof f == "number" && C < f ? g.setActualWidth(f, t, !0) : typeof m == "number" && C > m && g.setActualWidth(m, t, !0);
31903    }); !c; ) {
31904      c = !0;
31905      const g = e - tt(l);
31906      if (g <= 0)
31907        a.forEach((p) => {
31908          const f = o?.[p.getId()]?.minWidth ?? s?.defaultMinWidth;
31909          if (typeof f == "number") {
31910            p.setActualWidth(f, t, !0);
31911            return;
31912          }
31913          p.setActualWidth(p.minWidth, t);
31914        });
31915      else {
31916        const p = g / tt(a);
31917        let f = g;
31918        for (let m = a.length - 1; m >= 0; m--) {
31919          const C = a[m], w = o?.[C.getId()], S = w?.minWidth ?? s?.defaultMinWidth, v = w?.maxWidth ?? s?.defaultMaxWidth, P = C.getMinWidth(), T = C.getMaxWidth(), D = typeof S == "number" && S > P ? S : P, R = typeof v == "number" && v < T ? v : T;
31920          let E = Math.round(C.getActualWidth() * p);
31921          E < D ? (E = D, u(C), c = !1) : E > R ? (E = R, u(C), c = !1) : m === 0 && (E = f), C.setActualWidth(E, t, !0), f -= E;
31922        }
31923      }
31924    }
31925    d.forEach((g) => {
31926      g.fireColumnWidthChangedEvent(t);
31927    });
31928    const h = this.beans.visibleCols;
31929    h.setLeftValues(t), h.updateBodyWidths(), !i && Ci(this.eventSvc, d, !0, t);
31930  }
31931  applyAutosizeStrategy() {
31932    const e = this.gos.get("autoSizeStrategy");
31933    if (!e)
31934      return;
31935    const { type: t } = e;
31936    setTimeout(() => {
31937      if (t === "fitGridWidth") {
31938        const { columnLimits: i, defaultMinWidth: s, defaultMaxWidth: o } = e, n = i?.map(({ colId: r, minWidth: a, maxWidth: l }) => ({
31939          key: r,
31940          minWidth: a,
31941          maxWidth: l
31942        }));
31943        this.sizeColumnsToFitGridBody({
31944          defaultMinWidth: s,
31945          defaultMaxWidth: o,
31946          columnLimits: n
31947        });
31948      } else t === "fitProvidedWidth" && this.sizeColumnsToFit(e.width, "sizeColumnsToFit");
31949    });
31950  }
31951  onFirstDataRendered() {
31952    const e = this.gos.get("autoSizeStrategy");
31953    if (e?.type !== "fitCellContents")
31954      return;
31955    const { colIds: t, skipHeader: i } = e;
31956    setTimeout(() => {
31957      t ? this.autoSizeCols({
31958        colKeys: t,
31959        skipHeader: i,
31960        source: "autosizeColumns"
31961      }) : this.autoSizeAllColumns("autosizeColumns", i);
31962    });
31963  }
31964  processResizeOperations() {
31965    this.shouldQueueResizeOperations = !1, this.resizeOperationQueue.forEach((e) => e()), this.resizeOperationQueue = [];
31966  }
31967  pushResizeOperation(e) {
31968    this.resizeOperationQueue.push(e);
31969  }
31970  destroy() {
31971    this.resizeOperationQueue.length = 0, super.destroy();
31972  }
31973};
31974function _F(e, t) {
31975  const i = e.getMinWidth();
31976  t < i && (t = i);
31977  const s = e.getMaxWidth();
31978  return e.isGreaterThanMax(t) && (t = s), t;
31979}
31980var UF = {
31981  moduleName: "ColumnAutoSize",
31982  version: I,
31983  beans: [zF],
31984  apiFunctions: {
31985    sizeColumnsToFit: NF,
31986    autoSizeColumns: VF,
31987    autoSizeAllColumns: WF
31988  },
31989  dependsOn: [$d]
31990};
31991function $F(e) {
31992  return e.pinnedRowModel?.getPinnedTopRowCount() ?? 0;
31993}
31994function KF(e) {
31995  return e.pinnedRowModel?.getPinnedBottomRowCount() ?? 0;
31996}
31997function jF(e, t) {
31998  return e.pinnedRowModel?.getPinnedTopRow(t);
31999}
32000function qF(e, t) {
32001  return e.pinnedRowModel?.getPinnedBottomRow(t);
32002}
32003var YF = class extends y {
32004  constructor() {
32005    super(...arguments), this.beanName = "pinnedRowModel", this.nextId = 0, this.pinnedTopRows = { cache: {}, order: [] }, this.pinnedBottomRows = { cache: {}, order: [] };
32006  }
32007  postConstruct() {
32008    const e = this.gos;
32009    this.setPinnedRowData(e.get("pinnedTopRowData"), "top"), this.setPinnedRowData(e.get("pinnedBottomRowData"), "bottom"), this.addManagedPropertyListener("pinnedTopRowData", (t) => this.setPinnedRowData(t.currentValue, "top")), this.addManagedPropertyListener("pinnedBottomRowData", (t) => this.setPinnedRowData(t.currentValue, "bottom")), this.addManagedEventListeners({ gridStylesChanged: this.onGridStylesChanges.bind(this) });
32010  }
32011  isEmpty(e) {
32012    return this.getCache(e).order.length === 0;
32013  }
32014  isRowsToRender(e) {
32015    return !this.isEmpty(e);
32016  }
32017  onGridStylesChanges(e) {
32018    if (e.rowHeightChanged) {
32019      const t = (i) => {
32020        i.setRowHeight(i.rowHeight, !0);
32021      };
32022      Ii(this.pinnedBottomRows, t), Ii(this.pinnedTopRows, t);
32023    }
32024  }
32025  ensureRowHeightsValid() {
32026    let e = !1, t = 0;
32027    const i = (s) => {
32028      if (s.rowHeightEstimated) {
32029        const o = Ot(this.beans, s);
32030        s.setRowTop(t), s.setRowHeight(o.height), t += o.height, e = !0;
32031      }
32032    };
32033    return Ii(this.pinnedBottomRows, i), t = 0, Ii(this.pinnedTopRows, i), this.eventSvc.dispatchEvent({
32034      type: "pinnedHeightChanged"
32035    }), e;
32036  }
32037  setPinnedRowData(e, t) {
32038    this.updateNodesFromRowData(e, t), this.eventSvc.dispatchEvent({
32039      type: "pinnedRowDataChanged"
32040    });
32041  }
32042  /**
32043   * Updates existing RowNode instances and creates new ones if necessary
32044   *
32045   * Setting data as `undefined` will clear row nodes
32046   */
32047  updateNodesFromRowData(e, t) {
32048    const i = this.getCache(t);
32049    if (e === void 0) {
32050      i.order.length = 0, i.cache = {};
32051      return;
32052    }
32053    const s = fi(this.gos), o = t === "top" ? Sd : bd, n = new Set(i.order), r = [], a = /* @__PURE__ */ new Set();
32054    let l = 0, d = -1;
32055    for (const c of e) {
32056      const u = s?.({ data: c, level: 0, rowPinned: t }) ?? o + this.nextId++;
32057      if (a.has(u)) {
32058        x(96, { id: u, data: c });
32059        continue;
32060      }
32061      d++, a.add(u), r.push(u);
32062      const h = $i(i, u);
32063      if (h !== void 0)
32064        h.data !== c && h.setData(c), l += this.setRowTopAndRowIndex(h, l, d), n.delete(u);
32065      else {
32066        const g = new wi(this.beans);
32067        g.id = u, g.data = c, g.rowPinned = t, l += this.setRowTopAndRowIndex(g, l, d), i.cache[u] = g, i.order.push(u);
32068      }
32069    }
32070    n.forEach((c) => {
32071      $i(i, c)?.clearRowTopAndRowIndex(), delete i.cache[c];
32072    }), i.order = r;
32073  }
32074  setRowTopAndRowIndex(e, t, i) {
32075    return e.setRowTop(t), e.setRowHeight(Ot(this.beans, e).height), e.setRowIndex(i), e.rowHeight;
32076  }
32077  getPinnedTopTotalHeight() {
32078    return La(this.pinnedTopRows);
32079  }
32080  getPinnedBottomTotalHeight() {
32081    return La(this.pinnedBottomRows);
32082  }
32083  getPinnedTopRowCount() {
32084    return Fn(this.pinnedTopRows);
32085  }
32086  getPinnedBottomRowCount() {
32087    return Fn(this.pinnedBottomRows);
32088  }
32089  getPinnedTopRow(e) {
32090    return Rn(this.pinnedTopRows, e);
32091  }
32092  getPinnedBottomRow(e) {
32093    return Rn(this.pinnedBottomRows, e);
32094  }
32095  getPinnedRowById(e, t) {
32096    return $i(this.getCache(t), e);
32097  }
32098  forEachPinnedRow(e, t) {
32099    return Ii(this.getCache(e), t);
32100  }
32101  getCache(e) {
32102    return e === "top" ? this.pinnedTopRows : this.pinnedBottomRows;
32103  }
32104};
32105function La(e) {
32106  const t = Fn(e);
32107  if (t === 0)
32108    return 0;
32109  const i = Rn(e, t - 1);
32110  return i === void 0 ? 0 : i.rowTop + i.rowHeight;
32111}
32112function $i(e, t) {
32113  return e.cache[t];
32114}
32115function Rn(e, t) {
32116  return $i(e, e.order[t]);
32117}
32118function Ii(e, t) {
32119  e.order.forEach((i, s) => {
32120    const o = $i(e, i);
32121    o && t(o, s);
32122  });
32123}
32124function Fn(e) {
32125  return e.order.length;
32126}
32127var QF = {
32128  moduleName: "PinnedRow",
32129  version: I,
32130  beans: [YF],
32131  apiFunctions: {
32132    getPinnedTopRowCount: $F,
32133    getPinnedBottomRowCount: KF,
32134    getPinnedTopRow: jF,
32135    getPinnedBottomRow: qF
32136  }
32137}, ZF = class extends y {
32138  constructor(e, t) {
32139    super(), this.cellCtrl = e, this.staticClasses = [], this.beans = t, this.column = e.column;
32140  }
32141  setComp(e) {
32142    this.cellComp = e, this.applyUserStyles(), this.applyCellClassRules(), this.applyClassesFromColDef();
32143  }
32144  applyCellClassRules() {
32145    const { column: e, cellComp: t } = this, i = e.colDef, s = i.cellClassRules, o = this.getCellClassParams(e, i);
32146    Qn(
32147      this.beans.expressionSvc,
32148      // if current was previous, skip
32149      s === this.cellClassRules ? void 0 : this.cellClassRules,
32150      s,
32151      o,
32152      (n) => t.addOrRemoveCssClass(n, !0),
32153      (n) => t.addOrRemoveCssClass(n, !1)
32154    ), this.cellClassRules = s;
32155  }
32156  applyUserStyles() {
32157    const e = this.column, t = e.colDef, i = t.cellStyle;
32158    if (!i)
32159      return;
32160    let s;
32161    if (typeof i == "function") {
32162      const o = this.getCellClassParams(e, t);
32163      s = i(o);
32164    } else
32165      s = i;
32166    s && this.cellComp.setUserStyles(s);
32167  }
32168  applyClassesFromColDef() {
32169    const { column: e, cellComp: t } = this, i = e.colDef, s = this.getCellClassParams(e, i);
32170    this.staticClasses.forEach((n) => t.addOrRemoveCssClass(n, !1));
32171    const o = this.beans.cellStyles.getStaticCellClasses(i, s);
32172    this.staticClasses = o, o.forEach((n) => t.addOrRemoveCssClass(n, !0));
32173  }
32174  getCellClassParams(e, t) {
32175    const { value: i, rowNode: s } = this.cellCtrl;
32176    return this.beans.gos.addGridCommonParams({
32177      value: i,
32178      data: s.data,
32179      node: s,
32180      colDef: t,
32181      column: e,
32182      rowIndex: s.rowIndex
32183    });
32184  }
32185}, XF = class extends y {
32186  constructor() {
32187    super(...arguments), this.beanName = "cellStyles";
32188  }
32189  processAllCellClasses(e, t, i, s) {
32190    Qn(
32191      this.beans.expressionSvc,
32192      void 0,
32193      e.cellClassRules,
32194      t,
32195      i,
32196      s
32197    ), this.processStaticCellClasses(e, t, i);
32198  }
32199  getStaticCellClasses(e, t) {
32200    const { cellClass: i } = e;
32201    if (!i)
32202      return [];
32203    let s;
32204    return typeof i == "function" ? s = i(t) : s = i, typeof s == "string" && (s = [s]), s || [];
32205  }
32206  createCellCustomStyleFeature(e, t) {
32207    return new ZF(e, t);
32208  }
32209  processStaticCellClasses(e, t, i) {
32210    this.getStaticCellClasses(e, t).forEach((o) => {
32211      i(o);
32212    });
32213  }
32214}, JF = {
32215  moduleName: "CellStyle",
32216  version: I,
32217  beans: [XF]
32218}, ex = {
32219  moduleName: "RowStyle",
32220  version: I,
32221  beans: [Gf]
32222};
32223function tx(e, t) {
32224  return !!e.colHover?.isHovered(t);
32225}
32226var ix = class extends y {
32227  constructor(e, t) {
32228    super(), this.columns = e, this.element = t;
32229  }
32230  postConstruct() {
32231    if (this.gos.get("columnHoverHighlight")) {
32232      const e = this.beans.colHover;
32233      this.addManagedListeners(this.element, {
32234        mouseout: e.clearMouseOver.bind(e),
32235        mouseover: e.setMouseOver.bind(e, this.columns)
32236      });
32237    }
32238  }
32239}, sx = "ag-column-hover", ox = class extends y {
32240  constructor() {
32241    super(...arguments), this.beanName = "colHover";
32242  }
32243  setMouseOver(e) {
32244    this.updateState(e);
32245  }
32246  clearMouseOver() {
32247    this.updateState(null);
32248  }
32249  isHovered(e) {
32250    const t = this.selectedColumns;
32251    return !!t && t.indexOf(e) >= 0;
32252  }
32253  addHeaderColumnHoverListener(e, t, i) {
32254    const s = () => {
32255      if (!this.gos.get("columnHoverHighlight"))
32256        return;
32257      const o = this.isHovered(i);
32258      t.addOrRemoveCssClass("ag-column-hover", o);
32259    };
32260    e.addManagedEventListeners({ columnHoverChanged: s }), s();
32261  }
32262  onCellColumnHover(e, t) {
32263    if (!t || !this.gos.get("columnHoverHighlight"))
32264      return;
32265    const i = this.isHovered(e);
32266    t.addOrRemoveCssClass(sx, i);
32267  }
32268  addHeaderFilterColumnHoverListener(e, t, i, s) {
32269    this.createHoverFeature(e, [i], s);
32270    const o = () => {
32271      if (!this.gos.get("columnHoverHighlight"))
32272        return;
32273      const n = this.isHovered(i);
32274      t.addOrRemoveCssClass("ag-column-hover", n);
32275    };
32276    e.addManagedEventListeners({ columnHoverChanged: o }), o();
32277  }
32278  createHoverFeature(e, t, i) {
32279    e.createManagedBean(new ix(t, i));
32280  }
32281  updateState(e) {
32282    this.selectedColumns = e, this.eventSvc.dispatchEvent({
32283      type: "columnHoverChanged"
32284    });
32285  }
32286}, nx = {
32287  moduleName: "ColumnHover",
32288  version: I,
32289  beans: [ox],
32290  apiFunctions: {
32291    isColumnHovered: tx
32292  }
32293}, rx = class extends y {
32294  constructor() {
32295    super(...arguments), this.beanName = "apiEventSvc", this.syncListeners = /* @__PURE__ */ new Map(), this.asyncListeners = /* @__PURE__ */ new Map(), this.syncGlobalListeners = /* @__PURE__ */ new Set(), this.globalListenerPairs = /* @__PURE__ */ new Map();
32296  }
32297  postConstruct() {
32298    this.wrapSvc = this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.();
32299  }
32300  addEventListener(e, t) {
32301    const i = this.wrapSvc?.wrap(t) ?? t, s = !_i.has(e), o = s ? this.asyncListeners : this.syncListeners;
32302    o.has(e) || o.set(e, /* @__PURE__ */ new Set()), o.get(e).add(i), this.eventSvc.addEventListener(e, i, s);
32303  }
32304  removeEventListener(e, t) {
32305    const i = this.wrapSvc?.unwrap(t) ?? t, o = !!this.asyncListeners.get(e)?.delete(i);
32306    o || this.syncListeners.get(e)?.delete(i), this.eventSvc.removeEventListener(e, i, o);
32307  }
32308  addGlobalListener(e) {
32309    const t = this.wrapSvc?.wrapGlobal(e) ?? e, i = (n, r) => {
32310      _i.has(n) && t(n, r);
32311    }, s = (n, r) => {
32312      _i.has(n) || t(n, r);
32313    };
32314    this.globalListenerPairs.set(e, { syncListener: i, asyncListener: s });
32315    const o = this.eventSvc;
32316    o.addGlobalListener(i, !1), o.addGlobalListener(s, !0);
32317  }
32318  removeGlobalListener(e) {
32319    const { eventSvc: t, wrapSvc: i, globalListenerPairs: s } = this, o = i?.unwrapGlobal(e) ?? e;
32320    if (s.has(o)) {
32321      const { syncListener: r, asyncListener: a } = s.get(o);
32322      t.removeGlobalListener(r, !1), t.removeGlobalListener(a, !0), s.delete(e);
32323    } else
32324      this.syncGlobalListeners.delete(o), t.removeGlobalListener(o, !1);
32325  }
32326  destroyEventListeners(e, t) {
32327    e.forEach((i, s) => {
32328      i.forEach((o) => this.eventSvc.removeEventListener(s, o, t)), i.clear();
32329    }), e.clear();
32330  }
32331  destroyGlobalListeners(e, t) {
32332    e.forEach((i) => this.eventSvc.removeGlobalListener(i, t)), e.clear();
32333  }
32334  destroy() {
32335    super.destroy(), this.destroyEventListeners(this.syncListeners, !1), this.destroyEventListeners(this.asyncListeners, !0), this.destroyGlobalListeners(this.syncGlobalListeners, !1);
32336    const { globalListenerPairs: e, eventSvc: t } = this;
32337    e.forEach(({ syncListener: i, asyncListener: s }) => {
32338      t.removeGlobalListener(i, !1), t.removeGlobalListener(s, !0);
32339    }), e.clear();
32340  }
32341};
32342function ax(e, t, i) {
32343  e.apiEventSvc?.addEventListener(t, i);
32344}
32345function lx(e, t, i) {
32346  e.apiEventSvc?.removeEventListener(t, i);
32347}
32348function dx(e, t) {
32349  e.apiEventSvc?.addGlobalListener(t);
32350}
32351function cx(e, t) {
32352  e.apiEventSvc?.removeGlobalListener(t);
32353}
32354var ux = {
32355  moduleName: "EventApi",
32356  version: I,
32357  apiFunctions: {
32358    addEventListener: ax,
32359    addGlobalListener: dx,
32360    removeEventListener: lx,
32361    removeGlobalListener: cx
32362  },
32363  beans: [rx]
32364}, hx = (
32365  /*css*/
32366  ".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}"
32367), gx = class extends y {
32368  constructor() {
32369    super(...arguments), this.beanName = "tooltipSvc";
32370  }
32371  setupHeaderTooltip(e, t, i, s) {
32372    e && t.destroyBean(e);
32373    const o = To(this.gos), { column: n, eGui: r } = t, a = n.getColDef();
32374    !s && o && !a.headerComponent && (s = Es(
32375      () => r.querySelector(".ag-header-cell-text")
32376    ));
32377    const l = {
32378      getColumn: () => n,
32379      getColDef: () => n.getColDef(),
32380      getGui: () => r,
32381      getLocation: () => "header",
32382      getTooltipValue: () => i ?? n.getColDef().headerTooltip,
32383      shouldDisplayTooltip: s
32384    };
32385    let d = this.createTooltipFeature(l);
32386    return d && (d = t.createBean(d), t.setRefreshFunction("tooltip", () => d.refreshTooltip())), d;
32387  }
32388  setupHeaderGroupTooltip(e, t, i, s) {
32389    e && t.destroyBean(e);
32390    const o = To(this.gos), { column: n, eGui: r } = t, a = n.getColGroupDef();
32391    !s && o && !a?.headerGroupComponent && (s = Es(
32392      () => r.querySelector(".ag-header-group-text")
32393    ));
32394    const l = {
32395      getColumn: () => n,
32396      getGui: () => r,
32397      getLocation: () => "headerGroup",
32398      getTooltipValue: () => i ?? (a && a.headerTooltip),
32399      shouldDisplayTooltip: s
32400    };
32401    a && (l.getColDef = () => a);
32402    const d = this.createTooltipFeature(l);
32403    return d && t.createBean(d);
32404  }
32405  enableCellTooltipFeature(e, t, i) {
32406    const { column: s, rowNode: o } = e, n = () => {
32407      const l = s.getColDef(), d = o.data;
32408      if (l.tooltipField && A(d))
32409        return Vi(d, l.tooltipField, s.isTooltipFieldContainsDots());
32410      const c = l.tooltipValueGetter;
32411      return c ? c(
32412        this.gos.addGridCommonParams({
32413          location: "cell",
32414          colDef: s.getColDef(),
32415          column: s,
32416          rowIndex: e.cellPosition.rowIndex,
32417          node: o,
32418          data: o.data,
32419          value: e.value,
32420          valueFormatted: e.valueFormatted
32421        })
32422      ) : null;
32423    }, r = To(this.gos);
32424    !i && r && !e.isCellRenderer() && (i = Es(() => {
32425      const { eGui: l } = e;
32426      return l.children.length === 0 ? l : l.querySelector(".ag-cell-value");
32427    }));
32428    const a = {
32429      getColumn: () => s,
32430      getColDef: () => s.getColDef(),
32431      getRowIndex: () => e.cellPosition.rowIndex,
32432      getRowNode: () => o,
32433      getGui: () => e.eGui,
32434      getLocation: () => "cell",
32435      getTooltipValue: t != null ? () => t : n,
32436      // this makes no sense, why is the cell formatted value passed to the tooltip???
32437      getValueFormatted: () => e.valueFormatted,
32438      shouldDisplayTooltip: i
32439    };
32440    return this.createTooltipFeature(a, this.beans);
32441  }
32442  refreshRowTooltip(e, t, i, s) {
32443    const o = {
32444      getGui: () => t.getFullWidthElement(),
32445      getTooltipValue: () => i,
32446      getLocation: () => "fullWidthRow",
32447      shouldDisplayTooltip: s
32448    }, n = this.beans, r = n.context;
32449    e && t.destroyBean(e, r);
32450    const a = this.createTooltipFeature(o, n);
32451    return t.createBean(a, r);
32452  }
32453  initCol(e) {
32454    const { colDef: t } = e;
32455    e.tooltipEnabled = A(t.tooltipField) || A(t.tooltipValueGetter) || A(t.tooltipComponent);
32456  }
32457  createTooltipFeature(e, t) {
32458    return this.beans.registry.createDynamicBean("tooltipFeature", !1, e, t);
32459  }
32460}, px = {
32461  moduleName: "Tooltip",
32462  version: I,
32463  beans: [gx],
32464  dynamicBeans: {
32465    tooltipFeature: jm
32466  },
32467  userComponents: {
32468    agTooltipComponent: Db
32469  },
32470  dependsOn: [so],
32471  css: [hx]
32472}, fx = {
32473  moduleName: "Locale",
32474  version: I,
32475  beans: [Sb]
32476}, mx = class extends y {
32477  constructor() {
32478    super(...arguments), this.beanName = "rowAutoHeight", this.wasEverActive = !1;
32479  }
32480  setRowAutoHeight(e, t, i) {
32481    e.__autoHeights || (e.__autoHeights = {}), e.__autoHeights[i.getId()] = t, t != null && (e.__checkAutoHeightsDebounced == null && (e.__checkAutoHeightsDebounced = Ce(this, this.doCheckAutoHeights.bind(this, e), 1)), e.__checkAutoHeightsDebounced());
32482  }
32483  checkAutoHeights(e) {
32484    this.wasEverActive && this.doCheckAutoHeights(e);
32485  }
32486  doCheckAutoHeights(e) {
32487    const t = e.__autoHeights;
32488    if (t == null)
32489      return;
32490    let i = !1, s = !0, o = 0;
32491    const { visibleCols: n, colModel: r, colViewport: a, rowModel: l } = this.beans;
32492    n.autoHeightCols.forEach((c) => {
32493      let u = t[c.getId()];
32494      if (u == null)
32495        if (r.colSpanActive) {
32496          let h = [];
32497          switch (c.getPinned()) {
32498            case "left":
32499              h = n.getLeftColsForRow(e);
32500              break;
32501            case "right":
32502              h = n.getRightColsForRow(e);
32503              break;
32504            case null:
32505              h = a.getColsWithinViewport(e);
32506              break;
32507          }
32508          if (h.includes(c)) {
32509            i = !0;
32510            return;
32511          }
32512          u = -1;
32513        } else {
32514          i = !0;
32515          return;
32516        }
32517      else
32518        s = !1;
32519      u > o && (o = u);
32520    }), !i && ((s || o < 10) && (o = Ot(this.beans, e).height), o != e.rowHeight && (e.setRowHeight(o), l.onRowHeightChangedDebounced?.()));
32521  }
32522  setupCellAutoHeight(e, t, i) {
32523    const s = t.parentElement, { rowNode: o, column: n } = e, r = this.beans, a = Ot(r, o).height, l = (u) => {
32524      if (e.editing || !e.isAlive() || !i.isAlive())
32525        return;
32526      const { paddingTop: h, paddingBottom: g, borderBottomWidth: p, borderTopWidth: f } = Vt(s), m = h + g + p + f, w = t.offsetHeight + m;
32527      if (u < 5) {
32528        const v = te(r), P = !v || !v.contains(t), T = w == 0;
32529        if (P || T) {
32530          window.setTimeout(() => l(u + 1), 0);
32531          return;
32532        }
32533      }
32534      const S = Math.max(w, a);
32535      this.setRowAutoHeight(o, S, n);
32536    }, d = () => l(0);
32537    d();
32538    const c = Rt(r, t, d);
32539    i.addDestroyFunc(() => {
32540      c(), this.setRowAutoHeight(o, void 0, n);
32541    });
32542  }
32543  setAutoHeightActive(e) {
32544    this.active = e.list.some((t) => t.isVisible() && t.isAutoHeight()), this.active && (this.wasEverActive = !0);
32545  }
32546}, Cx = {
32547  moduleName: "RowAutoHeight",
32548  version: I,
32549  beans: [mx]
32550}, vx = {
32551  moduleName: "AllCommunity",
32552  version: I,
32553  dependsOn: [
32554    xR,
32555    kR,
32556    zR,
32557    ly,
32558    k0,
32559    L0,
32560    O0,
32561    G0,
32562    H0,
32563    B0,
32564    N0,
32565    I0,
32566    Xy,
32567    Jy,
32568    e0,
32569    Zy,
32570    t0,
32571    i0,
32572    iF,
32573    aR,
32574    SF,
32575    ow,
32576    Lc,
32577    TF,
32578    BF,
32579    UF,
32580    HC,
32581    QF,
32582    Z0,
32583    lb,
32584    JF,
32585    nx,
32586    ex,
32587    ux,
32588    ub,
32589    QR,
32590    px,
32591    fx,
32592    Cx,
32593    GC,
32594    PR
32595  ]
32596}, wx = Object.defineProperty, Sx = (e, t, i) => t in e ? wx(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, ci = (e, t, i) => Sx(e, typeof t != "symbol" ? t + "" : t, i);
32597class ns {
32598  static getComponentDefinition(t, i) {
32599    let s;
32600    return typeof t == "string" ? s = this.searchForComponentInstance(i, t) : s = { extends: Le({ ...t }) }, s || z(114, { component: t }), s.extends ? (s.extends.setup && (s.setup = s.extends.setup), s.extends.props = this.addParamsToProps(s.extends.props)) : s.props = this.addParamsToProps(s.props), s;
32601  }
32602  static addParamsToProps(t) {
32603    return !t || Array.isArray(t) && t.indexOf("params") === -1 ? t = ["params", ...t || []] : typeof t == "object" && !t.params && (t.params = {
32604      type: Object
32605    }), t;
32606  }
32607  static createAndMountComponent(t, i, s, o) {
32608    const n = ns.getComponentDefinition(t, s);
32609    if (!n)
32610      return;
32611    const { vNode: r, destroy: a, el: l } = this.mount(
32612      n,
32613      { params: Object.freeze(i) },
32614      s,
32615      o || {}
32616    );
32617    return {
32618      componentInstance: r.component.proxy,
32619      element: l,
32620      destroy: a
32621    };
32622  }
32623  static mount(t, i, s, o) {
32624    let n = oe(t, i);
32625    n.appContext = { ...s.appContext, provides: o };
32626    let r = document.createElement("div");
32627    return vr(n, r), { vNode: n, destroy: () => {
32628      r && vr(null, r), r = null, n = null;
32629    }, el: r };
32630  }
32631  static searchForComponentInstance(t, i, s = 10, o = !1) {
32632    let n = null, r = 0, a = t.parent;
32633    for (; !n && a && a.components && ++r < s; )
32634      a.components && a.components[i] && (n = a.components[i]), a = a.parent;
32635    for (r = 0, a = t.parent; !n && a && a.$options && ++r < s; ) {
32636      const l = a;
32637      l.$options && l.$options.components && l.$options.components[i] ? n = l.$options.components[i] : l[i] && (n = l[i]), a = a.parent;
32638    }
32639    for (r = 0, a = t.parent; !n && a && ++r < s; ) {
32640      if (a.exposed) {
32641        const l = a;
32642        l.exposed && l.exposed[i] ? n = l.exposed[i] : l[i] && (n = l[i]);
32643      }
32644      a = a.parent;
32645    }
32646    if (!n) {
32647      const l = t.appContext.components;
32648      l && l[i] && (n = l[i]);
32649    }
32650    return !n && !o ? (z(114, { component: i }), null) : n;
32651  }
32652}
32653class bx extends Eb {
32654  constructor(t, i) {
32655    super(), ci(this, "parent"), ci(this, "provides"), this.parent = t, this.provides = i;
32656  }
32657  createWrapper(t) {
32658    const i = this;
32659    class s extends yx {
32660      init(r) {
32661        super.init(r);
32662      }
32663      hasMethod(r) {
32664        var a, l;
32665        const d = o.getFrameworkComponentInstance();
32666        return d[r] ? !0 : ((a = d.$.exposed) == null ? void 0 : a[r]) != null || ((l = d.exposed) == null ? void 0 : l[r]) != null || d.$.setupState[r] != null;
32667      }
32668      callMethod(r, a) {
32669        var l, d;
32670        const c = this.getFrameworkComponentInstance(), u = o.getFrameworkComponentInstance();
32671        if (u[r])
32672          return u[r].apply(c, a);
32673        {
32674          const h = ((l = c.$.exposed) == null ? void 0 : l[r]) || ((d = c.exposed) == null ? void 0 : d[r]) || c.$.setupState[r];
32675          return h?.apply(c, a);
32676        }
32677      }
32678      addMethod(r, a) {
32679        o[r] = a;
32680      }
32681      processMethod(r, a) {
32682        return r === "refresh" && (this.getFrameworkComponentInstance().params = a[0]), this.hasMethod(r) ? this.callMethod(r, a) : r === "refresh";
32683      }
32684      createComponent(r) {
32685        return i.createComponent(t, r);
32686      }
32687    }
32688    const o = new s();
32689    return o;
32690  }
32691  createComponent(t, i) {
32692    return ns.createAndMountComponent(t, i, this.parent, this.provides);
32693  }
32694  createMethodProxy(t, i, s) {
32695    return function() {
32696      return t.hasMethod(i) ? t.callMethod(i, arguments) : (s && x(233, { methodName: i }), null);
32697    };
32698  }
32699  destroy() {
32700    this.parent = null;
32701  }
32702}
32703class yx {
32704  constructor() {
32705    ci(this, "componentInstance"), ci(this, "element"), ci(this, "unmount");
32706  }
32707  getGui() {
32708    return this.element;
32709  }
32710  destroy() {
32711    this.getFrameworkComponentInstance() && typeof this.getFrameworkComponentInstance().destroy == "function" && this.getFrameworkComponentInstance().destroy(), this.unmount();
32712  }
32713  getFrameworkComponentInstance() {
32714    return this.componentInstance;
32715  }
32716  init(t) {
32717    const { componentInstance: i, element: s, destroy: o } = this.createComponent(t);
32718    this.componentInstance = i, this.unmount = o, this.element = s.firstElementChild ?? s;
32719  }
32720}
32721class Rx extends Hd {
32722  constructor(t) {
32723    super("vue"), ci(this, "parent"), this.parent = t;
32724  }
32725  /*
32726   * vue components are specified in the "components" part of the vue component - as such we need a way to determine
32727   * if a given component is within that context - this method provides this
32728   * Note: This is only really used/necessary with cellRendererSelectors
32729   */
32730  frameworkComponent(t, i) {
32731    let s = ns.searchForComponentInstance(this.parent, t, 10, !0) ? t : null;
32732    if (!s && i && i[t]) {
32733      const o = i[t];
32734      s = ns.searchForComponentInstance(this.parent, o, 10, !0) ? o : null;
32735    }
32736    return s;
32737  }
32738  isFrameworkComponent(t) {
32739    return typeof t == "object";
32740  }
32741}
32742function Fx() {
32743  return {
32744    gridOptions: {},
32745    modules: [],
32746    // @START_DEFAULTS@
32747    statusBar: void 0,
32748    sideBar: void 0,
32749    suppressContextMenu: void 0,
32750    preventDefaultOnContextMenu: void 0,
32751    allowContextMenuWithControlKey: void 0,
32752    columnMenu: void 0,
32753    suppressMenuHide: void 0,
32754    enableBrowserTooltips: void 0,
32755    tooltipTrigger: void 0,
32756    tooltipShowDelay: void 0,
32757    tooltipHideDelay: void 0,
32758    tooltipMouseTrack: void 0,
32759    tooltipShowMode: void 0,
32760    tooltipInteraction: void 0,
32761    popupParent: void 0,
32762    copyHeadersToClipboard: void 0,
32763    copyGroupHeadersToClipboard: void 0,
32764    clipboardDelimiter: void 0,
32765    suppressCopyRowsToClipboard: void 0,
32766    suppressCopySingleCellRanges: void 0,
32767    suppressLastEmptyLineOnPaste: void 0,
32768    suppressClipboardPaste: void 0,
32769    suppressClipboardApi: void 0,
32770    suppressCutToClipboard: void 0,
32771    columnDefs: void 0,
32772    defaultColDef: void 0,
32773    defaultColGroupDef: void 0,
32774    columnTypes: void 0,
32775    dataTypeDefinitions: void 0,
32776    maintainColumnOrder: void 0,
32777    enableStrictPivotColumnOrder: void 0,
32778    suppressFieldDotNotation: void 0,
32779    headerHeight: void 0,
32780    groupHeaderHeight: void 0,
32781    floatingFiltersHeight: void 0,
32782    pivotHeaderHeight: void 0,
32783    pivotGroupHeaderHeight: void 0,
32784    allowDragFromColumnsToolPanel: void 0,
32785    suppressMovableColumns: void 0,
32786    suppressColumnMoveAnimation: void 0,
32787    suppressMoveWhenColumnDragging: void 0,
32788    suppressDragLeaveHidesColumns: void 0,
32789    suppressGroupChangesColumnVisibility: void 0,
32790    suppressMakeColumnVisibleAfterUnGroup: void 0,
32791    suppressRowGroupHidesColumns: void 0,
32792    colResizeDefault: void 0,
32793    suppressAutoSize: void 0,
32794    autoSizePadding: void 0,
32795    skipHeaderOnAutoSize: void 0,
32796    autoSizeStrategy: void 0,
32797    components: void 0,
32798    editType: void 0,
32799    singleClickEdit: void 0,
32800    suppressClickEdit: void 0,
32801    readOnlyEdit: void 0,
32802    stopEditingWhenCellsLoseFocus: void 0,
32803    enterNavigatesVertically: void 0,
32804    enterNavigatesVerticallyAfterEdit: void 0,
32805    enableCellEditingOnBackspace: void 0,
32806    undoRedoCellEditing: void 0,
32807    undoRedoCellEditingLimit: void 0,
32808    defaultCsvExportParams: void 0,
32809    suppressCsvExport: void 0,
32810    defaultExcelExportParams: void 0,
32811    suppressExcelExport: void 0,
32812    excelStyles: void 0,
32813    quickFilterText: void 0,
32814    cacheQuickFilter: void 0,
32815    includeHiddenColumnsInQuickFilter: void 0,
32816    quickFilterParser: void 0,
32817    quickFilterMatcher: void 0,
32818    applyQuickFilterBeforePivotOrAgg: void 0,
32819    excludeChildrenWhenTreeDataFiltering: void 0,
32820    enableAdvancedFilter: void 0,
32821    alwaysPassFilter: void 0,
32822    includeHiddenColumnsInAdvancedFilter: void 0,
32823    advancedFilterParent: void 0,
32824    advancedFilterBuilderParams: void 0,
32825    suppressAdvancedFilterEval: void 0,
32826    suppressSetFilterByDefault: void 0,
32827    enableCharts: void 0,
32828    chartThemes: void 0,
32829    customChartThemes: void 0,
32830    chartThemeOverrides: void 0,
32831    chartToolPanelsDef: void 0,
32832    chartMenuItems: void 0,
32833    loadingCellRenderer: void 0,
32834    loadingCellRendererParams: void 0,
32835    loadingCellRendererSelector: void 0,
32836    localeText: void 0,
32837    masterDetail: void 0,
32838    keepDetailRows: void 0,
32839    keepDetailRowsCount: void 0,
32840    detailCellRenderer: void 0,
32841    detailCellRendererParams: void 0,
32842    detailRowHeight: void 0,
32843    detailRowAutoHeight: void 0,
32844    context: void 0,
32845    dragAndDropImageComponent: void 0,
32846    dragAndDropImageComponentParams: void 0,
32847    alignedGrids: void 0,
32848    tabIndex: void 0,
32849    rowBuffer: void 0,
32850    valueCache: void 0,
32851    valueCacheNeverExpires: void 0,
32852    enableCellExpressions: void 0,
32853    suppressTouch: void 0,
32854    suppressFocusAfterRefresh: void 0,
32855    suppressBrowserResizeObserver: void 0,
32856    suppressPropertyNamesCheck: void 0,
32857    suppressChangeDetection: void 0,
32858    debug: void 0,
32859    loading: void 0,
32860    overlayLoadingTemplate: void 0,
32861    loadingOverlayComponent: void 0,
32862    loadingOverlayComponentParams: void 0,
32863    suppressLoadingOverlay: void 0,
32864    overlayNoRowsTemplate: void 0,
32865    noRowsOverlayComponent: void 0,
32866    noRowsOverlayComponentParams: void 0,
32867    suppressNoRowsOverlay: void 0,
32868    pagination: void 0,
32869    paginationPageSize: void 0,
32870    paginationPageSizeSelector: void 0,
32871    paginationAutoPageSize: void 0,
32872    paginateChildRows: void 0,
32873    suppressPaginationPanel: void 0,
32874    pivotMode: void 0,
32875    pivotPanelShow: void 0,
32876    pivotMaxGeneratedColumns: void 0,
32877    pivotDefaultExpanded: void 0,
32878    pivotColumnGroupTotals: void 0,
32879    pivotRowTotals: void 0,
32880    pivotSuppressAutoColumn: void 0,
32881    suppressExpandablePivotGroups: void 0,
32882    functionsReadOnly: void 0,
32883    aggFuncs: void 0,
32884    suppressAggFuncInHeader: void 0,
32885    alwaysAggregateAtRootLevel: void 0,
32886    aggregateOnlyChangedColumns: void 0,
32887    suppressAggFilteredOnly: void 0,
32888    removePivotHeaderRowWhenSingleValueColumn: void 0,
32889    animateRows: void 0,
32890    cellFlashDuration: void 0,
32891    cellFadeDuration: void 0,
32892    allowShowChangeAfterFilter: void 0,
32893    domLayout: void 0,
32894    ensureDomOrder: void 0,
32895    enableRtl: void 0,
32896    suppressColumnVirtualisation: void 0,
32897    suppressMaxRenderedRowRestriction: void 0,
32898    suppressRowVirtualisation: void 0,
32899    rowDragManaged: void 0,
32900    suppressRowDrag: void 0,
32901    suppressMoveWhenRowDragging: void 0,
32902    rowDragEntireRow: void 0,
32903    rowDragMultiRow: void 0,
32904    rowDragText: void 0,
32905    fullWidthCellRenderer: void 0,
32906    fullWidthCellRendererParams: void 0,
32907    embedFullWidthRows: void 0,
32908    groupDisplayType: void 0,
32909    groupDefaultExpanded: void 0,
32910    autoGroupColumnDef: void 0,
32911    groupMaintainOrder: void 0,
32912    groupSelectsChildren: void 0,
32913    groupLockGroupColumns: void 0,
32914    groupAggFiltering: void 0,
32915    groupTotalRow: void 0,
32916    grandTotalRow: void 0,
32917    suppressStickyTotalRow: void 0,
32918    groupSuppressBlankHeader: void 0,
32919    groupSelectsFiltered: void 0,
32920    showOpenedGroup: void 0,
32921    groupHideParentOfSingleChild: void 0,
32922    groupRemoveSingleChildren: void 0,
32923    groupRemoveLowestSingleChildren: void 0,
32924    groupHideOpenParents: void 0,
32925    groupAllowUnbalanced: void 0,
32926    rowGroupPanelShow: void 0,
32927    groupRowRenderer: void 0,
32928    groupRowRendererParams: void 0,
32929    treeData: void 0,
32930    rowGroupPanelSuppressSort: void 0,
32931    suppressGroupRowsSticky: void 0,
32932    pinnedTopRowData: void 0,
32933    pinnedBottomRowData: void 0,
32934    rowModelType: void 0,
32935    rowData: void 0,
32936    asyncTransactionWaitMillis: void 0,
32937    suppressModelUpdateAfterUpdateTransaction: void 0,
32938    datasource: void 0,
32939    cacheOverflowSize: void 0,
32940    infiniteInitialRowCount: void 0,
32941    serverSideInitialRowCount: void 0,
32942    suppressServerSideFullWidthLoadingRow: void 0,
32943    cacheBlockSize: void 0,
32944    maxBlocksInCache: void 0,
32945    maxConcurrentDatasourceRequests: void 0,
32946    blockLoadDebounceMillis: void 0,
32947    purgeClosedRowNodes: void 0,
32948    serverSideDatasource: void 0,
32949    serverSideSortAllLevels: void 0,
32950    serverSideEnableClientSideSort: void 0,
32951    serverSideOnlyRefreshFilteredGroups: void 0,
32952    serverSidePivotResultFieldSeparator: void 0,
32953    viewportDatasource: void 0,
32954    viewportRowModelPageSize: void 0,
32955    viewportRowModelBufferSize: void 0,
32956    alwaysShowHorizontalScroll: void 0,
32957    alwaysShowVerticalScroll: void 0,
32958    debounceVerticalScrollbar: void 0,
32959    suppressHorizontalScroll: void 0,
32960    suppressScrollOnNewData: void 0,
32961    suppressScrollWhenPopupsAreOpen: void 0,
32962    suppressAnimationFrame: void 0,
32963    suppressMiddleClickScrolls: void 0,
32964    suppressPreventDefaultOnMouseWheel: void 0,
32965    scrollbarWidth: void 0,
32966    rowSelection: void 0,
32967    cellSelection: void 0,
32968    rowMultiSelectWithClick: void 0,
32969    suppressRowDeselection: void 0,
32970    suppressRowClickSelection: void 0,
32971    suppressCellFocus: void 0,
32972    suppressHeaderFocus: void 0,
32973    selectionColumnDef: void 0,
32974    suppressMultiRangeSelection: void 0,
32975    enableCellTextSelection: void 0,
32976    enableRangeSelection: void 0,
32977    enableRangeHandle: void 0,
32978    enableFillHandle: void 0,
32979    fillHandleDirection: void 0,
32980    suppressClearOnFillReduction: void 0,
32981    sortingOrder: void 0,
32982    accentedSort: void 0,
32983    unSortIcon: void 0,
32984    suppressMultiSort: void 0,
32985    alwaysMultiSort: void 0,
32986    multiSortKey: void 0,
32987    suppressMaintainUnsortedOrder: void 0,
32988    icons: void 0,
32989    rowHeight: void 0,
32990    rowStyle: void 0,
32991    rowClass: void 0,
32992    rowClassRules: void 0,
32993    suppressRowHoverHighlight: void 0,
32994    suppressRowTransform: void 0,
32995    columnHoverHighlight: void 0,
32996    gridId: void 0,
32997    deltaSort: void 0,
32998    treeDataDisplayType: void 0,
32999    enableGroupEdit: void 0,
33000    initialState: void 0,
33001    theme: void 0,
33002    loadThemeGoogleFonts: void 0,
33003    getContextMenuItems: void 0,
33004    getMainMenuItems: void 0,
33005    postProcessPopup: void 0,
33006    processUnpinnedColumns: void 0,
33007    processCellForClipboard: void 0,
33008    processHeaderForClipboard: void 0,
33009    processGroupHeaderForClipboard: void 0,
33010    processCellFromClipboard: void 0,
33011    sendToClipboard: void 0,
33012    processDataFromClipboard: void 0,
33013    isExternalFilterPresent: void 0,
33014    doesExternalFilterPass: void 0,
33015    getChartToolbarItems: void 0,
33016    createChartContainer: void 0,
33017    focusGridInnerElement: void 0,
33018    navigateToNextHeader: void 0,
33019    tabToNextHeader: void 0,
33020    navigateToNextCell: void 0,
33021    tabToNextCell: void 0,
33022    getLocaleText: void 0,
33023    getDocument: void 0,
33024    paginationNumberFormatter: void 0,
33025    getGroupRowAgg: void 0,
33026    isGroupOpenByDefault: void 0,
33027    initialGroupOrderComparator: void 0,
33028    processPivotResultColDef: void 0,
33029    processPivotResultColGroupDef: void 0,
33030    getDataPath: void 0,
33031    getChildCount: void 0,
33032    getServerSideGroupLevelParams: void 0,
33033    isServerSideGroupOpenByDefault: void 0,
33034    isApplyServerSideTransaction: void 0,
33035    isServerSideGroup: void 0,
33036    getServerSideGroupKey: void 0,
33037    getBusinessKeyForNode: void 0,
33038    getRowId: void 0,
33039    resetRowDataOnUpdate: void 0,
33040    processRowPostCreate: void 0,
33041    isRowSelectable: void 0,
33042    isRowMaster: void 0,
33043    fillOperation: void 0,
33044    postSortRows: void 0,
33045    getRowStyle: void 0,
33046    getRowClass: void 0,
33047    getRowHeight: void 0,
33048    isFullWidthRow: void 0,
33049    // @END_DEFAULTS@
33050    // @START_EVENT_PROPS@
33051    "onColumn-everything-changed": void 0,
33052    "onNew-columns-loaded": void 0,
33053    "onColumn-pivot-mode-changed": void 0,
33054    "onPivot-max-columns-exceeded": void 0,
33055    "onColumn-row-group-changed": void 0,
33056    "onExpand-or-collapse-all": void 0,
33057    "onColumn-pivot-changed": void 0,
33058    "onGrid-columns-changed": void 0,
33059    "onColumn-value-changed": void 0,
33060    "onColumn-moved": void 0,
33061    "onColumn-visible": void 0,
33062    "onColumn-pinned": void 0,
33063    "onColumn-group-opened": void 0,
33064    "onColumn-resized": void 0,
33065    "onDisplayed-columns-changed": void 0,
33066    "onVirtual-columns-changed": void 0,
33067    "onColumn-header-mouse-over": void 0,
33068    "onColumn-header-mouse-leave": void 0,
33069    "onColumn-header-clicked": void 0,
33070    "onColumn-header-context-menu": void 0,
33071    "onAsync-transactions-flushed": void 0,
33072    "onRow-group-opened": void 0,
33073    "onRow-data-updated": void 0,
33074    "onPinned-row-data-changed": void 0,
33075    "onRange-selection-changed": void 0,
33076    "onCell-selection-changed": void 0,
33077    "onChart-created": void 0,
33078    "onChart-range-selection-changed": void 0,
33079    "onChart-options-changed": void 0,
33080    "onChart-destroyed": void 0,
33081    "onTool-panel-visible-changed": void 0,
33082    "onTool-panel-size-changed": void 0,
33083    "onModel-updated": void 0,
33084    "onCut-start": void 0,
33085    "onCut-end": void 0,
33086    "onPaste-start": void 0,
33087    "onPaste-end": void 0,
33088    "onFill-start": void 0,
33089    "onFill-end": void 0,
33090    "onCell-selection-delete-start": void 0,
33091    "onCell-selection-delete-end": void 0,
33092    "onRange-delete-start": void 0,
33093    "onRange-delete-end": void 0,
33094    "onUndo-started": void 0,
33095    "onUndo-ended": void 0,
33096    "onRedo-started": void 0,
33097    "onRedo-ended": void 0,
33098    "onCell-clicked": void 0,
33099    "onCell-double-clicked": void 0,
33100    "onCell-mouse-down": void 0,
33101    "onCell-context-menu": void 0,
33102    "onCell-value-changed": void 0,
33103    "onCell-edit-request": void 0,
33104    "onRow-value-changed": void 0,
33105    "onHeader-focused": void 0,
33106    "onCell-focused": void 0,
33107    "onRow-selected": void 0,
33108    "onSelection-changed": void 0,
33109    "onTooltip-show": void 0,
33110    "onTooltip-hide": void 0,
33111    "onCell-key-down": void 0,
33112    "onCell-mouse-over": void 0,
33113    "onCell-mouse-out": void 0,
33114    "onFilter-changed": void 0,
33115    "onFilter-modified": void 0,
33116    "onFilter-opened": void 0,
33117    "onAdvanced-filter-builder-visible-changed": void 0,
33118    "onSort-changed": void 0,
33119    "onVirtual-row-removed": void 0,
33120    "onRow-clicked": void 0,
33121    "onRow-double-clicked": void 0,
33122    "onGrid-ready": void 0,
33123    "onGrid-pre-destroyed": void 0,
33124    "onGrid-size-changed": void 0,
33125    "onViewport-changed": void 0,
33126    "onFirst-data-rendered": void 0,
33127    "onDrag-started": void 0,
33128    "onDrag-stopped": void 0,
33129    "onDrag-cancelled": void 0,
33130    "onRow-editing-started": void 0,
33131    "onRow-editing-stopped": void 0,
33132    "onCell-editing-started": void 0,
33133    "onCell-editing-stopped": void 0,
33134    "onBody-scroll": void 0,
33135    "onBody-scroll-end": void 0,
33136    "onPagination-changed": void 0,
33137    "onComponent-state-changed": void 0,
33138    "onStore-refreshed": void 0,
33139    "onState-updated": void 0,
33140    "onColumn-menu-visible-changed": void 0,
33141    "onContext-menu-visible-changed": void 0,
33142    "onRow-drag-enter": void 0,
33143    "onRow-drag-move": void 0,
33144    "onRow-drag-leave": void 0,
33145    "onRow-drag-end": void 0,
33146    "onRow-drag-cancel": void 0
33147    // @END_EVENT_PROPS@
33148  };
33149}
33150const xx = (e, t) => {
33151  let i;
33152  return () => {
33153    const s = function() {
33154      e();
33155    };
33156    window.clearTimeout(i), i = window.setTimeout(s, t);
33157  };
33158};
33159function Px(e) {
33160  return e && e.constructor && e.constructor.toString().substring(0, 5) === "class";
33161}
33162function Yt(e) {
33163  const t = (i) => Array.isArray(i) ? i.map((s) => t(s)) : Qc(i) || Zc(i) || Xc(i) ? t(Jc(i)) : i && typeof i == "object" && Object.keys(i).length > 0 ? Object.keys(i).reduce((s, o) => (s[o] = Px(i[o]) ? i[o] : t(i[o]), s), {}) : i;
33164  return t(e);
33165}
33166const Ex = { ref: "root" }, Dx = /* @__PURE__ */ Le({
33167  __name: "AgGridVue",
33168  props: /* @__PURE__ */ Cr(/* @__PURE__ */ Yc({
33169    gridOptions: {},
33170    modules: {},
33171    statusBar: {},
33172    sideBar: { type: [Object, String, Array, Boolean, null] },
33173    suppressContextMenu: { type: Boolean },
33174    preventDefaultOnContextMenu: { type: Boolean },
33175    allowContextMenuWithControlKey: { type: Boolean },
33176    columnMenu: {},
33177    suppressMenuHide: { type: Boolean },
33178    enableBrowserTooltips: { type: Boolean },
33179    tooltipTrigger: {},
33180    tooltipShowDelay: {},
33181    tooltipHideDelay: {},
33182    tooltipMouseTrack: { type: Boolean },
33183    tooltipShowMode: {},
33184    tooltipInteraction: { type: Boolean },
33185    popupParent: {},
33186    copyHeadersToClipboard: { type: Boolean },
33187    copyGroupHeadersToClipboard: { type: Boolean },
33188    clipboardDelimiter: {},
33189    suppressCopyRowsToClipboard: { type: Boolean },
33190    suppressCopySingleCellRanges: { type: Boolean },
33191    suppressLastEmptyLineOnPaste: { type: Boolean },
33192    suppressClipboardPaste: { type: Boolean },
33193    suppressClipboardApi: { type: Boolean },
33194    suppressCutToClipboard: { type: Boolean },
33195    columnDefs: {},
33196    defaultColDef: {},
33197    defaultColGroupDef: {},
33198    columnTypes: {},
33199    dataTypeDefinitions: {},
33200    maintainColumnOrder: { type: Boolean },
33201    enableStrictPivotColumnOrder: { type: Boolean },
33202    suppressFieldDotNotation: { type: Boolean },
33203    headerHeight: {},
33204    groupHeaderHeight: {},
33205    floatingFiltersHeight: {},
33206    pivotHeaderHeight: {},
33207    pivotGroupHeaderHeight: {},
33208    allowDragFromColumnsToolPanel: { type: Boolean },
33209    suppressMovableColumns: { type: Boolean },
33210    suppressColumnMoveAnimation: { type: Boolean },
33211    suppressMoveWhenColumnDragging: { type: Boolean },
33212    suppressDragLeaveHidesColumns: { type: Boolean },
33213    suppressGroupChangesColumnVisibility: { type: [Boolean, String] },
33214    suppressMakeColumnVisibleAfterUnGroup: { type: Boolean },
33215    suppressRowGroupHidesColumns: { type: Boolean },
33216    colResizeDefault: {},
33217    suppressAutoSize: { type: Boolean },
33218    autoSizePadding: {},
33219    skipHeaderOnAutoSize: { type: Boolean },
33220    autoSizeStrategy: {},
33221    components: {},
33222    editType: {},
33223    singleClickEdit: { type: Boolean },
33224    suppressClickEdit: { type: Boolean },
33225    readOnlyEdit: { type: Boolean },
33226    stopEditingWhenCellsLoseFocus: { type: Boolean },
33227    enterNavigatesVertically: { type: Boolean },
33228    enterNavigatesVerticallyAfterEdit: { type: Boolean },
33229    enableCellEditingOnBackspace: { type: Boolean },
33230    undoRedoCellEditing: { type: Boolean },
33231    undoRedoCellEditingLimit: {},
33232    defaultCsvExportParams: {},
33233    suppressCsvExport: { type: Boolean },
33234    defaultExcelExportParams: {},
33235    suppressExcelExport: { type: Boolean },
33236    excelStyles: {},
33237    quickFilterText: {},
33238    cacheQuickFilter: { type: Boolean },
33239    includeHiddenColumnsInQuickFilter: { type: Boolean },
33240    quickFilterParser: { type: Function },
33241    quickFilterMatcher: { type: Function },
33242    applyQuickFilterBeforePivotOrAgg: { type: Boolean },
33243    excludeChildrenWhenTreeDataFiltering: { type: Boolean },
33244    enableAdvancedFilter: { type: Boolean },
33245    alwaysPassFilter: { type: Function },
33246    includeHiddenColumnsInAdvancedFilter: { type: Boolean },
33247    advancedFilterParent: {},
33248    advancedFilterBuilderParams: {},
33249    suppressAdvancedFilterEval: { type: Boolean },
33250    suppressSetFilterByDefault: { type: Boolean },
33251    enableCharts: { type: Boolean },
33252    chartThemes: {},
33253    customChartThemes: {},
33254    chartThemeOverrides: {},
33255    chartToolPanelsDef: {},
33256    chartMenuItems: { type: [Array, Function] },
33257    loadingCellRenderer: {},
33258    loadingCellRendererParams: {},
33259    loadingCellRendererSelector: { type: Function },
33260    localeText: {},
33261    masterDetail: { type: Boolean },
33262    keepDetailRows: { type: Boolean },
33263    keepDetailRowsCount: {},
33264    detailCellRenderer: {},
33265    detailCellRendererParams: {},
33266    detailRowHeight: {},
33267    detailRowAutoHeight: { type: Boolean },
33268    context: {},
33269    dragAndDropImageComponent: {},
33270    dragAndDropImageComponentParams: {},
33271    alignedGrids: { type: [Array, Function] },
33272    tabIndex: {},
33273    rowBuffer: {},
33274    valueCache: { type: Boolean },
33275    valueCacheNeverExpires: { type: Boolean },
33276    enableCellExpressions: { type: Boolean },
33277    suppressTouch: { type: Boolean },
33278    suppressFocusAfterRefresh: { type: Boolean },
33279    suppressBrowserResizeObserver: { type: Boolean },
33280    suppressPropertyNamesCheck: { type: Boolean },
33281    suppressChangeDetection: { type: Boolean },
33282    debug: { type: Boolean },
33283    loading: { type: Boolean },
33284    overlayLoadingTemplate: {},
33285    loadingOverlayComponent: {},
33286    loadingOverlayComponentParams: {},
33287    suppressLoadingOverlay: { type: Boolean },
33288    overlayNoRowsTemplate: {},
33289    noRowsOverlayComponent: {},
33290    noRowsOverlayComponentParams: {},
33291    suppressNoRowsOverlay: { type: Boolean },
33292    pagination: { type: Boolean },
33293    paginationPageSize: {},
33294    paginationPageSizeSelector: { type: [Array, Boolean] },
33295    paginationAutoPageSize: { type: Boolean },
33296    paginateChildRows: { type: Boolean },
33297    suppressPaginationPanel: { type: Boolean },
33298    pivotMode: { type: Boolean },
33299    pivotPanelShow: {},
33300    pivotMaxGeneratedColumns: {},
33301    pivotDefaultExpanded: {},
33302    pivotColumnGroupTotals: {},
33303    pivotRowTotals: {},
33304    pivotSuppressAutoColumn: { type: Boolean },
33305    suppressExpandablePivotGroups: { type: Boolean },
33306    functionsReadOnly: { type: Boolean },
33307    aggFuncs: {},
33308    suppressAggFuncInHeader: { type: Boolean },
33309    alwaysAggregateAtRootLevel: { type: Boolean },
33310    aggregateOnlyChangedColumns: { type: Boolean },
33311    suppressAggFilteredOnly: { type: Boolean },
33312    removePivotHeaderRowWhenSingleValueColumn: { type: Boolean },
33313    animateRows: { type: Boolean },
33314    cellFlashDuration: {},
33315    cellFadeDuration: {},
33316    allowShowChangeAfterFilter: { type: Boolean },
33317    domLayout: {},
33318    ensureDomOrder: { type: Boolean },
33319    enableRtl: { type: Boolean },
33320    suppressColumnVirtualisation: { type: Boolean },
33321    suppressMaxRenderedRowRestriction: { type: Boolean },
33322    suppressRowVirtualisation: { type: Boolean },
33323    rowDragManaged: { type: Boolean },
33324    suppressRowDrag: { type: Boolean },
33325    suppressMoveWhenRowDragging: { type: Boolean },
33326    rowDragEntireRow: { type: Boolean },
33327    rowDragMultiRow: { type: Boolean },
33328    rowDragText: { type: Function },
33329    fullWidthCellRenderer: {},
33330    fullWidthCellRendererParams: {},
33331    embedFullWidthRows: { type: Boolean },
33332    groupDisplayType: {},
33333    groupDefaultExpanded: {},
33334    autoGroupColumnDef: {},
33335    groupMaintainOrder: { type: Boolean },
33336    groupSelectsChildren: { type: Boolean },
33337    groupLockGroupColumns: {},
33338    groupAggFiltering: { type: [Boolean, Function] },
33339    groupTotalRow: { type: [String, Function] },
33340    grandTotalRow: {},
33341    suppressStickyTotalRow: { type: [Boolean, String] },
33342    groupSuppressBlankHeader: { type: Boolean },
33343    groupSelectsFiltered: { type: Boolean },
33344    showOpenedGroup: { type: Boolean },
33345    groupHideParentOfSingleChild: { type: [Boolean, String] },
33346    groupRemoveSingleChildren: { type: Boolean },
33347    groupRemoveLowestSingleChildren: { type: Boolean },
33348    groupHideOpenParents: { type: Boolean },
33349    groupAllowUnbalanced: { type: Boolean },
33350    rowGroupPanelShow: {},
33351    groupRowRenderer: {},
33352    groupRowRendererParams: {},
33353    treeData: { type: Boolean },
33354    rowGroupPanelSuppressSort: { type: Boolean },
33355    suppressGroupRowsSticky: { type: Boolean },
33356    pinnedTopRowData: {},
33357    pinnedBottomRowData: {},
33358    rowModelType: {},
33359    rowData: {},
33360    asyncTransactionWaitMillis: {},
33361    suppressModelUpdateAfterUpdateTransaction: { type: Boolean },
33362    datasource: {},
33363    cacheOverflowSize: {},
33364    infiniteInitialRowCount: {},
33365    serverSideInitialRowCount: {},
33366    suppressServerSideFullWidthLoadingRow: { type: Boolean },
33367    cacheBlockSize: {},
33368    maxBlocksInCache: {},
33369    maxConcurrentDatasourceRequests: {},
33370    blockLoadDebounceMillis: {},
33371    purgeClosedRowNodes: { type: Boolean },
33372    serverSideDatasource: {},
33373    serverSideSortAllLevels: { type: Boolean },
33374    serverSideEnableClientSideSort: { type: Boolean },
33375    serverSideOnlyRefreshFilteredGroups: { type: Boolean },
33376    serverSidePivotResultFieldSeparator: {},
33377    viewportDatasource: {},
33378    viewportRowModelPageSize: {},
33379    viewportRowModelBufferSize: {},
33380    alwaysShowHorizontalScroll: { type: Boolean },
33381    alwaysShowVerticalScroll: { type: Boolean },
33382    debounceVerticalScrollbar: { type: Boolean },
33383    suppressHorizontalScroll: { type: Boolean },
33384    suppressScrollOnNewData: { type: Boolean },
33385    suppressScrollWhenPopupsAreOpen: { type: Boolean },
33386    suppressAnimationFrame: { type: Boolean },
33387    suppressMiddleClickScrolls: { type: Boolean },
33388    suppressPreventDefaultOnMouseWheel: { type: Boolean },
33389    scrollbarWidth: {},
33390    rowSelection: {},
33391    cellSelection: { type: [Boolean, Object] },
33392    rowMultiSelectWithClick: { type: Boolean },
33393    suppressRowDeselection: { type: Boolean },
33394    suppressRowClickSelection: { type: Boolean },
33395    suppressCellFocus: { type: Boolean },
33396    suppressHeaderFocus: { type: Boolean },
33397    selectionColumnDef: {},
33398    suppressMultiRangeSelection: { type: Boolean },
33399    enableCellTextSelection: { type: Boolean },
33400    enableRangeSelection: { type: Boolean },
33401    enableRangeHandle: { type: Boolean },
33402    enableFillHandle: { type: Boolean },
33403    fillHandleDirection: {},
33404    suppressClearOnFillReduction: { type: Boolean },
33405    sortingOrder: {},
33406    accentedSort: { type: Boolean },
33407    unSortIcon: { type: Boolean },
33408    suppressMultiSort: { type: Boolean },
33409    alwaysMultiSort: { type: Boolean },
33410    multiSortKey: {},
33411    suppressMaintainUnsortedOrder: { type: Boolean },
33412    icons: {},
33413    rowHeight: {},
33414    rowStyle: {},
33415    rowClass: {},
33416    rowClassRules: {},
33417    suppressRowHoverHighlight: { type: Boolean },
33418    suppressRowTransform: { type: Boolean },
33419    columnHoverHighlight: { type: Boolean },
33420    gridId: {},
33421    deltaSort: { type: Boolean },
33422    treeDataDisplayType: {},
33423    enableGroupEdit: { type: Boolean },
33424    initialState: {},
33425    theme: {},
33426    loadThemeGoogleFonts: { type: Boolean },
33427    getContextMenuItems: { type: Function },
33428    getMainMenuItems: { type: Function },
33429    postProcessPopup: { type: Function },
33430    processUnpinnedColumns: { type: Function },
33431    processCellForClipboard: { type: Function },
33432    processHeaderForClipboard: { type: Function },
33433    processGroupHeaderForClipboard: { type: Function },
33434    processCellFromClipboard: { type: Function },
33435    sendToClipboard: { type: Function },
33436    processDataFromClipboard: { type: Function },
33437    isExternalFilterPresent: { type: Function },
33438    doesExternalFilterPass: { type: Function },
33439    getChartToolbarItems: { type: Function },
33440    createChartContainer: { type: Function },
33441    focusGridInnerElement: { type: Function },
33442    navigateToNextHeader: { type: Function },
33443    tabToNextHeader: { type: Function },
33444    navigateToNextCell: { type: Function },
33445    tabToNextCell: { type: Function },
33446    getLocaleText: { type: Function },
33447    getDocument: { type: Function },
33448    paginationNumberFormatter: { type: Function },
33449    getGroupRowAgg: { type: Function },
33450    isGroupOpenByDefault: { type: Function },
33451    initialGroupOrderComparator: { type: Function },
33452    processPivotResultColDef: { type: Function },
33453    processPivotResultColGroupDef: { type: Function },
33454    getDataPath: { type: Function },
33455    getChildCount: { type: Function },
33456    getServerSideGroupLevelParams: { type: Function },
33457    isServerSideGroupOpenByDefault: { type: Function },
33458    isApplyServerSideTransaction: { type: Function },
33459    isServerSideGroup: { type: Function },
33460    getServerSideGroupKey: { type: Function },
33461    getBusinessKeyForNode: { type: Function },
33462    getRowId: { type: Function },
33463    resetRowDataOnUpdate: { type: Boolean },
33464    processRowPostCreate: { type: Function },
33465    isRowSelectable: { type: Function },
33466    isRowMaster: { type: Function },
33467    fillOperation: { type: Function },
33468    postSortRows: { type: Function },
33469    getRowStyle: { type: Function },
33470    getRowClass: { type: Function },
33471    getRowHeight: { type: Function },
33472    isFullWidthRow: { type: Function },
33473    "onTool-panel-visible-changed": {},
33474    "onTool-panel-size-changed": {},
33475    "onColumn-menu-visible-changed": {},
33476    "onContext-menu-visible-changed": {},
33477    "onCut-start": {},
33478    "onCut-end": {},
33479    "onPaste-start": {},
33480    "onPaste-end": {},
33481    "onColumn-visible": {},
33482    "onColumn-pinned": {},
33483    "onColumn-resized": {},
33484    "onColumn-moved": {},
33485    "onColumn-value-changed": {},
33486    "onColumn-pivot-mode-changed": {},
33487    "onColumn-pivot-changed": {},
33488    "onColumn-group-opened": {},
33489    "onNew-columns-loaded": {},
33490    "onGrid-columns-changed": {},
33491    "onDisplayed-columns-changed": {},
33492    "onVirtual-columns-changed": {},
33493    "onColumn-everything-changed": {},
33494    "onColumn-header-mouse-over": {},
33495    "onColumn-header-mouse-leave": {},
33496    "onColumn-header-clicked": {},
33497    "onColumn-header-context-menu": {},
33498    "onComponent-state-changed": {},
33499    "onCell-value-changed": {},
33500    "onCell-edit-request": {},
33501    "onRow-value-changed": {},
33502    "onCell-editing-started": {},
33503    "onCell-editing-stopped": {},
33504    "onRow-editing-started": {},
33505    "onRow-editing-stopped": {},
33506    "onUndo-started": {},
33507    "onUndo-ended": {},
33508    "onRedo-started": {},
33509    "onRedo-ended": {},
33510    "onCell-selection-delete-start": {},
33511    "onCell-selection-delete-end": {},
33512    "onRange-delete-start": {},
33513    "onRange-delete-end": {},
33514    "onFill-start": {},
33515    "onFill-end": {},
33516    "onFilter-opened": {},
33517    "onFilter-changed": {},
33518    "onFilter-modified": {},
33519    "onAdvanced-filter-builder-visible-changed": {},
33520    "onChart-created": {},
33521    "onChart-range-selection-changed": {},
33522    "onChart-options-changed": {},
33523    "onChart-destroyed": {},
33524    "onCell-key-down": {},
33525    "onGrid-ready": {},
33526    "onGrid-pre-destroyed": {},
33527    "onFirst-data-rendered": {},
33528    "onGrid-size-changed": {},
33529    "onModel-updated": {},
33530    "onVirtual-row-removed": {},
33531    "onViewport-changed": {},
33532    "onBody-scroll": {},
33533    "onBody-scroll-end": {},
33534    "onDrag-started": {},
33535    "onDrag-stopped": {},
33536    "onDrag-cancelled": {},
33537    "onState-updated": {},
33538    "onPagination-changed": {},
33539    "onRow-drag-enter": {},
33540    "onRow-drag-move": {},
33541    "onRow-drag-leave": {},
33542    "onRow-drag-end": {},
33543    "onRow-drag-cancel": {},
33544    "onColumn-row-group-changed": {},
33545    "onRow-group-opened": {},
33546    "onExpand-or-collapse-all": {},
33547    "onPivot-max-columns-exceeded": {},
33548    "onPinned-row-data-changed": {},
33549    "onRow-data-updated": {},
33550    "onAsync-transactions-flushed": {},
33551    "onStore-refreshed": {},
33552    "onHeader-focused": {},
33553    "onCell-clicked": {},
33554    "onCell-double-clicked": {},
33555    "onCell-focused": {},
33556    "onCell-mouse-over": {},
33557    "onCell-mouse-out": {},
33558    "onCell-mouse-down": {},
33559    "onRow-clicked": {},
33560    "onRow-double-clicked": {},
33561    "onRow-selected": {},
33562    "onSelection-changed": {},
33563    "onCell-context-menu": {},
33564    "onRange-selection-changed": {},
33565    "onCell-selection-changed": {},
33566    "onTooltip-show": {},
33567    "onTooltip-hide": {},
33568    "onSort-changed": {}
33569  }, Fx()), {
33570    modelValue: {},
33571    modelModifiers: {}
33572  }),
33573  emits: /* @__PURE__ */ Cr(["update:modelValue"], ["update:modelValue"]),
33574  setup(e, { expose: t, emit: i }) {
33575    const s = e, o = $c("root"), n = j(void 0), r = j(!1), a = j(!1), l = j(!1), d = j({}), c = j(null), u = Kc(s);
33576    bn.filter((D) => D != "gridOptions").forEach((D) => {
33577      Ds(
33578        () => u[D],
33579        (R, E) => {
33580          P(D, R);
33581        },
33582        { deep: !0 }
33583      );
33584    });
33585    const h = /* @__PURE__ */ new Set(["rowDataUpdated", "cellValueChanged", "rowValueChanged"]), g = jc(e, "modelValue"), p = j(!1), f = i;
33586    Ds(
33587      g,
33588      (D, R) => {
33589        r.value && (p.value = !0, P("rowData", Yt(D), Yt(R)));
33590      },
33591      { deep: !0 }
33592    );
33593    const m = xx(() => {
33594      f("update:modelValue", Yt(S()));
33595    }, 20), C = (D) => {
33596      l.value && h.has(D) && m();
33597    }, w = () => g.value || s.rowData || s.gridOptions.rowData, S = () => {
33598      const D = [];
33599      return n?.value.forEachNode((R) => {
33600        D.push(R.data);
33601      }), D;
33602    }, v = (D) => (R) => {
33603      if (a.value)
33604        return;
33605      R === "gridReady" && (l.value = !0);
33606      const E = _i.has(R);
33607      E && !D || !E && D || h.has(R) && (p.value || C(R), p.value = !1);
33608    }, P = (D, R, E) => {
33609      if (r.value) {
33610        let k = R.value || R;
33611        D === "rowData" && k != null && (k = Yt(k)), d.value[D] = k, c.value == null && (c.value = window.setTimeout(() => {
33612          c.value = null, vg(d.value, n.value), d.value = {};
33613        }, 0));
33614      }
33615    }, T = () => Object.create(uo().provides);
33616    return yi(() => {
33617      ld.registerModules([Lc]);
33618      const D = new bx(uo(), T()), R = {
33619        globalListener: v(),
33620        globalSyncListener: v(!0),
33621        frameworkOverrides: new Rx(uo()),
33622        providedBeanInstances: {
33623          frameworkCompWrapper: D
33624        },
33625        modules: s.modules
33626      }, E = qc(
33627        Cg(Yt(s.gridOptions), s, [
33628          ...bn,
33629          ...dc.map((K) => zn(K))
33630        ])
33631      ), k = w();
33632      k !== void 0 && (E.rowData = Yt(k)), n.value = fb(o.value, E, R), r.value = !0;
33633    }), Dn(() => {
33634      var D;
33635      r.value && ((D = n?.value) == null || D.destroy(), a.value = !0);
33636    }), t({
33637      api: n
33638    }), (D, R) => (X(), $e("div", Ex, null, 512));
33639  }
33640});
33641ld.registerModules([vx]);
33642const Ax = oc.withPart($w).withParams({
33643  accentColor: "#1E90FA",
33644  backgroundColor: "#FFFFFF",
33645  borderColor: "#E0E0E0",
33646  borderRadius: "6px",
33647  browserColorScheme: "dark",
33648  cellHorizontalPadding: "24px",
33649  cellHorizontalPaddingScale: 1,
33650  checkboxBorderRadius: "3px",
33651  checkboxCheckedBackgroundColor: "#1E90FA",
33652  checkboxCheckedBorderColor: "#1E90FA",
33653  checkboxCheckedShapeColor: "#FFFFFF",
33654  chromeBackgroundColor: "#FFFFFF",
33655  columnBorder: !1,
33656  columnDropCellBackgroundColor: "#FFFFFF",
33657  focusShadow: "#1E90FA80 0px 0px 0px 0px",
33658  fontFamily: ["Mulish", "sans-serif"],
33659  fontSize: "14px",
33660  footerRowBorder: !0,
33661  foregroundColor: "#2D2E30",
33662  headerHeight: 38,
33663  headerBackgroundColor: "#F4F6F8",
33664  headerRowBorder: !1,
33665  headerFontSize: "14px",
33666  headerFontWeight: 700,
33667  headerTextColor: "#2D2E30",
33668  headerVerticalPaddingScale: 0.5,
33669  iconButtonHoverColor: "#EDEEEF",
33670  menuBackgroundColor: "#FFFFFF",
33671  menuBorder: !1,
33672  menuSeparatorColor: "#E0E0E0",
33673  menuTextColor: "#2D2E30",
33674  rowBorder: !0,
33675  rowHeight: "50px",
33676  rowHoverColor: "#F4F6F8",
33677  rowVerticalPaddingScale: 0.75,
33678  selectedRowBackgroundColor: "#E1EBFF",
33679  sideBarBackgroundColor: "#FFFFFF",
33680  sidePanelBorder: !1,
33681  spacing: "14px",
33682  tooltipBackgroundColor: "#2D2E30",
33683  tooltipTextColor: "#FFFFFF",
33684  wrapperBorder: !1,
33685  wrapperBorderRadius: "6px"
33686}), Tx = /* @__PURE__ */ Le({
33687  inheritAttrs: !1,
33688  __name: "ws-grid",
33689  props: {
33690    rowData: {},
33691    columnDefs: {},
33692    aid: {},
33693    customComponents: {},
33694    autoSizeStrategy: {},
33695    noRowsOverlayComponent: {},
33696    overlayNoRowsTemplate: {},
33697    loadingOverlayComponent: {},
33698    overlayLoadingTemplate: {},
33699    loading: { type: Boolean }
33700  },
33701  setup(e, { expose: t }) {
33702    const i = e, s = Ae(() => ({
33703      theme: Ax,
33704      columnDefs: i.columnDefs,
33705      tooltipShowDelay: 500,
33706      rowData: i.rowData,
33707      domLayout: "autoHeight",
33708      suppressCellFocus: !0,
33709      defaultColDef: { flex: 1, suppressMovable: !0, resizable: !1 },
33710      class: "ws-grid",
33711      aid: i.aid,
33712      loading: i.loading,
33713      loadingOverlayComponent: i.loadingOverlayComponent,
33714      overlayLoadingTemplate: i.overlayLoadingTemplate,
33715      autoSizeStrategy: i.autoSizeStrategy,
33716      noRowsOverlayComponent: i.noRowsOverlayComponent,
33717      overlayNoRowsTemplate: i.overlayNoRowsTemplate
33718    }));
33719    return t(i.customComponents), (o, n) => (X(), xe(O(Dx), Va(Wa(s.value)), null, 16));
33720  }
33721}), J = {
33722  accountUsersLink: "Users",
33723  addUser: "Add user",
33724  admin: "Admin",
33725  allOrganizations: "All organizations",
33726  cancel: "Cancel",
33727  confirm: "Confirm",
33728  delete: "Delete",
33729  deleteAdminError: "Failed to Deleted {{email}}",
33730  deleteAdminPromptHeader: "Delete User",
33731  deleteAdminPromptQuestion: "Are you sure you want to delete {{email}}?",
33732  deleteAdminSuccess: "Successfully Deleted {{email}}",
33733  designer: "Designer",
33734  domain_manager: "Organization manager",
33735  // the roles are loded from DB and it saved with "_" , please do not change!
33736  edit: "Edit",
33737  email: "Email",
33738  expired: "EXPIRED",
33739  gridDataError: "Failed to load data",
33740  header: "Welcome to account-settings",
33741  hr: "HR",
33742  inviteAdminError: "Failed to send the Invite",
33743  failedToVerifyEmail: "Failed to verify email. Please try again.",
33744  inviteAdminSuccess: "Invite was succesfully sent",
33745  it: "IT",
33746  marketer: "Marketer",
33747  name: "Name",
33748  ok: "ok",
33749  organization: "Organization",
33750  organizations: "Organizations",
33751  owner: "Owner",
33752  pageHeader: "Account users",
33753  pending: "PENDING",
33754  planAndBillingLink: "Plan & Billing",
33755  resend: "Resend",
33756  role: "Role",
33757  save: "Save",
33758  userProfileLink: "Profile",
33759  whatAreRoles: "Learn more about roles",
33760  researcher: "Researcher"
33761}, U = {
33762  admin: "Admin",
33763  adminFormAddHeader: "Add User",
33764  adminFormChangeOwnerPromptHeader: "Confirm ownership transfer",
33765  adminFormChangeOwnerPromptQuestion: "Are you sure you want to transfer the ownership of this account to {{name}}?",
33766  adminFormEditHeader: "Edit User",
33767  adminFormErrorEmail: "Please enter a valid email address.",
33768  adminFormErrorName: "Please enter a valid name.",
33769  adminFormErrorOrganization: "Please assign this user to an organization.",
33770  adminFormErrorRole: "Please select a role for this user.",
33771  adminFormFailSave: "Failed to save the user",
33772  adminFormInviteFail: "Failed to send invite",
33773  adminFormInviteSent: "Invite succesfully sent",
33774  adminFormSaved: "User succesfully saved",
33775  allOrganizations: "All organizations",
33776  cancel: "Cancel",
33777  confirm: "Confirm",
33778  designer: "Designer",
33779  domain_manager: "Organization manager",
33780  // the roles are loded from DB and it saved with "_" , please do not change!
33781  email: "Email",
33782  hr: "HR",
33783  it: "IT",
33784  marketer: "Marketer",
33785  name: "Name",
33786  organizations: "Organizations",
33787  owner: "Owner",
33788  role: "Role",
33789  save: "Save",
33790  upgrade: "Upgrade",
33791  researcher: "Researcher"
33792};
33793async function Mx(e) {
33794  const t = tu();
33795  return iu({
33796    context: e,
33797    data: {
33798      name: t.userName,
33799      email: t.userEmail,
33800      company: t.companyName,
33801      companySize: t.companySize,
33802      userCountry: t.userCountry,
33803      title: t.userTitle,
33804      userId: St.userId,
33805      accountId: St.accountId
33806    },
33807    analytics: { from: "platform" }
33808  });
33809}
33810const Oi = {
33811  scheduleADemo: "Schedule a demo",
33812  upgrade: "Upgrade",
33813  upgradeDialogHeader: "Upgrade plan",
33814  upgradeDialogTextInvite: "Upgrade your plan to add more users.",
33815  upgradeDialogTextEdit: "Upgrade your plan to assign a special role to a user"
33816}, Ix = { class: "upgrade-dialog" }, kx = /* @__PURE__ */ Le({
33817  __name: "upgrade-dialog",
33818  props: {
33819    dialog: {}
33820  },
33821  setup(e) {
33822    const i = e.dialog.input === "invite" ? Oi.upgradeDialogTextInvite : Oi.upgradeDialogTextEdit;
33823    async function s() {
33824      await Mx("account-settings-users");
33825    }
33826    function o() {
33827      try {
33828        r("team_upgrade_modal_user_clicked_upgrade");
33829      } catch (a) {
33830        console.error(a);
33831      }
33832      za({
33833        eventName: "navigated_to_pricing_page",
33834        metadata: { origin: "account_settings_upgrade_dialog" }
33835      }), n(`${Ua}`);
33836    }
33837    function n(a) {
33838      $a(a, { reload: !0 });
33839    }
33840    function r(a) {
33841      _a({
33842        eventName: a,
33843        eventMetadata: {
33844          attributes: {
33845            page: "account-settings/users"
33846          }
33847        }
33848      });
33849    }
33850    return yi(() => {
33851      try {
33852        r("team_upgrade_modal_show");
33853      } catch (a) {
33854        console.error(a);
33855      }
33856    }), (a, l) => (X(), $e("div", Ix, [
33857      oe(O(Oa), null, {
33858        default: ne(() => [
33859          je(le(O(i)), 1)
33860        ]),
33861        _: 1
33862      }),
33863      oe(O(Ga), null, {
33864        default: ne(() => [
33865          oe(O(vt), {
33866            label: O(Oi).scheduleADemo,
33867            variant: "outlined",
33868            aid: "ACCOUNT_SETTINGS_UPGRADE_DIALOG_DEMO",
33869            onClick: s
33870          }, null, 8, ["label"]),
33871          oe(O(vt), {
33872            label: O(Oi).upgrade,
33873            aid: "ACCOUNT_SETTINGS_UPGRADE_DIALOG_UPGRADE",
33874            onClick: o
33875          }, null, 8, ["label"])
33876        ]),
33877        _: 1
33878      })
33879    ]));
33880  }
33881}), Lx = /* @__PURE__ */ Bt(kx, [["__scopeId", "data-v-c00397bc"]]);
33882function Ox(e) {
33883  Ha({
33884    aid: "ACCOUNT_SETTINGS_UPGRADE_DIALOG",
33885    headerText: Oi.upgradeDialogHeader,
33886    component: Lx,
33887    showTopSeparator: !1,
33888    input: e
33889  });
33890}
33891const Ys = En({
33892  roles: [],
33893  organizations: []
33894}), Gx = async () => {
33895  const { userId: e, accountId: t } = St;
33896  De.userId = e, De.accountId = t;
33897}, De = En({
33898  userId: "",
33899  accountId: "",
33900  userEmail: void 0,
33901  trustPolicyLevel: "1",
33902  accountOwnerId: void 0,
33903  companyName: void 0,
33904  plans: []
33905}), Hx = /^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/, Bx = {
33906  for: "admin_name",
33907  class: "text-sm mb-1.5 inline-block font-semibold"
33908}, Nx = {
33909  for: "admin_email",
33910  class: "text-sm mb-1.5 inline-block font-semibold"
33911}, Vx = { class: "admin-form__selects" }, Wx = { class: "text-sm mb-1.5 inline-block" }, zx = ["onClick"], _x = {
33912  key: 1,
33913  class: "flex justify-between"
33914}, Ux = { key: 0 }, $x = { class: "flex justify-between" }, Kx = { class: "text-sm mb-1.5 inline-block" }, jx = { class: "flex flex-center gap-2 mb-1.5" }, qx = { class: "text-sm" }, Yx = /* @__PURE__ */ Le({
33915  __name: "admin-form",
33916  props: {
33917    dialog: {}
33918  },
33919  setup(e) {
33920    const t = {
33921      name: U.adminFormErrorName,
33922      email: U.adminFormErrorEmail,
33923      role: U.adminFormErrorRole,
33924      organization: U.adminFormErrorOrganization
33925    }, i = {
33926      id: "all",
33927      domain: "all",
33928      displayName: U.allOrganizations
33929    }, s = !St.isEntitledTo(
33930      "roles-and-permissions.advanced"
33931    ), o = St.isEntitledTo(An.surveysManage) ? [] : ["researcher"], n = JSON.parse(
33932      JSON.stringify(Ys.organizations)
33933    ), r = Ys.roles.filter(
33934      (R) => R !== "owner" && !o.includes(R)
33935    ), a = j(void 0), l = j(void 0), d = j(!1), c = j(!1), u = j(e.dialog.input), h = j(u.value.permissions?.[0]?.role ?? ""), g = j([]), p = De.accountOwnerId === De.userId && u.value.id;
33936    u.value.permissions?.[0]?.id === "all" ? (d.value = !0, g.value = [i]) : g.value = n.filter(
33937      (R) => u.value.permissions?.some((E) => E.id === R.id)
33938    );
33939    function f() {
33940      l.value = void 0, a.value = void 0;
33941      let R = !0;
33942      return h.value || (l.value = t.role, R = !1), g.value.length || (a.value = t.organization, R = !1), R;
33943    }
33944    async function m() {
33945      if (!f()) return;
33946      c.value = !0;
33947      let R = !0;
33948      if (u.value.id) {
33949        if (h.value === "owner") {
33950          if (await xn({
33951            aid: "CHANGE_OWNER_CONFIRM",
33952            header: U.adminFormChangeOwnerPromptHeader,
33953            question: U.adminFormChangeOwnerPromptQuestion.replace(
33954              "{{name}}",
33955              u.value.name ?? ""
33956            ),
33957            primaryButtonText: U.confirm,
33958            secondaryButtonText: U.cancel,
33959            persistent: !0
33960          }) === Pn.Secondary) {
33961            c.value = !1;
33962            return;
33963          }
33964          u.value.isAccountOwner = !0;
33965        }
33966        R = await C();
33967      } else
33968        R = await w();
33969      c.value = !1, R && v(u.value);
33970    }
33971    async function C() {
33972      g.value.find((R) => R.id === "all") ? u.value.permissions = [
33973        {
33974          id: "all",
33975          name: U.allOrganizations,
33976          role: h.value === "owner" ? "admin" : h.value,
33977          domain: "all"
33978        }
33979      ] : u.value.permissions = g.value.map((R) => ({
33980        id: R.id,
33981        name: R.displayName,
33982        domain: R.domain,
33983        role: h.value
33984      }), []);
33985      try {
33986        return await Ge.updateUser({
33987          ...u.value
33988        }), u.value.isAccountOwner && (De.accountOwnerId = u.value.id), Ct({
33989          aid: "ACCOUNT_SETTINGS_UPDATE_TOAST",
33990          message: U.adminFormSaved
33991        }), !0;
33992      } catch {
33993        return Ct({
33994          aid: "ACCOUNT_SETTINGS_UPDATE_TOAST",
33995          status: ti.Error,
33996          message: U.adminFormFailSave
33997        }), !1;
33998      }
33999    }
34000    async function w() {
34001      const R = {
34002        inviteeName: u.value.name,
34003        inviteeEmail: u.value.email,
34004        roles: []
34005      };
34006      g.value.find((E) => E.id === "all") ? R.roles?.push({ role: h.value, domain: "all" }) : g.value.forEach((E) => {
34007        R.roles?.push({
34008          role: h.value,
34009          domain: E.id
34010        });
34011      });
34012      try {
34013        return await Ge.invite(R), Ct({
34014          aid: "ACCOUNT_SETTINGS_INVITE_TOAST",
34015          message: U.adminFormInviteSent
34016        }), !0;
34017      } catch {
34018        return Ct({
34019          aid: "ACCOUNT_SETTINGS_INVITE_TOAST",
34020          status: ti.Error,
34021          message: U.adminFormInviteFail
34022        }), !1;
34023      }
34024    }
34025    function S(R) {
34026      return u.value.isAccountOwner ? U.owner : U[R];
34027    }
34028    function v(R = void 0) {
34029      e.dialog.close(R);
34030    }
34031    function P(R) {
34032      l.value = void 0, /^(owner)$|^(admin)$/.test(R) && (g.value = [i], d.value = !0);
34033    }
34034    function T(R) {
34035      a.value = void 0, g.value = R ? [i] : n.length === 1 ? (
34036        // if there is only one organization, select it by default
34037        [n[0]]
34038      ) : [];
34039    }
34040    function D(R) {
34041      R.stopPropagation(), Ox("edit"), v();
34042    }
34043    return (R, E) => (X(), xe(O(Gc), { onSubmit: m }, {
34044      default: ne(() => [
34045        oe(O(Oa), { class: "admin-form" }, {
34046          default: ne(() => [
34047            pe("label", Bx, le(O(U).name), 1),
34048            oe(O(fr), {
34049              id: "admin_name",
34050              modelValue: u.value.name,
34051              "onUpdate:modelValue": E[0] || (E[0] = (k) => u.value.name = k),
34052              placeholder: O(U).name,
34053              rules: [(k) => k ? !0 : t.name],
34054              aid: "ADMIN_FORM_NAME"
34055            }, null, 8, ["modelValue", "placeholder", "rules"]),
34056            pe("label", Nx, le(O(U).email), 1),
34057            oe(O(fr), {
34058              id: "admin_email",
34059              modelValue: u.value.email,
34060              "onUpdate:modelValue": E[1] || (E[1] = (k) => u.value.email = k),
34061              placeholder: O(U).email,
34062              aid: "ADMIN_FORM_EMAIL",
34063              rules: [
34064                (k) => O(Hx).test(k) ? !0 : t.email
34065              ]
34066            }, null, 8, ["modelValue", "placeholder", "rules"]),
34067            pe("div", Vx, [
34068              pe("div", null, [
34069                pe("label", Wx, [
34070                  je(le(O(U).role) + " ", 1),
34071                  oe(O(vt), {
34072                    aid: "ROLE_INFO",
34073                    variant: "text",
34074                    target: "_blank",
34075                    href: "https://support.wisestamp.com/hc/en-us/articles/12142434846237-Roles-and-Permissions"
34076                  }, {
34077                    default: ne(() => [...E[7] || (E[7] = [
34078                      pe("span", { class: "fa-circle-info fa-regular text-gray-400" }, null, -1)
34079                    ])]),
34080                    _: 1
34081                  })
34082                ]),
34083                oe(O(mr), {
34084                  modelValue: h.value,
34085                  "onUpdate:modelValue": [
34086                    E[2] || (E[2] = (k) => h.value = k),
34087                    P
34088                  ],
34089                  aid: "ADMIN_FORM_ROLE",
34090                  error: l.value,
34091                  disabled: u.value.isAccountOwner,
34092                  "option-label": S,
34093                  "option-key": (k) => k
34094                }, {
34095                  default: ne(() => [
34096                    O(p) ? (X(), xe(O(ao), {
34097                      key: "admin",
34098                      value: "owner",
34099                      class: "cursor-pointer"
34100                    }, {
34101                      default: ne(() => [
34102                        je(le(O(U).owner), 1)
34103                      ]),
34104                      _: 1
34105                    })) : it("", !0),
34106                    (X(!0), $e(wr, null, Sr(O(r), (k) => (X(), xe(O(ao), {
34107                      key: k,
34108                      value: k,
34109                      disabled: s && !["admin", "owner"].includes(k)
34110                    }, {
34111                      default: ne(() => [
34112                        s ? (X(), $e("div", {
34113                          key: 0,
34114                          class: "flex justify-between cursor-pointer",
34115                          onClick: (K) => ["admin", "owner"].includes(k) ? () => {
34116                          } : D(K)
34117                        }, [
34118                          je(le(O(U)[k]) + " ", 1),
34119                          k !== "admin" ? (X(), xe(O(Ba), {
34120                            key: 0,
34121                            aid: "_",
34122                            label: O(U).upgrade,
34123                            size: "sm",
34124                            icon: "fa-regular fa-circle-arrow-up"
34125                          }, null, 8, ["label"])) : it("", !0)
34126                        ], 8, zx)) : (X(), $e("div", _x, le(O(U)[k]), 1))
34127                      ]),
34128                      _: 2
34129                    }, 1032, ["value", "disabled"]))), 128))
34130                  ]),
34131                  _: 1
34132                }, 8, ["modelValue", "error", "disabled", "option-key"])
34133              ]),
34134              !u.value.isAccountOwner && !/^(owner)$|^(admin)$/.test(h.value) ? (X(), $e("div", Ux, [
34135                pe("div", $x, [
34136                  pe("label", Kx, le(O(U).organizations), 1),
34137                  pe("div", jx, [
34138                    pe("label", qx, le(i.displayName), 1),
34139                    oe(O(Hc), {
34140                      modelValue: d.value,
34141                      "onUpdate:modelValue": [
34142                        E[3] || (E[3] = (k) => d.value = k),
34143                        T
34144                      ],
34145                      aid: "ADMIN_FORM_ORGANIZATIONS_ALL"
34146                    }, null, 8, ["modelValue"])
34147                  ])
34148                ]),
34149                oe(O(mr), {
34150                  modelValue: g.value,
34151                  "onUpdate:modelValue": [
34152                    E[4] || (E[4] = (k) => g.value = k),
34153                    E[5] || (E[5] = (k) => a.value = void 0)
34154                  ],
34155                  aid: "ADMIN_FORM_ORGANIZATIONS",
34156                  multiple: "",
34157                  checkboxes: "",
34158                  chips: "",
34159                  error: a.value,
34160                  disabled: d.value || O(n).length === 1,
34161                  "option-label": (k) => k.displayName ?? k.domain,
34162                  "option-key": (k) => k.id
34163                }, {
34164                  default: ne(() => [
34165                    (X(!0), $e(wr, null, Sr(O(n), (k) => (X(), xe(O(ao), {
34166                      key: k.id,
34167                      value: k
34168                    }, {
34169                      default: ne(() => [
34170                        je(le(k.displayName), 1)
34171                      ]),
34172                      _: 2
34173                    }, 1032, ["value"]))), 128))
34174                  ]),
34175                  _: 1
34176                }, 8, ["modelValue", "error", "disabled", "option-label", "option-key"])
34177              ])) : it("", !0)
34178            ])
34179          ]),
34180          _: 1
34181        }),
34182        oe(O(Ga), null, {
34183          default: ne(() => [
34184            oe(O(vt), {
34185              label: O(U).cancel,
34186              aid: "ADMIN_FORM_CLOSE",
34187              variant: "outlined",
34188              color: "gray-500",
34189              disabled: c.value,
34190              onClick: E[6] || (E[6] = (k) => v())
34191            }, null, 8, ["label", "disabled"]),
34192            oe(O(vt), {
34193              label: O(U).save,
34194              aid: "ADMIN_FORM_SAVE",
34195              type: "submit",
34196              loading: c.value,
34197              disabled: c.value
34198            }, null, 8, ["label", "loading", "disabled"])
34199          ]),
34200          _: 1
34201        })
34202      ]),
34203      _: 1
34204    }));
34205  }
34206}), Qx = /* @__PURE__ */ Bt(Yx, [["__scopeId", "data-v-aedb9a05"]]), Zx = {
34207  id: "",
34208  email: "",
34209  name: "",
34210  permissions: [
34211    {
34212      id: "all",
34213      name: U.allOrganizations,
34214      role: "admin",
34215      domain: "all"
34216    }
34217  ]
34218};
34219async function Oc(e) {
34220  return await Ha({
34221    aid: "ACCOUNT_SETTINGS_ADMIN_FORM",
34222    headerText: e?.id ? U.adminFormEditHeader : U.adminFormAddHeader,
34223    component: Qx,
34224    input: { ...Zx, ...e }
34225  });
34226}
34227const Xx = /* @__PURE__ */ Le({
34228  __name: "row-actions",
34229  props: {
34230    params: {}
34231  },
34232  setup(e) {
34233    const t = e, { api: i, node: s } = t.params, o = j(t.params.admin), n = t.params.currentUserIsOwner;
34234    async function r() {
34235      if (o.value.isAccountOwner) {
34236        console.error("Can't delete account owner");
34237        return;
34238      }
34239      if (await xn({
34240        aid: "DELETE_USER_CONFIRM",
34241        header: J.deleteAdminPromptHeader,
34242        question: J.deleteAdminPromptQuestion.replace(
34243          "{{email}}",
34244          o.value.email ?? ""
34245        ),
34246        primaryButtonText: J.delete,
34247        primaryButtonColor: "danger",
34248        secondaryButtonText: J.cancel
34249      }) === Pn.Primary) {
34250        let h = !0;
34251        if (o.value.id)
34252          try {
34253            await Ge.deleteUser({
34254              userId: o.value.id
34255            });
34256          } catch {
34257            h = !1;
34258          }
34259        else
34260          try {
34261            await Ge.revoke({
34262              inviteeEmail: o.value.email
34263            });
34264          } catch {
34265            h = !1;
34266          }
34267        const g = h ? ti.Completed : ti.Error;
34268        Ct({
34269          aid: "ACCOUNT_SETTINGS_DELETE_ADMIN_TOAST",
34270          status: g,
34271          message: J[h ? "deleteAdminSuccess" : "deleteAdminError"].replace(
34272            "{{email}}",
34273            o.value.email ?? ""
34274          )
34275        }), h && i.applyTransaction({ remove: [s.data] });
34276      }
34277    }
34278    async function a() {
34279      const u = await Oc(o.value) || {};
34280      o.value = Object.assign(o.value, u), c();
34281    }
34282    function l() {
34283      return o.value.permissions?.find((u) => u.id === "all") ? [
34284        {
34285          role: o.value.permissions?.[0]?.role,
34286          domain: "all"
34287        }
34288      ] : o.value.permissions?.map((u) => ({
34289        role: u.role,
34290        domain: u.id
34291      }));
34292    }
34293    async function d() {
34294      const u = {
34295        inviteeName: o.value.name,
34296        inviteeEmail: o.value.email,
34297        roles: l()
34298      };
34299      try {
34300        const { expiration: h } = await Ge.invite(u);
34301        o.value.expiration = h, c(), Ct({
34302          aid: "ACCOUNT_SETTINGS_REINVITE_TOAST",
34303          message: J.inviteAdminSuccess
34304        });
34305      } catch (h) {
34306        Ct({
34307          aid: "ACCOUNT_SETTINGS_REINVITE_TOAST",
34308          status: ti.Error,
34309          message: J.inviteAdminError
34310        }), console.error("Resend invite failed", h);
34311      }
34312    }
34313    function c() {
34314      const u = {
34315        name: o.value.name,
34316        email: o.value.email,
34317        role: o.value.isAccountOwner ? "Owner" : o.value.permissions?.[0].role,
34318        organization: (() => {
34319          const h = o.value.permissions?.map((g) => g.name) || [];
34320          return h.length > 1 ? `${h[0]} + ${h.length - 1}` : h;
34321        })().toString()
34322      };
34323      s.setData({ ...s.data, ...u }), i.refreshCells({ rowNodes: [s], force: !0 });
34324    }
34325    return yi(async () => {
34326      await Ge.init(Tn());
34327    }), (u, h) => O(n) || !o.value.isAccountOwner ? (X(), xe(O(Bc), {
34328      key: 0,
34329      variant: "text",
34330      color: "gray-400",
34331      aid: "ACCOUNT_USER_MENU_BUTTON"
34332    }, {
34333      default: ne(() => [
34334        h[0] || (h[0] = pe("span", { class: "fa-solid fa-ellipsis" }, null, -1)),
34335        oe(O(Nc), { aid: "ACCOUNT_USER_MENU" }, {
34336          default: ne(() => [
34337            o.value.id ? (X(), xe(O(lo), {
34338              key: 0,
34339              aid: "ACCOUNT_USER_MENU_EDIT",
34340              icon: "fa-light fa-pen",
34341              onClick: a
34342            }, {
34343              default: ne(() => [
34344                je(le(O(J).edit), 1)
34345              ]),
34346              _: 1
34347            })) : it("", !0),
34348            o.value.isAccountOwner ? it("", !0) : (X(), xe(O(lo), {
34349              key: 1,
34350              aid: "ACCOUNT_USER_MENU_DELETE",
34351              icon: "fa-light fa-trash-can",
34352              onClick: r
34353            }, {
34354              default: ne(() => [
34355                je(le(O(J).delete), 1)
34356              ]),
34357              _: 1
34358            })),
34359            o.value.id ? it("", !0) : (X(), xe(O(lo), {
34360              key: 2,
34361              aid: "ACCOUNT_USER_MENU_RESEND",
34362              icon: "fa-light fa-paper-plane",
34363              onClick: d
34364            }, {
34365              default: ne(() => [
34366                je(le(O(J).resend), 1)
34367              ]),
34368              _: 1
34369            }))
34370          ]),
34371          _: 1
34372        })
34373      ]),
34374      _: 1
34375    })) : it("", !0);
34376  }
34377}), Jx = { class: "name-cell-renderer" }, eP = { aid: "ACCOUNT_SETTINGS_GRID_NAME" }, tP = /* @__PURE__ */ Le({
34378  __name: "name-cell-renderer",
34379  props: {
34380    params: {}
34381  },
34382  setup(e) {
34383    const t = e, i = j(t.params?.data), s = j(t.params?.expiration), o = j(void 0), n = j(!1);
34384    function r() {
34385      s.value && (n.value = s.value < (/* @__PURE__ */ new Date()).getTime(), o.value = n.value ? J.expired : J.pending);
34386    }
34387    return yi(() => {
34388      r();
34389    }), (a, l) => (X(), $e("div", Jx, [
34390      pe("span", eP, le(i.value.name), 1),
34391      o.value ? (X(), xe(O(Ba), {
34392        key: 0,
34393        aid: "ACCOUNT_SETTINGS_GRID_EXPIRATION_BADGE",
34394        label: o.value,
34395        size: "sm",
34396        color: n.value ? "gray" : "primary"
34397      }, null, 8, ["label", "color"])) : it("", !0)
34398    ]));
34399  }
34400}), iP = /* @__PURE__ */ Bt(tP, [["__scopeId", "data-v-931b397c"]]), ys = {
34401  addMoreSeatsTitle: "Add more users seats to invite additional users",
34402  addMoreSeatsDescription: "To invite an additional user you need to upgrade your plan.",
34403  addSeats: "Add users seats",
34404  cancel: "Cancel"
34405};
34406async function sP() {
34407  await xn({
34408    aid: "ADD_SEATS_PROMPT",
34409    header: ys.addMoreSeatsTitle,
34410    question: ys.addMoreSeatsDescription,
34411    width: "460px",
34412    separators: "bottom",
34413    primaryButtonText: ys.addSeats,
34414    secondaryButtonText: ys.cancel
34415  }) === Pn.Primary && (za({
34416    eventName: "navigated_to_pricing_page",
34417    metadata: { origin: "add_seats_prompt" }
34418  }), $a(Ua));
34419}
34420const oP = { class: "account-users" }, nP = { class: "account-users__header" }, rP = { class: "text-2xl font-bold" }, aP = { class: "account-users__header__actions" }, lP = "seat_user", dP = /* @__PURE__ */ Le({
34421  __name: "account-users",
34422  setup(e) {
34423    const t = lh(), i = j(!1), s = j(!1), o = j([]), n = j([]), r = j([]), a = j(!1), l = j([
34424      {
34425        field: "name",
34426        cellRenderer: "NameCellRenderer",
34427        // eslint-disable-next-line @typescript-eslint/no-explicit-any
34428        cellRendererParams: (v) => ({
34429          expiration: o.value?.find(
34430            (P) => P.email === v?.data?.email
34431          )?.expiration
34432        })
34433      },
34434      { field: "email" },
34435      {
34436        field: "role",
34437        // eslint-disable-next-line @typescript-eslint/no-explicit-any
34438        cellRenderer: (v) => {
34439          const P = o.value?.find((T) => T.email === v?.data?.email) ?? {};
34440          return u(P);
34441        }
34442      },
34443      {
34444        field: "organization",
34445        // eslint-disable-next-line @typescript-eslint/no-explicit-any
34446        tooltipValueGetter: (v) => {
34447          c(v?.data?.email);
34448        },
34449        // eslint-disable-next-line @typescript-eslint/no-explicit-any
34450        cellRenderer: (v) => {
34451          const P = o.value?.find((T) => T.email === v?.data?.email) ?? {};
34452          return h(P) ?? [];
34453        }
34454      },
34455      {
34456        field: "actions",
34457        headerName: "",
34458        cellRenderer: "RowActions",
34459        // eslint-disable-next-line @typescript-eslint/no-explicit-any
34460        cellRendererParams: (v) => ({
34461          currentUserIsOwner: (De.accountOwnerId || "") == De.userId,
34462          admin: o.value?.find((P) => P.email === v?.data?.email)
34463        }),
34464        maxWidth: 80,
34465        minWidth: 80
34466      }
34467    ]);
34468    function d() {
34469      return o.value?.map((v) => ({
34470        name: v.name,
34471        email: v.email,
34472        /*
34473          role and organization texts is rendered by a cellRenderer function (columnDefs),
34474          those values are fallback values just in case.
34475        */
34476        role: v.permissions?.[0]?.role,
34477        organization: h(v)
34478      })) || [];
34479    }
34480    function c(v) {
34481      const P = o.value?.find((T) => T.email === v)?.permissions?.map((T) => T.name) || [];
34482      return P.length > 1 ? P.toString().replaceAll(",", ", ") : null;
34483    }
34484    function u(v) {
34485      return v.isAccountOwner ? J.owner : J[v.permissions?.[0]?.role] ?? v.permissions?.[0]?.role;
34486    }
34487    function h(v) {
34488      const P = v.permissions?.map((T) => T.name) || [];
34489      return P.length > 1 ? `${P[0]} + ${P.length - 1}` : P && P[0] === "allOrganizations" ? J.allOrganizations : P.toString();
34490    }
34491    const g = Ae(() => ({
34492      aid: "ACCOUNT_SETTINGS_USERS_GRID",
34493      rowData: n.value,
34494      columnDefs: l.value,
34495      loading: i.value,
34496      // there should be always at least one user (owner), empty is always due to an error
34497      overlayNoRowsTemplate: J.gridDataError,
34498      customComponents: {
34499        RowActions: Xx,
34500        NameCellRenderer: iP
34501      }
34502    }));
34503    async function p(v = "", P = "") {
34504      if (a.value)
34505        return;
34506      const T = r.value.find(
34507        (R) => R.itemType === lP
34508      );
34509      if (T && T.totalQuantity !== void 0) {
34510        const R = (o.value || []).length, E = T.totalQuantity;
34511        if (R >= E) {
34512          await sP();
34513          return;
34514        }
34515      }
34516      if (parseInt(De.trustPolicyLevel || "0") < 2) {
34517        a.value = !0;
34518        const R = await St.verifyEmail();
34519        if (a.value = !1, !R) {
34520          Ct({
34521            aid: "EMAIL_VERIFICATION_FAILED",
34522            message: J.failedToVerifyEmail,
34523            status: ti.Error
34524          });
34525          return;
34526        }
34527      }
34528      await Oc({ name: P, email: v }) && S();
34529    }
34530    async function f() {
34531      const { admins: v } = await Ge.getUsers({});
34532      o.value = v, n.value = d();
34533    }
34534    async function m() {
34535      const { limits: v } = await jr.getAccountLimits({});
34536      r.value = v || [];
34537    }
34538    async function C() {
34539      const { roles: v } = await Ge.getRoles({});
34540      Ys.roles = v ?? [];
34541    }
34542    async function w() {
34543      const { organizations: v } = await Ge.getOrganizations(
34544        {}
34545      );
34546      Ys.organizations = v ?? [];
34547    }
34548    async function S() {
34549      i.value = !0;
34550      try {
34551        await Promise.all([
34552          C(),
34553          w(),
34554          m()
34555        ]), await f(), s.value = !0;
34556      } catch (v) {
34557        console.error("Failed to load data", v);
34558      }
34559      i.value = !1;
34560    }
34561    return Ds(
34562      () => De.accountOwnerId,
34563      (v) => {
34564        v !== De.userId && f();
34565      }
34566    ), yi(async () => {
34567      await jr.init(Tn()), await S(), _a({
34568        eventName: "account_users_page_view",
34569        eventMetadata: {
34570          attributes: {
34571            plan: De.plans?.join(", ") || "",
34572            total_users: o.value?.length?.toString() || "0"
34573          }
34574        }
34575      }), t.query.email && t.query.name && await p(
34576        t.query.email,
34577        t.query.name
34578      );
34579    }), (v, P) => (X(), $e("div", oP, [
34580      pe("div", nP, [
34581        pe("h1", rP, le(O(J).pageHeader), 1),
34582        pe("div", aP, [
34583          oe(O(vt), {
34584            aid: "WHAT_ARE_RULES_BUTTON",
34585            variant: "text",
34586            href: "https://support.wisestamp.com/hc/en-us/articles/30102302201245-Roles-and-Permissions",
34587            target: "_blank",
34588            size: "sm",
34589            icon: "fa-light fa-arrow-up-right-from-square",
34590            "icon-end": ""
34591          }, {
34592            default: ne(() => [
34593              je(le(O(J).whatAreRoles), 1)
34594            ]),
34595            _: 1
34596          }),
34597          oe(O(vt), {
34598            size: "sm",
34599            aid: "ADD_USER_BUTTON",
34600            disabled: i.value || !s.value,
34601            onClick: P[0] || (P[0] = (T) => p())
34602          }, {
34603            default: ne(() => [
34604              je(le(O(J).addUser), 1)
34605            ]),
34606            _: 1
34607          }, 8, ["disabled"])
34608        ])
34609      ]),
34610      oe(Tx, Va(Wa(g.value)), null, 16)
34611    ]));
34612  }
34613}), cP = /* @__PURE__ */ Bt(dP, [["__scopeId", "data-v-53ca24c0"]]), uP = {};
34614function hP(e, t) {
34615  return "plan and billing";
34616}
34617const gP = /* @__PURE__ */ Bt(uP, [["render", hP]]), ro = [];
34618ro.push({
34619  name: "account-settings-users",
34620  path: "users",
34621  component: cP
34622});
34623St.isEntitledTo(An.accountUsers) && ro.push({
34624  name: "account-settings-user-profile",
34625  path: "user-profile",
34626  component: uh
34627});
34628ro.push({
34629  name: "account-settings-plan-and-billing",
34630  path: "plan-and-billing",
34631  component: gP
34632});
34633const pP = [
34634  {
34635    name: "account-settings",
34636    path: "/v1/account-settings",
34637    redirect: { name: "account-settings-users" },
34638    children: ro
34639  }
34640], fP = rh({
34641  history: Gu(""),
34642  routes: pP
34643}), mP = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%3e%3cg%20clip-path='url(%23clip0_5263_2662)'%3e%3cpath%20d='M10%204C10%203.60603%209.9224%203.21593%209.77164%202.85195C9.62087%202.48797%209.3999%202.15726%209.12132%201.87868C8.84274%201.6001%208.51203%201.37913%208.14805%201.22836C7.78407%201.0776%207.39397%201%207%201C6.60603%201%206.21593%201.0776%205.85195%201.22836C5.48797%201.37913%205.15726%201.6001%204.87868%201.87868C4.6001%202.15726%204.37913%202.48797%204.22836%202.85195C4.0776%203.21593%204%203.60603%204%204C4%204.39397%204.0776%204.78407%204.22836%205.14805C4.37913%205.51203%204.6001%205.84274%204.87868%206.12132C5.15726%206.3999%205.48797%206.62087%205.85195%206.77164C6.21593%206.9224%206.60603%207%207%207C7.39397%207%207.78407%206.9224%208.14805%206.77164C8.51203%206.62087%208.84274%206.3999%209.12132%206.12132C9.3999%205.84274%209.62087%205.51203%209.77164%205.14805C9.9224%204.78407%2010%204.39397%2010%204ZM3%204C3%202.93913%203.42143%201.92172%204.17157%201.17157C4.92172%200.421427%205.93913%200%207%200C8.06087%200%209.07828%200.421427%209.82843%201.17157C10.5786%201.92172%2011%202.93913%2011%204C11%205.06087%2010.5786%206.07828%209.82843%206.82843C9.07828%207.57857%208.06087%208%207%208C5.93913%208%204.92172%207.57857%204.17157%206.82843C3.42143%206.07828%203%205.06087%203%204ZM1%2015H13C12.9625%2012.5094%2010.9313%2010.5%208.42813%2010.5H5.57188C3.07188%2010.5%201.04062%2012.5094%201%2015ZM0%2015.0719C0%2011.9937%202.49375%209.5%205.57188%209.5H8.42813C11.5063%209.5%2014%2011.9937%2014%2015.0719C14%2015.5844%2013.5844%2016%2013.0719%2016H0.928125C0.415625%2016%200%2015.5844%200%2015.0719Z'%20fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5263_2662'%3e%3crect%20width='14'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", CP = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='16'%20viewBox='0%200%2020%2016'%20fill='none'%3e%3cg%20clip-path='url(%23clip0_5263_2666)'%3e%3cpath%20d='M7%206.5C7.66304%206.5%208.29893%206.23661%208.76777%205.76777C9.23661%205.29893%209.5%204.66304%209.5%204C9.5%203.33696%209.23661%202.70107%208.76777%202.23223C8.29893%201.76339%207.66304%201.5%207%201.5C6.33696%201.5%205.70107%201.76339%205.23223%202.23223C4.76339%202.70107%204.5%203.33696%204.5%204C4.5%204.66304%204.76339%205.29893%205.23223%205.76777C5.70107%206.23661%206.33696%206.5%207%206.5ZM7%200C8.06087%200%209.07828%200.421427%209.82843%201.17157C10.5786%201.92172%2011%202.93913%2011%204C11%205.06087%2010.5786%206.07828%209.82843%206.82843C9.07828%207.57857%208.06087%208%207%208C5.93913%208%204.92172%207.57857%204.17157%206.82843C3.42143%206.07828%203%205.06087%203%204C3%202.93913%203.42143%201.92172%204.17157%201.17157C4.92172%200.421427%205.93913%200%207%200ZM1.54062%2014.5H11.7094C12.1219%2015.0375%2012.625%2015.5437%2013.2375%2015.9844C13.1844%2015.9937%2013.1281%2016%2013.0719%2016H0.928125C0.415625%2016%200%2015.5844%200%2015.0719C0%2011.9937%202.49375%209.5%205.57188%209.5H7H8.42813C8.97813%209.5%209.50937%209.58125%2010.0125%209.72812C10.0406%2010.2469%2010.1188%2010.8313%2010.2719%2011.4406C9.71875%2011.1594%209.09063%2011%208.42813%2011H5.57188C3.51875%2011%201.81875%2012.5219%201.54062%2014.5ZM15.2219%207.05312C15.4%206.98125%2015.6%206.98125%2015.7781%207.05312L19.5281%208.55313C19.8125%208.66875%2020%208.94375%2020%209.25C20%2011.2281%2019.1906%2014.525%2015.7875%2015.9438C15.6031%2016.0219%2015.3938%2016.0219%2015.2094%2015.9438C11.8094%2014.525%2011%2011.2281%2011%209.25C11%208.94375%2011.1875%208.66875%2011.4719%208.55313L15.2219%207.05312ZM18.4813%209.75L15.5%208.55625V14.425C17.6313%2013.3938%2018.3594%2011.3313%2018.4813%209.74687V9.75Z'%20fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5263_2666'%3e%3crect%20width='20'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", vP = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='16'%20viewBox='0%200%2018%2016'%20fill='none'%3e%3cpath%20d='M2%202C1.44687%202%201%202.44687%201%203V4H17V3C17%202.44687%2016.5531%202%2016%202H2ZM1%205V7H17V5H1ZM1%208V13C1%2013.5531%201.44687%2014%202%2014H16C16.5531%2014%2017%2013.5531%2017%2013V8H1ZM0%203C0%201.89688%200.896875%201%202%201H16C17.1031%201%2018%201.89688%2018%203V13C18%2014.1031%2017.1031%2015%2016%2015H2C0.896875%2015%200%2014.1031%200%2013V3ZM3%2011.5C3%2011.225%203.225%2011%203.5%2011H5.5C5.775%2011%206%2011.225%206%2011.5C6%2011.775%205.775%2012%205.5%2012H3.5C3.225%2012%203%2011.775%203%2011.5ZM7%2011.5C7%2011.225%207.225%2011%207.5%2011H11.5C11.775%2011%2012%2011.225%2012%2011.5C12%2011.775%2011.775%2012%2011.5%2012H7.5C7.225%2012%207%2011.775%207%2011.5Z'%20fill='black'/%3e%3c/svg%3e";
34644function wP() {
34645  let e;
34646  const t = [];
34647  eu(() => {
34648    e = ho.value, ho.value = ou.Hidden;
34649    function i(s) {
34650      t.push(nu.register(s));
34651    }
34652    i({
34653      key: "USER_PROFILE",
34654      text: J.userProfileLink,
34655      route: "/v1/account-settings/user-profile",
34656      iconUrl: mP
34657    }
34657), St.isEntitledTo(An.accountUsers) && i({
34658      key: "ACCOUNT_USER",
34659      text: J.accountUsersLink,
34660      route: "/v1/account-settings/users",
34661      iconUrl: CP
34662    }), i({
34663      key: "PLAN_AND_BILLING",
34664      text: J.planAndBillingLink,
34665      route: "/v1/account-settings/plan-and-billing",
34666      iconUrl: vP
34667    });
34668  }), Dn(() => {
34669    e && (ho.value = e), t.forEach((i) => i());
34670  });
34671}
34672const SP = {
34673  headerBackButtonLabel: "Back"
34674}, bP = /* @__PURE__ */ Le({
34675  __name: "account-settings-header-back-button",
34676  setup(e) {
34677    function t() {
34678      window.history.back();
34679    }
34680    return (i, s) => (X(), xe(O(vt), {
34681      aid: "ACCOUNT_SETTINGS_HEADER_BACK",
34682      label: O(SP).headerBackButtonLabel,
34683      icon: "fa-regular fa-chevron-left",
34684      variant: "text",
34685      color: "gray-500",
34686      type: "button",
34687      onClick: t
34688    }, null, 8, ["label"]));
34689  }
34690}), yP = { class: "account-settings-container" }, RP = /* @__PURE__ */ Le({
34691  __name: "account-settings-mfe",
34692  setup(e) {
34693    wP();
34694    let t;
34695    const i = j(!1);
34696    return yi(async () => {
34697      t = su.register({
34698        component: bP,
34699        key: "ACCOUNT_SETTINGS_BACK_BUTTON"
34700      }), br(!1), await Gx(), await Ge.init(Tn());
34701      const s = await Ge.getInfo({});
34702      Object.assign(De, s), i.value = !0;
34703    }), Dn(() => {
34704      t && t(), br(!0);
34705    }), (s, o) => (X(), $e("div", yP, [
34706      i.value ? (X(), xe(O(ol), { key: 0 })) : it("", !0)
34707    ]));
34708  }
34709}), FP = /* @__PURE__ */ Bt(RP, [["__scopeId", "data-v-2a416d31"]]), { bootstrap: kP, mount: LP, unmount: OP } = Wc({
34710  name: "account-settings",
34711  mainComponent: FP,
34712  targetElement: "#content",
34713  includeCss: !0,
34714  viteCdnPrefix: "/assets-ws1/1790235839988",
34715  handleVueApp: (e) => {
34716    Vc(e), e.use(fP);
34717  }
34718});
34719export {
34720  kP as bootstrap,
34721  LP as mount,
34722  OP as unmount
34723};
34724//# sourceMappingURL=account-settings-mfe.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.