@blinkk/root-cms 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/app.js +1 -1
  2. package/dist/{chunk-7Z5IRD2G.js → chunk-RLZFZT42.js} +2 -2
  3. package/dist/plugin.js +5 -5
  4. package/dist/ui/{AIPage-2LUC2PWC.js → AIPage-YI3RFK5F.js} +1 -1
  5. package/dist/ui/{AssetsPage-PODV4QAB.js → AssetsPage-4JNAOFYF.js} +1 -1
  6. package/dist/ui/{CollectionPage-4DMKW5YB.js → CollectionPage-JWHH5G55.js} +1 -1
  7. package/dist/ui/{ComparePage-JMJE5A5Y.js → ComparePage-YZE3EMU4.js} +1 -1
  8. package/dist/ui/{DataPage-MVLZT2BU.js → DataPage-VRCQSZZG.js} +1 -1
  9. package/dist/ui/{DataSourcePage-4RPBXRI2.js → DataSourcePage-WMSPBZ3W.js} +1 -1
  10. package/dist/ui/{DocTranslationsPage-XJSPKGVX.js → DocTranslationsPage-RY2LOZBX.js} +1 -1
  11. package/dist/ui/{DocumentPage-R2PVNG24.js → DocumentPage-EEGTJMIW.js} +1 -1
  12. package/dist/ui/{EditDataSourcePage-3SHAARNL.js → EditDataSourcePage-LLCX6K4J.js} +1 -1
  13. package/dist/ui/{EditReleasePage-G5VW2OGW.js → EditReleasePage-WQYXXMZQ.js} +1 -1
  14. package/dist/ui/{LogsPage-K6KYEG2P.js → LogsPage-IP2DKEYR.js} +1 -1
  15. package/dist/ui/{NewDataSourcePage-O2VQEOJG.js → NewDataSourcePage-RDYJC4DH.js} +1 -1
  16. package/dist/ui/{NewReleasePage-RSVS32RZ.js → NewReleasePage-DGMFU2JN.js} +1 -1
  17. package/dist/ui/{NotFoundPage-ZYD5ILG6.js → NotFoundPage-WDZ2K7EF.js} +1 -1
  18. package/dist/ui/{ProjectPage-X3YQBWL4.js → ProjectPage-HYJOQUWR.js} +1 -1
  19. package/dist/ui/{ReleasePage-FJHHXNNB.js → ReleasePage-2KSF23TK.js} +1 -1
  20. package/dist/ui/{ReleasesPage-VGWIBNEZ.js → ReleasesPage-NZIBBXU4.js} +1 -1
  21. package/dist/ui/{SettingsPage-C4RXOQ6T.js → SettingsPage-36XFWV62.js} +1 -1
  22. package/dist/ui/{SidebarToolsPage-ZBOKPEMP.js → SidebarToolsPage-5C6YBWJ7.js} +1 -1
  23. package/dist/ui/{TaskPage-BQ4OX5WN.js → TaskPage-SPIFPGPP.js} +1 -1
  24. package/dist/ui/{TasksPage-3IGQYVYS.js → TasksPage-ZOXRPBQV.js} +1 -1
  25. package/dist/ui/{TranslationsArbPage-GGHCWPQL.js → TranslationsArbPage-UHANA7JD.js} +1 -1
  26. package/dist/ui/{TranslationsEditPage-E2BCMKYV.js → TranslationsEditPage-PQY6W5YG.js} +1 -1
  27. package/dist/ui/{TranslationsPage-MC4O4ZNI.js → TranslationsPage-V2PQFCN5.js} +1 -1
  28. package/dist/ui/{chunk-UEON4JAT.js → chunk-FBJURT7Z.js} +1 -1
  29. package/dist/ui/{chunk-B6BLDN24.js → chunk-JT5L6GPZ.js} +57 -57
  30. package/dist/ui/chunk-P3NETZZP.js +1 -0
  31. package/dist/ui/chunk-TJBVMFNQ.js +1 -0
  32. package/dist/ui/ui.css +1 -1
  33. package/dist/ui/ui.js +1 -1
  34. package/package.json +3 -3
  35. package/dist/ui/chunk-6IFGKSIE.js +0 -1
  36. package/dist/ui/chunk-IU36W2TB.js +0 -1
  37. /package/dist/ui/{chunk-B6BLDN24.js.LEGAL.txt → chunk-JT5L6GPZ.js.LEGAL.txt} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as Er,b as No}from"./chunk-767BAQ53.js";import{a as Rr}from"./chunk-VMT7JFAM.js";import{a as Dr}from"./chunk-PJA7YP4A.js";import{b as vr,e as Io}from"./chunk-XOQ3KDSR.js";import{b as Ui}from"./chunk-62UWGWON.js";import"./chunk-I6ICVKEC.js";import"./chunk-ORXEMIQC.js";import{a as Fr,b as xr}from"./chunk-UEON4JAT.js";import"./chunk-EGEB6N4J.js";import{f as Lo}from"./chunk-AL3TN2KI.js";import{$ as fr,Ac as wr,Ha as I,Lc as yr,Mc as br,Nc as Go,Tc as Sr,V as gr,W as pr,Y as To,_a as Oo,a as E,c as ue,d as Le,e as D,ea as wt,f as qt,g as N,ga as Ao,h as W,i as se,j as Dl,l as re,m as Jt,q as Wi,ra as yt,sa as ko,ta as pi,v as F,va as mr,vb as Cr,y as ne}from"./chunk-NZHF733K.js";import{b as dr,e as ur,j as hr}from"./chunk-KUCVLANF.js";import"./chunk-DTMZLUNY.js";import"./chunk-PVAE643M.js";var ri=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){let o=t?this.allAsyncListeners:this.allSyncListeners,s=o.get(e);return!s&&i&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){let o=this.getListeners(e,i,!1);o&&(o.delete(t),o.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){let t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){let i=e.type;if(t&&"event"in e){let a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}let o=(a,l)=>a.forEach(c=>{if(!l.has(c))return;let d=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>c(e)):()=>c(e);t?this.dispatchAsync(d):d()}),s=this.getListeners(i,t,!1)??new Set,r=new Set(s);r.size>0&&o(r,s),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{let l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(i,e)):()=>a(i,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}},ni=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(ni||{}),Mr={};function Cs(e,t){Mr[t]||(e(),Mr[t]=!0)}function ot(e,...t){console.log("AG Grid: "+e,...t)}function S(e,...t){Cs(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function Q(e,...t){Cs(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}function ws(e){return!!(e&&e.constructor&&e.call&&e.apply)}function El(e){Ml(e,400)}var Ho=[],zo=!1;function Pr(e){Ho.push(e),!zo&&(zo=!0,window.setTimeout(()=>{let t=Ho.slice();Ho.length=0,zo=!1,t.forEach(i=>i())},0))}function Ml(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(i=>i()),t)}function xe(e,t){let i;return function(...o){let s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(s,o)},t)}}function Tr(e,t){let i=0;return function(...o){let s=this,r=new Date().getTime();r-i<t||(i=r,e.apply(s,o))}}function Pl(e,t,i=100,o){let s=new Date().getTime(),r=null,n=!1,a=()=>{let l=new Date().getTime()-s>i;(e()||l)&&(t(),n=!0,r!=null&&(window.clearInterval(r),r=null),l&&o&&S(o))};a(),n||(r=window.setInterval(a,10))}function dt(e){return e==null||e===""?null:e}function M(e,t=!1){return e!=null&&(e!==""||t)}function K(e){return!M(e)}function Ee(e){return e==null||e.length===0}function Zo(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Nt(e){if(e===void 0)return;if(e===null||e==="")return null;if(typeof e=="number")return isNaN(e)?void 0:e;let t=parseInt(e,10);return isNaN(t)?void 0:t}function es(e){if(e!==void 0)return e===null||e===""?!1:ts(e)}function ts(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1}function to(e,t){let i=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return i===o}function Tl(e,t,i=!1){let o=e==null,s=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function r(n,a){return n>a?1:n<a?-1:0}if(typeof e!="string"||!i)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}function Ji(e){if(e instanceof Set||e instanceof Map){let t=[];return e.forEach(i=>t.push(i)),t}return Object.values(e)}function nn(e,t){return e.get("rowModelType")===t}function de(e){return nn(e,"clientSide")}function mt(e){return nn(e,"serverSide")}function Re(e,t){return e.get("domLayout")===t}function io(e){return ro(e)!==void 0}function oo(e){return!e.get("suppressAsyncEvents")}function an(e){return typeof e.get("getRowHeight")=="function"}function Al(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function ht(e,t,i=!1,o){if(o==null&&(o=e.environment.getDefaultRowHeight()),an(e)){if(i)return{height:o,estimated:!0};let n={node:t,data:t.data},a=e.getCallback("getRowHeight")(n);if(is(a))return a===0&&S("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,a),estimated:!1}}if(t.detail&&e.get("masterDetail"))return kl(e);let s=e.get("rowHeight");return{height:s&&is(s)?s:o,estimated:!1}}function kl(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};let t=e.get("detailRowHeight");return is(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function fo(e){let{environment:t}=e,i=e.get("rowHeight");if(!i||K(i))return t.getDefaultRowHeight();let o=t.refreshRowHeightVariable();return o!==-1?o:(S("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function is(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function Di(e,t,i){let o=t[e.getDomDataKey()];return o?o[i]:void 0}function Vt(e,t,i,o){let s=e.getDomDataKey(),r=t[s];K(r)&&(r={},t[s]=r),r[i]=o}function ve(e){let t=null,i=e.get("getDocument");return i&&M(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&M(t)?t:document}function ln(e){return ve(e).defaultView||window}function Ei(e){return e.eGridDiv.getRootNode()}function fe(e){return Ei(e).activeElement}function cn(e){let t=ve(e),i=fe(e);return i===null||i===t.body}function Wt(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function mo(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Re(e,"print"))}function Qe(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function os(e){let t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function vo(e){let t=e.get("grandTotalRow");if(t)return t;if(e.get("groupIncludeTotalFooter"))return"bottom"}function Co(e){let t=e.get("groupTotalRow");if(typeof t=="function")return e.getCallback("groupTotalRow");if(t)return()=>t;let i=e.get("groupIncludeFooter");if(typeof i=="function"){let o=e.getCallback("groupIncludeFooter");return s=>o(s)?"bottom":void 0}return()=>i?"bottom":void 0}function dn(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function ys(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Ut(e){let t=e.getCallback("getRowId");return t===void 0?t:i=>{let o=t(i);return typeof o!="string"&&(S("The getRowId callback must return a string. The ID ",o," is being cast to a string."),o=String(o)),o}}function ii(e){return e?.checkboxes??!0}function so(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Il(e){return e?.hideDisabledCheckboxes??!1}function Ll(e){return typeof e.get("rowSelection")!="string"}function Ol(e){return e.get("cellSelection")!==void 0}function Gl(e){let t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t?.suppressMultiRanges??!1:!1:e.get("suppressMultiRangeSelection")}function gt(e){let t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Nl(e){let t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t.handle?.mode==="range":!1:e.get("enableRangeHandle")}function Ar(e){let t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t.handle?.mode==="fill":!1:e.get("enableFillHandle")}function un(e){let t=e.get("rowSelection")??"single";if(typeof t=="string"){let i=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return i&&o?!1:i?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Hl(e){let t=un(e);return t===!0||t==="enableSelection"}function kr(e){let t=un(e);return t===!0||t==="enableDeselection"}function bs(e){let t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function ro(e){let t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return t?.mode}function hn(e){return ro(e)==="multiRow"}function zl(e){let t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Ss(e){let t=e.get("rowSelection");if(typeof t=="string"){let i=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return i&&o?"filteredDescendants":i?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Dt(e){let t=Ss(e);return t==="descendants"||t==="filteredDescendants"}function Bo(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function $(e){if(!(!e||!e.length))return e[e.length-1]}function Pt(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((o,s)=>i?i(o,t[s]):t[s]===o)}function Bl(e){return e.sort((t,i)=>t-i)}function gn(e,t){let i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function De(e,t){let i=e.indexOf(t);i>=0&&e.splice(i,1)}function Vl(e,t){for(let i=0;i<t.length;i++)gn(e,t[i])}function Wl(e,t){for(let i=0;i<t.length;i++)De(e,t[i])}function Mi(e,t,i){e.splice(i,0,t)}function pn(e,t,i){Wl(e,t),t.slice().reverse().forEach(o=>Mi(e,o,i))}function Ht(e,t){return e.indexOf(t)>-1}function Ul(e){return e?.flatMap(t=>t)??[]}function Ir(e,t){t==null||e==null||t.forEach(i=>e.push(i))}var fn="__ag_Grid_Stop_Propagation",_l=["touchstart","touchend","touchmove","touchcancel","scroll"],Vo={};function oi(e){e[fn]=!0}function ut(e){return e[fn]===!0}var mn=(()=>{let e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof Vo[i]=="boolean")return Vo[i];let o=document.createElement(e[i]||"div");return i="on"+i,Vo[i]=i in o}})();function ss(e,t,i){let o=t;for(;o;){let s=Di(e,o,i);if(s)return s;o=o.parentElement}return null}function jl(e,t){return!t||!e?!1:Yl(t).indexOf(e)>=0}function Kl(e){let t=[],i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function Yl(e){let t=e;return t.path?t.path:t.composedPath?t.composedPath():Kl(t)}function $l(e,t,i,o){let r=Ht(_l,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,o,r)}var b=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new ri),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService&&this.localEventService.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){let i=[];for(let o in t){let s=t[o];s&&i.push(this._setupListener(e,o,s))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?$l(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);let o=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);let i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let i=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=s.changeSet.id}let r={type:"gridPropertyChanged",changeSet:s.changeSet,source:s.source};t(r)};e.forEach(s=>this.setupGridOptionListener(s,o))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){let i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function ke(e){return e instanceof Xi}var Xi=class extends b{constructor(e,t,i,o){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=Cn(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=o}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{Et(t)?e.push(t):ke(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1,o=this.findChildrenRemovingPadding();for(let r=0,n=o.length;r<n;r++){let a=o[r];if(!a.isVisible())continue;let l=a.getColumnGroupShow();l==="open"?(e=!0,i=!0):l==="closed"?(t=!0,i=!0):(e=!0,t=!0)}let s=e&&t&&i;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){let e=[],t=i=>{i.forEach(o=>{ke(o)&&o.isPadding()?t(o.children):e.push(o)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},vn="ag-Grid-ControlsColumn",Ql=class extends b{constructor(){super(...arguments),this.beanName="controlsColService"}isControlsColEnabled(){let{gos:e}=this,t=e.get("rowSelection");if(!t||typeof t!="object")return!1;let i=ii(t),o=so(t);return!!(i||o)}createControlsCols(){if(!this.isControlsColEnabled())return[];let{gos:e}=this,t=e.get("selectionColumnDef"),o={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(r,n,a,l){let c=a.isSelected(),d=l.isSelected();return c&&d?0:c?1:-1},editable:!1,suppressFillHandle:!0,...t,colId:`${vn}`},s=new Ds(o,null,o.colId,!1);return this.createBean(s),[s]}},wo="ag-Grid-AutoColumn";function Rs(e){let t=[],i=o=>{for(let s=0;s<o.length;s++){let r=o[s];Et(r)?t.push(r):ke(r)&&i(r.getChildren())}};return i(e),t}function ct(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function Ft(e,t,i){let o={};if(!t)return;pt(null,t,r=>{o[r.getInstanceId()]=r}),i&&pt(null,i,r=>{o[r.getInstanceId()]=null});let s=Object.values(o).filter(r=>r!=null);e.destroyBeans(s)}function Lr(e){return e.getId().startsWith(wo)}function Pi(e){return e.getColId().startsWith(vn)}function Zi(e){let t=[];return e instanceof Array?e.some(o=>typeof o!="string")?S("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):S("colDef.type should be of type 'string' | 'string[]'"),t}var Fs=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e,t){let{frameworkOverrides:i,wrappedListeners:o}=this,s=t;if(i.shouldWrapOutgoing){s=n=>{i.wrapOutgoing(()=>t(n))};let r=o.get(e);r||(r=new Map,o.set(e,r)),r.set(t,s)}return s}wrapGlobal(e){let{frameworkOverrides:t,wrappedGlobalListeners:i}=this,o=e;return t.shouldWrapOutgoing&&(o=(s,r)=>{t.wrapOutgoing(()=>e(s,r))},i.set(e,o)),o}unwrap(e,t){let{wrappedListeners:i}=this,o=i.get(e);if(o){let s=o.get(t);if(s)return o.delete(t),o.size===0&&i.delete(e),s}return t}unwrapGlobal(e){let{wrappedGlobalListeners:t}=this,i=t.get(e);return i?(t.delete(e),i):e}},yo=new Set(["__proto__","constructor","prototype"]);function We(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(let[i,o]of Object.entries(e))yo.has(i)||t(i,o)}}function xs(e){let t={},i=Object.keys(e);for(let o=0;o<i.length;o++){if(yo.has(i[o]))continue;let s=i[o],r=e[s];t[s]=r}return t}function rs(e,t){if(!e)return;let i=e,o={};return Object.keys(i).forEach(s=>{if(t&&t.indexOf(s)>=0||yo.has(s))return;let r=i[s];ns(r)&&r.constructor===Object?o[s]=rs(r):o[s]=r}),o}function Or(e){if(!e)return[];let t=Object;if(typeof t.values=="function")return t.values(e);let i=[];for(let o in e)e.hasOwnProperty(o)&&e.propertyIsEnumerable(o)&&i.push(e[o]);return i}function Ie(e,t,i=!0,o=!1){M(t)&&We(t,(s,r)=>{if(yo.has(s))return;let n=e[s];n!==r&&(o&&n==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(n={},e[s]=n),ns(r)&&ns(n)&&!Array.isArray(n)?Ie(n,r,i,o):(i||r!==void 0)&&(e[s]=r))})}function bi(e,t,i){if(!t||!e)return;if(!i)return e[t];let o=t.split("."),s=e;for(let r=0;r<o.length;r++){if(s==null)return;s=s[o[r]]}return s}function ns(e){return typeof e=="object"&&e!==null}var ql={resizable:!0,sortable:!0},Jl=0;function Cn(){return Jl++}function Et(e){return e instanceof Ds}var Ds=class extends b{constructor(e,t,i,o){super(),this.isColumn=!0,this.instanceId=Cn(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new ri,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=o,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){e.sort!==void 0?(e.sort==="asc"||e.sort==="desc")&&(this.sort=e.sort):(e.initialSort==="asc"||e.initialSort==="desc")&&(this.sort=e.initialSort);let t=e.sortIndex,i=e.initialSortIndex;t!==void 0?t!==null&&(this.sortIndex=t):i!==null&&(this.sortIndex=i);let o=e.hide,s=e.initialHide;o!==void 0?this.visible=!o:this.visible=!s,e.pinned!==void 0?this.setPinned(e.pinned):this.setPinned(e.initialPinned);let r=e.flex,n=e.initialFlex;r!==void 0?this.flex=r:n!==void 0&&(this.flex=n)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){let e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=M(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=M(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){let e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=M(this.colDef.tooltipField)||M(this.colDef.tooltipValueGetter)||M(this.colDef.tooltipComponent)}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t,i=Nt(e.width),o=Nt(e.initialWidth);return i!=null?t=i:o!=null?t=o:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(K(this.colDef)||K(this.colDef.showRowGroup))return!1;let t=this.colDef.showRowGroup===!0,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Fs(this.frameworkOverrides));let i=this.frameworkEventListenerService?.wrap(e,t)??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){let i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){let t=this.createColumnFunctionCallbackParams(e),i=this.colDef.suppressNavigable;return i(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){let t=this.gos.get("rowSelection");if(t&&typeof t!="string"){let i=Pi(this)&&ii(t);return this.isColumnFunc(e,i)}else return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??ql[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){let i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return K(this.sort)}isSorting(){return M(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));let o=this.createColumnEvent("filterChanged",t);i&&Ie(o,i),this.columnEventService.dispatchEvent(o)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){e===!0||e==="left"?this.pinned="left":e==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){let i=e===!0;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};let t=e.getPaddingLevel()+1,i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(K(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(K(this.colDef.rowSpan))return 1;let t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){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")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},Xl={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},Zl=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Zo(e);let i=0;for(;;){let o;if(e?(o=e,i!==0&&(o+="_"+i)):t?(o=t,i!==0&&(o+="_"+i)):o=i,!this.existingKeys[o])return this.existingKeys[o]=!0,String(o);i++}}},ec=class extends b{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(e){this.dataTypeService=e.dataTypeService}createColumnTree(e,t,i,o){let s=new Zl,{existingCols:r,existingGroups:n,existingColKeys:a}=this.extractExistingTreeData(i);s.addExistingKeys(a);let l=this.recursivelyCreateColumns(e,0,t,r,s,n,o),c=this.findMaxDept(l,0),d=this.balanceColumnTree(l,0,c,s);return pt(null,d,(h,g)=>{ke(h)&&h.setupExpandable(),h.setOriginalParent(g)}),{columnTree:d,treeDept:c}}extractExistingTreeData(e){let t=[],i=[],o=[];return e&&pt(null,e,s=>{if(ke(s)){let r=s;i.push(r)}else{let r=s;o.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:i,existingColKeys:o}}balanceTreeForAutoCols(e,t){let i=[],o=this.findDepth(t);return e.forEach(s=>{let r=s;for(let n=o-1;n>=0;n--){let a=new Xi(null,`FAKE_PATH_${s.getId()}}_${n}`,!0,n);this.createBean(a),a.setChildren([r]),r.setOriginalParent(a),r=a}o===0&&s.setOriginalParent(null),i.push(r)}),[i,o]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&ke(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,o){let s=[];for(let r=0;r<e.length;r++){let n=e[r];if(ke(n)){let a=n,l=this.balanceColumnTree(a.getChildren(),t+1,i,o);a.setChildren(l),s.push(a)}else{let a,l;for(let c=i-1;c>=t;c--){let d=o.getUniqueKey(null,null),u=this.createMergedColGroupDef(null),h=new Xi(u,d,!0,t);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(s.push(a),e.some(d=>ke(d))){l.setChildren([n]);continue}else{l.setChildren(e);break}s.push(n)}}return s}findMaxDept(e,t){let i=t;for(let o=0;o<e.length;o++){let s=e[o];if(ke(s)){let r=s,n=this.findMaxDept(r.getChildren(),t+1);i<n&&(i=n)}}return i}recursivelyCreateColumns(e,t,i,o,s,r,n){if(!e)return[];let a=new Array(e.length);for(let l=0;l<a.length;l++){let c=e[l];this.isColumnGroup(c)?a[l]=this.createColumnGroup(i,c,t,o,s,r,n):a[l]=this.createColumn(i,c,o,s,n)}return a}createColumnGroup(e,t,i,o,s,r,n){let a=this.createMergedColGroupDef(t),l=s.getUniqueKey(a.groupId||null,null),c=new Xi(a,l,!1,i);this.createBean(c);let d=this.findExistingGroup(t,r);d&&r.splice(d.idx,1);let u=d?.group;u&&c.setExpanded(u.isExpanded());let h=this.recursivelyCreateColumns(a.children,i+1,e,o,s,r,n);return c.setChildren(h),c}createMergedColGroupDef(e){let t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,o,s){let r=this.findExistingColumn(t,i);r&&i?.splice(r.idx,1);let n=r?.column;if(n){let a=this.addColumnDefaultAndTypes(t,n.getColId());n.setColDef(a,t,s),this.applyColumnState(n,a,s)}else{let a=o.getUniqueKey(t.colId,t.field),l=this.addColumnDefaultAndTypes(t,a);n=new Ds(l,t,a,e),this.createBean(n)}return this.dataTypeService?.addColumnListeners(n),n}applyColumnState(e,t,i){let o=Nt(t.flex);if(o!==void 0&&e.setFlex(o),e.getFlex()<=0){let a=Nt(t.width);if(a!=null)e.setActualWidth(a,i);else{let l=e.getActualWidth();e.setActualWidth(l,i)}}t.sort!==void 0&&(t.sort=="asc"||t.sort=="desc"?e.setSort(t.sort,i):e.setSort(void 0,i));let r=Nt(t.sortIndex);r!==void 0&&e.setSortIndex(r);let n=es(t.hide);n!==void 0&&e.setVisible(!n,i),t.pinned!==void 0&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){let o=t[i].getUserProvidedColDef();if(!o)continue;if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(o.field===e.field)return{idx:i,column:t[i]};continue}if(o===e)return{idx:i,column:t[i]}}}findExistingGroup(e,t){if(e.groupId!=null)for(let o=0;o<t.length;o++){let s=t[o];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:o,group:s}}}addColumnDefaultAndTypes(e,t){let i={},o=this.gos.get("defaultColDef");Ie(i,o,!1,!0);let s=this.updateColDefAndGetColumnType(i,e,t);s&&this.assignColumnTypes(s,i),Ie(i,e,!1,!0);let r=this.gos.get("autoGroupColumnDef"),n=Qe(this.gos);return e.rowGroup&&r&&n&&Ie(i,{sort:r.sort,initialSort:r.initialSort},!1,!0),this.dataTypeService?.validateColDef(i),i}updateColDefAndGetColumnType(e,t,i){let o=this.dataTypeService?.updateColDefAndGetColumnType(e,t,i),s=t.type??o??e.type;return e.type=s,s?Zi(s):void 0}assignColumnTypes(e,t){if(!e.length)return;let i=Object.assign({},Xl),o=this.gos.get("columnTypes")||{};We(o,(s,r)=>{s in i?S(`the column type '${s}' is a default column type and cannot be overridden.`):(r.type&&S("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."),i[s]=r)}),e.forEach(s=>{let r=i[s.trim()];r?Ie(t,r,!1,!0):S("colDef.type '"+s+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};function pt(e,t,i){if(t)for(let o=0;o<t.length;o++){let s=t[o];ke(s)&&pt(s,s.getChildren(),i),i(s,e)}}var tc=class extends b{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(e){this.context=e.context,this.ctrlsService=e.ctrlsService,this.columnFactory=e.columnFactory,this.columnSizeService=e.columnSizeService,this.visibleColsService=e.visibleColsService,this.columnViewportService=e.columnViewportService,this.pivotResultColsService=e.pivotResultColsService,this.columnAnimationService=e.columnAnimationService,this.autoColService=e.autoColService,this.controlsColService=e.controlsColService,this.valueCache=e.valueCache,this.columnDefFactory=e.columnDefFactory,this.columnApplyStateService=e.columnApplyStateService,this.columnGroupStateService=e.columnGroupStateService,this.eventDispatcher=e.columnEventDispatcher,this.columnMoveService=e.columnMoveService,this.columnAutosizeService=e.columnAutosizeService,this.funcColsService=e.funcColsService,this.quickFilterService=e.quickFilterService,this.showRowGroupColsService=e.showRowGroupColsService,this.environment=e.environment}postConstruct(){let e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],t=>this.refreshAll(It(t.source))),this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,It(t.source))}),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(It(t.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],t=>this.recreateColumnDefs(It(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),It(t.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){let t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();let i=this.colDefCols?.list,o=this.colDefCols?.tree,s=this.columnFactory.createColumnTree(this.colDefs,!0,o,e);Ft(this.context,this.colDefCols?.tree,s.columnTree);let r=s.columnTree,n=s.treeDept,a=Rs(r),l={};a.forEach(c=>l[c.getId()]=c),this.colDefCols={tree:r,treeDepth:n,list:a,map:l},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),e==="gridInitializing"&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;let t=this.cols?.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();let i=Al(this.gos,this.showingPivotResult);(!e||i)&&this.restoreColOrder(),this.positionLockedCols(),this.showRowGroupColsService?.refresh(),this.quickFilterService?.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),!Pt(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){let e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=e!=null,e){let{map:t,list:i,tree:o,treeDepth:s}=e;this.cols={list:i.slice(),map:{...t},tree:o.slice(),treeDepth:s},e.list.some(n=>this.cols?.map[n.getColId()]!==void 0)||(this.lastPivotOrder=null)}else{let{map:t,list:i,tree:o,treeDepth:s}=this.colDefCols;this.cols={list:i.slice(),map:{...t},tree:o.slice(),treeDepth:s}}}getColsToShow(){let e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns(),i=this.controlsColService?.isControlsColEnabled();return this.cols.list.filter(s=>{let r=Lr(s);if(e){let n=t&&Ht(t,s);return r||n||i&&Pi(s)}else return r||s.isVisible()})}addAutoCols(){this.autoCols!=null&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),Gr(this.cols))}createAutoCols(){let e=ys(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),s=!(i.length>0||this.gos.get("treeData"))||t||e,r=()=>{this.autoCols&&(Ft(this.context,this.autoCols.tree),this.autoCols=null)};if(s||!this.autoColService){r();return}let n=this.autoColService.createAutoCols(i)??[],a=Hr(n,this.autoCols?.list||null),l=this.cols.treeDepth,d=(this.autoCols?this.autoCols.treeDepth:-1)==l;if(a&&d)return;r();let[u,h]=this.columnFactory.balanceTreeForAutoCols(n,this.cols.tree);this.autoCols={list:n,tree:u,treeDepth:h,map:{}};let g=f=>{if(!f)return null;let m=f.filter(p=>!Lr(p));return[...n,...m]};this.lastOrder=g(this.lastOrder),this.lastPivotOrder=g(this.lastPivotOrder)}createControlsCols(){let e=()=>{Ft(this.context,this.controlsCols?.tree),this.controlsCols=null};this.controlsColService||e();let t=this.cols.treeDepth,o=(this.controlsCols?.treeDepth??-1)==t,s=this.controlsColService?.createControlsCols()??[];if(Hr(s,this.controlsCols?.list??[])&&o)return;e();let[n,a]=this.columnFactory.balanceTreeForAutoCols(s,this.cols.tree);this.controlsCols={list:s,tree:n,treeDepth:a,map:{}};let l=c=>{if(!c)return null;let d=c.filter(u=>!Pi(u));return[...s,...d]};this.lastOrder=l(this.lastOrder),this.lastPivotOrder=l(this.lastPivotOrder)}addControlsCols(){this.controlsCols!=null&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),Gr(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){if(!this.cols||Ee(e))return;if(Re(this.gos,"print")){S("Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();let o;t===!0||t==="left"?o="left":t==="right"?o="right":o=null;let s=[];e.forEach(r=>{if(!r)return;let n=this.getCol(r);n&&n.getPinned()!==o&&(n.setPinned(o),s.push(n))}),s.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(s,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let o;ke(e)?o=e.getId():o=e||"",this.columnGroupStateService.setColumnGroupState([{groupId:o,open:t}],i)}getProvidedColGroup(e){let t=null;return pt(null,this.cols?.tree,i=>{ke(i)&&i.getId()===e&&(t=i)}),t}isColGroupLocked(e){let t=this.gos.get("groupLockGroupColumns");if(!e.isRowGroupActive()||t===0)return!1;if(t===-1)return!0;let o=this.funcColsService.getRowGroupColumns().findIndex(s=>s.getColId()===e.getColId());return t>o}isSuppressAutoCol(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,de(this.gos)||mt(this.gos)||S("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){let e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;let t=new Map(e.map((l,c)=>[l,c]));if(!this.cols.list.some(l=>t.has(l)))return;let o=new Map(this.cols.list.map(l=>[l,!0])),s=e.filter(l=>o.has(l)),r=new Map(s.map(l=>[l,!0])),n=this.cols.list.filter(l=>!r.has(l)),a=s.slice();n.forEach(l=>{let c=l.getOriginalParent();if(!c){a.push(l);return}let d=[];for(;!d.length&&c;)c.getLeafColumns().forEach(f=>{let m=a.indexOf(f)>=0,p=d.indexOf(f)<0;m&&p&&d.push(f)}),c=c.getOriginalParent();if(!d.length){a.push(l);return}let u=d.map(g=>a.indexOf(g)),h=Math.max(...u);Mi(a,l,h+1)}),this.cols.list=a}sortColsLikeKeys(e){if(this.cols==null)return;let t=[],i={};e.forEach(s=>{if(i[s])return;let r=this.cols.map[s];r&&(t.push(r),i[s]=!0)});let o=0;if(this.cols.list.forEach(s=>{let r=s.getColId();if(i[r]!=null)return;r.startsWith(wo)?Mi(t,s,o++):t.push(s)}),t=this.columnMoveService.placeLockedColumns(t),!this.columnMoveService.doesMovePassMarryChildren(t)){S("Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.cols.list=t}sortColsLikeCols(e){!e||e.length<=1||e.filter(i=>this.cols.list.indexOf(i)<0).length>0||e.sort((i,o)=>{let s=this.cols.list.indexOf(i),r=this.cols.list.indexOf(o);return s-r})}resetColDefIntoCol(e,t){let i=e.getUserProvidedColDef();if(!i)return!1;let o=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(o,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){pn(this.cols?.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list:this.lastOrder=this.cols?.list}getColumnDefs(){if(!this.colDefCols)return;let e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((o,s)=>this.lastOrder.indexOf(o)-this.lastOrder.indexOf(s)):this.lastOrder&&e.sort((o,s)=>this.cols.list.indexOf(o)-this.cols.list.indexOf(s));let t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){return this.colDefCols?.treeDepth>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>e.getColDef().colSpan!=null)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return e&&this.gos.get("treeData")?(S("Pivot mode not available with treeData."),!1):!0}isPivotActive(){let e=this.funcColsService.getPivotColumns();return this.pivotMode&&!Ee(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Ft(this.context,this.colDefCols?.tree),Ft(this.context,this.autoCols?.tree),Ft(this.context,this.controlsCols?.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){return this.colDefCols?.list?this.colDefCols.list:null}getCols(){return this.cols?.list??[]}getAllCols(){let t=this.pivotResultColsService.getPivotResultCols()?.list;return[this.colDefCols?.list??[],this.autoCols?.list??[],this.controlsCols?.list??[],t??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;let{map:i,list:o}=t;if(typeof e=="string"&&i[e])return i[e];for(let s=0;s<o.length;s++)if(Nr(o[s],e))return o[s];return this.getAutoCol(e)}getAutoCol(e){return this.autoCols?.list.find(t=>Nr(t,e))??null}getAutoCols(){return this.autoCols?.list??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){let e=[],t=this.ctrlsService.getHeaderRowContainerCtrls();for(let i of t){if(!i)continue;let o=i.getGroupRowCount()||0;for(let s=0;s<o;s++){let r=i.getGroupRowCtrlAtIndex(s),n=e[s];if(r){let a=this.getColumnGroupHeaderRowHeight(r);(n==null||a>n)&&(e[s]=a)}}}return e}getColumnGroupHeaderRowHeight(e){let t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight(),i=0,o=e.getHeaderCtrls();for(let s of o){let r=s.getColumn();if(r.isAutoHeaderHeight()){let n=r.getAutoHeaderHeight();n!=null&&n>i&&(i=n)}}return Math.max(t,i)}getColumnHeaderRowHeight(){let e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),i=this.visibleColsService.getAllCols().filter(o=>o.isAutoHeaderHeight()).map(o=>o.getAutoHeaderHeight()||0);return Math.max(e,...i)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){let e=this.gos.get("autoSizeStrategy");if(e?.type!=="fitCellContents")return;let{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){let o=t&&typeof t!="string"?ii(t):void 0,s=e&&typeof e!="string"?ii(e):void 0,r=o!==s,n=t&&typeof t!="string"?so(t):void 0,a=e&&typeof e!="string"?so(e):void 0;(r||n!==a)&&this.refreshAll(i)}};function It(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function Gr(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Nr(e,t){let i=e===t,o=e.getColDef()===t,s=e.getColId()==t;return i||o||s}function Hr(e,t){return Pt(e,t,(i,o)=>i.getColId()===o.getColId())}var ic=class extends b{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));return}let{colKeys:t,skipHeader:i,skipHeaderGroups:o,stopAtGroup:s,source:r="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>this.autoSizeCols(e));return}this.timesDelayed=0;let n=[],a=-1,l=i??this.gos.get("skipHeaderOnAutoSize"),c=o??l;for(;a!==0;){a=0;let d=[];t.forEach(u=>{if(!u)return;let h=this.columnModel.getCol(u);if(!h||n.indexOf(h)>=0)return;let g=this.autoWidthCalculator.getPreferredWidthForColumn(h,l);if(g>0){let f=this.normaliseColumnWidth(h,g);h.setActualWidth(f,r),n.push(h),a++}d.push(h)}),d.length&&this.visibleColsService.refresh(r)}c||this.autoSizeColumnGroupsByColumns(t,r,s),this.eventDispatcher.columnResized(n,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){let o=new Set;this.columnModel.getColsForKeys(e).forEach(a=>{let l=a.getParent();for(;l&&l!=i;)l.isPadding()||o.add(l),l=l.getParent()});let r,n=[];for(let a of o){for(let l of this.ctrlsService.getHeaderRowContainerCtrls())if(r=l.getHeaderCtrlForColumn(a),r)break;r&&r.resizeLeafColumnsToFit(t)}return n}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));return}let i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){let i=e.getMinWidth();t<i&&(t=i);let o=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=o),t}},oc=class extends b{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.aggFuncService=e.aggFuncService,this.visibleColsService=e.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:e=>this.rowGroupCols.push(e),removeGroupCol:e=>De(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>De(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>De(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){let t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupCols.slice(0);let i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return Ee(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;let o=this.columnModel.getColDefCol(e);o&&(o.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[o],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(i,o)=>this.setRowGroupActive(i,o,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,i=>this.setRowGroupActive(!0,i,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,i=>this.setRowGroupActive(!1,i,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,i=>i.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(i,o)=>{o.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,i=>i.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(i,o)=>this.setValueActive(i,o,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){let o=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(o)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,i=>this.setValueActive(!0,i,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,i=>this.setValueActive(!1,i,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;let o=this.rowGroupCols[e],s=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,o),this.eventDispatcher.rowGroupChanged(s,i)}setColList(e,t,i,o,s,r,n){if(!this.columnModel.getCols())return;let a=new Map;t.forEach((c,d)=>a.set(c,d)),t.length=0,M(e)&&e.forEach(c=>{let d=this.columnModel.getColDefCol(c);d&&t.push(d)}),t.forEach((c,d)=>{let u=a.get(c);if(u===void 0){a.set(c,0);return}o&&u!==d||a.delete(c)}),(this.columnModel.getColDefCols()||[]).forEach(c=>{let d=t.indexOf(c)>=0;r(d,c)}),s&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(n),this.eventDispatcher.columnChanged(i,[...a.keys()],n)}updateColList(e,t,i,o,s,r,n){if(!e||Ee(e))return;let a=!1,l=new Set;e.forEach(c=>{if(!c)return;let d=this.columnModel.getColDefCol(c);if(d){if(l.add(d),i){if(t.indexOf(d)>=0)return;t.push(d)}else{let u=t.indexOf(d);if(u<0)return;for(let h=u+1;h<t.length;h++)l.add(t[h]);De(t,d)}s(d),a=!0}}),a&&(o&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(n),this.eventDispatcher.genericColumnEvent(r,Array.from(l),n))}extractCols(e,t){this.extractRowGroupCols(e,t),this.extractPivotCols(e,t),this.extractValueCols(e,t)}extractValueCols(e,t){this.valueCols=this.extractColsCommon(t,this.valueCols,(i,o)=>i.setValueActive(o,e),()=>{},()=>{},i=>{let o=i.aggFunc;if(o===null||o==="")return null;if(o!==void 0)return!!o},i=>i.initialAggFunc!=null&&i.initialAggFunc!=""),this.valueCols.forEach(i=>{let o=i.getColDef();o.aggFunc!=null&&o.aggFunc!=""?i.setAggFunc(o.aggFunc):i.getAggFunc()||i.setAggFunc(o.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(i,o)=>i.setRowGroupActive(o,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(i,o)=>i.setPivotActive(o,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}extractColsCommon(e=[],t=[],i,o,s,r,n){let a=[],l=[];(this.columnModel.getColDefCols()||[]).forEach(h=>{let g=e.indexOf(h)<0,f=h.getColDef(),m=es(r(f)),p=es(n(f)),v=Nt(o(f)),w=Nt(s(f)),C;m!==void 0?C=m:v!==void 0?v===null?C=!1:C=v>=0:g?p!==void 0?C=p:w!==void 0?C=w!=null&&w>=0:C=!1:C=t.indexOf(h)>=0,C&&((g?v!=null||w!=null:v!=null)?a.push(h):l.push(h))});let d=h=>{let g=o(h.getColDef()),f=s(h.getColDef());return g??f};a.sort((h,g)=>{let f=d(h),m=d(g);return f===m?0:f<m?-1:1});let u=[].concat(a);return t.forEach(h=>{l.indexOf(h)>=0&&u.push(h)}),l.forEach(h=>{u.indexOf(h)<0&&u.push(h)}),t.forEach(h=>{u.indexOf(h)<0&&i(h,!1)}),u.forEach(h=>{t.indexOf(h)<0&&i(h,!0)}),u}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={},o=(s,r,n,a,l,c)=>{let d=this.columnModel.getColDefCols();if(!r.length||!d)return[];let u=Object.keys(s),h=new Set(u),g=new Set(u),f=new Set(r.map(T=>{let x=T.getColId();return g.delete(x),x}).concat(u)),m=[],p={},v=0;for(let T=0;T<d.length;T++){let x=d[T].getColId();f.has(x)&&(m.push(x),p[x]=v++)}let w=1e3,C=!1,R=0,P=T=>{let x=p[T];for(let A=R;A<x;A++){let L=m[A];g.has(L)&&(s[L][l]=w++,g.delete(L))}R=x};r.forEach(T=>{let x=T.getColId();if(h.has(x))P(x),s[x][l]=w++;else{let A=T.getColDef();(A[l]===null||A[l]===void 0&&A[c]==null)&&(C||(A[n]||A[n]===void 0&&A[a]?P(x):(g.forEach(O=>{s[O][l]=w+p[O]}),w+=m.length,C=!0)),i[x]||(i[x]={colId:x}),i[x][l]=w++)}})};return o(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),o(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},sc=class extends b{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){let i=this.columnModel.getColDefCols()||[];if(Ee(i))return!1;if(e&&e.state&&!e.state.forEach)return S("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."),!1;let o=this.funcColsService.getModifyColumnsNoEventsCallbacks(),s=(a,l,c)=>{let d=this.compareColumnStatesAndDispatchEvents(t),u=l.slice(),h={},g={},f=[],m=[],p=0,v=this.funcColsService.getRowGroupColumns().slice(),w=this.funcColsService.getPivotColumns().slice();a.forEach(T=>{let x=T.colId||"";if(x.startsWith(wo)){f.push(T),m.push(T);return}let L=c(x);L?(this.syncColumnWithStateItem(L,T,e.defaultState,h,g,!1,t,o),De(u,L)):(m.push(T),p+=1)});let C=T=>this.syncColumnWithStateItem(T,null,e.defaultState,h,g,!1,t,o);u.forEach(C),this.funcColsService.sortRowGroupColumns(zr.bind(this,h,v)),this.funcColsService.sortPivotColumns(zr.bind(this,g,w)),this.columnModel.refreshCols(!1);let P=(this.columnModel.getAutoCols()||[]).slice();return f.forEach(T=>{let x=this.columnModel.getAutoCol(T.colId);De(P,x),this.syncColumnWithStateItem(x,T,e.defaultState,null,null,!0,t,o)}),P.forEach(C),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),d(),{unmatchedAndAutoStates:m,unmatchedCount:p}};this.columnAnimationService.start();let{unmatchedAndAutoStates:r,unmatchedCount:n}=s(e.state||[],i,a=>this.columnModel.getColDefCol(a));if(r.length>0||M(e.defaultState)){let l=this.pivotResultColsService.getPivotResultCols()?.list;n=s(r,l||[],c=>this.pivotResultColsService.getPivotResultCol(c)).unmatchedCount}return this.columnAnimationService.finish(),n===0}resetColumnState(e){let t=this.columnModel.getColDefCols();if(Ee(t))return;let i=this.columnModel.getColDefColTree(),o=Rs(i),s=[],r=1e3,n=1e3,a=[],l=this.columnModel.getAutoCols();l&&(a=a.concat(l)),o&&(a=a.concat(o)),a.forEach(c=>{let d=this.getColumnStateFromColDef(c);K(d.rowGroupIndex)&&d.rowGroup&&(d.rowGroupIndex=r++),K(d.pivotIndex)&&d.pivot&&(d.pivotIndex=n++),s.push(d)}),this.applyColumnState({state:s,applyOrder:!0},e)}getColumnStateFromColDef(e){let t=(f,m)=>f??m??null,i=e.getColDef(),o=t(i.sort,i.initialSort),s=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),n=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex),c=t(i.rowGroupIndex,i.initialRowGroupIndex),d=t(i.rowGroup,i.initialRowGroup);c==null&&(d==null||d==!1)&&(c=null,d=null);let u=t(i.pivotIndex,i.initialPivotIndex),h=t(i.pivot,i.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);let g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:s,hide:r,pinned:n,width:a,flex:l,rowGroup:d,rowGroupIndex:c,pivot:h,pivotIndex:u,aggFunc:g}}syncColumnWithStateItem(e,t,i,o,s,r,n,a){if(!e)return;let l=(R,P)=>{let T={value1:void 0,value2:void 0},x=!1;return t&&(t[R]!==void 0&&(T.value1=t[R],x=!0),M(P)&&t[P]!==void 0&&(T.value2=t[P],x=!0)),!x&&i&&(i[R]!==void 0&&(T.value1=i[R]),M(P)&&i[P]!==void 0&&(T.value2=i[P])),T},c=l("hide").value1;c!==void 0&&e.setVisible(!c,n);let d=l("pinned").value1;d!==void 0&&e.setPinned(d);let u=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),h=l("flex").value1;if(h!==void 0&&e.setFlex(h),h==null){let R=l("width").value1;R!=null&&u!=null&&R>=u&&e.setActualWidth(R,n)}let g=l("sort").value1;g!==void 0&&(g==="desc"||g==="asc"?e.setSort(g,n):e.setSort(void 0,n));let f=l("sortIndex").value1;if(f!==void 0&&e.setSortIndex(f),r||!e.isPrimary())return;let m=l("aggFunc").value1;m!==void 0&&(typeof m=="string"?(e.setAggFunc(m),e.isValueActive()||(e.setValueActive(!0,n),a.addValueCol(e))):(M(m)&&S("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."),e.isValueActive()&&(e.setValueActive(!1,n),a.removeValueCol(e))));let{value1:p,value2:v}=l("rowGroup","rowGroupIndex");(p!==void 0||v!==void 0)&&(typeof v=="number"||p?(e.isRowGroupActive()||(e.setRowGroupActive(!0,n),a.addGroupCol(e)),o&&typeof v=="number"&&(o[e.getId()]=v)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,n),a.removeGroupCol(e)));let{value1:w,value2:C}=l("pivot","pivotIndex");(w!==void 0||C!==void 0)&&(typeof C=="number"||w?(e.isPivotActive()||(e.setPivotActive(!0,n),a.addPivotCol(e)),s&&typeof C=="number"&&(s[e.getId()]=C)):e.isPivotActive()&&(e.setPivotActive(!1,n),a.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;let t=[];e.state.forEach(i=>{i.colId!=null&&t.push(i.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){let t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),o={};return i.forEach(s=>{o[s.colId]=s}),()=>{let s=this.columnModel.getAllCols(),r=(m,p,v,w)=>{let C=p.map(w),R=v.map(w);if(Pt(C,R))return;let T=new Set(p);v.forEach(A=>{T.delete(A)||T.add(A)});let x=[...T];this.eventService.dispatchEvent({type:m,columns:x,column:x.length===1?x[0]:null,source:e})},n=m=>{let p=[];return s.forEach(v=>{let w=o[v.getColId()];w&&m(w,v)&&p.push(v)}),p},a=m=>m.getColId();r("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),a),r("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),a);let c=n((m,p)=>{let v=m.aggFunc!=null,w=v!=p.isValueActive(),C=v&&m.aggFunc!=p.getAggFunc();return w||C});c.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",c,e);let d=(m,p)=>m.width!=p.getActualWidth();this.eventDispatcher.columnResized(n(d),!0,e);let u=(m,p)=>m.pinned!=p.getPinned();this.eventDispatcher.columnPinned(n(u),e);let h=(m,p)=>m.hide==p.isVisible();this.eventDispatcher.columnVisible(n(h),e);let f=n((m,p)=>m.sort!=p.getSort()||m.sortIndex!=p.getSortIndex());f.length>0&&this.sortController.dispatchSortChangedEvents(e,f),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){let i=this.columnGetStateService.getColumnState(),o={};i.forEach(l=>o[l.colId]=l);let s={};e.forEach(l=>{o[l.colId]&&(s[l.colId]=!0)});let r=e.filter(l=>s[l.colId]),n=i.filter(l=>s[l.colId]),a=[];n.forEach((l,c)=>{let d=r&&r[c];if(d&&d.colId!==l.colId){let u=this.columnModel.getCol(d.colId);u&&a.push(u)}}),a.length&&this.eventDispatcher.columnMoved({movedColumns:a,source:t,finished:!0})}},zr=(e,t,i,o)=>{let s=e[i.getId()],r=e[o.getId()],n=s!=null,a=r!=null;if(n&&a)return s-r;if(n)return-1;if(a)return 1;let l=t.indexOf(i),c=t.indexOf(o),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},rc=class extends b{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){let o=this.columnModel.getCols();if(!o)return;let s=o[e];this.moveColumns([s],t,i)}moveColumns(e,t,i,o=!0){let s=this.columnModel.getCols();if(!s)return;if(t>s.length-e.length){S("tried to insert columns in invalid location, toIndex = ",t),S("remember that you should not count the moving columns when calculating the new index");return}this.columnAnimationService.start();let r=this.columnModel.getColsForKeys(e);this.doesMovePassRules(r,t)&&(this.columnModel.moveInCols(r,t,i),this.eventDispatcher.columnMoved({movedColumns:r,source:i,toIndex:t,finished:o})),this.columnAnimationService.finish()}doesMovePassRules(e,t){let i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){let o=this.columnModel.getCols().slice();return pn(o,e,t),o}doesMovePassLockedPositions(e){let t=r=>r?r==="left"||r===!0?-1:1:0,i=this.gos.get("enableRtl"),o=i?1:-1,s=!0;return e.forEach(r=>{let n=t(r.getColDef().lockPosition);i?n>o&&(s=!1):n<o&&(s=!1),o=n}),s}doesMovePassMarryChildren(e){let t=!0,i=this.columnModel.getColTree();return pt(null,i,o=>{if(!ke(o))return;let s=o,r=s.getColGroupDef();if(!(r&&r.marryChildren))return;let a=[];s.getLeafColumns().forEach(h=>{let g=e.indexOf(h);a.push(g)});let l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),d=l-c,u=s.getLeafColumns().length-1;d>u&&(t=!1)}),t}placeLockedColumns(e){let t=[],i=[],o=[];return e.forEach(r=>{let n=r.getColDef().lockPosition;n==="right"?o.push(r):n==="left"||n===!0?t.push(r):i.push(r)}),this.gos.get("enableRtl")?[...o,...i,...t]:[...t,...i,...o]}},nc=/[&<>"']/g,ac={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function qe(e,t){if(e==null)return null;let i=e.toString().toString();return t?i:i.replace(nc,o=>ac[o])}function lc(e){if(!e||e==null)return null;let t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}var cc=class extends b{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;let o=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,i){let o=t?t.getColGroupDef():null;return o?this.getHeaderName(o,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,o,s){let r=e.headerValueGetter;if(r){let n=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:o,location:s});return typeof r=="function"?r(n):typeof r=="string"?this.expressionService.evaluate(r,n):(S("headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return lc(e.field)}return""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;let i=e.getColDef().pivotValueColumn,o=M(i),s=null,r;if(o){let n=this.funcColsService.getValueColumns(),a=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&n.length===1,l=e.getColDef().pivotTotalColumnIds!==void 0;if(a&&!l)return t;s=i?i.getAggFunc():null,r=!0}else{let n=e.isValueActive(),a=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();n&&a?(s=e.getAggFunc(),r=!0):r=!1}if(r){let n=typeof s=="string"?s:"func";return`${this.localeService.getLocaleTextFunc()(n,n)}(${t})`}return t}},dc=class extends b{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){Ft(this.context,this.pivotResultCols?.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;let i=this.columnModel.getColDefCol(t),o=null;return this.pivotResultCols.list.forEach(s=>{let r=s.getColDef().pivotKeys,n=s.getColDef().pivotValueColumn;Pt(r,e)&&n===i&&(o=s)}),o}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){if(this.columnModel.isReady()&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);let i=this.columnFactory.createColumnTree(e,!1,this.pivotResultCols?.tree||this.previousPivotResultCols||void 0,t);Ft(this.context,this.pivotResultCols?.tree,i.columnTree);let o=i.columnTree,s=i.treeDept,r=Rs(o),n={};this.pivotResultCols={tree:o,treeDepth:s,list:r,map:n},this.pivotResultCols.list.forEach(l=>this.pivotResultCols.map[l.getId()]=l);let a=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!a)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){let t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;let o=s=>{s.forEach(r=>{if(M(r.children)){let a=r;i&&i(a),o(a.children)}else t&&t(r)})};e&&o(e)}},uc=class extends b{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,o){let s=[];e.forEach(r=>{let n=this.columnModel.getColDefCol(r.key)||this.columnModel.getCol(r.key);if(!n)return;if(s.push({width:r.newWidth,ratios:[1],columns:[n]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t){let l=this.visibleColsService.getColAfter(n);if(!l)return;let c=n.getActualWidth()-r.newWidth,d=l.getActualWidth()+c;s.push({width:d,ratios:[1],columns:[l]})}}),s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:i,source:o})}resizeColumnSets(e){let{resizeSets:t,finished:i,source:o}=e;if(!(!t||t.every(d=>this.checkMinAndMaxWidthsForSet(d)))){if(i){let d=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(d,i,o)}return}let r=[],n=[];t.forEach(d=>{let{width:u,columns:h,ratios:g}=d,f={},m={};h.forEach(w=>n.push(w));let p=!0,v=0;for(;p;){if(v++,v>1e3){Q("infinite loop in resizeColumnSets");break}p=!1;let w=[],C=0,R=u;h.forEach((T,x)=>{if(m[T.getId()])R-=f[T.getId()];else{w.push(T);let L=g[x];C+=L}});let P=1/C;w.forEach((T,x)=>{let A=x===w.length-1,L;A?L=R:(L=Math.round(g[x]*u*P),R-=L);let k=T.getMinWidth(),O=T.getMaxWidth();L<k?(L=k,m[T.getId()]=!0,p=!0):O>0&&L>O&&(L=O,m[T.getId()]=!0,p=!0),f[T.getId()]=L})}h.forEach(w=>{let C=f[w.getId()];w.getActualWidth()!==C&&(w.setActualWidth(C,o),r.push(w))})});let a=r.length>0,l=[];a&&(l=this.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}),this.visibleColsService.setLeftValues(o),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());let c=n.concat(l);(a||i)&&this.eventDispatcher.columnResized(c,i,o,l)}checkMinAndMaxWidthsForSet(e){let{columns:t,width:i}=e,o=0,s=0,r=!0;t.forEach(l=>{let c=l.getMinWidth();o+=c||0;let d=l.getMaxWidth();d>0?s+=d:r=!1});let n=i>=o,a=!r||i<=s;return n&&a}refreshFlexedColumns(e={}){let t=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let i=this.visibleColsService.getCenterCols(),o=-1;if(e.resizingCols){let h=new Set(e.resizingCols);for(let g=i.length-1;g>=0;g--)if(h.has(i[g])){o=g;break}}let s=0,r=[],n=0,a=0;for(let h=0;h<i.length;h++)i[h].getFlex()&&h>o?(r.push(i[h]),a+=i[h].getFlex(),n+=i[h].getMinWidth()):s+=i[h].getActualWidth();if(!r.length)return[];let l=[];s+n>this.flexViewportWidth&&(r.forEach(h=>h.setActualWidth(h.getMinWidth(),t)),l=r,r=[]);let c=[],d;e:for(;;){d=this.flexViewportWidth-s;let h=d/a;for(let g=0;g<r.length;g++){let f=r[g],m=h*f.getFlex(),p=0,v=f.getMinWidth(),w=f.getMaxWidth();if(m<v?p=v:m>w&&(p=w),p){f.setActualWidth(p,t),gn(r,f),a-=f.getFlex(),l.push(f),s+=f.getActualWidth();continue e}c[g]=Math.floor(m)}break}let u=d;return r.forEach((h,g)=>{let f=g<r.length-1?Math.min(c[g],u):Math.max(c[g],u);h.setActualWidth(f,t),l.push(h),u-=c[g]}),e.skipSetLeft||this.visibleColsService.setLeftValues(t),e.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),e.fireResizedEvent&&this.eventDispatcher.columnResized(l,!0,t,r),r}sizeColumnsToFit(e,t="sizeColumnsToFit",i,o){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,o));return}let s={};o&&o?.columnLimits?.forEach(({key:h,...g})=>{s[typeof h=="string"?h:h.getColId()]=g});let r=this.visibleColsService.getAllCols(),n=e===ct(r);if(e<=0||!r.length||n)return;let a=[],l=[];r.forEach(h=>{h.getColDef().suppressSizeToFit===!0?l.push(h):a.push(h)});let c=a.slice(0),d=!1,u=h=>{De(a,h),l.push(h)};for(a.forEach(h=>{h.resetActualWidth(t);let g=s?.[h.getId()],f=g?.minWidth??o?.defaultMinWidth,m=g?.maxWidth??o?.defaultMaxWidth,p=h.getActualWidth();typeof f=="number"&&p<f?h.setActualWidth(f,t,!0):typeof m=="number"&&p>m&&h.setActualWidth(m,t,!0)});!d;){d=!0;let h=e-ct(l);if(h<=0)a.forEach(g=>{let f=s?.[g.getId()]?.minWidth??o?.defaultMinWidth;if(typeof f=="number"){g.setActualWidth(f,t,!0);return}g.setMinimum(t)});else{let g=h/ct(a),f=h;for(let m=a.length-1;m>=0;m--){let p=a[m],v=s?.[p.getId()],w=v?.minWidth??o?.defaultMinWidth,C=v?.maxWidth??o?.defaultMaxWidth,R=p.getMinWidth(),P=p.getMaxWidth(),T=typeof w=="number"&&w>R?w:R,x=typeof C=="number"&&C<P?C:P,A=Math.round(p.getActualWidth()*g);A<T?(A=T,u(p),d=!1):A>x?(A=x,u(p),d=!1):m===0&&(A=f),p.setActualWidth(A,t,!0),f-=A}}}c.forEach(h=>{h.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),!i&&this.eventDispatcher.columnResized(c,!0,t)}applyAutosizeStrategy(){let e=this.gos.get("autoSizeStrategy");if(!e)return;let{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){let{columnLimits:i,defaultMinWidth:o,defaultMaxWidth:s}=e,r=i?.map(({colId:n,minWidth:a,maxWidth:l})=>({key:n,minWidth:a,maxWidth:l}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:o,defaultMaxWidth:s,columnLimits:r})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function wn(e,t){return e+"_"+t}function Se(e){return e instanceof yn}var yn=class extends b{constructor(e,t,i,o){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=o}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return wn(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{Se(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){let t=$(this.displayedChildren).getLeft();this.setLeft(t)}else{let e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){let e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{Et(t)?e.push(t):Se(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{Et(t)?e.push(t):Se(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(i=>{if(Se(i)&&(!i.displayedChildren||!i.displayedChildren.length))return;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},hc=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t=this.existingIds[e],i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}},gc=class extends b{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=Wo(this.treeLeft),this.columnsCenter=Wo(this.treeCenter),this.columnsRight=Wo(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(i=>i.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){let e=ct(this.columnsCenter),t=ct(this.columnsLeft),i=ct(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?$(this.columnsRight):null):(t=this.columnsLeft?$(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(o=>{o.setLastLeftPinned(o===t,e),o.setFirstRightPinned(o===i,e)})}buildTrees(){let e=this.columnModel.getColsToShow(),t=e.filter(r=>r.getPinned()=="left"),i=e.filter(r=>r.getPinned()=="right"),o=e.filter(r=>r.getPinned()!="left"&&r.getPinned()!="right"),s=new hc;this.treeLeft=this.createGroups({columns:t,idCreator:s,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:s,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:o,idCreator:s,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){let e=this.columnModel.getCols(),t=[],i=[],o=[];for(let s of e){let r=s.getPinned();r?r===!0||r==="left"?t.push(s):o.push(s):i.push(s)}this.ariaOrderColumns=t.concat(i).concat(o)}getAriaColIndex(e){let t;return Se(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{Se(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;let i=this.columnModel.getCols().slice(0),o=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(s=>{if(o){let r=ct(s);s.forEach(n=>{r-=n.getActualWidth(),n.setLeft(r,e)})}else{let r=0;s.forEach(n=>{n.setLeft(r,e),r+=n.getActualWidth()})}Vl(i,s)}),i.forEach(s=>{s.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,o){let s=[],r=null;for(let n=0;n<t.length;n++){let a=t[n],l=t.length-n,c=Math.min(a.getColSpan(e),l),d=[a];if(c>1){let h=c-1;for(let g=1;g<=h;g++)d.push(t[n+g]);n+=h}let u;i?(u=!1,d.forEach(h=>{i(h)&&(u=!0)})):u=!0,u&&(s.length===0&&r&&o&&o(a)&&s.push(r),s.push(a)),r=a}return s}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){let t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){let i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),s=t==="After"?$(o):o[0],r=`getCol${t}`;for(;;){let n=this[r](s);if(!n)return null;let a=this.getColGroupAtLevel(n,i);if(a!==e)return a}}getColGroupAtLevel(e,t){let i=e.getParent(),o,s;for(;o=i.getProvidedColumnGroup().getLevel(),s=i.getPaddingLevel(),!(o+s<=t);)i=i.getParent();return i}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};let e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Lt(this.treeCenter,!1,e),Lt(this.treeLeft,!1,e),Lt(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){let e=this.getAllTrees();Lt(e,!1,t=>{Se(t)&&t.calculateDisplayedColumns()})}getFirstColumn(){let e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){let o=this[t[i]]();if(o.length)return e?$(o):o[0]}return null}getColumnGroup(e,t){if(!e)return null;if(Se(e))return e;let i=this.getAllTrees(),o=typeof t=="number",s=null;return Lt(i,!1,r=>{if(Se(r)){let n=r,a;o?a=e===n.getGroupId()&&t===n.getPartId():a=e===n.getGroupId(),a&&(s=n)}}),s}getColAfter(e){let t=this.getAllCols(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return ct(this.columnsLeft)}getDisplayedColumnsRightWidth(){return ct(this.columnsRight)}isColAtEdge(e,t){let i=this.getAllCols();if(!i.length)return!1;let o=t==="first",s;if(Se(e)){let r=e.getDisplayedLeafColumns();if(!r.length)return!1;s=o?r[0]:$(r)}else s=e;return(o?i[0]:$(i))===s}createGroups(e){let{columns:t,idCreator:i,pinned:o,oldDisplayedGroups:s,isStandaloneStructure:r}=e,n=this.mapOldGroupsById(s),a=[],l=t;for(;l.length;){let c=l;l=[];let d=0,u=h=>{let g=d;d=h;let f=c[g],p=(Se(f)?f.getProvidedColumnGroup():f).getOriginalParent();if(p==null){for(let w=g;w<h;w++)a.push(c[w]);return}let v=this.createColGroup(p,i,n,o,r);for(let w=g;w<h;w++)v.addChild(c[w]);l.push(v)};for(let h=1;h<c.length;h++){let g=c[h],m=(Se(g)?g.getProvidedColumnGroup():g).getOriginalParent(),p=c[d],w=(Se(p)?p.getProvidedColumnGroup():p).getOriginalParent();m!==w&&u(h)}d<c.length&&u(c.length)}return r||this.setupParentsIntoCols(a,null),a}createColGroup(e,t,i,o,s){let r=e.getGroupId(),n=t.getInstanceIdForKey(r),a=wn(r,n),l=i[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),M(l)?l.reset():(l=new yn(e,r,n,o),s||this.createBean(l)),l}mapOldGroupsById(e){let t={},i=o=>{o.forEach(s=>{if(Se(s)){let r=s;t[s.getUniqueId()]=r,i(r.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.setParent(t),Se(i)){let o=i;this.setupParentsIntoCols(o.getChildren(),o)}})}};function Lt(e,t,i){if(e)for(let o=0;o<e.length;o++){let s=e[o];if(Se(s)){let r=t?s.getDisplayedChildren():s.getChildren();Lt(r,t,i)}i(s)}}function Wo(e){let t=[];return Lt(e,!0,i=>{Et(i)&&t.push(i)}),t}var bn=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],pc=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],fc=[...bn,...pc],mc={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},Fe=class{};Fe.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"];Fe.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"];Fe.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"];Fe.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"];Fe.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"];Fe.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"];Fe.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"];Fe.ALL_PROPERTIES=[...Fe.ARRAY_PROPERTIES,...Fe.OBJECT_PROPERTIES,...Fe.STRING_PROPERTIES,...Fe.NUMBER_PROPERTIES,...Fe.FUNCTION_PROPERTIES,...Fe.BOOLEAN_PROPERTIES,...Fe.OTHER_PROPERTIES];var Ti=Fe,_e=class{static getCallbackForEvent(t){return!t||t.length<2?t:"on"+t[0].toUpperCase()+t.substring(1)}};_e.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY";_e.PUBLIC_EVENTS=bn;_e.EVENT_CALLBACKS=fc.map(e=>_e.getCallbackForEvent(e));_e.BOOLEAN_PROPERTIES=Ti.BOOLEAN_PROPERTIES;_e.ALL_PROPERTIES=Ti.ALL_PROPERTIES;_e.ALL_PROPERTIES_AND_CALLBACKS=[..._e.ALL_PROPERTIES,..._e.EVENT_CALLBACKS];_e.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(_e.ALL_PROPERTIES_AND_CALLBACKS);var Ai=_e;function Sn(e,t){typeof e!="object"&&(e={});let i={...e};return Ai.ALL_PROPERTIES_AND_CALLBACKS.forEach(s=>{let r=t[s];typeof r<"u"&&r!==Ai.VUE_OMITTED_PROPERTY&&(i[s]=r)}),i}function Rn(e,t){if(!e)return;let i={},o=!1;if(Object.keys(e).filter(n=>Ai.ALL_PROPERTIES_AND_CALLBACKS_SET.has(n)).forEach(n=>{i[n]=e[n],o=!0}),!o)return;let s={type:"gridOptionsChanged",options:i};t.dispatchEvent(s);let r={type:"componentStateChanged"};We(i,(n,a)=>{r[n]=a}),t.dispatchEvent(r)}var Ye=class extends b{};function Oi(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var vt=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){let t=(e||"").split(" ");if(t.length>1){t.forEach(o=>this.addCssClass(o));return}if(this.cssClassStates[e]!==!0&&e.length){let o=this.getGui();o&&o.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){let t=(e||"").split(" ");if(t.length>1){t.forEach(o=>this.removeCssClass(o));return}if(this.cssClassStates[e]!==!1&&e.length){let o=this.getGui();o&&o.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){let t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){let o=(e||"").split(" ");if(o.length>1){o.forEach(s=>this.addOrRemoveCssClass(s,t));return}}if(this.cssClassStates[e]!==t&&e.length){let o=this.getGui();o&&o.classList.toggle(e,t),this.cssClassStates[e]=t}}};function Ct(e,t,i){i==null||typeof i=="string"&&i==""?Fn(e,t):nt(e,t,i)}function nt(e,t,i){e.setAttribute(xn(t),i.toString())}function Fn(e,t){e.removeAttribute(xn(t))}function xn(e){return`aria-${e}`}function Xe(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function vc(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Cc(e){return e.getAttribute("aria-label")}function si(e,t){Ct(e,"label",t)}function ki(e,t){Ct(e,"labelledby",t)}function Dn(e,t){Ct(e,"live",t)}function wc(e,t){Ct(e,"atomic",t)}function yc(e,t){Ct(e,"relevant",t)}function bc(e,t){Ct(e,"disabled",t)}function En(e,t){Ct(e,"hidden",t)}function no(e,t){nt(e,"expanded",t)}function Sc(e,t){nt(e,"setsize",t)}function Rc(e,t){nt(e,"posinset",t)}function Mn(e,t){nt(e,"rowcount",t)}function Fc(e,t){nt(e,"rowindex",t)}function Pn(e,t){nt(e,"colcount",t)}function Tn(e,t){nt(e,"colindex",t)}function xc(e,t){nt(e,"colspan",t)}function An(e,t){nt(e,"sort",t)}function kn(e){Fn(e,"sort")}function ao(e,t){Ct(e,"selected",t)}function Dc(e,t){Ct(e,"controls",t.id),ki(t,e.id)}function Es(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Ec="[tabindex], input, select, button, textarea, [href]",In="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ms(e){let t=Element.prototype.matches||Element.prototype.msMatchesSelector,o=t.call(e,"input, select, button, textarea"),s=t.call(e,In),r=rt(e);return o&&!s&&r}function pe(e,t,i={}){let{skipAriaHidden:o}=i;e.classList.toggle("ag-hidden",!t),o||En(e,!t)}function Mc(e,t,i={}){let{skipAriaHidden:o}=i;e.classList.toggle("ag-invisible",!t),o||En(e,!t)}function Ii(e,t){let i="disabled",o=t?s=>s.setAttribute(i,""):s=>s.removeAttribute(i);o(e),Nn(e.querySelectorAll("input"),s=>o(s))}function ei(e,t,i){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++o>i)break}else if(e===i)break}return!1}function _t(e){let{height:t,width:i,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:n,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:g,marginLeft:f,boxSizing:m}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(o||"0"),borderRightWidth:parseFloat(s||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(n||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(f||"0"),boxSizing:m}}function Ps(e){let t=_t(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Gi(e){let t=_t(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function Ln(e){let{height:t,marginBottom:i,marginTop:o}=_t(e);return Math.floor(t+i+o)}function lo(e){let{width:t,marginLeft:i,marginRight:o}=_t(e);return Math.floor(t+i+o)}function On(e){let t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=_t(e);return{top:t.top+(i||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function co(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function uo(e,t,i){i&&(t*=-1),e.scrollLeft=t}function Be(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function Mt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Gn(e){return!!e.offsetParent}function rt(e){let t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!Gn(e)||window.getComputedStyle(e).visibility!=="visible")}function Li(e){let t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Pc(e){return e.clientWidth<e.scrollWidth}function Tc(e){return e.clientHeight<e.scrollHeight}function ho(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Je(e,t)}function Je(e,t){t=Ts(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function Si(e,t){t=Ts(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function Ts(e){return typeof e=="number"?`${e}px`:e}function As(e){return e instanceof Node||e instanceof HTMLElement}function Ac(e){if(e==null)return[];let t=[];return Nn(e,i=>t.push(i)),t}function kc(e,t){if(e)for(let i=0;i<e.length;i++){let o=e[i];t(o.name,o.value)}}function je(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function Nn(e,t){if(e!=null)for(let i=0;i<e.length;i++)t(e[i])}var ks=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){let e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},Uo,_i,_o,jo,Ko,Yo,as,ls,$o;function ft(){return Uo===void 0&&(Uo=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Uo}function Hn(){if(_i===void 0)if(ft()){let e=navigator.userAgent.match(/version\/(\d+)/i);e&&(_i=e[1]!=null?parseFloat(e[1]):0)}else _i=0;return _i}function Ic(){if(_o===void 0){let e=window;_o=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return _o}function Is(){return jo===void 0&&(jo=/(firefox)/i.test(navigator.userAgent)),jo}function zn(){return Ko===void 0&&(Ko=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Ko}function Tt(){return Yo===void 0&&(Yo=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Yo}function Br(){return!ft()||Hn()>=15}function cs(e){if(!e)return null;let t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!Is())?null:t.toString()}function Lc(){if($o!==void 0)return $o;if(!document.body)return-1;let e=1e6,t=Is()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){let o=e*2;if(i.style.height=o+"px",o>t||i.clientHeight!==o)break;e=o}return document.body.removeChild(i),$o=e,e}function Oc(){return document.body?.clientWidth??(window.innerHeight||document.documentElement?.clientWidth||-1)}function Gc(){return document.body?.clientHeight??(window.innerHeight||document.documentElement?.clientHeight||-1)}function Nc(){return ls==null&&Bn(),ls}function Bn(){let e=document.body,t=document.createElement("div");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);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(ls=i,as=i===0)}function Vn(){return as==null&&Bn(),as}var Hc=1e3,zc=1e3,Vr=100,Wn=class At extends b{constructor(t,i,o,s){super(),this.parentComp=t,this.tooltipShowDelayOverride=i,this.tooltipHideDelayOverride=o,this.shouldDisplayTooltip=s,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(t){this.popupService=t.popupService,this.userComponentFactory=t.userComponentFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");let t=this.parentComp.getGui();this.tooltipTrigger===0&&this.addManagedListeners(t,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(t,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(t,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(t,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(t){let i=this.gos.get(t);return i<0&&S(`${t} should not be lower than 0`),Math.max(200,i)}getTooltipDelay(t){return t==="show"?this.tooltipShowDelayOverride??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipHideDelayOverride??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let t=this.gos.get("tooltipTrigger");return!t||t==="hover"?0:1}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Tt()&&(At.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},Vr):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(t){let i=t.relatedTarget,o=this.parentComp.getGui(),s=this.tooltipComp?.getGui();this.isInteractingWithTooltip||o.contains(i)||this.interactionEnabled&&s?.contains(i)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(t){if(this.state!=0||At.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){let t=new Date().getTime(),i=At.lastTooltipHideTime;return t-i<Hc}setToDoNothing(t){!t&&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}showTooltip(){let t={...this.parentComp.getTooltipParams()};if(!M(t.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip()){this.setToDoNothing();return}this.state=2,this.tooltipInstanceCount++;let i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(t).newAgStackInstance().then(i)}hideTooltip(t){!t&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),At.lastTooltipHideTime=new Date().getTime()),this.eventService.dispatchEvent({type:"tooltipHide",parentGui:this.parentComp.getGui()}),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(t,i){if(this.state!==2||this.tooltipInstanceCount!==t){this.destroyBean(i);return}let s=i.getGui();this.tooltipComp=i,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");let r=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({eChild:s,ariaLabel:r("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){let a=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:a,columnMoved:a})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(s,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(ve(this.gos),{keydown:a=>{s.contains(a?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(s,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:s,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){let t=this.tooltipComp?.getGui(),i=fe(this.gos);return!!t&&t.contains(i)}onTooltipFocusOut(t){let i=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,i.contains(t.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){let t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent({...t,mouseEvent:this.lastMouseEvent}):this.popupService.positionPopupByComponent({...t,eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let t=this.tooltipPopupDestroyFunc,i=this.tooltipComp,o=this.tooltipTrigger===0?zc:0;window.setTimeout(()=>{t(),this.destroyBean(i)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(t=>{t&&t()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){At.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Vr)}unlockService(){At.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};Wn.isLocked=!1;var Bc=Wn,ai=class extends b{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}wireBeans(e){this.beans=e}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){let t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){if(this.tooltipManager!=null)return;let e={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new Bc(e,this.ctrl.getTooltipShowDelayOverride?.(),this.ctrl.getTooltipHideDelayOverride?.(),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){let e=this.ctrl,t=e.getColumn?.(),i=e.getColDef?.(),o=e.getRowNode?.();return{location:e.getLocation(),colDef:i,column:t,rowIndex:e.getRowIndex?.(),node:o,data:o?.data,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?.(),hideTooltipCallback:()=>this.tooltipManager?.hideTooltip(!0)}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},Vc=new ks,z=null,ce=class Un extends b{constructor(t,i){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Vc.next(),this.cssClassManager=new vt(()=>this.eGui),this.componentSelectors=new Map((i??[]).map(o=>[o.selector,o])),t&&this.setTemplate(t)}preWireBeans(t){super.preWireBeans(t)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(t,i){t&&this.gos&&(this.applyElementsToComponent(t),this.createChildComponentsFromTags(t,i))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(t){let{newTooltipText:i,showDelayOverride:o,hideDelayOverride:s,location:r,shouldDisplayTooltip:n}=t||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==i&&(this.tooltipText=i);let a=()=>this.tooltipText;i!=null&&(this.tooltipFeature=this.createBean(new ai({getTooltipValue:a,getGui:()=>this.getGui(),getLocation:()=>r??"UNKNOWN",getColDef:t?.getColDef,getColumn:t?.getColumn,getTooltipShowDelayOverride:o!=null?()=>o:void 0,getTooltipHideDelayOverride:s!=null?()=>s:void 0,shouldDisplayTooltip:n})))}getDataRefAttribute(t){return t.getAttribute?t.getAttribute("data-ref"):null}applyElementsToComponent(t,i,o,s=null){if(i===void 0&&(i=this.getDataRefAttribute(t)),i){let r=this[i];if(r===z)this[i]=s??t;else{let n=o&&o[i];!this.suppressDataRefValidation&&!n&&S(`Issue with data-ref: ${i} on ${this.constructor.name} with ${r}`)}}}createChildComponentsFromTags(t,i){Ac(t.childNodes).forEach(s=>{if(!(s instanceof HTMLElement))return;let r=this.createComponentFromElement(s,n=>{n.getGui()&&this.copyAttributesFromNode(s,n.getGui())},i);if(r){if(r.addItems&&s.children.length){this.createChildComponentsFromTags(s,i);let n=Array.prototype.slice.call(s.children);r.addItems(n)}this.swapComponentForNode(r,t,s)}else s.childNodes&&this.createChildComponentsFromTags(s,i)})}createComponentFromElement(t,i,o){let s=t.nodeName,r=this.getDataRefAttribute(t),n=s.indexOf("AG-")===0,a=n?this.componentSelectors.get(s):null,l=null;if(a){Un.elementGettingCreated=t;let c=o&&r?o[r]:void 0;l=new a.component(c),l.setParentComponent(this),this.createBean(l,null,i)}else n&&S(`Missing selector: ${s}`);return this.applyElementsToComponent(t,r,o,l),l}copyAttributesFromNode(t,i){kc(t.attributes,(o,s)=>i.setAttribute(o,s))}swapComponentForNode(t,i,o){let s=t.getGui();i.replaceChild(s,o),i.insertBefore(document.createComment(o.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,t))}activateTabIndex(t){let i=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui()),t.forEach(o=>o.setAttribute("tabindex",i.toString()))}setTemplate(t,i,o){let s=Li(t);this.setTemplateFromElement(s,i,o)}setTemplateFromElement(t,i,o,s=!1){if(this.eGui=t,this.suppressDataRefValidation=s,i)for(let r=0;r<i.length;r++){let n=i[r];this.componentSelectors.set(n.selector,n)}this.wireTemplate(t,o)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(t){this.parentComponent=t}getParentComponent(){return this.parentComponent}setGui(t){this.eGui=t}queryForHtmlElement(t){return this.eGui.querySelector(t)}getContainerAndElement(t,i){let o=i;return t==null?null:(o||(o=this.eGui),As(t)?{element:t,parent:o}:{element:t.getGui(),parent:o})}prependChild(t,i){let{element:o,parent:s}=this.getContainerAndElement(t,i)||{};!o||!s||s.insertAdjacentElement("afterbegin",o)}appendChild(t,i){let{element:o,parent:s}=this.getContainerAndElement(t,i)||{};!o||!s||s.appendChild(o)}isDisplayed(){return this.displayed}setVisible(t,i={}){if(t!==this.visible){this.visible=t;let{skipAriaHidden:o}=i;Mc(this.eGui,t,{skipAriaHidden:o})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;let{skipAriaHidden:o}=i;pe(this.eGui,t,{skipAriaHidden:o});let s={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(s)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}addGuiEventListener(t,i,o){this.eGui.addEventListener(t,i,o),this.addDestroyFunc(()=>this.eGui.removeEventListener(t,i))}addCssClass(t){this.cssClassManager.addCssClass(t)}removeCssClass(t){this.cssClassManager.removeCssClass(t)}containsCssClass(t){return this.cssClassManager.containsCssClass(t)}addOrRemoveCssClass(t,i){this.cssClassManager.addOrRemoveCssClass(t,i)}},_n={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},Wc=(()=>{let e=new Set(Object.values(_n));return e.add("eye"),e})();function Uc(e,t,i){let o=ze(e,t,i);if(o){let{className:r}=o;if(typeof r=="string"&&r.indexOf("ag-icon")>-1||typeof r=="object"&&r["ag-icon"])return o}let s=document.createElement("span");return s.appendChild(o),s}function ze(e,t,i,o){let s=null,r=i&&i.getColDef().icons;if(r&&(s=r[e]),t&&!s){let n=t.get("icons");n&&(s=n[e])}if(s){let n;if(typeof s=="function")n=s();else if(typeof s=="string")n=s;else throw new Error("icon from grid options needs to be a string or a function");if(typeof n=="string")return Li(n);if(As(n))return n;S("iconRenderer should return back a string or a dom object")}else{let n=document.createElement("span"),a=_n[e]??(Wc.has(e)?e:void 0);return a||(o?a=e:(S(`Did not find icon ${e}`),a="")),n.setAttribute("class",`ag-icon ag-icon-${a}`),n.setAttribute("unselectable","on"),Xe(n,"presentation"),n}}var _c=class extends ce{constructor(){super(...arguments),this.dragSource=null,this.eIcon=z,this.eLabel=z}postConstruct(){let e=t=>Uc(t,this.gos,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`<div class="ag-dnd-ghost ag-unselectable">
1
+ import{a as Er,b as No}from"./chunk-767BAQ53.js";import{a as Rr}from"./chunk-VMT7JFAM.js";import{a as Dr}from"./chunk-PJA7YP4A.js";import{b as vr,e as Io}from"./chunk-XOQ3KDSR.js";import{b as Ui}from"./chunk-62UWGWON.js";import"./chunk-I6ICVKEC.js";import"./chunk-ORXEMIQC.js";import{a as Fr,b as xr}from"./chunk-FBJURT7Z.js";import"./chunk-EGEB6N4J.js";import{f as Lo}from"./chunk-AL3TN2KI.js";import{$ as fr,Ac as wr,Ha as I,Lc as yr,Mc as br,Nc as Go,Tc as Sr,V as gr,W as pr,Y as To,_a as Oo,a as E,c as ue,d as Le,e as D,ea as wt,f as qt,g as N,ga as Ao,h as W,i as se,j as Dl,l as re,m as Jt,q as Wi,ra as yt,sa as ko,ta as pi,v as F,va as mr,vb as Cr,y as ne}from"./chunk-NZHF733K.js";import{b as dr,e as ur,j as hr}from"./chunk-KUCVLANF.js";import"./chunk-DTMZLUNY.js";import"./chunk-PVAE643M.js";var ri=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){let o=t?this.allAsyncListeners:this.allSyncListeners,s=o.get(e);return!s&&i&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){let o=this.getListeners(e,i,!1);o&&(o.delete(t),o.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){let t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){let i=e.type;if(t&&"event"in e){let a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}let o=(a,l)=>a.forEach(c=>{if(!l.has(c))return;let d=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>c(e)):()=>c(e);t?this.dispatchAsync(d):d()}),s=this.getListeners(i,t,!1)??new Set,r=new Set(s);r.size>0&&o(r,s),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{let l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(i,e)):()=>a(i,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}},ni=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(ni||{}),Mr={};function Cs(e,t){Mr[t]||(e(),Mr[t]=!0)}function ot(e,...t){console.log("AG Grid: "+e,...t)}function S(e,...t){Cs(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function Q(e,...t){Cs(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}function ws(e){return!!(e&&e.constructor&&e.call&&e.apply)}function El(e){Ml(e,400)}var Ho=[],zo=!1;function Pr(e){Ho.push(e),!zo&&(zo=!0,window.setTimeout(()=>{let t=Ho.slice();Ho.length=0,zo=!1,t.forEach(i=>i())},0))}function Ml(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(i=>i()),t)}function xe(e,t){let i;return function(...o){let s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(s,o)},t)}}function Tr(e,t){let i=0;return function(...o){let s=this,r=new Date().getTime();r-i<t||(i=r,e.apply(s,o))}}function Pl(e,t,i=100,o){let s=new Date().getTime(),r=null,n=!1,a=()=>{let l=new Date().getTime()-s>i;(e()||l)&&(t(),n=!0,r!=null&&(window.clearInterval(r),r=null),l&&o&&S(o))};a(),n||(r=window.setInterval(a,10))}function dt(e){return e==null||e===""?null:e}function M(e,t=!1){return e!=null&&(e!==""||t)}function K(e){return!M(e)}function Ee(e){return e==null||e.length===0}function Zo(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Nt(e){if(e===void 0)return;if(e===null||e==="")return null;if(typeof e=="number")return isNaN(e)?void 0:e;let t=parseInt(e,10);return isNaN(t)?void 0:t}function es(e){if(e!==void 0)return e===null||e===""?!1:ts(e)}function ts(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1}function to(e,t){let i=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return i===o}function Tl(e,t,i=!1){let o=e==null,s=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function r(n,a){return n>a?1:n<a?-1:0}if(typeof e!="string"||!i)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}function Ji(e){if(e instanceof Set||e instanceof Map){let t=[];return e.forEach(i=>t.push(i)),t}return Object.values(e)}function nn(e,t){return e.get("rowModelType")===t}function de(e){return nn(e,"clientSide")}function mt(e){return nn(e,"serverSide")}function Re(e,t){return e.get("domLayout")===t}function io(e){return ro(e)!==void 0}function oo(e){return!e.get("suppressAsyncEvents")}function an(e){return typeof e.get("getRowHeight")=="function"}function Al(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function ht(e,t,i=!1,o){if(o==null&&(o=e.environment.getDefaultRowHeight()),an(e)){if(i)return{height:o,estimated:!0};let n={node:t,data:t.data},a=e.getCallback("getRowHeight")(n);if(is(a))return a===0&&S("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,a),estimated:!1}}if(t.detail&&e.get("masterDetail"))return kl(e);let s=e.get("rowHeight");return{height:s&&is(s)?s:o,estimated:!1}}function kl(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};let t=e.get("detailRowHeight");return is(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function fo(e){let{environment:t}=e,i=e.get("rowHeight");if(!i||K(i))return t.getDefaultRowHeight();let o=t.refreshRowHeightVariable();return o!==-1?o:(S("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function is(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function Di(e,t,i){let o=t[e.getDomDataKey()];return o?o[i]:void 0}function Vt(e,t,i,o){let s=e.getDomDataKey(),r=t[s];K(r)&&(r={},t[s]=r),r[i]=o}function ve(e){let t=null,i=e.get("getDocument");return i&&M(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&M(t)?t:document}function ln(e){return ve(e).defaultView||window}function Ei(e){return e.eGridDiv.getRootNode()}function fe(e){return Ei(e).activeElement}function cn(e){let t=ve(e),i=fe(e);return i===null||i===t.body}function Wt(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function mo(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Re(e,"print"))}function Qe(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function os(e){let t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function vo(e){let t=e.get("grandTotalRow");if(t)return t;if(e.get("groupIncludeTotalFooter"))return"bottom"}function Co(e){let t=e.get("groupTotalRow");if(typeof t=="function")return e.getCallback("groupTotalRow");if(t)return()=>t;let i=e.get("groupIncludeFooter");if(typeof i=="function"){let o=e.getCallback("groupIncludeFooter");return s=>o(s)?"bottom":void 0}return()=>i?"bottom":void 0}function dn(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function ys(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Ut(e){let t=e.getCallback("getRowId");return t===void 0?t:i=>{let o=t(i);return typeof o!="string"&&(S("The getRowId callback must return a string. The ID ",o," is being cast to a string."),o=String(o)),o}}function ii(e){return e?.checkboxes??!0}function so(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Il(e){return e?.hideDisabledCheckboxes??!1}function Ll(e){return typeof e.get("rowSelection")!="string"}function Ol(e){return e.get("cellSelection")!==void 0}function Gl(e){let t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t?.suppressMultiRanges??!1:!1:e.get("suppressMultiRangeSelection")}function gt(e){let t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Nl(e){let t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t.handle?.mode==="range":!1:e.get("enableRangeHandle")}function Ar(e){let t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t.handle?.mode==="fill":!1:e.get("enableFillHandle")}function un(e){let t=e.get("rowSelection")??"single";if(typeof t=="string"){let i=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return i&&o?!1:i?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Hl(e){let t=un(e);return t===!0||t==="enableSelection"}function kr(e){let t=un(e);return t===!0||t==="enableDeselection"}function bs(e){let t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function ro(e){let t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return t?.mode}function hn(e){return ro(e)==="multiRow"}function zl(e){let t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Ss(e){let t=e.get("rowSelection");if(typeof t=="string"){let i=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return i&&o?"filteredDescendants":i?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Dt(e){let t=Ss(e);return t==="descendants"||t==="filteredDescendants"}function Bo(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function $(e){if(!(!e||!e.length))return e[e.length-1]}function Pt(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((o,s)=>i?i(o,t[s]):t[s]===o)}function Bl(e){return e.sort((t,i)=>t-i)}function gn(e,t){let i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function De(e,t){let i=e.indexOf(t);i>=0&&e.splice(i,1)}function Vl(e,t){for(let i=0;i<t.length;i++)gn(e,t[i])}function Wl(e,t){for(let i=0;i<t.length;i++)De(e,t[i])}function Mi(e,t,i){e.splice(i,0,t)}function pn(e,t,i){Wl(e,t),t.slice().reverse().forEach(o=>Mi(e,o,i))}function Ht(e,t){return e.indexOf(t)>-1}function Ul(e){return e?.flatMap(t=>t)??[]}function Ir(e,t){t==null||e==null||t.forEach(i=>e.push(i))}var fn="__ag_Grid_Stop_Propagation",_l=["touchstart","touchend","touchmove","touchcancel","scroll"],Vo={};function oi(e){e[fn]=!0}function ut(e){return e[fn]===!0}var mn=(()=>{let e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof Vo[i]=="boolean")return Vo[i];let o=document.createElement(e[i]||"div");return i="on"+i,Vo[i]=i in o}})();function ss(e,t,i){let o=t;for(;o;){let s=Di(e,o,i);if(s)return s;o=o.parentElement}return null}function jl(e,t){return!t||!e?!1:Yl(t).indexOf(e)>=0}function Kl(e){let t=[],i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function Yl(e){let t=e;return t.path?t.path:t.composedPath?t.composedPath():Kl(t)}function $l(e,t,i,o){let r=Ht(_l,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,o,r)}var b=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new ri),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService&&this.localEventService.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){let i=[];for(let o in t){let s=t[o];s&&i.push(this._setupListener(e,o,s))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?$l(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);let o=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);let i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let i=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=s.changeSet.id}let r={type:"gridPropertyChanged",changeSet:s.changeSet,source:s.source};t(r)};e.forEach(s=>this.setupGridOptionListener(s,o))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){let i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function ke(e){return e instanceof Xi}var Xi=class extends b{constructor(e,t,i,o){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=Cn(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=o}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{Et(t)?e.push(t):ke(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1,o=this.findChildrenRemovingPadding();for(let r=0,n=o.length;r<n;r++){let a=o[r];if(!a.isVisible())continue;let l=a.getColumnGroupShow();l==="open"?(e=!0,i=!0):l==="closed"?(t=!0,i=!0):(e=!0,t=!0)}let s=e&&t&&i;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){let e=[],t=i=>{i.forEach(o=>{ke(o)&&o.isPadding()?t(o.children):e.push(o)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},vn="ag-Grid-ControlsColumn",Ql=class extends b{constructor(){super(...arguments),this.beanName="controlsColService"}isControlsColEnabled(){let{gos:e}=this,t=e.get("rowSelection");if(!t||typeof t!="object")return!1;let i=ii(t),o=so(t);return!!(i||o)}createControlsCols(){if(!this.isControlsColEnabled())return[];let{gos:e}=this,t=e.get("selectionColumnDef"),o={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(r,n,a,l){let c=a.isSelected(),d=l.isSelected();return c&&d?0:c?1:-1},editable:!1,suppressFillHandle:!0,...t,colId:`${vn}`},s=new Ds(o,null,o.colId,!1);return this.createBean(s),[s]}},wo="ag-Grid-AutoColumn";function Rs(e){let t=[],i=o=>{for(let s=0;s<o.length;s++){let r=o[s];Et(r)?t.push(r):ke(r)&&i(r.getChildren())}};return i(e),t}function ct(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function Ft(e,t,i){let o={};if(!t)return;pt(null,t,r=>{o[r.getInstanceId()]=r}),i&&pt(null,i,r=>{o[r.getInstanceId()]=null});let s=Object.values(o).filter(r=>r!=null);e.destroyBeans(s)}function Lr(e){return e.getId().startsWith(wo)}function Pi(e){return e.getColId().startsWith(vn)}function Zi(e){let t=[];return e instanceof Array?e.some(o=>typeof o!="string")?S("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):S("colDef.type should be of type 'string' | 'string[]'"),t}var Fs=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e,t){let{frameworkOverrides:i,wrappedListeners:o}=this,s=t;if(i.shouldWrapOutgoing){s=n=>{i.wrapOutgoing(()=>t(n))};let r=o.get(e);r||(r=new Map,o.set(e,r)),r.set(t,s)}return s}wrapGlobal(e){let{frameworkOverrides:t,wrappedGlobalListeners:i}=this,o=e;return t.shouldWrapOutgoing&&(o=(s,r)=>{t.wrapOutgoing(()=>e(s,r))},i.set(e,o)),o}unwrap(e,t){let{wrappedListeners:i}=this,o=i.get(e);if(o){let s=o.get(t);if(s)return o.delete(t),o.size===0&&i.delete(e),s}return t}unwrapGlobal(e){let{wrappedGlobalListeners:t}=this,i=t.get(e);return i?(t.delete(e),i):e}},yo=new Set(["__proto__","constructor","prototype"]);function We(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(let[i,o]of Object.entries(e))yo.has(i)||t(i,o)}}function xs(e){let t={},i=Object.keys(e);for(let o=0;o<i.length;o++){if(yo.has(i[o]))continue;let s=i[o],r=e[s];t[s]=r}return t}function rs(e,t){if(!e)return;let i=e,o={};return Object.keys(i).forEach(s=>{if(t&&t.indexOf(s)>=0||yo.has(s))return;let r=i[s];ns(r)&&r.constructor===Object?o[s]=rs(r):o[s]=r}),o}function Or(e){if(!e)return[];let t=Object;if(typeof t.values=="function")return t.values(e);let i=[];for(let o in e)e.hasOwnProperty(o)&&e.propertyIsEnumerable(o)&&i.push(e[o]);return i}function Ie(e,t,i=!0,o=!1){M(t)&&We(t,(s,r)=>{if(yo.has(s))return;let n=e[s];n!==r&&(o&&n==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(n={},e[s]=n),ns(r)&&ns(n)&&!Array.isArray(n)?Ie(n,r,i,o):(i||r!==void 0)&&(e[s]=r))})}function bi(e,t,i){if(!t||!e)return;if(!i)return e[t];let o=t.split("."),s=e;for(let r=0;r<o.length;r++){if(s==null)return;s=s[o[r]]}return s}function ns(e){return typeof e=="object"&&e!==null}var ql={resizable:!0,sortable:!0},Jl=0;function Cn(){return Jl++}function Et(e){return e instanceof Ds}var Ds=class extends b{constructor(e,t,i,o){super(),this.isColumn=!0,this.instanceId=Cn(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new ri,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=o,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){e.sort!==void 0?(e.sort==="asc"||e.sort==="desc")&&(this.sort=e.sort):(e.initialSort==="asc"||e.initialSort==="desc")&&(this.sort=e.initialSort);let t=e.sortIndex,i=e.initialSortIndex;t!==void 0?t!==null&&(this.sortIndex=t):i!==null&&(this.sortIndex=i);let o=e.hide,s=e.initialHide;o!==void 0?this.visible=!o:this.visible=!s,e.pinned!==void 0?this.setPinned(e.pinned):this.setPinned(e.initialPinned);let r=e.flex,n=e.initialFlex;r!==void 0?this.flex=r:n!==void 0&&(this.flex=n)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){let e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=M(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=M(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){let e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=M(this.colDef.tooltipField)||M(this.colDef.tooltipValueGetter)||M(this.colDef.tooltipComponent)}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t,i=Nt(e.width),o=Nt(e.initialWidth);return i!=null?t=i:o!=null?t=o:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(K(this.colDef)||K(this.colDef.showRowGroup))return!1;let t=this.colDef.showRowGroup===!0,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Fs(this.frameworkOverrides));let i=this.frameworkEventListenerService?.wrap(e,t)??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){let i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){let t=this.createColumnFunctionCallbackParams(e),i=this.colDef.suppressNavigable;return i(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){let t=this.gos.get("rowSelection");if(t&&typeof t!="string"){let i=Pi(this)&&ii(t);return this.isColumnFunc(e,i)}else return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??ql[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){let i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return K(this.sort)}isSorting(){return M(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));let o=this.createColumnEvent("filterChanged",t);i&&Ie(o,i),this.columnEventService.dispatchEvent(o)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){e===!0||e==="left"?this.pinned="left":e==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){let i=e===!0;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};let t=e.getPaddingLevel()+1,i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(K(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(K(this.colDef.rowSpan))return 1;let t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){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")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},Xl={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},Zl=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Zo(e);let i=0;for(;;){let o;if(e?(o=e,i!==0&&(o+="_"+i)):t?(o=t,i!==0&&(o+="_"+i)):o=i,!this.existingKeys[o])return this.existingKeys[o]=!0,String(o);i++}}},ec=class extends b{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(e){this.dataTypeService=e.dataTypeService}createColumnTree(e,t,i,o){let s=new Zl,{existingCols:r,existingGroups:n,existingColKeys:a}=this.extractExistingTreeData(i);s.addExistingKeys(a);let l=this.recursivelyCreateColumns(e,0,t,r,s,n,o),c=this.findMaxDept(l,0),d=this.balanceColumnTree(l,0,c,s);return pt(null,d,(h,g)=>{ke(h)&&h.setupExpandable(),h.setOriginalParent(g)}),{columnTree:d,treeDept:c}}extractExistingTreeData(e){let t=[],i=[],o=[];return e&&pt(null,e,s=>{if(ke(s)){let r=s;i.push(r)}else{let r=s;o.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:i,existingColKeys:o}}balanceTreeForAutoCols(e,t){let i=[],o=this.findDepth(t);return e.forEach(s=>{let r=s;for(let n=o-1;n>=0;n--){let a=new Xi(null,`FAKE_PATH_${s.getId()}}_${n}`,!0,n);this.createBean(a),a.setChildren([r]),r.setOriginalParent(a),r=a}o===0&&s.setOriginalParent(null),i.push(r)}),[i,o]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&ke(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,o){let s=[];for(let r=0;r<e.length;r++){let n=e[r];if(ke(n)){let a=n,l=this.balanceColumnTree(a.getChildren(),t+1,i,o);a.setChildren(l),s.push(a)}else{let a,l;for(let c=i-1;c>=t;c--){let d=o.getUniqueKey(null,null),u=this.createMergedColGroupDef(null),h=new Xi(u,d,!0,t);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(s.push(a),e.some(d=>ke(d))){l.setChildren([n]);continue}else{l.setChildren(e);break}s.push(n)}}return s}findMaxDept(e,t){let i=t;for(let o=0;o<e.length;o++){let s=e[o];if(ke(s)){let r=s,n=this.findMaxDept(r.getChildren(),t+1);i<n&&(i=n)}}return i}recursivelyCreateColumns(e,t,i,o,s,r,n){if(!e)return[];let a=new Array(e.length);for(let l=0;l<a.length;l++){let c=e[l];this.isColumnGroup(c)?a[l]=this.createColumnGroup(i,c,t,o,s,r,n):a[l]=this.createColumn(i,c,o,s,n)}return a}createColumnGroup(e,t,i,o,s,r,n){let a=this.createMergedColGroupDef(t),l=s.getUniqueKey(a.groupId||null,null),c=new Xi(a,l,!1,i);this.createBean(c);let d=this.findExistingGroup(t,r);d&&r.splice(d.idx,1);let u=d?.group;u&&c.setExpanded(u.isExpanded());let h=this.recursivelyCreateColumns(a.children,i+1,e,o,s,r,n);return c.setChildren(h),c}createMergedColGroupDef(e){let t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,o,s){let r=this.findExistingColumn(t,i);r&&i?.splice(r.idx,1);let n=r?.column;if(n){let a=this.addColumnDefaultAndTypes(t,n.getColId());n.setColDef(a,t,s),this.applyColumnState(n,a,s)}else{let a=o.getUniqueKey(t.colId,t.field),l=this.addColumnDefaultAndTypes(t,a);n=new Ds(l,t,a,e),this.createBean(n)}return this.dataTypeService?.addColumnListeners(n),n}applyColumnState(e,t,i){let o=Nt(t.flex);if(o!==void 0&&e.setFlex(o),e.getFlex()<=0){let a=Nt(t.width);if(a!=null)e.setActualWidth(a,i);else{let l=e.getActualWidth();e.setActualWidth(l,i)}}t.sort!==void 0&&(t.sort=="asc"||t.sort=="desc"?e.setSort(t.sort,i):e.setSort(void 0,i));let r=Nt(t.sortIndex);r!==void 0&&e.setSortIndex(r);let n=es(t.hide);n!==void 0&&e.setVisible(!n,i),t.pinned!==void 0&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){let o=t[i].getUserProvidedColDef();if(!o)continue;if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(o.field===e.field)return{idx:i,column:t[i]};continue}if(o===e)return{idx:i,column:t[i]}}}findExistingGroup(e,t){if(e.groupId!=null)for(let o=0;o<t.length;o++){let s=t[o];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:o,group:s}}}addColumnDefaultAndTypes(e,t){let i={},o=this.gos.get("defaultColDef");Ie(i,o,!1,!0);let s=this.updateColDefAndGetColumnType(i,e,t);s&&this.assignColumnTypes(s,i),Ie(i,e,!1,!0);let r=this.gos.get("autoGroupColumnDef"),n=Qe(this.gos);return e.rowGroup&&r&&n&&Ie(i,{sort:r.sort,initialSort:r.initialSort},!1,!0),this.dataTypeService?.validateColDef(i),i}updateColDefAndGetColumnType(e,t,i){let o=this.dataTypeService?.updateColDefAndGetColumnType(e,t,i),s=t.type??o??e.type;return e.type=s,s?Zi(s):void 0}assignColumnTypes(e,t){if(!e.length)return;let i=Object.assign({},Xl),o=this.gos.get("columnTypes")||{};We(o,(s,r)=>{s in i?S(`the column type '${s}' is a default column type and cannot be overridden.`):(r.type&&S("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."),i[s]=r)}),e.forEach(s=>{let r=i[s.trim()];r?Ie(t,r,!1,!0):S("colDef.type '"+s+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};function pt(e,t,i){if(t)for(let o=0;o<t.length;o++){let s=t[o];ke(s)&&pt(s,s.getChildren(),i),i(s,e)}}var tc=class extends b{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(e){this.context=e.context,this.ctrlsService=e.ctrlsService,this.columnFactory=e.columnFactory,this.columnSizeService=e.columnSizeService,this.visibleColsService=e.visibleColsService,this.columnViewportService=e.columnViewportService,this.pivotResultColsService=e.pivotResultColsService,this.columnAnimationService=e.columnAnimationService,this.autoColService=e.autoColService,this.controlsColService=e.controlsColService,this.valueCache=e.valueCache,this.columnDefFactory=e.columnDefFactory,this.columnApplyStateService=e.columnApplyStateService,this.columnGroupStateService=e.columnGroupStateService,this.eventDispatcher=e.columnEventDispatcher,this.columnMoveService=e.columnMoveService,this.columnAutosizeService=e.columnAutosizeService,this.funcColsService=e.funcColsService,this.quickFilterService=e.quickFilterService,this.showRowGroupColsService=e.showRowGroupColsService,this.environment=e.environment}postConstruct(){let e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],t=>this.refreshAll(It(t.source))),this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,It(t.source))}),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(It(t.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],t=>this.recreateColumnDefs(It(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),It(t.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){let t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();let i=this.colDefCols?.list,o=this.colDefCols?.tree,s=this.columnFactory.createColumnTree(this.colDefs,!0,o,e);Ft(this.context,this.colDefCols?.tree,s.columnTree);let r=s.columnTree,n=s.treeDept,a=Rs(r),l={};a.forEach(c=>l[c.getId()]=c),this.colDefCols={tree:r,treeDepth:n,list:a,map:l},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),e==="gridInitializing"&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;let t=this.cols?.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();let i=Al(this.gos,this.showingPivotResult);(!e||i)&&this.restoreColOrder(),this.positionLockedCols(),this.showRowGroupColsService?.refresh(),this.quickFilterService?.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),!Pt(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){let e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=e!=null,e){let{map:t,list:i,tree:o,treeDepth:s}=e;this.cols={list:i.slice(),map:{...t},tree:o.slice(),treeDepth:s},e.list.some(n=>this.cols?.map[n.getColId()]!==void 0)||(this.lastPivotOrder=null)}else{let{map:t,list:i,tree:o,treeDepth:s}=this.colDefCols;this.cols={list:i.slice(),map:{...t},tree:o.slice(),treeDepth:s}}}getColsToShow(){let e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns(),i=this.controlsColService?.isControlsColEnabled();return this.cols.list.filter(s=>{let r=Lr(s);if(e){let n=t&&Ht(t,s);return r||n||i&&Pi(s)}else return r||s.isVisible()})}addAutoCols(){this.autoCols!=null&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),Gr(this.cols))}createAutoCols(){let e=ys(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),s=!(i.length>0||this.gos.get("treeData"))||t||e,r=()=>{this.autoCols&&(Ft(this.context,this.autoCols.tree),this.autoCols=null)};if(s||!this.autoColService){r();return}let n=this.autoColService.createAutoCols(i)??[],a=Hr(n,this.autoCols?.list||null),l=this.cols.treeDepth,d=(this.autoCols?this.autoCols.treeDepth:-1)==l;if(a&&d)return;r();let[u,h]=this.columnFactory.balanceTreeForAutoCols(n,this.cols.tree);this.autoCols={list:n,tree:u,treeDepth:h,map:{}};let g=f=>{if(!f)return null;let m=f.filter(p=>!Lr(p));return[...n,...m]};this.lastOrder=g(this.lastOrder),this.lastPivotOrder=g(this.lastPivotOrder)}createControlsCols(){let e=()=>{Ft(this.context,this.controlsCols?.tree),this.controlsCols=null};this.controlsColService||e();let t=this.cols.treeDepth,o=(this.controlsCols?.treeDepth??-1)==t,s=this.controlsColService?.createControlsCols()??[];if(Hr(s,this.controlsCols?.list??[])&&o)return;e();let[n,a]=this.columnFactory.balanceTreeForAutoCols(s,this.cols.tree);this.controlsCols={list:s,tree:n,treeDepth:a,map:{}};let l=c=>{if(!c)return null;let d=c.filter(u=>!Pi(u));return[...s,...d]};this.lastOrder=l(this.lastOrder),this.lastPivotOrder=l(this.lastPivotOrder)}addControlsCols(){this.controlsCols!=null&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),Gr(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){if(!this.cols||Ee(e))return;if(Re(this.gos,"print")){S("Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();let o;t===!0||t==="left"?o="left":t==="right"?o="right":o=null;let s=[];e.forEach(r=>{if(!r)return;let n=this.getCol(r);n&&n.getPinned()!==o&&(n.setPinned(o),s.push(n))}),s.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(s,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let o;ke(e)?o=e.getId():o=e||"",this.columnGroupStateService.setColumnGroupState([{groupId:o,open:t}],i)}getProvidedColGroup(e){let t=null;return pt(null,this.cols?.tree,i=>{ke(i)&&i.getId()===e&&(t=i)}),t}isColGroupLocked(e){let t=this.gos.get("groupLockGroupColumns");if(!e.isRowGroupActive()||t===0)return!1;if(t===-1)return!0;let o=this.funcColsService.getRowGroupColumns().findIndex(s=>s.getColId()===e.getColId());return t>o}isSuppressAutoCol(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,de(this.gos)||mt(this.gos)||S("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){let e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;let t=new Map(e.map((l,c)=>[l,c]));if(!this.cols.list.some(l=>t.has(l)))return;let o=new Map(this.cols.list.map(l=>[l,!0])),s=e.filter(l=>o.has(l)),r=new Map(s.map(l=>[l,!0])),n=this.cols.list.filter(l=>!r.has(l)),a=s.slice();n.forEach(l=>{let c=l.getOriginalParent();if(!c){a.push(l);return}let d=[];for(;!d.length&&c;)c.getLeafColumns().forEach(f=>{let m=a.indexOf(f)>=0,p=d.indexOf(f)<0;m&&p&&d.push(f)}),c=c.getOriginalParent();if(!d.length){a.push(l);return}let u=d.map(g=>a.indexOf(g)),h=Math.max(...u);Mi(a,l,h+1)}),this.cols.list=a}sortColsLikeKeys(e){if(this.cols==null)return;let t=[],i={};e.forEach(s=>{if(i[s])return;let r=this.cols.map[s];r&&(t.push(r),i[s]=!0)});let o=0;if(this.cols.list.forEach(s=>{let r=s.getColId();if(i[r]!=null)return;r.startsWith(wo)?Mi(t,s,o++):t.push(s)}),t=this.columnMoveService.placeLockedColumns(t),!this.columnMoveService.doesMovePassMarryChildren(t)){S("Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.cols.list=t}sortColsLikeCols(e){!e||e.length<=1||e.filter(i=>this.cols.list.indexOf(i)<0).length>0||e.sort((i,o)=>{let s=this.cols.list.indexOf(i),r=this.cols.list.indexOf(o);return s-r})}resetColDefIntoCol(e,t){let i=e.getUserProvidedColDef();if(!i)return!1;let o=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(o,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){pn(this.cols?.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list:this.lastOrder=this.cols?.list}getColumnDefs(){if(!this.colDefCols)return;let e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((o,s)=>this.lastOrder.indexOf(o)-this.lastOrder.indexOf(s)):this.lastOrder&&e.sort((o,s)=>this.cols.list.indexOf(o)-this.cols.list.indexOf(s));let t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){return this.colDefCols?.treeDepth>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>e.getColDef().colSpan!=null)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return e&&this.gos.get("treeData")?(S("Pivot mode not available with treeData."),!1):!0}isPivotActive(){let e=this.funcColsService.getPivotColumns();return this.pivotMode&&!Ee(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Ft(this.context,this.colDefCols?.tree),Ft(this.context,this.autoCols?.tree),Ft(this.context,this.controlsCols?.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){return this.colDefCols?.list?this.colDefCols.list:null}getCols(){return this.cols?.list??[]}getAllCols(){let t=this.pivotResultColsService.getPivotResultCols()?.list;return[this.colDefCols?.list??[],this.autoCols?.list??[],this.controlsCols?.list??[],t??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;let{map:i,list:o}=t;if(typeof e=="string"&&i[e])return i[e];for(let s=0;s<o.length;s++)if(Nr(o[s],e))return o[s];return this.getAutoCol(e)}getAutoCol(e){return this.autoCols?.list.find(t=>Nr(t,e))??null}getAutoCols(){return this.autoCols?.list??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){let e=[],t=this.ctrlsService.getHeaderRowContainerCtrls();for(let i of t){if(!i)continue;let o=i.getGroupRowCount()||0;for(let s=0;s<o;s++){let r=i.getGroupRowCtrlAtIndex(s),n=e[s];if(r){let a=this.getColumnGroupHeaderRowHeight(r);(n==null||a>n)&&(e[s]=a)}}}return e}getColumnGroupHeaderRowHeight(e){let t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight(),i=0,o=e.getHeaderCtrls();for(let s of o){let r=s.getColumn();if(r.isAutoHeaderHeight()){let n=r.getAutoHeaderHeight();n!=null&&n>i&&(i=n)}}return Math.max(t,i)}getColumnHeaderRowHeight(){let e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),i=this.visibleColsService.getAllCols().filter(o=>o.isAutoHeaderHeight()).map(o=>o.getAutoHeaderHeight()||0);return Math.max(e,...i)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){let e=this.gos.get("autoSizeStrategy");if(e?.type!=="fitCellContents")return;let{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){let o=t&&typeof t!="string"?ii(t):void 0,s=e&&typeof e!="string"?ii(e):void 0,r=o!==s,n=t&&typeof t!="string"?so(t):void 0,a=e&&typeof e!="string"?so(e):void 0;(r||n!==a)&&this.refreshAll(i)}};function It(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function Gr(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Nr(e,t){let i=e===t,o=e.getColDef()===t,s=e.getColId()==t;return i||o||s}function Hr(e,t){return Pt(e,t,(i,o)=>i.getColId()===o.getColId())}var ic=class extends b{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));return}let{colKeys:t,skipHeader:i,skipHeaderGroups:o,stopAtGroup:s,source:r="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>this.autoSizeCols(e));return}this.timesDelayed=0;let n=[],a=-1,l=i??this.gos.get("skipHeaderOnAutoSize"),c=o??l;for(;a!==0;){a=0;let d=[];t.forEach(u=>{if(!u)return;let h=this.columnModel.getCol(u);if(!h||n.indexOf(h)>=0)return;let g=this.autoWidthCalculator.getPreferredWidthForColumn(h,l);if(g>0){let f=this.normaliseColumnWidth(h,g);h.setActualWidth(f,r),n.push(h),a++}d.push(h)}),d.length&&this.visibleColsService.refresh(r)}c||this.autoSizeColumnGroupsByColumns(t,r,s),this.eventDispatcher.columnResized(n,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){let o=new Set;this.columnModel.getColsForKeys(e).forEach(a=>{let l=a.getParent();for(;l&&l!=i;)l.isPadding()||o.add(l),l=l.getParent()});let r,n=[];for(let a of o){for(let l of this.ctrlsService.getHeaderRowContainerCtrls())if(r=l.getHeaderCtrlForColumn(a),r)break;r&&r.resizeLeafColumnsToFit(t)}return n}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));return}let i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){let i=e.getMinWidth();t<i&&(t=i);let o=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=o),t}},oc=class extends b{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.aggFuncService=e.aggFuncService,this.visibleColsService=e.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:e=>this.rowGroupCols.push(e),removeGroupCol:e=>De(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>De(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>De(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){let t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupCols.slice(0);let i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return Ee(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;let o=this.columnModel.getColDefCol(e);o&&(o.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[o],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(i,o)=>this.setRowGroupActive(i,o,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,i=>this.setRowGroupActive(!0,i,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,i=>this.setRowGroupActive(!1,i,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,i=>i.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(i,o)=>{o.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,i=>i.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(i,o)=>this.setValueActive(i,o,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){let o=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(o)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,i=>this.setValueActive(!0,i,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,i=>this.setValueActive(!1,i,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;let o=this.rowGroupCols[e],s=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,o),this.eventDispatcher.rowGroupChanged(s,i)}setColList(e,t,i,o,s,r,n){if(!this.columnModel.getCols())return;let a=new Map;t.forEach((c,d)=>a.set(c,d)),t.length=0,M(e)&&e.forEach(c=>{let d=this.columnModel.getColDefCol(c);d&&t.push(d)}),t.forEach((c,d)=>{let u=a.get(c);if(u===void 0){a.set(c,0);return}o&&u!==d||a.delete(c)}),(this.columnModel.getColDefCols()||[]).forEach(c=>{let d=t.indexOf(c)>=0;r(d,c)}),s&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(n),this.eventDispatcher.columnChanged(i,[...a.keys()],n)}updateColList(e,t,i,o,s,r,n){if(!e||Ee(e))return;let a=!1,l=new Set;e.forEach(c=>{if(!c)return;let d=this.columnModel.getColDefCol(c);if(d){if(l.add(d),i){if(t.indexOf(d)>=0)return;t.push(d)}else{let u=t.indexOf(d);if(u<0)return;for(let h=u+1;h<t.length;h++)l.add(t[h]);De(t,d)}s(d),a=!0}}),a&&(o&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(n),this.eventDispatcher.genericColumnEvent(r,Array.from(l),n))}extractCols(e,t){this.extractRowGroupCols(e,t),this.extractPivotCols(e,t),this.extractValueCols(e,t)}extractValueCols(e,t){this.valueCols=this.extractColsCommon(t,this.valueCols,(i,o)=>i.setValueActive(o,e),()=>{},()=>{},i=>{let o=i.aggFunc;if(o===null||o==="")return null;if(o!==void 0)return!!o},i=>i.initialAggFunc!=null&&i.initialAggFunc!=""),this.valueCols.forEach(i=>{let o=i.getColDef();o.aggFunc!=null&&o.aggFunc!=""?i.setAggFunc(o.aggFunc):i.getAggFunc()||i.setAggFunc(o.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(i,o)=>i.setRowGroupActive(o,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(i,o)=>i.setPivotActive(o,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}extractColsCommon(e=[],t=[],i,o,s,r,n){let a=[],l=[];(this.columnModel.getColDefCols()||[]).forEach(h=>{let g=e.indexOf(h)<0,f=h.getColDef(),m=es(r(f)),p=es(n(f)),v=Nt(o(f)),w=Nt(s(f)),C;m!==void 0?C=m:v!==void 0?v===null?C=!1:C=v>=0:g?p!==void 0?C=p:w!==void 0?C=w!=null&&w>=0:C=!1:C=t.indexOf(h)>=0,C&&((g?v!=null||w!=null:v!=null)?a.push(h):l.push(h))});let d=h=>{let g=o(h.getColDef()),f=s(h.getColDef());return g??f};a.sort((h,g)=>{let f=d(h),m=d(g);return f===m?0:f<m?-1:1});let u=[].concat(a);return t.forEach(h=>{l.indexOf(h)>=0&&u.push(h)}),l.forEach(h=>{u.indexOf(h)<0&&u.push(h)}),t.forEach(h=>{u.indexOf(h)<0&&i(h,!1)}),u.forEach(h=>{t.indexOf(h)<0&&i(h,!0)}),u}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={},o=(s,r,n,a,l,c)=>{let d=this.columnModel.getColDefCols();if(!r.length||!d)return[];let u=Object.keys(s),h=new Set(u),g=new Set(u),f=new Set(r.map(T=>{let x=T.getColId();return g.delete(x),x}).concat(u)),m=[],p={},v=0;for(let T=0;T<d.length;T++){let x=d[T].getColId();f.has(x)&&(m.push(x),p[x]=v++)}let w=1e3,C=!1,R=0,P=T=>{let x=p[T];for(let A=R;A<x;A++){let L=m[A];g.has(L)&&(s[L][l]=w++,g.delete(L))}R=x};r.forEach(T=>{let x=T.getColId();if(h.has(x))P(x),s[x][l]=w++;else{let A=T.getColDef();(A[l]===null||A[l]===void 0&&A[c]==null)&&(C||(A[n]||A[n]===void 0&&A[a]?P(x):(g.forEach(O=>{s[O][l]=w+p[O]}),w+=m.length,C=!0)),i[x]||(i[x]={colId:x}),i[x][l]=w++)}})};return o(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),o(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},sc=class extends b{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){let i=this.columnModel.getColDefCols()||[];if(Ee(i))return!1;if(e&&e.state&&!e.state.forEach)return S("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."),!1;let o=this.funcColsService.getModifyColumnsNoEventsCallbacks(),s=(a,l,c)=>{let d=this.compareColumnStatesAndDispatchEvents(t),u=l.slice(),h={},g={},f=[],m=[],p=0,v=this.funcColsService.getRowGroupColumns().slice(),w=this.funcColsService.getPivotColumns().slice();a.forEach(T=>{let x=T.colId||"";if(x.startsWith(wo)){f.push(T),m.push(T);return}let L=c(x);L?(this.syncColumnWithStateItem(L,T,e.defaultState,h,g,!1,t,o),De(u,L)):(m.push(T),p+=1)});let C=T=>this.syncColumnWithStateItem(T,null,e.defaultState,h,g,!1,t,o);u.forEach(C),this.funcColsService.sortRowGroupColumns(zr.bind(this,h,v)),this.funcColsService.sortPivotColumns(zr.bind(this,g,w)),this.columnModel.refreshCols(!1);let P=(this.columnModel.getAutoCols()||[]).slice();return f.forEach(T=>{let x=this.columnModel.getAutoCol(T.colId);De(P,x),this.syncColumnWithStateItem(x,T,e.defaultState,null,null,!0,t,o)}),P.forEach(C),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),d(),{unmatchedAndAutoStates:m,unmatchedCount:p}};this.columnAnimationService.start();let{unmatchedAndAutoStates:r,unmatchedCount:n}=s(e.state||[],i,a=>this.columnModel.getColDefCol(a));if(r.length>0||M(e.defaultState)){let l=this.pivotResultColsService.getPivotResultCols()?.list;n=s(r,l||[],c=>this.pivotResultColsService.getPivotResultCol(c)).unmatchedCount}return this.columnAnimationService.finish(),n===0}resetColumnState(e){let t=this.columnModel.getColDefCols();if(Ee(t))return;let i=this.columnModel.getColDefColTree(),o=Rs(i),s=[],r=1e3,n=1e3,a=[],l=this.columnModel.getAutoCols();l&&(a=a.concat(l)),o&&(a=a.concat(o)),a.forEach(c=>{let d=this.getColumnStateFromColDef(c);K(d.rowGroupIndex)&&d.rowGroup&&(d.rowGroupIndex=r++),K(d.pivotIndex)&&d.pivot&&(d.pivotIndex=n++),s.push(d)}),this.applyColumnState({state:s,applyOrder:!0},e)}getColumnStateFromColDef(e){let t=(f,m)=>f??m??null,i=e.getColDef(),o=t(i.sort,i.initialSort),s=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),n=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex),c=t(i.rowGroupIndex,i.initialRowGroupIndex),d=t(i.rowGroup,i.initialRowGroup);c==null&&(d==null||d==!1)&&(c=null,d=null);let u=t(i.pivotIndex,i.initialPivotIndex),h=t(i.pivot,i.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);let g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:s,hide:r,pinned:n,width:a,flex:l,rowGroup:d,rowGroupIndex:c,pivot:h,pivotIndex:u,aggFunc:g}}syncColumnWithStateItem(e,t,i,o,s,r,n,a){if(!e)return;let l=(R,P)=>{let T={value1:void 0,value2:void 0},x=!1;return t&&(t[R]!==void 0&&(T.value1=t[R],x=!0),M(P)&&t[P]!==void 0&&(T.value2=t[P],x=!0)),!x&&i&&(i[R]!==void 0&&(T.value1=i[R]),M(P)&&i[P]!==void 0&&(T.value2=i[P])),T},c=l("hide").value1;c!==void 0&&e.setVisible(!c,n);let d=l("pinned").value1;d!==void 0&&e.setPinned(d);let u=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),h=l("flex").value1;if(h!==void 0&&e.setFlex(h),h==null){let R=l("width").value1;R!=null&&u!=null&&R>=u&&e.setActualWidth(R,n)}let g=l("sort").value1;g!==void 0&&(g==="desc"||g==="asc"?e.setSort(g,n):e.setSort(void 0,n));let f=l("sortIndex").value1;if(f!==void 0&&e.setSortIndex(f),r||!e.isPrimary())return;let m=l("aggFunc").value1;m!==void 0&&(typeof m=="string"?(e.setAggFunc(m),e.isValueActive()||(e.setValueActive(!0,n),a.addValueCol(e))):(M(m)&&S("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."),e.isValueActive()&&(e.setValueActive(!1,n),a.removeValueCol(e))));let{value1:p,value2:v}=l("rowGroup","rowGroupIndex");(p!==void 0||v!==void 0)&&(typeof v=="number"||p?(e.isRowGroupActive()||(e.setRowGroupActive(!0,n),a.addGroupCol(e)),o&&typeof v=="number"&&(o[e.getId()]=v)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,n),a.removeGroupCol(e)));let{value1:w,value2:C}=l("pivot","pivotIndex");(w!==void 0||C!==void 0)&&(typeof C=="number"||w?(e.isPivotActive()||(e.setPivotActive(!0,n),a.addPivotCol(e)),s&&typeof C=="number"&&(s[e.getId()]=C)):e.isPivotActive()&&(e.setPivotActive(!1,n),a.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;let t=[];e.state.forEach(i=>{i.colId!=null&&t.push(i.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){let t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),o={};return i.forEach(s=>{o[s.colId]=s}),()=>{let s=this.columnModel.getAllCols(),r=(m,p,v,w)=>{let C=p.map(w),R=v.map(w);if(Pt(C,R))return;let T=new Set(p);v.forEach(A=>{T.delete(A)||T.add(A)});let x=[...T];this.eventService.dispatchEvent({type:m,columns:x,column:x.length===1?x[0]:null,source:e})},n=m=>{let p=[];return s.forEach(v=>{let w=o[v.getColId()];w&&m(w,v)&&p.push(v)}),p},a=m=>m.getColId();r("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),a),r("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),a);let c=n((m,p)=>{let v=m.aggFunc!=null,w=v!=p.isValueActive(),C=v&&m.aggFunc!=p.getAggFunc();return w||C});c.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",c,e);let d=(m,p)=>m.width!=p.getActualWidth();this.eventDispatcher.columnResized(n(d),!0,e);let u=(m,p)=>m.pinned!=p.getPinned();this.eventDispatcher.columnPinned(n(u),e);let h=(m,p)=>m.hide==p.isVisible();this.eventDispatcher.columnVisible(n(h),e);let f=n((m,p)=>m.sort!=p.getSort()||m.sortIndex!=p.getSortIndex());f.length>0&&this.sortController.dispatchSortChangedEvents(e,f),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){let i=this.columnGetStateService.getColumnState(),o={};i.forEach(l=>o[l.colId]=l);let s={};e.forEach(l=>{o[l.colId]&&(s[l.colId]=!0)});let r=e.filter(l=>s[l.colId]),n=i.filter(l=>s[l.colId]),a=[];n.forEach((l,c)=>{let d=r&&r[c];if(d&&d.colId!==l.colId){let u=this.columnModel.getCol(d.colId);u&&a.push(u)}}),a.length&&this.eventDispatcher.columnMoved({movedColumns:a,source:t,finished:!0})}},zr=(e,t,i,o)=>{let s=e[i.getId()],r=e[o.getId()],n=s!=null,a=r!=null;if(n&&a)return s-r;if(n)return-1;if(a)return 1;let l=t.indexOf(i),c=t.indexOf(o),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},rc=class extends b{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){let o=this.columnModel.getCols();if(!o)return;let s=o[e];this.moveColumns([s],t,i)}moveColumns(e,t,i,o=!0){let s=this.columnModel.getCols();if(!s)return;if(t>s.length-e.length){S("tried to insert columns in invalid location, toIndex = ",t),S("remember that you should not count the moving columns when calculating the new index");return}this.columnAnimationService.start();let r=this.columnModel.getColsForKeys(e);this.doesMovePassRules(r,t)&&(this.columnModel.moveInCols(r,t,i),this.eventDispatcher.columnMoved({movedColumns:r,source:i,toIndex:t,finished:o})),this.columnAnimationService.finish()}doesMovePassRules(e,t){let i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){let o=this.columnModel.getCols().slice();return pn(o,e,t),o}doesMovePassLockedPositions(e){let t=r=>r?r==="left"||r===!0?-1:1:0,i=this.gos.get("enableRtl"),o=i?1:-1,s=!0;return e.forEach(r=>{let n=t(r.getColDef().lockPosition);i?n>o&&(s=!1):n<o&&(s=!1),o=n}),s}doesMovePassMarryChildren(e){let t=!0,i=this.columnModel.getColTree();return pt(null,i,o=>{if(!ke(o))return;let s=o,r=s.getColGroupDef();if(!(r&&r.marryChildren))return;let a=[];s.getLeafColumns().forEach(h=>{let g=e.indexOf(h);a.push(g)});let l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),d=l-c,u=s.getLeafColumns().length-1;d>u&&(t=!1)}),t}placeLockedColumns(e){let t=[],i=[],o=[];return e.forEach(r=>{let n=r.getColDef().lockPosition;n==="right"?o.push(r):n==="left"||n===!0?t.push(r):i.push(r)}),this.gos.get("enableRtl")?[...o,...i,...t]:[...t,...i,...o]}},nc=/[&<>"']/g,ac={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function qe(e,t){if(e==null)return null;let i=e.toString().toString();return t?i:i.replace(nc,o=>ac[o])}function lc(e){if(!e||e==null)return null;let t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}var cc=class extends b{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;let o=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,i){let o=t?t.getColGroupDef():null;return o?this.getHeaderName(o,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,o,s){let r=e.headerValueGetter;if(r){let n=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:o,location:s});return typeof r=="function"?r(n):typeof r=="string"?this.expressionService.evaluate(r,n):(S("headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return lc(e.field)}return""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;let i=e.getColDef().pivotValueColumn,o=M(i),s=null,r;if(o){let n=this.funcColsService.getValueColumns(),a=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&n.length===1,l=e.getColDef().pivotTotalColumnIds!==void 0;if(a&&!l)return t;s=i?i.getAggFunc():null,r=!0}else{let n=e.isValueActive(),a=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();n&&a?(s=e.getAggFunc(),r=!0):r=!1}if(r){let n=typeof s=="string"?s:"func";return`${this.localeService.getLocaleTextFunc()(n,n)}(${t})`}return t}},dc=class extends b{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){Ft(this.context,this.pivotResultCols?.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;let i=this.columnModel.getColDefCol(t),o=null;return this.pivotResultCols.list.forEach(s=>{let r=s.getColDef().pivotKeys,n=s.getColDef().pivotValueColumn;Pt(r,e)&&n===i&&(o=s)}),o}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){if(this.columnModel.isReady()&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);let i=this.columnFactory.createColumnTree(e,!1,this.pivotResultCols?.tree||this.previousPivotResultCols||void 0,t);Ft(this.context,this.pivotResultCols?.tree,i.columnTree);let o=i.columnTree,s=i.treeDept,r=Rs(o),n={};this.pivotResultCols={tree:o,treeDepth:s,list:r,map:n},this.pivotResultCols.list.forEach(l=>this.pivotResultCols.map[l.getId()]=l);let a=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!a)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){let t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;let o=s=>{s.forEach(r=>{if(M(r.children)){let a=r;i&&i(a),o(a.children)}else t&&t(r)})};e&&o(e)}},uc=class extends b{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,o){let s=[];e.forEach(r=>{let n=this.columnModel.getColDefCol(r.key)||this.columnModel.getCol(r.key);if(!n)return;if(s.push({width:r.newWidth,ratios:[1],columns:[n]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t){let l=this.visibleColsService.getColAfter(n);if(!l)return;let c=n.getActualWidth()-r.newWidth,d=l.getActualWidth()+c;s.push({width:d,ratios:[1],columns:[l]})}}),s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:i,source:o})}resizeColumnSets(e){let{resizeSets:t,finished:i,source:o}=e;if(!(!t||t.every(d=>this.checkMinAndMaxWidthsForSet(d)))){if(i){let d=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(d,i,o)}return}let r=[],n=[];t.forEach(d=>{let{width:u,columns:h,ratios:g}=d,f={},m={};h.forEach(w=>n.push(w));let p=!0,v=0;for(;p;){if(v++,v>1e3){Q("infinite loop in resizeColumnSets");break}p=!1;let w=[],C=0,R=u;h.forEach((T,x)=>{if(m[T.getId()])R-=f[T.getId()];else{w.push(T);let L=g[x];C+=L}});let P=1/C;w.forEach((T,x)=>{let A=x===w.length-1,L;A?L=R:(L=Math.round(g[x]*u*P),R-=L);let k=T.getMinWidth(),O=T.getMaxWidth();L<k?(L=k,m[T.getId()]=!0,p=!0):O>0&&L>O&&(L=O,m[T.getId()]=!0,p=!0),f[T.getId()]=L})}h.forEach(w=>{let C=f[w.getId()];w.getActualWidth()!==C&&(w.setActualWidth(C,o),r.push(w))})});let a=r.length>0,l=[];a&&(l=this.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}),this.visibleColsService.setLeftValues(o),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());let c=n.concat(l);(a||i)&&this.eventDispatcher.columnResized(c,i,o,l)}checkMinAndMaxWidthsForSet(e){let{columns:t,width:i}=e,o=0,s=0,r=!0;t.forEach(l=>{let c=l.getMinWidth();o+=c||0;let d=l.getMaxWidth();d>0?s+=d:r=!1});let n=i>=o,a=!r||i<=s;return n&&a}refreshFlexedColumns(e={}){let t=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let i=this.visibleColsService.getCenterCols(),o=-1;if(e.resizingCols){let h=new Set(e.resizingCols);for(let g=i.length-1;g>=0;g--)if(h.has(i[g])){o=g;break}}let s=0,r=[],n=0,a=0;for(let h=0;h<i.length;h++)i[h].getFlex()&&h>o?(r.push(i[h]),a+=i[h].getFlex(),n+=i[h].getMinWidth()):s+=i[h].getActualWidth();if(!r.length)return[];let l=[];s+n>this.flexViewportWidth&&(r.forEach(h=>h.setActualWidth(h.getMinWidth(),t)),l=r,r=[]);let c=[],d;e:for(;;){d=this.flexViewportWidth-s;let h=d/a;for(let g=0;g<r.length;g++){let f=r[g],m=h*f.getFlex(),p=0,v=f.getMinWidth(),w=f.getMaxWidth();if(m<v?p=v:m>w&&(p=w),p){f.setActualWidth(p,t),gn(r,f),a-=f.getFlex(),l.push(f),s+=f.getActualWidth();continue e}c[g]=Math.floor(m)}break}let u=d;return r.forEach((h,g)=>{let f=g<r.length-1?Math.min(c[g],u):Math.max(c[g],u);h.setActualWidth(f,t),l.push(h),u-=c[g]}),e.skipSetLeft||this.visibleColsService.setLeftValues(t),e.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),e.fireResizedEvent&&this.eventDispatcher.columnResized(l,!0,t,r),r}sizeColumnsToFit(e,t="sizeColumnsToFit",i,o){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,o));return}let s={};o&&o?.columnLimits?.forEach(({key:h,...g})=>{s[typeof h=="string"?h:h.getColId()]=g});let r=this.visibleColsService.getAllCols(),n=e===ct(r);if(e<=0||!r.length||n)return;let a=[],l=[];r.forEach(h=>{h.getColDef().suppressSizeToFit===!0?l.push(h):a.push(h)});let c=a.slice(0),d=!1,u=h=>{De(a,h),l.push(h)};for(a.forEach(h=>{h.resetActualWidth(t);let g=s?.[h.getId()],f=g?.minWidth??o?.defaultMinWidth,m=g?.maxWidth??o?.defaultMaxWidth,p=h.getActualWidth();typeof f=="number"&&p<f?h.setActualWidth(f,t,!0):typeof m=="number"&&p>m&&h.setActualWidth(m,t,!0)});!d;){d=!0;let h=e-ct(l);if(h<=0)a.forEach(g=>{let f=s?.[g.getId()]?.minWidth??o?.defaultMinWidth;if(typeof f=="number"){g.setActualWidth(f,t,!0);return}g.setMinimum(t)});else{let g=h/ct(a),f=h;for(let m=a.length-1;m>=0;m--){let p=a[m],v=s?.[p.getId()],w=v?.minWidth??o?.defaultMinWidth,C=v?.maxWidth??o?.defaultMaxWidth,R=p.getMinWidth(),P=p.getMaxWidth(),T=typeof w=="number"&&w>R?w:R,x=typeof C=="number"&&C<P?C:P,A=Math.round(p.getActualWidth()*g);A<T?(A=T,u(p),d=!1):A>x?(A=x,u(p),d=!1):m===0&&(A=f),p.setActualWidth(A,t,!0),f-=A}}}c.forEach(h=>{h.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),!i&&this.eventDispatcher.columnResized(c,!0,t)}applyAutosizeStrategy(){let e=this.gos.get("autoSizeStrategy");if(!e)return;let{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){let{columnLimits:i,defaultMinWidth:o,defaultMaxWidth:s}=e,r=i?.map(({colId:n,minWidth:a,maxWidth:l})=>({key:n,minWidth:a,maxWidth:l}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:o,defaultMaxWidth:s,columnLimits:r})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function wn(e,t){return e+"_"+t}function Se(e){return e instanceof yn}var yn=class extends b{constructor(e,t,i,o){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=o}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return wn(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{Se(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){let t=$(this.displayedChildren).getLeft();this.setLeft(t)}else{let e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){let e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{Et(t)?e.push(t):Se(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{Et(t)?e.push(t):Se(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(i=>{if(Se(i)&&(!i.displayedChildren||!i.displayedChildren.length))return;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},hc=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t=this.existingIds[e],i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}},gc=class extends b{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=Wo(this.treeLeft),this.columnsCenter=Wo(this.treeCenter),this.columnsRight=Wo(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(i=>i.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){let e=ct(this.columnsCenter),t=ct(this.columnsLeft),i=ct(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?$(this.columnsRight):null):(t=this.columnsLeft?$(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(o=>{o.setLastLeftPinned(o===t,e),o.setFirstRightPinned(o===i,e)})}buildTrees(){let e=this.columnModel.getColsToShow(),t=e.filter(r=>r.getPinned()=="left"),i=e.filter(r=>r.getPinned()=="right"),o=e.filter(r=>r.getPinned()!="left"&&r.getPinned()!="right"),s=new hc;this.treeLeft=this.createGroups({columns:t,idCreator:s,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:s,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:o,idCreator:s,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){let e=this.columnModel.getCols(),t=[],i=[],o=[];for(let s of e){let r=s.getPinned();r?r===!0||r==="left"?t.push(s):o.push(s):i.push(s)}this.ariaOrderColumns=t.concat(i).concat(o)}getAriaColIndex(e){let t;return Se(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{Se(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;let i=this.columnModel.getCols().slice(0),o=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(s=>{if(o){let r=ct(s);s.forEach(n=>{r-=n.getActualWidth(),n.setLeft(r,e)})}else{let r=0;s.forEach(n=>{n.setLeft(r,e),r+=n.getActualWidth()})}Vl(i,s)}),i.forEach(s=>{s.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,o){let s=[],r=null;for(let n=0;n<t.length;n++){let a=t[n],l=t.length-n,c=Math.min(a.getColSpan(e),l),d=[a];if(c>1){let h=c-1;for(let g=1;g<=h;g++)d.push(t[n+g]);n+=h}let u;i?(u=!1,d.forEach(h=>{i(h)&&(u=!0)})):u=!0,u&&(s.length===0&&r&&o&&o(a)&&s.push(r),s.push(a)),r=a}return s}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){let t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){let i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),s=t==="After"?$(o):o[0],r=`getCol${t}`;for(;;){let n=this[r](s);if(!n)return null;let a=this.getColGroupAtLevel(n,i);if(a!==e)return a}}getColGroupAtLevel(e,t){let i=e.getParent(),o,s;for(;o=i.getProvidedColumnGroup().getLevel(),s=i.getPaddingLevel(),!(o+s<=t);)i=i.getParent();return i}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};let e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Lt(this.treeCenter,!1,e),Lt(this.treeLeft,!1,e),Lt(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){let e=this.getAllTrees();Lt(e,!1,t=>{Se(t)&&t.calculateDisplayedColumns()})}getFirstColumn(){let e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){let o=this[t[i]]();if(o.length)return e?$(o):o[0]}return null}getColumnGroup(e,t){if(!e)return null;if(Se(e))return e;let i=this.getAllTrees(),o=typeof t=="number",s=null;return Lt(i,!1,r=>{if(Se(r)){let n=r,a;o?a=e===n.getGroupId()&&t===n.getPartId():a=e===n.getGroupId(),a&&(s=n)}}),s}getColAfter(e){let t=this.getAllCols(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return ct(this.columnsLeft)}getDisplayedColumnsRightWidth(){return ct(this.columnsRight)}isColAtEdge(e,t){let i=this.getAllCols();if(!i.length)return!1;let o=t==="first",s;if(Se(e)){let r=e.getDisplayedLeafColumns();if(!r.length)return!1;s=o?r[0]:$(r)}else s=e;return(o?i[0]:$(i))===s}createGroups(e){let{columns:t,idCreator:i,pinned:o,oldDisplayedGroups:s,isStandaloneStructure:r}=e,n=this.mapOldGroupsById(s),a=[],l=t;for(;l.length;){let c=l;l=[];let d=0,u=h=>{let g=d;d=h;let f=c[g],p=(Se(f)?f.getProvidedColumnGroup():f).getOriginalParent();if(p==null){for(let w=g;w<h;w++)a.push(c[w]);return}let v=this.createColGroup(p,i,n,o,r);for(let w=g;w<h;w++)v.addChild(c[w]);l.push(v)};for(let h=1;h<c.length;h++){let g=c[h],m=(Se(g)?g.getProvidedColumnGroup():g).getOriginalParent(),p=c[d],w=(Se(p)?p.getProvidedColumnGroup():p).getOriginalParent();m!==w&&u(h)}d<c.length&&u(c.length)}return r||this.setupParentsIntoCols(a,null),a}createColGroup(e,t,i,o,s){let r=e.getGroupId(),n=t.getInstanceIdForKey(r),a=wn(r,n),l=i[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),M(l)?l.reset():(l=new yn(e,r,n,o),s||this.createBean(l)),l}mapOldGroupsById(e){let t={},i=o=>{o.forEach(s=>{if(Se(s)){let r=s;t[s.getUniqueId()]=r,i(r.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.setParent(t),Se(i)){let o=i;this.setupParentsIntoCols(o.getChildren(),o)}})}};function Lt(e,t,i){if(e)for(let o=0;o<e.length;o++){let s=e[o];if(Se(s)){let r=t?s.getDisplayedChildren():s.getChildren();Lt(r,t,i)}i(s)}}function Wo(e){let t=[];return Lt(e,!0,i=>{Et(i)&&t.push(i)}),t}var bn=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],pc=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],fc=[...bn,...pc],mc={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},Fe=class{};Fe.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"];Fe.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"];Fe.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"];Fe.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"];Fe.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"];Fe.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"];Fe.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"];Fe.ALL_PROPERTIES=[...Fe.ARRAY_PROPERTIES,...Fe.OBJECT_PROPERTIES,...Fe.STRING_PROPERTIES,...Fe.NUMBER_PROPERTIES,...Fe.FUNCTION_PROPERTIES,...Fe.BOOLEAN_PROPERTIES,...Fe.OTHER_PROPERTIES];var Ti=Fe,_e=class{static getCallbackForEvent(t){return!t||t.length<2?t:"on"+t[0].toUpperCase()+t.substring(1)}};_e.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY";_e.PUBLIC_EVENTS=bn;_e.EVENT_CALLBACKS=fc.map(e=>_e.getCallbackForEvent(e));_e.BOOLEAN_PROPERTIES=Ti.BOOLEAN_PROPERTIES;_e.ALL_PROPERTIES=Ti.ALL_PROPERTIES;_e.ALL_PROPERTIES_AND_CALLBACKS=[..._e.ALL_PROPERTIES,..._e.EVENT_CALLBACKS];_e.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(_e.ALL_PROPERTIES_AND_CALLBACKS);var Ai=_e;function Sn(e,t){typeof e!="object"&&(e={});let i={...e};return Ai.ALL_PROPERTIES_AND_CALLBACKS.forEach(s=>{let r=t[s];typeof r<"u"&&r!==Ai.VUE_OMITTED_PROPERTY&&(i[s]=r)}),i}function Rn(e,t){if(!e)return;let i={},o=!1;if(Object.keys(e).filter(n=>Ai.ALL_PROPERTIES_AND_CALLBACKS_SET.has(n)).forEach(n=>{i[n]=e[n],o=!0}),!o)return;let s={type:"gridOptionsChanged",options:i};t.dispatchEvent(s);let r={type:"componentStateChanged"};We(i,(n,a)=>{r[n]=a}),t.dispatchEvent(r)}var Ye=class extends b{};function Oi(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var vt=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){let t=(e||"").split(" ");if(t.length>1){t.forEach(o=>this.addCssClass(o));return}if(this.cssClassStates[e]!==!0&&e.length){let o=this.getGui();o&&o.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){let t=(e||"").split(" ");if(t.length>1){t.forEach(o=>this.removeCssClass(o));return}if(this.cssClassStates[e]!==!1&&e.length){let o=this.getGui();o&&o.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){let t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){let o=(e||"").split(" ");if(o.length>1){o.forEach(s=>this.addOrRemoveCssClass(s,t));return}}if(this.cssClassStates[e]!==t&&e.length){let o=this.getGui();o&&o.classList.toggle(e,t),this.cssClassStates[e]=t}}};function Ct(e,t,i){i==null||typeof i=="string"&&i==""?Fn(e,t):nt(e,t,i)}function nt(e,t,i){e.setAttribute(xn(t),i.toString())}function Fn(e,t){e.removeAttribute(xn(t))}function xn(e){return`aria-${e}`}function Xe(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function vc(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Cc(e){return e.getAttribute("aria-label")}function si(e,t){Ct(e,"label",t)}function ki(e,t){Ct(e,"labelledby",t)}function Dn(e,t){Ct(e,"live",t)}function wc(e,t){Ct(e,"atomic",t)}function yc(e,t){Ct(e,"relevant",t)}function bc(e,t){Ct(e,"disabled",t)}function En(e,t){Ct(e,"hidden",t)}function no(e,t){nt(e,"expanded",t)}function Sc(e,t){nt(e,"setsize",t)}function Rc(e,t){nt(e,"posinset",t)}function Mn(e,t){nt(e,"rowcount",t)}function Fc(e,t){nt(e,"rowindex",t)}function Pn(e,t){nt(e,"colcount",t)}function Tn(e,t){nt(e,"colindex",t)}function xc(e,t){nt(e,"colspan",t)}function An(e,t){nt(e,"sort",t)}function kn(e){Fn(e,"sort")}function ao(e,t){Ct(e,"selected",t)}function Dc(e,t){Ct(e,"controls",t.id),ki(t,e.id)}function Es(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Ec="[tabindex], input, select, button, textarea, [href]",In="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ms(e){let t=Element.prototype.matches||Element.prototype.msMatchesSelector,o=t.call(e,"input, select, button, textarea"),s=t.call(e,In),r=rt(e);return o&&!s&&r}function pe(e,t,i={}){let{skipAriaHidden:o}=i;e.classList.toggle("ag-hidden",!t),o||En(e,!t)}function Mc(e,t,i={}){let{skipAriaHidden:o}=i;e.classList.toggle("ag-invisible",!t),o||En(e,!t)}function Ii(e,t){let i="disabled",o=t?s=>s.setAttribute(i,""):s=>s.removeAttribute(i);o(e),Nn(e.querySelectorAll("input"),s=>o(s))}function ei(e,t,i){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++o>i)break}else if(e===i)break}return!1}function _t(e){let{height:t,width:i,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:n,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:g,marginLeft:f,boxSizing:m}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(o||"0"),borderRightWidth:parseFloat(s||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(n||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(f||"0"),boxSizing:m}}function Ps(e){let t=_t(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Gi(e){let t=_t(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function Ln(e){let{height:t,marginBottom:i,marginTop:o}=_t(e);return Math.floor(t+i+o)}function lo(e){let{width:t,marginLeft:i,marginRight:o}=_t(e);return Math.floor(t+i+o)}function On(e){let t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=_t(e);return{top:t.top+(i||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function co(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function uo(e,t,i){i&&(t*=-1),e.scrollLeft=t}function Be(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function Mt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Gn(e){return!!e.offsetParent}function rt(e){let t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!Gn(e)||window.getComputedStyle(e).visibility!=="visible")}function Li(e){let t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Pc(e){return e.clientWidth<e.scrollWidth}function Tc(e){return e.clientHeight<e.scrollHeight}function ho(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Je(e,t)}function Je(e,t){t=Ts(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function Si(e,t){t=Ts(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function Ts(e){return typeof e=="number"?`${e}px`:e}function As(e){return e instanceof Node||e instanceof HTMLElement}function Ac(e){if(e==null)return[];let t=[];return Nn(e,i=>t.push(i)),t}function kc(e,t){if(e)for(let i=0;i<e.length;i++){let o=e[i];t(o.name,o.value)}}function je(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function Nn(e,t){if(e!=null)for(let i=0;i<e.length;i++)t(e[i])}var ks=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){let e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},Uo,_i,_o,jo,Ko,Yo,as,ls,$o;function ft(){return Uo===void 0&&(Uo=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Uo}function Hn(){if(_i===void 0)if(ft()){let e=navigator.userAgent.match(/version\/(\d+)/i);e&&(_i=e[1]!=null?parseFloat(e[1]):0)}else _i=0;return _i}function Ic(){if(_o===void 0){let e=window;_o=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return _o}function Is(){return jo===void 0&&(jo=/(firefox)/i.test(navigator.userAgent)),jo}function zn(){return Ko===void 0&&(Ko=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Ko}function Tt(){return Yo===void 0&&(Yo=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Yo}function Br(){return!ft()||Hn()>=15}function cs(e){if(!e)return null;let t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!Is())?null:t.toString()}function Lc(){if($o!==void 0)return $o;if(!document.body)return-1;let e=1e6,t=Is()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){let o=e*2;if(i.style.height=o+"px",o>t||i.clientHeight!==o)break;e=o}return document.body.removeChild(i),$o=e,e}function Oc(){return document.body?.clientWidth??(window.innerHeight||document.documentElement?.clientWidth||-1)}function Gc(){return document.body?.clientHeight??(window.innerHeight||document.documentElement?.clientHeight||-1)}function Nc(){return ls==null&&Bn(),ls}function Bn(){let e=document.body,t=document.createElement("div");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);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(ls=i,as=i===0)}function Vn(){return as==null&&Bn(),as}var Hc=1e3,zc=1e3,Vr=100,Wn=class At extends b{constructor(t,i,o,s){super(),this.parentComp=t,this.tooltipShowDelayOverride=i,this.tooltipHideDelayOverride=o,this.shouldDisplayTooltip=s,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(t){this.popupService=t.popupService,this.userComponentFactory=t.userComponentFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");let t=this.parentComp.getGui();this.tooltipTrigger===0&&this.addManagedListeners(t,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(t,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(t,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(t,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(t){let i=this.gos.get(t);return i<0&&S(`${t} should not be lower than 0`),Math.max(200,i)}getTooltipDelay(t){return t==="show"?this.tooltipShowDelayOverride??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipHideDelayOverride??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let t=this.gos.get("tooltipTrigger");return!t||t==="hover"?0:1}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Tt()&&(At.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},Vr):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(t){let i=t.relatedTarget,o=this.parentComp.getGui(),s=this.tooltipComp?.getGui();this.isInteractingWithTooltip||o.contains(i)||this.interactionEnabled&&s?.contains(i)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(t){if(this.state!=0||At.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){let t=new Date().getTime(),i=At.lastTooltipHideTime;return t-i<Hc}setToDoNothing(t){!t&&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}showTooltip(){let t={...this.parentComp.getTooltipParams()};if(!M(t.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip()){this.setToDoNothing();return}this.state=2,this.tooltipInstanceCount++;let i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(t).newAgStackInstance().then(i)}hideTooltip(t){!t&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),At.lastTooltipHideTime=new Date().getTime()),this.eventService.dispatchEvent({type:"tooltipHide",parentGui:this.parentComp.getGui()}),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(t,i){if(this.state!==2||this.tooltipInstanceCount!==t){this.destroyBean(i);return}let s=i.getGui();this.tooltipComp=i,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");let r=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({eChild:s,ariaLabel:r("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){let a=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:a,columnMoved:a})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(s,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(ve(this.gos),{keydown:a=>{s.contains(a?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(s,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:s,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){let t=this.tooltipComp?.getGui(),i=fe(this.gos);return!!t&&t.contains(i)}onTooltipFocusOut(t){let i=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,i.contains(t.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){let t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent({...t,mouseEvent:this.lastMouseEvent}):this.popupService.positionPopupByComponent({...t,eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let t=this.tooltipPopupDestroyFunc,i=this.tooltipComp,o=this.tooltipTrigger===0?zc:0;window.setTimeout(()=>{t(),this.destroyBean(i)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(t=>{t&&t()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){At.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Vr)}unlockService(){At.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};Wn.isLocked=!1;var Bc=Wn,ai=class extends b{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}wireBeans(e){this.beans=e}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){let t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){if(this.tooltipManager!=null)return;let e={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new Bc(e,this.ctrl.getTooltipShowDelayOverride?.(),this.ctrl.getTooltipHideDelayOverride?.(),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){let e=this.ctrl,t=e.getColumn?.(),i=e.getColDef?.(),o=e.getRowNode?.();return{location:e.getLocation(),colDef:i,column:t,rowIndex:e.getRowIndex?.(),node:o,data:o?.data,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?.(),hideTooltipCallback:()=>this.tooltipManager?.hideTooltip(!0)}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},Vc=new ks,z=null,ce=class Un extends b{constructor(t,i){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Vc.next(),this.cssClassManager=new vt(()=>this.eGui),this.componentSelectors=new Map((i??[]).map(o=>[o.selector,o])),t&&this.setTemplate(t)}preWireBeans(t){super.preWireBeans(t)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(t,i){t&&this.gos&&(this.applyElementsToComponent(t),this.createChildComponentsFromTags(t,i))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(t){let{newTooltipText:i,showDelayOverride:o,hideDelayOverride:s,location:r,shouldDisplayTooltip:n}=t||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==i&&(this.tooltipText=i);let a=()=>this.tooltipText;i!=null&&(this.tooltipFeature=this.createBean(new ai({getTooltipValue:a,getGui:()=>this.getGui(),getLocation:()=>r??"UNKNOWN",getColDef:t?.getColDef,getColumn:t?.getColumn,getTooltipShowDelayOverride:o!=null?()=>o:void 0,getTooltipHideDelayOverride:s!=null?()=>s:void 0,shouldDisplayTooltip:n})))}getDataRefAttribute(t){return t.getAttribute?t.getAttribute("data-ref"):null}applyElementsToComponent(t,i,o,s=null){if(i===void 0&&(i=this.getDataRefAttribute(t)),i){let r=this[i];if(r===z)this[i]=s??t;else{let n=o&&o[i];!this.suppressDataRefValidation&&!n&&S(`Issue with data-ref: ${i} on ${this.constructor.name} with ${r}`)}}}createChildComponentsFromTags(t,i){Ac(t.childNodes).forEach(s=>{if(!(s instanceof HTMLElement))return;let r=this.createComponentFromElement(s,n=>{n.getGui()&&this.copyAttributesFromNode(s,n.getGui())},i);if(r){if(r.addItems&&s.children.length){this.createChildComponentsFromTags(s,i);let n=Array.prototype.slice.call(s.children);r.addItems(n)}this.swapComponentForNode(r,t,s)}else s.childNodes&&this.createChildComponentsFromTags(s,i)})}createComponentFromElement(t,i,o){let s=t.nodeName,r=this.getDataRefAttribute(t),n=s.indexOf("AG-")===0,a=n?this.componentSelectors.get(s):null,l=null;if(a){Un.elementGettingCreated=t;let c=o&&r?o[r]:void 0;l=new a.component(c),l.setParentComponent(this),this.createBean(l,null,i)}else n&&S(`Missing selector: ${s}`);return this.applyElementsToComponent(t,r,o,l),l}copyAttributesFromNode(t,i){kc(t.attributes,(o,s)=>i.setAttribute(o,s))}swapComponentForNode(t,i,o){let s=t.getGui();i.replaceChild(s,o),i.insertBefore(document.createComment(o.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,t))}activateTabIndex(t){let i=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui()),t.forEach(o=>o.setAttribute("tabindex",i.toString()))}setTemplate(t,i,o){let s=Li(t);this.setTemplateFromElement(s,i,o)}setTemplateFromElement(t,i,o,s=!1){if(this.eGui=t,this.suppressDataRefValidation=s,i)for(let r=0;r<i.length;r++){let n=i[r];this.componentSelectors.set(n.selector,n)}this.wireTemplate(t,o)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(t){this.parentComponent=t}getParentComponent(){return this.parentComponent}setGui(t){this.eGui=t}queryForHtmlElement(t){return this.eGui.querySelector(t)}getContainerAndElement(t,i){let o=i;return t==null?null:(o||(o=this.eGui),As(t)?{element:t,parent:o}:{element:t.getGui(),parent:o})}prependChild(t,i){let{element:o,parent:s}=this.getContainerAndElement(t,i)||{};!o||!s||s.insertAdjacentElement("afterbegin",o)}appendChild(t,i){let{element:o,parent:s}=this.getContainerAndElement(t,i)||{};!o||!s||s.appendChild(o)}isDisplayed(){return this.displayed}setVisible(t,i={}){if(t!==this.visible){this.visible=t;let{skipAriaHidden:o}=i;Mc(this.eGui,t,{skipAriaHidden:o})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;let{skipAriaHidden:o}=i;pe(this.eGui,t,{skipAriaHidden:o});let s={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(s)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}addGuiEventListener(t,i,o){this.eGui.addEventListener(t,i,o),this.addDestroyFunc(()=>this.eGui.removeEventListener(t,i))}addCssClass(t){this.cssClassManager.addCssClass(t)}removeCssClass(t){this.cssClassManager.removeCssClass(t)}containsCssClass(t){return this.cssClassManager.containsCssClass(t)}addOrRemoveCssClass(t,i){this.cssClassManager.addOrRemoveCssClass(t,i)}},_n={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},Wc=(()=>{let e=new Set(Object.values(_n));return e.add("eye"),e})();function Uc(e,t,i){let o=ze(e,t,i);if(o){let{className:r}=o;if(typeof r=="string"&&r.indexOf("ag-icon")>-1||typeof r=="object"&&r["ag-icon"])return o}let s=document.createElement("span");return s.appendChild(o),s}function ze(e,t,i,o){let s=null,r=i&&i.getColDef().icons;if(r&&(s=r[e]),t&&!s){let n=t.get("icons");n&&(s=n[e])}if(s){let n;if(typeof s=="function")n=s();else if(typeof s=="string")n=s;else throw new Error("icon from grid options needs to be a string or a function");if(typeof n=="string")return Li(n);if(As(n))return n;S("iconRenderer should return back a string or a dom object")}else{let n=document.createElement("span"),a=_n[e]??(Wc.has(e)?e:void 0);return a||(o?a=e:(S(`Did not find icon ${e}`),a="")),n.setAttribute("class",`ag-icon ag-icon-${a}`),n.setAttribute("unselectable","on"),Xe(n,"presentation"),n}}var _c=class extends ce{constructor(){super(...arguments),this.dragSource=null,this.eIcon=z,this.eLabel=z}postConstruct(){let e=t=>Uc(t,this.gos,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`<div class="ag-dnd-ghost ag-unselectable">
2
2
  <span data-ref="eIcon" class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
3
3
  <div data-ref="eLabel" class="ag-dnd-ghost-label"></div>
4
4
  </div>`)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t=!1){Be(this.eIcon);let i=null;e||(e=this.dragSource?.getDefaultIconName?this.dragSource?.getDefaultIconName():"notAllowed"),i=this.dropIconMap[e],this.eIcon.classList.toggle("ag-shake-left-to-right",t),!(i===this.dropIconMap.hide&&this.gos.get("suppressDragLeaveHidesColumns"))&&i&&this.eIcon.appendChild(i)}setLabel(e){this.eLabel.textContent=qe(e)}};function jn(e,t,i){if(i===0)return!1;let o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=i}var xt=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new ri,this.eElement=e,this.preventMouseClick=t;let i=this.onTouchStart.bind(this),o=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",o,{passive:!0}),this.eElement.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",i,{passive:!0}),this.eElement.removeEventListener("touchmove",o,{passive:!0}),this.eElement.removeEventListener("touchend",s,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;let t=this.touchStart;window.setTimeout(()=>{let i=this.touchStart===t;if(this.touching&&i&&!this.moved){this.moved=!0;let o={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(o)}},500)}onTouchMove(e){if(!this.touching)return;let t=this.getActiveTouch(e.touches);if(!t)return;!jn(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){let t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){let e=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){let i={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(i),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}};function fi(e,t){return`<span data-ref="eSort${e}" class="ag-sort-indicator-icon ag-sort-${t} ag-hidden" aria-hidden="true"></span>`}var jc=`<span class="ag-sort-indicator-container">