@turquoisehealth/pit-viper 2.119.1-dev.0 → 2.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_src/assets/sprite-v2.svg +1 -1
- package/_src/assets/sprite.svg +1 -1
- package/package.json +1 -1
- package/pv-components/dist/vue/base/components/base/PvButton/helpers.d.ts +0 -1
- package/pv-components/dist/vue/base/components/base/PvMenu/PvMenuControlPanel.vue.d.ts +0 -6
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +289 -206
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +0 -31
- package/pv-components/dist/vue/base/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +1 -0
- package/pv-components/dist/vue/base/components/base/PvPopoverV2/types.d.ts +1 -6
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButton.vue.d.ts +177 -20
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButtonTrigger/PvSelectButtonTrigger.vue.d.ts +9 -4
- package/pv-components/dist/vue/base/components/base/index.d.ts +1 -1
- package/pv-components/dist/vue/base/pv-components-base.js +29 -29
- package/pv-components/dist/vue/base/pv-components-base.mjs +3569 -3560
- package/pv-components/dist/vue/base/pv-components-base.umd.js +29 -29
- package/pv-components/dist/vue/charts/pv-components-charts.d.ts +491 -0
- package/pv-components/dist/vue/charts/pv-components-charts.js +259 -0
- package/pv-components/dist/vue/charts/pv-components-charts.mjs +121834 -0
- package/pv-components/dist/vue/charts/pv-components-charts.umd.js +259 -0
- package/pv-components/dist/vue/tables/pv-components-tables.d.ts +299 -0
- package/pv-components/dist/vue/tables/pv-components-tables.js +223 -0
- package/pv-components/dist/vue/tables/pv-components-tables.mjs +47028 -0
- package/pv-components/dist/vue/tables/pv-components-tables.umd.js +223 -0
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.js +17 -17
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +4376 -5532
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.umd.js +17 -17
- package/pv-components/dist/web/pv-components.iife.js +31 -31
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".pv-popover-list[data-v-cda1af8c]{font-size:14px}.pv-icon-button[data-v-79a7def3]{background-color:transparent;border:none}.pv-icon-button[data-v-79a7def3]:hover{cursor:pointer;color:#176f6f}.pv-select[data-v-79a7def3]{padding-top:4px;padding-bottom:4px}.pv-badge-md[data-v-fc3c1104]{--inset-size: 2px 2px;min-height:20px;max-height:20px;min-width:20px;font-weight:500}.pv-badge-sm[data-v-fc3c1104]{--inset-size: 0 2px;min-height:16px;max-height:16px;min-width:16px;font-weight:500}.pv-surface-lighten-5[data-v-fc3c1104]{background-color:#e0e5e4}.pv-text-secondary[data-v-fc3c1104]{color:#4b595c}.pv-menu-item-disabled[data-v-f0f5eb5f]{pointer-events:none;background:#ececec}.pv-menu-item[data-v-f0f5eb5f]{cursor:pointer}.pv-table-row-count{position:absolute;right:12px;top:6px;opacity:1;background-color:#f7f8f8;transition:opacity .3s ease}.pv-table-group-cell:hover .pv-table-row-count{opacity:0}.pv-table-row-number{padding:8px 12px 8px 0;text-align:center;color:#89989b}.focus-button{opacity:0;transition:opacity .2s ease;position:absolute;right:0;top:50%;transform:translateY(-50%)}.option-label:hover .focus-button{opacity:1;background-color:#e8f2f4}.suggested-label[data-v-7f711413]:hover{color:#16696d}.ag-custom-header-cell[data-v-08855a14]{height:100%;align-items:center}.ag-header-actions .ag-header-cell-menu-button[data-v-08855a14]{opacity:0;transition:opacity .2s ease-in-out}.ag-header-cell-menu-button:hover .ag-header-actions .ag-header-cell-menu-button[data-v-08855a14]{opacity:1}.ag-header-cell-menu-button:focus .ag-header-actions .ag-header-cell-menu-button[data-v-08855a14]{opacity:1}.pv-table-row-number[data-v-706ed5a9]{padding:8px 12px 8px 0;text-align:center;color:#89989b}.pv-text-tertiary[data-v-a5c1e2d6]{color:#6e8081}.pv-query-builder-input-wrapper[data-v-f23d0721]{display:flex;align-items:center;position:relative;width:100%;background:#f7f8f8;padding:.25rem;border-radius:.5rem;border:2px solid transparent;font-size:.75rem;min-height:2.25rem;cursor:text}.pv-query-builder-input[data-v-f23d0721]{justify-content:start;overflow-x:hidden}.pv-query-builder-input-wrapper input[data-v-f23d0721]{border:none;background:transparent;outline:none;font-size:.75rem}.pv-query-builder-input-wrapper[data-v-f23d0721]:focus-within{border:2px solid #36c5ba}.pv-table-overlay{position:absolute;z-index:2;background:#fff;width:100%;height:calc(100% - 40px);top:80px;pointer-events:none}.ag-header-cell-resize{border:none!important}.ag-row-group-leaf-indent{padding-left:7px;margin-left:0}.ag-custom-loading-cell{width:100%;height:40%;margin:15px;background-color:#ccc;border-radius:4px}.ag-group-value{width:100%}.ag-menu-option:hover{background-color:#f7f8f8}.ag-menu-option:active{background-color:#e8f2f4}.ag-menu-option-text{font-family:Inter,sans-serif}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue");var fo=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,o){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&o&&(s=new Set,i.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,o=!1){this.getListeners(e,o,!0).add(t)}removeEventListener(e,t,o=!1){const i=this.getListeners(e,o,!1);i&&(i.delete(t),i.size===0&&(o?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){const 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){const o=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const i=(a,l)=>a.forEach(d=>{if(!l.has(d))return;const u=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>d(e)):()=>d(e);t?this.dispatchAsync(u):u()}),s=this.getListeners(o,t,!1)??new Set,r=new Set(s);r.size>0&&i(r,s),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(o,e)):()=>a(o,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function df(e,t){return t}function Xa(e){return e?.getLocaleTextFunc()??df}function At(e,t,o){o==null||typeof o=="string"&&o==""?Za(e,t):Tt(e,t,o)}function Tt(e,t,o){e.setAttribute(Jc(t),o.toString())}function Za(e,t){e.removeAttribute(Jc(t))}function Jc(e){return`aria-${e}`}function et(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function cf(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function uf(e){return parseInt(e.getAttribute("aria-posinset"),10)}function hf(e){return e.getAttribute("aria-label")}function bt(e,t){At(e,"label",t)}function Ti(e,t){At(e,"labelledby",t)}function Ja(e,t){At(e,"describedby",t)}function eu(e,t){At(e,"live",t)}function pf(e,t){At(e,"atomic",t)}function gf(e,t){At(e,"relevant",t)}function tu(e,t){At(e,"level",t)}function ou(e,t){At(e,"disabled",t)}function iu(e,t){At(e,"hidden",t)}function eo(e,t){Tt(e,"expanded",t)}function ff(e){Za(e,"expanded")}function su(e,t){Tt(e,"setsize",t)}function ru(e,t){Tt(e,"posinset",t)}function mf(e,t){Tt(e,"multiselectable",t)}function vf(e,t){Tt(e,"rowcount",t)}function nu(e,t){Tt(e,"rowindex",t)}function Cf(e,t){Tt(e,"colcount",t)}function au(e,t){Tt(e,"colindex",t)}function bf(e,t){Tt(e,"colspan",t)}function wf(e,t){Tt(e,"sort",t)}function yf(e){Za(e,"sort")}function va(e,t){At(e,"selected",t)}function lu(e,t){Tt(e,"checked",t===void 0?"mixed":t)}function Sf(e,t){At(e,"controls",t.id),Ti(t,e.id)}function Rf(e,t){At(e,"haspopup",t===!1?null:t)}function du(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Fn,kn,Dn,Mn,Ca,ba,Pn;function nn(){return Fn===void 0&&(Fn=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Fn}function el(){return kn===void 0&&(kn=/(firefox)/i.test(navigator.userAgent)),kn}function cu(){return Dn===void 0&&(Dn=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Dn}function Yo(){return Mn===void 0&&(Mn=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Mn}function td(e){if(!e)return null;const t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!el())?null:t.toString()}function xf(){if(Pn!==void 0)return Pn;if(!document.body)return-1;let e=1e6;const t=el()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){const i=e*2;if(o.style.height=i+"px",i>t||o.clientHeight!==i)break;e=i}return document.body.removeChild(o),Pn=e,e}function Ff(){return ba==null&&uu(),ba}function uu(){const 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 o=t.offsetWidth-t.clientWidth;o===0&&t.clientWidth===0&&(o=null),t.parentNode&&t.parentNode.removeChild(t),o!=null&&(ba=o,Ca=o===0)}function hu(){return Ca==null&&uu(),Ca}function od(e,t,o){const i=e.parentElement;let s=i&&i.firstChild;for(;s;)t&&s.classList.toggle(t,s===e),s=s.nextSibling}var kf="[tabindex], input, select, button, textarea, [href]",pu="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function tl(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,pu),r=wt(e);return i&&!s&&r}function Z(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||iu(e,!t)}function Df(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||iu(e,!t)}function bs(e,t){const o="disabled",i=t?r=>r.setAttribute(o,""):r=>r.removeAttribute(o);i(e);const s=e.querySelectorAll("input")??[];for(const r of s)i(r)}function Qo(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++i>o)break}else if(e===o)break}return!1}function Vi(e){const{height:t,width:o,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:n,paddingTop:a,paddingRight:l,paddingBottom:d,paddingLeft:u,marginTop:h,marginRight:p,marginBottom:g,marginLeft:f,boxSizing:m}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(o||"0"),borderTopWidth:parseFloat(i||"0"),borderRightWidth:parseFloat(s||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(n||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(u||"0"),marginTop:parseFloat(h||"0"),marginRight:parseFloat(p||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(f||"0"),boxSizing:m}}function an(e){const t=Vi(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function ws(e){const t=Vi(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function gu(e){const{height:t,marginBottom:o,marginTop:i}=Vi(e);return Math.floor(t+o+i)}function Ar(e){const{width:t,marginLeft:o,marginRight:i}=Vi(e);return Math.floor(t+o+i)}function fu(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:r}=Vi(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function Tr(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function Ir(e,t,o){o&&(t*=-1),e.scrollLeft=t}function rt(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function Dt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function mu(e){return!!e.offsetParent}function wt(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!mu(e)||window.getComputedStyle(e).visibility!=="visible")}function ln(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function vu(e,t,o){o&&o.nextSibling===t||(e.firstChild?o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function Cu(e,t){for(let o=0;o<t.length;o++){const i=t[o],s=e.children[o];s!==i&&e.insertBefore(i,s)}}function Mf(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Vs(e,t){if(t)for(const o of Object.keys(t)){const i=t[o];if(!o||!o.length||i==null)continue;const s=Mf(o),r=i.toString(),n=r.replace(/\s*!important/g,""),a=n.length!=r.length?"important":void 0;e.style.setProperty(s,n,a)}}function Pf(e){return e.clientWidth<e.scrollWidth}function Ef(e){return e.clientHeight<e.scrollHeight}function Lr(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Zt(e,t)}function Zt(e,t){t=ol(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function ss(e,t){t=ol(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function ol(e){return typeof e=="number"?`${e}px`:e}function dn(e){return e instanceof Node||e instanceof HTMLElement}function Si(e,t,o){o==null||o===""?e.removeAttribute(t):e.setAttribute(t,o.toString())}function No(e,t,o){const s=Pu(e).ResizeObserver,r=s?new s(o):null;return r?.observe(t),()=>r?.disconnect()}function Af(e){const t=Li(e),o="getSelection"in t?t.getSelection():null,i=[];for(let s=0;s<(o?.rangeCount??0);s++){const r=o?.getRangeAt(s);r&&i.push(r)}return{selection:o,ranges:i}}function bu(e,t){if(!e.gos.get("enableCellTextSelection")||!el()&&!nn())return t();const{selection:i,ranges:s}=Af(e);t(),i?.removeAllRanges();for(const r of s)i?.addRange(r)}function Wt(e,t){const o=Pu(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var wu="data-ref",En;function id(){return En??(En=document.createTextNode(" ")),En.cloneNode()}function Me(e){const{attrs:t,children:o,cls:i,ref:s,role:r,tag:n}=e,a=document.createElement(n);if(i&&(a.className=i),s&&a.setAttribute(wu,s),r&&a.setAttribute("role",r),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(o)if(typeof o=="string")a.textContent=o;else{let l=!0;for(const d of o)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(id()),l=!1),a.append(Me(d)),a.appendChild(id())))}return a}function nt(e){return e==null||e===""?null:e}function j(e){return e!=null&&e!==""}function Ee(e){return!j(e)}function uo(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function ys(e,t){const o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i}function hr(e,t,o=!1){const i=e==null,s=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function r(n,a){return n>a?1:n<a?-1:0}if(typeof e!="string"||!o)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}var yu="https://www.ag-grid.com",sd={};function il(e,t){sd[t]||(e(),sd[t]=!0)}function Ss(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function rs(e,...t){il(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function Ri(e,...t){il(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var Tf={pending:!1,funcs:[]},If={pending:!1,funcs:[]};function wa(e,t="setTimeout",o){const i=t==="raf"?If:Tf;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const r=i.funcs.slice();i.funcs.length=0,i.pending=!1,r.forEach(n=>n())};t==="raf"?Wt(o,s):window.setTimeout(s,0)}function st(e,t,o){let i;return function(...s){const r=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(r,s)},o)}}function rd(e,t){let o=0;return function(...i){const s=this,r=Date.now();r-o<t||(o=r,e.apply(s,i))}}function Su(e,t,o=100,i){const s=Date.now();let r=null,n=!1;const a=()=>{const l=Date.now()-s>o;(e()||l)&&(t(),n=!0,r!=null&&(window.clearInterval(r),r=null))};a(),n||(r=window.setInterval(a,10))}var re="33.2.4",nd=2e3,ad=100,Ru="_version_",xu=null,Xo=`${yu}/javascript-data-grid`;function Lf(e){xu=e}function Bf(e){Xo=e}function Fu(e,t,o){return xu?.getConsoleMessage(e,t)??[Vf(e,t,o)]}function sl(e,t,o,i){e(`error #${t}`,...Fu(t,o,i))}function Of(e){if(!e)return String(e);const t={};for(const o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function Gf(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Of(e)),t}function Br(e){return e===void 0?"undefined":e===null?"null":e}function ya(e,t){return`${e}?${t.toString()}`}function Nf(e,t,o){const i=Array.from(t.entries()).sort((r,n)=>n[1].length-r[1].length);let s=ya(e,t);for(const[r,n]of i){if(r===Ru)continue;const a=s.length-o;if(a<=0)break;const l="...",d=a+l.length,u=n.length-d>ad?n.slice(0,n.length-d)+l:n.slice(0,ad)+l;t.set(r,u),s=ya(e,t)}return s}function ku(e,t){const o=new URLSearchParams;if(o.append(Ru,re),t)for(const r of Object.keys(t))o.append(r,Gf(t[r]));const i=`${Xo}/errors/${e}`,s=ya(i,o);return s.length<=nd?s:Nf(i,o,nd)}var Vf=(e,t,o)=>{const i=ku(e,t);return`${o?o+`
|
|
3
|
+
`:""}Visit ${i}${o?"":`
|
|
4
|
+
Alternatively register the ValidationModule to see the full message in the console.`}`};function H(...e){sl(rs,e[0],e[1])}function he(...e){sl(Ri,e[0],e[1])}function Sa(e,t,o){sl(Ri,e,t,o)}function Hf(e,t){const o=t[0];return`error #${o} `+Fu(o,t[1],e).join(" ")}function Lo(...e){return Hf(void 0,e)}function Du(e,t){return e.get("rowModelType")===t}function $t(e,t){return Du(e,"clientSide")}function yt(e,t){return Du(e,"serverSide")}function tt(e,t){return e.get("domLayout")===t}function Qt(e){return Or(e)!==void 0}function rl(e){return typeof e.get("getRowHeight")=="function"}function _f(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function kt(e,t,o=!1,i){const{gos:s,environment:r}=e;if(i==null&&(i=r.getDefaultRowHeight()),rl(s)){if(o)return{height:i,estimated:!0};const l={node:t,data:t.data},d=s.getCallback("getRowHeight")(l);if(Ra(d))return d===0&&H(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return zf(s);const n=s.get("rowHeight");return{height:n&&Ra(n)?n:i,estimated:!1}}function zf(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Ra(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Oo(e){const{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||Ee(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(H(24),t.getDefaultRowHeight())}function Ra(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function Mu(e,t,o){const i=t[e.getDomDataKey()];return i?i[o]:void 0}function Ii(e,t,o,i){const s=e.getDomDataKey();let r=t[s];Ee(r)&&(r={},t[s]=r),r[o]=i}function Ge(e){const{gos:t,eGridDiv:o}=e;let i=null;const s=t.get("getDocument");return s&&j(s)?i=s():o&&(i=o.ownerDocument),i&&j(i)?i:document}function Pu(e){return Ge(e).defaultView||window}function Li(e){return e.eGridDiv.getRootNode()}function Ae(e){return Li(e).activeElement}function nl(e){let t=null,o=null;try{t=Ge(e).fullscreenElement}catch{}finally{t||(t=Li(e));const i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t?.documentElement:o=t}return o}function Wf(e){return nl(e)?.clientWidth??(window.innerHeight||-1)}function $f(e){return nl(e)?.clientHeight??(window.innerHeight||-1)}function Uf(e,t,o){const s=e.getBoundingClientRect().height,r=Wf(o)-2,n=$f(o)-2;if(!e.offsetParent)return;const l=fu(e.offsetParent),{clientY:d,clientX:u}=t;let h=d-l.top-s/2,p=u-l.left-10;const g=Ge(o),f=g.defaultView||window,m=f.pageYOffset||g.documentElement.scrollTop,b=f.pageXOffset||g.documentElement.scrollLeft;r>0&&p+e.clientWidth>r+b&&(p=r+b-e.clientWidth),p<0&&(p=0),n>0&&h+e.clientHeight>n+m&&(h=n+m-e.clientHeight),h<0&&(h=0),e.style.left=`${p}px`,e.style.top=`${h}px`}function Rs(e){const t=Ge(e),o=Ae(e);return o===null||o===t.body}function xi(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function cn(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||tt(e,"print"))}function Ht(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function xs(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function al(e){return e.get("grandTotalRow")}function Bi(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function ll(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function un(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Fs(e){const t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(H(25,{id:i}),i=String(i)),i}}function jf(e,t){const o=e.get("groupHideParentOfSingleChild");return!!(o===!0||o==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Kf(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function qf(e,t){const o=e.get("suppressGroupChangesColumnVisibility");if(o===!0||t&&o==="suppressHideOnGroup"||!t&&o==="suppressShowOnUngroup")return!1;const i=e.get("suppressRowGroupHidesColumns");if(t&&i===!0)return!1;const s=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&s===!0)}function Zo(e){return e?.checkboxes??!0}function pr(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function ks(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function An(e){return e?.hideDisabledCheckboxes??!1}function Eu(e){return typeof e.get("rowSelection")!="string"}function si(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Au(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const o=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return o&&i?!1:o?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Yf(e){const t=Au(e);return t===!0||t==="enableSelection"}function Qf(e){const t=Au(e);return t===!0||t==="enableDeselection"}function xa(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Or(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function ri(e){return Or(e)==="multiRow"}function Xf(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Tu(e){const t=e.get("rowSelection");if(typeof t=="string"){const o=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return o&&i?"filteredDescendants":o?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Iu(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function Ds(e){const t=Tu(e);return t==="descendants"||t==="filteredDescendants"}function Tn(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Ke(e){return e.get("columnMenu")==="legacy"}function Lu(e){return!Ke(e)}function dl(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Zf(e,t,o){typeof e!="object"&&(e={});const i={...e};return o.forEach(s=>{const r=t[s];typeof r<"u"&&(i[s]=r)}),i}function Jf(e,t){if(!e)return;const o={};let i=!1;if(Object.keys(e).forEach(n=>{o[n]=e[n],i=!0}),!i)return;const s={type:"gridOptionsChanged",options:o};t.dispatchEvent(s);const r={type:"componentStateChanged",...o};t.dispatchEvent(r)}function J(e,t){return e.addGridCommonParams(t)}function Bu(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var Ou="__ag_Grid_Stop_Propagation",em=["touchstart","touchend","touchmove","touchcancel","scroll"],tm=["wheel"],In={};function mo(e){e[Ou]=!0}function zt(e){return e[Ou]===!0}var Gu=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof In[o]=="boolean")return In[o];const i=document.createElement(e[o]||"div");return o="on"+o,In[o]=o in i}})();function Nu(e,t,o){let i=t;for(;i;){const s=Mu(e,i,o);if(s)return s;i=i.parentElement}return null}function Fa(e,t){return!t||!e?!1:im(t).indexOf(e)>=0}function om(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function im(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():om(t)}function sm(e,t,o,i){const s=Vu(o);let r;s!=null&&(r={passive:s}),e&&e.addEventListener&&e.addEventListener(t,o,i,r)}var Vu=e=>{const t=em.includes(e),o=tm.includes(e);if(t)return!0;if(o)return!1},A=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,o){this.localEventService||(this.localEventService=new fo),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.localEventService?.removeEventListener(e,t,o)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const o=[];for(const i of Object.keys(t)){const s=t[i];s&&o.push(this._setupListener(e,i,s))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let i;return rm(e)?(e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null)):(e instanceof HTMLElement?sm(this.beans.frameworkOverrides,e,t,o):e.addEventListener(t,o),i=()=>(e.removeEventListener(t,o),null)),this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupGridOptionListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const i=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const o=e.join("-")+this.propertyListenerId++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=s.changeSet.id}const r={type:"gridPropertyChanged",changeSet:s.changeSet,source:s.source};t(r)};e.forEach(s=>this.setupGridOptionListener(s,i))}getLocaleTextFunc(){return Xa(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o}createBean(e,t,o){return(t||this.stubContext).createBean(e,o)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function rm(e){return e.__addEventListener!==void 0}var Hu=new Set(["__proto__","constructor","prototype"]);function nm(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o<e.length;o++)t(o.toString(),e[o]);return}for(const o of Object.keys(e))t(o,e[o])}}function Xe(e,t,o=!0,i=!1){j(t)&&nm(t,(s,r)=>{if(Hu.has(s))return;let n=e[s];n!==r&&(i&&n==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(n={},e[s]=n),ld(r)&&ld(n)&&!Array.isArray(n)?Xe(n,r,o,i):(o||r!==void 0)&&(e[s]=r))})}function ns(e,t,o){if(!t||!e)return;if(!o)return e[t];const i=t.split(".");let s=e;for(let r=0;r<i.length;r++){if(s==null)return;s=s[i[r]]}return s}function ld(e){return typeof e=="object"&&e!==null}var am=/[&<>"']/g,lm={"&":"&","<":"<",">":">",'"':""","'":"'"};function Mt(e,t){if(e==null)return null;const o=e.toString().toString();return t?o:o.replace(am,i=>lm[i])}var dm={resizable:!0,sortable:!0},cm=0;function _u(){return cm++}function to(e){return e instanceof hn}var hn=class extends A{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=_u(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new fo,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Mt(o)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t?.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,o?.initCol(this),i?.initCol(this)}setColDef(e,t,o){const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",o)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=j(t)&&t.indexOf(".")>=0&&!i,this.tooltipFieldContainsDots=j(o)&&o.indexOf(".")>=0&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const o=e.width,i=e.initialWidth;return o!=null?t=o:i!=null?t=i:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}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.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const o=this.frameworkEventListenerService?.wrap(t)??t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(t)??t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return J(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable(this,e)??!1}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){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??dm[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const o=this.createColumnFunctionCallbackParams(e);return t(o)}return!1}createColumnEvent(e,t){return J(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Ee(this.sort)}isSorting(){return j(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}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.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return H(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("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){const o=e===!0;this.visible!==o&&(this.visible=o,this.dispatchColEvent("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};const t=e.getPaddingLevel()+1;let o=!0;for(;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:o}}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){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return J(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Ee(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(Ee(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)}setActualWidth(e,t,o=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),o||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,o){const i=this.createColumnEvent(e,t);o&&Xe(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function je(e){return e instanceof as}var as=class extends A{constructor(e,t,o,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=_u(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}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}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(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{to(t)?e.push(t):je(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const 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,o=!1;const i=this.findChildrenRemovingPadding();for(let r=0,n=i.length;r<n;r++){const a=i[r];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,o=!0):l==="closed"?(t=!0,o=!0):(e=!0,t=!0)}const s=e&&t&&o;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=o=>{o.forEach(i=>{je(i)&&i.isPadding()?t(i.children):e.push(i)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},um={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},hm=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=uo(e);let o=0;for(;;){let i=e??t;if(i?o!==0&&(i+="_"+o):i=o,!this.existingKeys[i])return this.existingKeys[i]=!0,String(i);o++}}},ka=Object.freeze([]);function Se(e){if(e?.length)return e[e.length-1]}function Pt(e,t,o){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((i,s)=>o?o(i,t[s]):t[s]===i)}function js(e,t){if(e)for(const o of e)t(o)}function at(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function dd(e,t,o){for(let i=0;i<t.length;i++)at(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(o,0,t[i])}var ni="ag-Grid-AutoColumn",zu="ag-Grid-SelectionColumn",pm="ag-Grid-RowNumbersColumn";function cl(e){const t=[],o=i=>{for(let s=0;s<i.length;s++){const r=i[s];to(r)?t.push(r):je(r)&&o(r.getChildren())}};return o(e),t}function hi(e){return e.reduce((t,o)=>t+o.getActualWidth(),0)}function Go(e,t,o){const i={};if(!t)return;ho(null,t,r=>{i[r.getInstanceId()]=r}),o&&ho(null,o,r=>{i[r.getInstanceId()]=null});const s=Object.values(i).filter(r=>r!=null);e.context.destroyBeans(s)}function pn(e){return e.getId().startsWith(ni)}function vo(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(zu)??!1}function Ms(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(pm)??!1}function Gr(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function Wu(e,t){return Pt(e,t,(o,i)=>o.getColId()===i.getColId())}function $u(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Jo(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function ul(e,t){const o=e===t,i=e.getColDef()===t,s=e.getColId()==t;return o||i||s}var gm=(e,t)=>(o,i)=>{const s={value1:void 0,value2:void 0};let r=!1;return e&&(e[o]!==void 0&&(s.value1=e[o],r=!0),j(i)&&e[i]!==void 0&&(s.value2=e[i],r=!0)),!r&&t&&(t[o]!==void 0&&(s.value1=t[o]),j(i)&&t[i]!==void 0&&(s.value2=t[i])),s};function Uu(e,t=null,o,i,s){const r=new hm,{existingCols:n,existingGroups:a,existingColKeys:l}=fm(i);r.addExistingKeys(l);const d=ju(e,t,0,o,n,r,a,s),{colGroupSvc:u}=e,h=u?.findMaxDepth(d,0)??0,p=u?u.balanceColumnTree(d,0,h,r):d;return ho(null,p,(f,m)=>{je(f)&&f.setupExpandable(),f.originalParent=m}),{columnTree:p,treeDept:h}}function fm(e){const t=[],o=[],i=[];return e&&ho(null,e,s=>{if(je(s)){const r=s;o.push(r)}else{const r=s;i.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:o,existingColKeys:i}}function ju(e,t,o,i,s,r,n,a){if(!t)return[];const{colGroupSvc:l}=e,d=new Array(t.length);for(let u=0;u<d.length;u++){const h=t[u];l&&ym(h)?d[u]=l.createProvidedColumnGroup(i,h,o,s,r,n,a):d[u]=mm(e,i,h,s,r,a)}return d}function mm(e,t,o,i,s,r){const n=Cm(o,i);n&&i?.splice(n.idx,1);let a=n?.column;if(a){const l=Nr(e,o,a.getColId());a.setColDef(l,o,r),vm(e,a,l,r)}else{const l=s.getUniqueKey(o.colId,o.field),d=Nr(e,o,l);a=new hn(d,o,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function Ku(e,t,o,i,s,r,n,a){const{sortSvc:l,pinnedCols:d,colFlex:u}=e;o!==void 0&&t.setVisible(!o,a),l&&(l.updateColSort(t,i,a),s!==void 0&&l.setColSortIndex(t,s)),r!==void 0&&d?.setColPinned(t,r),n!==void 0&&u?.setColFlex(t,n)}function vm(e,t,o,i){Ku(e,t,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,i);const s=t.getFlex();if(!(s!=null&&s>0))if(o.width!=null)t.setActualWidth(o.width,i);else{const r=t.getActualWidth();t.setActualWidth(r,i)}}function Cm(e,t){if(t)for(let o=0;o<t.length;o++){const i=t[o].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[o].getId()===e.colId)return{idx:o,column:t[o]};continue}if(e.field!=null){if(i.field===e.field)return{idx:o,column:t[o]};continue}if(i===e)return{idx:o,column:t[o]}}}function Nr(e,t,o,i){const{gos:s,dataTypeSvc:r,validation:n}=e,a={},l=s.get("defaultColDef");Xe(a,l,!1,!0);const d=bm(e,a,t,o);d&&wm(e,d,a),Xe(a,t,!1,!0);const u=s.get("autoGroupColumnDef"),h=Ht(s);return t.rowGroup&&u&&h&&Xe(a,{sort:u.sort,initialSort:u.initialSort},!1,!0),r?.validateColDef(a),n?.validateColDef(a,o,i),a}function bm(e,t,o,i){const s=e.dataTypeSvc?.updateColDefAndGetColumnType(t,o,i),r=o.type??s??t.type;return t.type=r,r?Gr(r):void 0}function wm(e,t,o){if(!t.length)return;const i=Object.assign({},um),s=e.gos.get("columnTypes")||{};for(const r of Object.keys(s)){const n=s[r];r in i?H(34,{key:r}):(n.type&&H(35),i[r]=n)}t.forEach(r=>{const n=i[r.trim()];n?Xe(o,n,!1,!0):H(36,{t:r})})}function ym(e){return e.children!==void 0}function ho(e,t,o){if(t)for(let i=0;i<t.length;i++){const s=t[i];je(s)&&ho(s,s.getChildren(),o),o(s,e)}}function qu(e,t){const o=[],i=[],s=[];return e.forEach(n=>{const a=n.getColDef().lockPosition;a==="right"?s.push(n):a==="left"||a===!0?o.push(n):i.push(n)}),t.get("enableRtl")?[...s,...i,...o]:[...o,...i,...s]}function Yu(e,t){let o=!0;return ho(null,t,i=>{if(!je(i))return;const s=i,r=s.getColGroupDef();if(!(r&&r.marryChildren))return;const a=[];s.getLeafColumns().forEach(p=>{const g=e.indexOf(p);a.push(g)});const l=Math.max.apply(Math,a),d=Math.min.apply(Math,a),u=l-d,h=s.getLeafColumns().length-1;u>h&&(o=!1)}),o}function Qu(e,t){if(!e||e.length==0)return;const o=t(e[0]);for(let i=1;i<e.length;i++)if(o!==t(e[i]))return;return o}function Xu(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=Qu(t,r=>r.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:o})}function Sm(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=Qu(t,r=>r.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:o})}function Zu(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function Vr(e,t,o,i,s=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:o,source:i})}function pt(e,t,o){const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:r,autoColSvc:n,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:u,environment:h,valueColsSvc:p,eventSvc:g,gos:f}=e,m=i.getColDefCols()||[];if(!m?.length)return!1;if(t?.state&&!t.state.forEach)return H(32),!1;const b=(x,P,k,D,v)=>{if(!x)return;const C=gm(P,t.defaultState),R=C("flex").value1;if(Ku(e,x,C("hide").value1,C("sort").value1,C("sortIndex").value1,C("pinned").value1,R,o),R==null){const F=C("width").value1;if(F!=null){const L=x.getColDef().minWidth??h.getDefaultColumnMinWidth();L!=null&&F>=L&&x.setActualWidth(F,o)}}v||!x.isPrimary()||(p?.syncColumnWithState(x,o,C),s?.syncColumnWithState(x,o,C,k),r?.syncColumnWithState(x,o,C,D))},w=(x,P,k)=>{const D=eh(e,o),v=P.slice(),C={},R={},F=[],L=[],O=[];let T=0;const _=s?.columns.slice()??[],V=r?.columns.slice()??[];x.forEach(I=>{const W=I.colId;if(W.startsWith(ni)){F.push(I),O.push(I);return}if(vo(W)){L.push(I),O.push(I);return}const U=k(W);U?(b(U,I,C,R,!1),at(v,U)):(O.push(I),T+=1)});const G=I=>b(I,null,C,R,!1);v.forEach(G),s?.sortColumns(cd.bind(s,C,_)),r?.sortColumns(cd.bind(r,R,V)),i.refreshCols(!1);const B=(I,W,z=[])=>{W.forEach(U=>{const $=I(U.colId);at(z,$),b($,U,null,null,!0)}),z.forEach(G)};return B(I=>n?.getColumn(I)??null,F,n?.getColumns()?.slice()),B(I=>a?.getColumn(I)??null,L,a?.getColumns()?.slice()),Rm(t,i,f),d.refresh(o),g.dispatchEvent({type:"columnEverythingChanged",source:o}),D(),{unmatchedAndAutoStates:O,unmatchedCount:T}};l?.start();let{unmatchedAndAutoStates:S,unmatchedCount:y}=w(t.state||[],m,x=>i.getColDefCol(x));if(S.length>0||j(t.defaultState)){const x=u?.getPivotResultCols()?.list??[];y=w(S,x,P=>u?.getPivotResultCol(P)??null).unmatchedCount}return l?.finish(),y===0}function Ju(e,t){const{colModel:o,autoColSvc:i,selectionColSvc:s}=e,r=o.getColDefCols();if(!r?.length)return;const n=o.getColDefColTree(),a=cl(n),l=[];let d=1e3,u=1e3;const h=b=>{const w=th(b);Ee(w.rowGroupIndex)&&w.rowGroup&&(w.rowGroupIndex=d++),Ee(w.pivotIndex)&&w.pivot&&(w.pivotIndex=u++),l.push(w)};i?.getColumns()?.forEach(h),s?.getColumns()?.forEach(h),a?.forEach(h),pt(e,{state:l},t);const p=i?.getColumns()??[],m=[...s?.getColumns()??[],...p,...r].map(b=>({colId:b.colId}));pt(e,{state:m,applyOrder:!0},t)}function eh(e,t){const{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:s,colModel:r,sortSvc:n,eventSvc:a}=e,l={rowGroupColumns:o?.columns.slice()??[],pivotColumns:i?.columns.slice()??[],valueColumns:s?.columns.slice()??[]},d=Ps(e),u={};return d.forEach(h=>{u[h.colId]=h}),()=>{const h=(k,D,v,C)=>{const R=D.map(C),F=v.map(C);if(Pt(R,F))return;const O=new Set(D);v.forEach(_=>{O.delete(_)||O.add(_)});const T=[...O];a.dispatchEvent({type:k,columns:T,column:T.length===1?T[0]:null,source:t})},p=k=>{const D=[];return r.forAllCols(v=>{const C=u[v.getColId()];C&&k(C,v)&&D.push(v)}),D},g=k=>k.getColId();h("columnRowGroupChanged",l.rowGroupColumns,o?.columns??[],g),h("columnPivotChanged",l.pivotColumns,i?.columns??[],g);const m=p((k,D)=>{const v=k.aggFunc!=null,C=v!=D.isValueActive(),R=v&&k.aggFunc!=D.getAggFunc();return C||R});m.length>0&&Zu(a,"columnValueChanged",m,t),Vr(a,p((k,D)=>k.width!=D.getActualWidth()),!0,t),Xu(a,p((k,D)=>k.pinned!=D.getPinned()),t),Sm(a,p((k,D)=>k.hide==D.isVisible()),t);const x=p((k,D)=>k.sort!=D.getSort()||k.sortIndex!=D.getSortIndex());x.length>0&&n?.dispatchSortChangedEvents(t,x);const P=Ps(e);Fm(d,P,t,r,a)}}function Ps(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,s=t.getColDefCols();if(Ee(s)||!t.isAlive())return[];const r=o?.columns,n=i?.columns,a=[],l=u=>{const h=u.isRowGroupActive()&&r?r.indexOf(u):null,p=u.isPivotActive()&&n?n.indexOf(u):null,g=u.isValueActive()?u.getAggFunc():null,f=u.getSort()!=null?u.getSort():null,m=u.getSortIndex()!=null?u.getSortIndex():null;a.push({colId:u.getColId(),width:u.getActualWidth(),hide:!u.isVisible(),pinned:u.getPinned(),sort:f,sortIndex:m,aggFunc:g,rowGroup:u.isRowGroupActive(),rowGroupIndex:h,pivot:u.isPivotActive(),pivotIndex:p,flex:u.getFlex()??null})};t.forAllCols(u=>l(u));const d=new Map(t.getCols().map((u,h)=>[u.getColId(),h]));return a.sort((u,h)=>{const p=d.has(u.colId)?d.get(u.colId):-1,g=d.has(h.colId)?d.get(h.colId):-1;return p-g}),a}function th(e){const t=(f,m)=>f??m??null,o=e.getColDef(),i=t(o.sort,o.initialSort),s=t(o.sortIndex,o.initialSortIndex),r=t(o.hide,o.initialHide),n=t(o.pinned,o.initialPinned),a=t(o.width,o.initialWidth),l=t(o.flex,o.initialFlex);let d=t(o.rowGroupIndex,o.initialRowGroupIndex),u=t(o.rowGroup,o.initialRowGroup);d==null&&(u==null||u==!1)&&(d=null,u=null);let h=t(o.pivotIndex,o.initialPivotIndex),p=t(o.pivot,o.initialPivot);h==null&&(p==null||p==!1)&&(h=null,p=null);const g=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:r,pinned:n,width:a,flex:l,rowGroup:u,rowGroupIndex:d,pivot:p,pivotIndex:h,aggFunc:g}}function Rm(e,t,o){if(!e.applyOrder||!e.state)return;const i=[];e.state.forEach(s=>{s.colId!=null&&i.push(s.colId)}),xm(t.cols,i,t,o)}function xm(e,t,o,i){if(e==null)return;let s=[];const r={};t.forEach(a=>{if(r[a])return;const l=e.map[a];l&&(s.push(l),r[a]=!0)});let n=0;if(e.list.forEach(a=>{const l=a.getColId();if(r[l]!=null)return;l.startsWith(ni)?s.splice(n++,0,a):s.push(a)}),s=qu(s,i),!Yu(s,o.getColTree())){H(39);return}e.list=s}function Fm(e,t,o,i,s){const r={};t.forEach(u=>r[u.colId]=u);const n={};e.forEach(u=>{r[u.colId]&&(n[u.colId]=!0)});const a=e.filter(u=>n[u.colId]),l=t.filter(u=>n[u.colId]),d=[];l.forEach((u,h)=>{const p=a&&a[h];if(p&&p.colId!==u.colId){const g=i.getCol(p.colId);g&&d.push(g)}}),d.length&&s.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:o})}var cd=(e,t,o,i)=>{const s=e[o.getId()],r=e[i.getId()],n=s!=null,a=r!=null;if(n&&a)return s-r;if(n)return-1;if(a)return 1;const l=t.indexOf(o),d=t.indexOf(i),u=l>=0,h=d>=0;return u&&h?l-d:u?-1:1},km=class extends A{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.refreshAll(Jo(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Jo(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:r,valueColsSvc:n,visibleCols:a,colViewport:l,eventSvc:d}=t,u=this.colDefs?eh(t,e):void 0;o?.expire();const h=this.colDefCols?.list,p=this.colDefCols?.tree,g=Uu(t,this.colDefs,!0,p,e);Go(t,this.colDefCols?.tree,g.columnTree);const f=g.columnTree,m=g.treeDept,b=cl(f),w={};b.forEach(S=>w[S.getId()]=S),this.colDefCols={tree:f,treeDepth:m,list:b,map:w},s?.extractCols(e,h),r?.extractCols(e,h),n?.extractCols(e,h),this.ready=!0,this.refreshCols(!0),a.refresh(e),l.checkViewportColumns(),d.dispatchEvent({type:"columnEverythingChanged",source:e}),u&&(this.changeEventsDispatching=!0,u(),this.changeEventsDispatching=!1),d.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&i?.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;const t=this.cols?.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:i,rowNumbersSvc:s,quickFilter:r,pivotResultCols:n,showRowGroupCols:a,rowAutoHeight:l,visibleCols:d,colViewport:u,eventSvc:h}=this.beans,p=this.selectCols(n,this.colDefCols);this.createColumnsForService([o,i,s],p);const g=_f(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(p),this.positionLockedCols(p),a?.refresh(),r?.refreshCols(),this.setColSpanActive(),l?.setAutoHeightActive(p),d.clear(),u.clear(),!Pt(t,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(const o of e)o&&(o.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)}),o.addColumns(t))}selectCols(e,t){const o=e?.getPivotResultCols()??null;this.showingPivotResult=o!=null;const{map:i,list:s,tree:r,treeDepth:n}=o??t;return this.cols={list:s.slice(),map:{...i},tree:r.slice(),treeDepth:n},o&&(o.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const e=this.isPivotMode()&&!this.showingPivotResult,t=this.beans.valueColsSvc?.columns;return this.cols.list.filter(i=>{const s=pn(i);if(e){const r=t?.includes(i);return s||r}else return s||i.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){pt(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},o)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const o=new Map(t.map((d,u)=>[d,u]));if(!e.list.some(d=>o.has(d)))return;const s=new Map(e.list.map(d=>[d,!0])),r=t.filter(d=>s.has(d)),n=new Map(r.map(d=>[d,!0])),a=e.list.filter(d=>!n.has(d)),l=r.slice();a.forEach(d=>{let u=d.getOriginalParent();if(!u){l.push(d);return}const h=[];for(;!h.length&&u;)u.getLeafColumns().forEach(m=>{const b=l.indexOf(m)>=0,w=h.indexOf(m)<0;b&&w&&h.push(m)}),u=u.getOriginalParent();if(!h.length){l.push(d);return}const p=h.map(f=>l.indexOf(f)),g=Math.max(...p);l.splice(g+1,0,d)}),e.list=l}positionLockedCols(e){e.list=qu(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(){return this.colDefCols?this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[]):void 0}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);const{visibleCols:o,eventSvc:i}=this.beans;o.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=Jo(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Go(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:o,selectionColSvc:i}=this.beans;js(this.colDefCols?.list,e),js(o?.columns?.list,e),js(i?.columns?.list,e),js(t?.getPivotResultCols()?.list,e)}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;const{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let s=0;s<i.length;s++)if(ul(i[s],e))return i[s];return this.beans.autoColSvc?.getColumn(e)??this.beans.selectionColSvc?.getColumn(e)??null}},hl=class extends A{constructor(){super(...arguments),this.dispatchColumnChangedEvent=Zu,this.columns=[],this.columnIndexMap={},this.updateIndexMap=()=>{this.columnIndexMap={},this.columns.forEach((e,t)=>this.columnIndexMap[e.getId()]=t)}}wireBeans(e){this.colModel=e.colModel,this.aggFuncSvc=e.aggFuncSvc,this.visibleCols=e.visibleCols}sortColumns(e){this.columns.sort(e),this.updateIndexMap()}setColumns(e,t){this.setColList(e,this.columns,this.eventName,!0,!0,this.columnProcessors.set,t)}addColumns(e,t){this.updateColList(e,this.columns,!0,!0,this.columnProcessors.add,this.eventName,t)}removeColumns(e,t){this.updateColList(e,this.columns,!1,!0,this.columnProcessors.remove,this.eventName,t)}getColumnIndex(e){return this.columnIndexMap[e]}setColList(e=[],t,o,i,s,r,n){const a=this.colModel.getCols();if(!a||a.length===0)return;const l=new Map;t.forEach((u,h)=>l.set(u,h)),t.length=0,j(e)&&e.forEach(u=>{const h=this.colModel.getColDefCol(u);h&&t.push(h)}),t.forEach((u,h)=>{const p=l.get(u);if(p===void 0){l.set(u,0);return}i&&p!==h||l.delete(u)}),this.updateIndexMap(),(this.colModel.getColDefCols()||[]).forEach(u=>{const h=t.indexOf(u)>=0;r(u,h,n)}),s&&this.colModel.refreshCols(!1),this.visibleCols.refresh(n),this.dispatchColumnChangedEvent(this.eventSvc,o,[...l.keys()],n)}updateColList(e=[],t,o,i,s,r,n){if(!e||e.length===0)return;let a=!1;const l=new Set;if(e.forEach(u=>{if(!u)return;const h=this.colModel.getColDefCol(u);if(h){if(l.add(h),o){if(t.indexOf(h)>=0)return;t.push(h)}else{const p=t.indexOf(h);if(p<0)return;for(let g=p+1;g<t.length;g++)l.add(t[g]);at(t,h)}s(h,o,n),a=!0}}),!a)return;this.updateIndexMap(),i&&this.colModel.refreshCols(!1),this.visibleCols.refresh(n);const d=Array.from(l);this.eventSvc.dispatchEvent({type:r,columns:d,column:d.length===1?d[0]:null,source:n})}extractCols(e,t=[]){const o=this.columns,i=[],s=[],{setFlagFunc:r,getIndexFunc:n,getInitialIndexFunc:a,getValueFunc:l,getInitialValueFunc:d}=this.columnExtractors;(this.colModel.getColDefCols()||[]).forEach(g=>{const f=t.indexOf(g)<0,m=g.getColDef(),b=l(m),w=d(m),S=n(m),y=a(m);let x;b!==void 0?x=b:S!==void 0?S===null?x=!1:x=S>=0:f?w!==void 0?x=w:y!==void 0?x=y!=null&&y>=0:x=!1:x=o.indexOf(g)>=0,x&&((f?S!=null||y!=null:S!=null)?i.push(g):s.push(g))});const h=g=>{const f=n(g.getColDef()),m=a(g.getColDef());return f??m};i.sort((g,f)=>{const m=h(g),b=h(f);return m===b?0:m<b?-1:1});const p=[].concat(i);return o.forEach(g=>{s.indexOf(g)>=0&&p.push(g)}),s.forEach(g=>{p.indexOf(g)<0&&p.push(g)}),o.forEach(g=>{p.indexOf(g)<0&&r(g,!1,e)}),p.forEach(g=>{o.indexOf(g)<0&&r(g,!0,e)}),this.columns=p,this.updateIndexMap(),this.columns}restoreColumnOrder(e,t){const o=this.columns,i=this.colModel.getColDefCols();if(!o.length||!i)return e;const s=Object.keys(t),r=new Set(s),n=new Set(s),a=new Set(o.map(y=>{const x=y.getColId();return n.delete(x),x}).concat(s)),l=[],d={};let u=0;for(let y=0;y<i.length;y++){const x=i[y].getColId();a.has(x)&&(l.push(x),d[x]=u++)}let h=1e3,p=!1,g=0;const f=this.columnOrdering.enableProp,m=this.columnOrdering.initialEnableProp,b=this.columnOrdering.indexProp,w=this.columnOrdering.initialIndexProp,S=y=>{const x=d[y];for(let P=g;P<x;P++){const k=l[P];n.has(k)&&(t[k][b]=h++,n.delete(k))}g=x};return o.forEach(y=>{const x=y.getColId();if(r.has(x))S(x),t[x][b]=h++;else{const P=y.getColDef();(P[b]===null||P[b]===void 0&&P[w]==null)&&(p||(P[f]||P[f]===void 0&&P[m]?S(x):(n.forEach(v=>{t[v][b]=h+d[v]}),h+=l.length,p=!0)),e[x]||(e[x]={colId:x}),e[x][b]=h++)}}),e}},oh=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let o;return typeof t!="number"?o=0:o=t+1,this.existingIds[e]=o,o}};function Hs(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o??e}var ih=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){this.addOrRemoveCssClass(e,!0)}removeCssClass(e){this.addOrRemoveCssClass(e,!1)}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const i=(e||"").split(" ");if(i.length>1){i.forEach(s=>this.addOrRemoveCssClass(s,t));return}}if(this.cssClassStates[e]!==t&&e.length){const i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}},Dm=0,N=null,se=class extends A{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Dm++,this.cssClassManager=new ih(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(o=>[o.selector,o])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;this.css?.forEach(t=>this.beans.environment.addGlobalCSS(t,e))}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(wu):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===N)this[t]=i??e;else{const r=o&&o[t];if(!this.suppressDataRefValidation&&!r)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const o=[];for(const i of e.childNodes??[])o.push(i);o.forEach(i=>{if(!(i instanceof HTMLElement))return;const s=this.createComponentFromElement(i,r=>{const n=r.getGui();if(n)for(const a of i.attributes??[])n.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const r=Array.prototype.slice.call(i.children);s.addItems(r)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(e,t,o){const i=e.nodeName,s=this.getDataRefAttribute(e),r=i.indexOf("AG-")===0,n=r?this.componentSelectors.get(i):null;let a=null;if(n){const l=o&&s?o[s]:void 0;a=new n.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(r)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,o,a),a}swapComponentForNode(e,t,o){const i=e.getGui();t.replaceChild(i,o),t.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(o=>o.setAttribute("tabindex",t.toString()))}setTemplate(e,t,o){let i;typeof e=="string"||e==null?i=ln(e):i=Me(e),this.setTemplateFromElement(i,t,o)}setTemplateFromElement(e,t,o,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let s=0;s<t.length;s++){const r=t[s];this.componentSelectors.set(r.selector,r)}this.wireTemplate(e,o)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let o=t;return e==null?null:(o||(o=this.eGui),dn(e)?{element:e,parent:o}:{element:e.getGui(),parent:o})}prependChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.insertAdjacentElement("afterbegin",o)}appendChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.appendChild(o)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:o}=t;Df(this.eGui,e,{skipAriaHidden:o})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:o}=t;Z(this.eGui,e,{skipAriaHidden:o});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,o){this.eGui.addEventListener(e,t,o),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},Ce=class Qi{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(o=>this.onDone(o),o=>this.onReject(o))}static all(t){return t.length?new Qi(o=>{let i=t.length;const s=new Array(i);t.forEach((r,n)=>{r.then(a=>{s[n]=a,i--,i===0&&o(s)})})}):Qi.resolve()}static resolve(t=null){return new Qi(o=>o(t))}then(t){return new Qi(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(i=>o(t(i)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(o=>o(t))}onReject(t){}};function Mm(e){return e?e.prototype&&"getGui"in e.prototype:!1}function sh(e,t,o,i){const{name:s}=o;let r,n,a,l,d,u;if(t){const h=t,p=h[s+"Selector"],g=p?p(i):null,f=m=>{typeof m=="string"?r=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:n=m)};g?(f(g.component),l=g.params,d=g.popup,u=g.popupPosition):f(h[s])}return{compName:r,jsComp:n,fwComp:a,paramsFromSelector:l,popupFromSelector:d,popupPositionFromSelector:u}}var Pm=class extends A{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,o,i=!1){return this.getCompDetails(this.gridOptions,e,t,o,i)}getCompDetails(e,t,o,i,s=!1){const{name:r,cellRenderer:n}=t;let{compName:a,jsComp:l,fwComp:d,paramsFromSelector:u,popupFromSelector:h,popupPositionFromSelector:p}=sh(this.beans.frameworkOverrides,e,t,i),g;const f=S=>{const y=this.registry.getUserComponent(r,S);y&&(l=y.componentFromFramework?void 0:y.component,d=y.componentFromFramework?y.component:void 0,g=y.params)};if(a!=null&&f(a),l==null&&d==null&&o!=null&&f(o),l&&n&&!Mm(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!d){const{validation:S}=this.beans;s&&(a!==o||!o)?a?S?.isProvidedUserComp(a)||he(50,{compName:a}):o?S||he(260,{...this.gos.getModuleErrorParams(),propName:r,compName:o}):he(216,{name:r}):o&&!S&&he(146,{comp:o});return}const m=this.mergeParams(e,t,i,u,g),b=l==null,w=l??d;return{componentFromFramework:b,componentClass:w,params:m,type:t,popupFromSelector:h,popupPositionFromSelector:p,newAgStackInstance:()=>this.newAgStackInstance(w,b,m,t)}}newAgStackInstance(e,t,o,i){const s=!t;let r;s?r=new e:r=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(r);const n=r.init?.(o);return n==null?Ce.resolve(r):n.then(()=>r)}mergeParams(e,t,o,i=null,s){const r={...o,...s},n=e,a=n&&n[t.name+"Params"];if(typeof a=="function"){const l=a(o);Xe(r,l)}else typeof a=="object"&&Xe(r,a);return Xe(r,i),r}},Em={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Am={name:"headerComponent",optionalMethods:["refresh"]},Tm={name:"innerHeaderComponent"},Im={name:"innerHeaderGroupComponent"},Lm={name:"headerGroupComponent"},Bm={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},Om={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Gm={name:"loadingCellRenderer",cellRenderer:!0},Nm={name:"loadingOverlayComponent",optionalMethods:["refresh"]},Vm={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Hm={name:"tooltipComponent"},pl={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},_m={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},zm={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Wm={name:"loadingCellRenderer",cellRenderer:!0},$m={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Um={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function jm(e,t){return e.getCompDetailsFromGridOptions(Em,"agDragAndDropImage",t,!0)}function Ks(e,t,o){return e.getCompDetails(t,Bm,void 0,o)}function Km(e,t,o){return e.getCompDetails(t,Am,"agColumnHeader",o)}function qm(e,t,o){return e.getCompDetails(t,Tm,void 0,o)}function Ym(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,Lm,"agColumnGroupHeader",t)}function Qm(e,t,o){return e.getCompDetails(t,Im,void 0,o)}function Xm(e,t){return e.getCompDetailsFromGridOptions(zm,void 0,t,!0)}function Zm(e,t){return e.getCompDetailsFromGridOptions(Wm,"agLoadingCellRenderer",t,!0)}function Jm(e,t){return e.getCompDetailsFromGridOptions($m,"agGroupRowRenderer",t,!0)}function ev(e,t){return e.getCompDetailsFromGridOptions(Um,"agDetailCellRenderer",t,!0)}function Oi(e,t,o){return e.getCompDetails(t,Om,void 0,o)}function tv(e,t,o){return e.getCompDetails(t,Gm,"agSkeletonCellRenderer",o,!0)}function rh(e,t,o,i){return e.getCompDetails(t,pl,i,o,!0)}function ov(e,t){return e.getCompDetailsFromGridOptions(Nm,"agLoadingOverlay",t,!0)}function iv(e,t){return e.getCompDetailsFromGridOptions(Vm,"agNoRowsOverlay",t,!0)}function sv(e,t){return e.getCompDetails(t.colDef,Hm,"agTooltipComponent",t,!0)}function nh(e,t,o,i){return e.getCompDetails(t,_m,i,o)}function rv(e,t){return sh(e,t,pl)}function nv(e,t,o){return e.mergeParams(t,pl,o)}function ud(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var ah=new Set,Hr={},Fi={},gr,lh=!1,av=!1;function lv(e){const[t,o]=e.version.split(".")||[],[i,s]=gr.split(".")||[];return t===i&&o===s}function dv(e){gr||(gr=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;if(e.version?lv(e)||Ri(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${gr}.`)):Ri(t(`'${e.moduleName}' is incompatible.`)),e.validate){const o=e.validate();o.isValid||Ri(`${o.message}`)}}function Es(e,t){dv(e);const o=e.rowModels??["all"];ah.add(e);let i;t!==void 0?(lh=!0,Fi[t]===void 0&&(Fi[t]={}),i=Fi[t]):i=Hr,o.forEach(s=>{i[s]===void 0&&(i[s]={}),i[s][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(s=>Es(s,t))}function cv(e){delete Fi[e]}function dh(e,t,o){const i=s=>!!Hr[s]?.[e]||!!Fi[t]?.[s]?.[e];return i(o)||i("all")}function gl(){return lh}function uv(e,t){const o=Fi[e]??{};return[...Object.values(Hr.all??{}),...Object.values(o.all??{}),...Object.values(Hr[t]??{}),...Object.values(o[t]??{})]}function hv(){return new Set(ah)}function pv(){return av}var ch=class{static register(e){Es(e,void 0)}static registerModules(e){e.forEach(t=>Es(t,void 0))}},gv=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];e.beanClasses.forEach(t=>{const o=new t;o.beanName?this.beans[o.beanName]=o:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(o)}),e.derivedBeans?.forEach(t=>{const{beanName:o,bean:i}=t(this);this.beans[o]=i,this.createdBeans.push(i)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(o=>{o.preWireBeans?.(this.beans),o.wireBeans?.(this.beans)}),e.forEach(o=>o.preConstruct?.()),t&&e.forEach(t),e.forEach(o=>o.postConstruct?.())}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},fv=class extends gv{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){super.destroy(),cv(this.gridId),this.destroyCallback?.()}getGridId(){return this.gridId}},mv="ag-column-first",vv="ag-column-last";function uh(e,t,o,i){return Ee(e)?[]:gh(e.headerClass,e,t,o,i)}function hh(e,t,o,i){return Ee(e)?[]:gh(e.toolPanelClass,e,t,o,i)}function ph(e,t,o){e.addOrRemoveCssClass(mv,o.isColAtEdge(t,"first")),e.addOrRemoveCssClass(vv,o.isColAtEdge(t,"last"))}function Cv(e,t,o,i){return J(t,{colDef:e,column:o,columnGroup:i})}function gh(e,t,o,i,s){if(Ee(e))return[];let r;if(typeof e=="function"){const n=Cv(t,o,i,s);r=e(n)}else r=e;return typeof r=="string"?[r]:Array.isArray(r)?[...r]:[]}var M={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},Da=!1,_r=0;function bv(e){_r>0||(e.addEventListener("keydown",zr),e.addEventListener("mousedown",zr))}function wv(e){_r>0||(e.removeEventListener("keydown",zr),e.removeEventListener("mousedown",zr))}function zr(e){const t=Da,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(Da=o)}function yv(e){const t=Ge(e);return bv(t),_r++,()=>{_r--,wv(t)}}function fh(){return Da}function Sv(e,t,o){t.addManagedElementListeners(o,{keydown:i=>{if(!i.defaultPrevented&&i.key===M.TAB){const s=i.shiftKey;so(e,o,!1,s)||ai(e,s)&&i.preventDefault()}}})}function ei(e,t,o=!1){const i=kf;let s=pu;t&&(s+=", "+t),o&&(s+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>wt(l)),n=Array.prototype.slice.apply(e.querySelectorAll(s));return n.length?((l,d)=>l.filter(u=>d.indexOf(u)===-1))(r,n):r}function Et(e,t=!1,o=!1,i=!1){const s=ei(e,i?".ag-tab-guard":null,o),r=t?Se(s):s[0];return r?(r.focus({preventScroll:!0}),!0):!1}function so(e,t,o,i){const s=ei(t,o?':not([tabindex="-1"])':null),r=Ae(e);let n;o?n=s.findIndex(l=>l.contains(r)):n=s.indexOf(r);const a=n+(i?-1:1);return a<0||a>=s.length?null:s[a]}function fl(e,t=5){let o=0;for(;e&&td(e)===null&&++o<=t;)e=e.parentElement;return td(e)===null?null:e}function Rv(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function ti(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function ml(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function ai(e,t,o=!1){const i=e.ctrlsSvc.get("gridCtrl");return!o&&i.focusNextInnerContainer(t)?!0:((o||!t&&!i.isDetailGrid())&&i.forceFocusOutOfContainer(t),!1)}function xv(e,t=!1){return e===M.DELETE?!0:!t&&e===M.BACKSPACE?cu():!1}var Fv=class extends A{constructor(e,t,o,i){super(),this.cellCtrl=e,this.rowNode=o,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case M.ENTER:this.onEnterKeyDown(e);break;case M.F2:this.onF2KeyDown(e);break;case M.ESCAPE:this.onEscapeKeyDown(e);break;case M.TAB:this.onTabKeyDown(e);break;case M.BACKSPACE:case M.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case M.DOWN:case M.UP:case M.RIGHT:case M.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){if(!this.cellCtrl.editing){if(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const o=this.cellCtrl.getFocusedCellPosition();this.beans.navigation?.navigateToNextCell(e,t,o,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:o}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&o?.ensureCellVisible(i)}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:o,beans:i,rowNode:s}=this,{gos:r,rangeSvc:n,eventSvc:a}=i;if(!o.editing){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),xv(e,r.get("enableCellEditingOnBackspace"))){if(n&&si(r))n.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){const{column:l}=o,d=this.beans.valueSvc.getDeleteValue(l,s);s.setDataValue(l,d,"cellClear")}}else i.editSvc?.startRowOrCellEdit(o,e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){const{cellCtrl:t,beans:o}=this;if(t.editing||this.rowCtrl.editing)this.beans.editSvc?.stopRowOrCellEdit(t,!1,!1,e.shiftKey);else if(o.gos.get("enterNavigatesVertically")){const i=e.shiftKey?M.UP:M.DOWN;o.navigation?.navigateToNextCell(null,i,t.cellPosition,!1)}else o.editSvc?.startRowOrCellEdit(t,M.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){const{cellCtrl:t,beans:o}=this;t.editing||o.editSvc?.startRowOrCellEdit(t,M.F2,e)}onEscapeKeyDown(e){const{cellCtrl:t,beans:o}=this;t.editing&&o.editSvc?.stopRowOrCellEdit(t,!0)}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.editing)return;const i=e.key;i===M.SPACE?this.onSpaceKeyDown(e):this.beans.editSvc?.startRowOrCellEdit(this.cellCtrl,i,e)&&e.preventDefault()}onSpaceKeyDown(e){const{gos:t}=this.beans;!this.cellCtrl.editing&&Qt(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,"spaceKey"),e.preventDefault()}destroy(){super.destroy()}},kv=class extends A{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!zt(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:o,gos:i,editSvc:s}=this.beans,r=e.ctrlKey||e.metaKey;o&&r&&o.getCellRangeCount(this.cellCtrl.cellPosition)>1&&o.intersectLastRange(!0);const n=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(n);const a=this.column.getColDef();a.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{a.onCellClicked(n)})},0),(i.get("singleClickEdit")||a.singleClickEdit)&&!i.get("suppressClickEdit")&&!(e.shiftKey&&o?.getCellRanges().length!=0)&&s?.startRowOrCellEdit(this.cellCtrl,void 0,e)}onCellDoubleClicked(e){const{column:t,beans:o,cellCtrl:i}=this,{eventSvc:s,frameworkOverrides:r,gos:n,editSvc:a}=o,l=t.getColDef(),d=i.createEvent(e,"cellDoubleClicked");s.dispatchEvent(d),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{r.wrapOutgoing(()=>{l.onCellDoubleClicked(d)})},0),!n.get("singleClickEdit")&&!n.get("suppressClickEdit")&&a?.startRowOrCellEdit(i,null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:o,shiftKey:i}=e,s=e.target,{cellCtrl:r,beans:n}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:d,focusSvc:u,gos:h}=n;if(this.isRightClickInExistingRange(e))return;const p=l&&!l.isEmpty(),g=this.containsWidget(s),{cellPosition:f}=r,m=Ms(f.column);if(d&&m&&!d.handleMouseDownOnCell(f,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!i||!p){const w=h.get("enableCellTextSelection")&&e.defaultPrevented,S=(nn()||w)&&!r.editing&&!tl(s)&&!g;r.focusCell(S)}if(i&&p&&!u.isCellFocused(f)){e.preventDefault();const b=u.getFocusedCell();if(b){const{column:w,rowIndex:S,rowPinned:y}=b,P=n.rowRenderer.getRowByPosition({rowIndex:S,rowPinned:y})?.getCellCtrl(w);P?.editing&&P.stopEditing(),u.setFocusedCell({column:w,rowIndex:S,rowPinned:y,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!g){if(l)if(m&&e.preventDefault(),i)l.extendLatestRangeToCell(f);else{const b=t||o;l.setRangeToCell(f,b)}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(o&&i)return!0}return!1}containsWidget(e){return Qo(e,"ag-selection-checkbox",3)||Qo(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),o?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,o=t.contains(e.target),i=t.contains(e.relatedTarget);return o&&i}destroy(){super.destroy()}},Dv=class extends A{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e&&(this.refreshSpanHeight(e),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:this.refreshSpanHeight.bind(this,e),recalculateRowBounds:this.refreshSpanHeight.bind(this,e)}))}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();Pt(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,o=e.getColSpan(t),i=[];if(o===1)i.push(e);else{let s=e;const r=e.getPinned();for(let n=0;s&&n<o&&(i.push(s),s=this.beans.visibleCols.getColAfter(s),!(!s||Ee(s)||r!==s.getPinned()));n++);}return i}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=Se(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,o=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const i=t.bodyWidth;return o+i+(e||0)}return o+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const o=Oo(this.beans)*this.rowSpan;this.eContent.style.height=`${o}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},Mv="ag-cell",Pv="ag-cell-auto-height",Ev="ag-cell-normal-height",Av="ag-cell-focus",Tv="ag-cell-first-right-pinned",Iv="ag-cell-last-left-pinned",Lv="ag-cell-not-inline-editing",Bv="ag-cell-wrap-text",Wr="cellCtrl";function mh(e,t){return Nu(e,t,Wr)}var Ov=0,fr=class extends A{constructor(e,t,o,i){super(),this.column=e,this.rowNode=t,this.rowCtrl=i,this.rangeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.tooltipFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.beans=o;const{colId:s,colIdSanitised:r}=e;this.instanceId=s+"-"+Ov++,this.colIdSanitised=r,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new Dv(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.mouseListener=new kv(this,e,this.column),this.keyboardListener=new Fv(this,e,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature();const{rangeSvc:t}=e;t&&si(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,o,i,s,r,n){this.comp=e,this.eGui=t,this.printLayout=s,n??(n=this),this.addDomData(n),this.addFeatures(),n.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,n),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),r&&this.isCellEditable()?this.beans.editSvc?.startEditing(this):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(a=>a()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}showValue(e,t){const{beans:o,column:i,rowNode:s,rangeFeature:r}=this,{userCompFactory:n}=o,a=this.getValueToDisplay();let l;const d=s.stub&&s.groupData?.[i.getId()]==null,u=i.getColDef();if(d||this.isCellRenderer()){const h=this.createCellRendererParams();!d||Ms(i)?l=Oi(n,u,h):l=tv(n,u,h)}if(!l&&!d&&o.findSvc?.isMatch(s,i)){const h=this.createCellRendererParams();l=Oi(n,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},h)}this.comp.setRenderDetails(l,a,e),!t&&r&&Wt(o,()=>r?.refreshHandle())}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return this.rowNode.rowPinned!=null?!1:typeof e=="function"||e===!0}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=ks(t),s=vo(this.column);return o==="custom"&&i!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&Zo(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),o=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||o||i||s}onPopupEditorClosed(){this.editing&&this.beans.editSvc?.stopRowOrCellEdit(this)}stopEditing(e=!1){return this.beans.editSvc?.stopEditing(this,e)??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:o,rowNode:i,comp:s,eGui:r,beans:{valueSvc:n,gos:a}}=this;return J(a,{value:e,valueFormatted:t,getValue:()=>n.getValueForDisplay(o,i),setValue:d=>n.setValue(i,o,d),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:o.getPinned(),colDef:o.getColDef(),column:o,refreshCell:this.refreshCell.bind(this),eGridCell:r,eParentOfValue:s.getParentOfValue(),registerRowDragger:(d,u,h,p)=>this.registerRowDragger(d,u,p),setTooltip:(d,u)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,u),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e)}refreshCell(e){if(this.suppressRefreshCell||this.editing)return;const t=this.column.getColDef(),o=e!=null&&!!e.newData,i=e!=null&&!!e.suppressFlash,s=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,r=e&&e.forceRefresh||s||o,n=!!this.comp,a=this.updateAndFormatValue(n),l=r||a;if(n){if(l){this.showValue(o,!1);const d=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!i&&!d&&t.enableCellChangeFlash&&this.beans.cellFlashSvc?.flashCell(this),this.customStyleFeature?.applyUserStyles(),this.customStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshTooltip(),this.customStyleFeature?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,o=this.valueFormatted;return this.value=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o:!0}valuesAreEqual(e,t){const o=this.column.getColDef();return o.equals?o.equals(e,t):e===t}addDomData(e){const t=this.eGui;Ii(this.beans.gos,t,Wr,this),e.addDestroyFunc(()=>Ii(this.beans.gos,t,Wr,null))}createEvent(e,t){const{rowNode:o,column:i,value:s,beans:r}=this;return J(r.gos,{type:t,node:o,data:o.data,value:s,column:i,colDef:i.getColDef(),rowPinned:o.rowPinned,event:e,rowIndex:o.rowIndex})}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature.getColSpanningList()}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:o}=this;ph(e,t,o.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);au(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1){this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e})}restoreFocus(e=!1){if(!this.comp||this.editing||!this.isCellFocused()||!this.beans.focusSvc.shouldTakeFocus())return;const t=()=>{if(!this.isAlive())return;const o=this.comp.getFocusableElement();this.isCellFocused()&&o.focus({preventScroll:!0})};if(e){setTimeout(t,0);return}t()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(Ms(this.column)&&(e=!0),Si(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.addOrRemoveCssClass(Tv,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.addOrRemoveCssClass(Iv,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(ml(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const o=this.isCellFocused();if(this.comp.addOrRemoveCssClass(Av,o),o&&e&&e.forceBrowserFocus){let s=this.comp.getFocusableElement();if(this.editing){const r=ei(s,null,!0);r.length&&(s=r[0])}s.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const i=t.gos.get("editType")==="fullRow";!o&&!i&&this.editing&&t.editSvc?.stopRowOrCellEdit(this),o&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:nt(t),column:this.column}}setInlineEditingCss(){this.beans.editSvc?.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){const{comp:e}=this;e.addOrRemoveCssClass(Mv,!0),e.addOrRemoveCssClass(Lv,!0);const t=this.column.isAutoHeight()==!0;e.addOrRemoveCssClass(Pv,t),e.addOrRemoveCssClass(Ev,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?this.beans.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.addOrRemoveCssClass(Bv,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),o=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(o)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(Ae(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,o){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const i=this.createRowDragComp(e,t,o);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}))}createRowDragComp(e,t,o){const i=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,o);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},vh="__ag_grid_instance";function Ch(e,t){t[vh]=e.gridInstanceId}function As(e,t){return Gv(e,t.target)}function Gv(e,t){let o=t;for(;o;){const i=o[vh];if(j(i))return i===e.gridInstanceId;o=o.parentElement}return!1}function Nv(e,t){return mh(e,t.target)?.getFocusedCellPosition()??null}var gn=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(gn||{}),Vv=class extends A{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const o={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:o,dragSource:e}),this.dragSvc.addDragSource(o)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:o}=this,i=t.find(s=>s.dragSource===e);i&&(o.removeDragSource(i.params),at(t,i))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:o}=this;e.forEach(i=>t.removeDragSource(i.params)),e.length=0,o.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),e.onDragStarted?.(),this.createDragAndDropImageComponent()}onDragStop(e){this.dragSource?.onDragStopped?.();const{lastDropTarget:t}=this;if(t?.onDragStop){const o=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(o)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t}=this;e?.onDragCancelled?.(),t?.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){const o=this.getHorizontalDirection(e),i=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const s=this.dropTargets.filter(u=>this.isMouseOnDropTarget(e,u)),r=this.findCurrentDropTarget(e,s),{lastDropTarget:n,dragSource:a,dragAndDropImageComp:l,dragItem:d}=this;if(r!==n){if(this.leaveLastTargetIfExists(e,o,i,t),n!==null&&r===null&&a?.onGridExit?.(d),n===null&&r!==null&&a?.onGridEnter?.(d),this.enterDragTargetIfExists(r,e,o,i,t),r&&l){const{comp:u,promise:h}=l;u?u.setIcon(r.getIconName?r.getIconName():null,!1):h.then(p=>{p&&p.setIcon(r.getIconName?r.getIconName():null,!1)})}this.lastDropTarget=r}else if(r&&r.onDragging){const u=this.createDropTargetEvent(r,e,o,i,t);r.onDragging(u)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,o=[[e.getContainer()]];return t?o.concat(t):o}isMouseOnDropTarget(e,t){const o=this.getAllContainersFromDropTarget(t);let i=!1;const s=(a,l)=>{for(const d of l){const{width:u,height:h,left:p,right:g,top:f,bottom:m}=d.getBoundingClientRect();if(u===0||h===0)return!1;const b=a.clientX>=p&&a.clientX<g,w=a.clientY>=f&&a.clientY<m;if(!b||!w)return!1}return!0};for(const a of o)if(s(e,a)){i=!0;break}const{eElement:r,type:n}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(r)?!1:i&&t.isInterestedIn(n,r)}findCurrentDropTarget(e,t){const o=t.length;if(o===0)return null;if(o===1)return t[0];const s=Li(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const r of s)for(const n of t)if(this.getAllContainersFromDropTarget(n).flatMap(l=>l).indexOf(r)!==-1)return n;return null}enterDragTargetIfExists(e,t,o,i,s){if(e&&e.onDragEnter){const r=this.createDropTargetEvent(e,t,o,i,s);e.onDragEnter(r)}}leaveLastTargetIfExists(e,t,o,i){const{lastDropTarget:s}=this;if(!s)return;if(s.onDragLeave){const n=this.createDropTargetEvent(s,e,t,o,i);s.onDragLeave(n)}const r=this.getDragAndDropImageComponent();r&&r.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(o=>o.external).find(o=>o.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const o=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:i}=e;return o.contains(i)}getHorizontalDirection(e){const t=this.eventLastTime?.clientX,o=e.clientX;return t===o?null:t>o?"left":"right"}getVerticalDirection(e){const t=this.eventLastTime?.clientY,o=e.clientY;return t===o?null:t>o?"up":"down"}createDropTargetEvent(e,t,o,i,s){const r=e.getContainer(),n=r.getBoundingClientRect(),{dragItem:a,dragSource:l,gos:d}=this,u=t.clientX-n.left,h=t.clientY-n.top;return J(d,{event:t,x:u,y:h,vDirection:i,hDirection:o,dragSource:l,fromNudge:s,dragItem:a,dropZoneTarget:r})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&Uf(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;if(e){const{comp:t}=e;if(t){const o=t.getGui();this.dragAndDropImageParent?.removeChild(o),this.destroyBean(t)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:o}=this;if(!e)return;const i=jm(o,J(t,{dragSource:e}));if(!i)return;const s=i.newAgStackInstance();this.dragAndDropImageComp={promise:s},s.then(r=>{!r||!this.isAlive()||(this.processDragAndDropImageComponent(r),this.dragAndDropImageComp.comp=r)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:o}=this;if(!t)return;const i=e.getGui();i.style.setProperty("position","absolute"),i.style.setProperty("z-index","9999"),Ch(this.gos,i),o.applyThemeClasses(i),e.setIcon(null,!1);let{dragItemName:s}=t;typeof s=="function"&&(s=s()),e.setLabel(s||""),i.style.top="20px",i.style.left="20px";const r=nl(this.beans);this.dragAndDropImageParent=r,r?r.appendChild(i):H(54)}registerGridDropTarget(e,t){const o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}},Hv=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const o=t||this.shouldSkipVerticalScroll();if(o&&this.shouldSkipHorizontalScroll())return;const i=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<i.left+s,this.tickRight=e.clientX>i.right-s,this.tickUp=e.clientY<i.top+s&&!o,this.tickDown=e.clientY>i.bottom-s&&!o,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}};function _v(e,t){const o=e.column===t.column,i=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return o&&i&&s}function zv(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(j(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function Wv(e){let t=0,o;const{pinnedRowModel:i,rowModel:s,pageBounds:r}=e;return i?.getPinnedTopRowCount()?o="top":s.getRowCount()?(o=null,t=r.getFirstRow()):i?.getPinnedBottomRowCount()&&(o="bottom"),o===void 0?null:{rowIndex:t,rowPinned:o}}function $v(e){let t,o=null;const{pinnedRowModel:i,pageBounds:s}=e,r=i?.getPinnedBottomRowCount(),n=i?.getPinnedTopRowCount();return r?(o="bottom",t=r-1):e.rowModel.getRowCount()?(o=null,t=s.getLastRow()):n&&(o="top",t=n-1),t===void 0?null:{rowIndex:t,rowPinned:o}}function vl(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function qs(e,t){const o=e.spannedRowRenderer?.getCellByPosition(t);if(o)return o;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function $r(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:s,pinnedRowModel:r,rowModel:n}=e;if(o===0)return i==="top"?null:i==="bottom"&&n.isRowsToRender()?{rowIndex:s.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const a=i?void 0:n.getRow(o);return bh(e,a,!0)??{rowIndex:o-1,rowPinned:i}}function hd(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:s,pinnedRowModel:r,rowModel:n}=e;if(Uv(e,t))return i==="bottom"?null:i==="top"&&n.isRowsToRender()?{rowIndex:s.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const a=i?void 0:n.getRow(o);return bh(e,a)??{rowIndex:o+1,rowPinned:i}}function bh(e,t,o){const{gos:i,rowRenderer:s}=e;if(!t?.sticky||!cn(i))return;const r=o?s.getStickyTopRowCtrls():s.getStickyBottomRowCtrls();let n;for(let a=0;a<r.length;a++)if(r[a].rowNode.rowIndex===t.rowIndex){n=r[a+(o?-1:1)];break}return n?{rowIndex:n.rowNode.rowIndex,rowPinned:null}:void 0}function Uv(e,t){const{rowPinned:o,rowIndex:i}=t,{pinnedRowModel:s,pageBounds:r}=e;return o==="top"?(s?.getPinnedTopRowCount()??0)-1<=i:o==="bottom"?(s?.getPinnedBottomRowCount()??0)-1<=i:r.getLastRow()<=i}function wh(e,t,o){if(o===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=o}var jv=class extends A{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,o=e.mouseDownListener;if(t.removeEventListener("mousedown",o),e.touchEnabled){const i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,o=t.find(i=>i.dragSource===e);o&&(this.removeListener(o),at(t,o))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:o,includeTouch:i,stopPropagationForTouch:s}=e;o.addEventListener("mousedown",t);let r=null;const n=this.gos.get("suppressTouch");i&&!n&&(r=a=>{tl(a.target)||(s&&a.stopPropagation(),this.onTouchStart(e,a))},o.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:r,touchEnabled:!!i})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const o=t.touches[0];this.touchLastTime=o,this.touchStart=o;const i=l=>this.onTouchMove(l,e.eElement),s=l=>this.onTouchUp(l,e.eElement),r=l=>{l.cancelable&&l.preventDefault()},n=t.target,a=[{target:Li(this.beans),type:"touchmove",listener:r,options:{passive:!1}},{target:n,type:"touchmove",listener:i,options:{passive:!0}},{target:n,type:"touchend",listener:s,options:{passive:!0}},{target:n,type:"touchcancel",listener:s,options:{passive:!0}}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onCommonMove(o,this.touchStart,e.eElement)}onMouseDown(e,t){const o=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||o._alreadyProcessedByDragService||(o._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const i=d=>this.onMouseMove(d,e.eElement),s=d=>this.onMouseUp(d,e.eElement),r=d=>d.preventDefault(),n=d=>{d.key===M.ESCAPE&&this.cancelDrag(e.eElement)},a=Li(this.beans),l=[{target:a,type:"mousemove",listener:i},{target:a,type:"mouseup",listener:s},{target:a,type:"contextmenu",listener:r},{target:a,type:"keydown",listener:n}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:o,type:i,listener:s,options:r}=t;o.addEventListener(i,s,r)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:o,type:i,listener:s,options:r}=t;o.removeEventListener(i,s,r)})})}isEventNearStartEvent(e,t){const{dragStartPixels:o}=this.currentDragParams,i=j(o)?o:4;return wh(e,t,i)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,o){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:o}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}this.currentDragParams?.onDragging(e)}onTouchMove(e,t){const o=this.getFirstActiveTouch(e.touches);o&&this.onCommonMove(o,this.touchStart,t)}onMouseMove(e,t){nn()&&Ge(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const{gos:t}=this,o=t.get("enableCellTextSelection"),i=e.type==="mousemove",s=r=>!!r.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button");return o&&i&&e.cancelable&&As(t,e)&&!s(e)}onTouchUp(e,t){let o=this.getFirstActiveTouch(e.changedTouches);o||(o=this.touchLastTime),this.onUpCommon(o,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),this.currentDragParams?.onDragCancel?.(),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function yh(e,t){return e+"_"+t}function Oe(e){return e instanceof Sh}var Sh=class extends A{constructor(e,t,o,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return yh(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{Oe(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=Se(this.displayedChildren).getLeft();this.setLeft(t)}else{const 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?.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(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const 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){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{to(t)?e.push(t):Oe(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{to(t)?e.push(t):Oe(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const 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(o=>{if(Oe(o)&&(!o.displayedChildren||!o.displayedChildren.length))return;switch(o.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(o);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(o);break;default:this.displayedChildren.push(o);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},Ur="row-group-",Kv="t-",qv="b-",Yv=0,di=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Yv++,this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:o,selectionSvc:i,eventSvc:s}=this.beans,r=this.data;this.data=e,o?.onDataChanged(),this.updateDataOnDetailNode(),i?.updateRowSelectable(this),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,r,t);this.__localEventService?.dispatchEvent(n),s.dispatchEvent({type:"rowNodeDataChanged",node:this})}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,o){return{type:"dataChanged",node:this,oldData:t,newData:e,update:o}}getRowIndexString(){return this.rowIndex==null?(he(13),null):this.rowPinned==="top"?Kv+this.rowIndex:this.rowPinned==="bottom"?qv+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:o}=this.beans,i=o?.createDaemonNode?.(this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,i));const r=this.createDataChangedEvent(e,s,!1);this.__localEventService?.dispatchEvent(r)}setId(e){const t=Fs(this.beans.gos);if(t)if(this.data){const o=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:o.length>0?o:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(Ur)&&he(14,{groupPrefix:Ur})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,o){this.beans.expansionSvc?.setExpanded(this,e,t,o)}setDataValue(e,t,o){const{colModel:i,valueSvc:s,gos:r,selectionSvc:n}=this.beans,a=typeof e!="string"?e:i.getCol(e)??i.getColDefCol(e);if(!a)return!1;const l=s.getValueForDisplay(a,this);if(r.get("readOnlyEdit")){const{beans:{eventSvc:u},data:h,rowIndex:p,rowPinned:g}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:p,rowPinned:g,column:a,colDef:a.colDef,data:h,node:this,oldValue:l,newValue:t,value:t,source:o}),!1}const d=s.setValue(this,a,t,o);return this.dispatchCellChangedEvent(a,t,l),n?.updateRowSelectable(this),d}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,o){const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};this.__localEventService?.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){return this.footer?this.sibling.isSelected():this.__selected}depthFirstSearch(e){this.childrenAfterGroup?.forEach(t=>t.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,o="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:o})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new fo),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e),this.__localEventService||(this.__localEventService=new fo),this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.__localEventService);const o=this.frameworkEventListenerService?.wrap(t)??t;this.__localEventService.addEventListener(e,o)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(t)??t;this.removeLocalListener(e,o)}removeLocalListener(e,t){this.__localEventService?.removeEventListener(e,t),this.__localEventService?.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(H(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}};function Rh(e,t,o){return J(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Qv={tag:"div",cls:"ag-filter"},xh=class extends se{constructor(e,t){super(Qv),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then(()=>{})??Ce.resolve()}afterGuiAttached(e){this.filterWrapper?.filterPromise?.then(t=>{t?.afterGuiAttached?.(e)})}afterGuiDetached(){this.filterWrapper?.filterPromise?.then(e=>{e?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:o}=this;this.filterWrapper=this.beans.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(i=>{const s=i.getGui();j(s)||H(69,{guiFromFilter:s}),this.appendChild(s),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:o,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(rt(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},Fh="ag-resizer-wrapper",Ro=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Xv={tag:"div",cls:Fh,children:[Ro("eTopLeft","topLeft"),Ro("eTop","top"),Ro("eTopRight","topRight"),Ro("eRight","right"),Ro("eBottomRight","bottomRight"),Ro("eBottom","bottom"),Ro("eBottomLeft","bottomLeft"),Ro("eLeft","left")]},Cl=class extends A{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,o=t/2-this.getWidth()/2,i=e/2-this.getHeight()/2;this.offsetElement(o,i)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:o,width:i,minHeight:s,height:r,x:n,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,d=0;const u=wt(this.element);if(u){const h=this.findBoundaryElement(),p=window.getComputedStyle(h);if(p.minWidth!=null){const g=h.offsetWidth-this.element.offsetWidth;d=parseInt(p.minWidth,10)-g}if(p.minHeight!=null){const g=h.offsetHeight-this.element.offsetHeight;l=parseInt(p.minHeight,10)-g}}if(this.minHeight=s||l,this.minWidth=o||d,i&&this.setWidth(i),r&&this.setHeight(r),(!i||!r)&&this.refreshSize(),e)this.center();else if(n||a)this.offsetElement(n,a);else if(u&&t){let h=this.boundaryEl,p=!0;if(h||(h=this.findBoundaryElement(),p=!1),h){const g=parseFloat(h.style.top),f=parseFloat(h.style.left);p?this.offsetElement(isNaN(f)?0:f,isNaN(g)?0:g):this.setPosition(f,g)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const o=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(o),this.moveElementDragListener=o):(this.dragSvc?.removeDragSource(o),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const i=!!e[t],s=this.getResizerElement(t),r={dragStartPixels:0,eElement:s,onDragStart:n=>this.onResizeStart(n,t),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,t)};(i||!this.isAlive()&&!i)&&(i?(this.dragSvc?.addDragSource(r),this.resizeListeners.push(r),s.style.pointerEvents="all"):s.style.pointerEvents="none",this.resizable[t]=i)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,o=this.element;let i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)ss(o,e),e=gu(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?ss(o,e):(o.style.height=`${e}px`,o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:o}=this.offsetParent;if(!o)return null;const i=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),r=e?this.position.y:i.top,n=e?0:s.top;let a=0;if(t){const d=this.element.parentElement;if(d){const{bottom:u}=d.getBoundingClientRect();a=u-i.bottom}}return o+n-r-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:o}=this.config;let i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Zt(t,e),e=Ar(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:s}=this.offsetParent,r=o?this.position.x:this.element.getBoundingClientRect().left;s&&e+r>s&&(e=s-r)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Zt(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:o}=this.config,i=o?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(i.style.left),parseFloat(i.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const o=this.getAvailableHeight();this.element.style.setProperty("max-height",`${o}px`)};e&&this.popupSvc?this.resizeObserverSubscriber=No(this.beans,this.popupSvc?.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:o,isTop:i,anywhereWithin:s,topBuffer:r}=e,n=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!o,!!s,n)?0:n,d=this.shouldSkipY(t,!!i,r,a)?0:a;return{movementX:l,movementY:d}}shouldSkipX(e,t,o,i){const s=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:s.left;let l=a<=0&&r.left>=e.clientX||r.right<=e.clientX&&r.right<=n.right;return l?!0:(t?l=i<0&&e.clientX>a+r.left||i>0&&e.clientX<a+r.left:o?l=i<0&&e.clientX>n.right||i>0&&e.clientX<a+r.left:l=i<0&&e.clientX>n.right||i>0&&e.clientX<n.right,l)}shouldSkipY(e,t,o=0,i){const s=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:s.top;let l=a<=0&&r.top>=e.clientY||r.bottom<=e.clientY&&r.bottom<=n.bottom;return l?!0:(t?l=i<0&&e.clientY>a+r.top+o||i>0&&e.clientY<a+r.top:l=i<0&&e.clientY>n.bottom||i>0&&e.clientY<n.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(Me(Xv)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${Fh}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:o,forcePopupParentAsOffsetParent:i}=this.config;!o&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(o=>!o.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,o=0;for(let i=0;i<e.length;i++){const s=e[i],r=!!s.style.flex&&s.style.flex!=="0 0 auto";if(s===this.element)continue;let n=this.minHeight||0,a=this.minWidth||0;if(r){const l=window.getComputedStyle(s);l.minHeight&&(n=parseInt(l.minHeight,10)),l.minWidth&&(a=parseInt(l.minWidth,10))}else n=s.offsetHeight,a=s.offsetWidth;t+=n,o+=a}return{height:t,width:o}}applySizeToSiblings(e){let t=null;const o=this.getSiblings();if(o){for(let i=0;i<o.length;i++){const s=o[i];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=o[i+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:o}=this.config,{isTop:i,isRight:s,isBottom:r,isLeft:n}=this.currentResizer,a=s||n,l=r||i,{movementX:d,movementY:u}=this.calculateMouseMovement({e,isLeft:n,isTop:i}),h=this.position.x,p=this.position.y;let g=0,f=0;if(a&&d){const m=n?-1:1,b=this.getWidth(),w=b+d*m;let S=!1;n&&(g=b-w,(h+g<=0||w<=this.minWidth)&&(S=!0,g=0)),S||this.setWidth(w)}if(l&&u){const m=i?-1:1,b=this.getHeight(),w=b+u*m;let S=!1;i?(f=b-w,(p+f<=0||w<=this.minHeight)&&(S=!0,f=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&b<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(S=!0),S||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||o)&&g||f)&&this.offsetElement(h+g,p+f)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:o}=this.position;let i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());const{movementX:s,movementY:r}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+s,o+r),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},kh="ag-focus-managed",Hi=class extends A{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:o=>{if(o.defaultPrevented)return;const i=so(this.beans,this.eFocusable,!1,o.shiftKey);i&&(i.focus(),o.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add(kh),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),o&&this.addManagedElementListeners(e,{focusout:o})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||zt(t))return;const{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){mo(t);return}t.key===M.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},Dh={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function Mh(e,t){const{debounceMs:o}=e;return jr(e)?(o!=null&&H(71),0):o??t}function jr(e){return(e.buttons?.indexOf("apply")??-1)>=0}var fn=class extends se{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=N,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new Hi(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Cl(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t?.removeEventListener("submit",this.onFormSubmit);const o={tag:"form",cls:"ag-filter-wrapper",children:[{tag:"div",ref:"eFilterBody",cls:`ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper`,children:[this.createBodyTemplate()]}]};this.setTemplate(o,this.getAgComponents(),e),t=this.getGui(),t?.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.params.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.params=e,this.applyActive=jr(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=jr(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:o,readOnly:i}=t??{},{buttons:s,readOnly:r}=e;if(i===r&&ys(o,s))return;const n=s&&s.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(rt(this.eButtonsPanel),this.buttonListeners.forEach(d=>d()),this.buttonListeners=[]):n&&(this.eButtonsPanel=Me({tag:"div",cls:"ag-filter-apply-panel"})),!n){this.eButtonsPanel&&Dt(this.eButtonsPanel);return}const a=document.createDocumentFragment(),l=d=>{let u;const h=d?this.translate(`${d}Filter`):void 0;switch(d){case"apply":u=f=>this.onBtApply(!1,!1,f);break;case"clear":u=()=>this.onBtClear();break;case"reset":u=()=>this.onBtReset();break;case"cancel":u=f=>{this.onBtCancel(f)};break;default:H(75);return}const g=ln(`<button
|
|
5
|
+
type="${d==="apply"?"submit":"button"}"
|
|
6
|
+
data-ref="${d}FilterButton"
|
|
7
|
+
class="ag-button ag-standard-button ag-filter-apply-panel-button"
|
|
8
|
+
>${h}
|
|
9
|
+
</button>`);this.buttonListeners.push(...this.addManagedElementListeners(g,{click:u})),a.append(g)};s.forEach(d=>l(d)),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}setupOnBtApplyDebounce(){const e=Mh(this.params,this.defaultDebounceMs),t=st(this,this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel??null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.params.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const o=()=>{this.onUiChanged(!1,"prevent"),t?.()};e!=null?this.setModelIntoUi(e).then(o):this.resetUiToDefaults().then(o)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const o=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(o,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,o){o&&o.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.params.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});const{closeOnApply:i}=this.params;i&&this.applyActive&&!e&&!t&&this.close(o)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,o=t&&t.key;let i;(o==="Enter"||o==="Space")&&(i={keyboardEvent:t}),this.hidePopup(i),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.params.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const o=this.isModelValid(this.getModelFromUi()),i=this.queryForHtmlElement('[data-ref="applyFilterButton"]');i&&bs(i,!o)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:o}=this;if(!t||e==="toolPanel")return;e==="floatingFilter"||e==="columnFilter"?(t.restoreLastSize(),t.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.params;return this.params=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.getLocaleTextFunc()(e,Dh[e])}getCellValue(e){return this.params.getValue(e)}getPositionableElement(){return this.eFilterBody}};function Ph(e,t,o){if(t==null)return null;let i=null;const{compName:s,jsComp:r,fwComp:n}=rv(e,t);return s?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:r==null&&n==null&&t.filter===!0&&(i=o()),i}var Nt={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},bl=class extends A{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=t.autoHeight?Nt.AUTO_HEIGHT:t.print?Nt.PRINT:Nt.NORMAL;this.view.updateLayoutClasses(o,t)}},xo="Viewport",pd="fakeVScrollComp",gd=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],fd=100,Ln=150,Zv=class extends A{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=st(this,()=>this.lastScrollSource[1]=null,Ln),this.resetLastVScrollDebounced=st(this,()=>this.lastScrollSource[0]=null,Ln)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,o=>{this.centerRowsCtrl=o.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,xo)});for(const e of gd){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),o=t?st(this,this.onVScroll.bind(this,xo),fd):this.onVScroll.bind(this,xo),i=t?st(this,this.onVScroll.bind(this,pd),fd):this.onVScroll.bind(this,pd);this.addManagedElementListeners(this.eBodyViewport,{scroll:o}),this.registerScrollPartner(e,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...gd,xo]){if(this.lastScrollSource[1]===t)continue;const o=this.getViewportForSource(t);Ir(o,e,this.enableRtl)}}getViewportForSource(e){return e===xo?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;const i=Tr(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===xo?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:o}=this;o?.setScrollTop(t),this.nextScrollTop=t,e===xo?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,o?.active?o.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Ln)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!Yo()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=an(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return e<0||e+t>o}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:o}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>o}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll(xo)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),Ir(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:o,lastScrollTop:i}=this;return{top:i,bottom:i+o}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:o}=this.beans,i=o.getRowCount();let s=-1;for(let r=0;r<i;r++){const n=o.getRow(r);if(typeof e=="function"){if(n&&e(n)){s=r;break}}else if(e===n||e===n.data){s=r;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t){if(tt(this.gos,"print"))return;const{rowModel:o}=this.beans,i=o.getRowCount();if(typeof e!="number"||e<0||e>=i){H(88,{index:e});return}const{frameworkOverrides:s,pageBounds:r,rowContainerHeight:n,rowRenderer:a}=this.beans;s.wrapIncoming(()=>{const l=this.ctrlsSvc.getGridBodyCtrl(),d=o.getRow(e);let u,h,p=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:g,stickyBottomHeight:f}=l,m=d.rowTop,b=d.rowHeight,w=r.getPixelOffset(),S=d.rowTop-w,y=S+d.rowHeight,x=this.getVScrollPosition(),P=n.divStretchOffset,k=x.top+P,D=x.bottom+P,v=D-k,C=n.getScrollPositionForPixel(S),R=n.getScrollPositionForPixel(y-v),F=Math.min((C+R)/2,S),L=k+g>S,O=D-f<y;let T=null;t==="top"?T=C-g:t==="bottom"?T=R+f:t==="middle"?T=F:L?T=C-g:O&&(T=R+f),T!==null&&(this.setVerticalScrollPosition(T),a.redraw({afterScroll:!0})),u=m!==d.rowTop||b!==d.rowHeight,h=g!==l.stickyTopHeight||f!==l.stickyBottomHeight,p++}while((u||h)&&p<10);this.animationFrameSvc?.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const{colModel:o,frameworkOverrides:i}=this.beans,s=o.getCol(e);if(!s||s.isPinned()||!this.visibleCols.isColDisplayed(s))return;const r=this.getPositionedHorizontalScroll(s,t);i.wrapIncoming(()=>{r!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(r),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:o,columnAfterEnd:i}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),r=this.centerRowsCtrl.getCenterWidth(),n=this.enableRtl;let a=(n?o:i)||s,l=n?i:o;t!=="auto"&&(a=t==="start",l=t==="end");const d=t==="middle";if(a||l||d){const{colLeft:u,colMiddle:h,colRight:p}=this.getColumnBounds(e);return d?h-r/2:a?n?p:u:n?u-r:p-r}return null}isColumnOutsideViewport(e){const{start:t,end:o}=this.getViewportBounds(),{colLeft:i,colRight:s}=this.getColumnBounds(e),r=this.enableRtl,n=r?t>s:o<s,a=r?o<i:t>i;return{columnBeforeStart:n,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,o=this.visibleCols.bodyWidth,i=e.getActualWidth(),s=e.getLeft(),r=t?-1:1,n=t?o-s:s,a=n+i*r,l=n+i/2*r;return{colLeft:n,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},wl=class extends A{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=tt(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,i=t.bodyWidth,s=t.getColsLeftWidth(),r=t.getDisplayedColumnsRightWidth();let n;e?n=i+s+r:(n=i,this.addSpacer&&(this.gos.get("enableRtl")?s:r)===0&&o.verticalScrollShowing&&(n+=o.getScrollbarWidth())),this.callback(n)}},Jv=class extends A{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,i=()=>{Wt(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),o.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=an(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function eC(e,t,o,i,s,r){if(o==null&&t==null)return;const n={},a={},l=(d,u)=>{d.split(" ").forEach(h=>{h.trim()!=""&&u(h)})};if(o){const d=Object.keys(o);for(let u=0;u<d.length;u++){const h=d[u],p=o[h];let g;typeof p=="string"?g=e?e.evaluate(p,i):!0:typeof p=="function"&&(g=p(i)),l(h,f=>{g?n[f]=!0:a[f]=!0})}}r&&Object.keys(a).forEach(r),Object.keys(n).forEach(s)}function md(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var tC=class extends A{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const o=this.gos,i=n=>{typeof n=="string"?e.push(n):Array.isArray(n)&&n.forEach(a=>e.push(a))},s=o.get("rowClass");s&&i(s);const r=o.getCallback("getRowClass");if(r){const n={data:t.data,node:t,rowIndex:t.rowIndex},a=r(n);i(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){const{gos:i,expressionSvc:s}=this.beans,r=J(i,{data:e.data,node:e,rowIndex:e.rowIndex});eC(s,void 0,i.get("rowClassRules"),r,t,o)}processStylesFromGridOptions(e){const t=this.gos,o=t.get("rowStyle"),i=t.getCallback("getRowStyle");let s;if(i){const r={data:e.data,node:e,rowIndex:e.rowIndex};s=i(r)}if(s||o)return Object.assign({},o,s)}},oC=0,Kr="renderedRow",Ma=class extends A{constructor(e,t,o,i,s){super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=s,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+oC++,this.rowId=Mt(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=md(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Mt(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,o,i){const{context:s,focusSvc:r}=this.beans;i=Hs(this,s,i);const n={rowComp:e,element:t,containerType:o,compBean:i};this.allRowGuis.push(n),this.updateGui(o,n),this.initialiseRowComp(n);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,d=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!d&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const u=this.fullWidthGui?.element;u&&!this.editing&&r.isRowFocused(a.rowIndex,a.rowPinned)&&r.shouldTakeFocus()&&setTimeout(()=>u.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(o=>o.element.style.display=t)}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),Qt(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const o=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(s=>o.addOrRemoveCssClass(s,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&eo(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),Ii(t,e.element,Kr,this),e.compBean.addDestroyFunc(()=>Ii(t,e.element,Kr,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Mt(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(wa(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(wa(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const o=this.createBean(t,this.beans.context);this.rowDragComps.push(o),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(i=>i!==o),this.destroyBean(o,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(o)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:o,beans:{visibleCols:i}}=this,s=!!e||!i.isPinningLeft(),r=!!t,n=!!o||!i.isPinningRight();return s&&r&&n}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),o=this.gos.get("masterDetail")&&this.rowNode.detail,i=this.beans.colModel.isPivotMode(),r=!!this.rowNode.group&&!this.rowNode.footer&&un(this.gos,i);e?this.rowType="FullWidthLoading":o?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":r?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:o}=this.beans;if(!o?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(o.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new fr(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,o=null){const i={list:[],map:{}},s=(d,u,h)=>{h!=null?i.list.splice(h,0,u):i.list.push(u),i.map[d]=u},r=[];for(const d of t){const u=d.getInstanceId();let h=e.map[u];h&&!this.isCorrectCtrlForSpan(h)&&(h.destroy(),h=void 0),h||(h=this.getNewCellCtrl(d)),h&&s(u,h)}for(const d of e.list){const u=d.column.getInstanceId();if(i.map[u]!=null)continue;!this.isCellEligibleToBeRemoved(d,o)?r.push([u,d]):d.destroy()}if(r.length)for(const[d,u]of r){const h=i.list.findIndex(g=>g.column.getLeft()>u.column.getLeft()),p=h===-1?void 0:Math.max(h-1,0);s(d,u,p)}const{focusSvc:n,visibleCols:a}=this.beans,l=n.getFocusedCell();if(l&&l.column.getPinned()==o){const d=l.column.getInstanceId();if(!i.map[d]&&a.allCols.includes(l.column)){const h=this.createFocusedCellCtrl();if(h){const p=i.list.findIndex(f=>f.column.getLeft()>h.column.getLeft()),g=p===-1?void 0:Math.max(p-1,0);s(d,h,g)}}}return i}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,o=e.getFocusedCell();if(!o)return;const i=t?.getCellSpan(o.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(o))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(o.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const o=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(o,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const o=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);const i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){const{column:s}=e;if(s.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{editing:r}=e,{visibleCols:n}=this.beans,a=e.isCellFocused();return r||a?!(n.allCols.indexOf(s)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||tt(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=j(this.rowNode.oldRowTop),{visibleCols:o}=this.beans,i=o.isPinningLeft(),s=o.isPinningRight();if(t){const{slideInAnimation:r}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){r.fullWidth=!0;return}r.center=!0,r.left=i,r.right=s}else{const{fadeInAnimation:r}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){r.fullWidth=!0;return}r.center=!0,r.left=i,r.right=s}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(n,a)=>n?n.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(n.element,a).params):!0,t=e(this.fullWidthGui,null),o=e(this.centerGui,null),i=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&o&&i&&s}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...this.beans.expansionSvc?.getRowExpandedListeners(this)??{}}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventSvc,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.beans.rowSpanSvc&&this.addManagedListeners(this.beans.rowSpanSvc,{spannedCellsUpdated:({pinned:e})=>{e&&!this.rowNode.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(t=>{this.addRowDraggerToRow(t)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(o=>o.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(o=>{this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const o=e==="Above",i=e==="Below";t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",o),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",i)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:nt(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:o,column:i}=t;if(!(o.element===e.target))return;const n=this.rowNode,{focusSvc:a,navigation:l}=this.beans,d=a.getFocusedCell(),u={rowIndex:n.rowIndex,rowPinned:n.rowPinned,column:d?.column??i};l?.navigateToNextCell(e,e.key,u,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||zt(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),o=t?t.element:null,i=o===e.target,s=Ae(this.beans);let r=!1;o&&s&&(r=o.contains(s)&&s.classList.contains("ag-cell"));let n=null;!i&&!r&&(n=so(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!n)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>wt(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(o=>{Si(o.element,"tabindex",t)})}onFullWidthRowFocused(e){const t=this.rowNode,o=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let i;if(this.fullWidthGui)i=this.fullWidthGui.element;else{const r=this.beans.colModel.getCol(e?.column)?.pinned;r?i=r==="right"?this.rightGui?.element:this.leftGui?.element:i=this.centerGui?.element}i&&(i.classList.toggle("ag-full-width-focus",o),o&&e?.forceBrowserFocus&&i.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const o={list:[],map:{}};return e.list.forEach(i=>{i!==t&&(o.list.push(i),o.map[i.column.getInstanceId()]=i)}),o}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:o}=this;return J(this.gos,{type:e,node:o,data:o.data,rowIndex:o.rowIndex,rowPinned:o.rowPinned,event:t})}createRowEventWithSource(e,t){const o=this.createRowEvent(e,t);return o.source=this,o}onRowDblClick(e){zt(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),o=this.getColumnForFullWidth(t);if(!(!t||!o))return{rowGui:t,column:o}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=Qo(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:o,focusSvc:i}=this.beans;o?.removeAllCellRanges();const s=this.findFullWidthInfoForEvent(e);if(!s)return;const{rowGui:r,column:n}=s,a=r.element,l=e.target;let d=e.defaultPrevented||nn();a&&a.contains(l)&&tl(l)&&(d=!1),i.setFocusedCell({rowIndex:t.rowIndex,column:n,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(zt(e)||this.lastMouseDownOnDragger)return;const{eventSvc:o,selectionSvc:i}=this.beans;o.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),i?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:o,rowNode:i}=this,s=J(o,{fullWidth:!0,data:i.data,node:i,value:i.key,valueFormatted:i.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(n,a,l,d)=>this.addFullWidthRowDragging(n,a,l,d),setTooltip:(n,a)=>{o.assertModuleRegistered("Tooltip",3),this.refreshRowTooltip(n,a)}}),r=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return ev(r,s);case"FullWidthGroup":return s.value=i.groupValue,s.valueFormatted=i.rowGroupColumn?this.beans.valueSvc.formatValue(i.rowGroupColumn,i,s.value):s.value,Jm(r,s);case"FullWidthLoading":return Zm(r,s);default:return Xm(r,s)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.refreshRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,o="",i){const{rowDragSvc:s,context:r}=this.beans;if(!s||!this.isFullWidth())return;const n=s.createRowDragComp(()=>o,this.rowNode,void 0,e,t,i);this.createBean(n,r),this.addDestroyFunc(()=>{this.destroyBean(n,r)})}onUiLevelChanged(){const e=md(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass(t,!0),i.rowComp.addOrRemoveCssClass(o,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(t=>{this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass(t,!0))})}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,o=>o.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),o=this.isFullWidth(),{rowNode:i,beans:s}=this,r=[];r.push("ag-row"),r.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&r.push("ag-opacity-zero"),r.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&r.push("ag-row-pinned"),i.isSelected()&&r.push("ag-row-selected"),i.footer&&r.push("ag-row-footer"),r.push("ag-row-level-"+this.rowLevel),i.stub&&r.push("ag-row-loading"),o&&r.push("ag-full-width-row"),s.expansionSvc?.addExpandedCss(r,i),i.dragging&&r.push("ag-row-dragging");const{rowStyleSvc:n}=s;return n&&(n.processClassesFromGridOptions(r,i),n.preProcessRowClassRules(r,i)),r.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&r.push("ag-row-first"),this.isLastRowOnPage()&&r.push("ag-row-last"),o&&(t==="left"&&r.push("ag-cell-last-left-pinned"),t==="right"&&r.push("ag-cell-first-right-pinned")),r}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:o}=e,{rowNode:i,beans:s,gos:r}=this;o.addManagedListeners(t,{mouseenter:()=>i.dispatchRowEvent("mouseEnter"),mouseleave:()=>i.dispatchRowEvent("mouseLeave")}),o.addManagedListeners(i,{mouseEnter:()=>{!s.dragSvc?.dragging&&!r.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(o=>o.element);for(const o of t)o.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),i)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),s=rl(this.gos)?kt(this.beans,this.rowNode).height:void 0,r=s?`${Math.min(o,s)-2}px`:void 0;this.forEachGui(e,n=>{n.element.style.height=`${t}px`,r&&n.element.style.setProperty("--ag-line-height",r)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&xi(this.gos)&&!t.sticky)if(t.rowTop!=null){const s=this.roundRowTopToBounds(t.rowTop);this.setRowTop(s)}else this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.fullWidthGui?.element.contains(Ae(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const o=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(o),this.beans.eventSvc.dispatchEvent(o),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.beans.editSvc?.stopRowEditing(this);const e=t=>(t.list.forEach(o=>o.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e,editSvc:t}=this.beans,o=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);o!==this.rowFocused&&(this.rowFocused=o,this.setFocusedClasses()),!o&&this.editing&&t?.stopRowEditing(this,!1)}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const o=this.beans.pageBounds.getPixelOffset();return e+o*(t?1:-1)}setRowTop(e){if(!this.printLayout&&j(e)){const t=this.applyPaginationOffset(e),s=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(s)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let o;if(t.sticky)o=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(i);o=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return o+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let o=null;return this.getAllCellCtrls().forEach(i=>{i.column==e&&(o=i)}),o!=null||t||this.getAllCellCtrls().forEach(i=>{i.getColSpanningList().indexOf(e)>=0&&(o=i)}),o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const o=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),i=this.rowNode.rowIndex%2===0,s=o+this.rowNode.rowIndex+1;this.forEachGui(e,r=>{r.rowComp.setRowIndex(t),r.rowComp.addOrRemoveCssClass("ag-row-even",i),r.rowComp.addOrRemoveCssClass("ag-row-odd",!i),nu(r.element,s)})}};function Eh(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function vd(e,t,o,i,s){const r=i?i.getColDef().suppressKeyboardEvent:void 0;if(!r)return!1;const n=J(e,{event:t,editing:s,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(r&&r(n))}function iC(e){const{pinnedRowModel:t,rowModel:o}=e,[i,s]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],r=i?null:"top";let n,a;s?(n=null,a=o.getRowCount()-1):(n="bottom",a=t?.getPinnedBottomRowCount()??-1);const{visibleCols:l,rangeSvc:d}=e,u=l.allCols;!d||!u?.length||d.setCellRange({rowStartIndex:0,rowStartPinned:r,rowEndIndex:a,rowEndPinned:n})}var sC=65,rC=67,nC=86,aC=68,lC=90,dC=89;function cC(e){const{keyCode:t}=e;let o;switch(t){case sC:o=M.A;break;case rC:o=M.C;break;case nC:o=M.V;break;case aC:o=M.D;break;case lC:o=M.Z;break;case dC:o=M.Y;break;default:o=e.code}return o}var uC=class extends A{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this)}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Gu("touchstart")?"touchstart":"mousedown"].forEach(o=>{const i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})})}processMouseEvent(e,t){if(!As(this.gos,t)||zt(t))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o?.column&&o.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:mh(t,e),rowCtrl:Nu(t,e,Kr)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){const{rowNode:i,column:s,editing:r}=e;!vd(this.gos,o,i,s,r)&&t==="keydown"&&(!r&&this.beans.navigation?.handlePageScrollingKey(o)||e.onKeyDown(o),this.doGridOperations(o,e.editing),Eh(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){const{rowNode:i}=e,{focusSvc:s,navigation:r}=this.beans,n=s.getFocusedCell(),a=n&&n.column;if(!vd(this.gos,o,i,a,!1)){const d=o.key;if(t==="keydown")switch(d){case M.PAGE_HOME:case M.PAGE_END:case M.PAGE_UP:case M.PAGE_DOWN:r?.handlePageScrollingKey(o,!0);break;case M.LEFT:case M.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case M.UP:case M.DOWN:e.onKeyboardNavigate(o);break;case M.TAB:e.onTabKeyDown(o);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!As(this.gos,e))return;const o=cC(e),{clipboardSvc:i,undoRedo:s}=this.beans;if(o===M.A)return this.onCtrlAndA(e);if(o===M.C)return this.onCtrlAndC(i,e);if(o===M.D)return this.onCtrlAndD(i,e);if(o===M.V)return this.onCtrlAndV(i,e);if(o===M.X)return this.onCtrlAndX(i,e);if(o===M.Y)return this.onCtrlAndY(s);if(o===M.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:s}=this;o&&si(s)&&t.isRowsToRender()?iC(this.beans):i&&i?.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Iu(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);o?.editing||i?.editing||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);o?.editing||i?.editing||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);o?.editing||i?.editing||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},Ah=class extends A{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,o=t!=null?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},Ys=e=>e.topRowCtrls,Qs=e=>e.getStickyTopRowCtrls(),Xs=e=>e.getStickyBottomRowCtrls(),Zs=e=>e.bottomRowCtrls,Js=e=>e.allRowCtrls,Bn=e=>e.getCtrls("top"),On=e=>e.getCtrls("center"),Gn=e=>e.getCtrls("bottom"),hC={center:{type:"center",name:"center-cols",getRowCtrls:Js,getSpannedRowCtrls:On},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Js,getSpannedRowCtrls:On},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Js,getSpannedRowCtrls:On},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Js},topCenter:{type:"center",name:"floating-top",getRowCtrls:Ys,getSpannedRowCtrls:Bn},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Ys,getSpannedRowCtrls:Bn},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Ys,getSpannedRowCtrls:Bn},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Ys},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Qs},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Qs},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Qs},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Qs},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Xs},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Xs},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Xs},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Xs},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Zs,getSpannedRowCtrls:Gn},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Zs,getSpannedRowCtrls:Gn},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Zs,getSpannedRowCtrls:Gn},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Zs}};function Th(e){return`ag-${_s(e).name}-viewport`}function mr(e){const t=_s(e);return t.container??`ag-${t.name}-container`}function pC(e){return`ag-${_s(e).name}-spanned-cells-container`}function _s(e){return hC[e]}var gC=["topCenter","topLeft","topRight"],fC=["bottomCenter","bottomLeft","bottomRight"],mC=["center","left","right"],vC=["center","left","right","fullWidth"],CC=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],bC=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],wC=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],Ih=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Lh=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],yC=[...Ih,"stickyTopFullWidth",...Lh,"stickyBottomFullWidth"],SC=[...gC,...fC,...mC,...Ih,...Lh],RC=class extends A{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=_s(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Jv(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,o,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=i,this.createManagedBean(new uC(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:r}=this.beans,n=()=>this.onPinnedWidthChanged();this.forContainers(bC,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:n})}),this.forContainers(wC,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:n})}),this.forContainers(vC,()=>this.createManagedBean(new Ah(this.eContainer,this.name==="center"?i:void 0))),r&&this.forContainers(SC,()=>this.createManagedBean(r.createDragListenerFeature(this.eContainer))),this.forContainers(CC,()=>this.createManagedBean(new wl(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans;this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsChanged.bind(this),displayedRowsChanged:o=>this.onDisplayedRowsChanged(o.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const o=this.options.getSpannedRowCtrls(e);o&&this.comp.setSpannedRowCtrls(o,!1)}})}listenOnDomOrder(){if(yC.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const o=this.gos.get("ensureDomOrder"),i=tt(this.gos,"print");this.comp.setDomOrder(o||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=o=>{e.dragging&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),o=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,o,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return ws(this.eViewport)}getCenterViewportScrollLeft(){return Tr(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=No(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return mu(this.eViewport)}getViewportScrollLeft(){return Tr(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Pf(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Ir(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const o=tt(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||o,r=t.filter(n=>{const a=n.isFullWidth();return this.options.fullWidth?!s&&a:s||!a});this.comp.setRowCtrls({rowCtrls:r,useFlushSync:e})}},Bh="ag-force-vertical-scroll",xC="ag-selectable",FC="ag-column-moving",kC=class extends A{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,o,i,s,r,n){this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=i,this.eBottom=s,this.eStickyTop=r,this.eStickyBottom=n,this.eCenterColsViewport=o.querySelector(`.${Th("center")}`),this.eFullWidthContainer=o.querySelector(`.${mr("fullWidth")}`),this.eStickyTopFullWidthContainer=r.querySelector(`.${mr("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=n.querySelector(`.${mr("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new bl(this.comp)),this.scrollFeature=this.createManagedBean(new Zv(this.eBodyViewport)),this.beans.rowDragSvc?.setupRowDrag(this.eBodyViewport,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,s,r,n]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t}),this.addManagedPropertyListener("treeData",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const o=t&&e.getScrollbarWidth()||0,i=hu()?16:0,s=`calc(100% + ${o+i}px)`;Wt(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let o=this.gos.get("treeData");if(!o){const i=t.isPivotMode();o=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(o?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:o=>{const{target:i}=o,s=Qo(i,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:o=>{const{target:i,relatedTarget:s}=o,r=t.contains(s),n=Qo(s,"ag-root",t);Qo(i,"ag-root",t)||(!r||n)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(FC,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(xC,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,i=o===-1?-1:e+o;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?Bh:null,o=tt(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||o&&Ef(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const i=()=>{const s=o&&xi(this.gos)&&!e.stretching,r=s?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(r,s)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({gridStylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,i())}})}addBodyViewportListener(){const{popupSvc:e,touchSvc:t}=this.beans,o=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:o}),t?.mockBodyContextMenu(this,o),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this,e)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&As(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e,s=i||Math.abs(t)>Math.abs(o),r=e.target;s?(this.eStickyTopFullWidthContainer.contains(r)||this.eStickyBottomFullWidthContainer.contains(r))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(o))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){if(!e&&!o)return;this.gos.get("preventDefaultOnContextMenu")&&(e||o).preventDefault();const{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e}=this,t=e?.getPinnedTopTotalHeight()??0,o=e?.getPinnedBottomTotalHeight()??0;this.comp.setTopHeight(t),this.comp.setBottomHeight(o),this.comp.setTopInvisible(t<=0),this.comp.setBottomInvisible(o<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),o=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let i=0;t>0&&(i+=t),o>0&&(i+=o),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,i=e?.getPinnedBottomTotalHeight()??0,r=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,n=i+r;o.setStickyBottomBottom(`${n}px`)}},Oh=class extends se{constructor(e,t){super(),this.direction=t,this.eViewport=N,this.eContainer=N,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",cu()||Yo())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=hu(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),o=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:o,touchend:o})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Wt(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;Su(()=>wt(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},DC={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},MC=class extends Oh{constructor(){super(DC,"horizontal"),this.eLeftSpacer=N,this.eRightSpacer=N,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new wl(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const o=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=i),Zt(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),Zt(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,r=o?0:i===0&&t?16:i,n=()=>{this.setScrollVisibleDebounce=0,this.addOrRemoveCssClass("ag-scrollbar-invisible",t),ss(this.getGui(),r),ss(this.eViewport,r),ss(this.eContainer,r),r||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(n,100):n()}getScrollPosition(){return Tr(this.eViewport,this.enableRtl)}setScrollPosition(e){wt(this.eViewport)||this.attemptSettingScrollPosition(e),Ir(this.eViewport,e,this.enableRtl)}},PC={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:MC},EC={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},AC=class extends Oh{constructor(){super(EC,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Ah(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,s=i===0&&o?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",o),Zt(this.getGui(),s),Zt(this.eViewport,s),Zt(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const o=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),s=o.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!wt(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},TC={selector:"AG-FAKE-VERTICAL-SCROLL",component:AC};function IC(e){return e.cols?e.cols.treeDepth+1:-1}function Xt(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function yl(e){const t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of o){if(!i)continue;const s=i.getGroupRowCount()||0;for(let r=0;r<s;r++){const n=i.getGroupRowCtrlAtIndex(r),a=t[r];if(n){const l=LC(e,n);(a==null||l>a)&&(t[r]=l)}}}return t}function LC(e,t){let i=e.colModel.isPivotMode()?OC(e):Nh(e);const s=t.getHeaderCellCtrls();for(const r of s){const{column:n}=r,a=n.getAutoHeaderHeight();a!=null&&a>i&&n.isAutoHeaderHeight()&&(i=a)}return i}function Sl(e){let o=e.colModel.isPivotMode()?BC(e):mn(e);return e.colModel.forAllCols(i=>{const s=i.getAutoHeaderHeight();s!=null&&s>o&&i.isAutoHeaderHeight()&&(o=s)}),o}function mn(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function Gh(e){return e.gos.get("floatingFiltersHeight")??mn(e)}function Nh(e){return e.gos.get("groupHeaderHeight")??mn(e)}function BC(e){return e.gos.get("pivotHeaderHeight")??mn(e)}function OC(e){return e.gos.get("pivotGroupHeaderHeight")??Nh(e)}var GC=class extends A{setComp(e,t,o){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:s,touchSvc:r,ctrlsSvc:n}=i;s&&this.createManagedBean(new Hi(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),r?.mockHeaderContextMenu(this,a),n.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>Wt(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const o=yl(e).reduce((r,n)=>r+n,0),i=Sl(e);if(e.filterManager?.hasFloatingFilters()&&(t+=Gh(e)),t+=o,t+=i,this.headerHeight===t)return;this.headerHeight=t;const s=`${t+1}px`;this.comp.setHeightAndMinHeight(s),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t),this.comp.addOrRemoveCssClass("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",o)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),o=e.shiftKey,i=o!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:r,focusSvc:n}=s;(r.navigateHorizontally(i,!0,e)||!o&&n.focusOverlay(!1)||ai(s,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:o}=this.beans;switch(e.key){case M.LEFT:t="LEFT";case M.RIGHT:{j(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case M.UP:t="UP";case M.DOWN:{j(t)||(t="DOWN"),o.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(Ae(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){const{menuSvc:i,ctrlsSvc:s}=this.beans;if(!e&&!o||!i?.isHeaderContextMenuEnabled())return;const{target:r}=e??t;(r===this.eGui||r===s.getHeaderRowContainerCtrl()?.eViewport)&&i.showHeaderContextMenu(void 0,e,o)}},Rl=class extends se{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},NC={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},VC=class extends Rl{constructor(e){super(NC,e),this.eResize=N,this.eHeaderCompWrapper=N,this.headerCompVersion=0}postConstruct(){const e=this.getGui();((s,r)=>{r!=null&&r!=""?e.setAttribute(s,r):e.removeAttribute(s)})("col-id",this.ctrl.column.getColId());const o={setWidth:s=>e.style.width=s,addOrRemoveCssClass:(s,r)=>this.addOrRemoveCssClass(s,r),setUserStyles:s=>Vs(e,s),setAriaSort:s=>s?wf(e,s):yf(e),setUserCompDetails:s=>this.setUserCompDetails(s),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(o,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);const i=this.ctrl.getSelectAllGui();i&&this.eResize.insertAdjacentElement("afterend",i)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(o=>this.afterCompCreated(t,o))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},HC={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},_C=class extends Rl{constructor(e){super(HC,e),this.eResize=N,this.eHeaderCompWrapper=N}postConstruct(){const e=this.getGui(),t=(i,s)=>s!=null?e.setAttribute(i,s):e.removeAttribute(i);e.setAttribute("col-id",this.ctrl.column.getUniqueId());const o={addOrRemoveCssClass:(i,s)=>this.addOrRemoveCssClass(i,s),setUserStyles:i=>Vs(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>Z(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>t("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(o,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const o=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(o)}addOrRemoveHeaderWrapperStyle(e,t){const{eHeaderCompWrapper:o}=this;t?o.style.setProperty(e,t):o.style.removeProperty(e)}},zC={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},WC=class extends Rl{constructor(e){super(zC,e),this.eFloatingFilterBody=N,this.eButtonWrapper=N,this.eButtonShowMainFilter=N}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(o,i)=>this.addOrRemoveCssClass(o,i),setUserStyles:o=>Vs(e,o),addOrRemoveBodyCssClass:(o,i)=>this.eFloatingFilterBody.classList.toggle(o,i),setButtonWrapperDisplayed:o=>Z(this.eButtonWrapper,o),setCompDetails:o=>this.setCompDetails(o),getFloatingFilterComp:()=>this.compPromise,setWidth:o=>e.style.width=o,setMenuIcon:o=>this.eButtonShowMainFilter.appendChild(o)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},$C=class extends se{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){nu(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,o)=>this.setHeaderCtrls(t,o),setWidth:t=>this.getGui().style.width=t};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const o=this.headerComps;if(this.headerComps={},e.forEach(i=>{const s=i.instanceId;let r=o[s];delete o[s],r==null&&(r=this.createHeaderComp(i),this.getGui().appendChild(r.getGui())),this.headerComps[s]=r}),Object.values(o).forEach(i=>{this.getGui().removeChild(i.getGui()),this.destroyBean(i)}),t){const i=Object.values(this.headerComps);i.sort((r,n)=>{const a=r.getCtrl().column.getLeft(),l=n.getCtrl().column.getLeft();return a-l});const s=i.map(r=>r.getGui());Cu(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new _C(e);break;case"filter":t=new WC(e);break;default:t=new VC(e);break}return this.createBean(t),t.setParentComponent(this),t}},xl=class extends A{constructor(e,t,o,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=o}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?Se(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),i=j(this.columnOrGroup.getOldLeft());t?.isActive()&&i&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),o=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=o,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===o&&this.setLeft(o)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:o,visibleCols:i}=this.beans;if(!tt(o,"print")||e.getPinned()==="left")return t;const r=i.getColsLeftWidth();if(e.getPinned()==="right"){const n=i.bodyWidth;return r+n+t}return r+t}setLeft(e){if(j(e)&&(this.eCell.style.left=`${e}px`),Oe(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&bf(this.ariaEl,t.length)}}},UC=0,Vh="headerCtrl",Fl=class extends A{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+UC++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,i=o.getDefinition(),s=i&&i.suppressHeaderKeyboardEvent;if(!j(s))return!1;const r=J(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!s(r)}getWrapperHasFocus(){return Ae(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let o;if(typeof t=="function"){const i=this.getHeaderClassParams();o=t(i)}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:o,compBean:i}=e,{beans:s}=this,r=h=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:p,paddingBottom:g,borderBottomWidth:f,borderTopWidth:m}=Vi(this.eGui),b=p+g+f+m,S=t.offsetHeight+b;if(h<5){const y=Ge(s),x=!y||!y.contains(t),P=S==0;if(x||P){wa(()=>r(h+1),"raf",s);return}}this.setColHeaderHeight(this.column,S)};let n=!1,a;const l=()=>{const h=this.column.isAutoHeaderHeight();h&&!n&&d(),!h&&n&&u()},d=()=>{n=!0,r(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),a=No(this.beans,t,()=>r(0))},u=()=>{n=!1,a&&a(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),a=void 0};l(),i.addDestroyFunc(()=>u()),i.addManagedListeners(this.column,{widthChanged:()=>n&&r(0)}),i.addManagedEventListeners({sortChanged:()=>{n&&window.setTimeout(()=>r(0))}}),o&&o(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(ph(e,t,o.visibleCols),au(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=ti(this.beans);this.eGui&&Si(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=Ae(this.beans),o=e.key===M.LEFT||e.key===M.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||o)&&(e.preventDefault(),e.stopImmediatePropagation()),!o))return;const s=e.key===M.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(s)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:o}=this;let i=e.key===M.LEFT!==t.get("enableRtl");const s=o.getPinned(),r=t.get("enableRtl");return s&&r!==(s==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case M.PAGE_DOWN:case M.PAGE_UP:case M.PAGE_HOME:case M.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=Vh,{eGui:o,gos:i}=this;Ii(i,o,t,this),e.addDestroyFunc(()=>Ii(i,o,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){const i=e??t,{menuSvc:s,gos:r}=this.beans;r.get("preventDefaultOnContextMenu")&&i.preventDefault(),s?.isHeaderContextMenuEnabled(o)&&s.showHeaderContextMenu(o,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",o)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:o}=this;e.isColumn?o.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):o.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},jC=class extends Fl{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,o,i,s){this.comp=e;const{rowCtrl:r,column:n,beans:a}=this,{colResize:l,context:d,colHover:u,rangeSvc:h}=a,p=Hs(this,d,s);this.setGui(t,p),this.updateState(),this.setupWidth(p),this.setupMovingCss(p),this.setupMenuClass(p),this.setupSortableClass(p),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:f=>this.setRefreshFunction("measuring",f),compBean:p}),this.addColumnHoverListener(p),this.setupFilterClass(p),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(p),this.setupSelectAll(p),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=p.createManagedBean(l.createResizeFeature(r.pinned,n,o,e,this)):Z(o,!1),u?.createHoverFeature(p,[n],t),h?.createRangeHighlightFeature(p,n,e),p.createManagedBean(new xl(n,t,a)),p.createManagedBean(new Hi(t,{shouldStopEventPropagation:f=>this.shouldStopEventPropagation(f),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(p),p.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),p.addManagedListeners(n,{colDefChanged:()=>this.refresh()}),p.addManagedListeners(n,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();p.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),p.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return J(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return Km(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return J(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!o&&(!this.openFilterEnabled||Ke(this.gos)),showColumnMenu:(r,n)=>{e?.showColumnMenu({column:this.column,buttonElement:r,positionBy:"button",onClosedCallback:n})},showColumnMenuAfterMouseClick:(r,n)=>{e?.showColumnMenu({column:this.column,mouseEvent:r,positionBy:"mouse",onClosedCallback:n})},showFilter:r=>{e?.showFilterMenu({column:this.column,buttonElement:r,containerType:"columnFilter",positionBy:"button"})},progressSort:r=>{t?.progressSort(this.column,!!r,"uiColumnSorted")},setSort:(r,n)=>{t?.setSortForColumn(this.column,r,!!n,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(r,n)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(r,n)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature.setComp(this))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===M.SPACE&&this.selectAllFeature?.onSpaceKeyDown(e),e.key===M.ENTER&&this.onEnterKeyDown(e),e.key===M.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){const o=this.comp.getUserCompInstance();Cd(o)&&o.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),fh()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),o=uh(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(o),o.forEach(s=>{i.has(s)?i.delete(s):this.comp.addOrRemoveCssClass(s,!0)}),i.forEach(s=>this.comp.addOrRemoveCssClass(s,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const o=this.column.getActualWidth();this.comp.setWidth(`${o}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const o=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",o),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,o=e===1;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",o)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:o,beans:i}=this,s=yl(this.beans),r=s.reduce((u,h)=>u+=h,0)===0;if(o.addOrRemoveCssClass("ag-header-parent-hidden",r),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),o.addOrRemoveCssClass("ag-header-span-height",!1),o.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:n,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();o.addOrRemoveCssClass("ag-header-span-height",n>0);const l=Sl(i);if(n===0){o.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}o.addOrRemoveCssClass("ag-header-span-total",a);let d=0;for(let u=0;u<n;u++)d+=s[s.length-1-u];e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${l+d}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(cf(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!Ke(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(Ae(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,o)=>t==="filter"?-1:o.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return Cd(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Cd(e){return typeof e.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var KC=0,Nn=class extends A{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=KC++,this.allCtrls=[];const i=o=="group"?"ag-header-row-column-group":o=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${i}`}postConstruct(){this.isPrintLayout=tt(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,o=!0){this.comp=e,t=Hs(this,this.beans.context,t),o&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=tt(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{filterManager:e}=this.beans,t=[],o=yl(this.beans),i=Sl(this.beans);t.push(...o),t.push(i),e?.hasFloatingFilters()&&t.push(Gh(this.beans));let s=0;for(let n=0;n<this.rowIndex;n++)s+=t[n];const r=t[this.rowIndex];return{topOffset:s,rowHeight:r}}onVirtualColumnsChanged(e=!1){const t=this.getUpdatedHeaderCtrls(),o=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,o,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,e);const o=i=>{const{focusSvc:s,visibleCols:r}=this.beans;return s.isHeaderWrapperFocused(i)?r.isVisible(i.column):!1};if(e)for(const[i,s]of e)o(s)?this.ctrlsById.set(i,s):this.destroyBean(s);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;const i=e.getUniqueId();let s;if(o&&(s=o.get(i),o.delete(i)),s&&s.column!=e&&(this.destroyBean(s),s=void 0),s==null)switch(this.type){case"filter":{s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new jC(e,this));break}t.set(i,s)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{colViewport:o}=this.beans;return["left",null,"right"].forEach(i=>{const s=o.getHeadersToRender(i,t);e=e.concat(s)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.colViewport.getHeadersToRender(this.pinned,this.getActualDepth())}focusHeader(e,t){const o=this.allCtrls.find(s=>s.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,super.destroy()}},qC=class extends A{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:o,ctrlsSvc:i,colModel:s,colMoves:r,filterManager:n}=this.beans;this.setupCenterWidth(),o?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(r,this.eViewport);const a=this.onDisplayedColumnsChanged.bind(this,n);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:a,advancedFilterEnabledChanged:a});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(l,this),s.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,colModel:o,filterManager:i}=this.beans;let s=0;const r=t.getFocusHeaderToUseAfterRefresh(),n=()=>{const u=IC(o)-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let h=0;h<u;h++){const p=this.createBean(new Nn(s++,this.pinned,"group"));this.groupsRowCtrls.push(p)}},a=()=>{const u=s++,h=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.rowIndex!==u);(h||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),h&&(this.columnsRowCtrl=this.createBean(new Nn(u,this.pinned,"column")))},l=()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}const h=s++;if(this.filtersRowCtrl){const p=this.filtersRowCtrl.rowIndex!==h;(!e||p)&&u()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new Nn(h,this.pinned,"filter")))};n(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,r)}getHeaderCtrlForColumn(e){const t=o=>o?.getHeaderCellCtrls().find(i=>i.column===e);if(to(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;o<this.groupsRowCtrls.length;o++){const i=t(this.groupsRowCtrls[o]);if(i)return i}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,o){const s=this.getAllCtrls()[e];return s?s.focusHeader(t,o):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const o=e?.createBodyDropTarget(this.pinned,t);o&&this.createManagedBean(o)}restoreFocusOnHeader(e,t){if(!t)return;const{column:o}=t;o.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(e){const t=!!e?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==t&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new wl(e=>this.comp.setCenterWidth(`${e}px`),!0))}},YC=class extends A{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const{enterpriseMenuFactory:t,filterMenuFactory:o}=this.beans,i=t&&Ke(this.gos)?t:o;this.showColumnMenuCommon(i,e,e.containerType,!0)}showHeaderContextMenu(e,t,o){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,o)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(Ke(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&to(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Yo()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!Ke(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!Ke(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return Ke(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,o,i){const{positionBy:s,onClosedCallback:r}=t,n=t.column;if(s==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(n,a,o,r,i)}else if(s==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(n,a,o,r,i)}else if(n){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(n,"auto"),Wt(a,()=>{const d=l.getHeaderRowContainerCtrl(n.getPinned())?.getHeaderCtrlForColumn(n);d&&e?.showMenuAfterButtonClick(n,d.getAnchorElementForMenu(i),o,r,!0)})}}};function qr(e,t,o){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",o))}var Hh=class extends se{constructor(){super()}},QC={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},XC=class extends Hh{init(){const e=nt(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??QC),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("loadingOoo","Loading...")})}}},ZC={tag:"span",cls:"ag-overlay-no-rows-center"},JC=class extends Hh{init(){const e=nt(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??ZC),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("noRowsToShow","No Rows To Show")})}}};function Bo(e,t,o){const i=de(e,t,o);if(i){const{className:r}=i;if(typeof r=="string"&&r.indexOf("ag-icon")>-1||typeof r=="object"&&r["ag-icon"])return i}const s=Me({tag:"span"});return s.appendChild(i),s}function de(e,t,o){let i=null;e==="smallDown"?H(262):e==="smallLeft"?H(263):e==="smallRight"&&H(264);const s=o&&o.getColDef().icons;if(s&&(i=s[e]),t.gos&&!i){const r=t.gos.get("icons");r&&(i=r[e])}if(i){let r;if(typeof i=="function")r=i();else if(typeof i=="string")r=i;else{H(38,{iconName:e});return}if(typeof r=="string")return ln(r);if(dn(r))return r;H(133,{iconName:e});return}else{const r=t.registry.getIcon(e);return r||t.validation?.validateIcon(e),Me({tag:"span",cls:`ag-icon ag-icon-${r??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var eb=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}",tb={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},ob=class extends se{constructor(){super(),this.dragSource=null,this.eIcon=N,this.eLabel=N,this.eGhost=N,this.registerCSS(eb)}postConstruct(){const e=t=>Bo(t,this.beans,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(tb),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:o,dragSource:i,dropIconMap:s,gos:r}=this;rt(o);let n=null;e||(e=i?.getDefaultIconName?i.getDefaultIconName():"notAllowed"),n=s[e],o.classList.toggle("ag-shake-left-to-right",t),!(n===s.hide&&r.get("suppressDragLeaveHidesColumns"))&&n&&o.appendChild(n)}setLabel(e){this.eLabel.textContent=e}},ib=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",sb=class extends se{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(ib)}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:o,labelAlignment:i,disabled:s}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),o!=null&&this.setLabelWidth(o),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;rt(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Z(t,!1),et(t,"presentation")):(Z(t,!0),et(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const o=this.getGui().classList;return o.toggle("ag-label-align-left",e==="left"),o.toggle("ag-label-align-right",e==="right"),o.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(Lr(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return bs(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},_h=class extends sb{constructor(e,t,o,i){super(e,t,o),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:o}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),o!=null&&this.onValueChange(o),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),o=this.getLabel();o==null||o==""||hf(e)!==null?Ti(e,""):Ti(e,t??"")}setAriaLabel(e){return bt(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Zt(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function rb(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var bi=class extends _h{constructor(e,t,o="text",i="input"){super(e,e?.template??rb(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=N,this.eWrapper=N,this.eInput=N}postConstruct(){super.postConstruct(),this.setInputType();const{eLabel:e,eWrapper:t,eInput:o,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),o.classList.add(`${i}-input`),this.addCssClass("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:r}=this.config;s!=null&&this.setInputName(s),r!=null&&this.setInputWidth(r),this.addInputListeners(),this.activateTabIndex([o])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return Lr(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Si(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return bt(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return bs(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Si(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Si(this.eInput,"autocomplete",t)}return this}},vn=class extends bi{constructor(e,t="ag-checkbox",o="checkbox"){super(e,t,o),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const o=this.eInput;o.checked=e,o.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,o){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:o});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},ci={selector:"AG-CHECKBOX",component:vn},nb=".ag-checkbox-cell{height:100%}",ab={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},lb=class extends se{constructor(){super(ab,[ci]),this.eCheckbox=N,this.registerCSS(nb)}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),eu(i,"polite"),this.addManagedListeners(i,{click:s=>{if(mo(s),t.isDisabled())return;const r=t.getValue();this.onCheckboxChanged(r)},dblclick:s=>{mo(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===M.SPACE&&!t.isDisabled()){e.eGridCell===Ae(o)&&t.toggle();const r=t.getValue();this.onCheckboxChanged(r),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,o=!0;const{value:i,column:s,node:r}=e;if(r.group&&s)if(typeof i=="boolean")t=i;else{const h=s.getColId();h.startsWith(ni)?t=i==null||i===""?void 0:i==="true":r.aggData&&r.aggData[h]!==void 0?t=i??void 0:o=!1}else t=i??void 0;const{eCheckbox:n}=this;if(!o){n.setDisplayed(!1);return}n.setValue(t);const a=e.disabled??!s?.isCellEditable(r);n.setDisabled(a);const l=this.getLocaleTextFunc(),d=du(l,t),u=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;n.setInputAriaLabel(u)}onCheckboxChanged(e){const{eventSvc:t,params:o}=this,{column:i,node:s,value:r}=o,n={column:i,colDef:i.getColDef(),data:s.data,node:s,rowIndex:s.rowIndex,rowPinned:s.rowPinned,value:r};t.dispatchEvent({type:"cellEditingStarted",...n});const a=s.setDataValue(i,e,"edit");t.dispatchEvent({type:"cellEditingStopped",...n,oldValue:r,newValue:e,valueChanged:a}),a||this.updateCheckbox(o)}},db="ROOT_NODE_ID",cb=class extends A{constructor(){super(...arguments),this.nextId=0,this.allNodesMap={},this.rootNode=null}get treeData(){return!1}getRowNode(e){return this.allNodesMap[e]}extractRowData(){return this.rootNode?.allLeafChildren?.map(e=>e.data)}activate(e){this.rootNode=e,e.group=!0,e.level=-1,e.id=db,e.allLeafChildren=[],e.childrenAfterGroup=[],e.childrenAfterSort=[],e.childrenAfterAggFilter=[],e.childrenAfterFilter=[],this.updateRootSiblingArrays(e)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(e){const t=this.rootNode;t&&(this.dispatchRowDataUpdateStartedEvent(e),t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(e),this.updateRootSiblingArrays(t))}updateRootSiblingArrays(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenAfterAggFilter=e.childrenAfterAggFilter,t.childrenAfterSort=e.childrenAfterSort,t.childrenMapped=e.childrenMapped,t.allLeafChildren=e.allLeafChildren)}loadNewRowData(e){this.rootNode.allLeafChildren=e?.map((t,o)=>this.createRowNode(t,o))??[]}setImmutableRowData(e,t){const o=Fs(this.gos),i=!this.gos.get("suppressMaintainUnsortedOrder"),s=e.changedRowNodes,r=new Set,n=this.rootNode,a=n.allLeafChildren,l=a.length;let d=!1,u=!1,h=!1,p=!1;for(let f=0,m=-1,b=t.length;f<b;f++){const w=t[f];let S=this.getRowNode(o({data:w,level:0}));if(!S)d=!0,S=this.createRowNode(w,-1),s.add(S);else{if(i){const y=S.sourceRowIndex;p||(p=y<=m||d),m=y}S.data!==w&&(h=!0,S.updateData(w),s.update(S))}r.add(S)}const g=[];for(let f=0;f<l;f++){const m=a[f];r.has(m)||(u=!0,m.isSelected()&&g.push(m),this.rowNodeDeleted(m),s.remove(m))}if(d||u||p){const f=new Array(r.size);let m=0;if(!i)for(let w=0;w<l;++w){const S=a[w];r.delete(S)&&(S.sourceRowIndex=m,f[m++]=S)}for(const w of r)w.sourceRowIndex=m,f[m++]=w;n.allLeafChildren=f;const b=n.sibling;b&&(b.allLeafChildren=f),e.rowNodesOrderChanged||(e.rowNodesOrderChanged=p)}(d||u||p||h)&&(this.deselectNodes(g),e.rowDataUpdated=!0)}rowNodeDeleted(e){e.clearRowTopAndRowIndex();const t=e.id,o=this.allNodesMap;o[t]===e&&delete o[t]}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);const o={changedRowNodes:t,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},i=[],s=Fs(this.gos);return this.executeRemove(s,e,o,i),this.executeUpdate(s,e,o,i),this.executeAdd(e,o),this.deselectNodes(i),o}executeAdd(e,t){const o=e.add;if(!o?.length)return;let i=this.rootNode.allLeafChildren,s=i.length;if(typeof e.addIndex=="number"&&(s=this.sanitizeAddIndex(e.addIndex),s>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let h=0;h<i.length;h++)if(i[h]?.rowIndex==s-1){s=h+1;break}}const r=o.length,n=t.changedRowNodes,a=new Array(r);for(let u=0;u<r;u++){const h=this.createRowNode(o[u],s+u);n.add(h),a[u]=h}const l=this.rootNode;if(s<i.length){const u=i.slice(0,s),h=i.slice(s,i.length),p=u.length+a.length;for(let g=0,f=h.length;g<f;++g)h[g].sourceRowIndex=p+g;i=[...u,...a,...h],t.rowsInserted=!0}else i=i.concat(a);l.allLeafChildren=i;const d=l.sibling;d&&(d.allLeafChildren=i),t.rowNodeTransaction.add=a}executeRemove(e,t,{changedRowNodes:o,rowNodeTransaction:i},s){const{remove:r}=t;if(!r?.length)return;const n={};r.forEach(d=>{const u=this.lookupRowNode(e,d);u&&(u.isSelected()&&s.push(u),u.clearRowTopAndRowIndex(),n[u.id]=!0,delete this.allNodesMap[u.id],i.remove.push(u),o.remove(u))});const a=this.rootNode;a.allLeafChildren=a.allLeafChildren?.filter(d=>!n[d.id])??null,a.allLeafChildren?.forEach((d,u)=>{d.sourceRowIndex=u});const l=a.sibling;l&&(l.allLeafChildren=a.allLeafChildren)}executeUpdate(e,t,{changedRowNodes:o,rowNodeTransaction:i},s){const{update:r}=t;r?.length&&r.forEach(n=>{const a=this.lookupRowNode(e,n);a&&(a.updateData(n),!a.selectable&&a.isSelected()&&s.push(a),i.update.push(a),o.update(a))})}dispatchRowDataUpdateStartedEvent(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselectNodes(e){const t="rowDataChanged",o=this.beans.selectionSvc,i=e.length>0;i&&o?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),o?.updateGroupsFromChildrenSelections?.(t),i&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:o?.getSelectedNodes()??null,serverSideState:null})}sanitizeAddIndex(e){const t=this.rootNode.allLeafChildren?.length??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}createRowNode(e,t){const o=new di(this.beans);return o.parent=this.rootNode,o.level=0,o.group=!1,o.expanded=!1,o.sourceRowIndex=t,o.setDataAndId(e,String(this.nextId)),this.allNodesMap[o.id]&&H(2,{nodeId:o.id}),this.allNodesMap[o.id]=o,this.nextId++,o}lookupRowNode(e,t){let o;if(e){const i=e({data:t,level:0});if(o=this.allNodesMap[i],!o)return he(4,{id:i}),null}else if(o=this.rootNode?.allLeafChildren?.find(i=>i.data===t),!o)return he(5,{data:t}),null;return o||null}},Yt=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(Yt||{}),ub={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},hb=class extends se{constructor(){super(ub,[ci]),this.eCheckbox=N}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:o}=this,i=t.isSelected(),s=du(e,i),[r,n]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(r,n);o.setValue(i,!0),o.setInputAriaLabel(`${a} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:mo,click:i=>{mo(i),this.beans.selectionSvc?.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const r=typeof i=="object"?An(i):void 0,n=typeof s=="object"?An(s):void 0;r!==n&&this.onSelectableChanged()}),xa(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:o,gos:i}=this;let s=t.selectable;const r=this.getIsVisible();if(s)if(typeof r=="function"){const l=o?.callbackParams;if(!e)s=r({...l,node:t,data:t.data});else{const d=e.createColumnFunctionCallbackParams(t);s=r({...l,...d})}}else s=r??!1;const n=i.get("rowSelection");if(n&&typeof n!="string"?!An(n):e?.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!s),this.setVisible(!0),this.setDisplayed(!0);return}if(o?.removeHidden){this.setDisplayed(s);return}this.setVisible(s)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?Zo(t):this.column?.getColDef()?.checkboxSelection}},pb=class{constructor(e){this.rowModel=e,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){return this.rootId?this.rowModel.getRowNode(this.rootId)??null:e?(this.setRoot(e),e):null}getEnd(){return this.endId?this.rowModel.getRowNode(this.endId)??null:null}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const o=t[0].id===this.rootId,i=t.findIndex(s=>s.id===e.id);if(i>-1){const s=t.slice(0,i),r=t.slice(i+1);return this.setEndRange(e),o?{keep:s,discard:r}:{keep:r,discard:s}}else return{keep:t,discard:[]}}extend(e,t=!1){const o=this.getRoot();if(o==null){const s=this.getRange().slice();return t&&e.depthFirstSearch(r=>!r.group&&s.push(r)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const i=this.rowModel.getNodesInRangeForSelection(o,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(s=>s.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:s}}}},gb=class extends A{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Ae(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new vn);this.cbSelectAll=t,t.addCssClass("ag-header-select-all"),et(t.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const s=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;s(o)!==s(i)&&this.showOrHideSelectAll()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,o=this.cbSelectAll,i=t.getSelectAllState(e);o.setValue(i);const s=t.hasNodesToSelect(e);o.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:o,cbSelectAll:i,cbSelectAllVisible:s}=this,n=i.getValue()?t("ariaChecked","checked"):t("ariaUnchecked","unchecked"),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");o.setAriaDescriptionProperty("selectAll",s?`${a} (${n})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||o.announceAriaDescription()}checkSelectionType(e){return ri(this.gos)?!0:(H(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:o}=this.beans;return $t(t)||yt(t)?!0:(H(129,{feature:e,rowModel:o.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let o="uiSelectAll";t==="currentPage"?o="uiSelectAllCurrentPage":t==="filtered"&&(o="uiSelectAllFiltered");const i={source:o,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(i):s.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:o}=this,i=t.get("rowSelection"),s=e.getColDef(),{headerCheckboxSelection:r}=s;let n=!1;const a=typeof i=="object";if(a){const d=vo(e),u=pn(e);(ks(i)==="autoGroupColumn"&&u||d&&o.selectionColSvc?.isSelectionColumnEnabled())&&(n=pr(i))}else typeof r=="function"?n=r(J(t,{column:e,colDef:s})):n=!!r;const l=a?"headerCheckbox":"headerCheckboxSelection";return n&&this.checkRightRowModelType(l)&&this.checkSelectionType(l)}getSelectAllMode(){const e=Iu(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:o}=this.column.getColDef();return t?"currentPage":o?"filtered":"all"}},fb=class extends A{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new pb(t.rowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const o=xa(e);o!==this.isRowSelectable&&(this.isRowSelectable=o,this.updateSelectable())}),this.isRowSelectable=xa(e)}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new hb}createSelectAllFeature(e){return new gb(e)}isMultiSelect(){return ri(this.gos)}onRowCtrlSelected(e,t,o){const i=!!e.rowNode.isSelected();e.forEachGui(o,s=>{s.rowComp.addOrRemoveCssClass("ag-row-selected",i);const r=s.element;va(r,i),r.contains(Ae(this.beans))&&t(s)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected();if(!e.selectable)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||!!e.rowPinned||!Qt(this.gos)}updateRowSelectable(e,t){const o=this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,o,t),o}setRowSelectable(e,t,o){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),o)return;if(Ds(this.gos)){const s=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,o=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const s=e.childrenAfterGroup[i];let r=s.isSelected();if(!s.selectable){const n=this.calculateSelectedFromChildren(s);if(n===null)continue;r=n}switch(r){case!0:t=!0;break;case!1:o=!0;break;default:return}}if(!(t&&o))return t?!0:o?!1:e.selectable?e.__selected:null}selectRowNode(e,t,o,i="api"){const s=!e.selectable&&t,r=e.__selected===t;if(s||r)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const n=e.sibling;return n&&n.footer&&n.__localEventService&&n.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Rh(e,this.gos,"rowSelected"),event:o||null,source:i}),!0}isCellCheckboxSelection(e,t){const o=this.gos.get("rowSelection");if(o&&typeof o!="string"){const i=vo(e)&&Zo(o);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,o,i){const{gos:s,selectionCtx:r}=this,n=e.isSelected(),a=Ds(s),l=Yf(s),d=Qf(s),u=this.isMultiSelect(),h=i==="rowClicked";if(h&&a&&e.group||h&&!(l||d))return null;if(t&&o&&u){const p=r.getRoot();if(p)if(p.isSelected()){const g=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=r.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&u){const p=r.selectAll?this.beans.rowModel.getRow(0):void 0,g=r.getRoot(p),f=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{select:f.keep,deselect:f.discard,reset:r.selectAll||!!(g&&!g.isSelected())}}else{if(o)return r.setRoot(e),h&&n&&!d?null:{node:e,newValue:!n,clearSelection:!u};{r.setRoot(e);const p=Xf(s),g=Tu(s)==="filteredDescendants",f=h&&(!p||!l);if(g&&n===void 0&&$t(s))return{node:e,newValue:!1,clearSelection:!u||f};if(h){const m=n?!p:l;return m===n&&!f||m&&!l||!m&&!d?null:{node:e,newValue:m,clearSelection:!u||f}}return{node:e,newValue:!n,clearSelection:!u||f}}}}},mb=class extends vn{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},vb='.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;transition:background-color .1s;:where(.ag-toggle-button-input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-toggle-button-height);margin:0;max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);opacity:0}&:before{background-color:var(--ag-toggle-button-switch-background-color);border-radius:100%;content:"";display:block;height:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2);left:var(--ag-toggle-button-switch-inset);pointer-events:none;position:absolute;top:var(--ag-toggle-button-switch-inset);transition:left .1s;width:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2)}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color);&:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-switch-inset))}}&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{opacity:.5}}',Cb=class extends vn{constructor(e){super(e,"ag-toggle-button"),this.registerCSS(vb)}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},kl=class extends bi{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const o=this.eInput;return o.value!==e&&(o.value=j(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{Eh(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{const i=o.clipboardData?.getData("text");i&&i.split("").some(s=>!e.test(s))&&o.preventDefault()}})}},Dl={selector:"AG-INPUT-TEXT-FIELD",component:kl};function bd(e,t){return e.toString().padStart(t,"0")}function wd(e,t=!0,o="-"){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>bd(s,2)).join(o);return t&&(i+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>bd(s,2)).join(":")),i}function yd(e){if(!e)return null;const[t,o]=e.split(" ");if(!t)return null;const i=t.split("-").map(h=>parseInt(h,10));if(i.filter(h=>!isNaN(h)).length!==3)return null;const[s,r,n]=i,a=new Date(s,r-1,n);if(a.getFullYear()!==s||a.getMonth()!==r-1||a.getDate()!==n)return null;if(!o||o==="00:00:00")return a;const[l,d,u]=o.split(":").map(h=>parseInt(h,10));return l>=0&&l<24&&a.setHours(l),d>=0&&d<60&&a.setMinutes(d),u>=0&&u<60&&a.setSeconds(u),a}var bb=1e3,wb=1e3,Sd=100,Rd,er=!1,yb=class extends A{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return e==="show"?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Yo()&&(er?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},Sd):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||er)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-Rd<bb}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!j(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=t.getRowNode?.(),i=J(this.gos,{location:t.getLocation?.()??"UNKNOWN",colDef:t.getColDef?.(),column:t.getColumn?.(),rowIndex:t.getRowIndex?.(),node:o,data:o?.data,value:e,valueFormatted:t.getValueFormatted?.(),hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()??{}});this.state=2,this.tooltipInstanceCount++;const s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);sv(this.userCompFactory,i)?.newAgStackInstance().then(s)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Rd=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),r=this.popupSvc?.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const n=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:n,columnMoved:n})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Ge(this.beans),{keydown:n=>{i.contains(n?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=Ae(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?wb:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){er=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Sd)}unlockService(){er=!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()}};function ls(e){return e.get("tooltipShowMode")==="whenTruncated"}function Ml(e,t){return ls(e)?ds(t):void 0}function ds(e){return()=>{const t=e();return t?t.scrollWidth>t.clientWidth:!0}}var Sb=class extends A{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e){const t="title",o=this.ctrl.getGui();o&&(e!=null&&e!=""?o.setAttribute(t,e):o.removeAttribute(t))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new yb(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},Rb=class extends se{constructor(e="default",t=!1){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case M.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case M.DOWN:case M.UP:e.preventDefault(),this.navigate(t);break;case M.PAGE_DOWN:case M.PAGE_UP:case M.PAGE_HOME:case M.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===M.DOWN;let o;const{itemEls:i,highlightedEl:s}=this;if(!s)o=i[t?0:i.length-1];else{let n=i.indexOf(s)+(t?1:-1);n=Math.min(Math.max(n,0),i.length-1),o=i[n]}this.highlightItem(o)}navigateToPage(e){const{itemEls:t,highlightedEl:o}=this;if(!o||t.length===0)return;const i=t.indexOf(o),s=this.options.length-1,r=t[0].clientHeight,n=Math.floor(this.getGui().clientHeight/r);let a=-1;e===M.PAGE_HOME?a=0:e===M.PAGE_END?a=s:e===M.PAGE_DOWN?a=Math.min(i+n,s):e===M.PAGE_UP&&(a=Math.max(i-n,0)),a!==-1&&this.highlightItem(t[a])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:o}=e,i=o||t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{Dt(e)}),this.itemEls=[],this.refreshAriaRole()}refreshAriaRole(){const e=this.getGui();et(e,this.options.length===0?"presentation":"listbox")}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");this.refreshAriaRole(),e.forEach((t,o)=>{ru(t,o+1),su(t,e.length)})}renderOption(e,t){const o=Ge(this.beans),i=o.createElement("div");et(i,"option"),i.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const s=o.createElement("span");i.appendChild(s),s.textContent=t,this.unFocusable||(i.tabIndex=-1),this.itemEls.push(i),this.addManagedListeners(i,{mouseover:()=>this.highlightItem(i),mousedown:r=>{r.preventDefault(),r.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>i,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>s.scrollWidth>s.clientWidth})),this.getGui().appendChild(i)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const o=this.options.findIndex(i=>i.value===e);if(o!==-1){const i=this.options[o];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.itemEls[o]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!wt(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),va(e,!0);const t=this.getGui(),{scrollTop:o,clientHeight:i}=t,{offsetTop:s,offsetHeight:r}=e;(s+r>o+i||s<o)&&e.scrollIntoView({block:"nearest"}),this.unFocusable||e.focus()}clearHighlighted(){const e=this.highlightedEl;!e||!wt(e)||(e.classList.remove(this.activeClass),va(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},xb=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow)}}",Fb={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},kb=class extends _h{constructor(e){if(super(e,e?.template||Fb,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=N,this.eWrapper=N,this.eDisplayField=N,this.eIcon=N,this.registerCSS(xb),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:o,variableWidth:i,minPickerWidth:s,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,o!=null&&this.setPickerMaxHeight(o),s!=null&&this.setPickerMinWidth(s),r!=null&&this.setPickerMaxWidth(r)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:o,inputWidth:i}=this.config;if(o){const s=de(o,this.beans);s&&this.eIcon.appendChild(s)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),eo(e,!1),this.ariaRole&&et(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case M.UP:case M.DOWN:case M.ENTER:case M.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case M.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:o,pickerAriaLabelValue:i,modalPicker:s=!0},maxPickerHeight:r,minPickerWidth:n,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:u}=this,h={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=Rs(d);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:u};e.style.position="absolute";const p=d.popupSvc,g=p.addPopup(h);l?(n&&(e.style.minWidth=n),e.style.width=ol(Ar(u)),a&&(e.style.maxWidth=a)):Lr(e,a??Ar(u));const f=r??`${an(p.getPopupParent())}px`;return e.style.setProperty("max-height",f),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:o,gos:i},eWrapper:s,pickerComponent:r}=this,n=i.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:s,ePopup:r.getGui(),position:"under",alignSide:n,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();eo(t,e);const o=this.eWrapper.classList;o.toggle("ag-picker-expanded",e),o.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker?.()}setInputWidth(e){return Lr(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},Db=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",zh=class extends kb{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(Db)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:ds(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:o}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),o&&t==null&&(this.eDisplayField.textContent=o),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new Rb("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),Sf(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){const{key:t}=e;switch(t===M.TAB&&this.hidePicker(),t){case M.ENTER:case M.UP:case M.DOWN:case M.PAGE_UP:case M.PAGE_DOWN:case M.PAGE_HOME:case M.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case M.ESCAPE:super.onKeyDown(e);break;case M.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,o){const{listComponent:i,config:{placeholder:s},eDisplayField:r,tooltipFeature:n}=this;if(this.value===e||!i)return this;if(o||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&s&&(l=s),r.textContent=l,n?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},vr={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Mb=class extends A{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:o,eBottomGuard:i,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:n,focusInnerElement:a,onFocusIn:l,onFocusOut:d,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:p,isEmpty:g,eFocusableElement:f}=e;this.comp=t,this.eTopGuard=o,this.eBottomGuard=i,this.providedFocusInnerElement=a,this.eFocusableElement=f,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!n,this.providedFocusIn=l,this.providedFocusOut=d,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=p,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new Hi(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():ei(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=Ge(this.beans),o=ei(t.body,null,!0),i=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let s,r;e?(s=0,r=i):(s=i+1,r=o.length);const n=o.slice(s,r),a=this.gos.get("tabIndex");n.sort((l,d)=>{const u=parseInt(l.getAttribute("tabindex")||"0"),h=parseInt(d.getAttribute("tabindex")||"0");return h===a?1:u===a?-1:u===0?1:h===0?-1:u-h}),n[e?n.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=ei(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return so(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},Wh=class extends A{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:o,eFocusableElement:i}=this,s=[t,o],r={setTabIndex:b=>{s.forEach(w=>b!=null?w.setAttribute("tabindex",b):w.removeAttribute("tabindex"))}};this.addTabGuards(t,o);const{focusTrapActive:n=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:p,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}=e;this.tabGuardCtrl=this.createManagedBean(new Mb({comp:r,focusTrapActive:n,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:p,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Ge(this.beans).createElement("div"),o=e==="top"?vr.TAB_GUARD_TOP:vr.TAB_GUARD_BOTTOM;return t.classList.add(vr.TAB_GUARD,o),et(t,"presentation"),t}addTabGuards(e,t){const o=this.eFocusableElement;o.insertAdjacentElement("afterbegin",e),o.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];rt(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){dn(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;Dt(e),Dt(t),super.destroy()}},ui=class extends se{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new Wh(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},Pb=class extends se{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},mi=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new fo,this.preventMouseClick=t;const o=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);e.addEventListener("touchstart",o,{passive:!0}),e.addEventListener("touchmove",i,{passive:!0}),e.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",o,{passive:!0}),e.removeEventListener("touchmove",i,{passive:!0}),e.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;const t=this.touchStart;window.setTimeout(()=>{const o=this.touchStart===t;if(this.touching&&o&&!this.moved){this.moved=!0;const i={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(i)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!wh(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=Date.now();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const o={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(o),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},$h=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${yu}/${this.frameworkName}-data-grid`,Bf(this.baseDocLink)}setInterval(e,t){return new Ce(o=>{o(window.setInterval(e,t))})}addEventListener(e,t,o,i){let s={};if(typeof i=="object"?s=i:typeof i=="boolean"&&(s={capture:i}),s.passive==null){const r=Vu(t);r!=null&&(s.passive=r)}e.addEventListener(t,o,s)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function Eb(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var Ab=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],xd=Object.fromEntries(Ab.map((e,t)=>[e,t]));function Tb(e,t){const o=(e.beanName?xd[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?xd[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return o-i}function Ib(e,t){return e?.beanName==="gridDestroySvc"?-1:0}var Lb={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},Bb={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},Ob={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},Vn=class extends se{constructor(e){super(),this.eCenterContainer=N,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:o=>this.setDisplayed(o),setCtrls:o=>this.setCtrls(o),setCenterWidth:o=>this.eCenterContainer.style.width=o,setViewportScrollLeft:o=>this.getGui().scrollLeft=o,setPinnedContainerWidth:o=>{const i=this.getGui();i.style.width=o,i.style.maxWidth=o,i.style.minWidth=o}};this.createManagedBean(new qC(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",o=e?Lb:t?Bb:Ob;this.setTemplate(o),this.eRowContainer=this.eCenterContainer!==N?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let o;const i=s=>{const r=s.getGui();r.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(r),o&&vu(this.eRowContainer,r,o),o=r};e.forEach(s=>{const r=s.instanceId,n=t[r];delete t[r];const a=n||this.createBean(new $C(s));this.headerRowComps[r]=a,this.rowCompsList.push(a),i(a)}),Object.values(t).forEach(s=>this.destroyRowComp(s))}},Gb={tag:"div",cls:"ag-header",role:"presentation"},Nb=class extends se{constructor(){super(Gb)}postConstruct(){const e={addOrRemoveCssClass:(i,s)=>this.addOrRemoveCssClass(i,s),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new GC).setComp(e,this.getGui(),this.getFocusableElement());const o=i=>{this.createManagedBean(i),this.appendChild(i)};o(new Vn("left")),o(new Vn(null)),o(new Vn("right"))}},Vb={selector:"AG-HEADER-ROOT",component:Nb},Hb=class extends se{constructor(e,t,o,i,s){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;const r=Me({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.colIdSanitised}});this.eCell=r;let n;t.isCellSpanning()?(n=Me({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),n.appendChild(r),this.setTemplateFromElement(n)):this.setTemplateFromElement(r),this.cellCssClassManager=new ih(()=>r),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a={addOrRemoveCssClass:(l,d)=>this.cellCssClassManager.addOrRemoveCssClass(l,d),setUserStyles:l=>Vs(r,l),getFocusableElement:()=>r,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRenderDetails:(l,d,u)=>this.setRenderDetails(l,d,u),setEditDetails:(l,d,u)=>this.setEditDetails(l,d,u),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(a,r,n,this.eCellWrapper,o,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,o){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(o||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,o){e?this.createCellEditorInstance(e,t,o):this.destroyEditor()}removeControls(){const e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,o=t||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=Me({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!o&&this.eCellWrapper!=null;s&&(Dt(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssClassManager.addOrRemoveCssClass("ag-cell-value",!o);const r=!e&&o,n=r&&this.eCellValue==null;n&&(this.eCellValue=Me({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));const a=!r&&this.eCellValue!=null;a&&(Dt(this.eCellValue),this.eCellValue=void 0);const l=i||s||n||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:o,includeRowDrag:i,includeDndSource:s,includeSelection:r}=this,n=a=>{a&&t.insertBefore(a.getGui(),o)};i&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),n(this.rowDraggingComp)),s&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),n(this.dndSourceComp)),r&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),n(this.checkboxSelectionComp))}createCellEditorInstance(e,t,o){const i=this.editorVersion,s=e.newAgStackInstance(),{params:r}=e;s.then(a=>this.afterCellEditorCreated(i,a,r,t,o)),Ee(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();rt(t);const o=e!=null?Mt(e,!0):null;o!=null&&(t.textContent=o)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),Dt(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(Ae(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Dt(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const t=this.rendererVersion,{componentClass:o}=e,i=()=>{if(this.rendererVersion!==t||!this.isAlive())return;const n=e.newAgStackInstance(),a=this.afterCellRendererCreated.bind(this,t,o);n?.then(a)},{animationFrameSvc:s}=this.beans;s?.active&&this.firstRender?s.createTask(i,this.rowNode.rowIndex,"p2",e.componentFromFramework):i()}afterCellRendererCreated(e,t,o){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(o);return}this.cellRenderer=o,this.cellRendererClass=t;const s=o.getGui();if(this.cellRendererGui=s,s!=null){const r=this.getParentOfValue();rt(r),r.appendChild(s)}}afterCellEditorCreated(e,t,o,i,s){const r=e!==this.editorVersion,{context:n}=this.beans;if(r){n.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){n.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){H(97,{colId:this.column.getId()}),n.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const l=i||t.isPopup!==void 0&&t.isPopup();l?this.addPopupCellEditor(o,s):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached?.(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssClassManager:o}=this;o.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),o.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),o.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),this.cellCtrl.setInlineEditingCss()}addInCellEditor(){const{eCell:e}=this;e.contains(Ae(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),rt(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:o,context:i,editSvc:s,popupSvc:r,localeSvc:n}=this.beans;o.get("editType")==="fullRow"&&H(98);const a=this.cellEditor;this.cellEditorPopupWrapper=i.createBean(s.createPopupEditorWrapper(e));const l=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&l.appendChild(this.cellEditorGui);const d=o.get("stopEditingWhenCellsLoseFocus"),u=t??a.getPopupPosition?.()??"over",h=o.get("enableRtl"),p={ePopup:l,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.eCell,position:u,alignSide:h?"right":"left",keepWithinBounds:!0},g=r.positionPopupByComponent.bind(r,p),f=Xa(n),m=r.addPopup({modal:d,eChild:l,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.eCell,positionCallback:g,ariaLabel:f("ariaLabelCellEditor","Cell Editor")});m&&(this.hideEditorPopup=m.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},_b=class extends se{constructor(e,t,o){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const i=Me({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(i,o),this.setTemplateFromElement(i);const s=i.style;this.domOrder=this.rowCtrl.getDomOrder();const r={setDomOrder:n=>this.domOrder=n,setCellCtrls:n=>this.setCellCtrls(n),showFullWidth:n=>this.showFullWidth(n),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,addOrRemoveCssClass:(n,a)=>this.addOrRemoveCssClass(n,a),setUserStyles:n=>Vs(i,n),setTop:n=>s.top=n,setTransform:n=>s.transform=n,setRowIndex:n=>i.setAttribute("row-index",n),setRowId:n=>i.setAttribute("row-id",n),setRowBusinessKey:n=>i.setAttribute("row-business-key",n),refreshFullWidth:n=>this.fullWidthCellRenderer?.refresh?.(n())??!1};e.setComp(r,this.getGui(),o,void 0),this.addDestroyFunc(()=>{e.unsetComp(o)})}setInitialStyle(e,t){const o=this.rowCtrl.getInitialTransform(t);if(o)e.style.setProperty("transform",o);else{const i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){const t=i=>{if(this.isAlive()){const s=i.getGui();this.getGui().appendChild(s),this.rowCtrl.setupDetailRowAutoHeight(s),this.setFullWidthRowComp(i)}else this.beans.context.destroyBean(i)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const o of e){const i=o.instanceId;this.cellComps.has(i)?t.delete(i):this.newCellComp(o)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const o of e){const i=this.cellComps.get(o.instanceId);i&&t.push(i.getGui())}Cu(this.getGui(),t)}newCellComp(e){const t=new Hb(this.beans,e,this.rowCtrl.printLayout,this.getGui(),this.rowCtrl.editing);this.cellComps.set(e.instanceId,t),this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e){this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){for(const t of e.values()){if(!t)return;const o=t.cellCtrl.instanceId;if(this.cellComps.get(o)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(o)}}};function zb(e,t,o){const i=!!o.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:mr(e),role:"rowgroup"};if(t.type==="center"||i){const r={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${pC(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${Th(e)}`,role:"presentation",children:[s,i?r:null]}}return s}var Wb=class extends se{constructor(e){super(),this.eViewport=N,this.eContainer=N,this.eSpannedContainer=N,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=_s(this.name)}postConstruct(){this.setTemplate(zb(this.name,this.options,this.beans));const e={setHorizontalScroll:o=>this.eViewport.scrollLeft=o,setViewportHeight:o=>this.eViewport.style.height=o,setRowCtrls:({rowCtrls:o})=>this.setRowCtrls(o),setSpannedRowCtrls:o=>this.setRowCtrls(o,!0),setDomOrder:o=>{this.domOrder=o},setContainerWidth:o=>{this.eContainer.style.width=o,this.eSpannedContainer&&(this.eSpannedContainer.style.width=o)},setOffsetTop:o=>{const i=`translateY(${o})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new RC(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:o,options:i}=this,s=t?this.eSpannedContainer:this.eContainer,r=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},n={};t?this.rowCompsWithSpan=n:this.rowCompsNoSpan=n,this.lastPlacedElement=null;const a=[];for(const l of e){const d=l.instanceId,u=r[d];let h;if(u)h=u,delete r[d];else{if(!l.rowNode.displayed)continue;h=new _b(l,o,i.type)}n[d]=h,a.push([h,!u])}this.removeOldRows(Object.values(r),s),this.addRowNodes(a,s)}addRowNodes(e,t){const{domOrder:o}=this;for(const[i,s]of e){const r=i.getGui();o?this.ensureDomOrder(r,t):s&&t.appendChild(r)}}removeOldRows(e,t){for(const o of e)t.removeChild(o.getGui()),o.destroy()}ensureDomOrder(e,t){vu(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},$b={selector:"AG-ROW-CONTAINER",component:Wb};function Ui(e,t){return t.map(o=>{const i=`e${o[0].toUpperCase()+o.substring(1)}RowContainer`;return e[i]={name:o},{tag:"ag-row-container",ref:i,attrs:{name:o}}})}function Ub(e){const t={},o={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:Ui(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:Ui(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:Ui(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:Ui(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:Ui(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:o}}var jb=class extends se{constructor(){super(...arguments),this.eGridRoot=N,this.eBodyViewport=N,this.eStickyTop=N,this.eStickyBottom=N,this.eTop=N,this.eBottom=N,this.eBody=N}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,o=e?.getOverlayWrapperSelector(),{paramsMap:i,elementParams:s}=Ub(!!o);this.setTemplate(s,[...o?[o]:[],PC,TC,Vb,$b],i);const r=(a,l)=>{const d=`${a}px`;l.style.minHeight=d,l.style.height=d},n={setRowAnimationCssOnBodyViewport:(a,l)=>this.setRowAnimationCssOnBodyViewport(a,l),setColumnCount:a=>Cf(this.getGui(),a),setRowCount:a=>vf(this.getGui(),a),setTopHeight:a=>r(a,this.eTop),setBottomHeight:a=>r(a,this.eBottom),setTopInvisible:a=>this.eTop.classList.toggle("ag-invisible",a),setBottomInvisible:a=>this.eBottom.classList.toggle("ag-invisible",a),setStickyTopHeight:a=>this.eStickyTop.style.height=a,setStickyTopTop:a=>this.eStickyTop.style.top=a,setStickyTopWidth:a=>this.eStickyTop.style.width=a,setStickyBottomHeight:a=>{this.eStickyBottom.style.height=a,this.eStickyBottom.classList.toggle("ag-invisible",a==="0px")},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.addOrRemoveCssClass(a,l),updateLayoutClasses:(a,l)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const u of d)u.toggle(Nt.AUTO_HEIGHT,l.autoHeight),u.toggle(Nt.NORMAL,l.normal),u.toggle(Nt.PRINT,l.print);this.addOrRemoveCssClass(Nt.AUTO_HEIGHT,l.autoHeight),this.addOrRemoveCssClass(Nt.NORMAL,l.normal),this.addOrRemoveCssClass(Nt.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(Bh,l),registerBodyViewportResizeListener:a=>{const l=No(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(a,l))},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>et(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new kC),this.ctrl.setComp(n,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&si(this.gos)||ri(this.gos))&&mf(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const o=this.eBodyViewport.classList;o.toggle("ag-row-animation",t),o.toggle("ag-row-no-animation",!t)}},Kb={selector:"AG-GRID-BODY",component:jb},qb=class extends A{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,o){this.view=e,this.eGridHostDiv=t,this.eGui=o,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDrop:i,ctrlsSvc:s}=this.beans;i?.registerGridDropTarget(()=>this.eGui,this),Ch(this.gos,t),this.createManagedBean(new bl(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const r=No(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>r()),s.register("gridCtrl",this)}isDetailGrid(){return fl(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e);if(i<0||i>=t.length)return!1;if(i===0){if(o>0){const{visibleCols:s,focusSvc:r}=this.beans,n=s.allCols,a=Se(n);if(r.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[i],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const o=this.getFocusableContainers(),{focusSvc:i,visibleCols:s}=this.beans,r=s.allCols;if(e){if(o.length>1)return this.focusContainer(Se(o),e);const n=Se(r);if(i.focusGridView({column:n,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||ti(this.beans)){if(i.focusGridView({column:r[0],backwards:e}))return!0;for(let n=1;n<o.length;n++)if(Et(o[n].getGui(),e))return!0;return!1}return i.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:o,indexWithFocus:i}=this.getNextFocusableIndex(t,e);if(i===-1||o<0||o>=t.length)return;const s=t[o];s.setAllowFocus?.(!0),setTimeout(()=>{s.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!ml(e)||!ti(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const o=Ae(this.beans),i=e.findIndex(r=>r.getGui().contains(o)),s=i+(t?-1:1);return{indexWithFocus:i,nextIndex:s}}focusContainer(e,t){e.setAllowFocus?.(!0);const o=Et(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),o}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},Yb=class extends ui{constructor(e){super(),this.gridBody=N,this.sideBar=N,this.pagination=N,this.rootWrapperBody=N,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:r=>this.addCssClass(r),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:r=>{this.getGui().style.userSelect=r??"",this.getGui().style.webkitUserSelect=r??""},setCursor:r=>{this.getGui().style.cursor=r??""}},t=this.createManagedBean(new qb),o=t.getOptionalSelectors(),i=this.createTemplate(o),s=[Kb,...Object.values(o).filter(r=>!!r)];this.setTemplate(i,s),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>t.focusInnerElement(r),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),Ss(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const o=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:r}=Nt,{autoHeight:n,normal:a,print:l}=t;o.toggle(i,n),o.toggle(s,a),o.toggle(r,l),this.addOrRemoveCssClass(i,n),this.addOrRemoveCssClass(s,a),this.addOrRemoveCssClass(r,l)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,o=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,i=e.statusBarSelector?{tag:"ag-status-bar"}:null,s=e.watermarkSelector?{tag:"ag-watermark"}:null,r=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},o]},i,r,s]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(t=>wt(t.getGui()))}},ne=(e,t)=>{for(const o of Object.keys(t))t[o]=e;return t},Fd={dispatchEvent:"CommunityCore",...ne("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0}),...ne("GridState",{getState:0}),...ne("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...ne("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...ne("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...ne("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...ne("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...ne("ValueCache",{expireValueCache:0}),...ne("CellApi",{getCellValue:0}),...ne("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...ne("Sort",{onSortChanged:0}),...ne("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0}),...ne("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...ne("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...ne("HighlightChanges",{flashCells:0}),...ne("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0}),...ne("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...ne("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...ne("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...ne("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...ne("ColumnResize",{setColumnWidths:0}),...ne("ColumnHover",{isColumnHovered:0}),...ne("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0}),...ne("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...ne("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...ne("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0}),...ne("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...ne("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...ne("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...ne("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...ne("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...ne("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...ne("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...ne("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...ne("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...ne("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...ne("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...ne("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...ne("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...ne("ContextMenu",{showContextMenu:0}),...ne("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...ne("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...ne("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...ne("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...ne("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...ne("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...ne("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...ne("StatusBar",{getStatusPanel:0})},Hn={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Qb=(e,t)=>e.eventSvc.dispatchEvent(t),Uh=class{};Reflect.defineProperty(Uh,"name",{value:"GridApi"});var Xb=class extends A{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Uh,this.fns={...Hn,dispatchEvent:Qb},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(Fd))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:o,beans:i}=this;o!==Hn&&(o[e]=i?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:o,fns:{[e]:i}}=this;return i?i(o,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:o,preDestroyLink:i}=this;if(!t)H(26,{fnName:e,preDestroyLink:i});else{const s=Fd[e];o.assertModuleRegistered(s,`api.${e}`)&&H(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=Hn,this.beans=null}};function Zb(e){return e.context.getGridId()}function Jb(e){e.gridDestroySvc.destroy()}function ew(e){return e.gridDestroySvc.destroyCalled}function tw(e,t){return e.gos.get(t)}function ow(e,t,o){jh(e,{[t]:o})}function jh(e,t){e.gos.updateGridOptions({options:t})}var iw=class extends A{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:o}=this.beans;return o.addDragSource(t),()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const o=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(o)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},Kh={moduleName:"Drag",version:re,beans:[jv]},qh={moduleName:"SharedDragAndDrop",version:re,beans:[Vv],dependsOn:[Kh],userComponents:{agDragAndDropImage:ob},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},sw={moduleName:"HorizontalResize",version:re,beans:[iw],dependsOn:[Kh]},rw=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",nw=class extends A{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:o,executeLaterFuncs:i}=this;if(o.length===0&&i.length===0){e(),t();return}const s=r=>{for(;r.length;){const n=r.pop();n&&n()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),s(o)},0),window.setTimeout(()=>{t(),s(i)},200)})}};function aw(e,t,o){e.colMoves?.moveColumnByIndex(t,o,"api")}function lw(e,t,o){e.colMoves?.moveColumns(t,o,"api")}var dw=class extends A{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(o=>{o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?this.columnsToAggregate.push(o):o.isAllowRowGroup()?this.columnsToGroup.push(o):o.isAllowPivot()&&this.columnsToPivot.push(o)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&o?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&i?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function cw(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,s)=>{const r=e.indexOf(i),n=e.indexOf(s);return r-n})}function Yh(e){const{isFromHeader:t,fromLeft:o,xPosition:i,fromEnter:s,fakeEvent:r,pinned:n,gos:a,colModel:l,colMoves:d,visibleCols:u}=e;let{allMovingColumns:h}=e;if(t){const P=[];h.forEach(k=>{let D=null,v=k.getParent();for(;v!=null&&v.getDisplayedLeafColumns().length===1;)D=v,v=v.getParent();D!=null?(!!D.getColGroupDef()?.marryChildren?D.getProvidedColumnGroup().getLeafColumns():D.getLeafColumns()).forEach(F=>{P.includes(F)||P.push(F)}):P.includes(k)||P.push(k)}),h=P}const p=h.slice();cw(l.getCols(),p);const g=gw({movingCols:p,draggingRight:o,xPosition:i,pinned:n,gos:a,colModel:l,visibleCols:u}),f=uw(p,l);if(g.length===0)return;const m=g[0];let b=f!==null&&!s;if(t&&(b=f!==null),b&&!r&&(!o&&m>=f||o&&m<=f))return;const w=u.allCols,S=[];let y=null;for(let P=0;P<g.length;P++){const k=g[P],D=d.getProposedColumnOrder(p,k);if(!d.doesOrderPassRules(D))continue;const v=D.filter(R=>w.includes(R));if(y===null)y=v;else if(!Pt(v,y))break;const C=hw(D);S.push({move:k,fragCount:C})}if(S.length===0)return;S.sort((P,k)=>P.fragCount-k.fragCount);const x=S[0].move;if(!(x>l.getCols().length-h.length))return{columns:h,toIndex:x}}function Qh(e){const{columns:t,toIndex:o}=Yh(e)||{},{finished:i,colMoves:s}=e;return!t||o==null?null:(s.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function uw(e,t){const o=t.getCols(),i=e.map(l=>o.indexOf(l)).sort((l,d)=>l-d),s=i[0];return Se(i)-s!==i.length-1?null:s}function hw(e){function t(i){const s=[];let r=i.getOriginalParent();for(;r!=null;)s.push(r),r=r.getOriginalParent();return s}let o=0;for(let i=0;i<e.length-1;i++){let s=t(e[i]),r=t(e[i+1]);[s,r]=s.length>r.length?[s,r]:[r,s],s.forEach(n=>{r.indexOf(n)===-1&&o++})}return o}function pw(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function gw(e){const{movingCols:t,draggingRight:o,xPosition:i,pinned:s,gos:r,colModel:n,visibleCols:a}=e;if(r.get("suppressMovableColumns")||t.some(y=>y.getColDef().suppressMovable))return[];const d=pw(a,s),u=n.getCols(),h=d.filter(y=>t.includes(y)),p=d.filter(y=>!t.includes(y)),g=u.filter(y=>!t.includes(y));let f=0,m=i;if(o){let y=0;h.forEach(x=>y+=x.getActualWidth()),m-=y}if(m>0){for(let y=0;y<p.length;y++){const x=p[y];if(m-=x.getActualWidth(),m<0)break;f++}o&&f++}let b;if(f>0){const y=p[f-1];b=g.indexOf(y)+1}else b=g.indexOf(p[0]),b===-1&&(b=0);const w=[b],S=(y,x)=>y-x;if(o){let y=b+1;const x=u.length-1;for(;y<=x;)w.push(y),y++;w.sort(S)}else{let y=b;const x=u.length-1;let P=u[y];for(;y<=x&&d.indexOf(P)<0;)y++,w.push(y),P=u[y];y=b-1;const k=0;for(;y>=k;)w.push(y),y--;w.sort(S).reverse()}return w}function Pa(e){const{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:s,useHeaderRow:r,skipScrollPadding:n}=e;let a=s.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(o&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(r&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!n&&(l+=s.get("center").getCenterViewportScrollLeft()),l):0}function _n(e,t){for(const o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var kd=7,Ea=100,tr=Ea/2,fw=5,mw=100,vw=class extends A{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!j(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,o=t?.dragItem.columns??[];for(const i of o){const s=i.getPinned();if(i.getColDef().lockPinned){if(s==e)return"move";continue}if(s===e||!e)return"move";if(!s&&e)return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,o=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(o,!0,"uiColumnDragged");else{const s=t.visibleState,r=(o||[]).filter(n=>s[n.getId()]);this.setColumnsVisible(r,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(o,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,o=!1,i=!1){const{gos:s,ctrlsSvc:r}=this.beans,n=s.get("suppressMoveWhenColumnDragging");if(i&&!n){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&Ee(e.hDirection))return;const a=Pa({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:r});t||this.checkCenterForScrolling(a),n?this.handleColumnDragWhileSuppressingMovement(e,t,o,a,i):this.handleColumnDragWhileAllowingMovement(e,t,o,a,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,o){if(!e)return;const i=e.filter(s=>!s.getColDef().lockVisible);this.beans.colModel.setColsVisible(i,t,o)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,o,i,s){const r=this.getAllMovingColumns(e,!0);if(s){const n=this.isAttemptingToPin(r);n&&this.attemptToPinColumns(r,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(r,n)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:r,xPosition:l,fromEnter:t,fakeEvent:o,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(r,i)}}handleColumnDragWhileAllowingMovement(e,t,o,i,s){const r=this.getAllMovingColumns(e),n=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:r,isFromHeader:a,xPosition:i,fromLeft:n,fromEnter:t,fakeEvent:o}),d=Qh({...l,finished:s});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const o=e.dragSource.getDragItem();let i=null;t?(i=o.columnsInSplit,i||(i=o.columns)):i=o.columns;const s=r=>r.getColDef().lockPinned?r.getPinned()==this.pinned:!0;return i?i.filter(s):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:o,xPosition:i,fromLeft:s,fromEnter:r,fakeEvent:n}=e,{gos:a,colModel:l,colMoves:d,visibleCols:u}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:s,xPosition:i,pinned:this.pinned,fromEnter:r,fakeEvent:n,gos:a,colModel:l,colMoves:d,visibleCols:u}}highlightHoveredColumn(e,t){const{gos:o,colModel:i}=this.beans,s=o.get("enableRtl"),r=i.getCols().filter(u=>u.isVisible()&&u.getPinned()===this.pinned);let n=null,a=null,l=null;for(const u of r){if(a=u.getActualWidth(),n=this.getNormalisedColumnLeft(u,0,s),n!=null){const h=n+a;if(n<=t&&h>=t){l=u;break}}n=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let u=r.length-1;u>=0;u--){const h=r[u],p=r[u].getParent();if(!p){l=h;break}const g=p?.getDisplayedLeafColumns();if(g.length){l=Se(g);break}}if(!l)return;n=this.getNormalisedColumnLeft(l,0,s),a=l.getActualWidth()}if(this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),l==null||n==null||a==null)return;let d;t-n<a/2!==s?d=0:d=1,Dd(l,d),this.lastHighlightedColumn={column:l,position:d}}getNormalisedXPositionInfo(e,t){const{gos:o,visibleCols:i}=this.beans,s=o.get("enableRtl"),{firstMovingCol:r,column:n,position:a}=this.getColumnMoveAndTargetInfo(e,t,s);if(!r||!n||a==null)return;const l=i.allCols,d=l.indexOf(r),u=l.indexOf(n),h=a===0!==s,p=d<u||d===u&&!h;let g=0;if(h?p&&(g-=1):p||(g+=1),u+g===d)return;const f=l[u+g];if(!f)return;const m=this.getNormalisedColumnLeft(f,20,s);return{fromLeft:p,xPosition:m}}getColumnMoveAndTargetInfo(e,t,o){const i=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:r}=Cw(e);if(!s||!r||i.column||!t)return{firstMovingCol:s,...i};const a=this.getPinDirection()==="left";return{firstMovingCol:s,position:a?1:0,column:a!==o?s:r}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,o){const{gos:i,ctrlsSvc:s}=this.beans,r=e.getLeft();if(r==null)return null;const n=e.getActualWidth();return Pa({x:o?r+n-t:r+t,pinned:e.getPinned(),useHeaderRow:o,skipScrollPadding:!0,gos:i,ctrlsSvc:s})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,o=this.failedMoveAttempts>kd;return t&&o||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:o,fromEnter:i,fakeEvent:s,fromLeft:r}=e,n=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:r,fromEnter:i,fakeEvent:s}),{columns:a,toIndex:l}=Yh(n)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(Dd(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),i=o+t.getCenterWidth();let s,r;this.gos.get("enableRtl")?(s=e<o+tr,r=e>i-tr):(r=e<o+tr,s=e>i-tr),this.needToMoveRight=s,this.needToMoveLeft=r,r||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),mw),this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.getIconName(),!1))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*fw,e>Ea&&(e=Ea);let t=null;const o=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=o.scrollHorizontally(-e):this.needToMoveRight&&(t=o.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:i,dragAndDrop:s,gos:r}=this.beans;if(this.failedMoveAttempts<=kd+1||!i)return;if(s.getDragAndDropImageComponent()?.setIcon("pinned",!1),!r.get("suppressMoveWhenColumnDragging")){const n=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(n,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,o=!1){const i=(e||[]).filter(n=>!n.getColDef().lockPinned);if(!i.length)return 0;o&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:r}=this.beans;return s?.setColsPinned(i,t,"uiColumnDragged"),o&&r.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Dd(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function Cw(e){const t=e.length;let o,i;for(let s=0;s<t;s++){if(!o){const r=e[s];r.getLeft()!=null&&(o=r)}if(!i){const r=e[t-1-s];r.getLeft()!=null&&(i=r)}if(o&&i)break}return{firstMovingCol:o,lastMovingCol:i}}var bw=class extends A{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,o=this.pinned;e.whenReady(this,i=>{let s;const r=i.gridBodyCtrl.eBodyViewport;switch(o){case"left":s=[[r,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":s=[[r,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:s=[[r,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=s}),this.moveColumnFeature=this.createManagedBean(new vw(o)),this.bodyDropPivotTarget=this.createManagedBean(new dw(o)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},ww=class extends A{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){const i=this.beans.colModel.getCols();if(!i)return;const s=i[e];this.moveColumns([s],t,o)}moveColumns(e,t,o,i=!0){const{colModel:s,colAnimation:r,visibleCols:n,eventSvc:a}=this.beans,l=s.getCols();if(!l)return;if(t>l.length-e.length){H(30,{toIndex:t});return}r?.start();const d=s.getColsForKeys(e);this.doesMovePassRules(d,t)&&(dd(s.getCols(),d,t),n.refresh(o),a.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:i,source:o})),r?.finish()}doesMovePassRules(e,t){const o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){const{colModel:t,gos:o}=this.beans;return!(!Yu(e,t.getColTree())||!(s=>{const r=d=>d?d==="left"||d===!0?-1:1:0,n=o.get("enableRtl");let a=n?1:-1,l=!0;return s.forEach(d=>{const u=r(d.getColDef().lockPosition);n?u>a&&(l=!1):u<a&&(l=!1),a=u}),l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return dd(i,e,t),i}createBodyDropTarget(e,t){return new bw(e,t)}moveHeader(e,t,o,i,s){const{ctrlsSvc:r,gos:n,colModel:a,visibleCols:l,focusSvc:d}=this.beans,u=t.getBoundingClientRect(),h=u.left,p=Oe(o),g=p?u.width:o.getActualWidth(),f=e==="left"!==n.get("enableRtl"),m=Pa({x:f?h-20:h+g+20,pinned:i,fromKeyboard:!0,gos:n,ctrlsSvc:r}),b=d.focusedHeader;Qh({allMovingColumns:p?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:e==="right",xPosition:m,pinned:i,fromEnter:!1,fakeEvent:!1,gos:n,colModel:a,colMoves:this,visibleCols:l,finished:!0});let w;if(p){const S=o.getDisplayedLeafColumns();w=f?S[0]:Se(S)}else w=o;if(r.getScrollFeature().ensureColumnVisible(w,"auto"),(!s.isAlive()||n.get("ensureDomOrder"))&&b){let S;if(p){const y=o.getGroupId(),x=o.getLeafColumns();if(!x.length)return;const P=x[0].getParent();if(!P)return;S=yw(P,y)}else S=o;S&&d.focusHeaderPosition({headerPosition:{...b,column:S}})}}setDragSourceForHeader(e,t,o){const{gos:i,colModel:s,dragAndDrop:r,visibleCols:n}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=Oe(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],h={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>Rw(t,n.allCols):()=>Sw(t),dragItemName:o,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),_n(d,!0)},onDragStopped:()=>_n(d,!1),onDragCancelled:()=>_n(d,!1),onGridEnter:p=>{if(a){const{columns:g=[],visibleState:f}=p??{},m=l?w=>!f||f[w.getColId()]:()=>!0,b=g.filter(w=>!w.getColDef().lockVisible&&m(w));s.setColsVisible(b,!0,"uiColumnMoved")}},onGridExit:p=>{if(a){const g=p?.columns?.filter(f=>!f.getColDef().lockVisible)||[];s.setColsVisible(g,!1,"uiColumnMoved")}}};return r.addDragSource(h,!0),h}};function yw(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function Sw(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}function Rw(e,t){const o=e.getProvidedColumnGroup().getLeafColumns(),i={};o.forEach(a=>i[a.getId()]=a.isVisible());const s=[];t.forEach(a=>{o.indexOf(a)>=0&&(s.push(a),at(o,a))}),o.forEach(a=>s.push(a));const r=[],n=e.getLeafColumns();for(const a of s)n.indexOf(a)!==-1&&r.push(a);return{columns:s,columnsInSplit:r,visibleState:i}}var Xh={moduleName:"ColumnMove",version:re,beans:[ww,nw],apiFunctions:{moveColumnByIndex:aw,moveColumns:lw},dependsOn:[qh],css:[rw]},xw=class extends A{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const o=this.getHeaderCellForColumn(e);if(!o)return-1;const i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(o),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const o=document.createElement("form");o.style.position="fixed";const i=this.centerRowContainerCtrl.eContainer;e.forEach(r=>this.cloneItemIntoDummy(r,o)),i.appendChild(o);const s=o.offsetWidth;return i.removeChild(o),t=t??this.gos.get("autoSizePadding"),s+t}getHeaderCellForColumn(e){let t=null;return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach(o=>{const i=o.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}),t}cloneItemIntoDummy(e,t){const o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";const i=document.createElement("div"),s=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>o.classList.contains(a))?(s.add("ag-header","ag-header-row"),i.style.position="static"):s.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some(l=>n.classList.contains(l))){for(let l=0;l<n.classList.length;l++){const d=n.classList[l];d!="ag-row-position-absolute"&&s.add(d)}break}n=n.parentElement}i.appendChild(o),t.appendChild(i)}},Fw={moduleName:"AutoWidth",version:re,beans:[xw]};function kw(e,t,o=!0,i="api"){e.colResize?.setColumnWidths(t,!1,o,i)}var Dw=class extends A{constructor(e,t,o,i){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:o,resizeRatios:i,groupAfterColumns:s,groupAfterStartWidth:r,groupAfterRatios:n}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=i,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=r,this.resizeTakeFromRatios=n,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){const i=this.normaliseDragChange(t),s=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(s,o,e)}getInitialValues(e){const t=l=>l.reduce((d,u)=>d+u.getActualWidth(),0),o=(l,d)=>l.map(u=>u.getActualWidth()/d),i=this.getColumnsToResize(),s=t(i),r=o(i,s),n={columnsToResize:i,resizeStartWidth:s,resizeRatios:r};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),d=n.groupAfterColumns=l.filter(h=>h.isResizable()),u=n.groupAfterStartWidth=t(d);n.groupAfterRatios=o(d,u)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),o=this.getInitialValues();t>o.resizeStartWidth&&this.resizeColumns(o,t,e,!0)}resizeColumnsFromLocalValues(e,t,o=!0){if(!this.resizeCols||!this.resizeRatios)return;const i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,o)}resizeColumns(e,t,o,i=!0){const{columnsToResize:s,resizeStartWidth:r,resizeRatios:n,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,u=[];if(u.push({columns:s,ratios:n,width:t}),a){const h=t-r;u.push({columns:a,ratios:d,width:l-h})}this.beans.colResize?.resizeColumnSets({resizeSets:u,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},Mw=class extends A{constructor(e,t,o,i,s){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=i,this.ctrl=s}postConstruct(){const e=[];let t,o;const i=()=>{if(Z(this.eResize,t),!t)return;const{horizontalResizeSvc:n,colAutosize:a}=this.beans,l=n.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),o&&a&&e.push(a.addColumnAutosize(this.eResize,this.column))},s=()=>{e.forEach(n=>n()),e.length=0},r=()=>{const n=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(n!==t||a!==o)&&(t=n,o=a,s(),i())};r(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",r)}onResizing(e,t){const{column:o,lastResizeAmount:i,resizeStartWidth:s,beans:r}=this,n=this.normaliseResizeAmount(t),a=s+n,l=[{key:o,newWidth:a}],{pinnedCols:d,ctrlsSvc:u,colResize:h}=r;if(this.column.getPinned()){const p=d?.leftWidth??0,g=d?.rightWidth??0,f=ws(u.getGridBodyCtrl().eBodyViewport)-50;if(p+g+(n-i)>f)return}this.lastResizeAmount=n,h?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const o=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):i&&(t*=-1),t}},Pw=class extends A{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){const s=[],{colModel:r,gos:n,visibleCols:a}=this.beans;e.forEach(l=>{const d=r.getColDefCol(l.key)||r.getCol(l.key);if(!d)return;if(s.push({width:l.newWidth,ratios:[1],columns:[d]}),n.get("colResizeDefault")==="shift"&&(t=!t),t){const h=a.getColAfter(d);if(!h)return;const p=d.getActualWidth()-l.newWidth,g=h.getActualWidth()+p;s.push({width:g,ratios:[1],columns:[h]})}}),s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:o,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:o,source:i}=e;if(!(!t||t.every(u=>Ew(u)))){if(o){const u=t&&t.length>0?t[0].columns:null;Vr(this.eventSvc,u,o,i)}return}const r=[],n=[];t.forEach(u=>{const{width:h,columns:p,ratios:g}=u,f={},m={};p.forEach(S=>n.push(S));let b=!0,w=0;for(;b;){if(w++,w>1e3){he(31);break}b=!1;const S=[];let y=0,x=h;p.forEach((k,D)=>{if(m[k.getId()])x-=f[k.getId()];else{S.push(k);const C=g[D];y+=C}});const P=1/y;S.forEach((k,D)=>{const v=D===S.length-1;let C;v?C=x:(C=Math.round(g[D]*h*P),x-=C);const R=k.getMinWidth(),F=k.getMaxWidth();C<R?(C=R,m[k.getId()]=!0,b=!0):F>0&&C>F&&(C=F,m[k.getId()]=!0,b=!0),f[k.getId()]=C})}p.forEach(S=>{const y=f[S.getId()];S.getActualWidth()!==y&&(S.setActualWidth(y,i),r.push(S))})});const a=r.length>0;let l=[];if(a){const{colFlex:u,visibleCols:h,colViewport:p}=this.beans;l=u?.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0})??[],h.setLeftValues(i),h.updateBodyWidths(),p.checkViewportColumns()}const d=n.concat(l);(a||o)&&Vr(this.eventSvc,d,o,i,l)}resizeHeader(e,t,o){if(!e.isResizable())return;const i=e.getActualWidth(),s=e.getMinWidth(),r=e.getMaxWidth(),n=Math.min(Math.max(i+t,s),r);this.setColumnWidths([{key:e,newWidth:n}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,i,s){return new Mw(e,t,o,i,s)}createGroupResizeFeature(e,t,o,i){return new Dw(e,t,o,i)}};function Ew(e){const{columns:t,width:o}=e;let i=0,s=0,r=!0;t.forEach(l=>{const d=l.getMinWidth();i+=d||0;const u=l.getMaxWidth();u>0?s+=u:r=!1});const n=o>=i,a=!r||o<=s;return n&&a}var Aw={moduleName:"ColumnResize",version:re,beans:[Pw],apiFunctions:{setColumnWidths:kw},dependsOn:[sw,Fw]},Tw=class extends A{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",e===0)}},Iw=class extends Fl{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}setComp(e,t,o,i,s){const{column:r,beans:n}=this,{context:a,colNames:l,colHover:d,rangeSvc:u,colResize:h}=n;this.comp=e,s=Hs(this,a,s),this.setGui(t,s),this.displayName=l.getDisplayNameForColumnGroup(r,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.setupAutoHeight({wrapperElement:i,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const p=this.rowCtrl.pinned,g=r.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(s,g,t),u?.createRangeHighlightFeature(s,r,e),s.createManagedBean(new xl(r,t,n)),s.createManagedBean(new Tw(e,r)),h?this.resizeFeature=s.createManagedBean(h.createGroupResizeFeature(e,o,p,r)):e.setResizableDisplayed(!1),s.createManagedBean(new Hi(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,g),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.getDefinition();return J(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,o=e.get("groupHeaderHeight");o!=null?o===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(o):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),o=t[0]===e,i=Se(t)===e;if(!o&&!i)return;const s=e.getHighlighted(),r=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let n=!1,a=!1;if(r){const l=this.beans.gos.get("enableRtl"),d=s===1,u=s===0;o&&(l?a=d:n=u),i&&(l?n=u:a=d)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",n),this.comp.addOrRemoveCssClass("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:o}=this;if(!o)return;const i=o.getInitialValues(t);o.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o}=this.beans,i=J(o,{displayName:this.displayName,columnGroup:this.column,setExpanded:r=>{e.setColumnGroupOpened(this.column.getProvidedColumnGroup(),r,"gridInitializing")},setTooltip:(r,n)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(r,n)}}),s=Ym(t,i);s&&this.comp.setUserCompDetails(s)}addHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),o=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),o=uh(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&o.push("ag-header-span-height")):(o.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&o.push("ag-header-cell-wrap-text")),o.forEach(i=>this.comp.addOrRemoveCssClass(i,!0))}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",t.isMoving());i.forEach(r=>{e.addManagedListeners(r,{movingChanged:s})}),s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===M.ENTER){const o=this.column,i=!o.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Lw(e,t,o){e.colGroupSvc?.setColumnGroupOpened(t,o,"api")}function Bw(e,t,o){return e.colGroupSvc?.getColumnGroup(t,o)??null}function Ow(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function Gw(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function Nw(e){return e.colGroupSvc?.getColumnGroupState()??[]}function Vw(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function Hw(e){e.colGroupSvc?.resetColumnGroupState("api")}function _w(e){return e.visibleCols.treeLeft}function zw(e){return e.visibleCols.treeCenter}function Ww(e){return e.visibleCols.treeRight}function $w(e){return e.visibleCols.getAllTrees()}function Uw(e,t){for(let o=0;o<t.length;o++){const i=e.indexOf(t[o]);i>=0&&(e[i]=e[e.length-1],e.pop())}}var jw=class extends A{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colModel:o,colGroupSvc:i,colViewport:s}=this.beans;t||this.buildTrees(o,i),i?.updateOpenClosedVisibility();const r=zn(this.treeLeft);this.leftCols=r,this.centerCols=zn(this.treeCenter);const n=zn(this.treeRight);this.rightCols=n,this.joinColsAriaOrder(o),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),this.beans.colFlex?.refreshFlexedColumns(),this.updateBodyWidths(),s.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(o,r,n,e),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}updateBodyWidths(){const e=hi(this.centerCols),t=hi(this.leftCols),o=hi(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,o,i){let s,r;this.gos.get("enableRtl")?(s=t?t[0]:null,r=o?Se(o):null):(s=t?Se(t):null,r=o?o[0]:null),e.getCols().forEach(n=>{n.setLastLeftPinned(n===s,i),n.setFirstRightPinned(n===r,i)})}buildTrees(e,t){const o=e.getColsToShow(),i=o.filter(l=>l.getPinned()=="left"),s=o.filter(l=>l.getPinned()=="right"),r=o.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),n=new oh,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:i,idCreator:n,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:s,idCreator:n,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:r,idCreator:n,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),o=[],i=[],s=[];for(const r of t){const n=r.getPinned();n?n===!0||n==="left"?o.push(r):s.push(r):i.push(r)}this.ariaOrderColumns=o.concat(i).concat(s)}getAriaColIndex(e){let t;return Oe(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{Oe(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const i=t.getCols().slice(0),s=this.gos.get("enableRtl");[this.leftCols,this.rightCols,this.centerCols].forEach(r=>{if(s){let n=hi(r);r.forEach(a=>{n-=a.getActualWidth(),a.setLeft(n,e)})}else{let n=0;r.forEach(a=>{a.setLeft(n,e),n+=a.getActualWidth()})}Uw(i,r)}),i.forEach(r=>{r.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,i){const s=[];let r=null;for(let n=0;n<t.length;n++){const a=t[n],l=t.length-n,d=Math.min(a.getColSpan(e),l),u=[a];if(d>1){const p=d-1;for(let g=1;g<=p;g++)u.push(t[n+g]);n+=p}let h;o?(h=!1,u.forEach(p=>{o(p)&&(h=!0)})):h=!0,h&&(s.length===0&&r&&(i&&i(a))&&s.push(r),s.push(a)),r=a}return s}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,o=t.indexOf(e);return o>0?t[o-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};oi(this.treeCenter,!1,e),oi(this.treeLeft,!1,e),oi(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o<t.length;o++){const i=this[t[o]];if(i.length)return e?Se(i):i[0]}return null}getColAfter(e){const t=this.allCols,o=t.indexOf(e);return o<t.length-1?t[o+1]:null}getColsLeftWidth(){return hi(this.leftCols)}getDisplayedColumnsRightWidth(){return hi(this.rightCols)}isColAtEdge(e,t){const o=this.allCols;if(!o.length)return!1;const i=t==="first";let s;if(Oe(e)){const r=e.getDisplayedLeafColumns();if(!r.length)return!1;s=i?r[0]:Se(r)}else s=e;return(i?o[0]:Se(o))===s}};function oi(e,t,o){if(e)for(let i=0;i<e.length;i++){const s=e[i];if(Oe(s)){const r=t?s.getDisplayedChildren():s.getChildren();oi(r,t,o)}o(s)}}function zn(e){const t=[];return oi(e,!0,o=>{to(o)&&t.push(o)}),t}var Kw=class extends A{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return ho(null,t,o=>{je(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const o=[];ho(null,t,i=>{if(je(i)){const s=i.getColGroupDef(),r={groupId:i.getGroupId(),open:s?s.openByDefault:void 0};o.push(r)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){const{colModel:o,colAnimation:i,visibleCols:s,eventSvc:r}=this.beans;if(!o.getColTree().length)return;i?.start();const a=[];e.forEach(l=>{const d=l.groupId,u=l.open,h=this.getProvidedColGroup(d);h&&h.isExpanded()!==u&&(h.setExpanded(u),a.push(h))}),s.refresh(t,!0),a.length&&r.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),i?.finish()}setColumnGroupOpened(e,t,o){let i;je(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return ho(null,this.beans.colModel.getColTree(),o=>{je(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){const o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s=t==="After"?Se(i):i[0],r=`getCol${t}`;for(;;){const n=this.beans.visibleCols[r](s);if(!n)return null;const a=this.getColGroupAtLevel(n,o);if(a!==e)return a}}getColGroupAtLevel(e,t){let o=e.getParent(),i,s;for(;i=o.getProvidedColumnGroup().getLevel(),s=o.getPaddingLevel(),!(i+s<=t);)o=o.getParent();return o}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();oi(e,!1,t=>{Oe(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Oe(e))return e;const o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let s=null;return oi(o,!1,r=>{if(Oe(r)){const n=r;let a;i?a=e===n.getGroupId()&&t===n.getPartId():a=e===n.getGroupId(),a&&(s=n)}}),s}createColumnGroups(e){const{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:s,isStandaloneStructure:r}=e,n=this.mapOldGroupsById(s),a=[];let l=t;for(;l.length;){const d=l;l=[];let u=0;const h=p=>{const g=u;u=p;const f=d[g],b=(Oe(f)?f.getProvidedColumnGroup():f).getOriginalParent();if(b==null){for(let S=g;S<p;S++)a.push(d[S]);return}const w=this.createColumnGroup(b,o,n,i,r);for(let S=g;S<p;S++)w.addChild(d[S]);l.push(w)};for(let p=1;p<d.length;p++){const g=d[p],m=(Oe(g)?g.getProvidedColumnGroup():g).getOriginalParent(),b=d[u],S=(Oe(b)?b.getProvidedColumnGroup():b).getOriginalParent();m!==S&&h(p)}u<d.length&&h(d.length)}return r||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,o,i,s,r,n){const a=s.getUniqueKey(t.groupId||null,null),l=this.createMergedColGroupDef(t,a),d=new as(l,a,!1,o);this.createBean(d);const u=this.findExistingGroup(t,r);u&&r.splice(u.idx,1);const h=u?.group;h&&d.setExpanded(h.isExpanded());const p=ju(this.beans,l.children,o+1,e,i,s,r,n);return d.setChildren(p),d}balanceColumnTree(e,t,o,i){const s=[];for(let r=0;r<e.length;r++){const n=e[r];if(je(n)){const a=n,l=this.balanceColumnTree(a.getChildren(),t+1,o,i);a.setChildren(l),s.push(a)}else{let a,l;for(let d=o-1;d>=t;d--){const u=i.getUniqueKey(null,null),h=this.createMergedColGroupDef(null,u),p=new as(h,u,!0,t);this.createBean(p),l&&l.setChildren([p]),l=p,a||(a=l)}if(a&&l)if(s.push(a),e.some(u=>je(u))){l.setChildren([n]);continue}else{l.setChildren(e);break}s.push(n)}}return s}findDepth(e){let t=0,o=e;for(;o&&o[0]&&je(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let i=0;i<e.length;i++){const s=e[i];if(je(s)){const r=s,n=this.findMaxDepth(r.getChildren(),t+1);o<n&&(o=n)}}return o}balanceTreeForAutoCols(e,t){const o=[];return e.forEach(i=>{let s=i;for(let r=t-1;r>=0;r--){const n=new as(null,`FAKE_PATH_${i.getId()}}_${r}`,!0,r);this.createBean(n),n.setChildren([s]),s.originalParent=n,s=n}t===0&&(i.originalParent=null),o.push(s)}),o}createMergedColGroupDef(e,t){const o={},{gos:i,validation:s}=this.beans;return Object.assign(o,i.get("defaultColGroupDef")),Object.assign(o,e),s?.validateColDef(o,t),o}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const s=t[i];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:i,group:s}}}createColumnGroup(e,t,o,i,s){const r=e.getGroupId(),n=t.getInstanceIdForKey(r),a=yh(r,n);let l=o[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),j(l)?l.reset():(l=new Sh(e,r,n,i),s||this.createBean(l)),l}mapOldGroupsById(e){const t={},o=i=>{i.forEach(s=>{if(Oe(s)){const r=s;t[s.getUniqueId()]=r,o(r.getChildren())}})};return e&&o(e),t}setupParentsIntoCols(e,t){e.forEach(o=>{if(o.parent=t,Oe(o)){const i=o;this.setupParentsIntoCols(i.getChildren(),i)}})}},Zh={moduleName:"ColumnGroup",version:re,dynamicBeans:{headerGroupCellCtrl:Iw},beans:[Kw],apiFunctions:{getAllDisplayedColumnGroups:$w,getCenterDisplayedColumnGroups:zw,getColumnGroup:Bw,getColumnGroupState:Nw,getDisplayNameForColumnGroup:Gw,getLeftDisplayedColumnGroups:_w,getProvidedColumnGroup:Ow,getRightDisplayedColumnGroups:Ww,resetColumnGroupState:Hw,setColumnGroupOpened:Lw,setColumnGroupState:Vw}},qw={moduleName:"CheckboxCellRenderer",version:re,userComponents:{agCheckboxCellRenderer:lb}};function Yw(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function Qw(e){return e.colModel.getColumnDefs()}function Xw(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function Zw(e,t){return e.colModel.getColDefCol(t)}function Jw(e){return e.colModel.getColDefCols()}function ey(e,t){return pt(e,t,"api")}function ty(e){return Ps(e)}function oy(e){Ju(e,"api")}function iy(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function sy(e){return e.visibleCols.isPinningLeft()}function ry(e){return e.visibleCols.isPinningRight()}function ny(e,t){return e.visibleCols.getColAfter(t)}function ay(e,t){return e.visibleCols.getColBefore(t)}function ly(e,t,o){e.colModel.setColsVisible(t,o,"api")}function dy(e,t,o){e.pinnedCols?.setColsPinned(t,o,"api")}function cy(e){return e.colModel.getCols()}function uy(e){return e.visibleCols.leftCols}function hy(e){return e.visibleCols.centerCols}function py(e){return e.visibleCols.rightCols}function gy(e){return e.visibleCols.allCols}function fy(e){return e.colViewport.getViewportColumns()}function Aa(e,t){if(!e)return;const o=e,i={};return Object.keys(o).forEach(s=>{if(t&&t.indexOf(s)>=0||Hu.has(s))return;const r=o[s];typeof r=="object"&&r!==null&&r.constructor===Object?i[s]=Aa(r):i[s]=r}),i}var my=class extends A{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i){const s=e.slice();t?s.sort((a,l)=>o.indexOf(a)-o.indexOf(l)):o&&s.sort((a,l)=>i.indexOf(a)-i.indexOf(l));const r=this.rowGroupColsSvc?.columns,n=this.pivotColsSvc?.columns;return this.buildColumnDefs(s,r,n)}buildColumnDefs(e,t=[],o=[]){const i=[],s={};return e.forEach(r=>{const n=this.createDefFromColumn(r,t,o);let a=!0,l=n,d=r.getOriginalParent(),u=null;for(;d;){let h=null;if(d.isPadding()){d=d.getOriginalParent();continue}const p=s[d.getGroupId()];if(p){p.children.push(l),a=!1;break}if(h=this.createDefFromGroup(d),h&&(h.children=[l],s[h.groupId]=h,l=h,d=d.getOriginalParent()),d!=null&&u===d){a=!1;break}u=d}a&&i.push(l)}),i}createDefFromGroup(e){const t=Aa(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const i=Aa(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?o.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSort()?e.getSort():null,i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},vy=class extends A{constructor(){super(...arguments),this.beanName="colFlex"}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const o=this.flexViewportWidth;if(!o)return[];const{visibleCols:i}=this.beans,s=i.centerCols;let r=-1;if(e.resizingCols){const f=new Set(e.resizingCols);for(let m=s.length-1;m>=0;m--)if(f.has(s[m])){r=m;break}}let n=!1;const a=s.map((f,m)=>{const b=f.getFlex(),w=b!=null&&b>0&&m>r;return n||(n=w),{col:f,isFlex:w,flex:Math.max(0,b??0),initialSize:f.getActualWidth(),min:f.getMinWidth(),max:f.getMaxWidth(),targetSize:0}});if(!n)return[];let l=a.length,d=a.reduce((f,m)=>f+m.flex,0),u=o;const h=(f,m)=>{f.frozenSize=m,f.col.setActualWidth(m,t),u-=m,d-=f.flex,l-=1},p=f=>f.frozenSize!=null;for(const f of a)f.isFlex||h(f,f.initialSize);for(;l>0;){const f=Math.round(d<1?u*d:u);let m,b=0,w=0;for(const x of a){if(p(x))continue;m=x,w+=f*(x.flex/d);const P=w-b,k=Math.round(P);x.targetSize=k,b+=k}m&&(m.targetSize+=f-b);let S=0;for(const x of a){if(p(x))continue;const P=x.targetSize,k=Math.min(Math.max(P,x.min),x.max);S+=k-P,x.violationType=k===P?void 0:k<P?"max":"min",x.targetSize=k}const y=S===0?"all":S>0?"min":"max";for(const x of a)p(x)||(y==="all"||x.violationType===y)&&h(x,x.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const g=a.filter(f=>f.isFlex&&!f.violationType).map(f=>f.col);if(e.fireResizedEvent){const f=a.filter(b=>b.initialSize!==b.frozenSize).map(b=>b.col),m=a.filter(b=>b.flex).map(b=>b.col);Vr(this.eventSvc,f,!0,t,m)}return g}initCol(e){const{flex:t,initialFlex:o}=e.colDef;t!==void 0?e.flex=t:o!==void 0&&(e.flex=o)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},Cy=class extends A{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={};this.dataTypeDefinitions=t;const o={};this.formatValueFuncs=o;const i=n=>a=>{const{column:l,node:d,value:u}=a;let h=l.getColDef().valueFormatter;return h===n.groupSafeValueFormatter&&(h=n.valueFormatter),this.beans.valueSvc.formatValue(l,d,u,h)};for(const n of Object.keys(e)){const a=e[n],l={...a,groupSafeValueFormatter:Ed(a,this.gos)};t[n]=l,o[n]=i(l)}const s=this.gos.get("dataTypeDefinitions")??{},r={};this.dataTypeMatchers=r;for(const n of Object.keys(s)){const a=s[n],l=this.processDataTypeDefinition(a,s,[n],e);l&&(t[n]=l,a.dataTypeMatcher&&(r[n]=a.dataTypeMatcher),o[n]=i(l))}this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach(n=>{const a=r[n];a&&delete r[n],r[n]=a??e[n].dataTypeMatcher})}processDataTypeDefinition(e,t,o,i){let s;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=i[r];const a=t[r];if(n&&a&&(n=a),!Pd(e,n,r))return;s=Md(n,e)}else{if(o.includes(r)){H(44);return}const n=t[r];if(!Pd(e,n,r))return;const a=this.processDataTypeDefinition(n,t,[...o,r],i);if(!a)return;s=Md(a,e)}return{...s,groupSafeValueFormatter:Ed(s,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:i}=t;const{field:s}=t;if(i===void 0&&(i=e.cellDataType),(i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(s,o):!1),!i){e.cellDataType=!1;return}const r=this.dataTypeDefinitions[i];if(!r){H(47,{cellDataType:i});return}return e.cellDataType=i,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,r,o),r.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const o=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",o),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",o))}canInferCellDataType(e,t){const{gos:o}=this;if(!$t(o))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Wn(t,i))return!1;const s=t.type===null?e.type:t.type;if(s){const r=o.get("columnTypes")??{};if(Gr(s).some(a=>{const l=r[a.trim()];return l&&Wn(l,i)}))return!1}return!Wn(e,i)}inferCellDataType(e,t){if(!e)return;let o;const i=this.getInitialData();if(i){const s=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");o=ns(i,e,s)}else this.initWaitForRowData(t);if(o!=null)return Object.keys(this.dataTypeMatchers).find(s=>this.dataTypeMatchers[s](o))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?.allLeafChildren;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:i}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:r=>{const{firstRowData:n}=r;n&&(s?.(),this.isPendingInference=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference={},t&&o?.processResizeOperations(),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const o=[];this.destroyColumnStateUpdateListeners();const i={},s={};for(const r of Object.keys(this.columnStateUpdatesPendingInference)){const n=this.columnStateUpdatesPendingInference[r],a=this.colModel.getCol(r);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const d=a.getColDef();if(t&&d.type&&d.type!==l.type){const u=wy(a,n);u.rowGroup&&u.rowGroupIndex==null&&(i[r]=u),u.pivot&&u.pivotIndex==null&&(s[r]=u),o.push(u)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,s)),o.length&&pt(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;return i?.restoreColumnOrder(o,e),s?.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const i=Nr(this.beans,o,e.getColId());return e.setColDef(i,o,t),!0}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,o=e.object;this.hasObjectValueParser=t.valueParser!==o.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==o.valueFormatter}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const o=this.getDataTypeDefinition(e)?.dataTypeMatcher;return o?o(t):!0}validateColDef(e){const t=o=>H(48,{property:o});if(e.cellDataType==="object"){const{object:o}=this.dataTypeDefinitions;e.valueFormatter===o.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===o.valueParser&&!this.hasObjectValueParser&&t("Parser")}}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){const s=this.formatValueFuncs[t];switch(o.baseDataType){case"number":{e.cellEditor="agNumberCellEditor";break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.getFindText=()=>null,e.suppressKeyboardEvent=r=>!!r.colDef.editable&&r.event.key===M.SPACE;break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=s;break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=s;break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(r,n)=>{const a=this.colModel.getColDefCol(i),l=a?.getColDef();if(!a||!l)return 0;const d=r==null?"":s({column:a,node:null,value:r}),u=n==null?"":s({column:a,node:null,value:n});return d===u?0:d>u?1:-1},e.keyCreator=s;break}}this.beans.filterManager?.setColDefPropertiesForDataType(e,o,s)}getDefaultDataTypes(){const e=o=>!!o.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:o=>o.newValue?.trim?.()===""?null:Number(o.newValue),valueFormatter:o=>o.value==null?"":typeof o.value!="number"||isNaN(o.value)?t("invalidNumber","Invalid Number"):String(o.value),dataTypeMatcher:o=>typeof o=="number"},text:{baseDataType:"text",valueParser:o=>o.newValue===""?null:uo(o.newValue),dataTypeMatcher:o=>typeof o=="string"},boolean:{baseDataType:"boolean",valueParser:o=>o.newValue==null?o.newValue:o.newValue?.trim?.()===""?null:String(o.newValue).toLowerCase()==="true",valueFormatter:o=>o.value==null?"":String(o.value),dataTypeMatcher:o=>typeof o=="boolean"},date:{baseDataType:"date",valueParser:o=>yd(o.newValue==null?null:String(o.newValue)),valueFormatter:o=>o.value==null?"":!(o.value instanceof Date)||isNaN(o.value.getTime())?t("invalidDate","Invalid Date"):wd(o.value,!1)??"",dataTypeMatcher:o=>o instanceof Date},dateString:{baseDataType:"dateString",dateParser:o=>yd(o)??void 0,dateFormatter:o=>wd(o??null,!1)??void 0,valueParser:o=>e(String(o.newValue))?o.newValue:null,valueFormatter:o=>e(String(o.value))?o.value:"",dataTypeMatcher:o=>typeof o=="string"&&e(o)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:o=>uo(o.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Md(e,t){const o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...Gr(e.columnTypes),...Gr(t.columnTypes)]),o}function Pd(e,t,o){return t?t.baseDataType!==e.baseDataType?(H(46),!1):!0:(H(45,{parentCellDataType:o}),!1)}function Ed(e,t){if(e.valueFormatter)return o=>{if(o.node?.group){const i=(o.colDef.pivotValueColumn??o.column).getAggFunc();if(i){if(i==="first"||i==="last")return e.valueFormatter(o);if(e.baseDataType==="number"&&i!=="count"){if(typeof o.value=="number")return e.valueFormatter(o);if(typeof o.value=="object"){if(!o.value)return;if("toNumber"in o.value)return e.valueFormatter({...o,value:o.value.toNumber()});if("value"in o.value)return e.valueFormatter({...o,value:o.value.value})}}return}if(t.get("groupDisplayType")==="groupRows"&&!t.get("treeData"))return}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!e.dataTypeMatcher?.(o.value))return;return e.valueFormatter(o)}}function by(e,t,o,i){if(!t[o])return!1;const s=e[o];return s===null?(t[o]=!1,!1):i===void 0?!!s:s===i}function Wn(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([o,i])=>by(e,t,o,i))}function wy(e,t){const o=th(e);return t.forEach(i=>{delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex}),o}var yy={moduleName:"DataType",version:re,beans:[Cy],dependsOn:[qw]},Sy={moduleName:"ColumnFlex",version:re,beans:[vy]},Ry={moduleName:"ColumnApi",version:re,beans:[my],apiFunctions:{getColumnDef:Yw,getDisplayNameForColumn:Xw,getColumn:Zw,getColumns:Jw,applyColumnState:ey,getColumnState:ty,resetColumnState:oy,isPinning:iy,isPinningLeft:sy,isPinningRight:ry,getDisplayedColAfter:ny,getDisplayedColBefore:ay,setColumnsVisible:ly,setColumnsPinned:dy,getAllGridColumns:cy,getDisplayedLeftColumns:uy,getDisplayedCenterColumns:hy,getDisplayedRightColumns:py,getAllDisplayedColumns:gy,getAllDisplayedVirtualColumns:fy,getColumnDefs:Qw}};function xy(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,o=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(o,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}var Fy=class extends A{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return o&&s?s.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,o){const i=t?.getColGroupDef();return i?this.getHeaderName(i,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,i,s){const r=e.headerValueGetter;if(r){const n=J(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:s});return typeof r=="function"?r(n):typeof r=="string"?this.beans.expressionSvc?.evaluate(r,n)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return xy(e.field)}return""}},ky=class extends A{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,o=!1){const{visibleCols:i}=this,s=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const n=i.bodyWidth;this.viewportLeft=n-t-e,this.viewportRight=n-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(o)}}getHeadersToRender(e,t){let o;switch(e){case"left":o=this.rowsOfHeadersToRenderLeft[t];break;case"right":o=this.rowsOfHeadersToRenderRight[t];break;default:o=this.rowsOfHeadersToRenderCenter[t];break}return o||[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(e){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},e||(this.colsWithinViewportHash="")}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||Dy(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,o=t+e.getActualWidth(),i=this.viewportLeft-200,s=this.viewportRight+200,r=t<i&&o<i,n=t>s&&o>s;return!r&&!n}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=r=>{const n=r.getLeft();return j(n)&&n>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,s=i.centerCols;return i.getColsForRow(e,s,o,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){this.clear(!0);const e={},{leftCols:t,rightCols:o,treeLeft:i,treeRight:s,treeCenter:r}=this.visibleCols;this.headerColsWithinViewport.concat(t).concat(o).forEach(l=>e[l.getId()]=!0);const a=(l,d,u)=>{let h=!1;for(let p=0;p<l.length;p++){const g=l[p];let f=!1;if(to(g))f=e[g.getId()]===!0;else{const b=g.getDisplayedChildren();b&&(f=a(b,d,u+1))}f&&(h=!0,d[u]||(d[u]=[]),d[u].push(g))}return h};a(i,this.rowsOfHeadersToRenderLeft,0),a(s,this.rowsOfHeadersToRenderRight,0),a(r,this.rowsOfHeadersToRenderCenter,0)}extractViewport(){const e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function Dy(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var My=class extends A{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class o{refresh(){return!1}getGui(){return this.eGui}init(s){const r=t(s),n=typeof r;if(n==="string"||n==="number"||n==="boolean"){this.eGui=ln("<span>"+r+"</span>");return}if(r==null){this.eGui=Me({tag:"span"});return}this.eGui=r}}return o}},Py={moduleName:"CellRendererFunction",version:re,beans:[My]},Ey=class extends A{constructor(){super(...arguments),this.beanName="registry",this.agGridDefaults={},this.agGridDefaultParams={},this.jsComps={},this.dynamicBeans={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:o,dynamicBeans:i,selectors:s}=e;if(o){const r=(n,a,l)=>{this.agGridDefaults[n]=a,l&&(this.agGridDefaultParams[n]=l)};for(const n of Object.keys(o)){const a=o[n];typeof a=="object"?r(n,a.classImp,a.params):r(n,a)}}if(i)for(const r of Object.keys(i))this.dynamicBeans[r]=i[r];if(s?.forEach(r=>{this.selectors[r.selector]=r}),t)for(const r of Object.keys(t))this.icons[r]=t[r]}getUserComponent(e,t){const o=(a,l,d)=>({componentFromFramework:l,component:a,params:d}),{frameworkOverrides:i}=this.beans,s=i.frameworkComponent(t,this.gos.get("components"));if(s!=null)return o(s,!0);const r=this.jsComps[t];if(r){const a=i.isFrameworkComponent(r);return o(r,a)}const n=this.agGridDefaults[t];return n?o(n,!1,this.agGridDefaultParams[t]):(this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null)}createDynamicBean(e,t,...o){const i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(Lo(256));return}return new i(...o)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},Ay=23,Ty=class extends A{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===Ay&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const o=this.readyCallbacks.indexOf(t);o>=0&&this.readyCallbacks.splice(o,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},Iy=':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom,.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-floating-bottom{border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',Pl=typeof window!="object"||!window?.document?.fonts?.forEach,Ta=new WeakMap,Gi=(e,t,o,i,s,r)=>{if(Pl)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let n=Ta.get(t);if(n||(n=[],Ta.set(t,n)),n.find(u=>u.css===e))return;const a=document.createElement("style");r&&a.setAttribute("nonce",r),a.dataset.agGlobalCss=o,a.textContent=e;const l={css:e,el:a,priority:s};let d;for(const u of n){if(u.priority>s)break;d=u}if(d){d.el.insertAdjacentElement("afterend",a);const u=n.indexOf(d);n.splice(u+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),n.push(l)},Jh=(e,t,o)=>{Gi(Iy,e,"core",t,0,o),Array.from(hv()).sort((i,s)=>i.moduleName.localeCompare(s.moduleName)).forEach(i=>i.css?.forEach(s=>Gi(s,e,`module-${i.moduleName}`,t,0,o)))},Ia=new Set,Ly=e=>{Ia.add(e)},By=e=>{if(Ia.delete(e),Ia.size===0){Ta=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},Co=e=>new ep(e),Fo="$default",Oy=0,ep=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[Fo]:{...o[Fo]??{},...t??{}},...o}}use(e,t,o){let i=this._inject;if(i==null){let{css:s}=this;if(s){const r=`ag-theme-${this.feature??"part"}-${++Oy}`;typeof s=="function"&&(s=s()),s=`:where(.${r}) {
|
|
10
|
+
${s}
|
|
11
|
+
}
|
|
12
|
+
`;for(const n of this.cssImports??[])s=`@import url(${JSON.stringify(n)});
|
|
13
|
+
${s}`;i={css:s,class:r}}else i=!1;this._inject=i}return i&&e&&Gi(i.css,e,i.class,t,1,o),i?i.class:!1}},Gy=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),tp=e=>`--ag-${Gy(e)}`,oo=e=>`var(${tp(e)})`,Ny=(e,t,o)=>Math.max(t,Math.min(o,e)),Vy=e=>{const t=new Map;return o=>{const i=o;return t.has(i)||t.set(i,e(o)),t.get(i)}},qt=e=>({ref:"accentColor",mix:e}),xt=e=>({ref:"foregroundColor",mix:e}),_t=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),Hy=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),Ct={ref:"backgroundColor"},ji={ref:"foregroundColor"},Eo={ref:"accentColor"},Yr={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:xt(.15),chromeBackgroundColor:_t(.02),browserColorScheme:"light"},_y={...Yr,textColor:ji,accentColor:"#2196f3",invalidColor:"#e02525",wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:Ct,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:Eo,rangeSelectionBackgroundColor:qt(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:qt(.5),rangeHeaderHighlightColor:Hy(.08),rowNumbersSelectedColor:qt(.5),rowHoverColor:qt(.08),columnHoverColor:qt(.05),selectedRowBackgroundColor:qt(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:Ct,borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},dragAndDropImageBackgroundColor:Ct,dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:xt(.7),focusShadow:{spread:3,color:qt(.5)},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},iconSize:16,iconColor:"inherit",iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:xt(.1),iconButtonActiveColor:Eo,iconButtonActiveBackgroundColor:qt(.28),iconButtonActiveIndicatorColor:Eo,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:Eo,toggleButtonOffBackgroundColor:_t(.3),toggleButtonSwitchBackgroundColor:Ct,toggleButtonSwitchInset:2,menuBorder:{color:xt(.2)},menuBackgroundColor:_t(.03),menuTextColor:_t(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:xt(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:Eo},cellEditingShadow:{ref:"cardShadow"},dialogBorder:{color:xt(.2)},panelBackgroundColor:Ct,panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:xt(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:xt(.13)},selectCellBackgroundColor:xt(.07),selectCellBorder:{color:xt(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",findMatchColor:ji,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:ji,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:xt(.15),statusBarLabelColor:ji,statusBarLabelFontWeight:500,statusBarValueColor:ji,statusBarValueFontWeight:500},zy=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",Wy={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},$y=()=>Co({feature:"buttonStyle",params:{...Wy,buttonBackgroundColor:Ct,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:Eo}},css:zy}),Uy=$y(),jy=".ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",Ky=()=>Co({feature:"columnDropStyle",css:jy}),op=Ky(),qy=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],Yy=Vy(e=>(e=e.toLowerCase(),qy.find(t=>e.endsWith(t.toLowerCase()))??"length")),Cn=e=>typeof e=="object"&&e?.ref?oo(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,El=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=oo(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?oo(e.onto):"transparent"}, ${t} ${Ny(e.mix*100,0,100)}%)`}return!1},Qy=Cn,wi=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,o=>o[0]==="-"?o:` ${oo(o)} `)})`:e&&"ref"in e?oo(e.ref):!1,Xy=Cn,Zy=(e,t)=>typeof e=="string"?e:e===!0?"solid 1px var(--ag-border-color)":e===!1?t==="columnBorder"?"solid 1px transparent":"none":e&&"ref"in e?oo(e.ref):ip(e.style??"solid")+" "+wi(e.width??1)+" "+El(e.color??{ref:"borderColor"}),Jy=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?oo(e.ref):[wi(e.offsetX??0),wi(e.offsetY??0),wi(e.radius??0),wi(e.spread??0),El(e.color??{ref:"foregroundColor"})].join(" "),ip=Cn,sp=e=>typeof e=="string"?e.includes(",")?e:Ad(e):e&&"googleFont"in e?sp(e.googleFont):e&&"ref"in e?oo(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),Ad(t))).join(", "):!1,Ad=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),eS=Cn,rp=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?rp({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?oo(e.ref):!1,tS=(e,t)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&he(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?oo(e.ref):!1,oS={color:El,colorScheme:Qy,length:wi,scale:Xy,border:Zy,borderStyle:ip,shadow:Jy,image:rp,fontFamily:sp,fontWeight:eS,duration:tS},iS=(e,t)=>{const o=Yy(e);return oS[o](t,e)},sS=()=>new np().withPart(Uy).withPart(op),np=class ap{constructor(t=[]){this.parts=t}withPart(t){return typeof t=="function"&&(t=t()),t instanceof ep?new ap([...this.parts,t]):(Sa(259,{part:t},"Invalid part"),this)}withoutPart(t){return this.withPart(Co({feature:t}))}withParams(t,o=Fo){return this.withPart(Co({modeParams:{[o]:t}}))}_startUse({styleContainer:t,cssLayer:o,nonce:i,loadThemeGoogleFonts:s}){if(Pl)return;nS(),Jh(t,o,i);const r=rS(this);if(r.length>0)for(const n of r)s&&lS(n,i);for(const n of this.parts)n.use(t,o,i)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=Td(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const o={[Fo]:{..._y}};for(const i of Td(this.parts))for(const s of Object.keys(i.modeParams)){const r=i.modeParams[s];if(r){const n=o[s]??(o[s]={}),a=new Set;for(const l of Object.keys(r)){const d=r[l];d!==void 0&&(n[l]=d,a.add(l))}if(s===Fo)for(const l of Object.keys(o)){const d=o[l];if(l!==Fo)for(const u of a)delete d[u]}}}this._paramsCache=t=o}return t}_getPerGridCss(t){const o="##SELECTOR##";let i=this._paramsCssCache;if(!i){let s="",r="";const n=this._getModeParams();for(const l of Object.keys(n)){const d=n[l];if(l!==Fo){const h=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
|
|
14
|
+
`;s+=h,r+=h}for(const u of Object.keys(d).sort()){const h=d[u],p=iS(u,h);if(p===!1)he(107,{key:u,value:h});else{const g=tp(u),f=g.replace("--ag-","--ag-inherited-");s+=` ${g}: var(${f}, ${p});
|
|
15
|
+
`,r+=` ${f}: var(${g});
|
|
16
|
+
`}}l!==Fo&&(s+=`}
|
|
17
|
+
`,r+=`}
|
|
18
|
+
`)}let a=`${o} {
|
|
19
|
+
${s}}
|
|
20
|
+
`;a+=`:has(> ${o}):not(${o}) {
|
|
21
|
+
${r}}
|
|
22
|
+
`,this._paramsCssCache=i=a}return i.replaceAll(o,`:where(.${t})`)}},Td=e=>{const t=new Map;for(const i of e)t.set(i.feature,i);const o=[];for(const i of e)(!i.feature||t.get(i.feature)===i)&&o.push(i);return o},rS=e=>{const t=new Set,o=r=>{if(Array.isArray(r))r.forEach(o);else{const n=r?.googleFont;typeof n=="string"&&t.add(n)}};return Object.values(e._getModeParams()).flatMap(r=>Object.values(r)).forEach(o),Array.from(t).sort()},Id=!1,nS=()=>{if(!Id){Id=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},aS=new Set,lS=async(e,t)=>{aS.add(e);const o=`@import url('https://${dS}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
|
|
23
|
+
`;Gi(o,document.head,`googleFont:${e}`,void 0,0,t)},dS="fonts.googleapis.com",cS='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',uS=()=>Co({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:Ct,checkboxUncheckedBorderColor:_t(.3),checkboxCheckedBackgroundColor:Eo,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:Ct,checkboxIndeterminateBackgroundColor:_t(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:Ct,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:cS}),hS=uS(),lp=()=>({...Yr,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:_t(.05),rowHoverColor:qt(.15),selectedRowBackgroundColor:qt(.2),menuBackgroundColor:_t(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",findMatchColor:Ct,findActiveMatchColor:Ct,checkboxUncheckedBorderColor:_t(.4),toggleButtonOffBackgroundColor:_t(.4)}),pS=()=>({...lp(),backgroundColor:"#1f2836"}),gS=()=>Co({feature:"colorScheme",params:Yr,modeParams:{light:Yr,dark:lp(),"dark-blue":pS()}}),fS=gS(),dp={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},cp={"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>'},mS=(e={})=>{let t="";for(const o of[...Object.keys(dp),...Object.keys(cp)]){const i=vS(o,e.strokeWidth);t+=`.ag-icon-${o}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }
|
|
24
|
+
`}return t},vS=(e,t=1.5)=>{const o=cp[e];if(o)return o;const i=dp[e];if(!i)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+i+"</svg>"},CS=(e={})=>Co({feature:"iconSet",css:()=>mS(e)}),bS=CS(),wS=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',yS=":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){&:focus{box-shadow:var(--ag-focus-shadow)}}",SS={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"}},RS=()=>Co({feature:"inputStyle",params:{...SS,inputBackgroundColor:Ct,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:Eo},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:_t(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>wS+yS}),xS=RS(),FS='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',kS={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},DS=()=>Co({feature:"tabStyle",params:{...kS,tabBarBorder:!0,tabBarBackgroundColor:xt(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Ct},css:FS}),MS=DS(),PS=()=>sS().withPart(hS).withPart(fS).withPart(bS).withPart(MS).withPart(xS).withPart(op).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),Al=PS(),ES={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},AS={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},TS={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},Ld={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},Bd={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},Od={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},$n={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},IS=0,LS=class extends A{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.paramsClass=`ag-theme-params-${++IS}`,this.globalCSS=[]}wireBeans(e){const{eGridDiv:t,gridOptions:o}=e;this.eGridDiv=t,this.eStyleContainer=o.themeStyleContainer??(t.getRootNode()===document?document.head:t),this.cssLayer=o.themeCssLayer,this.styleNonce=o.styleNonce}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(Ld),this.getSizeEl(Bd),this.getSizeEl(Od),this.getSizeEl($n),this.refreshRowBorderWidthVariable(),this.addDestroyFunc(()=>By(this)),this.mutationObserver=new MutationObserver(()=>{this.fireGridStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}getDefaultRowHeight(){return this.getCSSVariablePixelValue(Ld)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Bd)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(ES)}getDefaultIndentation(){return this.getCSSVariablePixelValue(AS)}getDefaultRowGroupIndentSize(){return this.getCSSVariablePixelValue(TS)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getDefaultIndentation(),o=this.getDefaultRowGroupIndentSize();return e-1+o*t}getCellPaddingRight(){return this.getDefaultCellHorizontalPadding()-1}getCellPadding(){return this.getCellPaddingLeft()+this.getCellPaddingRight()}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Od)}getRowBorderWidth(){return this.getCSSVariablePixelValue($n)}applyThemeClasses(e){const{gridTheme:t}=this;let o="";if(t)o=`${this.paramsClass} ${t._getCssClass()}`;else{this.mutationObserver.disconnect();let i=this.eGridDiv;for(;i;){let s=!1;for(const r of Array.from(i.classList))r.startsWith("ag-theme-")&&(s=!0,o=o?`${o} ${r}`:r);s&&this.mutationObserver.observe(i,{attributes:!0,attributeFilter:["class"]}),i=i.parentElement}}for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(o){const i=e.className;e.className=i+(i?" ":"")+o}}refreshRowHeightVariable(){const{eGridDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),o=this.gos.get("rowHeight");if(o==null||isNaN(o)||!isFinite(o))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const i=`${o}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),o):t!=""?parseFloat(t):-1}addGlobalCSS(e,t){this.gridTheme?Gi(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const o=this.measureSizeEl(e);return o==="detached"||o==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,o),o)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const o=t.offsetWidth;return o===Un?"no-styles":(this.sizesMeasured=!0,o)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Me({tag:"div",cls:"ag-measurement-container"}),this.eGridDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const o=this.getMeasurementContainer();t=Me({tag:"div"});const{border:i,noWarn:s}=e;i?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${Un}px)`)):t.style.width=`var(${e.cssName}, ${Un}px)`,o.appendChild(t),this.sizeEls.set(e,t);let r=this.measureSizeEl(e);r==="no-styles"&&!s&&H(9,{variable:e});const n=No(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==r&&(r=a,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>n()),t}fireGridStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue($n);this.eGridDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}handleThemeGridOptionChange(){const{gos:e,eGridDiv:t,globalCSS:o,gridTheme:i}=this,s=e.get("theme");let r;if(s==="legacy")r=void 0;else{const n=s??Al;n instanceof np?r=n:he(240,{theme:n})}if(r!==i){if(r){Ly(this),Jh(this.eStyleContainer,this.cssLayer,this.styleNonce);for(const[a,l]of o)Gi(a,this.eStyleContainer,l,this.cssLayer,0,this.styleNonce);o.length=0}this.gridTheme=r,r?._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce});let n=this.eParamsStyle;if(!n){n=this.eParamsStyle=Me({tag:"style"});const a=this.gos.get("styleNonce");a&&n.setAttribute("nonce",a),t.appendChild(n)}Pl||(n.textContent=r?._getPerGridCss(this.paramsClass)||""),this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged")}r&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&he(s?106:239)}},Un=15538,BS=class extends A{constructor(){super(...arguments),this.beanName="eventSvc",this.globalEventService=new fo}postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}addEventListener(e,t,o){this.globalEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.globalEventService.removeEventListener(e,t,o)}addGlobalListener(e,t=!1){this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalEventService.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(J(this.gos,e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(J(this.gos,e))}};function up(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}function La(e,t){let o;if(Oe(e)&&up(e)&&e.isPadding()){const i=e;o=i.getLeafColumns()[0];let s=o;for(;s!==i;)t++,s=s.getParent()}return{column:o||e,headerRowIndex:t}}var OS=class extends A{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,o=>{this.gridBodyCon=o.gridBodyCtrl});const t=Ge(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let o;const{colModel:i,colGroupSvc:s,ctrlsSvc:r}=this.beans;if(typeof e=="string"?(o=i.getCol(e),o||(o=s?.getColumnGroup(e)??null)):o=e,!o)return null;const a=r.getHeaderRowContainerCtrl()?.getAllCtrls(),l=Se(a||[]).type==="filter",d=Xt(this.beans)-1;let u=-1,h=o;for(;h;)u++,h=h.getParent();let p=u;return t&&l&&p===d-1&&p++,p===-1?null:{headerRowIndex:p,column:o}}navigateVertically(e,t,o){const i=this.beans.focusSvc;if(t||(t=i.focusedHeader),!t)return!1;const{headerRowIndex:s}=t,r=t.column,n=Xt(this.beans),a=e==="UP",l=this.getHeaderRowType(s);let{headerRowIndex:d,column:u,headerRowIndexWithoutSpan:h}=a?GS(l,r,s):NS(l,r,s),p=!1;return d<0&&(d=0,u=r,p=!0),d>=n?(d=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!p&&!u?!1:i.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:u},allowUserOverride:!0,event:o})}navigateHorizontally(e,t=!1,o){const{focusSvc:i,gos:s}=this.beans,r=i.focusedHeader;let n,a;this.currentHeaderRowWithoutSpan!==-1?r.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=r.headerRowIndex,e==="LEFT"!==s.get("enableRtl")?(a="Before",n=this.findHeader(r,a)):(a="After",n=this.findHeader(r,a));const l=s.getCallback("tabToNextHeader");if(t&&l){const d=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:n,direction:a});if(d){const{headerRowIndex:u}=i.focusedHeader||{};u!=null&&u!=r.headerRowIndex&&(this.currentHeaderRowWithoutSpan=u)}return d}return n||!t?i.focusHeaderPosition({headerPosition:n,direction:a,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(r,a,o)}focusNextHeaderRow(e,t,o){const i=e.headerRowIndex;let s=null,r;const n=this.beans;if(t==="Before"?i>0&&(r=i-1,this.currentHeaderRowWithoutSpan-=1,s=this.findColAtEdgeForHeaderRow(r,"end")):(r=i+1,this.currentHeaderRowWithoutSpan<Xt(n)?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1,s=this.findColAtEdgeForHeaderRow(r,"start")),!s)return!1;const{column:a,headerRowIndex:l}=La(s.column,s?.headerRowIndex);return n.focusSvc.focusHeaderPosition({headerPosition:{column:a,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:o})}scrollToColumn(e,t="After"){if(e.getPinned())return;let o;if(Oe(e)){const i=e.getDisplayedLeafColumns();o=t==="Before"?Se(i):i[0]}else o=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(o)}findHeader(e,t){let o,i;const{colGroupSvc:s,visibleCols:r}=this.beans;if(Oe(e.column)?o=s?.getGroupAtDirection(e.column,t)??void 0:(i=`getCol${t}`,o=r[i](e.column)),!o)return;const{headerRowIndex:n}=e;if(this.getHeaderRowType(n)!=="filter"){const d=[o];for(;o.getParent();)o=o.getParent(),d.push(o);o=d[Math.max(0,d.length-1-n)]}const{column:a,headerRowIndex:l}=La(o,n);return{column:a,headerRowIndex:l}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const{visibleCols:o,ctrlsSvc:i,colGroupSvc:s}=this.beans,r=o.allCols,n=r[t==="start"?0:r.length-1];if(!n)return;const l=i.getHeaderRowContainerCtrl(n.getPinned())?.getRowType(e);if(l=="group"){const d=s?.getColGroupAtLevel(n,e);return{headerRowIndex:e,column:d}}return{headerRowIndex:l==null?-1:e,column:n}}};function GS(e,t,o){const i=e==="filter",s=e==="column";let r=i?t:t.getParent(),n=o-1,a=n;if(s&&up(t.getParent())){for(;r&&r.isPadding();)r=r.getParent(),n--;a=n,n<0&&(r=t,n=o,a=void 0)}return{column:r,headerRowIndex:n,headerRowIndexWithoutSpan:a}}function NS(e,t,o,i="After"){let s=t,r=o+1;const n=r;if(e==="group"){const a=t.getDisplayedLeafColumns(),l=i==="After"?a[0]:Se(a),d=[];let u=l;for(;u.getParent()!==t;)u=u.getParent(),d.push(u);if(s=l,l.isSpanHeaderHeight())for(let h=d.length-1;h>=0;h--){const p=d[h];if(!p.isPadding()){s=p;break}r++}else s=Se(d),s||(s=l)}return{column:s,headerRowIndex:r,headerRowIndexWithoutSpan:n}}var VS=class extends A{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(yv(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(Ae(this.beans),Vh)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=Ae(this.beans);return this.isDomDataPresentInHierarchy(e,Wr)?!0:this.isDomDataPresentInHierarchy(e,Kr)}isDomDataPresentInHierarchy(e,t){let o=e;for(;o;){if(Mu(this.gos,o,t))return!0;o=o.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:o,column:i}=e,s={rowIndex:t,rowPinned:o,column:i,isFullWidthCell:!1},r=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:o});return r&&(s.isFullWidthCell=r.isFullWidth()),s}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:o,rowPinned:i,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:r=!1}=e,n=this.colModel.getCol(t);if(!n){this.focusedCell=null;return}this.focusedCell={rowIndex:o,rowPinned:nt(i),column:n},this.eventSvc.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCell),forceBrowserFocus:s,preventScrollOnBrowserFocus:r})}isCellFocused(e){return this.focusedCell==null?!1:_v(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:o,pinned:i}}=e,{column:s,headerRowIndex:r}=this.focusedHeader;return t===s&&o===r&&i==s.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),ti(this.beans))return!1;const{direction:t,fromTab:o,allowUserOverride:i,event:s,fromCell:r,rowWithoutSpanValue:n}=e;let{headerPosition:a}=e;if(r&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(i){const l=this.focusedHeader,d=Xt(this.beans);if(o){const u=this.gos.getCallback("tabToNextHeader");u&&(a=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:l,headerPosition:a,headerRowCount:d}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&s){const h={key:s.key,previousHeaderPosition:l,nextHeaderPosition:a,headerRowCount:d,event:s};a=u(h)}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:s,fromCell:r,rowWithoutSpanValue:n}):!1}focusHeaderPositionFromUserFunc(e){if(ti(this.beans))return!1;const{userFunc:t,headerPosition:o,direction:i,event:s}=e,r=this.focusedHeader,n=Xt(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:r,headerPosition:o,headerRowCount:n});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:i,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:o,currentPosition:i,headerPosition:s,headerRowCount:r}=e,a=t({backwards:o==="Before",previousHeaderPosition:i,nextHeaderPosition:s,headerRowCount:r});return a===!0?i:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:o,fromCell:i,rowWithoutSpanValue:s,event:r}=e,{column:n,headerRowIndex:a}=t,{filterManager:l,ctrlsSvc:d,headerNavigation:u}=this.beans;if(a===-1)return l?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:n,event:r});u?.scrollToColumn(n,o);const p=d.getHeaderRowContainerCtrl(n.getPinned())?.focusHeader(t.headerRowIndex,n,r)||!1;return u&&p&&(s!=null||i)&&(u.currentHeaderRowWithoutSpan=s??-1),p}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;const{colGroupSvc:t}=this.beans;t&&e.getParent()&&(e=t.getColGroupAtLevel(e,0));const o=La(e,0);return this.focusHeaderPosition({headerPosition:o,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=Xt(this.beans)-1,o=Se(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===nt(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&Et(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:o=!0,event:i}=e;if(this.overlays?.isExclusive())return o&&this.focusOverlay(t);if(ml(this.beans))return t&&!ti(this.beans)?this.focusLastHeader():o&&this.focusOverlay(t)?!0:t?!1:ai(this.beans,t);const s=t?$v(this.beans):Wv(this.beans);if(s){const r=e.column??this.focusedHeader?.column,{rowIndex:n,rowPinned:a}=s,l=vl(this.beans,s);if(!r||!l||n==null)return!1;if(r.isSuppressNavigable(l)){const d=this.gos.get("enableRtl");let u;return!i||i.key===M.TAB?u=d?M.LEFT:M.RIGHT:u=i.key,this.beans.navigation?.navigateToNextCell(null,u,{rowIndex:n,column:r,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:n,column:r,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(s)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(s,t)||(this.setFocusedCell({rowIndex:n,column:r,rowPinned:nt(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:n,rowPinned:a,column:r})),!0}return!!(o&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const o=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:Xt(this.beans)-1}}):this.focusGridView({column:o})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},HS=class extends A{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),o=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==o)&&(this.horizontalScrollGap=t,this.verticalScrollGap=o,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),o=typeof e=="number"&&e>=0?e:Ff();o!=null&&(this.scrollbarWidth=o,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},_S=class extends A{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:o}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),o.destroy(),super.destroy()}},cs=new Set(["gridPreDestroyed","fillStart","pasteStart"]),zS={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1},WS=0,$S=0,US=class extends A{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.gridInstanceId=$S++,this.propEventSvc=new fo,this.globalEventHandlerFactory=e=>(t,o)=>{if(!this.isAlive())return;const i=cs.has(t);if(i&&!e||!i&&e)return;const s=dl(t),r=this.gridOptions[s];typeof r=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{r(o)})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"gridOptionsUpdated"})}})}get(e){return this.gridOptions[e]??zS[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return j(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(o=>e(this.addGridCommonParams(o)))}updateGridOptions({options:e,force:t,source:o="api"}){const i={id:WS++,properties:[]},s=[],{gridOptions:r,validation:n}=this;for(const a of Object.keys(e)){const l=e[a];n?.warnOnInitialPropertyUpdate(o,a);const d=t||typeof l=="object"&&o==="api",u=r[a];if(d||u!==l){r[a]=l;const h={type:a,currentValue:l,previousValue:u,changeSet:i,source:o};s.push(h)}}n?.processGridOptions(this.gridOptions),i.properties=s.map(a=>a.type),s.forEach(a=>{Ss(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)})}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}assertModuleRegistered(e,t){const o=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return o||he(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),o}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:gl(),rowModelType:this.get("rowModelType"),isUmd:pv()}}isModuleRegistered(e){return dh(e,this.gridId,this.get("rowModelType"))}};function hp(e){const t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var jS=hp(!0),KS=hp(!1),qS=class extends se{constructor(){super(...arguments),this.eFilter=N,this.eFilterButton=N,this.eSortIndicator=N,this.eMenu=N,this.eLabel=N,this.eText=N,this.eSortOrder=N,this.eSortAsc=N,this.eSortDesc=N,this.eSortMixed=N,this.eSortNone=N,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const o={...e};Xe(o,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(o)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const o=e.template;return o?o?.trim?o.trim():o:t?jS:KS}init(e){this.params=e;const{sortSvc:t,touchSvc:o,rowNumbersSvc:i,userCompFactory:s}=this.beans,r=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!r),this.setTemplate(this.currentTemplate,r?[r]:void 0),o?.setupForHeader(this),this.setMenu(),this.setupSort(),i?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const o=qm(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){const{displayName:t}=e,o=this.currentDisplayName;if(this.currentDisplayName=t,o===t||this.innerHeaderComponent||this.isLoadingInnerComponent)return;const i=Mt(t,!0);this.eText.textContent=i}addInIcon(e,t,o){if(t==null)return;const i=de(e,this.beans,o);i&&t.appendChild(i)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Dt(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:o}=this,i=Ke(e);this.addInIcon(i?"menu":"menuAlt",t,o.column),t.classList.toggle("ag-header-menu-icon",!i);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(s)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:o}=this;t||this.toggleMenuAlwaysShow(!0),o.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:o,beans:i,eMenu:s,eFilterButton:r}=this,n=t.column,a=Ke(o);if(e&&!a){if(i.menuSvc?.isFilterMenuInHeaderEnabled(n))return t.showFilter(r??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??r??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:o}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:i,eSortOrder:s,eSortAsc:r,eSortDesc:n,eSortMixed:a,eSortNone:l}=this;i.attachCustomElements(s,r,n,a,l)}this.eSortIndicator.setupSort(o),this.currentSort&&e.setupHeader(this,o,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;e&&this.configureFilter(t.enableFilterIcon,e,this.onFilterChangedIcon.bind(this),"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,o,i){if(!e)return Dt(t),!1;const s=this.params.column;return this.addInIcon(i,t,s),this.addManagedListeners(s,{filterChanged:o}),o(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();Z(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:o}=this;return e?t??o??this.getGui():o??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},YS={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},QS=class extends se{constructor(){super(YS),this.agOpened=N,this.agClosed=N,this.agLabel=N,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons()}checkWarnings(){this.params.template&&H(89)}workOutInnerHeaderGroupComponent(e,t){const o=Qm(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:o},beans:i}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const s=l=>{if(zt(l))return;const d=!o.isExpanded();i.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(i,t,s),this.addTouchAndClickListeners(i,e,s);const r=l=>{mo(l)};this.addManagedElementListeners(t,{dblclick:r}),this.addManagedElementListeners(e,{dblclick:r}),this.addManagedElementListeners(this.getGui(),{dblclick:s}),this.updateIconVisibility();const n=o.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(n,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,o){e.touchSvc?.setupForHeaderGroup(this,t,o),this.addManagedElementListeners(t,{click:o})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:o}}=this;if(o.isExpandable()){const i=o.isExpanded();Z(e,i),Z(t,!i)}else Z(e,!1),Z(t,!1)}addInIcon(e,t){const o=de(e,this.beans,null);o&&t.appendChild(o)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:o}=this;Z(t,!1),Z(o,!1);return}}setupLabel(e){const{displayName:t,columnGroup:o}=e,i=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;if(j(t)&&!i){const s=Mt(t,!0);this.agLabel.textContent=s}this.addOrRemoveCssClass("ag-sticky-label",!o.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},XS={moduleName:"ColumnHeaderComp",version:re,userComponents:{agColumnHeader:qS},icons:{menu:"menu",menuAlt:"menu-alt"}},ZS={moduleName:"ColumnGroupHeaderComp",version:re,userComponents:{agColumnGroupHeader:QS},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},JS=class extends A{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&H(92)}createTask(e,t,o,i){this.verify();let s=o;i&&this.batchFrameworkComps&&(s="f1");const r={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[s],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((o,i)=>o.index!==i.index?t*(i.index-o.index):i.createOrder-o.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:o,f1:i,destroyTasks:s,beans:r}=this,{ctrlsSvc:n,frameworkOverrides:a}=r,l=t.list,d=o.list,u=i.list,h=Date.now();let p=0;const g=e<=0,f=n.getScrollFeature();for(;g||p<e;){if(!f.scrollGridIfNeeded()){let b;if(l.length)this.sortTaskList(t),b=l.pop().task;else if(d.length)this.sortTaskList(o),b=d.pop().task;else if(u.length)a.wrapOutgoing(()=>{for(;(g||p<e)&&!f.scrollGridIfNeeded();){if(u.length)this.sortTaskList(i),b=u.pop().task,b();else break;p=Date.now()-h}}),b=()=>{};else if(s.length)b=s.pop();else break;b()}p=Date.now()-h}l.length||d.length||u.length||s.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);Wt(this.beans,e)}isQueueEmpty(){return!this.ticking}},e0={moduleName:"AnimationFrame",version:re,beans:[JS]},t0=class extends A{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Yo())return;const t=(o,i,s)=>{const{rowCtrl:r,cellCtrl:n}=e.getControlsForEventTarget(s?.target??null);n?.column&&n.dispatchCellContextMenuEvent(s??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,s,r,n)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Yo()||Gu("dblclick"))return!1;const i=Date.now(),s=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,s})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:i,eMenu:s,eFilterButton:r}=e,n=new mi(e.getGui(),!0),a=e.shouldSuppressMenuHide(),l=a&&j(s),d=l?new mi(s,!0):n;if(i.enableMenu){const u=l?"tap":"longTap",h=p=>i.showColumnMenuAfterMouseClick(p.touchStart);e.addManagedListeners(d,{[u]:h})}if(i.enableSorting){const u=h=>{const p=h.touchStart.target;a&&(s?.contains(p)||r?.contains(p))||o?.progressSort(i.column,!1,"uiColumnSorted")};e.addManagedListeners(n,{tap:u})}if(i.enableFilterButton&&r){const u=new mi(r,!0);e.addManagedListeners(u,{tap:()=>i.showFilter(r)}),e.addDestroyFunc(()=>u.destroy())}e.addDestroyFunc(()=>n.destroy()),l&&e.addDestroyFunc(()=>d.destroy())}setupForHeaderGroup(e,t,o){const i=new mi(t,!0);e.addManagedListeners(i,{tap:o}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,o){if(!Yo())return;const i=new mi(t),s=r=>{As(this.gos,r.touchEvent)&&o(void 0,r.touchStart,r.touchEvent)};e.addManagedListeners(i,{longTap:s}),e.addDestroyFunc(()=>i.destroy())}},o0={moduleName:"Touch",version:re,beans:[t0]},i0=class extends A{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,o=!1){return o?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const o=e===M.UP,i=e===M.DOWN,s=e===M.LEFT;let r,n;const{pageBounds:a,gos:l,visibleCols:d}=this.beans;if(o||i)n=o?a.getFirstRow():a.getLastRow(),r=t.column;else{const u=l.get("enableRtl");n=t.rowIndex,r=(s!==u?d.allCols:[...d.allCols].reverse()).find(p=>this.isCellGoodToFocusOn({rowIndex:n,rowPinned:null,column:p}))}return r?{rowIndex:n,rowPinned:null,column:r}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let o=t,i=!1;for(;!i;){switch(e){case M.UP:o=this.getCellAbove(o);break;case M.DOWN:o=this.getCellBelow(o);break;case M.RIGHT:o=this.gos.get("enableRtl")?this.getCellToLeft(o):this.getCellToRight(o);break;case M.LEFT:o=this.gos.get("enableRtl")?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,H(8,{key:e});break}o?i=this.isCellGoodToFocusOn(o):i=!0}return o}isCellGoodToFocusOn(e){const t=e.column;let o;const{pinnedRowModel:i,rowModel:s}=this.beans;switch(e.rowPinned){case"top":o=i?.getPinnedTopRow(e.rowIndex);break;case"bottom":o=i?.getPinnedBottomRow(e.rowIndex);break;default:o=s.getRow(e.rowIndex);break}return o?!this.isSuppressNavigable(t,o):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,o=hd(this.beans,t);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,o=$r(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned});return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:o}=this.beans,i=t.allCols;let s=e.rowIndex,r=e.rowPinned,n=t.getColAfter(e.column);if(!n){n=i[0];const a=hd(this.beans,e);if(Ee(a)||!a.rowPinned&&!(o?.isRowInPage(a.rowIndex)??!0))return null;s=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:s,column:n,rowPinned:r}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:o,pagination:i}=t,s=o.allCols;let r=e.rowIndex,n=e.rowPinned,a=o.getColBefore(e.column);if(!a){a=Se(s);const l=$r(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(Ee(l)||!l.rowPinned&&!(i?.isRowInPage(l.rowIndex)??!0))return null;r=l?l.rowIndex:null,n=l?l.rowPinned:null}return{rowIndex:r,column:a,rowPinned:n}}isSuppressNavigable(e,t){const{suppressNavigable:o}=e.colDef;if(typeof o=="boolean")return o;if(typeof o=="function"){const i=e.createColumnFunctionCallbackParams(t);return o(i)}return!1}};function s0(e){return e.focusSvc.getFocusedCell()}function r0(e){return e.focusSvc.clearFocusedCell()}function n0(e,t,o,i){e.focusSvc.setFocusedCell({rowIndex:t,column:o,rowPinned:i,forceBrowserFocus:!0})}function a0(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function l0(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function d0(e,t,o=!1){const i=e.headerNavigation?.getHeaderPositionForColumn(t,o);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}var c0=class extends A{constructor(){super(),this.beanName="navigation",this.onPageDown=rd(this.onPageDown,100),this.onPageUp=rd(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const o=e.key,i=e.altKey,s=e.ctrlKey||e.metaKey,r=!!this.beans.rangeSvc&&e.shiftKey,n=Nv(this.gos,e);let a=!1;switch(o){case M.PAGE_HOME:case M.PAGE_END:!s&&!i&&(this.onHomeOrEndKey(o),a=!0);break;case M.LEFT:case M.RIGHT:case M.UP:case M.DOWN:if(!n)return!1;s&&!i&&!r&&(this.onCtrlUpDownLeftRight(o,n),a=!0);break;case M.PAGE_DOWN:case M.PAGE_UP:!s&&!i&&(a=this.handlePageUpDown(o,n,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,o){return o&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===M.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){const{scrollIndex:t,scrollType:o,scrollColumn:i,focusIndex:s,focusColumn:r}=e,{scrollFeature:n}=this.gridBodyCon;j(i)&&!i.isPinned()&&n.ensureColumnVisible(i),j(t)&&n.ensureIndexVisible(t,o),e.isAsync||n.ensureIndexVisible(s);const{focusSvc:a,rangeSvc:l}=this.beans;a.setFocusedCell({rowIndex:s,column:r,rowPinned:null,forceBrowserFocus:!0}),l?.setRangeToCell({rowIndex:s,rowPinned:null,column:r})}onPageDown(e){const t=this.beans,o=jn(t),i=this.getViewportHeight(),{pageBounds:s,rowModel:r,rowAutoHeight:n}=t,a=s.getPixelOffset(),l=o.top+i,d=r.getRowIndexAtPixel(l+a);n?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,o=jn(t),{pageBounds:i,rowModel:s,rowAutoHeight:r}=t,n=i.getPixelOffset(),a=o.top,l=s.getRowIndexAtPixel(a+n);r?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,o=!1){const{pageBounds:i,rowModel:s}=this.beans,r=this.getViewportHeight(),n=i.getFirstRow(),a=i.getLastRow(),l=i.getPixelOffset(),d=s.getRow(e.rowIndex),u=o?d?.rowHeight-r-l:r-l,h=d?.rowTop+u;let p=s.getRowIndexAtPixel(h+l);if(p===e.rowIndex){const f=o?-1:1;t=p=e.rowIndex+f}let g;o?(g="bottom",p<n&&(p=n),t<n&&(t=n)):(g="top",p>a&&(p=a),t>a&&(t=a)),this.isRowTallerThanView(s.getRow(p))&&(t=p,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:p,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,o=!1){this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const i=this.getNextFocusIndexForAutoHeight(e,o);this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const o=t?-1:1,i=this.getViewportHeight(),{pageBounds:s,rowModel:r}=this.beans,n=s.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=n;){const d=r.getRow(l);if(d){const u=d.rowHeight??0;if(a+u>i)break;a+=u}l+=o}return Math.max(0,Math.min(l,n))}getViewportHeight(){const e=this.beans,t=jn(e),o=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=o),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const o=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:i}=o,s=o.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:s,focusIndex:i,focusColumn:s})}onHomeOrEndKey(e){const t=e===M.PAGE_HOME,{visibleCols:o,pageBounds:i,rowModel:s}=this.beans,r=o.allCols,n=t?i.getFirstRow():i.getLastRow(),a=s.getRow(n);if(!a)return;const l=(t?r:[...r].reverse()).find(d=>!d.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:l,focusIndex:n,focusColumn:l})}onTabKeyDown(e,t){const o=t.shiftKey,i=this.tabToNextCellCommon(e,o,t),s=this.beans,{ctrlsSvc:r,pageBounds:n,focusSvc:a,gos:l}=s;if(i!==!1){i?t.preventDefault():i===null&&r.get("gridCtrl").allowFocusForNextCoreContainer(o);return}if(o){const{rowIndex:d,rowPinned:u}=e.getRowPosition();(u?d===0:d===n.getFirstRow())&&(l.get("headerHeight")===0||ti(s)?ai(s,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof fr&&e.focusCell(!0),(!o&&a.focusOverlay(!1)||ai(s,o))&&t.preventDefault()}tabToNextCell(e,t){const o=this.beans,{focusSvc:i,rowRenderer:s}=o,r=i.getFocusedCell();if(!r)return!1;let n=qs(o,r);return!n&&(n=s.getRowByPosition(r),!n||!n.isFullWidth())?!1:!!this.tabToNextCellCommon(n,e,t)}tabToNextCellCommon(e,t,o){let i=e.editing;if(!i&&e instanceof fr){const n=e.rowCtrl;n&&(i=n.editing)}let s;return i?this.gos.get("editType")==="fullRow"?s=this.moveToNextEditingRow(e,t,o):s=this.moveToNextEditingCell(e,t,o):s=this.moveToNextCellNotEditing(e,t,o),s===null?s:s||!!this.beans.focusSvc.focusedHeader}moveToNextEditingCell(e,t,o=null){const i=e.cellPosition;e.eGui.focus(),e.stopEditing();const s=this.findNextCellToFocusOn(i,t,!0);return s===!1?null:s==null?!1:(this.beans.editSvc?.startEditing(s,null,!0,o),s.focusCell(!1),!0)}moveToNextEditingRow(e,t,o=null){const i=e.cellPosition,s=this.findNextCellToFocusOn(i,t,!0);if(s===!1)return null;if(s==null)return!1;const r=s.cellPosition,n=this.isCellEditable(i),a=this.isCellEditable(r),l=r&&i.rowIndex===r.rowIndex&&i.rowPinned===r.rowPinned,{editSvc:d,rowEditSvc:u}=this.beans;if(n&&d?.setFocusOutOnEditor(e),!l){const h=e.rowCtrl;d?.stopRowEditing(h);const p=s.rowCtrl;u?.startEditing(p,void 0,void 0,o)}return a?(d?.setFocusInOnEditor(s),s.focusCell()):s.focusCell(!0),!0}moveToNextCellNotEditing(e,t,o){const i=this.beans.visibleCols.allCols;let s;if(e instanceof Ma){if(s={...e.getRowPosition(),column:t?i[0]:Se(i)},this.gos.get("embedFullWidthRows")&&o){const n=e.findFullWidthInfoForEvent(o);n&&(s.column=n.column)}}else s=e.getFocusedCellPosition();const r=this.findNextCellToFocusOn(s,t,!1);if(r===!1)return null;if(r instanceof fr)r.focusCell(!0);else if(r)return this.tryToFocusFullWidthRow(r,t);return j(r)}findNextCellToFocusOn(e,t,o){let i=e;const s=this.beans,{cellNavigation:r,gos:n,focusSvc:a,rowRenderer:l,rangeSvc:d}=s;for(;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=r.getNextTabbedCell(i,t);const u=n.getCallback("tabToNextCell");if(j(u)){const f=u({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:i||null});if(f===!0)i=e;else{if(f===!1)return!1;i={rowIndex:f.rowIndex,column:f.column,rowPinned:f.rowPinned}}}if(!i)return null;if(i.rowIndex<0){const g=Xt(s);return a.focusHeaderPosition({headerPosition:{headerRowIndex:g+i.rowIndex,column:i.column},fromCell:!0}),null}const h=n.get("editType")==="fullRow";if(o&&!h&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);const p=qs(s,i);if(!p){const g=l.getRowByPosition(i);if(!g||!g.isFullWidth()||o)continue;return{...g.getRowPosition(),column:i?.column}}if(!r.isSuppressNavigable(p.column,p.rowNode))return p.setFocusedCellPosition(i),d?.setRangeToCell(i),p}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:o,rowModel:i}=this.beans;return t==="top"?o?.getPinnedTopRow(e):t==="bottom"?o?.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,o,i){let s=o,r=!1;const n=this.beans,{cellNavigation:a,focusSvc:l,gos:d}=n;for(;s&&(s===o||!this.isValidNavigateCell(s));)d.get("enableRtl")?t===M.LEFT&&(s=this.getLastCellOfColSpan(s)):t===M.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=a.getNextCellToFocus(t,s),r=Ee(s);if(r&&e&&e.key===M.UP&&(s={rowIndex:-1,rowPinned:null,column:o.column}),i){const h=d.getCallback("navigateToNextCell");if(j(h)){const g=h({key:t,previousCellPosition:o,nextCellPosition:s||null,event:e});j(g)?s={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:s=null}}if(!s)return;if(s.rowIndex<0){const h=Xt(n);l.focusHeaderPosition({headerPosition:{headerRowIndex:h+s.rowIndex,column:o.column},event:e||void 0,fromCell:!0});return}const u=this.getNormalisedPosition(s);u?this.focusPosition(u):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const o=qs(this.beans,e);return o?(e=o.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:o,rowRenderer:i,focusSvc:s,eventSvc:r}=this.beans,n=o.allCols,a=i.getRowByPosition(e);if(!a||!a.isFullWidth())return!1;const l=s.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Se(n):n[0])};this.focusPosition(d);const u=t??(l!=null&&zv(d,l));return r.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:u}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:o}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),o?.setRangeToCell(e)}isValidNavigateCell(e){return!!vl(this.beans,e)}getLastCellOfColSpan(e){const t=qs(this.beans,e);if(!t)return e;const o=t.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:Se(o),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=cn(this.gos),o=this.beans.rowModel.getRow(e.rowIndex),i=t&&o?.sticky,{scrollFeature:s}=this.gridBodyCon;!i&&Ee(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}};function jn(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var u0={moduleName:"KeyboardNavigation",version:re,beans:[c0,i0,OS],apiFunctions:{getFocusedCell:s0,clearFocusedCell:r0,setFocusedCell:n0,setFocusedHeader:d0,tabToNextCell:a0,tabToPreviousCell:l0}},h0=class extends A{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:o}=this.beans;t?t.calculatePages():e.calculateBounds(0,o.getRowCount()-1)}},p0=class extends A{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,o=e?.rowTop??0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:o,pageLastPixel:i}}calculateBounds(e,t){const{rowModel:o}=this.beans,i=o.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const s=o.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},g0=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",f0=class extends A{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const o of this.elements)o&&(Z(o,t),Zt(o,e))}},m0=class extends A{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:o}=this.beans,i=tt(e,"print"),s=i?0:t.getColsLeftWidth(),r=i?0:t.getDisplayedColumnsRightWidth();s!=this.leftWidth&&(this.leftWidth=s,o.dispatchEvent({type:"leftPinnedWidthChanged"})),r!=this.rightWidth&&(this.rightWidth=r,o.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=ws(e);if(t<=50)return;const o=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:s,hasLockedPinned:r}=o;let n=s;!n.length&&!r||(i&&(n=i({columns:n,viewportWidth:t})),!(!n||!n.length)&&(n=n.filter(a=>!Ms(a)),this.setColsPinned(n,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new f0(e,t)}setColsPinned(e,t,o){const{colModel:i,colAnimation:s,visibleCols:r,gos:n}=this.beans;if(!i.cols||!e?.length)return;if(tt(n,"print")){H(37);return}s?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];e.forEach(d=>{if(!d)return;const u=i.getCol(d);u&&u.getPinned()!==a&&(this.setColPinned(u,a),l.push(u))}),l.length&&(r.refresh(o),Xu(this.eventSvc,l,o)),s?.finish()}initCol(e){const{pinned:t,initialPinned:o}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,o)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const o=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;const s=()=>{const r=o?this.leftWidth:this.rightWidth;if(r==null)return;const n=r==0,a=e.hidden!==n,l=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),h=t.verticalScrollShowing&&(l&&o||!l&&i)?r+d:r;e.comp.setPinnedContainerWidth(`${h}px`),e.comp.setDisplayed(!n),a&&(e.hidden=n,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:s,rightPinnedWidthChanged:s,scrollVisibilityChanged:s,scrollbarWidthChanged:s})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:i,rightWidth:s}=this,r=ws(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+s+e>r)if(r>i+s)e=r-i-s;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,o=this.leftWidth??0,i=t+o;let s=!1;if(i<e)return{columns:[],hasLockedPinned:s};const{visibleCols:r}=this.beans,n=[...r.leftCols],a=[...r.rightCols];let l=0,d=0;const u=0,h=[];let p=i-u-e;for(;(d<n.length||l<a.length)&&p>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){s=!0;continue}p-=g.getActualWidth(),h.push(g)}if(d<n.length&&p>0){const g=n[d++];if(g.colDef.lockPinned){s=!0;continue}p-=g.getActualWidth(),h.push(g)}}return{columns:h,hasLockedPinned:s}}},v0={moduleName:"PinnedColumn",version:re,beans:[m0],css:[g0]},C0=class extends A{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=st(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=Ge(e),o=this.descriptionContainer=t.createElement("div");o.classList.add("ag-aria-description-container"),eu(o,"polite"),gf(o,"additions text"),pf(o,!0),e.eGridDiv.appendChild(o)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{if(this.isAlive()&&this.descriptionContainer){let t=e;this.lastAnnouncement===t&&(t=`${t}.`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}},50)}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(rt(e),e.parentElement?.removeChild(e)),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},b0={moduleName:"Aria",version:re,beans:[C0]};function w0(e){e.overlays?.showLoadingOverlay()}function y0(e){e.overlays?.showNoRowsOverlay()}function S0(e){e.overlays?.hideOverlay()}var R0=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",x0={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},pp=class extends se{constructor(){super(x0),this.eOverlayWrapper=N,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(R0)}handleKeyDown(e){if(e.key!==M.TAB||e.defaultPrevented||zt(e))return;const t=this.beans;if(so(t,this.eOverlayWrapper,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=t.focusSvc.focusGridView({column:Se(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):i=ai(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const o=this.eOverlayWrapper.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:r}=Nt;o.toggle(i,t.autoHeight),o.toggle(s,t.normal),o.toggle(r,t.print)}postConstruct(){this.createManagedBean(new bl(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,o,i){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),o&&this.isGridFocused()){const s=Ae(this.beans);s&&!Rs(this.beans)&&(this.elToFocusAfter=s)}e.then(s=>{if(this.activePromise!==e){this.activeOverlay!==s&&(this.destroyBean(s),s=null);return}if(this.activePromise=null,!!s){if(this.activeOverlay!==s&&(this.eOverlayWrapper.appendChild(s.getGui()),this.activeOverlay=s,i)){const r=s;this.updateListenerDestroyFunc=this.addManagedPropertyListener(i,({currentValue:n})=>{r.refresh?.(J(this.gos,{...n??{}}))})}o&&this.isGridFocused()&&Et(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const o=this.updateListenerDestroyFunc;o&&(o(),this.updateListenerDestroyFunc=null),this.destroyBean(e),rt(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=Ae(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},F0={selector:"AG-OVERLAY-WRAPPER",component:pp},k0=class extends A{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=$t(this.gos),this.isServerSide=!this.isClientSide&&yt(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){H(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return F0}getOverlayWrapperCompClass(){return pp}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:o,beans:{gos:i,colModel:s,rowModel:r}}=this;let n=this.gos.get("loading");n!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&n===void 0&&!i.get("suppressLoadingOverlay")&&(n=!i.get("columnDefs")||!s.ready||!i.get("rowData")&&t),n?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&r.isEmpty()&&!i.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!o&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(ov(this.beans.userCompFactory,J(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(iv(this.beans.userCompFactory,J(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,o){const i=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(i,t,this.isExclusive(),o),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;this.state===2?t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0:this.wrapperPadding!==0&&(t=0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},D0={moduleName:"Overlay",version:re,userComponents:{agLoadingOverlay:XC,agNoRowsOverlay:JC},apiFunctions:{showLoadingOverlay:w0,showNoRowsOverlay:y0,hideOverlay:S0},beans:[k0]},M0=class extends A{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=xf(),Ss(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Ss(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),o=e/t;return this.maxScrollY*o}},P0=400,E0=class extends A{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(r=>r.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(r=>r.updateRangeBordersIfRangeCount())},o=()=>{this.eventSvc.addEventListener("cellSelectionChanged",e),this.eventSvc.addEventListener("columnMoved",t),this.eventSvc.addEventListener("columnPinned",t),this.eventSvc.addEventListener("columnVisible",t)},i=()=>{this.eventSvc.removeEventListener("cellSelectionChanged",e),this.eventSvc.removeEventListener("columnMoved",t),this.eventSvc.removeEventListener("columnPinned",t),this.eventSvc.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{si(this.gos)?o():i()}),si(this.gos)&&o()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:s})=>{(!s&&i||s&&!i)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:o}=this.beans;if(o&&this.addManagedPropertyListener("showOpenedGroup",()=>{const i=o.getShowRowGroupCols();i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=tt(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new A0(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),o=this.cachedRowCtrls?.getEntries()??[];t.length>0||o.length>0?this.allRowCtrls=[...e,...t,...o]:this.allRowCtrls=e}isCellBeingRendered(e,t){const o=this.rowCtrlsByRowIndex[e];return!t||!o?!!o:o.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!o.getCellCtrl(t)||!o.isRowRendered()}updateCellFocus(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onCellFocusChanged(e){if(e&&e.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;t&&this.getAllCellCtrls().forEach(o=>t.onFlashCells(o,e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.colModel.getCols().forEach(t=>{const o=l=>{this.getAllCellCtrls().forEach(d=>{d.column===t&&l(d)})},i=()=>{o(l=>l.onLeftChanged())},s=()=>{o(l=>l.onWidthChanged())},r=()=>{o(l=>l.onFirstRightPinnedChanged())},n=()=>{o(l=>l.onLastLeftPinnedChanged())},a=()=>{o(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",s),t.__addEventListener("firstRightPinnedChanged",r),t.__addEventListener("lastLeftPinnedChanged",n),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",s),t.__removeEventListener("firstRightPinnedChanged",r),t.__removeEventListener("lastLeftPinnedChanged",n),t.__removeEventListener("colDefChanged",a)})})}onDomLayoutChanged(){const e=tt(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];return this.getAllRowCtrls().forEach(o=>{const i=o.getCellCtrl(e,!0)?.eGui;i&&t.push(i)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}refreshFloatingRows(e,t){const{pinnedRowModel:o,beans:i,printLayout:s}=this,r=Object.fromEntries(e.map(a=>[a.rowNode.id,a]));o?.forEachPinnedRow(t,(a,l)=>{const d=e[l];d&&o.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),a.id in r?(e[l]=r[a.id],delete r[a.id]):e[l]=new Ma(a,i,!1,!1,s)});const n=(t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;e.length=n}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const o=i=>{const s=i[e.rowIndex];s&&s.rowNode===e&&(s.destroyFirstPass(),s.destroySecondPass(),i[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":o(this.topRowCtrls);break;case"bottom":o(this.bottomRowCtrls);break;default:o(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(e!=null){e?.forEach(o=>this.redrawRow(o,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const o=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&xi(this.gos),s=o?this.getRowsToRecycle():null;o||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:r}=this;if(r){r.checkStickyRows();const n=r.extraTopHeight+r.extraBottomHeight;n&&this.updateContainerHeights(n)}this.recycleRows(s,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,o=this.gos.get("suppressScrollOnNewData");t&&!o&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let o=this.pageBounds.getCurrentPageHeight();o===0&&(o=1),t.setModelHeight(o+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Lo(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,o=this.findPositionToFocus(e);if(!o){t.focusHeaderPosition({headerPosition:{headerRowIndex:Xt(this.beans)-1,column:e.column}});return}if(e.rowIndex!==o.rowIndex||e.rowPinned!=o.rowPinned){t.setFocusedCell({...o,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(J(this.gos,{...o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:o}=this.beans;let i=e;for(i.rowPinned==null&&t&&o&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:o.getFirstRow()});i;){if(i.rowPinned==null&&o)if(i.rowIndex<o.getFirstRow()){if(i=$r(this.beans,{rowPinned:null,rowIndex:0}),!i)return null}else i.rowIndex>o.getLastRow()&&(i={rowPinned:null,rowIndex:o.getLastRow()});const s=this.getRowByPosition(i);if(s?.isAlive())return{...s.getRowPosition(),column:e.column};i=$r(this.beans,i)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),o=t.length;for(let i=0;i<o;i++){const s=t[i].getAllCellCtrls(),r=s.length;for(let n=0;n<r;n++)e.push(s[n])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),o=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...o,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,o){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,o)}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(const o of this.getCellCtrls(e.rowNodes,e.columns))o.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const o of this.getRowCtrls(e)){if(!o.isFullWidth())continue;o.refreshFullWidth()||(t=!0,this.redrawRow(o.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=Gd(e),o=this.getAllRowCtrls();return!e||!t?o:o.filter(i=>{const s=i.rowNode;return Nd(s,t)})}getCellCtrls(e,t){let o;j(t)&&(o={},t.forEach(s=>{const r=this.colModel.getCol(s);j(r)&&(o[r.getId()]=!0)}));const i=[];return this.getRowCtrls(e).forEach(s=>{s.getAllCellCtrls().forEach(r=>{const n=r.column.getId();o&&!o[n]||i.push(r)})}),i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const o of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[o].rowNode.id==null&&e.push(o);this.removeRowCtrls(e);const t={};for(const o of Object.values(this.rowCtrlsByRowIndex)){const i=o.rowNode;t[i.id]=o}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(o=>{const i=this.rowCtrlsByRowIndex[o];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[o]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:o}=this.beans,{afterScroll:i}=e;let s;const r=this.stickyRowFeature;r&&(s=t?.getFocusCellToUseAfterRefresh()||void 0);const n=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(r){l=r.checkStickyRows();const u=r.extraTopHeight+r.extraBottomHeight;u&&this.updateContainerHeights(u)}const d=this.firstRenderedRow!==n||this.lastRenderedRow!==a;if(!(i&&!l&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),s!=null)){const u=t?.getFocusCellToUseAfterRefresh();s!=null&&u==null&&(o?.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const o={};e.forEach(r=>o[r]=!0);const s=Object.keys(this.rowCtrlsByRowIndex).filter(r=>!o[r]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){const t=[];for(let n=this.firstRenderedRow;n<=this.lastRenderedRow;n++)t.push(n);const o=this.beans.pagination,i=this.beans.focusSvc?.getFocusedCell()?.rowIndex;i!=null&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&(!o||o.isRowInPage(i))&&t.push(i);const s=n=>{const a=n.rowNode.rowIndex;a==null||a===i||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(n)&&t.push(a)};for(const n of Object.values(this.rowCtrlsByRowIndex))s(n);if(e)for(const n of Object.values(e))s(n);t.sort((n,a)=>n-a);const r=[];for(let n=0;n<t.length;n++){const a=t[n],l=this.rowModel.getRow(a);l&&!l.sticky&&r.push(a)}return r}recycleRows(e,t=!1,o=!1){const i=this.calculateIndexesToDraw(e);if((this.printLayout||o)&&(t=!1),this.removeRowCompsNotToDraw(i,!t),i.forEach(s=>{this.createOrUpdateRowCtrl(s,e,t,o)}),e){const{animationFrameSvc:s}=this.beans;s?.active&&o&&!this.printLayout?s.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),o=e.isPinningRight();(this.pinningLeft!==t||o!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=o,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const o=t.rowNode.rowIndex;e.push(o.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=Gd(e);return this.getAllRowCtrls().filter(o=>{if(!o.isFullWidth())return!1;const i=o.rowNode;return!(t!=null&&!Nd(i,t))})}createOrUpdateRowCtrl(e,t,o,i){let s,r=this.rowCtrlsByRowIndex[e];if(r||(s=this.rowModel.getRow(e),j(s)&&j(t)&&t[s.id]&&s.alreadyRendered&&(r=t[s.id],t[s.id]=null)),!r)if(s||(s=this.rowModel.getRow(e)),j(s))r=this.createRowCon(s,o,i);else return;return s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r,r}destroyRowCtrls(e,t){const o=[];if(e){for(const i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){const s=i.instanceId;this.zombieRowCtrls[s]=i,o.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[s]})}else i.destroySecondPass()}}t&&(o.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>o.forEach(i=>i()),P0))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=Oo(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:o}=this;e.updateOffset();let i,s;if(!o.isRowsToRender())i=0,s=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),s=t.getLastRow();else{const u=this.getRowBufferInPixels(),h=this.ctrlsSvc.getScrollFeature(),p=this.gos.get("suppressRowVirtualisation");let g=!1,f,m;do{const x=t.getPixelOffset(),{pageFirstPixel:P,pageLastPixel:k}=t.getCurrentPagePixelRange(),D=e.divStretchOffset,v=h.getVScrollPosition(),C=v.top,R=v.bottom;p?(f=P+D,m=k+D):(f=Math.max(C+x-u,P)+D,m=Math.min(R+x+u,k)+D),this.firstVisibleVPixel=Math.max(C+x,P)+D,this.lastVisibleVPixel=Math.min(R+x,k)+D,g=this.ensureAllRowsInRangeHaveHeightsCalculated(f,m)}while(g);let b=o.getRowIndexAtPixel(f),w=o.getRowIndexAtPixel(m);const S=t.getFirstRow(),y=t.getLastRow();b<S&&(b=S),w>y&&(w=y),i=b,s=w}const r=tt(this.gos,"normal"),n=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);r&&!n&&s-i>a&&(s=i+a);const l=i!==this.firstRenderedRow,d=s!==this.lastRenderedRow;(l||d)&&(this.firstRenderedRow=i,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,Wt(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const o=this.pinnedRowModel?.ensureRowHeightsValid(),i=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:s,rowModel:r}=this,n=r.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(n||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||n||o?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const i=e.rowNode,s=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),r=e.editing,n=i.detail;return s||r||n?!!this.isRowPresent(i):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,o){const i=this.cachedRowCtrls?.getRow(e)??null;if(i)return i;const s=o&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new Ma(e,this.beans,t,s,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),o=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...o]}getRowByPosition(e){let t;const{rowIndex:o}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[o];break;case"bottom":t=this.bottomRowCtrls[o];break;default:t=this.rowCtrlsByRowIndex[o],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===o)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===o)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},A0=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,o=this.entriesMap[t];delete this.entriesMap[t],at(this.entriesList,o)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],at(this.entriesList,e)}getEntries(){return this.entriesList}};function Gd(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(o=>{const i=o.id;switch(o.rowPinned){case"top":t.top[i]=o;break;case"bottom":t.bottom[i]=o;break;default:t.normal[i]=o;break}}),t}function Nd(e,t){const o=e.id;switch(e.rowPinned){case"top":return t.top[o]!=null;case"bottom":return t.bottom[o]!=null;default:return t.normal[o]!=null}}var T0=class extends A{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=Ht(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=Ht(e))}doFullSort(e,t){const o=e.map((i,s)=>({currentPos:s,rowNode:i}));return o.sort(this.compareRowNodes.bind(this,t)),o.map(i=>i.rowNode)}compareRowNodes(e,t,o){const i=t.rowNode,s=o.rowNode;for(let r=0,n=e.length;r<n;r++){const a=e[r],l=a.sort==="desc",d=this.getValue(i,a.column),u=this.getValue(s,a.column);let h;const p=this.getComparator(a,i);if(p?h=p(d,u,i,s,l):h=hr(d,u,this.isAccentedSort),!isNaN(h)&&h!==0)return a.sort==="asc"?h:h*-1}return t.currentPos-o.currentPos}getComparator(e,t){const o=e.column,i=o.getColDef().comparator;if(i!=null)return i;if(!o.getColDef().showRowGroup)return;const s=!t.group&&o.getColDef().field;if(!s)return;const r=this.beans.colModel.getColDefCol(s);if(r)return r.getColDef().comparator}getValue(e,t){const{valueSvc:o,colModel:i,showRowGroupCols:s,gos:r}=this.beans;if(!this.primaryColumnsSortGroups)return o.getValue(t,e,!1);if(e.rowGroupColumn===t){if(un(r,i.isPivotActive())){const d=e.allLeafChildren?.[0];return d?o.getValue(t,d,!1):void 0}const l=s?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return o.getValue(t,e,!1)}};function I0(e){e.sortSvc?.onSortChanged("api")}var Ki=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),L0={tag:"span",cls:"ag-sort-indicator-container",children:[Ki("Order","order"),Ki("Asc","ascending-icon"),Ki("Desc","descending-icon"),Ki("Mixed","mixed-icon"),Ki("None","none-icon")]},Tl=class extends se{constructor(e){super(),this.eSortOrder=N,this.eSortAsc=N,this.eSortDesc=N,this.eSortMixed=N,this.eSortNone=N,e||this.setTemplate(L0)}attachCustomElements(e,t,o,i,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=s}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const o=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",o),this.addManagedEventListeners({newColumnsLoaded:o,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,o){if(t==null)return;const i=de(e,this.beans,o);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:o,column:i,gos:s,beans:r}=this,n=r.sortSvc.getDisplaySortForColumn(i);if(e&&Z(e,n==="asc",{skipAriaHidden:!0}),t&&Z(t,n==="desc",{skipAriaHidden:!0}),o){const a=!i.getColDef().unSortIcon&&!s.get("unSortIcon"),l=n==null;Z(o,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:o}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;Ht(o)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:o}=this;if(e){const i=t.sortSvc.getDisplaySortForColumn(o)==="mixed";Z(e,i,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:o}}=this;if(!e)return;const i=o.getColumnsWithSortingOrdered(),s=o.getDisplaySortIndexForColumn(t)??-1,r=i.some(a=>o.getDisplaySortIndexForColumn(a)??!1),n=s>=0&&r;Z(e,n,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():rt(e)}},B0={selector:"AG-SORT-INDICATOR",component:Tl},Ts=["asc","desc",null],O0=class extends A{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,o){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,o)}progressSortFromEvent(e,t){const i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,o,i){t!=="asc"&&t!=="desc"&&(t=null);const{gos:s,showRowGroupCols:r}=this.beans,n=Ht(s);let a=[e];if(n&&e.getColDef().showRowGroup){const h=r?.getSourceColumnsForGroupColumn?.(e)?.filter(p=>p.isSortable());h&&(a=[e,...h])}a.forEach(u=>this.setColSort(u,t,i));const l=(o||s.get("alwaysMultiSort"))&&!s.get("suppressMultiSort"),d=[];if(!l){const u=this.clearSortBarTheseColumns(a,i);d.push(...u)}this.updateSortIndex(e),d.push(...a),this.dispatchSortChangedEvents(i,d)}updateSortIndex(e){const{gos:t,colModel:o,showRowGroupCols:i}=this.beans,s=Ht(t),r=i?.getShowRowGroupCol(e.getId()),n=s&&r||e,a=this.getColumnsWithSortingOrdered();o.forAllCols(u=>this.setColSortIndex(u,null));const l=a.filter(u=>s&&u.getColDef().showRowGroup?!1:u!==n);(n.getSort()?[...l,n]:l).forEach((u,h)=>this.setColSortIndex(u,h))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){const o={type:"sortChanged",source:e};t&&(o.columns=t),this.eventSvc.dispatchEvent(o)}clearSortBarTheseColumns(e,t){const o=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSort()&&o.push(i),this.setColSort(i,void 0,t))}),o}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??Ts,o=t.indexOf(e.getSort()),i=o<0,s=o==t.length-1;return i||s?t[0]:t[o+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:o,rowGroupColsSvc:i}=this.beans;let s=[];if(t.forAllCols(d=>{d.getSort()&&s.push(d)}),t.isPivotMode()){const d=Ht(e);s=s.filter(u=>{const h=!!u.getAggFunc(),p=!u.isPrimary(),g=d?o?.getShowRowGroupCol(u.getId()):u.getColDef().showRowGroup;return h||p||g})}const r=i?.columns.filter(d=>!!d.getSort())??[],n={};s.forEach((d,u)=>n[d.getId()]=u),s.sort((d,u)=>{const h=d.getSortIndex(),p=u.getSortIndex();if(h!=null&&p!=null)return h-p;if(h==null&&p==null){const g=n[d.getId()],f=n[u.getId()];return g>f?1:-1}else return p==null?-1:1});const a=Ht(e)&&!!r.length;a&&(s=[...new Set(s.map(d=>o?.getShowRowGroupCol(d.getId())??d))]);const l=new Map;return s.forEach((d,u)=>l.set(d,u)),a&&r.forEach(d=>{const u=o.getShowRowGroupCol(d.getId());l.set(d,l.get(u))}),l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=Ht(this.gos),o=!!e.getColDef().showRowGroup;return t&&o}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,s=i[0].getSort();return i.every(n=>n.getSort()==s)?s:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,o){let i=0;e.addManagedListeners(t,{movingChanged:()=>{i=Date.now()}}),o&&e.addManagedElementListeners(o,{click:r=>{const n=t.isMoving(),l=Date.now()-i<50;n||l||this.progressSortFromEvent(t,r)}});const s=()=>{const r=t.getSort();if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",r==="asc"),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",r==="desc"),e.addOrRemoveCssClass("ag-header-cell-sorted-none",!r),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(d=>t.getSort()==d.getSort());e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:s,columnRowGroupChanged:s})}initCol(e){const{sort:t,initialSort:o,sortIndex:i,initialSortIndex:s}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(o==="asc"||o==="desc")&&(e.sort=o),i!==void 0?i!==null&&(e.sortIndex=i):s!==null&&(e.sortIndex=s)}updateColSort(e,t,o){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,o):this.setColSort(e,void 0,o))}setColSort(e,t,o){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",o)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Tl(e)}getSortIndicatorSelector(){return B0}},Il={moduleName:"Sort",version:re,beans:[O0,T0],apiFunctions:{onSortChanged:I0},userComponents:{agSortIndicator:Tl},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},G0=class extends A{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:o}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),o.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Ss(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,Jo(e.source))}}},gp=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:o,children:i}=e;if(i)for(let s=0;s<i.length;++s)this.depthFirstSearchChangedPath(i[s],t);t(o)}depthFirstSearchEverything(e,t,o){const i=e.childrenAfterGroup;if(i)for(let s=0,r=i.length;s<r;++s){const n=i[s];n.childrenAfterGroup?this.depthFirstSearchEverything(n,t,o):o&&t(n)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,o=!1){this.active&&!o?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,o=0;for(;!this.mapToItems[t.id];){const i={rowNode:t,children:null};this.mapToItems[t.id]=i,o++,t=t.parent}return o}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let o=e;for(;o;)this.nodeIdsToColumns[o.id]||(this.nodeIdsToColumns[o.id]={}),t.forEach(i=>this.nodeIdsToColumns[o.id][i.getId()]=!0),o=o.parent}linkPathItems(e,t){let o=e;for(let i=0;i<t;i++){const s=this.mapToItems[o.id],r=this.mapToItems[o.parent.id];r.children||(r.children=[]),r.children.push(s),o=o.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const o=this.createPathItems(e);this.linkPathItems(e,o),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const o=this.nodeIdsToColumns[e.id];return t.filter(s=>o[s.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const o=this.nodeIdsToColumns[e.id];return t.filter(s=>!o[s.getId()])}},N0="paste",V0=class extends A{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;$t(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:o}=this.beans;if(e.source===N0||t.get("suppressChangeDetection"))return;const i=e.node,s=[i],r=this.clientSideRowModel,n=r?.rootNode;if(n&&!i.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new gp(a,n);l.addParentNode(i.parent,[e.column]),r.doAggregate(l),l.forEachChangedNodeDepthFirst(d=>{s.push(d),d.sibling&&s.push(d.sibling)})}o.refreshCells({rowNodes:s})}},H0=class extends A{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);he(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(o){return he(16,{expression:e,params:t,e:o}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const o=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",o);return t[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},_0={moduleName:"Expression",version:re,beans:[H0]},z0={moduleName:"ChangeDetection",version:re,beans:[V0]},W0=class extends A{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=yt(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addEventListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeEventListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t){const o=e.getColDef().showRowGroup;if(o!=null){if(typeof o=="string"){const l=this.getDisplayedNode(t,e,!0);if(l)return this.getValue(e,l)}const a=this.getValue(e,t);if(a==null){const l=this.getDisplayedNode(t,e);if(l)return this.getValue(e,l)}return a}const i=t.leafGroup&&this.colModel.isPivotMode(),s=t.group&&t.expanded&&!t.footer&&!i,r=this.gos.get("groupSuppressBlankHeader")||!t.sibling,n=s&&!r;return this.getValue(e,t,n)}getValue(e,t,o=!1){if(this.initialised||this.init(),!t)return;const i=e.getColDef(),s=i.field,r=e.getColId(),n=t.data;let a;const l=i.showRowGroup;if(typeof l=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(l)??-1)>t.level)return null;const d=t.groupData&&t.groupData[r]!==void 0,u=!o&&t.aggData&&t.aggData[r]!==void 0,h=this.isSsrm&&o&&!!e.getColDef().aggFunc,p=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(this.isTreeData&&u?a=t.aggData[r]:this.isTreeData&&i.valueGetter?a=this.executeValueGetter(i.valueGetter,n,e,t):this.isTreeData&&s&&n?a=ns(n,s,e.isFieldContainsDots()):d?a=t.groupData[r]:u?a=t.aggData[r]:i.valueGetter?a=this.executeValueGetter(i.valueGetter,n,e,t):p?a=ns(n,t.field,e.isFieldContainsDots()):s&&n&&!h&&(a=ns(n,s,e.isFieldContainsDots())),this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){const g=a.substring(1);a=this.executeValueGetter(g,n,e,t)}return a}parseValue(e,t,o,i){const s=e.getColDef(),r=s.valueParser;if(j(r)){const n=J(this.gos,{node:t,data:t?.data,oldValue:i,newValue:o,colDef:s,column:e});return typeof r=="function"?r(n):this.expressionSvc?.evaluate(r,n)}return o}getDeleteValue(e,t){return j(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t))??null:null}formatValue(e,t,o,i,s=!0){let r=null,n;const a=e.getColDef();if(i?n=i:s&&(n=a.valueFormatter),n){const l=J(this.gos,{value:o,node:t,data:t?t.data:null,colDef:a,column:e});typeof n=="function"?r=n(l):r=this.expressionSvc?this.expressionSvc.evaluate(n,l):null}else if(a.refData)return a.refData[o]||"";return r==null&&Array.isArray(o)&&(r=o.join(", ")),r}getDisplayedNode(e,t,o=!1){const i=this.gos,s=i.get("groupHideOpenParents"),r=i.get("showOpenedGroup")&&!o;if(!s&&!r)return;const n=t.colDef.showRowGroup;if(n===!0)return e.group?void 0:e.parent??void 0;let a=e;for(;a&&a.rowGroupColumn?.getId()!=n;){const l=a===a.parent?.childrenAfterSort?.[0];if(!r&&!l)return;a=a.parent}if(a!==e)return a??void 0}setValue(e,t,o,i){const s=this.colModel.getColDefCol(t);if(!e||!s)return!1;Ee(e.data)&&(e.data={});const{field:r,valueSetter:n}=s.getColDef();if(Ee(r)&&Ee(n))return H(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(s,o))return H(135),!1;const a=J(this.gos,{node:e,data:e.data,oldValue:this.getValue(s,e),newValue:o,colDef:s.getColDef(),column:s});a.newValue=o;let l;if(j(n)?typeof n=="function"?l=n(a):l=this.expressionSvc?.evaluate(n,a):l=this.setValueUsingField(e.data,r,o,s.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const d=this.getValue(s,e);return this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,colDef:a.colDef,data:e.data,node:e,oldValue:a.oldValue,newValue:d,value:d,source:i}),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,o,i){if(!t)return!1;let s=!1;if(!i)s=e[t]===o,s||(e[t]=o);else{const r=t.split(".");let n=e;for(;r.length>0&&n;){const a=r.shift();r.length===0?(s=n[a]===o,s||(n[a]=o)):n=n[a]}}return!s}executeValueGetterWithValueCache(e,t,o,i){const s=o.getColId(),r=this.valueCache.getValue(i,s);if(r!==void 0)return r;const n=this.executeValueGetterWithoutValueCache(e,t,o,i);return this.valueCache.setValue(i,s,n),n}executeValueGetterWithoutValueCache(e,t,o,i){const s=J(this.gos,{data:t,node:i,column:o,colDef:o.getColDef(),getValue:this.getValueCallback.bind(this,i)});let r;return typeof e=="function"?r=e(s):r=this.expressionSvc?.evaluate(e,s),r}getValueCallback(e,t){const o=this.colModel.getColDefCol(t);return o?this.getValue(o,e):null}getKeyForNode(e,t){const o=this.getValue(e,t),i=e.getColDef().keyCreator;let s=o;if(i){const r=J(this.gos,{value:o,colDef:e.getColDef(),column:e,node:t,data:t.data});s=i(r)}return typeof s=="string"||s==null||(s=String(s),s==="[object Object]"&&H(121)),s}},$0={moduleName:"CommunityCore",version:re,beans:[_S,Xb,Ey,Pm,M0,jw,BS,US,km,p0,h0,E0,W0,VS,LS,HS,Ty,G0,Fy,ky],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:Zb,destroy:Jb,isDestroyed:ew,getGridOption:tw,setGridOption:ow,updateGridOptions:jh},dependsOn:[yy,Xh,Aw,Il,XS,Zh,ZS,D0,z0,e0,u0,v0,b0,o0,Py,Sy,_0]},Ll=class Wo{static applyGlobalGridOptions(t){if(!Wo.gridOptions)return{...t};let o={};return Xe(o,Wo.gridOptions,!0,!0),Wo.mergeStrategy==="deep"?Xe(o,t,!0,!0):o={...o,...t},Wo.gridOptions.context&&(o.context=Wo.gridOptions.context),t.context&&(Wo.mergeStrategy==="deep"&&o.context&&Xe(t.context,o.context,!0,!0),o.context=t.context),o}};Ll.gridOptions=void 0;Ll.mergeStrategy="shallow";var U0=Ll;function j0(e,t,o){if(!t)return he(11),{};const i=o;let s;if(!i?.setThemeOnGridDiv){const n=Me({tag:"div"});n.style.height="100%",e.appendChild(n),e=n,s=()=>e.remove()}return new q0().create(e,t,n=>{const a=new Yb(e);n.createBean(a)},void 0,o,s)}var K0=1,q0=class{create(e,t,o,i,s,r){const n=U0.applyGlobalGridOptions(t),a=n.gridId??String(K0++),l=n.rowModelType??"clientSide",d=this.getRegisteredModules(s,a,l),u=this.createBeansList(l,d,a),h=this.createProvidedBeans(e,n,s);if(!u)return;const p={providedBeanInstances:h,beanClasses:u,gridId:a,beanInitComparator:Tb,beanDestroyComparator:Ib,derivedBeans:[Eb],destroyCallback:r},g=new fv(p);return this.registerModuleFeatures(g,d),o(g),g.getBean("syncSvc").start(),i&&i(g),g.getBean("gridApi")}getRegisteredModules(e,t,o){return Es($0,void 0),e?.modules?.forEach(i=>Es(i,t)),uv(t,o)}registerModuleFeatures(e,t){const o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");t.forEach(s=>{o.registerModule(s);const r=s.apiFunctions;r&&Object.keys(r).forEach(a=>{i?.addFunction(a,r[a])})})}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;Ee(i)&&(i=new $h);const s={gridOptions:t,eGridDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:i};return o&&o.providedBeanInstances&&Object.assign(s,o.providedBeanInstances),s}createBeansList(e,t,o){const s={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"}[e];if(!s){Sa(201,{rowModelType:e},`Unknown rowModelType ${e}.`);return}if(!dh(s,o,e)){Sa(200,{reasonOrId:`rowModelType = '${e}'`,moduleName:s,gridScoped:gl(),gridId:o,rowModelType:e},`Missing module ${s}Module for rowModelType ${e}.
|
|
25
|
+
If upgrading from before v33, see ${Xo}/upgrading-to-ag-grid-33/#changes-to-modules/`);return}const r=new Set;return t.forEach(n=>n.beans?.forEach(a=>r.add(a))),Array.from(r)}};function ro(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Y0(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function _i(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Q0=["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","findChanged"],X0=["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","beforeRefreshModel","rowNodeDataChanged"],fp=[...Q0,...X0],Z0=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce"],J0=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions"],eR=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],mp=["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","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],tR=["theme","rowSelection"],oR=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild"],vp=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","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","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],iR=["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","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter"],Ba=[...eR,...J0,...Z0,...mp,...iR,...vp,...oR,...tR],sR=class{wrap(e,t,o,i){const s=this.createWrapper(e,i);return t?.forEach(r=>{this.createMethod(s,r,!0)}),o?.forEach(r=>{this.createMethod(s,r,!1)}),s}createMethod(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))}createMethodProxy(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&H(49,{methodName:t}),null)}}},rR={tag:"div",cls:"ag-tooltip"},nR=class extends Pb{constructor(){super(rR)}init(e){const{value:t}=e;this.getGui().textContent=Mt(t,!0)}};function Cp(e){const{inputValue:t,allSuggestions:o,hideIrrelevant:i,filterByPercentageOfBestMatch:s}=e;let r=o.map((l,d)=>({value:l,relevance:aR(t,l),idx:d}));if(r.sort((l,d)=>d.relevance-l.relevance),i&&(r=r.filter(l=>l.relevance!==0)),r.length>0&&s&&s>0){const d=r[0].relevance*s;r=r.filter(u=>d-u.relevance<0)}const n=[],a=[];for(const l of r)n.push(l.value),a.push(l.idx);return{values:n,indices:a}}function aR(e,t){if(e===t)return 1e3;const o=e.length,i=t.length;if(o===0||i===0)return 0;const s=e.toLocaleLowerCase(),r=t.toLocaleLowerCase(),n=r.indexOf(s);if(n!==-1)return 980-n*2;if([...s].filter(h=>r.includes(h)).length===0)return 0;let l=Array.from({length:i+1},(h,p)=>p);for(let h=0;h<o;h++){const p=[h+1];for(let g=0;g<i;g++){const f=l[g+1]+1,m=p[g]+1;let b=l[g]+(e[h]!==t[g]?1:0);i>10&&g>i/2&&(b+=1),h>0&&g>0&&e[h-1]===t[g-1]&&(b-=4),p.push(Math.min(f,m,b))}l=p}const d=Math.round(l[i]),u=Math.max(1,1e3-d*30);return Math.max(1,u)}function lR(e,t){if(typeof e!="number")return"";const o=t(),i=o("thousandSeparator",","),s=o("decimalSeparator",".");return e.toString().replace(".",s).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var dR=class extends A{getFileName(e){const t=this.getDefaultFileExtension();return(e==null||!e.length)&&(e=this.getDefaultFileName()),e.indexOf(".")===-1?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},cR=class{constructor(e){this.groupColumns=[];const{colModel:t,rowGroupColsSvc:o,colNames:i,valueSvc:s,gos:r,processCellCallback:n,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d}=e;this.colModel=t,this.rowGroupColsSvc=o,this.colNames=i,this.valueSvc=s,this.gos=r,this.processCellCallback=n,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=d}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup)}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,o,i,s){const n=(!this.gos.get("groupHideOpenParents")||s.footer)&&this.shouldRenderGroupSummaryCell(s,e,t)?this.createValueForGroupNode(e,s):this.valueSvc.getValueForDisplay(e,s);return this.processCell({accumulatedRowIndex:o,rowNode:s,column:e,value:n,processCellCallback:this.processCellCallback,type:i})}shouldRenderGroupSummaryCell(e,t,o){if(!(e.group&&!this.gos.get("treeData")))return!1;if(this.groupColumns.indexOf(t)!==-1){if(e.groupData?.[t.getId()]!==void 0||yt(this.gos)&&e.group)return!0;if(e.footer&&e.level===-1){const n=t.getColDef();return n==null||n.showRowGroup===!0||n.showRowGroup===this.rowGroupColsSvc?.columns[0].getId()}}const r=un(this.gos,this.colModel.isPivotMode());return o===0&&r}getHeaderName(e,t){return e?e(J(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(J(this.gos,{column:e,node:t}));const o=this.gos.get("treeData"),i=a=>{if(o)return a.key;const l=a.groupData?.[e.getId()];return!l||!a.rowGroupColumn||a.rowGroupColumn.getColDef().useValueFormatterForExport===!1?l:this.valueSvc.formatValue(a.rowGroupColumn,a,l)??l},s=t.footer,r=[i(t)];if(!ll(this.gos))for(;t.parent;)t=t.parent,r.push(i(t));const n=r.reverse().join(" -> ");return s?`Total ${n}`:n}processCell(e){const{accumulatedRowIndex:t,rowNode:o,column:i,value:s,processCellCallback:r,type:n}=e;return r?{value:r(J(this.gos,{accumulatedRowIndex:t,column:i,node:o,value:s,type:n,parseValue:a=>this.valueSvc.parseValue(i,o,a,this.valueSvc.getValue(i,o)),formatValue:a=>this.valueSvc.formatValue(i,o,a)??a}))??""}:i.getColDef().useValueFormatterForExport!==!1?{value:s??"",valueFormatted:this.valueSvc.formatValue(i,o,s)}:{value:s??""}}};function uR(e,t){const o=document.defaultView||window;if(!o){H(52);return}const i=document.createElement("a"),s=o.URL.createObjectURL(t);i.setAttribute("href",s),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:o})),document.body.removeChild(i),o.setTimeout(()=>{o.URL.revokeObjectURL(s)},0)}var hR={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,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,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,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!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,getDataPath:!0,enableCellSpan:!0},dt="clientSide",ot="serverSide",pi="infinite",pR={onGroupExpandedOrCollapsed:[dt],refreshClientSideRowModel:[dt],isRowDataEmpty:[dt],forEachLeafNode:[dt],forEachNodeAfterFilter:[dt],forEachNodeAfterFilterAndSort:[dt],resetRowHeights:[dt],applyTransaction:[dt],applyTransactionAsync:[dt],flushAsyncTransactions:[dt],getBestCostNodeSelection:[dt],getServerSideSelectionState:[ot],setServerSideSelectionState:[ot],applyServerSideTransaction:[ot],applyServerSideTransactionAsync:[ot],applyServerSideRowData:[ot],retryServerSideLoads:[ot],flushServerSideAsyncTransactions:[ot],refreshServerSide:[ot],getServerSideGroupLevelState:[ot],refreshInfiniteCache:[pi],purgeInfiniteCache:[pi],getInfiniteRowCount:[pi],isLastRowIndexKnown:[pi,ot],expandAll:[dt,ot],collapseAll:[dt,ot],onRowHeightChanged:[dt,ot],setRowCount:[pi,ot],getCacheBlockState:[pi,ot]},gR={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function fR(e,t,o){const i=gR[e];if(i){const{version:r,new:n,old:a,message:l}=i,d=a??e;return(...u)=>{const h=n?`Please use ${n} instead. `:"";return rs(`Since ${r} api.${d} is deprecated. ${h}${l??""}`),t.apply(t,u)}}const s=pR[e];return s?(...r)=>{const n=o.rowModel.getType();if(!s.includes(n)){Ri(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,r)}:t}var bp={AdvancedFilter:1,AllEnterprise:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},Kn=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],mR={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:Kn,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...Kn,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...Kn,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},vR={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function CR(e,t){const o=[];return(Array.isArray(e)?e:[e]).forEach(i=>{const s=mR[i];s?s.forEach(r=>{const n=vR[r];(!n||n===t)&&o.push(r)}):o.push(i)}),o}var ki={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"},bR=e=>{const t=e.map(i=>`import { ${us(i)} } from '${bp[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>i==="IntegratedCharts"||i==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
|
|
26
|
+
${t.join(`
|
|
27
|
+
`)}
|
|
28
|
+
|
|
29
|
+
ModuleRegistry.registerModules([ ${e.map(i=>us(i,!0)).join(", ")} ]);
|
|
30
|
+
|
|
31
|
+
For more info see: ${Xo}/modules/`};function us(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function wR(e,t){const o=t.filter(r=>r==="IntegratedCharts"||r==="Sparklines");let i="";return!globalThis?.agCharts&&o.length>0?i=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
|
|
32
|
+
`:t.some(r=>bp[r])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
|
|
33
|
+
`),i}var Vd=({reasonOrId:e,moduleName:t,gridScoped:o,gridId:i,rowModelType:s,additionalText:r,isUmd:n})=>{const a=CR(t,s),l=typeof e=="string"?e:xR[e];if(n)return wR(l,a);const d=a.filter(p=>p==="IntegratedCharts"||p==="Sparklines"),u=d.length>0?`${d.map(p=>us(p)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(p=>us(p)).join(", "):us(a[0])} is not registered${o?" for gridId: "+i:""}. ${u} Check if you have registered the module:
|
|
34
|
+
`}
|
|
35
|
+
${bR(a)}`+(r?`
|
|
36
|
+
|
|
37
|
+
${r}`:"")},Hd=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
|
|
38
|
+
|
|
39
|
+
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
|
|
40
|
+
import { ModuleRegistry } from 'ag-grid-community';
|
|
41
|
+
import { ${e} } from 'ag-grid-enterprise';
|
|
42
|
+
|
|
43
|
+
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
|
|
44
|
+
`,yR=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,SR={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:o})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",o],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
|
|
45
|
+
"alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
|
|
46
|
+
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
|
47
|
+
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
|
|
48
|
+
${yR(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:o,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${o?"":" the default"} paginationPageSizeSelector=[${i?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",100:({rowModelType:e})=>`selectAll only available when rowModelType='clientSide', ie not ${e}`,101:({propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})=>{const s=[],r=[...Object.keys(o??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(i??[])],n=Cp({inputValue:t,allSuggestions:r,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return s.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
|
|
49
|
+
`),n.length>0&&s.push(` Did you mean: [${n.slice(0,3)}]?
|
|
50
|
+
`),s.push("If using a custom component check it has been registered correctly."),s},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${Xo}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({aggFuncOrString:e})=>`unrecognised aggregation function ${e}`,110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
|
|
51
|
+
Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:o})=>["duplicate group keys for row data, keys should be unique",e,t,...o??[]],187:({rowId:e,firstData:t,secondData:o})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",o],188:()=>"getRowId callback must be provided for Server Side Row Model selection to work correctly.",189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Vd,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${Xo}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
|
|
52
|
+
Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows.
|
|
53
|
+
Your code probably called a grid API method while the grid was in the render stage.
|
|
54
|
+
To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
|
|
55
|
+
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Hd("IntegratedChartsModule"),258:()=>Hd("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:o,gridId:i,rowModelType:s})=>Vd({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:ki[t],gridId:i,gridScoped:o,rowModelType:s}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${Xo}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`};function RR(e,t){const o=SR[e];if(!o)return[`Missing error text for error id ${e}!`];const i=o(t),r=`
|
|
56
|
+
See ${ku(e,t)}`;return Array.isArray(i)?i.concat(r):[i,r]}var xR={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},FR=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."}}),kR=()=>({aggFunc:{module:"SharedAggregation"},autoHeight:{supportedRowModels:["clientSide","serverSide"],module:"RowAutoHeight"},cellClass:{module:"CellStyle"},cellClassRules:{module:"CellStyle"},cellEditor:({cellEditor:e,editable:t})=>{if(!t)return null;if(typeof e=="string"){const o=ki[e];if(o)return{module:o}}return{module:"CustomEditor"}},cellRenderer:({cellRenderer:e})=>{if(typeof e!="string")return null;const t=ki[e];return t?{module:t}:null},cellRendererParams:{validate:e=>(e.rowGroup!=null||e.rowGroupIndex!=null||e.cellRenderer==="agGroupCellRenderer")&&"checkbox"in e.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},cellStyle:{module:"CellStyle"},children:()=>wp(),columnChooserParams:{module:"ColumnMenu"},contextMenuItems:{module:"ContextMenu"},dndSource:{module:"DragAndDrop"},dndSourceOnRowDrag:{module:"DragAndDrop"},editable:({editable:e,cellEditor:t})=>e&&!t?{module:"TextEditor"}:null,enableCellChangeFlash:{module:"HighlightChanges"},enablePivot:{module:"SharedPivot"},enableRowGroup:{module:"SharedRowGrouping"},enableValue:{module:"SharedAggregation"},filter:({filter:e})=>{if(e&&typeof e!="string"&&typeof e!="boolean")return{module:"CustomFilter"};if(typeof e=="string"){const t=ki[e];if(t)return{module:t}}return{module:"ColumnFilter"}},floatingFilter:{module:"ColumnFilter"},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerTooltip:{module:"Tooltip"},headerValueGetter:{validate:e=>{const t=e.headerValueGetter;return typeof t=="function"||typeof t=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return Lo(262);if(e.smallLeft)return Lo(263);if(e.smallRight)return Lo(264)}return null}},mainMenuItems:{module:"ColumnMenu"},menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(o=>t.includes(o))?{module:"ColumnMenu"}:null},pivot:{module:"SharedPivot"},pivotIndex:{module:"SharedPivot"},rowDrag:{module:"RowDrag"},rowGroup:{module:"SharedRowGrouping"},rowGroupIndex:{module:"SharedRowGrouping"},sortingOrder:{validate:e=>{const t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){const o=t.filter(i=>!Ts.includes(i));if(o.length>0)return`sortingOrder must be an array with elements from [${Ts.map(Br).join()}], currently it includes [${o.map(Br).join()}]`}else if(!Array.isArray(t)||t.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${t}`;return null}},tooltipField:{module:"Tooltip"},tooltipValueGetter:{module:"Tooltip"},type:{validate:e=>{const t=e.type;return t instanceof Array?t.some(i=>typeof i!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof t=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(e,{suppressRowTransform:t})=>t?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{module:"CellSpan",dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[!1,void 0]},rowSpan:{required:[!1,void 0]}},validate:(e,{rowSelection:t,cellSelection:o,suppressRowTransform:i,enableCellSpan:s,rowDragEntireRow:r,enableCellTextSelection:n})=>typeof t=="object"&&t?.mode==="singleRow"&&t?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":o?"colDef.spanRows is not supported with cellSelection.":i?"colDef.spanRows is not supported with suppressRowTransform.":s?r?"colDef.spanRows is not supported with rowDragEntireRow.":n?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."}}),DR={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0},MR=()=>Object.keys(DR),wp=()=>({objectName:"colDef",allProperties:MR(),docsUrl:"column-properties/",deprecations:FR(),validations:kR()}),PR=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."}});function Kt(e,t,o,i=Number.MAX_VALUE){return typeof t=="number"||t==null?t==null||t>=o&&t<=i?null:i===Number.MAX_VALUE?`${e}: value should be greater than or equal to ${o}`:`${e}: value should be between ${o} and ${i}`:`${e}: value should be a number`}var ER=()=>{const e={alignedGrids:{module:"AlignedGrids"},allowContextMenuWithControlKey:{module:"ContextMenu"},autoSizePadding:{validate({autoSizePadding:o}){return Kt("autoSizePadding",o,0)}},autoSizeStrategy:{module:"ColumnAutoSize"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:o}){return Kt("cacheBlockSize",o,1)}},cacheOverflowSize:{validate({cacheOverflowSize:o}){return Kt("cacheOverflowSize",o,1)}},cellSelection:{module:"CellSelection"},columnHoverHighlight:{module:"ColumnHover"},datasource:{supportedRowModels:["infinite"],module:"InfiniteRowModel"},doesExternalFilterPass:{module:"ExternalFilter"},domLayout:{validate:o=>{const i=o.domLayout,s=["autoHeight","normal","print"];return i&&!s.includes(i)?`domLayout must be one of [${s.join()}], currently it's ${i}`:null}},editType:{module:"EditCore"},enableAdvancedFilter:{module:"AdvancedFilter"},enableCharts:{module:"IntegratedCharts"},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{module:"CellSelection",dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},findSearchValue:{module:"Find"},rowNumbers:{module:"RowNumbers"},getContextMenuItems:{module:"ContextMenu"},getLocaleText:{module:"Locale"},getMainMenuItems:{module:"ColumnMenu"},getRowClass:{module:"RowStyle"},getRowStyle:{module:"RowStyle"},grandTotalRow:{module:"SharedRowGrouping"},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},icons:{validate:({icons:o})=>{if(o){if(o.smallDown)return Lo(262);if(o.smallLeft)return Lo(263);if(o.smallRight)return Lo(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:o}){return Kt("infiniteInitialRowCount",o,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},initialState:{module:"GridState"},isExternalFilterPresent:{module:"ExternalFilter"},keepDetailRowsCount:{validate({keepDetailRowsCount:o}){return Kt("keepDetailRowsCount",o,1)}},localeText:{module:"Locale"},masterDetail:{module:"SharedMasterDetail"},pagination:{module:"Pagination"},paginationPageSize:{validate({paginationPageSize:o}){return Kt("paginationPageSize",o,1)}},paginationPageSizeSelector:{validate:o=>{const i=o.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array.
|
|
57
|
+
If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pinnedTopRowData:{module:"PinnedRow"},pinnedBottomRowData:{module:"PinnedRow"},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}},module:"SharedPivot"},pivotPanelShow:{module:"RowGroupingPanel"},quickFilterText:{supportedRowModels:["clientSide"],module:"QuickFilter"},rowBuffer:{validate({rowBuffer:o}){return Kt("rowBuffer",o,0)}},rowClass:{validate:o=>typeof o.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null,module:"RowStyle"},rowClassRules:{module:"RowStyle"},rowData:{supportedRowModels:["clientSide"],module:"ClientSideRowModel"},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{treeData:{required:[!1,void 0]},pagination:{required:[!1,void 0]}},module:"RowDrag"},rowGroupPanelShow:{module:"RowGroupingPanel"},rowSelection:{validate({rowSelection:o}){return o&&typeof o=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':o&&typeof o!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":o&&o.mode!=="multiRow"&&o.mode!=="singleRow"?`Selection mode "${o.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null},module:"SharedRowSelection"},rowStyle:{validate:o=>{const i=o.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null},module:"RowStyle"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"ServerSideRowModel"},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:o}){return Kt("serverSideInitialRowCount",o,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sideBar:{module:"SideBar"},sortingOrder:{validate:o=>{const i=o.sortingOrder;if(Array.isArray(i)&&i.length>0){const s=i.filter(r=>!Ts.includes(r));if(s.length>0)return`sortingOrder must be an array with elements from [${Ts.map(Br).join()}], currently it includes [${s.map(Br).join()}]`}else if(!Array.isArray(i)||i.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},statusBar:{module:"StatusBar"},tooltipHideDelay:{validate:o=>o.tooltipHideDelay&&o.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:o=>o.tooltipShowDelay&&o.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],module:"SharedTreeData",validate:o=>{const i=o.rowModelType??"clientSide";switch(i){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:r,getDataPath:n,getRowId:a}=o;if(!s&&!r&&!n)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(s){if(n)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(r)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(r){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(n)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const s=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return o.isServerSideGroup&&o.getServerSideGroupKey?null:s}}return null}},treeDataChildrenField:{module:"SharedTreeData"},treeDataParentIdField:{module:"SharedTreeData"},undoRedoCellEditing:{module:"UndoRedoEdit"},valueCache:{module:"ValueCache"},viewportDatasource:{supportedRowModels:["viewport"],module:"ViewportRowModel"},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:o}){return Kt("viewportRowModelBufferSize",o,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:o}){return Kt("viewportRowModelPageSize",o,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},enableCellSpan:{module:"CellSpan"},autoGroupColumnDef:{validate({autoGroupColumnDef:o,showOpenedGroup:i}){return o?.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":o?.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}}},t={};return vp.forEach(o=>{t[o]={expectedType:"boolean"}}),mp.forEach(o=>{t[o]={expectedType:"number"}}),Xe(t,e),t},AR=()=>({objectName:"gridOptions",allProperties:[...Ba,...fp.map(e=>dl(e))],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:PR(),validations:ER()}),TR={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1},IR={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore"},LR=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),BR={pinSubMenu:"PinnedColumn",pinLeft:"PinnedColumn",pinRight:"PinnedColumn",clearPinned:"PinnedColumn",valueAggSubMenu:"SharedAggregation",autoSizeThis:"ColumnAutoSize",autoSizeAll:"ColumnAutoSize",rowGroup:"SharedRowGrouping",rowUnGroup:"SharedRowGrouping",resetColumns:"CommunityCore",expandAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],contractAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],copy:"Clipboard",copyWithHeaders:"Clipboard",copyWithGroupHeaders:"Clipboard",cut:"Clipboard",paste:"Clipboard",export:["CsvExport","ExcelExport"],csvExport:"CsvExport",excelExport:"ExcelExport",separator:"CommunityCore",pivotChart:"IntegratedCharts",chartRange:"IntegratedCharts",columnFilter:"ColumnFilter",columnChooser:"ColumnMenu",sortAscending:"Sort",sortDescending:"Sort",sortUnSort:"Sort"},OR=class extends A{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,Lf(this)}postConstruct(){this.processGridOptions(this.gridOptions)}warnOnInitialPropertyUpdate(e,t){e==="api"&&hR[t]&&H(22,{key:t})}processGridOptions(e){this.processOptions(e,AR())}validateApiFunction(e,t){return fR(e,t,this.beans)}missingUserComponent(e,t,o,i){const s=ki[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):H(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}checkRowEvents(e){NR.has(e)&&H(10,{eventType:e})}validateIcon(e){if(LR.has(e)&&H(43,{iconName:e}),TR[e])return;const t=IR[e];if(t){he(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:gl(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}H(134,{iconName:e})}validateMenuItem(e){const t=BR[e];t&&this.gos.assertModuleRegistered(t,`menu item '${e}'`)}isProvidedUserComp(e){return!!ki[e]}validateColDef(e,t,o){(o||!this.beans.dataTypeSvc?.isColPendingInference(t))&&this.processOptions(e,wp())}processOptions(e,t){const{validations:o,deprecations:i,allProperties:s,propertyExceptions:r,objectName:n,docsUrl:a}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...r??[],...Object.keys(i)],s,n,a);const l=new Set,d=h=>{const p=o[h];if(p)if(typeof p=="function"){const g=p(e,this.gridOptions,this.beans);if(!g)return;if("objectName"in g){const f=e[h];if(Array.isArray(f)){f.forEach(m=>{this.processOptions(m,g)});return}this.processOptions(e[h],g);return}return g}else return p;else return};Object.keys(e).forEach(h=>{const p=i[h];if(p){const{message:x,version:P}=p;l.add(`As of v${P}, ${String(h)} is deprecated. ${x??""}`)}const g=e[h];if(g==null||g===!1)return;const f=d(h);if(!f)return;const{module:m,dependencies:b,validate:w,supportedRowModels:S,expectedType:y}=f;if(y){const x=typeof g;if(x!==y){l.add(`${String(h)} should be of type '${y}' but received '${x}' (${g}).`);return}}if(S){const x=this.gridOptions.rowModelType??"clientSide";if(!S.includes(x)){l.add(`${String(h)} is not supported with the '${x}' row model. It is only valid with: ${S.join(", ")}.`);return}}if(m){const x=Array.isArray(m)?m:[m];let P=!0;if(x.forEach(k=>{this.gos.assertModuleRegistered(k,String(h))||(P=!1)}),!P)return}if(b){const x=this.checkForRequiredDependencies(h,b,e);if(x){l.add(x);return}}if(w){const x=w(e,this.gridOptions,this.beans);if(x){l.add(x);return}}}),l.size>0&&l.forEach(h=>{rs(h)})}checkForRequiredDependencies(e,t,o){const s=Object.entries(t).filter(([r,n])=>{const a=o[r];return!n.required.includes(a)});return s.length===0?null:s.map(([r,n])=>`'${String(e)}' requires '${r}' to be one of [${n.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${n.reason??""}`).join(`
|
|
58
|
+
`)}checkProperties(e,t,o,i,s){const r=["__ob__","__v_skip","__metadata__"],n=GR(Object.getOwnPropertyNames(e),[...r,...t,...o],o),a=Object.keys(n);for(const l of a){const d=n[l];let u=`invalid ${i} property '${l}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;o.includes("context")&&(u+=`
|
|
59
|
+
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),rs(u)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);rs(`to see all the valid ${i} properties please check: ${l}`)}}getConsoleMessage(e,t){return RR(e,t)}};function GR(e,t,o){const i={},s=e.filter(r=>!t.some(n=>n===r));return s.length>0&&s.forEach(r=>i[r]=Cp({inputValue:r,allSuggestions:o}).values),i}var NR=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),VR={moduleName:"Validation",version:re,beans:[OR]};function yp(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}var HR=class extends A{constructor(){super(...arguments),this.beanName="filterStage",this.refreshProps=new Set(["excludeChildrenWhenTreeDataFiltering"]),this.step="filter"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const o=(i,s)=>{i.hasChildren()&&e&&!s?i.childrenAfterFilter=i.childrenAfterGroup.filter(r=>{const n=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,a=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return n||a}):i.childrenAfterFilter=i.childrenAfterGroup,yp(i)};if(this.doingTreeDataFiltering()){const i=(r,n)=>{if(r.childrenAfterGroup)for(let a=0;a<r.childrenAfterGroup.length;a++){const l=r.childrenAfterGroup[a],d=n||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?i(r.childrenAfterGroup[a],d):o(l,d)}o(r,n)},s=r=>i(r,!1);t.executeFromRootNode(s)}else{const i=s=>o(s,!1);t.forEachChangedNodeDepthFirst(i,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},_R=class extends Fl{constructor(){super(...arguments),this.iconCreated=!1}setComp(e,t,o,i,s){this.comp=e;const r=Hs(this,this.beans.context,s);this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,this.setGui(t,r),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),r.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(r),r.addManagedListeners(this.column,{colDefChanged:()=>this.onColDefChanged(r)}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return J(t.gos,{colDef:o,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,o=!!e.floatingFilter;this.active=t&&o}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=de("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Hi(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();bt(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(Ae(t)===this.eGui)return;const s=so(t,this.eGui,null,e.shiftKey);if(s){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let o=this.column;do if(o=e?t.getColBefore(o):t.getColAfter(o),!o)break;while(!o.getColDef().filter||!o.getColDef().floatingFilter);return o}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case M.UP:case M.DOWN:t||e.preventDefault();case M.LEFT:case M.RIGHT:if(t)return;e.stopPropagation();case M.ENTER:t&&Et(this.eGui)&&e.preventDefault();break;case M.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&Qo(e.relatedTarget,"ag-floating-filter");if(o&&i&&e.target===this.eGui){const s=this.lastFocusEvent,r=!!(s&&s.key===M.TAB);if(s&&r){const n=s.shiftKey;Et(this.eGui,n)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new xl(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!Ke(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{filterManager:t}=this.beans,o=i=>{if(i?.source==="filterDestroyed"&&!this.isAlive())return;const s=this.comp.getFloatingFilterComp();s&&s.then(r=>{if(r){const n=t?.getCurrentFloatingFilterParentModel(this.column),a=i?{...i,columns:i.columns??[],source:i.source==="api"?"api":"columnFilter"}:null;r.onParentModelChanged(n,a)}})};[this.destroySyncListener]=e.addManagedListeners(this.column,{filterChanged:o}),t?.isFilterActive(this.column)&&o(null)}setupWidth(e){const t=()=>{const o=`${this.column.getActualWidth()}px`;this.comp.setWidth(o)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const o=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.active?this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,s=this.comp.getFloatingFilterComp();!s||!i?this.updateCompDetails(e,i,o):s.then(r=>{!r||this.beans.filterManager?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,o):this.updateFloatingFilterParams(i)})}updateCompDetails(e,t,o){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),o&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e){if(!e)return;const t=e.params;this.comp.getFloatingFilterComp()?.then(o=>{o?.refresh&&typeof o.refresh=="function"&&o.refresh(t)})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function zR(e,t){const o=e.colModel.getCol(t);if(!o){he(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:o,positionBy:"auto"})}function WR(e){e.menuSvc?.hidePopupMenu()}var Sp={moduleName:"SharedMenu",version:re,beans:[YC],apiFunctions:{showColumnMenu:zR,hidePopupMenu:WR}},$R=0,UR=200,jR=class extends A{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:s,event:r}=e,n=t.getBoundingClientRect(),a=this.getParentRect();this.setAlignedTo(t,o);let l=!1;const d=()=>{const u=this.keepXYWithinBounds(o,n.top-a.top,0),h=o.clientWidth>0?o.clientWidth:200;l||(o.style.minWidth=`${h}px`,l=!0);const g=a.right-a.left-h;let f;return this.gos.get("enableRtl")?(f=b(),f<0&&(f=m(),this.setAlignedStyles(o,"left")),f>g&&(f=0,this.setAlignedStyles(o,"right"))):(f=m(),f>g&&(f=b(),this.setAlignedStyles(o,"right")),f<0&&(f=0,this.setAlignedStyles(o,"left"))),{x:f,y:u};function m(){return n.right-a.left-2}function b(){return n.left-a.left-h}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,r instanceof MouseEvent?r:void 0,i,s)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,eventSource:r,alignSide:n="left",position:a="over",column:l,rowNode:d,type:u}=e,h=r.getBoundingClientRect(),p=this.getParentRect();this.setAlignedTo(r,t);const g=()=>{let f=h.left-p.left;n==="right"&&(f-=t.offsetWidth-h.width);let m;return a==="over"?(m=h.top-p.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,h,p,e.nudgeY||0)==="under"?m=h.top-p.top+h.height:m=h.top-t.offsetHeight-(i||0)*2-p.top),{x:f,y:m}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(u,t,r,null,l,d)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,r=t.top-o.top,n=e.offsetHeight+i;return s>n?"under":r>n||r>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;!s||(["right","left","over","above","under"].forEach(n=>{s.classList.remove(`ag-has-popup-positioned-${n}`),e.classList.remove(`ag-popup-positioned-${n}`)}),!t)||(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,s,r){const n=this.gos.getCallback("postProcessPopup");n&&n({column:s,rowNode:r,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:r,updatePosition:n}=e,a={width:0,height:0},l=(d=!1)=>{let{x:u,y:h}=n();d&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(u+=i),s&&(h+=s),o&&(u=this.keepXYWithinBounds(t,u,1),h=this.keepXYWithinBounds(t,h,0)),t.style.left=`${u}px`,t.style.top=`${h}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!r){const d=No(this.beans,t,()=>l(!0));setTimeout(()=>d(),UR)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=Ge(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),fu(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",r=i?"top":"left",n=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=Ge(this.beans),d=l.documentElement,u=this.getPopupParent(),h=e.getBoundingClientRect(),p=u.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),f=u===l.body,m=Math.ceil(h[n]);let w=f?(i?gu:Ar)(d)+d[a]:u[s];f&&(w-=Math.abs(g[r]-p[r]));const S=w-m;return Math.min(Math.max(t,0),Math.abs(S))}addPopup(e){const t=Ge(this.beans),{eChild:o,ariaLabel:i,alwaysOnTop:s,positionCallback:r,anchorToElement:n}=e;if(!t)return H(122),{hideFunc:()=>{}};const a=this.getPopupIndex(o);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(o);const l=this.createPopupWrapper(o,i,!!s),d=this.addEventListenersToPopup({...e,wrapperEl:l});return r&&r(),this.addPopupToPopupList(o,l,d,n),{hideFunc:d}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();j(e.style.top)||(e.style.top=`${o.top*-1}px`),j(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o){const i=this.getPopupParent(),{environment:s,gos:r}=this.beans,n=Me({tag:"div"});return s.applyThemeClasses(n),n.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||et(e,"dialog"),bt(e,t),n.appendChild(e),i.appendChild(n),o?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),n}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}addEventListenersToPopup(e){const t=this.beans,o=Ge(t),i=this.getPopupParent(),{wrapperEl:s,eChild:r,closedCallback:n,afterGuiAttached:a,closeOnEsc:l,modal:d}=e;let u=!1;const h=m=>{if(!s.contains(Ae(t)))return;m.key===M.ESCAPE&&!zt(m)&&f({keyboardEvent:m})},p=m=>f({mouseEvent:m}),g=m=>f({touchEvent:m}),f=(m={})=>{const{mouseEvent:b,touchEvent:w,keyboardEvent:S,forceHide:y}=m;!y&&(this.isEventFromCurrentPopup({mouseEvent:b,touchEvent:w},r)||u)||(u=!0,i.removeChild(s),o.removeEventListener("keydown",h),o.removeEventListener("mousedown",p),o.removeEventListener("touchstart",g),o.removeEventListener("contextmenu",p),this.eventSvc.removeEventListener("dragStarted",p),n&&n(b||w||S),this.removePopupFromPopupList(r))};return a&&a({hidePopup:f}),window.setTimeout(()=>{l&&o.addEventListener("keydown",h),d&&(o.addEventListener("mousedown",p),this.eventSvc.addEventListener("dragStarted",p),o.addEventListener("touchstart",g),o.addEventListener("contextmenu",p))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:$R++,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(r=>r&&r()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=s,i.isAnchored=!0,s}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,r=i.getBoundingClientRect(),n=h=>parseInt(h.substring(0,h.length-1),10),a=(h,p)=>{const g=o[h]-r[h],f=n(s.style[h]);return{initialDiff:g,lastDiff:g,initial:f,last:f,direction:p}},l=a("top",0),d=a("left",1),u=this.beans.frameworkOverrides;return new Ce(h=>{u.wrapIncoming(()=>{u.setInterval(()=>{const p=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const m=(b,w)=>{const S=n(s.style[w]);b.last!==S&&(b.initial=S,b.last=S);const y=p[w]-g[w];if(y!=b.lastDiff){const x=this.keepXYWithinBounds(s,b.initial+b.initialDiff-y,b.direction);s.style[w]=`${x}px`,b.last=x}b.lastDiff=y};m(l,"top"),m(d,"left")},200).then(p=>{h(()=>{p!=null&&window.clearInterval(p)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const r=this.getPopupIndex(t);if(r===-1)return!1;for(let n=r;n<this.popupList.length;n++){const a=this.popupList[n];if(Fa(a.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=Ge(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const r=[],n=[];for(const p of o)p!==s&&(p.classList.contains("ag-always-on-top")?n.push(p):r.push(p));const a=[],l=n.length,h=s.classList.contains("ag-always-on-top")||!l?[...r,...n,s]:[...r,s,...n];for(let p=0;p<=i;p++){const g=h[p];if(o[p]===h[p]||g===s)continue;g.querySelectorAll("div").forEach(m=>{m.scrollTop!==0&&a.push([m,m.scrollTop])}),p===0?t.insertAdjacentElement("afterbegin",g):h[p-1].insertAdjacentElement("afterend",g)}for(;a.length;){const p=a.pop();p[0].scrollTop=p[1]}}},bn={moduleName:"Popup",version:re,beans:[jR]},KR=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input [disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function qR(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function YR(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function QR(e,t){const o=e.colModel.getColDefCol(t);if(o)return e.filterManager?.destroyFilter(o,"api")}function XR(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function ZR(e){return e.filterManager?.getFilterModel()??{}}function JR(e,t){return e.filterManager?.getColumnFilterModel(t)??null}function ex(e,t,o){return e.filterManager?.setColumnFilterModel(t,o)??Promise.resolve()}function tx(e,t){const o=e.colModel.getCol(t);if(!o){he(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:o,containerType:"columnFilter",positionBy:"auto"})}var _d={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},zd=["january","february","march","april","may","june","july","august","september","october","november","december"];function ox(e,t){return e==null?-1:t==null?1:parseFloat(e)-parseFloat(t)}var ix=class extends A{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),beforeRefreshModel:({params:e})=>{(e.rowDataUpdated||e.changedProps?.has("treeData"))&&this.onNewRowsLoaded("rowDataUpdated")},dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel={...this.gos.get("initialState")?.filter?.filterModel??{}}}setFilterModel(e,t="api"){const{colModel:o,dataTypeSvc:i,filterManager:s}=this.beans;if(i?.isPendingInference){this.filterModelUpdateQueue.push({model:e,source:t});return}const r=[],n=this.getFilterModel(!0);if(e){const a=new Set(Object.keys(e));this.allColumnFilters.forEach((l,d)=>{const u=e[d];r.push(or(l.filterPromise,u)),a.delete(d)}),a.forEach(l=>{const d=o.getColDefCol(l)||o.getCol(l);if(!d){H(62,{colId:l});return}if(!d.isFilterAllowed()){H(63,{colId:l});return}const u=this.getOrCreateFilterWrapper(d);if(!u){H(64,{colId:l});return}r.push(or(u.filterPromise,e[l]))})}else this.allColumnFilters.forEach(a=>{r.push(or(a.filterPromise,null))});Ce.all(r).then(()=>{const a=this.getFilterModel(!0),l=[];this.allColumnFilters.forEach((d,u)=>{const h=n?n[u]:null,p=a?a[u]:null;ys(h,p)||l.push(d.column)}),l.length>0&&s?.onFilterChanged({columns:l,source:t})})}getFilterModel(e){const t={},{allColumnFilters:o,initialFilterModel:i,beans:{colModel:s}}=this;if(o.forEach((r,n)=>{const a=this.getModelFromFilterWrapper(r);j(a)&&(t[n]=a)}),!e)for(const r of Object.keys(i)){const n=i[r];j(n)&&!o.has(r)&&s.getCol(r)?.isFilterAllowed()&&(t[r]=n)}return t}getModelFromFilterWrapper(e){const{filter:t}=e;return t?typeof t.getModel!="function"?(H(66),null):t.getModel():this.getModelFromInitialState(e.column)}getModelFromInitialState(e){return this.initialFilterModel[e.getColId()]??null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){this.initialFilterModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){const e=a=>a?a.isFilterActive?a.isFilterActive():(H(67),!1):!1,{colModel:t,gos:o}=this.beans,i=!!xs(o),s=a=>{if(!a.isPrimary())return!0;const d=!t.isPivotActive();return!a.isValueActive()||!d?!1:t.isPivotMode()?!0:i},r=[],n=[];return this.forEachColumnFilter((a,l)=>{e(a)&&(s(l.column)?r.push(a):n.push(a))}).then(()=>{this.activeAggregateFilters=r,this.activeColumnFilters=n})}updateFilterFlagInColumns(e,t){return this.forEachColumnFilter((o,i)=>this.setColFilterActive(i.column,o.isFilterActive(),e,t))}forEachColumnFilter(e){const t=[];return this.allColumnFilters.forEach(o=>{const i=o.filterPromise;i&&t.push(i.then(s=>e(s,o)))}),Ce.all(t)}doColumnFiltersPass(e,t,o){const{data:i,aggData:s}=e,r=o?this.activeAggregateFilters:this.activeColumnFilters,n=o?s:i;for(let a=0;a<r.length;a++){const l=r[a];if(!(l==null||l===t)){if(typeof l.doesFilterPass!="function"){he(91);continue}if(!l.doesFilterPass({node:e,data:n}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:o}=this.beans,i=()=>{this.isAlive()&&o?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{filterInstance:t,additionalEventAttributes:o}=e;return this.updateDependentFilters(),this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",o).then(()=>{this.allColumnFilters.forEach(i=>{i.filterPromise&&i.filterPromise.then(s=>{s&&s!==t&&s.onAnyFilterChanged&&s.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){this.forEachColumnFilter(t=>{t.onNewRowsLoaded?.()}).then(()=>this.updateFilterFlagInColumns(e,{afterDataChange:!0})).then(()=>this.updateActiveFilters())}createGetValue(e){const{filterValueSvc:t,colModel:o}=this.beans;return(i,s)=>{const r=s?o.getCol(s):e;return r?t.getValue(r,i):void 0}}isFilterActive(e){const{filter:t}=this.cachedFilter(e)??{};return t?t.isFilterActive():this.getModelFromInitialState(e)!=null}getOrCreateFilterWrapper(e){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;const{gos:o,dataTypeSvc:i}=this.beans;if(Tn(o))t="agSetColumnFilter";else{const s=i?.getBaseDataType(e);s==="number"?t="agNumberColumnFilter":s==="date"||s==="dateString"?t="agDateColumnFilter":t="agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;const{gos:o,dataTypeSvc:i}=this.beans;if(Tn(o))t="agSetColumnFloatingFilter";else{const s=i?.getBaseDataType(e);s==="number"?t="agNumberColumnFloatingFilter":s==="date"||s==="dateString"?t="agDateColumnFloatingFilter":t="agTextColumnFloatingFilter"}return t}createFilterInstance(e,t){const o=this.getDefaultFilter(e),i=e.getColDef();let s;const r={...this.createFilterParams(e,i),filterModifiedCallback:()=>this.filterModifiedCallbackFactory(s,e)(),filterChangedCallback:a=>this.filterChangedCallbackFactory(s,e)(a),doesRowPassOtherFilter:a=>this.beans.filterManager?.doesRowPassOtherFilters(s,a)??!0},n=rh(this.beans.userCompFactory,i,r,o);return n?{filterPromise:()=>{const a=n.newAgStackInstance();return a.then(l=>{s=l,t&&(t.filter=l??void 0)}),a},compDetails:n}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return J(this.gos,{column:e,colDef:t,rowModel:this.beans.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e){const t={column:e,filterPromise:null,compDetails:null},{filterPromise:o,compDetails:i}=this.createFilterInstance(e,t);return t.filterPromise=o?.()??null,t.compDetails=i,t}onColumnsChanged(){const e=[],{colModel:t,filterManager:o}=this.beans;this.allColumnFilters.forEach((s,r)=>{let n;s.column.isPrimary()?n=t.getColDefCol(r):n=t.getCol(r),!(n&&n===s.column)&&(e.push(s.column),this.disposeFilterWrapper(s,"columnChanged"),this.disposeColumnListener(r))});const i=e.every(Wd);e.length>0&&!i?o?.onFilterChanged({columns:e,source:"api"}):this.updateDependentFilters()}updateDependentFilters(){this.beans.autoColSvc?.getColumns()?.forEach(e=>{Wd(e)&&this.getOrCreateFilterWrapper(e)})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const{filter:o}=this.allColumnFilters.get(e.getColId())??{};return o&&typeof o?.isFilterAllowed=="function"?o.isFilterAllowed():!0}getFloatingFilterCompDetails(e,t){const o=u=>{const h=this.getOrCreateFilterWrapper(e)?.filterPromise;h?.then(p=>{u(ud(p))})},i=e.getColDef(),s={...this.createFilterParams(e,i),filterChangedCallback:()=>o(u=>this.filterChangedCallbackFactory(u,e)())},{userCompFactory:r,frameworkOverrides:n}=this.beans,a=nv(r,i,s);let l=Ph(n,i,()=>this.getDefaultFloatingFilter(e));l==null&&(l="agReadOnlyFloatingFilter");const d=J(this.gos,{column:e,filterParams:a,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:o,showParentFilter:t});return nh(r,i,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilter(e,t="api"){const o=e.getColId(),i=this.allColumnFilters.get(o);this.disposeColumnListener(o),delete this.initialFilterModel[o],i&&this.disposeFilterWrapper(i,t).then(s=>{s&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){return e.filterPromise?.then(o=>{const i=!!o?.isFilterActive();return this.destroyBean(o),this.setColFilterActive(e.column,!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:e.column}),i})??Ce.resolve(!1)}filterModifiedCallbackFactory(e,t){return()=>{this.eventSvc.dispatchEvent({type:"filterModified",column:t,filterInstance:e})}}filterChangedCallbackFactory(e,t){return o=>{const i=o?.source??"columnFilter",s={filter:e,additionalEventAttributes:o,columns:[t],source:i};this.callOnFilterChangedOutsideRenderCycle(s)}}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const o=t.column,{compDetails:i}=o.isFilterAllowed()?this.createFilterInstance(o):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,i)){this.destroyFilter(o,"paramsUpdated");return}const s=o.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(o,"paramsUpdated");return}t.filterPromise.then(r=>{(r?.refresh?r.refresh({...this.createFilterParams(o,o.getColDef()),filterModifiedCallback:this.filterModifiedCallbackFactory(r,o),filterChangedCallback:this.filterChangedCallbackFactory(r,o),doesRowPassOtherFilter:a=>this.beans.filterManager?.doesRowPassOtherFilters(r,a)??!0,...s}):!0)===!1&&this.destroyFilter(o,"paramsUpdated")})}setColumnFilterWrapper(e,t){const o=e.getColId();this.allColumnFilters.set(o,t),this.allColumnListeners.set(o,this.addManagedListeners(e,{colDefChanged:()=>this.checkDestroyFilter(o)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:o}=e,{componentClass:i}=t;return!(o===i||o?.render&&i?.render&&o.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstanceImpl(e).then(o=>{t(ud(o))})})}getFilterInstanceImpl(e){const t=this.beans.colModel.getColDefCol(e);return t?this.getOrCreateFilterWrapper(t)?.filterPromise??Ce.resolve(null):Ce.resolve(void 0)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:o})=>{this.setColumnFilterModel(e,t).then(()=>o())}),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){const{colModel:o,dataTypeSvc:i}=this.beans;if(i?.isPendingInference){let a=()=>{};const l=new Promise(d=>{a=d});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:a}),l}const s=o.getColDefCol(e),r=s?this.getOrCreateFilterWrapper(s):null;return r?(a=>new Promise(l=>{a.then(d=>l(d))}))(or(r.filterPromise,t)):Promise.resolve()}getFilterWrapper(e){const t=this.beans.colModel.getColDefCol(e);return t?this.cachedFilter(t)??null:null}setColDefPropertiesForDataType(e,t,o){const i=Tn(this.gos),s=this.getLocaleTextFunc(),r=n=>{const{filterParams:a}=e;e.filterParams=typeof a=="object"?{...a,...n}:n};switch(t.baseDataType){case"number":{i&&r({comparator:ox});break}case"boolean":{r(i?{valueFormatter:n=>j(n.value)?s(String(n.value),n.value?"True":"False"):s("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(n,a)=>a,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(n,a)=>a===!1,numberOfInputs:0}]});break}case"date":{r(i?{valueFormatter:n=>{const a=o(n);return j(a)?a:s("blanks","(Blanks)")},treeList:!0,treeListFormatter:(n,a)=>{if(n==="NaN")return s("invalidDate","Invalid Date");if(a===1&&n!=null){const l=zd[Number(n)-1];return s(l,_d[l])}return n??s("blanks","(Blanks)")}}:{isValidDate:$d});break}case"dateString":{const n=t.dateParser;r(i?{valueFormatter:a=>{const l=o(a);return j(l)?l:s("blanks","(Blanks)")},treeList:!0,treeListPathGetter:a=>{const l=n(a??void 0);return l?[String(l.getFullYear()),String(l.getMonth()+1),String(l.getDate())]:null},treeListFormatter:(a,l)=>{if(l===1&&a!=null){const d=zd[Number(a)-1];return s(d,_d[d])}return a??s("blanks","(Blanks)")}}:{comparator:(a,l)=>{const d=n(l);return l==null||d<a?-1:d>a?1:0},isValidDate:a=>typeof a=="string"&&$d(n(a))});break}case"object":{i?r({valueFormatter:n=>{const a=o(n);return j(a)?a:s("blanks","(Blanks)")}}):e.filterValueGetter=n=>o({column:n.column,node:n.node,value:this.beans.valueSvc.getValue(n.column,n.node)});break}}}setColFilterActive(e,t,o,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",o)),e.dispatchColEvent("filterChanged",o,i)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};function or(e,t){return e?new Ce(o=>{e.then(i=>{typeof i.setModel!="function"&&(H(65),o()),(i.setModel(t)||Ce.resolve()).then(()=>o())})}):Ce.resolve()}function Wd(e){return e.getColDef().filter==="agGroupColumnFilter"}function $d(e){return e instanceof Date&&!isNaN(e.getTime())}function sx(e){return!!e.filterManager?.isAnyFilterPresent()}function rx(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var nx=class extends A{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:o}=this;this.alwaysPassFilter=o.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=o.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){this.warnAdvFilters();return}this.colFilter?.setFilterModel(e,t)}getFilterModel(){return this.colFilter?.getFilterModel()??{}}isColumnFilterPresent(){return!!this.colFilter?.isColumnFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggregateFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){xs(this.gos)&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:o,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Ce.resolve()).then(()=>{const s={source:t,type:"filterChanged",columns:i};o&&Xe(s,o),this.eventSvc.dispatchEvent(s),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!xs(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doAggregateFiltersPass(t,e.filterInstanceToSkip))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doColumnFiltersPass(t,e.filterInstanceToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterActive(e){return!!this.colFilter?.isFilterActive(e)}getOrCreateFilterWrapper(e){return this.colFilter?.getOrCreateFilterWrapper(e)??null}getDefaultFloatingFilter(e){return this.colFilter.getDefaultFloatingFilter(e)}createFilterParams(e,t){return this.colFilter.createFilterParams(e,t)}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){return this.colFilter?.getFloatingFilterCompDetails(e,t)}getCurrentFloatingFilterParentModel(e){return this.colFilter?.getCurrentFloatingFilterParentModel(e)}destroyFilter(e,t="api"){this.colFilter?.destroyFilter(e,t)}areFilterCompsDifferent(e,t){return!!this.colFilter?.areFilterCompsDifferent(e,t)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getColumnFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){H(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advFilterModelUpdateQueue.forEach(e=>this.setAdvFilterModel(e)),this.advFilterModelUpdateQueue=[]}getColumnFilterModel(e){return this.colFilter?.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setColumnFilterModel(e,t)??Promise.resolve()}setColDefPropertiesForDataType(e,t,o){this.colFilter?.setColDefPropertiesForDataType(e,t,o)}},ax=class extends A{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,o,i){this.showPopup(e,s=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:o,mouseEvent:t,ePopup:s})},o,t.target,Ke(this.gos),i)}showMenuAfterButtonClick(e,t,o,i){let s=-1,r="left";const n=Ke(this.gos);!n&&this.gos.get("enableRtl")&&(s=1,r="right");const a=n?void 0:4*s,l=n?void 0:4;this.showPopup(e,d=>{this.popupSvc?.positionPopupByComponent({type:o,eventSource:t,ePopup:d,nudgeX:a,nudgeY:l,alignSide:r,keepWithinBounds:!0,position:"under",column:e})},o,t,n,i)}showPopup(e,t,o,i,s,r){const n=e?this.createBean(new xh(e,"COLUMN_MENU")):void 0;if(this.activeMenu=n,!n?.hasFilter()||!e){he(57);return}const a=Me({tag:"div",cls:`ag-menu${s?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:m=>this.trapFocusWithin(m,a)}),a.appendChild(n?.getGui());let l;const d=()=>n?.afterGuiDetached(),u=Lu(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,h=m=>{qr(e,!1,"contextMenu");const b=m instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),b&&i&&wt(i)&&fl(i)?.focus({preventScroll:!0}),d(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,o,e),r?.()},p=this.getLocaleTextFunc(),g=s&&o!=="columnFilter"?p("ariaLabelColumnMenu","Column Menu"):p("ariaLabelColumnFilter","Column Filter"),f=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:h,positionCallback:()=>t(a),anchorToElement:u,ariaLabel:g});f&&(this.hidePopup=l=f.hideFunc),n.afterInit().then(()=>{t(a),n.afterGuiAttached({container:o,hidePopup:l})}),qr(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,o,e)}trapFocusWithin(e,t){e.key!==M.TAB||e.defaultPrevented||so(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Et(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,o){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:o??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},lx=class extends A{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t){if(!t)return;const o=e.getColDef(),{filterValueGetter:i}=o;return i?this.executeFilterValueGetter(i,t.data,e,t,o):this.beans.valueSvc.getValue(e,t)}executeFilterValueGetter(e,t,o,i,s){const{expressionSvc:r,valueSvc:n}=this.beans,a=J(this.gos,{data:t,node:i,column:o,colDef:s,getValue:n.getValueCallback.bind(n,i)});return typeof e=="function"?e(a):r?.evaluate(e,a)}},Rp=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}mapCustomOptions(){const{filterOptions:e}=this;e&&e.forEach(t=>{if(typeof t=="string")return;const o=[["displayKey"],["displayName"],["predicate","test"]],i=s=>s.some(r=>t[r]!=null)?!0:(H(72,{keys:s}),!1);if(!o.every(i)){this.filterOptions=e.filter(s=>s===t)||[];return}this.customFilterOptions[t.displayKey]=t})}selectDefaultItem(e){const{filterOptions:t}=this;if(e.defaultOption)this.defaultOption=e.defaultOption;else if(t.length>=1){const o=t[0];typeof o=="string"?this.defaultOption=o:o.displayKey?this.defaultOption=o.displayKey:H(73)}else H(74)}getCustomOption(e){return this.customFilterOptions[e]}};function Ud(e,t,o){return o==null?e.splice(t):e.splice(t,o)}function jd(e){return e==null||typeof e=="string"&&e.trim().length===0}function dx(e){return e==="AND"||e==="OR"?e:"AND"}function cx(e,t,o){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(s=>s==null))return i(t,o)}function ux(e,t){let o=e.length;return o>t&&(e.splice(t),H(78),o=t),o}var hx=class extends fn{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(e){const t=this.optionsFactory.getCustomOption(e);if(t){const{numberOfInputs:i}=t;return i??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,o)=>{const i=o===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOperatorsOr:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;const o=!e.operator,i=!t.operator;if(!o&&i||o&&!i)return!1;let r;if(o){const n=e,a=t;r=this.areSimpleModelsEqual(n,a)}else{const n=e,a=t;r=n.operator===a.operator&&Pt(n.conditions,a.conditions,(l,d)=>this.areSimpleModelsEqual(l,d))}return r}shouldRefresh(e){const t=this.getModel(),o=t?t.conditions??[t]:null,i=e.filterOptions?.map(r=>typeof r=="string"?r:r.displayKey)??this.getDefaultFilterOptions();return!(!(!o||o.every(r=>i.find(n=>n===r.type)!==void 0))||typeof e.maxNumConditions=="number"&&o&&o.length>e.maxNumConditions)}refresh(e){return!this.shouldRefresh(e)||!super.refresh(e)?!1:(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(e){if(e.operator){const o=e;let i=o.conditions;i==null&&(i=[],H(77));const s=ux(i,this.maxNumConditions),r=this.getNumConditions();if(s<r)this.removeConditionsAndOperators(s);else if(s>r)for(let a=r;a<s;a++)this.createJoinOperatorPanel(),this.createOption();const n=o.operator==="OR";this.eJoinOperatorsAnd.forEach(a=>a.setValue(!n,!0)),this.eJoinOperatorsOr.forEach(a=>a.setValue(n,!0)),i.forEach((a,l)=>{this.eTypes[l].setValue(a.type,!0),this.setConditionIntoUi(a,l)})}else{const o=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),Ce.resolve()}doesFilterPass(e){const t=this.getModel();if(t==null)return!0;const{operator:o}=t,i=[];if(o){const r=t;i.push(...r.conditions??[])}else i.push(t);return i[o&&o==="OR"?"some":"every"](r=>this.individualConditionPasses(e,r))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=dx(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new Rp,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(H(79),t=1),this.maxNumConditions=t;let o=e.numAlwaysVisibleConditions??1;o<1&&(H(80),o=1),o>t&&(H(81),o=t),this.numAlwaysVisibleConditions=o}createOption(){const e=this.createManagedBean(new zh);this.eTypes.push(e),e.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());const t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);const o=this.getNumConditions()-1;this.forEachPositionInput(o,i=>this.resetInput(i)),this.addChangedListeners(e,o)}createJoinOperatorPanel(){const e=Me({tag:"div",cls:"ag-filter-condition"});this.eJoinOperatorPanels.push(e);const t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),o=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);const i=this.eJoinOperatorPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,s),this.resetJoinOperatorOr(o,i,s),this.isReadOnly()||(t.onValueChange(this.listener),o.onValueChange(this.listener))}createJoinOperator(e,t,o){const i=this.createManagedBean(new mb);e.push(i);const s="ag-filter-condition-operator";return i.addCssClass(s),i.addCssClass(`${s}-${o}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;t.forEach(o=>{e.addOption(o)}),e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,o=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:o?this.getLocaleTextFunc()(o.displayKey,o.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let o=0;o<this.getNumConditions();o++)this.isConditionUiComplete(o)?e=o:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const o=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<o){this.removeConditionsAndOperators(o+1);const i=e+1,s=o-i;s>0&&this.removeConditionsAndOperators(i,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,s)=>{const r=this.isConditionDisabled(s,e);i.setDisabled(r||this.filterListOptions.length<=1),s===1&&(bs(this.eJoinOperatorPanels[0],r),this.eJoinOperatorsAnd[0].setDisabled(r),this.eJoinOperatorsOr[0].setDisabled(r))}),this.eConditionBodies.forEach((i,s)=>{Z(i,this.isConditionBodyVisible(s))});const o=(t??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(i=>{i.setValue(!o,!0)}),this.eJoinOperatorsOr.forEach(i=>{i.setValue(o,!0)}),this.forEachInput((i,s,r,n)=>{this.setElementDisplayed(i,s<n),this.setElementDisabled(i,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:o,eConditionBodies:i,eJoinOperatorPanels:s,eJoinOperatorsAnd:r,eJoinOperatorsOr:n}=this;this.removeComponents(o,e,t),this.removeElements(i,e,t),this.removeValueElements(e,t);const a=Math.max(e-1,0);this.removeElements(s,a,t),this.removeComponents(r,a,t),this.removeComponents(n,a,t)}removeElements(e,t,o){Ud(e,t,o).forEach(s=>Dt(s))}removeComponents(e,t,o){Ud(e,t,o).forEach(s=>{Dt(s.getGui()),this.destroyBean(s)})}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){const{eFilterBody:t,eTypes:o}=this;let i;if(!this.isReadOnly()){const s=this.getInputs(0)[0];s instanceof bi&&this.isConditionBodyVisible(0)?i=s.getInputElement():i=o[0]?.getFocusableElement()}(i??t).focus({preventScroll:!0})}}afterGuiDetached(){super.afterGuiDetached();const e=this.getModel();this.resetUiToActiveModel(e);let t=-1,o=-1,i=!1;const s=this.getJoinOperator();for(let n=this.getNumConditions()-1;n>=0;n--)if(this.isConditionUiComplete(n))t===-1&&(t=n,o=n);else{const a=n>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(n-1),l=n<t;(a||l)&&(this.removeConditionsAndOperators(n,1),i=!0,l&&o--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(o===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(o,s),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=o}getPlaceholderText(e,t){let o=this.translate(e);if(typeof this.filterPlaceholder=="function"){const i=this.eTypes[t].getValue(),s=this.translate(i);o=this.filterPlaceholder({filterOptionKey:i,filterOption:s,placeholder:o})}else typeof this.filterPlaceholder=="string"&&(o=this.filterPlaceholder);return o}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,o,i,s)=>{if(!(t instanceof bi))return;const r=o===0&&s>1?"inRangeStart":o===0?"filterOoo":"inRangeEnd",n=o===0&&s>1?e("ariaFilterFromValue","Filter from value"):o===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(r,i)),t.setInputAriaLabel(n)})}setElementValue(e,t,o){e instanceof bi&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){e instanceof se&&Z(e.getGui(),t)}setElementDisabled(e,t){e instanceof se&&bs(e.getGui(),t)}attachElementOnChange(e,t){e instanceof bi&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,o)=>{this.forEachPositionTypeInput(o,t,e)})}forEachPositionInput(e,t){const o=this.getConditionType(e);this.forEachPositionTypeInput(e,o,t)}forEachPositionTypeInput(e,t,o){const i=this.getNumberOfInputs(t),s=this.getInputs(e);for(let r=0;r<s.length;r++){const n=s[r];n!=null&&o(n,r,e,i)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(o=>o==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinOperatorsAnd.forEach((t,o)=>this.resetJoinOperatorAnd(t,o,this.joinOperatorId+o)),this.eJoinOperatorsOr.forEach((t,o)=>this.resetJoinOperatorOr(t,o,this.joinOperatorId+o)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),Ce.resolve()}resetType(e){const o=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(o).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),o)}resetJoinOperatorOr(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),o)}resetJoinOperator(e,t,o,i,s){this.updateJoinOperatorDisabled(e.setValue(o,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const e=(t,o)=>this.updateJoinOperatorDisabled(t,o);this.eJoinOperatorsAnd.forEach(e),this.eJoinOperatorsOr.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const o=this.mapValuesFromModel(e);this.forEachInput((i,s,r)=>{r===t&&this.setElementValue(i,o[s]!=null?o[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,o,i)=>{this.setElementValue(t,o===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,o=>{this.attachElementOnChange(o,this.listener)}))}individualConditionPasses(e,t){const o=this.getCellValue(e.node),i=this.mapValuesFromModel(t),s=this.optionsFactory.getCustomOption(t.type),r=cx(s,i,o);return r??(o==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,o,t,e))}hasInvalidInputs(){return!1}},px=class{constructor(e,t,o){this.getLocaleTextFunc=e,this.optionsFactory=t,this.valueFormatter=o}getModelAsString(e){if(!e)return null;const t=e.operator!=null,o=this.getLocaleTextFunc();if(t){const i=e,r=(i.conditions??[]).map(a=>this.getModelAsString(a)),n=i.operator==="AND"?"andCondition":"orCondition";return r.join(` ${o(n,Dh[n])} `)}else{if(e.type==="blank"||e.type==="notBlank")return o(e.type,e.type);{const i=e,s=this.optionsFactory.getCustomOption(i.type),{displayKey:r,displayName:n,numberOfInputs:a}=s||{};return r&&n&&a===0?(o(r,n),n):this.conditionToString(i,s)}}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},gx=class extends se{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let o;t?o=e.conditions[0]:o=e,this.lastType=o.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const o=e;return this.isTypeEditable(o.type)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const o=new Rp;this.optionsFactory=o,o.init(e.filterParams,this.getDefaultOptions());const i=o.defaultOption;t||(this.lastType=i),this.readOnly=!!e.filterParams.readOnly;const s=this.isTypeEditable(i);this.setEditable(s)}refresh(e){this.setSimpleParams(e)}hasSingleInput(e){const t=this.optionsFactory.getCustomOption(e)?.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},fx=class extends A{constructor(e){super(),this.params=e,this.eInput=N,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new kl(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const o=i=>this.onValueChanged(i);this.addManagedListeners(t,{input:o,keydown:o})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:o}=this;o.setInputAriaLabel(e),t!==void 0&&o.setAutoComplete(t)}};function xp(e){const t=e?.trim();return t===""?e:t}var mx={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},vx=class extends gx{constructor(){super(...arguments),this.eFloatingFilterInputContainer=N,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(mx)}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){this.params=e;const t=e.browserAutoComplete??!1,{inputSvc:o,defaultDebounceMs:i,readOnly:s}=this;if(o.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=jr(e.filterParams),!s){const r=Mh(e.filterParams,i),n=st(this,this.syncUpWithParentFilter.bind(this),r);o.setValueChangedListener(n)}}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,o=t.getValue();rt(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(o,!0)}syncUpWithParentFilter(e){const t=e.key===M.ENTER;if(this.applyActive&&!t)return;const{inputSvc:o,params:i}=this;let s=o.getValue();i.filterParams.trimInput&&(s=xp(s),o.setValue(s,!0)),i.parentFilterInstance(r=>{r?.onFloatingFilterChanged(this.lastType||null,s||null)})}setEditable(e){this.inputSvc.setEditable(e)}},Fp=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],kp=class extends px{conditionToString(e,t){const{numberOfInputs:o}=t||{},{filter:i,filterTo:s,type:r}=e;return r=="inRange"||o===2?`${i}-${s}`:i!=null?`${i}`:`${r}`}},Cx=class extends hx{constructor(){super("textFilter"),this.filterType="text",this.defaultFormatter=e=>e,this.defaultLowercaseFormatter=e=>e==null?null:e.toString().toLowerCase(),this.defaultMatcher=({filterOption:e,value:t,filterText:o})=>{if(o==null)return!1;switch(e){case"contains":return t.indexOf(o)>=0;case"notContains":return t.indexOf(o)<0;case"equals":return t===o;case"notEqual":return t!=o;case"startsWith":return t.indexOf(o)===0;case"endsWith":{const i=t.lastIndexOf(o);return i>=0&&i===t.length-o.length}default:return!1}},this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}setParams(e){this.textFilterParams=e,super.setParams(e),this.matcher=e.textMatcher||this.defaultMatcher,this.formatter=e.textFormatter||(e.caseSensitive?this.defaultFormatter:this.defaultLowercaseFormatter),this.filterModelFormatter=new kp(this.getLocaleTextFunc.bind(this),this.optionsFactory)}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},i=this.getValuesWithSideEffects(e,!0);return i.length>0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){return this.getValuesWithSideEffects(e,!1)}getValuesWithSideEffects(e,t){const o=[];return this.forEachPositionInput(e,(i,s,r,n)=>{if(s<n){let a=nt(i.getValue());t&&this.textFilterParams.trimInput&&(a=xp(a)??null,i.setValue(a,!0)),o.push(a)}}),o}getDefaultFilterOptions(){return Fp}createValueElement(){const e=Me({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,o){const i=this.createManagedBean(new kl);i.addCssClass(`ag-filter-${o}`),i.addCssClass("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeValueElements(e,t){const o=i=>this.removeComponents(i,e,t);o(this.eValuesFrom),o(this.eValuesTo)}mapValuesFromModel(e){const{filter:t,filterTo:o,type:i}=e||{};return[t||null,o||null].slice(0,this.getNumberOfInputs(i))}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,o,i){const s=e.map(p=>this.formatter(p))||[],r=this.formatter(t),{api:n,colDef:a,column:l,context:d,textFormatter:u}=this.textFilterParams;if(o.type==="blank")return jd(t);if(o.type==="notBlank")return!jd(t);const h={api:n,colDef:a,column:l,context:d,node:i.node,data:i.data,filterOption:o.type,value:r,textFormatter:u};return s.some(p=>this.matcher({...h,filterText:p}))}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}},bx=class extends vx{init(e){super.init(e),this.filterModelFormatter=new kp(this.getLocaleTextFunc.bind(this),this.optionsFactory)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultOptions(){return Fp}createFloatingFilterInputService(){return this.createManagedBean(new fx)}};function wx(e){return!!e.quickFilter?.isFilterPresent()}function yx(e){return e.quickFilter?.getText()}function Sx(e){e.quickFilter?.resetCache()}var Rx=class extends A{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",o=>this.setFilter(o.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:o,pivotResultCols:i}=this.beans,s=t.isPivotMode(),r=e?.getColumns(),n=t.getColDefCols();let a=(s&&!o.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:n)??[];r&&(a=a.concat(r)),this.colsToUse=o.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(o=>t?this.doesRowPassCache(e,o):this.doesRowPassNoCache(e,o))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return j(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){H(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),o=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,o&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(o=>{const i=this.getTextForColumn(o,e);return j(i)&&i.indexOf(t)>=0})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassMatcher(e,t){let o;e?(this.checkGenerateAggText(t),o=t.quickFilterAggregateText):o=this.getAggText(t);const{quickFilterParts:i,matcher:s}=this;return s(i,o)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let o=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const s=J(this.gos,{value:o,node:t,data:t.data,column:e,colDef:i});o=i.getQuickFilterText(s)}return j(o)?o.toString().toUpperCase():null}getAggText(e){const t=[];return this.colsToUse.forEach(o=>{const i=this.getTextForColumn(o,e);j(i)&&t.push(i)}),t.join(`
|
|
60
|
+
`)}},xx={moduleName:"ClientSideRowModelFilter",version:re,rowModels:["clientSide"],beans:[HR]},Dp={moduleName:"FilterCore",version:re,beans:[nx],apiFunctions:{isAnyFilterPresent:sx,onFilterChanged:rx},css:[KR],dependsOn:[xx]},Mp={moduleName:"FilterValue",version:re,beans:[lx]},Bl={moduleName:"ColumnFilter",version:re,beans:[ix,ax],dynamicBeans:{headerFilterCellCtrl:_R},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:qR,getColumnFilterInstance:YR,destroyFilter:QR,setFilterModel:XR,getFilterModel:ZR,getColumnFilterModel:JR,setColumnFilterModel:ex,showColumnFilter:tx},dependsOn:[Dp,bn,Mp,Sp]},Fx={moduleName:"TextFilter",version:re,dependsOn:[Bl],userComponents:{agTextColumnFilter:Cx,agTextColumnFloatingFilter:bx}},kx={moduleName:"QuickFilterCore",version:re,rowModels:["clientSide"],beans:[Rx],dependsOn:[Dp,Mp]},Dx={moduleName:"QuickFilter",version:re,apiFunctions:{isQuickFilterPresent:wx,getQuickFilter:yx,resetQuickFilter:Sx},dependsOn:[kx]},Mx=class extends A{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Jo(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),$u(e))}createColumns(e,t){const o=()=>{Go(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,r=(this.columns?.treeDepth??-1)==i,n=this.generateSelectionCols();if(Wu(n,this.columns?.list??[])&&r)return;o();const{colGroupSvc:l}=this.beans,d=l?.findDepth(e.tree)??0,u=l?.balanceTreeForAutoCols(n,d)??[];this.columns={list:n,tree:u,treeDepth:d,map:{}},t(p=>{if(!p)return null;const g=p.filter(f=>!vo(f));return[...n,...g]})}updateColumns(e){const t=Jo(e.source),o=e.currentValue;this.columns?.list.forEach(i=>{const s=this.createSelectionColDef(o);i.setColDef(s,null,t),pt(this.beans,{state:[{colId:i.getColId(),...s}]},t)})}getColumn(e){return this.columns?.list.find(t=>ul(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,o=e.get("rowSelection");if(typeof o!="object"||!Qt(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(o.checkboxLocation==="autoGroupColumn"&&i)return!1;const s=!!Zo(o),r=pr(o);return s||r}createSelectionColDef(e){const{gos:t}=this.beans,o=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:s,spanRows:r,...n}=o??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,d,u){const h=d.isSelected(),p=u.isSelected();return h===p?0:h?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...n,colId:zu}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.beans.validation?.validateColDef(e,t,!0);const o=new hn(e,null,t,!1);return this.createBean(o),[o]}onSelectionOptionsChanged(e,t,o){const i=t&&typeof t!="string"?Zo(t):void 0,s=e&&typeof e!="string"?Zo(e):void 0,r=i!==s,n=t&&typeof t!="string"?pr(t):void 0,a=e&&typeof e!="string"?pr(e):void 0,l=n!==a,d=ks(e),u=ks(t);(r||l||d!==u)&&this.beans.colModel.refreshAll(o)}destroy(){Go(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e){if(!this.isSelectionColumnEnabled())return;const t=this.beans,o=t.visibleCols.getAllTrees()??[];if(o.length!==0){if(!o.some(Pp)){const i=Ps(t).find(s=>vo(s.colId));i&&pt(t,{state:[{colId:i.colId,hide:!i.hide}]},e)}if(o.length===1){const i=o[0],s=Ep(i);if(!s)return;pt(t,{state:[{colId:s.getColId(),hide:!0}]},e)}}}},Pp=e=>e.isColumn?vo(e):e.getChildren()?.some(Pp)??!1;function Ep(e){if(e.isColumn)return vo(e)?e:null;const t=e.getChildren()??[];for(const o of t){const i=Ep(o);if(i)return i}return null}function Px(e,t){if(!t.nodes.every(n=>n.rowPinned?(H(59),!1):n.id===void 0?(H(60),!1):!0))return;const{nodes:i,source:s,newValue:r}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:s??"api",newValue:r})}function Ex(e,t,o="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:o,selectAll:t})}function Ax(e,t,o="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:o,selectAll:t})}function Tx(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function Ix(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function Lx(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function Bx(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function Ox(e){return e.selectionSvc?.getSelectedNodes()??[]}function Gx(e){return e.selectionSvc?.getSelectedRows()??[]}var Nx={moduleName:"SharedRowSelection",version:re,beans:[Mx],apiFunctions:{setNodesSelected:Px,selectAll:Ex,deselectAll:Ax,selectAllFiltered:Tx,deselectAllFiltered:Ix,selectAllOnCurrentPage:Lx,deselectAllOnCurrentPage:Bx,getSelectedNodes:Ox,getSelectedRows:Gx}};function Vx(e){e.expansionSvc?.expandAll(!0)}function Hx(e){e.expansionSvc?.expandAll(!1)}function _x(e){const t=ro(e),o=_i(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}function zx(e,t,o){const i=_i(e);if(i){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){he(238);return}i.setRowCount(t,o);return}he(28);return}const s=Y0(e);if(s){s.setRowCount(t,o);return}}function Wx(e){return yt(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function $x(e){return e.rowModel.isLastRowIndexKnown()}var Ap={moduleName:"CsrmSsrmSharedApi",version:re,apiFunctions:{expandAll:Vx,collapseAll:Hx,onRowHeightChanged:_x}},Ux={moduleName:"SsrmInfiniteSharedApi",version:re,apiFunctions:{setRowCount:zx,getCacheBlockState:Wx,isLastRowIndexKnown:$x}},jx=class extends cb{constructor(){super(...arguments),this.beanName="csrmNodeSvc"}},qn=class{constructor(){this.removals=new Set,this.updates=new Set,this.adds=new Set}remove(e){this.adds.delete(e)||(this.updates.delete(e),this.removals.add(e))}update(e){this.adds.has(e)||this.updates.add(e)}add(e){this.adds.add(e)}};function Kx(e){if(Ee(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let o=0;o<t.length;o++){const i=t[o],s=o===0,r=o===e.childrenAfterSort.length-1;i.setFirstChild(s),i.lastChild!==r&&(i.lastChild=r,i.dispatchRowEvent("lastChildChanged")),i.childIndex!==o&&(i.childIndex=o,i.dispatchRowEvent("childIndexChanged"))}}function Tp(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),Kx(e)}var qx=class extends A{constructor(){super(...arguments),this.beanName="sortStage",this.refreshProps=new Set(["postSortRows","groupDisplayType","accentedSort"]),this.step="sort"}execute(e){const t=this.beans,o=t.sortSvc.getSortOptions(),i=j(o)&&o.length>0,s=i&&!!e.changedRowNodes&&this.gos.get("deltaSort"),r=o.some(({column:n})=>Ht(t.gos)?n.isPrimary()&&n.isRowGroupActive():!!n.getColDef().showRowGroup);this.sort(t,o,i,s,e.changedRowNodes,e.changedPath,r)}sort(e,t,o,i,s,r,n){const{gos:a,colModel:l,rowGroupColsSvc:d,rowNodeSorter:u,rowRenderer:h,showRowGroupCols:p}=e,g=a.get("groupMaintainOrder"),f=l.getCols().some(y=>y.isRowGroupActive()),m=l.isPivotMode(),b=a.getCallback("postSortRows");let w=!1;const S=y=>{const x=m&&y.leafGroup,P=g&&f&&!y.leafGroup&&!n;let k;if(P){const v=d?.columns?.[y.level+1]?.getSort()===null,C=y.childrenAfterAggFilter.slice(0);if(y.childrenAfterSort&&!v){const R={};y.childrenAfterSort.forEach((F,L)=>{R[F.id]=L}),C.sort((F,L)=>(R[F.id]??0)-(R[L.id]??0))}k=C}else!o||x?k=y.childrenAfterAggFilter.slice(0):i&&s?k=Yx(u,y,s,r,t):k=u.doFullSort(y.childrenAfterAggFilter,t);if(w||(w=y.childrenAfterSort?.[0]!==k[0]),y.childrenAfterSort=k,Tp(y),b){const D={nodes:y.childrenAfterSort};b(D)}};if(r?.forEachChangedNodeDepthFirst(S),w&&this.gos.get("groupHideOpenParents")){const y=p?.getShowRowGroupCols();y?.length&&h.refreshCells({columns:y,force:!0})}}};function Yx(e,t,o,i,s){const r=t.childrenAfterAggFilter,n=t.childrenAfterSort;if(!n)return e.doFullSort(r,s);const a=new Set,l=[],{updates:d,adds:u}=o;for(let p=0,g=r.length;p<g;++p){const f=r[p];d.has(f)||u.has(f)||i&&!i.canSkip(f)?l.push({currentPos:l.length,rowNode:f}):a.add(f.id)}const h=n.filter(p=>a.has(p.id)).map((p,g)=>({currentPos:g,rowNode:p}));return l.sort((p,g)=>e.compareRowNodes(s,p,g)),Qx(e,s,l,h)}function Qx(e,t,o,i){const s=[];let r=0,n=0;const a=o.length,l=i.length;for(;r<a&&n<l;){const d=o[r],u=i[n],h=e.compareRowNodes(t,d,u);let p;h<0?(p=d,++r):(p=u,++n),s.push(p.rowNode)}for(;r<a;)s.push(o[r++].rowNode);for(;n<l;)s.push(i[n++].rowNode);return s}var Xx=class extends A{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowsToDisplay=[],this.started=!1,this.isRefreshingModel=!1,this.rowNodesCountReady=!1,this.rowCountReady=!1,this.onRowHeightChanged_debounced=st(this,this.onRowHeightChanged.bind(this),100)}wireBeans(e){this.colModel=e.colModel,this.valueCache=e.valueCache,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggStage=e.aggStage,this.pivotStage=e.pivotStage,this.filterAggStage=e.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(i=>!!i);const e=this.refreshModel.bind(this,{step:"group"}),t=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:t,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new di(this.beans);const o=this.getNewNodeManager();this.nodeManager=o,o.activate(this.rootNode)}getNewNodeManager(){const{gos:e,beans:t}=this;switch(Bu(e)){case"treeNested":return t.csrmChildrenTreeNodeSvc??t.csrmNodeSvc;case"treePath":return t.csrmPathTreeNodeSvc??t.csrmNodeSvc;default:return t.csrmNodeSvc}}addPropertyListeners(){const e=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:t})=>[...t])];this.addManagedPropertyListeners(e,t=>{const o=t.changeSet?.properties;o&&this.onPropChange(o)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,o,i){let s,r=!1;do{s=!1;const n=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(n,o),d=Math.min(a,i);for(let u=l;u<=d;u++){const h=this.getRow(u);if(h.rowHeightEstimated){const p=kt(this.beans,h);h.setRowHeight(p.height),s=!0,r=!0}}s&&this.setRowTopAndRowIndex()}while(s);return r}onPropChange(e){if(!this.rootNode)return;const t=this.gos,o=new Set(e),i={step:"nothing",changedProps:o},s=o.has("rowData"),r=this.nodeManager,n=this.getNewNodeManager(),a=r!==n||s&&o.has("treeData")&&t.get("treeData")||o.has("treeDataChildrenField")&&t.get("treeData");let l;if((a||s)&&(l=t.get("rowData"),l!=null&&!Array.isArray(l)&&(l=null,H(1))),a&&(s||(l=r?.extractRowData()??l),r!==n&&(r?.deactivate(),this.nodeManager=n),n.activate(this.rootNode)),l&&(!a&&!this.isEmpty()&&l.length>0&&t.exists("getRowId")&&!t.get("resetRowDataOnUpdate")?(i.keepRenderedRows=!0,i.animate=!this.gos.get("suppressAnimationFrame"),i.changedRowNodes=new qn,n.setImmutableRowData(i,l)):(i.rowDataUpdated=!0,i.newData=!0,this.beans.selectionSvc?.reset("rowDataChanged"),this.rowNodesCountReady=!0,n.setNewRowData(l))),i.rowDataUpdated)i.step="group";else if(i.step==="nothing"){for(const{refreshProps:d,step:u}of this.orderedStages)if(e.some(h=>d.has(h))){i.step=u;break}}i.step!=="nothing"&&this.refreshModel(i)}setRowTopAndRowIndex(){const{beans:e}=this,t=e.environment.getDefaultRowHeight();let o=0;const i=new Set,s=tt(this.gos,"normal"),r=this.rowsToDisplay;for(let n=0,a=r.length;n<a;++n){const l=r[n];if(l.id!=null&&i.add(l.id),l.rowHeight==null){const d=kt(e,l,s,t);l.setRowHeight(d.height,d.estimated)}l.setRowTop(o),l.setRowIndex(n),o+=l.rowHeight}return i}clearRowTopAndRowIndex(e,t){const o=e.active,i=r=>{r&&r.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},s=r=>{if(r!==null&&(i(r),i(r.detailNode),i(r.sibling),r.hasChildren()&&r.childrenAfterGroup)){const n=r.level==-1;o&&!n&&!r.expanded||r.childrenAfterGroup.forEach(s)}};s(this.rootNode)}ensureRowsAtPixel(e,t,o=0){const i=this.getRowIndexAtPixel(t),s=this.getRow(i),r=!this.gos.get("suppressAnimationFrame");if(s===e[0])return!1;const n=this.rootNode?.allLeafChildren;return n?(e.forEach(a=>{at(n,a)}),e.forEach((a,l)=>{n.splice(Math.max(i+o,0)+l,0,a)}),e.forEach((a,l)=>{a.sourceRowIndex=l}),this.refreshModel({step:"group",keepRenderedRows:!0,animate:r,rowNodesOrderChanged:!0}),!0):!1}highlightRowAtPixel(e,t){const o=t!=null?this.getRowIndexAtPixel(t):null,i=o!=null?this.getRow(o):null;if(!i||!e||t==null){this.clearHighlightedRow();return}const s=this.getHighlightPosition(t,i),r=this.isHighlightingCurrentPosition(e,i,s),n=this.lastHighlightedRow!=null&&this.lastHighlightedRow!==i;(r||n)&&(this.clearHighlightedRow(),r)||(this.setRowNodeHighlighted(i,s),this.lastHighlightedRow=i)}setRowNodeHighlighted(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchRowEvent("rowHighlightChanged"))}getHighlightPosition(e,t){if(!t){const s=this.getRowIndexAtPixel(e);if(t=this.getRow(s||0),!t)return"Below"}const{rowTop:o,rowHeight:i}=t;return e-o<i/2?"Above":"Below"}getLastHighlightedRowNode(){return this.lastHighlightedRow}isHighlightingCurrentPosition(e,t,o){if(e===t)return!0;const i=o==="Above"?-1:1;return this.getRow(t.rowIndex+i)===e}clearHighlightedRow(){this.lastHighlightedRow&&(this.setRowNodeHighlighted(this.lastHighlightedRow,null),this.lastHighlightedRow=null)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const e=this.rootNode;if(!e||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===e)return 1;const o=e.childrenAfterAggFilter,i=e.sibling?1:0;return(o?o.length:0)+i}getTopLevelRowDisplayedIndex(e){const{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;const{childrenAfterSort:s}=t,r=a=>{let l=s[a];if(this.gos.get("groupHideOpenParents"))for(;l.expanded&&l.childrenAfterSort&&l.childrenAfterSort.length>0;)l=l.childrenAfterSort[0];return l.rowIndex},{footerSvc:n}=this.beans;return n?n.getTopDisplayIndex(o,e,s,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;let s=this.getRow(e);for(s.footer&&(s=s.sibling);s.parent&&s.parent!==t;)s=s.parent;const r=t.childrenAfterSort?.findIndex(n=>n===s);return r===-1?e:r??e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=xi(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=xi(this.gos),i=e.columns.length===0||e.columns.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=xi(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new gp(!1,this.rootNode);return e||(t.active=!1),t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:o,rowDataUpdated:i}=e;return!(!t||o||!i||t.removals.size||t.adds.size)}refreshModel(e){if(!this.rootNode)return;const t=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&!!e.rowDataUpdated));if(this.nodeManager.refreshModel?.(e,this.started),this.eventSvc.dispatchEvent({type:"beforeRefreshModel",params:e}),!this.started||(e.rowDataUpdated&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)))return;switch(this.isRefreshingModel=!0,e.step){case"group":this.doRowGrouping(e.changedRowNodes,t,!!e.rowNodesOrderChanged,!!e.afterColumnsChanged);case"filter":this.doFilter(t);case"pivot":this.doPivot(t);case"aggregate":this.doAggregate(t);case"filter_aggregates":this.doFilterAggregates(t);case"sort":this.doSort(e.changedRowNodes,t);case"map":this.doRowsToDisplay()}const o=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(t,o),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?.allLeafChildren?.length||!this.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let o=!1,i=!1;const s=[],r=Ds(this.gos);return this.forEachNodeAfterFilterAndSort(n=>{if(i)return;if(o&&(n===t||n===e)&&(i=!0,n.group&&r)){s.push(...n.allLeafChildren);return}if(!o){if(n!==t&&n!==e)return;o=!0}if(!n.group||!r){s.push(n);return}}),s}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay;if(this.isEmpty()||t.length===0)return-1;let o=0,i=t.length-1;if(e<=0)return 0;if(Se(t).rowTop<=e)return t.length-1;let r=-1,n=-1;for(;;){const a=Math.floor((o+i)/2),l=t[a];if(this.isRowInPixel(l,e)||(l.rowTop<e?o=a+1:l.rowTop>e&&(i=a-1),r===o&&n===i))return a;r=o,n=i}}isRowInPixel(e,t){const o=e.rowTop,i=e.rowTop+e.rowHeight;return o<=t&&i>t}forEachLeafNode(e){this.rootNode?.allLeafChildren?.forEach((t,o)=>e(t,o))}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){this.rowsToDisplay.forEach(e)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterSort)}forEachPivotNode(e,t=!1,o=!1){const i=o?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,s=>s.leafGroup?null:s[i])}depthFirstSearchRowNodes(e,t=!1,o=r=>r.childrenAfterGroup,i=this.rootNode,s=0){let r=s;if(!i)return r;const n=i===this.rootNode;n||e(i,r++);const{footerSvc:a}=this.beans;if(i.hasChildren()&&!i.footer){const l=o(i);if(l){r=a?.addTotalRows(r,i,e,t,n,"top")??r;for(const d of l)r=this.depthFirstSearchRowNodes(e,t,o,d,r);return a?.addTotalRows(r,i,e,t,n,"bottom")??r}}return r}doAggregate(e){const t=this.rootNode;t&&this.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:t,changedPath:e}):t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t}):t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),Tp(o)})}doRowGrouping(e,t,o,i){const s=this.rootNode;if(!this.groupStage?.execute({rowNode:s,changedPath:t,changedRowNodes:e,rowNodesOrderChanged:o,afterColumnsChanged:i})&&!this.nodeManager.treeData){const n=s.sibling;s.childrenAfterGroup=s.allLeafChildren,n&&(n.childrenAfterGroup=s.childrenAfterGroup),s.updateHasChildren()}this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:e}):e.forEachChangedNodeDepthFirst(t=>{t.childrenAfterFilter=t.childrenAfterGroup,yp(t)},!0)}doPivot(e){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){if(typeof e=="string"&&e.indexOf(Ur)==0){let o;return this.forEachNode(i=>{i.id===e&&(o=i)}),o}return this.nodeManager.getRowNode(e)}batchUpdateRowData(e,t){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const o=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},o)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache?.onDataChanged();const e=[],t=[],o=new qn;let i=!1;this.rowDataTransactionBatch?.forEach(s=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:r,rowsInserted:n}=this.nodeManager.updateRowData(s.rowDataTransaction,o);n&&(i=!0),t.push(r),s.callback&&e.push(s.callback.bind(null,r))}),this.commitTransactions(i,o),e.length>0&&window.setTimeout(()=>{e.forEach(s=>s())},0),t.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:t}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e){this.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const t=new qn,{rowNodeTransaction:o,rowsInserted:i}=this.nodeManager.updateRowData(e,t);return this.commitTransactions(i,t),o}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:e,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:t,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:e,rootNode:t}=this;let o;if(e)o=e.execute({rowNode:t});else{o=t?.childrenAfterSort??[];for(const i of o)i.setUiLevel(0)}this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0),e.sibling&&e.sibling.setRowHeight(e.sibling.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const o=t.detailNode;o&&o.setRowHeight(o.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){if(e.rowHeightChanged){if(this.beans.rowAutoHeight?.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.clearHighlightedRow(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.lastHighlightedRow=null,this.orderedStages=ka,this.rowsToDisplay=ka}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}};function Zx(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function Jx(e,t){const o=ro(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function eF(e){return ro(e)?.isEmpty()??!0}function tF(e,t){ro(e)?.forEachLeafNode(t)}function oF(e,t){ro(e)?.forEachNodeAfterFilter(t)}function iF(e,t){ro(e)?.forEachNodeAfterFilterAndSort(t)}function sF(e){if(e.rowAutoHeight?.active){H(3);return}ro(e)?.resetRowHeights()}function rF(e,t){return e.frameworkOverrides.wrapIncoming(()=>ro(e)?.updateRowData(t))}function nF(e,t,o){e.frameworkOverrides.wrapIncoming(()=>ro(e)?.batchUpdateRowData(t,o))}function aF(e){e.frameworkOverrides.wrapIncoming(()=>ro(e)?.flushAsyncTransactions())}function lF(e){return e.selectionSvc?.getBestCostNodeSelection()}var dF={moduleName:"ClientSideRowModel",version:re,rowModels:["clientSide"],beans:[jx,Xx,qx],dependsOn:[Il]},cF={moduleName:"ClientSideRowModelApi",version:re,apiFunctions:{onGroupExpandedOrCollapsed:Zx,refreshClientSideRowModel:Jx,isRowDataEmpty:eF,forEachLeafNode:tF,forEachNodeAfterFilter:oF,forEachNodeAfterFilterAndSort:iF,resetRowHeights:sF,applyTransaction:rF,applyTransactionAsync:nF,flushAsyncTransactions:aF,getBestCostNodeSelection:lF},dependsOn:[Ap]},uF=class extends A{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:o,columnKeys:i,skipRowGroups:s,exportRowNumbers:r}=t,n=this.getColumnsToExport({allColumns:o,skipRowGroups:s,columnKeys:i,exportRowNumbers:r});return[this.prepareSession(n),this.prependContent(t),this.exportColumnGroups(t,n),this.exportHeaders(t,n),this.processPinnedTopRows(t,n),this.processRows(t,n),this.processPinnedBottomRows(t,n),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,o,i){const s=t.shouldRowBeSkipped||(()=>!1),n=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!n,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,d=!!i.footer,u=i.allChildrenCount===1&&i.childrenAfterGroup?.length===1&&jf(this.gos,i);if(!l&&!d&&(t.skipRowGroups||u||a)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.level===-1&&!l&&!d||s(J(this.gos,{node:i})))return;const g=e.onNewBodyRow(i);if(o.forEach((f,m)=>{g.onColumn(f,m,i)}),t.getCustomContentBelowRow){const f=t.getCustomContentBelowRow(J(this.gos,{node:i}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{const o=e.appendContent;return o&&t.addCustomContent(o),t}}prependContent(e){return t=>{const o=e.prependContent;return o&&t.addCustomContent(o),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return o=>{if(!e.skipColumnGroupHeaders){const i=new oh,{colGroupSvc:s}=this.beans,r=s?s.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(r,o,e.processGroupHeaderCallback)}return o}}exportHeaders(e,t){return o=>{if(!e.skipColumnHeaders){const i=o.onNewHeaderRow();t.forEach((s,r)=>{i.onColumn(s,r,void 0)})}return o}}processPinnedTopRows(e,t){return o=>{const i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="top").sort((s,r)=>s.rowIndex-r.rowIndex).map(s=>this.pinnedRowModel?.getPinnedTopRow(s.rowIndex)).forEach(i):this.pinnedRowModel?.forEachPinnedRow("top",i),o}}processRows(e,t){return o=>{const i=this.rowModel,s=$t(this.gos),r=yt(this.gos),n=!s&&e.onlySelected,a=this.processRow.bind(this,o,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)return e.rowPositions.filter(d=>d.rowPinned==null).sort((d,u)=>d.rowIndex-u.rowIndex).map(d=>i.getRow(d.rowIndex)).forEach(a),o;if(this.colModel.isPivotMode())return s?i.forEachPivotNode(a,!0,l==="filteredAndSorted"):r?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a),o;if(e.onlySelectedAllPages||n){const d=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(d),d.forEach(a)}else l==="all"?i.forEachNode(a):s||r?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return o}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:o}=this.beans;if(!t||!o)return;const i=t.getSortOptions(),s=(r,n)=>r.rowIndex!=null&&n.rowIndex!=null?r.rowIndex-n.rowIndex:r.level===n.level?r.parent?.id===n.parent?.id?o.compareRowNodes(i,{rowNode:r,currentPos:r.rowIndex??-1},{rowNode:n,currentPos:n.rowIndex??-1}):s(r.parent,n.parent):r.level>n.level?s(r.parent,n):s(r,n.parent);e.sort(s)}processPinnedBottomRows(e,t){return o=>{const i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="bottom").sort((s,r)=>s.rowIndex-r.rowIndex).map(s=>this.pinnedRowModel?.getPinnedBottomRow(s.rowIndex)).forEach(i):this.pinnedRowModel?.forEachPinnedRow("bottom",i),o}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:o=!1,exportRowNumbers:i=!1,columnKeys:s}=e,{colModel:r,gos:n,visibleCols:a}=this,l=r.isPivotMode(),d=p=>vo(p)?!1:!Ms(p)||i;if(s&&s.length)return r.getColsForKeys(s).filter(d);const u=n.get("treeData");let h=[];return t&&!l?h=r.getCols():h=a.allCols,h=h.filter(p=>d(p)&&(o&&!u?!pn(p):!0)),h}recursivelyAddHeaderGroups(e,t,o){const i=[];e.forEach(s=>{const r=s;r.getChildren&&r.getChildren().forEach(n=>i.push(n))}),e.length>0&&Oe(e[0])&&this.doAddHeaderHeader(t,e,o),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,o)}doAddHeaderHeader(e,t,o){const i=e.onNewHeaderGroupingRow();let s=0;t.forEach(r=>{const n=r;let a;o?a=o(J(this.gos,{columnGroup:n})):a=this.beans.colNames.getDisplayNameForColumnGroup(n,"header");const l=n.getLeafColumns().reduce((d,u,h,p)=>{let g=Se(d);return u.getColumnGroupShow()==="open"?(!g||g[1]!=null)&&(g=[h],d.push(g)):g&&g[1]==null&&(g[1]=h-1),h===p.length-1&&g&&g[1]==null&&(g[1]=h),d},[]);i.onColumn(n,a||"",s++,n.getLeafColumns().length-1,l)})}},hF={moduleName:"SharedExport",version:re,beans:[uF]},Kd=`\r
|
|
61
|
+
`,pF=class extends cR{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:o}=e;this.suppressQuotes=t,this.columnSeparator=o}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,Kd),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((o,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(o.data.value||""),o.mergeAcross&&this.appendEmptyCells(o.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,o,i){o!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,o){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue(e,t,t,"csv",o);this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(H(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Kd),this.isFirstLine=!1}},gF=class extends dR{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){H(51);return}const t=this.getMergedParams(e),o=this.getData(t),i=new Blob(["\uFEFF",o],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(J(this.gos,{})):t.fileName;uR(this.getFileName(s),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:o,rowGroupColsSvc:i,valueSvc:s,gos:r}=this,{processCellCallback:n,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d,suppressQuotes:u,columnSeparator:h}=e;return new pF({colModel:t,colNames:o,valueSvc:s,gos:r,processCellCallback:n||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:d||void 0,suppressQuotes:u||!1,columnSeparator:h||",",rowGroupColsSvc:i})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function fF(e,t){return e.csvCreator?.getDataAsCsv(t)}function mF(e,t){e.csvCreator?.exportDataAsCsv(t)}var vF={moduleName:"CsvExport",version:re,beans:[gF],apiFunctions:{getDataAsCsv:fF,exportDataAsCsv:mF},dependsOn:[hF]};function CF(e){return e.stateSvc?.getState()??{}}function bF(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=wF(e)}return e}function wF(e){return e.cellSelection=yF(e,"rangeSelection"),e}function yF(e,t){if(e&&typeof e=="object")return e[t]}var SF=class extends A{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=st(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=st(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=st(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=$t(this.gos),this.cachedState=this.getInitialState(),this.setCachedStateValue("version",re);const e=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>e(()=>this.setupStateOnGridReady()));const[t,o,i]=this.addManagedEventListeners({newColumnsLoaded:({source:s})=>{s==="gridInitializing"&&(t(),e(()=>this.setupStateOnColumnsInitialised()))},rowCountReady:()=>{o?.(),e(()=>this.setupStateOnRowCountReady())},firstDataRendered:()=>{i?.(),e(()=>this.setupStateOnFirstDataRendered())}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getInitialState(){return bF(this.gos.get("initialState")??{})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){const e=()=>this.updateCachedState("sideBar",this.getSideBarState());e(),this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}setupStateOnColumnsInitialised(){const e=this.getInitialState();this.setColumnState(e),this.setColumnGroupState(e),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());const t=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:t("aggregation"),columnMoved:t("columnOrder"),columnPinned:t("columnPinning"),columnResized:t("columnSizing"),columnVisible:t("columnVisibility"),columnPivotChanged:t("pivot"),columnPivotModeChanged:t("pivot"),columnRowGroupChanged:t("rowGroup"),sortChanged:t("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){const{filter:e,rowGroupExpansion:t,rowSelection:o,pagination:i}=this.getInitialState();e&&this.setFilterState(e),t&&this.setRowGroupExpansionState(t),o&&this.setRowSelectionState(o),i&&this.setPaginationState(i);const s=this.updateCachedState.bind(this);s("filter",this.getFilterState()),s("rowGroupExpansion",this.getRowGroupExpansionState()),s("rowSelection",this.getRowSelectionState()),s("pagination",this.getPaginationState());const r=()=>{this.updateRowGroupExpansionStateTimer=0,s("rowGroupExpansion",this.getRowGroupExpansionState())};this.addManagedEventListeners({filterChanged:()=>s("filter",this.getFilterState()),rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:r,columnRowGroupChanged:r,rowDataUpdated:()=>{this.gos.get("groupDefaultExpanded")!==0&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(r)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:n=>{(n.newPage||n.newPageSize)&&s("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){const{scroll:e,cellSelection:t,focusedCell:o,columnOrder:i}=this.getInitialState();o&&this.setFocusedCellState(o),t&&this.setCellSelectionState(t),e&&this.setScrollState(e),this.setColumnPivotState(!!i?.orderedColIds);const s=this.updateCachedState.bind(this);s("sideBar",this.getSideBarState()),s("focusedCell",this.getFocusedCellState());const r=this.getRangeSelectionState();s("rangeSelection",r),s("cellSelection",r),s("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>s("focusedCell",this.getFocusedCellState()),cellSelectionChanged:n=>{if(n.finished){const a=this.getRangeSelectionState();s("rangeSelection",a),s("cellSelection",a)}},bodyScrollEnd:()=>s("scroll",this.getScrollState())})}getColumnState(){const e=this.beans,t=e.colModel.isPivotMode(),o=[],i=[],s=[],r=[],n=[],a=[],l=[],d=[],u=[];let h=0;const p=Ps(e);for(let g=0;g<p.length;g++){const{colId:f,sort:m,sortIndex:b,rowGroup:w,rowGroupIndex:S,aggFunc:y,pivot:x,pivotIndex:P,pinned:k,hide:D,width:v,flex:C}=p[g];u.push(f),m&&(o[b??h++]={colId:f,sort:m}),w&&(i[S??0]=f),typeof y=="string"&&s.push({colId:f,aggFunc:y}),x&&(r[P??0]=f),k&&(k==="right"?a:n).push(f),D&&l.push(f),(C!=null||v)&&d.push({colId:f,flex:C??void 0,width:v})}return{sort:o.length?{sortModel:o}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:r.length||t?{pivotMode:t,pivotColIds:r}:void 0,columnPinning:n.length||a.length?{leftColIds:n,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:u.length?{orderedColIds:u}:void 0}}setColumnState(e){const{sort:t,rowGroup:o,aggregation:i,pivot:s,columnPinning:r,columnVisibility:n,columnSizing:a,columnOrder:l,partialColumnState:d}=e,u={},h=b=>{let w=u[b];return w||(w={colId:b},u[b]=w,w)},p=d?{}:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};t&&(t.sortModel.forEach(({colId:b,sort:w},S)=>{const y=h(b);y.sort=w,y.sortIndex=S}),p.sort=null,p.sortIndex=null),o&&(o.groupColIds.forEach((b,w)=>{const S=h(b);S.rowGroup=!0,S.rowGroupIndex=w}),p.rowGroup=null,p.rowGroupIndex=null),i&&(i.aggregationModel.forEach(({colId:b,aggFunc:w})=>{h(b).aggFunc=w}),p.aggFunc=null),s&&(s.pivotColIds.forEach((b,w)=>{const S=h(b);S.pivot=!0,S.pivotIndex=w}),this.gos.updateGridOptions({options:{pivotMode:s.pivotMode},source:"gridInitializing"}),p.pivot=null,p.pivotIndex=null),r&&(r.leftColIds.forEach(b=>{h(b).pinned="left"}),r.rightColIds.forEach(b=>{h(b).pinned="right"}),p.pinned=null),n&&(n.hiddenColIds.forEach(b=>{h(b).hide=!0}),p.hide=null),a&&(a.columnSizingModel.forEach(({colId:b,flex:w,width:S})=>{const y=h(b);y.flex=w??null,y.width=S}),p.flex=null);const g=l?.orderedColIds,f=!!g?.length,m=f?g.map(b=>h(b)):Object.values(u);m.length&&(this.columnStates=m,pt(this.beans,{state:m,applyOrder:f,defaultState:p},"gridInitializing"))}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:s,colGroupSvc:r}=i;if(s?.isPivotResultColsPresent()){if(t){const n=[];for(const a of t)s.getPivotResultCol(a.colId)&&n.push(a);pt(i,{state:n,applyOrder:e},"gridInitializing")}o&&r?.setColumnGroupState(o,"gridInitializing")}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState(),o=[];return t.forEach(({groupId:i,open:s})=>{s&&o.push(i)}),o.length?{openColumnGroupIds:o}:void 0}setColumnGroupState(e){const t=this.beans.colGroupSvc;if(!Object.prototype.hasOwnProperty.call(e,"columnGroup")||!t)return;const o=new Set(e.columnGroup?.openColumnGroupIds),s=t.getColumnGroupState().map(({groupId:r})=>{const n=o.has(r);return n&&o.delete(r),{groupId:r,open:n}});o.forEach(r=>{s.push({groupId:r,open:!0})}),s.length&&(this.columnGroupStates=s),t.setColumnGroupState(s,"gridInitializing")}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e?.getAdvFilterModel()??void 0;return t||o?{filterModel:t,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,advancedFilterModel:i}=e??{};o&&t?.setFilterModel(o,"columnFilter"),i&&t?.setAdvFilterModel(i,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:o,type:i,startRow:s,endRow:r,columns:n,startColumn:a}=t;return{id:o,type:i,startRow:s,endRow:r,colIds:n.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!si(t)||!o)return;const r=[];e.cellRanges.forEach(n=>{const a=[];if(n.colIds.forEach(d=>{const u=i.getCol(d);u&&a.push(u)}),!a.length)return;let l=i.getCol(n.startColId);if(!l){const d=s.allCols,u=new Set(a);l=d.find(h=>u.has(h))}r.push({...n,columns:a,startColumn:l})}),o.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:o}=e?.getVScrollPosition()??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e,{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:r,ctrlsSvc:n}=this.beans;i.wrapIncoming(()=>{n.get("center").setCenterViewportScrollLeft(o),n.getScrollFeature()?.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),r?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:t,rowIndex:o,rowPinned:i}=e,{focusSvc:s,colModel:r}=this.beans;s.setFocusedCell({column:r.getCol(t),rowIndex:o,rowPinned:i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e){const{pagination:t,gos:o}=this.beans;t&&(e.pageSize&&!o.get("paginationAutoPageSize")&&t.setPageSize(e.pageSize,"initialState"),typeof e.page=="number"&&t.setPage(e.page))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e){this.beans.selectionSvc?.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const o=[];return t.forEachNode(({expanded:i,id:s})=>{i&&s&&o.push(s)}),o.length?{expandedRowGroupIds:o}:void 0}setRowGroupExpansionState(e){this.beans.expansionSvc?.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const r=t[s];ys(r,i[s])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const o=this.cachedState[e];this.setCachedStateValue(e,t),ys(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0;const t=this.beans.colAnimation;t?.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(t?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}},RF={moduleName:"GridState",version:re,beans:[SF],apiFunctions:{getState:CF}};function xF(e){return e.rowModel.isLastRowIndexKnown()}function FF(e){return e.pagination?.getPageSize()??100}function kF(e){return e.pagination?.getCurrentPage()??0}function DF(e){return e.pagination?.getTotalPages()??1}function MF(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function PF(e){e.pagination?.goToNextPage()}function EF(e){e.pagination?.goToPreviousPage()}function AF(e){e.pagination?.goToFirstPage()}function TF(e){e.pagination?.goToLastPage()}function IF(e,t){e.pagination?.goToPage(t)}var LF=class extends A{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,o=()=>{const i=Math.max(Oo(t),1),s=Math.floor(e/i);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?st(this,o,50)():(o(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},qi="paginationPageSizeSelector",BF={tag:"span",cls:"ag-paging-page-size"},OF=class extends se{constructor(){super(BF),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(qi,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){rt(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(qi)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),o=!t||!e.includes(t);if(o){const s=this.gos.exists("paginationPageSize"),r=this.gos.get(qi)!==!0;H(94,{pageSizeSet:s,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||H(95,{paginationPageSizeOption:t,paginationPageSizeSelector:qi}),e.unshift("")}const i=String(o?"":t);this.selectPageSizeComp?(Pt(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=o}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const o=this.getLocaleTextFunc(),i=o("pageSizeSelectorLabel","Page Size:"),s=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new zh).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(qi);return!Array.isArray(t)||!t?.length?e:[...t].sort((o,i)=>o-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},GF={selector:"AG-PAGE-SIZE-SELECTOR",component:OF},NF=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",VF=class extends ui{constructor(){super(),this.btFirst=N,this.btPrevious=N,this.btNext=N,this.btLast=N,this.lbRecordCount=N,this.lbFirstRowOnPage=N,this.lbLastRowOnPage=N,this.lbCurrent=N,this.lbTotal=N,this.pageSizeComp=N,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(NF)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[GF]);const{btFirst:t,btPrevious:o,btNext:i,btLast:s}=this;this.activateTabIndex([t,o,i,s]),t.insertAdjacentElement("afterbegin",de(e?"last":"first",this.beans)),o.insertAdjacentElement("afterbegin",de(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",de(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",de(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):Rv(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)}),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{const{el:t,fn:o}=e;this.addManagedListeners(t,{click:o,keydown:i=>{(i.key===M.ENTER||i.key===M.SPACE)&&(i.preventDefault(),o())}})}),Sv(this.beans,this,this.getGui()),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):lR(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),o=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),s=e===o-1;this.nextButtonDisabled=s||i,this.lastButtonDisabled=!t||i||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){ou(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),o=this.pagination.getMasterRowCount(),i=e?o:null,s=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let n,a;this.isZeroPagesToDisplay()?n=a=0:(n=r*s+1,a=n+r-1,e&&a>i&&(a=i));const l=n+r-1,d=!e&&o<l,u=this.formatNumber(n);this.lbFirstRowOnPage.textContent=u;let h;const p=this.getLocaleTextFunc();d?h=p("pageLastRowUnknown","?"):h=this.formatNumber(a),this.lbLastRowOnPage.textContent=h;const f=t>0?s+1:0,m=this.formatNumber(f);this.lbCurrent.textContent=m;let b,w;if(e)b=this.formatNumber(t),w=this.formatNumber(i);else{const S=p("more","more");b=S,w=S}this.lbTotal.textContent=b,this.lbRecordCount.textContent=w,this.announceAriaStatus(u,h,w,m,b)}announceAriaStatus(e,t,o,i,s){const r=this.getLocaleTextFunc(),n=r("page","Page"),a=r("to","to"),l=r("of","of"),d=`${e} ${a} ${t} ${l} ${o}`,u=`${n} ${i} ${l} ${s}`;d!==this.ariaRowStatus&&(this.ariaRowStatus=d,this.ariaAnnounce?.announceValue(d,"paginationRow")),u!==this.ariaPageStatus&&(this.ariaPageStatus=u,this.ariaAnnounce?.announceValue(u,"paginationPage"))}setTotalLabelsToZero(){const e=this.formatNumber(0);this.lbFirstRowOnPage.textContent=e,this.lbCurrent.textContent=e,this.lbLastRowOnPage.textContent=e,this.lbTotal.textContent=e,this.lbRecordCount.textContent=e,this.announceAriaStatus(e,e,e,e,e)}},HF={selector:"AG-PAGINATION",component:VF},_F=class extends A{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return HF}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;!this.active||t===e||typeof t!="number"||(this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0}))}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return j(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:j(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:j(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:j(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const o=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}o!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const o=this.pageSize,i=t-1;this.totalPages=Math.floor(i/o)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,r=o*s;let n=o*(s+1)-1;if(n>i&&(n=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),n===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:o}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:o=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:o,newPageSize:i,keepRenderedRows:t})}},zF={moduleName:"Pagination",version:re,beans:[_F,LF],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:xF,paginationGetPageSize:FF,paginationGetCurrentPage:kF,paginationGetTotalPages:DF,paginationGetRowCount:MF,paginationGoToNextPage:PF,paginationGoToPreviousPage:EF,paginationGoToFirstPage:AF,paginationGoToLastPage:TF,paginationGoToPage:IF},dependsOn:[bn]};function WF(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Ip(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&Ip(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function $F(e,t){return e.rowModel.getRowNode(t)}function UF(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function jF(e){return e.rowRenderer.getRenderedNodes()}function KF(e,t,o){e.rowModel.forEachNode(t,o)}function qF(e){return e.rowRenderer.firstRenderedRow}function YF(e){return e.rowRenderer.lastRenderedRow}function QF(e,t){return e.rowModel.getRow(t)}function XF(e){return e.rowModel.getRowCount()}var ZF={moduleName:"RowApi",version:re,apiFunctions:{redrawRows:WF,setRowNodeExpanded:Ip,getRowNode:$F,addRenderedRowListener:UF,getRenderedNodes:jF,forEachNode:KF,getFirstDisplayedRowIndex:qF,getLastDisplayedRowIndex:YF,getDisplayedRowAtIndex:QF,getDisplayedRowCount:XF}},JF={moduleName:"RowStyle",version:re,beans:[tC]},ek=class extends A{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addEventListener(e,t){const o=this.wrapSvc?.wrap(t)??t,i=!cs.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(o),this.eventSvc.addEventListener(e,o,i)}removeEventListener(e,t){const o=this.wrapSvc?.unwrap(t)??t,s=!!this.asyncListeners.get(e)?.delete(o);s||this.syncListeners.get(e)?.delete(o),this.eventSvc.removeEventListener(e,o,s)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,o=(r,n)=>{cs.has(r)&&t(r,n)},i=(r,n)=>{cs.has(r)||t(r,n)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(o,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=o?.unwrapGlobal(e)??e;if(i.has(s)){const{syncListener:n,asyncListener:a}=i.get(s);t.removeGlobalListener(n,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeEventListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function tk(e,t,o){e.apiEventSvc?.addEventListener(t,o)}function ok(e,t,o){e.apiEventSvc?.removeEventListener(t,o)}function ik(e,t){e.apiEventSvc?.addGlobalListener(t)}function sk(e,t){e.apiEventSvc?.removeGlobalListener(t)}var rk={moduleName:"EventApi",version:re,apiFunctions:{addEventListener:tk,addGlobalListener:ik,removeEventListener:ok,removeGlobalListener:sk},beans:[ek]},nk=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",ak=class extends A{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=ls(this.gos),{column:r,eGui:n}=t,a=r.getColDef();!i&&s&&!a.headerComponent&&(i=ds(()=>n.querySelector(".ag-header-cell-text")));const l={getColumn:()=>r,getColDef:()=>r.getColDef(),getGui:()=>n,getLocation:()=>"header",getTooltipValue:()=>o??r.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(l);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=ls(this.gos),{column:r,eGui:n}=t,a=r.getColGroupDef();!i&&s&&!a?.headerGroupComponent&&(i=ds(()=>n.querySelector(".ag-header-group-text")));const l={getColumn:()=>r,getGui:()=>n,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(a&&a.headerTooltip),shouldDisplayTooltip:i};a&&(l.getColDef=()=>a);const d=this.createTooltipFeature(l);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{column:i,rowNode:s}=e,r=()=>{const l=i.getColDef(),d=s.data;if(l.tooltipField&&j(d))return ns(d,l.tooltipField,i.isTooltipFieldContainsDots());const u=l.tooltipValueGetter;return u?u(J(this.gos,{location:"cell",colDef:i.getColDef(),column:i,rowIndex:e.cellPosition.rowIndex,node:s,data:s.data,value:e.value,valueFormatted:e.valueFormatted})):null},n=ls(this.gos);!o&&n&&!e.isCellRenderer()&&(o=ds(()=>{const l=e.eGui;return l.children.length===0?l:l.querySelector(".ag-cell-value")}));const a={getColumn:()=>i,getColDef:()=>i.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>s,getGui:()=>e.eGui,getLocation:()=>"cell",getTooltipValue:t!=null?()=>t:r,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(a,this.beans)}refreshRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},r=this.beans,n=r.context;e&&t.destroyBean(e,n);const a=this.createTooltipFeature(s,r);return t.createBean(a,n)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=j(t.tooltipField)||j(t.tooltipValueGetter)||j(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},lk={moduleName:"Tooltip",version:re,beans:[ak],dynamicBeans:{tooltipFeature:Sb},userComponents:{agTooltipComponent:nR},dependsOn:[bn],css:[nk]},dk=Object.defineProperty,ck=(e,t,o)=>t in e?dk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Di=(e,t,o)=>ck(e,typeof t!="symbol"?t+"":t,o);class Is{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:c.defineComponent({...t})},i||he(114,{component:t}),i.extends?(i.extends.setup&&(i.setup=i.extends.setup),i.extends.props=this.addParamsToProps(i.extends.props)):i.props=this.addParamsToProps(i.props),i}static addParamsToProps(t){return!t||Array.isArray(t)&&t.indexOf("params")===-1?t=["params",...t||[]]:typeof t=="object"&&!t.params&&(t.params={type:Object}),t}static createAndMountComponent(t,o,i,s){const r=Is.getComponentDefinition(t,i);if(!r)return;const{vNode:n,destroy:a,el:l}=this.mount(r,{params:Object.freeze(o)},i,s||{});return{componentInstance:n.component.proxy,element:l,destroy:a}}static mount(t,o,i,s){let r=c.createVNode(t,o);r.appContext={...i.appContext,provides:s};let n=document.createElement("div");return c.render(r,n),{vNode:r,destroy:()=>{n&&c.render(null,n),n=null,r=null},el:n}}static searchForComponentInstance(t,o,i=10,s=!1){let r=null,n=0,a=t.parent;for(;!r&&a&&a.components&&++n<i;)a.components&&a.components[o]&&(r=a.components[o]),a=a.parent;for(n=0,a=t.parent;!r&&a&&a.$options&&++n<i;){const l=a;l.$options&&l.$options.components&&l.$options.components[o]?r=l.$options.components[o]:l[o]&&(r=l[o]),a=a.parent}for(n=0,a=t.parent;!r&&a&&++n<i;){if(a.exposed){const l=a;l.exposed&&l.exposed[o]?r=l.exposed[o]:l[o]&&(r=l[o])}a=a.parent}if(!r){const l=t.appContext.components;l&&l[o]&&(r=l[o])}return!r&&!s?(he(114,{component:o}),null):r}}class uk extends sR{constructor(t,o){super(),Di(this,"parent"),Di(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends hk{init(n){super.init(n)}hasMethod(n){var a,l;const d=s.getFrameworkComponentInstance();return d[n]?!0:((a=d.$.exposed)==null?void 0:a[n])!=null||((l=d.exposed)==null?void 0:l[n])!=null||d.$.setupState[n]!=null}callMethod(n,a){var l,d;const u=this.getFrameworkComponentInstance(),h=s.getFrameworkComponentInstance();if(h[n])return h[n].apply(u,a);{const p=((l=u.$.exposed)==null?void 0:l[n])||((d=u.exposed)==null?void 0:d[n])||u.$.setupState[n];return p?.apply(u,a)}}addMethod(n,a){s[n]=a}processMethod(n,a){return n==="refresh"&&(this.getFrameworkComponentInstance().params=a[0]),this.hasMethod(n)?this.callMethod(n,a):n==="refresh"}createComponent(n){return o.createComponent(t,n)}}const s=new i;return s}createComponent(t,o){return Is.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&H(233,{methodName:o}),null)}}destroy(){this.parent=null}}class hk{constructor(){Di(this,"componentInstance"),Di(this,"element"),Di(this,"unmount")}getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:o,element:i,destroy:s}=this.createComponent(t);this.componentInstance=o,this.unmount=s,this.element=i.firstElementChild??i}}class pk extends $h{constructor(t){super("vue"),Di(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=Is.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=Is.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function gk(){return{gridOptions:{},modules:[],statusBar:void 0,sideBar:void 0,suppressContextMenu:void 0,preventDefaultOnContextMenu:void 0,allowContextMenuWithControlKey:void 0,columnMenu:void 0,suppressMenuHide:void 0,enableBrowserTooltips:void 0,tooltipTrigger:void 0,tooltipShowDelay:void 0,tooltipHideDelay:void 0,tooltipMouseTrack:void 0,tooltipShowMode:void 0,tooltipInteraction:void 0,popupParent:void 0,copyHeadersToClipboard:void 0,copyGroupHeadersToClipboard:void 0,clipboardDelimiter:void 0,suppressCopyRowsToClipboard:void 0,suppressCopySingleCellRanges:void 0,suppressLastEmptyLineOnPaste:void 0,suppressClipboardPaste:void 0,suppressClipboardApi:void 0,suppressCutToClipboard:void 0,columnDefs:void 0,defaultColDef:void 0,defaultColGroupDef:void 0,columnTypes:void 0,dataTypeDefinitions:void 0,maintainColumnOrder:void 0,enableStrictPivotColumnOrder:void 0,suppressFieldDotNotation:void 0,headerHeight:void 0,groupHeaderHeight:void 0,floatingFiltersHeight:void 0,pivotHeaderHeight:void 0,pivotGroupHeaderHeight:void 0,allowDragFromColumnsToolPanel:void 0,suppressMovableColumns:void 0,suppressColumnMoveAnimation:void 0,suppressMoveWhenColumnDragging:void 0,suppressDragLeaveHidesColumns:void 0,suppressGroupChangesColumnVisibility:void 0,suppressMakeColumnVisibleAfterUnGroup:void 0,suppressRowGroupHidesColumns:void 0,colResizeDefault:void 0,suppressAutoSize:void 0,autoSizePadding:void 0,skipHeaderOnAutoSize:void 0,autoSizeStrategy:void 0,components:void 0,editType:void 0,singleClickEdit:void 0,suppressClickEdit:void 0,readOnlyEdit:void 0,stopEditingWhenCellsLoseFocus:void 0,enterNavigatesVertically:void 0,enterNavigatesVerticallyAfterEdit:void 0,enableCellEditingOnBackspace:void 0,undoRedoCellEditing:void 0,undoRedoCellEditingLimit:void 0,defaultCsvExportParams:void 0,suppressCsvExport:void 0,defaultExcelExportParams:void 0,suppressExcelExport:void 0,excelStyles:void 0,findSearchValue:void 0,findOptions:void 0,quickFilterText:void 0,cacheQuickFilter:void 0,includeHiddenColumnsInQuickFilter:void 0,quickFilterParser:void 0,quickFilterMatcher:void 0,applyQuickFilterBeforePivotOrAgg:void 0,excludeChildrenWhenTreeDataFiltering:void 0,enableAdvancedFilter:void 0,alwaysPassFilter:void 0,includeHiddenColumnsInAdvancedFilter:void 0,advancedFilterParent:void 0,advancedFilterBuilderParams:void 0,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableCharts:void 0,chartThemes:void 0,customChartThemes:void 0,chartThemeOverrides:void 0,chartToolPanelsDef:void 0,chartMenuItems:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams:void 0,alignedGrids:void 0,tabIndex:void 0,rowBuffer:void 0,valueCache:void 0,valueCacheNeverExpires:void 0,enableCellExpressions:void 0,suppressTouch:void 0,suppressFocusAfterRefresh:void 0,suppressBrowserResizeObserver:void 0,suppressPropertyNamesCheck:void 0,suppressChangeDetection:void 0,debug:void 0,loading:void 0,overlayLoadingTemplate:void 0,loadingOverlayComponent:void 0,loadingOverlayComponentParams:void 0,suppressLoadingOverlay:void 0,overlayNoRowsTemplate:void 0,noRowsOverlayComponent:void 0,noRowsOverlayComponentParams:void 0,suppressNoRowsOverlay:void 0,pagination:void 0,paginationPageSize:void 0,paginationPageSizeSelector:void 0,paginationAutoPageSize:void 0,paginateChildRows:void 0,suppressPaginationPanel:void 0,pivotMode:void 0,pivotPanelShow:void 0,pivotMaxGeneratedColumns:void 0,pivotDefaultExpanded:void 0,pivotColumnGroupTotals:void 0,pivotRowTotals:void 0,pivotSuppressAutoColumn:void 0,suppressExpandablePivotGroups:void 0,functionsReadOnly:void 0,aggFuncs:void 0,suppressAggFuncInHeader:void 0,alwaysAggregateAtRootLevel:void 0,aggregateOnlyChangedColumns:void 0,suppressAggFilteredOnly:void 0,removePivotHeaderRowWhenSingleValueColumn:void 0,animateRows:void 0,cellFlashDuration:void 0,cellFadeDuration:void 0,allowShowChangeAfterFilter:void 0,domLayout:void 0,ensureDomOrder:void 0,enableCellSpan:void 0,enableRtl:void 0,suppressColumnVirtualisation:void 0,suppressMaxRenderedRowRestriction:void 0,suppressRowVirtualisation:void 0,rowDragManaged:void 0,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText:void 0,fullWidthCellRenderer:void 0,fullWidthCellRendererParams:void 0,embedFullWidthRows:void 0,groupDisplayType:void 0,groupDefaultExpanded:void 0,autoGroupColumnDef:void 0,groupMaintainOrder:void 0,groupSelectsChildren:void 0,groupLockGroupColumns:void 0,groupAggFiltering:void 0,groupTotalRow:void 0,grandTotalRow:void 0,suppressStickyTotalRow:void 0,groupSuppressBlankHeader:void 0,groupSelectsFiltered:void 0,showOpenedGroup:void 0,groupHideParentOfSingleChild:void 0,groupRemoveSingleChildren:void 0,groupRemoveLowestSingleChildren:void 0,groupHideOpenParents:void 0,groupAllowUnbalanced:void 0,rowGroupPanelShow:void 0,groupRowRenderer:void 0,groupRowRendererParams:void 0,treeData:void 0,treeDataChildrenField:void 0,treeDataParentIdField:void 0,rowGroupPanelSuppressSort:void 0,suppressGroupRowsSticky:void 0,pinnedTopRowData:void 0,pinnedBottomRowData:void 0,rowModelType:void 0,rowData:void 0,asyncTransactionWaitMillis:void 0,suppressModelUpdateAfterUpdateTransaction:void 0,datasource:void 0,cacheOverflowSize:void 0,infiniteInitialRowCount:void 0,serverSideInitialRowCount:void 0,suppressServerSideFullWidthLoadingRow:void 0,cacheBlockSize:void 0,maxBlocksInCache:void 0,maxConcurrentDatasourceRequests:void 0,blockLoadDebounceMillis:void 0,purgeClosedRowNodes:void 0,serverSideDatasource:void 0,serverSideSortAllLevels:void 0,serverSideEnableClientSideSort:void 0,serverSideOnlyRefreshFilteredGroups:void 0,serverSidePivotResultFieldSeparator:void 0,viewportDatasource:void 0,viewportRowModelPageSize:void 0,viewportRowModelBufferSize:void 0,alwaysShowHorizontalScroll:void 0,alwaysShowVerticalScroll:void 0,debounceVerticalScrollbar:void 0,suppressHorizontalScroll:void 0,suppressScrollOnNewData:void 0,suppressScrollWhenPopupsAreOpen:void 0,suppressAnimationFrame:void 0,suppressMiddleClickScrolls:void 0,suppressPreventDefaultOnMouseWheel:void 0,scrollbarWidth:void 0,rowSelection:void 0,cellSelection:void 0,rowMultiSelectWithClick:void 0,suppressRowDeselection:void 0,suppressRowClickSelection:void 0,suppressCellFocus:void 0,suppressHeaderFocus:void 0,selectionColumnDef:void 0,rowNumbers:void 0,suppressMultiRangeSelection:void 0,enableCellTextSelection:void 0,enableRangeSelection:void 0,enableRangeHandle:void 0,enableFillHandle:void 0,fillHandleDirection:void 0,suppressClearOnFillReduction:void 0,sortingOrder:void 0,accentedSort:void 0,unSortIcon:void 0,suppressMultiSort:void 0,alwaysMultiSort:void 0,multiSortKey:void 0,suppressMaintainUnsortedOrder:void 0,icons:void 0,rowHeight:void 0,rowStyle:void 0,rowClass:void 0,rowClassRules:void 0,suppressRowHoverHighlight:void 0,suppressRowTransform:void 0,columnHoverHighlight:void 0,gridId:void 0,deltaSort:void 0,treeDataDisplayType:void 0,enableGroupEdit:void 0,initialState:void 0,theme:void 0,loadThemeGoogleFonts:void 0,themeCssLayer:void 0,styleNonce:void 0,themeStyleContainer:void 0,getContextMenuItems:void 0,getMainMenuItems:void 0,postProcessPopup:void 0,processUnpinnedColumns:void 0,processCellForClipboard:void 0,processHeaderForClipboard:void 0,processGroupHeaderForClipboard:void 0,processCellFromClipboard:void 0,sendToClipboard:void 0,processDataFromClipboard:void 0,isExternalFilterPresent:void 0,doesExternalFilterPass:void 0,getChartToolbarItems:void 0,createChartContainer:void 0,focusGridInnerElement:void 0,navigateToNextHeader:void 0,tabToNextHeader:void 0,navigateToNextCell:void 0,tabToNextCell:void 0,getLocaleText:void 0,getDocument:void 0,paginationNumberFormatter:void 0,getGroupRowAgg:void 0,isGroupOpenByDefault:void 0,initialGroupOrderComparator:void 0,processPivotResultColDef:void 0,processPivotResultColGroupDef:void 0,getDataPath:void 0,getChildCount:void 0,getServerSideGroupLevelParams:void 0,isServerSideGroupOpenByDefault:void 0,isApplyServerSideTransaction:void 0,isServerSideGroup:void 0,getServerSideGroupKey:void 0,getBusinessKeyForNode:void 0,getRowId:void 0,resetRowDataOnUpdate:void 0,processRowPostCreate:void 0,isRowSelectable:void 0,isRowMaster:void 0,fillOperation:void 0,postSortRows:void 0,getRowStyle:void 0,getRowClass:void 0,getRowHeight:void 0,isFullWidthRow:void 0,"onColumn-everything-changed":void 0,"onNew-columns-loaded":void 0,"onColumn-pivot-mode-changed":void 0,"onPivot-max-columns-exceeded":void 0,"onColumn-row-group-changed":void 0,"onExpand-or-collapse-all":void 0,"onColumn-pivot-changed":void 0,"onGrid-columns-changed":void 0,"onColumn-value-changed":void 0,"onColumn-moved":void 0,"onColumn-visible":void 0,"onColumn-pinned":void 0,"onColumn-group-opened":void 0,"onColumn-resized":void 0,"onDisplayed-columns-changed":void 0,"onVirtual-columns-changed":void 0,"onColumn-header-mouse-over":void 0,"onColumn-header-mouse-leave":void 0,"onColumn-header-clicked":void 0,"onColumn-header-context-menu":void 0,"onAsync-transactions-flushed":void 0,"onRow-group-opened":void 0,"onRow-data-updated":void 0,"onPinned-row-data-changed":void 0,"onRange-selection-changed":void 0,"onCell-selection-changed":void 0,"onChart-created":void 0,"onChart-range-selection-changed":void 0,"onChart-options-changed":void 0,"onChart-destroyed":void 0,"onTool-panel-visible-changed":void 0,"onTool-panel-size-changed":void 0,"onModel-updated":void 0,"onCut-start":void 0,"onCut-end":void 0,"onPaste-start":void 0,"onPaste-end":void 0,"onFill-start":void 0,"onFill-end":void 0,"onCell-selection-delete-start":void 0,"onCell-selection-delete-end":void 0,"onRange-delete-start":void 0,"onRange-delete-end":void 0,"onUndo-started":void 0,"onUndo-ended":void 0,"onRedo-started":void 0,"onRedo-ended":void 0,"onCell-clicked":void 0,"onCell-double-clicked":void 0,"onCell-mouse-down":void 0,"onCell-context-menu":void 0,"onCell-value-changed":void 0,"onCell-edit-request":void 0,"onRow-value-changed":void 0,"onHeader-focused":void 0,"onCell-focused":void 0,"onRow-selected":void 0,"onSelection-changed":void 0,"onTooltip-show":void 0,"onTooltip-hide":void 0,"onCell-key-down":void 0,"onCell-mouse-over":void 0,"onCell-mouse-out":void 0,"onFilter-changed":void 0,"onFilter-modified":void 0,"onFilter-opened":void 0,"onAdvanced-filter-builder-visible-changed":void 0,"onSort-changed":void 0,"onVirtual-row-removed":void 0,"onRow-clicked":void 0,"onRow-double-clicked":void 0,"onGrid-ready":void 0,"onGrid-pre-destroyed":void 0,"onGrid-size-changed":void 0,"onViewport-changed":void 0,"onFirst-data-rendered":void 0,"onDrag-started":void 0,"onDrag-stopped":void 0,"onDrag-cancelled":void 0,"onRow-editing-started":void 0,"onRow-editing-stopped":void 0,"onCell-editing-started":void 0,"onCell-editing-stopped":void 0,"onBody-scroll":void 0,"onBody-scroll-end":void 0,"onPagination-changed":void 0,"onComponent-state-changed":void 0,"onStore-refreshed":void 0,"onState-updated":void 0,"onColumn-menu-visible-changed":void 0,"onContext-menu-visible-changed":void 0,"onRow-drag-enter":void 0,"onRow-drag-move":void 0,"onRow-drag-leave":void 0,"onRow-drag-end":void 0,"onRow-drag-cancel":void 0,"onFind-changed":void 0}}const fk=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function mk(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function Yi(e){const t=o=>mk(o)?c.toRaw(o):Array.isArray(o)?o.map(i=>t(i)):c.isRef(o)||c.isReactive(o)||c.isProxy(o)?t(c.toRaw(o)):o;return t(e)}const vk={ref:"root"},Ck=c.defineComponent({__name:"AgGridVue",props:c.mergeModels(c.mergeDefaults({gridOptions:{},modules:{},statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},pinnedTopRowData:{},pinnedBottomRowData:{},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},"onTool-panel-visible-changed":{},"onTool-panel-size-changed":{},"onColumn-menu-visible-changed":{},"onContext-menu-visible-changed":{},"onCut-start":{},"onCut-end":{},"onPaste-start":{},"onPaste-end":{},"onColumn-visible":{},"onColumn-pinned":{},"onColumn-resized":{},"onColumn-moved":{},"onColumn-value-changed":{},"onColumn-pivot-mode-changed":{},"onColumn-pivot-changed":{},"onColumn-group-opened":{},"onNew-columns-loaded":{},"onGrid-columns-changed":{},"onDisplayed-columns-changed":{},"onVirtual-columns-changed":{},"onColumn-everything-changed":{},"onColumn-header-mouse-over":{},"onColumn-header-mouse-leave":{},"onColumn-header-clicked":{},"onColumn-header-context-menu":{},"onComponent-state-changed":{},"onCell-value-changed":{},"onCell-edit-request":{},"onRow-value-changed":{},"onCell-editing-started":{},"onCell-editing-stopped":{},"onRow-editing-started":{},"onRow-editing-stopped":{},"onUndo-started":{},"onUndo-ended":{},"onRedo-started":{},"onRedo-ended":{},"onCell-selection-delete-start":{},"onCell-selection-delete-end":{},"onRange-delete-start":{},"onRange-delete-end":{},"onFill-start":{},"onFill-end":{},"onFilter-opened":{},"onFilter-changed":{},"onFilter-modified":{},"onAdvanced-filter-builder-visible-changed":{},"onFind-changed":{},"onChart-created":{},"onChart-range-selection-changed":{},"onChart-options-changed":{},"onChart-destroyed":{},"onCell-key-down":{},"onGrid-ready":{},"onGrid-pre-destroyed":{},"onFirst-data-rendered":{},"onGrid-size-changed":{},"onModel-updated":{},"onVirtual-row-removed":{},"onViewport-changed":{},"onBody-scroll":{},"onBody-scroll-end":{},"onDrag-started":{},"onDrag-stopped":{},"onDrag-cancelled":{},"onState-updated":{},"onPagination-changed":{},"onRow-drag-enter":{},"onRow-drag-move":{},"onRow-drag-leave":{},"onRow-drag-end":{},"onRow-drag-cancel":{},"onColumn-row-group-changed":{},"onRow-group-opened":{},"onExpand-or-collapse-all":{},"onPivot-max-columns-exceeded":{},"onPinned-row-data-changed":{},"onRow-data-updated":{},"onAsync-transactions-flushed":{},"onStore-refreshed":{},"onHeader-focused":{},"onCell-clicked":{},"onCell-double-clicked":{},"onCell-focused":{},"onCell-mouse-over":{},"onCell-mouse-out":{},"onCell-mouse-down":{},"onRow-clicked":{},"onRow-double-clicked":{},"onRow-selected":{},"onSelection-changed":{},"onCell-context-menu":{},"onRange-selection-changed":{},"onCell-selection-changed":{},"onTooltip-show":{},"onTooltip-hide":{},"onSort-changed":{}},gk()),{modelValue:{},modelModifiers:{}}),emits:c.mergeModels(["update:modelValue"],["update:modelValue"]),setup(e,{expose:t,emit:o}){const i=e,s=c.useTemplateRef("root"),r=c.ref(void 0),n=c.ref(!1),a=c.ref(!1),l=c.ref(!1),d=c.ref({}),u=c.ref(null),h=c.toRefs(i);Ba.filter(C=>C!="gridOptions").forEach(C=>{c.watch(()=>h[C],(R,F)=>{(C==="rowData"&&!m.value||C!=="rowData")&&D(C,R),m.value=!1},{deep:!0})});const p=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),g=c.useModel(e,"modelValue"),f=c.ref(!1),m=c.ref(!1),b=o;c.watch(g,(C,R)=>{n.value&&(m.value||(f.value=!0,D("rowData",Yi(C),Yi(R))),m.value=!1)},{deep:!0});const w=fk(()=>{m.value=!0,b("update:modelValue",P())},10),S=c.getCurrentInstance(),y=C=>{var R,F;l.value&&p.has(C)&&(F=(R=S?.vnode)==null?void 0:R.props)!=null&&F["onUpdate:modelValue"]&&w()},x=()=>g.value||i.rowData||i.gridOptions.rowData,P=()=>{const C=[];return r?.value.forEachLeafNode(R=>{C.push(R.data)}),C},k=C=>R=>{if(a.value)return;R==="gridReady"&&(l.value=!0);const F=cs.has(R);F&&!C||!F&&C||p.has(R)&&(f.value||y(R),f.value=!1)},D=(C,R,F)=>{if(n.value){let L=R.value||R;C==="rowData"&&L!=null&&(L=Yi(L)),d.value[C]=L,u.value==null&&(u.value=window.setTimeout(()=>{u.value=null,Jf(d.value,r.value),d.value={}},0))}},v=()=>Object.create(c.getCurrentInstance().provides);return c.onMounted(()=>{ch.registerModules([ZF]);const C=new uk(c.getCurrentInstance(),v()),R={globalListener:k(),globalSyncListener:k(!0),frameworkOverrides:new pk(c.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:C},modules:i.modules},F=c.markRaw(Zf(Yi(i.gridOptions),i,[...Ba,...fp.map(O=>dl(O))])),L=x();L!==void 0&&(F.rowData=Yi(L)),r.value=j0(s.value,F,R),n.value=!0}),c.onUnmounted(()=>{var C;n.value&&((C=r?.value)==null||C.destroy(),a.value=!0)}),t({api:r}),(C,R)=>(c.openBlock(),c.createElementBlock("div",vk,null,512))}});var bk=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(e,t){let o=e[0],i=e[1],s=e[2],r=e[3];o=this.ff(o,i,s,r,t[0],7,-680876936),r=this.ff(r,o,i,s,t[1],12,-389564586),s=this.ff(s,r,o,i,t[2],17,606105819),i=this.ff(i,s,r,o,t[3],22,-1044525330),o=this.ff(o,i,s,r,t[4],7,-176418897),r=this.ff(r,o,i,s,t[5],12,1200080426),s=this.ff(s,r,o,i,t[6],17,-1473231341),i=this.ff(i,s,r,o,t[7],22,-45705983),o=this.ff(o,i,s,r,t[8],7,1770035416),r=this.ff(r,o,i,s,t[9],12,-1958414417),s=this.ff(s,r,o,i,t[10],17,-42063),i=this.ff(i,s,r,o,t[11],22,-1990404162),o=this.ff(o,i,s,r,t[12],7,1804603682),r=this.ff(r,o,i,s,t[13],12,-40341101),s=this.ff(s,r,o,i,t[14],17,-1502002290),i=this.ff(i,s,r,o,t[15],22,1236535329),o=this.gg(o,i,s,r,t[1],5,-165796510),r=this.gg(r,o,i,s,t[6],9,-1069501632),s=this.gg(s,r,o,i,t[11],14,643717713),i=this.gg(i,s,r,o,t[0],20,-373897302),o=this.gg(o,i,s,r,t[5],5,-701558691),r=this.gg(r,o,i,s,t[10],9,38016083),s=this.gg(s,r,o,i,t[15],14,-660478335),i=this.gg(i,s,r,o,t[4],20,-405537848),o=this.gg(o,i,s,r,t[9],5,568446438),r=this.gg(r,o,i,s,t[14],9,-1019803690),s=this.gg(s,r,o,i,t[3],14,-187363961),i=this.gg(i,s,r,o,t[8],20,1163531501),o=this.gg(o,i,s,r,t[13],5,-1444681467),r=this.gg(r,o,i,s,t[2],9,-51403784),s=this.gg(s,r,o,i,t[7],14,1735328473),i=this.gg(i,s,r,o,t[12],20,-1926607734),o=this.hh(o,i,s,r,t[5],4,-378558),r=this.hh(r,o,i,s,t[8],11,-2022574463),s=this.hh(s,r,o,i,t[11],16,1839030562),i=this.hh(i,s,r,o,t[14],23,-35309556),o=this.hh(o,i,s,r,t[1],4,-1530992060),r=this.hh(r,o,i,s,t[4],11,1272893353),s=this.hh(s,r,o,i,t[7],16,-155497632),i=this.hh(i,s,r,o,t[10],23,-1094730640),o=this.hh(o,i,s,r,t[13],4,681279174),r=this.hh(r,o,i,s,t[0],11,-358537222),s=this.hh(s,r,o,i,t[3],16,-722521979),i=this.hh(i,s,r,o,t[6],23,76029189),o=this.hh(o,i,s,r,t[9],4,-640364487),r=this.hh(r,o,i,s,t[12],11,-421815835),s=this.hh(s,r,o,i,t[15],16,530742520),i=this.hh(i,s,r,o,t[2],23,-995338651),o=this.ii(o,i,s,r,t[0],6,-198630844),r=this.ii(r,o,i,s,t[7],10,1126891415),s=this.ii(s,r,o,i,t[14],15,-1416354905),i=this.ii(i,s,r,o,t[5],21,-57434055),o=this.ii(o,i,s,r,t[12],6,1700485571),r=this.ii(r,o,i,s,t[3],10,-1894986606),s=this.ii(s,r,o,i,t[10],15,-1051523),i=this.ii(i,s,r,o,t[1],21,-2054922799),o=this.ii(o,i,s,r,t[8],6,1873313359),r=this.ii(r,o,i,s,t[15],10,-30611744),s=this.ii(s,r,o,i,t[6],15,-1560198380),i=this.ii(i,s,r,o,t[13],21,1309151649),o=this.ii(o,i,s,r,t[4],6,-145523070),r=this.ii(r,o,i,s,t[11],10,-1120210379),s=this.ii(s,r,o,i,t[2],15,718787259),i=this.ii(i,s,r,o,t[9],21,-343485551),e[0]=this.add32(o,e[0]),e[1]=this.add32(i,e[1]),e[2]=this.add32(s,e[2]),e[3]=this.add32(r,e[3])}cmn(e,t,o,i,s,r){return t=this.add32(this.add32(t,e),this.add32(i,r)),this.add32(t<<s|t>>>32-s,o)}ff(e,t,o,i,s,r,n){return this.cmn(t&o|~t&i,e,t,s,r,n)}gg(e,t,o,i,s,r,n){return this.cmn(t&i|o&~i,e,t,s,r,n)}hh(e,t,o,i,s,r,n){return this.cmn(t^o^i,e,t,s,r,n)}ii(e,t,o,i,s,r,n){return this.cmn(o^(t|~i),e,t,s,r,n)}md51(e){const t=e.length,o=[1732584193,-271733879,-1732584194,271733878];let i;for(i=64;i<=e.length;i+=64)this.md5cycle(o,this.md5blk(e.substring(i-64,i)));e=e.substring(i-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<e.length;i++)s[i>>2]|=e.charCodeAt(i)<<(i%4<<3);if(s[i>>2]|=128<<(i%4<<3),i>55)for(this.md5cycle(o,s),i=0;i<16;i++)s[i]=0;return s[14]=t*8,this.md5cycle(o,s),o}md5blk(e){const t=[];for(let o=0;o<64;o+=4)t[o>>2]=e.charCodeAt(o)+(e.charCodeAt(o+1)<<8)+(e.charCodeAt(o+2)<<16)+(e.charCodeAt(o+3)<<24);return t}rhex(e){const t="0123456789abcdef".split("");let o="",i=0;for(;i<4;i++)o+=t[e>>i*8+4&15]+t[e>>i*8&15];return o}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){const o=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(o>>16)<<16|o&65535}},ir={"01":"GRID","02":"CHARTS","0102":"BOTH"},qd="https://www.ag-grid.com/licensing/",Lp=class ut{constructor(t){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=t,this.md5=new bk,this.md5.init()}validateLicense(){const t=this.getLicenseDetails(ut.licenseKey),o=`AG Grid ${t.currentLicenseType==="BOTH"?"and AG Charts ":""}Enterprise`,i=t.suppliedLicenseType===void 0?"":`AG ${t.suppliedLicenseType==="BOTH"?"Grid and AG Charts":t.suppliedLicenseType==="GRID"?"Grid":"Charts"} Enterprise`;if(t.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(o);else if(t.expired){const s=ut.getGridReleaseDate(),r=ut.formatDate(s);this.outputExpiredKey(t.expiry,r,o,i)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,o,i):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,o,i)}static extractExpiry(t){const o=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(ut.decode(o),10))}static extractLicenseComponents(t){let o=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(o=o.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};const i=o.length-32,s=o.substring(i),r=o.substring(0,i),[n,a,l]=ut.extractBracketedInformation(o);return{md5:s,license:r,version:n,isTrial:a,type:l}}getLicenseDetails(t){const o=ut.chartsLicenseManager?"BOTH":"GRID";if(!t?.length)return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:o};const i=ut.getGridReleaseDate(),{md5:s,license:r,version:n,isTrial:a,type:l}=ut.extractLicenseComponents(t);let d=s===this.md5.md5(r)&&t.indexOf("For_Trialing_ag-Grid_Only")===-1,u,h,p=null,g=!1,f;function m(){u=p<new Date,h=void 0}if(d&&(p=ut.extractExpiry(r),d=!isNaN(p.getTime()),d))switch(h=i>p,n){case"legacy":case"2":{a&&m();break}case"3":l?.length?(f=l,l!==ir["01"]&&l!==ir["0102"]||o==="BOTH"&&f!=="BOTH"?(d=!1,g=!0):a&&m()):d=!1}return d?{licenseKey:t,valid:d,expiry:ut.formatDate(p),expired:h,version:n,isTrial:a,trialExpired:u,incorrectLicenseType:g,currentLicenseType:o,suppliedLicenseType:f}:{licenseKey:t,valid:d,incorrectLicenseType:g,currentLicenseType:o,suppliedLicenseType:f}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!!this.watermarkMessage?.length}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){const o=(this.document.defaultView||window).location,{hostname:i=""}=o;return i}isForceWatermark(){const o=(this.document.defaultView||window).location,{pathname:i}=o;return i?i.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){return this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)!==null}isLocalhost(){return this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)!==null}static formatDate(t){const o=["January","February","March","April","May","June","July","August","September","October","November","December"],i=t.getDate(),s=t.getMonth(),r=t.getFullYear();return i+" "+o[s]+" "+r}static getGridReleaseDate(){return new Date(parseInt(ut.decode(ut.RELEASE_INFORMATION),10))}static decode(t){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let i="",s,r,n,a,l,d,u,h=0;const p=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;h<p.length;)a=o.indexOf(p.charAt(h++)),l=o.indexOf(p.charAt(h++)),d=o.indexOf(p.charAt(h++)),u=o.indexOf(p.charAt(h++)),s=a<<2|l>>4,r=(l&15)<<4|d>>2,n=(d&3)<<6|u,i=i+String.fromCharCode(s),d!=64&&(i=i+String.fromCharCode(r)),u!=64&&(i=i+String.fromCharCode(n));return i=ut.utf8_decode(i),i}static utf8_decode(t){t=t.replace(/rn/g,"n");let o="";for(let i=0;i<t.length;i++){const s=t.charCodeAt(i);s<128?o+=String.fromCharCode(s):s>127&&s<2048?(o+=String.fromCharCode(s>>6|192),o+=String.fromCharCode(s&63|128)):(o+=String.fromCharCode(s>>12|224),o+=String.fromCharCode(s>>6&63|128),o+=String.fromCharCode(s&63|128))}return o}static setChartsLicenseManager(t){this.chartsLicenseManager=t}static setLicenseKey(t){this.licenseKey=t,this.chartsLicenseManager?.setLicenseKey(t,!0)}static extractBracketedInformation(t){if(!t.includes("["))return["legacy",!1,void 0];const o=t.match(/\[(.*?)\]/g).map(a=>a.replace("[","").replace("]",""));if(!o||o.length===0)return["legacy",!1,void 0];const i=o.filter(a=>a==="TRIAL").length===1,s=o.filter(a=>a.indexOf("v")===0)[0],r=s?s.replace("v",""):"legacy",n=ir[o.filter(a=>ir[a])[0]];return[r,i,n]}centerPadAndOutput(t){const o=this.totalMessageLength-t.length;console.error(t.padStart(o/2+t.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(t,o="*",i=""){console.error(t.padEnd(this.totalMessageLength-i.length,o)+i)}outputInvalidLicenseKey(t,o,i){t?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${i} only and does not cover you for ${o}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${qd}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${qd}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(t,o,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${i} expired on ${t}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(t){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${t} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(t,o,i,s){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${s} released before ${t}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${o}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};Lp.RELEASE_INFORMATION="MTc0NDc4ODcwODE2Nw==";var sr=Lp,wk='.ag-watermark{bottom:20px;color:#9b9b9b;opacity:.7;position:absolute;transition:opacity 1s ease-out 3s;&:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDkiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMDkgMzYiPjxwYXRoIGZpbGw9IiM5QjlCOUIiIGQ9Ik0xOTIuOTkzIDIzLjY1OHYtNy45NDZoLTEzLjU0MWwtNy45NDcgNy45NDZ6TTIwOC4yNSAzLjk1aC0xNi45NzRsLTguMDEgNy45NDdoMjQuOTg0ek0xNjMuNjIyIDMxLjYwNWw0LjA2OS00LjA2OWgxMy43MzJ2Ny45NDdoLTE3LjgwMXoiLz48cGF0aCBmaWxsPSIjOUI5QjlCIiBkPSJNMTY2LjYxIDE5Ljc4aDguNzczbDguMDEtNy45NDZIMTY2LjYxek0xNTcuMDExIDMxLjYwNWg2LjYxMWw3Ljg4My03Ljk0N2gtMTQuNDk0ek0xOTEuMjc2IDMuOTVsLTQuMDY4IDQuMDdIMTYxLjI3Vi4wNzJoMzAuMDA2ek0yMC44NCAzMC4yMDZIOC4zNzhsLTIuMTYyIDUuMzRILjc1TDEyLjI1NyA4LjU5Mmg0Ljc2OEwyOC41MyAzNS41NDZoLTUuNTN6bS0xLjcxNy00LjI2TDE0LjYwOSAxNC45NWwtNC41MTQgMTAuOTk4ek0xMDQuNDM3IDE4LjUwOWMxLjU4OS0yLjM1MiA1LjU5NC0yLjYwNyA3LjI0Ny0yLjYwN3Y0LjU3OGMtMi4wMzQgMC00LjA2OS4wNjMtNS4yNzcuOTUzLTEuMjA3Ljg5LTEuODQzIDIuMDk4LTEuODQzIDMuNTZ2MTAuNTUzaC00Ljk1OVYxNS45MDJoNC43Njh6TTExOS4zNzYgMTUuOTAyaC00Ljk1OHYxOS42NDRoNC45NTh6TTExOS4zNzYgNy4xM2gtNC45NTh2NS44NDhoNC45NTh6TTE0My45NzkgNy4xM3YyOC40MTZoLTQuNzY4bC0uMTI3LTIuOTg4YTguMyA4LjMgMCAwIDEtMi42NyAyLjQ4Yy0xLjA4MS41NzItMi40MTYuODktMy45NDIuODktMS4zMzUgMC0yLjYwNi0uMjU1LTMuNjg3LS43LTEuMTQ0LS41MDgtMi4xNjItMS4xNDQtMi45ODgtMi4wMzRhOS42IDkuNiAwIDAgMS0xLjk3MS0zLjE3OWMtLjUwOC0xLjIwNy0uNjk5LTIuNjA2LS42OTktNC4xMzJzLjI1NC0yLjkyNC42OTktNC4xOTZjLjUwOS0xLjI3MSAxLjE0NS0yLjM1MiAxLjk3MS0zLjI0MnMxLjg0NC0xLjU4OSAyLjk4OC0yLjA5OCAyLjM1Mi0uNzYzIDMuNjg3LS43NjNjMS41MjYgMCAyLjc5Ny4yNTUgMy44NzguODI3czEuOTcxIDEuMzM1IDIuNjcgMi40MTZWNy4xOTNoNC45NTl6bS0xMC40MjYgMjQuNTM4YzEuNjUzIDAgMi45MjQtLjU3MiAzLjk0MS0xLjY1M3MxLjUyNi0yLjU0MyAxLjUyNi00LjMyMy0uNTA5LTMuMTc4LTEuNTI2LTQuMzIyYy0xLjAxNy0xLjA4MS0yLjI4OC0xLjY1My0zLjk0MS0xLjY1My0xLjU5IDAtMi45MjUuNTcyLTMuODc4IDEuNjUzLTEuMDE3IDEuMDgtMS41MjYgMi41NDMtMS41MjYgNC4zMjIgMCAxLjc4LjUwOSAzLjE4IDEuNTI2IDQuMjYgMS4wMTcgMS4xNDQgMi4yODggMS43MTYgMy44NzggMS43MTZNNTcuMjAyIDIwLjM1M0g0NC45MzN2NC4yNTloNi45OTNjLS4xOSAyLjE2MS0xLjAxNyAzLjgxNC0yLjQxNiA1LjE1LTEuMzk4IDEuMjctMy4xNzggMS45MDYtNS40NjcgMS45MDYtMS4yNzEgMC0yLjQ4LS4yNTQtMy40OTYtLjY5OWE3IDcgMCAwIDEtMi43MzQtMS45N2MtLjc2My0uODI3LTEuMzM1LTEuODQ0LTEuNzgtMy4wNTJzLS42MzYtMi40OC0uNjM2LTMuOTQyLjE5LTIuNzMzLjYzNi0zLjk0MWMuMzgxLTEuMjA4IDEuMDE3LTIuMTYyIDEuNzgtMy4wNTIuNzYzLS44MjYgMS42NTMtMS40NjIgMi43MzMtMS45N2E5LjEgOS4xIDAgMCAxIDMuNTYtLjdxNC4wMDUgMCA2LjEwMyAxLjkwN2wzLjMwNi0zLjMwNWMtMi40OC0xLjkwNy01LjY1OC0yLjkyNS05LjQwOS0yLjkyNS0yLjA5NyAwLTQuMDA0LjMxOC01LjcyMSAxLjAxOC0xLjcxNi42OTktMy4xNzkgMS41ODktNC4zODYgMi43OTdBMTIuMSAxMi4xIDAgMCAwIDMxLjIgMTYuMjJjLS42MzUgMS43MTctLjk1MyAzLjYyNC0uOTUzIDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1NyAxLjAxNyAyLjAzNSAwIDMuODc4LS4zMTggNS41MzEtMS4wMTcgMS42NTMtLjcgMy4wNTItMS41OSA0LjE5Ni0yLjc5N3ExLjcxNi0xLjgxMiAyLjY3LTQuMzg3Yy42MzYtMS43MTYuOTU0LTMuNjIzLjk1NC01LjY1OHYtLjgyNmMtLjE5MS0uMTI3LS4yNTUtLjQ0NS0uMjU1LS43TTk1Ljk4MiAyMC4zNTNoLTEyLjI3djQuMjU5aDYuOTkzYy0uMTkgMi4xNjEtMS4wMTcgMy44MTQtMi40MTYgNS4xNS0xLjM5OCAxLjI3LTMuMTc4IDEuOTA2LTUuNDY3IDEuOTA2LTEuMjcxIDAtMi40OC0uMjU0LTMuNDk2LS42OTlhNyA3IDAgMCAxLTIuNzM0LTEuOTdjLS43NjMtLjgyNy0xLjMzNS0xLjg0NC0xLjc4LTMuMDUycy0uNjM2LTIuNDgtLjYzNi0zLjk0Mi4xOS0yLjczMy42MzYtMy45NDFjLjM4MS0xLjIwOCAxLjAxNy0yLjE2MiAxLjc4LTMuMDUyLjc2My0uODI2IDEuNjUzLTEuNDYyIDIuNzM0LTEuOTdhOS4xIDkuMSAwIDAgMSAzLjU2LS43cTQuMDA1IDAgNi4xMDMgMS45MDdsMy4zMDUtMy4zMDVjLTIuNDc5LTEuOTA3LTUuNjU4LTIuOTI1LTkuNDA4LTIuOTI1LTIuMDk4IDAtNC4wMDUuMzE4LTUuNzIyIDEuMDE4LTEuNzE2LjY5OS0zLjE3OCAxLjU4OS00LjM4NiAyLjc5N2ExMi4xIDEyLjEgMCAwIDAtMi43OTcgNC4zODZjLS42MzYgMS43MTctLjk1NCAzLjYyNC0uOTU0IDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1OCAxLjAxNyAyLjAzNCAwIDMuODc4LS4zMTggNS41My0xLjAxNyAxLjY1My0uNyAzLjA1Mi0xLjU5IDQuMTk2LTIuNzk3cTEuNzE4LTEuODEyIDIuNjctNC4zODdjLjYzNi0xLjcxNi45NTQtMy42MjMuOTU0LTUuNjU4di0uODI2Yy0uMTktLjEyNy0uMjU1LS40NDUtLjI1NS0uNyIvPjwvc3ZnPg==");background-repeat:no-repeat;background-size:170px 40px;content:"";display:block;height:40px;width:170px}}:where(.ag-ltr) .ag-watermark{right:25px}:where(.ag-rtl) .ag-watermark{left:25px}.ag-watermark-text{font-family:Impact,sans-serif;font-size:19px;font-weight:700;opacity:.5}:where(.ag-ltr) .ag-watermark-text{padding-left:.7rem}:where(.ag-rtl) .ag-watermark-text{padding-right:.7rem}',yk={tag:"div",cls:"ag-watermark",children:[{tag:"div",ref:"eLicenseTextRef",cls:"ag-watermark-text"}]},Sk=class extends se{constructor(){super(yk),this.eLicenseTextRef=N,this.registerCSS(wk)}wireBeans(e){this.licenseManager=e.licenseManager}postConstruct(){const e=this.shouldDisplayWatermark();this.setDisplayed(e),e&&(this.eLicenseTextRef.textContent=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}},Rk={selector:"AG-WATERMARK",component:Sk},Bp=class extends A{constructor(){super(...arguments),this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){this.licenseManager=new sr(Ge(this.beans)),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new sr(null).getLicenseDetails(e)}getWatermarkSelector(){return Rk}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){sr.setLicenseKey(e)}static setChartsLicenseManager(e){sr.setChartsLicenseManager(e)}},$e="33.2.4",St={moduleName:"EnterpriseCore",version:$e,beans:[Bp],icons:{accordionOpen:"tree-open",accordionClosed:"tree-closed",accordionIndeterminate:"tree-indeterminate",close:"cross",cancel:"cancel",maximize:"maximize",minimize:"minimize",columnDrag:"grip"},dependsOn:[]},xk=".ag-panel{background-color:var(--ag-panel-background-color);display:flex;flex-direction:column;overflow:hidden;position:relative}.ag-dialog{border:var(--ag-dialog-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dialog-shadow);position:absolute}.ag-panel-title-bar{align-items:center;background-color:var(--ag-panel-title-bar-background-color);border-bottom:var(--ag-panel-title-bar-border);color:var(--ag-panel-title-bar-text-color);cursor:default;display:flex;flex:none;font-weight:var(--ag-panel-title-bar-font-weight);height:var(--ag-header-height);padding:var(--ag-spacing) var(--ag-cell-horizontal-padding)}.ag-panel-title-bar-button{color:var(--ag-panel-title-bar-icon-color);cursor:pointer}:where(.ag-ltr) .ag-panel-title-bar-button{margin-left:calc(var(--ag-spacing)*2);margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-panel-title-bar-button{margin-left:var(--ag-spacing);margin-right:calc(var(--ag-spacing)*2)}.ag-panel-title-bar-title{flex:1 1 auto}.ag-panel-title-bar-buttons{display:flex}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;overflow:hidden;position:relative}:where(.ag-dragging-fill-handle) .ag-dialog,:where(.ag-dragging-range-handle) .ag-dialog{opacity:.7;pointer-events:none}";function Fk(e){const t=e.cssIdentifier||"default";return{tag:"div",cls:`ag-panel ag-${t}-panel`,attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eTitleBar",cls:`ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable`,children:[{tag:"span",ref:"eTitle",cls:`ag-panel-title-bar-title ag-${t}-panel-title-bar-title`},{tag:"div",ref:"eTitleBarButtons",cls:`ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons`}]},{tag:"div",ref:"eContentWrapper",cls:`ag-panel-content-wrapper ag-${t}-panel-content-wrapper`}]}}var kk=class extends se{constructor(e){super(Fk(e)),this.config=e,this.closable=!0,this.eContentWrapper=N,this.eTitleBar=N,this.eTitleBarButtons=N,this.eTitle=N,this.registerCSS(xk)}postConstruct(){const{component:e,closable:t,hideTitleBar:o,title:i,minWidth:s=250,width:r,minHeight:n=250,height:a,centered:l,popup:d,x:u,y:h}=this.config;this.positionableFeature=new Cl(this.getGui(),{minWidth:s,width:r,minHeight:n,height:a,centered:l,x:u,y:h,popup:d,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const p=this.getGui();e&&this.setBodyComponent(e),o?Z(this.eTitleBar,!1):(i&&this.setTitle(i),this.setClosable(t??this.closable)),this.addManagedElementListeners(this.eTitleBar,{mousedown:g=>{if(p.contains(g.relatedTarget)||p.contains(Ae(this.beans))||this.eTitleBarButtons.contains(g.target)){g.preventDefault();return}const f=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");f&&f.focus()}}),!(d&&this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){const e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(e){if(e!==this.closable&&(this.closable=e),e){const t=this.closeButtonComp=new se({tag:"div",cls:"ag-button"});this.createBean(t);const o=t.getGui(),i=de("close",this.beans);i.classList.add("ag-panel-title-bar-button-icon"),o.appendChild(i),this.addTitleBarButton(t),t.addManagedElementListeners(o,{click:this.onBtClose.bind(this)})}else if(this.closeButtonComp){const t=this.closeButtonComp.getGui();t.parentElement.removeChild(t),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}addTitleBarButton(e,t){const o=this.eTitleBarButtons,i=o.children,s=i.length;t==null&&(t=s),t=Math.max(0,Math.min(t,s)),e.addCssClass("ag-panel-title-bar-button");const r=e.getGui();t===0?o.insertAdjacentElement("afterbegin",r):t===s?o.insertAdjacentElement("beforeend",r):i[t-1].insertAdjacentElement("afterend",r),e.setParentComponent(this)}getBodyHeight(){return an(this.eContentWrapper)}getBodyWidth(){return ws(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const e=this.getGui();e&&wt(e)&&this.close(),super.destroy()}},Dk=class extends kk{constructor(e){super({...e,popup:!0}),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){const e=this.getGui(),{movable:t,resizable:o,maximizable:i,modal:s,postProcessPopupParams:r}=this.config;if(this.addCssClass("ag-dialog"),super.postConstruct(),r){const{type:n,eventSource:a,column:l,mouseEvent:d,rowNode:u}=r;this.popupSvc?.callPostProcessPopup(n,e,a,d,l,u)}if(this.tabGuardFeature=this.createManagedBean(new Wh(this)),this.tabGuardFeature.initialiseTabGuard({isFocusableContainer:!0,onFocusIn:()=>{this.popupSvc?.bringPopupToFront(e)},onTabKeyDown:n=>{if(s)return;const a=n.shiftKey,l=so(this.beans,e,!1,a);(!l||this.tabGuardFeature.getTabGuardCtrl().isTabGuard(l))&&ai(this.beans,a)&&n.preventDefault()}}),t&&this.setMovable(t),i&&this.setMaximizable(i),o&&this.setResizable(o),!this.config.modal){const n=this.beans.ctrlsSvc.get("gridCtrl");n.addFocusableContainer(this),this.addDestroyFunc(()=>n.removeFocusableContainer(this))}}setAllowFocus(e){this.tabGuardFeature.getTabGuardCtrl().setAllowFocus(e)}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:o,title:i,afterGuiAttached:s}=this.config,r=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({modal:o,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:i||r("ariaLabelDialog","Dialog"),afterGuiAttached:s});n&&(this.close=n.hideFunc)}onClosed(e){this.destroy(),this.config.closedCallback?.(e)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:t,y:o,width:i,height:s}=this.lastPosition;this.setWidth(i),this.setHeight(s),this.positionableFeature.offsetElement(t,o)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){Z(this.maximizeIcon,!this.isMaximized),Z(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const o=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),o.addManagedElementListeners(o.getGui(),{click:this.toggleMaximize.bind(this)}),this.addTitleBarButton(o,0),this.maximizeListeners.push(...this.addManagedElementListeners(t,{dblclick:this.toggleMaximize.bind(this)})),[this.resizeListenerDestroy]=this.addManagedListeners(this.positionableFeature,{resize:()=>{this.isMaximized=!1,this.refreshMaximizeIcon()}})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new se({tag:"div",cls:"ag-dialog-button"})),t=e.getGui();return this.maximizeIcon=de("maximize",this.beans),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=de("minimize",this.beans),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}};function Mk(e){return{tag:"div",cls:`ag-virtual-list-viewport ag-${e}-virtual-list-viewport`,role:"presentation",children:[{tag:"div",ref:"eContainer",cls:`ag-virtual-list-container ag-${e}-virtual-list-container`}]}}var Op=class extends ui{constructor(e){super(Mk(e?.cssIdentifier||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=N,this.awaitStableCallbacks=[];const{cssIdentifier:t="default",ariaRole:o="listbox",listName:i,moveItemCallback:s}=e||{};this.cssIdentifier=t,this.ariaRole=o,this.listName=i,this.moveItemCallback=s}wireBeans(e){this.environment=e.environment}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.refreshAriaProperties(),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanged.bind(this)})}onGridStylesChanged(e){e.listItemHeightChanged&&(this.rowHeight=this.getItemHeight(),this.refresh())}refreshAriaProperties(){const t=this.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),o=this.eContainer;et(o,this.model?.getRowCount()>0?this.ariaRole:"presentation"),bt(o,t)}addResizeObserver(){const e=()=>Wt(this.beans,()=>this.drawVirtualRows()),t=No(this.beans,this.getGui(),e);this.addDestroyFunc(t)}focusInnerElement(e){return this.focusRow(e?this.model.getRowCount()-1:0),!0}onFocusIn(e){const t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=uf(t)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){const{key:t,shiftKey:o}=e;switch(t){case M.UP:case M.DOWN:{const i=t===M.UP;e.preventDefault(),o?this.moveItem(i):this.navigate(i)}break;case M.PAGE_HOME:case M.PAGE_END:case M.PAGE_UP:case M.PAGE_DOWN:this.navigateToPage(t)!==null&&e.preventDefault();break}}onTabKeyDown(e){mo(e),this.forceFocusOutOfContainer(e.shiftKey)}getNextRow(e){if(this.lastFocusedRowIndex==null)return;const t=this.lastFocusedRowIndex+(e?-1:1);if(!(t<0||t>=this.model.getRowCount()))return t}moveItem(e){if(!this.moveItemCallback)return;const t=this.getComponentAt(this.lastFocusedRowIndex);t&&this.moveItemCallback(t,e)}navigate(e){const t=this.getNextRow(e);t!==void 0&&this.focusRow(t)}navigateToPage(e,t="focused"){let o=!1;t==="focused"&&(t=this.getLastFocusedRow(),o=!0);const i=this.model.getRowCount()-1;let s=-1;return e===M.PAGE_HOME?s=0:e===M.PAGE_END?s=i:e===M.PAGE_DOWN?s=Math.min(t+this.pageSize,i):e===M.PAGE_UP&&(s=Math.max(t-this.pageSize,0)),s===-1?null:(o?this.focusRow(s):this.ensureIndexVisible(s),s)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),Wt(this.beans,()=>{if(this.isScrolling=!1,!this.isAlive())return;const t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){const t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,o)=>e(t.rowComponent,o))}getItemHeight(){return this.isHeightFromTheme?this.environment.getDefaultListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){const o=this.model.getRowCount();if(typeof e!="number"||e<0||e>=o)return H(229,{index:e}),!1;const i=e*this.rowHeight,s=i+this.rowHeight,r=this.getGui(),n=r.scrollTop,a=r.offsetHeight,l=n+a,d=t?0:this.rowHeight,u=n>i+d,h=l<s-d;if(u)return r.scrollTop=i,!0;if(h){const p=s-a;return r.scrollTop=p,!0}return!1}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(this.model==null||!this.isAlive())return;const t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,this.refreshAriaProperties(),this.awaitStable(()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}awaitStable(e){if(this.awaitStableCallbacks.push(e),this.awaitStableCallbacks.length>1)return;const t=this.model.getRowCount();Su(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{if(!this.isAlive())return;const o=this.awaitStableCallbacks;this.awaitStableCallbacks=[],o.forEach(i=>i())})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive()||!this.model)return;const t=this.getGui(),o=t.scrollTop,i=o+t.offsetHeight;if(o===i)this.clearVirtualRows();else{const s=Math.floor(o/this.rowHeight),r=Math.floor(i/this.rowHeight);this.pageSize=Math.floor((i-o)/this.rowHeight),this.ensureRowsRendered(s,r,e)}}ensureRowsRendered(e,t,o){this.renderedRows.forEach((i,s)=>{(s<e||s>t)&&s!==this.lastFocusedRowIndex&&this.removeRow(s)}),o&&this.refreshRows();for(let i=e;i<=t;i++)this.renderedRows.has(i)||i<this.model.getRowCount()&&this.insertRow(i)}insertRow(e){const t=this.model.getRow(e),o=this.ariaRole==="tree"?"treeitem":"option",i=Me({tag:"div",cls:`ag-virtual-list-item ag-${this.cssIdentifier}-virtual-list-item`,role:o,attrs:{tabindex:"-1"}});su(i,this.model.getRowCount()),ru(i,e+1),i.style.height=`${this.rowHeight}px`,i.style.top=`${this.rowHeight*e}px`;const s=this.componentCreator(t,i);s.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),i.appendChild(s.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",i):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",i):this.eContainer.appendChild(i),this.renderedRows.set(e,{rowComponent:s,eDiv:i,value:t})}removeRow(e){const t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){const e=this.model.getRowCount();this.renderedRows.forEach((t,o)=>{if(o>=e)this.removeRow(o);else{const i=this.model.getRow(o);this.model.areRowsEqual?.(t.value,i)?this.componentUpdater(i,t.rowComponent):this.removeRow(o)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),this.awaitStableCallbacks.length=0,super.destroy())}},Yn="ag-list-item-hovered",Pk=class extends A{constructor(e,t,o){super(),this.comp=e,this.virtualList=t,this.params=o,this.currentDragValue=null,this.lastHoveredListItem=null}wireBeans(e){this.dragAndDrop=e.dragAndDrop}postConstruct(){this.addManagedListeners(this.params.eventSource,{[this.params.listItemDragStartEvent]:this.listItemDragStart.bind(this),[this.params.listItemDragEndEvent]:this.listItemDragEnd.bind(this)}),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){const e={isInterestedIn:t=>t===this.params.dragSourceType,getIconName:()=>this.moveBlocked?"pinned":"move",getContainer:()=>this.comp.getGui(),onDragging:t=>this.onDragging(t),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave(),onDragCancel:()=>this.onDragCancel()};this.dragAndDrop?.addDropTarget(e)}createAutoScrollService(){const e=this.virtualList.getGui();this.autoScrollService=new Hv({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const t=this.getListDragItem(e),o=this.virtualList.getComponentAt(t.rowIndex);if(!o)return;const i=o.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,od(i,Yn),od(i,`ag-item-highlight-${t.position}`))}getListDragItem(e){const t=this.virtualList.getGui(),o=parseFloat(window.getComputedStyle(t).paddingTop),i=this.virtualList.getRowHeight(),s=this.virtualList.getScrollTop(),r=Math.max(0,(e.y-o+s)/i),n=this.params.getNumRows(this.comp)-1,a=Math.min(n,r)|0;return{rowIndex:a,position:Math.round(r)>r||r>n?"bottom":"top",component:this.virtualList.getComponentAt(a)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearDragProperties())}onDragCancel(){this.clearDragProperties()}onDragLeave(){this.clearDragProperties()}clearDragProperties(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${Yn}`).forEach(t=>{[Yn,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(o=>{t.classList.remove(o)})}),this.lastHoveredListItem=null}};function Yd(e,t){if(!t)return null;const o=ei(e),i=o.indexOf(t);if(i===-1)return null;let s=-1;for(let r=i-1;r>=0;r--)if(o[r].classList.contains(vr.TAB_GUARD_TOP)){s=r;break}return s<=0?null:o[s-1]}function Ek(e,t){if(!t)return!1;const o=e.querySelectorAll(`.${kh}`);if(!o.length)return!1;for(let i=0;i<o.length;i++)if(o[i].contains(t))return!0;return!1}var Ak={tag:"div"},Gp=class extends se{constructor(){super(Ak)}init(e){this.params=e,this.cssClassPrefix=this.params.cssClassPrefix??"ag-menu-option",this.addAriaAttributes(),this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addAriaAttributes(){const{checked:e,subMenu:t}=this.params,o=this.getGui();e&&lu(o,e),t&&eo(o,!1)}addIcon(){if(this.params.isCompact)return;const e=Me({tag:"span",ref:"eIcon",cls:`${this.getClassName("part")} ${this.getClassName("icon")}`,role:"presentation"}),{checked:t,icon:o}=this.params;t?e.appendChild(de("check",this.beans)):o&&(dn(o)?e.appendChild(o):typeof o=="string"?e.innerHTML=o:H(227)),this.getGui().appendChild(e)}addName(){const e=Me({tag:"span",ref:"eName",cls:`${this.getClassName("part")} ${this.getClassName("text")}`,children:this.params.name||""});this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;const e=Me({tag:"span",ref:"eShortcut",cls:`${this.getClassName("part")} ${this.getClassName("shortcut")}`,children:this.params.shortcut||""});this.getGui().appendChild(e)}addSubMenu(){const e=Me({tag:"span",ref:"ePopupPointer",cls:`${this.getClassName("part")} ${this.getClassName("popup-pointer")}`}),t=this.getGui();if(this.params.subMenu){const o=this.gos.get("enableRtl")?"subMenuOpenRtl":"subMenuOpen";e.appendChild(de(o,this.beans))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}},Tk='.ag-menu-list{cursor:default;display:table;padding:var(--ag-spacing) 0;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option{cursor:pointer;font-weight:500}:where(.ag-ltr) :where(.ag-menu-option-popup-pointer) .ag-icon{text-align:right}:where(.ag-rtl) :where(.ag-menu-option-popup-pointer) .ag-icon{text-align:left}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{display:flex;flex-wrap:nowrap;width:100%}.ag-compact-menu-option-text{flex:1 1 auto;white-space:nowrap}.ag-menu-separator{height:calc(var(--ag-spacing)*2 + 1px)}.ag-menu-separator-part:after{border-top:1px solid var(--ag-menu-separator-color);content:"";display:block}.ag-compact-menu-option-active,.ag-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-compact-menu-option-part,.ag-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-spacing) + 2px) 0}.ag-compact-menu-option-disabled,.ag-menu-option-disabled{cursor:not-allowed;opacity:.5}.ag-compact-menu-option-icon,.ag-menu-option-icon{width:var(--ag-icon-size)}:where(.ag-ltr) .ag-compact-menu-option-icon,:where(.ag-ltr) .ag-menu-option-icon{padding-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-compact-menu-option-icon,:where(.ag-rtl) .ag-menu-option-icon{padding-right:calc(var(--ag-spacing)*2)}.ag-compact-menu-option-text,.ag-menu-option-text{padding-left:calc(var(--ag-spacing)*2);padding-right:calc(var(--ag-spacing)*2)}:where(.ag-ltr) .ag-compact-menu-option-shortcut,:where(.ag-ltr) .ag-menu-option-shortcut{padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-compact-menu-option-shortcut,:where(.ag-rtl) .ag-menu-option-shortcut{padding-left:var(--ag-spacing)}:where(.ag-ltr) .ag-compact-menu-option-popup-pointer,:where(.ag-ltr) .ag-menu-option-popup-pointer{padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-compact-menu-option-popup-pointer,:where(.ag-rtl) .ag-menu-option-popup-pointer{padding-left:var(--ag-spacing)}.ag-menu-column-select-wrapper{height:265px;overflow:auto;:where(.ag-column-select){height:100%}}.ag-menu:where(.ag-tabs){min-width:290px}.ag-context-menu-loading-icon{pointer-events:none;position:absolute}',Np={moduleName:"MenuItem",version:$e,userComponents:{agMenuItem:Gp},icons:{check:"tick",subMenuOpen:"small-right",subMenuOpenRtl:"small-left"},css:[Tk]},Ik=".ag-column-select{display:flex;flex:3 1 0px;flex-direction:column;overflow:hidden;position:relative}.ag-column-select-header{align-items:center;display:flex;flex:none;gap:var(--ag-widget-horizontal-spacing);height:var(--ag-header-height);padding-left:var(--ag-widget-container-horizontal-padding);padding-right:var(--ag-widget-container-horizontal-padding);position:relative}.ag-column-select-column,.ag-column-select-column-group{align-items:center;display:flex;gap:var(--ag-widget-horizontal-spacing);height:100%;position:relative;&:where(:not(:last-child)){margin-bottom:var(--ag-widget-vertical-spacing)}}:where(.ag-ltr) .ag-column-select-column,:where(.ag-ltr) .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}:where(.ag-rtl) .ag-column-select-column,:where(.ag-rtl) .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-column-select-header-icon{border-radius:var(--ag-border-radius);cursor:pointer;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}:where(.ag-ltr) .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}:where(.ag-rtl) .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly{opacity:.5;pointer-events:none}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding)*.5) 0}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}",Lk=300,Bk={tag:"div",cls:"ag-column-select-header",role:"presentation",children:[{tag:"div",ref:"eExpand",cls:"ag-column-select-header-icon"},{tag:"ag-checkbox",ref:"eSelect",cls:"ag-column-select-header-checkbox"},{tag:"ag-input-text-field",ref:"eFilterTextField",cls:"ag-column-select-header-filter-wrapper"}]},Ok=class extends se{constructor(){super(Bk,[ci,Dl]),this.eExpand=N,this.eSelect=N,this.eFilterTextField=N}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:t=>{t.key===M.SPACE&&(t.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});const e=this.getLocaleTextFunc();this.eSelect.setInputAriaLabel(e("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)}init(e){this.params=e;const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.beans.colModel.ready&&this.showOrHideOptions()}createExpandIcons(){const e=this.beans;this.eExpand.appendChild(this.eExpandChecked=de("columnSelectOpen",e)),this.eExpand.appendChild(this.eExpandUnchecked=de("columnSelectClosed",e)),this.eExpand.appendChild(this.eExpandIndeterminate=de("columnSelectIndeterminate",e)),this.setExpandState(0)}showOrHideOptions(){const e=this.params,t=!e.suppressColumnFilter,o=!e.suppressColumnSelectAll,i=!e.suppressColumnExpandAll,s=!!this.beans.colModel.colDefCols?.treeDepth,r=this.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(r("searchOoo","Search...")),Z(this.eFilterTextField.getGui(),t),Z(this.eSelect.getGui(),o),Z(this.eExpand,i&&s)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=st(this,()=>{const e=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:e})},Lk)),this.onFilterTextChangedDebounced()}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(e){this.expandState=e,Z(this.eExpandChecked,e===0),Z(this.eExpandUnchecked,e===1),Z(this.eExpandIndeterminate,e===2)}setSelectionState(e){this.selectState=e,this.eSelect.setValue(this.selectState)}},Gk={selector:"AG-PRIMARY-COLS-HEADER",component:Ok};function Mi(e){return!!e&&typeof e.children<"u"}function ko(e){return Mi(e)?e.groupId:e.colId}function Vp(e,t,o){const i=(n,a)=>{const d=n.children.map(ko).includes(ko(a)),u=Se(n.children),h=u&&ko(u)!==ko(a);return d&&h};if(!Mi(e))return!0;const s=e,r=o;if(i(s,r)||s.groupId===t&&!s.children.map(ko).includes(ko(r)))return s.children.push(r),!0;for(let n=s.children.length-1;n>=0&&!Vp(s.children[n],t,o);n--);return!1}function Nk(e){const t=(s,r)=>Mi(s)&&Mi(r)&&ko(s)===ko(r),o=(s,r)=>{if(!Mi(r))return s;const n=s,a=r;return a.children&&a.groupId&&Vp(n,a.groupId,a.children[0])||a.children.forEach(l=>o(n,l)),n},i=[];for(let s=1;s<=e.length;s++){const r=e[s-1],n=e[s];t(r,n)?e[s]=o(r,n):i.push(r)}return i}function Vk(e,t){const o=[],i=(r,n)=>{if(Mi(r)){const a=r,l=typeof a.groupId<"u"?a.groupId:a.headerName,d=new as(a,l,!1,n),u=[];return a.children.forEach(h=>{const p=i(h,n+1);p&&u.push(p)}),d.setChildren(u),d}else{const a=r,l=a.colId?a.colId:a.field,d=e.getColDefCol(l);return d||o.push(a),d}},s=[];return t.forEach(r=>{const n=i(r,0);n&&s.push(n)}),o.length>0&&H(217,{invalidColIds:o}),s}function Hk(e,t){const o=_k(e),i=Nk(o);t(i)}function _k(e){const t=(s,r)=>{let n;if(je(s))if(s.isPadding())n=r;else{const l=Object.assign({},s.getColGroupDef());l.groupId=s.getGroupId(),l.children=[r],n=l}else{const l=Object.assign({},s.getColDef());l.colId=s.getColId(),n=l}const a=s.getOriginalParent();return a?t(a,n):n};return e.getCols().filter(s=>{const r=s.getColDef();return s.isPrimary()&&!r.showRowGroup}).map(s=>t(s,s.getColDef()))}var Qd=class{constructor(e,t,o,i=!1,s){this.displayName=e,this.depth=o,this.group=i,this.localEventService=new fo,i?(this.columnGroup=t,this._expanded=s,this.children=[]):this.column=t}get expanded(){return!!this._expanded}set expanded(e){e!==this._expanded&&(this._expanded=e,this.localEventService.dispatchEvent({type:"expandedChanged"}))}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}};function Hp(e,t,o,i){const s=zk(t);_p(e,s,o,i)}function _p(e,t,o,i){e.colModel.isPivotMode()?$k(e,t,o,i):Wk(e,t,o,i)}function zk(e){const t=[],o=i=>{i.forEach(s=>{s.passesFilter&&(s.group?o(s.children):t.push(s.column))})};return o(e),t}function Wk(e,t,o,i){const s=[];t.forEach(r=>{r.getColDef().lockVisible||r.isVisible()!=o&&s.push({colId:r.getId(),hide:!o})}),s.length>0&&pt(e,{state:s},i),e.selectionColSvc?.refreshVisibility(i)}function $k(e,t,o,i){Uk(e,t,o,i)}function Uk(e,t,o,i){const s=[],a=o?l=>{if(!l.isAnyFunctionActive())if(l.isAllowValue()){const d=typeof l.getAggFunc()=="string"?l.getAggFunc():e.aggFuncSvc?.getDefaultAggFunc(l);s.push({colId:l.getId(),aggFunc:d})}else l.isAllowRowGroup()?s.push({colId:l.getId(),rowGroup:!0}):l.isAllowPivot()&&s.push({colId:l.getId(),pivot:!0})}:l=>{(l.isPivotActive()||l.isRowGroupActive()||l.isValueActive())&&s.push({colId:l.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};t.forEach(a),s.length>0&&pt(e,{state:s},i)}function zp(e,t){const{columns:o,visibleState:i,pivotState:s,eventType:r}=t,n=o.map(a=>{const l=a.getColId();if(e.colModel.isPivotMode()){const d=s?.[l];return{colId:l,pivot:d?.pivot,rowGroup:d?.rowGroup,aggFunc:d?.aggFunc}}else return{colId:l,hide:!i?.[l]}});pt(e,{state:n},r)}function Wp(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}}function Xd(e,t,o,i){const s=t.getCol(o);e.groupData||(e.groupData={});const r=s.getColId(),n=e.groupData[r];n!==i&&(e.groupData[r]=i,e.dispatchCellChangedEvent(s,i,n))}function jk(e,t,o){e.group!==o&&(e.group,e.group=o,e.updateHasChildren(),t.selectionSvc?.updateRowSelectable(e),e.dispatchRowEvent("groupChanged"))}function Qr(e,t){const{gos:o,rowGroupColsSvc:i}=t;if(!i||!e)return!1;const s=o.get("groupLockGroupColumns");if(!e.isRowGroupActive()||s===0)return!1;if(s===-1)return!0;const r=i.columns.findIndex(n=>n.getColId()===e.getColId());return s>r}var Kk=class extends ui{constructor(e){super(),this.setTemplateFromElement(e.getGui(),void 0,void 0,!0)}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===M.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}};function qk(e,t,o){return e.getCompDetails(t,Yk,"agMenuItem",o,!0)}var Yk={name:"menuItem",optionalMethods:["setActive","select","setExpanded","configureDefaults"]},Qk={tag:"div",cls:"ag-menu",role:"presentation"},Oa=class extends A{constructor(){super(...arguments),this.ACTIVATION_DELAY=80,this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory,this.registry=e.registry}init(e){const{menuItemDef:t,isAnotherSubMenuOpen:o,level:i,childComponent:s,contextParams:r}=e;return this.params=e.menuItemDef,this.level=i,this.isAnotherSubMenuOpen=o,this.childComponent=s,this.contextParams=r,this.cssClassPrefix=this.params.menuItemParams?.cssClassPrefix??"ag-menu-option",qk(this.userCompFactory,this.params,J(this.gos,{...t,level:i,isAnotherSubMenuOpen:o,openSubMenu:a=>this.openSubMenu(a),closeSubMenu:()=>this.closeSubMenu(),closeMenu:a=>this.closeMenu(a),updateTooltip:(a,l)=>this.refreshTooltip(a,l),onItemActivated:()=>this.onItemActivated()}))?.newAgStackInstance().then(a=>{this.menuItemComp=a;const l=a.configureDefaults?.();l&&this.configureDefaults(l===!0?void 0:l)})??Ce.resolve()}addListeners(e,t){t?.suppressClick||this.addManagedElementListeners(e,{click:o=>this.onItemSelected(o)}),t?.suppressKeyboardSelect||this.addManagedElementListeners(e,{keydown:o=>{(o.key===M.ENTER||o.key===M.SPACE)&&(o.preventDefault(),this.onItemSelected(o))}}),t?.suppressMouseDown||this.addManagedElementListeners(e,{mousedown:o=>{o.stopPropagation(),o.preventDefault()}}),t?.suppressMouseOver||this.addManagedElementListeners(e,{mouseenter:()=>this.onMouseEnter(),mouseleave:()=>this.onMouseLeave()})}isDisabled(){return!!this.params.disabled}openSubMenu(e=!1,t){if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const o=Me(Qk);this.eSubMenuGui=o;let i,s=()=>{this.subMenuIsOpening=!1};if(this.childComponent){const d=this.createBean(new Kk(this.childComponent));d.setParentComponent(this);const u=d.getGui(),h="mouseenter",p=()=>this.cancelDeactivate();u.addEventListener(h,p),i=()=>{u.removeEventListener(h,p),this.destroyBean(d)},o.appendChild(u),this.childComponent.afterGuiAttached&&(s=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){const d=this.createBean(new Ol(this.level+1,this.contextParams));d.setParentComponent(this),d.addMenuItems(this.params.subMenu),o.appendChild(d.getGui()),this.addManagedListeners(d,{closeMenu:u=>this.dispatchLocalEvent(u)}),d.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),i=()=>this.destroyBean(d),e&&(s=()=>{d.activateFirstItem(),this.subMenuIsOpening=!1})}const{popupSvc:r}=this,n=()=>{const d=this.eGui,{column:u,node:h}=this.contextParams;r?.positionPopupForMenu({eventSource:d,ePopup:o,event:t instanceof MouseEvent?t:void 0,column:u,node:h})},a=this.getLocaleTextFunc(),l=r?.addPopup({modal:!0,eChild:o,positionCallback:n,anchorToElement:this.eGui,ariaLabel:a("ariaLabelSubMenu","SubMenu"),afterGuiAttached:s});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{l&&l.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),i(),this.menuItemComp.setExpanded?.(!1),this.eSubMenuGui=void 0},this.menuItemComp.setExpanded?.(!0)}setAriaExpanded(e){this.suppressAria||eo(this.eGui,e)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(e,t){this.cancelActivate(),!(this.params.disabled&&!t)&&(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!0),this.suppressFocus||bu(this.beans,()=>this.eGui.focus({preventScroll:!t})),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!1),this.isActive=!1,this.subMenuIsOpen&&this.closeSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(e){this.parentComponent=e}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(e){this.menuItemComp.select?.(),this.params.action?this.beans.frameworkOverrides.wrapOutgoing(()=>this.params.action(J(this.gos,{...this.contextParams}))):this.openSubMenu(e&&e.type==="keydown",e),!(this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect)&&this.closeMenu(e)}closeMenu(e){const t={type:"closeMenu"};e&&(e instanceof MouseEvent?t.mouseEvent=e:t.keyboardEvent=e),this.dispatchLocalEvent(t)}onItemActivated(){const e={type:"menuItemActivated",menuItem:this};this.dispatchLocalEvent(e)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),this.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),this.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(e));return}let t=this.menuItemComp.getGui();const{suppressRootStyles:o,suppressTooltip:i,suppressAria:s,suppressTabIndex:r,suppressFocus:n}=e||{},a=this.menuItemComp.getRootElement?.();a&&(o||t.classList.add("ag-menu-option-custom"),t=a),this.eGui=t,this.suppressRootStyles=!!o,this.suppressRootStyles||(t.classList.add(this.cssClassPrefix),this.params.cssClasses?.forEach(l=>t.classList.add(l)),this.params.disabled&&t.classList.add(`${this.cssClassPrefix}-disabled`)),i||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!s,this.suppressAria||(et(t,"menuitem"),this.params.subMenu&&Rf(t,this.params.subMenuRole??"menu"),this.params.disabled&&ou(t,!0)),r||t.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(t,e),this.suppressFocus=!!n}refreshTooltip(e,t){if(this.tooltip=e,this.tooltipFeature=this.destroyBean(this.tooltipFeature),!e||!this.menuItemComp)return;const o=this.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t});o&&(this.tooltipFeature=this.createBean(o))}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),this.menuItemComp?.destroy?.(),super.destroy()}},Ol=class extends ui{constructor(e=0,t){super({tag:"div",cls:"ag-menu-list",role:"menu"}),this.level=e,this.menuItems=[],this.params=t??{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>bu(this.beans,()=>this.handleKeyDown(e)),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){this.getParentComponent()?.getGui()?.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case M.UP:case M.RIGHT:case M.DOWN:case M.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case M.ESCAPE:this.closeIfIsChild()&&mo(e);break}}handleFocusIn(e){const t=e.relatedTarget;!this.tabGuardFeature.getTabGuardCtrl().isTabGuard(t)&&(this.getGui().contains(t)||this.activeMenuItem?.getSubMenuGui()?.contains(t))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){const t=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(t)||this.activeMenuItem.getSubMenuGui()?.contains(t)||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){e!=null&&Ce.all(e.map(t=>t==="separator"?Ce.resolve({eGui:this.createSeparator()}):typeof t=="string"?(H(228,{menuItemOrString:t}),Ce.resolve({eGui:null})):this.addItem(t))).then(t=>{(t??[]).forEach(o=>{o?.eGui&&(this.appendChild(o.eGui),o.comp&&this.menuItems.push(o.comp))})})}addItem(e){const t=this.createManagedBean(new Oa);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(o=>o.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListeners(t,{closeMenu:o=>{this.dispatchLocalEvent(o)},menuItemActivated:o=>{this.activeMenuItem&&this.activeMenuItem!==o.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=o.menuItem}}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){const e=this.menuItems.filter(t=>!t.isDisabled())[0];e&&e.activate()}createSeparator(){const e={tag:"div",cls:"ag-menu-separator-part"};return Me({tag:"div",cls:"ag-menu-separator",attrs:{"aria-hidden":"true"},children:[e,e,e,e]})}handleNavKey(e){switch(e){case M.UP:case M.DOWN:{const o=this.findNextItem(e===M.UP);o&&o!==this.activeMenuItem&&o.activate(!1,!0);return}}const t=this.gos.get("enableRtl")?M.RIGHT:M.LEFT;e===t?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();return t&&t instanceof Oa?(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0):!1}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=[...this.menuItems];if(!t.length)return;if(!this.activeMenuItem)return e?Se(t):t[0];e&&t.reverse();let o,i=!1;for(const s of t){if(!i){s===this.activeMenuItem&&(i=!0);continue}o=s;break}return i&&!o?t[0]:o||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}},$p=class extends se{constructor(e,t,o){super({tag:"div",cls:"ag-menu"}),this.column=e,this.mouseEvent=t,this.parentEl=o,this.displayName=null}postConstruct(){const{column:e,beans:{colNames:t}}=this;this.initializeProperties(e);let o;if(to(e)?o=t.getDisplayNameForColumn(e,"columnToolPanel"):o=t.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),this.displayName=o,this.buildMenuItemMap(),this.isActive()){this.mouseEvent.preventDefault();const i=this.getMappedMenuItems();if(i.length===0)return;this.displayContextMenu(i)}}initializeProperties(e){let t;je(e)?t=e.getLeafColumns():t=[e],this.columns=t,this.allowGrouping=t.some(o=>o.isPrimary()&&o.isAllowRowGroup()),this.allowValues=t.some(o=>o.isPrimary()&&o.isAllowValue()),this.allowPivoting=this.beans.colModel.isPivotMode()&&t.some(o=>o.isPrimary()&&o.isAllowPivot())}buildMenuItemMap(){const e=this.getLocaleTextFunc(),{beans:t,displayName:o}=this,{rowGroupColsSvc:i,valueColsSvc:s,pivotColsSvc:r,colModel:n}=t,a=new Map;this.menuItemMap=a,a.set("rowGroup",{allowedFunction:l=>l.isPrimary()&&l.isAllowRowGroup()&&!Qr(l,t),activeFunction:l=>l.isRowGroupActive(),activateLabel:()=>`${e("groupBy","Group by")} ${o}`,deactivateLabel:()=>`${e("ungroupBy","Un-Group by")} ${o}`,activateFunction:()=>i?.setColumns(this.addColumnsToList(i.columns),"toolPanelUi"),deActivateFunction:()=>i?.setColumns(this.removeColumnsFromList(i.columns),"toolPanelUi"),addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),a.set("value",{allowedFunction:l=>l.isPrimary()&&l.isAllowValue(),activeFunction:l=>l.isValueActive(),activateLabel:()=>e("addToValues",`Add ${o} to values`,[o]),deactivateLabel:()=>e("removeFromValues",`Remove ${o} from values`,[o]),activateFunction:()=>s?.setColumns(this.addColumnsToList(s.columns),"toolPanelUi"),deActivateFunction:()=>s?.setColumns(this.removeColumnsFromList(s.columns),"toolPanelUi"),addIcon:"valuePanel",removeIcon:"valuePanel"}),a.set("pivot",{allowedFunction:l=>n.isPivotMode()&&l.isPrimary()&&l.isAllowPivot(),activeFunction:l=>l.isPivotActive(),activateLabel:()=>e("addToLabels",`Add ${o} to labels`,[o]),deactivateLabel:()=>e("removeFromLabels",`Remove ${o} from labels`,[o]),activateFunction:()=>r?.setColumns(this.addColumnsToList(r.columns),"toolPanelUi"),deActivateFunction:()=>r?.setColumns(this.removeColumnsFromList(r.columns),"toolPanelUi"),addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(e){return[...e].concat(this.columns.filter(t=>e.indexOf(t)===-1))}removeColumnsFromList(e){return e.filter(t=>this.columns.indexOf(t)===-1)}displayContextMenu(e){const t=this.getGui(),o=this.createBean(new Ol),i=this.getLocaleTextFunc();let s=()=>{};t.appendChild(o.getGui()),o.addMenuItems(e),o.addManagedListeners(o,{closeMenu:()=>{this.parentEl.focus(),s()}});const r=this.beans.popupSvc,n=r.addPopup({modal:!0,eChild:t,closeOnEsc:!0,afterGuiAttached:()=>Et(o.getGui()),ariaLabel:i("ariaLabelContextMenu","Context Menu"),closedCallback:a=>{a instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(o)}});n&&(s=n.hideFunc),r.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:t})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const e=[],{menuItemMap:t,columns:o,displayName:i,beans:s}=this;for(const r of t.values()){const n=o.some(l=>r.allowedFunction(l)&&!r.activeFunction(l)),a=o.some(l=>r.allowedFunction(l)&&r.activeFunction(l));n&&e.push({name:r.activateLabel(i),icon:de(r.addIcon,s,null),action:()=>r.activateFunction()}),a&&e.push({name:r.deactivateLabel(i),icon:de(r.removeIcon,s,null),action:()=>r.deActivateFunction()})}return e}},Xk={tag:"div",cls:"ag-column-select-column-group",children:[{tag:"span",ref:"eColumnGroupIcons",cls:"ag-column-group-icons",children:[{tag:"span",ref:"eGroupClosedIcon",cls:"ag-column-group-closed-icon"},{tag:"span",ref:"eGroupOpenedIcon",cls:"ag-column-group-opened-icon"}]},{tag:"ag-checkbox",ref:"cbSelect",cls:"ag-column-select-checkbox"},{tag:"span",ref:"eLabel",cls:"ag-column-select-column-label"}]},Up=class extends se{constructor(e,t,o,i){super(),this.modelItem=e,this.allowDragging=t,this.eventType=o,this.focusWrapper=i,this.cbSelect=N,this.eLabel=N,this.eGroupOpenedIcon=N,this.eGroupClosedIcon=N,this.eColumnGroupIcons=N,this.processingColumnStateChange=!1;const{columnGroup:s,depth:r,displayName:n}=e;this.columnGroup=s,this.columnDepth=r,this.displayName=n}postConstruct(){this.setTemplate(Xk,[ci]);const{beans:e,cbSelect:t,eLabel:o,displayName:i,columnDepth:s,modelItem:r,focusWrapper:n,columnGroup:a}=this,{registry:l,gos:d}=e,u=de("columnDrag",e);this.eDragHandle=u,u.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const h=t.getGui(),p=t.getInputElement();h.insertAdjacentElement("afterend",u),p.setAttribute("tabindex","-1"),o.innerHTML=i??"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+s),this.getGui().style.setProperty("--ag-indentation-level",String(s)),this.tooltipFeature=this.createOptionalManagedBean(l.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getLocation:()=>"columnToolPanelColumnGroup",shouldDisplayTooltip:Ml(d,()=>o)})),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(o,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(t,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(r,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(n,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),hh(a.getColGroupDef(),d,null,a).forEach(f=>this.addOrRemoveCssClass(f,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const e=this.columnGroup.getColGroupDef();if(!e)return;const t=()=>this.tooltipFeature?.setTooltipAndRefresh(e.headerTooltip);t(),this.addManagedEventListeners({newColumnsLoaded:t})}handleKeyDown(e){switch(e.key){case M.LEFT:e.preventDefault(),this.modelItem.expanded=!1;break;case M.RIGHT:e.preventDefault(),this.modelItem.expanded=!0;break;case M.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(e){const{columnGroup:t,gos:o}=this;if(o.get("functionsReadOnly"))return;const i=this.createBean(new $p(t,e,this.focusWrapper));this.addDestroyFunc(()=>{i.isAlive()&&this.destroyBean(i)})}addVisibilityListenersToAllChildren(){const e=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{this.addManagedListeners(t,{visibleChanged:e,columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e})})}setupDragging(){if(!this.allowDragging){Z(this.eDragHandle,!1);return}const e=this.beans,{gos:t,eventSvc:o,dragAndDrop:i}=e;let s=!t.get("suppressDragLeaveHidesColumns");const r={type:gn.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>s?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{s=!t.get("suppressDragLeaveHidesColumns"),o.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{o.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{s&&zp(e,{columns:this.columnGroup.getLeafColumns(),visibleState:n?.visibleState,pivotState:n?.pivotState,eventType:this.eventType})},onGridExit:()=>{s&&this.onChangeCommon(!1)}};i.addDragSource(r,!0),this.addDestroyFunc(()=>i.removeDragSource(r))}createDragItem(){const e=this.columnGroup.getLeafColumns(),t={},o={};return e.forEach(i=>{const s=i.getId();t[s]=i.isVisible(),o[s]=Wp(i)}),{columns:e,visibleState:t,pivotState:o}}setupExpandContract(){const{beans:e,eGroupClosedIcon:t,eGroupOpenedIcon:o,eColumnGroupIcons:i}=this;t.appendChild(Bo("columnSelectClosed",e,null)),o.appendChild(Bo("columnSelectOpen",e,null));const s=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(t,{click:s}),this.addManagedElementListeners(o,{click:s});const r=new mi(i,!0);this.addManagedListeners(r,{tap:s}),this.addDestroyFunc(r.destroy.bind(r))}onLabelClicked(){const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}getVisibleLeafColumns(){const e=[],t=o=>{o.forEach(i=>{i.passesFilter&&(i.group?t(i.children):e.push(i.column))})};return t(this.modelItem.children),e}onChangeCommon(e){this.refreshAriaLabel(),!this.processingColumnStateChange&&Hp(this.beans,this.modelItem.children,e,this.eventType)}refreshAriaLabel(){const{cbSelect:e,focusWrapper:t,displayName:o}=this,i=this.getLocaleTextFunc(),s=i("ariaColumnGroup","Column Group"),r=e.getValue(),n=r===void 0?i("ariaIndeterminate","indeterminate"):r?i("ariaVisible","visible"):i("ariaHidden","hidden"),a=i("ariaToggleVisibility","Press SPACE to toggle visibility");bt(t,`${o} ${s}`),e.setInputAriaLabel(`${a} (${n})`),Ja(t,e.getInputElement().id)}onColumnStateChanged(){const e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0;const o=this.cbSelect;o.setValue(e),o.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1}workOutSelectedValue(){const e=this.beans.colModel.isPivotMode(),t=this.getVisibleLeafColumns();let o=0,i=0;if(t.forEach(s=>{!e&&s.getColDef().lockVisible||(this.isColumnChecked(s,e)?o++:i++)}),!(o>0&&i>0))return o>0}workOutReadOnlyValue(){const e=this.beans.colModel.isPivotMode();let t=0;return this.columnGroup.getLeafColumns().forEach(o=>{e?o.isAnyFunctionAllowed()&&t++:o.getColDef().lockVisible||t++}),t===0}isColumnChecked(e,t){if(t){const o=e.isPivotActive(),i=e.isRowGroupActive(),s=e.isValueActive();return o||i||s}return e.isVisible()}onExpandOrContractClicked(){const e=this.modelItem,t=e.expanded;e.expanded=!t}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const e=this.modelItem.expanded;Z(this.eGroupClosedIcon,!e),Z(this.eGroupOpenedIcon,e)}refreshAriaExpanded(){eo(this.focusWrapper,this.modelItem.expanded)}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect,o=t.getValue();!t.isReadOnly()&&(e&&!o||!e&&o)&&t.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(e){this.cbSelect.setValue(e,!0)}},Qn=e=>je(e)?e.getLeafColumns():e?[e]:[],Zk=(e,t,o,i)=>{if(!o||!t)return null;const s=e.colModel.getCols(),r=s.indexOf(o),n=i?r:r+1,a=Jk(s,t,n);return n-a},Jk=(e,t,o)=>{if(!t)return 0;const i=t[0],s=t.length;return e.indexOf(i)<o?s:0},Zd=(e,t,o)=>e.get("suppressMovableColumns")||t.colModel.isPivotMode()?!0:!!o.find(({colDef:r})=>!!r.suppressMovable||!!r.lockPosition),Jd=(e,t,o)=>{if(!o)return;const{component:i}=o;let s=null,r=o.position==="top";if(i instanceof Up?(s=i.getColumns()[0],r=!0):i&&(s=i.column),!s)return;const n=Zk(e,t,s,r);n!=null&&e.colMoves?.moveColumns(t,n,"toolPanelUi")},eD=e=>e.column,tD={tag:"div",cls:"ag-column-select-column",children:[{tag:"ag-checkbox",ref:"cbSelect",cls:"ag-column-select-checkbox"},{tag:"span",ref:"eLabel",cls:"ag-column-select-column-label"}]},oD=class extends se{constructor(e,t,o,i){super(),this.modelItem=e,this.allowDragging=t,this.groupsExist=o,this.focusWrapper=i,this.eLabel=N,this.cbSelect=N,this.processingColumnStateChange=!1;const{column:s,depth:r,displayName:n}=e;this.column=s,this.columnDepth=r,this.displayName=n}postConstruct(){this.setTemplate(tD,[ci]);const{beans:e,cbSelect:t,displayName:o,eLabel:i,columnDepth:s,groupsExist:r,column:n,gos:a,focusWrapper:l}=this,d=de("columnDrag",e);this.eDragHandle=d,d.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const u=t.getGui(),h=t.getInputElement();u.insertAdjacentElement("afterend",d),h.setAttribute("tabindex","-1");const p=Mt(o);i.innerHTML=p,r&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${s}`),this.getGui().style.setProperty("--ag-indentation-level",String(s)),this.tooltipFeature=this.createOptionalManagedBean(e.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getLocation:()=>"columnToolPanelColumn",getColDef:()=>n.getColDef(),shouldDisplayTooltip:Ml(a,()=>i)})),this.setupDragging();const g=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:g}),this.addManagedListeners(n,{columnValueChanged:g,columnPivotChanged:g,columnRowGroupChanged:g,visibleChanged:g}),this.addManagedListeners(l,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(t,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(i,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),hh(n.getColDef(),a,n,null).forEach(m=>this.addOrRemoveCssClass(m,!0))}getColumn(){return this.column}setupTooltip(){const e=()=>this.tooltipFeature?.setTooltipAndRefresh(this.column.getColDef().headerTooltip);e(),this.addManagedEventListeners({newColumnsLoaded:e})}onContextMenu(e){const{column:t,gos:o}=this;if(o.get("functionsReadOnly"))return;const i=this.createBean(new $p(t,e,this.focusWrapper));this.addDestroyFunc(()=>{i.isAlive()&&this.destroyBean(i)})}handleKeyDown(e){e.key===M.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}onChangeCommon(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&_p(this.beans,[this.column],e,"toolPanelUi"))}refreshAriaLabel(){const{cbSelect:e,focusWrapper:t,displayName:o}=this,i=this.getLocaleTextFunc(),s=i("ariaColumn","Column"),r=e.getValue()?i("ariaVisible","visible"):i("ariaHidden","hidden"),n=i("ariaToggleVisibility","Press SPACE to toggle visibility");bt(t,`${o} ${s}`),this.cbSelect.setInputAriaLabel(`${n} (${r})`),Ja(t,e.getInputElement().id)}setupDragging(){const e=this.eDragHandle;if(!this.allowDragging){Z(e,!1);return}const t=this.beans,{gos:o,eventSvc:i,dragAndDrop:s}=t;let r=!o.get("suppressDragLeaveHidesColumns");const n={type:gn.ToolPanel,eElement:e,dragItemName:this.displayName,getDefaultIconName:()=>r?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{r=!o.get("suppressDragLeaveHidesColumns"),i.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{i.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:a=>{r&&zp(t,{columns:[this.column],visibleState:a?.visibleState,pivotState:a?.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{r&&this.onChangeCommon(!1)}};s.addDragSource(n,!0),this.addDestroyFunc(()=>s.removeDragSource(n))}createDragItem(){const e=this.column.getColId(),t={[e]:this.column.isVisible()},o={[e]:Wp(this.column)};return{columns:[this.column],visibleState:t,pivotState:o}}onColumnStateChanged(){this.processingColumnStateChange=!0;const e=this.beans.colModel.isPivotMode();if(e){const i=this.column.isAnyFunctionActive();this.cbSelect.setValue(i)}else this.cbSelect.setValue(this.column.isVisible());let t=!0,o=!0;if(e){const i=this.gos.get("functionsReadOnly"),s=!this.column.isAnyFunctionAllowed();t=!i&&!s,o=t}else{const{enableRowGroup:i,enableValue:s,lockPosition:r,suppressMovable:n,lockVisible:a}=this.column.getColDef(),l=!!i||!!s,d=!!r||!!n;t=!a,o=l||!d}this.cbSelect.setReadOnly(!t),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!o),this.addOrRemoveCssClass("ag-column-select-column-readonly",!o&&!t),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect;e!==t.getValue()&&(t.isReadOnly()||t.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(e){H(158)}},iD=class{constructor(e){this.items=e}getRowCount(){return this.items.length}getRow(e){return this.items[e]}},sD="ag-column-select-list",rD=class extends se{constructor(){super({tag:"div",cls:sD,role:"presentation"}),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1,this.skipRefocus=!1}wireBeans(e){this.colModel=e.colModel}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(e=>e()),this.destroyColumnItemFuncs=[]}init(e,t,o){this.params=e;const{suppressSyncLayoutWithGrid:i,contractColumnSelection:s,suppressColumnMove:r}=e;this.allowDragging=t,this.eventType=o,i||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const n=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:n,columnPivotModeChanged:n,columnRowGroupChanged:n,columnValueChanged:n,columnVisible:n,newColumnsLoaded:n}),this.expandGroupsByDefault=!s;const a=r||i,l=this.createManagedBean(new Op({cssIdentifier:"column-select",ariaRole:"tree",moveItemCallback:(d,u)=>{a||this.moveItems(d,u)}}));this.virtualList=l,this.appendChild(l.getGui()),l.setComponentCreator((d,u)=>(tu(u,d.depth+1),this.createComponentFromItem(d,u))),this.colModel.ready&&this.onColumnsChanged(),!a&&this.createItemDragFeature()}createItemDragFeature(){const{gos:e,beans:t,eventSvc:o,virtualList:i}=this;this.createManagedBean(new Pk(this,i,{dragSourceType:gn.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:o,getCurrentDragValue:s=>eD(s),isMoveBlocked:s=>Zd(e,t,Qn(s)),getNumRows:s=>s.getDisplayedColsList().length,moveItem:(s,r)=>Jd(t,Qn(s),r)}))}moveItems(e,t){const{gos:o,beans:i}=this,{modelItem:s}=e,{group:r,columnGroup:n,column:a,expanded:l}=s,d=Qn(r?n:a);if(Zd(o,i,d))return;const u=this.displayedColsList.indexOf(s),h=t?-1:1;let p=0;if(t){const f=e.columnDepth>0&&a.getParent()?.getChildren();f&&f.length&&a===f[0]&&(p=-1)}else r&&(p=l?s.children.length:0);const g=Math.min(Math.max(u+p+h,0),this.displayedColsList.length-1);this.skipRefocus=!0,Jd(i,d,{position:t?"top":"bottom",component:this.virtualList.getComponentAt(g)}),this.focusRowIfAlive(g-p).then(()=>{this.skipRefocus=!1})}createComponentFromItem(e,t){const o=this.allowDragging;if(e.group){const s=new Up(e,o,this.eventType,t);return this.createBean(s),s}const i=new oD(e,o,this.groupsExist,t);return this.createBean(i),i}onColumnsChanged(){const e=this.params;this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!e.initialState);const t=this.getExpandedStates(),o=this.colModel.isPivotMode();!e.suppressSyncLayoutWithGrid&&!o?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const e={};if(this.isInitialState){const{expandedGroupIds:t}=this.params.initialState;return t.forEach(o=>{e[o]=!0}),e}return this.allColsTree?(this.forEachItem(t=>{if(!t.group)return;const o=t.columnGroup;o&&(e[o.getId()]=t.expanded)}),e):{}}setExpandedStates(e){if(!this.allColsTree)return;const{isInitialState:t}=this;this.forEachItem(o=>{if(!o.group)return;const i=o.columnGroup;if(i){const s=e[i.getId()];(s!=null||t)&&(o.expanded=!!s)}})}buildTreeFromWhatGridIsDisplaying(){Hk(this.colModel,this.setColumnLayout.bind(this))}setColumnLayout(e){const t=Vk(this.colModel,e);this.buildListModel(t),this.groupsExist=e.some(o=>o&&typeof o.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){const e=this.colModel;this.buildListModel(e.getColDefColTree()),this.groupsExist=!!e.colDefCols?.treeDepth}buildListModel(e){const t=this.onColumnExpanded.bind(this),o=a=>{a.addEventListener("expandedChanged",t);const l=a.removeEventListener.bind(a,"expandedChanged",t);this.destroyColumnItemFuncs.push(l)},i=this.beans.colNames,s=(a,l,d)=>{a.forEach(u=>{je(u)?r(u,l,d):n(u,l,d)})},r=(a,l,d)=>{const u=a.getColGroupDef();if(u&&u.suppressColumnsToolPanel)return;if(a.isPadding()){s(a.getChildren(),l,d);return}const p=i.getDisplayNameForProvidedColumnGroup(null,a,"columnToolPanel"),g=new Qd(p,a,l,!0,this.expandGroupsByDefault);d.push(g),o(g),s(a.getChildren(),l+1,g.children)},n=(a,l,d)=>{if(a.getColDef()&&a.getColDef().suppressColumnsToolPanel)return;const h=i.getDisplayNameForColumn(a,"columnToolPanel");d.push(new Qd(h,a,l))};this.destroyColumnTree(),s(e,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const e=i=>{i.passesFilter&&(this.displayedColsList.push(i),i.group&&i.expanded&&i.children.forEach(e))},t=this.virtualList;this.allColsTree.forEach(e),t.setModel(new iD(this.displayedColsList));let o=null;this.skipRefocus||(o=t.getLastFocusedRow()),t.refresh(),o!=null&&this.focusRowIfAlive(o),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const e=this.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),o=e("columns","Columns"),i=this.displayedColsList.length;bt(this.virtualList.getAriaElement(),`${t} ${i} ${o}`)}focusRowIfAlive(e){return e===-1?Promise.resolve():new Promise(t=>{window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(e),t()},0)})}forEachItem(e){const t=i=>{i.forEach(s=>{e(s),s.group&&t(s.children)})},o=this.allColsTree;o&&t(o)}doSetExpandedAll(e){this.forEachItem(t=>{t.group&&(t.expanded=e)})}setGroupsExpanded(e,t){if(!t){this.doSetExpandedAll(e);return}const o=[];this.forEachItem(s=>{if(!s.group)return;const r=s.columnGroup.getId();t.indexOf(r)>=0&&(s.expanded=e,o.push(r))});const i=t.filter(s=>!o.includes(s));i.length>0&&H(157,{unrecognisedGroupIds:i})}getExpandState(){let e=0,t=0;return this.forEachItem(o=>{o.group&&(o.expanded?e++:t++)}),e>0&&t>0?2:t>0?1:0}doSetSelectedAll(e){Hp(this.beans,this.allColsTree,e,this.eventType)}getSelectionState(){let e=0,t=0;const o=this.colModel.isPivotMode();if(this.forEachItem(i=>{if(i.group||!i.passesFilter)return;const s=i.column,r=s.getColDef();let n;if(o){if(!s.isAllowPivot()&&!s.isAllowRowGroup()&&!s.isAllowValue())return;n=s.isValueActive()||s.isPivotActive()||s.isRowGroupActive()}else{if(r.lockVisible)return;n=s.isVisible()}n?e++:t++}),!(e>0&&t>0))return!(e===0||t>0)}setFilterText(e){this.filterText=j(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const e=o=>{if(!j(this.filterText))return!0;const i=o.displayName;return i==null||i.toLowerCase().indexOf(this.filterText)!==-1},t=(o,i)=>{let s=!1;if(o.group){const n=e(o);o.children.forEach(a=>{const l=t(a,n||i);l&&(s=l)})}const r=i||s?!0:e(o);return o.passesFilter=r,r};this.allColsTree.forEach(o=>t(o,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const e=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:e})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const e=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:e})}getExpandedGroups(){const e=[];return this.allColsTree&&this.forEachItem(t=>{t.group&&t.expanded&&e.push(t.columnGroup.getId())}),e}},nD={selector:"AG-PRIMARY-COLS-LIST",component:rD},aD={tag:"div",cls:"ag-column-select",children:[{tag:"ag-primary-cols-header",ref:"primaryColsHeaderPanel"},{tag:"ag-primary-cols-list",ref:"primaryColsListPanel"}]},lD=class extends se{constructor(){super(aD,[Gk,nD]),this.primaryColsHeaderPanel=N,this.primaryColsListPanel=N,this.registerCSS(Ik)}init(e,t,o){const{primaryColsHeaderPanel:i,primaryColsListPanel:s}=this;i.init(t);const r=t.suppressColumnFilter,n=t.suppressColumnSelectAll;t.suppressColumnExpandAll&&r&&n&&i.setDisplayed(!1),this.addManagedListeners(s,{groupExpanded:l=>{i.setExpandState(l.state),t.onStateUpdated()},selectionChanged:l=>i.setSelectionState(l.state)}),s.init(t,e,o),this.addManagedListeners(i,{expandAll:s.doSetExpandedAll.bind(s,!0),collapseAll:s.doSetExpandedAll.bind(s,!1),selectAll:s.doSetSelectedAll.bind(s,!0),unselectAll:s.doSetSelectedAll.bind(s,!1),filterChanged:l=>s.setFilterText(l.filterText)}),this.positionableFeature=this.createManagedBean(new Cl(this.getGui(),{minHeight:100}))}toggleResizable(e){this.positionableFeature.setResizable(e?{bottom:!0}:!1)}expandGroups(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)}collapseGroups(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)}setColumnLayout(e){this.primaryColsListPanel.setColumnLayout(e)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},dD=class extends A{constructor(){super(...arguments),this.beanName="chartMenuItemMapper"}getChartItems(e){const t=this.beans,o=t.chartSvc,i=e==="pivotChart";if(!o)return null;const s=this.getLocaleTextFunc.bind(this),r=i?new cD(t,o,s):new uD(t,o,s),n=o.isEnterprise();let a=r.getMenuItem();if(a&&a.subMenu&&!n){const d=u=>({...u,subMenu:u.subMenu?.filter(h=>!h._enterprise).map(h=>d(h))});a=d(a)}const l=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;return l&&(a=this.filterAndOrderChartMenu(a,l,r.getConfigLookup())),this.cleanInternals(a)}cleanInternals(e){if(!e)return e;const t=o=>(delete o?._key,delete o?._enterprise,o?.subMenu?.forEach(i=>t(i)),o);return t(e)}buildLookup(e){const t={},o=i=>{t[i._key]=i,i.subMenu&&i.subMenu.forEach(s=>o(s))};return o(e),t}filterAndOrderChartMenu(e,t,o){const i=this.buildLookup(e),s={...e,subMenu:[]};for(const r of Object.keys(t)){const n=t[r],a=o[r];if(a===null)continue;if(a==null){H(173,{group:r});continue}const l=i[a._key];if(l)if(l.subMenu){const d=n.map(u=>{const h=a[u];if(h==null){H(174,{group:r,chartType:u});return}return i[h]}).filter(u=>u!==void 0);d.length>0&&(l.subMenu=d,s.subMenu?.push(l))}else s.subMenu?.push(l)}return s.subMenu?.length==0?null:s}},cD=class{constructor(e,t,o){this.beans=e,this.chartSvc=t,this.getLocaleTextFunc=o}getMenuItem(){const e=this.getLocaleTextFunc(),t=(o,i,s,r,n=!1)=>({name:e(o,i+""),action:()=>this.chartSvc.createPivotChart({chartType:s}),_key:r,_enterprise:n});return{name:e("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped","groupedColumn","pivotGroupedColumn"),t("stackedColumn","Stacked","stackedColumn","pivotStackedColumn"),t("normalizedColumn","100% Stacked","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped","groupedBar","pivotGroupedBar"),t("stackedBar","Stacked","stackedBar","pivotStackedBar"),t("normalizedBar","100% Stacked","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:e("pieChart","Pie"),subMenu:[t("pie","Pie","pie","pivotPie"),t("donut","Donut","donut","pivotDonut")]},{_key:"pivotLineChart",name:e("lineChart","Line"),subMenu:[t("lineChart","Line","line","pivotLineChart"),t("stackedLine","Stacked","stackedLine","pivotStackedLine"),t("normalizedLine","100% Stacked","normalizedLine","pivotNormalizedLine")]},{_key:"pivotAreaChart",name:e("areaChart","Area"),subMenu:[t("areaChart","Area","area","pivotArea"),t("stackedArea","Stacked","stackedArea","pivotStackedArea"),t("normalizedArea","100% Stacked","normalizedArea","pivotNormalizedArea")]},{_key:"pivotXYChart",name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter","scatter","pivotScatter"),t("bubble","Bubble","bubble","pivotBubble")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:e("statisticalChart","Statistical"),subMenu:[t("histogramChart","Histogram","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemapChart","Treemap","treemap","pivotTreemap",!0),t("sunburstChart","Sunburst","sunburst","pivotSunburst",!0)]},{_key:"pivotFunnel",name:e("funnel","Funnel"),subMenu:[t("funnel","Funnel","funnel","pivotFunnel"),t("coneFunnel","Cone Funnel","coneFunnel","pivotConeFunnel"),t("pyramid","Pyramid","pyramid","pivotPyramid")]},{_key:"pivotCombinationChart",name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line","columnLineCombo","pivotColumnLineCombo"),t("AreaColumnCombo","Area & Column","areaColumnCombo","pivotAreaColumnCombo")]}],icon:de("chart",this.beans,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart",stackedLine:"pivotStackedLine",normalizedLine:"pivotNormalizedLine"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},funnelGroup:{_key:"pivotFunnel",funnel:"pivotFunnel",coneFunnel:"pivotConeFunnel",pyramid:"pivotPyramid"},polarGroup:null,specializedGroup:null}}},uD=class{constructor(e,t,o){this.beans=e,this.chartSvc=t,this.getLocaleTextFunc=o}getMenuItem(){const e=this.getLocaleTextFunc(),t=(o,i,s,r,n=!1)=>({name:e(o,i),action:()=>this.chartSvc.createChartFromCurrentRange(s),_key:r,_enterprise:n});return{name:e("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped","groupedColumn","rangeGroupedColumn"),t("stackedColumn","Stacked","stackedColumn","rangeStackedColumn"),t("normalizedColumn","100% Stacked","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped","groupedBar","rangeGroupedBar"),t("stackedBar","Stacked","stackedBar","rangeStackedBar"),t("normalizedBar","100% Stacked","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:e("pieChart","Pie"),subMenu:[t("pie","Pie","pie","rangePie"),t("donut","Donut","donut","rangeDonut")],_key:"rangePieChart"},{name:e("lineChart","Line"),subMenu:[t("lineChart","Line","line","rangeLineChart"),t("stackedLine","Stacked","stackedLine","rangeStackedLine"),t("normalizedLine","100% Stacked","normalizedLine","rangeNormalizedLine")],_key:"rangeLineChart"},{name:e("areaChart","Area"),subMenu:[t("areaChart","Area","area","rangeArea"),t("stackedArea","Stacked","stackedArea","rangeStackedArea"),t("normalizedArea","100% Stacked","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter","scatter","rangeScatter"),t("bubble","Bubble","bubble","rangeBubble")],_key:"rangeXYChart"},{name:e("polarChart","Polar"),subMenu:[t("radarLine","Radar Line","radarLine","rangeRadarLine"),t("radarArea","Radar Area","radarArea","rangeRadarArea"),t("nightingale","Nightingale","nightingale","rangeNightingale"),t("radialColumn","Radial Column","radialColumn","rangeRadialColumn"),t("radialBar","Radial Bar","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:e("statisticalChart","Statistical"),subMenu:[t("boxPlot","Box Plot","boxPlot","rangeBoxPlot",!0),t("histogramChart","Histogram","histogram","rangeHistogram",!1),t("rangeBar","Range Bar","rangeBar","rangeRangeBar",!0),t("rangeArea","Range Area","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemap","Treemap","treemap","rangeTreemap"),t("sunburst","Sunburst","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:e("specializedChart","Specialized"),subMenu:[t("heatmap","Heatmap","heatmap","rangeHeatmap"),t("waterfall","Waterfall","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0},{name:e("funnel","Funnel"),subMenu:[t("funnel","Funnel","funnel","rangeFunnel"),t("coneFunnel","Cone Funnel","coneFunnel","rangeConeFunnel"),t("pyramid","Pyramid","pyramid","rangePyramid")],_key:"rangeFunnel",_enterprise:!0},{name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line","columnLineCombo","rangeColumnLineCombo"),t("AreaColumnCombo","Area & Column","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:de("chart",this.beans,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart",stackedLine:"rangeStackedLine",normalizedLine:"rangeNormalizedLine"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},funnelGroup:{_key:"rangeFunnel",funnel:"rangeFunnel",coneFunnel:"rangeConeFunnel",pyramid:"rangePyramid"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},hD=class extends A{constructor(){super(...arguments),this.beanName="colChooserFactory"}createColumnSelectPanel(e,t,o,i){const s=e.createManagedBean(new lD),r=i??t?.getColDef().columnChooserParams??{},{contractColumnSelection:n,suppressColumnExpandAll:a,suppressColumnFilter:l,suppressColumnSelectAll:d,suppressSyncLayoutWithGrid:u,columnLayout:h}=r;return s.init(!!o,J(this.gos,{suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!n,suppressColumnExpandAll:!!a,suppressColumnFilter:!!l,suppressColumnSelectAll:!!d,suppressSyncLayoutWithGrid:!!h||!!u,onStateUpdated:()=>{}}),"columnMenu"),h&&s.setColumnLayout(h),s}showColumnChooser({column:e,chooserParams:t,eventSource:o,headerPosition:i}){this.hideActiveColumnChooser();const s=this.createColumnSelectPanel(this,e,!0,t),r=this.getLocaleTextFunc(),n=this.beans,{visibleCols:a,focusSvc:l,menuUtils:d}=n,u=a.allCols.indexOf(e),h=e?l.focusedHeader??i??null:null;this.activeColumnChooserDialog=this.createBean(new Dk({title:r("chooseColumns","Choose Columns"),component:s,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{so(n,s.getGui())?.focus({preventScroll:!0}),this.dispatchVisibleChangedEvent(!0,e)},closedCallback:p=>{const g=this.activeColumnChooser.getGui();this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,e),e&&d.restoreFocusOnClose({column:e,headerPosition:h,columnIndex:u,eventSource:o},g,p,!0)},postProcessPopupParams:{type:"columnChooser",column:e,eventSource:o}})),this.activeColumnChooser=s}hideActiveColumnChooser(){this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(e,t){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:"columnChooser",column:t??null})}},$o="separator";function jp(e,t){if(e)for(let o=e.length-2;o>=0;o--){const i=e[o]===t,s=e[o+1]===t;i&&s&&e.splice(o+1,1)}}var pD=class extends A{constructor(){super(...arguments),this.beanName="menuItemMapper"}mapWithStockItems(e,t,o,i){if(!e)return[];const s=[],r=this.getLocaleTextFunc(),{beans:n,gos:a}=this,{validation:l,pinnedCols:d,colAutosize:u,aggFuncSvc:h,rowGroupColsSvc:p,colNames:g,colModel:f,clipboardSvc:m,expansionSvc:b,focusSvc:w,csvCreator:S,excelCreator:y,menuSvc:x,colChooserFactory:P,sortSvc:k,chartMenuItemMapper:D,valueColsSvc:v}=n,C=(R,F,L,O)=>{switch(l?.validateMenuItem(R),R){case"pinSubMenu":return d&&F?{name:r("pinColumn","Pin Column"),icon:de("menuPin",n,null),subMenu:["clearPinned","pinLeft","pinRight"]}:null;case"pinLeft":return d&&F?{name:r("pinLeft","Pin Left"),action:()=>d.setColsPinned([F],"left",O),checked:!!F&&F.isPinnedLeft()}:null;case"pinRight":return d&&F?{name:r("pinRight","Pin Right"),action:()=>d.setColsPinned([F],"right",O),checked:!!F&&F.isPinnedRight()}:null;case"clearPinned":return d&&F?{name:r("noPin","No Pin"),action:()=>d.setColsPinned([F],null,O),checked:!!F&&!F.isPinned()}:null;case"valueAggSubMenu":return h&&v&&(F?.isPrimary()||F?.getColDef().pivotValueColumn)?{name:r("valueAggregation","Value Aggregation"),icon:de("menuValue",n,null),subMenu:gD(F,h,v,r),disabled:a.get("functionsReadOnly")}:null;case"autoSizeThis":return u?{name:r("autosizeThisColumn","Autosize This Column"),action:()=>u.autoSizeColumn(F,O,a.get("skipHeaderOnAutoSize"))}:null;case"autoSizeAll":return u?{name:r("autosizeAllColumns","Autosize All Columns"),action:()=>u.autoSizeAllColumns(O,a.get("skipHeaderOnAutoSize"))}:null;case"rowGroup":return p?{name:r("groupBy","Group by")+" "+Mt(g.getDisplayNameForColumn(F,"header")),disabled:a.get("functionsReadOnly")||F?.isRowGroupActive()||!F?.getColDef().enableRowGroup,action:()=>p.addColumns([F],O),icon:de("menuAddRowGroup",n,null)}:null;case"rowUnGroup":if(p&&a.isModuleRegistered("SharedRowGrouping")){const T=F?.getColDef().showRowGroup,_=a.get("groupLockGroupColumns");let V,G,B;if(T===!0)V=r("ungroupAll","Un-Group All"),G=a.get("functionsReadOnly")||_===-1||_>=(p.columns.length??0),B=()=>p.setColumns(p.columns.slice(0,_),O);else if(typeof T=="string"){const I=f.getColDefCol(T),W=I!=null?Mt(g.getDisplayNameForColumn(I,"header")):T;V=r("ungroupBy","Un-Group by")+" "+W,G=a.get("functionsReadOnly")||Qr(I,n),B=()=>{p.removeColumns([T],O)}}else V=r("ungroupBy","Un-Group by")+" "+Mt(g.getDisplayNameForColumn(F,"header")),G=a.get("functionsReadOnly")||!F?.isRowGroupActive()||!F?.getColDef().enableRowGroup||Qr(F,n),B=()=>p.removeColumns([F],O);return{name:V,disabled:G,action:B,icon:de("menuRemoveRowGroup",n,null)}}else return null;case"resetColumns":return{name:r("resetColumns","Reset Columns"),action:()=>Ju(n,O)};case"expandAll":return b?{name:r("expandAll","Expand All Row Groups"),action:()=>b.expandAll(!0)}:null;case"contractAll":return b?{name:r("collapseAll","Collapse All Row Groups"),action:()=>b.expandAll(!1)}:null;case"copy":return m?{name:r("copy","Copy"),shortcut:r("ctrlC","Ctrl+C"),icon:de("clipboardCopy",n,null),action:()=>m.copyToClipboard()}:null;case"copyWithHeaders":return m?{name:r("copyWithHeaders","Copy with Headers"),icon:de("clipboardCopy",n,null),action:()=>m.copyToClipboard({includeHeaders:!0})}:null;case"copyWithGroupHeaders":return m?{name:r("copyWithGroupHeaders","Copy with Group Headers"),icon:de("clipboardCopy",n,null),action:()=>m.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}:null;case"cut":if(m){const T=w.getFocusedCell(),_=T?vl(n,T):null,V=_?T?.column.isCellEditable(_):!1;return{name:r("cut","Cut"),shortcut:r("ctrlX","Ctrl+X"),icon:de("clipboardCut",n,null),disabled:!V||a.get("suppressCutToClipboard"),action:()=>m.cutToClipboard(void 0,"contextMenu")}}else return null;case"paste":return m?{name:r("paste","Paste"),shortcut:r("ctrlV","Ctrl+V"),disabled:!0,icon:de("clipboardPaste",n,null),action:()=>m.pasteFromClipboard()}:null;case"export":{const T=[];return!a.get("suppressCsvExport")&&S&&T.push("csvExport"),!a.get("suppressExcelExport")&&y&&T.push("excelExport"),T.length?{name:r("export","Export"),subMenu:T,icon:de("save",n,null)}:null}case"csvExport":return S?{name:r("csvExport","CSV Export"),icon:de("csvExport",n,null),action:()=>S.exportDataAsCsv()}:null;case"excelExport":return y?{name:r("excelExport","Excel Export"),icon:de("excelExport",n,null),action:()=>y.exportDataAsExcel()}:null;case"separator":return"separator";case"pivotChart":case"chartRange":return D.getChartItems(R);case"columnFilter":return x&&F?{name:r("columnFilter","Column Filter"),icon:de("filter",n,null),action:()=>x.showFilterMenu({column:F,buttonElement:L(),containerType:"columnFilter",positionBy:"button"})}:null;case"columnChooser":{const T=w.focusedHeader;return P?{name:r("columnChooser","Choose Columns"),icon:de("columns",n,null),action:()=>P.showColumnChooser({column:F,eventSource:L(),headerPosition:T})}:null}case"sortAscending":return k?{name:r("sortAscending","Sort Ascending"),icon:de("sortAscending",n,null),action:()=>k.setSortForColumn(F,"asc",!1,O)}:null;case"sortDescending":return k?{name:r("sortDescending","Sort Descending"),icon:de("sortDescending",n,null),action:()=>k.setSortForColumn(F,"desc",!1,O)}:null;case"sortUnSort":return k?{name:r("sortUnSort","Clear Sort"),icon:de("sortUnSort",n,null),action:()=>k.setSortForColumn(F,null,!1,O)}:null;default:return H(176,{key:R}),null}};return e.forEach(R=>{let F;if(typeof R=="string"?F=C(R,t,o,i):F={...R},!F)return;const L=F,{subMenu:O}=L;O&&O instanceof Array&&(L.subMenu=this.mapWithStockItems(O,t,o,i)),F!=null&&s.push(F)}),jp(s,$o),s}};function gD(e,t,o,i){let s;if(e.isPrimary())s=e;else{const n=e.getColDef().pivotValueColumn;s=j(n)?n:void 0}const r=[];if(s){const n=s.isValueActive(),a=t.getFuncNames(s);r.push({name:i("noAggregation","None"),action:()=>{o.removeColumns([s],"contextMenu"),o.setColumnAggFunc(s,void 0,"contextMenu")},checked:!n}),a.forEach(l=>{r.push({name:i(l,t.getDefaultFuncLabel(l)),action:()=>{o.setColumnAggFunc(s,l,"contextMenu"),o.addColumns([s],"contextMenu")},checked:n&&s.getAggFunc()===l})})}return r}var fD=class extends A{constructor(){super(...arguments),this.beanName="colMenuFactory"}createMenu(e,t,o,i){const s=e.createManagedBean(new Ol(0,{column:o??null,node:null,value:null})),r=this.beans.menuItemMapper.mapWithStockItems(t,o??null,i,"columnMenu");return s.addMenuItems(r),s}getMenuItems(e=null,t=null){const o=this.getDefaultMenuOptions(e);let i;const s=(e?.getColDef()??t?.getColGroupDef())?.mainMenuItems;if(Array.isArray(s))i=s;else if(typeof s=="function")i=s(J(this.gos,{column:e,columnGroup:t,defaultItems:o}));else{const r=this.gos.getCallback("getMainMenuItems");r?i=r({column:e,columnGroup:t,defaultItems:o}):i=o}return jp(i,$o),i}getDefaultMenuOptions(e){const t=[],{beans:o,gos:i}=this,{colChooserFactory:s,rowGroupColsSvc:r,colModel:n,expansionSvc:a,sortSvc:l,menuSvc:d,pinnedCols:u,aggFuncSvc:h,colAutosize:p}=o,g=Ke(i),f=()=>{!g&&s&&t.push("columnChooser"),t.push("resetColumns")};if(!e)return f(),t;const{colDef:m}=e,b=u&&!m.lockPinned,w=r?.columns.length??0,S=w>0,y=e.isPrimary(),x=h&&y&&S&&e.isAllowValue()||!y;if(l&&!g&&e.isSortable()){const P=e.getSort();P!=="asc"&&t.push("sortAscending"),P!=="desc"&&t.push("sortDescending"),P&&t.push("sortUnSort"),t.push($o)}if(d?.isFilterMenuItemEnabled(e)&&(t.push("columnFilter"),t.push($o)),b&&t.push("pinSubMenu"),x&&t.push("valueAggSubMenu"),(b||x)&&t.push($o),p&&(t.push("autoSizeThis"),t.push("autoSizeAll"),t.push($o)),r&&i.isModuleRegistered("SharedRowGrouping")){const P=t.length;m.showRowGroup?t.push("rowUnGroup"):e.isAllowRowGroup()&&y&&(e.isRowGroupActive()?Qr(e,o)||t.push("rowUnGroup"):t.push("rowGroup")),t.length>P&&t.push($o)}return f(),a&&$t(i)&&(i.get("treeData")||w>(n.isPivotMode()?1:0))&&(t.push("expandAll"),t.push("contractAll")),t}};function mD(e){return{tag:"div",cls:`ag-tabs ${e}`,children:[{tag:"div",ref:"eHeader"},{tag:"div",ref:"eBody",role:"presentation",cls:`ag-tabs-body ${e?`${e}-body`:""}`}]}}var vD=class extends ui{constructor(e){super(mD(e.cssClass)),this.eHeader=N,this.eBody=N,this.items=[],this.tabbedItemScrollMap=new Map,this.params=e}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(e=>this.addItem(e)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>this.activeItem?.tabbedItem?.afterDetachedCallback?.())}setupHeader(){const{enableCloseButton:e,cssClass:t}=this.params,o=(i,s)=>{i.classList.add(`ag-tabs-${s}`),t&&i.classList.add(`${t}-${s}`)};e?(this.setupCloseButton(o),this.eTabHeader=Ge(this.beans).createElement("div"),o(this.eHeader,"header-wrapper"),et(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,et(this.eTabHeader,"tablist"),o(this.eTabHeader,"header")}setupCloseButton(e){const t=Ge(this.beans),o=t.createElement("button");e(o,"close-button");const i=de("close",this.beans);bt(o,this.params.closeButtonAriaLabel),o.appendChild(i),this.addManagedElementListeners(o,{click:()=>this.params.onCloseClicked?.()});const s=t.createElement("div");e(s,"close-button-wrapper"),et(s,"presentation"),s.appendChild(o),this.eHeader.appendChild(s),this.eCloseButton=o}handleKeyDown(e){switch(e.key){case M.RIGHT:case M.LEFT:{if(!this.eTabHeader.contains(Ae(this.beans)))return;const t=e.key===M.RIGHT,o=this.gos.get("enableRtl"),i=this.items.indexOf(this.activeItem),s=t!==o?Math.min(i+1,this.items.length-1):Math.max(i-1,0);if(i===s)return;e.preventDefault();const r=this.items[s];this.showItemWrapper(r),r.eHeaderButton.focus();break}case M.UP:case M.DOWN:e.stopPropagation();break}}onTabKeyDown(e){if(e.defaultPrevented)return;const{beans:t,eHeader:o,eBody:i,activeItem:s,params:r}=this,{suppressTrapFocus:n,enableCloseButton:a}=r,l=Ae(t),d=e.target,u=e.shiftKey;if(o.contains(l)){e.preventDefault(),a&&u&&!this.eCloseButton?.contains(l)?this.eCloseButton?.focus():n&&u?Yd(Ge(t).body,d)?.focus():this.focusBody(e.shiftKey);return}let h=null;if(Ek(i,d)&&(u&&(h=Yd(i,d)),!h&&!n&&(h=s.eHeaderButton)),!h&&i.contains(l)&&(h=so(t,i,!1,u),!h)){n&&!u?this.forceFocusOutOfContainer(u):a&&!u?(e.preventDefault(),this.eCloseButton?.focus()):(e.preventDefault(),this.focusHeader());return}h&&(e.preventDefault(),h.focus())}focusInnerElement(e){return e?this.focusBody(!0):(this.focusHeader(),!0)}focusHeader(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}focusBody(e){return Et(this.eBody,e)}setAfterAttachedParams(e){this.afterAttachedParams=e}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(e){const t=Me({tag:"span",cls:"ag-tab",role:"tab",attrs:{tabindex:"-1"}});t.appendChild(e.title),this.eTabHeader.appendChild(t),bt(t,e.titleLabel);const o={tabbedItem:e,eHeaderButton:t};this.items.push(o),t.addEventListener("click",this.showItemWrapper.bind(this,o))}showItem(e){const t=this.items.find(o=>o.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){const{tabbedItem:t,eHeaderButton:o}=e;if(this.params.onItemClicked?.({item:t}),this.activeItem===e){this.params.onActiveItemClicked?.();return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),rt(this.eBody),t.bodyPromise.then(i=>{this.eBody.appendChild(i);const s=!fh();if(this.params.suppressFocusBodyOnOpen||Et(this.eBody,!1,s),t.afterAttachedCallback&&t.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const r=t.getScrollableContainer&&t.getScrollableContainer()||i;[this.lastScrollListener]=this.addManagedElementListeners(r,{scroll:()=>{this.tabbedItemScrollMap.set(t.name,r.scrollTop)}});const n=this.tabbedItemScrollMap.get(t.name);n!==void 0&&setTimeout(()=>{r.scrollTop=n},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),this.activeItem.tabbedItem.afterDetachedCallback?.()),o.classList.add("ag-tab-selected"),this.activeItem=e}},Do="filterMenuTab",Mo="generalMenuTab",Uo="columnsMenuTab",Cr=[Mo,Do,Uo],CD=class extends A{constructor(){super(...arguments),this.beanName="enterpriseMenuFactory"}hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(e,t,o,i,s){const{column:r,columnGroup:n}=this.splitColumnOrGroup(e),a=s?"filterMenuTab":void 0;this.showMenu(r,n,l=>{const d=l.getGui();this.beans.popupSvc.positionPopupUnderMouseEvent({type:o,column:r,mouseEvent:t,ePopup:d}),a&&l.showTab?.(a),this.dispatchVisibleChangedEvent(!0,!1,r,n,a)},o,a,void 0,t.target,i)}splitColumnOrGroup(e){const t=e&&to(e);return{column:t?e:void 0,columnGroup:t?void 0:e}}showMenuAfterButtonClick(e,t,o,i,s){let r=-1,n="left";this.gos.get("enableRtl")&&(r=1,n="right");const a=s?"filterMenuTab":void 0,l=a?[a]:void 0,d=Ke(this.gos),u=(d?9:4)*r,h=d?-23:4,{column:p,columnGroup:g}=this.splitColumnOrGroup(e);this.showMenu(p,g,f=>{const m=f.getGui();this.beans.popupSvc.positionPopupByComponent({type:o,column:p,eventSource:t,ePopup:m,alignSide:n,nudgeX:u,nudgeY:h,position:"under",keepWithinBounds:!0}),a&&f.showTab?.(a),this.dispatchVisibleChangedEvent(!0,!1,p,g,a)},o,a,l,t,i)}showMenu(e,t,o,i,s,r,n,a){const l=this.getMenuParams(e,t,r,n);if(!l)return;const{menu:d,eMenuGui:u,anchorToElement:h,restoreFocusParams:p}=l,g=[],{menuUtils:f,popupSvc:m}=this.beans;g.push(w=>{const S=d.getGui();this.destroyBean(d),e&&(qr(e,!1,"contextMenu"),f.restoreFocusOnClose(p,S,w)),a?.()});const b=this.getLocaleTextFunc();if(m.addPopup({modal:!0,eChild:u,closeOnEsc:!0,closedCallback:w=>{g.forEach(S=>S(w)),this.dispatchVisibleChangedEvent(!1,!1,e,t,s)},afterGuiAttached:w=>d.afterGuiAttached(Object.assign({},{container:i},w)),positionCallback:s?()=>o(d):void 0,ariaLabel:b("ariaLabelColumnMenu","Column Menu")}),s||(d.showTabBasedOnPreviousSelection?.(),o(d)),Lu(this.gos)){const w=m.setPopupPositionRelatedToElement(u,h);w&&e&&this.addStopAnchoring(w,e,g)}d.addEventListener("tabSelected",w=>{this.dispatchVisibleChangedEvent(!1,!0,e),this.lastSelectedTab=w.key,this.dispatchVisibleChangedEvent(!0,!0,e)}),e&&qr(e,!0,"contextMenu"),this.activeMenu=d,d.addEventListener("destroyed",()=>{this.activeMenu===d&&(this.activeMenu=null)})}addStopAnchoring(e,t,o){e.then(i=>{t.__addEventListener("leftChanged",i),t.__addEventListener("visibleChanged",i),o.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("visibleChanged",i)})})}getMenuParams(e,t,o,i){const{focusSvc:s,visibleCols:r,ctrlsSvc:n}=this.beans,a={column:e,headerPosition:s.focusedHeader,columnIndex:r.allCols.indexOf(e),eventSource:i},l=this.createMenu(e,t,a,o,i);return l?{menu:l,eMenuGui:l.getGui(),anchorToElement:i||n.getGridBodyCtrl().eGridBody,restoreFocusParams:a}:void 0}createMenu(e,t,o,i,s){if(Ke(this.gos))return this.createBean(new bD(e,o,this.lastSelectedTab,i,s));{const r=this.beans.colMenuFactory.getMenuItems(e,t);return r.length?this.createBean(new wD(r,e,o,s)):void 0}}dispatchVisibleChangedEvent(e,t,o,i,s){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:t,key:this.lastSelectedTab??s??(Ke(this.gos)?Mo:"columnMenu"),column:o??null,columnGroup:i??null})}isMenuEnabled(e){if(!Ke(this.gos))return!0;const t=!this.beans.filterManager?.isFilterAllowed(e),o=e.getColDef().menuTabs??Cr;return(t&&o.includes(Do)?o.length-1:o.length)>0}showMenuAfterContextMenuEvent(e,t,o){this.beans.menuUtils.onContextMenu({mouseEvent:t,touchEvent:o,source:"ui",showMenuCallback:i=>(this.showMenuAfterMouseEvent(e,i,"columnMenu"),!0)})}},bD=class extends A{constructor(e,t,o,i,s){super(),this.column=e,this.restoreFocusParams=t,this.initialSelection=o,this.restrictTo=i,this.sourceElement=s,this.tabFactories={},this.includeChecks={};const{tabFactories:r,includeChecks:n}=this;r[Mo]=this.createMainPanel.bind(this),r[Do]=this.createFilterPanel.bind(this),r[Uo]=this.createColumnsPanel.bind(this),n[Mo]=()=>!0,n[Do]=()=>e?!!this.beans.filterManager?.isFilterAllowed(e):!1,n[Uo]=()=>!0}postConstruct(){const e=this.getTabsToCreate().map(o=>this.createTab(o)),t=new vD({items:e,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)});this.tabbedLayout=this.createBean(t),this.mainMenuList?.setParentComponent(t),this.addDestroyFunc(()=>this.destroyBean(t))}getTabsToCreate(){return this.restrictTo?this.restrictTo:(this.column?.getColDef().menuTabs??Cr).filter(e=>this.isValidMenuTabItem(e)&&this.isNotSuppressed(e))}isValidMenuTabItem(e){let t=!0,o=Cr;return this.restrictTo!=null&&(t=this.restrictTo.indexOf(e)>-1,o=this.restrictTo),t=t&&Cr.indexOf(e)>-1,t||H(175,{menuTabName:e,itemsToConsider:o}),t}isNotSuppressed(e){return this.includeChecks[e]()}createTab(e){return this.tabFactories[e]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(e){const{tabItemColumns:t,tabbedLayout:o,tabItemFilter:i,tabItemGeneral:s}=this;t&&e===Uo?o.showItem(t):i&&e===Do?o.showItem(i):s&&e===Mo?o.showItem(s):o.showFirstItem()}onTabItemClicked(e){let t=null;switch(e.item){case this.tabItemColumns:t=Uo;break;case this.tabItemFilter:t=Do;break;case this.tabItemGeneral:t=Mo;break}t&&this.activateTab(t)}activateTab(e){const t={type:"tabSelected",key:e};this.dispatchLocalEvent(t)}createMainPanel(){const{beans:e,column:t}=this,o=e.colMenuFactory,i=o.createMenu(this,o.getMenuItems(t),this.column,()=>this.sourceElement??this.getGui());this.mainMenuList=i,i.addEventListener("closeMenu",this.onHidePopup.bind(this));const s={title:de("legacyMenu",e,t),titleLabel:Mo.replace("MenuTab",""),bodyPromise:Ce.resolve(i.getGui()),name:Mo};return this.tabItemGeneral=s,s}onHidePopup(e){this.beans.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}createFilterPanel(){const e=this.column?this.createBean(new xh(this.column,"COLUMN_MENU")):null;this.filterComp=e,e?.hasFilter()||he(119);const t=i=>e?.afterGuiAttached(i),o=()=>e?.afterGuiDetached();return this.tabItemFilter={title:de("filterTab",this.beans,this.column),titleLabel:Do.replace("MenuTab",""),bodyPromise:Ce.resolve(e?.getGui()),afterAttachedCallback:t,afterDetachedCallback:o,name:Do},this.tabItemFilter}createColumnsPanel(){const e=Me({tag:"div",cls:"ag-menu-column-select-wrapper"}),{beans:t,column:o}=this,s=t.colChooserFactory.createColumnSelectPanel(this,o).getGui();s.classList.add("ag-menu-column-select"),e.appendChild(s);const r={title:de("columns",t,o),titleLabel:Uo.replace("MenuTab",""),bodyPromise:Ce.resolve(e),name:Uo};return this.tabItemColumns=r,r}afterGuiAttached(e){const{container:t,hidePopup:o}=e;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:o}),o&&(this.hidePopupFunc=o,this.addDestroyFunc(o))}getGui(){return this.tabbedLayout.getGui()}destroy(){super.destroy(),this.destroyBean(this.filterComp)}},wD=class extends se{constructor(e,t,o,i){super({tag:"div",ref:"eColumnMenu",cls:"ag-menu ag-column-menu",role:"presentation"}),this.menuItems=e,this.column=t,this.restoreFocusParams=o,this.sourceElement=i,this.eColumnMenu=N}postConstruct(){const e=this.beans.colMenuFactory.createMenu(this,this.menuItems,this.column,()=>this.sourceElement??this.getGui());this.mainMenuList=e,e.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(e.getGui())}onHidePopup(e){this.beans.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),Et(this.mainMenuList.getGui())}};function yD(e,t){e.colChooserFactory?.showColumnChooser({chooserParams:t})}function SD(e){e.colChooserFactory?.hideActiveColumnChooser()}var RD=class extends A{constructor(){super(...arguments),this.beanName="menuUtils"}restoreFocusOnClose(e,t,o,i){const{eventSource:s}=e,r=o instanceof KeyboardEvent;if(!i&&!r||!s)return;const n=Ae(this.beans);!t.contains(n)&&!Rs(this.beans)||this.focusHeaderCell(e)}closePopupAndRestoreFocusOnSelect(e,t,o){let i;o&&o.keyboardEvent&&(i=o.keyboardEvent),e(i&&{keyboardEvent:i});const s=this.beans,r=s.focusSvc,n=r.getFocusedCell();if(Rs(s))if(n){const{rowIndex:a,rowPinned:l,column:d}=n;r.setFocusedCell({rowIndex:a,column:d,rowPinned:l,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(t)}onContextMenu(e){const{mouseEvent:t,touchEvent:o,showMenuCallback:i,source:s}=e;if(!this.gos.get("allowContextMenuWithControlKey")&&t&&(t.ctrlKey||t.metaKey)||(t&&this.blockMiddleClickScrollsIfNeeded(t),s==="ui"&&this.gos.get("suppressContextMenu")))return;const r=t??o.touches[0];if(i(r)){const n=t??o;n&&n.cancelable&&n.preventDefault()}}async focusHeaderCell(e){const{column:t,columnIndex:o,headerPosition:i,eventSource:s}=e,{visibleCols:r,headerNavigation:n,focusSvc:a}=this.beans,l=await r.allCols.some(d=>d===t);if(this.isAlive()){if(t?.isAlive()&&l&&s&&wt(s)){const d=fl(s);d&&(n?.scrollToColumn(t),d.focus())}else if(i&&o!==-1){const d=r.allCols,u=d[o]||Se(d);u&&a.focusHeaderPosition({headerPosition:{headerRowIndex:i.headerRowIndex,column:u}})}}}blockMiddleClickScrollsIfNeeded(e){this.gos.get("suppressMiddleClickScrolls")&&e.which===2&&e.preventDefault()}},xD={moduleName:"MenuCore",version:$e,beans:[pD,dD,RD],icons:{chart:"chart",columns:"columns",loadingMenuItems:"loading",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",save:"save",csvExport:"csv",excelExport:"excel",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"},dependsOn:[St,bn,Sp,Np]},FD={moduleName:"ColumnMenu",version:$e,beans:[CD,fD,hD],icons:{legacyMenu:"menu",filterTab:"filter",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate"},apiFunctions:{showColumnChooser:yD,hideColumnChooser:SD},dependsOn:[xD,qh,Xh]},Ko="__AG_SELECT_ALL__",qo="__AG_ADD_SELECTION_TO_FILTER__",kD={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},DD={tag:"div",cls:"ag-set-filter-item",attrs:{"aria-hidden":"true"},children:[{tag:"span",cls:"ag-set-filter-group-icons",children:[{tag:"span",ref:"eGroupClosedIcon",cls:"ag-set-filter-group-closed-icon"},{tag:"span",ref:"eGroupOpenedIcon",cls:"ag-set-filter-group-opened-icon"},{tag:"span",ref:"eGroupIndeterminateIcon",cls:"ag-set-filter-group-indeterminate-icon"}]},{tag:"ag-checkbox",ref:"eCheckbox",cls:"ag-set-filter-item-checkbox"}]},MD={tag:"div",cls:"ag-set-filter-item",children:[{tag:"ag-checkbox",ref:"eCheckbox",cls:"ag-set-filter-item-checkbox"}]},PD=class extends se{constructor(e){super(e.isGroup?DD:MD,[ci]),this.eCheckbox=N,this.eGroupOpenedIcon=N,this.eGroupClosedIcon=N,this.eGroupIndeterminateIcon=N,this.formattedValue=null,this.focusWrapper=e.focusWrapper,this.value=e.value,this.params=e.params,this.translate=e.translate,this.valueFormatter=e.valueFormatter,this.item=e.item,this.isSelected=e.isSelected,this.isTree=e.isTree,this.depth=e.depth??0,this.isGroup=e.isGroup,this.groupsExist=e.groupsExist,this.isExpanded=e.isExpanded,this.hasIndeterminateExpandState=e.hasIndeterminateExpandState}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,getLocation:()=>"setFilterValue",shouldDisplayTooltip:()=>this.shouldDisplayTooltip?.()??!0,getValueFormatted:()=>this.formattedValue,getAdditionalParams:()=>this.isTree?{level:this.depth}:{}})),this.addDestroyFunc(()=>this.destroyCellRendererComponent?.()),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&(this.addCssClass("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth))),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),tu(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),!this.params.readOnly&&this.eCheckbox.onValueChange(e=>this.onCheckboxChanged(!!e))}getFocusableElement(){return this.focusWrapper}setupExpansion(){const{eGroupClosedIcon:e,eGroupOpenedIcon:t,eGroupIndeterminateIcon:o,hasIndeterminateExpandState:i,beans:s}=this;e.appendChild(Bo("setFilterGroupClosed",s,null)),t.appendChild(Bo("setFilterGroupOpen",s,null));const r=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(e,{click:r}),this.addManagedElementListeners(t,{click:r}),i&&(o.appendChild(Bo("setFilterGroupIndeterminate",s,null)),this.addManagedElementListeners(o,{click:r})),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(e,t){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;const o={type:"expandedChanged",isExpanded:!!e,item:this.item};t||this.dispatchLocalEvent(o),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){const{isExpanded:e,hasIndeterminateExpandState:t,eGroupClosedIcon:o,eGroupOpenedIcon:i,eGroupIndeterminateIcon:s}=this;Z(o,t?e===!1:!e),Z(i,e===!0),t&&Z(s,e===void 0)}onCheckboxChanged(e){this.isSelected=e;const t={type:"selectionChanged",isSelected:e,item:this.item};this.dispatchLocalEvent(t),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;const e=this.getLocaleTextFunc(),t=this.eCheckbox.getValue(),o=t===void 0?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),i=e("ariaToggleVisibility","Press SPACE to toggle visibility");Ti(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${i} (${o})`)}setupFixedAriaLabels(e){if(!this.isTree)return;const o=this.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();bt(i,`${e} ${o}`),Ja(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){const e=this.getAriaElement();lu(e,this.eCheckbox.getValue())}refreshAriaExpanded(){eo(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,o){this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(o,!0);const{cellRendererComponent:i,cellRendererParams:s,beans:r,params:n}=this;if(this.valueFunction){const a=this.valueFunction();this.setTooltipAndCellRendererParams(a,a),i||this.renderCellWithoutCellRenderer()}if(i){const a=Oi(r.userCompFactory,n,s);if(!i.refresh?.(a?.params??s)){const d=i;this.renderCell(),this.destroyBean(d)}}}render(){const{params:{column:e}}=this;let{value:t}=this,o=null;typeof t=="function"?(this.valueFunction=t,o=this.valueFunction(),t=o):this.isTree?o=uo(t):o=this.getFormattedValue(e,t),this.formattedValue=o,this.setTooltipAndCellRendererParams(t,o),this.renderCell()}setTooltipAndCellRendererParams(e,t){const o=this.gos;if(this.params.showTooltips&&(!ls(o)||!this.params.cellRenderer)){const i=t??uo(e);this.shouldDisplayTooltip=Ml(o,()=>this.eCheckbox.getGui().querySelector(".ag-label")),this.tooltipFeature?.setTooltipAndRefresh(i)}this.cellRendererParams=J(o,{value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(i,s)=>{o.assertModuleRegistered("Tooltip",3),this.shouldDisplayTooltip=s,this.tooltipFeature?.setTooltipAndRefresh(i)}})}getFormattedValue(e,t){return this.beans.valueSvc.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){const t=Oi(this.beans.userCompFactory,this.params,this.cellRendererParams)?.newAgStackInstance();if(t==null){this.renderCellWithoutCellRenderer();return}t.then(o=>{o&&(this.cellRendererComponent=o,this.eCheckbox.setLabel(o.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(o))})}renderCellWithoutCellRenderer(){const{valueFormatted:e,value:t}=this.cellRendererParams;let o=e??t??this.translate("blanks");typeof o!="string"&&(H(208),o=""),this.eCheckbox.setLabel(o),this.setupFixedAriaLabels(o)}getComponentHolder(){return this.params.column.getColDef()}},Kp=class{getModelAsString(e,t){const{values:o}=e||t.getModel()||{},i=t.getValueModel();if(o==null||i==null)return"";const s=o.filter(a=>i.isKeyAvailable(a)),r=s.length,n=s.slice(0,10).map(a=>t.getFormattedValue(a));return`(${r}) ${n.join(",")}${r>10?",...":""}`}};function Ga(e,t,o){let i=e;return i?(i=i.map(s=>uo(nt(s))),!t&&o&&i.some(s=>s==null)?Se(i)==null?null:i.filter(s=>s!=null):i):null}var ED=class{constructor(e,t,o,i,s,r,n,a,l,d){this.rowModel=e,this.filterParams=t,this.createKey=o,this.caseFormat=i,this.valueSvc=s,this.treeDataOrGrouping=r,this.treeData=n,this.groupAllowUnbalanced=a,this.addManagedEventListeners=l,this.rowGroupColsSvc=d}extractUniqueValuesAsync(e,t){return new Ce(o=>{if(this.rowModel.isRowDataLoaded())o(this.extractUniqueValues(e,t));else{const[i]=this.addManagedEventListeners({rowCountReady:()=>{i?.(),o(this.extractUniqueValues(e,t))}})}})}extractUniqueValues(e,t){const o=new Map,i=this.extractExistingFormattedKeys(t),s=new Set,r=this.treeData,n=this.rowGroupColsSvc?.columns,a=(l,d)=>{const u=this.caseFormat(l);if(!s.has(u)){s.add(u);let h=l,p=nt(d);const g=i?.get(u);g!=null&&(h=g,p=t.get(g)),o.set(h,p)}};return this.rowModel.forEachLeafNode(l=>{if(!l.data||!e(l))return;if(this.treeDataOrGrouping){this.addValueForTreeDataOrGrouping(l,r,n,a);return}const d=this.getValue(l);d!=null&&Array.isArray(d)?(d.forEach(u=>{a(this.createKey(u,l),u)}),d.length===0&&a(null,null)):a(this.createKey(d,l),d)}),o}addValueForTreeDataOrGrouping(e,t,o=[],i){let s;if(t){if(e.childrenAfterGroup?.length)return;s=e.getRoute()??[e.key??e.id]}else s=o.map(n=>this.valueSvc.getKeyForNode(n,e)),s.push(this.getValue(e));const r=Ga(s,t,this.groupAllowUnbalanced);i(this.createKey(r),r)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;const t=new Map;return e.forEach((o,i)=>{t.set(this.caseFormat(i),i)}),t}},AD=class{constructor({caseFormat:e}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=e}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||this.filteringKeys.size===0,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(t=>this.filteringKeysCaseFormatted.add(this.caseFormat(t)))}addFilteringKey(e){this.filteringKeys==null&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},TD=class{constructor(e,t,o,i){this.valueSvc=e,this.valueFormatter=t,this.formatter=o,this.column=i,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,o){this.displayedKeys=Array.from(o)}updateDisplayedValuesToMatchMiniFilter(e,t,o,i,s){this.displayedKeys=[];for(const r of o)if(r==null)s&&this.displayedKeys.push(r);else{const n=e(r),a=this.valueSvc.formatValue(this.column,null,n,this.valueFormatter,!1),l=this.formatter(a);i(l)&&this.displayedKeys.push(r)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return Ko}getAddSelectionToFilterItem(){return qo}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},ID=e=>Ee(e)?null:!(e instanceof Date)||isNaN(e.getTime())?["NaN"]:[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())],ec=class{constructor(e,t,o,i){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=o,this.treeDataOrGrouping=i,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:Ko,children:this.allDisplayedItemsTree,expanded:!0,key:Ko,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:qo,expanded:!0,key:qo,parentTreeKeys:[]}}updateOnParamsChange(e){this.treeListFormatter=e}updateDisplayedValuesToAllAvailable(e,t,o,i){i==="reload"?this.generateItemTree(e,t,o):i==="otherFilter"?(this.updateAvailable(o),this.updateExpandAll()):i==="miniFilter"&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,o,i,s,r){r==="reload"?this.generateItemTree(e,t,o):r==="otherFilter"&&this.updateAvailable(o),this.updateFilter(i,s),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,o){this.allDisplayedItemsTree=[],this.groupsExist=!1;const i=this.getTreeListPathGetter(e,o);for(const s of t){const r=e(s),n=i(r)??[null];n.length>1&&(this.groupsExist=!0);const a=o.has(s);let l=this.allDisplayedItemsTree,d,u=[];n.forEach((h,p)=>{l||(l=[],d.children=l),d=l.find(g=>g.treeKey?.toUpperCase()===h?.toUpperCase()),d||(d={treeKey:h,depth:p,filterPasses:!0,expanded:!1,available:a,parentTreeKeys:u},p===n.length-1&&(d.key=s),l.push(d)),l=d.children,u=[...u,h]})}this.updateAvailable(o),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(e,t){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return i=>i;let o=!1;for(const i of t){const s=e(i);if(s instanceof Date){o=!0;break}else if(s!=null)break}return o?ID:(H(211),i=>[String(i)])}flattenItems(){this.activeDisplayedItemsFlat=[];const e=t=>{t.forEach(o=>{!o.filterPasses||!o.available||(this.activeDisplayedItemsFlat.push(o),o.children&&o.expanded&&e(o.children))})};e(this.allDisplayedItemsTree)}resetFilter(){const e=t=>{t.children&&t.children.forEach(o=>{e(o)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(t=>e(t))}updateFilter(e,t){const o=i=>i.available?i.treeKey==null?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)):!1;this.allDisplayedItemsTree.forEach(i=>this.recursiveItemCheck(i,!1,o,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){const e=[];return this.forEachDisplayedKey(t=>e.push(t)),e}forEachDisplayedKey(e){const t=(o,i)=>{o.children?(!o.expanded||!i)&&o.children.forEach(s=>{s.filterPasses&&t(s,!1)}):e(o.key)};this.activeDisplayedItemsFlat.forEach(o=>t(o,!0))}someDisplayedKey(e){const t=(o,i)=>{if(o.children){if(!o.expanded||!i)return o.children.some(s=>s.filterPasses?t(s,!1):!1)}else return e(o.key);return!1};return this.activeDisplayedItemsFlat.some(o=>t(o,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){const e=(o,i,s)=>{for(const r of o){if(!r.filterPasses||!r.available||!r.children)continue;if(i=i||!!r.expanded,s=s||!r.expanded,i&&s)return;const n=e(r.children,i,s);if(n===void 0)return;n?i=!0:s=!0}return i&&s?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,o,i){let s=!1;e.children&&e.children.forEach(n=>{const a=this.recursiveItemCheck(n,t||o(e),o,i);s=s||a});const r=t||s||o(e);return e[i]=r,r}updateAvailable(e){const t=o=>e.has(o.key);this.allDisplayedItemsTree.forEach(o=>this.recursiveItemCheck(o,!1,t,"available"))}},LD=class{constructor(e){this.localEventService=new fo,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;const{usingComplexObjects:t,rowGroupColsSvc:o,valueSvc:i,treeDataTreeList:s,groupingTreeList:r,filterParams:n,gos:a,valueFormatter:l,addManagedEventListeners:d}=e,{column:u,colDef:h,textFormatter:p,doesRowPassOtherFilter:g,suppressSorting:f,comparator:m,rowModel:b,values:w,caseSensitive:S,treeList:y,treeListPathGetter:x,treeListFormatter:P}=n;this.filterParams=n,this.gos=a,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=p??(C=>C??null),this.doesRowPassOtherFilters=g,this.suppressSorting=f||!1,this.filteringKeys=new AD({caseFormat:this.caseFormat});const k=m??h.comparator,D=!!s||!!r;this.compareByValue=!!(t&&k||D||y&&!x),D&&!k?this.entryComparator=this.createTreeDataOrGroupingComparator():y&&!x&&!k?this.entryComparator=([C,R],[F,L])=>hr(R,L):this.entryComparator=([C,R],[F,L])=>k(R,L),this.keyComparator=k??hr,this.caseSensitive=!!S;const v=a.get("groupAllowUnbalanced");$t(a)&&(this.clientSideValuesExtractor=new ED(b,this.filterParams,this.createKey,this.caseFormat,i,D,!!s,v,d,o)),w==null?this.valuesType=2:(this.valuesType=Array.isArray(w)?0:1,this.providedValues=w),this.displayValueModel=y?new ec(this.formatter,x,P,s||r):new TD(i,l,this.formatter,u),this.updateAllValues().then(C=>this.resetSelectionState(C||[]))}addEventListener(e,t,o){this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.localEventService.removeEventListener(e,t,o)}updateOnParamsChange(e){return new Ce(t=>{const{values:o,textFormatter:i,suppressSorting:s,treeListFormatter:r}=e,n=this.providedValues,a=this.suppressSorting;if(this.filterParams=e,this.formatter=i??(l=>l??null),this.suppressSorting=s||!1,this.providedValues=o??null,this.displayValueModel instanceof ec&&this.displayValueModel.updateOnParamsChange(r),this.providedValues!==n||this.suppressSorting!==a){!o||o.length===0?(this.valuesType=2,this.providedValues=null):this.valuesType=Array.isArray(o)?0:1;const l=this.getModel();this.updateAllValues().then(()=>{this.setModel(l).then(()=>t())})}else t()})}refreshValues(){return new Ce(e=>{this.allValuesPromise.then(()=>{const t=this.getModel();this.updateAllValues(),this.setModel(t).then(()=>e())})})}overrideValues(e){return new Ce(t=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then(()=>t())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(e=>(this.updateAvailableKeys(e??[],"otherFilter"),!0)):Ce.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new Ce(e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(t=>e(this.processAllValues(t)));break;case 0:{e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break}case 1:{this.setIsLoading(!0);const t=this.providedValues,{column:o,colDef:i}=this.filterParams,s=J(this.gos,{success:r=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(r))))},colDef:i,column:o});window.setTimeout(()=>t(s),0);break}}}),this.allValuesPromise.then(e=>this.updateAvailableKeys(e||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(e){const t=this.sortKeys(e);return this.allValues=e??new Map,t}validateProvidedValues(e){if(this.usingComplexObjects&&e?.length){const t=e[0];t&&typeof t!="object"&&typeof t!="function"&&(this.createKey(t)==null?H(209):H(210))}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return this.valuesType===2}updateAvailableKeys(e,t){const o=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):e;this.availableKeys=new Set(o),this.localEventService.dispatchEvent({type:"availableValuesChanged"}),this.updateDisplayedValues(t,e)}sortKeys(e){const t=e??new Map;if(this.suppressSorting)return Array.from(t.keys());let o;return this.compareByValue?o=Array.from(t.entries()).sort(this.entryComparator).map(([i])=>i):o=Array.from(t.keys()).sort(this.keyComparator),this.filterParams.excelMode&&t.has(null)&&(o=o.filter(i=>i!=null),o.push(null)),o}getParamsForValuesFromRows(e=!1){if(!this.clientSideValuesExtractor)return he(113),null;const t=i=>!e||this.doesRowPassOtherFilters(i),o=e&&!this.caseSensitive?this.allValues:void 0;return{predicate:t,existingValues:o}}getValuesFromRows(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingValues):null}getValuesFromRowsAsync(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):Ce.resolve(null)}setMiniFilter(e){return e=nt(e),this.miniFilterText===e?!1:(e===null&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if(e==="expansion"){this.displayValueModel.refresh();return}if(this.miniFilterText==null){this.displayValueModel.updateDisplayedValuesToAllAvailable(r=>this.getValue(r),t,this.availableKeys,e);return}const o=this.caseFormat(this.formatter(this.miniFilterText)||""),i=r=>r!=null&&this.caseFormat(r).indexOf(o)>=0,s=!!this.filterParams.excelMode&&i(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(r=>this.getValue(r),t,this.availableKeys,i,s,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return this.filterParams.excelMode==="windows"}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&j(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(e=!1){this.miniFilterText==null?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(t=>this.selectedKeys.add(t)))}deselectAllMatchingMiniFilter(){this.miniFilterText==null?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.delete(e))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>!this.isKeySelected(e))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>this.isKeySelected(e))}getModel(){if(!this.hasSelections())return null;const e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(e&&e.size>0){if(this.selectedKeys){const t=new Set([...Array.from(e),...Array.from(this.selectedKeys).filter(o=>!e.has(o))]);return Array.from(t)}return Array.from(e)}return Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then(t=>{if(e==null)this.resetSelectionState(t??[]);else{this.selectedKeys.clear();const o=new Map;this.allValues.forEach((i,s)=>{o.set(this.caseFormat(s),s)}),e.forEach(i=>{const s=this.caseFormat(nt(i)),r=o.get(s);r!==void 0&&this.selectKey(r)})}})}uniqueValues(e){const t=new Map,o=new Set;return(e??[]).forEach(i=>{const s=nt(i),r=this.createKey(s),n=this.caseFormat(r);o.has(n)||(o.add(n),t.set(r,s))}),t}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([e,t],[o,i])=>{if(t==null)return i==null?0:-1;if(i==null)return 1;for(let s=0;s<t.length;s++){if(s>=i.length)return 1;const r=hr(t[s],i[s]);if(r!==0)return r}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.hasNoAppliedFilteringKeys}},qp=class extends fn{constructor(){super("setFilter"),this.filterType="set",this.eMiniFilter=N,this.eFilterLoading=N,this.eFilterLoadingIcon=N,this.eSetFilterList=N,this.eFilterNoMatches=N,this.caseSensitive=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new Kp,this.updateSetFilterOnParamsChange=t=>{this.setFilterParams=t,this.caseSensitive=!!t.caseSensitive;const o=t.keyCreator??t.colDef.keyCreator;this.setValueFormatter(t.valueFormatter,o,!!t.treeList,!!t.colDef.refData);const i=t.column.getId().startsWith(ni);this.treeDataTreeList=this.gos.get("treeData")&&!!t.treeList&&i,this.groupingTreeList=!!this.rowGroupColsSvc?.columns.length&&!!t.treeList&&i,this.createKey=this.generateCreateKey(o,this.treeDataTreeList||this.groupingTreeList)}}wireBeans(t){this.rowGroupColsSvc=t.rowGroupColsSvc,this.valueSvc=t.valueSvc,this.dataTypeSvc=t.dataTypeSvc}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return{tag:"div",cls:"ag-set-filter",children:[{tag:"div",ref:"eFilterLoading",cls:"ag-filter-loading ag-loading ag-hidden",children:[{tag:"span",ref:"eFilterLoadingIcon",cls:"ag-loading-icon"},{tag:"span",cls:"ag-loading-text",children:this.translateForSetFilter("loadingOoo")}]},{tag:"ag-input-text-field",ref:"eMiniFilter",cls:"ag-mini-filter"},{tag:"div",ref:"eFilterNoMatches",cls:"ag-filter-no-matches ag-hidden",children:this.translateForSetFilter("noMatches")},{tag:"div",ref:"eSetFilterList",cls:"ag-set-filter-list",role:"presentation"}]}}getAgComponents(){return[Dl]}handleKeyDown(t){if(super.handleKeyDown(t),!t.defaultPrevented)switch(t.key){case M.SPACE:this.handleKeySpace(t);break;case M.ENTER:this.handleKeyEnter(t);break;case M.LEFT:this.handleKeyLeft(t);break;case M.RIGHT:this.handleKeyRight(t);break}}handleKeySpace(t){this.getComponentForKeyEvent(t)?.toggleSelected()}handleKeyEnter(t){const{excelMode:o,readOnly:i}=this.setFilterParams;!o||i||(t.preventDefault(),this.onBtApply(!1,!1,t),this.setFilterParams.excelMode==="mac"&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(t){this.getComponentForKeyEvent(t)?.setExpanded(!1)}handleKeyRight(t){this.getComponentForKeyEvent(t)?.setExpanded(!0)}getComponentForKeyEvent(t){if(!this.eSetFilterList.contains(Ae(this.beans)))return;const o=this.virtualList.getLastFocusedRow();if(o==null)return;const i=this.virtualList.getComponentAt(o);if(i==null)return;t.preventDefault();const{readOnly:s}=this.setFilterParams;if(!s)return i}getCssIdentifier(){return"set-filter"}setModel(t){return t==null&&this.valueModel.getModel()==null?(this.setMiniFilter(null),Ce.resolve()):super.setModel(t)}refresh(t){if(this.applyExcelModeOptions(t),!super.refresh(t))return!1;const o=this.setFilterParams;return["treeList","treeListPathGetter","caseSensitive","comparator","excelMode"].some(s=>t[s]!==o?.[s])||this.haveColDefParamsChanged(t)?!1:(super.updateParams(t),this.updateSetFilterOnParamsChange(t),this.updateMiniFilter(),t.suppressSelectAll!==o?.suppressSelectAll&&this.createVirtualListModel(t),this.valueModel.updateOnParamsChange(t).then(()=>{this.isAlive()&&this.refreshFilterValues()}),!0)}haveColDefParamsChanged(t){const{colDef:o,keyCreator:i}=t,{colDef:s,keyCreator:r}=this.setFilterParams,n=i??o.keyCreator,a=r??s?.keyCreator,l=o.filterValueGetter!==s?.filterValueGetter,d=n!==a,u=!!this.dataTypeSvc&&!!n&&this.dataTypeSvc.getFormatValue(o.cellDataType)===n&&o.valueFormatter!==s?.valueFormatter;return l||d||u}setModelAndRefresh(t){return this.valueModel.setModel(t).then(()=>{this.isAlive()&&this.checkAndRefreshVirtualList()})}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(t){this.setMiniFilter(null);const o=t==null?null:t.values;return this.setModelAndRefresh(o)}getModelFromUi(){const t=this.valueModel.getModel();return t?{values:t,filterType:this.filterType}:null}getValueModel(){return this.valueModel}areModelsEqual(t,o){return t==null&&o==null?!0:t!=null&&o!=null&&Pt(t.values,o.values)}setParams(t){this.applyExcelModeOptions(t),super.setParams(t),this.updateSetFilterOnParamsChange(t);const o=t.keyCreator??t.colDef.keyCreator;this.valueModel=new LD({filterParams:t,setIsLoading:i=>this.setIsLoading(i),translate:i=>this.translateForSetFilter(i),caseFormat:i=>this.caseFormat(i),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!o,gos:this.gos,rowGroupColsSvc:this.rowGroupColsSvc,valueSvc:this.valueSvc,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedEventListeners:i=>this.addManagedEventListeners(i)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(t){this.valueModel.setAddCurrentSelectionToFilter(t)}setValueFormatter(t,o,i,s){let r=t;if(!r){if(o&&!i){he(249);return}this.noValueFormatterSupplied=!0,s||(r=n=>uo(n.value))}this.valueFormatter=r}generateCreateKey(t,o){return o&&!t?(he(250),()=>null):t?(i,s=null)=>{const r=this.getKeyCreatorParams(i,s);return nt(t(r))}:i=>nt(uo(i))}getFormattedValue(t){let o=this.valueModel.getValue(t);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(o)&&(o=Se(o));const i=this.valueSvc.formatValue(this.setFilterParams.column,null,o,this.valueFormatter,!1);return i??uo(o)??this.translateForSetFilter("blanks")}applyExcelModeOptions(t){t.excelMode==="windows"?(t.buttons||(t.buttons=["apply","cancel"]),t.closeOnApply==null&&(t.closeOnApply=!0)):t.excelMode==="mac"&&(t.buttons||(t.buttons=["reset"]),t.applyMiniFilterWhileTyping==null&&(t.applyMiniFilterWhileTyping=!0),t.debounceMs==null&&(t.debounceMs=500)),t.excelMode&&t.defaultToNothingSelected&&(t.defaultToNothingSelected=!1,H(207))}addEventListenersForDataChanges(){if(!this.isValuesTakenFromGrid())return;this.addManagedPropertyListeners(["groupAllowUnbalanced"],()=>{this.syncAfterDataChange()});const t=st(this,this.syncAfterDataChange.bind(this),0);this.addManagedEventListeners({cellValueChanged:o=>{o.column===this.setFilterParams.column&&t()}})}syncAfterDataChange(){const t=!this.applyActive||this.areModelsEqual(this.getModel(),this.getModelFromUi());return this.valueModel.refreshValues().then(()=>{this.isAlive()&&(this.checkAndRefreshVirtualList(),t&&this.onBtApply(!1,!0))})}setIsLoading(t){Z(this.eFilterLoading,t),t||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter(),this.initLoading()}initLoading(){const t=de("setFilterLoading",this.beans,this.setFilterParams.column);t&&this.eFilterLoadingIcon.appendChild(t)}initVirtualList(){const o=this.getLocaleTextFunc()("ariaFilterList","Filter List"),i=!!this.setFilterParams.treeList,s=this.virtualList=this.createBean(new Op({cssIdentifier:"filter",ariaRole:i?"tree":"listbox",listName:o})),r=this.eSetFilterList;i&&r.classList.add("ag-set-filter-tree-list"),r&&r.appendChild(s.getGui());const{cellHeight:n}=this.setFilterParams;n!=null&&s.setRowHeight(n);const a=(d,u)=>this.createSetListItem(d,i,u);s.setComponentCreator(a);const l=(d,u)=>this.updateSetListItem(d,u);s.setComponentUpdater(l),this.createVirtualListModel(this.setFilterParams)}createVirtualListModel(t){let o;t.suppressSelectAll?o=new BD(this.valueModel):o=new OD(this.valueModel,()=>this.isSelectAllSelected()),t.treeList&&(o=new GD(o)),this.virtualList.setModel(o)}getSelectAllLabel(){const t=this.valueModel.getMiniFilter()==null||!this.setFilterParams.excelMode?"selectAll":"selectAllSearchResults";return this.translateForSetFilter(t)}getAddSelectionToFilterLabel(){return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(t,o,i){const s=this.valueModel.hasGroups(),{isSelected:r,isExpanded:n}=this.isSelectedExpanded(t),{value:a,depth:l,isGroup:d,hasIndeterminateExpandState:u,selectedListener:h,expandedListener:p}=this.newSetListItemAttributes(t),g={focusWrapper:i,value:a,params:this.setFilterParams,translate:m=>this.translateForSetFilter(m),valueFormatter:this.valueFormatter,item:t,isSelected:r,isTree:o,depth:l,groupsExist:s,isGroup:d,isExpanded:n,hasIndeterminateExpandState:u},f=this.createBean(new PD(g));return f.addEventListener("selectionChanged",h),p&&f.addEventListener("expandedChanged",p),f}newSetTreeItemAttributes(t){const o=this.valueModel.hasGroups();return t.key===Ko?{value:()=>this.getSelectAllLabel(),isGroup:o,depth:t.depth,hasIndeterminateExpandState:!0,selectedListener:i=>this.onSelectAll(i.isSelected),expandedListener:i=>this.onExpandAll(i.item,i.isExpanded)}:t.key===qo?{value:()=>this.getAddSelectionToFilterLabel(),depth:t.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:i=>{this.onAddCurrentSelectionToFilterChange(i.isSelected)}}:t.children?{value:this.setFilterParams.treeListFormatter?.(t.treeKey,t.depth,t.parentTreeKeys)??t.treeKey,depth:t.depth,isGroup:!0,selectedListener:i=>this.onGroupItemSelected(i.item,i.isSelected),expandedListener:i=>this.onExpandedChanged(i.item,i.isExpanded)}:{value:this.setFilterParams.treeListFormatter?.(t.treeKey,t.depth,t.parentTreeKeys)??t.treeKey,depth:t.depth,selectedListener:i=>this.onItemSelected(i.item.key,i.isSelected)}}newSetListItemAttributes(t){return this.isSetFilterModelTreeItem(t)?this.newSetTreeItemAttributes(t):t===Ko?{value:()=>this.getSelectAllLabel(),selectedListener:o=>this.onSelectAll(o.isSelected)}:t===qo?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:o=>{this.onAddCurrentSelectionToFilterChange(o.isSelected)}}:{value:this.valueModel.getValue(t),selectedListener:o=>this.onItemSelected(o.item,o.isSelected)}}updateSetListItem(t,o){const{isSelected:i,isExpanded:s}=this.isSelectedExpanded(t);o.refresh(t,i,s)}isSelectedExpanded(t){let o,i;return this.isSetFilterModelTreeItem(t)?(i=t.expanded,t.key===Ko?o=this.isSelectAllSelected():t.key===qo?o=this.valueModel.isAddCurrentSelectionToFilterChecked():t.children?o=this.areAllChildrenSelected(t):o=this.valueModel.isKeySelected(t.key)):t===Ko?o=this.isSelectAllSelected():t===qo?o=this.valueModel.isAddCurrentSelectionToFilterChecked():o=this.valueModel.isKeySelected(t),{isSelected:o,isExpanded:i}}isSetFilterModelTreeItem(t){return t?.treeKey!==void 0}initMiniFilter(){const{eMiniFilter:t}=this,o=this.getLocaleTextFunc();t.setDisplayed(!this.setFilterParams.suppressMiniFilter),t.setValue(this.valueModel.getMiniFilter()),t.onValueChange(()=>this.onMiniFilterInput()),t.setInputAriaLabel(o("ariaSearchFilterValues","Search filter values")),this.addManagedElementListeners(t.getInputElement(),{keydown:i=>this.onMiniFilterKeyDown(i)})}updateMiniFilter(){const{eMiniFilter:t}=this;t.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&t.setDisplayed(!this.setFilterParams.suppressMiniFilter);const o=this.valueModel.getMiniFilter();t.getValue()!==o&&t.setValue(o)}afterGuiAttached(t){super.afterGuiAttached(t),this.resetExpansion(),this.refreshVirtualList();const{eMiniFilter:o}=this;o.setInputPlaceholder(this.translateForSetFilter("searchOoo")),(!t||!t.suppressFocus)&&(o.isDisplayed()?o.getFocusableElement().focus():this.virtualList.awaitStable(()=>this.virtualList.focusRow(0)))}afterGuiDetached(){super.afterGuiDetached(),this.setFilterParams.excelMode&&this.resetMiniFilter();const t=this.getModel();(this.setFilterParams.excelMode||!this.areModelsEqual(t,this.getModelFromUi()))&&(this.resetUiToActiveModel(t),this.showOrHideResults())}applyModel(t="api"){this.setFilterParams.excelMode&&t!=="rowDataUpdated"&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();const o=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(o&&!this.getModel())return!1;const i=super.applyModel(t),s=this.getModel();return s?(o||this.valueModel.setAppliedModelKeys(new Set),s.values.forEach(r=>{this.valueModel.addToAppliedModelKeys(r)})):o||this.valueModel.setAppliedModelKeys(null),i}isModelValid(t){return this.setFilterParams.excelMode?t==null||t.values.length>0:!0}doesFilterPass(t){if(!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;const{node:o}=t;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(o);if(this.groupingTreeList)return this.doesFilterPassForGrouping(o);const i=this.getValueFromNode(o);return i!=null&&Array.isArray(i)?i.length===0?this.valueModel.hasAppliedModelKey(null):i.some(s=>this.isInAppliedModel(this.createKey(s,o))):this.isInAppliedModel(this.createKey(i,o))}doesFilterPassForTreeData(t){return t.childrenAfterGroup?.length?!1:this.isInAppliedModel(this.createKey(Ga(t.getRoute()??[t.key??t.id],!0,this.gos.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(t){const o=(this.rowGroupColsSvc?.columns??[]).map(i=>this.valueSvc.getKeyForNode(i,t));return o.push(this.getValueFromNode(t)),this.isInAppliedModel(this.createKey(Ga(o,!1,this.gos.get("groupAllowUnbalanced"))))}isInAppliedModel(t){return this.valueModel.hasAppliedModelKey(t)}getValueFromNode(t){return this.setFilterParams.getValue(t)}getKeyCreatorParams(t,o=null){const{colDef:i,column:s,api:r,context:n}=this.setFilterParams;return{value:t,colDef:i,column:s,node:o,data:o?.data,api:r,context:n}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return this.valueModel.getValuesType()===2}setFilterValues(t){this.valueModel.overrideValues(t).then(()=>{this.isAlive()&&(this.checkAndRefreshVirtualList(),this.onUiChanged())})}resetFilterValues(){this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.isAlive()&&(this.hardRefreshVirtualList=!0,this.checkAndRefreshVirtualList(),this.onUiChanged())})}onAnyFilterChanged(){setTimeout(()=>{this.isAlive()&&this.valueModel.refreshAfterAnyFilterChanged().then(t=>{t&&this.isAlive()&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})},0)}onMiniFilterInput(){if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;const{applyMiniFilterWhileTyping:t,readOnly:o}=this.setFilterParams;!o&&t?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){const{excelMode:t,readOnly:o}=this.setFilterParams;t==null||o?this.checkAndRefreshVirtualList():this.valueModel.getMiniFilter()==null?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){const t=this.valueModel.getMiniFilter()!=null&&this.valueModel.getDisplayedValueCount()<1;Z(this.eFilterNoMatches,t),Z(this.eSetFilterList,!t)}resetMiniFilter(){this.eMiniFilter.setValue(null,!0),this.valueModel.setMiniFilter(null)}resetUiToActiveModel(t,o){this.setModelAndRefresh(t==null?null:t.values).then(()=>{this.isAlive()&&(this.onUiChanged(!1,"prevent"),o?.())})}handleCancelEnd(t){this.setMiniFilter(null),super.handleCancelEnd(t)}onMiniFilterKeyDown(t){const{excelMode:o,readOnly:i}=this.setFilterParams;t.key===M.ENTER&&!o&&!i&&this.filterOnAllVisibleValues()}filterOnAllVisibleValues(t=!0){this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,t?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(t){return t==null?Promise.resolve():new Promise(o=>{window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t),o()},0)})}onSelectAll(t){t?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(t,o){const i=s=>{s.filterPasses&&(s.children?s.children.forEach(r=>i(r)):this.selectItem(s.key,o))};i(t),this.refreshAfterSelection()}onItemSelected(t,o){this.selectItem(t,o),this.refreshAfterSelection()}selectItem(t,o){o?this.valueModel.selectKey(t):this.valueModel.deselectKey(t)}onExpandAll(t,o){const i=s=>{s.filterPasses&&s.available&&s.children&&(s.children.forEach(r=>i(r)),s.expanded=o)};i(t),this.refreshAfterExpansion()}onExpandedChanged(t,o){t.expanded=o,this.refreshAfterExpansion()}refreshAfterExpansion(){const t=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(t)}refreshAfterSelection(){const t=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(t)}setMiniFilter(t){this.eMiniFilter.setValue(t),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel.getMiniFilter()}checkAndRefreshVirtualList(){this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel.getKeys()}getFilterValues(){return this.valueModel.getValues()}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(t){return this.getLocaleTextFunc()(t,kD[t])}isSelectAllSelected(){if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(t){const o=i=>{if(i.children){let s=!1,r=!1;return i.children.some(a=>{if(!a.filterPasses||!a.available)return!1;const l=o(a);return l===void 0?!0:(l?s=!0:r=!0,s&&r)})?void 0:s}else return this.valueModel.isKeySelected(i.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&o(t):o(t)}destroy(){this.virtualList=this.destroyBean(this.virtualList),super.destroy()}caseFormat(t){return t==null||typeof t!="string"||this.caseSensitive?t:t.toUpperCase()}resetExpansion(){if(!this.setFilterParams.treeList)return;const t=this.valueModel.getSelectAllItem();if(this.isSetFilterModelTreeItem(t)){const o=i=>{i.children&&(i.children.forEach(s=>o(s)),i.expanded=!1)};o(t),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(t){return this.filterModelFormatter.getModelAsString(t,this)}getPositionableElement(){return this.eSetFilterList}},BD=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},OD=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){const t=this.model.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+t}getRow(e){if(e===0)return this.model.getSelectAllItem();const t=this.model.showAddCurrentSelectionToFilter(),o=t?2:1;return e===1&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-o)}areRowsEqual(e,t){return e===t}},GD=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return e==null&&t==null?!0:e!=null&&t!=null&&e.treeKey===t.treeKey&&e.depth===t.depth}},ND={tag:"div",cls:"ag-floating-filter-input ag-set-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},VD=class extends se{constructor(){super(ND,[Dl]),this.eFloatingFilterText=N,this.availableValuesListenerAdded=!1,this.filterModelFormatter=new Kp}wireBeans(e){this.colNames=e.colNames}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(e)}setParams(e){const t=this.colNames.getDisplayNameForColumn(e.column,"header",!0),o=this.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${o("ariaFilterInput","Filter Input")}`)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof qp)){he(248);return}e(t)})}addAvailableValuesListener(){this.parentSetFilterInstance(e=>{const t=e.getValueModel();t&&this.addManagedListeners(t,{availableValuesChanged:()=>this.updateFloatingFilterText()})}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))})}},HD={moduleName:"SetFilter",version:$e,userComponents:{agSetColumnFilter:qp,agSetColumnFloatingFilter:VD},icons:{setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",setFilterLoading:"loading"},dependsOn:[St,Bl]};function _D(e){const t=e.cssIdentifier||"default",o=e.direction||"vertical";return{tag:"div",cls:`ag-group ag-${t}-group`,role:"presentation",children:[{tag:"div",ref:"eToolbar",cls:`ag-group-toolbar ag-${t}-group-toolbar`,children:[{tag:"ag-checkbox",ref:"cbGroupEnabled"}]},{tag:"div",ref:"eContainer",cls:`ag-group-container ag-group-container-${o} ag-${t}-group-container`}]}}var zD=class extends se{constructor(e={}){super(_D(e),[ci]),this.params=e,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1,this.eToolbar=N,this.cbGroupEnabled=N,this.eContainer=N;const{enabled:t,items:o,suppressEnabledCheckbox:i,expanded:s,suppressToggleExpandOnEnableChange:r,useToggle:n}=e;this.cssIdentifier=e.cssIdentifier||"default",this.enabled=t??!0,this.items=o||[],this.useToggle=n??!1,this.alignItems=e.alignItems||"center",this.expanded=s??!0,i!=null&&(this.suppressEnabledCheckbox=i),r!=null&&(this.suppressToggleExpandOnEnableChange=r)}postConstruct(){if(this.setupTitleBar(),this.items.length){const s=this.items;this.items=[],this.addItems(s)}const e=this.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);const{onEnableChange:t,onExpandedChange:o,suppressOpenCloseIcons:i}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(i??!1),this.refreshChildDisplay(),Z(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(s=>{this.setEnabled(s,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(s)}),t!=null&&this.onEnableChange(t),o!=null&&this.onExpandedChange(o)}refreshChildDisplay(){Z(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),this.eTitleBar?.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(e){this.alignItems!==e&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=e;const t=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(t),this}toggleGroupExpand(e,t){if(this.eTitleBar?.isSuppressCollapse()&&!this.useToggle)e=!0,t=!0;else if(e=e??!this.expanded,this.expanded===e)return this;return this.expanded=e,this.refreshChildDisplay(),Z(this.eContainer,e),t||this.dispatchLocalEvent({type:e?"expanded":"collapsed"}),this}addItems(e){e.forEach(t=>this.addItem(t))}prependItem(e){this.insertItem(e,!0)}addItem(e){this.insertItem(e,!1)}insertItem(e,t){const o=this.eContainer,i=e instanceof se?e.getGui():e;i.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),t?(o.insertAdjacentElement("afterbegin",i),this.items.unshift(i)):(o.appendChild(i),this.items.push(i))}hideItem(e,t){const o=this.items[t];Z(o,!e)}getItemIndex(e){const t=e instanceof se?e.getGui():e;return this.items.indexOf(t)}setTitle(e){return this.eTitleBar?.setTitle(e),this}addTitleBarWidget(e){return this.eTitleBar?.addWidget(e),this}addCssClassToTitleBar(e){this.eTitleBar?.addCssClass(e)}dispatchEnableChangeEvent(e){const t={type:"enableChange",enabled:e};this.dispatchLocalEvent(t)}setEnabled(e,t,o){return this.enabled=e,this.refreshDisabledStyles(),o||this.toggleGroupExpand(e),t||(this.cbGroupEnabled.setValue(e),this.eToggle?.setValue(e)),this}isEnabled(){return this.enabled}onEnableChange(e){return this.addManagedListeners(this,{enableChange:t=>e(t.enabled)}),this}onExpandedChange(e){return this.addManagedListeners(this,{expanded:()=>e(!0),collapsed:()=>e(!1)}),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){return this.eTitleBar?.hideOpenCloseIcons(e),this}refreshDisabledStyles(){const e=!this.enabled;this.eContainer.classList.toggle("ag-disabled",e),this.eTitleBar?.refreshDisabledStyles(this.suppressEnabledCheckbox&&e),this.eContainer.classList.toggle("ag-disabled-group-container",e)}setupTitleBar(){const e=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",e.getGui())}createDefaultTitleBar(){const e=this.createManagedBean(new $D(this.params));return this.eTitleBar=e,e.refreshOnExpand(this.expanded),this.addManagedListeners(e,{expandedChanged:t=>this.toggleGroupExpand(t.expanded)}),e}createToggleTitleBar(){const e=this.createManagedBean(new Cb({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:t=>{this.setEnabled(t,!0),this.dispatchEnableChangeEvent(t)}}));return e.addCssClass("ag-group-title-bar"),e.addCssClass(`ag-${this.params.cssIdentifier??"default"}-group-title-bar ag-unselectable`),this.eToggle=e,this.toggleGroupExpand(this.enabled),e}},Xn="ag-disabled-group-title-bar";function WD(e){const t=e.cssIdentifier??"default";return{tag:"div",cls:`ag-group-title-bar ag-${t}-group-title-bar ag-unselectable`,role:e.suppressKeyboardNavigation?"presentation":"role",children:[{tag:"span",ref:"eGroupOpenedIcon",cls:`ag-group-title-bar-icon ag-${t}-group-title-bar-icon`,role:"presentation"},{tag:"span",ref:"eGroupClosedIcon",cls:`ag-group-title-bar-icon ag-${t}-group-title-bar-icon`,role:"presentation"},{tag:"span",ref:"eTitle",cls:`ag-group-title ag-${t}-group-title`}]}}var $D=class extends se{constructor(e={}){super(WD(e)),this.suppressOpenCloseIcons=!1,this.suppressKeyboardNavigation=!1,this.eGroupOpenedIcon=N,this.eGroupClosedIcon=N,this.eTitle=N;const{title:t,suppressOpenCloseIcons:o,suppressKeyboardNavigation:i}=e;t&&t.length>0&&(this.title=t),o!=null&&(this.suppressOpenCloseIcons=o),this.suppressKeyboardNavigation=i??!1}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild(Bo("accordionClosed",this.beans,null)),this.eGroupOpenedIcon.appendChild(Bo("accordionOpen",this.beans,null)),this.addManagedElementListeners(this.getGui(),{click:()=>this.dispatchExpandChanged(),keydown:e=>{switch(e.key){case M.ENTER:case M.SPACE:e.preventDefault(),this.dispatchExpandChanged();break;case M.RIGHT:case M.LEFT:e.preventDefault(),this.dispatchExpandChanged(e.key===M.RIGHT);break}}})}refreshOnExpand(e){this.refreshAriaStatus(e),this.refreshOpenCloseIcons(e)}refreshAriaStatus(e){this.suppressOpenCloseIcons||eo(this.getGui(),e)}refreshOpenCloseIcons(e){const t=!this.suppressOpenCloseIcons;Z(this.eGroupOpenedIcon,t&&e),Z(this.eGroupClosedIcon,t&&!e)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(e){const t={type:"expandedChanged",expanded:e};this.dispatchLocalEvent(t)}setTitle(e){const t=this.getGui(),o=!!e&&e.length>0;e=o?e:void 0,this.eTitle.textContent=e??"",Z(t,o),e!==this.title&&(this.title=e);const i=t.classList.contains(Xn);return this.refreshDisabledStyles(i),this}addWidget(e){return this.getGui().appendChild(e),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(e){const t=this.getGui();e?(t.classList.add(Xn),t.removeAttribute("tabindex")):(t.classList.remove(Xn),typeof this.title=="string"&&!this.suppressKeyboardNavigation?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex"))}};function Yp(e){const{filters:t}=e;return t&&t.length>0?t:[{filter:"agTextColumnFilter"},{filter:"agSetColumnFilter"}]}function tc(e,t){if(e!=null)for(let o=e.length-1;o>=0;o--)t(e[o],o)}function UD(e,t){return t.title!=null?t.title:e instanceof fn?e.getFilterTitle():"Filter"}var Qp=class extends ui{constructor(){super({tag:"div",cls:"ag-multi-filter ag-menu-list-compact"}),this.filterType="multi",this.filterDefs=[],this.filters=[],this.guiDestroyFuncs=[],this.filterGuis=[],this.activeFilterIndices=[],this.lastActivatedMenuItem=null,this.afterFiltersReadyFuncs=[]}postConstruct(){this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e)})}init(e){this.params=e,this.filterDefs=Yp(e);const{column:t,filterChangedCallback:o}=e;this.column=t,this.filterChangedCallback=o;const i=[];return this.filterDefs.forEach((s,r)=>{const n=this.createFilter(s,r);n!=null&&i.push(n)}),new Ce(s=>{Ce.all(i).then(r=>{this.filters=r,this.refreshGui("columnMenu").then(()=>{s()})})}).then(()=>{this.afterFiltersReadyFuncs.forEach(s=>s()),this.afterFiltersReadyFuncs.length=0})}refreshGui(e){return e===this.lastOpenedInContainer?Ce.resolve():(this.tabGuardFeature.removeAllChildrenExceptTabGuards(),this.destroyChildren(),Ce.all(this.filters.map((t,o)=>{const i=this.filterDefs[o],s=UD(t,i);let r;if(i.display==="subMenu"&&e!=="toolPanel")r=this.insertFilterMenu(t,s).then(n=>n.getGui());else if(i.display==="subMenu"||i.display==="accordion"){const n=this.insertFilterGroup(t,s);r=Ce.resolve(n.getGui())}else r=Ce.resolve(t.getGui());return r})).then(t=>{t.forEach((o,i)=>{i>0&&this.appendChild(Me({tag:"div",cls:"ag-filter-separator"})),this.appendChild(o)}),this.filterGuis=t,this.lastOpenedInContainer=e}))}destroyChildren(){this.guiDestroyFuncs.forEach(e=>e()),this.guiDestroyFuncs.length=0,this.filterGuis.length=0}insertFilterMenu(e,t){const o=this.createBean(new Oa);return o.init({menuItemDef:{name:t,subMenu:[],subMenuRole:"dialog",cssClasses:["ag-multi-filter-menu-item"],menuItem:Gp,menuItemParams:{cssClassPrefix:"ag-compact-menu-option",isCompact:!0}},level:0,isAnotherSubMenuOpen:()=>!1,childComponent:e,contextParams:{column:null,node:null,value:null}}).then(()=>{o.setParentComponent(this),this.guiDestroyFuncs.push(()=>this.destroyBean(o)),this.addManagedListeners(o,{menuItemActivated:s=>{this.lastActivatedMenuItem&&this.lastActivatedMenuItem!==s.menuItem&&this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=s.menuItem}});const i=o.getGui();return o.addManagedElementListeners(i,{keydown:s=>{const{key:r}=s;switch(r){case M.UP:case M.RIGHT:case M.DOWN:case M.LEFT:s.preventDefault(),r===M.RIGHT&&o.openSubMenu(!0);break}},focusin:()=>o.activate(),focusout:()=>{!o.isSubMenuOpen()&&!o.isSubMenuOpening()&&o.deactivate()}}),o})}insertFilterGroup(e,t){const o=this.createBean(new zD({title:t,cssIdentifier:"multi-filter"}));return this.guiDestroyFuncs.push(()=>this.destroyBean(o)),o.addItem(e.getGui()),o.toggleGroupExpand(!1),e.afterGuiAttached&&o.addManagedListeners(o,{expanded:()=>e.afterGuiAttached({container:this.lastOpenedInContainer,suppressFocus:!0,hidePopup:this.hidePopup})}),o}isFilterActive(){return this.filters.some(e=>e.isFilterActive())}getLastActiveFilterIndex(){const e=this.activeFilterIndices;return e.length>0?e[e.length-1]:null}doesFilterPass(e,t){let o=!0;return this.filters.forEach(i=>{!o||i===t||!i.isFilterActive()||(o=i.doesFilterPass(e))}),o}getModelFromUi(){return{filterType:this.filterType,filterModels:this.filters.map(t=>{const o=t;return typeof o.getModelFromUi=="function"?o.getModelFromUi():null})}}getModel(){return this.isFilterActive()?{filterType:this.filterType,filterModels:this.filters.map(t=>t.isFilterActive()?t.getModel():null)}:null}setModel(e){const t=(i,s)=>new Ce(r=>{const n=i.setModel(s);n?n.then(()=>r()):r()});let o=[];return e==null?o=this.filters.map((i,s)=>t(i,null).then(()=>{this.updateActiveList(s)})):this.filters.forEach((i,s)=>{const r=e.filterModels.length>s?e.filterModels[s]:null,n=t(i,r).then(()=>{this.updateActiveList(s)});o.push(n)}),Ce.all(o).then(()=>{})}applyModel(e="api"){let t=!1;return this.filters.forEach(o=>{o instanceof fn&&(t=o.applyModel(e)||t)}),t}getChildFilterInstance(e){return this.filters[e]}afterGuiAttached(e){let t;e?(this.hidePopup=e.hidePopup,t=this.refreshGui(e.container)):(this.hidePopup=void 0,t=Ce.resolve());const o=e?.suppressFocus;t.then(()=>{const{filterDefs:i,filters:s,filterGuis:r,beans:n}=this;let a=!!o;i&&tc(i,(d,u)=>{const h=u===0,p=d.display&&d.display!=="inline",g=o||!h||p,f={...e??{},suppressFocus:g},m=s?.[u];if(m&&(this.executeFunctionIfExistsOnFilter(m,"afterGuiAttached",f),h&&!g&&(a=!0)),!o&&h&&p){const b=r[u];b&&(Et(b)||b.focus({preventScroll:!0}),a=!0)}});const l=Ae(n);!a&&(Rs(n)||this.getGui().contains(l))&&this.forceFocusOutOfContainer(!0)})}afterGuiDetached(){this.executeFunctionIfExists("afterGuiDetached")}onAnyFilterChanged(){this.executeFunctionIfExists("onAnyFilterChanged")}onNewRowsLoaded(){this.executeFunctionIfExists("onNewRowsLoaded")}destroy(){this.filters.forEach(e=>this.destroyBean(e)),this.filters.length=0,this.destroyChildren(),this.hidePopup=void 0,super.destroy()}executeFunctionIfExists(e,...t){tc(this.filters,o=>{this.executeFunctionIfExistsOnFilter(o,e,t)})}executeFunctionIfExistsOnFilter(e,t,...o){const i=e[t];typeof i=="function"&&i.apply(e,o)}createFilter(e,t){const{filterModifiedCallback:o,doesRowPassOtherFilter:i}=this.params,{filterManager:s,userCompFactory:r}=this.beans;let n;const a={...s.createFilterParams(this.column,this.column.getColDef()),filterModifiedCallback:o,filterChangedCallback:u=>{this.executeWhenAllFiltersReady(()=>this.filterChanged(t,u))},doesRowPassOtherFilter:u=>i(u)&&this.doesFilterPass({node:u,data:u.data},n)},l=rh(r,e,a,"agTextColumnFilter");if(!l)return null;const d=l.newAgStackInstance();return d.then(u=>{if(u&&(n=u,e.display==="subMenu")){const h=u.getGui();et(h,"dialog")}}),d}executeWhenAllFiltersReady(e){(this.filters?.length??0)>0?e():this.afterFiltersReadyFuncs.push(e)}updateActiveList(e){const{filters:t,activeFilterIndices:o}=this,i=t[e];at(o,e),i.isFilterActive()&&o.push(e)}filterChanged(e,t){this.updateActiveList(e),this.filterChangedCallback(t);const o=this.filters[e];this.filters.forEach(i=>{i!==o&&typeof i.onAnyFilterChanged=="function"&&i.onAnyFilterChanged()})}onFocusIn(e){const t=this.lastActivatedMenuItem;t!=null&&!t.getGui().contains(e.target)&&(t.deactivate(),this.lastActivatedMenuItem=null)}getModelAsString(e){if(!this.filters||!e?.filterModels?.length)return"";const t=this.getLastActiveFilterIndex()??0;return this.filters[t].getModelAsString?.(e.filterModels[t])??""}},jD={tag:"div",cls:"ag-multi-floating-filter ag-floating-filter-input"},KD=class extends se{constructor(){super(jD),this.floatingFilters=[],this.compDetailsList=[]}init(e){this.params=e;const{compDetailsList:t}=this.getCompDetailsList(e);return this.setParams(t)}setParams(e){const t=[];return e.forEach(o=>{const i=o?.newAgStackInstance();i!=null&&(this.compDetailsList.push(o),t.push(i))}),Ce.all(t).then(o=>{o.forEach((i,s)=>{this.floatingFilters.push(i);const r=i.getGui();this.appendChild(r),s>0&&Z(r,!1)})})}refresh(e){this.params=e;const{compDetailsList:t,floatingFilterParamsList:o}=this.getCompDetailsList(e);t.length===this.compDetailsList.length&&t.every((s,r)=>!this.beans.filterManager?.areFilterCompsDifferent(this.compDetailsList[r],s))?o.forEach((s,r)=>{this.floatingFilters[r].refresh?.(s)}):(rt(this.getGui()),this.destroyBeans(this.floatingFilters),this.floatingFilters=[],this.compDetailsList=[],this.setParams(t))}getCompDetailsList(e){const t=[],o=[],i=e.filterParams,s=e.currentParentModel;return Yp(i).forEach((r,n)=>{const a={...e,parentFilterInstance:d=>{this.parentMultiFilterInstance(u=>{const h=u.getChildFilterInstance(n);h!=null&&d(h)})},currentParentModel:()=>s()?.filterModels?.[n]??null};Xe(a.filterParams,r.filterParams);const l=this.getCompDetails(r,a);l&&(t.push(l),o.push(a))}),{compDetailsList:t,floatingFilterParamsList:o}}onParentModelChanged(e,t){t&&t.afterFloatingFilter||this.parentMultiFilterInstance(o=>{if(e==null)this.floatingFilters.forEach((i,s)=>{i.onParentModelChanged(null,t),Z(i.getGui(),s===0)});else{const i=o.getLastActiveFilterIndex();this.floatingFilters.forEach((s,r)=>{const n=e.filterModels.length>r?e.filterModels[r]:null;s.onParentModelChanged(n,t);const a=i==null?r===0:r===i;Z(s.getGui(),a)})}})}destroy(){this.destroyBeans(this.floatingFilters),this.floatingFilters.length=0,super.destroy()}getCompDetails(e,t){const{filterManager:o,frameworkOverrides:i,userCompFactory:s}=this.beans,r=Ph(i,e,()=>o.getDefaultFloatingFilter(this.params.column))??"agReadOnlyFloatingFilter";return nh(s,e,t,r)}parentMultiFilterInstance(e){this.params.parentFilterInstance(t=>{t instanceof Qp||he(120),e(t)})}},qD={moduleName:"MultiFilter",version:$e,userComponents:{agMultiColumnFilter:Qp,agMultiColumnFloatingFilter:KD},dependsOn:[St,Bl,Np]},YD=class extends A{constructor(){super(...arguments),this.beanName="aggColNameSvc"}getHeaderName(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const{valueColsSvc:o,colModel:i,rowGroupColsSvc:s}=this.beans,r=e.getColDef().pivotValueColumn,n=j(r);let a=null,l;if(n){const d=o?.columns??[],u=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&d.length===1,h=e.getColDef().pivotTotalColumnIds!==void 0;if(u&&!h)return t;a=r?r.getAggFunc():null,l=!0}else{const d=e.isValueActive(),u=i.isPivotMode()||s?.columns.length!==0;d&&u?(a=e.getAggFunc(),l=!0):l=!1}if(l){const d=typeof a=="string"?a:"func";return`${this.getLocaleTextFunc()(d,d)}(${t})`}return t}},QD={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},XD=class extends A{constructor(){super(...arguments),this.beanName="aggFuncSvc",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const e=this.aggFuncsMap;e.sum=ZD,e.first=JD,e.last=eM,e.min=tM,e.max=oM,e.count=iM,e.avg=sM,this.initialised=!0}isAggFuncPossible(e,t){const i=this.getFuncNames(e).includes(t),s=j(this.aggFuncsMap[t]);return i&&s}getDefaultFuncLabel(e){return QD[e]??e}getDefaultAggFunc(e){const t=e.getColDef().defaultAggFunc;if(j(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,"sum"))return"sum";const o=this.getFuncNames(e);return o?.length?o[0]:null}addAggFuncs(e){if(this.init(),!!e)for(const t of Object.keys(e))this.aggFuncsMap[t]=e[t]}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){const t=e.getColDef().allowedAggFuncs;return t??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function ZD(e){const{values:t}=e;let o=null;for(let i=0;i<t.length;i++){const s=t[i];typeof s=="number"?o===null?o=s:o+=typeof o=="number"?s:BigInt(s):typeof s=="bigint"&&(o===null?o=s:o=(typeof o=="bigint"?o:BigInt(o))+s)}return o}function JD(e){return e.values.length>0?e.values[0]:null}function eM(e){return e.values.length>0?Se(e.values):null}function tM(e){const{values:t}=e;let o=null;for(let i=0;i<t.length;i++){const s=t[i];(typeof s=="number"||typeof s=="bigint")&&(o===null||o>s)&&(o=s)}return o}function oM(e){const{values:t}=e;let o=null;for(let i=0;i<t.length;i++){const s=t[i];(typeof s=="number"||typeof s=="bigint")&&(o===null||o<s)&&(o=s)}return o}function iM(e){const{values:t}=e;let o=0;for(let s=0;s<t.length;s++){const r=t[s];o+=r!=null&&typeof r.value=="number"?r.value:1}const i=e.rowNode?.aggData?.[e.column.getColId()];return i&&i.value===o?i:{value:o,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function sM(e){const{values:t}=e;let o=0,i=0;for(let n=0;n<t.length;n++){const a=t[n];let l=null;typeof a=="number"||typeof a=="bigint"?(l=a,i++):a!=null&&(typeof a.value=="number"||typeof a.value=="bigint")&&typeof a.count=="number"&&(l=a.value*(typeof a.value=="number"?a.count:BigInt(a.count)),i+=a.count),typeof l=="number"?o+=typeof o=="number"?l:BigInt(l):typeof l=="bigint"&&(o=(typeof o=="bigint"?o:BigInt(o))+l)}let s=null;i>0&&(s=o/(typeof o=="number"?i:BigInt(i)));const r=e.rowNode?.aggData?.[e.column?.getColId()];return r&&r.count===i&&r.value===s?r:{count:i,value:s,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}function rM(e,t){e.aggFuncSvc&&e.aggFuncSvc.addAggFuncs(t)}function nM(e){e.aggFuncSvc&&e.aggFuncSvc.clear()}function aM(e,t,o){e.valueColsSvc?.setColumnAggFunc?.(t,o,"api")}function Zn(e,t,o,i,s,r){const n=typeof o=="string"?e.aggFuncSvc.getAggFunc(o):o;if(typeof n!="function")return he(109,{aggFuncOrString:o}),null;const a=J(e.gos,{values:t,column:i,colDef:i.colDef,pivotResultColumn:r,rowNode:s,data:s?.data});return n(a)}var lM=class extends A{constructor(){super(...arguments),this.beanName="aggStage",this.refreshProps=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","suppressAggFilteredOnly","grandTotalRow"]),this.step="aggregate"}wireBeans(e){this.colModel=e.colModel,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.pivotResultCols=e.pivotResultCols,this.valueSvc=e.valueSvc}execute(e){const t=!this.valueColsSvc?.columns?.length,o=!this.gos.getCallback("getGroupRowAgg");if(t&&o&&e.changedPath?.active)return;const i=this.createAggDetails(e);this.recursivelyCreateAggData(i)}createAggDetails(e){const t=this.colModel.isPivotActive(),o=this.valueColsSvc?.columns,i=t&&this.pivotColsSvc?this.pivotColsSvc.columns:[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!al(this.gos),changedPath:e.changedPath,valueColumns:o??[],pivotColumns:i,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return xs(this.gos)!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){const t=o=>{if(!o.hasChildren()){o.aggData&&this.setAggData(o,null);return}if(o.level===-1&&!e.groupIncludeTotalFooter){const r=!this.colModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&r){this.setAggData(o,null);return}}this.aggregateRowNode(o,e)};e.changedPath.forEachChangedNodeDepthFirst(t,!0)}aggregateRowNode(e,t){const o=t.valueColumns.length===0,i=t.pivotColumns.length===0;let s;t.userAggFunc?s=t.userAggFunc({nodes:e.childrenAfterFilter}):o?s=null:i?s=this.aggregateRowNodeUsingValuesOnly(e,t):s=this.aggregateRowNodeUsingValuesAndPivot(e),this.setAggData(e,s),e.sibling&&this.setAggData(e.sibling,s)}aggregateRowNodeUsingValuesAndPivot(e){const t={},o=this.pivotResultCols?.getPivotResultCols()?.list??[];let i=!0;const s=this.beans;for(let r=0;r<o.length;r++){const n=o[r],a=n.getColDef();if(a.pivotTotalColumnIds!=null){i=!1;continue}const l=a.pivotKeys??[];let d;e.leafGroup?d=this.getValuesFromMappedSet(e.childrenMapped,l,a.pivotValueColumn):d=this.getValuesPivotNonLeaf(e,a.colId),t[a.colId]=Zn(s,d,a.pivotValueColumn.getAggFunc(),a.pivotValueColumn,e,n)}if(!i)for(let r=0;r<o.length;r++){const n=o[r],a=n.getColDef();if(a.pivotTotalColumnIds==null||!a.pivotTotalColumnIds.length)continue;const l=a.pivotTotalColumnIds.map(d=>t[d]);t[a.colId]=Zn(s,l,a.pivotValueColumn.getAggFunc(),a.pivotValueColumn,e,n)}return t}aggregateRowNodeUsingValuesOnly(e,t){const o={},{changedPath:i,valueColumns:s,filteredOnly:r}=t,n=i.active?i.getValueColumnsForNode(e,s):s,a=i.active?i.getNotValueColumnsForNode(e,s):null,l=this.getValuesNormal(e,n,r),d=e.aggData,u=this.beans;return n.forEach((h,p)=>{o[h.getId()]=Zn(u,l[p],h.getAggFunc(),h,e)}),a&&d&&a.forEach(h=>{o[h.getId()]=d[h.getId()]}),o}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map(o=>o.aggData[t])}getValuesFromMappedSet(e,t,o){let i=e;for(let s=0;s<t.length;s++){const r=t[s];i=i?i[r]:null}return i?i.map(s=>this.valueSvc.getValue(o,s)):[]}getValuesNormal(e,t,o){const i=[];t.forEach(()=>i.push([]));const s=t.length,r=o?e.childrenAfterFilter:e.childrenAfterGroup,n=r.length;for(let a=0;a<n;a++){const l=r[a];for(let d=0;d<s;d++){const u=t[d],h=this.valueSvc.getValue(u,l);i[d].push(h)}}return i}setAggData(e,t){const o=e.aggData;if(e.aggData=t,e.__localEventService){const i=s=>{const r=e.aggData?e.aggData[s]:void 0,n=o?o[s]:void 0;if(r===n)return;const a=this.colModel.getCol(s);a&&e.dispatchCellChangedEvent(a,r,n)};if(o)for(const s of Object.keys(o))i(s);if(t)for(const s of Object.keys(t))(!o||!(s in o))&&i(s)}}},dM=class extends A{constructor(){super(...arguments),this.beanName="filterAggStage",this.refreshProps=new Set([]),this.step="filter_aggregates"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=this.beans.colModel.isPivotMode(),o=this.filterManager?.isAggregateFilterPresent()||this.filterManager?.isAggregateQuickFilterPresent(),i=d=>!d.node.group,s=d=>d.node.leafGroup,r=xs(this.gos)||(t?s:i),{changedPath:n}=e,a=(d,u=!1)=>{d.childrenAfterFilter&&(d.childrenAfterAggFilter=d.childrenAfterFilter,u&&d.childrenAfterAggFilter.forEach(h=>a(h,u)),this.setAllChildrenCount(d)),d.sibling&&(d.sibling.childrenAfterAggFilter=d.childrenAfterAggFilter)},l=d=>{d.childrenAfterAggFilter=d.childrenAfterFilter?.filter(u=>r({node:u})&&this.filterManager.doesRowPassAggregateFilters({rowNode:u})?(a(u,!0),!0):u.childrenAfterAggFilter?.length)||null,this.setAllChildrenCount(d),d.sibling&&(d.sibling.childrenAfterAggFilter=d.childrenAfterAggFilter)};n.forEachChangedNodeDepthFirst(o?l:a,!0)}setAllChildrenCountTreeData(e){const t=e.childrenAfterAggFilter;let o=0;if(t){const i=t.length;o=i;for(let s=0;s<i;++s)o+=t[s].allChildrenCount??0}e.setAllChildrenCount(o===0&&e.level>=0?null:o)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach(o=>{o.group?t+=o.allChildrenCount:t++}),e.setAllChildrenCount(t)}setAllChildrenCount(e){if(!e.hasChildren()){e.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e)}},cM=new Set(["__localEventService","__objectId","sticky","__autoHeights","__checkAutoHeightsDebounced"]);function po(e,t){if(e.sibling)return;const o=new di(t);Object.keys(e).forEach(i=>{cM.has(i)||(o[i]=e[i])}),o.footer=!0,o.setRowTop(null),o.setRowIndex(null),o.oldRowTop=null,o.id="rowGroupFooter_"+e.id,o.sibling=e,e.sibling=o}function Gl(e){e.sibling&&(e.sibling.setRowTop(null),e.sibling.setRowIndex(null),e.sibling=void 0)}var uM=class extends A{constructor(){super(...arguments),this.beanName="footerSvc"}addTotalRows(e,t,o,i,s,r){let n=e;if(s)return(i&&al(this.gos))===r&&(po(t,this.beans),o(t.sibling,n++)),n;const a=Bi(this.gos);return(i&&a({node:t}))===r&&(po(t,this.beans),o(t.sibling,n++)),n}getTopDisplayIndex(e,t,o,i){let s=t;if(e[0].footer){if(t===0)return 0;s-=1}const r=e[e.length-1],n=s>=o.length;return r.footer&&n?r.rowIndex:i(s)}getTotalValue(e){return this.getLocaleTextFunc()("footerTotal","Total")+" "+(e??"")}},Xp=class extends hl{constructor(){super(...arguments),this.beanName="valueColsSvc",this.eventName="columnValueChanged",this.columnProcessors={set:(e,t,o)=>this.setValueActive(t,e,o),add:(e,t,o)=>this.setValueActive(!0,e,o),remove:(e,t,o)=>this.setValueActive(!1,e,o)},this.columnExtractors={setFlagFunc:(e,t,o)=>this.setColValueActive(e,t,o),getIndexFunc:()=>{},getInitialIndexFunc:()=>{},getValueFunc:e=>{const t=e.aggFunc;if(t===null||t==="")return null;if(t!==void 0)return!!t},getInitialValueFunc:e=>e.initialAggFunc!=null&&e.initialAggFunc!=""},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>at(this.columns,e)}}extractCols(e,t){return this.columns=super.extractCols(e,t),this.columns.forEach(o=>{const i=o.getColDef();i.aggFunc!=null&&i.aggFunc!=""?this.setColAggFunc(o,i.aggFunc):o.getAggFunc()||this.setColAggFunc(o,i.initialAggFunc)}),this.columns}setColumnAggFunc(e,t,o){if(!e)return;const i=this.colModel.getColDefCol(e);i&&(this.setColAggFunc(i,t),this.dispatchColumnChangedEvent(this.eventSvc,this.eventName,[i],o))}syncColumnWithState(e,t,o){const i=o("aggFunc").value1;i!==void 0&&(typeof i=="string"?(this.setColAggFunc(e,i),e.isValueActive()||(this.setColValueActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e))):(j(i)&&H(33),e.isValueActive()&&(this.setColValueActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e))))}setValueActive(e,t,o){if(e!==t.isValueActive()&&(this.setColValueActive(t,e,o),e&&!t.getAggFunc()&&this.aggFuncSvc)){const i=this.aggFuncSvc.getDefaultAggFunc(t);this.setColAggFunc(t,i)}}setColAggFunc(e,t){e.aggFunc=t,e.dispatchStateUpdatedEvent("aggFunc")}setColValueActive(e,t,o){e.aggregationActive!==t&&(e.aggregationActive=t,e.dispatchColEvent("columnValueChanged",o))}},Nl={moduleName:"SharedAggregation",version:$e,beans:[XD,YD,uM,Xp],apiFunctions:{addAggFuncs:rM,clearAggFuncs:nM,setColumnAggFunc:aM},dependsOn:[St]},hM={moduleName:"Aggregation",version:$e,beans:[lM,dM],rowModels:["clientSide"],dependsOn:[Nl]},Zp=class extends hl{constructor(){super(...arguments),this.beanName="pivotColsSvc",this.eventName="columnPivotChanged",this.columnProcessors={set:(e,t,o)=>this.setColPivotActive(e,t,o),add:(e,t,o)=>this.setColPivotActive(e,!0,o),remove:(e,t,o)=>this.setColPivotActive(e,!1,o)},this.columnOrdering={enableProp:"pivot",initialEnableProp:"initialPivot",indexProp:"pivotIndex",initialIndexProp:"initialPivotIndex"},this.columnExtractors={setFlagFunc:(e,t,o)=>this.setColPivotActive(e,t,o),getIndexFunc:e=>e.pivotIndex,getInitialIndexFunc:e=>e.initialPivotIndex,getValueFunc:e=>e.pivot,getInitialValueFunc:e=>e.initialPivot},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>at(this.columns,e)}}syncColumnWithState(e,t,o,i){const{value1:s,value2:r}=o("pivot","pivotIndex");(s!==void 0||r!==void 0)&&(typeof r=="number"||s?(e.isPivotActive()||(this.setColPivotActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e)),i&&typeof r=="number"&&(i[e.getId()]=r)):e.isPivotActive()&&(this.setColPivotActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e)))}setColPivotActive(e,t,o){e.pivotActive!==t&&(e.pivotActive=t,e.dispatchColEvent("columnPivotChanged",o)),e.dispatchStateUpdatedEvent("pivot")}},pM=class extends hl{constructor(){super(...arguments),this.beanName="rowGroupColsSvc",this.eventName="columnRowGroupChanged",this.columnProcessors={set:(e,t,o)=>this.setActive(t,e,o),add:(e,t,o)=>this.setActive(!0,e,o),remove:(e,t,o)=>this.setActive(!1,e,o)},this.columnOrdering={enableProp:"rowGroup",initialEnableProp:"initialRowGroup",indexProp:"rowGroupIndex",initialIndexProp:"initialRowGroupIndex"},this.columnExtractors={setFlagFunc:(e,t,o)=>this.setColRowGroupActive(e,t,o),getIndexFunc:e=>e.rowGroupIndex,getInitialIndexFunc:e=>e.initialRowGroupIndex,getValueFunc:e=>e.rowGroup,getInitialValueFunc:e=>e.initialRowGroup},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>at(this.columns,e)}}moveColumn(e,t,o){if(this.columns.length===0)return;const i=this.columns[e],s=this.columns.slice(e,t);this.columns.splice(e,1),this.columns.splice(t,0,i),this.updateIndexMap(),this.eventSvc.dispatchEvent({type:this.eventName,columns:s,column:s.length===1?s[0]:null,source:o})}syncColumnWithState(e,t,o,i){const{value1:s,value2:r}=o("rowGroup","rowGroupIndex");(s!==void 0||r!==void 0)&&(typeof r=="number"||s?(e.isRowGroupActive()||(this.setColRowGroupActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e)),i&&typeof r=="number"&&(i[e.getId()]=r)):e.isRowGroupActive()&&(this.setColRowGroupActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e)))}setActive(e,t,o){e!==t.isRowGroupActive()&&(this.setColRowGroupActive(t,e,o),qf(this.gos,e)&&this.colModel.setColsVisible([t],!e,o))}setColRowGroupActive(e,t,o){e.rowGroupActive!==t&&(e.rowGroupActive=t,e.dispatchColEvent("columnRowGroupChanged",o)),e.dispatchStateUpdatedEvent("rowGroup")}},gM=class extends A{constructor(){super(...arguments),this.beanName="autoColSvc"}postConstruct(){this.addManagedPropertyListener("autoGroupColumnDef",this.updateColumns.bind(this))}addColumns(e){this.columns!=null&&(e.list=this.columns.list.concat(e.list),e.tree=this.columns.tree.concat(e.tree),$u(e))}createColumns(e,t){const o=this.beans,{colModel:i,gos:s,rowGroupColsSvc:r,colGroupSvc:n}=o,a=i.isPivotMode(),l=un(s,a),d=a?s.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),u=r?.columns,p=!(u&&u.length>0||s.get("treeData"))||d||l,g=()=>{this.columns&&(Go(o,this.columns.tree),this.columns=null)};if(p){g();return}const f=this.generateAutoCols(u),m=Wu(f,this.columns?.list||null),b=e.treeDepth,S=(this.columns?this.columns.treeDepth:-1)==b;if(m&&S)return;g();const y=n?.findDepth(e.tree)??0,x=n?.balanceTreeForAutoCols(f,y)??[];this.columns={list:f,tree:x,treeDepth:y,map:{}},t(k=>{if(!k)return null;const D=k.filter(v=>!pn(v));return[...f,...D]})}updateColumns(e){const t=Jo(e.source);this.columns?.list.forEach((o,i)=>this.updateOneAutoCol(o,i,t))}getColumn(e){return this.columns?.list.find(t=>ul(t,e))??null}getColumns(){return this.columns?.list??null}generateAutoCols(e=[]){const t=[],o=this.gos.get("treeData");let i=ll(this.gos);return o&&i&&(H(182),i=!1),i?e.forEach((s,r)=>{t.push(this.createOneAutoCol(s,r))}):t.push(this.createOneAutoCol()),t}isSuppressAutoCol(){const e=this.gos;return e.get("groupDisplayType")==="custom"?!0:e.get("treeDataDisplayType")==="custom"}createOneAutoCol(e,t){let o;e?o=`${ni}-${e.getId()}`:o=ni;const i=this.createAutoColDef(o,e,t);i.colId=o;const s=new hn(i,null,o,!0);return this.createBean(s),s}updateOneAutoCol(e,t,o){const i=e.getColDef(),s=typeof i.showRowGroup=="string"?i.showRowGroup:void 0,r=this.beans,n=s!=null?r.colModel.getColDefCol(s):void 0,a=e.getId(),l=this.createAutoColDef(a,n??void 0,t);e.setColDef(l,null,o),pt(r,{state:[{colId:a,...l}]},o)}createAutoColDef(e,t,o){let i=this.createBaseColDef(t);const s=this.gos.get("autoGroupColumnDef");Xe(i,s),i=Nr(this.beans,i,e,!0),this.gos.get("treeData")||Ee(i.field)&&Ee(i.valueGetter)&&Ee(i.filterValueGetter)&&i.filter!=="agGroupColumnFilter"&&(i.filter=!1),o&&o>0&&(i.headerCheckboxSelection=!1);const r=Ht(this.gos),n=i.valueGetter||i.field!=null;return r&&!n&&(i.sortIndex=void 0,i.initialSort=void 0),i}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),i={headerName:this.getLocaleTextFunc()("group","Group"),showRowGroup:e?.getColId()??!0};return t&&(t.cellRenderer||t.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer",this.beans.findSvc?.setupGroupCol(i)),e&&(i.headerName=this.beans.colNames.getDisplayNameForColumn(e,"header")??void 0,i.headerValueGetter=e.colDef.headerValueGetter),i}destroy(){Go(this.beans,this.columns?.tree),super.destroy()}},Jp=class extends A{addExpandedCss(e,t){t.isExpandable()&&(e.push("ag-row-group"),e.push(t.expanded?"ag-row-group-expanded":"ag-row-group-contracted"))}getRowExpandedListeners(e){const{rowNode:t}=e,o=this.updateExpandedCss.bind(this,e,t);return{expandedChanged:o,hasChildrenChanged:o}}setExpanded(e,t,o,i){if(e.expanded===t)return;e.expanded=t,e.dispatchRowEvent("expandedChanged");const s={...Rh(e,this.gos,"rowGroupOpened"),expanded:t,event:o||null};this.dispatchExpandedEvent(s,i),this.beans.rowRenderer.refreshCells({rowNodes:[e]})}isExpandable(e){return e.footer?!1:this.beans.colModel.isPivotMode()?e.hasChildren()&&!e.leafGroup:e.hasChildren()||e.master}updateExpandedCss(e,t){const o=t.isExpandable(),i=t.expanded==!0;e.forEachGui(void 0,s=>{const r=s.rowComp;r.addOrRemoveCssClass("ag-row-group",o),r.addOrRemoveCssClass("ag-row-group-expanded",o&&i),r.addOrRemoveCssClass("ag-row-group-contracted",o&&!i),eo(s.element,o&&i)})}},fM=class extends Jp{constructor(){super(...arguments),this.beanName="expansionSvc",this.events=[]}wireBeans(e){this.rowModel=e.rowModel}expandRows(e){const t=new Set(e);this.rowModel.forEachNode(o=>{o.id&&t.has(o.id)&&(o.expanded=!0)}),this.onGroupExpandedOrCollapsed()}expandAll(e){const{gos:t,colModel:o,eventSvc:i}=this.beans,s=this.rowModel,r=t.get("treeData"),n=o.isPivotActive(),a=d=>{d&&d.forEach(u=>{const h=()=>{u.expanded=e,a(u.childrenAfterGroup)};if(r){j(u.childrenAfterGroup)&&h();return}if(n){!u.leafGroup&&h();return}u.group&&h()})},l=s.rootNode;l&&a(l.childrenAfterGroup),s.refreshModel({step:"map"}),i.dispatchEvent({type:"expandOrCollapseAll",source:e?"expandAll":"collapseAll"})}onGroupExpandedOrCollapsed(){this.rowModel.refreshModel({step:"map"})}dispatchExpandedEvent(e,t){this.events.push(e);const o=()=>{this.rowModel.onRowGroupOpened(),this.events.forEach(i=>this.eventSvc.dispatchEvent(i)),this.events=[]};t?o():(this.dispatchExpandedDebounced==null&&(this.dispatchExpandedDebounced=this.debounce(o)),this.dispatchExpandedDebounced())}debounce(e){const t=this.beans.animationFrameSvc;if(!t)return()=>window.setTimeout(e,0);let o=!1;return()=>{if(!t.active){window.setTimeout(e,0);return}o||(o=!0,t.addDestroyTask(()=>{o=!1,e()}))}}};function mM(e){let t=e.get("groupHideParentOfSingleChild");return t||(t=e.get("groupRemoveSingleChildren"),!t&&e.get("groupRemoveLowestSingleChildren")&&(t="leafGroupsOnly")),{groupHideParentOfSingleChild:t,isGroupMultiAutoColumn:ll(e),hideOpenParents:e.get("groupHideOpenParents"),grandTotalRow:al(e),groupTotalRow:Bi(e)}}function vM(e,t,o){return e.groupHideParentOfSingleChild===!0&&o&&t.childrenAfterGroup.length===1}function CM(e,t,o){return e.groupHideParentOfSingleChild==="leafGroupsOnly"&&o&&t.leafGroup&&t.childrenAfterGroup.length===1}function bM(e,t,o,i,s,r){const n=i&&!o,a=i&&t.leafGroup,l=e.hideOpenParents&&t.expanded&&!t.master&&!a;return!n&&!l&&!s&&!r}var wM=class extends A{constructor(){super(...arguments),this.beanName="flattenStage",this.refreshProps=new Set(["groupHideParentOfSingleChild","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupTotalRow","masterDetail"]),this.step="map"}execute(e){const t=e.rowNode,o=[],i=this.beans.colModel.isPivotMode(),s=i&&t.leafGroup&&t.aggData,r=s?[t]:t.childrenAfterSort,n=mM(this.gos);this.recursivelyAddToRowsToDisplay(n,r,o,i,0);const a=o.length>0;if(!s&&a&&n.grandTotalRow){po(t,this.beans);const d=n.grandTotalRow==="top";this.addRowNodeToRowsToDisplay(n,t.sibling,o,0,d)}return o}recursivelyAddToRowsToDisplay(e,t,o,i,s){if(t?.length)for(let r=0;r<t.length;r++){const n=t[r],a=n.hasChildren(),l=vM(e,n,a),d=CM(e,n,a);if(bM(e,n,a,i,l,d)&&this.addRowNodeToRowsToDisplay(e,n,o,s),!(i&&n.leafGroup))if(a){const h=l||d;if(n.expanded||h){const p=e.groupTotalRow({node:n});p||Gl(n);const g=h?s:s+1;p==="top"&&(po(n,this.beans),this.addRowNodeToRowsToDisplay(e,n.sibling,o,g)),this.recursivelyAddToRowsToDisplay(e,n.childrenAfterSort,o,i,g),p==="bottom"&&(po(n,this.beans),this.addRowNodeToRowsToDisplay(e,n.sibling,o,g))}}else{const h=this.beans.masterDetailSvc?.getDetail(n);h&&this.addRowNodeToRowsToDisplay(e,h,o,s)}}}addRowNodeToRowsToDisplay(e,t,o,i,s){s?o.unshift(t):o.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:i)}},yM=class extends A{constructor(){super(...arguments),this.beanName="groupStage",this.refreshProps=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType","treeData","treeDataChildrenField","treeDataParentIdField"]),this.step="group",this.approach=null,this.strategy=void 0}destroy(){super.destroy(),this.strategy=void 0,this.approach=null}createStrategy(){const{beans:e,approach:t}=this;let o;switch(t){case"treeSelfRef":o="treeParentIdStrategy";break;case"group":o="groupStrategy";break}if(o){const i=e.registry.createDynamicBean(o,!1);return this.createOptionalManagedBean(i),i}}execute(e){let t=this.strategy;const o=Bu(this.gos);return this.approach!==o&&(this.approach=o,this.destroyBean(t),t&&this.approach!=="treeNested"&&this.approach!=="treePath"&&SM(e.rowNode),t=this.createStrategy(),this.strategy=t),t?.execute(e),!!t}},SM=e=>{const t=e.allLeafChildren,o=e.sibling;e.treeNodeFlags=0,e.childrenAfterGroup=t,e.childrenMapped=null,e.groupData=null,o&&(o.childrenAfterGroup=e.childrenAfterGroup,o.childrenAfterAggFilter=e.childrenAfterAggFilter,o.childrenAfterFilter=e.childrenAfterFilter,o.childrenAfterSort=e.childrenAfterSort,o.childrenMapped=null,o.groupData=null);for(const i of t){const s=i.sibling;oc(i),s&&oc(s),i.parent=e,i.level=0,i.key=null,i.treeNodeFlags=0,(i.group||i.hasChildren())&&(i.group=!1,i.updateHasChildren())}e.updateHasChildren()},oc=e=>{e.allLeafChildren=null,e.childrenAfterGroup=null,e.childrenAfterAggFilter=null,e.childrenAfterFilter=null,e.childrenAfterSort=null,e.childrenMapped=null,e.groupData&&(e.groupData=null)};function Na(e,t,o){let i=e;const s=i.level-t.level;if(s<=0||!o.get("groupHideOpenParents"))return!1;for(let n=0;n<s;n++){if(!(i.parent?.childrenAfterSort?.[0]===i))return!1;i=i.parent}return i===t}function ic(e,t,o,i){const s=o.key==="",r=!!o.rowGroupColumn&&(!e||e?.isRowGroupDisplayed(o.rowGroupColumn.getId()));if(s&&r){const n=Na(t,o,i.gos);if(o===t||n)return Xa(i.localeSvc)("blanks","(Blanks)")}return null}var eg=class extends A{constructor(){super(...arguments),this.indentClass=null}init(e,t,o,i,s,r,n){this.params=n,this.eGui=t,this.eCheckbox=o,this.eExpanded=i,this.eContracted=s,this.comp=e,this.compClass=r;const{node:a,column:l}=n;if(this.node=a,this.displayedNode=a,!this.isEmbeddedRowMismatch()){if(a.footer){this.initFooterCell();return}if(!l){this.initFullWidthCell();return}this.displayedNode=this.beans.valueSvc.getDisplayedNode(a,l)??this.node,this.setupExpand(),this.setupCheckbox(),this.addGroupValue(),this.setupIndent()}}initFooterCell(){const{node:e,column:t}=this.params,o=e.level===-1;!(e.rowGroupColumn&&t&&t.isRowGroupDisplayed(e.rowGroupColumn.getId()))&&!o||(this.addFooterValue(),this.setupIndent(),o||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!0))}initFullWidthCell(){const e=()=>{const{rowDragSvc:t}=this.beans;if(!this.params.rowDrag||!t)return;const o=t.createRowDragComp(()=>this.params.value,this.params.node);this.createManagedBean(o),this.eGui.insertAdjacentElement("afterbegin",o.getGui())};this.setupExpand(),e(),this.setupCheckbox(),this.addGroupValue(),this.setupIndent()}getCellAriaRole(){const e=this.params.colDef?.cellAriaRole,t=this.params.column?.getColDef().cellAriaRole;return e||t||"gridcell"}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;const{visibleCols:e}=this.beans,t=this.params.pinned==="left",o=this.params.pinned==="right",i=!t&&!o;return this.gos.get("enableRtl")?e.isPinningLeft()?!o:!i:e.isPinningLeft()?!t:!i}addGroupValue(){const{params:{column:e,value:t},node:o,displayedNode:i,beans:s}=this,r=this.getFormattedValue()??ic(e,o,i,s),n=this.getInnerCompDetails(r);this.comp.setInnerRenderer(n,r??t??null)}getFormattedValue(){const{valueSvc:e}=this.beans,{value:t,valueFormatted:o,column:i}=this.params,{rowGroupColumn:s}=this.displayedNode;return!s||!i?o:i?.isRowGroupDisplayed(s.getId())?e.formatValue(s,this.node,t):null}addFooterValue(){const{expressionSvc:e,footerSvc:t}=this.beans,{totalValueGetter:o,column:i,node:s,value:r}=this.params,n=this.getFormattedValue()??ic(i,s,s,this.beans);let a="";o?typeof o=="function"?a=o({...this.params,valueFormatted:n}):typeof o=="string"?a=e?.evaluate(o,{...this.params,valueFormatted:n}):H(179):a=t?.getTotalValue(n??r);const l=this.getInnerCompDetails(n);this.comp.setInnerRenderer(l,a??"")}setupExpand(){const{colModel:e}=this.beans,{eGridCell:t,column:o,suppressDoubleClickExpand:i}=this.params,s=(d,u)=>{const h=de(d,this.beans,null);h&&(u.appendChild(h),this.addDestroyFunc(()=>u.removeChild(h)))};s("groupExpanded",this.eExpanded),s("groupContracted",this.eContracted);const r=this.comp,n=()=>{if(!this.isExpandable())return;const u=this.displayedNode.expanded;r.setExpandedDisplayed(u),r.setContractedDisplayed(!u),eo(t,!!this.displayedNode.expanded)},a=()=>{const d=this.isExpandable();r.addOrRemoveCssClass("ag-cell-expandable",d),r.addOrRemoveCssClass("ag-row-group",d);const u=!d&&e.isPivotMode();r.addOrRemoveCssClass("ag-pivot-leaf-group",u);const h=!e.isPivotMode()&&(!this.displayedNode.footer||this.displayedNode.level!==-1);r.addOrRemoveCssClass("ag-row-group-leaf-indent",!d&&h);const p=this.getChildCount(),g=p>0?`(${p})`:"";r.setChildCount(g),d?n():(r.setExpandedDisplayed(!1),r.setContractedDisplayed(!1),ff(t))};(()=>{!(o?.isCellEditable(this.displayedNode)&&this.gos.get("enableGroupEdit"))&&!i&&this.addManagedListeners(t,{dblclick:this.onCellDblClicked.bind(this)}),this.addManagedListeners(this.eExpanded,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(this.eContracted,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedListeners(this.displayedNode,{allChildrenCountChanged:a,masterChanged:a,groupChanged:a,hasChildrenChanged:a,expandedChanged:n})})(),a()}getInnerCompDetails(e){const{userCompFactory:t,findSvc:o}=this.beans,i={...this.params,valueFormatted:e};if(i.fullWidth){const d=this.gos.get("groupRowRendererParams"),u=Ks(t,d,i);return u||(o?.isMatch(i.node,null)?Ks(t,{...d,innerRenderer:"agFindCellRenderer"},i):void 0)}const s=d=>d&&d.componentClass==this.compClass,r=Ks(t,i,i);if(r&&!s(r))return r;const{displayedNode:{rowGroupColumn:n}}=this,a=n?.colDef,l=n&&i.column?.isRowGroupDisplayed(n.getId());if(a&&l){const d=Oi(t,a,i);if(d)if(s(d)){if(a?.cellRendererParams?.innerRenderer)return Ks(t,a.cellRendererParams,i)}else return d}if(o?.isMatch(i.node,i.column))return Oi(t,{...a??i.colDef,cellRenderer:"agFindCellRenderer"},i)}getChildCount(){const{column:e,suppressCount:t}=this.params;if(t)return 0;const{allChildrenCount:o,rowGroupColumn:i}=this.displayedNode;return!((o??0)>0&&(!i||!e||e?.isRowGroupDisplayed(i.getId())))||this.gos.get("showOpenedGroup")&&this.displayedNode!==this.node&&!Na(this.node,this.displayedNode,this.gos)?0:o??0}isExpandable(){const{node:e,column:t,colDef:o}=this.params;if(!this.displayedNode.isExpandable())return!1;if(!t)return!0;if(e.hasChildren()&&o){const{showRowGroup:r}=o;if(!r)return!1;if(r===!0)return!0}return e===this.displayedNode?e.rowGroupColumn&&t?.isRowGroupDisplayed(e.rowGroupColumn.getId())?!0:e.master?o?.showRowGroup===!0||o?.showRowGroup==null:!1:Na(this.node,this.displayedNode,this.gos)}setupIndent(){const{suppressPadding:e,node:t,colDef:o}=this.params;if(e)return;const i=()=>{let s=0;o&&o.showRowGroup!==!0?s=0:s=t.uiLevel;const r="ag-row-group-indent-"+s;r!==this.indentClass&&(this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass=r,this.comp.addOrRemoveCssClass(r,!0),this.eGui.style.setProperty("--ag-indentation-level",String(s)))};this.addManagedListeners(t,{uiLevelChanged:i.bind(this)}),i()}setupCheckbox(){const{node:e}=this.params;!e.footer&&!e.rowPinned&&!e.detail&&(this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const s=typeof o=="object"?o:void 0,r=typeof i=="object"?i:void 0;s?.checkboxLocation!==r?.checkboxLocation&&(this.destroyCheckbox(),this.addCheckbox())}),this.addCheckbox())}addCheckbox(){const{selectionSvc:e}=this.beans;if(!e||!Qt(this.gos))return;const{node:t,column:o}=this.params,i=this.gos.get("rowSelection"),s=ks(i);if(s==="selectionColumn")return;if(s==="autoGroupColumn"){const d=o?.getColDef().showRowGroup!=null,u=!o&&t.group;if(!(d||u))return}const r=typeof i=="object"?Zo(i):this.params.checkbox;if(!(typeof r=="function"||r===!0))return;if(typeof o?.getColDef().showRowGroup=="string"&&!this.isExpandable()){this.comp.setCheckboxSpacing(!0);return}const l=e.createCheckboxSelectionComponent();this.cbComp=l,this.createBean(l),l.init({rowNode:t,column:o,overrides:{isVisible:r,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(l.getGui()),this.comp.setCheckboxVisible(!0)}destroyCheckbox(){this.comp.setCheckboxSpacing(!1),this.comp.setCheckboxVisible(!1),this.cbComp&&this.eCheckbox.removeChild(this.cbComp.getGui()),this.cbComp=this.destroyBean(this.cbComp)}onExpandClicked(e){zt(e)||(mo(e),this.onExpandOrContract(e))}onKeyDown(e){!(e.key===M.ENTER)||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){if(zt(e))return;Fa(this.eExpanded,e)||Fa(this.eContracted,e)||this.onExpandOrContract(e)}onExpandOrContract(e){if(!this.isExpandable())return;const t=this.displayedNode,o=!t.expanded;!o&&t.sticky&&this.beans.ctrlsSvc.getScrollFeature().setVerticalScrollPosition(t.rowTop-t.stickyRowTop),t.setExpanded(o,e)}destroy(){super.destroy(),this.destroyCheckbox()}},RM={tag:"span",cls:"ag-cell-wrapper",children:[{tag:"span",ref:"eExpanded",cls:"ag-group-expanded ag-hidden"},{tag:"span",ref:"eContracted",cls:"ag-group-contracted ag-hidden"},{tag:"span",ref:"eCheckbox",cls:"ag-group-checkbox ag-invisible"},{tag:"span",ref:"eValue",cls:"ag-group-value"},{tag:"span",ref:"eChildCount",cls:"ag-group-child-count"}]},sc=class extends se{constructor(){super(RM),this.eExpanded=N,this.eContracted=N,this.eCheckbox=N,this.eValue=N,this.eChildCount=N}init(e){const t={setInnerRenderer:(r,n)=>this.setRenderDetails(r,n),setChildCount:r=>this.eChildCount.textContent=r,addOrRemoveCssClass:(r,n)=>this.addOrRemoveCssClass(r,n),setContractedDisplayed:r=>Z(this.eContracted,r),setExpandedDisplayed:r=>Z(this.eExpanded,r),setCheckboxVisible:r=>this.eCheckbox.classList.toggle("ag-invisible",!r),setCheckboxSpacing:r=>this.eCheckbox.classList.toggle("ag-group-checkbox-spacing",r)},o=this.createManagedBean(new eg),i=!e.colDef,s=this.getGui();o.init(t,s,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),i&&et(s,o.getCellAriaRole())}setRenderDetails(e,t){e?e.newAgStackInstance().then(o=>{if(!o)return;const i=()=>this.destroyBean(o);this.isAlive()?(this.eValue.appendChild(o.getGui()),this.addDestroyFunc(i)):i()}):this.eValue.innerText=t}destroy(){this.destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}},xM=".ag-group-checkbox-spacing{width:var(--ag-icon-size)}:where(.ag-ltr) .ag-group-checkbox-spacing{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-checkbox-spacing{margin-left:var(--ag-cell-widget-spacing)}",FM=class extends A{constructor(){super(...arguments),this.beanName="showRowGroupCols"}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={};const{colModel:e,rowGroupColsSvc:t}=this.beans;e.getCols().forEach(o=>{const s=o.getColDef().showRowGroup,r=typeof s=="string";!r&&!(s===!0)||(this.showRowGroupCols.push(o),r?this.showRowGroupColsMap[s]=o:t&&t.columns.forEach(a=>{this.showRowGroupColsMap[a.getId()]=o}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(e){return this.showRowGroupColsMap[e]}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;const{rowGroupColsSvc:o,colModel:i}=this.beans;if(t===!0&&o)return o.columns.slice(0);const s=i.getColDefCol(t);return s?[s]:null}isRowGroupDisplayed(e,t){const{colDef:o}=e;if(o?.showRowGroup==null)return!1;const i=o.showRowGroup===!0,s=o.showRowGroup===t;return i||s}},kM=class extends A{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.extraTopHeight=0,this.extraBottomHeight=0}postConstruct(){this.isClientSide=$t(this.gos),this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl}),this.resetStickyContainers()}setOffsetTop(e){this.extraTopHeight!==e&&(this.extraTopHeight=e,this.eventSvc.dispatchEvent({type:"stickyTopOffsetChanged",offset:e}))}setOffsetBottom(e){this.extraBottomHeight!==e&&(this.extraBottomHeight=e)}resetOffsets(){this.setOffsetBottom(0),this.setOffsetTop(0)}getLastPixelOfGroup(e){return this.isClientSide?MM(e):DM(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}updateStickyRows(e){const t=e==="top";let o=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,o);const{rowModel:i,rowRenderer:s}=this.beans,r=t?s.firstVisibleVPixel-this.extraTopHeight:s.lastVisibleVPixel-this.extraTopHeight,n=new Set,a=h=>{if(n.add(h),t){const p=this.getLastPixelOfGroup(h),g=r+o+h.rowHeight;p<g?h.stickyRowTop=o+(p-g):h.stickyRowTop=o}else{const p=this.getFirstPixelOfGroup(h),g=r-(o+h.rowHeight);p>g?h.stickyRowTop=o-(p-g):h.stickyRowTop=o}o=0,n.forEach(p=>{const g=p.stickyRowTop+p.rowHeight;o<g&&(o=g)})},l=this.areFooterRowsStickySuppressed(),d=this.gos.get("suppressGroupRowsSticky"),u=h=>{if(!h.displayed)return!1;if(h.footer){if(l===!0||l==="grand"&&h.level===-1||l==="group"&&h.level>-1)return!1;const p=h.sibling.rowIndex?h.sibling.rowIndex+1===h.rowIndex:!1;return e==="bottom"&&p?!1:!n.has(h)}return h.isExpandable()?d===!0||e==="bottom"?!1:!n.has(h)&&h.expanded:!1};for(let h=0;h<100;h++){let p=r+o;t||(p=r-o);const g=i.getRowIndexAtPixel(p),f=i.getRow(g);if(f==null)break;const b=this.getStickyAncestors(f).find(S=>(t?S.rowIndex<g:S.rowIndex>g)&&u(S));if(b){a(b);continue}if((t?f.rowTop<p:f.rowTop+f.rowHeight>p)&&u(f)){a(f);continue}break}return t||n.forEach(h=>{h.stickyRowTop=o-(h.stickyRowTop+h.rowHeight)}),this.refreshNodesAndContainerHeight(e,n,o)}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(e===!0)return!0;const t=e==="group",o=e==="grand";return t&&o?!0:o?"grand":t?"group":!1}canRowsBeSticky(){const e=cn(this.gos),t=this.areFooterRowsStickySuppressed(),o=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!o)}getStickyAncestors(e){const t=[];let o=e.footer?e.sibling:e.parent;for(;o;)o.sibling&&t.push(o.sibling),t.push(o),o=o.parent;return t.reverse()}checkStickyRows(){const e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.resetStickyContainers()}resetStickyContainers(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){const t=new Set;if(this.stickyTopRowCtrls.some(o=>o.rowNode===e)){for(let o=0;o<this.stickyTopRowCtrls.length;o++){const i=this.stickyTopRowCtrls[o].rowNode;i!==e&&t.add(i)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows();return}for(let o=0;o<this.stickyBottomRowCtrls.length;o++){const i=this.stickyBottomRowCtrls[o].rowNode;i!==e&&t.add(i)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}refreshNodesAndContainerHeight(e,t,o){const i=e==="top",s=i?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,r={},n=[];for(let g=0;g<s.length;g++){const f=s[g].rowNode;if(!t.has(f)){r[f.id]=s[g],f.sticky=!1;continue}n.push(s[g])}const a=new Set;for(let g=0;g<n.length;g++)a.add(n[g].rowNode);const l=[];t.forEach(g=>{a.has(g)||(g.sticky=!0,l.push(this.createRowCon(g,!1,!1)))});let d=!!l.length||n.length!==s.length;i?this.topContainerHeight!==o&&(this.topContainerHeight=o,this.gridBodyCtrl.setStickyTopHeight(o),d=!0):this.bottomContainerHeight!==o&&(this.bottomContainerHeight=o,this.gridBodyCtrl.setStickyBottomHeight(o),d=!0),this.destroyRowCtrls(r,!1);const u=[...n,...l];u.sort((g,f)=>f.rowNode.rowIndex-g.rowNode.rowIndex),i||u.reverse(),u.forEach(g=>g.setRowTop(g.rowNode.stickyRowTop));const h=this.beans.pageBounds;let p=0;return i?(t.forEach(g=>{g.rowIndex<h.getFirstRow()&&(p+=g.rowHeight)}),p>this.topContainerHeight&&(p=this.topContainerHeight),this.setOffsetTop(p)):(t.forEach(g=>{g.rowIndex>h.getLastRow()&&(p+=g.rowHeight)}),p>this.bottomContainerHeight&&(p=this.bottomContainerHeight),this.setOffsetBottom(p)),d?(i?this.stickyTopRowCtrls=u:this.stickyBottomRowCtrls=u,!0):!1}ensureRowHeightsValid(){let e=!1;const t=o=>{const i=o.rowNode;if(i.rowHeightEstimated){const s=kt(this.beans,i);i.setRowHeight(s.height),e=!0}};return this.stickyTopRowCtrls.forEach(t),this.stickyBottomRowCtrls.forEach(t),e}};function DM(e){if(e.isExpandable()||e.footer){if(e.master&&e.detailNode)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let o=e.childStore?.getStoreBounds();return e.footer&&(o=e.sibling.childStore?.getStoreBounds()),(o?.heightPx??0)+(o?.topPx??0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}function MM(e){if(e.isExpandable()||e.footer){if(e.footer&&e.rowIndex===0)return Number.MAX_SAFE_INTEGER;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let i=e.footer?e.sibling:e;for(;i.isExpandable()&&i.expanded;)if(i.master&&i.detailNode)i=i.detailNode;else if(i.childrenAfterSort){if(i.childrenAfterSort.length===0)break;i=Se(i.childrenAfterSort)}return i.rowTop+i.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}var PM=class extends A{constructor(){super(...arguments),this.beanName="stickyRowSvc"}createStickyRowFeature(e,t,o){const i=this.gos;if(cn(i)&&$t(i)||yt(i))return e.createManagedBean(new kM(t,o))}},EM={moduleName:"GroupCellRenderer",version:$e,userComponents:{agGroupRowRenderer:sc,agGroupCellRenderer:sc},dynamicBeans:{groupCellRendererCtrl:eg},icons:{groupContracted:"tree-closed",groupExpanded:"tree-open"},css:[xM],dependsOn:[St]},tg={moduleName:"GroupColumn",version:$e,beans:[gM,FM,pM,Zp,Xp],dependsOn:[St,EM]},AM={moduleName:"ClientSideRowModelHierarchy",version:$e,rowModels:["clientSide"],beans:[yM,wM,fM],dependsOn:[St]},og={moduleName:"StickyRow",version:$e,beans:[PM]},Jn=class{constructor(){this.allSets=new Map}removeFromChildrenAfterGroup(e,t){const o=this.getSet(e);(o.fromChildrenAfterGroup??(o.fromChildrenAfterGroup=new Set)).add(t)}isRemoveFromAllLeafChildren(e,t){return!!this.allSets.get(e)?.fromAllLeafChildren?.has(t)}preventRemoveFromAllLeafChildren(e,t){this.allSets.get(e)?.fromAllLeafChildren?.delete(t)}removeFromAllLeafChildren(e,t){const o=this.getSet(e);(o.fromAllLeafChildren??(o.fromAllLeafChildren=new Set)).add(t)}getSet(e){let t=this.allSets.get(e);return t||(t={fromChildrenAfterGroup:null,fromAllLeafChildren:null},this.allSets.set(e,t)),t}getAllParents(){return Array.from(this.allSets.keys())}flush(){const e=this.allSets;for(const t of e.keys()){const o=e.get(t);if(o){const{fromChildrenAfterGroup:i,fromAllLeafChildren:s}=o,{childrenAfterGroup:r,allLeafChildren:n}=t;r&&i&&(rc(r,i),t.updateHasChildren()),n&&s&&rc(n,s)}}e.clear()}};function rc(e,t){let o=0;for(let i=0,s=e.length;i<s;++i){const r=e[i];t.has(r)||(e[o++]=r)}e.length=o}function TM(e){if(!e)return!1;const t=e.length;if(t<2)return!1;let o=!1;for(let i=1;i<t;i++)if(nc(e[i-1],e[i])>0){o=!0;break}return o?(e.sort(nc),!0):!1}function nc(e,t){const o=e.sourceRowIndex,i=t.sourceRowIndex,s=o>=0,r=i>=0,n=s&&r,a=!s&&!r;return n?o-i:a?e.__objectId-t.__objectId:s?1:-1}var IM=class extends A{wireBeans(e){this.colModel=e.colModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc,this.selectionSvc=e.selectionSvc,this.showRowGroupCols=e.showRowGroupCols}execute(e){const t=this.createGroupingDetails(e),o=e.changedRowNodes;o?this.handleDeltaUpdate(t,o):this.shotgunResetEverything(t,!!e.afterColumnsChanged);const i=e.changedPath;this.positionLeafsAndGroups(i),this.orderGroups(t),this.selectionSvc?.updateSelectableAfterGrouping(i)}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst(t=>{if(t.childrenAfterGroup){const o=[],i=[];let s;t.childrenAfterGroup.forEach(r=>{r.childrenAfterGroup?.length?r.key===""&&!s?s=r:i.push(r):o.push(r)}),s&&i.push(s),t.childrenAfterGroup=[...o,...i]}},!1)}createGroupingDetails(e){const{rowNode:t,changedPath:o,rowNodesOrderChanged:i}=e,s=this.rowGroupColsSvc?.columns;return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:s,rootNode:t,pivotMode:this.colModel.isPivotMode(),groupedColCount:s?.length??0,rowNodesOrderChanged:!!i,changedPath:o,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),keyCreators:s?.map(n=>n.getColDef().keyCreator)??[]}}handleDeltaUpdate(e,{removals:t,updates:o,adds:i}){const s=new Jn;t.size&&this.removeNodes(t,e,s);for(const a of o)this.moveNodeInWrongPath(a,e,s);const r=e.changedPath;for(const a of i)this.insertOneNode(a,e),r.active&&r.addParentNode(a.parent);const n=s.getAllParents();s.flush(),this.removeEmptyGroups(n,e),e.rowNodesOrderChanged&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{TM(t.childrenAfterGroup)&&e.changedPath.addParentNode(t)},!1,!0)}orderGroups(e){const t=e.initialGroupOrderComparator;j(t)&&o(e.rootNode);function o(i){j(i.childrenAfterGroup)&&!i.leafGroup&&(i.childrenAfterGroup.sort((r,n)=>t({nodeA:r,nodeB:n})),i.childrenAfterGroup.forEach(r=>o(r)))}}getExistingPathForNode(e,t){const o=[];let i=e.parent;for(;i&&i!==t.rootNode;)o.push({key:i.key,rowGroupColumn:i.rowGroupColumn,field:i.field}),i=i.parent;return o.reverse(),o}moveNodeInWrongPath(e,t,o){t.changedPath.active&&t.changedPath.addParentNode(e.parent);const i=a=>a.key,s=this.getExistingPathForNode(e,t).map(i),r=this.getGroupInfo(e,t).map(i);Pt(s,r)||this.moveNode(e,t,o)}moveNode(e,t,o){if(this.removeNodesFromParents([e],t,o),this.insertOneNode(e,t,o),e.setData(e.data),t.changedPath.active){const i=e.parent;t.changedPath.addParentNode(i)}}removeNodes(e,t,o){if(this.removeNodesFromParents(e,t,o),t.changedPath.active)for(const i of e)t.changedPath.addParentNode(i.parent)}forEachParentGroup(e,t,o){let i=t;for(;i&&i!==e.rootNode;)o(i),i=i.parent}removeNodesFromParents(e,t,o){const i=o==null,s=o||new Jn;for(const r of e)this.removeFromParent(r,s),this.forEachParentGroup(t,r.parent,n=>{s.removeFromAllLeafChildren(n,r)});i&&s.flush()}removeEmptyGroups(e,t){let o=!0;const i=s=>{const r=this.getChildrenMappedKey(s.key,s.rowGroupColumn),n=s.parent;return(n?.childrenMapped?!n.childrenMapped[r]:!0)?!1:!!s.group&&(s.childrenAfterGroup?.length??0)===0};for(;o;){o=!1;const s=new Jn;e.forEach(r=>{this.forEachParentGroup(t,r,n=>{i(n)&&(o=!0,this.removeFromParent(n,s),this.selectionSvc?.setNodesSelected({nodes:[n],newValue:!1,source:"rowGroupChanged"}))})}),s.flush()}}removeFromParent(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(at(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));const o=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent?.childrenMapped&&delete e.parent.childrenMapped[o],e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){const o=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t?.childrenMapped&&t.childrenMapped[o]!==e&&(t.childrenMapped[o]=e,t.childrenAfterGroup.push(e),jk(t,this.beans,!0))}areGroupColsEqual(e,t){return e==null||t==null||e.pivotMode!==t.pivotMode?!1:Pt(e.groupedCols,t.groupedCols)&&Pt(e.keyCreators,t.keyCreators)}checkAllGroupDataAfterColsChanged(e){const t=o=>{o&&o.forEach(i=>{if(!i.group)return;const r={field:i.field,key:i.key,rowGroupColumn:i.rowGroupColumn,leafNode:i.allLeafChildren?.[0]};this.setGroupData(i,r),t(i.childrenAfterGroup)})};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionSvc?.filterFromSelection?.(r=>!r.group);const{groupedCols:o}=e,i=e.rootNode;i.leafGroup=o.length===0,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren();const s=i.sibling;s&&(s.childrenAfterGroup=i.childrenAfterGroup,s.childrenMapped=i.childrenMapped),this.insertNodes(i.allLeafChildren,e)}noChangeInGroupingColumns(e,t){let o=!1;const i=this.showRowGroupCols.getShowRowGroupCols(),s=i?i.map(r=>r.getId()).join("-"):"";return t&&(o=this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==s&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=s,o}insertNodes(e,t){e.forEach(o=>{this.insertOneNode(o,t),t.changedPath.active&&t.changedPath.addParentNode(o.parent)})}insertOneNode(e,t,o){const i=this.getGroupInfo(e,t),s=this.findParentForNode(e,i,t,o);s.group||H(184,{parentGroupData:s.data,childNodeData:e.data}),e.parent=s,e.level=i.length,s.childrenAfterGroup.push(e),s.updateHasChildren()}findParentForNode(e,t,o,i){let s=o.rootNode;return t.forEach((r,n)=>{s=this.getOrCreateNextNode(s,r,n,o),i?.isRemoveFromAllLeafChildren(s,e)?i?.preventRemoveFromAllLeafChildren(s,e):s.allLeafChildren.push(e)}),s}getOrCreateNextNode(e,t,o,i){const s=this.getChildrenMappedKey(t.key,t.rowGroupColumn);let r=e?.childrenMapped?.[s];return r||(r=this.createGroup(t,e,o,i),this.addToParent(r,e)),r}createGroup(e,t,o,i){const s=new di(this.beans);return s.group=!0,s.field=e.field,s.rowGroupColumn=e.rowGroupColumn,this.setGroupData(s,e),s.key=e.key,s.id=this.createGroupId(s,t,o),s.level=o,s.leafGroup=o===i.groupedColCount-1,s.allLeafChildren=[],s.setAllChildrenCount(0),s.rowGroupIndex=o,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren(),s.parent=t,this.setExpandedInitialValue(i,s),s}createGroupId(e,t,o){const i=(s,r)=>{if(!s.rowGroupColumn)return null;const n=r?i(r,r.parent):null;return`${n==null?"":n+"-"}${s.rowGroupColumn.getColId()}-${s.key}`};return Ur+i(e,t)}setGroupData(e,t){const o=t.rowGroupColumn;o&&t.leafNode&&(e.groupValue=this.valueSvc.getValue(o,t.leafNode)),e.groupData={},this.showRowGroupCols.getShowRowGroupCols().forEach(s=>{const r=e.rowGroupColumn;r!==null&&s.isRowGroupDisplayed(r.getId())&&(e.groupData[s.getColId()]=this.valueSvc.getValue(r,t.leafNode))})}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup){t.expanded=!1;return}const o=e.isGroupOpenByDefault;if(o){const i={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=o(i)==!0;return}if(e.expandByDefault===-1){t.expanded=!0;return}t.expanded=t.level<e.expandByDefault}getGroupInfo(e,t){const o=[];return t.groupedCols.forEach(i=>{let s=this.valueSvc.getKeyForNode(i,e),r=s!=null&&s!=="";if((t.pivotMode||!t.groupAllowUnbalanced)&&!r&&(s="",r=!0),r){const a={key:s,field:i.getColDef().field,rowGroupColumn:i,leafNode:e};o.push(a)}}),o}};function LM(e,t){e.rowGroupColsSvc?.setColumns(t,"api")}function BM(e,t){e.rowGroupColsSvc?.removeColumns(t,"api")}function OM(e,t){e.rowGroupColsSvc?.addColumns(t,"api")}function GM(e,t,o){e.rowGroupColsSvc?.moveColumn?.(t,o,"api")}function NM(e){return e.rowGroupColsSvc?.columns??[]}var ig={moduleName:"SharedRowGrouping",version:$e,apiFunctions:{setRowGroupColumns:LM,removeRowGroupColumns:BM,addRowGroupColumns:OM,getRowGroupColumns:NM,moveRowGroupColumn:GM},dependsOn:[St,Nl,tg,og]},VM={moduleName:"RowGrouping",version:$e,dynamicBeans:{groupStrategy:IM},rowModels:["clientSide"],dependsOn:[ig,hM,AM]},HM={tag:"div",cls:"ag-loading",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},_M=class extends se{constructor(){super(HM),this.eLoadingIcon=N,this.eLoadingText=N}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const e=this.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){const e=de("groupLoading",this.beans,null);e&&this.eLoadingIcon.appendChild(e);const t=this.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}},zM={tag:"div",cls:"ag-skeleton-container"},WM=class extends se{constructor(){super(zM)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>Ti(e.eParentOfValue)),Ti(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");bt(this.getGui(),t)}setupLoading(e){const o=Ge(this.beans).createElement("div");o.classList.add("ag-skeleton-effect");const i=e.node.rowIndex;if(i!=null){const n=75+25*(i%2===0?Math.sin(i):Math.cos(i));o.style.width=`${n}%`}this.getGui().appendChild(o);const r=this.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");bt(this.getGui(),r)}refresh(e){return!1}},$M={moduleName:"LoadingCellRenderer",version:$e,userComponents:{agLoadingCellRenderer:_M},icons:{groupLoading:"loading"},dependsOn:[St]},UM={moduleName:"SkeletonCellRenderer",version:$e,userComponents:{agSkeletonCellRenderer:WM},dependsOn:[St]};function jM(e){return e.colModel.isPivotMode()}function KM(e,t,o){return e.pivotResultCols?.lookupPivotResultCol(t,o)??null}function qM(e,t){e.valueColsSvc?.setColumns(t,"api")}function YM(e){return e.valueColsSvc?.columns??[]}function QM(e,t){e.valueColsSvc?.removeColumns(t,"api")}function XM(e,t){e.valueColsSvc?.addColumns(t,"api")}function ZM(e,t){e.pivotColsSvc?.setColumns(t,"api")}function JM(e,t){e.pivotColsSvc?.removeColumns(t,"api")}function eP(e,t){e.pivotColsSvc?.addColumns(t,"api")}function tP(e){return e.pivotColsSvc?.columns??[]}function oP(e,t){e.pivotResultCols?.setPivotResultCols(t,"api")}function iP(e){const t=e.pivotResultCols?.getPivotResultCols();return t?t.list:null}var ac="PivotRowTotal_",sP=({headerName:e},{headerName:t})=>e&&!t?1:!e&&t?-1:!e&&!t?0:e<t?-1:e>t?1:0,rP=e=>(t,o)=>e(t.headerName,o.headerName),nP=class extends A{constructor(){super(...arguments),this.beanName="pivotColDefSvc"}wireBeans(e){this.colModel=e.colModel,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.colNames=e.colNames}postConstruct(){const e=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=e()});const t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=t()})}createPivotColumnDefs(e){const t=this.createPivotColumnsFromUniqueValues(e);function o(r,n=[]){return r.forEach(a=>{a.children!==void 0?o(a.children,n):n.push(a)}),n}const i=o(t);this.addRowGroupTotals(t,i),this.addExpandablePivotGroups(t,i),this.addPivotTotalsToGroups(t,i);const s=i.map(r=>({...r}));return{pivotColumnGroupDefs:t,pivotColumnDefs:s}}createPivotColumnsFromUniqueValues(e){const t=this.pivotColsSvc?.columns??[],o=t.length;return this.recursivelyBuildGroup(0,e,[],o,t)}recursivelyBuildGroup(e,t,o,i,s){if(e>=i)return this.buildMeasureCols(o);const{pivotComparator:r}=s[e].getColDef(),n=r?rP(r):sP,a=this.valueColsSvc?.columns;if(a?.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===i-1){const d=[];for(const u of t.keys()){const h=[...o,u],p=this.createColDef(a[0],u,h);p.columnGroupShow="open",d.push(p)}return d.sort(n),d}const l=[];for(const d of t.keys()){const u=this.pivotDefaultExpanded===-1||e<this.pivotDefaultExpanded,h=[...o,d];l.push({children:this.recursivelyBuildGroup(e+1,t.get(d),h,i,s),headerName:d,pivotKeys:h,columnGroupShow:"open",openByDefault:u,groupId:this.generateColumnGroupId(h)})}return l.sort(n),l}buildMeasureCols(e){const t=this.valueColsSvc?.columns??[];return t.length===0?[this.createColDef(null,"-",e)]:t.map(o=>{const i=this.colNames.getDisplayNameForColumn(o,"header");return{...this.createColDef(o,i,e),columnGroupShow:"open"}})}addExpandablePivotGroups(e,t){const o=this.gos.get("suppressExpandablePivotGroups");if(o||this.gos.get("pivotColumnGroupTotals"))return;const i=(s,r,n)=>{if("children"in s){const{valueColsSvc:d}=this,{columns:u=[]}=d??{},h=new Map;s.children.forEach(f=>{i(f,r,h)});const p=!s.children.some(f=>f.children),g=p&&u.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn");u.forEach(f=>{const m=this.colNames.getDisplayNameForColumn(f,"header"),b=this.createColDef(f,m,s.pivotKeys);b.pivotTotalColumnIds=h.get(f.getColId()),b.columnGroupShow=o?"open":"closed",b.aggFunc=f.getAggFunc(),(!p||g)&&(s.children.push(b),r.push(b))}),this.merge(n,h);return}if(!s.pivotValueColumn)return;const a=s.pivotValueColumn.getColId();n.has(a)?n.get(a).push(s.colId):n.set(a,[s.colId])};e.forEach(s=>{i(s,t,new Map)})}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;const o=this.gos.get("pivotColumnGroupTotals")==="after",i=this.valueColsSvc?.columns,s=i?.map(r=>r.getAggFunc());if(!(!s||s.length<1||!this.sameAggFuncs(s))&&i){const r=i[0];e.forEach(n=>{this.recursivelyAddPivotTotal(n,t,r,o)})}}recursivelyAddPivotTotal(e,t,o,i){const s=e;if(!s.children){const n=e;return n.colId?[n.colId]:null}let r=[];if(s.children.forEach(n=>{const a=this.recursivelyAddPivotTotal(n,t,o,i);a&&(r=r.concat(a))}),s.children.length>1){const a=this.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),l=this.createColDef(o,a,e.pivotKeys,!0);l.pivotTotalColumnIds=r,l.aggFunc=o.getAggFunc(),l.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const d=e.children;i?d.push(l):d.unshift(l),t.push(l)}return r}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;const o=this.gos.get("pivotRowTotals")==="after",s=(this.valueColsSvc?.columns??[]).slice();o||s.reverse();const r=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let n=0;n<s.length;n++){const a=s[n],l=this.colNames.getDisplayNameForColumn(a,"header"),d=this.createColDef(a,l,[]),u=[];for(let p=0;p<t.length;p++){const g=t[p];g.pivotValueColumn===a&&u.push(g.colId)}d.pivotTotalColumnIds=u,d.colId=ac+d.colId;const h=r?{children:[d],pivotKeys:[],groupId:`${ac}_pivotGroup_${a.getColId()}`}:d;t.push(d),o?e.push(h):e.unshift(h)}}createColDef(e,t,o,i=!1){const s={};if(e){const r=e.getColDef();Object.assign(s,r),s.hide=!1}return s.headerName=t,s.colId=this.generateColumnId(o||[],e&&!i?e.getColId():""),s.field=s.colId,s.valueGetter=r=>r.data?.[r.colDef.field],s.pivotKeys=o,s.pivotValueColumn=e,s.filter===!0&&(s.filter="agNumberColumnFilter"),s}sameAggFuncs(e){if(e.length==1)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}merge(e,t){t.forEach((o,i)=>{const r=[...e.has(i)?e.get(i):[],...o];e.set(i,r)})}generateColumnGroupId(e){return`pivotGroup_${(this.pivotColsSvc?.columns??[]).map(o=>o.getColId()).join("-")}_${e.join("-")}`}generateColumnId(e,t){return`pivot_${(this.pivotColsSvc?.columns??[]).map(i=>i.getColId()).join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){const t={};for(let s=0;s<e.length;s++){const n=e[s].split(this.fieldSeparator);let a=t;for(let l=0;l<n.length;l++){const d=n[l];a[d]==null&&(a[d]={}),a=a[d]}}const o=(s,r,n,a)=>{const l=[];for(const h of Object.keys(n)){const p=n[h],g=o(`${s}${this.fieldSeparator}${h}`,h,p,a+1);l.push(g)}if(l.length===0){const h=this.colModel.getColDefCol(r);if(h){const g=this.colNames.getDisplayNameForColumn(h,"header")??r,f=this.createColDef(h,g,void 0,!1);return f.colId=s,f.aggFunc=h.getAggFunc(),f.valueGetter=m=>m.data?.[s],f}return{colId:s,headerName:r,valueGetter:g=>g.data?.[s]}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&l.length===1&&"colId"in l[0]?(l[0].headerName=r,l[0]):{openByDefault:this.pivotDefaultExpanded===-1||a<this.pivotDefaultExpanded,groupId:s,headerName:r,children:l}},i=[];for(const s of Object.keys(t)){const r=t[s],n=o(s,s,r,0);i.push(n)}return i}},aP=class extends A{constructor(){super(...arguments),this.beanName="pivotResultCols"}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols}destroy(){Go(this.beans,this.pivotResultCols?.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const o=this.colModel.getColDefCol(t);let i=null;return this.pivotResultCols.list.forEach(s=>{const r=s.getColDef().pivotKeys,n=s.getColDef().pivotValueColumn;Pt(r,e)&&n===o&&(i=s)}),i}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.colModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){if(this.colModel.ready&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);const o=Uu(this.beans,e,!1,this.pivotResultCols?.tree||this.previousPivotResultCols||void 0,t);Go(this.beans,this.pivotResultCols?.tree,o.columnTree);const i=o.columnTree,s=o.treeDept,r=cl(i),n={};this.pivotResultCols={tree:i,treeDepth:s,list:r,map:n},this.pivotResultCols.list.forEach(l=>this.pivotResultCols.map[l.getId()]=l);const a=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.colModel.refreshCols(!a)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.colModel.refreshCols(!1);this.visibleCols.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),o=this.gos.get("processPivotResultColGroupDef");if(!t&&!o)return;const i=s=>{s.forEach(r=>{if(j(r.children)){const a=r;o&&o(a),i(a.children)}else t&&t(r)})};e&&i(e)}},lP={moduleName:"SharedPivot",version:$e,beans:[aP,nP,Zp],apiFunctions:{isPivotMode:jM,getPivotResultColumn:KM,setValueColumns:qM,getValueColumns:YM,removeValueColumns:QM,addValueColumns:XM,setPivotColumns:ZM,removePivotColumns:JM,addPivotColumns:eP,getPivotColumns:tP,setPivotResultColumns:oP,getPivotResultColumns:iP},dependsOn:[ig,Zh]};ka.values();var dP={moduleName:"SharedTreeData",version:$e,dependsOn:[St,Nl,tg,og]},cP="ag-Grid-MissingKey",uP=class extends A{constructor(){super(...arguments),this.beanName="ssrmBlockUtils"}wireBeans(e){this.valueSvc=e.valueSvc,this.showRowGroupCols=e.showRowGroupCols,this.nodeManager=e.ssrmNodeManager,this.expansionSvc=e.expansionSvc,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}createRowNode(e){const t=new di(this.beans),o=e.rowHeight!=null?e.rowHeight:Oo(this.beans);return t.setRowHeight(o),t.group=e.group,t.leafGroup=e.leafGroup,t.level=e.level,t.uiLevel=e.level,t.parent=e.parent,t.stub=!0,t.__needsRefreshWhenVisible=!1,t.group&&(t.expanded=!1,t.field=e.field,t.rowGroupColumn=e.rowGroupColumn,t.rowGroupIndex=e.level),t}destroyRowNode(e,t=!1){e.childStore&&!t&&(this.destroyBean(e.childStore),e.childStore=null),e.sibling&&!e.footer&&this.destroyRowNode(e.sibling,!1),e.clearRowTopAndRowIndex(),e.id!=null&&this.nodeManager.removeNode(e)}setTreeGroupInfo(e){e.updateHasChildren();const t=this.gos.get("getServerSideGroupKey"),o=e.hasChildren();o&&t!=null&&(e.key=t(e.data)),!o&&e.childStore!=null&&(this.destroyBean(e.childStore),e.childStore=null,e.expanded=!1)}setRowGroupInfo(e){if(e.key=this.valueSvc.getValue(e.rowGroupColumn,e),(e.key===null||e.key===void 0)&&il(()=>{H(190,{rowGroupId:e.rowGroupColumn?.getId(),data:e.data})},"SSBlock-BadKey"),this.gos.get("groupAllowUnbalanced")&&e.key===""){const s=this.serverSideRowModel.getParams();e.childStore=this.createBean(this.storeFactory.createStore(s,e))}Bi(this.beans.gos)({node:e})&&(po(e,this.beans),e.sibling&&(e.sibling.uiLevel=e.uiLevel+1))}setMasterDetailInfo(e){const t=this.gos.get("isRowMaster");t!=null?e.master=t(e.data):e.master=!0}updateDataIntoRowNode(e,t){e.updateData(t),this.gos.get("treeData")?(this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e)):e.group?(this.setChildCountIntoRowNode(e),e.footer||(Bi(this.beans.gos)({node:e})?e.sibling?e.sibling.updateData(t):po(e,this.beans):e.sibling&&Gl(e))):this.gos.get("masterDetail")}setDataIntoRowNode(e,t,o,i){e.stub=!1;const s=this.gos.get("treeData");e.setDataAndId(t,o),s?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.gos.get("masterDetail")&&this.setMasterDetailInfo(e),(s||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),j(t)&&(e.setRowHeight(kt(this.beans,e,!1,i).height),e.sibling?.setRowHeight(kt(this.beans,e.sibling,!1,i).height))}setChildCountIntoRowNode(e){const t=this.gos.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))}setGroupDataIntoRowNode(e){e.groupValue=e.key;const t=this.showRowGroupCols?.getShowRowGroupCols()??[],o=this.gos.get("treeData");t.forEach(i=>{if(e.groupData==null&&(e.groupData={}),o)e.groupData[i.getColId()]=e.key;else if(i.isRowGroupDisplayed(e.rowGroupColumn.getId())){const s=this.valueSvc.getValue(e.rowGroupColumn,e);e.groupData[i.getColId()]=s}})}clearDisplayIndex(e){e.clearRowTopAndRowIndex(),e.hasChildren()&&!!e.childStore&&e.childStore?.clearDisplayIndexes(),e.master&&e.detailNode&&e.detailNode?.clearRowTopAndRowIndex()}setDisplayIndex(e,t,o,i){const s=this.gos.get("groupAllowUnbalanced")&&e.group&&e.key==="";if(this.gos.get("groupHideOpenParents")&&e.group&&e.expanded||s?(e.setRowIndex(null),e.setRowTop(null)):(e.setRowIndex(t.value++),e.setRowTop(o.value),o.value+=e.rowHeight),e.setUiLevel(i),e.footer)return;if(e.master&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.value++),e.detailNode.setRowTop(o.value),o.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex()),e.hasChildren()&&!!e.childStore){const l=e.childStore;e.expanded||s?l.setDisplayIndexes(t,o,s?i:i+1):l.clearDisplayIndexes()}}extractRowBounds(e,t){const o=i=>({rowHeight:i.rowHeight,rowTop:i.rowTop});if(e.rowIndex===t)return o(e);if(e.hasChildren()&&e.expanded&&e.childStore){const i=e.childStore;if(i.isDisplayIndexInStore(t))return i.getRowBounds(t)}else if(e.master&&e.expanded&&e.detailNode&&e.detailNode.rowIndex===t)return o(e.detailNode)}isPixelInNodeRange(e,t){return!j(e.rowTop)||!j(e.rowHeight)?!1:t>=e.rowTop&&t<e.rowTop+e.rowHeight}getIndexAtPixel(e,t){if(this.isPixelInNodeRange(e,t))return e.rowIndex;const o=e.master&&e.expanded,i=e.detailNode;if(o&&i&&this.isPixelInNodeRange(i,t))return i.rowIndex;if(e.hasChildren()&&e.expanded&&e.childStore){const s=e.childStore;if(s.isPixelInRange(t))return s.getRowIndexAtPixel(t)}return null}createNodeIdPrefix(e){const t=[];let o=e;for(;o&&o.level>=0;)o.key===""?t.push(cP):t.push(o.key),o=o.parent;if(t.length>0)return t.reverse().join("-")}checkOpenByDefault(e){return this.expansionSvc?.checkOpenByDefault(e)}},hP=class extends A{constructor(){super(...arguments),this.beanName="ssrmExpandListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}postConstruct(){yt(this.gos)&&this.addManagedEventListeners({rowGroupOpened:this.onRowGroupOpened.bind(this)})}onRowGroupOpened(e){const t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(Ee(t.childStore)){const o=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(o,t))}}else this.gos.get("purgeClosedRowNodes")&&j(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));this.eventSvc.dispatchEvent({type:"storeUpdated"})}createDetailNode(e){if(j(e.detailNode))return e.detailNode;const t=new di(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,j(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;const o=200,i=kt(this.beans,t).height;return t.rowHeight=i||o,e.detailNode=t,t}},pP=class extends A{constructor(){super(...arguments),this.beanName="ssrmFilterListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.filterManager=e.filterManager,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){yt(this.gos)&&this.addManagedEventListeners({advancedFilterEnabledChanged:()=>this.onFilterChanged(!0),filterChanged:()=>this.onFilterChanged()})}onFilterChanged(e){const t=this.serverSideRowModel.getParams();if(!t)return;const o=t.filterModel;let i,s;if(this.filterManager?.isAdvFilterEnabled()){i=this.filterManager.getAdvFilterModel();const l=e?Object.keys(o??{}):this.getAdvancedFilterColumns(o),d=this.getAdvancedFilterColumns(i);l.forEach(u=>d.add(u)),s=Array.from(d)}else if(i=this.filterManager?.getFilterModel()??{},e){const l=this.getAdvancedFilterColumns(o);Object.keys(i).forEach(d=>l.add(d)),s=Array.from(l)}else s=this.findChangedColumns(o,i);const r=this.listenerUtils.isSortingWithValueColumn(s),n=this.listenerUtils.isSortingWithSecondaryColumn(s),a={valueColChanged:r,secondaryColChanged:n,changedColumns:s};this.serverSideRowModel.refreshAfterFilter(i,a)}findChangedColumns(e,t){const o={};Object.keys(e).forEach(s=>o[s]=!0),Object.keys(t).forEach(s=>o[s]=!0);const i=[];return Object.keys(o).forEach(s=>{const r=JSON.stringify(e[s]),n=JSON.stringify(t[s]);r!=n&&i.push(s)}),i}getAdvancedFilterColumns(e){const t=new Set;if(!e)return t;const o=i=>{i.filterType==="join"?i.conditions.forEach(s=>o(s)):t.add(i.colId)};return o(e),t}},gP=class extends A{constructor(){super(...arguments),this.beanName="ssrmListenerUtils"}wireBeans(e){this.pivotResultCols=e.pivotResultCols,this.valueColsSvc=e.valueColsSvc}isSortingWithValueColumn(e){const t=(this.valueColsSvc?.columns??[]).map(o=>o.getColId());for(let o=0;o<e.length;o++)if(t.indexOf(e[o])>-1)return!0;return!1}isSortingWithSecondaryColumn(e){const t=this.pivotResultCols?.getPivotResultCols();if(!t)return!1;const o=t.list.map(i=>i.getColId());for(let i=0;i<e.length;i++)if(o.indexOf(e[i])>-1)return!0;return!1}},fP=class extends A{constructor(){super(...arguments),this.beanName="ssrmSortSvc"}wireBeans(e){this.sortSvc=e.sortSvc,this.serverSideRowModel=e.rowModel,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){yt(this.gos)&&this.addManagedEventListeners({sortChanged:this.onSortChanged.bind(this)})}onSortChanged(){const e=this.serverSideRowModel.getParams();if(!e)return;const t=this.sortSvc.getSortModel(),o=e.sortModel,i=this.findChangedColumnsInSort(t,o),s=this.listenerUtils.isSortingWithValueColumn(i),r=this.listenerUtils.isSortingWithSecondaryColumn(i),n={valueColChanged:s,secondaryColChanged:r,changedColumns:i};this.serverSideRowModel.refreshAfterSort(t,n)}findChangedColumnsInSort(e,t){let o=[];[e,t].forEach(r=>{if(r){const n=r.map(a=>a.colId);o=o.concat(n)}});const i=(r,n)=>{const a=r?r.sort:null,l=n?n.sort:null;return a!==l},s=(r,n)=>{const a=r?t.indexOf(r):-1,l=n?e.indexOf(n):-1;return a!==l};return o.filter(r=>{const n=t.find(l=>l.colId===r),a=e.find(l=>l.colId===r);return i(n,a)||s(n,a)})}},mP=class extends A{constructor(){super(...arguments),this.beanName="ssrmNodeManager",this.rowNodes=new Map}addRowNode(e){const t=e.id;this.rowNodes.has(t)&&H(187,{rowId:t,firstData:this.rowNodes.get(t).data,secondData:e.data}),this.rowNodes.set(t,e)}removeNode(e){const t=e.id;this.rowNodes.delete(t)}destroy(){this.clear(),super.destroy()}clear(){this.rowNodes.clear(),super.destroy()}},vP=class extends A{constructor(){super(...arguments),this.beanName="rowModel",this.pauseStoreUpdateListening=!1,this.started=!1,this.managingPivotResultColumns=!1,this.onRowHeightChanged_debounced=st(this,this.onRowHeightChanged.bind(this),100)}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.pivotResultCols=e.pivotResultCols,this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.filterManager=e.filterManager,this.sortSvc=e.sortSvc,this.rowRenderer=e.rowRenderer,this.nodeManager=e.ssrmNodeManager,this.storeFactory=e.ssrmStoreFactory,this.pivotColDefSvc=e.pivotColDefSvc}ensureRowHeightsValid(){return!1}start(){this.started=!0,this.updateDatasource()}destroyDatasource(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)}postConstruct(){const e=this.resetRootStore.bind(this);this.addManagedEventListeners({newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onStoreUpdated.bind(this),columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e,columnPivotModeChanged:e}),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","cacheBlockSize"],e),this.addManagedPropertyListener("groupAllowUnbalanced",()=>this.onStoreUpdated()),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights()),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",()=>this.updateDatasource())}updateDatasource(){const e=this.gos.get("serverSideDatasource");e&&this.setDatasource(e)}verifyProps(){Qt(this.gos)&&!this.gos.exists("getRowId")&&H(188)}setDatasource(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())}applyRowData(e,t,o){const i=this.getRootStore();if(!i)return;const s=i.getChildStore(o);s&&s.applyRowData(e,t,e.rowData.length)}isLastRowIndexKnown(){const e=this.getRootStore();return e?e.isLastRowIndexKnown():!1}onColumnEverything(){if(!this.storeParams){this.resetRootStore();return}const e=this.columnsToValueObjects(this.rowGroupColsSvc?.columns),t=this.columnsToValueObjects(this.valueColsSvc?.columns),o=this.columnsToValueObjects(this.pivotColsSvc?.columns),i=d=>{const u={};d.oldCols.forEach(g=>u[g.id]=g);const h=d.newCols.every(g=>{const f=u[g.id];return f&&delete u[g.id],f&&f.field===g.field&&f.aggFunc===g.aggFunc}),p=!d.allowRemovedColumns&&!!Object.values(u).length;return h&&!p},s=!ys(this.storeParams.sortModel,this.sortSvc?.getSortModel()??[]),r=!i({oldCols:this.storeParams.rowGroupCols,newCols:e}),n=!i({oldCols:this.storeParams.pivotCols,newCols:o}),a=!!e?.length&&!i({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0});if(s||r||n||a)this.resetRootStore();else{const d=this.createStoreParams();this.storeParams.rowGroupCols=d.rowGroupCols,this.storeParams.pivotCols=d.pivotCols,this.storeParams.valueCols=d.valueCols}}destroyRootStore(){!this.rootNode||!this.rootNode.childStore||(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())}refreshAfterSort(e,t){this.storeParams&&(this.storeParams.sortModel=e);const o=this.getRootStore();o&&(o.refreshAfterSort(t),this.onStoreUpdated())}generateSecondaryColumns(e){if(!this.pivotColDefSvc){this.gos.assertModuleRegistered("SharedPivot",2);return}const t=this.pivotColDefSvc.createColDefsFromFields(e);this.managingPivotResultColumns=!0,this.pivotResultCols?.setPivotResultCols(t,"rowModelUpdated")}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes(),t=kt(this.beans,this.rootNode);if(this.rootNode.setRowHeight(t.height,t.estimated),this.rootNode.sibling){const o=kt(this.beans,this.rootNode.sibling);this.rootNode.sibling.setRowHeight(o.height,o.estimated)}e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{const o=kt(this.beans,t);t.setRowHeight(o.height,o.estimated);const i=t.detailNode;if(i){const s=kt(this.beans,i);i.setRowHeight(s.height,s.estimated)}if(t.sibling){const s=kt(this.beans,t.sibling);i?.setRowHeight(s.height,s.estimated)}e=!0}),e}resetRootStore(){this.destroyRootStore(),this.rootNode=new di(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds()),this.managingPivotResultColumns&&(this.pivotResultCols?.setPivotResultCols(null,"api"),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)}columnsToValueObjects(e=[]){return e.map(t=>({id:t.getId(),aggFunc:t.getAggFunc(),displayName:this.colNames.getDisplayNameForColumn(t,"model"),field:t.getColDef().field}))}createStoreParams(){const e=this.columnsToValueObjects(this.rowGroupColsSvc?.columns),t=this.columnsToValueObjects(this.valueColsSvc?.columns),o=this.columnsToValueObjects(this.pivotColsSvc?.columns),i=rl(this.gos);return{valueCols:t,rowGroupCols:e,pivotCols:o,pivotMode:this.colModel.isPivotMode(),filterModel:this.filterManager?.isAdvFilterEnabled()?this.filterManager?.getAdvFilterModel():this.filterManager?.getFilterModel()??{},sortModel:this.sortSvc?.getSortModel()??[],datasource:this.datasource,lastAccessedSequence:{value:0},dynamicRowHeight:i}}getParams(){return this.storeParams}dispatchModelUpdated(e=!1){this.eventSvc.dispatchEvent({type:"modelUpdated",animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1})}onStoreUpdated(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())}onRowHeightChanged(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()}updateRowIndexesAndBounds(){const e=this.getRootStore();e&&e.setDisplayIndexes({value:0},{value:0},0)}retryLoads(){const e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())}getRow(e){const t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)}setPaused(e){this.pauseStoreUpdateListening=e}expandAll(e){this.pauseStoreUpdateListening=!0,this.forEachNode(t=>{t.stub||t.hasChildren()&&t.setExpanded(e)}),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()}refreshAfterFilter(e,t){this.storeParams&&(this.storeParams.filterModel=e);const o=this.getRootStore();o&&(o.refreshAfterFilter(t),this.onStoreUpdated())}getRootStore(){return this.rootNode?.childStore}getRowCount(){const e=this.getRootStore();return e?e.getDisplayIndexEnd():0}getTopLevelRowCount(){const e=this.getRootStore();return e?e.getRowCount():1}getTopLevelRowDisplayedIndex(e){const t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e}getRowBounds(e){const t=this.getRootStore();return t?t.getRowBounds(e):{rowTop:0,rowHeight:Oo(this.beans)}}getBlockStates(){const e=this.getRootStore();if(!e)return;const t={};return e.forEachStoreDeep(o=>{const i=o.getBlockStates();for(const s of Object.keys(i))t[s]=i[s]}),t}getRowIndexAtPixel(e){const t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)}isEmpty(){return!1}isRowsToRender(){return this.getRootStore()!=null&&this.getRowCount()>0}getType(){return"serverSide"}forEachNode(e){const t=this.getRootStore();t&&t.forEachNodeDeep(e)}forEachDisplayedNode(e){const t=(o,i)=>{o.stub||!o.displayed||e(o,i)};this.forEachNode(t)}forEachNodeAfterFilterAndSort(e,t=!1){const o=this.getRootStore();o&&o.forEachNodeDeepAfterFilterAndSort(e,void 0,t)}executeOnStore(e,t){if(!this.started)return!1;const o=this.getRootStore();if(!o)return!0;const i=o.getChildStore(e);return i&&t(i),!0}refreshStore(e={}){const t=e.route?e.route:[];this.executeOnStore(t,o=>o.refreshStore(e.purge==!0))}getStoreState(){const e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e}getNodesInRangeForSelection(e,t){const o=e.rowIndex,i=t.rowIndex;if(o===null&&i===null)return[];if(i===null)return e?[e]:[];if(o===null)return[t];const s=[],[r,n]=[o,i].sort((a,l)=>a-l);return this.forEachNode(a=>{const l=a.rowIndex;l==null||a.stub||l>=r&&l<=n&&s.push(a)}),s.length!==n-r+1?null:s}getRowNode(e){let t;return this.forEachNode(o=>{o.id===e&&(t=o),o.detailNode&&o.detailNode.id===e&&(t=o.detailNode)}),t}isRowPresent(e){return!!this.getRowNode(e.id)}setRowCount(e,t){const o=this.getRootStore();o&&o.setRowCount(e,t)}destroy(){this.destroyDatasource(),this.destroyRootStore(),super.destroy()}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}};function CP(e){return e.selectionSvc?.getSelectionState()??null}function bP(e,t){e.selectionSvc?.setSelectionState(t,"api")}function wP(e,t){return e.ssrmTxnManager?.applyTransaction(t)}function yP(e,t){const o=t.startRow??0,i=t.route??[];if(o<0){H(189,{startRow:o});return}_i(e)?.applyRowData(t.successParams,o,i)}function SP(e,t,o){return e.ssrmTxnManager?.applyTransactionAsync(t,o)}function RP(e){_i(e)?.retryLoads()}function xP(e){return e.ssrmTxnManager?.flushAsyncTransactions()}function FP(e,t){_i(e)?.refreshStore(t)}function kP(e){return _i(e)?.getStoreState()??[]}var DP=class extends Jp{constructor(){super(...arguments),this.beanName="expansionSvc",this.queuedRowIds=new Set}wireBeans(e){this.serverSideRowModel=e.rowModel}postConstruct(){this.addManagedEventListeners({columnRowGroupChanged:()=>{this.queuedRowIds.clear()}})}checkOpenByDefault(e){if(!e.isExpandable())return;if(this.queuedRowIds.has(e.id)){this.queuedRowIds.delete(e.id),e.setExpanded(!0);return}const t=this.gos.getCallback("isServerSideGroupOpenByDefault");if(!t)return;const o={data:e.data,rowNode:e};t(o)&&e.setExpanded(!0)}expandRows(e){e.forEach(t=>{const o=this.serverSideRowModel.getRowNode(t);o?o.setExpanded(!0):this.queuedRowIds.add(t)})}expandAll(e){this.serverSideRowModel.expandAll(e)}onGroupExpandedOrCollapsed(){}dispatchExpandedEvent(e){this.eventSvc.dispatchEvent(e)}},ea=class extends A{constructor(){super(...arguments),this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectAllUsed=!1,this.selectedNodes={}}getSelectedState(){return{selectAll:this.selectedState.selectAll,toggledNodes:[...this.selectedState.toggledNodes]}}setSelectedState(e){if(typeof e!="object"){he(116);return}if(!("selectAll"in e)){he(116);return}if(typeof e.selectAll!="boolean"){he(117);return}if(!("toggledNodes"in e)||!Array.isArray(e.toggledNodes))return H(197);const t={selectAll:e.selectAll,toggledNodes:new Set};e.toggledNodes.forEach(i=>{typeof i=="string"?t.toggledNodes.add(i):H(196,{key:i})});const o=t.selectAll||t.toggledNodes.size>1;if(Eu(this.gos)&&!ri(this.gos)&&o){H(130);return}this.selectedState=t}deleteSelectionStateFromParent(e,t){if(this.selectedState.toggledNodes.size===0)return!1;let o=!1;return t.forEach(i=>{this.selectedState.toggledNodes.delete(i)&&(o=!0)}),o}setNodesSelected(e){const{nodes:t,clearSelection:o,newValue:i}=e;if(t.length===0)return 0;const s=o&&i;if(!ri(this.gos)||s){if(t.length>1)return he(130),0;const n=t[0],a=n.footer?n.sibling:n;return i&&a.selectable?(this.selectedNodes={[a.id]:a},this.selectedState={selectAll:!1,toggledNodes:new Set([a.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),1}const r=(n,a=i)=>{const l=n.footer?n.sibling:n;a&&l.selectable?this.selectedNodes[l.id]=l:delete this.selectedNodes[l.id],a===this.selectedState.selectAll||!l.selectable?this.selectedState.toggledNodes.delete(l.id):this.selectedState.toggledNodes.add(l.id)};return t.forEach(n=>r(n)),1}processNewRow(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)}isNodeSelected(e){const t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t}getSelectedNodes(e=!1,t=!0){const{selectedState:{selectAll:o},selectedNodes:i,selectAllUsed:s}=this;return t&&s&&H(199),e&&o?null:Object.values(i)}getSelectedRows(){return(this.getSelectedNodes()??[]).map(e=>e.data)}getSelectionCount(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size}isEmpty(){return!this.selectedState.selectAll&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.reset(!0)}deselectAllRowNodes(){this.reset(!1)}reset(e){this.selectedState={selectAll:e,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed||(this.selectAllUsed=e)}getSelectAllState(){return this.selectedState.selectAll?this.selectedState.toggledNodes.size>0?null:!0:this.selectedState.toggledNodes.size>0?null:!1}},rr=class extends A{constructor(){super(...arguments),this.selectedState={selectAllChildren:!1,toggledNodes:new Map}}wireBeans(e){this.rowModel=e.rowModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.filterManager=e.filterManager,this.selectionSvc=e.selectionSvc}postConstruct(){this.addManagedEventListeners({modelUpdated:()=>this.removeRedundantState(),columnRowGroupChanged:()=>this.selectionSvc.reset("rowGroupChanged")})}getSelectedState(){const{gos:e,rowGroupColsSvc:t,selectedState:o}=this,i=e.get("treeData"),s=(r,n,a)=>{const l={nodeId:a};if((i||t&&n<=t.columns.length)&&(l.selectAllChildren=r.selectAllChildren),r.toggledNodes.size){const d=[];r.toggledNodes.forEach((u,h)=>{const p=s(u,n+1,h);d.push(p)}),l.toggledNodes=d}return l};return s(o,0)}setSelectedState(e){if("selectAll"in e){he(111);return}const t=(o,i)=>{if(typeof o!="object")throw he(243),new Error;if("selectAllChildren"in o&&typeof o.selectAllChildren!="boolean")throw he(244),new Error;if("toggledNodes"in o){if(!Array.isArray(o.toggledNodes))throw he(245),new Error;if(!o.toggledNodes.every(l=>typeof l=="object"&&"nodeId"in l&&typeof l.nodeId=="string"))throw he(246),new Error}const s=o.selectAllChildren??!i,r=o.toggledNodes?.map(a=>[a.nodeId,t(a,s)]);if(r?.some(([,a])=>s===a.selectAllChildren&&a.toggledNodes.size===0))throw he(247),new Error;return{selectAllChildren:s,toggledNodes:new Map(r)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch{}}deleteSelectionStateFromParent(e,t){let o=this.selectedState;const i=[...e];for(;o&&i.length;)o=o.toggledNodes.get(i.pop());if(!o)return!1;let s=!1;return t.forEach(r=>{o?.toggledNodes.delete(r)&&(s=!0)}),s&&this.removeRedundantState(),s}setNodesSelected({nodes:e,newValue:t,clearSelection:o}){if(e.length===0)return 0;const i=o&&t;if(!ri(this.gos)||i){if(e.length>1)return he(130),0;this.deselectAllRowNodes()}return e.forEach(s=>{const r=s.footer?s.sibling:s,n=this.getRouteToNode(r);this.recursivelySelectNode(n,this.selectedState,t)}),this.removeRedundantState(),1}isNodeSelected(e){const t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)}isNodePathSelected([e,...t],o){if(t.length===0){const i=o.toggledNodes.has(e.id);if(e.hasChildren()){const s=o.toggledNodes.get(e.id);if(s&&s.toggledNodes.size)return}return o.selectAllChildren?!i:i}if(o.toggledNodes.has(e.id)){const i=o.toggledNodes.get(e.id);if(i)return this.isNodePathSelected(t,i)}return o.selectAllChildren}getRouteToNode(e){const t=[];let o=e;for(;o.parent;)t.push(o),o=o.parent;return t.reverse()}removeRedundantState(){if(this.filterManager?.isAnyFilterPresent())return;const e=(t=this.selectedState,o,i)=>{if(t.toggledNodes.forEach((n,a)=>{e(n,a,t)}),o){const a=this.rowModel.getRowNode(o)?.childStore;if(a?.isLastRowIndexKnown()&&t.toggledNodes.size>=a.getRowCount()){for(const u of t.toggledNodes.entries()){const[h,p]=u;if(p.toggledNodes.size>0||!this.rowModel.getRowNode(h))return}t.selectAllChildren=!t.selectAllChildren,t.toggledNodes.clear()}}const s=t.toggledNodes.size===0,r=i?.selectAllChildren===t.selectAllChildren;s&&r&&i?.toggledNodes.delete(o)};e()}recursivelySelectNode([e,...t],o,i){if(!e)return;if(!t.length){const a=e.selectable;if(o.selectAllChildren===i||!a){o.toggledNodes.delete(e.id);return}const d={selectAllChildren:i,toggledNodes:new Map};o.toggledNodes.set(e.id,d);return}const r=o.toggledNodes.has(e.id),n=o.toggledNodes.get(e.id)??{selectAllChildren:o.selectAllChildren,toggledNodes:new Map};r||o.toggledNodes.set(e.id,n),this.recursivelySelectNode(t,n,i),o.selectAllChildren===n.selectAllChildren&&n.toggledNodes.size===0&&o.toggledNodes.delete(e.id)}getSelectedNodes(e=!1){if(H(202),this.selectedState.selectAllChildren&&e)return null;const t=[];return this.rowModel.forEachNode(o=>{o.isSelected()&&t.push(o)}),t}processNewRow(){}getSelectedRows(){return this.getSelectedNodes()?.map(e=>e.data)??[]}getSelectionCount(){return-1}isEmpty(){return!this.selectedState.selectAllChildren&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.reset(!0)}deselectAllRowNodes(){this.reset(!1)}reset(e){this.selectedState={selectAllChildren:e,toggledNodes:new Map}}getSelectAllState(){return this.selectedState.selectAllChildren?this.selectedState.toggledNodes.size>0?null:!0:this.selectedState.toggledNodes.size>0?null:!1}},MP=class extends fb{constructor(){super(...arguments),this.beanName="selectionSvc"}postConstruct(){super.postConstruct(),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{const o=Ds(this.gos),i=o&&this.selectionStrategy instanceof ea?rr:!o&&this.selectionStrategy instanceof rr?ea:void 0;i&&(this.destroyBean(this.selectionStrategy),this.selectionStrategy=this.createManagedBean(new i),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}),this.addManagedPropertyListeners(["rowSelection"],()=>{const o=Or(this.gos);o!==this.selectionMode&&(this.selectionMode=o,this.deselectAllRowNodes({source:"api"}))}),this.selectionMode=Or(this.gos);const t=Ds(this.gos)?rr:ea;this.selectionStrategy=this.createManagedBean(new t)}handleSelectionEvent(e,t,o){if(this.isRowSelectionBlocked(t))return 0;let i=0;const s=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,o);return s==null?0:(this.selectionCtx.selectAll=!1,"select"in s?(s.reset?this.selectionStrategy.deselectAllRowNodes({source:"api"}):this.selectionStrategy.setNodesSelected({nodes:s.deselect,newValue:!1,source:o}),i=this.selectionStrategy.setNodesSelected({nodes:s.select,newValue:!0,source:o})):i=this.selectionStrategy.setNodesSelected({nodes:[s.node],newValue:s.newValue,clearSelection:s.clearSelection,event:e,source:o}),this.shotgunResetNodeSelectionState(o),this.dispatchSelectionChanged(o),i)}getSelectionState(){return this.selectionStrategy.getSelectedState()}setSelectionState(e,t){if(!Qt(this.gos)){H(132);return}Array.isArray(e)||(this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged(t))}setNodesSelected(e){if(!Qt(this.gos)&&e.newValue)return H(132),0;const{nodes:t,...o}=e;if(t.length>1&&this.selectionMode!=="multiRow")return H(130),0;const i={nodes:t.filter(r=>r.selectable),...o};if(!i.nodes.length)return 0;const s=this.selectionStrategy.setNodesSelected(i);return this.shotgunResetNodeSelectionState(i.source),this.dispatchSelectionChanged(i.source),s}deleteSelectionStateFromParent(e,t){this.selectionStrategy.deleteSelectionStateFromParent(e,t)&&(this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}shotgunResetNodeSelectionState(e){this.beans.rowModel.forEachNode(t=>{if(t.stub)return;const o=this.selectionStrategy.isNodeSelected(t);o!==t.isSelected()&&this.selectRowNode(t,o,void 0,e)})}getSelectedNodes(){return this.selectionStrategy.getSelectedNodes()??[]}getSelectedRows(){return this.selectionStrategy.getSelectedRows()}getSelectionCount(){return this.selectionStrategy.getSelectionCount()}syncInRowNode(e){this.selectionStrategy.processNewRow(e);const t=this.selectionStrategy.isNodeSelected(e);if(t!=!1&&!e.selectable){this.selectionStrategy.setNodesSelected({nodes:[e],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api");return}e.__selected=t}reset(){this.selectionStrategy.deselectAllRowNodes({source:"api"}),this.selectionCtx.reset()}isEmpty(){return this.selectionStrategy.isEmpty()}hasNodesToSelect(){return!0}selectAllRowNodes(e){if(!Qt(this.gos)){H(132);return}if(lc(e),Eu(this.gos)&&!ri(this.gos))return H(130);this.selectionStrategy.selectAllRowNodes(e),this.selectionCtx.selectAll=!0,this.beans.rowModel.forEachNode(t=>{t.stub||this.selectRowNode(t,!0,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}deselectAllRowNodes(e){lc(e),this.selectionStrategy.deselectAllRowNodes(e),this.selectionCtx.selectAll=!1,this.beans.rowModel.forEachNode(t=>{t.stub||this.selectRowNode(t,!1,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}getSelectAllState(e){return this.selectionStrategy.getSelectAllState(e)}getBestCostNodeSelection(){return H(194,{method:"getBestCostNodeSelection"})}updateSelectable(){if(!Qt(this.gos))return;const e=[];this.beans.rowModel.forEachNode(t=>{!this.updateRowSelectable(t,!0)&&t.isSelected()&&e.push(t)}),e.length&&this.setNodesSelected({nodes:e,newValue:!1,source:"selectableChanged"})}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.selectionStrategy instanceof rr?null:this.selectionStrategy.getSelectedNodes(!0,!1),serverSideState:this.getSelectionState()})}updateSelectableAfterGrouping(){return he(194,{method:"updateSelectableAfterGrouping"})}refreshMasterNodeState(){}setDetailSelectionState(){}};function lc({selectAll:e}){(e==="filtered"||e==="currentPage")&&H(195,{justCurrentPage:e==="currentPage"})}var PP=class extends A{constructor(){super(...arguments),this.beanName="rowChildrenSvc"}getHasChildrenValue(e){const t=this.gos.get("treeData"),o=this.gos.get("isServerSideGroup");return!e.stub&&!e.footer&&(t?!!o&&o(e.data):!!e.group)}},EP=class extends A{constructor(){super(...arguments),this.beanName="lazyBlockLoadingSvc",this.outboundRequests=0,this.cacheLoadingNodesMap=new Map,this.isCheckQueued=!1,this.nextBlockToLoad=void 0}wireBeans(e){this.rowRenderer=e.rowRenderer,this.rowModel=e.rowModel}postConstruct(){this.maxOutboundRequests=Kf(this.gos)}subscribe(e){this.cacheLoadingNodesMap.set(e,new Set)}unsubscribe(e){this.cacheLoadingNodesMap.delete(e)}queueLoadCheck(){this.isCheckQueued||(this.isCheckQueued=!0,window.queueMicrotask(()=>{this.queueLoadAction(),this.isCheckQueued=!1}))}onLoadComplete(){this.outboundRequests-=1,this.queueLoadCheck()}hasAvailableLoadBandwidth(){return this.maxOutboundRequests===void 0?!0:this.outboundRequests<this.maxOutboundRequests}queueLoadAction(){const e=this.getBlockToLoad();if(!e)return;const t=this.nextBlockToLoad&&this.nextBlockToLoad.cache===e.cache&&this.nextBlockToLoad.index===e.index;if(!t&&(!this.nextBlockToLoad||!t)){this.nextBlockToLoad=e,window.clearTimeout(this.loaderTimeout);const o=Number(this.nextBlockToLoad.index),i=this.nextBlockToLoad.cache,s=e.index+e.cache.getBlockSize();this.loaderTimeout=window.setTimeout(()=>{i.isAlive()&&(this.loaderTimeout=void 0,this.attemptLoad(i,o,s),this.nextBlockToLoad=void 0)},this.gos.get("blockLoadDebounceMillis"))}}attemptLoad(e,t,o){this.hasAvailableLoadBandwidth()&&(this.executeLoad(e,t,o),this.queueLoadCheck())}executeLoad(e,t,o){const i=e.getSsrmParams(),s={startRow:t,endRow:o,rowGroupCols:i.rowGroupCols,valueCols:i.valueCols,pivotCols:i.pivotCols,pivotMode:i.pivotMode,groupKeys:e.store.getParentNode().getRoute()??[],filterModel:i.filterModel,sortModel:i.sortModel},r=this.cacheLoadingNodesMap.get(e),n=()=>{for(let h=0;h<o-t;h++)r.delete(t+h)},a=()=>{for(let h=0;h<o-t;h++)r.add(t+h)},l=h=>{this.onLoadComplete(),e.onLoadSuccess(t,o-t,h),n()},d=()=>{this.onLoadComplete(),e.onLoadFailed(t,o-t),n()},u=J(this.gos,{request:s,success:l,fail:d,parentNode:e.store.getParentNode()});a(),this.outboundRequests+=1,e.getSsrmParams().datasource?.getRows(u)}getBlockToLoad(){const e=this.rowRenderer.firstRenderedRow,t=this.rowRenderer.lastRenderedRow;for(let a=e;a<=t;a++){const l=this.rowModel.getRow(a);if(!l)continue;const d=l.parent?.childStore;if(!d)continue;const u=d.getCache(),h=u.getNodes().getBy("node",l);if(!(!h||this.cacheLoadingNodesMap.get(u)?.has(h.index))&&(l.__needsRefreshWhenVisible||l.stub&&!l.failedLoad))return{cache:u,index:u.getBlockStartIndex(h.index)}}let o=null,i=null,s=Number.MAX_SAFE_INTEGER;for(const a of this.cacheLoadingNodesMap.keys())a.getNodesToRefresh().forEach(d=>{if(d.rowIndex==null){i=d,o=a;return}const u=a.getNodes().getBy("node",d);if(!u||this.cacheLoadingNodesMap.get(a)?.has(u.index))return;const p=Math.abs(e-d.rowIndex),g=Math.abs(d.rowIndex-t);p<s&&(i=d,s=p,o=a),g<s&&(i=d,s=g,o=a)});if(!o)return;const r=o,n=r.getNodes().getBy("node",i)?.index;return n==null?void 0:{cache:r,index:r.getBlockStartIndex(n)}}isRowLoading(e,t){return this.cacheLoadingNodesMap.get(e)?.has(t)??!1}},AP=class{constructor(...e){this.indexes=e,this.maps=new Map(this.indexes.map(t=>[t,new Map]))}getSize(){return this.maps.get(this.indexes[0]).size}getBy(e,t){return this.maps.get(e).get(t)}set(e){this.indexes.forEach(t=>{this.maps.get(t).set(e[t],e)})}delete(e){this.indexes.forEach(t=>{this.maps.get(t).delete(e[t])})}clear(){this.maps.forEach(e=>e.clear())}getIterator(e){return this.maps.get(e).values()}forEach(e){const t=this.getIterator(this.indexes[0]);let o;for(;(o=t.next())&&!o.done;)e(o.value)}find(e){const t=this.getIterator(this.indexes[0]);let o;for(;(o=t.next())&&!o.done;)if(e(o.value))return o.value}filter(e){const t=this.getIterator(this.indexes[0]);let o;const i=[];for(;(o=t.next())&&!o.done;)e(o.value)&&i.push(o.value);return i}},TP=100,ta=class extends A{constructor(e,t,o,i){super(),this.live=!0,this.removedNodeCache=new Map,this.store=e,this.numberOfRows=t,this.isLastRowKnown=o,this.storeParams=i}wireBeans(e){this.rowRenderer=e.rowRenderer,this.blockUtils=e.ssrmBlockUtils,this.focusSvc=e.focusSvc,this.nodeManager=e.ssrmNodeManager,this.serverSideRowModel=e.rowModel,this.rowNodeSorter=e.rowNodeSorter,this.sortSvc=e.sortSvc,this.lazyBlockLoadingSvc=e.lazyBlockLoadingSvc,this.colModel=e.colModel}postConstruct(){this.lazyBlockLoadingSvc.subscribe(this),this.nodeMap=new AP("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.getRowIdFunc=Fs(this.gos),this.isMasterDetail=this.gos.get("masterDetail")}destroy(){this.lazyBlockLoadingSvc.unsubscribe(this),this.numberOfRows=0,this.nodeMap.forEach(e=>this.blockUtils.destroyRowNode(e.node)),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1,super.destroy()}getRowByDisplayIndex(e){if(!this.store.isDisplayIndexInStore(e))return;const t=this.nodeDisplayIndexMap.get(e);if(t)return(t.stub||t.__needsRefreshWhenVisible)&&this.lazyBlockLoadingSvc.queueLoadCheck(),t;if(this.gos.get("groupHideOpenParents")||this.gos.get("groupAllowUnbalanced")){const l=this.nodeMap.find(d=>!!d.node.childStore?.isDisplayIndexInStore(e));if(l)return l.node.childStore?.getRowUsingDisplayIndex(e)}if(e===this.store.getDisplayIndexStart())return this.createStubNode(0,e);const i=this.nodeDisplayIndexMap.get(e-1);if(i){if(this.isMasterDetail&&i.master&&i.expanded)return i.detailNode;if(i.expanded&&i.childStore?.isDisplayIndexInStore(e))return i.childStore?.getRowUsingDisplayIndex(e);const l=this.nodeMap.getBy("node",i);return this.createStubNode(l.index+1,e)}const s=this.getSurroundingNodesByDisplayIndex(e);if(s==null){const l=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(l,e)}const{previousNode:r,nextNode:n}=s;if(r&&r.node.expanded&&r.node.childStore?.isDisplayIndexInStore(e))return r.node.childStore?.getRowUsingDisplayIndex(e);if(n){const l=n.node.rowIndex-e,d=n.index-l;return this.createStubNode(d,e)}const a=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(a,e)}createStubNode(e,t){const o=this.store.getRowBounds(t),i=this.createRowAtIndex(e,null,s=>{s.setRowIndex(t),s.setRowTop(o.rowTop),this.nodeDisplayIndexMap.set(t,s)});if(e===0&&this.gos.get("groupHideOpenParents")){const s=this.store.getParentNode().groupData;if(s)for(const r of Object.keys(s))Xd(i,this.colModel,r,s[r])}return this.lazyBlockLoadingSvc.queueLoadCheck(),i}getRowByStoreIndex(e){return this.nodeMap.getBy("index",e)?.node}skipDisplayIndexes(e,t,o){if(e===0)return;const i=Oo(this.beans);t.value+=e,o.value+=e*i}setDisplayIndexes(e,t,o){this.nodeDisplayIndexMap.clear();const i={};this.nodeMap.forEach(n=>{i[n.index]=n.node});let s=-1;for(const n of Object.keys(i)){const a=i[n],l=Number(n),d=l-1-s;this.skipDisplayIndexes(d,e,t);const u=l===0;if(a.setFirstChild(u),u&&this.gos.get("groupHideOpenParents")){const h=this.store.getParentNode().groupData;if(h)for(const p of Object.keys(h))Xd(a,this.colModel,p,u?h[p]:void 0)}this.blockUtils.setDisplayIndex(a,e,t,o),a.rowIndex!=null&&this.nodeDisplayIndexMap.set(a.rowIndex,a),s=l}const r=this.numberOfRows-1-s;this.skipDisplayIndexes(r,e,t),this.purgeExcessRows()}getRowCount(){return this.numberOfRows}setRowCount(e,t){this.numberOfRows=e,t!=null&&(this.isLastRowKnown=t,t===!1&&(this.numberOfRows+=1)),this.fireStoreUpdatedEvent()}getNodes(){return this.nodeMap}getNodeCachedByDisplayIndex(e){return this.nodeDisplayIndexMap.get(e)??null}getNodesToRefresh(){return this.nodesToRefresh}getSurroundingNodesByDisplayIndex(e){let t,o;return this.nodeMap.forEach(i=>{if(e>i.node.rowIndex){(o==null||o.node.rowIndex<i.node.rowIndex)&&(o=i);return}if(t==null||t.node.rowIndex>i.node.rowIndex){t=i;return}}),!o&&!t?null:{previousNode:o,nextNode:t}}getDisplayIndexFromStoreIndex(e){const t=this.nodeMap.getBy("index",e);if(t)return t.node.rowIndex;let o,i;if(this.nodeMap.forEach(n=>{if(e>n.index){(i==null||i.index<n.index)&&(i=n);return}if(o==null||o.index>n.index){o=n;return}}),!o)return this.store.getDisplayIndexEnd()-(this.numberOfRows-e);if(!i)return this.store.getDisplayIndexStart()+e;const s=e-i.index;return(i.node.childStore?.getDisplayIndexEnd()??i.node.rowIndex)+s}createRowAtIndex(e,t,o){const i=this.nodeMap.getBy("index",e);if(i){const{node:r}=i;if(r.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,r))return this.blockUtils.updateDataIntoRowNode(r,t),this.nodesToRefresh.delete(r),r;if(this.getRowIdFunc==null&&r.hasChildren()&&r.expanded)return this.nodesToRefresh.delete(r),r;this.destroyRowAtIndex(e)}if(t&&this.getRowIdFunc!=null){const r=this.getRowId(t),n=r&&this.removedNodeCache?.get(r);if(n)return this.removedNodeCache?.delete(r),this.blockUtils.updateDataIntoRowNode(n,t),this.nodeMap.set({id:n.id,node:n,index:e}),this.nodesToRefresh.delete(n),n.__needsRefreshWhenVisible=!1,n;const a=this.nodeMap.getBy("id",r);if(a){this.nodeMap.delete(a);const{node:l,index:d}=a;return this.blockUtils.updateDataIntoRowNode(l,t),this.nodeMap.set({id:l.id,node:l,index:e}),this.nodesToRefresh.delete(l),l.__needsRefreshWhenVisible=!1,this.getBlockStartIndex(d)===this.getBlockStartIndex(e)||this.markBlockForVerify(d),l}}const s=this.blockUtils.createRowNode(this.store.getRowDetails());if(t!=null){const r=this.getPrefixedId(this.store.getIdSequence().value++);this.blockUtils.setDataIntoRowNode(s,t,r,void 0),this.serverSideRowModel.setPaused(!0),this.blockUtils.checkOpenByDefault(s),this.serverSideRowModel.setPaused(!1),this.nodeManager.addRowNode(s)}return this.nodeMap.set({id:s.id,node:s,index:e}),o&&o(s),s}getBlockStates(){const e={},t={};this.nodeMap.forEach(({node:r,index:n})=>{const a=this.getBlockStartIndex(n);!r.stub&&!r.failedLoad&&(e[a]=(e[a]??0)+1);let l="loaded";r.failedLoad?l="failed":this.lazyBlockLoadingSvc.isRowLoading(this,a)?l="loading":(this.nodesToRefresh.has(r)||r.stub)&&(l="needsLoading"),t[a]||(t[a]=new Set),t[a].add(l)});const o={loading:4,failed:3,needsLoading:2,loaded:1},i=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),s={};for(const r of Object.keys(t)){const a=[...t[r]].sort((u,h)=>(o[u]??0)-(o[h]??0))[0],l=Number(r)/this.getBlockSize(),d=i?`${i}-${l}`:String(l);s[d]={blockNumber:l,startRow:Number(r),endRow:Number(r)+this.getBlockSize(),pageStatus:a,loadedRowCount:e[r]??0}}return s}destroyRowAtIndex(e){const t=this.nodeMap.getBy("index",e);t&&(this.nodeMap.delete(t),this.nodeDisplayIndexMap.delete(t.node.rowIndex),this.nodesToRefresh.size>0?this.removedNodeCache.set(t.node.id,t.node):this.blockUtils.destroyRowNode(t.node),this.nodesToRefresh.delete(t.node))}getSsrmParams(){return this.store.getSsrmParams()}getPrefixedId(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()}markBlockForVerify(e){const[t,o]=this.getBlockBounds(e);this.nodeMap.filter(s=>s.index>=t&&s.index<o).forEach(({node:s})=>{s.__needsRefreshWhenVisible=!0})}doesNodeMatch(e,t){if(t.stub)return!1;const o=this.getRowId(e);return o===null?t.data===e:t.id===o}purgeStubsOutsideOfViewport(){const{firstRenderedRow:e,lastRenderedRow:t}=this.rowRenderer,o=this.getBlockStartIndex(e),[,i]=this.getBlockBounds(t);this.nodeMap.forEach(s=>{this.lazyBlockLoadingSvc.isRowLoading(this,s.index)||s.node.failedLoad||s.node.stub&&(s.index<o||s.index>i)&&this.destroyRowAtIndex(s.index)})}getBlocksDistanceFromRow(e,t){const o={};return e.forEach(({node:i,index:s})=>{const[r,n]=this.getBlockBounds(s);if(r in o)return;const a=Math.abs(i.rowIndex-t);let l;const d=this.nodeMap.getBy("index",[n-1]);d&&(l=Math.abs(d.node.rowIndex-t));const u=l==null||a<l?a:l;o[r]=u}),Object.entries(o)}purgeExcessRows(){if(this.purgeStubsOutsideOfViewport(),this.store.getDisplayIndexEnd()==null||this.storeParams.maxBlocksInCache==null)return;const{firstRenderedRow:e,lastRenderedRow:t}=this.rowRenderer,o=new Set,i=new Set;this.nodeMap.forEach(({index:g,node:f})=>{const m=this.getBlockStartIndex(g);o.add(m),f.rowIndex>=e&&f.rowIndex<=t&&i.add(m)});const s=Math.max(i.size,this.storeParams.maxBlocksInCache??0),n=o.size-s;if(n<=0)return;let a=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;i.forEach(g=>{a>g&&(a=g),l<g&&(l=g)});const d=this.nodeMap.filter(({node:g,index:f})=>{const m=this.getBlockStartIndex(f);return!(m>=a&&m<=l)&&!this.isNodeCached(g)});if(d.length===0)return;const u=e+(t-e)/2,h=this.getBlocksDistanceFromRow(d,u),p=this.getBlockSize();h.sort((g,f)=>Math.sign(f[1]-g[1]));for(let g=0;g<Math.min(n,h.length);g++){const f=Number(h[g][0]);for(let m=f;m<f+p;m++){const b=this.nodeMap.getBy("index",m);!b||this.isNodeCached(b.node)||this.destroyRowAtIndex(m)}}}isNodeFocused(e){const t=this.focusSvc.getFocusCellToUseAfterRefresh();return!t||t.rowPinned!=null?!1:t.rowIndex===e.rowIndex}isNodeCached(e){const t=this.gos.get("groupAllowUnbalanced")&&e.key==="";return e.isExpandable()&&e.expanded||this.isNodeFocused(e)||t}extractDuplicateIds(e){if(this.getRowIdFunc==null)return[];const t=new Set,o=new Set;return e.forEach(i=>{const s=this.getRowId(i);if(t.has(s)){o.add(s);return}t.add(s)}),[...o]}onLoadSuccess(e,t,o){if(!this.live)return;const i=o.groupLevelInfo;if(this.store.setStoreInfo(i),this.getRowIdFunc!=null){const n=this.extractDuplicateIds(o.rowData);if(n.length>0){const a=n.join(", ");H(205,{duplicateIdText:a}),this.onLoadFailed(e,t);return}}o.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(o.pivotResultFields);const s=this.nodesToRefresh.size>0;if(o.rowData.forEach((n,a)=>{const l=e+a,d=this.nodeMap.getBy("index",l);if(d?.node?.stub){this.createRowAtIndex(l,n);return}if(d&&this.doesNodeMatch(n,d.node)){this.blockUtils.updateDataIntoRowNode(d.node,n),this.nodesToRefresh.delete(d.node),d.node.__needsRefreshWhenVisible=!1;return}this.createRowAtIndex(l,n)}),o.rowCount!=null&&o.rowCount!==-1)this.numberOfRows=o.rowCount,this.isLastRowKnown=!0;else if(t>o.rowData.length)this.numberOfRows=e+o.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){const n=e+o.rowData.length+1;n>this.numberOfRows&&(this.numberOfRows=n)}this.isLastRowKnown&&this.nodeMap.filter(a=>a.index>=this.numberOfRows).forEach(a=>this.destroyRowAtIndex(a.index)),this.fireStoreUpdatedEvent();const r=this.nodesToRefresh.size===0;s&&r&&this.fireRefreshFinishedEvent()}fireRefreshFinishedEvent(){this.nodesToRefresh.size===0&&(this.removedNodeCache.forEach(t=>{this.blockUtils.destroyRowNode(t)}),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())}isStoreFullyLoaded(){const e=this.isLastRowKnown,t=this.nodeMap.getSize()===this.numberOfRows;if(!e||!t||this.nodesToRefresh.size>0)return;let o=-1;return this.nodeMap.find(s=>(o+=1,!!(s.index!==o||s.node.__needsRefreshWhenVisible||s.node.stub)))==null}isLastRowIndexKnown(){return this.isLastRowKnown}onLoadFailed(e,t){if(!this.live)return;const o=this.nodesToRefresh.size>0;for(let s=e;s<e+t&&s<this.getRowCount();s++){let{node:r}=this.nodeMap.getBy("index",s)??{};r&&this.nodesToRefresh.delete(r),(!r||!r.stub)&&(r&&!r.stub&&this.destroyRowAtIndex(s),r=this.createRowAtIndex(s)),r.__needsRefreshWhenVisible=!1,r.failedLoad=!0}const i=this.nodesToRefresh.size===0;o&&i&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}markNodesForRefresh(){this.nodeMap.forEach(e=>{e.node.stub&&!e.node.failedLoad||this.nodesToRefresh.add(e.node)}),this.lazyBlockLoadingSvc.queueLoadCheck(),this.isLastRowKnown&&this.numberOfRows===0&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())}isNodeInCache(e){return!!this.nodeMap.getBy("id",e)}fireStoreUpdatedEvent(){this.live&&this.store.fireStoreUpdatedEvent()}getRowId(e){if(this.getRowIdFunc==null)return null;const{level:t}=this.store.getRowDetails(),o=this.store.getParentNode().getRoute()??[];return this.getRowIdFunc({data:e,parentKeys:o.length>0?o:void 0,level:t})}getOrderedNodeMap(){const e={};return this.nodeMap.forEach(t=>e[t.index]=t),e}clearDisplayIndexes(){this.nodeDisplayIndexMap.clear()}clientSideSortRows(){const e=this.sortSvc?.getSortOptions()??[];if(!e.some(s=>s.sort!=null)||!this.rowNodeSorter)return;const o=new Array(this.nodeMap.getSize());this.nodeMap.forEach(s=>o[s.index]=s.node),this.nodeMap.clear(),this.rowNodeSorter.doFullSort(o,e).forEach((s,r)=>{this.nodeMap.set({id:s.id,node:s,index:r})})}updateRowNodes(e){const t=[];return e.forEach(o=>{const i=this.getRowId(o),s=this.nodeMap.getBy("id",i);s&&(this.blockUtils.updateDataIntoRowNode(s.node,o),t.push(s.node))}),t}insertRowNodes(e,t){const o=this.store.getRowCount()-(this.store.getParentNode().sibling?1:0),i=t==null&&this.isLastRowKnown?o:t;if(i==null||o<i)return[];const s={};e.forEach(l=>{const d=this.getRowId(l);d&&this.isNodeInCache(d)||(s[d]=l)});const r=Object.values(s),n=r.length;if(n===0)return[];const a=this.nodeMap.filter(l=>l.index>=i);return a.forEach(l=>this.nodeMap.delete(l)),a.forEach(l=>{this.nodeMap.set({node:l.node,index:l.index+n,id:l.id})}),this.numberOfRows+=n,r.map((l,d)=>this.createRowAtIndex(i+d,l))}removeRowNodes(e){const t=[],o=[];let i=0;const s=[...e],r=this.getOrderedNodeMap();let n=-1;for(const a of Object.keys(r)){n+=1;const l=r[a],d=s.findIndex(h=>h===l.id);if(d!==-1){s.splice(d,1),this.destroyRowAtIndex(Number(a)),t.push(l.node),i+=1;continue}if(i===0)continue;const u=Number(a);n!==u&&o.push(l.node),this.nodeMap.delete(l),this.nodeMap.set({id:l.id,node:l.node,index:u-i})}return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:i,s.length>0&&o.length>0&&(o.forEach(a=>a.__needsRefreshWhenVisible=!0),this.lazyBlockLoadingSvc.queueLoadCheck()),t}getBlockSize(){return this.storeParams.cacheBlockSize||TP}getBlockStartIndex(e){const t=this.getBlockSize();return e-e%t}getBlockBounds(e){const t=this.getBlockStartIndex(e),o=this.getBlockSize();return[t,t+o]}},IP=class extends A{constructor(e,t,o){super(),this.idSequence={value:0},this.ssrmParams=e,this.parentRowNode=o,this.storeParams=t,this.level=o.level+1,this.group=e.rowGroupCols?this.level<e.rowGroupCols.length:!1,this.leafGroup=e.rowGroupCols?this.level===e.rowGroupCols.length-1:!1,this.info={}}wireBeans(e){this.blockUtils=e.ssrmBlockUtils,this.storeUtils=e.ssrmStoreUtils,this.selectionSvc=e.selectionSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){let e=1;if(this.level===0&&(e=this.storeUtils.getServerSideInitialRowCount()??1,this.eventSvc.dispatchEventOnce({type:"rowCountReady"})),this.cache=this.createManagedBean(new ta(this,e,!1,this.storeParams)),!this.gos.get("treeData")&&this.group&&this.rowGroupColsSvc){const o=this.ssrmParams.rowGroupCols[this.level];this.groupField=o.field,this.rowGroupColumn=this.rowGroupColsSvc.columns[this.level]}}destroy(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache),super.destroy()}applyRowData(e,t,o){this.cache.onLoadSuccess(t,o,e)}applyTransaction(e){const t=Fs(this.gos);if(!t)return H(206),{status:Yt.Cancelled};const o=this.gos.getCallback("isApplyServerSideTransaction");if(o){const u={transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info};if(!o(u))return{status:Yt.Cancelled}}const i=this.cache.isStoreFullyLoaded();let s;e.update?.length&&(s=this.cache.updateRowNodes(e.update));let r;if(e.add?.length){let u=e.addIndex;u!=null&&u<0&&(u=void 0),r=this.cache.insertRowNodes(e.add,u)}let n;if(e.remove?.length){const u=e.remove.map(p=>t({level:this.level,parentKeys:this.parentRowNode.getRoute()??[],data:p})),h=[...new Set(u)];n=this.cache.removeRowNodes(h)}const a=this.gos.get("serverSideEnableClientSideSort"),l=s?.length||r?.length;return i&&a&&l&&this.cache.clientSideSortRows(),this.updateSelectionAfterTransaction(s,n),{status:Yt.Applied,update:s,add:r,remove:n}}updateSelectionAfterTransaction(e,t){if(!this.selectionSvc)return;const o=[];e?.forEach(i=>{i.isSelected()&&!i.selectable&&o.push(i)}),t?.forEach(i=>{i.isSelected()&&o.push(i)}),o.length&&this.selectionSvc.setNodesSelected({newValue:!1,clearSelection:!1,nodes:o,source:"rowDataChanged"})}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEach(e=>this.blockUtils.clearDisplayIndex(e.node)),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()}getDisplayIndexStart(){return this.displayIndexStart}getDisplayIndexEnd(){return this.displayIndexEnd}getRowCount(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()}setRowCount(e,t){this.cache.setRowCount(e,t)}isDisplayIndexInStore(e){return this.cache.getRowCount()===0?!1:this.displayIndexStart<=e&&e<this.getDisplayIndexEnd()}setDisplayIndexes(e,t,o){this.displayIndexStart=e.value,this.topPx=t.value;const i=this.parentRowNode.level>-1&&Bi(this.gos)({node:this.parentRowNode});i||Gl(this.parentRowNode),i==="top"&&(po(this.parentRowNode,this.beans),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,o)),this.cache.setDisplayIndexes(e,t,o),i==="bottom"&&(po(this.parentRowNode,this.beans),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,o)),this.displayIndexEnd=e.value,this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t={value:0}){e(this,t.value++),this.cache.getNodes().forEach(o=>{const i=o.node.childStore;i&&i.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t={value:0}){this.cache.getNodes().forEach(o=>{e(o.node,t.value++);const i=o.node.childStore;i&&i.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t={value:0},o=!1){const i=this.parentRowNode.level>-1&&Bi(this.gos)({node:this.parentRowNode});i==="top"&&e(this.parentRowNode.sibling,t.value++);const s=this.cache.getOrderedNodeMap();for(const r of Object.values(s)){e(r.node,t.value++);const n=r.node.childStore;n&&n.forEachNodeDeepAfterFilterAndSort(e,t,o)}i==="bottom"&&e(this.parentRowNode.sibling,t.value++)}retryLoads(){this.cache.getNodes().forEach(({node:e})=>{e.failedLoad&&(e.failedLoad=!1,e.__needsRefreshWhenVisible=!0,e.stub=!0)}),this.forEachChildStoreShallow(e=>e.retryLoads()),this.fireStoreUpdatedEvent()}getRowUsingDisplayIndex(e){return this.parentRowNode.sibling&&e===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(e)}getRowBounds(e){if(!this.isDisplayIndexInStore(e))return null;const t=this.cache.getNodeCachedByDisplayIndex(e);if(t){const a=this.blockUtils.extractRowBounds(t,e);if(a)return a}const{previousNode:o,nextNode:i}=this.cache.getSurroundingNodesByDisplayIndex(e)??{};if(o){const a=this.blockUtils.extractRowBounds(o.node,e);if(a!=null)return a}const s=Oo(this.beans);if(i){const a=(i.node.rowIndex-e)*s;return{rowTop:i.node.rowTop-a,rowHeight:s}}const r=this.topPx+this.heightPx,n=(this.getDisplayIndexEnd()-e)*s;return{rowTop:r-n,rowHeight:s}}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;if(this.parentRowNode.sibling&&e>this.parentRowNode.sibling.rowTop&&e<this.parentRowNode.sibling.rowTop+this.parentRowNode.sibling.rowHeight)return this.parentRowNode.sibling.rowIndex;let t=Number.MAX_SAFE_INTEGER,o=null,i=Number.MAX_SAFE_INTEGER,s=null;if(this.cache.getNodes().forEach(({node:l})=>{const d=Math.abs(e-l.rowTop);if(l.rowTop<e){d<t&&(t=d,o=l);return}d<i&&(i=d,s=l)}),o=o,s=s,o){const l=this.blockUtils.getIndexAtPixel(o,e);if(l!=null)return l}const r=Oo(this.beans);if(s){const l=s.rowTop,d=Math.ceil((l-e)/r);return s.rowIndex-d}const n=this.topPx+this.heightPx,a=Math.floor((n-e)/r);return this.getDisplayIndexEnd()-a}getChildStore(e){return this.storeUtils.getChildStore(e,this,t=>{const o=this.cache.getNodes().find(i=>i.node.key==t);return o?o.node:null})}forEachChildStoreShallow(e){this.cache.getNodes().forEach(({node:t})=>{t.childStore&&e(t.childStore)})}refreshAfterSort(e){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){const o=this.cache.isStoreFullyLoaded(),i=this.gos.get("serverSideEnableClientSideSort");if(!(o&&i)){const r=this.cache.getRowCount(),n=this.cache.isLastRowIndexKnown();this.destroyBean(this.cache),this.cache=this.createManagedBean(new ta(this,r,n,this.storeParams));return}this.cache.clientSideSortRows()}this.forEachChildStoreShallow(o=>o.refreshAfterSort(e))}refreshAfterFilter(e){if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){this.refreshStore(!0);return}this.forEachChildStoreShallow(o=>o.refreshAfterFilter(e))}refreshStore(e){if(e){this.destroyBean(this.cache),this.cache=this.createManagedBean(new ta(this,1,!1,this.storeParams)),this.fireStoreUpdatedEvent();return}this.cache.markNodesForRefresh()}getTopLevelRowDisplayedIndex(e){return this.cache.getDisplayIndexFromStoreIndex(e)??e}isLastRowIndexKnown(){return this.cache.isLastRowIndexKnown()}getRowNodesInRange(e,t){return this.cache.getNodes().filter(({node:o})=>o.rowIndex>=e.rowIndex&&o.rowIndex<=t.rowIndex).map(({node:o})=>o)}addStoreStates(e){e.push({route:this.parentRowNode.getRoute()??[],rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}getIdSequence(){return this.idSequence}getParentNode(){return this.parentRowNode}getRowDetails(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}}getSsrmParams(){return this.ssrmParams}setStoreInfo(e){e&&Object.assign(this.info,e)}fireStoreUpdatedEvent(){this.eventSvc.dispatchEvent({type:"storeUpdated"})}fireRefreshFinishedEvent(){this.eventSvc.dispatchEvent({type:"storeRefreshed",route:this.parentRowNode.getRoute()})}getBlockStates(){return this.cache.getBlockStates()}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}getCache(){return this.cache}},LP=class extends A{constructor(){super(...arguments),this.beanName="ssrmStoreFactory"}wireBeans(e){this.colModel=e.colModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc,this.rowAutoHeight=e.rowAutoHeight}createStore(e,t){const o=this.getStoreParams(e,t);return new IP(e,o,t)}getStoreParams(e,t){const o=this.getLevelSpecificParams(t),i=this.getBlockSize(o),s=this.getMaxBlocksInCache(e,o);return{cacheBlockSize:i,maxBlocksInCache:s}}getMaxBlocksInCache(e,t){const o=t&&t.maxBlocksInCache!=null?t.maxBlocksInCache:this.gos.get("maxBlocksInCache");if(o!=null&&o>=0){if(e.dynamicRowHeight){H(203);return}if(this.rowAutoHeight?.active){H(204);return}return o}}getBlockSize(e){const t=e&&e.cacheBlockSize!=null?e.cacheBlockSize:this.gos.get("cacheBlockSize");return t!=null&&t>0?t:100}getLevelSpecificParams(e){const t=this.gos.getCallback("getServerSideGroupLevelParams");if(!t)return;const o={level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.rowGroupColsSvc?.columns??[],pivotColumns:this.pivotColsSvc?.columns??[],pivotMode:this.colModel.isPivotMode()};return t(o)}},BP=class extends A{constructor(){super(...arguments),this.beanName="ssrmStoreUtils"}wireBeans(e){this.colModel=e.colModel,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}getChildStore(e,t,o){if(!e?.length)return t;const i=e[0],s=o(i);if(s){if(e.length===1&&!s.childStore){const a=this.serverSideRowModel.getParams();s.childStore=this.createBean(this.storeFactory.createStore(a,s))}const r=e.slice(1,e.length),n=s.childStore;return n?n.getChildStore(r):null}return null}isServerRefreshNeeded(e,t,o){if(o.valueColChanged||o.secondaryColChanged)return!0;const i=e.level+1;if(!(i<t.length))return!0;const n=t[i].id;return o.changedColumns.indexOf(n)>-1?!0:this.colModel.getCols().filter(u=>u.getColDef().showRowGroup&&o.changedColumns.includes(u.getId())).map(u=>u.getColDef().showRowGroup).some(u=>u===!0||u===n)}getServerSideInitialRowCount(){return this.gos.get("serverSideInitialRowCount")}isServerSideSortAllLevels(){return this.gos.get("serverSideSortAllLevels")&&yt(this.gos)}isServerSideOnlyRefreshFilteredGroups(){return this.gos.get("serverSideOnlyRefreshFilteredGroups")&&yt(this.gos)}},OP=class extends A{constructor(){super(...arguments),this.beanName="ssrmTxnManager",this.asyncTransactions=[]}wireBeans(e){this.valueCache=e.valueCache,this.serverSideRowModel=e.rowModel,this.selectionSvc=e.selectionSvc}postConstruct(){yt(this.gos)}applyTransactionAsync(e,t){this.asyncTransactionsTimeout==null&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})}scheduleExecuteAsync(){const e=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimeout=window.setTimeout(()=>{this.executeAsyncTransactions()},e)}executeAsyncTransactions(){if(!this.asyncTransactions)return;const e=[],t=[],o=[];let i=!1;this.asyncTransactions.forEach(s=>{let r;if(this.serverSideRowModel.executeOnStore(s.transaction.route,l=>{r=l.applyTransaction(s.transaction)})?r==null&&(r={status:Yt.StoreNotFound}):r={status:Yt.StoreNotStarted},t.push(r),r.status==Yt.StoreLoading){o.push(s);return}s.callback&&e.push(()=>s.callback(r)),r.status===Yt.Applied&&(i=!0)}),e.length>0&&window.setTimeout(()=>{e.forEach(s=>s())},0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=o,i&&(this.valueCache?.onDataChanged(),this.eventSvc.dispatchEvent({type:"storeUpdated"})),t.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:t})}flushAsyncTransactions(){this.asyncTransactionsTimeout!=null&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()}applyTransaction(e){let t;if(this.serverSideRowModel.executeOnStore(e.route,i=>{t=i.applyTransaction(e)}))if(t){if(this.valueCache?.onDataChanged(),t.remove&&this.selectionSvc){const i=t.remove.map(s=>s.id);this.selectionSvc.deleteSelectionStateFromParent(e.route||[],i)}return this.eventSvc.dispatchEvent({type:"storeUpdated"}),t}else return{status:Yt.StoreNotFound};else return{status:Yt.StoreNotStarted}}},GP={moduleName:"ServerSideRowModel",version:$e,rowModels:["serverSide"],beans:[vP,hP,BP,uP,mP,OP,pP,LP,gP,MP,EP,PP,DP,fP],dependsOn:[St,Il,Nx,lP,dP,$M,UM]},NP={moduleName:"ServerSideRowModelApi",version:$e,apiFunctions:{getServerSideSelectionState:CP,setServerSideSelectionState:bP,applyServerSideTransaction:wP,applyServerSideTransactionAsync:SP,applyServerSideRowData:yP,retryServerSideLoads:RP,flushServerSideAsyncTransactions:xP,refreshServerSide:FP,getServerSideGroupLevelState:kP},dependsOn:[St,Ap,Ux]},VP=["number","category","grouped-category","log","time"];VP.reduce((e,t)=>({...e,[t]:{title:{_enabledFromTheme:!0}}}),{});function sg(e){return e.map((t,o,i)=>t.map((s,r)=>i.slice(0,o+1).reduce((n,a)=>n+a[r],0)))}function rg(e){const t=e.map((o,i)=>e.reduce((s,r)=>Math.max(s,r[i]),0));return e.map(o=>o.map((i,s)=>i/t[s]*19))}var ng=[[1,3,5],[2,6,4],[5,3,1]],HP=sg(ng);rg(HP);var _P=ng,zP=sg(_P);rg(zP);function zs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var br={exports:{}};/* @license
|
|
62
|
+
Papa Parse
|
|
63
|
+
v5.5.3
|
|
64
|
+
https://github.com/mholt/PapaParse
|
|
65
|
+
License: MIT
|
|
66
|
+
*/var WP=br.exports,dc;function $P(){return dc||(dc=1,function(e,t){((o,i)=>{e.exports=i()})(WP,function o(){var i=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:{},s,r=!i.document&&!!i.postMessage,n=i.IS_PAPA_WORKER||!1,a={},l=0,d={};function u(v){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(C){var R=P(C);R.chunkSize=parseInt(R.chunkSize),C.step||C.chunk||(R.chunkSize=null),this._handle=new m(R),(this._handle.streamer=this)._config=R}.call(this,v),this.parseChunk=function(C,R){var F=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<F){let O=this._config.newline;O||(L=this._config.quoteChar||'"',O=this._handle.guessLineEndings(C,L)),C=[...C.split(O).slice(F)].join(O)}this.isFirstChunk&&D(this._config.beforeFirstChunk)&&(L=this._config.beforeFirstChunk(C))!==void 0&&(C=L),this.isFirstChunk=!1,this._halted=!1;var F=this._partialLine+C,L=(this._partialLine="",this._handle.parse(F,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(C=L.meta.cursor,F=(this._finished||(this._partialLine=F.substring(C-this._baseIndex),this._baseIndex=C),L&&L.data&&(this._rowCount+=L.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),n)i.postMessage({results:L,workerId:d.WORKER_ID,finished:F});else if(D(this._config.chunk)&&!R){if(this._config.chunk(L,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=L=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(L.data),this._completeResults.errors=this._completeResults.errors.concat(L.errors),this._completeResults.meta=L.meta),this._completed||!F||!D(this._config.complete)||L&&L.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),F||L&&L.meta.paused||this._nextChunk(),L}this._halted=!0},this._sendError=function(C){D(this._config.error)?this._config.error(C):n&&this._config.error&&i.postMessage({workerId:d.WORKER_ID,error:C,finished:!1})}}function h(v){var C;(v=v||{}).chunkSize||(v.chunkSize=d.RemoteChunkSize),u.call(this,v),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(R){this._input=R,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(C=new XMLHttpRequest,this._config.withCredentials&&(C.withCredentials=this._config.withCredentials),r||(C.onload=k(this._chunkLoaded,this),C.onerror=k(this._chunkError,this)),C.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var R,F=this._config.downloadRequestHeaders;for(R in F)C.setRequestHeader(R,F[R])}var L;this._config.chunkSize&&(L=this._start+this._config.chunkSize-1,C.setRequestHeader("Range","bytes="+this._start+"-"+L));try{C.send(this._config.downloadRequestBody)}catch(O){this._chunkError(O.message)}r&&C.status===0&&this._chunkError()}},this._chunkLoaded=function(){C.readyState===4&&(C.status<200||400<=C.status?this._chunkError():(this._start+=this._config.chunkSize||C.responseText.length,this._finished=!this._config.chunkSize||this._start>=(R=>(R=R.getResponseHeader("Content-Range"))!==null?parseInt(R.substring(R.lastIndexOf("/")+1)):-1)(C),this.parseChunk(C.responseText)))},this._chunkError=function(R){R=C.statusText||R,this._sendError(new Error(R))}}function p(v){(v=v||{}).chunkSize||(v.chunkSize=d.LocalChunkSize),u.call(this,v);var C,R,F=typeof FileReader<"u";this.stream=function(L){this._input=L,R=L.slice||L.webkitSlice||L.mozSlice,F?((C=new FileReader).onload=k(this._chunkLoaded,this),C.onerror=k(this._chunkError,this)):C=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var L=this._input,O=(this._config.chunkSize&&(O=Math.min(this._start+this._config.chunkSize,this._input.size),L=R.call(L,this._start,O)),C.readAsText(L,this._config.encoding));F||this._chunkLoaded({target:{result:O}})},this._chunkLoaded=function(L){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(L.target.result)},this._chunkError=function(){this._sendError(C.error)}}function g(v){var C;u.call(this,v=v||{}),this.stream=function(R){return C=R,this._nextChunk()},this._nextChunk=function(){var R,F;if(!this._finished)return R=this._config.chunkSize,C=R?(F=C.substring(0,R),C.substring(R)):(F=C,""),this._finished=!C,this.parseChunk(F)}}function f(v){u.call(this,v=v||{});var C=[],R=!0,F=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(L){this._input=L,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){F&&C.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),C.length?this.parseChunk(C.shift()):R=!0},this._streamData=k(function(L){try{C.push(typeof L=="string"?L:L.toString(this._config.encoding)),R&&(R=!1,this._checkIsFinished(),this.parseChunk(C.shift()))}catch(O){this._streamError(O)}},this),this._streamError=k(function(L){this._streamCleanUp(),this._sendError(L)},this),this._streamEnd=k(function(){this._streamCleanUp(),F=!0,this._streamData("")},this),this._streamCleanUp=k(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function m(v){var C,R,F,L,O=Math.pow(2,53),T=-O,_=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,V=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,G=this,B=0,I=0,W=!1,z=!1,U=[],$={data:[],errors:[],meta:{}};function oe(ee){return v.skipEmptyLines==="greedy"?ee.join("").trim()==="":ee.length===1&&ee[0].length===0}function fe(){if($&&F&&(Te("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+d.DefaultDelimiter+"'"),F=!1),v.skipEmptyLines&&($.data=$.data.filter(function(Q){return!oe(Q)})),ve()){let Q=function(Fe,De){D(v.transformHeader)&&(Fe=v.transformHeader(Fe,De)),U.push(Fe)};if($)if(Array.isArray($.data[0])){for(var ee=0;ve()&&ee<$.data.length;ee++)$.data[ee].forEach(Q);$.data.splice(0,1)}else $.data.forEach(Q)}function ce(Q,Fe){for(var De=v.header?{}:[],Re=0;Re<Q.length;Re++){var be=Re,me=Q[Re],me=((Ue,ue)=>(Pe=>(v.dynamicTypingFunction&&v.dynamicTyping[Pe]===void 0&&(v.dynamicTyping[Pe]=v.dynamicTypingFunction(Pe)),(v.dynamicTyping[Pe]||v.dynamicTyping)===!0))(Ue)?ue==="true"||ue==="TRUE"||ue!=="false"&&ue!=="FALSE"&&((Pe=>{if(_.test(Pe)&&(Pe=parseFloat(Pe),T<Pe&&Pe<O))return 1})(ue)?parseFloat(ue):V.test(ue)?new Date(ue):ue===""?null:ue):ue)(be=v.header?Re>=U.length?"__parsed_extra":U[Re]:be,me=v.transform?v.transform(me,be):me);be==="__parsed_extra"?(De[be]=De[be]||[],De[be].push(me)):De[be]=me}return v.header&&(Re>U.length?Te("FieldMismatch","TooManyFields","Too many fields: expected "+U.length+" fields but parsed "+Re,I+Fe):Re<U.length&&Te("FieldMismatch","TooFewFields","Too few fields: expected "+U.length+" fields but parsed "+Re,I+Fe)),De}var pe;$&&(v.header||v.dynamicTyping||v.transform)&&(pe=1,!$.data.length||Array.isArray($.data[0])?($.data=$.data.map(ce),pe=$.data.length):$.data=ce($.data,0),v.header&&$.meta&&($.meta.fields=U),I+=pe)}function ve(){return v.header&&U.length===0}function Te(ee,ce,pe,Q){ee={type:ee,code:ce,message:pe},Q!==void 0&&(ee.row=Q),$.errors.push(ee)}D(v.step)&&(L=v.step,v.step=function(ee){$=ee,ve()?fe():(fe(),$.data.length!==0&&(B+=ee.data.length,v.preview&&B>v.preview?R.abort():($.data=$.data[0],L($,G))))}),this.parse=function(ee,ce,pe){var Q=v.quoteChar||'"',Q=(v.newline||(v.newline=this.guessLineEndings(ee,Q)),F=!1,v.delimiter?D(v.delimiter)&&(v.delimiter=v.delimiter(ee),$.meta.delimiter=v.delimiter):((Q=((Fe,De,Re,be,me)=>{var Ue,ue,Pe,Y;me=me||[","," ","|",";",d.RECORD_SEP,d.UNIT_SEP];for(var X=0;X<me.length;X++){for(var te,Ze=me[X],Ie=0,lt=0,_e=0,Ne=(Pe=void 0,new w({comments:be,delimiter:Ze,newline:De,preview:10}).parse(Fe)),It=0;It<Ne.data.length;It++)Re&&oe(Ne.data[It])?_e++:(te=Ne.data[It].length,lt+=te,Pe===void 0?Pe=te:0<te&&(Ie+=Math.abs(te-Pe),Pe=te));0<Ne.data.length&&(lt/=Ne.data.length-_e),(ue===void 0||Ie<=ue)&&(Y===void 0||Y<lt)&&1.99<lt&&(ue=Ie,Ue=Ze,Y=lt)}return{successful:!!(v.delimiter=Ue),bestDelimiter:Ue}})(ee,v.newline,v.skipEmptyLines,v.comments,v.delimitersToGuess)).successful?v.delimiter=Q.bestDelimiter:(F=!0,v.delimiter=d.DefaultDelimiter),$.meta.delimiter=v.delimiter),P(v));return v.preview&&v.header&&Q.preview++,C=ee,R=new w(Q),$=R.parse(C,ce,pe),fe(),W?{meta:{paused:!0}}:$||{meta:{paused:!1}}},this.paused=function(){return W},this.pause=function(){W=!0,R.abort(),C=D(v.chunk)?"":C.substring(R.getCharIndex())},this.resume=function(){G.streamer._halted?(W=!1,G.streamer.parseChunk(C,!0)):setTimeout(G.resume,3)},this.aborted=function(){return z},this.abort=function(){z=!0,R.abort(),$.meta.aborted=!0,D(v.complete)&&v.complete($),C=""},this.guessLineEndings=function(Fe,Q){Fe=Fe.substring(0,1048576);var Q=new RegExp(b(Q)+"([^]*?)"+b(Q),"gm"),pe=(Fe=Fe.replace(Q,"")).split("\r"),Q=Fe.split(`
|
|
67
|
+
`),Fe=1<Q.length&&Q[0].length<pe[0].length;if(pe.length===1||Fe)return`
|
|
68
|
+
`;for(var De=0,Re=0;Re<pe.length;Re++)pe[Re][0]===`
|
|
69
|
+
`&&De++;return De>=pe.length/2?`\r
|
|
70
|
+
`:"\r"}}function b(v){return v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w(v){var C=(v=v||{}).delimiter,R=v.newline,F=v.comments,L=v.step,O=v.preview,T=v.fastMode,_=null,V=!1,G=v.quoteChar==null?'"':v.quoteChar,B=G;if(v.escapeChar!==void 0&&(B=v.escapeChar),(typeof C!="string"||-1<d.BAD_DELIMITERS.indexOf(C))&&(C=","),F===C)throw new Error("Comment character same as delimiter");F===!0?F="#":(typeof F!="string"||-1<d.BAD_DELIMITERS.indexOf(F))&&(F=!1),R!==`
|
|
71
|
+
`&&R!=="\r"&&R!==`\r
|
|
72
|
+
`&&(R=`
|
|
73
|
+
`);var I=0,W=!1;this.parse=function(z,U,$){if(typeof z!="string")throw new Error("Input must be a string");var oe=z.length,fe=C.length,ve=R.length,Te=F.length,ee=D(L),ce=[],pe=[],Q=[],Fe=I=0;if(!z)return Ie();if(T||T!==!1&&z.indexOf(G)===-1){for(var De=z.split(R),Re=0;Re<De.length;Re++){if(Q=De[Re],I+=Q.length,Re!==De.length-1)I+=R.length;else if($)return Ie();if(!F||Q.substring(0,Te)!==F){if(ee){if(ce=[],Y(Q.split(C)),lt(),W)return Ie()}else Y(Q.split(C));if(O&&O<=Re)return ce=ce.slice(0,O),Ie(!0)}}return Ie()}for(var be=z.indexOf(C,I),me=z.indexOf(R,I),Ue=new RegExp(b(B)+b(G),"g"),ue=z.indexOf(G,I);;)if(z[I]===G)for(ue=I,I++;;){if((ue=z.indexOf(G,ue+1))===-1)return $||pe.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:ce.length,index:I}),te();if(ue===oe-1)return te(z.substring(I,ue).replace(Ue,G));if(G===B&&z[ue+1]===B)ue++;else if(G===B||ue===0||z[ue-1]!==B){be!==-1&&be<ue+1&&(be=z.indexOf(C,ue+1));var Pe=X((me=me!==-1&&me<ue+1?z.indexOf(R,ue+1):me)===-1?be:Math.min(be,me));if(z.substr(ue+1+Pe,fe)===C){Q.push(z.substring(I,ue).replace(Ue,G)),z[I=ue+1+Pe+fe]!==G&&(ue=z.indexOf(G,I)),be=z.indexOf(C,I),me=z.indexOf(R,I);break}if(Pe=X(me),z.substring(ue+1+Pe,ue+1+Pe+ve)===R){if(Q.push(z.substring(I,ue).replace(Ue,G)),Ze(ue+1+Pe+ve),be=z.indexOf(C,I),ue=z.indexOf(G,I),ee&&(lt(),W))return Ie();if(O&&ce.length>=O)return Ie(!0);break}pe.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:ce.length,index:I}),ue++}}else if(F&&Q.length===0&&z.substring(I,I+Te)===F){if(me===-1)return Ie();I=me+ve,me=z.indexOf(R,I),be=z.indexOf(C,I)}else if(be!==-1&&(be<me||me===-1))Q.push(z.substring(I,be)),I=be+fe,be=z.indexOf(C,I);else{if(me===-1)break;if(Q.push(z.substring(I,me)),Ze(me+ve),ee&&(lt(),W))return Ie();if(O&&ce.length>=O)return Ie(!0)}return te();function Y(_e){ce.push(_e),Fe=I}function X(_e){var Ne=0;return Ne=_e!==-1&&(_e=z.substring(ue+1,_e))&&_e.trim()===""?_e.length:Ne}function te(_e){return $||(_e===void 0&&(_e=z.substring(I)),Q.push(_e),I=oe,Y(Q),ee&<()),Ie()}function Ze(_e){I=_e,Y(Q),Q=[],me=z.indexOf(R,I)}function Ie(_e){if(v.header&&!U&&ce.length&&!V){var Ne=ce[0],It=Object.create(null),Wi=new Set(Ne);let $i=!1;for(let yo=0;yo<Ne.length;yo++){let Rt=Ne[yo];if(It[Rt=D(v.transformHeader)?v.transformHeader(Rt,yo):Rt]){let Vo,E=It[Rt];for(;Vo=Rt+"_"+E,E++,Wi.has(Vo););Wi.add(Vo),Ne[yo]=Vo,It[Rt]++,$i=!0,(_=_===null?{}:_)[Vo]=Rt}else It[Rt]=1,Ne[yo]=Rt;Wi.add(Rt)}$i&&console.warn("Duplicate headers found and renamed."),V=!0}return{data:ce,errors:pe,meta:{delimiter:C,linebreak:R,aborted:W,truncated:!!_e,cursor:Fe+(U||0),renamedHeaders:_}}}function lt(){L(Ie()),ce=[],pe=[]}},this.abort=function(){W=!0},this.getCharIndex=function(){return I}}function S(v){var C=v.data,R=a[C.workerId],F=!1;if(C.error)R.userError(C.error,C.file);else if(C.results&&C.results.data){var L={abort:function(){F=!0,y(C.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:x,resume:x};if(D(R.userStep)){for(var O=0;O<C.results.data.length&&(R.userStep({data:C.results.data[O],errors:C.results.errors,meta:C.results.meta},L),!F);O++);delete C.results}else D(R.userChunk)&&(R.userChunk(C.results,L,C.file),delete C.results)}C.finished&&!F&&y(C.workerId,C.results)}function y(v,C){var R=a[v];D(R.userComplete)&&R.userComplete(C),R.terminate(),delete a[v]}function x(){throw new Error("Not implemented.")}function P(v){if(typeof v!="object"||v===null)return v;var C,R=Array.isArray(v)?[]:{};for(C in v)R[C]=P(v[C]);return R}function k(v,C){return function(){v.apply(C,arguments)}}function D(v){return typeof v=="function"}return d.parse=function(v,C){var R=(C=C||{}).dynamicTyping||!1;if(D(R)&&(C.dynamicTypingFunction=R,R={}),C.dynamicTyping=R,C.transform=!!D(C.transform)&&C.transform,!C.worker||!d.WORKERS_SUPPORTED)return R=null,d.NODE_STREAM_INPUT,typeof v=="string"?(v=(F=>F.charCodeAt(0)!==65279?F:F.slice(1))(v),R=new(C.download?h:g)(C)):v.readable===!0&&D(v.read)&&D(v.on)?R=new f(C):(i.File&&v instanceof File||v instanceof Object)&&(R=new p(C)),R.stream(v);(R=(()=>{var F;return!!d.WORKERS_SUPPORTED&&(F=(()=>{var L=i.URL||i.webkitURL||null,O=o.toString();return d.BLOB_URL||(d.BLOB_URL=L.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",O,")();"],{type:"text/javascript"})))})(),(F=new i.Worker(F)).onmessage=S,F.id=l++,a[F.id]=F)})()).userStep=C.step,R.userChunk=C.chunk,R.userComplete=C.complete,R.userError=C.error,C.step=D(C.step),C.chunk=D(C.chunk),C.complete=D(C.complete),C.error=D(C.error),delete C.worker,R.postMessage({input:v,config:C,workerId:R.id})},d.unparse=function(v,C){var R=!1,F=!0,L=",",O=`\r
|
|
74
|
+
`,T='"',_=T+T,V=!1,G=null,B=!1,I=((()=>{if(typeof C=="object"){if(typeof C.delimiter!="string"||d.BAD_DELIMITERS.filter(function(U){return C.delimiter.indexOf(U)!==-1}).length||(L=C.delimiter),typeof C.quotes!="boolean"&&typeof C.quotes!="function"&&!Array.isArray(C.quotes)||(R=C.quotes),typeof C.skipEmptyLines!="boolean"&&typeof C.skipEmptyLines!="string"||(V=C.skipEmptyLines),typeof C.newline=="string"&&(O=C.newline),typeof C.quoteChar=="string"&&(T=C.quoteChar),typeof C.header=="boolean"&&(F=C.header),Array.isArray(C.columns)){if(C.columns.length===0)throw new Error("Option columns is empty");G=C.columns}C.escapeChar!==void 0&&(_=C.escapeChar+T),C.escapeFormulae instanceof RegExp?B=C.escapeFormulae:typeof C.escapeFormulae=="boolean"&&C.escapeFormulae&&(B=/^[=+\-@\t\r].*$/)}})(),new RegExp(b(T),"g"));if(typeof v=="string"&&(v=JSON.parse(v)),Array.isArray(v)){if(!v.length||Array.isArray(v[0]))return W(null,v,V);if(typeof v[0]=="object")return W(G||Object.keys(v[0]),v,V)}else if(typeof v=="object")return typeof v.data=="string"&&(v.data=JSON.parse(v.data)),Array.isArray(v.data)&&(v.fields||(v.fields=v.meta&&v.meta.fields||G),v.fields||(v.fields=Array.isArray(v.data[0])?v.fields:typeof v.data[0]=="object"?Object.keys(v.data[0]):[]),Array.isArray(v.data[0])||typeof v.data[0]=="object"||(v.data=[v.data])),W(v.fields||[],v.data||[],V);throw new Error("Unable to serialize unrecognized input");function W(U,$,oe){var fe="",ve=(typeof U=="string"&&(U=JSON.parse(U)),typeof $=="string"&&($=JSON.parse($)),Array.isArray(U)&&0<U.length),Te=!Array.isArray($[0]);if(ve&&F){for(var ee=0;ee<U.length;ee++)0<ee&&(fe+=L),fe+=z(U[ee],ee);0<$.length&&(fe+=O)}for(var ce=0;ce<$.length;ce++){var pe=(ve?U:$[ce]).length,Q=!1,Fe=ve?Object.keys($[ce]).length===0:$[ce].length===0;if(oe&&!ve&&(Q=oe==="greedy"?$[ce].join("").trim()==="":$[ce].length===1&&$[ce][0].length===0),oe==="greedy"&&ve){for(var De=[],Re=0;Re<pe;Re++){var be=Te?U[Re]:Re;De.push($[ce][be])}Q=De.join("").trim()===""}if(!Q){for(var me=0;me<pe;me++){0<me&&!Fe&&(fe+=L);var Ue=ve&&Te?U[me]:me;fe+=z($[ce][Ue],me)}ce<$.length-1&&(!oe||0<pe&&!Fe)&&(fe+=O)}}return fe}function z(U,$){var oe,fe;return U==null?"":U.constructor===Date?JSON.stringify(U).slice(1,25):(fe=!1,B&&typeof U=="string"&&B.test(U)&&(U="'"+U,fe=!0),oe=U.toString().replace(I,_),(fe=fe||R===!0||typeof R=="function"&&R(U,$)||Array.isArray(R)&&R[$]||((ve,Te)=>{for(var ee=0;ee<Te.length;ee++)if(-1<ve.indexOf(Te[ee]))return!0;return!1})(oe,d.BAD_DELIMITERS)||-1<oe.indexOf(L)||oe.charAt(0)===" "||oe.charAt(oe.length-1)===" ")?T+oe+T:oe)}},d.RECORD_SEP="",d.UNIT_SEP="",d.BYTE_ORDER_MARK="\uFEFF",d.BAD_DELIMITERS=["\r",`
|
|
75
|
+
`,'"',d.BYTE_ORDER_MARK],d.WORKERS_SUPPORTED=!r&&!!i.Worker,d.NODE_STREAM_INPUT=1,d.LocalChunkSize=10485760,d.RemoteChunkSize=5242880,d.DefaultDelimiter=",",d.Parser=w,d.ParserHandle=m,d.NetworkStreamer=h,d.FileStreamer=p,d.StringStreamer=g,d.ReadableStreamStreamer=f,i.jQuery&&((s=i.jQuery).fn.parse=function(v){var C=v.config||{},R=[];return this.each(function(O){if(!(s(this).prop("tagName").toUpperCase()==="INPUT"&&s(this).attr("type").toLowerCase()==="file"&&i.FileReader)||!this.files||this.files.length===0)return!0;for(var T=0;T<this.files.length;T++)R.push({file:this.files[T],inputElem:this,instanceConfig:s.extend({},C)})}),F(),this;function F(){if(R.length===0)D(v.complete)&&v.complete();else{var O,T,_,V,G=R[0];if(D(v.before)){var B=v.before(G.file,G.inputElem);if(typeof B=="object"){if(B.action==="abort")return O="AbortError",T=G.file,_=G.inputElem,V=B.reason,void(D(v.error)&&v.error({name:O},T,_,V));if(B.action==="skip")return void L();typeof B.config=="object"&&(G.instanceConfig=s.extend(G.instanceConfig,B.config))}else if(B==="skip")return void L()}var I=G.instanceConfig.complete;G.instanceConfig.complete=function(W){D(I)&&I(W,G.file,G.inputElem),L()},d.parse(G.file,G.instanceConfig)}}function L(){R.splice(0,1),F()}}),n&&(i.onmessage=function(v){v=v.data,d.WORKER_ID===void 0&&v&&(d.WORKER_ID=v.workerId),typeof v.input=="string"?i.postMessage({workerId:d.WORKER_ID,results:d.parse(v.input,v.config),finished:!0}):(i.File&&v.input instanceof File||v.input instanceof Object)&&(v=d.parse(v.input,v.config))&&i.postMessage({workerId:d.WORKER_ID,results:v,finished:!0})}),(h.prototype=Object.create(u.prototype)).constructor=h,(p.prototype=Object.create(u.prototype)).constructor=p,(g.prototype=Object.create(g.prototype)).constructor=g,(f.prototype=Object.create(u.prototype)).constructor=f,d})}(br)),br.exports}var UP=$P();const jP=zs(UP);function wn(e){return c.getCurrentScope()?(c.onScopeDispose(e),!0):!1}const yn=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const KP=Object.prototype.toString,ag=e=>KP.call(e)==="[object Object]",ao=()=>{},Va=qP();function qP(){var e,t;return yn&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function lg(...e){if(e.length!==1)return c.toRef(...e);const t=e[0];return typeof t=="function"?c.readonly(c.customRef(()=>({get:t,set:ao}))):c.ref(t)}function YP(e,t){function o(...i){return new Promise((s,r)=>{Promise.resolve(e(()=>t.apply(this,i),{fn:t,thisArg:this,args:i})).then(s).catch(r)})}return o}const QP=e=>e();function XP(e,t={}){let o,i,s=ao;const r=l=>{clearTimeout(l),s(),s=ao};let n;return l=>{const d=c.toValue(e),u=c.toValue(t.maxWait);return o&&r(o),d<=0||u!==void 0&&u<=0?(i&&(r(i),i=void 0),Promise.resolve(l())):new Promise((h,p)=>{s=t.rejectOnCancel?p:h,n=l,u&&!i&&(i=setTimeout(()=>{o&&r(o),i=void 0,h(n())},u)),o=setTimeout(()=>{i&&r(i),i=void 0,h(l())},d)})}}function Pi(e){return Array.isArray(e)?e:[e]}function ZP(e){return c.getCurrentInstance()}function JP(e,t,o={}){const{eventFilter:i=QP,...s}=o;return c.watch(e,YP(i,t),s)}function eE(e,t=!0,o){ZP()?c.onMounted(e,o):t?e():c.nextTick(e)}function tE(e=!1,t={}){const{truthyValue:o=!0,falsyValue:i=!1}=t,s=c.isRef(e),r=c.shallowRef(e);function n(a){if(arguments.length)return r.value=a,r.value;{const l=c.toValue(o);return r.value=r.value===l?c.toValue(i):l,r.value}}return s?n:[r,n]}function Ls(e,t,o={}){const{debounce:i=0,maxWait:s=void 0,...r}=o;return JP(e,t,{...r,eventFilter:XP(i,{maxWait:s})})}function dg(e,t,o){return c.watch(e,t,{...o,immediate:!0})}const cg=yn?window:void 0,oE=yn?window.document:void 0;function ug(e){var t;const o=c.toValue(e);return(t=o?.$el)!=null?t:o}function iE(...e){const t=[],o=()=>{t.forEach(a=>a()),t.length=0},i=(a,l,d,u)=>(a.addEventListener(l,d,u),()=>a.removeEventListener(l,d,u)),s=c.computed(()=>{const a=Pi(c.toValue(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=dg(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(d=>ug(d)))!=null?l:[cg].filter(d=>d!=null),Pi(c.toValue(s.value?e[1]:e[0])),Pi(c.unref(s.value?e[2]:e[1])),c.toValue(s.value?e[3]:e[2])]},([a,l,d,u])=>{if(o(),!a?.length||!l?.length||!d?.length)return;const h=ag(u)?{...u}:u;t.push(...a.flatMap(p=>l.flatMap(g=>d.map(f=>i(p,g,f,h)))))},{flush:"post"}),n=()=>{r(),o()};return wn(o),n}function sE(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function hg(...e){let t,o,i={};e.length===3?(t=e[0],o=e[1],i=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,o=e[0],i=e[1]):(t=e[0],o=e[1]):(t=!0,o=e[0]);const{target:s=cg,eventName:r="keydown",passive:n=!1,dedupe:a=!1}=i,l=sE(t);return iE(s,r,u=>{u.repeat&&c.toValue(a)||l(u)&&o(u)},n)}/**!
|
|
76
|
+
* Sortable 1.15.6
|
|
77
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
78
|
+
* @author owenm <owen23355@gmail.com>
|
|
79
|
+
* @license MIT
|
|
80
|
+
*/function cc(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,i)}return o}function io(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?cc(Object(o),!0).forEach(function(i){rE(e,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):cc(Object(o)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i))})}return e}function wr(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wr=function(t){return typeof t}:wr=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wr(e)}function rE(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function bo(){return bo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},bo.apply(this,arguments)}function nE(e,t){if(e==null)return{};var o={},i=Object.keys(e),s,r;for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&(o[s]=e[s]);return o}function aE(e,t){if(e==null)return{};var o=nE(e,t),i,s;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}var lE="1.15.6";function go(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var wo=go(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ws=go(/Edge/i),uc=go(/firefox/i),hs=go(/safari/i)&&!go(/chrome/i)&&!go(/android/i),Vl=go(/iP(ad|od|hone)/i),pg=go(/chrome/i)&&go(/android/i),gg={capture:!1,passive:!1};function xe(e,t,o){e.addEventListener(t,o,!wo&&gg)}function ye(e,t,o){e.removeEventListener(t,o,!wo&&gg)}function Xr(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function fg(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Gt(e,t,o,i){if(e){o=o||document;do{if(t!=null&&(t[0]===">"?e.parentNode===o&&Xr(e,t):Xr(e,t))||i&&e===o)return e;if(e===o)break}while(e=fg(e))}return null}var hc=/\s+/g;function ft(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(hc," ").replace(" "+t+" "," ");e.className=(i+(o?" "+t:"")).replace(hc," ")}}function ae(e,t,o){var i=e&&e.style;if(i){if(o===void 0)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),t===void 0?o:o[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=o+(typeof o=="string"?"":"px")}}function Ei(e,t){var o="";if(typeof e=="string")o=e;else do{var i=ae(e,"transform");i&&i!=="none"&&(o=i+" "+o)}while(!t&&(e=e.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(o)}function mg(e,t,o){if(e){var i=e.getElementsByTagName(t),s=0,r=i.length;if(o)for(;s<r;s++)o(i[s],s);return i}return[]}function Jt(){var e=document.scrollingElement;return e||document.documentElement}function We(e,t,o,i,s){if(!(!e.getBoundingClientRect&&e!==window)){var r,n,a,l,d,u,h;if(e!==window&&e.parentNode&&e!==Jt()?(r=e.getBoundingClientRect(),n=r.top,a=r.left,l=r.bottom,d=r.right,u=r.height,h=r.width):(n=0,a=0,l=window.innerHeight,d=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(t||o)&&e!==window&&(s=s||e.parentNode,!wo))do if(s&&s.getBoundingClientRect&&(ae(s,"transform")!=="none"||o&&ae(s,"position")!=="static")){var p=s.getBoundingClientRect();n-=p.top+parseInt(ae(s,"border-top-width")),a-=p.left+parseInt(ae(s,"border-left-width")),l=n+r.height,d=a+r.width;break}while(s=s.parentNode);if(i&&e!==window){var g=Ei(s||e),f=g&&g.a,m=g&&g.d;g&&(n/=m,a/=f,h/=f,u/=m,l=n+u,d=a+h)}return{top:n,left:a,bottom:l,right:d,width:h,height:u}}}function pc(e,t,o){for(var i=To(e,!0),s=We(e)[t];i;){var r=We(i)[o],n=void 0;if(n=s>=r,!n)return i;if(i===Jt())break;i=To(i,!1)}return!1}function Ni(e,t,o,i){for(var s=0,r=0,n=e.children;r<n.length;){if(n[r].style.display!=="none"&&n[r]!==le.ghost&&(i||n[r]!==le.dragged)&&Gt(n[r],o.draggable,e,!1)){if(s===t)return n[r];s++}r++}return null}function Hl(e,t){for(var o=e.lastElementChild;o&&(o===le.ghost||ae(o,"display")==="none"||t&&!Xr(o,t));)o=o.previousElementSibling;return o||null}function Ft(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==le.clone&&(!t||Xr(e,t))&&o++;return o}function gc(e){var t=0,o=0,i=Jt();if(e)do{var s=Ei(e),r=s.a,n=s.d;t+=e.scrollLeft*r,o+=e.scrollTop*n}while(e!==i&&(e=e.parentNode));return[t,o]}function dE(e,t){for(var o in e)if(e.hasOwnProperty(o)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[o][i])return Number(o)}return-1}function To(e,t){if(!e||!e.getBoundingClientRect)return Jt();var o=e,i=!1;do if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var s=ae(o);if(o.clientWidth<o.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||o.clientHeight<o.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!o.getBoundingClientRect||o===document.body)return Jt();if(i||t)return o;i=!0}}while(o=o.parentNode);return Jt()}function cE(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e}function oa(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var ps;function vg(e,t){return function(){if(!ps){var o=arguments,i=this;o.length===1?e.call(i,o[0]):e.apply(i,o),ps=setTimeout(function(){ps=void 0},t)}}}function uE(){clearTimeout(ps),ps=void 0}function Cg(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function bg(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}function wg(e,t,o){var i={};return Array.from(e.children).forEach(function(s){var r,n,a,l;if(!(!Gt(s,t.draggable,e,!1)||s.animated||s===o)){var d=We(s);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,d.left),i.top=Math.min((n=i.top)!==null&&n!==void 0?n:1/0,d.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,d.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var ht="Sortable"+new Date().getTime();function hE(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(s){if(!(ae(s,"display")==="none"||s===le.ghost)){e.push({target:s,rect:We(s)});var r=io({},e[e.length-1].rect);if(s.thisAnimationDuration){var n=Ei(s,!0);n&&(r.top-=n.f,r.left-=n.e)}s.fromRect=r}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(dE(e,{target:i}),1)},animateAll:function(i){var s=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,n=0;e.forEach(function(a){var l=0,d=a.target,u=d.fromRect,h=We(d),p=d.prevFromRect,g=d.prevToRect,f=a.rect,m=Ei(d,!0);m&&(h.top-=m.f,h.left-=m.e),d.toRect=h,d.thisAnimationDuration&&oa(p,h)&&!oa(u,h)&&(f.top-h.top)/(f.left-h.left)===(u.top-h.top)/(u.left-h.left)&&(l=gE(f,p,g,s.options)),oa(h,u)||(d.prevFromRect=u,d.prevToRect=h,l||(l=s.options.animation),s.animate(d,f,h,l)),l&&(r=!0,n=Math.max(n,l),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},l),d.thisAnimationDuration=l)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},n):typeof i=="function"&&i(),e=[]},animate:function(i,s,r,n){if(n){ae(i,"transition",""),ae(i,"transform","");var a=Ei(this.el),l=a&&a.a,d=a&&a.d,u=(s.left-r.left)/(l||1),h=(s.top-r.top)/(d||1);i.animatingX=!!u,i.animatingY=!!h,ae(i,"transform","translate3d("+u+"px,"+h+"px,0)"),this.forRepaintDummy=pE(i),ae(i,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),ae(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){ae(i,"transition",""),ae(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},n)}}}}function pE(e){return e.offsetWidth}function gE(e,t,o,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*i.animation}var gi=[],ia={initializeByDefault:!0},$s={mount:function(t){for(var o in ia)ia.hasOwnProperty(o)&&!(o in t)&&(t[o]=ia[o]);gi.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),gi.push(t)},pluginEvent:function(t,o,i){var s=this;this.eventCanceled=!1,i.cancel=function(){s.eventCanceled=!0};var r=t+"Global";gi.forEach(function(n){o[n.pluginName]&&(o[n.pluginName][r]&&o[n.pluginName][r](io({sortable:o},i)),o.options[n.pluginName]&&o[n.pluginName][t]&&o[n.pluginName][t](io({sortable:o},i)))})},initializePlugins:function(t,o,i,s){gi.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var d=new a(t,o,t.options);d.sortable=t,d.options=t.options,t[l]=d,bo(i,d.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var n=this.modifyOption(t,r,t.options[r]);typeof n<"u"&&(t.options[r]=n)}},getEventProperties:function(t,o){var i={};return gi.forEach(function(s){typeof s.eventProperties=="function"&&bo(i,s.eventProperties.call(o[s.pluginName],t))}),i},modifyOption:function(t,o,i){var s;return gi.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[o]=="function"&&(s=r.optionListeners[o].call(t[r.pluginName],i))}),s}};function fE(e){var t=e.sortable,o=e.rootEl,i=e.name,s=e.targetEl,r=e.cloneEl,n=e.toEl,a=e.fromEl,l=e.oldIndex,d=e.newIndex,u=e.oldDraggableIndex,h=e.newDraggableIndex,p=e.originalEvent,g=e.putSortable,f=e.extraEventProperties;if(t=t||o&&o[ht],!!t){var m,b=t.options,w="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!wo&&!Ws?m=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(i,!0,!0)),m.to=n||o,m.from=a||o,m.item=s||o,m.clone=r,m.oldIndex=l,m.newIndex=d,m.oldDraggableIndex=u,m.newDraggableIndex=h,m.originalEvent=p,m.pullMode=g?g.lastPutMode:void 0;var S=io(io({},f),$s.getEventProperties(i,t));for(var y in S)m[y]=S[y];o&&o.dispatchEvent(m),b[w]&&b[w].call(t,m)}}var mE=["evt"],ct=function(t,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.evt,r=aE(i,mE);$s.pluginEvent.bind(le)(t,o,io({dragEl:K,parentEl:Ve,ghostEl:ge,rootEl:Le,nextEl:jo,lastDownEl:yr,cloneEl:Be,cloneHidden:Ao,dragStarted:Xi,putSortable:Ye,activeSortable:le.active,originalEvent:s,oldIndex:yi,oldDraggableIndex:gs,newIndex:mt,newDraggableIndex:Po,hideGhostForTarget:xg,unhideGhostForTarget:Fg,cloneNowHidden:function(){Ao=!0},cloneNowShown:function(){Ao=!1},dispatchSortableEvent:function(a){it({sortable:o,name:a,originalEvent:s})}},r))};function it(e){fE(io({putSortable:Ye,cloneEl:Be,targetEl:K,rootEl:Le,oldIndex:yi,oldDraggableIndex:gs,newIndex:mt,newDraggableIndex:Po},e))}var K,Ve,ge,Le,jo,yr,Be,Ao,yi,mt,gs,Po,nr,Ye,vi=!1,Zr=!1,Jr=[],Ho,Bt,sa,ra,fc,mc,Xi,fi,fs,ms=!1,ar=!1,Sr,Je,na=[],Ha=!1,en=[],Sn=typeof document<"u",lr=Vl,vc=Ws||wo?"cssFloat":"float",vE=Sn&&!pg&&!Vl&&"draggable"in document.createElement("div"),yg=function(){if(Sn){if(wo)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Sg=function(t,o){var i=ae(t),s=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=Ni(t,0,o),n=Ni(t,1,o),a=r&&ae(r),l=n&&ae(n),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+We(r).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+We(n).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var h=a.float==="left"?"left":"right";return n&&(l.clear==="both"||l.clear===h)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=s&&i[vc]==="none"||n&&i[vc]==="none"&&d+u>s)?"vertical":"horizontal"},CE=function(t,o,i){var s=i?t.left:t.top,r=i?t.right:t.bottom,n=i?t.width:t.height,a=i?o.left:o.top,l=i?o.right:o.bottom,d=i?o.width:o.height;return s===a||r===l||s+n/2===a+d/2},bE=function(t,o){var i;return Jr.some(function(s){var r=s[ht].options.emptyInsertThreshold;if(!(!r||Hl(s))){var n=We(s),a=t>=n.left-r&&t<=n.right+r,l=o>=n.top-r&&o<=n.bottom+r;if(a&&l)return i=s}}),i},Rg=function(t){function o(r,n){return function(a,l,d,u){var h=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(n||h))return!0;if(r==null||r===!1)return!1;if(n&&r==="clone")return r;if(typeof r=="function")return o(r(a,l,d,u),n)(a,l,d,u);var p=(n?a:l).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var i={},s=t.group;(!s||wr(s)!="object")&&(s={name:s}),i.name=s.name,i.checkPull=o(s.pull,!0),i.checkPut=o(s.put),i.revertClone=s.revertClone,t.group=i},xg=function(){!yg&&ge&&ae(ge,"display","none")},Fg=function(){!yg&&ge&&ae(ge,"display","")};Sn&&!pg&&document.addEventListener("click",function(e){if(Zr)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Zr=!1,!1},!0);var _o=function(t){if(K){t=t.touches?t.touches[0]:t;var o=bE(t.clientX,t.clientY);if(o){var i={};for(var s in t)t.hasOwnProperty(s)&&(i[s]=t[s]);i.target=i.rootEl=o,i.preventDefault=void 0,i.stopPropagation=void 0,o[ht]._onDragOver(i)}}},wE=function(t){K&&K.parentNode[ht]._isOutsideThisEl(t.target)};function le(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=bo({},t),e[ht]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Sg(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(n,a){n.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:le.supportPointer!==!1&&"PointerEvent"in window&&(!hs||Vl),emptyInsertThreshold:5};$s.initializePlugins(this,e,o);for(var i in o)!(i in t)&&(t[i]=o[i]);Rg(t);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=t.forceFallback?!1:vE,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?xe(e,"pointerdown",this._onTapStart):(xe(e,"mousedown",this._onTapStart),xe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(xe(e,"dragover",this),xe(e,"dragenter",this)),Jr.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),bo(this,hE())}le.prototype={constructor:le,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(fi=null)},_getDirection:function(t,o){return typeof this.options.direction=="function"?this.options.direction.call(this,t,o,K):this.options.direction},_onTapStart:function(t){if(t.cancelable){var o=this,i=this.el,s=this.options,r=s.preventOnFilter,n=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=s.filter;if(ME(i),!K&&!(/mousedown|pointerdown/.test(n)&&t.button!==0||s.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&hs&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Gt(l,s.draggable,i,!1),!(l&&l.animated)&&yr!==l)){if(yi=Ft(l),gs=Ft(l,s.draggable),typeof u=="function"){if(u.call(this,t,l,this)){it({sortable:o,rootEl:d,name:"filter",targetEl:l,toEl:i,fromEl:i}),ct("filter",o,{evt:t}),r&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(h){if(h=Gt(d,h.trim(),i,!1),h)return it({sortable:o,rootEl:h,name:"filter",targetEl:l,fromEl:i,toEl:i}),ct("filter",o,{evt:t}),!0}),u)){r&&t.preventDefault();return}s.handle&&!Gt(d,s.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,o,i){var s=this,r=s.el,n=s.options,a=r.ownerDocument,l;if(i&&!K&&i.parentNode===r){var d=We(i);if(Le=r,K=i,Ve=K.parentNode,jo=K.nextSibling,yr=i,nr=n.group,le.dragged=K,Ho={target:K,clientX:(o||t).clientX,clientY:(o||t).clientY},fc=Ho.clientX-d.left,mc=Ho.clientY-d.top,this._lastX=(o||t).clientX,this._lastY=(o||t).clientY,K.style["will-change"]="all",l=function(){if(ct("delayEnded",s,{evt:t}),le.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents(),!uc&&s.nativeDraggable&&(K.draggable=!0),s._triggerDragStart(t,o),it({sortable:s,name:"choose",originalEvent:t}),ft(K,n.chosenClass,!0)},n.ignore.split(",").forEach(function(u){mg(K,u.trim(),aa)}),xe(a,"dragover",_o),xe(a,"mousemove",_o),xe(a,"touchmove",_o),n.supportPointer?(xe(a,"pointerup",s._onDrop),!this.nativeDraggable&&xe(a,"pointercancel",s._onDrop)):(xe(a,"mouseup",s._onDrop),xe(a,"touchend",s._onDrop),xe(a,"touchcancel",s._onDrop)),uc&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),ct("delayStart",this,{evt:t}),n.delay&&(!n.delayOnTouchOnly||o)&&(!this.nativeDraggable||!(Ws||wo))){if(le.eventCanceled){this._onDrop();return}n.supportPointer?(xe(a,"pointerup",s._disableDelayedDrag),xe(a,"pointercancel",s._disableDelayedDrag)):(xe(a,"mouseup",s._disableDelayedDrag),xe(a,"touchend",s._disableDelayedDrag),xe(a,"touchcancel",s._disableDelayedDrag)),xe(a,"mousemove",s._delayedDragTouchMoveHandler),xe(a,"touchmove",s._delayedDragTouchMoveHandler),n.supportPointer&&xe(a,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(l,n.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var o=t.touches?t.touches[0]:t;Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&aa(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ye(t,"mouseup",this._disableDelayedDrag),ye(t,"touchend",this._disableDelayedDrag),ye(t,"touchcancel",this._disableDelayedDrag),ye(t,"pointerup",this._disableDelayedDrag),ye(t,"pointercancel",this._disableDelayedDrag),ye(t,"mousemove",this._delayedDragTouchMoveHandler),ye(t,"touchmove",this._delayedDragTouchMoveHandler),ye(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,o){o=o||t.pointerType=="touch"&&t,!this.nativeDraggable||o?this.options.supportPointer?xe(document,"pointermove",this._onTouchMove):o?xe(document,"touchmove",this._onTouchMove):xe(document,"mousemove",this._onTouchMove):(xe(K,"dragend",this),xe(Le,"dragstart",this._onDragStart));try{document.selection?Rr(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,o){if(vi=!1,Le&&K){ct("dragStarted",this,{evt:o}),this.nativeDraggable&&xe(document,"dragover",wE);var i=this.options;!t&&ft(K,i.dragClass,!1),ft(K,i.ghostClass,!0),le.active=this,t&&this._appendGhost(),it({sortable:this,name:"start",originalEvent:o})}else this._nulling()},_emulateDragOver:function(){if(Bt){this._lastX=Bt.clientX,this._lastY=Bt.clientY,xg();for(var t=document.elementFromPoint(Bt.clientX,Bt.clientY),o=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Bt.clientX,Bt.clientY),t!==o);)o=t;if(K.parentNode[ht]._isOutsideThisEl(t),o)do{if(o[ht]){var i=void 0;if(i=o[ht]._onDragOver({clientX:Bt.clientX,clientY:Bt.clientY,target:t,rootEl:o}),i&&!this.options.dragoverBubble)break}t=o}while(o=fg(o));Fg()}},_onTouchMove:function(t){if(Ho){var o=this.options,i=o.fallbackTolerance,s=o.fallbackOffset,r=t.touches?t.touches[0]:t,n=ge&&Ei(ge,!0),a=ge&&n&&n.a,l=ge&&n&&n.d,d=lr&&Je&&gc(Je),u=(r.clientX-Ho.clientX+s.x)/(a||1)+(d?d[0]-na[0]:0)/(a||1),h=(r.clientY-Ho.clientY+s.y)/(l||1)+(d?d[1]-na[1]:0)/(l||1);if(!le.active&&!vi){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(ge){n?(n.e+=u-(sa||0),n.f+=h-(ra||0)):n={a:1,b:0,c:0,d:1,e:u,f:h};var p="matrix(".concat(n.a,",").concat(n.b,",").concat(n.c,",").concat(n.d,",").concat(n.e,",").concat(n.f,")");ae(ge,"webkitTransform",p),ae(ge,"mozTransform",p),ae(ge,"msTransform",p),ae(ge,"transform",p),sa=u,ra=h,Bt=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!ge){var t=this.options.fallbackOnBody?document.body:Le,o=We(K,!0,lr,!0,t),i=this.options;if(lr){for(Je=t;ae(Je,"position")==="static"&&ae(Je,"transform")==="none"&&Je!==document;)Je=Je.parentNode;Je!==document.body&&Je!==document.documentElement?(Je===document&&(Je=Jt()),o.top+=Je.scrollTop,o.left+=Je.scrollLeft):Je=Jt(),na=gc(Je)}ge=K.cloneNode(!0),ft(ge,i.ghostClass,!1),ft(ge,i.fallbackClass,!0),ft(ge,i.dragClass,!0),ae(ge,"transition",""),ae(ge,"transform",""),ae(ge,"box-sizing","border-box"),ae(ge,"margin",0),ae(ge,"top",o.top),ae(ge,"left",o.left),ae(ge,"width",o.width),ae(ge,"height",o.height),ae(ge,"opacity","0.8"),ae(ge,"position",lr?"absolute":"fixed"),ae(ge,"zIndex","100000"),ae(ge,"pointerEvents","none"),le.ghost=ge,t.appendChild(ge),ae(ge,"transform-origin",fc/parseInt(ge.style.width)*100+"% "+mc/parseInt(ge.style.height)*100+"%")}},_onDragStart:function(t,o){var i=this,s=t.dataTransfer,r=i.options;if(ct("dragStart",this,{evt:t}),le.eventCanceled){this._onDrop();return}ct("setupClone",this),le.eventCanceled||(Be=bg(K),Be.removeAttribute("id"),Be.draggable=!1,Be.style["will-change"]="",this._hideClone(),ft(Be,this.options.chosenClass,!1),le.clone=Be),i.cloneId=Rr(function(){ct("clone",i),!le.eventCanceled&&(i.options.removeCloneOnHide||Le.insertBefore(Be,K),i._hideClone(),it({sortable:i,name:"clone"}))}),!o&&ft(K,r.dragClass,!0),o?(Zr=!0,i._loopId=setInterval(i._emulateDragOver,50)):(ye(document,"mouseup",i._onDrop),ye(document,"touchend",i._onDrop),ye(document,"touchcancel",i._onDrop),s&&(s.effectAllowed="move",r.setData&&r.setData.call(i,s,K)),xe(document,"drop",i),ae(K,"transform","translateZ(0)")),vi=!0,i._dragStartId=Rr(i._dragStarted.bind(i,o,t)),xe(document,"selectstart",i),Xi=!0,window.getSelection().removeAllRanges(),hs&&ae(document.body,"user-select","none")},_onDragOver:function(t){var o=this.el,i=t.target,s,r,n,a=this.options,l=a.group,d=le.active,u=nr===l,h=a.sort,p=Ye||d,g,f=this,m=!1;if(Ha)return;function b(B,I){ct(B,f,io({evt:t,isOwner:u,axis:g?"vertical":"horizontal",revert:n,dragRect:s,targetRect:r,canSort:h,fromSortable:p,target:i,completed:S,onMove:function(z,U){return dr(Le,o,K,s,z,We(z),t,U)},changed:y},I))}function w(){b("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function S(B){return b("dragOverCompleted",{insertion:B}),B&&(u?d._hideClone():d._showClone(f),f!==p&&(ft(K,Ye?Ye.options.ghostClass:d.options.ghostClass,!1),ft(K,a.ghostClass,!0)),Ye!==f&&f!==le.active?Ye=f:f===le.active&&Ye&&(Ye=null),p===f&&(f._ignoreWhileAnimating=i),f.animateAll(function(){b("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===K&&!K.animated||i===o&&!i.animated)&&(fi=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(K.parentNode[ht]._isOutsideThisEl(t.target),!B&&_o(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function y(){mt=Ft(K),Po=Ft(K,a.draggable),it({sortable:f,name:"change",toEl:o,newIndex:mt,newDraggableIndex:Po,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=Gt(i,a.draggable,o,!0),b("dragOver"),le.eventCanceled)return m;if(K.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||f._ignoreWhileAnimating===i)return S(!1);if(Zr=!1,d&&!a.disabled&&(u?h||(n=Ve!==Le):Ye===this||(this.lastPutMode=nr.checkPull(this,d,K,t))&&l.checkPut(this,d,K,t))){if(g=this._getDirection(t,i)==="vertical",s=We(K),b("dragOverValid"),le.eventCanceled)return m;if(n)return Ve=Le,w(),this._hideClone(),b("revert"),le.eventCanceled||(jo?Le.insertBefore(K,jo):Le.appendChild(K)),S(!0);var x=Hl(o,a.draggable);if(!x||xE(t,g,this)&&!x.animated){if(x===K)return S(!1);if(x&&o===t.target&&(i=x),i&&(r=We(i)),dr(Le,o,K,s,i,r,t,!!i)!==!1)return w(),x&&x.nextSibling?o.insertBefore(K,x.nextSibling):o.appendChild(K),Ve=o,y(),S(!0)}else if(x&&RE(t,g,this)){var P=Ni(o,0,a,!0);if(P===K)return S(!1);if(i=P,r=We(i),dr(Le,o,K,s,i,r,t,!1)!==!1)return w(),o.insertBefore(K,P),Ve=o,y(),S(!0)}else if(i.parentNode===o){r=We(i);var k=0,D,v=K.parentNode!==o,C=!CE(K.animated&&K.toRect||s,i.animated&&i.toRect||r,g),R=g?"top":"left",F=pc(i,"top","top")||pc(K,"top","top"),L=F?F.scrollTop:void 0;fi!==i&&(D=r[R],ms=!1,ar=!C&&a.invertSwap||v),k=FE(t,i,r,g,C?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,ar,fi===i);var O;if(k!==0){var T=Ft(K);do T-=k,O=Ve.children[T];while(O&&(ae(O,"display")==="none"||O===ge))}if(k===0||O===i)return S(!1);fi=i,fs=k;var _=i.nextElementSibling,V=!1;V=k===1;var G=dr(Le,o,K,s,i,r,t,V);if(G!==!1)return(G===1||G===-1)&&(V=G===1),Ha=!0,setTimeout(SE,30),w(),V&&!_?o.appendChild(K):i.parentNode.insertBefore(K,V?_:i),F&&Cg(F,0,L-F.scrollTop),Ve=K.parentNode,D!==void 0&&!ar&&(Sr=Math.abs(D-We(i)[R])),y(),S(!0)}if(o.contains(K))return S(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ye(document,"mousemove",this._onTouchMove),ye(document,"touchmove",this._onTouchMove),ye(document,"pointermove",this._onTouchMove),ye(document,"dragover",_o),ye(document,"mousemove",_o),ye(document,"touchmove",_o)},_offUpEvents:function(){var t=this.el.ownerDocument;ye(t,"mouseup",this._onDrop),ye(t,"touchend",this._onDrop),ye(t,"pointerup",this._onDrop),ye(t,"pointercancel",this._onDrop),ye(t,"touchcancel",this._onDrop),ye(document,"selectstart",this)},_onDrop:function(t){var o=this.el,i=this.options;if(mt=Ft(K),Po=Ft(K,i.draggable),ct("drop",this,{evt:t}),Ve=K&&K.parentNode,mt=Ft(K),Po=Ft(K,i.draggable),le.eventCanceled){this._nulling();return}vi=!1,ar=!1,ms=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_a(this.cloneId),_a(this._dragStartId),this.nativeDraggable&&(ye(document,"drop",this),ye(o,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),hs&&ae(document.body,"user-select",""),ae(K,"transform",""),t&&(Xi&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),ge&&ge.parentNode&&ge.parentNode.removeChild(ge),(Le===Ve||Ye&&Ye.lastPutMode!=="clone")&&Be&&Be.parentNode&&Be.parentNode.removeChild(Be),K&&(this.nativeDraggable&&ye(K,"dragend",this),aa(K),K.style["will-change"]="",Xi&&!vi&&ft(K,Ye?Ye.options.ghostClass:this.options.ghostClass,!1),ft(K,this.options.chosenClass,!1),it({sortable:this,name:"unchoose",toEl:Ve,newIndex:null,newDraggableIndex:null,originalEvent:t}),Le!==Ve?(mt>=0&&(it({rootEl:Ve,name:"add",toEl:Ve,fromEl:Le,originalEvent:t}),it({sortable:this,name:"remove",toEl:Ve,originalEvent:t}),it({rootEl:Ve,name:"sort",toEl:Ve,fromEl:Le,originalEvent:t}),it({sortable:this,name:"sort",toEl:Ve,originalEvent:t})),Ye&&Ye.save()):mt!==yi&&mt>=0&&(it({sortable:this,name:"update",toEl:Ve,originalEvent:t}),it({sortable:this,name:"sort",toEl:Ve,originalEvent:t})),le.active&&((mt==null||mt===-1)&&(mt=yi,Po=gs),it({sortable:this,name:"end",toEl:Ve,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ct("nulling",this),Le=K=Ve=ge=jo=Be=yr=Ao=Ho=Bt=Xi=mt=Po=yi=gs=fi=fs=Ye=nr=le.dragged=le.ghost=le.clone=le.active=null,en.forEach(function(t){t.checked=!0}),en.length=sa=ra=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":K&&(this._onDragOver(t),yE(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],o,i=this.el.children,s=0,r=i.length,n=this.options;s<r;s++)o=i[s],Gt(o,n.draggable,this.el,!1)&&t.push(o.getAttribute(n.dataIdAttr)||DE(o));return t},sort:function(t,o){var i={},s=this.el;this.toArray().forEach(function(r,n){var a=s.children[n];Gt(a,this.options.draggable,s,!1)&&(i[r]=a)},this),o&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(s.removeChild(i[r]),s.appendChild(i[r]))}),o&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,o){return Gt(t,o||this.options.draggable,this.el,!1)},option:function(t,o){var i=this.options;if(o===void 0)return i[t];var s=$s.modifyOption(this,t,o);typeof s<"u"?i[t]=s:i[t]=o,t==="group"&&Rg(i)},destroy:function(){ct("destroy",this);var t=this.el;t[ht]=null,ye(t,"mousedown",this._onTapStart),ye(t,"touchstart",this._onTapStart),ye(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(ye(t,"dragover",this),ye(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(o){o.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Jr.splice(Jr.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Ao){if(ct("hideClone",this),le.eventCanceled)return;ae(Be,"display","none"),this.options.removeCloneOnHide&&Be.parentNode&&Be.parentNode.removeChild(Be),Ao=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Ao){if(ct("showClone",this),le.eventCanceled)return;K.parentNode==Le&&!this.options.group.revertClone?Le.insertBefore(Be,K):jo?Le.insertBefore(Be,jo):Le.appendChild(Be),this.options.group.revertClone&&this.animate(K,Be),ae(Be,"display",""),Ao=!1}}};function yE(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function dr(e,t,o,i,s,r,n,a){var l,d=e[ht],u=d.options.onMove,h;return window.CustomEvent&&!wo&&!Ws?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=o,l.draggedRect=i,l.related=s||t,l.relatedRect=r||We(t),l.willInsertAfter=a,l.originalEvent=n,e.dispatchEvent(l),u&&(h=u.call(d,l,n)),h}function aa(e){e.draggable=!1}function SE(){Ha=!1}function RE(e,t,o){var i=We(Ni(o.el,0,o.options,!0)),s=wg(o.el,o.options,ge),r=10;return t?e.clientX<s.left-r||e.clientY<i.top&&e.clientX<i.right:e.clientY<s.top-r||e.clientY<i.bottom&&e.clientX<i.left}function xE(e,t,o){var i=We(Hl(o.el,o.options.draggable)),s=wg(o.el,o.options,ge),r=10;return t?e.clientX>s.right+r||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>s.bottom+r||e.clientX>i.right&&e.clientY>i.top}function FE(e,t,o,i,s,r,n,a){var l=i?e.clientY:e.clientX,d=i?o.height:o.width,u=i?o.top:o.left,h=i?o.bottom:o.right,p=!1;if(!n){if(a&&Sr<d*s){if(!ms&&(fs===1?l>u+d*r/2:l<h-d*r/2)&&(ms=!0),ms)p=!0;else if(fs===1?l<u+Sr:l>h-Sr)return-fs}else if(l>u+d*(1-s)/2&&l<h-d*(1-s)/2)return kE(t)}return p=p||n,p&&(l<u+d*r/2||l>h-d*r/2)?l>u+d/2?1:-1:0}function kE(e){return Ft(K)<Ft(e)?1:-1}function DE(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,i=0;o--;)i+=t.charCodeAt(o);return i.toString(36)}function ME(e){en.length=0;for(var t=e.getElementsByTagName("input"),o=t.length;o--;){var i=t[o];i.checked&&en.push(i)}}function Rr(e){return setTimeout(e,0)}function _a(e){return clearTimeout(e)}Sn&&xe(document,"touchmove",function(e){(le.active||vi)&&e.cancelable&&e.preventDefault()});le.utils={on:xe,off:ye,css:ae,find:mg,is:function(t,o){return!!Gt(t,o,t,!1)},extend:cE,throttle:vg,closest:Gt,toggleClass:ft,clone:bg,index:Ft,nextTick:Rr,cancelNextTick:_a,detectDirection:Sg,getChild:Ni,expando:ht};le.get=function(e){return e[ht]};le.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(le.utils=io(io({},le.utils),i.utils)),$s.mount(i)})};le.create=function(e,t){return new le(e,t)};le.version=lE;var ze=[],Zi,za,Wa=!1,la,da,tn,Ji;function PE(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(o){var i=o.originalEvent;this.sortable.nativeDraggable?xe(document,"dragover",this._handleAutoScroll):this.options.supportPointer?xe(document,"pointermove",this._handleFallbackAutoScroll):i.touches?xe(document,"touchmove",this._handleFallbackAutoScroll):xe(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(o){var i=o.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?ye(document,"dragover",this._handleAutoScroll):(ye(document,"pointermove",this._handleFallbackAutoScroll),ye(document,"touchmove",this._handleFallbackAutoScroll),ye(document,"mousemove",this._handleFallbackAutoScroll)),Cc(),xr(),uE()},nulling:function(){tn=za=Zi=Wa=Ji=la=da=null,ze.length=0},_handleFallbackAutoScroll:function(o){this._handleAutoScroll(o,!0)},_handleAutoScroll:function(o,i){var s=this,r=(o.touches?o.touches[0]:o).clientX,n=(o.touches?o.touches[0]:o).clientY,a=document.elementFromPoint(r,n);if(tn=o,i||this.options.forceAutoScrollFallback||Ws||wo||hs){ca(o,this.options,a,i);var l=To(a,!0);Wa&&(!Ji||r!==la||n!==da)&&(Ji&&Cc(),Ji=setInterval(function(){var d=To(document.elementFromPoint(r,n),!0);d!==l&&(l=d,xr()),ca(o,s.options,d,i)},10),la=r,da=n)}else{if(!this.options.bubbleScroll||To(a,!0)===Jt()){xr();return}ca(o,this.options,To(a,!1),!1)}}},bo(e,{pluginName:"scroll",initializeByDefault:!0})}function xr(){ze.forEach(function(e){clearInterval(e.pid)}),ze=[]}function Cc(){clearInterval(Ji)}var ca=vg(function(e,t,o,i){if(t.scroll){var s=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,n=t.scrollSensitivity,a=t.scrollSpeed,l=Jt(),d=!1,u;za!==o&&(za=o,xr(),Zi=t.scroll,u=t.scrollFn,Zi===!0&&(Zi=To(o,!0)));var h=0,p=Zi;do{var g=p,f=We(g),m=f.top,b=f.bottom,w=f.left,S=f.right,y=f.width,x=f.height,P=void 0,k=void 0,D=g.scrollWidth,v=g.scrollHeight,C=ae(g),R=g.scrollLeft,F=g.scrollTop;g===l?(P=y<D&&(C.overflowX==="auto"||C.overflowX==="scroll"||C.overflowX==="visible"),k=x<v&&(C.overflowY==="auto"||C.overflowY==="scroll"||C.overflowY==="visible")):(P=y<D&&(C.overflowX==="auto"||C.overflowX==="scroll"),k=x<v&&(C.overflowY==="auto"||C.overflowY==="scroll"));var L=P&&(Math.abs(S-s)<=n&&R+y<D)-(Math.abs(w-s)<=n&&!!R),O=k&&(Math.abs(b-r)<=n&&F+x<v)-(Math.abs(m-r)<=n&&!!F);if(!ze[h])for(var T=0;T<=h;T++)ze[T]||(ze[T]={});(ze[h].vx!=L||ze[h].vy!=O||ze[h].el!==g)&&(ze[h].el=g,ze[h].vx=L,ze[h].vy=O,clearInterval(ze[h].pid),(L!=0||O!=0)&&(d=!0,ze[h].pid=setInterval(function(){i&&this.layer===0&&le.active._onTouchMove(tn);var _=ze[this.layer].vy?ze[this.layer].vy*a:0,V=ze[this.layer].vx?ze[this.layer].vx*a:0;typeof u=="function"&&u.call(le.dragged.parentNode[ht],V,_,e,tn,ze[this.layer].el)!=="continue"||Cg(ze[this.layer].el,V,_)}.bind({layer:h}),24))),h++}while(t.bubbleScroll&&p!==l&&(p=To(p,!1)));Wa=d}},30),kg=function(t){var o=t.originalEvent,i=t.putSortable,s=t.dragEl,r=t.activeSortable,n=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(o){var d=i||r;a();var u=o.changedTouches&&o.changedTouches.length?o.changedTouches[0]:o,h=document.elementFromPoint(u.clientX,u.clientY);l(),d&&!d.el.contains(h)&&(n("spill"),this.onSpill({dragEl:s,putSortable:i}))}};function _l(){}_l.prototype={startIndex:null,dragStart:function(t){var o=t.oldDraggableIndex;this.startIndex=o},onSpill:function(t){var o=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var s=Ni(this.sortable.el,this.startIndex,this.options);s?this.sortable.el.insertBefore(o,s):this.sortable.el.appendChild(o),this.sortable.animateAll(),i&&i.animateAll()},drop:kg};bo(_l,{pluginName:"revertOnSpill"});function zl(){}zl.prototype={onSpill:function(t){var o=t.dragEl,i=t.putSortable,s=i||this.sortable;s.captureAnimationState(),o.parentNode&&o.parentNode.removeChild(o),s.animateAll()},drop:kg};bo(zl,{pluginName:"removeOnSpill"});le.mount(new PE);le.mount(zl,_l);function EE(e,t,o={}){let i;const{document:s=oE,...r}=o,n={onUpdate:u=>{IE(t,u.oldIndex,u.newIndex,u)}},a=()=>{const u=typeof e=="string"?s?.querySelector(e):ug(e);!u||i!==void 0||(i=new le(u,{...n,...r}))},l=()=>{i?.destroy(),i=void 0},d=(u,h)=>{if(h!==void 0)i?.option(u,h);else return i?.option(u)};return eE(a),wn(l),{stop:l,start:a,option:d}}function AE(e,t,o){const i=e.children[o];e.insertBefore(t,i)}function TE(e){e.parentNode&&e.parentNode.removeChild(e)}function IE(e,t,o,i=null){i!=null&&(TE(i.item),AE(i.from,i.item,t));const s=c.isRef(e),r=s?[...c.toValue(e)]:c.toValue(e);if(o>=0&&o<r.length){const n=r.splice(t,1)[0];c.nextTick(()=>{r.splice(o,0,n),s&&(e.value=r)})}}const LE=["data-align"],BE=c.defineComponent({__name:"PvPopover",props:{alignment:{default:void 0},cssCustomProperties:{default:()=>({})},cssCustomListProperties:{},isList:{type:Boolean,default:!1},isSortable:{type:Boolean}},emits:["list-order-updated"],setup(e,{expose:t,emit:o}){const i=c.ref(null),s=c.useTemplateRef("popoverList"),r=e,n=o;return r.isSortable&&r.isList&&EE(s,[],{animation:150,onUpdate:()=>{const a=Array.from(s.value?.children||[]).map(l=>l.id);n("list-order-updated",a)}}),t({popoverRoot:i}),(a,l)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"popoverRoot",ref:i,class:"pv-popover","data-testid":"pv-popover","data-align":a.alignment,style:c.normalizeStyle(a.cssCustomProperties)},[a.isList?(c.openBlock(),c.createElementBlock("ul",{key:0,ref:"popoverList",role:"list",class:"pv-popover-list",style:c.normalizeStyle(a.cssCustomListProperties)},[c.renderSlot(a.$slots,"default",{},void 0,!0)],4)):c.renderSlot(a.$slots,"default",{key:1},void 0,!0)],12,LE))}}),Ut=(e,t)=>{const o=e.__vccOpts||e;for(const[i,s]of t)o[i]=s;return o},Dg=Ut(BE,[["__scopeId","data-v-cda1af8c"]]),Mg=yn?window:void 0;function es(e){var t;const o=c.toValue(e);return(t=o?.$el)!=null?t:o}function Fr(...e){const t=[],o=()=>{t.forEach(a=>a()),t.length=0},i=(a,l,d,u)=>(a.addEventListener(l,d,u),()=>a.removeEventListener(l,d,u)),s=c.computed(()=>{const a=Pi(c.toValue(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=dg(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(d=>es(d)))!=null?l:[Mg].filter(d=>d!=null),Pi(c.toValue(s.value?e[1]:e[0])),Pi(c.unref(s.value?e[2]:e[1])),c.toValue(s.value?e[3]:e[2])]},([a,l,d,u])=>{if(o(),!a?.length||!l?.length||!d?.length)return;const h=ag(u)?{...u}:u;t.push(...a.flatMap(p=>l.flatMap(g=>d.map(f=>i(p,g,f,h)))))},{flush:"post"}),n=()=>{r(),o()};return wn(o),n}let bc=!1;function wc(e,t,o={}){const{window:i=Mg,ignore:s=[],capture:r=!0,detectIframe:n=!1,controls:a=!1}=o;if(!i)return a?{stop:ao,cancel:ao,trigger:ao}:ao;if(Va&&!bc){bc=!0;const b={passive:!0};Array.from(i.document.body.children).forEach(w=>w.addEventListener("click",ao,b)),i.document.documentElement.addEventListener("click",ao,b)}let l=!0;const d=b=>c.toValue(s).some(w=>{if(typeof w=="string")return Array.from(i.document.querySelectorAll(w)).some(S=>S===b.target||b.composedPath().includes(S));{const S=es(w);return S&&(b.target===S||b.composedPath().includes(S))}});function u(b){const w=c.toValue(b);return w&&w.$.subTree.shapeFlag===16}function h(b,w){const S=c.toValue(b),y=S.$.subTree&&S.$.subTree.children;return y==null||!Array.isArray(y)?!1:y.some(x=>x.el===w.target||w.composedPath().includes(x.el))}const p=b=>{const w=es(e);if(b.target!=null&&!(!(w instanceof Element)&&u(e)&&h(e,b))&&!(!w||w===b.target||b.composedPath().includes(w))){if("detail"in b&&b.detail===0&&(l=!d(b)),!l){l=!0;return}t(b)}};let g=!1;const f=[Fr(i,"click",b=>{g||(g=!0,setTimeout(()=>{g=!1},0),p(b))},{passive:!0,capture:r}),Fr(i,"pointerdown",b=>{const w=es(e);l=!d(b)&&!!(w&&!b.composedPath().includes(w))},{passive:!0}),n&&Fr(i,"blur",b=>{setTimeout(()=>{var w;const S=es(e);((w=i.document.activeElement)==null?void 0:w.tagName)==="IFRAME"&&!S?.contains(i.document.activeElement)&&t(b)},0)},{passive:!0})].filter(Boolean),m=()=>f.forEach(b=>b());return a?{stop:m,cancel:()=>{l=!1},trigger:b=>{l=!0,p(b),l=!1}}:m}const ua=new WeakMap,Wl={mounted(e,t){const o=!t.modifiers.bubble;let i;if(typeof t.value=="function")i=wc(e,t.value,{capture:o});else{const[s,r]=t.value;i=wc(e,s,Object.assign({capture:o},r))}ua.set(e,i)},unmounted(e){const t=ua.get(e);t&&typeof t=="function"?t():t?.stop(),ua.delete(e)}};function ha(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Pg(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const o=e.parentNode;return!o||o.tagName==="BODY"?!1:Pg(o)}}function OE(e){const t=e||window.event,o=t.target;return Pg(o)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const pa=new WeakMap;function GE(e,t=!1){const o=c.shallowRef(t);let i=null,s="";c.watch(lg(e),a=>{const l=ha(c.toValue(a));if(l){const d=l;if(pa.get(d)||pa.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(s=d.style.overflow),d.style.overflow==="hidden")return o.value=!0;if(o.value)return d.style.overflow="hidden"}},{immediate:!0});const r=()=>{const a=ha(c.toValue(e));!a||o.value||(Va&&(i=Fr(a,"touchmove",l=>{OE(l)},{passive:!1})),a.style.overflow="hidden",o.value=!0)},n=()=>{const a=ha(c.toValue(e));!a||!o.value||(Va&&i?.(),a.style.overflow=s,pa.delete(a),o.value=!1)};return wn(n),c.computed({get(){return o.value},set(a){a?r():n()}})}function NE(){let e=!1;const t=c.shallowRef(!1);return(o,i)=>{if(t.value=i.value,e)return;e=!0;const s=GE(o,i.value);c.watch(t,r=>s.value=r)}}NE();const VE={class:"pv-relative",style:{width:"fit-content"}},HE=["disabled"],_E={key:0,class:"pv-shimmer"},zE=c.defineComponent({__name:"PvDropdown",props:{defaultOpen:{type:Boolean,default:!1},popoverCssProperties:{},alignment:{default:void 0},isList:{type:Boolean,default:!1},isSortable:{type:Boolean},icon:{type:Boolean},disabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},useTeleport:{type:Boolean,default:!1},teleportLocation:{default:"body"}},emits:["dropdown-open","dropdown-closed","list-order-updated"],setup(e,{expose:t,emit:o}){const i=e,s=o,r=c.ref(i.defaultOpen),n=c.ref(null),a=c.ref(null),l=c.ref(null),d=c.ref(null),u=()=>{n.value&&(l.value=n.value.getBoundingClientRect()),a.value?.popoverRoot&&(d.value=a.value.popoverRoot.getBoundingClientRect())},h=c.computed(()=>({"pv-hide":!r.value})),p=w=>{r.value=!r.value},g=()=>{r.value=!1};t({closeDropdown:g}),c.watch(r,w=>{w?c.nextTick(()=>{u(),s("dropdown-open")}):s("dropdown-closed")});const f=c.computed(()=>!l.value||!d.value?0:i.alignment==="right"||i.alignment==="top right"?l.value.left+l.value.width-d.value.width:l.value.left),m=c.computed(()=>!l.value||!d.value?0:i.alignment==="top"||i.alignment==="top right"?l.value.top-d.value.height:l.value.top+window.scrollY+l.value.height),b=c.computed(()=>i.useTeleport?{...{position:"absolute",left:`${f.value}px`,top:`${m.value}px`,zIndex:10},...i.popoverCssProperties}:i.popoverCssProperties);return(w,S)=>c.withDirectives((c.openBlock(),c.createElementBlock("div",VE,[c.createElementVNode("button",{ref_key:"triggerRef",ref:n,class:c.normalizeClass({"pv-select":!w.icon,"pv-icon-button":w.icon}),style:{width:"auto"},onClick:p,disabled:w.disabled},[c.renderSlot(w.$slots,"trigger",{},()=>[S[1]||(S[1]=c.createTextVNode("Open"))],!0)],10,HE),(c.openBlock(),c.createBlock(c.Teleport,{to:w.teleportLocation,disabled:!w.useTeleport},[c.createVNode(Dg,{ref_key:"popoverRef",ref:a,class:c.normalizeClass(h.value),"css-custom-properties":b.value,alignment:w.alignment,isList:w.isList,isSortable:w.isSortable,onListOrderUpdated:S[0]||(S[0]=y=>w.$emit("list-order-updated",y))},{default:c.withCtx(()=>[c.renderSlot(w.$slots,"default",{},()=>[w.isLoading?(c.openBlock(),c.createElementBlock("span",_E,"Loading...")):c.createCommentVNode("",!0)],!0)]),_:3},8,["class","css-custom-properties","alignment","isList","isSortable"])],8,["to","disabled"]))])),[[c.unref(Wl),g]])}}),WE=Ut(zE,[["__scopeId","data-v-79a7def3"]]),$E={xs:"12px",sm:"16px",md:"20px",lg:"24px",xl:"32px","2x":"40px"},UE=[void 0,10,12,20,24,32,64],jE=["xlink:href"],qe=c.defineComponent({__name:"PvIcon",props:{name:{},size:{}},setup(e){const t=e,o=c.ref(null),i=c.computed(()=>({"pv-icon":!0,[`pv-icon-${t.size}`]:UE.includes(t.size)})),s=c.computed(()=>o.value?`${o.value}#${t.name}`:`#${t.name}`);return c.onBeforeMount(()=>{globalThis.__PV_GLOBAL_SPRITE_PATH__&&(o.value=globalThis.__PV_GLOBAL_SPRITE_PATH__)}),(r,n)=>(c.openBlock(),c.createElementBlock("svg",{"data-testid":"pv-icon","aria-hidden":"true",class:c.normalizeClass(i.value)},[c.createElementVNode("use",{"xlink:href":s.value},null,8,jE)],2))}}),$l=c.defineComponent({__name:"PvSpinner",props:{variant:{default:"primary"},size:{default:"lg"}},setup(e){const t={xs:"0.75rem",sm:"1rem",md:"1.25rem",lg:"1.5rem",xl:"2rem"},o={primary:"pv-spinner",dark:"pv-spinner-dark",white:"pv-spinner-light"};return(i,s)=>(c.openBlock(),c.createElementBlock("div",{"data-testid":"pv-spinner",class:c.normalizeClass(o[i.variant]),style:c.normalizeStyle({"--size":t[i.size]})},null,6))}}),KE=["disabled"],qE={key:1,"data-testid":"pv-button-label"},Qe=c.defineComponent({__name:"PvButton",props:{variant:{default:"primary"},disabled:{type:Boolean,default:!1},size:{default:"lg"},loading:{type:Boolean,default:!1},label:{},leftIcon:{},rightIcon:{},inverse:{type:Boolean,default:!1}},setup(e){const t={xl:"large",lg:void 0,md:"small"},o=["ghost"],i=e,s=c.computed(()=>i.inverse&&o.includes(i.variant)?{[`pv-button-${i.variant}-inverse`]:!0,[`pv-button-${t[i.size]}`]:!!i.size}:{[`pv-button-${i.variant}`]:!0,[`pv-button-${t[i.size]}`]:!!i.size});return(r,n)=>(c.openBlock(),c.createElementBlock("button",{type:"button",class:c.normalizeClass(s.value),disabled:r.disabled,"data-testid":"pv-button"},[r.loading?(c.openBlock(),c.createBlock($l,{key:0,size:"sm"})):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[r.leftIcon?(c.openBlock(),c.createBlock(qe,{key:0,name:r.leftIcon,"data-testid":"pv-button-left-icon"},null,8,["name"])):c.createCommentVNode("",!0),r.label?(c.openBlock(),c.createElementBlock("span",qE,c.toDisplayString(r.label),1)):c.createCommentVNode("",!0),r.rightIcon?(c.openBlock(),c.createBlock(qe,{key:2,name:r.rightIcon,"data-testid":"pv-button-right-icon"},null,8,["name"])):c.createCommentVNode("",!0)],64))],10,KE))}}),YE=c.defineComponent({__name:"PvCounterBadge",props:{value:{},prefix:{default:""},variant:{default:"primary"},size:{default:"sm"},maxValue:{default:99}},setup(e){const t=e,o=c.computed(()=>t.size=="md"?"md":(t.size=="sm","sm")),i=c.computed(()=>t.maxValue&&t.value&&t.value>t.maxValue?`${t.maxValue}+`:t.value!=null?`${t.prefix}${t.value}`:"-"),s=c.computed(()=>({"pv-inline-block pv-inset-square pv-radius pv-text-center":!0,"pv-badge-md pv-text-body-md":o.value=="md","pv-badge-sm pv-text-body-sm":o.value=="sm","pv-surface-brand-inverse pv-text-inverse":t.variant=="primary","pv-surface pv-bordered":t.variant=="secondary","pv-surface-lighten-5":t.variant=="tertiary","pv-text-secondary":t.variant=="ghost"||t.variant=="tertiary","pv-surface":t.variant=="ghost"}));return(r,n)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(s.value),"data-testid":"pv-counter-badge"},c.toDisplayString(i.value),3))}}),on=Ut(YE,[["__scopeId","data-v-fc3c1104"]]),QE=["data-style"],XE={class:"pv-truncate"},$a=c.defineComponent({__name:"PvTag",props:{size:{default:"md"},variant:{default:"tertiary"},icon:{},label:{},showClear:{type:Boolean},rounded:{type:Boolean}},emits:["handle-close","handle-click"],setup(e){const t=e,o=c.computed(()=>{switch(t.size){case"lg":return"pv-tag-lg";case"sm":return"pv-tag-sm";default:return""}}),i=c.computed(()=>{switch(t.variant){case"primary":return"pv-tag-primary";case"tertiary":return"pv-tag-tertiary";default:return""}});return(s,r)=>(c.openBlock(),c.createElementBlock("button",{class:c.normalizeClass([i.value,o.value]),onClick:r[1]||(r[1]=n=>s.$emit("handle-click",s.label)),style:{"max-width":"100%"},"data-testid":"pv-tag","data-style":s.rounded?"rounded":void 0},[s.icon?(c.openBlock(),c.createBlock(qe,{key:0,"data-testid":"pv-tag-icon",name:s.icon,size:12},null,8,["name"])):c.createCommentVNode("",!0),c.createElementVNode("span",XE,c.toDisplayString(s.label),1),s.showClear?(c.openBlock(),c.createBlock(qe,{key:1,"data-testid":"pv-tag-close-icon",size:12,name:"close",onClick:r[0]||(r[0]=c.withModifiers(n=>s.$emit("handle-close",s.label),["stop"]))})):c.createCommentVNode("",!0)],10,QE))}});function ZE(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}const JE=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function eA(e){return Array.from(e.match(JE)??[])}function tA(e){const t=eA(e);if(t.length===0)return"";const[o,...i]=t;return`${o.toLowerCase()}${i.map(s=>ZE(s)).join("")}`}const oA={class:"pv-flex","data-testid":"pv-company-logo"},iA=["src"],Eg=c.defineComponent({__name:"PvCompanyLogo",props:{basePath:{default:"https://static-assets.turquoise.health/shared-logos/prd/payers"},name:{},size:{default:"md"},srcPathOverride:{},toCamelCase:{type:Boolean,default:!0}},setup(e){const t=e,o=c.ref(!0),i=c.computed(()=>$E[t.size]||"32px"),s=c.computed(()=>({"pv-icon":o.value,[`pv-company-${t.size}`]:t.size&&!o.value})),r=c.computed(()=>({width:i.value})),n=c.computed(()=>t.toCamelCase?tA(t.name)+".svg":t.name+".svg"),a=c.computed(()=>t.srcPathOverride?t.srcPathOverride:`${t.basePath}/${n.value}`);return c.watch(a,()=>{o.value=!0}),(l,d)=>(c.openBlock(),c.createElementBlock("div",oA,[o.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.value),style:c.normalizeStyle(r.value)},[c.createElementVNode("img",{src:a.value,alt:"",onError:d[0]||(d[0]=u=>o.value=!1)},null,40,iA)],6)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.value)},null,2))]))}}),sA=["closedby"],rA={class:"pv-inset-squish-12"},nA={class:"pv-flex pv-flex-vertical pv-stack-16",style:{"--flex-align":"flex-start"}},aA={class:"pv-heading-3"},lA={key:0,class:"pv-text-body-md"},dA={class:"pv-inset-squish-12 pv-border-top",style:{"--color-border":"#d2d8dc"}},cA=c.defineComponent({__name:"PvModal",props:c.mergeModels({header:{},subheader:{},closeOnClickOutside:{type:Boolean,default:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,o=c.useTemplateRef("dialog"),i=c.useModel(e,"modelValue");c.watch(()=>i.value,()=>{i.value?o.value?.showModal():o.value?.close()});const s=()=>{t.closeOnClickOutside&&(i.value=!1)};return(r,n)=>(c.openBlock(),c.createElementBlock("dialog",{class:"pv-modal-sm",ref_key:"dialog",ref:o,closedby:r.closeOnClickOutside?"any":void 0,style:{"--max-width":"480px"},onClose:s},[c.createElementVNode("div",rA,[c.createElementVNode("div",nA,[c.createElementVNode("span",aA,c.toDisplayString(r.header),1),r.subheader?(c.openBlock(),c.createElementBlock("span",lA,c.toDisplayString(r.subheader),1)):c.createCommentVNode("",!0)]),c.renderSlot(r.$slots,"body")]),c.createElementVNode("div",dA,[c.renderSlot(r.$slots,"footer")])],40,sA))}});var kr=(e=>(e.Vertical="Vertical",e.Horizontal="Horizontal",e))(kr||{}),ts=(e=>(e.Primary="Primary",e.Secondary="Secondary",e.Tertiary="Tertiary",e))(ts||{});const uA={class:"pv-text-body-md pv-line-clamp",style:{"font-weight":"500","--lines":"2"}},hA={key:0,class:"pv-flex"};ts.Primary,kr.Horizontal;const pA=["data-style","disabled","title"],gA={class:"pv-truncate"},fA=c.defineComponent({__name:"PvSuggestionTag",props:{size:{default:"md"},label:{},showIcon:{type:Boolean},rounded:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["handle-click"],setup(e){const t=e,o=c.computed(()=>{switch(t.size){case"lg":return"pv-tag-lg";case"sm":return"pv-tag-sm";default:return""}});return(i,s)=>(c.openBlock(),c.createElementBlock("button",{class:c.normalizeClass(["pv-border-dashed pv-tag-secondary",o.value]),onClick:s[0]||(s[0]=r=>i.$emit("handle-click",i.label)),"data-testid":"pv-suggestion-tag",style:{"max-width":"100%"},"data-style":i.rounded?"rounded":void 0,disabled:i.disabled,title:i.label},[i.showIcon?(c.openBlock(),c.createBlock(qe,{key:0,"data-testid":"pv-suggestion-tag-icon",name:"expand",size:12})):c.createCommentVNode("",!0),c.createElementVNode("span",gA,c.toDisplayString(i.label),1)],10,pA))}}),mA={class:"pv-relative"},vA=["disabled","placeholder"],CA={key:0,"data-testid":"pv-search-input-shortcut",class:"pv-kbd"},yc="/",Ul=c.defineComponent({__name:"PvSearchInput",props:c.mergeModels({placeholder:{default:"Search"},disabled:{type:Boolean,default:!1},displayShortcut:{type:Boolean}},{modelValue:{required:!1,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const o=e,i=c.useTemplateRef("search-input"),s=c.useModel(e,"modelValue"),r=c.computed(()=>({"pv-input-search":!0,"pv-full-width":!0,"pv-input-padded-end":!0}));return c.onMounted(()=>{o.displayShortcut&&hg(yc,n=>{const a=n.target,l=a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||(a?.isContentEditable??!1),d=document.activeElement===i.value;(!l||d)&&(d||(n.preventDefault(),i.value?.focus()))})}),t({input:i}),(n,a)=>(c.openBlock(),c.createElementBlock("div",mA,[c.withDirectives(c.createElementVNode("input",{ref:"search-input","onUpdate:modelValue":a[0]||(a[0]=l=>s.value=l),"data-testid":"pv-search-input",type:"text",disabled:n.disabled,class:c.normalizeClass(r.value),placeholder:n.placeholder},null,10,vA),[[c.vModelText,s.value]]),n.displayShortcut?(c.openBlock(),c.createElementBlock("kbd",CA,c.toDisplayString(yc))):c.createCommentVNode("",!0)]))}});function bA(e){if(e){let t=e.parentNode;return t&&t instanceof ShadowRoot&&t.host&&(t=t.host),t}return null}function wA(e){return!!(e!==null&&typeof e<"u"&&e.nodeName&&bA(e))}function Ag(e){return typeof Element<"u"?e instanceof Element:e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.nodeName=="string"}function Ua(e,t={}){if(Ag(e)){const o=(i,s)=>{var r,n;const a=(r=e?.$attrs)!=null&&r[i]?[(n=e?.$attrs)==null?void 0:n[i]]:[];return[s].flat().reduce((l,d)=>{if(d!=null){const u=typeof d;if(u==="string"||u==="number")l.push(d);else if(u==="object"){const h=Array.isArray(d)?o(i,d):Object.entries(d).map(([p,g])=>i==="style"&&(g||g===0)?`${p.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${g}`:g?p:void 0);l=h.length?l.concat(h.filter(p=>!!p)):l}}return l},a)};Object.entries(t).forEach(([i,s])=>{if(s!=null){const r=i.match(/^on(.+)/);r?e.addEventListener(r[1].toLowerCase(),s):i==="p-bind"||i==="pBind"?Ua(e,s):(s=i==="class"?[...new Set(o("class",s))].join(" ").trim():i==="style"?o("style",s).join(";").trim():s,(e.$attrs=e.$attrs||{})&&(e.$attrs[i]=s),e.setAttribute(i,s))}})}}function yA(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function SA(e,t="",o){Ag(e)&&o!==null&&o!==void 0&&e.setAttribute(t,o)}function RA(){const e=new Map;return{on(t,o){let i=e.get(t);return i?i.push(o):i=[o],e.set(t,i),this},off(t,o){const i=e.get(t);return i&&i.splice(i.indexOf(o)>>>0,1),this},emit(t,o){const i=e.get(t);i&&i.forEach(s=>{s(o)})},clear(){e.clear()}}}function Tg(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0}function xA(e){return typeof e=="function"&&"call"in e&&"apply"in e}function He(e){return!Tg(e)}function sn(e,t=!0){return e instanceof Object&&e.constructor===Object&&(t||Object.keys(e).length!==0)}function Io(e,...t){return xA(e)?e(...t):e}function Bs(e,t=!0){return typeof e=="string"&&(t||e!=="")}function FA(e){return He(e)&&!isNaN(e)}function Ai(e,t){if(t){const o=t.test(e);return t.lastIndex=0,o}return!1}function vs(e){return e&&e.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":").trim()}function Ig(e){return Bs(e)?e.replace(/(_)/g,"-").replace(/[A-Z]/g,(t,o)=>o===0?t:"-"+t.toLowerCase()).toLowerCase():e}var kA=Object.defineProperty,DA=Object.defineProperties,MA=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertySymbols,Lg=Object.prototype.hasOwnProperty,Bg=Object.prototype.propertyIsEnumerable,Sc=(e,t,o)=>t in e?kA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Vt=(e,t)=>{for(var o in t||(t={}))Lg.call(t,o)&&Sc(e,o,t[o]);if(rn)for(var o of rn(t))Bg.call(t,o)&&Sc(e,o,t[o]);return e},ga=(e,t)=>DA(e,MA(t)),no=(e,t)=>{var o={};for(var i in e)Lg.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&rn)for(var i of rn(e))t.indexOf(i)<0&&Bg.call(e,i)&&(o[i]=e[i]);return o},PA=RA(),zo=PA,ja=/{([^}]*)}/g,EA=/(\d+\s+[\+\-\*\/]\s+\d+)/g,AA=/var\([^)]+\)/g;function TA(e){return sn(e)&&e.hasOwnProperty("$value")&&e.hasOwnProperty("$type")?e.$value:e}function IA(e){return e.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function Ka(e="",t=""){return IA(`${Bs(e,!1)&&Bs(t,!1)?`${e}-`:e}${t}`)}function Og(e="",t=""){return`--${Ka(e,t)}`}function LA(e=""){const t=(e.match(/{/g)||[]).length,o=(e.match(/}/g)||[]).length;return(t+o)%2!==0}function Gg(e,t="",o="",i=[],s){if(Bs(e)){const r=e.trim();if(LA(r))return;if(Ai(r,ja)){const n=r.replaceAll(ja,a=>{const d=a.replace(/{|}/g,"").split(".").filter(u=>!i.some(h=>Ai(u,h)));return`var(${Og(o,Ig(d.join("-")))}${He(s)?`, ${s}`:""})`});return Ai(n.replace(AA,"0"),EA)?`calc(${n})`:n}return r}else if(FA(e))return e}function BA(e,t,o){Bs(t,!1)&&e.push(`${t}:${o};`)}function Ci(e,t){return e?`${e}{${t}}`:""}function Ng(e,t){if(e.indexOf("dt(")===-1)return e;function o(n,a){const l=[];let d=0,u="",h=null,p=0;for(;d<=n.length;){const g=n[d];if((g==='"'||g==="'"||g==="`")&&n[d-1]!=="\\"&&(h=h===g?null:g),!h&&(g==="("&&p++,g===")"&&p--,(g===","||d===n.length)&&p===0)){const f=u.trim();f.startsWith("dt(")?l.push(Ng(f,a)):l.push(i(f)),u="",d++;continue}g!==void 0&&(u+=g),d++}return l}function i(n){const a=n[0];if((a==='"'||a==="'"||a==="`")&&n[n.length-1]===a)return n.slice(1,-1);const l=Number(n);return isNaN(l)?n:l}const s=[],r=[];for(let n=0;n<e.length;n++)if(e[n]==="d"&&e.slice(n,n+3)==="dt(")r.push(n),n+=2;else if(e[n]===")"&&r.length>0){const a=r.pop();r.length===0&&s.push([a,n])}if(!s.length)return e;for(let n=s.length-1;n>=0;n--){const[a,l]=s[n],d=e.slice(a+3,l),u=o(d,t),h=t(...u);e=e.slice(0,a)+h+e.slice(l+1)}return e}var ii=(...e)=>OA(vt.getTheme(),...e),OA=(e={},t,o,i)=>{if(t){const{variable:s,options:r}=vt.defaults||{},{prefix:n,transform:a}=e?.options||r||{},l=Ai(t,ja)?t:`{${t}}`;return i==="value"||Tg(i)&&a==="strict"?vt.getTokenValue(t):Gg(l,void 0,n,[s.excludedKeyRegex],o)}return""};function cr(e,...t){if(e instanceof Array){const o=e.reduce((i,s,r)=>{var n;return i+s+((n=Io(t[r],{dt:ii}))!=null?n:"")},"");return Ng(o,ii)}return Io(e,{dt:ii})}function GA(e,t={}){const o=vt.defaults.variable,{prefix:i=o.prefix,selector:s=o.selector,excludedKeyRegex:r=o.excludedKeyRegex}=t,n=[],a=[],l=[{node:e,path:i}];for(;l.length;){const{node:u,path:h}=l.pop();for(const p in u){const g=u[p],f=TA(g),b=Ai(p,r)?Ka(h):Ka(h,Ig(p));if(sn(f))l.push({node:f,path:b});else{const w=Og(b),S=Gg(f,b,i,[r]);BA(a,w,S);let y=b;i&&y.startsWith(i+"-")&&(y=y.slice(i.length+1)),n.push(y.replace(/-/g,"."))}}}const d=a.join("");return{value:a,tokens:n,declarations:d,css:Ci(s,d)}}var Ot={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(e){return{type:"class",selector:e,matched:this.pattern.test(e.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(e){return{type:"attr",selector:`:root${e}`,matched:this.pattern.test(e.trim())}}},media:{pattern:/^@media (.*)$/,resolve(e){return{type:"media",selector:`${e}{:root{[CSS]}}`,matched:this.pattern.test(e.trim())}}},system:{pattern:/^system$/,resolve(e){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(e.trim())}}},custom:{resolve(e){return{type:"custom",selector:e,matched:!0}}}},resolve(e){const t=Object.keys(this.rules).filter(o=>o!=="custom").map(o=>this.rules[o]);return[e].flat().map(o=>{var i;return(i=t.map(s=>s.resolve(o)).find(s=>s.matched))!=null?i:this.rules.custom.resolve(o)})}},_toVariables(e,t){return GA(e,{prefix:t?.prefix})},getCommon({name:e="",theme:t={},params:o,set:i,defaults:s}){var r,n,a,l,d,u,h;const{preset:p,options:g}=t;let f,m,b,w,S,y,x;if(He(p)&&g.transform!=="strict"){const{primitive:P,semantic:k,extend:D}=p,v=k||{},{colorScheme:C}=v,R=no(v,["colorScheme"]),F=D||{},{colorScheme:L}=F,O=no(F,["colorScheme"]),T=C||{},{dark:_}=T,V=no(T,["dark"]),G=L||{},{dark:B}=G,I=no(G,["dark"]),W=He(P)?this._toVariables({primitive:P},g):{},z=He(R)?this._toVariables({semantic:R},g):{},U=He(V)?this._toVariables({light:V},g):{},$=He(_)?this._toVariables({dark:_},g):{},oe=He(O)?this._toVariables({semantic:O},g):{},fe=He(I)?this._toVariables({light:I},g):{},ve=He(B)?this._toVariables({dark:B},g):{},[Te,ee]=[(r=W.declarations)!=null?r:"",W.tokens],[ce,pe]=[(n=z.declarations)!=null?n:"",z.tokens||[]],[Q,Fe]=[(a=U.declarations)!=null?a:"",U.tokens||[]],[De,Re]=[(l=$.declarations)!=null?l:"",$.tokens||[]],[be,me]=[(d=oe.declarations)!=null?d:"",oe.tokens||[]],[Ue,ue]=[(u=fe.declarations)!=null?u:"",fe.tokens||[]],[Pe,Y]=[(h=ve.declarations)!=null?h:"",ve.tokens||[]];f=this.transformCSS(e,Te,"light","variable",g,i,s),m=ee;const X=this.transformCSS(e,`${ce}${Q}`,"light","variable",g,i,s),te=this.transformCSS(e,`${De}`,"dark","variable",g,i,s);b=`${X}${te}`,w=[...new Set([...pe,...Fe,...Re])];const Ze=this.transformCSS(e,`${be}${Ue}color-scheme:light`,"light","variable",g,i,s),Ie=this.transformCSS(e,`${Pe}color-scheme:dark`,"dark","variable",g,i,s);S=`${Ze}${Ie}`,y=[...new Set([...me,...ue,...Y])],x=Io(p.css,{dt:ii})}return{primitive:{css:f,tokens:m},semantic:{css:b,tokens:w},global:{css:S,tokens:y},style:x}},getPreset({name:e="",preset:t={},options:o,params:i,set:s,defaults:r,selector:n}){var a,l,d;let u,h,p;if(He(t)&&o.transform!=="strict"){const g=e.replace("-directive",""),f=t,{colorScheme:m,extend:b,css:w}=f,S=no(f,["colorScheme","extend","css"]),y=b||{},{colorScheme:x}=y,P=no(y,["colorScheme"]),k=m||{},{dark:D}=k,v=no(k,["dark"]),C=x||{},{dark:R}=C,F=no(C,["dark"]),L=He(S)?this._toVariables({[g]:Vt(Vt({},S),P)},o):{},O=He(v)?this._toVariables({[g]:Vt(Vt({},v),F)},o):{},T=He(D)?this._toVariables({[g]:Vt(Vt({},D),R)},o):{},[_,V]=[(a=L.declarations)!=null?a:"",L.tokens||[]],[G,B]=[(l=O.declarations)!=null?l:"",O.tokens||[]],[I,W]=[(d=T.declarations)!=null?d:"",T.tokens||[]],z=this.transformCSS(g,`${_}${G}`,"light","variable",o,s,r,n),U=this.transformCSS(g,I,"dark","variable",o,s,r,n);u=`${z}${U}`,h=[...new Set([...V,...B,...W])],p=Io(w,{dt:ii})}return{css:u,tokens:h,style:p}},getPresetC({name:e="",theme:t={},params:o,set:i,defaults:s}){var r;const{preset:n,options:a}=t,l=(r=n?.components)==null?void 0:r[e];return this.getPreset({name:e,preset:l,options:a,params:o,set:i,defaults:s})},getPresetD({name:e="",theme:t={},params:o,set:i,defaults:s}){var r,n;const a=e.replace("-directive",""),{preset:l,options:d}=t,u=((r=l?.components)==null?void 0:r[a])||((n=l?.directives)==null?void 0:n[a]);return this.getPreset({name:a,preset:u,options:d,params:o,set:i,defaults:s})},applyDarkColorScheme(e){return!(e.darkModeSelector==="none"||e.darkModeSelector===!1)},getColorSchemeOption(e,t){var o;return this.applyDarkColorScheme(e)?this.regex.resolve(e.darkModeSelector===!0?t.options.darkModeSelector:(o=e.darkModeSelector)!=null?o:t.options.darkModeSelector):[]},getLayerOrder(e,t={},o,i){const{cssLayer:s}=t;return s?`@layer ${Io(s.order||"primeui",o)}`:""},getCommonStyleSheet({name:e="",theme:t={},params:o,props:i={},set:s,defaults:r}){const n=this.getCommon({name:e,theme:t,params:o,set:s,defaults:r}),a=Object.entries(i).reduce((l,[d,u])=>l.push(`${d}="${u}"`)&&l,[]).join(" ");return Object.entries(n||{}).reduce((l,[d,u])=>{if(sn(u)&&Object.hasOwn(u,"css")){const h=vs(u.css),p=`${d}-variables`;l.push(`<style type="text/css" data-primevue-style-id="${p}" ${a}>${h}</style>`)}return l},[]).join("")},getStyleSheet({name:e="",theme:t={},params:o,props:i={},set:s,defaults:r}){var n;const a={name:e,theme:t,params:o,set:s,defaults:r},l=(n=e.includes("-directive")?this.getPresetD(a):this.getPresetC(a))==null?void 0:n.css,d=Object.entries(i).reduce((u,[h,p])=>u.push(`${h}="${p}"`)&&u,[]).join(" ");return l?`<style type="text/css" data-primevue-style-id="${e}-variables" ${d}>${vs(l)}</style>`:""},createTokens(e={},t,o="",i="",s={}){return{}},getTokenValue(e,t,o){var i;const r=(l=>l.split(".").filter(u=>!Ai(u.toLowerCase(),o.variable.excludedKeyRegex)).join("."))(t),n=t.includes("colorScheme.light")?"light":t.includes("colorScheme.dark")?"dark":void 0,a=[(i=e[r])==null?void 0:i.computed(n)].flat().filter(l=>l);return a.length===1?a[0].value:a.reduce((l={},d)=>{const u=d,{colorScheme:h}=u,p=no(u,["colorScheme"]);return l[h]=p,l},void 0)},getSelectorRule(e,t,o,i){return o==="class"||o==="attr"?Ci(He(t)?`${e}${t},${e} ${t}`:e,i):Ci(e,He(t)?Ci(t,i):i)},transformCSS(e,t,o,i,s={},r,n,a){if(He(t)){const{cssLayer:l}=s;if(i!=="style"){const d=this.getColorSchemeOption(s,n);t=o==="dark"?d.reduce((u,{type:h,selector:p})=>(He(p)&&(u+=p.includes("[CSS]")?p.replace("[CSS]",t):this.getSelectorRule(p,a,h,t)),u),""):Ci(a??":root",t)}if(l){const d={name:"primeui"};sn(l)&&(d.name=Io(l.name,{name:e,type:i})),He(d.name)&&(t=Ci(`@layer ${d.name}`,t),r?.layerNames(d.name))}return t}return""}},vt={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(e={}){const{theme:t}=e;t&&(this._theme=ga(Vt({},t),{options:Vt(Vt({},this.defaults.options),t.options)}),this._tokens=Ot.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var e;return((e=this.theme)==null?void 0:e.preset)||{}},get options(){var e;return((e=this.theme)==null?void 0:e.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(e){this.update({theme:e}),zo.emit("theme:change",e)},getPreset(){return this.preset},setPreset(e){this._theme=ga(Vt({},this.theme),{preset:e}),this._tokens=Ot.createTokens(e,this.defaults),this.clearLoadedStyleNames(),zo.emit("preset:change",e),zo.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(e){this._theme=ga(Vt({},this.theme),{options:e}),this.clearLoadedStyleNames(),zo.emit("options:change",e),zo.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(e){this._layerNames.add(e)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){return this._loadedStyleNames.has(e)},setLoadedStyleName(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(e){return Ot.getTokenValue(this.tokens,e,this.defaults)},getCommon(e="",t){return Ot.getCommon({name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(e="",t){const o={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Ot.getPresetC(o)},getDirective(e="",t){const o={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Ot.getPresetD(o)},getCustomPreset(e="",t,o,i){const s={name:e,preset:t,options:this.options,selector:o,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Ot.getPreset(s)},getLayerOrderCSS(e=""){return Ot.getLayerOrder(e,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(e="",t,o="style",i){return Ot.transformCSS(e,t,i,o,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(e="",t,o={}){return Ot.getCommonStyleSheet({name:e,theme:this.theme,params:t,props:o,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(e,t,o={}){return Ot.getStyleSheet({name:e,theme:this.theme,params:t,props:o,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(e){this._loadingStyles.add(e)},onStyleUpdated(e){this._loadingStyles.add(e)},onStyleLoaded(e,{name:t}){this._loadingStyles.size&&(this._loadingStyles.delete(t),zo.emit(`theme:${t}:load`,e),!this._loadingStyles.size&&zo.emit("theme:load"))}},NA=`
|
|
81
|
+
*,
|
|
82
|
+
::before,
|
|
83
|
+
::after {
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Non vue overlay animations */
|
|
88
|
+
.p-connected-overlay {
|
|
89
|
+
opacity: 0;
|
|
90
|
+
transform: scaleY(0.8);
|
|
91
|
+
transition:
|
|
92
|
+
transform 0.12s cubic-bezier(0, 0, 0.2, 1),
|
|
93
|
+
opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.p-connected-overlay-visible {
|
|
97
|
+
opacity: 1;
|
|
98
|
+
transform: scaleY(1);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.p-connected-overlay-hidden {
|
|
102
|
+
opacity: 0;
|
|
103
|
+
transform: scaleY(1);
|
|
104
|
+
transition: opacity 0.1s linear;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Vue based overlay animations */
|
|
108
|
+
.p-connected-overlay-enter-from {
|
|
109
|
+
opacity: 0;
|
|
110
|
+
transform: scaleY(0.8);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.p-connected-overlay-leave-to {
|
|
114
|
+
opacity: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.p-connected-overlay-enter-active {
|
|
118
|
+
transition:
|
|
119
|
+
transform 0.12s cubic-bezier(0, 0, 0.2, 1),
|
|
120
|
+
opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.p-connected-overlay-leave-active {
|
|
124
|
+
transition: opacity 0.1s linear;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Toggleable Content */
|
|
128
|
+
.p-toggleable-content-enter-from,
|
|
129
|
+
.p-toggleable-content-leave-to {
|
|
130
|
+
max-height: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.p-toggleable-content-enter-to,
|
|
134
|
+
.p-toggleable-content-leave-from {
|
|
135
|
+
max-height: 1000px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.p-toggleable-content-leave-active {
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.p-toggleable-content-enter-active {
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
transition: max-height 1s ease-in-out;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.p-disabled,
|
|
149
|
+
.p-disabled * {
|
|
150
|
+
cursor: default;
|
|
151
|
+
pointer-events: none;
|
|
152
|
+
user-select: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.p-disabled,
|
|
156
|
+
.p-component:disabled {
|
|
157
|
+
opacity: dt('disabled.opacity');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.pi {
|
|
161
|
+
font-size: dt('icon.size');
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.p-icon {
|
|
165
|
+
width: dt('icon.size');
|
|
166
|
+
height: dt('icon.size');
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.p-overlay-mask {
|
|
170
|
+
background: dt('mask.background');
|
|
171
|
+
color: dt('mask.color');
|
|
172
|
+
position: fixed;
|
|
173
|
+
top: 0;
|
|
174
|
+
left: 0;
|
|
175
|
+
width: 100%;
|
|
176
|
+
height: 100%;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.p-overlay-mask-enter {
|
|
180
|
+
animation: p-overlay-mask-enter-animation dt('mask.transition.duration') forwards;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.p-overlay-mask-leave {
|
|
184
|
+
animation: p-overlay-mask-leave-animation dt('mask.transition.duration') forwards;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@keyframes p-overlay-mask-enter-animation {
|
|
188
|
+
from {
|
|
189
|
+
background: transparent;
|
|
190
|
+
}
|
|
191
|
+
to {
|
|
192
|
+
background: dt('mask.background');
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
@keyframes p-overlay-mask-leave-animation {
|
|
196
|
+
from {
|
|
197
|
+
background: dt('mask.background');
|
|
198
|
+
}
|
|
199
|
+
to {
|
|
200
|
+
background: transparent;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
`;function Os(e){"@babel/helpers - typeof";return Os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Os(e)}function Rc(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,i)}return o}function xc(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Rc(Object(o),!0).forEach(function(i){VA(e,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Rc(Object(o)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i))})}return e}function VA(e,t,o){return(t=HA(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function HA(e){var t=_A(e,"string");return Os(t)=="symbol"?t:t+""}function _A(e,t){if(Os(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var i=o.call(e,t);if(Os(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;c.getCurrentInstance()&&c.getCurrentInstance().components?c.onMounted(e):t?e():c.nextTick(e)}var WA=0;function $A(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=c.ref(!1),i=c.ref(e),s=c.ref(null),r=yA()?window.document:void 0,n=t.document,a=n===void 0?r:n,l=t.immediate,d=l===void 0?!0:l,u=t.manual,h=u===void 0?!1:u,p=t.name,g=p===void 0?"style_".concat(++WA):p,f=t.id,m=f===void 0?void 0:f,b=t.media,w=b===void 0?void 0:b,S=t.nonce,y=S===void 0?void 0:S,x=t.first,P=x===void 0?!1:x,k=t.onMounted,D=k===void 0?void 0:k,v=t.onUpdated,C=v===void 0?void 0:v,R=t.onLoad,F=R===void 0?void 0:R,L=t.props,O=L===void 0?{}:L,T=function(){},_=function(B){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(a){var W=xc(xc({},O),I),z=W.name||g,U=W.id||m,$=W.nonce||y;s.value=a.querySelector('style[data-primevue-style-id="'.concat(z,'"]'))||a.getElementById(U)||a.createElement("style"),s.value.isConnected||(i.value=B||e,Ua(s.value,{type:"text/css",id:U,media:w,nonce:$}),P?a.head.prepend(s.value):a.head.appendChild(s.value),SA(s.value,"data-primevue-style-id",z),Ua(s.value,W),s.value.onload=function(oe){return F?.(oe,{name:z})},D?.(z)),!o.value&&(T=c.watch(i,function(oe){s.value.textContent=oe,C?.(z)},{immediate:!0}),o.value=!0)}},V=function(){!a||!o.value||(T(),wA(s.value)&&a.head.removeChild(s.value),o.value=!1,s.value=null)};return d&&!h&&zA(_),{id:m,name:g,el:s,css:i,unload:V,load:_,isLoaded:c.readonly(o)}}function Gs(e){"@babel/helpers - typeof";return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(e)}var Fc,kc,Dc,Mc;function Pc(e,t){return qA(e)||KA(e,t)||jA(e,t)||UA()}function UA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
204
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jA(e,t){if(e){if(typeof e=="string")return Ec(e,t);var o={}.toString.call(e).slice(8,-1);return o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set"?Array.from(e):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Ec(e,t):void 0}}function Ec(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,i=Array(t);o<t;o++)i[o]=e[o];return i}function KA(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var i,s,r,n,a=[],l=!0,d=!1;try{if(r=(o=o.call(e)).next,t!==0)for(;!(l=(i=r.call(o)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(u){d=!0,s=u}finally{try{if(!l&&o.return!=null&&(n=o.return(),Object(n)!==n))return}finally{if(d)throw s}}return a}}function qA(e){if(Array.isArray(e))return e}function Ac(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,i)}return o}function fa(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Ac(Object(o),!0).forEach(function(i){YA(e,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ac(Object(o)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i))})}return e}function YA(e,t,o){return(t=QA(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function QA(e){var t=XA(e,"string");return Gs(t)=="symbol"?t:t+""}function XA(e,t){if(Gs(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var i=o.call(e,t);if(Gs(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ur(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ZA=function(t){var o=t.dt;return`
|
|
205
|
+
.p-hidden-accessible {
|
|
206
|
+
border: 0;
|
|
207
|
+
clip: rect(0 0 0 0);
|
|
208
|
+
height: 1px;
|
|
209
|
+
margin: -1px;
|
|
210
|
+
opacity: 0;
|
|
211
|
+
overflow: hidden;
|
|
212
|
+
padding: 0;
|
|
213
|
+
pointer-events: none;
|
|
214
|
+
position: absolute;
|
|
215
|
+
white-space: nowrap;
|
|
216
|
+
width: 1px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.p-overflow-hidden {
|
|
220
|
+
overflow: hidden;
|
|
221
|
+
padding-right: `.concat(o("scrollbar.width"),`;
|
|
222
|
+
}
|
|
223
|
+
`)},JA={},eT={},Vg={name:"base",css:ZA,style:NA,classes:JA,inlineStyles:eT,load:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r},s=i(cr(Fc||(Fc=ur(["",""])),t));return He(s)?$A(vs(s),fa({name:this.name},o)):{}},loadCSS:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.load(this.css,t)},loadStyle:function(){var t=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return this.load(this.style,o,function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return vt.transformCSS(o.name||t.name,"".concat(s).concat(cr(kc||(kc=ur(["",""])),i)))})},getCommonTheme:function(t){return vt.getCommon(this.name,t)},getComponentTheme:function(t){return vt.getComponent(this.name,t)},getDirectiveTheme:function(t){return vt.getDirective(this.name,t)},getPresetTheme:function(t,o,i){return vt.getCustomPreset(this.name,t,o,i)},getLayerOrderThemeCSS:function(){return vt.getLayerOrderCSS(this.name)},getStyleSheet:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.css){var i=Io(this.css,{dt:ii})||"",s=vs(cr(Dc||(Dc=ur(["","",""])),i,t)),r=Object.entries(o).reduce(function(n,a){var l=Pc(a,2),d=l[0],u=l[1];return n.push("".concat(d,'="').concat(u,'"'))&&n},[]).join(" ");return He(s)?'<style type="text/css" data-primevue-style-id="'.concat(this.name,'" ').concat(r,">").concat(s,"</style>"):""}return""},getCommonThemeStyleSheet:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return vt.getCommonStyleSheet(this.name,t,o)},getThemeStyleSheet:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=[vt.getStyleSheet(this.name,t,o)];if(this.style){var s=this.name==="base"?"global-style":"".concat(this.name,"-style"),r=cr(Mc||(Mc=ur(["",""])),Io(this.style,{dt:ii})),n=vs(vt.transformCSS(s,r)),a=Object.entries(o).reduce(function(l,d){var u=Pc(d,2),h=u[0],p=u[1];return l.push("".concat(h,'="').concat(p,'"'))&&l},[]).join(" ");He(n)&&i.push('<style type="text/css" data-primevue-style-id="'.concat(s,'" ').concat(a,">").concat(n,"</style>"))}return i.join("")},extend:function(t){return fa(fa({},this),{},{css:void 0,style:void 0},t)}};Vg.extend({name:"common"});var Dr={exports:{}},tT=Dr.exports,Tc;function oT(){return Tc||(Tc=1,function(e,t){(function(o,i){e.exports=i()})(tT,function(){var o=1e3,i=6e4,s=36e5,r="millisecond",n="second",a="minute",l="hour",d="day",u="week",h="month",p="quarter",g="year",f="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var _=["th","st","nd","rd"],V=T%100;return"["+T+(_[(V-20)%10]||_[V]||_[0])+"]"}},y=function(T,_,V){var G=String(T);return!G||G.length>=_?T:""+Array(_+1-G.length).join(V)+T},x={s:y,z:function(T){var _=-T.utcOffset(),V=Math.abs(_),G=Math.floor(V/60),B=V%60;return(_<=0?"+":"-")+y(G,2,"0")+":"+y(B,2,"0")},m:function T(_,V){if(_.date()<V.date())return-T(V,_);var G=12*(V.year()-_.year())+(V.month()-_.month()),B=_.clone().add(G,h),I=V-B<0,W=_.clone().add(G+(I?-1:1),h);return+(-(G+(V-B)/(I?B-W:W-B))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:h,y:g,w:u,d,D:f,h:l,m:a,s:n,ms:r,Q:p}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},P="en",k={};k[P]=S;var D="$isDayjsObject",v=function(T){return T instanceof L||!(!T||!T[D])},C=function T(_,V,G){var B;if(!_)return P;if(typeof _=="string"){var I=_.toLowerCase();k[I]&&(B=I),V&&(k[I]=V,B=I);var W=_.split("-");if(!B&&W.length>1)return T(W[0])}else{var z=_.name;k[z]=_,B=z}return!G&&B&&(P=B),B||!G&&P},R=function(T,_){if(v(T))return T.clone();var V=typeof _=="object"?_:{};return V.date=T,V.args=arguments,new L(V)},F=x;F.l=C,F.i=v,F.w=function(T,_){return R(T,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var L=function(){function T(V){this.$L=C(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[D]=!0}var _=T.prototype;return _.parse=function(V){this.$d=function(G){var B=G.date,I=G.utc;if(B===null)return new Date(NaN);if(F.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var W=B.match(b);if(W){var z=W[2]-1||0,U=(W[7]||"0").substring(0,3);return I?new Date(Date.UTC(W[1],z,W[3]||1,W[4]||0,W[5]||0,W[6]||0,U)):new Date(W[1],z,W[3]||1,W[4]||0,W[5]||0,W[6]||0,U)}}return new Date(B)}(V),this.init()},_.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},_.$utils=function(){return F},_.isValid=function(){return this.$d.toString()!==m},_.isSame=function(V,G){var B=R(V);return this.startOf(G)<=B&&B<=this.endOf(G)},_.isAfter=function(V,G){return R(V)<this.startOf(G)},_.isBefore=function(V,G){return this.endOf(G)<R(V)},_.$g=function(V,G,B){return F.u(V)?this[G]:this.set(B,V)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(V,G){var B=this,I=!!F.u(G)||G,W=F.p(V),z=function(ce,pe){var Q=F.w(B.$u?Date.UTC(B.$y,pe,ce):new Date(B.$y,pe,ce),B);return I?Q:Q.endOf(d)},U=function(ce,pe){return F.w(B.toDate()[ce].apply(B.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(pe)),B)},$=this.$W,oe=this.$M,fe=this.$D,ve="set"+(this.$u?"UTC":"");switch(W){case g:return I?z(1,0):z(31,11);case h:return I?z(1,oe):z(0,oe+1);case u:var Te=this.$locale().weekStart||0,ee=($<Te?$+7:$)-Te;return z(I?fe-ee:fe+(6-ee),oe);case d:case f:return U(ve+"Hours",0);case l:return U(ve+"Minutes",1);case a:return U(ve+"Seconds",2);case n:return U(ve+"Milliseconds",3);default:return this.clone()}},_.endOf=function(V){return this.startOf(V,!1)},_.$set=function(V,G){var B,I=F.p(V),W="set"+(this.$u?"UTC":""),z=(B={},B[d]=W+"Date",B[f]=W+"Date",B[h]=W+"Month",B[g]=W+"FullYear",B[l]=W+"Hours",B[a]=W+"Minutes",B[n]=W+"Seconds",B[r]=W+"Milliseconds",B)[I],U=I===d?this.$D+(G-this.$W):G;if(I===h||I===g){var $=this.clone().set(f,1);$.$d[z](U),$.init(),this.$d=$.set(f,Math.min(this.$D,$.daysInMonth())).$d}else z&&this.$d[z](U);return this.init(),this},_.set=function(V,G){return this.clone().$set(V,G)},_.get=function(V){return this[F.p(V)]()},_.add=function(V,G){var B,I=this;V=Number(V);var W=F.p(G),z=function(oe){var fe=R(I);return F.w(fe.date(fe.date()+Math.round(oe*V)),I)};if(W===h)return this.set(h,this.$M+V);if(W===g)return this.set(g,this.$y+V);if(W===d)return z(1);if(W===u)return z(7);var U=(B={},B[a]=i,B[l]=s,B[n]=o,B)[W]||1,$=this.$d.getTime()+V*U;return F.w($,this)},_.subtract=function(V,G){return this.add(-1*V,G)},_.format=function(V){var G=this,B=this.$locale();if(!this.isValid())return B.invalidDate||m;var I=V||"YYYY-MM-DDTHH:mm:ssZ",W=F.z(this),z=this.$H,U=this.$m,$=this.$M,oe=B.weekdays,fe=B.months,ve=B.meridiem,Te=function(pe,Q,Fe,De){return pe&&(pe[Q]||pe(G,I))||Fe[Q].slice(0,De)},ee=function(pe){return F.s(z%12||12,pe,"0")},ce=ve||function(pe,Q,Fe){var De=pe<12?"AM":"PM";return Fe?De.toLowerCase():De};return I.replace(w,function(pe,Q){return Q||function(Fe){switch(Fe){case"YY":return String(G.$y).slice(-2);case"YYYY":return F.s(G.$y,4,"0");case"M":return $+1;case"MM":return F.s($+1,2,"0");case"MMM":return Te(B.monthsShort,$,fe,3);case"MMMM":return Te(fe,$);case"D":return G.$D;case"DD":return F.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return Te(B.weekdaysMin,G.$W,oe,2);case"ddd":return Te(B.weekdaysShort,G.$W,oe,3);case"dddd":return oe[G.$W];case"H":return String(z);case"HH":return F.s(z,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return ce(z,U,!0);case"A":return ce(z,U,!1);case"m":return String(U);case"mm":return F.s(U,2,"0");case"s":return String(G.$s);case"ss":return F.s(G.$s,2,"0");case"SSS":return F.s(G.$ms,3,"0");case"Z":return W}return null}(pe)||W.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(V,G,B){var I,W=this,z=F.p(G),U=R(V),$=(U.utcOffset()-this.utcOffset())*i,oe=this-U,fe=function(){return F.m(W,U)};switch(z){case g:I=fe()/12;break;case h:I=fe();break;case p:I=fe()/3;break;case u:I=(oe-$)/6048e5;break;case d:I=(oe-$)/864e5;break;case l:I=oe/s;break;case a:I=oe/i;break;case n:I=oe/o;break;default:I=oe}return B?I:F.a(I)},_.daysInMonth=function(){return this.endOf(h).$D},_.$locale=function(){return k[this.$L]},_.locale=function(V,G){if(!V)return this.$L;var B=this.clone(),I=C(V,G,!0);return I&&(B.$L=I),B},_.clone=function(){return F.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},T}(),O=L.prototype;return R.prototype=O,[["$ms",r],["$s",n],["$m",a],["$H",l],["$W",d],["$M",h],["$y",g],["$D",f]].forEach(function(T){O[T[1]]=function(_){return this.$g(_,T[0],T[1])}}),R.extend=function(T,_){return T.$i||(T(_,L,R),T.$i=!0),R},R.locale=C,R.isDayjs=v,R.unix=function(T){return R(1e3*T)},R.en=k[P],R.Ls=k,R.p={},R})}(Dr)),Dr.exports}var iT=oT();const jl=zs(iT);var Mr={exports:{}},sT=Mr.exports,Ic;function rT(){return Ic||(Ic=1,function(e,t){(function(o,i){e.exports=i()})(sT,function(){var o="minute",i=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(r,n,a){var l=n.prototype;a.utc=function(m){var b={date:m,utc:!0,args:arguments};return new n(b)},l.utc=function(m){var b=a(this.toDate(),{locale:this.$L,utc:!0});return m?b.add(this.utcOffset(),o):b},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var d=l.parse;l.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),d.call(this,m)};var u=l.init;l.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var h=l.utcOffset;l.utcOffset=function(m,b){var w=this.$utils().u;if(w(m))return this.$u?0:w(this.$offset)?h.call(this):this.$offset;if(typeof m=="string"&&(m=function(P){P===void 0&&(P="");var k=P.match(i);if(!k)return null;var D=(""+k[0]).match(s)||["-",0,0],v=D[0],C=60*+D[1]+ +D[2];return C===0?0:v==="+"?C:-C}(m),m===null))return this;var S=Math.abs(m)<=16?60*m:m,y=this;if(b)return y.$offset=S,y.$u=m===0,y;if(m!==0){var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(y=this.local().add(S+x,o)).$offset=S,y.$x.$localOffset=x}else y=this.utc();return y};var p=l.format;l.format=function(m){var b=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,b)},l.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var g=l.toDate;l.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var f=l.diff;l.diff=function(m,b,w){if(m&&this.$u===m.$u)return f.call(this,m,b,w);var S=this.local(),y=a(m).local();return f.call(S,y,b,w)}}})}(Mr)),Mr.exports}var nT=rT();const aT=zs(nT);var Pr={exports:{}},lT=Pr.exports,Lc;function dT(){return Lc||(Lc=1,function(e,t){(function(o,i){e.exports=i()})(lT,function(){var o={year:0,month:1,day:2,hour:3,minute:4,second:5},i={};return function(s,r,n){var a,l=function(p,g,f){f===void 0&&(f={});var m=new Date(p),b=function(w,S){S===void 0&&(S={});var y=S.timeZoneName||"short",x=w+"|"+y,P=i[x];return P||(P=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:w,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:y}),i[x]=P),P}(g,f);return b.formatToParts(m)},d=function(p,g){for(var f=l(p,g),m=[],b=0;b<f.length;b+=1){var w=f[b],S=w.type,y=w.value,x=o[S];x>=0&&(m[x]=parseInt(y,10))}var P=m[3],k=P===24?0:P,D=m[0]+"-"+m[1]+"-"+m[2]+" "+k+":"+m[4]+":"+m[5]+":000",v=+p;return(n.utc(D).valueOf()-(v-=v%1e3))/6e4},u=r.prototype;u.tz=function(p,g){p===void 0&&(p=a);var f,m=this.utcOffset(),b=this.toDate(),w=b.toLocaleString("en-US",{timeZone:p}),S=Math.round((b-new Date(w))/1e3/60),y=15*-Math.round(b.getTimezoneOffset()/15)-S;if(!Number(y))f=this.utcOffset(0,g);else if(f=n(w,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(y,!0),g){var x=f.utcOffset();f=f.add(m-x,"minute")}return f.$x.$timezone=p,f},u.offsetName=function(p){var g=this.$x.$timezone||n.tz.guess(),f=l(this.valueOf(),g,{timeZoneName:p}).find(function(m){return m.type.toLowerCase()==="timezonename"});return f&&f.value};var h=u.startOf;u.startOf=function(p,g){if(!this.$x||!this.$x.$timezone)return h.call(this,p,g);var f=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return h.call(f,p,g).tz(this.$x.$timezone,!0)},n.tz=function(p,g,f){var m=f&&g,b=f||g||a,w=d(+n(),b);if(typeof p!="string")return n(p).tz(b);var S=function(k,D,v){var C=k-60*D*1e3,R=d(C,v);if(D===R)return[C,D];var F=d(C-=60*(R-D)*1e3,v);return R===F?[C,R]:[k-60*Math.min(R,F)*1e3,Math.max(R,F)]}(n.utc(p,m).valueOf(),w,b),y=S[0],x=S[1],P=n(y).utcOffset(x);return P.$x.$timezone=b,P},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(p){a=p}}})}(Pr)),Pr.exports}var cT=dT();const uT=zs(cT);var Er={exports:{}},hT=Er.exports,Bc;function pT(){return Bc||(Bc=1,function(e,t){(function(o,i){e.exports=i()})(hT,function(){return function(o,i){var s=i.prototype,r=s.format;s.format=function(n){var a=this,l=this.$locale();if(!this.isValid())return r.bind(this)(n);var d=this.$utils(),u=(n||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return d.s(a.week(),h==="w"?1:2,"0");case"W":case"WW":return d.s(a.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return d.s(String(a.$H===0?24:a.$H),h==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return h}});return r.bind(this)(u)}}})}(Er)),Er.exports}var gT=pT();const fT=zs(gT);jl.extend(fT);jl.extend(aT);jl.extend(uT);const mT=["data-position","aria-labelledby","data-style","data-static"],vT=["id"],CT={key:1},Ns=c.defineComponent({__name:"PvTooltip",props:{variant:{default:"white"},tooltipPosition:{default:"top-right"},ariaLabelledBy:{default:"ariaLabelledById"},size:{default:"md"},interactive:{type:Boolean,default:!0}},setup(e){return(t,o)=>t.$slots["tooltip-content"]?(c.openBlock(),c.createElementBlock("div",{key:0,"data-testid":"pv-tooltip",class:c.normalizeClass(["pv-tooltip",{"pv-tooltip-small":t.size==="sm"}]),"data-position":t.tooltipPosition,"aria-labelledby":t.ariaLabelledBy,"data-style":t.variant==="white"?"white":"dark","data-static":t.interactive===!1?!0:void 0},[c.renderSlot(t.$slots,"label"),c.createElementVNode("div",{role:"tooltip",id:t.ariaLabelledBy,"data-testid":"pv-tooltip-content"},[c.renderSlot(t.$slots,"tooltip-content")],8,vT)],10,mT)):(c.openBlock(),c.createElementBlock("div",CT,[c.renderSlot(t.$slots,"label")]))}}),bT={"data-testid":"pv-select-menu-control-panel",class:"pv-flex pv-space-between"},wT=c.defineComponent({__name:"PvMenuControlPanel",props:{disabled:{type:Boolean}},emits:["handle-select-all","handle-clear-all"],setup(e){return(t,o)=>(c.openBlock(),c.createElementBlock("div",bT,[c.createVNode(Qe,{variant:"ghost","data-testid":"pv-select-menu-item-select-all",onClick:o[0]||(o[0]=i=>t.$emit("handle-select-all")),label:"Select All",disabled:t.disabled},null,8,["disabled"]),c.createVNode(Qe,{label:"Clear All",variant:"ghost","data-testid":"pv-select-menu-item-clear-all",onClick:o[1]||(o[1]=i=>t.$emit("handle-clear-all")),disabled:t.disabled},null,8,["disabled"])]))}}),Hg=c.defineComponent({__name:"PvMenu",props:{teleportLocation:{},open:{type:Boolean},popoverPositionStyle:{},cssCustomListProperties:{},useTeleport:{type:Boolean,default:!1}},setup(e,{expose:t}){const o=c.ref(null);return t({popoverRef:o}),(i,s)=>(c.openBlock(),c.createBlock(c.Teleport,{to:i.teleportLocation,disabled:!i.useTeleport},[c.createVNode(Dg,{ref_key:"popoverRef",ref:o,class:c.normalizeClass({"pv-hide":!i.open}),"css-custom-list-properties":i.cssCustomListProperties,"css-custom-properties":{width:"auto",maxWidth:"260px",...i.popoverPositionStyle},isList:!0},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"default")]),_:3},8,["class","css-custom-list-properties","css-custom-properties"])],8,["to","disabled"]))}}),yT=["disabled"],ST={key:0,"data-testid":"pv-select-prefix-label",class:"pv-border-right",style:{color:"#89989b","padding-right":"4px"}},RT={key:4},xT=c.defineComponent({__name:"PvSelectButtonTrigger",props:{variant:{default:"secondary"},size:{default:"lg"},disabled:{type:Boolean},counterPosition:{},counterValue:{},prefixLabel:{},label:{},icon:{},companyLogo:{},showClear:{type:Boolean},showDropdown:{type:Boolean,default:!0},open:{type:Boolean},isLoading:{type:Boolean}},emits:["handle-toggle-dropdown","handle-clear"],setup(e,{expose:t}){const o={xl:"large",lg:void 0},i=c.ref(null);return t({triggerRef:i}),(s,r)=>(c.openBlock(),c.createElementBlock("button",{ref_key:"triggerRef",ref:i,"data-testid":"pv-multi-select-button-trigger",class:c.normalizeClass(["pv-flex","pv-space-between",{[`pv-button-${s.variant}`]:!0,[`pv-button-${o[s.size]}`]:!!s.size}]),style:{"--flex-gap":"0.25rem"},disabled:s.disabled||s.isLoading,onClick:r[1]||(r[1]=n=>s.$emit("handle-toggle-dropdown"))},[s.prefixLabel?(c.openBlock(),c.createElementBlock("p",ST,c.toDisplayString(s.prefixLabel),1)):c.createCommentVNode("",!0),s.counterPosition==="left"?(c.openBlock(),c.createBlock(on,{key:1,"data-testid":"pv-multi-select-left-counter-badge",value:s.counterValue,variant:"tertiary",size:"sm"},null,8,["value"])):c.createCommentVNode("",!0),s.icon?(c.openBlock(),c.createBlock(qe,{key:2,"data-testid":"pv-multi-select-button-icon",name:s.icon},null,8,["name"])):c.createCommentVNode("",!0),s.companyLogo?(c.openBlock(),c.createBlock(Eg,{key:3,name:s.companyLogo,size:"sm"},null,8,["name"])):c.createCommentVNode("",!0),s.isLoading||s.label?(c.openBlock(),c.createElementBlock("span",RT,c.toDisplayString(s.isLoading?"Loading...":s.label),1)):c.createCommentVNode("",!0),s.counterPosition==="right"?(c.openBlock(),c.createBlock(on,{key:5,"data-testid":"pv-multi-select-right-counter-badge",value:s.counterValue,variant:"tertiary",size:"sm"},null,8,["value"])):c.createCommentVNode("",!0),s.showDropdown?(c.openBlock(),c.createBlock(qe,{key:6,name:s.open?"chevron-up":"chevron-down"},null,8,["name"])):c.createCommentVNode("",!0),s.showClear?(c.openBlock(),c.createBlock(Ns,{key:7,size:"sm",variant:"dark","tooltip-position":"top-left"},{label:c.withCtx(()=>[c.createVNode(qe,{name:"close",onClick:r[0]||(r[0]=c.withModifiers(n=>s.$emit("handle-clear"),["stop"]))})]),"tooltip-content":c.withCtx(()=>r[2]||(r[2]=[c.createTextVNode(" Clear Selections ")])),_:1})):c.createCommentVNode("",!0)],10,yT))}}),FT={},kT={class:"pv-text-subdued pv-text-center pv-text-body-md"};function DT(e,t){return c.openBlock(),c.createElementBlock("div",kT,"No Results Found")}const MT=Ut(FT,[["render",DT]]),PT=["src"],ET=c.defineComponent({__name:"PvAvatar",props:{size:{default:"lg"},image:{},initials:{}},setup(e){const t={sm:"pv-avatar-16",md:"pv-avatar-20",lg:"pv-avatar-xs",xl:"pv-avatar-sm","2x":"pv-avatar-md"};return(o,i)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(t[o.size]),"data-testid":"pv-avatar"},[o.initials?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(o.initials),1)],64)):o.image?(c.openBlock(),c.createElementBlock("img",{key:1,src:o.image},null,8,PT)):c.createCommentVNode("",!0)],2))}}),AT={class:"pv-full-width pv-truncate pv-flex-vertical",style:{"align-items":"flex-start","--flex-gap":"0"}},TT=["title"],IT=["title"],LT={key:3,class:"pv-text-subdued pv-text-body-md"},BT=c.defineComponent({__name:"PvMenuItem",props:{id:{},text:{},subText:{},secondaryText:{},icon:{},companyName:{},avatar:{},disabled:{type:Boolean},renderer:{},rendererProps:{},classList:{},searchText:{}},emits:["handle-selected"],setup(e){const t=e,o=c.computed(()=>{const i=t.classList?[...t.classList]:[];return t.disabled?i.push("pv-menu-item-disabled"):i.push("pv-menu-item"),i});return(i,s)=>(c.openBlock(),c.createElementBlock("a",{class:c.normalizeClass(["pv-flex",o.value]),"data-testid":"pv-menu-item",style:c.normalizeStyle(i.disabled?"color: #7D898D;":""),role:"button",onClick:s[0]||(s[0]=r=>i.disabled?null:i.$emit("handle-selected"))},[i.renderer?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.renderer),c.normalizeProps(c.mergeProps({key:0},i.$props)),null,16)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[i.avatar?(c.openBlock(),c.createBlock(ET,{key:0,initials:i.avatar.initials,image:i.avatar.image,size:"lg"},null,8,["initials","image"])):c.createCommentVNode("",!0),i.icon?(c.openBlock(),c.createBlock(qe,{key:1,class:"pv-text-subdued",name:i.icon},null,8,["name"])):c.createCommentVNode("",!0),i.companyName?(c.openBlock(),c.createBlock(Eg,{key:2,name:i.companyName,size:"sm"},null,8,["name"])):c.createCommentVNode("",!0),c.createElementVNode("div",AT,[c.createElementVNode("span",{class:"pv-text-body-md pv-full-width pv-truncate",title:i.text},c.toDisplayString(i.text),9,TT),i.subText?(c.openBlock(),c.createElementBlock("span",{key:0,class:"pv-text-body-xs pv-text-subdued pv-full-width pv-truncate",title:i.subText},c.toDisplayString(i.subText),9,IT)):c.createCommentVNode("",!0)]),i.secondaryText?(c.openBlock(),c.createElementBlock("span",LT,c.toDisplayString(i.secondaryText),1)):c.createCommentVNode("",!0)],64))],6))}}),os=Ut(BT,[["__scopeId","data-v-f0f5eb5f"]]),OT=["checked","disabled"],GT={class:"pv-full-width pv-truncate pv-flex-vertical",style:{"align-items":"flex-start","--flex-gap":"0"}},NT=["title"],VT=["title"],HT={key:0,class:"pv-text-subdued pv-text-body-md"},_T=c.defineComponent({__name:"PvMenuCheckboxItem",props:{id:{},text:{},subText:{},secondaryText:{},value:{type:Boolean},disabled:{type:Boolean},renderer:{},rendererProps:{},classList:{}},emits:["handle-selected"],setup(e){return(t,o)=>(c.openBlock(),c.createElementBlock("label",{class:c.normalizeClass(["pv-label pv-label-hover pv-flex",t.classList]),"data-testid":"pv-menu-checkbox-item",style:{cursor:"pointer"}},[c.createElementVNode("input",{type:"checkbox",name:"checkbox",checked:t.value,class:"pv-checkbox",onChange:o[0]||(o[0]=i=>t.$emit("handle-selected")),disabled:t.disabled},null,40,OT),t.renderer?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(t.renderer),c.normalizeProps(c.mergeProps({key:0},t.$props)),null,16)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("div",GT,[c.createElementVNode("span",{class:"pv-text-body-md pv-full-width pv-truncate",title:t.text},c.toDisplayString(t.text),9,NT),t.subText?(c.openBlock(),c.createElementBlock("span",{key:0,class:"pv-text-body-xs pv-text-subdued pv-full-width pv-truncate",title:t.subText},c.toDisplayString(t.subText),9,VT)):c.createCommentVNode("",!0)]),t.secondaryText?(c.openBlock(),c.createElementBlock("span",HT,c.toDisplayString(t.secondaryText),1)):c.createCommentVNode("",!0)],64))],2))}}),Oc=c.defineComponent({__name:"PvMultiSelectMenuItem",props:{optionsVariant:{default:"checkbox"},selected:{type:Boolean},option:{}},emits:["handle-select-item"],setup(e){const t={simple:os,icon:os,company:os,checkbox:_T,avatar:os};return(o,i)=>(c.openBlock(),c.createBlock(c.resolveDynamicComponent(t[o.optionsVariant]),{id:o.option.id,value:o.selected,"secondary-text":o.option.secondaryText,icon:o.optionsVariant==="icon"?o.option.icon:void 0,avatar:o.optionsVariant==="avatar"?o.option.avatar:void 0,companyName:o.optionsVariant==="company"?o.option.companyName?o.option.companyName:o.option.text:void 0,text:o.option.text,subText:o.option.subText,disabled:o.option.disabled,renderer:o.option.renderer,rendererProps:o.option.rendererProps,classList:o.option.classList,onHandleSelected:i[0]||(i[0]=()=>o.$emit("handle-select-item",o.option))},null,40,["id","value","secondary-text","icon","avatar","companyName","text","subText","disabled","renderer","rendererProps","classList"]))}}),zT=({alignment:e,useTeleport:t=!0,popoverCssProperties:o}={})=>{const i=c.ref(null),s=c.ref(null),r=c.ref(null),n=c.ref(null),a=p=>{let g=p.parentElement;for(;g&&g!==document.body;){if(window.getComputedStyle(g).position!=="static")return g;g=g.parentElement}return null},l=c.computed(()=>{if(!i.value||!s.value||!n.value?.popoverRoot)return 0;let p=i.value.left+window.scrollX;(e==="right"||e==="top right")&&(p=i.value.left+i.value.width+window.scrollX);const g=a(n.value.popoverRoot);if(g){const f=g.getBoundingClientRect();p-=f.left+window.scrollX-g.scrollLeft}return p}),d=c.computed(()=>{if(!i.value||!s.value||!n.value?.popoverRoot)return 0;let p=i.value.top+window.scrollY;e==="top"||e==="top right"||(p+=i.value.height);const g=a(n.value.popoverRoot);if(g){const f=g.getBoundingClientRect();p-=f.top+window.scrollY-g.scrollTop}return p}),u=c.computed(()=>{if(!t)return o;const p={position:"absolute",left:`${l.value}px`,top:`${d.value}px`,zIndex:10};return{...o,...p}});return{triggerRef:r,popoverRef:n,triggerRect:i,popoverRect:s,popoverPositionStyle:u,updateRects:()=>{r.value&&(i.value=r.value.getBoundingClientRect()),n.value?.popoverRoot&&(s.value=n.value.popoverRoot.getBoundingClientRect())}}},WT={class:"pv-relative",style:{width:"fit-content"}},$T={key:1,class:"pv-text-body-sm",style:{color:"#89989b"}},UT={role:"list"},jT=["data-active"],KT={key:2,class:"pv-border-top",style:{margin:"8px 0"}},qT={key:1,role:"list"},YT=["data-active"],QT={key:2,class:"pv-flex pv-inset-block-8",style:{"justify-content":"center"}},XT={class:"pv-sticky pv-surface pv-border-top",style:{"--flex-justify":"space-between","--bottom":"0","padding-top":"0.75rem","padding-bottom":"0.5rem"}},ZT=c.defineComponent({__name:"PvMultiSelectButton",props:c.mergeModels({groupings:{},defaultOpen:{type:Boolean},disabled:{type:Boolean},teleportLocation:{default:"body"},isLoading:{type:Boolean},variant:{default:"secondary"},size:{default:"lg"},alignment:{},popoverCssProperties:{},prefixLabel:{},label:{default:"Select"},icon:{},counterPosition:{default:"left"},companyLogo:{},showClear:{type:Boolean,default:!0},showDropdown:{type:Boolean,default:!0},showMenuAction:{type:Boolean,default:!0},showSearchInput:{type:Boolean,default:!0},overlayTrigger:{type:Boolean},optionsVariant:{default:"checkbox"},options:{default:()=>[]},useTeleport:{type:Boolean,default:!1}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{},searchInput:{required:!1,default:""},searchInputModifiers:{}}),emits:c.mergeModels(["dropdown-open","dropdown-closed"],["update:modelValue","update:searchInput"]),setup(e,{emit:t}){const o=e,i=t,s={top:o.overlayTrigger?"0":"unset",...o.popoverCssProperties},{popoverPositionStyle:r,updateRects:n,triggerRef:a,popoverRef:l}=zT({alignment:o.alignment,popoverCssProperties:s,useTeleport:o.useTeleport}),d=c.useTemplateRef("select-menu-ref"),u=c.useTemplateRef("select-button-trigger-ref"),h=c.useTemplateRef("searchInputRef"),[p,g]=tE(o.defaultOpen),f=c.useModel(e,"modelValue"),m=c.useModel(e,"searchInput"),b=()=>{m.value="",p.value=!1};c.watch(p,v=>{v?c.nextTick(()=>{o.overlayTrigger&&o.showSearchInput&&h.value?.input?.focus(),n(),i("dropdown-open")}):i("dropdown-closed")}),c.onMounted(()=>{d.value?.popoverRef&&(l.value=d.value?.popoverRef),u.value?.triggerRef&&(a.value=u.value?.triggerRef)});const w=c.computed(()=>m.value===""?o.options:o.options.filter(v=>v.text.toLocaleLowerCase().includes(m.value.toLocaleLowerCase()))),S=v=>{const C=f.value,R=C.findIndex(L=>L.id===v.id);let F;R>-1?F=[...C.slice(0,R),...C.slice(R+1)]:F=[...C,{...v}],f.value=F},y=()=>{f.value=w.value.map(v=>({id:v.id,text:v.text}))},x=()=>{f.value=[]},P=c.computed(()=>{if(!o.groupings)return;const v=new Map;o.groupings.forEach(C=>{v.set(C,[])}),v.set("other",[]);for(const C of o.options){const R=C.groupingLabel,F=R&&v.has(R)?R:"other";v.get(F).push(C)}for(const[C,R]of v)R.length===0&&v.delete(C);return Array.from(v.entries())}),k=c.computed(()=>o.groupings&&m.value===""),D=v=>f.value.some(C=>C.id===v.id)?!0:null;return hg("Escape",()=>{p.value&&b()}),(v,C)=>c.withDirectives((c.openBlock(),c.createElementBlock("div",WT,[c.createVNode(xT,{ref:"select-button-trigger-ref",variant:v.variant,size:v.size,disabled:v.disabled,counterPosition:v.counterPosition,prefixLabel:v.prefixLabel,label:v.label,icon:v.icon,companyLogo:v.companyLogo,showClear:v.showClear&&f.value.length>0,showDropdown:v.showDropdown&&f.value.length===0,open:c.unref(p),"counter-value":f.value.length,onHandleClear:x,onHandleToggleDropdown:C[0]||(C[0]=R=>c.unref(g)())},null,8,["variant","size","disabled","counterPosition","prefixLabel","label","icon","companyLogo","showClear","showDropdown","open","counter-value"]),c.createVNode(Hg,{ref:"select-menu-ref",open:c.unref(p),teleportLocation:v.teleportLocation,"use-teleport":v.useTeleport,"css-custom-list-properties":v.showMenuAction?{"padding-bottom":0}:{},popoverPositionStyle:c.unref(r)},{default:c.withCtx(()=>[v.showSearchInput?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(Ul,{ref:"searchInputRef","model-value":m.value,"onUpdate:modelValue":C[1]||(C[1]=R=>m.value=R),class:"pv-sticky pv-surface pv-stack-12",style:{"padding-top":"4px"}},null,8,["model-value"]),C[2]||(C[2]=c.createElementVNode("div",{class:"pv-border-top pv-stack-12"},null,-1))],64)):c.createCommentVNode("",!0),w.value.length>0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[k.value?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(P.value,([R,F],L)=>(c.openBlock(),c.createElementBlock("div",{key:R},[v.$slots[R]?c.renderSlot(v.$slots,R,{key:0}):R!=="other"?(c.openBlock(),c.createElementBlock("span",$T,c.toDisplayString(R),1)):c.createCommentVNode("",!0),c.createElementVNode("ul",UT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(F,O=>c.withDirectives((c.openBlock(),c.createElementBlock("li",{key:O.id,"data-active":D(O),class:"pv-stack-4"},[c.createVNode(Oc,{"data-testid":`pv-multiselect-${R}-item`,"options-variant":v.optionsVariant,selected:f.value.some(T=>T.id===O.id),option:O,onHandleSelectItem:S},null,8,["data-testid","options-variant","selected","option"])],8,jT)),[[c.vShow,D(O)||!v.isLoading]])),128))]),P.value&&L!==P.value.length-1?(c.openBlock(),c.createElementBlock("div",KT)):c.createCommentVNode("",!0)]))),128)):(c.openBlock(),c.createElementBlock("ul",qT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(w.value,R=>(c.openBlock(),c.createElementBlock("li",{key:R.id,"data-active":f.value.some(F=>F.id===R.id)?!0:null,class:"pv-stack-4"},[c.createVNode(Oc,{"options-variant":v.optionsVariant,selected:f.value.some(F=>F.id===R.id),option:R,onHandleSelectItem:S},null,8,["options-variant","selected","option"])],8,YT))),128))]))],64)):c.createCommentVNode("",!0),v.isLoading?(c.openBlock(),c.createElementBlock("div",QT,[c.createVNode($l,{variant:"dark"})])):w.value.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:3},[v.$slots["no-results"]?c.renderSlot(v.$slots,"no-results",c.normalizeProps(c.mergeProps({key:0},v.$props))):(c.openBlock(),c.createBlock(MT,{key:1}))],64)):c.createCommentVNode("",!0),c.createElementVNode("div",XT,[v.$slots.footer?c.renderSlot(v.$slots,"footer",c.normalizeProps(c.mergeProps({key:0},v.$props))):c.createCommentVNode("",!0),v.showMenuAction?(c.openBlock(),c.createBlock(wT,{key:1,disabled:v.isLoading,onHandleClearAll:x,onHandleSelectAll:y},null,8,["disabled"])):c.createCommentVNode("",!0)])]),_:3},8,["open","teleportLocation","use-teleport","css-custom-list-properties","popoverPositionStyle"])])),[[c.unref(Wl),[b,{ignore:[".pv-popover"]}]]])}}),JT=["for"],eI=["disabled","type","placeholder","id","data-invalid"];Math.random().toString();const tI=["for"],oI={key:0},iI=["disabled","id"];Math.random().toString();const sI=["for"],rI=["rows","disabled","placeholder","id","data-invalid"];Math.random().toString();Vg.extend({name:"common"});var nI={transitionDuration:"{transition.duration}"},aI={borderWidth:"0 0 1px 0",borderColor:"{content.border.color}"},lI={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{text.color}",padding:"1.125rem",fontWeight:"600",borderRadius:"0",borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",hoverBackground:"{content.background}",activeBackground:"{content.background}",activeHoverBackground:"{content.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},toggleIcon:{color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{text.color}",activeHoverColor:"{text.color}"},first:{topBorderRadius:"{content.border.radius}",borderWidth:"0"},last:{bottomBorderRadius:"{content.border.radius}",activeBottomBorderRadius:"0"}},dI={borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",color:"{text.color}",padding:"0 1.125rem 1.125rem 1.125rem"},cI={root:nI,panel:aI,header:lI,content:dI},uI={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}"},hI={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},pI={padding:"{list.padding}",gap:"{list.gap}"},gI={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},fI={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},mI={width:"2.5rem",sm:{width:"2rem"},lg:{width:"3rem"},borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},vI={borderRadius:"{border.radius.sm}"},CI={padding:"{list.option.padding}"},bI={light:{chip:{focusBackground:"{surface.200}",focusColor:"{surface.800}"},dropdown:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}"}},dark:{chip:{focusBackground:"{surface.700}",focusColor:"{surface.0}"},dropdown:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}"}}},wI={root:uI,overlay:hI,list:pI,option:gI,optionGroup:fI,dropdown:mI,chip:vI,emptyMessage:CI,colorScheme:bI},yI={width:"2rem",height:"2rem",fontSize:"1rem",background:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},SI={size:"1rem"},RI={borderColor:"{content.background}",offset:"-0.75rem"},xI={width:"3rem",height:"3rem",fontSize:"1.5rem",icon:{size:"1.5rem"},group:{offset:"-1rem"}},FI={width:"4rem",height:"4rem",fontSize:"2rem",icon:{size:"2rem"},group:{offset:"-1.5rem"}},kI={root:yI,icon:SI,group:RI,lg:xI,xl:FI},DI={borderRadius:"{border.radius.md}",padding:"0 0.5rem",fontSize:"0.75rem",fontWeight:"700",minWidth:"1.5rem",height:"1.5rem"},MI={size:"0.5rem"},PI={fontSize:"0.625rem",minWidth:"1.25rem",height:"1.25rem"},EI={fontSize:"0.875rem",minWidth:"1.75rem",height:"1.75rem"},AI={fontSize:"1rem",minWidth:"2rem",height:"2rem"},TI={light:{primary:{background:"{primary.color}",color:"{primary.contrast.color}"},secondary:{background:"{surface.100}",color:"{surface.600}"},success:{background:"{green.500}",color:"{surface.0}"},info:{background:"{sky.500}",color:"{surface.0}"},warn:{background:"{orange.500}",color:"{surface.0}"},danger:{background:"{red.500}",color:"{surface.0}"},contrast:{background:"{surface.950}",color:"{surface.0}"}},dark:{primary:{background:"{primary.color}",color:"{primary.contrast.color}"},secondary:{background:"{surface.800}",color:"{surface.300}"},success:{background:"{green.400}",color:"{green.950}"},info:{background:"{sky.400}",color:"{sky.950}"},warn:{background:"{orange.400}",color:"{orange.950}"},danger:{background:"{red.400}",color:"{red.950}"},contrast:{background:"{surface.0}",color:"{surface.950}"}}},II={root:DI,dot:MI,sm:PI,lg:EI,xl:AI,colorScheme:TI},LI={borderRadius:{none:"0",xs:"2px",sm:"4px",md:"6px",lg:"8px",xl:"12px"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"}},BI={transitionDuration:"0.2s",focusRing:{width:"1px",style:"solid",color:"{primary.color}",offset:"2px",shadow:"none"},disabledOpacity:"0.6",iconSize:"1rem",anchorGutter:"2px",primary:{50:"{emerald.50}",100:"{emerald.100}",200:"{emerald.200}",300:"{emerald.300}",400:"{emerald.400}",500:"{emerald.500}",600:"{emerald.600}",700:"{emerald.700}",800:"{emerald.800}",900:"{emerald.900}",950:"{emerald.950}"},formField:{paddingX:"0.75rem",paddingY:"0.5rem",sm:{fontSize:"0.875rem",paddingX:"0.625rem",paddingY:"0.375rem"},lg:{fontSize:"1.125rem",paddingX:"0.875rem",paddingY:"0.625rem"},borderRadius:"{border.radius.md}",focusRing:{width:"0",style:"none",color:"transparent",offset:"0",shadow:"none"},transitionDuration:"{transition.duration}"},list:{padding:"0.25rem 0.25rem",gap:"2px",header:{padding:"0.5rem 1rem 0.25rem 1rem"},option:{padding:"0.5rem 0.75rem",borderRadius:"{border.radius.sm}"},optionGroup:{padding:"0.5rem 0.75rem",fontWeight:"600"}},content:{borderRadius:"{border.radius.md}"},mask:{transitionDuration:"0.15s"},navigation:{list:{padding:"0.25rem 0.25rem",gap:"2px"},item:{padding:"0.5rem 0.75rem",borderRadius:"{border.radius.sm}",gap:"0.5rem"},submenuLabel:{padding:"0.5rem 0.75rem",fontWeight:"600"},submenuIcon:{size:"0.875rem"}},overlay:{select:{borderRadius:"{border.radius.md}",shadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"},popover:{borderRadius:"{border.radius.md}",padding:"0.75rem",shadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"},modal:{borderRadius:"{border.radius.xl}",padding:"1.25rem",shadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"},navigation:{shadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"}},colorScheme:{light:{surface:{0:"#ffffff",50:"{slate.50}",100:"{slate.100}",200:"{slate.200}",300:"{slate.300}",400:"{slate.400}",500:"{slate.500}",600:"{slate.600}",700:"{slate.700}",800:"{slate.800}",900:"{slate.900}",950:"{slate.950}"},primary:{color:"{primary.500}",contrastColor:"#ffffff",hoverColor:"{primary.600}",activeColor:"{primary.700}"},highlight:{background:"{primary.50}",focusBackground:"{primary.100}",color:"{primary.700}",focusColor:"{primary.800}"},mask:{background:"rgba(0,0,0,0.4)",color:"{surface.200}"},formField:{background:"{surface.0}",disabledBackground:"{surface.200}",filledBackground:"{surface.50}",filledHoverBackground:"{surface.50}",filledFocusBackground:"{surface.50}",borderColor:"{surface.300}",hoverBorderColor:"{surface.400}",focusBorderColor:"{primary.color}",invalidBorderColor:"{red.400}",color:"{surface.700}",disabledColor:"{surface.500}",placeholderColor:"{surface.500}",invalidPlaceholderColor:"{red.600}",floatLabelColor:"{surface.500}",floatLabelFocusColor:"{primary.600}",floatLabelActiveColor:"{surface.500}",floatLabelInvalidColor:"{form.field.invalid.placeholder.color}",iconColor:"{surface.400}",shadow:"0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)"},text:{color:"{surface.700}",hoverColor:"{surface.800}",mutedColor:"{surface.500}",hoverMutedColor:"{surface.600}"},content:{background:"{surface.0}",hoverBackground:"{surface.100}",borderColor:"{surface.200}",color:"{text.color}",hoverColor:"{text.hover.color}"},overlay:{select:{background:"{surface.0}",borderColor:"{surface.200}",color:"{text.color}"},popover:{background:"{surface.0}",borderColor:"{surface.200}",color:"{text.color}"},modal:{background:"{surface.0}",borderColor:"{surface.200}",color:"{text.color}"}},list:{option:{focusBackground:"{surface.100}",selectedBackground:"{highlight.background}",selectedFocusBackground:"{highlight.focus.background}",color:"{text.color}",focusColor:"{text.hover.color}",selectedColor:"{highlight.color}",selectedFocusColor:"{highlight.focus.color}",icon:{color:"{surface.400}",focusColor:"{surface.500}"}},optionGroup:{background:"transparent",color:"{text.muted.color}"}},navigation:{item:{focusBackground:"{surface.100}",activeBackground:"{surface.100}",color:"{text.color}",focusColor:"{text.hover.color}",activeColor:"{text.hover.color}",icon:{color:"{surface.400}",focusColor:"{surface.500}",activeColor:"{surface.500}"}},submenuLabel:{background:"transparent",color:"{text.muted.color}"},submenuIcon:{color:"{surface.400}",focusColor:"{surface.500}",activeColor:"{surface.500}"}}},dark:{surface:{0:"#ffffff",50:"{zinc.50}",100:"{zinc.100}",200:"{zinc.200}",300:"{zinc.300}",400:"{zinc.400}",500:"{zinc.500}",600:"{zinc.600}",700:"{zinc.700}",800:"{zinc.800}",900:"{zinc.900}",950:"{zinc.950}"},primary:{color:"{primary.400}",contrastColor:"{surface.900}",hoverColor:"{primary.300}",activeColor:"{primary.200}"},highlight:{background:"color-mix(in srgb, {primary.400}, transparent 84%)",focusBackground:"color-mix(in srgb, {primary.400}, transparent 76%)",color:"rgba(255,255,255,.87)",focusColor:"rgba(255,255,255,.87)"},mask:{background:"rgba(0,0,0,0.6)",color:"{surface.200}"},formField:{background:"{surface.950}",disabledBackground:"{surface.700}",filledBackground:"{surface.800}",filledHoverBackground:"{surface.800}",filledFocusBackground:"{surface.800}",borderColor:"{surface.600}",hoverBorderColor:"{surface.500}",focusBorderColor:"{primary.color}",invalidBorderColor:"{red.300}",color:"{surface.0}",disabledColor:"{surface.400}",placeholderColor:"{surface.400}",invalidPlaceholderColor:"{red.400}",floatLabelColor:"{surface.400}",floatLabelFocusColor:"{primary.color}",floatLabelActiveColor:"{surface.400}",floatLabelInvalidColor:"{form.field.invalid.placeholder.color}",iconColor:"{surface.400}",shadow:"0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)"},text:{color:"{surface.0}",hoverColor:"{surface.0}",mutedColor:"{surface.400}",hoverMutedColor:"{surface.300}"},content:{background:"{surface.900}",hoverBackground:"{surface.800}",borderColor:"{surface.700}",color:"{text.color}",hoverColor:"{text.hover.color}"},overlay:{select:{background:"{surface.900}",borderColor:"{surface.700}",color:"{text.color}"},popover:{background:"{surface.900}",borderColor:"{surface.700}",color:"{text.color}"},modal:{background:"{surface.900}",borderColor:"{surface.700}",color:"{text.color}"}},list:{option:{focusBackground:"{surface.800}",selectedBackground:"{highlight.background}",selectedFocusBackground:"{highlight.focus.background}",color:"{text.color}",focusColor:"{text.hover.color}",selectedColor:"{highlight.color}",selectedFocusColor:"{highlight.focus.color}",icon:{color:"{surface.500}",focusColor:"{surface.400}"}},optionGroup:{background:"transparent",color:"{text.muted.color}"}},navigation:{item:{focusBackground:"{surface.800}",activeBackground:"{surface.800}",color:"{text.color}",focusColor:"{text.hover.color}",activeColor:"{text.hover.color}",icon:{color:"{surface.500}",focusColor:"{surface.400}",activeColor:"{surface.400}"}},submenuLabel:{background:"transparent",color:"{text.muted.color}"},submenuIcon:{color:"{surface.500}",focusColor:"{surface.400}",activeColor:"{surface.400}"}}}}},OI={primitive:LI,semantic:BI},GI={borderRadius:"{content.border.radius}"},NI={root:GI},VI={padding:"1rem",background:"{content.background}",gap:"0.5rem",transitionDuration:"{transition.duration}"},HI={color:"{text.muted.color}",hoverColor:"{text.color}",borderRadius:"{content.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",hoverColor:"{navigation.item.icon.focus.color}"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},_I={color:"{navigation.item.icon.color}"},zI={root:VI,item:HI,separator:_I},WI={borderRadius:"{form.field.border.radius}",roundedBorderRadius:"2rem",gap:"0.5rem",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",iconOnlyWidth:"2.5rem",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}",iconOnlyWidth:"2rem"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}",iconOnlyWidth:"3rem"},label:{fontWeight:"500"},raisedShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"},badgeSize:"1rem",transitionDuration:"{form.field.transition.duration}"},$I={light:{root:{primary:{background:"{primary.color}",hoverBackground:"{primary.hover.color}",activeBackground:"{primary.active.color}",borderColor:"{primary.color}",hoverBorderColor:"{primary.hover.color}",activeBorderColor:"{primary.active.color}",color:"{primary.contrast.color}",hoverColor:"{primary.contrast.color}",activeColor:"{primary.contrast.color}",focusRing:{color:"{primary.color}",shadow:"none"}},secondary:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",borderColor:"{surface.100}",hoverBorderColor:"{surface.200}",activeBorderColor:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}",focusRing:{color:"{surface.600}",shadow:"none"}},info:{background:"{sky.500}",hoverBackground:"{sky.600}",activeBackground:"{sky.700}",borderColor:"{sky.500}",hoverBorderColor:"{sky.600}",activeBorderColor:"{sky.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{sky.500}",shadow:"none"}},success:{background:"{green.500}",hoverBackground:"{green.600}",activeBackground:"{green.700}",borderColor:"{green.500}",hoverBorderColor:"{green.600}",activeBorderColor:"{green.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{green.500}",shadow:"none"}},warn:{background:"{orange.500}",hoverBackground:"{orange.600}",activeBackground:"{orange.700}",borderColor:"{orange.500}",hoverBorderColor:"{orange.600}",activeBorderColor:"{orange.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{orange.500}",shadow:"none"}},help:{background:"{purple.500}",hoverBackground:"{purple.600}",activeBackground:"{purple.700}",borderColor:"{purple.500}",hoverBorderColor:"{purple.600}",activeBorderColor:"{purple.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{purple.500}",shadow:"none"}},danger:{background:"{red.500}",hoverBackground:"{red.600}",activeBackground:"{red.700}",borderColor:"{red.500}",hoverBorderColor:"{red.600}",activeBorderColor:"{red.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{red.500}",shadow:"none"}},contrast:{background:"{surface.950}",hoverBackground:"{surface.900}",activeBackground:"{surface.800}",borderColor:"{surface.950}",hoverBorderColor:"{surface.900}",activeBorderColor:"{surface.800}",color:"{surface.0}",hoverColor:"{surface.0}",activeColor:"{surface.0}",focusRing:{color:"{surface.950}",shadow:"none"}}},outlined:{primary:{hoverBackground:"{primary.50}",activeBackground:"{primary.100}",borderColor:"{primary.200}",color:"{primary.color}"},secondary:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.200}",color:"{surface.500}"},success:{hoverBackground:"{green.50}",activeBackground:"{green.100}",borderColor:"{green.200}",color:"{green.500}"},info:{hoverBackground:"{sky.50}",activeBackground:"{sky.100}",borderColor:"{sky.200}",color:"{sky.500}"},warn:{hoverBackground:"{orange.50}",activeBackground:"{orange.100}",borderColor:"{orange.200}",color:"{orange.500}"},help:{hoverBackground:"{purple.50}",activeBackground:"{purple.100}",borderColor:"{purple.200}",color:"{purple.500}"},danger:{hoverBackground:"{red.50}",activeBackground:"{red.100}",borderColor:"{red.200}",color:"{red.500}"},contrast:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.700}",color:"{surface.950}"},plain:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.200}",color:"{surface.700}"}},text:{primary:{hoverBackground:"{primary.50}",activeBackground:"{primary.100}",color:"{primary.color}"},secondary:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.500}"},success:{hoverBackground:"{green.50}",activeBackground:"{green.100}",color:"{green.500}"},info:{hoverBackground:"{sky.50}",activeBackground:"{sky.100}",color:"{sky.500}"},warn:{hoverBackground:"{orange.50}",activeBackground:"{orange.100}",color:"{orange.500}"},help:{hoverBackground:"{purple.50}",activeBackground:"{purple.100}",color:"{purple.500}"},danger:{hoverBackground:"{red.50}",activeBackground:"{red.100}",color:"{red.500}"},contrast:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.950}"},plain:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.700}"}},link:{color:"{primary.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"}},dark:{root:{primary:{background:"{primary.color}",hoverBackground:"{primary.hover.color}",activeBackground:"{primary.active.color}",borderColor:"{primary.color}",hoverBorderColor:"{primary.hover.color}",activeBorderColor:"{primary.active.color}",color:"{primary.contrast.color}",hoverColor:"{primary.contrast.color}",activeColor:"{primary.contrast.color}",focusRing:{color:"{primary.color}",shadow:"none"}},secondary:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",borderColor:"{surface.800}",hoverBorderColor:"{surface.700}",activeBorderColor:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}",focusRing:{color:"{surface.300}",shadow:"none"}},info:{background:"{sky.400}",hoverBackground:"{sky.300}",activeBackground:"{sky.200}",borderColor:"{sky.400}",hoverBorderColor:"{sky.300}",activeBorderColor:"{sky.200}",color:"{sky.950}",hoverColor:"{sky.950}",activeColor:"{sky.950}",focusRing:{color:"{sky.400}",shadow:"none"}},success:{background:"{green.400}",hoverBackground:"{green.300}",activeBackground:"{green.200}",borderColor:"{green.400}",hoverBorderColor:"{green.300}",activeBorderColor:"{green.200}",color:"{green.950}",hoverColor:"{green.950}",activeColor:"{green.950}",focusRing:{color:"{green.400}",shadow:"none"}},warn:{background:"{orange.400}",hoverBackground:"{orange.300}",activeBackground:"{orange.200}",borderColor:"{orange.400}",hoverBorderColor:"{orange.300}",activeBorderColor:"{orange.200}",color:"{orange.950}",hoverColor:"{orange.950}",activeColor:"{orange.950}",focusRing:{color:"{orange.400}",shadow:"none"}},help:{background:"{purple.400}",hoverBackground:"{purple.300}",activeBackground:"{purple.200}",borderColor:"{purple.400}",hoverBorderColor:"{purple.300}",activeBorderColor:"{purple.200}",color:"{purple.950}",hoverColor:"{purple.950}",activeColor:"{purple.950}",focusRing:{color:"{purple.400}",shadow:"none"}},danger:{background:"{red.400}",hoverBackground:"{red.300}",activeBackground:"{red.200}",borderColor:"{red.400}",hoverBorderColor:"{red.300}",activeBorderColor:"{red.200}",color:"{red.950}",hoverColor:"{red.950}",activeColor:"{red.950}",focusRing:{color:"{red.400}",shadow:"none"}},contrast:{background:"{surface.0}",hoverBackground:"{surface.100}",activeBackground:"{surface.200}",borderColor:"{surface.0}",hoverBorderColor:"{surface.100}",activeBorderColor:"{surface.200}",color:"{surface.950}",hoverColor:"{surface.950}",activeColor:"{surface.950}",focusRing:{color:"{surface.0}",shadow:"none"}}},outlined:{primary:{hoverBackground:"color-mix(in srgb, {primary.color}, transparent 96%)",activeBackground:"color-mix(in srgb, {primary.color}, transparent 84%)",borderColor:"{primary.700}",color:"{primary.color}"},secondary:{hoverBackground:"rgba(255,255,255,0.04)",activeBackground:"rgba(255,255,255,0.16)",borderColor:"{surface.700}",color:"{surface.400}"},success:{hoverBackground:"color-mix(in srgb, {green.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {green.400}, transparent 84%)",borderColor:"{green.700}",color:"{green.400}"},info:{hoverBackground:"color-mix(in srgb, {sky.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {sky.400}, transparent 84%)",borderColor:"{sky.700}",color:"{sky.400}"},warn:{hoverBackground:"color-mix(in srgb, {orange.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {orange.400}, transparent 84%)",borderColor:"{orange.700}",color:"{orange.400}"},help:{hoverBackground:"color-mix(in srgb, {purple.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {purple.400}, transparent 84%)",borderColor:"{purple.700}",color:"{purple.400}"},danger:{hoverBackground:"color-mix(in srgb, {red.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {red.400}, transparent 84%)",borderColor:"{red.700}",color:"{red.400}"},contrast:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{surface.500}",color:"{surface.0}"},plain:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{surface.600}",color:"{surface.0}"}},text:{primary:{hoverBackground:"color-mix(in srgb, {primary.color}, transparent 96%)",activeBackground:"color-mix(in srgb, {primary.color}, transparent 84%)",color:"{primary.color}"},secondary:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.400}"},success:{hoverBackground:"color-mix(in srgb, {green.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {green.400}, transparent 84%)",color:"{green.400}"},info:{hoverBackground:"color-mix(in srgb, {sky.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {sky.400}, transparent 84%)",color:"{sky.400}"},warn:{hoverBackground:"color-mix(in srgb, {orange.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {orange.400}, transparent 84%)",color:"{orange.400}"},help:{hoverBackground:"color-mix(in srgb, {purple.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {purple.400}, transparent 84%)",color:"{purple.400}"},danger:{hoverBackground:"color-mix(in srgb, {red.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {red.400}, transparent 84%)",color:"{red.400}"},contrast:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.0}"},plain:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.0}"}},link:{color:"{primary.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"}}},UI={root:WI,colorScheme:$I},jI={background:"{content.background}",borderRadius:"{border.radius.xl}",color:"{content.color}",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},KI={padding:"1.25rem",gap:"0.5rem"},qI={gap:"0.5rem"},YI={fontSize:"1.25rem",fontWeight:"500"},QI={color:"{text.muted.color}"},XI={root:jI,body:KI,caption:qI,title:YI,subtitle:QI},ZI={transitionDuration:"{transition.duration}"},JI={gap:"0.25rem"},eL={padding:"1rem",gap:"0.5rem"},tL={width:"2rem",height:"0.5rem",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},oL={light:{indicator:{background:"{surface.200}",hoverBackground:"{surface.300}",activeBackground:"{primary.color}"}},dark:{indicator:{background:"{surface.700}",hoverBackground:"{surface.600}",activeBackground:"{primary.color}"}}},iL={root:ZI,content:JI,indicatorList:eL,indicator:tL,colorScheme:oL},sL={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},rL={width:"2.5rem",color:"{form.field.icon.color}"},nL={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},aL={padding:"{list.padding}",gap:"{list.gap}",mobileIndent:"1rem"},lL={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}",icon:{color:"{list.option.icon.color}",focusColor:"{list.option.icon.focus.color}",size:"0.875rem"}},dL={color:"{form.field.icon.color}"},cL={root:sL,dropdown:rL,overlay:nL,list:aL,option:lL,clearIcon:dL},uL={borderRadius:"{border.radius.sm}",width:"1.25rem",height:"1.25rem",background:"{form.field.background}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.border.color}",checkedBorderColor:"{primary.color}",checkedHoverBorderColor:"{primary.hover.color}",checkedFocusBorderColor:"{primary.color}",checkedDisabledBorderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",shadow:"{form.field.shadow}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}},hL={size:"0.875rem",color:"{form.field.color}",checkedColor:"{primary.contrast.color}",checkedHoverColor:"{primary.contrast.color}",disabledColor:"{form.field.disabled.color}",sm:{size:"0.75rem"},lg:{size:"1rem"}},pL={root:uL,icon:hL},gL={borderRadius:"16px",paddingX:"0.75rem",paddingY:"0.5rem",gap:"0.5rem",transitionDuration:"{transition.duration}"},fL={width:"2rem",height:"2rem"},mL={size:"1rem"},vL={size:"1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"}},CL={light:{root:{background:"{surface.100}",color:"{surface.800}"},icon:{color:"{surface.800}"},removeIcon:{color:"{surface.800}"}},dark:{root:{background:"{surface.800}",color:"{surface.0}"},icon:{color:"{surface.0}"},removeIcon:{color:"{surface.0}"}}},bL={root:gL,image:fL,icon:mL,removeIcon:vL,colorScheme:CL},wL={transitionDuration:"{transition.duration}"},yL={width:"1.5rem",height:"1.5rem",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},SL={shadow:"{overlay.popover.shadow}",borderRadius:"{overlay.popover.borderRadius}"},RL={light:{panel:{background:"{surface.800}",borderColor:"{surface.900}"},handle:{color:"{surface.0}"}},dark:{panel:{background:"{surface.900}",borderColor:"{surface.700}"},handle:{color:"{surface.0}"}}},xL={root:wL,preview:yL,panel:SL,colorScheme:RL},FL={size:"2rem",color:"{overlay.modal.color}"},kL={gap:"1rem"},DL={icon:FL,content:kL},ML={background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",color:"{overlay.popover.color}",borderRadius:"{overlay.popover.border.radius}",shadow:"{overlay.popover.shadow}",gutter:"10px",arrowOffset:"1.25rem"},PL={padding:"{overlay.popover.padding}",gap:"1rem"},EL={size:"1.5rem",color:"{overlay.popover.color}"},AL={gap:"0.5rem",padding:"0 {overlay.popover.padding} {overlay.popover.padding} {overlay.popover.padding}"},TL={root:ML,content:PL,icon:EL,footer:AL},IL={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},LL={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},BL={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},OL={mobileIndent:"1rem"},GL={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},NL={borderColor:"{content.border.color}"},VL={root:IL,list:LL,item:BL,submenu:OL,submenuIcon:GL,separator:NL},HL={transitionDuration:"{transition.duration}"},_L={background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},zL={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{datatable.border.color}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",gap:"0.5rem",padding:"0.75rem 1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},WL={fontWeight:"600"},$L={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},UL={borderColor:"{datatable.border.color}",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},jL={background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},KL={fontWeight:"600"},qL={background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},YL={color:"{primary.color}"},QL={width:"0.5rem"},XL={width:"1px",color:"{primary.color}"},ZL={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",size:"0.875rem"},JL={size:"2rem"},eB={hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",selectedHoverColor:"{primary.color}",size:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},tB={inlineGap:"0.5rem",overlaySelect:{background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},overlayPopover:{background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",borderRadius:"{overlay.popover.border.radius}",color:"{overlay.popover.color}",shadow:"{overlay.popover.shadow}",padding:"{overlay.popover.padding}",gap:"0.5rem"},rule:{borderColor:"{content.border.color}"},constraintList:{padding:"{list.padding}",gap:"{list.gap}"},constraint:{focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",separator:{borderColor:"{content.border.color}"},padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"}},oB={borderColor:"{datatable.border.color}",borderWidth:"0 0 1px 0"},iB={borderColor:"{datatable.border.color}",borderWidth:"0 0 1px 0"},sB={light:{root:{borderColor:"{content.border.color}"},row:{stripedBackground:"{surface.50}"},bodyCell:{selectedBorderColor:"{primary.100}"}},dark:{root:{borderColor:"{surface.800}"},row:{stripedBackground:"{surface.950}"},bodyCell:{selectedBorderColor:"{primary.900}"}}},rB={root:HL,header:_L,headerCell:zL,columnTitle:WL,row:$L,bodyCell:UL,footerCell:jL,columnFooter:KL,footer:qL,dropPoint:YL,columnResizer:QL,resizeIndicator:XL,sortIcon:ZL,loadingIcon:JL,rowToggleButton:eB,filter:tB,paginatorTop:oB,paginatorBottom:iB,colorScheme:sB},nB={borderColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0"},aB={background:"{content.background}",color:"{content.color}",borderColor:"{content.border.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",borderRadius:"0"},lB={background:"{content.background}",color:"{content.color}",borderColor:"transparent",borderWidth:"0",padding:"0",borderRadius:"0"},dB={background:"{content.background}",color:"{content.color}",borderColor:"{content.border.color}",borderWidth:"1px 0 0 0",padding:"0.75rem 1rem",borderRadius:"0"},cB={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},uB={borderColor:"{content.border.color}",borderWidth:"1px 0 0 0"},hB={root:nB,header:aB,content:lB,footer:dB,paginatorTop:cB,paginatorBottom:uB},pB={transitionDuration:"{transition.duration}"},gB={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.popover.shadow}",padding:"{overlay.popover.padding}"},fB={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",padding:"0 0 0.5rem 0"},mB={gap:"0.5rem",fontWeight:"500"},vB={width:"2.5rem",sm:{width:"2rem"},lg:{width:"3rem"},borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},CB={color:"{form.field.icon.color}"},bB={hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",padding:"0.25rem 0.5rem",borderRadius:"{content.border.radius}"},wB={hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",padding:"0.25rem 0.5rem",borderRadius:"{content.border.radius}"},yB={borderColor:"{content.border.color}",gap:"{overlay.popover.padding}"},SB={margin:"0.5rem 0 0 0"},RB={padding:"0.25rem",fontWeight:"500",color:"{content.color}"},xB={hoverBackground:"{content.hover.background}",selectedBackground:"{primary.color}",rangeSelectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{primary.contrast.color}",rangeSelectedColor:"{highlight.color}",width:"2rem",height:"2rem",borderRadius:"50%",padding:"0.25rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},FB={margin:"0.5rem 0 0 0"},kB={padding:"0.375rem",borderRadius:"{content.border.radius}"},DB={margin:"0.5rem 0 0 0"},MB={padding:"0.375rem",borderRadius:"{content.border.radius}"},PB={padding:"0.5rem 0 0 0",borderColor:"{content.border.color}"},EB={padding:"0.5rem 0 0 0",borderColor:"{content.border.color}",gap:"0.5rem",buttonGap:"0.25rem"},AB={light:{dropdown:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}"},today:{background:"{surface.200}",color:"{surface.900}"}},dark:{dropdown:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}"},today:{background:"{surface.700}",color:"{surface.0}"}}},TB={root:pB,panel:gB,header:fB,title:mB,dropdown:vB,inputIcon:CB,selectMonth:bB,selectYear:wB,group:yB,dayView:SB,weekDay:RB,date:xB,monthView:FB,month:kB,yearView:DB,year:MB,buttonbar:PB,timePicker:EB,colorScheme:AB},IB={background:"{overlay.modal.background}",borderColor:"{overlay.modal.border.color}",color:"{overlay.modal.color}",borderRadius:"{overlay.modal.border.radius}",shadow:"{overlay.modal.shadow}"},LB={padding:"{overlay.modal.padding}",gap:"0.5rem"},BB={fontSize:"1.25rem",fontWeight:"600"},OB={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}"},GB={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}",gap:"0.5rem"},NB={root:IB,header:LB,title:BB,content:OB,footer:GB},VB={borderColor:"{content.border.color}"},HB={background:"{content.background}",color:"{text.color}"},_B={margin:"1rem 0",padding:"0 1rem",content:{padding:"0 0.5rem"}},zB={margin:"0 1rem",padding:"0.5rem 0",content:{padding:"0.5rem 0"}},WB={root:VB,content:HB,horizontal:_B,vertical:zB},$B={background:"rgba(255, 255, 255, 0.1)",borderColor:"rgba(255, 255, 255, 0.2)",padding:"0.5rem",borderRadius:"{border.radius.xl}"},UB={borderRadius:"{content.border.radius}",padding:"0.5rem",size:"3rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},jB={root:$B,item:UB},KB={background:"{overlay.modal.background}",borderColor:"{overlay.modal.border.color}",color:"{overlay.modal.color}",shadow:"{overlay.modal.shadow}"},qB={padding:"{overlay.modal.padding}"},YB={fontSize:"1.5rem",fontWeight:"600"},QB={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}"},XB={padding:"{overlay.modal.padding}"},ZB={root:KB,header:qB,title:YB,content:QB,footer:XB},JB={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}"},eO={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},tO={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}",padding:"{list.padding}"},oO={focusBackground:"{list.option.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},iO={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},sO={toolbar:JB,toolbarItem:eO,overlay:tO,overlayOption:oO,content:iO},rO={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",padding:"0 1.125rem 1.125rem 1.125rem",transitionDuration:"{transition.duration}"},nO={background:"{content.background}",hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",borderRadius:"{content.border.radius}",borderWidth:"1px",borderColor:"transparent",padding:"0.5rem 0.75rem",gap:"0.5rem",fontWeight:"600",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},aO={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}"},lO={padding:"0"},dO={root:rO,legend:nO,toggleIcon:aO,content:lO},cO={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",transitionDuration:"{transition.duration}"},uO={background:"transparent",color:"{text.color}",padding:"1.125rem",borderColor:"unset",borderWidth:"0",borderRadius:"0",gap:"0.5rem"},hO={highlightBorderColor:"{primary.color}",padding:"0 1.125rem 1.125rem 1.125rem",gap:"1rem"},pO={padding:"1rem",gap:"1rem",borderColor:"{content.border.color}",info:{gap:"0.5rem"}},gO={gap:"0.5rem"},fO={height:"0.25rem"},mO={gap:"0.5rem"},vO={root:cO,header:uO,content:hO,file:pO,fileList:gO,progressbar:fO,basic:mO},CO={color:"{form.field.float.label.color}",focusColor:"{form.field.float.label.focus.color}",activeColor:"{form.field.float.label.active.color}",invalidColor:"{form.field.float.label.invalid.color}",transitionDuration:"0.2s",positionX:"{form.field.padding.x}",positionY:"{form.field.padding.y}",fontWeight:"500",active:{fontSize:"0.75rem",fontWeight:"400"}},bO={active:{top:"-1.25rem"}},wO={input:{paddingTop:"1.5rem",paddingBottom:"{form.field.padding.y}"},active:{top:"{form.field.padding.y}"}},yO={borderRadius:"{border.radius.xs}",active:{background:"{form.field.background}",padding:"0 0.125rem"}},SO={root:CO,over:bO,in:wO,on:yO},RO={borderWidth:"1px",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",transitionDuration:"{transition.duration}"},xO={background:"rgba(255, 255, 255, 0.1)",hoverBackground:"rgba(255, 255, 255, 0.2)",color:"{surface.100}",hoverColor:"{surface.0}",size:"3rem",gutter:"0.5rem",prev:{borderRadius:"50%"},next:{borderRadius:"50%"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},FO={size:"1.5rem"},kO={background:"{content.background}",padding:"1rem 0.25rem"},DO={size:"2rem",borderRadius:"{content.border.radius}",gutter:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},MO={size:"1rem"},PO={background:"rgba(0, 0, 0, 0.5)",color:"{surface.100}",padding:"1rem"},EO={gap:"0.5rem",padding:"1rem"},AO={width:"1rem",height:"1rem",activeBackground:"{primary.color}",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},TO={background:"rgba(0, 0, 0, 0.5)"},IO={background:"rgba(255, 255, 255, 0.4)",hoverBackground:"rgba(255, 255, 255, 0.6)",activeBackground:"rgba(255, 255, 255, 0.9)"},LO={size:"3rem",gutter:"0.5rem",background:"rgba(255, 255, 255, 0.1)",hoverBackground:"rgba(255, 255, 255, 0.2)",color:"{surface.50}",hoverColor:"{surface.0}",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},BO={size:"1.5rem"},OO={light:{thumbnailNavButton:{hoverBackground:"{surface.100}",color:"{surface.600}",hoverColor:"{surface.700}"},indicatorButton:{background:"{surface.200}",hoverBackground:"{surface.300}"}},dark:{thumbnailNavButton:{hoverBackground:"{surface.700}",color:"{surface.400}",hoverColor:"{surface.0}"},indicatorButton:{background:"{surface.700}",hoverBackground:"{surface.600}"}}},GO={root:RO,navButton:xO,navIcon:FO,thumbnailsContent:kO,thumbnailNavButton:DO,thumbnailNavButtonIcon:MO,caption:PO,indicatorList:EO,indicatorButton:AO,insetIndicatorList:TO,insetIndicatorButton:IO,closeButton:LO,closeButtonIcon:BO,colorScheme:OO},NO={color:"{form.field.icon.color}"},VO={icon:NO},HO={color:"{form.field.float.label.color}",focusColor:"{form.field.float.label.focus.color}",invalidColor:"{form.field.float.label.invalid.color}",transitionDuration:"0.2s",positionX:"{form.field.padding.x}",top:"{form.field.padding.y}",fontSize:"0.75rem",fontWeight:"400"},_O={paddingTop:"1.5rem",paddingBottom:"{form.field.padding.y}"},zO={root:HO,input:_O},WO={transitionDuration:"{transition.duration}"},$O={icon:{size:"1.5rem"},mask:{background:"{mask.background}",color:"{mask.color}"}},UO={position:{left:"auto",right:"1rem",top:"1rem",bottom:"auto"},blur:"8px",background:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.2)",borderWidth:"1px",borderRadius:"30px",padding:".5rem",gap:"0.5rem"},jO={hoverBackground:"rgba(255,255,255,0.1)",color:"{surface.50}",hoverColor:"{surface.0}",size:"3rem",iconSize:"1.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},KO={root:WO,preview:$O,toolbar:UO,action:jO},qO={size:"15px",hoverSize:"30px",background:"rgba(255,255,255,0.3)",hoverBackground:"rgba(255,255,255,0.3)",borderColor:"unset",hoverBorderColor:"unset",borderWidth:"0",borderRadius:"50%",transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"rgba(255,255,255,0.3)",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},YO={handle:qO},QO={padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{content.border.radius}",gap:"0.5rem"},XO={fontWeight:"500"},ZO={size:"1rem"},JO={light:{info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)"},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)"},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)"},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)"},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)"},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)"}},dark:{info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)"},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)"},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)"},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)"},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)"},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)"}}},e1={root:QO,text:XO,icon:ZO,colorScheme:JO},t1={padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{transition.duration}"},o1={hoverBackground:"{content.hover.background}",hoverColor:"{content.hover.color}"},i1={root:t1,display:o1},s1={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}"},r1={borderRadius:"{border.radius.sm}"},n1={light:{chip:{focusBackground:"{surface.200}",color:"{surface.800}"}},dark:{chip:{focusBackground:"{surface.700}",color:"{surface.0}"}}},a1={root:s1,chip:r1,colorScheme:n1},l1={background:"{form.field.background}",borderColor:"{form.field.border.color}",color:"{form.field.icon.color}",borderRadius:"{form.field.border.radius}",padding:"0.5rem",minWidth:"2.5rem"},d1={addon:l1},c1={transitionDuration:"{transition.duration}"},u1={width:"2.5rem",borderRadius:"{form.field.border.radius}",verticalPadding:"{form.field.padding.y}"},h1={light:{button:{background:"transparent",hoverBackground:"{surface.100}",activeBackground:"{surface.200}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",color:"{surface.400}",hoverColor:"{surface.500}",activeColor:"{surface.600}"}},dark:{button:{background:"transparent",hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",color:"{surface.400}",hoverColor:"{surface.300}",activeColor:"{surface.200}"}}},p1={root:c1,button:u1,colorScheme:h1},g1={gap:"0.5rem"},f1={width:"2.5rem",sm:{width:"2rem"},lg:{width:"3rem"}},m1={root:g1,input:f1},v1={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},C1={root:v1},b1={transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},w1={background:"{primary.color}"},y1={background:"{content.border.color}"},S1={color:"{text.muted.color}"},R1={root:b1,value:w1,range:y1,text:S1},x1={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",borderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",shadow:"{form.field.shadow}",borderRadius:"{form.field.border.radius}",transitionDuration:"{form.field.transition.duration}"},F1={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},k1={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},D1={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},M1={color:"{list.option.color}",gutterStart:"-0.375rem",gutterEnd:"0.375rem"},P1={padding:"{list.option.padding}"},E1={light:{option:{stripedBackground:"{surface.50}"}},dark:{option:{stripedBackground:"{surface.900}"}}},A1={root:x1,list:F1,option:k1,optionGroup:D1,checkmark:M1,emptyMessage:P1,colorScheme:E1},T1={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",verticalOrientation:{padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},horizontalOrientation:{padding:"0.5rem 0.75rem",gap:"0.5rem"},transitionDuration:"{transition.duration}"},I1={borderRadius:"{content.border.radius}",padding:"{navigation.item.padding}"},L1={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},B1={padding:"0",background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",shadow:"{overlay.navigation.shadow}",gap:"0.5rem"},O1={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},G1={padding:"{navigation.submenu.label.padding}",fontWeight:"{navigation.submenu.label.font.weight}",background:"{navigation.submenu.label.background.}",color:"{navigation.submenu.label.color}"},N1={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},V1={borderColor:"{content.border.color}"},H1={borderRadius:"50%",size:"1.75rem",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",hoverBackground:"{content.hover.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},_1={root:T1,baseItem:I1,item:L1,overlay:B1,submenu:O1,submenuLabel:G1,submenuIcon:N1,separator:V1,mobileButton:H1},z1={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},W1={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},$1={focusBackground:"{navigation.item.focus.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}"}},U1={padding:"{navigation.submenu.label.padding}",fontWeight:"{navigation.submenu.label.font.weight}",background:"{navigation.submenu.label.background}",color:"{navigation.submenu.label.color}"},j1={borderColor:"{content.border.color}"},K1={root:z1,list:W1,item:$1,submenuLabel:U1,separator:j1},q1={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",padding:"0.5rem 0.75rem",transitionDuration:"{transition.duration}"},Y1={borderRadius:"{content.border.radius}",padding:"{navigation.item.padding}"},Q1={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},X1={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}",background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",mobileIndent:"1rem",icon:{size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"}},Z1={borderColor:"{content.border.color}"},J1={borderRadius:"50%",size:"1.75rem",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",hoverBackground:"{content.hover.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},eG={root:q1,baseItem:Y1,item:Q1,submenu:X1,separator:Z1,mobileButton:J1},tG={borderRadius:"{content.border.radius}",borderWidth:"1px",transitionDuration:"{transition.duration}"},oG={padding:"0.5rem 0.75rem",gap:"0.5rem",sm:{padding:"0.375rem 0.625rem"},lg:{padding:"0.625rem 0.875rem"}},iG={fontSize:"1rem",fontWeight:"500",sm:{fontSize:"0.875rem"},lg:{fontSize:"1.125rem"}},sG={size:"1.125rem",sm:{size:"1rem"},lg:{size:"1.25rem"}},rG={width:"1.75rem",height:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"}},nG={size:"1rem",sm:{size:"0.875rem"},lg:{size:"1.125rem"}},aG={root:{borderWidth:"1px"}},lG={content:{padding:"0"}},dG={light:{info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"{blue.100}",focusRing:{color:"{blue.600}",shadow:"none"}},outlined:{color:"{blue.600}",borderColor:"{blue.600}"},simple:{color:"{blue.600}"}},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"{green.100}",focusRing:{color:"{green.600}",shadow:"none"}},outlined:{color:"{green.600}",borderColor:"{green.600}"},simple:{color:"{green.600}"}},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"{yellow.100}",focusRing:{color:"{yellow.600}",shadow:"none"}},outlined:{color:"{yellow.600}",borderColor:"{yellow.600}"},simple:{color:"{yellow.600}"}},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"{red.100}",focusRing:{color:"{red.600}",shadow:"none"}},outlined:{color:"{red.600}",borderColor:"{red.600}"},simple:{color:"{red.600}"}},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.200}",focusRing:{color:"{surface.600}",shadow:"none"}},outlined:{color:"{surface.500}",borderColor:"{surface.500}"},simple:{color:"{surface.500}"}},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.800}",focusRing:{color:"{surface.50}",shadow:"none"}},outlined:{color:"{surface.950}",borderColor:"{surface.950}"},simple:{color:"{surface.950}"}}},dark:{info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{blue.500}",shadow:"none"}},outlined:{color:"{blue.500}",borderColor:"{blue.500}"},simple:{color:"{blue.500}"}},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{green.500}",shadow:"none"}},outlined:{color:"{green.500}",borderColor:"{green.500}"},simple:{color:"{green.500}"}},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{yellow.500}",shadow:"none"}},outlined:{color:"{yellow.500}",borderColor:"{yellow.500}"},simple:{color:"{yellow.500}"}},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{red.500}",shadow:"none"}},outlined:{color:"{red.500}",borderColor:"{red.500}"},simple:{color:"{red.500}"}},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.700}",focusRing:{color:"{surface.300}",shadow:"none"}},outlined:{color:"{surface.400}",borderColor:"{surface.400}"},simple:{color:"{surface.400}"}},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.100}",focusRing:{color:"{surface.950}",shadow:"none"}},outlined:{color:"{surface.0}",borderColor:"{surface.0}"},simple:{color:"{surface.0}"}}}},cG={root:tG,content:oG,text:iG,icon:sG,closeButton:rG,closeIcon:nG,outlined:aG,simple:lG,colorScheme:dG},uG={borderRadius:"{content.border.radius}",gap:"1rem"},hG={background:"{content.border.color}",size:"0.5rem"},pG={gap:"0.5rem"},gG={size:"0.5rem"},fG={size:"1rem"},mG={verticalGap:"0.5rem",horizontalGap:"1rem"},vG={root:uG,meters:hG,label:pG,labelMarker:gG,labelIcon:fG,labelList:mG},CG={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},bG={width:"2.5rem",color:"{form.field.icon.color}"},wG={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},yG={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},SG={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}",gap:"0.5rem"},RG={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},xG={color:"{form.field.icon.color}"},FG={borderRadius:"{border.radius.sm}"},kG={padding:"{list.option.padding}"},DG={root:CG,dropdown:bG,overlay:wG,list:yG,option:SG,optionGroup:RG,chip:FG,clearIcon:xG,emptyMessage:kG},MG={gap:"1.125rem"},PG={gap:"0.5rem"},EG={root:MG,controls:PG},AG={gutter:"0.75rem",transitionDuration:"{transition.duration}"},TG={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{content.border.color}",color:"{content.color}",selectedColor:"{highlight.color}",hoverColor:"{content.hover.color}",padding:"0.75rem 1rem",toggleablePadding:"0.75rem 1rem 1.25rem 1rem",borderRadius:"{content.border.radius}"},IG={background:"{content.background}",hoverBackground:"{content.hover.background}",borderColor:"{content.border.color}",color:"{text.muted.color}",hoverColor:"{text.color}",size:"1.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},LG={color:"{content.border.color}",borderRadius:"{content.border.radius}",height:"24px"},BG={root:AG,node:TG,nodeToggleButton:IG,connector:LG},OG={outline:{width:"2px",color:"{content.background}"}},GG={root:OG},NG={padding:"0.5rem 1rem",gap:"0.25rem",borderRadius:"{content.border.radius}",background:"{content.background}",color:"{content.color}",transitionDuration:"{transition.duration}"},VG={background:"transparent",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedColor:"{highlight.color}",width:"2.5rem",height:"2.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},HG={color:"{text.muted.color}"},_G={maxWidth:"2.5rem"},zG={root:NG,navButton:VG,currentPageReport:HG,jumpToPageInput:_G},WG={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},$G={background:"transparent",color:"{text.color}",padding:"1.125rem",borderColor:"{content.border.color}",borderWidth:"0",borderRadius:"0"},UG={padding:"0.375rem 1.125rem"},jG={fontWeight:"600"},KG={padding:"0 1.125rem 1.125rem 1.125rem"},qG={padding:"0 1.125rem 1.125rem 1.125rem"},YG={root:WG,header:$G,toggleableHeader:UG,title:jG,content:KG,footer:qG},QG={gap:"0.5rem",transitionDuration:"{transition.duration}"},XG={background:"{content.background}",borderColor:"{content.border.color}",borderWidth:"1px",color:"{content.color}",padding:"0.25rem 0.25rem",borderRadius:"{content.border.radius}",first:{borderWidth:"1px",topBorderRadius:"{content.border.radius}"},last:{borderWidth:"1px",bottomBorderRadius:"{content.border.radius}"}},ZG={focusBackground:"{navigation.item.focus.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",gap:"0.5rem",padding:"{navigation.item.padding}",borderRadius:"{content.border.radius}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}"}},JG={indent:"1rem"},eN={color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}"},tN={root:QG,panel:XG,item:ZG,submenu:JG,submenuIcon:eN},oN={background:"{content.border.color}",borderRadius:"{content.border.radius}",height:".75rem"},iN={color:"{form.field.icon.color}"},sN={background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",borderRadius:"{overlay.popover.border.radius}",color:"{overlay.popover.color}",padding:"{overlay.popover.padding}",shadow:"{overlay.popover.shadow}"},rN={gap:"0.5rem"},nN={light:{strength:{weakBackground:"{red.500}",mediumBackground:"{amber.500}",strongBackground:"{green.500}"}},dark:{strength:{weakBackground:"{red.400}",mediumBackground:"{amber.400}",strongBackground:"{green.400}"}}},aN={meter:oN,icon:iN,overlay:sN,content:rN,colorScheme:nN},lN={gap:"1.125rem"},dN={gap:"0.5rem"},cN={root:lN,controls:dN},uN={background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",color:"{overlay.popover.color}",borderRadius:"{overlay.popover.border.radius}",shadow:"{overlay.popover.shadow}",gutter:"10px",arrowOffset:"1.25rem"},hN={padding:"{overlay.popover.padding}"},pN={root:uN,content:hN},gN={background:"{content.border.color}",borderRadius:"{content.border.radius}",height:"1.25rem"},fN={background:"{primary.color}"},mN={color:"{primary.contrast.color}",fontSize:"0.75rem",fontWeight:"600"},vN={root:gN,value:fN,label:mN},CN={light:{root:{colorOne:"{red.500}",colorTwo:"{blue.500}",colorThree:"{green.500}",colorFour:"{yellow.500}"}},dark:{root:{colorOne:"{red.400}",colorTwo:"{blue.400}",colorThree:"{green.400}",colorFour:"{yellow.400}"}}},bN={colorScheme:CN},wN={width:"1.25rem",height:"1.25rem",background:"{form.field.background}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.border.color}",checkedBorderColor:"{primary.color}",checkedHoverBorderColor:"{primary.hover.color}",checkedFocusBorderColor:"{primary.color}",checkedDisabledBorderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",shadow:"{form.field.shadow}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}},yN={size:"0.75rem",checkedColor:"{primary.contrast.color}",checkedHoverColor:"{primary.contrast.color}",disabledColor:"{form.field.disabled.color}",sm:{size:"0.5rem"},lg:{size:"1rem"}},SN={root:wN,icon:yN},RN={gap:"0.25rem",transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},xN={size:"1rem",color:"{text.muted.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"},FN={root:RN,icon:xN},kN={light:{root:{background:"rgba(0,0,0,0.1)"}},dark:{root:{background:"rgba(255,255,255,0.3)"}}},DN={colorScheme:kN},MN={transitionDuration:"{transition.duration}"},PN={size:"9px",borderRadius:"{border.radius.sm}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},EN={light:{bar:{background:"{surface.100}"}},dark:{bar:{background:"{surface.800}"}}},AN={root:MN,bar:PN,colorScheme:EN},TN={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},IN={width:"2.5rem",color:"{form.field.icon.color}"},LN={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},BN={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},ON={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},GN={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},NN={color:"{form.field.icon.color}"},VN={color:"{list.option.color}",gutterStart:"-0.375rem",gutterEnd:"0.375rem"},HN={padding:"{list.option.padding}"},_N={root:TN,dropdown:IN,overlay:LN,list:BN,option:ON,optionGroup:GN,clearIcon:NN,checkmark:VN,emptyMessage:HN},zN={borderRadius:"{form.field.border.radius}"},WN={light:{root:{invalidBorderColor:"{form.field.invalid.border.color}"}},dark:{root:{invalidBorderColor:"{form.field.invalid.border.color}"}}},$N={root:zN,colorScheme:WN},UN={borderRadius:"{content.border.radius}"},jN={light:{root:{background:"{surface.200}",animationBackground:"rgba(255,255,255,0.4)"}},dark:{root:{background:"rgba(255, 255, 255, 0.06)",animationBackground:"rgba(255, 255, 255, 0.04)"}}},KN={root:UN,colorScheme:jN},qN={transitionDuration:"{transition.duration}"},YN={background:"{content.border.color}",borderRadius:"{content.border.radius}",size:"3px"},QN={background:"{primary.color}"},XN={width:"20px",height:"20px",borderRadius:"50%",background:"{content.border.color}",hoverBackground:"{content.border.color}",content:{borderRadius:"50%",hoverBackground:"{content.background}",width:"16px",height:"16px",shadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.08), 0px 1px 1px 0px rgba(0, 0, 0, 0.14)"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},ZN={light:{handle:{content:{background:"{surface.0}"}}},dark:{handle:{content:{background:"{surface.950}"}}}},JN={root:qN,track:YN,range:QN,handle:XN,colorScheme:ZN},eV={gap:"0.5rem",transitionDuration:"{transition.duration}"},tV={root:eV},oV={borderRadius:"{form.field.border.radius}",roundedBorderRadius:"2rem",raisedShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)"},iV={root:oV},sV={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",transitionDuration:"{transition.duration}"},rV={background:"{content.border.color}"},nV={size:"24px",background:"transparent",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},aV={root:sV,gutter:rV,handle:nV},lV={transitionDuration:"{transition.duration}"},dV={background:"{content.border.color}",activeBackground:"{primary.color}",margin:"0 0 0 1.625rem",size:"2px"},cV={padding:"0.5rem",gap:"1rem"},uV={padding:"0",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},gap:"0.5rem"},hV={color:"{text.muted.color}",activeColor:"{primary.color}",fontWeight:"500"},pV={background:"{content.background}",activeBackground:"{content.background}",borderColor:"{content.border.color}",activeBorderColor:"{content.border.color}",color:"{text.muted.color}",activeColor:"{primary.color}",size:"2rem",fontSize:"1.143rem",fontWeight:"500",borderRadius:"50%",shadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)"},gV={padding:"0.875rem 0.5rem 1.125rem 0.5rem"},fV={background:"{content.background}",color:"{content.color}",padding:"0",indent:"1rem"},mV={root:lV,separator:dV,step:cV,stepHeader:uV,stepTitle:hV,stepNumber:pV,steppanels:gV,steppanel:fV},vV={transitionDuration:"{transition.duration}"},CV={background:"{content.border.color}"},bV={borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},gap:"0.5rem"},wV={color:"{text.muted.color}",activeColor:"{primary.color}",fontWeight:"500"},yV={background:"{content.background}",activeBackground:"{content.background}",borderColor:"{content.border.color}",activeBorderColor:"{content.border.color}",color:"{text.muted.color}",activeColor:"{primary.color}",size:"2rem",fontSize:"1.143rem",fontWeight:"500",borderRadius:"50%",shadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)"},SV={root:vV,separator:CV,itemLink:bV,itemLabel:wV,itemNumber:yV},RV={transitionDuration:"{transition.duration}"},xV={borderWidth:"0 0 1px 0",background:"{content.background}",borderColor:"{content.border.color}"},FV={background:"transparent",hoverBackground:"transparent",activeBackground:"transparent",borderWidth:"0 0 1px 0",borderColor:"{content.border.color}",hoverBorderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}",padding:"1rem 1.125rem",fontWeight:"600",margin:"0 0 -1px 0",gap:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},kV={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},DV={height:"1px",bottom:"-1px",background:"{primary.color}"},MV={root:RV,tablist:xV,item:FV,itemIcon:kV,activeBar:DV},PV={transitionDuration:"{transition.duration}"},EV={borderWidth:"0 0 1px 0",background:"{content.background}",borderColor:"{content.border.color}"},AV={background:"transparent",hoverBackground:"transparent",activeBackground:"transparent",borderWidth:"0 0 1px 0",borderColor:"{content.border.color}",hoverBorderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}",padding:"1rem 1.125rem",fontWeight:"600",margin:"0 0 -1px 0",gap:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},TV={background:"{content.background}",color:"{content.color}",padding:"0.875rem 1.125rem 1.125rem 1.125rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"inset {focus.ring.shadow}"}},IV={background:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",width:"2.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},LV={height:"1px",bottom:"-1px",background:"{primary.color}"},BV={light:{navButton:{shadow:"0px 0px 10px 50px rgba(255, 255, 255, 0.6)"}},dark:{navButton:{shadow:"0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)"}}},OV={root:PV,tablist:EV,tab:AV,tabpanel:TV,navButton:IV,activeBar:LV,colorScheme:BV},GV={transitionDuration:"{transition.duration}"},NV={background:"{content.background}",borderColor:"{content.border.color}"},VV={borderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},HV={background:"{content.background}",color:"{content.color}"},_V={background:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}"},zV={light:{navButton:{shadow:"0px 0px 10px 50px rgba(255, 255, 255, 0.6)"}},dark:{navButton:{shadow:"0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)"}}},WV={root:GV,tabList:NV,tab:VV,tabPanel:HV,navButton:_V,colorScheme:zV},$V={fontSize:"0.875rem",fontWeight:"700",padding:"0.25rem 0.5rem",gap:"0.25rem",borderRadius:"{content.border.radius}",roundedBorderRadius:"{border.radius.xl}"},UV={size:"0.75rem"},jV={light:{primary:{background:"{primary.100}",color:"{primary.700}"},secondary:{background:"{surface.100}",color:"{surface.600}"},success:{background:"{green.100}",color:"{green.700}"},info:{background:"{sky.100}",color:"{sky.700}"},warn:{background:"{orange.100}",color:"{orange.700}"},danger:{background:"{red.100}",color:"{red.700}"},contrast:{background:"{surface.950}",color:"{surface.0}"}},dark:{primary:{background:"color-mix(in srgb, {primary.500}, transparent 84%)",color:"{primary.300}"},secondary:{background:"{surface.800}",color:"{surface.300}"},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",color:"{green.300}"},info:{background:"color-mix(in srgb, {sky.500}, transparent 84%)",color:"{sky.300}"},warn:{background:"color-mix(in srgb, {orange.500}, transparent 84%)",color:"{orange.300}"},danger:{background:"color-mix(in srgb, {red.500}, transparent 84%)",color:"{red.300}"},contrast:{background:"{surface.0}",color:"{surface.950}"}}},KV={root:$V,icon:UV,colorScheme:jV},qV={background:"{form.field.background}",borderColor:"{form.field.border.color}",color:"{form.field.color}",height:"18rem",padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{form.field.border.radius}"},YV={gap:"0.25rem"},QV={margin:"2px 0"},XV={root:qV,prompt:YV,commandResponse:QV},ZV={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},JV={root:ZV},eH={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},tH={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},oH={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},iH={mobileIndent:"1rem"},sH={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},rH={borderColor:"{content.border.color}"},nH={root:eH,list:tH,item:oH,submenu:iH,submenuIcon:sH,separator:rH},aH={minHeight:"5rem"},lH={eventContent:{padding:"1rem 0"}},dH={eventContent:{padding:"0 1rem"}},cH={size:"1.125rem",borderRadius:"50%",borderWidth:"2px",background:"{content.background}",borderColor:"{content.border.color}",content:{borderRadius:"50%",size:"0.375rem",background:"{primary.color}",insetShadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)"}},uH={color:"{content.border.color}",size:"2px"},hH={event:aH,horizontal:lH,vertical:dH,eventMarker:cH,eventConnector:uH},pH={width:"25rem",borderRadius:"{content.border.radius}",borderWidth:"1px",transitionDuration:"{transition.duration}"},gH={size:"1.125rem"},fH={padding:"{overlay.popover.padding}",gap:"0.5rem"},mH={gap:"0.5rem"},vH={fontWeight:"500",fontSize:"1rem"},CH={fontWeight:"500",fontSize:"0.875rem"},bH={width:"1.75rem",height:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"}},wH={size:"1rem"},yH={light:{root:{blur:"1.5px"},info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"{blue.100}",focusRing:{color:"{blue.600}",shadow:"none"}}},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"{green.100}",focusRing:{color:"{green.600}",shadow:"none"}}},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"{yellow.100}",focusRing:{color:"{yellow.600}",shadow:"none"}}},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"{red.100}",focusRing:{color:"{red.600}",shadow:"none"}}},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.200}",focusRing:{color:"{surface.600}",shadow:"none"}}},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.800}",focusRing:{color:"{surface.50}",shadow:"none"}}}},dark:{root:{blur:"10px"},info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{blue.500}",shadow:"none"}}},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{green.500}",shadow:"none"}}},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{yellow.500}",shadow:"none"}}},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{red.500}",shadow:"none"}}},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.700}",focusRing:{color:"{surface.300}",shadow:"none"}}},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",detailColor:"{surface.950}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.100}",focusRing:{color:"{surface.950}",shadow:"none"}}}}},SH={root:pH,icon:gH,content:fH,text:mH,summary:vH,detail:CH,closeButton:bH,closeIcon:wH,colorScheme:yH},RH={padding:"0.25rem",borderRadius:"{content.border.radius}",gap:"0.5rem",fontWeight:"500",disabledBackground:"{form.field.disabled.background}",disabledBorderColor:"{form.field.disabled.background}",disabledColor:"{form.field.disabled.color}",invalidBorderColor:"{form.field.invalid.border.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",padding:"0.25rem"},lg:{fontSize:"{form.field.lg.font.size}",padding:"0.25rem"}},xH={disabledColor:"{form.field.disabled.color}"},FH={padding:"0.25rem 0.75rem",borderRadius:"{content.border.radius}",checkedShadow:"0px 1px 2px 0px rgba(0, 0, 0, 0.02), 0px 1px 2px 0px rgba(0, 0, 0, 0.04)",sm:{padding:"0.25rem 0.75rem"},lg:{padding:"0.25rem 0.75rem"}},kH={light:{root:{background:"{surface.100}",checkedBackground:"{surface.100}",hoverBackground:"{surface.100}",borderColor:"{surface.100}",color:"{surface.500}",hoverColor:"{surface.700}",checkedColor:"{surface.900}",checkedBorderColor:"{surface.100}"},content:{checkedBackground:"{surface.0}"},icon:{color:"{surface.500}",hoverColor:"{surface.700}",checkedColor:"{surface.900}"}},dark:{root:{background:"{surface.950}",checkedBackground:"{surface.950}",hoverBackground:"{surface.950}",borderColor:"{surface.950}",color:"{surface.400}",hoverColor:"{surface.300}",checkedColor:"{surface.0}",checkedBorderColor:"{surface.950}"},content:{checkedBackground:"{surface.800}"},icon:{color:"{surface.400}",hoverColor:"{surface.300}",checkedColor:"{surface.0}"}}},DH={root:RH,icon:xH,content:FH,colorScheme:kH},MH={width:"2.5rem",height:"1.5rem",borderRadius:"30px",gap:"0.25rem",shadow:"{form.field.shadow}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},borderWidth:"1px",borderColor:"transparent",hoverBorderColor:"transparent",checkedBorderColor:"transparent",checkedHoverBorderColor:"transparent",invalidBorderColor:"{form.field.invalid.border.color}",transitionDuration:"{form.field.transition.duration}",slideDuration:"0.2s"},PH={borderRadius:"50%",size:"1rem"},EH={light:{root:{background:"{surface.300}",disabledBackground:"{form.field.disabled.background}",hoverBackground:"{surface.400}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}"},handle:{background:"{surface.0}",disabledBackground:"{form.field.disabled.color}",hoverBackground:"{surface.0}",checkedBackground:"{surface.0}",checkedHoverBackground:"{surface.0}",color:"{text.muted.color}",hoverColor:"{text.color}",checkedColor:"{primary.color}",checkedHoverColor:"{primary.hover.color}"}},dark:{root:{background:"{surface.700}",disabledBackground:"{surface.600}",hoverBackground:"{surface.600}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}"},handle:{background:"{surface.400}",disabledBackground:"{surface.900}",hoverBackground:"{surface.300}",checkedBackground:"{surface.900}",checkedHoverBackground:"{surface.900}",color:"{surface.900}",hoverColor:"{surface.800}",checkedColor:"{primary.color}",checkedHoverColor:"{primary.hover.color}"}}},AH={root:MH,handle:PH,colorScheme:EH},TH={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",padding:"0.75rem"},IH={root:TH},LH={maxWidth:"12.5rem",gutter:"0.25rem",shadow:"{overlay.popover.shadow}",padding:"0.5rem 0.75rem",borderRadius:"{overlay.popover.border.radius}"},BH={light:{root:{background:"{surface.700}",color:"{surface.0}"}},dark:{root:{background:"{surface.700}",color:"{surface.0}"}}},OH={root:LH,colorScheme:BH},GH={background:"{content.background}",color:"{content.color}",padding:"1rem",gap:"2px",indent:"1rem",transitionDuration:"{transition.duration}"},NH={padding:"0.25rem 0.5rem",borderRadius:"{content.border.radius}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{text.color}",hoverColor:"{text.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},gap:"0.25rem"},VH={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedColor:"{highlight.color}"},HH={borderRadius:"50%",size:"1.75rem",hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedHoverColor:"{primary.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},_H={size:"2rem"},zH={margin:"0 0 0.5rem 0"},WH={root:GH,node:NH,nodeIcon:VH,nodeToggleButton:HH,loadingIcon:_H,filter:zH},$H={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},UH={width:"2.5rem",color:"{form.field.icon.color}"},jH={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},KH={padding:"{list.padding}"},qH={padding:"{list.option.padding}"},YH={borderRadius:"{border.radius.sm}"},QH={color:"{form.field.icon.color}"},XH={root:$H,dropdown:UH,overlay:jH,tree:KH,emptyMessage:qH,chip:YH,clearIcon:QH},ZH={transitionDuration:"{transition.duration}"},JH={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},e_={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{treetable.border.color}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",gap:"0.5rem",padding:"0.75rem 1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},t_={fontWeight:"600"},o_={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},i_={borderColor:"{treetable.border.color}",padding:"0.75rem 1rem",gap:"0.5rem"},s_={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",padding:"0.75rem 1rem"},r_={fontWeight:"600"},n_={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},a_={width:"0.5rem"},l_={width:"1px",color:"{primary.color}"},d_={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",size:"0.875rem"},c_={size:"2rem"},u_={hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",selectedHoverColor:"{primary.color}",size:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},h_={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},p_={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},g_={light:{root:{borderColor:"{content.border.color}"},bodyCell:{selectedBorderColor:"{primary.100}"}},dark:{root:{borderColor:"{surface.800}"},bodyCell:{selectedBorderColor:"{primary.900}"}}},f_={root:ZH,header:JH,headerCell:e_,columnTitle:t_,row:o_,bodyCell:i_,footerCell:s_,columnFooter:r_,footer:n_,columnResizer:a_,resizeIndicator:l_,sortIcon:d_,loadingIcon:c_,nodeToggleButton:u_,paginatorTop:h_,paginatorBottom:p_,colorScheme:g_},m_={mask:{background:"{content.background}",color:"{text.muted.color}"},icon:{size:"2rem"}},v_={loader:m_},C_=Object.defineProperty,b_=Object.defineProperties,w_=Object.getOwnPropertyDescriptors,Gc=Object.getOwnPropertySymbols,y_=Object.prototype.hasOwnProperty,S_=Object.prototype.propertyIsEnumerable,Nc=(e,t,o)=>t in e?C_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Vc;Vc=((e,t)=>{for(var o in t||(t={}))y_.call(t,o)&&Nc(e,o,t[o]);if(Gc)for(var o of Gc(t))S_.call(t,o)&&Nc(e,o,t[o]);return e})({},OI),b_(Vc,w_({components:{accordion:cI,autocomplete:wI,avatar:kI,badge:II,blockui:NI,breadcrumb:zI,button:UI,card:XI,carousel:iL,cascadeselect:cL,checkbox:pL,chip:bL,colorpicker:xL,confirmdialog:DL,confirmpopup:TL,contextmenu:VL,datatable:rB,dataview:hB,datepicker:TB,dialog:NB,divider:WB,dock:jB,drawer:ZB,editor:sO,fieldset:dO,fileupload:vO,floatlabel:SO,galleria:GO,iconfield:VO,iftalabel:zO,image:KO,imagecompare:YO,inlinemessage:e1,inplace:i1,inputchips:a1,inputgroup:d1,inputnumber:p1,inputotp:m1,inputtext:C1,knob:R1,listbox:A1,megamenu:_1,menu:K1,menubar:eG,message:cG,metergroup:vG,multiselect:DG,orderlist:EG,organizationchart:BG,overlaybadge:GG,paginator:zG,panel:YG,panelmenu:tN,password:aN,picklist:cN,popover:pN,progressbar:vN,progressspinner:bN,radiobutton:SN,rating:FN,ripple:DN,scrollpanel:AN,select:_N,selectbutton:$N,skeleton:KN,slider:JN,speeddial:tV,splitbutton:iV,splitter:aV,stepper:mV,steps:SV,tabmenu:MV,tabs:OV,tabview:WV,tag:KV,terminal:XV,textarea:JV,tieredmenu:nH,timeline:hH,toast:SH,togglebutton:DH,toggleswitch:AH,toolbar:IH,tooltip:OH,tree:WH,treeselect:XH,treetable:f_,virtualscroller:v_}}));const _g=Symbol("FilterStoreKey"),qa=Symbol("FocusStoreKey"),zg=Symbol("SortStateKey"),zi=Symbol("GridApiKey"),R_=Symbol("ColumnDisplayOrderKey"),Wg=Symbol("currentlyActiveFilterKey"),$g=Symbol("AvailableFilterColumnsKey"),Ug=Symbol("AvailableRowGroupColumnsKey"),Kl=Symbol("RowGroupColumnFieldsKey"),jg=Symbol("GroupColumnCellValueColumnKey"),ql=Symbol("ExpandedRowsKey"),Kg=Symbol("FirstDataRenderedKey"),qg=Symbol("CurrentPageKey"),Yg=Symbol("TotalPageKey"),x_={class:"pv-flex",style:{"--flex-wrap":"nowrap"}},F_=["id"],k_={key:1,style:{"padding-left":"16px"}},D_=["checked","disabled","onChange"],M_={class:"pv-text-body-md"},P_={key:2},E_={key:0,class:"pv-text-subdued pv-text-body-xxs"},A_=c.defineComponent({__name:"GroupBySelector",props:{rowGroupLimit:{},enableFocusView:{type:Boolean}},setup(e){const t=c.inject(zi,c.ref(null)),o=c.inject(Ug,c.ref([])),i=c.inject(Kl,c.ref([])),s=e;c.watch(i,()=>{},{deep:!0});const r=f=>i.value.includes(f||""),n=(f,m)=>{t.value&&(m?t.value.addRowGroupColumns([f]):t.value.removeRowGroupColumns([f]))},a=c.computed(()=>({"pv-hide":o.value.length===0})),l=c.computed(()=>s.rowGroupLimit?i.value.length>=s.rowGroupLimit:!1),d=c.computed(()=>i.value.map(f=>o.value.find(m=>m.field===f)).filter(f=>f!==void 0)),u=c.computed(()=>o.value.filter(f=>!i.value.includes(f.field))),h=c.computed(()=>{const f={label:"",value:"divider"},m=d.value.map(w=>({label:w.headerName,value:w.field})),b=u.value.map(w=>({label:w.headerName,value:w.field}));return[...m,f,...b]}),p=f=>`group-by-list-item-${f}`,g=f=>{const m=f.findIndex(S=>S==="divider"),w=f.slice(0,m).slice(0,s.rowGroupLimit).map(S=>S.replace("group-by-list-item-",""));t.value&&t.value.setRowGroupColumns(w)};return(f,m)=>(c.openBlock(),c.createBlock(WE,{isList:!0,isSortable:!0,popoverCssProperties:{width:"auto"},alignment:"right",class:c.normalizeClass(a.value),onListOrderUpdated:g},{trigger:c.withCtx(()=>[c.createElementVNode("div",x_,[m[0]||(m[0]=c.createElementVNode("p",{class:"pv-truncate pv-text-body-md"},"Compare",-1)),c.unref(i).length>0?(c.openBlock(),c.createBlock(c.unref(on),{key:0,value:c.unref(i).length,variant:"tertiary"},null,8,["value"])):c.createCommentVNode("",!0)])]),default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(h.value,(b,w)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:b.value},[b.value!=="divider"?(c.openBlock(),c.createElementBlock("li",{key:0,id:p(b.value)},[c.createElementVNode("label",{class:c.normalizeClass(["pv-flex",{"pv-border-bottom":w+1===c.unref(i).length}])},[r(b.value)?(c.openBlock(),c.createBlock(qe,{key:0,name:"reorder",class:"pv-text-subdued"})):(c.openBlock(),c.createElementBlock("span",k_)),c.createElementVNode("input",{type:"checkbox",class:"pv-checkbox",checked:r(b.value),disabled:!r(b.value)&&l.value,onChange:S=>n(b.value,S.target.checked)},null,40,D_),c.createElementVNode("span",M_,c.toDisplayString(b.label),1),r(b.value)?(c.openBlock(),c.createElementBlock("sup",P_,c.toDisplayString(w+1),1)):c.createCommentVNode("",!0)],2)],8,F_)):c.createCommentVNode("",!0)],64))),128)),l.value?(c.openBlock(),c.createElementBlock("p",E_," Supports "+c.toDisplayString(f.rowGroupLimit)+" compare levels ",1)):c.createCommentVNode("",!0)]),_:1},8,["class"]))}}),T_={},I_={class:"ag-custom-loading-cell pv-shimmer"};function L_(e,t){return c.openBlock(),c.createElementBlock("div",I_)}const B_=Ut(T_,[["render",L_]]),Qg=(e=null)=>{const t=c.ref(e?.focuses||[]),o=c.ref(e?.focusType||null),i=c.computed(()=>t.value),s=c.computed(()=>o.value),r=h=>{h!==o.value&&(o.value=h||null,t.value=[])},n=h=>o.value!==null&&o.value===h,a=(h,p)=>!h||!p?!1:t.value.includes(h)&&o.value===p,l=h=>{t.value=t.value.filter(p=>p!==h)};return{computedFocuses:i,computedFocusType:s,clearAllFocuses:()=>{t.value=[],o.value=null},handleFocusUpdate:h=>{h&&o.value&&(t.value.includes(h)?l(h):t.value=[h])},isFocused:a,removeFocus:l,shouldShowFocusButton:n,setFocusType:r}},Rn=()=>{const e=c.inject(qa,null);return e||Qg()},O_={class:"pv-table-group-cell"},G_={class:"pv-text-body-xxs pv-text-subdued"},N_={key:0},V_={style:{"line-height":"20px"}},H_={class:"pv-text-title-md"},__={key:0,class:"pv-flex",style:{flex:"1","--flex-justify":"flex-end"}},z_={key:0,class:"pv-table-row-number"},W_=c.defineComponent({__name:"GroupedCellRenderer",props:{params:{}},setup(e){const t=e,o=c.inject(Kl,c.ref([])),i=c.inject(jg,c.ref(null)),s=c.inject(ql,c.ref({})),r=lg(t.params,"rowNode"),n=c.computed(()=>!t.params.displayBaseAggregationsOnly||r.value.level===o.value.length-1),a=c.computed(()=>t.params.rowNode.group),l=(S,y)=>S?S({value:y,data:r.value.data,node:r.value,api:t.params.api}):y,d=c.computed(()=>{if(!i.value)return"";const S=i.value.getColId()||"",y=i.value.getColDef().valueFormatter,x=r.value;return S&&x&&x.data&&S in x.data?l(y,x.data[S]):""}),u=c.computed(()=>r.value.data&&r.value.data.groupedRecordCount?r.value.data.groupedRecordCount||0:r.value.allChildrenCount||0),h=c.computed(()=>{const S=r.value.rowIndex,y=r.value.parent?.rowIndex;return S!=null&&y!=null?S-y:null}),p=S=>{const y=S.node.expanded,x=S.node.rowIndex;x!=null&&(s.value[x]=y)},{isFocused:g,computedFocuses:f,removeFocus:m}=Rn(),b=c.computed(()=>g(r.value.key,r.value.field)?"pv-flex":""),w=c.computed(()=>{const S=f.value;return r.value.key&&S.includes(r.value.key)});return c.onMounted(()=>{const S=r.value,y=S.rowIndex,x=S.expanded;y!=null&&(s.value[y]=x),r.value.addEventListener("expandedChanged",p)}),c.onBeforeUnmount(()=>{const S=r.value;r.value.removeEventListener("expandedChanged",p);const y=S.rowIndex;y!=null&&(s.value[y]=!1)}),(S,y)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[a.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(b.value)},[c.createElementVNode("div",O_,[c.createElementVNode("p",G_,[c.createTextVNode(c.toDisplayString(c.unref(r).rowGroupColumn?.getColDef().headerName)+" ",1),S.params.displayCount&&n.value&&u.value>0?(c.openBlock(),c.createElementBlock("span",N_," ("+c.toDisplayString(u.value.toLocaleString())+") ",1)):c.createCommentVNode("",!0)]),c.createElementVNode("div",V_,[c.createElementVNode("p",H_,c.toDisplayString(S.params.formattedValue||S.params.rowNode.key),1)])]),w.value?(c.openBlock(),c.createElementBlock("div",__,[c.createVNode(Ns,{variant:"dark",tooltipPosition:"center-left",size:"sm"},{label:c.withCtx(()=>[c.createVNode(Qe,{class:c.normalizeClass(b.value+" pv-text-brand"),variant:"ghost","left-icon":"focus",onClick:y[0]||(y[0]=x=>c.unref(m)(c.unref(r).key))},null,8,["class"])]),"tooltip-content":c.withCtx(()=>y[1]||(y[1]=[c.createElementVNode("span",null," Remove Focus ",-1)])),_:1})])):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0),c.createElementVNode("div",null,[c.createElementVNode("p",null,[S.params.displayRowNumber&&h.value?(c.openBlock(),c.createElementBlock("span",z_,c.toDisplayString(h.value),1)):c.createCommentVNode("",!0),c.createTextVNode(" "+c.toDisplayString(d.value),1)])])],64))}});function Hc(e){const t=e.filter(i=>i!=null&&!isNaN(i)).sort((i,s)=>i-s),o=t.length;return o===0?null:t[Math.floor(o/2)]}var lo=(e=>(e.String="string",e.Number="number",e.Boolean="boolean",e.Date="date",e.Currency="currency",e.Formula="formula",e.Select="select",e.Percent="percent",e.Entity="entity",e.Id="id",e.Integer="integer",e.User="user",e.Link="link",e.Location="location",e.Status="status",e.Tag="tag",e.File="file",e.None="none",e))(lo||{});const Xg=e=>{switch(e){case"string":return"fonts";case"number":return"hash";case"boolean":return"list";case"date":return"calendar";case"currency":return"currency-dollar";case"formula":return"formula";case"select":return"list";case"percent":return"percent";case"entity":return"building";case"id":return"id-2";case"link":return"link";case"location":return"location";case"integer":return"hash";case"user":return"user";case"status":return"circle-chevron-down";case"tag":return"circle-chevron-down";case"file":return"file";case"none":return null;default:return null}},$_=(e,t)=>{if(!e)return e;switch(t){case"percent":return e.replace(/^%+/,"").trim();default:return e}};function U_(){}function _c(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function zc(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const j_="[object RegExp]",K_="[object String]",q_="[object Number]",Y_="[object Boolean]",Wc="[object Arguments]",Q_="[object Symbol]",X_="[object Date]",Z_="[object Map]",J_="[object Set]",ez="[object Array]",tz="[object Function]",oz="[object ArrayBuffer]",ma="[object Object]",iz="[object Error]",sz="[object DataView]",rz="[object Uint8Array]",nz="[object Uint8ClampedArray]",az="[object Uint16Array]",lz="[object Uint32Array]",dz="[object BigUint64Array]",cz="[object Int8Array]",uz="[object Int16Array]",hz="[object Int32Array]",pz="[object BigInt64Array]",gz="[object Float32Array]",fz="[object Float64Array]";function $c(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}function mz(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function vz(e,t,o){return is(e,t,void 0,void 0,void 0,void 0,o)}function is(e,t,o,i,s,r,n){const a=n(e,t,o,i,s,r);if(a!==void 0)return a;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return Cs(e,t,r,n)}return Cs(e,t,r,n)}function Cs(e,t,o,i){if(Object.is(e,t))return!0;let s=zc(e),r=zc(t);if(s===Wc&&(s=ma),r===Wc&&(r=ma),s!==r)return!1;switch(s){case K_:return e.toString()===t.toString();case q_:{const l=e.valueOf(),d=t.valueOf();return mz(l,d)}case Y_:case X_:case Q_:return Object.is(e.valueOf(),t.valueOf());case j_:return e.source===t.source&&e.flags===t.flags;case tz:return e===t}o=o??new Map;const n=o.get(e),a=o.get(t);if(n!=null&&a!=null)return n===t;o.set(e,t),o.set(t,e);try{switch(s){case Z_:{if(e.size!==t.size)return!1;for(const[l,d]of e.entries())if(!t.has(l)||!is(d,t.get(l),l,e,t,o,i))return!1;return!0}case J_:{if(e.size!==t.size)return!1;const l=Array.from(e.values()),d=Array.from(t.values());for(let u=0;u<l.length;u++){const h=l[u],p=d.findIndex(g=>is(h,g,void 0,e,t,o,i));if(p===-1)return!1;d.splice(p,1)}return!0}case ez:case rz:case nz:case az:case lz:case dz:case cz:case uz:case hz:case pz:case gz:case fz:{if(typeof Buffer<"u"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let l=0;l<e.length;l++)if(!is(e[l],t[l],l,e,t,o,i))return!1;return!0}case oz:return e.byteLength!==t.byteLength?!1:Cs(new Uint8Array(e),new Uint8Array(t),o,i);case sz:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:Cs(new Uint8Array(e),new Uint8Array(t),o,i);case iz:return e.name===t.name&&e.message===t.message;case ma:{if(!(Cs(e.constructor,t.constructor,o,i)||$c(e)&&$c(t)))return!1;const d=[...Object.keys(e),..._c(e)],u=[...Object.keys(t),..._c(t)];if(d.length!==u.length)return!1;for(let h=0;h<d.length;h++){const p=d[h],g=e[p];if(!Object.hasOwn(t,p))return!1;const f=t[p];if(!is(g,f,p,e,t,o,i))return!1}return!0}default:return!1}}finally{o.delete(e),o.delete(t)}}function Zg(e,t){return vz(e,t,U_)}const Uc={agSetColumnFilter:"set",agMultiColumnFilter:"multi",agTextColumnFilter:"text"},Cz=e=>!e||!e.filter?null:e.filter in Uc?Uc[e.filter]:null,bz=(e,t)=>{if(!t||!t.field||!e||Object.keys(e).length===0)return e;const o=e?.filterType||null,i=Cz(t);if(!i||i===o)return e;if(i!=="multi")return console.warn(`Cannot map filter for column ${t.field} with type ${o} to col def ${i}`),{};const s=t.filterParams?.filters?.length,r=Array(s).fill(null);if(e.filterType=="set"){const n=e.values||[],a=li(t);a>-1&&a<r.length&&(r[a]={filterType:"set",values:n})}else console.warn(`Cannot map filter for column ${t.field} with type ${o} to col def ${i}`);return{filterType:"multi",filterModels:r}},jc=(e,t)=>{const o=e?.filter?.filterModel||{};if(!o||!t||t.length===0||Object.entries(o).length===0)return e;const i={...e},s={};return Object.keys(o).forEach(r=>{const n=o[r]||{},a=t.find(l=>l.field===r);s[r]=bz(n,a)}),i.filter={...i.filter,filterModel:s},i},Kc=(e,t,o)=>!e||e.length===0?e:e.slice().sort((i,s)=>{const r=o.includes(i[t])?0:1,n=o.includes(s[t])?0:1;return r-n}),co=e=>e?e.context||{}:{},wz=e=>{const t=co(e);return t.filterValueFormatter&&typeof t.filterValueFormatter=="function"?t.filterValueFormatter:typeof e.valueFormatter=="function"?e.valueFormatter:null},Ya=e=>co(e).filterSelectMax||null,qc=e=>{const t=co(e);if(t.filterSelectMin){const o=Ya(e);return t.filterSelectMin===1&&o===1}return!1},Jg=e=>{const t=co(e).dataType;return t?[lo.Currency,lo.Percent,lo.Number,lo.Integer].includes(t):!1},yz=e=>{if(!e||e.queryTerms.length===0)return{};const t={};return e.queryTerms.forEach(o=>{const i=o.queryField||"";if(!t[i])t[i]={filterType:"text",type:o.exactMatch?"equals":"contains",filter:o.queryText||""};else{const r=t[i];r.conditions?t[i]={filterType:"text",operator:"OR",conditions:[...r.conditions,{type:o.exactMatch?"equals":"contains",filter:o.queryText||""}]}:t[i]={filterType:"text",operator:"OR",conditions:[{type:r.type,filter:r.filter},{type:o.exactMatch?"equals":"contains",filter:o.queryText||""}]}}}),t},Sz=(e,t)=>{if(!e||e.filter=="agTextColumnFilter"&&t.filterType=="text"||e.filter=="agSetColumnFilter"&&t.filterType=="set"||e.filter=="agMultiColumnFilter"&&t.filterType=="multi")return t;if(e.filter!="agMultiColumnFilter")return console.error("Unsupported filter type for column",e,t),t;const i=e.filterParams?.filters||[],s=Array(i.length).fill(null),r=i.findIndex(n=>n.filter=="agTextColumnFilter"&&t.filterType=="text"?!0:n.filter=="agSetColumnFilter"&&t.filterType=="set");return r>-1?s[r]=t:console.warn("Could not find matching filter type for column",e,t),{filterType:"multi",filterModels:s}},Rz=(e,t)=>{if(!e||Object.keys(e).length===0)return t;if(e.filterType!=t.filterType||e.filterType!="multi")return e;const o={...e};return t.filterModels?.forEach((s,r)=>{o.filterModels||(o.filterModels=[]),o.filterModels[r]||(o.filterModels[r]=s)}),o},xz=(e,t,o)=>{const i={...t};return!t||Object.keys(t).length===0?o||{}:(!o||Object.keys(o).length===0||Object.keys(o).forEach(s=>{const r=e.find(l=>l.field===s),n=Sz(r,o[s]),a=i[s];i[s]=Rz(a,n)}),i)},li=e=>e.filterParams?.filters?.findIndex(t=>t.filter==="agSetColumnFilter"),Qa=e=>e.filter=="agSetColumnFilter"?!0:e.filter=="agMultiColumnFilter"?li(e)!==void 0&&li(e)>-1:!1,Fz=(e,t)=>{const o={...e};if(o.filter=="agSetColumnFilter"){const s=o.filterParams;return o.filterParams={...s,values:t},o}const i=li(e);if(i!==void 0&&i>-1){const s=o.filterParams||{},r=s.filters||[],n=r[i],a=n?.filterParams;n.filterParams={...a,values:t};const l=[...r];l[i]=n,o.filterParams={...s,filters:l}}return o},kz=async(e,t)=>{const o=t.field||"",i=await e.getColumnFilterInstance(o);if(i?.filterType=="set")return i;if(i?.filterType!="multi")return null;const s=li(t);return s!==void 0&&s>-1?i.getChildFilterInstance(s):null},Yc=async(e,t,o)=>{const i=t.field||"",s=await e.getColumnFilterInstance(i);if(s?.filterType=="set")return{values:o};if(s?.filterType!="multi")return null;let r=s.getModel();r||(r={filterType:"multi",filterModels:Array(t.filterParams?.filters?.length).fill(null)});const n=li(t),a={filterType:"set",values:o};return n!==void 0&&n>-1&&r&&r.filterModels&&(r.filterModels[n]=a),r},ef=(e,t)=>{if(!e.field||!t||Object.entries(t).length===0)return[];const o=t[e.field];if(!o)return[];if(o.filterType==="set"&&"values"in o)return o.values||[];if(o.filterType==="multi"){const i=li(e);if(i!==void 0&&i>-1){const s=o.filterModels[i];if(s&&s.filterType==="set"&&"values"in s)return s.values||[]}}return[]},Qc=(e,t)=>{const o=e?Object.keys(e):[],i=t?Object.keys(t):[];if(o.length===0&&i.length===0)return!0;if(o.length!==i.length)return!1;for(const s of o)if(!Zg(e?.[s],t?.[s]))return!1;return!0},Dz={style:{"line-height":"20px"}},Mz={class:"pv-text-subdued pv-text-body-xxs pv-relative"},Pz=c.defineComponent({__name:"GroupAggCellRenderer",props:{params:{}},setup(e){const t=e,o=c.inject(ql,c.ref({})),i=c.computed(()=>{const d=t.params.column?.getColDef(),u=co(d).aggFuncDisplayName;return u||(t.params.column?.getAggFunc()||"agg").toLowerCase()}),s=()=>{const d=t.params.api;if(d){const u=!n.value;d.setRowNodeExpanded(t.params.node,u),r.value&&(o.value[r.value]=u)}},r=c.computed(()=>t.params.node?.rowIndex),n=c.computed(()=>{let d=!1;return r.value!=null&&(d=r.value in o.value?o.value[r.value]:!1),d}),a=c.computed(()=>n.value?"chevron-down":"chevron-right"),l=c.computed(()=>{const d=t.params.column?.getColDef(),u=t.params.valueFormatted||t.params.value;return d&&Jg(d)?u.toLocaleString():u});return c.onMounted(()=>{t.params.node.expanded&&r.value&&(o.value[r.value]=!0)}),(d,u)=>(c.openBlock(),c.createElementBlock("div",{class:"pv-flex",ondblclick:s},[c.createElementVNode("div",Dz,[c.createElementVNode("p",null,c.toDisplayString(l.value),1),c.createElementVNode("p",Mz,c.toDisplayString(i.value),1)]),c.createVNode(Qe,{size:"xl",variant:"ghost","left-icon":a.value,onClick:s},null,8,["left-icon"])]))}}),Ez=()=>{const e=c.ref({}),t=c.ref(null),o=c.ref(null),i=c.ref({}),s=c.ref({}),r=c.ref({}),n=c.ref(0),a=c.ref({}),l=c.ref(void 0),d=c.ref(void 0),u=c.computed(()=>l.value!=null),h=c.ref({}),p=c.ref({}),g=c.ref({}),f=c.ref({}),m=()=>{const k={};return Object.entries(p.value).forEach(([D,v])=>{const C=v.filter(R=>!!R);C.length>0&&(k[D]={filterType:"set",values:C})}),k},b=async(k,D,v,C)=>{const R=f.value[D.field]||void 0,F=p.value[D.field]||[];let L=C;t.value!=null&&(L=m());const O={api:k,colDef:D,column:v,filterModel:L,query:R,selectedValues:F},T=D.field;a.value[T]=!0;const _=(r.value[T]||0)+1;r.value[T]=_;const V=F.map(B=>{const I=w(T,B);return{value:I?.value||B,label:I?.label||B,isPreference:I?.isPreference||!1,isSelectable:I?.isSelectable||!0,metadata:I?.metadata||{}}}),G=await l.value?.(O);if(_===r.value[T]){V.forEach(I=>{G?.some(W=>W?.value===I?.value)||G?.push(I)}),G&&(h.value[T]=G);const B=G?.filter(I=>I!=null).map(I=>I.value)||[];return s.value[T]=Date.now(),a.value[T]=!1,B.filter((I,W)=>B.indexOf(I)===W)}else return[]},w=(k,D)=>{const v=[...h.value[k]||[],...g.value[k]||[]];return v?v.find(C=>C?.value===D):null},S=(k,D)=>{p.value[k]=D;const v=[];if(e.value&&e.value[k]?.values){const R=e.value[k].values||[];v.push(...R)}v.push(...D);const C=[];return D.forEach(R=>{const F=w(k,R);F&&C.push(F)}),g.value[k]=C,v.filter((R,F)=>v.indexOf(R)===F)},y=k=>p.value[k]||[],x=(k,D)=>{f.value[k]=D},P=(k,D)=>{const v=new Set,C=k?Object.keys(k):[],R=D?Object.keys(D):[],F=C.filter(T=>R.includes(T));[...C,...R].filter(T=>!F.includes(T)).forEach(T=>v.add(T));for(const T of F)JSON.stringify(k?.[T])!==JSON.stringify(D?.[T])&&v.add(T);const O=Date.now();for(const T of Array.from(v))i.value[T]=O};return Ls([e,t],([k,D],[v,C])=>{JSON.stringify(k)!==JSON.stringify(v)&&P(k||{},v||{}),JSON.stringify(D)!==JSON.stringify(C)&&P(D||{},e.value||{})},{deep:!0,debounce:200,maxWait:1e3,immediate:!1}),{filterModel:e,filterLastUpdatedMap:i,filterLastFetchTimeMap:s,filterModelCleared:n,filterValuesLoadingStatus:a,filterValueMap:h,filterValueSelectedMetadataMap:g,filterStoreHandler:l,fetchFilterValues:b,filterValueContext:w,getFilterSelectedValues:y,isServerSideFilter:u,stagedFilterModel:t,setFilterSelectedValues:S,setFilterValueSearchText:x,tableSearchFilterModel:o,tableSearchHandler:d}},xn=()=>{const e=c.inject(_g,null);return e||Ez()},Az=["title"],Tz={class:"pv-truncate"},Iz={key:0},Lz={key:1},Bz=c.defineComponent({__name:"FocusItemRenderer",props:{id:{},text:{},subText:{},secondaryText:{},icon:{},companyName:{},avatar:{},groupingLabel:{},disabled:{type:Boolean},renderer:{},rendererProps:{},classList:{},searchText:{}},setup(e){const t=e,{isFocused:o}=Rn(),i=s=>{t.rendererProps?.onFocusUpdate&&t.rendererProps.onFocusUpdate(s)};return(s,r)=>(c.openBlock(),c.createElementBlock("div",{class:"pv-flex pv-full-width pv-space-between focus-item-renderer",style:{"max-height":"16px","max-width":"calc(100% - 24px)"},title:s.text},[c.createElementVNode("span",Tz,c.toDisplayString(s.text),1),c.createVNode(Ns,{variant:"dark",tooltipPosition:"top-right",size:"sm"},{label:c.withCtx(()=>[c.createVNode(Qe,{class:c.normalizeClass(["pv-space-between",c.unref(o)(s.id,t.rendererProps?.filterField)?"":"focus-button"]),variant:"ghost","left-icon":"focus",onClick:r[0]||(r[0]=n=>i(s.id))},null,8,["class"])]),"tooltip-content":c.withCtx(()=>[c.unref(o)(s.id,t.rendererProps?.filterField)?(c.openBlock(),c.createElementBlock("span",Iz," Remove Focus ")):(c.openBlock(),c.createElementBlock("span",Lz," Select as Focus "))]),_:1})],8,Az))}}),Oz={key:0,role:"list",class:"pv-flex pv-stack-4",style:{"--flex-wrap":"wrap","max-width":"100%"}},Gz={class:"pv-full-width pv-flex pv-space-between"},Nz={class:"pv-flex"},Vz={class:"pv-text-subdued pv-text-body-xxs"},Hz={key:0,class:"pv-full-width"},_z={key:0,class:"pv-flex-inline",style:{"max-width":"100%"}},zz={role:"list",class:"pv-flex",style:{"--flex-wrap":"wrap","max-width":"100%"}},Wz=4,$z=c.defineComponent({__name:"SetFilter",props:{enableFocusView:{type:Boolean,default:!1},filterColDef:{},filterStyle:{default:"horizontal"},displayPreferencesIcon:{type:Boolean,default:!1},focusableColumns:{default:()=>[]}},emits:["filter-selection-changed","filter-closed","handle-settings-icon"],setup(e,{emit:t}){const o=e,i=t,s=c.inject(zi,c.ref(null)),{filterModel:r,stagedFilterModel:n,filterModelCleared:a,filterLastUpdatedMap:l,filterLastFetchTimeMap:d,filterValuesLoadingStatus:u,filterValueContext:h,getFilterSelectedValues:p,isServerSideFilter:g,setFilterValueSearchText:f,setFilterSelectedValues:m}=xn(),{computedFocuses:b,handleFocusUpdate:w,isFocused:S,removeFocus:y,computedFocusType:x,shouldShowFocusButton:P}=Rn(),k=c.inject(Kg,c.ref(!1)),D=c.ref([]),v=c.ref([]),C=c.computed(()=>o.filterColDef.field||""),R=c.computed(()=>o.filterColDef.filter||""),F=c.computed(()=>o.filterColDef.headerName||""),L=c.ref(!1),O=c.computed(()=>o.filterStyle=="vertical"),T=c.computed(()=>wz(o.filterColDef)),_=c.ref(""),V=()=>Object.entries(l.value).filter(([Y,X])=>Y!==C.value).reduce((Y,[X,te])=>Math.max(Y,te),0),G=()=>{const Y=ef(o.filterColDef,r.value);D.value=Array.from(new Set([...p(C.value),...Y]))},B=async(Y=!1,X=!1)=>{if(!s.value)return;const te=await kz(s.value,o.filterColDef);if(!te)return;const Ze=V()||0,Ie=d.value[C.value]||0,lt=Y&&u.value[C.value]!==!0&&Ze>=Ie;g.value&&(X||lt)&&te.refreshFilterValues(),v.value=I(te.getFilterValues())},I=Y=>Y.sort((X,te)=>{const Ze=D.value.includes(X),Ie=D.value.includes(te);return Ze&&!Ie?-1:!Ze&&Ie?1:0}),W=Y=>{const X=h(C.value,Y);return T.value?T.value({value:Y,context:X}):Y},z=c.computed(()=>Ya(o.filterColDef)),U=c.computed(()=>qc(o.filterColDef)),$=c.computed(()=>Ya(o.filterColDef)),oe=c.computed(()=>qc(o.filterColDef)),fe=c.computed(()=>!co(o.filterColDef).filterSearch),ve=c.computed(()=>co(o.filterColDef).emptyFilterResultsRenderer),Te=c.computed(()=>co(o.filterColDef).filterOptionsRenderer),ee=c.computed(()=>co(o.filterColDef).filterFooterRenderer),ce=c.computed(()=>z.value?D.value.length>=z.value:!1),pe=c.computed(()=>v.value.filter(Y=>Y!=null&&!D.value.includes(Y))),Q=c.computed(()=>v.value.length===1&&v.value[0]===null&&D.value.length===0),Fe=Y=>Q.value||h(C.value,Y)?.isSelectable===!1?!0:U.value?!1:ce.value&&!D.value.includes(Y),De=c.computed(()=>v.value.filter((X,te)=>v.value.indexOf(X)===te).filter(X=>X!=null&&X!=="").map(X=>{let te=$.value?"suggestions":null;return h(C.value,X)?.isPreference&&(te="preferences"),{id:X,text:W(X),groupingLabel:te,disabled:Fe(X),renderer:P(C.value)?Bz:Te.value,rendererProps:{filterField:C.value,onFocusUpdate:ue},classList:["option-label"]}})),Re=c.computed({get:()=>D.value.map(Y=>({id:Y,text:W(Y)})),set:Y=>{D.value=Y.map(X=>X.id),Ue(),b.value.forEach(X=>{!D.value.includes(X)&&x.value===C.value&&y(X)}),i("filter-selection-changed")}});c.watch(()=>l.value,()=>{V()>(d.value[C.value]||0)&&B(!0)},{deep:!0}),Ls(()=>u.value[C.value],()=>{const Y=u.value[C.value];L.value&&!Y?(B(),L.value=!1):Y&&(L.value=!0)},{deep:!0}),c.watch(()=>n.value,()=>{if(O.value)if(R.value==="agSetColumnFilter")D.value=n.value?.[C.value]?.values||[];else if(R.value==="agMultiColumnFilter"){const Y=n.value?.[C.value]?.filterModels?.find(X=>X&&X.filterType==="set");D.value=Y?.values||[]}else console.error(`Staged filter model update for filter type ${R.value} is not yet supported.`)}),c.watch(()=>r.value,()=>{G()}),c.watch(()=>a.value,()=>{D.value=[]}),c.watch(()=>k.value,async()=>{O.value?setTimeout(async()=>{await B(!0)},2e3):await B(!0),G()}),c.watch(()=>D.value,Y=>{m(C.value,Y)}),Ls(()=>_.value,async Y=>{f(C.value,Y),await B(!0,!0)},{debounce:300});const be=Y=>{Y&&U.value?D.value=[Y]:Y&&!D.value.includes(Y)&&(D.value=[...D.value,Y]),Ue(),i("filter-selection-changed")},me=Y=>{D.value=D.value.filter(X=>X!==Y),Ue(),i("filter-selection-changed"),S(Y,C.value)&&y(Y)},Ue=async()=>{if(!s.value)return;const Y=D.value.length>0?D.value:null;if(O.value){const te=await Yc(s.value,o.filterColDef,Y);n.value={...n.value,[C.value]:te};return}const X=await Yc(s.value,o.filterColDef,Y);s.value.setColumnFilterModel(C.value,X).then(()=>{s.value&&s.value.onFilterChanged()})},ue=Y=>{Y&&!D.value.includes(Y)&&be(Y),w(Y)},Pe=()=>{i("filter-closed")};return c.onMounted(()=>{G()}),(Y,X)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",null,[O.value?(c.openBlock(),c.createElementBlock("ul",Oz,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(D.value,te=>(c.openBlock(),c.createElementBlock("li",{key:`${F.value}-${te}`,style:{"max-width":"100%"}},[c.createVNode($a,{label:W(te)||"",showClear:!0,onHandleClose:Ze=>me(te)},null,8,["label","onHandleClose"])]))),128))])):c.createCommentVNode("",!0),c.createVNode(c.unref(ZT),{modelValue:Re.value,"onUpdate:modelValue":X[1]||(X[1]=te=>Re.value=te),searchInput:_.value,"onUpdate:searchInput":X[2]||(X[2]=te=>_.value=te),"data-horizontal-filter-field":O.value?void 0:C.value,label:O.value?"":F.value,icon:O.value?"add-circle":void 0,variant:O.value?"ghost":"secondary",counterPosition:!O.value&&D.value.length>0?void 0:"none",showClear:!O.value,showSearchInput:fe.value,showDropdown:!O.value,overlayTrigger:O.value,options:De.value,popoverCssProperties:{maxHeight:"400px",maxWidth:O.value?"300px":"400px",overflowX:"auto",width:"auto"},groupings:["preferences","suggestions"],isLoading:L.value,onDropdownOpen:X[3]||(X[3]=te=>B(!0)),onDropdownClosed:Pe},c.createSlots({preferences:c.withCtx(()=>[c.createElementVNode("div",Gz,[X[5]||(X[5]=c.createElementVNode("p",{class:"pv-text-subdued pv-text-body-xxs"},"Your Preferences",-1)),c.createVNode(c.unref(Ns),{variant:"dark",size:"sm"},{label:c.withCtx(()=>[c.createVNode(Qe,{size:"md",variant:"ghost",onClick:X[0]||(X[0]=te=>Y.$emit("handle-settings-icon",F.value)),"right-icon":"sliders-horizontal"})]),"tooltip-content":c.withCtx(()=>X[4]||(X[4]=[c.createTextVNode(" Open Preferences ")])),_:1})])]),suggestions:c.withCtx(()=>[c.createVNode(c.unref(Ns),{variant:"dark",interactive:!1,"tooltip-position":"top-left",size:"sm"},c.createSlots({label:c.withCtx(()=>[c.createElementVNode("div",Nz,[c.createVNode(qe,{name:"ai",size:12}),c.createElementVNode("p",Vz,c.toDisplayString($.value),1)])]),_:2},[oe.value?{name:"tooltip-content",fn:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(oe.value),1)]),key:"0"}:void 0]),1024)]),_:2},[ve.value?{name:"no-results",fn:c.withCtx(te=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(ve.value),c.normalizeProps(c.guardReactiveProps(te)),null,16))]),key:"0"}:void 0,ee.value?{name:"footer",fn:c.withCtx(te=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(ee.value),c.normalizeProps(c.guardReactiveProps(te)),null,16))]),key:"1"}:void 0]),1032,["modelValue","searchInput","data-horizontal-filter-field","label","icon","variant","counterPosition","showClear","showSearchInput","showDropdown","overlayTrigger","options","popoverCssProperties","isLoading"])]),O.value?(c.openBlock(),c.createElementBlock("div",Hz,[pe.value.length>0?(c.openBlock(),c.createElementBlock("div",_z,[c.createElementVNode("ul",zz,[X[6]||(X[6]=c.createElementVNode("li",null,[c.createElementVNode("p",{class:"pv-text-subdued pv-text-body-md"},"Suggested:")],-1)),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(pe.value.filter(te=>te!==""&&te!=null).slice(0,Wz),te=>(c.openBlock(),c.createElementBlock("li",{key:`${F.value}-${te}-suggest`,class:c.normalizeClass(L.value?"pv-shimmer":""),style:{"max-width":"100%"}},[c.createVNode(c.unref(fA),{disabled:L.value,label:W(te)||"",onHandleClick:Ze=>be(te)},null,8,["disabled","label","onHandleClick"])],2))),128))])])):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],64))}}),Xc=Ut($z,[["__scopeId","data-v-7f711413"]]),Uz={class:"pv-flex"},jz={class:"pv-flex"},Kz={id:"filter-vertical-drawer",class:"pv-flex-vertical pv-space-between pv-full-width",style:{height:"100%","overflow-x":"hidden"}},qz={class:"pv-flex-vertical pv-full-width"},Yz={class:"pv-inset-squish pv-full-width pv-sticky pv-surface pv-border-bottom"},Qz={class:"pv-flex pv-space-between pv-stack-8"},Xz={class:"pv-text-title-lg"},Zz={class:"pv-full-width pv-inset-inline-24"},Jz={class:"pv-details pv-stack-12",open:""},e2={class:"pv-flex pv-full-width"},t2={class:"pv-text-title-lg"},o2={class:"pv-sticky pv-border-top pv-full-width pv-inset-squish pv-flex pv-space-between pv-surface",style:{"--top":"unset",bottom:"0"}},i2={class:"pv-flex"},s2={class:"pv-flex",style:{"--flex-justify":"end","--flex-gap":"8px","margin-top":"auto"}},r2=c.defineComponent({__name:"FilterPanel",props:{enableFocusView:{type:Boolean,default:!1},enableVerticalPanel:{type:Boolean,default:!0},displayPreferencesIcon:{type:Boolean,default:!1},focusableColumns:{default:()=>[]},maxHorizontalFilters:{default:5}},emits:["handle-settings-icon"],setup(e){const t=c.inject(zi,c.ref(null)),o=c.inject($g,c.ref([])),i=c.inject(Wg,c.ref(null)),s=e,{filterModelCleared:r,stagedFilterModel:n,filterModel:a}=xn(),l=c.ref(null),d=c.ref(!1),u=c.ref(""),h=c.computed(()=>o.value.filter(D=>Qa(D))),p=c.computed(()=>{const D=u.value?.trim().toLowerCase()||"";return!D||D===""?h.value:o.value.filter(v=>{const C=v.headerName?.toLowerCase()||v.field?.toLowerCase();return C?C.includes(D):!1})}),g=c.computed(()=>{const v=[...o.value.filter(C=>Qa(C))].slice(0,s.maxHorizontalFilters);return i.value?[...v.slice(0,s.maxHorizontalFilters-1),i.value]:v}),f=c.computed(()=>{const D=a.value||{};return Object.keys(D).length}),m=c.ref(!1),b=()=>{m.value=!0},w=()=>{t.value&&(m.value=!1,n.value=t.value.getFilterModel(),l.value?.showModal())},{clearAllFocuses:S}=Rn(),y=()=>{n.value=null,t.value&&(t.value.setFilterModel(null),t.value.onFilterChanged(),r.value+=1,S(),d.value=!1)},x=()=>{l.value?.close(),u.value=""},P=()=>{n.value=null,x()},k=()=>{m.value&&t.value&&(t.value.setFilterModel(n.value),t.value.onFilterChanged()),x()};return(D,v)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",Uz,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(g.value,C=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:C.field},[c.unref(t)?(c.openBlock(),c.createBlock(Xc,{key:0,"enable-focus-view":s.enableFocusView,"display-preferences-icon":s.displayPreferencesIcon,"focusable-columns":s.focusableColumns,filterColDef:C,onHandleSettingsIcon:v[0]||(v[0]=R=>D.$emit("handle-settings-icon",R))},null,8,["enable-focus-view","display-preferences-icon","focusable-columns","filterColDef"])):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",jz,[s.enableVerticalPanel?(c.openBlock(),c.createBlock(c.unref(Qe),{key:0,label:"All Filters",onClick:w,variant:"ghost","left-icon":"filter"})):c.createCommentVNode("",!0),f.value>0?(c.openBlock(),c.createElementBlock("button",{key:1,class:"pv-button-ghost",onClick:v[1]||(v[1]=C=>d.value=!0)},[c.createVNode(c.unref(qe),{name:"close"}),v[11]||(v[11]=c.createTextVNode(" Clear All Filters ")),f.value>0?(c.openBlock(),c.createBlock(c.unref(on),{key:0,value:f.value,variant:"tertiary"},null,8,["value"])):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)]),s.enableVerticalPanel?(c.openBlock(),c.createElementBlock("dialog",{key:0,ref_key:"filterDrawer",ref:l,class:"pv-drawer pv-surface",onClick:v[8]||(v[8]=c.withModifiers(C=>k(),["self"])),style:{"max-width":"450px"}},[c.createElementVNode("div",Kz,[c.createElementVNode("div",qz,[c.createElementVNode("div",Yz,[c.createElementVNode("div",Qz,[c.createElementVNode("p",Xz,"All Filters ("+c.toDisplayString(h.value.length)+")",1),c.createElementVNode("button",{class:"pv-button-ghost",onClick:v[2]||(v[2]=C=>P())},[c.createVNode(c.unref(qe),{name:"close"})])]),c.createVNode(c.unref(Ul),{modelValue:u.value,"onUpdate:modelValue":v[3]||(v[3]=C=>u.value=C),placeholder:"Search Filters"},null,8,["modelValue"])]),c.createElementVNode("div",Zz,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(p.value,(C,R)=>(c.openBlock(),c.createElementBlock("div",{key:C.field,class:c.normalizeClass([{"pv-border-bottom":R<p.value.length-1},"pv-stack-12"])},[c.createElementVNode("details",Jz,[c.createElementVNode("summary",e2,[c.createElementVNode("span",t2,c.toDisplayString(C.headerName),1)]),c.createElementVNode("div",null,[c.unref(t)?(c.openBlock(),c.createBlock(Xc,{key:0,"filter-style":"vertical","enable-focus-view":s.enableFocusView,filterColDef:C,"display-preferences-icon":s.displayPreferencesIcon,"focusable-columns":s.focusableColumns,onFilterSelectionChanged:b,onHandleSettingsIcon:v[4]||(v[4]=F=>D.$emit("handle-settings-icon",F))},null,8,["enable-focus-view","filterColDef","display-preferences-icon","focusable-columns"])):c.createCommentVNode("",!0)])])],2))),128))])]),c.createElementVNode("div",o2,[c.createElementVNode("button",{class:"pv-button-ghost",onClick:v[5]||(v[5]=C=>y())},"Clear All"),c.createElementVNode("div",i2,[c.createVNode(c.unref(Qe),{variant:"ghost",label:"Cancel",onClick:v[6]||(v[6]=C=>P())}),m.value?(c.openBlock(),c.createBlock(c.unref(Qe),{key:0,variant:"primary",label:"Apply",onClick:v[7]||(v[7]=C=>k())})):(c.openBlock(),c.createBlock(c.unref(Qe),{key:1,variant:"primary",label:"No Changes",disabled:""}))])])])],512)):c.createCommentVNode("",!0)]),c.createVNode(c.unref(cA),{modelValue:d.value,"onUpdate:modelValue":v[10]||(v[10]=C=>d.value=C),header:"Clear All Filters",style:{top:"50%"}},{body:c.withCtx(()=>v[12]||(v[12]=[c.createElementVNode("p",{class:"pv-text-body-lg"},"This action will remove all currently applied filters. Would you like to continue?",-1)])),footer:c.withCtx(()=>[c.createElementVNode("div",s2,[c.createVNode(c.unref(Qe),{label:"Cancel",variant:"secondary",size:"lg",onClick:v[9]||(v[9]=C=>d.value=!1)}),c.createVNode(c.unref(Qe),{label:"Clear All Filters",variant:"primary",size:"lg",onClick:y})])]),_:1},8,["modelValue"])],64))}});function Yl(e){const t=e.value?.value!=null?e.value.value:e.value;return t==null||t===""?"":t}function Ql(e,t){const o=Number(e);return isFinite(o)?o.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:t}):String(e)}function tf(e){return typeof e!="number"?2:Math.min(Math.max(0,e),20)}function n2(e,t){const o=Yl(e);return o===""?"":"$"+Ql(o,tf(t))}function a2(e,t){return Yl(e)===""?"":Ql(e.value*100,tf(t))+"%"}function l2(e){const t=Yl(e);return t===""?"":Ql(t,0)}function d2(e,t){return e.value}const c2={class:"pv-flex"},u2={key:0,class:"pv-flex ag-header-actions"},h2=c.defineComponent({__name:"HeaderCellRenderer",props:{params:{}},setup(e,{expose:t}){const o=c.inject(zg,c.ref([])),i=e,s=c.ref(!1),r=c.ref(!1),n=c.ref(null),a=c.ref(null),l=c.ref(null),d=c.ref(!1),u=c.computed(()=>{const y=i.params.column.getColDef();return y.sortable||y.filter||y.enableRowGroup}),h=c.computed(()=>{if(!o.value||o.value.length===0)return"";const y=o.value.find(P=>P.colId===i.params.column.getColId()),x=y?y.sort:"";return x==="asc"?"arrow-up":x==="desc"?"arrow-down":""}),p=c.computed(()=>r.value?{cursor:"pointer"}:{}),g=c.computed(()=>d.value?{opacity:1}:{}),f=()=>{d.value=!1},m=()=>{d.value=!0,l.value&&i.params.showColumnMenu(l.value,f)},b=y=>{s.value=y.enableFilterButton,r.value=y.enableSorting||!1,n.value=y.displayName,a.value=Xg(y.column.getColDef().context?.dataType),n.value=$_(n.value,y.column.getColDef().context?.dataType)},w=()=>{r.value&&i.params.progressSort(!1)};c.onBeforeMount(()=>{b(i.params)});function S(y){return b(y),!0}return t({refresh:S}),(y,x)=>(c.openBlock(),c.createElementBlock("div",{class:"ag-custom-header-cell pv-flex pv-full-width pv-space-between",style:c.normalizeStyle(p.value),onClick:w},[c.createElementVNode("div",c2,[a.value?(c.openBlock(),c.createBlock(qe,{key:0,name:a.value,class:"pv-text-subdued"},null,8,["name"])):c.createCommentVNode("",!0),c.createElementVNode("p",null,c.toDisplayString(n.value),1),r.value&&h.value!==""?(c.openBlock(),c.createBlock(qe,{key:1,name:h.value},null,8,["name"])):c.createCommentVNode("",!0)]),u.value?(c.openBlock(),c.createElementBlock("div",u2,[c.createElementVNode("div",{ref_key:"menuButton",ref:l,class:"ag-header-cell-menu-button",style:c.normalizeStyle(g.value)},[c.createVNode(Qe,{size:"xl",variant:"ghost","left-icon":"menu",onClick:c.withModifiers(m,["stop","prevent"])})],4)])):c.createCommentVNode("",!0)],4))}}),Zc=Ut(h2,[["__scopeId","data-v-08855a14"]]),p2=Al.withParams({headerHeight:"30px",headerBackgroundColor:"#F7F8F8",headerCellHoverBackgroundColor:"#F7F8F8",headerColumnResizeHandleHeight:"50%",headerColumnResizeHandleWidth:"3px",headerColumnBorder:"none",headerFontWeight:"bold",headerFontSize:"12px",fontFamily:"Inter, sans-serif",fontSize:12,headerRowBorder:!0,rowHoverColor:"#F7F8F8",rangeSelectionBorderColor:"#36C5BA",rangeSelectionBorderStyle:"solid",wrapperBorder:"none",wrapperBorderRadius:"0px",menuBackgroundColor:"white",accentColor:"#36C5BA"}),g2=Al.withParams({headerHeight:"30px",headerBackgroundColor:"white",headerCellHoverBackgroundColor:"#F7F8F8",headerColumnResizeHandleHeight:"50%",headerColumnResizeHandleWidth:"3px",headerColumnBorder:"none",headerFontWeight:"bold",headerFontSize:"12px",fontFamily:"Inter, sans-serif",fontSize:12,headerRowBorder:!0,rowHoverColor:"#F7F8F8",rangeSelectionBorderColor:"#36C5BA",rangeSelectionBorderStyle:"solid",wrapperBorder:"none",wrapperBorderRadius:"0px",menuBackgroundColor:"white",accentColor:"#36C5BA"}),f2={class:"pv-popover-menu"},m2={class:"pv-popover",style:{"--height":"auto"}},v2=["disabled"],C2=c.defineComponent({__name:"ExportMenu",props:{getCsvData:{type:Function}},setup(e){const t=e,o=c.ref(!1);async function i(){o.value=!0;const s=await t.getCsvData();if(!s){o.value=!1;return}const r=new Blob([s],{type:"text/csv;charset=utf-8;"}),n=document.createElement("a");n.href=URL.createObjectURL(r),n.setAttribute("download","datatable_export.csv"),n.click(),o.value=!1}return(s,r)=>(c.openBlock(),c.createElementBlock("nav",f2,[r[0]||(r[0]=c.createElementVNode("button",{type:"button",class:"pv-button-icon"},[c.createElementVNode("svg",{"aria-hidden":"true",class:"pv-icon-24"},[c.createElementVNode("title",null,"ellipsis"),c.createElementVNode("use",{"xlink:href":"#ellipsis"})])],-1)),c.createElementVNode("div",m2,[c.createElementVNode("button",{class:"pv-button pv-text-body-sm pv-inset-square-8",onClick:c.withModifiers(i,["prevent"]),disabled:o.value},[o.value?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode("Exporting...")],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode("Download CSV")],64))],8,v2)])]))}}),b2={key:1,class:""},w2=c.defineComponent({__name:"PaginationPanel",props:{panelSize:{default:"xl"}},setup(e){ch.registerModules([rk]);const t=c.inject(zi,c.ref(null)),o=c.inject(qg,c.ref(1)),i=c.inject(Yg,c.ref(0)),s=e,r=c.computed(()=>{const d=i.value,u=o.value;if(d<=7)return Array.from({length:d},(p,g)=>g+1);const h=[];return u<=4?h.push(1,2,3,4,5,"...",d):u>=d-3?h.push(1,"...",d-4,d-3,d-2,d-1,d):h.push(1,"...",u-1,u,u+1,"...",d),h}),n=()=>{o.value>0&&t.value&&t?.value.paginationGoToPage(o.value-2)},a=()=>{o.value<i.value&&t.value&&t?.value.paginationGoToPage(o.value)},l=d=>{d>=1&&d<=i.value&&t.value&&t?.value.paginationGoToPage(d-1)};return(d,u)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["pv-flex",{"pv-hide":c.unref(i)<=1}])},[c.createVNode(Qe,{variant:"ghost",onClick:n,disabled:c.unref(o)===1,size:s.panelSize==="l"?"md":"lg","right-icon":"chevron-left"},null,8,["disabled","size"]),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.value,h=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:h},[typeof h=="number"?(c.openBlock(),c.createBlock(Qe,{key:0,variant:h===c.unref(o)?"primary":"ghost",size:s.panelSize==="l"?"md":"lg",onClick:p=>l(h),label:h.toString()},null,8,["variant","size","onClick","label"])):(c.openBlock(),c.createElementBlock("span",b2,"..."))],64))),128)),c.createVNode(Qe,{variant:"ghost",onClick:a,disabled:c.unref(o)===c.unref(i),size:s.panelSize==="l"?"md":"lg","right-icon":"chevron-right"},null,8,["disabled","size"])],2))}}),y2={key:0,class:"pv-tag"},S2=c.defineComponent({__name:"TagCellRenderer",props:{params:{}},setup(e){const t=e,o=c.computed(()=>{const i=t.params.valueFormatted||t.params.value||"";return i.trim()===""?null:i});return(i,s)=>o.value?(c.openBlock(),c.createElementBlock("div",y2,c.toDisplayString(o.value),1)):c.createCommentVNode("",!0)}}),R2={key:0,class:"pv-table-row-number"},x2=c.defineComponent({__name:"RowCountCellRenderer",props:{params:{}},setup(e){const t=e,o=c.computed(()=>(t.params.node?.rowIndex||0)+1),i=c.computed(()=>{const s=t.params.column?.getColDef(),r=t.params.valueFormatted||t.params.value;return s&&Jg(s)?r.toLocaleString():r});return(s,r)=>(c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("p",null,[o.value?(c.openBlock(),c.createElementBlock("span",R2,c.toDisplayString(o.value),1)):c.createCommentVNode("",!0),c.createTextVNode(" "+c.toDisplayString(i.value),1)])]))}}),F2=Ut(x2,[["__scopeId","data-v-706ed5a9"]]),of=()=>{const e=(r,n)=>{const a=r||{queryTerms:[]},l=n.queryTerm||{};return t(n)&&!i(r,n)&&a.queryTerms.push(l),a},t=r=>r.queryTerm?r.queryTerm.queryText!==void 0&&r.queryTerm.queryText.trim()!=="":!1,o=(r,n)=>r.queryField===n.queryField&&r.exactMatch===n.exactMatch&&r.queryText===n.queryText&&r.queryDisplayField===n.queryDisplayField,i=(r,n)=>!!r&&r.queryTerms.some(a=>o(a,n.queryTerm||{}));return{addQueryOption:e,containsQueryOption:i,removeQueryOption:(r,n)=>{if(!r)return null;const a=r.queryTerms.findIndex(l=>o(l,n.queryTerm||{}));return a!==-1&&r.queryTerms.splice(a,1),r}}},k2={class:"pv-flex"},D2={key:0,class:"pv-text-body-xs"},M2={key:0},P2={class:"pv-text-subdued pv-text-body-xs",style:{"font-weight":"500"}},E2=c.defineComponent({__name:"QueryBuilderMenuOptionRenderer",props:{id:{},text:{},subText:{},secondaryText:{},icon:{},companyName:{},avatar:{},groupingLabel:{},disabled:{type:Boolean},renderer:{},rendererProps:{},classList:{},searchText:{}},setup(e){const t=e,o=c.computed(()=>t.rendererProps),i=c.ref(null),s=c.computed(()=>o.value?.exactMatch||!1),r=c.computed(()=>t.text),n=c.computed(()=>t.searchText||""),a=c.computed(()=>o.value?.queryDisplayField),l=c.computed(()=>{const d=t.icon||"search";return s.value?d:"search"});return c.onMounted(()=>{if(i.value&&n.value){const d=new RegExp(`(${n.value})`,"gi");i.value.innerHTML=r.value.replace(d,'<span style="font-weight: bold;">$1</span>')}}),(d,u)=>(c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",k2,[c.createVNode(qe,{name:l.value},null,8,["name"]),c.createElementVNode("div",null,[c.createElementVNode("p",{ref_key:"queryOptionText",ref:i,class:"pv-text-body-md"},c.toDisplayString(r.value),513),a.value?(c.openBlock(),c.createElementBlock("p",D2,[s.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",M2,"Search in ")),c.createElementVNode("span",P2,c.toDisplayString(a.value),1)])):c.createCommentVNode("",!0)])])]))}}),A2=Ut(E2,[["__scopeId","data-v-a5c1e2d6"]]),T2=c.defineComponent({__name:"QueryFormatter",props:{modelValue:{required:!0},modelModifiers:{},"wrap-content":{type:Boolean,required:!1,default:!1},"wrap-contentModifiers":{}},emits:["update:modelValue","update:wrap-content"],setup(e){const t=c.useModel(e,"modelValue"),o=c.useModel(e,"wrap-content"),{removeQueryOption:i}=of(),s=c.ref(3),r=c.computed(()=>{const u=t.value?.queryTerms||[];return o.value?u:u.slice(0,s.value)}),n=c.computed(()=>{const u=t.value?.queryTerms.length||0,h=r.value.length;return u-h}),a=u=>u.queryField&&!u.exactMatch?`${u.queryDisplayField||u.queryField}: '${u.queryText}'`:u.queryText||"",l=u=>u.exactMatch?"primary":"tertiary",d=u=>{const h={id:"id",text:u.queryText||"",queryTerm:{queryText:u.queryText,queryDisplayField:u.queryDisplayField,queryField:u.queryField||"",exactMatch:u.exactMatch}};i(t.value,h)};return(u,h)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.value,(p,g)=>(c.openBlock(),c.createBlock(c.unref($a),{key:`${g}-${p.queryText}`,variant:l(p),label:a(p),"show-clear":!0,onHandleClose:f=>d(p)},null,8,["variant","label","onHandleClose"]))),128)),n.value>0?(c.openBlock(),c.createBlock(c.unref($a),{key:0,label:`+${n.value}`,onHandleClick:h[0]||(h[0]=p=>o.value=!0)},null,8,["label"])):c.createCommentVNode("",!0)],64))}}),I2=["disabled","placeholder","data-invalid"],L2={key:1,class:"pv-text-red pv-text-body-xs"},B2={key:1,class:"pv-text-center"},O2=c.defineComponent({__name:"PvQueryBuilderInput",props:c.mergeModels({placeholder:{default:"Search"},disabled:{type:Boolean,default:!1},displayShortcut:{type:Boolean},processor:{default:"full"},optionsLoading:{type:Boolean,default:!1}},{searchText:{required:!1,default:""},searchTextModifiers:{},query:{required:!0},queryModifiers:{},options:{required:!1},optionsModifiers:{}}),emits:["update:searchText","update:query","update:options"],setup(e){const t=e,o=c.useTemplateRef("search-input"),i=c.useModel(e,"searchText"),s=c.useModel(e,"query"),r=c.useModel(e,"options"),{addQueryOption:n,containsQueryOption:a}=of(),l=c.ref(!1),d=c.ref(!1),u=c.ref(!1),h=c.computed(()=>s.value!==null?"":t.placeholder),p=c.ref(null),g=c.computed(()=>p.value!==null&&p.value!==""&&!d.value),f=()=>{s.value=null,i.value="",p.value=null,u.value=!1},m=c.computed(()=>{if(!r.value||r.value.length===0)return[];let x=r.value;return t.processor==="field-only"&&(x=r.value.filter(P=>P.queryTerm?.queryField)),s.value&&(x=x.filter(P=>!a(s.value,P))),x=x.map(P=>({...P,searchText:i.value})),x}),b=()=>{l.value=!1,d.value=!1,u.value=!1},w=x=>{try{s.value=n(s.value,x),i.value=""}catch(P){console.error("Error adding query option:",P)}finally{l.value=!1,d.value=!1}};function S(x){const P=x.target;P.isContentEditable||P.closest('[contenteditable="true"]')||P.tagName==="BUTTON"||P.tagName==="SVG"||P.closest("button")||o.value?.focus()}function y(x){x.type==="focus"?(d.value=!0,l.value=!0):x.type}return(x,P)=>c.withDirectives((c.openBlock(),c.createElementBlock("div",{ref:"query-builder-input",class:"pv-relative pv-query-builder-input-wrapper",onFocus:y,onClick:S},[c.createVNode(qe,{name:"search"}),c.createElementVNode("div",{class:"pv-flex pv-full-width pv-inset-inline pv-query-builder-input",style:c.normalizeStyle([{"--inset-size":"4px"},u.value?"flex-wrap: wrap;":"flex-wrap: nowrap;"])},[c.createVNode(T2,{modelValue:s.value,"onUpdate:modelValue":P[0]||(P[0]=k=>s.value=k),"wrap-content":u.value,"onUpdate:wrapContent":P[1]||(P[1]=k=>u.value=k)},null,8,["modelValue","wrap-content"]),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":P[2]||(P[2]=k=>i.value=k),ref:"search-input","data-testid":"pv-search-input",type:"text",disabled:x.disabled,placeholder:h.value,"data-invalid":g.value?"true":void 0,onFocus:y,onBlur:y},null,40,I2),[[c.vModelText,i.value]])],4),s.value?(c.openBlock(),c.createBlock(c.unref(Qe),{key:0,variant:"ghost",leftIcon:"close",size:"md",onClick:f})):c.createCommentVNode("",!0),g.value?(c.openBlock(),c.createElementBlock("p",L2,c.toDisplayString(p.value),1)):c.createCommentVNode("",!0),m.value.length>0||x.optionsLoading?(c.openBlock(),c.createBlock(Hg,{key:2,open:l.value,popoverPositionStyle:{maxWidth:"100%",width:"100%"}},{default:c.withCtx(()=>[x.optionsLoading?(c.openBlock(),c.createElementBlock("div",B2,[c.createVNode(c.unref($l),{variant:"dark"})])):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(m.value,(k,D)=>(c.openBlock(),c.createBlock(os,{key:`${D}-${k.searchText}`,id:k.id,text:k.text,icon:k.icon,disabled:k.disabled,renderer:A2,"renderer-props":k.queryTerm,"search-text":k.searchText,onHandleSelected:v=>w(k)},null,8,["id","text","icon","disabled","renderer-props","search-text","onHandleSelected"]))),128))]),_:1},8,["open"])):c.createCommentVNode("",!0)],32)),[[c.unref(Wl),b]])}}),G2=Ut(O2,[["__scopeId","data-v-f23d0721"]]),N2=c.defineComponent({__name:"TableSearch",props:{placeholder:{},searchStyle:{}},setup(e){const t=e,o=c.ref(null),i=c.ref(""),s=c.ref([]),r=c.ref(!1),n=c.inject(zi,c.ref(null)),{isServerSideFilter:a,filterModel:l,tableSearchFilterModel:d,tableSearchHandler:u}=xn(),h=f=>{n?.value&&(a.value?console.error("Server-side filtering with table free text search is not yet supported."):n.value.setGridOption("quickFilterText",f))},p=f=>{if(n?.value){if(!a.value){console.error("Client-side filtering with query builder is not yet supported");return}d.value=yz(f),n.value?.onFilterChanged(),n.value?.refreshServerSide({purge:!0})}},g=async f=>{if(!f||f.length<2){s.value=[];return}if(!n?.value||!u?.value)return;const m={api:n.value,query:f,filterModel:l.value};r.value=!0;const w=(await u.value?.(m))?.filter(S=>S!==null)||[];s.value=w.map(S=>{let y="search";const x=n.value?.getColumnDef(S.queryField||"");return x&&(y=Xg(x.context?.dataType||null)||"search"),{id:`${S.queryField}-${S.queryText}`,text:S.queryText,icon:y,queryTerm:S}}),r.value=!1};return Ls(i,f=>{t.searchStyle==="query-builder"?g(f):t.searchStyle==="text"&&h(f)},{debounce:300,immediate:!0}),Ls(o,f=>{t.searchStyle==="query-builder"&&p(f)},{debounce:300,immediate:!0,deep:!0}),(f,m)=>f.searchStyle==="query-builder"?(c.openBlock(),c.createBlock(G2,{key:0,placeholder:f.placeholder,"search-text":i.value,"onUpdate:searchText":m[0]||(m[0]=b=>i.value=b),query:o.value,"onUpdate:query":m[1]||(m[1]=b=>o.value=b),options:s.value,"onUpdate:options":m[2]||(m[2]=b=>s.value=b),"options-loading":r.value},null,8,["placeholder","search-text","query","options","options-loading"])):(c.openBlock(),c.createBlock(c.unref(Ul),{key:1,placeholder:f.placeholder,modelValue:i.value,"onUpdate:modelValue":m[3]||(m[3]=b=>i.value=b)},null,8,["placeholder","modelValue"]))}}),V2={style:{"background-color":"white"},class:"pv-inset-square-8 pv-bordered-md pv-text-md"},H2={style:{color:"black"}},_2=c.defineComponent({__name:"TableTooltip",props:{params:{}},setup(e){return(t,o)=>(c.openBlock(),c.createElementBlock("div",V2,[c.createElementVNode("p",H2,c.toDisplayString(t.params.value),1)]))}}),z2={class:"pv-stack-16"},W2={class:"pv-flex pv-space-between"},$2={class:"pv-flex"},U2={key:0,class:"pv-stack-8 pv-flex pv-space-between"},j2={style:{width:"50%","max-width":"75%"}},K2={key:1,class:"pv-table-overlay"},q2={class:"pv-text-body-xs pv-text-center",style:{"padding-top":"16px"}},Y2=c.defineComponent({__name:"PvDataTable",props:{colDefs:{},rowData:{},serverSideRowHandler:{},filterValuesSetHandler:{},tableSearchHandler:{},initialGridState:{},initialFilterValueMap:{},theme:{},displayBaseAggregationsOnly:{type:Boolean,default:!1},displayRowNumber:{type:Boolean,default:!1},displayGroupCount:{type:Boolean,default:!0},displayPreferencesIcon:{type:Boolean,default:!1},enableColumnVisibilitySelector:{type:Boolean,default:!1},enableFocusView:{type:Boolean,default:!1},enableGroupBySelector:{type:Boolean,default:!1},enableTableSearch:{type:Boolean},enableTopSlot:{type:Boolean},enableVerticalFilterPanel:{type:Boolean,default:!0},rowGroupLimit:{},groupDefaultExpanded:{default:1},isClientSideGroupOpenByDefault:{},isServerSideGroupOpenByDefault:{},enableCsvExport:{type:Boolean,default:!1},csvRowLimit:{default:2e4},serverSideCsvHandler:{},uniqueRowIdField:{},requireFiltersToShowData:{type:Boolean,default:!1},isLoading:{type:Boolean},containerHeight:{default:500},containerMinHeight:{default:200},debugMode:{type:Boolean,default:!1},hideAllRowGroupedColumns:{type:Boolean,default:!1},leftPinnedColumnName:{},pagination:{type:Boolean,default:!1},paginationPageSize:{default:50},rowHeight:{},tooltipShowDelay:{default:1e3},tooltipHideDelay:{},hideTable:{type:Boolean},filterTeleportLocation:{},focusableColumns:{default:()=>[]},tableSearchPlaceholder:{default:"Search"},tableSearchStyle:{default:"text"},maxHorizontalFilters:{default:5},maintainColumnOrder:{type:Boolean,default:!0},customCssProperties:{}},emits:["column-moved","column-resized","column-row-group-changed","grid-ready","filter-changed","sort-changed","filter-opened","first-data-rendered","handle-settings-icon","focus-update"],setup(e,{expose:t,emit:o}){const i=[cF,dF,Ry,FD,vF,RF,qD,GP,NP,HD,Fx,VM,JF,zF,Dx,lk];Bp.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-065231}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Turquoise_Health}_is_granted_a_{Multiple_Applications}_Developer_License_for_{3}_Front-End_JavaScript_developers___All_Front-End_JavaScript_developers_need_to_be_licensed_in_addition_to_the_ones_working_with_{AG_Grid}_Enterprise___This_key_has_been_granted_a_Deployment_License_Add-on_for_{2}_Production_Environments___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{16_August_2025}____[v3]_[01]_MTc1NTI5ODgwMDAwMA==c042c2db0e82c322692ccb41e7b58f3e");const r=e;r.debugMode&&i.push(VR);const n=c.computed(()=>({height:`${r.containerHeight}px`,minHeight:`${r.containerMinHeight}px`})),a=c.computed(()=>r.theme?r.theme:y.value.length>0?g2:p2),l=o,d="serverSideRowHandler"in r&&r.serverSideRowHandler?{getRows:E=>{if(!k.value){E.success({rowData:[]}),x.value=!0;return}const q=E.success,ie=E.request.groupKeys?.length||0,we=E.request.rowGroupCols?.length||0,ke=B.value||{},Lt=ie===we;let jt=!1;we>0&&ie===0&&(jt=E.request.rowGroupCols[0].id in ke),(Lt||jt)&&Object.keys(ke).length>0&&(E.request.filterModel=xz(b,E.request.filterModel,ke)),E.success=So=>{if(r.enableFocusView&&U.value.length>0&&z.value&&So.rowData){const Us=Kc(So.rowData,z.value,U.value);if(Us){So.rowData=Us,q(So);return}}q(So)},r.serverSideRowHandler?.(E)}}:null,u="filterValuesSetHandler"in r&&r.filterValuesSetHandler?async E=>{let q=[];const ie={...O.value};!x.value&&w?q=ef(E.colDef,ie):q=await V(E.api,E.colDef,E.column,ie),E.success([...q,""])}:null,h=E=>{const q=E.node,ie=E.column?.getColId();return!q.group||!ie?!1:fe.value.some(we=>{if(we.field===ie)return!0})},p={suppressHeaderFilterButton:!0,editable:!1,sortable:!0,suppressHeaderMenuButton:!0,suppressColumnsToolPanel:!0,minWidth:200,flex:1,headerComponent:Zc,cellDataType:!1,tooltipComponent:_2,cellRendererSelector:q=>{if(h(q))return{component:Pz,params:q};if(!q.column?.getColDef().cellRenderer&&r.displayRowNumber&&y.value.length===0){const ie=q.api.getAllDisplayedColumns()||[],we=q.column;if(ie.findIndex(Lt=>Lt===we)===0)return{component:F2,params:q}}}},g=c.ref(void 0),f={name:"Column Filter",icon:'<span class="ag-icon ag-icon-filter"></span>',action:function(E){let q=E.column?.getColId();if(E.column&&Re(E.column)&&(q=ve.value?.getColId()||""),!Ie(q)){const we=E.api.getColumn(q)?.getColDef();we&&(S.value=we,c.nextTick(()=>{Ie(q)}))}}},m=(E,q)=>{const ie={...E};return q.isArrayField&&!E.valueFormatter?ie.valueFormatter=we=>d2(we,q.dataType):q.dataType===lo.Percent&&!E.valueFormatter?ie.valueFormatter=we=>a2(we,q.valueDecimals||0):q.dataType===lo.Currency&&!E.valueFormatter?ie.valueFormatter=we=>n2(we,q.valueDecimals||0):q.dataType===lo.Integer&&!E.valueFormatter?ie.valueFormatter=l2:q.dataType===lo.Tag&&!E.cellRenderer&&(ie.cellRenderer=S2),ie},b=r.colDefs?.map(E=>{let q={...E};d&&u&&Qa(E)&&(q=Fz(E,u));const ie=E.context;return ie&&(q=m(q,ie)),q})||[],w=jc(r.initialGridState,b),S=c.ref(null),y=c.ref([]),x=c.ref(!1),P=c.computed(()=>{if(y.value.length>0){const E=y.value[0],q=b.find(we=>we.field===E);if((!O.value||!O.value[E])&&q?.context?.filterRequiredToGroup)return q.headerName}return null}),k=c.computed(()=>(!O.value||Object.keys(O.value).length===0)&&r.requireFiltersToShowData?!1:P.value===null),D=c.computed(()=>P.value?`Select at least one value for "${P.value}" to view data.`:"Select a filter to view data."),v=c.shallowRef(null),C=c.ref([]),R=xn(),F=c.inject(qa,null),L=F||Qg(),O=R.filterModel,T=R.filterValueMap,_=R.filterValueSelectedMetadataMap,V=R.fetchFilterValues,G=R.filterStoreHandler,B=R.tableSearchFilterModel,I=R.tableSearchHandler;G.value=r.filterValuesSetHandler,I.value=r.tableSearchHandler,T.value=r.initialFilterValueMap||{};const W=c.ref(null),z=c.computed(()=>L?.computedFocusType.value||null),U=c.computed(()=>L?.computedFocuses.value||[]),$=c.computed(()=>b.filter(E=>E.filter)),oe=c.computed(()=>b.filter(E=>E.enableRowGroup)),fe=c.computed(()=>b.filter(E=>E.aggFunc)),ve=c.ref(null),Te=c.ref({}),ee=c.ref(1),ce=c.ref(0);c.provide(_g,R),c.provide(qa,L),c.provide(zg,C),c.provide(zi,v),c.provide(R_,W),c.provide(Wg,S),c.provide($g,$),c.provide(Ug,oe),c.provide(Kl,y),c.provide(jg,ve),c.provide(ql,Te),c.provide(Kg,x),c.provide(qg,ee),c.provide(Yg,ce);const pe=c.computed(()=>!r.enableFocusView&&!r.rowData||r.enableFocusView&&!U.value.length&&!z.value?r.rowData:Kc(r.rowData,z.value,U.value));c.watch(()=>U.value,E=>{l("focus-update",{filterField:z.value,focuses:E})});const Q=E=>{v.value=E.api;const q=r.leftPinnedColumnName??(y.value.length?y.value[0]:null),ie=[];r.hideAllRowGroupedColumns&&y.value.forEach(we=>ie.push(we)),q&&(ve.value=E.api.getColumn(q),ie.push(q)),w&&$i(w),E.api.setColumnsVisible([...ie],!1),W.value=E.api.getAllGridColumns(),ee.value=E.api.paginationGetCurrentPage()+1,ce.value=E.api.paginationGetTotalPages(),l("grid-ready",E)},Fe=E=>{if(v.value){const q=E.api.getFilterModel();Qc(O.value,q)||(O.value=q,x.value&&l("filter-changed",E))}},De=E=>{C.value=E.api?.getState()?.sort?.sortModel||[],x.value&&l("sort-changed",E)},Re=E=>E.getColId()&&E.getColId().includes("ag-Grid-AutoColumn"),be=c.ref(!1),me=async E=>{if(!v.value){console.error("Grid API not available");return}if(!d)return;const q=E||{route:[],purge:!0};v.value.refreshServerSide(q)},Ue=()=>_.value,ue=async()=>{if(be.value=!0,!v.value)return console.error("Grid API not available"),be.value=!1,null;try{const E=r.serverSideCsvHandler,q=v.value?.getState(),ie={rowGroupCols:[],valueCols:v.value?.getValueColumns().map(ke=>({id:ke.getId(),field:ke.getColDef().field,aggFunc:typeof ke.getColDef().aggFunc=="string"?ke.getColDef().aggFunc:void 0,displayName:ke.getColDef().headerName||ke.getColDef().field||""}))||[],filterModel:q?.filter?.filterModel||{},sortModel:q?.sort?.sortModel||[],pivotCols:[],pivotMode:!1,groupKeys:[],startRow:0,endRow:r.csvRowLimit};if(E){const ke={request:ie,parentNode:{},api:v.value,context:void 0,success:()=>{},fail:()=>{}};return await r.serverSideCsvHandler(ke),be.value=!1,null}const we=r.serverSideRowHandler;return we?await new Promise((ke,Lt)=>{const jt=v.value?.getState(),Xl={request:ie,parentNode:{},api:v.value,context:void 0,success:So=>{const Us=v.value?.getRowGroupColumns().map(gt=>gt.getColDef().field).filter(gt=>!!gt)||[],sf=v.value?.getAllDisplayedColumns().map(gt=>gt.getColDef().field).filter(gt=>!!gt)||[],rf=v.value?.getValueColumns().map(gt=>gt.getColDef().field).filter(gt=>!!gt)||[],nf=Array.from(new Set([...Us,...sf,...rf])),af=So.rowData.map(gt=>{const Zl={};return nf.forEach(Jl=>{const ed=gt[Jl];Zl[Jl]=ed!=null?String(ed):null}),Zl}),lf=jP.unparse(af);be.value=!1,ke(lf)},fail:()=>{be.value=!1,Lt("CSV export failed.")}};we(Xl,!0)}):(console.warn("Client-side export does not return CSV string"),be.value=!1,v.value.exportDataAsCsv(),null)}catch(E){return console.error("CSV export failed",E),be.value=!1,null}};t({getCsvData:ue,refreshData:me,getFilterValueSelectedMetadataMap:Ue,availableRowGroupColumns:oe,availableAggFuncColumns:fe,rowGroupColumnFields:y});const Pe=E=>{c.nextTick(()=>{const q=ve.value,ie=E.api.getRowGroupColumns(),we=ie.length>0;let ke;we&&r.leftPinnedColumnName&&(ke=E.api.getColumn(r.leftPinnedColumnName||"")),we&&!r.leftPinnedColumnName&&(ke=ie[0]),ke?(ve.value=ke,Ne.value.headerName=ke.getColDef().headerName,Ne.value.headerComponent=Zc,Ne.value.context={dataType:ve.value?.getColDef().context?.dataType||null},E.api.setColumnsVisible([ke.getColId()],!1)):(ve.value=null,Ne.value.headerName="",Ne.value.headerComponent=void 0,Ne.value.context=null);const Lt=q?.getColId();if((!ke||Lt!==ke.getColId())&&E.api.setColumnsVisible([Lt||""],!0),y.value=[...ie].map(jt=>jt.getColId()),r.enableFocusView&&!F){const jt=y.value.length>0?y.value[0]:null;L.setFocusType(jt)}x.value&&l("column-row-group-changed",E)})},Y=E=>{const q=E.column?.getColId()||"";if(q===ve.value?.getColId()){E.api.setColumnsVisible([q],!1);return}},X=E=>{E.finished&&(W.value=E.api.getAllGridColumns()),x.value&&l("column-moved",E)},te=E=>{E.api&&(ee.value=E.api.paginationGetCurrentPage()+1,ce.value=E.api.paginationGetTotalPages())},Ze=E=>"allChildrenRowCount"in E&&E.allChildrenRowCount||0,Ie=E=>{const q=document.querySelector(`[data-horizontal-filter-field="${E}"]`);if(q){const ie=q.querySelector("button");if(ie)return ie.click(),!0}return!1},lt=c.ref(B_),_e=c.ref({loadingMessage:"One moment please..."}),Ne=c.ref({headerName:"",minWidth:200,suppressMovable:!0,sortable:!1,pinned:"left",headerComponent:void 0,cellRendererParams:{suppressCount:!0,innerRenderer:W_,innerRendererParams:E=>({displayBaseAggregationsOnly:r.displayBaseAggregationsOnly,displayRowNumber:r.displayRowNumber,displayCount:r.displayGroupCount,formattedValue:E.valueFormatted,rowNode:E.node,api:v.value})}}),It=E=>{if(E.node.group)return{backgroundColor:"#F7F8F8"}},Wi={Median:E=>{const q=E.values;if(E.rowNode.leafGroup){const ke=Hc(q);return{values:q,value:ke}}const ie=E.values.flatMap(ke=>ke.values||[]),we=Hc(ie);return{values:ie,value:we}}};c.onBeforeMount(()=>{const E=Array.isArray(r.rowData)&&r.rowData.length>0,q=typeof r.serverSideRowHandler=="function",ie=typeof r.filterValuesSetHandler=="function";(E&&q||E&&ie)&&console.warn("Only one of `rowData` or `serverSideRowHandler + hasFilterValuesSetHandler` params should be provided to PvDataTable, not both."),g.value=we=>{const ke=["sortAscending","sortDescending","sortUnSort","rowUnGroup","valueAggSubMenu"],Lt=we.column&&Re(we.column)?ve.value:we.column;return Lt&&Lt.getColDef().filter&&ke.splice(2,0,f),ke.filter(jt=>typeof jt=="string"?we.defaultItems.includes(jt):!0)},w&&(O.value=w.filter?.filterModel||null,y.value=w.rowGroup?.groupColIds||[])});const $i=E=>{const q=v.value;if(!q)return;const ie=E.filter?.filterModel||null,we=E.rowGroup?.groupColIds||null,ke=E.columnVisibility||null;ie&&!Qc(ie,q.getFilterModel())&&q.setFilterModel(ie),we&&!Zg(we,y.value)&&q.setRowGroupColumns(we),ke?.hiddenColIds&&q.setColumnsVisible(ke.hiddenColIds,!1)};c.watch(()=>r.initialGridState,()=>{if(r.initialGridState){const E=jc(r.initialGridState,b);E&&$i(E)}},{deep:!0});const yo=E=>{x.value=!0,l("first-data-rendered",E)},Rt=E=>d?r.isServerSideGroupOpenByDefault?r.isServerSideGroupOpenByDefault(E):E.rowNode.level===y.value.length-2:!1,Vo=c.computed(()=>{if(!d)return r.groupDefaultExpanded});return(E,q)=>(c.openBlock(),c.createElementBlock("div",{class:"pv-full-width",style:c.normalizeStyle(n.value)},[c.withDirectives(c.createElementVNode("div",z2,[c.createElementVNode("div",W2,[(c.openBlock(),c.createBlock(c.Teleport,{to:E.filterTeleportLocation,disabled:!E.filterTeleportLocation},[$.value.length>0?(c.openBlock(),c.createBlock(r2,{key:0,"enable-focus-view":E.enableFocusView,"enable-vertical-panel":E.enableVerticalFilterPanel,"display-preferences-icon":E.displayPreferencesIcon,"focusable-columns":E.focusableColumns,onHandleSettingsIcon:q[0]||(q[0]=ie=>E.$emit("handle-settings-icon",ie)),"max-horizontal-filters":r.maxHorizontalFilters},null,8,["enable-focus-view","enable-vertical-panel","display-preferences-icon","focusable-columns","max-horizontal-filters"])):c.createCommentVNode("",!0)],8,["to","disabled"])),c.createElementVNode("div",$2,[E.enableGroupBySelector&&E.rowGroupLimit!==0?(c.openBlock(),c.createBlock(A_,{key:0,rowGroupLimit:E.rowGroupLimit,enableFocusView:E.enableFocusView},null,8,["rowGroupLimit","enableFocusView"])):c.createCommentVNode("",!0),E.enableCsvExport?(c.openBlock(),c.createBlock(C2,{key:1,getCsvData:ue})):c.createCommentVNode("",!0)])])],512),[[c.vShow,E.enableGroupBySelector||!E.filterTeleportLocation]]),c.createElementVNode("div",{class:c.normalizeClass(["pv-relative pv-stack-8",E.hideTable?"pv-hide":""]),style:{width:"100%",height:"calc(100% - 20px)","border-bottom":"1px solid #d2d7db"}},[E.enableTableSearch||E.enableTopSlot?(c.openBlock(),c.createElementBlock("div",U2,[c.createElementVNode("div",j2,[E.enableTableSearch?(c.openBlock(),c.createBlock(N2,{key:0,placeholder:E.tableSearchPlaceholder,disabled:!k.value,"search-style":E.tableSearchStyle},null,8,["placeholder","disabled","search-style"])):c.createCommentVNode("",!0)]),c.renderSlot(E.$slots,"top-slot")])):c.createCommentVNode("",!0),c.createVNode(c.unref(Ck),c.mergeProps({ref:"gridRef",style:[{width:"100%",height:"calc(100% - 44px)"},E.customCssProperties?.agGridWrapper]},c.unref(d)?{serverSideDatasource:c.unref(d)}:{},{onColumnMoved:X,onColumnRowGroupChanged:Pe,onColumnVisible:Y,onFilterChanged:Fe,onFilterOpened:q[1]||(q[1]=ie=>l("filter-opened",ie)),onFirstDataRendered:yo,onGridReady:Q,onPaginationChanged:te,onSortChanged:De,aggFuncs:Wi,autoGroupColumnDef:Ne.value,columnDefs:c.unref(b),debug:E.debugMode,defaultColDef:c.unref(p),getChildCount:Ze,getMainMenuItems:g.value,getRowStyle:It,groupDefaultExpanded:Vo.value,groupDisplayType:"singleColumn",initialState:c.unref(w)||void 0,isGroupOpenByDefault:c.unref(d)?void 0:r.isClientSideGroupOpenByDefault,isServerSideGroupOpenByDefault:Rt,loading:c.unref(d)?!1:E.isLoading,loadingCellRenderer:lt.value,loadingCellRendererParams:_e.value,maxConcurrentDatasourceRequests:c.unref(d)?-1:void 0,maintainColumnOrder:E.maintainColumnOrder,modules:i,rowData:pe.value,rowHeight:E.rowHeight,rowModelType:c.unref(d)?"serverSide":"clientSide",serverSideInitialRowCount:c.unref(d)?1:void 0,showOpenedGroup:!0,suppressAggFuncInHeader:!0,suppressColumnMoveAnimation:!0,suppressDragLeaveHidesColumns:!0,serverSideSortAllLevels:!1,serverSideEnableClientSideSort:!1,theme:a.value,pagination:E.pagination,suppressPaginationPanel:!0,paginationPageSize:E.paginationPageSize,suppressScrollOnNewData:!0,"tooltip-show-delay":E.tooltipShowDelay,"tooltip-hide-delay":E.tooltipHideDelay}),null,16,["style","autoGroupColumnDef","columnDefs","debug","defaultColDef","getMainMenuItems","groupDefaultExpanded","initialState","isGroupOpenByDefault","loading","loadingCellRenderer","loadingCellRendererParams","maxConcurrentDatasourceRequests","maintainColumnOrder","rowData","rowHeight","rowModelType","serverSideInitialRowCount","theme","pagination","paginationPageSize","tooltip-show-delay","tooltip-hide-delay"]),!E.isLoading&&!k.value?(c.openBlock(),c.createElementBlock("div",K2,[c.createElementVNode("p",q2,c.toDisplayString(D.value),1)])):c.createCommentVNode("",!0)],2),E.pagination?(c.openBlock(),c.createBlock(w2,{key:0})):c.createCommentVNode("",!0)],4))}});exports.PvDataTable=Y2;
|