@genesislcap/design-system-configurator 15.51.0 → 15.52.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/dist/{11.11.de34ac2c6c667d7ac034.js → 11.11.a00e63bc9f7b882d7530.js} +409 -409
- package/dist/11.49cbce22d79a29b44a9f29e097defbc7.js.map +1 -0
- package/dist/{designSystemConfigurator.9c7f8197060e034fc462e66b56215c4c.js.map → designSystemConfigurator.6348cdf44013d9ac3385e96c52b3cdf4.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.5543cadd9c9f1be26aa3f9bf7aa7bd63.js.map → main.56f16d8601a8d68ff4c9d256a3b312df.js.map} +1 -1
- package/dist/{main.c077dd8cfbb8dfed37b7.js → main.aa831db272a09cac445d.js} +2 -2
- package/dist/{npm.ag-grid-community.909.5fc980c27d843d182254.js → npm.ag-grid-community.909.055a06bc1550f8b67cae.js} +3 -3
- package/dist/{npm.ag-grid-community.786655849953847ce2400c81009593b7.js.map → npm.ag-grid-community.9352ef9481ac0e503195cdab9a269764.js.map} +1 -1
- package/dist/npm.ag-stack.475.6ba7b96ce961ef947211.js +2 -0
- package/dist/npm.ag-stack.fc8e4c2148dda04a475d563648e63f21.js.map +1 -0
- package/dist/remoteEntry.js +2 -2
- package/package.json +11 -11
- package/dist/11.fde394bc50847cede9fa9196d9c401a8.js.map +0 -1
- package/dist/npm.ag-stack.2e557a7c22cb1ed6a21d029806b1289d.js.map +0 -1
- package/dist/npm.ag-stack.475.cb6224965c8435e4f803.js +0 -2
- /package/dist/{npm.ag-grid-community.909.5fc980c27d843d182254.js.LICENSE.txt → npm.ag-grid-community.909.055a06bc1550f8b67cae.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[475],{38504(t,e,i){i.d(e,{$UK:()=>w,$ii:()=>P,Aag:()=>ut,Agl:()=>oe,Arb:()=>Qt,Axr:()=>xo,BiZ:()=>ii,BxM:()=>$,DDm:()=>o,DlC:()=>Ce,DqG:()=>Jt,ELu:()=>ae,Ejd:()=>vn,F4t:()=>Q,GUt:()=>Ut,GXs:()=>T,Gei:()=>Ae,HVY:()=>ht,HW9:()=>Et,HkI:()=>so,IP9:()=>Ke,IQD:()=>At,I_I:()=>vo,Ikv:()=>Di,J82:()=>Vi,JHD:()=>$t,JJT:()=>gt,K05:()=>zt,KCH:()=>Vt,LW4:()=>ki,M9x:()=>Kt,MSA:()=>No,MWY:()=>z,MbN:()=>yt,Moh:()=>qt,MpY:()=>S,MwW:()=>Bt,NPD:()=>fn,NUe:()=>Dt,NuO:()=>de,O65:()=>ye,OP3:()=>C,OSi:()=>k,Oxm:()=>F,PFX:()=>ve,PIC:()=>J,PZy:()=>Zo,Pfo:()=>fe,QSI:()=>Zt,Qmv:()=>O,QyW:()=>mt,Rq4:()=>dn,SjP:()=>Xo,T$n:()=>dt,T2p:()=>ft,TGw:()=>it,Tj4:()=>vi,TvF:()=>ci,UlD:()=>H,V1O:()=>uo,V67:()=>G,Vbm:()=>Fi,WB3:()=>Ii,WOR:()=>Fe,Wd2:()=>Lt,Wh2:()=>Yt,WpO:()=>Ft,WyG:()=>Ai,X17:()=>Xt,X3e:()=>io,X7E:()=>B,XfX:()=>Ne,YE1:()=>go,YR0:()=>Uo,YtT:()=>fo,ZL7:()=>n,Zio:()=>Pe,ZoY:()=>ue,_oU:()=>me,aC_:()=>bn,aas:()=>wt,awo:()=>st,b5C:()=>gi,bOs:()=>Qo,bfc:()=>Do,c7o:()=>rt,cBy:()=>lt,cdx:()=>Ko,cvw:()=>Rt,dDw:()=>_t,dHu:()=>mo,dPS:()=>he,dRA:()=>Ee,da2:()=>Ye,e3J:()=>ri,e4J:()=>Gt,eaQ:()=>I,ey2:()=>bo,fDi:()=>Mt,g3$:()=>po,gKP:()=>N,glw:()=>xe,gs1:()=>et,hVb:()=>Se,hfN:()=>qo,hv8:()=>De,iDr:()=>M,j0N:()=>W,jPA:()=>kt,jcS:()=>Ei,jv:()=>Jo,kA8:()=>D,keA:()=>Be,lXX:()=>q,lfG:()=>ro,lju:()=>ai,mMZ:()=>Wt,mmw:()=>Po,nJR:()=>tt,nf2:()=>Li,nl0:()=>Tt,o$6:()=>hn,oAJ:()=>nt,oGr:()=>jt,oRP:()=>xi,oY$:()=>y,oqb:()=>Ho,pWr:()=>L,pZu:()=>jo,pkA:()=>Ge,pp6:()=>pt,puL:()=>li,pw8:()=>Oo,q5V:()=>Lo,q8f:()=>di,q_t:()=>Wo,qiO:()=>E,ql4:()=>Pi,qmx:()=>at,qpX:()=>St,qph:()=>R,rGl:()=>Z,rqk:()=>Pt,rsR:()=>hi,sC6:()=>x,sK4:()=>Re,sNX:()=>Y,sZb:()=>rn,sbo:()=>wo,sgi:()=>We,tAb:()=>sn,u6m:()=>un,uI6:()=>ui,v4T:()=>ge,vMu:()=>Ot,vwK:()=>ct,w$:()=>gn,x1P:()=>we,xmb:()=>pn,xo4:()=>bt,yN4:()=>tn,yXy:()=>Ht,ykk:()=>f,yu_:()=>yo});var o={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"};function n(t){const{keyCode:e}=t;let i;switch(e){case 65:i=o.A;break;case 67:i=o.C;break;case 86:i=o.V;break;case 68:i=o.D;break;case 90:i=o.Z;break;case 89:i=o.Y;break;default:i=t.code}return i}var s="36.2.0",r="object"!=typeof window||!window?.document?.fonts?.forEach,a=!1,l=!1,c=()=>r&&!l||a,h=(t,e,i,o,n,r,a=!1)=>{if(c())return;let l=t;o&&(l=`@layer ${CSS.escape(o).replaceAll("\\.",".")} { ${t} }`);let h=g.map.get(e);if(h||(h=[],g.map.set(e,h)),h.some(t=>t.injectedCss===l))return;const u=document.createElement("style");r&&u.setAttribute("nonce",r),u.dataset.agCss=i,u.dataset.agCssVersion=s,u.textContent=l;const d={rawCss:t,injectedCss:l,el:u,priority:n,isParams:a};let p;for(const t of h){if(t.priority>n)break;p=t}if(p){p.el.after(u);const t=h.indexOf(p);h.splice(t+1,0,d)}else"STYLE"===e.nodeName?e.after(u):e.insertBefore(u,e.querySelector(":not(title, meta)")),h.push(d)},u=(t,e,i,o)=>{h(':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){font-family:inherit;font-size:inherit;line-height:inherit;padding:0}:where([class^=ag-]):where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}:where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-aria-description-container{border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;z-index:9999}.ag-popup{background-color:var(--ag-wrapper-background-color)}.ag-popup-child{max-width:min(100%,calc(100vw - 30px));top:0;z-index:5}.ag-popup-child:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}.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-styled-root{cursor:default;display:contents;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);font-weight:var(--ag-font-weight);--ag-indentation-level:0}:where(.ag-toolbar) .ag-react-container:where(:not(.ag-react-wrapper-block)){display:contents}: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-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.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-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select: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}}.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;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',t,"shared",e,0,i),o?.forEach((o,n)=>o.forEach(o=>h(o,t,n,e,0,i)))},d=(t,e=!1)=>{const i=new Set;for(const e of g.grids.values())e.styleContainer===t&&i.add(e.paramsCss);const o=g.map.get(t)??[];for(let t=o.length-1;t>=0;t--)(e||o[t].isParams&&!i.has(o[t].rawCss))&&(o[t].el.remove(),o.splice(t,1))},p=()=>{const t=globalThis.agStyleInjectionVersions??(globalThis.agStyleInjectionVersions=new Map);let e=t.get(s);return e||(e={map:new WeakMap,grids:new Map,paramsId:0},t.set(s,e)),e},g=p(),f=t=>new v(t),m="$default",b=0,v=class{constructor({feature:t,params:e,modeParams:i={},css:o,cssImports:n}){this.feature=t,this.css=o,this.cssImports=n,this.modeParams={[m]:{...i[m]??{},...e??{}},...i}}use(t,e,i){let o=this._inject;if(null==o){let{css:t}=this;if(t){const e=`ag-theme-${this.feature??"part"}-${++b}`;"function"==typeof t&&(t=t()),t=`:where(.${e}) {\n${t}\n}\n`;for(const e of this.cssImports??[])t=`@import url(${JSON.stringify(e)});\n${t}`;o={css:t,class:e}}else o=!1;this._inject=o}return o&&t&&h(o.css,t,o.class,e,1,i),!!o&&o.class}};var y=class t{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(t=>this.onDone(t),t=>this.onReject(t))}static all(e){return e.length?new t(t=>{let i=e.length;const o=new Array(i);e.forEach((e,n)=>{e.then(e=>{o[n]=e,i--,0===i&&t(o)})})}):t.resolve()}static resolve(e=null){return new t(t=>t(e))}then(e){return new t(t=>{1===this.status?t(e(this.resolution)):this.waiters.push(i=>t(e(i)))})}onDone(t){this.status=1,this.resolution=t;for(const e of this.waiters)e(t)}onReject(t){}},C=(t=>(t[t.Vertical=0]="Vertical",t[t.Horizontal=1]="Horizontal",t))(C||{}),w=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(t){this.frameworkOverrides=t}getListeners(t,e,i){const o=e?this.allAsyncListeners:this.allSyncListeners;let n=o.get(t);return!n&&i&&(n=new Set,o.set(t,n)),n}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(t,e,i=!1){this.getListeners(t,i,!0).add(e)}removeEventListener(t,e,i=!1){const o=this.getListeners(t,i,!1);o&&(o.delete(e),0===o.size&&(i?this.allAsyncListeners:this.allSyncListeners).delete(t))}addGlobalListener(t,e=!1){this.getGlobalListeners(e).add(t)}removeGlobalListener(t,e=!1){this.getGlobalListeners(e).delete(t)}dispatchEvent(t){this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(t){this.firedEvents[t.type]||this.dispatchEvent(t)}dispatchToListeners(t,e){const i=t.type;if(e&&"event"in t){const e=t.event;e instanceof Event&&(t.eventPath=e.composedPath())}const{frameworkOverrides:o}=this,n=t=>{const i=o?()=>o.wrapIncoming(t):t;e?this.dispatchAsync(i):i()},s=this.getListeners(i,e,!1);if((s?.size??0)>0){const e=new Set(s);for(const i of e)s?.has(i)&&n(()=>i(t))}const r=this.getGlobalListeners(e);if(r.size>0){const e=new Set(r);for(const o of e)n(()=>o(i,t))}}getGlobalListeners(t){return t?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(t){if(this.asyncFunctionsQueue.push(t),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},e=this.frameworkOverrides;e?e.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const t=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const e of t)e()}};function T(t){const e=t?.length;return e?t[e-1]:void 0}function S(t,e,i){if(t===e)return!0;if(!t||!e)return null==t&&null==e;const o=t.length;if(o!==e.length)return!1;if(i){for(let n=0;n<o;++n){const o=t[n],s=e[n];if(o!==s&&!i(o,s))return!1}return!0}for(let i=0;i<o;++i)if(t[i]!==e[i])return!1;return!0}function E(t,e){if(!e)return[];const i=e.length;if(t&&t!==e&&t.length===i){for(let o=0;o<i;++o)if(t[o]!==e[o])return e.slice();return t}return e.slice()}function P(t,e){const i=t.indexOf(e);i>=0&&t.splice(i,1)}function D(t,e){const i=t.length,o=e.length;if(!i||!o)return;let n=0;const s=new Set(e);for(let e=0;e<i;++e){const i=t[e];s.has(i)||(e!==n&&(t[n]=i),++n)}n<i&&(t.length=n)}function L(t,e,i){const o=e.length;for(let i=0;i<o;++i)P(t,e[i]);for(let n=o-1;n>=0;n--)t.splice(i,0,e[n])}function x(t,e){if(t===e)return[];const i=t?.length,o=e?.length;if(!i)return e?e.slice():[];if(!o)return t?t.slice():[];const n=new Set(t);for(let t=0;t<o;++t){const i=e[t];n.delete(i)||n.add(i)}return Array.from(n)}function k(t,e,i){const o=t.get(e);void 0!==o?o.push(i):t.set(e,[i])}function I(t){const e=new Map;if(t)for(let i=0,o=t.length;i<o;++i)e.set(t[i],i);return e}var A=Object.prototype.hasOwnProperty;function F(t,e){return"__proto__"!==e&&A.call(t,e)}function M(t,e){return null!=t&&F(t,e)?t[e]:void 0}var B=t=>null==t||""===t?null:t;function O(t){return null!=t&&""!==t}function z(t){return!O(t)}var R=t=>null!=t&&"function"==typeof t.toString?t.toString():null,G=(t,e)=>(t?JSON.stringify(t):null)===(e?JSON.stringify(e):null),W=(t,e,i=!1)=>("object"==typeof t&&null!==t&&"function"==typeof t.toNumber&&(t=t.toNumber()),"object"==typeof e&&null!==e&&"function"==typeof e.toNumber&&(e=e.toNumber()),null==t?null==e?0:-1:null==e?1:i&&"string"==typeof t?t.localeCompare(e):t>e?1:t<e?-1:0);function N(t){return t.eRootDiv.getRootNode()}function H(t){return N(t).activeElement}function $(t){const{gos:e,eRootDiv:i}=t;let o=null;const n=e.get("getDocument");return n&&O(n)?o=n():i&&(o=i.ownerDocument),o&&O(o)?o:document}function Y(t){const e=H(t);return null===e||e===$(t).body}function j(t){return $(t).defaultView||window}function K(t){let e,i=null;try{i=$(t).fullscreenElement}catch{}finally{i||(i=N(t));const o=i.querySelector("body");e=o||(i instanceof ShadowRoot?i:i instanceof Document?i?.documentElement:i)}return e}function _(t,e,i){null==i||"string"==typeof i&&""==i?X(t,e):V(t,e,i)}function V(t,e,i){t.setAttribute(U(e),i.toString())}function X(t,e){t.removeAttribute(U(e))}function U(t){return`aria-${t}`}function q(t,e){e?t.setAttribute("role",e):t.removeAttribute("role")}function Z(t){return t.getAttribute("aria-label")}function J(t,e){_(t,"label",e)}function Q(t,e){_(t,"labelledby",e)}function tt(t,e){_(t,"live",e)}function et(t,e){_(t,"invalid",e)}function it(t,e){_(t,"disabled",e)}function ot(t,e){_(t,"hidden",e)}function nt(t,e){V(t,"expanded",e)}function st(t,e){V(t,"setsize",e)}function rt(t,e){V(t,"posinset",e)}function at(t,e){V(t,"multiselectable",e)}function lt(t,e){V(t,"rowcount",e)}function ct(t,e){V(t,"rowindex",e)}function ht(t,e){V(t,"rowspan",e)}function ut(t,e){V(t,"colcount",e)}function dt(t,e){V(t,"colindex",e)}function pt(t,e){V(t,"colspan",e)}function gt(t,e){V(t,"sort",e)}function ft(t){X(t,"sort")}function mt(t,e){_(t,"selected",e)}function bt(t,e){_(t,"controls",e)}function vt(t,e){_(t,"owns",e)}function yt(t,e){return void 0===e?t("ariaIndeterminate","indeterminate"):!0===e?t("ariaChecked","checked"):t("ariaUnchecked","unchecked")}var Ct="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *, .ag-hidden, .ag-hidden *";function wt(t){if(!t)return!1;if(!t.matches("input, select, button, textarea"))return!1;return!t.matches(Ct)&&zt(t)}function Tt(t,e,i={}){const{skipAriaHidden:o}=i;t.classList.toggle("ag-hidden",!e),o||ot(t,!e)}function St(t,e){const i="disabled",o=e?t=>t.setAttribute(i,""):t=>t.removeAttribute(i);o(t);const n=t.querySelectorAll("input")??[];for(const t of n)o(t)}function Et(t,e,i){let o=0;for(;t;){if(t.classList.contains(e))return!0;if(t=t.parentElement,"number"==typeof i){if(++o>i)break}else if(t===i)break}return!1}function Pt(t){const{height:e,width:i,borderTopWidth:o,borderRightWidth:n,borderBottomWidth:s,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:h,marginTop:u,marginRight:d,marginBottom:p,marginLeft:g,boxSizing:f}=window.getComputedStyle(t),m=Number.parseFloat;return{height:m(e||"0"),width:m(i||"0"),borderTopWidth:m(o||"0"),borderRightWidth:m(n||"0"),borderBottomWidth:m(s||"0"),borderLeftWidth:m(r||"0"),paddingTop:m(a||"0"),paddingRight:m(l||"0"),paddingBottom:m(c||"0"),paddingLeft:m(h||"0"),marginTop:m(u||"0"),marginRight:m(d||"0"),marginBottom:m(p||"0"),marginLeft:m(g||"0"),boxSizing:f}}function Dt(t){const e=Pt(t);return"border-box"===e.boxSizing?e.height-e.paddingTop-e.paddingBottom-e.borderTopWidth-e.borderBottomWidth:e.height}function Lt(t){const e=Pt(t);return"border-box"===e.boxSizing?e.width-e.paddingLeft-e.paddingRight-e.borderLeftWidth-e.borderRightWidth:e.width}function xt(t){const{height:e,marginBottom:i,marginTop:o}=Pt(t);return Math.floor(e+i+o)}function kt(t){const{width:e,marginLeft:i,marginRight:o}=Pt(t);return Math.floor(e+i+o)}function It(t){const e=t.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:o,borderRightWidth:n,borderBottomWidth:s}=Pt(t);return{top:e.top+(i||0),left:e.left+(o||0),right:e.right+(n||0),bottom:e.bottom+(s||0)}}function At(t,e){let i=t.scrollLeft;return e&&(i=Math.abs(i)),i}function Ft(t,e,i){i&&(e*=-1),t.scrollLeft=e}function Mt(t){for(;t?.firstChild;)t.firstChild.remove()}function Bt(t){t?.parentNode&&t.remove()}function Ot(t){return!!t.offsetParent}function zt(t){if(t.checkVisibility)return t.checkVisibility({checkVisibilityCSS:!0});return!(!Ot(t)||"visible"!==window.getComputedStyle(t).visibility)}function Rt(t){const e=document.createElement("div");return e.innerHTML=(t||"").trim(),e.firstChild}function Gt(t,e,i){i?.nextSibling!==e&&(t.firstChild?i?i.nextSibling?t.insertBefore(e,i.nextSibling):t.appendChild(e):t.firstChild&&t.firstChild!==e&&t.prepend(e):t.appendChild(e))}function Wt(t,e){for(let i=0;i<e.length;i++){const o=e[i],n=t.children[i];n!==o&&t.insertBefore(o,n)}}function Nt(t){return t.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Ht(t,e){if(e)for(const i of Object.keys(e)){const o=e[i];if(!i?.length||null==o)continue;const n=Nt(i),s=o.toString(),r=s.replace(/\s*!important/g,""),a=r.length!=s.length?"important":void 0;t.style.setProperty(n,r,a)}}function $t(t){return()=>{const e=t();return!e||(Yt(e)||function(t){return t.clientHeight<t.scrollHeight}(e))}}function Yt(t){return t.clientWidth<t.scrollWidth}function jt(t,e){"flex"===e?(t.style.removeProperty("width"),t.style.removeProperty("minWidth"),t.style.removeProperty("maxWidth"),t.style.flex="1 1 auto"):Kt(t,e)}function Kt(t,e){e=Vt(e),t.style.width=e,t.style.maxWidth=e,t.style.minWidth=e}function _t(t,e){e=Vt(e),t.style.height=e,t.style.maxHeight=e,t.style.minHeight=e}function Vt(t){return"number"==typeof t?`${t}px`:t}function Xt(t){return t instanceof Node||t instanceof HTMLElement}function Ut(t,e,i){null==i||""===i?t.removeAttribute(e):t.setAttribute(e,i.toString())}function qt(t,e){if(!e.isContentEditable)return;const i=j(t).getSelection();if(!i)return;const o=$(t).createRange();o.selectNodeContents(e),o.collapse(!1),i.removeAllRanges(),i.addRange(o)}function Zt(t,e,i){const o=j(t).ResizeObserver,n=o?new o(i):null;return n?.observe(e),()=>n?.disconnect()}function Jt(t,e,i,o){const n=j(t).IntersectionObserver,s=n?new n(t=>{i(T(t))},o):null;return s?.observe(e),()=>s?.disconnect()}function Qt(t,e){const i=j(t);i.requestAnimationFrame?i.requestAnimationFrame(e):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(e):i.setTimeout(e,0)}var te,ee="data-ref";function ie(){return te??(te=document.createTextNode(" ")),te.cloneNode()}function oe(t){const{attrs:e,children:i,cls:o,ref:n,role:s,tag:r}=t,a=document.createElement(r);if(o&&(a.className=o),n&&a.setAttribute(ee,n),s&&a.setAttribute("role",s),e)for(const t of Object.keys(e))a.setAttribute(t,e[t]);if(i)if("string"==typeof i)a.textContent=i;else{let t=!0;for(const e of i)e&&("string"==typeof e?(a.appendChild(document.createTextNode(e)),t=!1):"function"==typeof e?a.appendChild(e()):(t&&(a.appendChild(ie()),t=!1),a.append(oe(e)),a.appendChild(ie())))}return a}var ne=["touchstart","touchend","touchmove","touchcancel","scroll"],se=["wheel"],re={},ae=(()=>{const t={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return e=>{if("boolean"==typeof re[e])return re[e];const i=document.createElement(t[e]||"div");return re[e="on"+e]=e in i}})();function le(t,e){return!(!e||!t)&&function(t){const e=t;if(e.path)return e.path;if(e.composedPath)return e.composedPath();return function(t){const e=[];let i=t.target;for(;i;)e.push(i),i=i.parentElement;return e}(e)}(e).indexOf(t)>=0}var ce=t=>{const e=ne.includes(t),i=se.includes(t);return!!e||!i&&void 0};function he(t,e,i){if(0===i)return!1;const o=Math.abs(t.clientX-e.clientX),n=Math.abs(t.clientY-e.clientY);return Math.max(o,n)<=i}var ue=(t,e)=>{const i=t.identifier;for(let t=0,o=e.length;t<o;++t){const o=e[t];if(o.identifier===i)return o}return null};function de(t,e){return t.gos.isElementInThisInstance(e.target)}function pe(t,e,i){const o=t.getBoundingClientRect().height,n=function(t){const e=K(t);return e?.clientWidth??(window.innerWidth||-1)}(i)-2,s=function(t){const e=K(t);return e?.clientHeight??(window.innerHeight||-1)}(i)-2;if(!t.offsetParent)return;const r=It(t.offsetParent),{clientY:a,clientX:l}=e;let c=a-r.top-o/2,h=l-r.left-10;const u=$(i),d=u.defaultView||window,p=d.pageYOffset||u.documentElement.scrollTop,g=d.pageXOffset||u.documentElement.scrollLeft;n>0&&h+t.clientWidth>n+g&&(h=n+g-t.clientWidth),h<0&&(h=0),s>0&&c+t.clientHeight>s+p&&(c=s+p-t.clientHeight),c<0&&(c=0),t.style.left=`${h}px`,t.style.top=`${c}px`}var ge=(t,...e)=>{for(const i of e){const[e,o,n,s]=i;e.addEventListener(o,n,s),t.push(i)}},fe=t=>{if(t){for(const[e,i,o,n]of t)e.removeEventListener(i,o,n);t.length=0}},me=t=>{t.cancelable&&t.preventDefault()};function be(t,e){return e}function ve(t){return t?.getLocaleTextFunc()??be}function ye(t,e,i,o){const n=e[i];return t.getLocaleTextFunc()(i,"function"==typeof n?n(o):n,o)}function Ce(t){return(e,i,o)=>t({key:e,defaultValue:i,variableValues:o})}function we(t){return(e,i,o)=>{let n=t?.[e];if(n&&o?.length){let t=0;for(;!(t>=o.length);){if(-1===n.indexOf("${variable}"))break;n=n.replace("${variable}",o[t++])}}return n??i}}var Te={type:"destroyed"},Se=class{constructor(){this.beans=null,this.gos=null,this.eventSvc=null,this.destroyed=!1,this.localEventService=null,this.stubContext=null,this.destroyFunctions=null,this.propertyListenerId=0,this.lastChangeSetIdLookup=null}preWireBeans(t){this.beans=t,this.gos=t.gos,this.eventSvc=t.eventSvc,this.stubContext=t.context}destroy(){const t=this.destroyFunctions;if(t){for(let e=0;e<t.length;e++)t[e]();t.length=0}this.destroyed=!0,this.dispatchLocalEvent(Te)}addEventListener(t,e,i){let o=this.localEventService;o||(o=new w,this.localEventService=o),o.addEventListener(t,e,i)}removeEventListener(t,e,i){this.localEventService?.removeEventListener(t,e,i)}dispatchLocalEvent(t){this.localEventService?.dispatchEvent(t)}addManagedElementListeners(t,e){return this._setupListeners(t,e)}addManagedEventListeners(t){return this._setupListeners(this.eventSvc,t)}addManagedListeners(t,e){return this._setupListeners(t,e)}_setupListeners(t,e){const i=[],o=Object.keys(e);for(let n=0,s=o.length;n<s;++n){const s=o[n],r=e[s];r&&i.push(this._setupListener(t,s,r))}return i}_setupListener(t,e,i){if(this.destroyed)return()=>null;let o;if(function(t){return void 0!==t.__addEventListener}(t))t.__addEventListener(e,i),o=()=>(t.__removeEventListener(e,i),null);else{const n=function(t){return"global"===t.eventServiceType}(t);t instanceof HTMLElement?function(t,e,i){const o=ce(e);let n;null!=o&&(n={passive:o}),t.addEventListener(e,i,n)}(t,e,i):n?t.addListener(e,i):t.addEventListener(e,i),o=n?()=>(t.removeListener(e,i),null):()=>(t.removeEventListener(e,i),null)}return this.registerDestroyFunc(o)}setupPropertyListener(t,e){const{gos:i}=this;i.addPropertyEventListener(t,e);return this.registerDestroyFunc(()=>(i.removePropertyEventListener(t,e),null))}addManagedPropertyListener(t,e){return this.destroyed?()=>null:this.setupPropertyListener(t,e)}addManagedPropertyListeners(t,e){if(this.destroyed)return;const i=t.join("-")+this.propertyListenerId++,o=t=>{const o=t.changeSet;if(o){let t=this.lastChangeSetIdLookup;if(t||(t={},this.lastChangeSetIdLookup=t),o.id===t[i])return;t[i]=o.id}const n={type:"propertyChanged",changeSet:o,source:t.source};e(n)};for(let e=0,i=t.length;e<i;++e)this.setupPropertyListener(t[e],o)}isAlive(){return!this.destroyed}getLocaleTextFunc(){return ve(this.beans.localeSvc)}pushDestroyFunc(t){const e=this.destroyFunctions;e?e.push(t):this.destroyFunctions=[t]}registerDestroyFunc(t){return this.pushDestroyFunc(t),()=>{t();const e=this.destroyFunctions;return e&&P(e,t),null}}addDestroyFunc(t){this.destroyed?t():this.pushDestroyFunc(t)}createOptionalManagedBean(t,e){return t?this.createManagedBean(t,e):void 0}createManagedBean(t,e){const i=this.createBean(t,e);return this.addDestroyFunc(this.destroyBean.bind(this,t,e)),i}createBean(t,e,i){return(e||this.stubContext).createBean(t,i)}destroyBean(t,e){return(e||this.stubContext).destroyBean(t)}destroyBeans(t,e){return(e||this.stubContext).destroyBeans(t)}};Se.prototype.__v_skip=!0;var Ee=null;function Pe(t){return"function"==typeof t?.getGui}var De=class{constructor(t){this.cssClassStates={},this.getGui=t}toggleCss(t,e){if(!t)return;if(t.includes(" ")){const i=(t||"").split(" ");if(i.length>1){for(const t of i)this.toggleCss(t,e);return}}this.cssClassStates[t]!==e&&t.length&&(this.getGui()?.classList.toggle(t,e),this.cssClassStates[t]=e)}},Le=0,xe=class extends Se{constructor(t,e){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Le++,this.cssManager=new De(()=>this.eGui),this.componentSelectors=new Map((e??[]).map(t=>[t.selector,t])),t&&this.setTemplate(t)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(t,e){t&&this.gos&&(this.applyElementsToComponent(t),this.createChildComponentsFromTags(t,e))}getCompId(){return this.compId}getDataRefAttribute(t){return t.getAttribute?t.getAttribute(ee):null}applyElementsToComponent(t,e,i,o=null){if(void 0===e&&(e=this.getDataRefAttribute(t)),e){const n=this[e];if(n===Ee)this[e]=o??t;else{const t=i?.[e];if(!this.suppressDataRefValidation&&!t)throw new Error(`data-ref: ${e} on ${this.constructor.name} with ${n}`)}}}createChildComponentsFromTags(t,e){const i=[];for(const e of t.childNodes??[])i.push(e);for(const o of i){if(!(o instanceof HTMLElement))continue;const i=this.createComponentFromElement(o,t=>{const e=t.getGui();if(e)for(const t of o.attributes??[])e.setAttribute(t.name,t.value)},e);if(i){if(i.addItems&&o.children.length){this.createChildComponentsFromTags(o,e);const t=Array.prototype.slice.call(o.children);i.addItems(t)}this.swapComponentForNode(i,t,o)}else o.childNodes&&this.createChildComponentsFromTags(o,e)}}createComponentFromElement(t,e,i){const o=t.nodeName,n=this.getDataRefAttribute(t),s=0===o.indexOf("AG-"),r=s?this.componentSelectors.get(o):null;let a=null;if(r){const t=i&&n?i[n]:void 0;a=new r.component(t),a.setParentComponent(this),this.createBean(a,null,e)}else if(s)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(t,n,i,a),a}swapComponentForNode(t,e,i){const o=t.getGui();e.replaceChild(o,i),e.insertBefore(document.createComment(i.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,t))}activateTabIndex(t,e){const i=e??this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui());for(const e of t)e.setAttribute("tabindex",i.toString())}setTemplate(t,e,i){let o;o="string"==typeof t||null==t?Rt(t):oe(t),this.setTemplateFromElement(o,e,i)}setTemplateFromElement(t,e,i,o=!1){if(this.eGui=t,this.suppressDataRefValidation=o,e)for(let t=0;t<e.length;t++){const i=e[t];this.componentSelectors.set(i.selector,i)}this.wireTemplate(t,i)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(t){this.parentComponent=t}getParentComponent(){return this.parentComponent}setGui(t){this.eGui=t}queryForHtmlElement(t){return this.eGui.querySelector(t)}getContainerAndElement(t,e){let i=e;return null==t?null:(i||(i=this.eGui),Xt(t)?{element:t,parent:i}:{element:t.getGui(),parent:i})}prependChild(t,e){const{element:i,parent:o}=this.getContainerAndElement(t,e)||{};i&&o&&o.prepend(i)}appendChild(t,e){const{element:i,parent:o}=this.getContainerAndElement(t,e)||{};i&&o&&o.appendChild(i)}isDisplayed(){return this.displayed}setVisible(t,e={}){if(t!==this.visible){this.visible=t;const{skipAriaHidden:i}=e;!function(t,e,i={}){const{skipAriaHidden:o}=i;t.classList.toggle("ag-invisible",!e),o||ot(t,!e)}(this.eGui,t,{skipAriaHidden:i})}}setDisplayed(t,e={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:i}=e;Tt(this.eGui,t,{skipAriaHidden:i});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(t,e,i){this.eGui.addEventListener(t,e,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(t,e))}addCss(t){this.cssManager.toggleCss(t,!0)}removeCss(t){this.cssManager.toggleCss(t,!1)}toggleCss(t,e){this.cssManager.toggleCss(t,e)}registerCSS(t){this.css===ke?(this.css=[t],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(t))}addGlobalCss(){if(Array.isArray(this.css)){const t="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const e of this.css??[])this.beans.environment.addGlobalCSS(e,t)}this.css=ke}},ke=Symbol(),Ie=1,Ae=class{constructor(t){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=Ie++,t?.beanClasses&&(this.beanDestroyComparator=t.beanDestroyComparator,this.init(t))}init(t){this.id=t.id,this.beans.context=this,this.destroyCallback=t.destroyCallback;for(const e of Object.keys(t.providedBeanInstances))this.beans[e]=t.providedBeanInstances[e];for(const e of t.beanClasses){const t=new e;t.beanName?this.beans[t.beanName]=t:console.error(`Bean ${e.name} is missing beanName`),this.createdBeans.push(t)}for(const e of t.derivedBeans??[]){const{beanName:t,bean:i}=e(this);this.beans[t]=i,this.createdBeans.push(i)}t.beanInitComparator&&this.createdBeans.sort(t.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(t,e){return this.initBeans([t],e),t}initBeans(t,e){const i=this.beans;for(const e of t)e.preWireBeans?.(i),e.wireBeans?.(i);for(const e of t)e.preConstruct?.();e&&t.forEach(e);for(const e of t)e.postConstruct?.()}getBeans(){return this.beans}getBean(t){return this.beans[t]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const t=this.getBeanInstances();this.beanDestroyComparator&&t.sort(this.beanDestroyComparator),this.destroyBeans(t),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(t){t?.destroy?.()}destroyBeans(t){if(t)for(let e=0;e<t.length;e++)this.destroyBean(t[e]);return[]}isDestroyed(){return this.destroyed}},Fe=!1,Me=new Set,Be=(t,e)=>{Me.has(e)||(Me.add(e),t())};Be._set=Me;var Oe={pending:!1,funcs:[]},ze={pending:!1,funcs:[]};function Re(t,e="setTimeout",i){const o="raf"===e?ze:Oe;if(o.funcs.push(t),o.pending)return;o.pending=!0;const n=()=>{const t=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const e of t)e()};"raf"===e?Qt(i,n):window.setTimeout(n,0)}function Ge(t,e,i){let o;return function(...n){const s=this;return window.clearTimeout(o),o=window.setTimeout(function(){t.isAlive()&&e.apply(s,n)},i),o}}function We(t,e){let i=0;return function(...o){const n=Date.now();n-i<e||(i=n,t.apply(this,o))}}function Ne(t,e,i,o=100){const n=Date.now();let s=null,r=!1;const a=()=>{null!=s&&(window.clearInterval(s),s=null)};t.addDestroyFunc(a);const l=()=>{const t=Date.now()-n>o;(e()||t)&&(i(),r=!0,a())};l(),r||(s=window.setInterval(l,10))}var He=Fe?0:200,$e=Fe?0:50,Ye=class extends Se{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.announcementGenerations=new Map,this.lastAnnouncement="",this.updateAnnouncement=Ge(this,this.updateAnnouncement.bind(this),He)}setDescriptionContainer(t){this.descriptionContainer=t,tt(t,"polite"),_(t,"relevant","additions text"),function(t,e){_(t,"atomic",e)}(t,!0),this.updateAnnouncement()}announceValue(t,e){const i=(this.announcementGenerations.get(e)??0)+1;this.announcementGenerations.set(e,i),this.pendingAnnouncements.set(e,{generation:i,value:t}),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const t=Array.from(this.pendingAnnouncements,([t,e])=>({...e,key:t}));this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{const e=t.filter(({generation:t,key:e})=>this.announcementGenerations.get(e)===t).map(({value:t})=>t).join(". ");this.handleAnnouncementUpdate(e)},$e)}handleAnnouncementUpdate(t){if(!this.isAlive()||!this.descriptionContainer)return;let e=t;null!=e&&""!=e.replace(/[ .]/g,"")?(this.lastAnnouncement===e&&(e=`${e}`),this.lastAnnouncement=e,this.descriptionContainer.textContent=e):this.lastAnnouncement=""}destroy(){super.destroy(),this.descriptionContainer=null,this.pendingAnnouncements.clear(),this.announcementGenerations.clear()}};function je(t,e,i){const[o,n]=function(t,e){const[i,o]=Ke();return o.appendChild(e),[i,_e(t,o)]}(t,i);return e.appendChild(o),()=>{n(),o.remove()}}function Ke(){const t={tag:"div",cls:"ag-styled-root"},e=oe({...t,children:[{...t,children:[t]}]});return[e,e.firstElementChild.firstElementChild]}function _e(t,e,i,o,n){const s=e.parentElement,r=s.parentElement,a=()=>{const[a,l,c]=t.getStyledRootClasses(o,n);r.className=["ag-styled-root",a].join(" "),s.className=["ag-styled-root",l].join(" "),e.className=["ag-styled-root",c].join(" "),i?.()};return a(),t.onThemeChanged(a)}var Ve,Xe,Ue,qe,Ze,Je,Qe,ti,ei,ii=class extends Se{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.disconnect=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(t,e=!1){const i={capturePointer:!0,dragSource:t,eElement:t.eElement,dragStartPixels:t.dragStartPixels,onDragStart:e=>this.onDragStart(t,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:e};this.dragSourceAndParamsList.push(i),this.beans.dragSvc.addDragSource(i)}setDragImageCompIcon(t,e=!1){const i=this.dragImageComp;i&&(e||this.dragImageLastIcon!==t)&&(this.dragImageLastIcon=t,i.setIcon(t,e))}removeDragSource(t){const{dragSourceAndParamsList:e,beans:i}=this;for(let o=0,n=e.length;o<n;o++)if(e[o].dragSource===t){const t=e[o];i.dragSvc?.removeDragSource(t),e.splice(o,1);break}}destroy(){const{dragSourceAndParamsList:t,dropTargets:e,beans:i}=this,o=i.dragSvc;for(const e of t)o?.removeDragSource(e);t.length=0,e.length=0,this.externalDropZoneCount=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const t=this.lastMouseEvent;t&&this.onDragging(t,!0)}onDragStart(t,e){this.lastMouseEvent=e,this.dragSource=t,this.dragItem=t.getDragItem();const i=t.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=e.clientX-i.left,this.dragInitialSourcePointerOffsetY=e.clientY-i.top,t.onDragStarted?.(),this.createAndUpdateDragImageComp(t)}onDragStop(t){const{dragSource:e,lastDropTarget:i}=this;if(e?.onDragStopped?.(),i){const e=this.dropTargetEvent(i,t,!1);i.onDragStop?.(e)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:t,lastDropTarget:e,lastMouseEvent:i}=this;if(t?.onDragCancelled?.(),e&&i){const t=this.dropTargetEvent(e,i,!1);e.onDragCancel?.(t)}this.clearDragAndDropProperties()}onDragging(t,e=!1){this.positionDragImageComp(t);const i=this.findCurrentDropTarget(t),{lastDropTarget:o,dragSource:n,dragItem:s}=this;let r=!1;if(i!==o){if(r=!0,o){const i=this.dropTargetEvent(o,t,e);o.onDragLeave?.(i)}if(null===o||i?null===o&&i&&this.handleEnter(n,s):this.handleExit(n,s),i){const o=this.dropTargetEvent(i,t,e);i.onDragEnter?.(o)}this.lastDropTarget=i}else if(i){const o=this.dropTargetEvent(i,t,e);i.onDragging?.(o),o?.changed&&(r=!0)}this.lastMouseEvent=t,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(t){const e=t.getContainer(),i=t.getSecondaryContainers?.(),o=i?.length;if(!o)return[[e]];const n=new Array(o+1);n[0]=[e];for(let t=0;t<o;++t)n[t+1]=i[t];return n}isMouseOnDropTarget(t,e){const i=this.getAllContainersFromDropTarget(e);let o=!1;const n=(t,e)=>{for(const i of e){const{width:e,height:o,left:n,right:s,top:r,bottom:a}=i.getBoundingClientRect();if(0===e||0===o)return!1;const l=t.clientX>=n&&t.clientX<s,c=t.clientY>=r&&t.clientY<a;if(!l||!c)return!1}return!0};for(const e of i)if(n(t,e)){o=!0;break}const{eElement:s,type:r}=this.dragSource;return!(e.targetContainsSource&&!e.getContainer().contains(s))&&(o&&e.isInterestedIn(r,s))}findCurrentDropTarget(t){const e=[],i=this.dropTargets;for(let o=0,n=i.length;o<n;++o){const n=i[o];this.isMouseOnDropTarget(t,n)&&e.push(n)}const o=e.length;if(0===o)return null;if(1===o)return e[0];const n=N(this.beans).elementsFromPoint(t.clientX,t.clientY);for(let t=0,i=n.length;t<i;++t){const i=n[t];for(let t=0,o=e.length;t<o;t++){const o=e[t],n=this.getAllContainersFromDropTarget(o);let s=!1;for(let t=0,e=n.length;t<e&&!s;t++){const e=n[t];for(let t=0,o=e.length;t<o;t++)if(e[t]===i){s=!0;break}}if(s)return o}}return null}addDropTarget(t){this.dropTargets.push(t),t.external&&this.externalDropZoneCount++}removeDropTarget(t){const e=t.getContainer(),i=this.dropTargets;let o=0;for(let t=0,n=i.length;t<n;++t){const n=i[t];n.getContainer()!==e?(o!==t&&(i[o]=n),++o):n.external&&--this.externalDropZoneCount}i.length=o}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(t){const e=this.dropTargets;for(let i=0,o=e.length;i<o;++i){const o=e[i];if(o.external&&o.getContainer()===t)return o}return null}dropTargetEvent(t,e,i){const{dragSource:o,dragItem:n,lastDraggingEvent:s,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,c=t.getContainer(),h=c.getBoundingClientRect(),{clientX:u,clientY:d}=e,p=u-(r?.clientX||0),g=d-(r?.clientY||0),f=this.createEvent({event:e,x:u-h.left,y:d-h.top,vDirection:g>0?"down":g<0?"up":null,hDirection:p<0?"left":p>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:o,fromNudge:i,dragItem:n,dropZoneTarget:c,dropTarget:s?.dropTarget??null,changed:!!s?.changed});return this.lastDraggingEvent=f,f}positionDragImageComp(t){const e=this.dragImageComp?.getGui();e&&pe(e,t,this.beans)}removeDragImageComp(t){this.dragImageComp===t&&(this.dragImageComp=null),t&&(this.disconnect?.(),this.disconnect=null,this.destroyBean(t))}createAndUpdateDragImageComp(t){const e=this.createDragImageComp(t)??null;this.dragImageCompPromise=e,e?.then(t=>{const i=this.lastMouseEvent;if(e!==this.dragImageCompPromise||!i||!this.isAlive())return void this.destroyBean(t);this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const o=this.dragImageComp;o!==t&&(this.dragImageComp=t,this.removeDragImageComp(o)),t&&(this.appendDragImageComp(t),this.updateDragImageComp(),this.positionDragImageComp(i))})}appendDragImageComp(t){const e=t.getGui(),i=e.style;i.position="absolute",i.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(i.pointerEvents="none"),this.gos.setInstanceDomData(e),i.top="20px",i.left="20px";const o=K(this.beans);o?this.disconnect=je(this.beans.environment,o,e):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:t,dragSource:e,lastDropTarget:i,lastDraggingEvent:o,dragImageLastLabel:n}=this;if(!t)return;this.setDragImageCompIcon(i?.getIconName?.(o)??null);let s=e?.dragItemName;"function"==typeof s&&(s=s(o)),s||(s=""),n!==s&&(this.dragImageLastLabel=s,t.setLabel(s))}},oi=(t,e)=>{if(null!=e&&t?.setPointerCapture)try{return t.setPointerCapture(e),t.hasPointerCapture(e)}catch{}return!1},ni=t=>{const{eElement:e,onLost:i}=t;e&&i&&(e.removeEventListener("lostpointercapture",i),t.onLost=null)},si=(t,e)=>{ni(t);const{eElement:i,pointerId:o}=t;i&&e.pointerId===o&&oi(i,o)};function ri(){return void 0===Ve&&(Ve=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Ve}function ai(){return void 0===Xe&&(Xe=/(firefox)/i.test(navigator.userAgent)),Xe}function li(){return void 0===Ue&&(Ue=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Ue}function ci(){return void 0===qe&&(qe=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),qe}function hi(t){if(!t)return null;const e=t.tabIndex,i=t.getAttribute("tabIndex");return-1!==e||null!==i&&(""!==i||ai())?e.toString():null}function ui(){if(void 0!==Qe)return Qe;if(!document.body)return-1;let t=1e6;const e=ai()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const o=2*t;if(i.style.height=o+"px",o>e||i.clientHeight!==o)break;t=o}return i.remove(),Qe=t,t}function di(){return null==Je&&pi(),Je}function pi(){const t=document.body,e=document.createElement("div");e.style.width=e.style.height="100px",e.style.opacity="0",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar",e.style.position="absolute",t.appendChild(e);let i=e.offsetWidth-e.clientWidth;0===i&&0===e.clientWidth&&(i=null),e.parentNode&&e.remove(),null!=i&&(Je=i,Ze=0===i)}function gi(){return null==Ze&&pi(),Ze}var fi={passive:!0},mi={passive:!1},bi=t=>{if(ei){if(ei.has(t))return!1}else ei=new WeakSet;return ei.add(t),!0},vi=class extends Se{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!ti?.has(N(this.beans))}hasPointerCapture(){const t=this.drag?.pointerCapture;return!(!t||!this.beans.eRootDiv.hasPointerCapture?.(t.pointerId))}destroy(){this.drag&&this.cancelDrag();const t=this.dragSources;for(const e of t)yi(e);t.length=0,super.destroy()}removeDragSource(t){const e=this.dragSources;for(let i=0,o=e.length;i<o;++i){const o=e[i];if(o.params===t){e.splice(i,1),yi(o);break}}}addDragSource(t){if(!this.isAlive())return;const{eElement:e,includeTouch:i}=t,o=[];let n;if(i){const t=e.style;t&&(n=t.touchAction,t.touchAction="none")}const s={handlers:o,params:t,oldTouchAction:n};this.dragSources.push(s);ge(o,[e,"pointerdown",e=>this.onPointerDown(t,e),mi],[e,"mousedown",e=>this.onMouseDown(t,e)]);const r=this.gos.get("suppressTouch");if(i&&!r){ge(o,[e,"touchstart",e=>this.onTouchStart(t,e),mi])}}cancelDrag(t){const e=this.drag;t??(t=e?.eElement),t&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:t}),e?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(t){const e=t.type;return("mousemove"===e||"pointermove"===e)&&t.cancelable&&de(this.beans,t)&&!wt(wi(t))}initDrag(t,...e){this.drag=t;const i=this.beans,o=t=>this.onScroll(t),n=N(i),s=$(i);ge(t.handlers,[n,"contextmenu",me],[n,"keydown",t=>this.onKeyDown(t)],[s,"scroll",o,{capture:!0}],[s.defaultView||window,"scroll",o],...e)}destroyDrag(){this.dragging=!1;const t=this.drag;if(t){const e=t.rootEl;ti?.get(e)===t&&ti.delete(e),this.drag=null,(t=>{if(!t)return;ni(t);const{eElement:e,pointerId:i}=t;if(e){try{e.releasePointerCapture(i)}catch{}t.eElement=null}})(t.pointerCapture),fe(t.handlers)}}onPointerDown(t,e){if(this.isPointer())return;const i=this.beans;if(ei?.has(e))return;const o=e.pointerType;if("touch"===o){if(i.gos.get("suppressTouch")||!t.includeTouch)return;if(t.stopPropagationForTouch&&e.stopPropagation(),wt(wi(e)))return}if(!e.isPrimary)return;if("mouse"===o&&0!==e.button)return;this.destroyDrag();const n=N(i),s=t.eElement,r=e.pointerId,a=new Ci(n,t,e,r);ti??(ti=new WeakMap),ti.set(n,a);const l=t=>this.draggingPreventDefault(t);this.initDrag(a,[n,"pointerup",t=>{t.pointerId===r&&this.onMouseOrPointerUp(t)}],[n,"pointercancel",t=>{t.pointerId===r&&bi(t)&&this.cancelDrag()}],[n,"pointermove",t=>{t.pointerId===r&&this.onMouseOrPointerMove(t)},mi],[n,"touchmove",l,mi],[s,"mousemove",l,mi]),0===t.dragStartPixels?this.onMouseOrPointerMove(e):bi(e)}onTouchStart(t,e){if(this.gos.get("suppressTouch")||!t.includeTouch)return;if(!bi(e))return;if(wt(wi(e)))return;if(t.stopPropagationForTouch&&e.stopPropagation(),this.isPointer())return void(this.dragging&&me(e));this.destroyDrag();const i=this.beans,o=N(i),n=new Ci(o,t,e.touches[0]),s=t=>this.onTouchUp(t),r=t=>this.onTouchCancel(t),a=N(i),l=e.target??t.eElement;this.initDrag(n,[l,"touchmove",t=>this.onTouchMove(t),fi],[l,"touchend",s,fi],[l,"touchcancel",r,fi],[a,"touchmove",t=>this.draggingPreventDefault(t),mi],[a,"touchend",s,mi],[a,"touchcancel",r,mi]),0===t.dragStartPixels&&this.onMove(n.start)}draggingPreventDefault(t){this.dragging&&me(t)}onMouseDown(t,e){if(0!==e.button)return;if(ei?.has(e))return;if(this.isPointer())return;const i=this.beans;this.destroyDrag();const o=new Ci(N(i),t,e),n=N(i);this.initDrag(o,[n,"mousemove",t=>this.onMouseOrPointerMove(t)],[n,"mouseup",t=>this.onMouseOrPointerUp(t)]),0===t.dragStartPixels?this.onMouseOrPointerMove(e):bi(e)}onScroll(t){if(!bi(t))return;const e=this.drag,i=e?.lastDrag;i&&this.dragging&&e.params?.onDragging?.(i)}onMouseOrPointerMove(t){bi(t)&&(ri()&&$(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(t)&&me(t),this.onMove(t))}onTouchCancel(t){const e=this.drag;e&&bi(t)&&ue(e.start,t.changedTouches)&&this.cancelDrag()}onTouchMove(t){const e=this.drag;if(!e||!bi(t))return;const i=ue(e.start,t.touches);i&&(this.onMove(i),this.draggingPreventDefault(t))}onMove(t){const e=this.drag;if(!e)return;e.lastDrag=t;const i=e.params;if(!this.dragging){const o=e.start;if(he(t,o,i.dragStartPixels??4))return;if(this.dragging=!0,i.capturePointer&&(e.pointerCapture=((t,e)=>{if("undefined"==typeof PointerEvent||!(e instanceof PointerEvent))return null;const i=e.pointerId;if(!oi(t,i))return null;const o={eElement:t,pointerId:i,onLost(t){si(o,t)}};return t.addEventListener("lostpointercapture",o.onLost),o})(this.beans.eRootDiv,t)),this.eventSvc.dispatchEvent({type:"dragStarted",target:i.eElement}),i.onDragStart?.(o),this.drag!==e)return;if(i.onDragging?.(o),this.drag!==e)return}i.onDragging?.(t)}onTouchUp(t){const e=this.drag;e&&bi(t)&&this.onUp(ue(e.start,t.changedTouches))}onMouseOrPointerUp(t){bi(t)&&this.onUp(t)}onUp(t){const e=this.drag;e&&(t||(t=e.lastDrag),t&&this.dragging&&(this.dragging=!1,e.params.onDragStop?.(t),this.eventSvc.dispatchEvent({type:"dragStopped",target:e.params.eElement})),this.destroyDrag())}onKeyDown(t){t.key===o.ESCAPE&&this.cancelDrag()}},yi=t=>{fe(t.handlers);const e=t.oldTouchAction;if(null!=e){const i=t.params.eElement.style;i&&(i.touchAction=e)}},Ci=class{constructor(t,e,i,o=null){this.rootEl=t,this.params=e,this.start=i,this.pointerId=o,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=e.eElement}},wi=t=>{const e=t.target;return e instanceof Element?e:null},Ti=t=>{return`--ag-${e=t,e.replace(/[A-Z]|\d+/g,t=>`-${t}`).toLowerCase()}`;var e},Si=t=>`var(${Ti(t)})`,Ei=t=>({ref:"accentColor",mix:t}),Pi=t=>({ref:"foregroundColor",mix:t}),Di=t=>({ref:"foregroundColor",mix:t,onto:"backgroundColor"}),Li=t=>({ref:"foregroundColor",mix:t,onto:"headerBackgroundColor"}),xi={ref:"backgroundColor"},ki={ref:"foregroundColor"},Ii={ref:"accentColor"},Ai={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:Pi(.15),chromeBackgroundColor:Di(.02),browserColorScheme:"light"},Fi=()=>["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],Mi={...Ai,textColor:ki,accentColor:"#2196f3",rowHoverColor:Ei(.08),invalidColor:"#e02525",fontFamily:Fi(),subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,fontWeight:400,focusShadow:{spread:3,color:Ei(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:xi,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:Ii,toggleButtonOffBackgroundColor:Di(.3),toggleButtonSwitchBackgroundColor:xi,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},panelBackgroundColor:xi,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontFamily:{ref:"headerFontFamily"},panelTitleBarFontSize:{ref:"headerFontSize"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,pickerFieldHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},dialogShadow:{ref:"popupShadow"},dialogBorder:{color:Pi(.2)},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},dataFontSize:{ref:"fontSize"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontSize:{ref:"fontSize"},headerFontWeight:500,headerTextColor:{ref:"textColor"},headerHeight:{calc:"max(iconSize, headerFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,menuBorder:{color:Pi(.2)},menuBackgroundColor:Di(.03),menuTextColor:Di(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},Bi=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],Oi=(t=>{const e=new Map;return i=>{const o=i;return e.has(o)||e.set(o,t(i)),e.get(o)}})(t=>(t=t.toLowerCase(),Bi.find(e=>t.endsWith(e.toLowerCase()))??"length")),zi=t=>"object"==typeof t&&t?.ref?Si(t.ref):"string"==typeof t?t:"number"==typeof t&&String(t),Ri=t=>{if("string"==typeof t)return t;if("object"==typeof t&&t&&"ref"in t){const e=Si(t.ref);if(null==t.mix)return e;return`color-mix(in srgb, ${t.onto?Si(t.onto):"transparent"}, ${e} ${((t,e,i)=>Math.max(e,Math.min(i,t)))(100*t.mix,0,100)}%)`}return!1},Gi=t=>{if("string"==typeof t)return t;if("number"==typeof t)return`${t}px`;if("object"==typeof t&&t&&"calc"in t){return`calc(${t.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,t=>"-"===t[0]?t:" "+Si(t)+" ")})`}return!("object"!=typeof t||!t||!("ref"in t))&&Si(t.ref)},Wi=(t,e)=>"string"==typeof t?t:!0===t?Wi({},e):!1===t?"columnBorder"===e?Wi({color:"transparent"},e):"none":"object"==typeof t&&t&&"ref"in t?Si(t.ref):Hi(t.style??"solid")+" "+Gi(t.width??{ref:"borderWidth"})+" "+Ri(t.color??{ref:"borderColor"}),Ni=t=>[Gi(t.offsetX??0),Gi(t.offsetY??0),Gi(t.radius??0),Gi(t.spread??0),Ri(t.color??{ref:"foregroundColor"}),...t.inset?["inset"]:[]].join(" "),Hi=zi,$i=t=>"string"==typeof t?t.includes(",")?t:Yi(t):"object"==typeof t&&t&&"googleFont"in t?$i(t.googleFont):"object"==typeof t&&t&&"ref"in t?Si(t.ref):!!Array.isArray(t)&&t.map(t=>("object"==typeof t&&"googleFont"in t&&(t=t.googleFont),Yi(t))).join(", "),Yi=t=>/^[\w-]+$|\w\(/.test(t)?t:JSON.stringify(t),ji=t=>"string"==typeof t?t:"object"==typeof t&&t&&"url"in t?`url(${JSON.stringify(t.url)})`:"object"==typeof t&&t&&"svg"in t?ji({url:`data:image/svg+xml,${encodeURIComponent(t.svg)}`}):!("object"!=typeof t||!t||!("ref"in t))&&Si(t.ref),Ki={color:Ri,colorScheme:zi,length:Gi,scale:zi,border:Wi,borderStyle:Hi,shadow:t=>"string"==typeof t?t:!1===t?"none":"object"==typeof t&&t&&"ref"in t?Si(t.ref):Array.isArray(t)?t.map(Ni).join(", "):Ni(t),image:ji,fontFamily:$i,fontWeight:zi,duration:(t,e,i)=>"string"==typeof t?t:"number"==typeof t?(t>=10&&i?.warn(104,{value:t,param:e}),`${t}s`):!("object"!=typeof t||!t||!("ref"in t))&&Si(t.ref)},_i=(t,e,i)=>{const o=Oi(t);return Ki[o](e,t,i)},Vi=(t,e)=>new Xi({themeLogger:t,overridePrefix:e}),Xi=class t{constructor(t,e=[]){this.params=t,this.parts=e}withPart(e){return"function"==typeof e&&(e=e()),e instanceof v?new t(this.params,[...this.parts,e]):(this.params.themeLogger.preInitErr(259,"Invalid part",{part:e}),this)}withoutPart(t){return this.withPart(f({feature:t}))}withParams(t,e=m){return this.withPart(f({modeParams:{[e]:t}}))}_startUse({styleContainer:t,cssLayer:e,nonce:i,loadThemeGoogleFonts:o,moduleCss:n}){if(c())return;Ji(),u(t,e,i,n);const s=qi(this);if(s.length>0)for(const t of s)o&&Qi(t,i);for(const o of this.parts)o.use(t,e,i)}_getCssClasses(){return this._cssClassCache??(this._cssClassCache=[this._getParamsClassName(!0),Ui(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(" ")])}_getClassNamesId(){return this._classNamesId??(this._classNamesId=++p().paramsId)}_getParamsClassName(t=!1){return`ag-theme-${t?"inherit":"params"}-${this._getClassNamesId()}`}_getModeParams(){let t=this._paramsCache;if(!t){const e={[m]:{...Mi}};for(const t of Ui(this.parts))for(const i of Object.keys(t.modeParams)){const o=t.modeParams[i];if(o){const t=e[i]??(e[i]={}),n=new Set;for(const e of Object.keys(o)){const i=o[e];void 0!==i&&(t[e]=i,n.add(e))}if(i===m)for(const t of Object.keys(e)){const i=e[t];if(t!==m)for(const t of n)delete i[t]}}}this._paramsCache=t=e}return t}_getParamsCss(){if(!this._paramsCssCache){let t="",e="";const i=this._getModeParams(),{overridePrefix:o,themeLogger:n}=this.params,s=o?`--ag-${o}-`:void 0;for(const o of Object.keys(i)){const r=i[o];if(o!==m){const i="object"==typeof CSS?CSS.escape(o):o,n=`:where(html[data-ag-theme-mode="${i}"],body[data-ag-theme-mode="${i}"],.ag-theme-mode[data-ag-theme-mode="${i}"]) & {\n`;t+=n,e+=n}for(const i of Object.keys(r).sort()){const o=r[i],a=_i(i,o,n);if(!1===a)n.error(107,{key:i,value:o});else{const o=Ti(i),n=s?o.replace("--ag-",s):o,r=o.replace("--ag-","--ag-inherited-");t+=`\t${o}: var(${r}, ${a});\n`,e+=`\t${r}: var(${n});\n`}}o!==m&&(t+="}\n",e+="}\n")}let r=`:where(.${this._getParamsClassName()}) {\n${t}}\n`;r+=`:where(.${this._getParamsClassName(!0)}) {\n${e}}\n`,this._paramsCssCache=r}return this._paramsCssCache}},Ui=t=>{const e=new Map;for(const i of t)e.set(i.feature,i);const i=[];for(const o of t)o.feature&&e.get(o.feature)!==o||i.push(o);return i},qi=t=>{const e=new Set,i=t=>{if(Array.isArray(t))t.forEach(i);else{const i=t?.googleFont;"string"==typeof i&&e.add(i)}};return Object.values(t._getModeParams()).flatMap(t=>Object.values(t)).forEach(i),Array.from(e).sort()},Zi=!1,Ji=()=>{if(!Zi){Zi=!0;for(const t of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))t.remove()}},Qi=async(t,e)=>{const i=`@import url('https://${to}/css2?family=${encodeURIComponent(t)}:wght@100;200;300;400;500;600;700;800;900&display=swap');\n`;h(i,document.head,`googleFont:${t}`,void 0,0,e)},to="fonts.googleapis.com",eo={changeKey:"listItemHeight",type:"length",defaultValue:24},io=class extends Se{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(t){this.eRootDiv=t.eRootDiv}postConstruct(){const{gos:t,eRootDiv:e}=this;t.setInstanceDomData(e);const i=t.get("themeStyleContainer"),o="undefined"!=typeof ShadowRoot,n=o&&e.getRootNode()instanceof ShadowRoot;this.eStyleContainer=("function"==typeof i?i():i)??(n?e:document.head),i||n||!o||no(e,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=t.get("themeCssLayer"),this.styleNonce=t.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect()),this.initStyledRoot(),this.getSizeEl(eo),this.initVariables(),this.addDestroyFunc(()=>(t=>{const e=g.grids.get(t)?.styleContainer;if(!e)return;g.grids.delete(t),Array.from(g.grids.values()).some(t=>t.styleContainer===e)?d(e):(d(e,!0),g.map.delete(e))})(this))}getStyledRootClasses(t,e){const{theme:i}=this,[o,n]=i?i._getCssClasses():["",this.useLegacyThemeClasses(e)],s=this.gos.get("enableRtl")?"ag-rtl":"ag-ltr";return t?["","",s]:[o,n,s]}useLegacyThemeClasses(t){const e=new Set;this.mutationObserver.disconnect();let i=this.eRootDiv.parentElement;for(;i;){if(!i.classList.contains("ag-styled-root")){let t=!1;for(const o of i.classList)o.startsWith("ag-theme-")&&(t=!0,e.add(o));t&&this.mutationObserver.observe(i,{attributes:!0,attributeFilter:["class"]})}i=i.parentElement}return t?"":[...e].join(" ")}onThemeChanged(t){const e=e=>{e.themeChanged&&t()};return this.eventSvc.addListener("stylesChanged",e),()=>this.eventSvc.removeListener("stylesChanged",e)}addGlobalCSS(t,e){this.theme?h(t,this.eStyleContainer,e,this.cssLayer,0,this.styleNonce):this.globalCSS.push([t,e])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(eo)}getCSSVariablePixelValue(t){const e=this.lastKnownValues.get(t);if(null!=e)return e;const i=this.measureSizeEl(t);return"number"!=typeof i?t.defaultValue:(this.lastKnownValues.set(t,i),i)}measureSizeEl(t){const e=this.getSizeEl(t);if(null==e.offsetParent)return"detached";const i=e.offsetWidth-1;return i===oo?"no-styles":(this.sizesMeasured=!0,i<0?"no-length":i)}getMeasurementContainer(){let t=this.eMeasurementContainer;return t||(t=this.eMeasurementContainer=oe({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(t),this.addDestroyFunc(()=>t?.remove())),t}getSizeEl(t){let e=this.sizeEls.get(t);if(e)return e;const i=this.getMeasurementContainer();e=oe({tag:"div"});const o=this.setSizeElStyles(e,t);i.appendChild(e),this.sizeEls.set(t,e);const{type:n,noWarn:s}=t;if("length"!==n&&"border"!==n)return e;let r=this.measureSizeEl(t);"no-styles"!==r||s||this.varError(o,t.defaultValue);const a=Zt(this.beans,e,()=>{const e=this.measureSizeEl(t);"detached"!==e&&"no-styles"!==e&&(this.lastKnownValues.set(t,"no-length"===e?t.defaultValue:e),e!==r&&(r=e,this.fireStylesChangedEvent(t.changeKey)))});return this.addDestroyFunc(()=>a()),e}setSizeElStyles(t,e){const{changeKey:i,type:o}=e;let n=Ti(i);return"border"===o?(n.endsWith("-width")&&(n=n.slice(0,-6)),t.className="ag-measurement-element-border",t.style.paddingLeft="1px",t.style.setProperty("--ag-internal-measurement-border",`var(${n}, solid ${oo}px)`)):t.style.width=`calc(var(${n}, ${oo}px) + 1px)`,n}handleThemeChange(){const{gos:t,theme:e}=this,i=t.get("theme");let o;if("legacy"===i)o=void 0;else{const t=i??this.getDefaultTheme();t instanceof Xi?o=t:this.themeError(t)}o!==e&&this.handleNewTheme(o),this.postProcessThemeChange(o,i)}handleNewTheme(t){const{gos:e,globalCSS:i}=this,o=this.getAdditionalCss();if(t){u(this.eStyleContainer,this.cssLayer,this.styleNonce,o);for(const[t,e]of i)h(t,this.eStyleContainer,e,this.cssLayer,0,this.styleNonce);i.length=0}this.theme=t,t?._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:o}),((t,e,i,o,n,s)=>{if(c())return;const r=g.grids.get(t);r?r.paramsCss=e:g.grids.set(t,{styleContainer:o,paramsCss:e}),d(o),e&&i&&h(e,o,i,n,2,s,!0)})(this,t?._getParamsCss()??null,t?._getParamsClassName()??null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(t){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${t}Changed`]:!0})}initStyledRoot(){this.addDestroyFunc(_e(this,this.eRootDiv,void 0,this.beans.hasAncestorStyledRoot,!0))}},oo=15538,no=(t,e,i)=>{let o=60;const n=setInterval(()=>{"undefined"!=typeof ShadowRoot&&t.getRootNode()instanceof ShadowRoot&&(e(),clearInterval(n)),(t.isConnected||--o<0)&&clearInterval(n)},1e3);i(()=>clearInterval(n))},so=class extends Se{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(t){if(t){this.dynamicBeans??(this.dynamicBeans={});for(const e of Object.keys(t))this.dynamicBeans[e]=t[e]}}createDynamicBean(t,e,...i){if(!this.dynamicBeans)throw new Error(this.getDynamicError(t,!0));const o=this.dynamicBeans[t];if(null!=o)return new o(...i);if(e)throw new Error(this.getDynamicError(t,!1))}},ro=class extends Se{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new w}addListener(t,e,i){this.globalSvc.addEventListener(t,e,i)}removeListener(t,e,i){this.globalSvc.removeEventListener(t,e,i)}addGlobalListener(t,e=!1){this.globalSvc.addGlobalListener(t,e)}removeGlobalListener(t,e=!1){this.globalSvc.removeGlobalListener(t,e)}dispatchEvent(t){this.globalSvc.dispatchEvent(this.gos.addCommon(t))}dispatchEventOnce(t){this.globalSvc.dispatchEventOnce(this.gos.addCommon(t))}},ao="ag-focus-managed",lo=!1,co=0;function ho(t){const e=lo,i="keydown"===t.type;i&&(t.ctrlKey||t.metaKey||t.altKey)||e!==i&&(lo=i)}function uo(t){const e=$(t);var i;return i=e,co>0||(i.addEventListener("keydown",ho),i.addEventListener("mousedown",ho)),co++,()=>{co--,function(t){co>0||(t.removeEventListener("keydown",ho),t.removeEventListener("mousedown",ho))}(e)}}function po(){return lo}function go(t,e,i=!1){let o=Ct;e&&(o+=", "+e),i&&(o+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(t.querySelectorAll("[tabindex], input, select, button, textarea, [href]")).filter(t=>zt(t)),s=new Set(t.querySelectorAll(o));return s.size?n.filter(t=>!s.has(t)):n}function fo(t,e=!1,i=!1,o=!1){const n=go(t,o?".ag-tab-guard":null,i),s=e?T(n):n[0];return!!s&&(s.focus({preventScroll:!0}),!0)}function mo(t,e=!1,i=!1){const o=go(t,i?".ag-tab-guard":null),n=o.filter(t=>t.tabIndex>=0),s=n.length?n:o.filter(e=>{const i=e.closest(`.${ao}`);return null!==i&&t.contains(i)}),r=e?T(s):s[0];return!!r&&(r.focus({preventScroll:!0}),!0)}function bo(t){const{beans:e,rootNode:i,onlyManaged:o,onlyUnmanaged:n,backwards:s}=t,r=H(e);let a=go(i,o?':not([tabindex="-1"])':null);n&&(a=a.filter(t=>t===r||"-1"!==hi(t)));const l=(o?a.findIndex(t=>t.contains(r)):a.indexOf(r))+(s?-1:1);return l<0||l>=a.length?null:a[l]}function vo(t,e=5){let i=0;for(;t&&null===hi(t)&&++i<=e;)t=t.parentElement;return null===hi(t)?null:t}function yo(t){let e=t;for(;e&&!Co(e);){const t=e.parentElement;e=t?.className.startsWith("ag-")?t:null}if(!e)return;t===go(e,null,!0)[0]&&(e.scrollLeft=0);const i=e.getBoundingClientRect(),o=t.getBoundingClientRect();o.left<i.left?e.scrollLeft-=i.left-o.left:o.right>i.right&&(e.scrollLeft+=o.right-i.right)}function Co(t){const e=getComputedStyle(t).overflowX;return"auto"===e||"scroll"===e}var wo=class extends Se{constructor(t,e={isStopPropagation:()=>!1,stopPropagation:()=>{}},i={}){super(),this.eFocusable=t,this.stopPropagationCallbacks=e,this.callbacks=i,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:t=>{if(t.defaultPrevented)return;const e=bo({beans:this.beans,rootNode:this.eFocusable,backwards:t.shiftKey});e&&(e.focus(),t.preventDefault())},...i}}postConstruct(){const{eFocusable:t,callbacks:{onFocusIn:e,onFocusOut:i}}=this;t.classList.add(ao),this.addKeyDownListeners(t),e&&this.addManagedElementListeners(t,{focusin:e}),i&&this.addManagedElementListeners(t,{focusout:i})}addKeyDownListeners(t){this.addManagedElementListeners(t,{keydown:t=>{if(t.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(t))return;const{callbacks:e}=this;e.shouldStopEventPropagation(t)?this.stopPropagationCallbacks.stopPropagation(t):t.key===o.TAB?e.onTabKeyDown(t):e.handleKeyDown&&e.handleKeyDown(t)}})}},To="ag-tab-guard",So="ag-tab-guard-top",Eo="ag-tab-guard-bottom",Po=class extends Se{constructor(t,e){super(),this.stopPropagationCallbacks=e,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.lastFocusedElementInside=null,this.allowFocus=!1;const{comp:i,eTopGuard:o,eBottomGuard:n,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:a,focusInnerElement:l,onFocusIn:c,onFocusOut:h,onGuardFocusedFromInside:u,shouldStopEventPropagation:d,onTabKeyDown:p,handleKeyDown:g,isEmpty:f,eFocusableElement:m}=t;this.comp=i,this.eTopGuard=o,this.eBottomGuard=n,this.providedFocusInnerElement=l,this.eFocusableElement=m,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!a,this.providedFocusIn=c,this.providedFocusOut=h,this.providedOnGuardFocusedFromInside=u,this.providedShouldStopEventPropagation=d,this.providedOnTabKeyDown=p,this.providedHandleKeyDown=g,this.providedIsEmpty=f}postConstruct(){this.createManagedBean(new wo(this.eFocusableElement,this.stopPropagationCallbacks,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:t=>this.onTabKeyDown(t),handleKeyDown:t=>this.handleKeyDown(t),onFocusIn:t=>this.onFocusIn(t),onFocusOut:t=>this.onFocusOut(t)})),this.activateTabGuards();for(const t of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(t,{focus:this.onFocus.bind(this)})}handleKeyDown(t){this.providedHandleKeyDown&&this.providedHandleKeyDown(t)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}activateTabGuards(){if(this.forcingFocusOut)return;const t=this.gos.get("tabIndex");this.comp.setTabIndex(t.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(t){if(this.isFocusableContainer&&!this.eFocusableElement.contains(t.relatedTarget)&&!this.allowFocus)return void this.findNextElementOutsideAndFocus(t.target===this.eBottomGuard);if(this.skipTabGuardFocus)return void(this.skipTabGuardFocus=!1);if(this.forceFocusOutWhenTabGuardsAreEmpty){if(this.providedIsEmpty?this.providedIsEmpty():0===go(this.eFocusableElement,".ag-tab-guard").length)return void this.findNextElementOutsideAndFocus(t.target===this.eBottomGuard)}if(this.isFocusableContainer&&this.eFocusableElement.contains(t.relatedTarget)){const e=t.target===this.eBottomGuard,i=this.providedOnGuardFocusedFromInside?.(e);if(!0===i&&$(this.beans).activeElement===t.target){const e=t.relatedTarget,i=e.classList.contains(To)?this.lastFocusedElementInside:e;i?.focus()}else!1===i&&this.findNextElementOutsideAndFocus(!e);return}const e=t.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(e):this.focusInnerElement(e))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(t.target===this.eBottomGuard)}findNextElementOutsideAndFocus(t,e){const i=go($(this.beans).body,null,!0).filter(t=>t.tabIndex>=0).map((t,e)=>({element:t,domIndex:e})).sort((t,e)=>(t.element.tabIndex||Number.MAX_SAFE_INTEGER)-(e.element.tabIndex||Number.MAX_SAFE_INTEGER)||t.domIndex-e.domIndex).map(({element:t})=>t),o=t?this.eTopGuard:this.eBottomGuard,n=i.indexOf(o);if(-1===n)return!1;const s=t?-1:1;for(let t=n+s;t>=0&&t<i.length;t+=s){const o=i[t];if(!e?.some(t=>t.contains(o)))return o.focus(),!0}return!1}onFocusIn(t){if(this.focusTrapActive||this.forcingFocusOut)return;const e=t.target;e.classList.contains(To)||(this.lastFocusedElementInside=e),this.providedFocusIn&&this.providedFocusIn(t),this.isFocusableContainer||this.deactivateTabGuards()}onFocusOut(t){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(t),this.eFocusableElement.contains(t.relatedTarget)||this.activateTabGuards())}onTabKeyDown(t){if(this.providedOnTabKeyDown)return void this.providedOnTabKeyDown(t);if(this.focusTrapActive)return;if(t.defaultPrevented)return;const e=this.tabGuardsAreActive();e&&this.deactivateTabGuards();const i=this.getNextFocusableElement(t.shiftKey);e&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),t.preventDefault())}focusInnerElement(t=!1){const e=go(this.eFocusableElement);return this.tabGuardsAreActive()&&(e.splice(0,1),e.splice(-1,1)),!!e.length&&(e[t?e.length-1:0].focus({preventScroll:!0}),!0)}getNextFocusableElement(t){return bo({beans:this.beans,rootNode:this.eFocusableElement,backwards:t})}forceFocusOutOfContainer(t=!1){if(this.forcingFocusOut)return;const e=t?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,e.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}focusNextElementOutsideContainer(t,e){return this.findNextElementOutsideAndFocus(t,e)}isTabGuard(t,e){return t===this.eTopGuard&&!e||t===this.eBottomGuard&&(e??!0)}setAllowFocus(t){this.allowFocus=t}},Do=class extends Se{constructor(t,e){super(),this.comp=t,this.stopPropagationCallbacks=e}initialiseTabGuard(t){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:e,eBottomGuard:i,eFocusableElement:o,stopPropagationCallbacks:n}=this,s=[e,i],r={setTabIndex:t=>{for(const e of s)null==t?e.removeAttribute("tabindex"):e.setAttribute("tabindex",t)}};this.addTabGuards(e,i);const{focusTrapActive:a=!1,onFocusIn:l,onFocusOut:c,onGuardFocusedFromInside:h,focusInnerElement:u,handleKeyDown:d,onTabKeyDown:p,shouldStopEventPropagation:g,isEmpty:f,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:b}=t;this.tabGuardCtrl=this.createManagedBean(new Po({comp:r,focusTrapActive:a,eTopGuard:e,eBottomGuard:i,eFocusableElement:o,onFocusIn:l,onFocusOut:c,onGuardFocusedFromInside:h,focusInnerElement:u,handleKeyDown:d,onTabKeyDown:p,shouldStopEventPropagation:g,isEmpty:f,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:b},n))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(t){const e=$(this.beans).createElement("div"),i="top"===t?So:Eo;return e.classList.add(To,i),q(e,"presentation"),e}addTabGuards(t,e){const i=this.eFocusableElement;i.prepend(t),i.append(e)}removeAllChildrenExceptTabGuards(){const t=[this.eTopGuard,this.eBottomGuard];Mt(this.comp.getFocusableElement()),this.addTabGuards(...t)}forceFocusOutOfContainer(t=!1){this.tabGuardCtrl.forceFocusOutOfContainer(t)}focusNextElementOutsideContainer(t,e){return this.tabGuardCtrl.focusNextElementOutsideContainer(t,e)}appendChild(t,e,i){Xt(e)||(e=e.getGui());const{eBottomGuard:o}=this;o?o.before(e):t(e,i)}destroy(){const{eTopGuard:t,eBottomGuard:e}=this;Bt(t),Bt(e),super.destroy()}},Lo=class extends xe{initialiseTabGuard(t,e){this.tabGuardFeature=this.createManagedBean(new Do(this,e)),this.tabGuardFeature.initialiseTabGuard(t)}forceFocusOutOfContainer(t=!1){this.tabGuardFeature.forceFocusOutOfContainer(t)}focusNextElementOutsideContainer(t,e){return this.tabGuardFeature.focusNextElementOutsideContainer(t,e)}appendChild(t,e){this.tabGuardFeature.appendChild(super.appendChild.bind(this),t,e)}},xo=class extends xe{isPopup(){return!0}setParentComponent(t){t.addCss("ag-has-popup"),super.setParentComponent(t)}destroy(){const t=this.parentComponent,e=t?.isAlive();e&&t.getGui().classList.remove("ag-has-popup"),super.destroy()}};function ko(t,e){return{top:t.top-e.top,left:t.left-e.left,right:t.right-e.left,bottom:t.bottom-e.top}}function Io(t,e,i,o=0){const[n,s]=i.split("-"),r=Ao(t,s),a=(c=n,Ao({top:0,left:0,right:(l=e).width,bottom:l.height},c));var l,c;const h=function(t,e){const i=Fo(t),o=Fo(e),n=Mo(t),s=Mo(e);return{dx:Math.sign(o-i),dy:Math.sign(s-n)}}(n,s);return{x:r.x-a.x+h.dx*o,y:r.y-a.y+h.dy*o}}function Ao(t,e){const i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;switch(e){case"tl":return{x:t.left,y:t.top};case"tc":return{x:i,y:t.top};case"tr":return{x:t.right,y:t.top};case"l":return{x:t.left,y:o};case"c":return{x:i,y:o};case"r":return{x:t.right,y:o};case"bl":return{x:t.left,y:t.bottom};case"bc":return{x:i,y:t.bottom};case"br":return{x:t.right,y:t.bottom}}}function Fo(t){const e=2===t.length?t[1]:t;return"l"===e?-1:"r"===e?1:0}function Mo(t){return 1===t.length?0:t.startsWith("t")?-1:t.startsWith("b")?1:0}var Bo=0,Oo=class extends Se{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}getPopupParent(){const t=this.gos.get("popupParent");return t||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(t){const{ePopup:e,nudgeX:i,nudgeY:o,skipObserver:n}=t;this.positionPopup({ePopup:e,nudgeX:i,nudgeY:o,keepWithinBounds:!0,skipObserver:n,updatePosition:()=>this.calculatePointerAlign(t.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(t.additionalParams,t.type,t.ePopup,null,t.mouseEvent)})}calculatePointerAlign(t){const e=this.getParentRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}positionPopupByComponent(t){const{ePopup:e,nudgeX:i,nudgeY:o,keepWithinBounds:n,eventSource:s,alignSide:r="left",position:a="over",type:l}=t,c=s.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(s,e);this.positionPopup({ePopup:e,nudgeX:i,nudgeY:o,keepWithinBounds:n,updatePosition:()=>{const i=ko(c,h),n={width:e.offsetWidth,height:e.offsetHeight},s="right"===r;if("over"===a)return this.setAlignedStyles(e,"over"),Io(i,n,s?"tr-tr":"tl-tl");this.setAlignedStyles(e,"under");if("under"===this.shouldRenderUnderOrAbove(e,c,h,t.nudgeY||0))return Io(i,n,s?"tr-br":"tl-bl");const l=Io(i,n,s?"br-tr":"bl-tl");return l.y-=2*(o||0),l},postProcessCallback:()=>this.callPostProcessPopup(t.additionalParams,l,e,s,null)})}positionPopupForMenu(t){const{eventSource:e,ePopup:i,event:o}=t,n=e.getBoundingClientRect(),s=this.getParentRect();this.setAlignedTo(e,i);let r=!1;this.positionPopup({ePopup:i,keepWithinBounds:!0,updatePosition:()=>{const t=ko(n,s),e=this.keepXYWithinBounds(i,t.top,0),o=i.clientWidth>0?i.clientWidth:200;r||(i.style.minWidth=`${o}px`,r=!0);const a=s.right-s.left-o,l={width:o,height:i.offsetHeight},c=Io(t,l,"tl-tr").x-2,h=Io(t,l,"tr-tl").x;let u;return this.gos.get("enableRtl")?(u=h,u<0&&(u=c,this.setAlignedStyles(i,"left")),u>a&&(u=0,this.setAlignedStyles(i,"right"))):(u=c,u>a&&(u=h,this.setAlignedStyles(i,"right")),u<0&&(u=0,this.setAlignedStyles(i,"left"))),{x:u,y:e}},postProcessCallback:()=>this.callPostProcessPopup(t.additionalParams,"subMenu",i,e,o instanceof KeyboardEvent?void 0:o)})}shouldRenderUnderOrAbove(t,e,i,o){const n=i.bottom-e.bottom,s=e.top-i.top,r=t.offsetHeight+o;return n>r?"under":s>r||s>n?"above":"under"}setAlignedStyles(t,e){const i=this.getPopupIndex(t);if(-1===i)return;const o=this.popupList[i],{alignedToElement:n}=o;if(!n)return;const s=["right","left","over","above","under"];for(const e of s)n.classList.remove(`ag-has-popup-positioned-${e}`),t.classList.remove(`ag-popup-positioned-${e}`);e&&(n.classList.add(`ag-has-popup-positioned-${e}`),t.classList.add(`ag-popup-positioned-${e}`))}setAlignedTo(t,e){const i=this.getPopupIndex(e);if(-1!==i){this.popupList[i].alignedToElement=t}}positionPopup(t){const{ePopup:e,keepWithinBounds:i,nudgeX:o,nudgeY:n,skipObserver:s,updatePosition:r}=t,a={width:0,height:0},l=(s=!1)=>{let{x:l,y:c}=r();s&&e.clientWidth===a.width&&e.clientHeight===a.height||(a.width=e.clientWidth,a.height=e.clientHeight,o&&(l+=o),n&&(c+=n),i&&(l=this.keepXYWithinBounds(e,l,1),c=this.keepXYWithinBounds(e,c,0)),e.style.left=`${l}px`,e.style.top=`${c}px`,t.postProcessCallback&&t.postProcessCallback())};if(l(),!s){const t=Zt(this.beans,e,()=>l(!0));setTimeout(()=>t(),200)}}getParentRect(){const t=$(this.beans);let e=this.getPopupParent();return e===t.body?e=t.documentElement:"static"===getComputedStyle(e).position&&(e=e.offsetParent),It(e)}keepXYWithinBounds(t,e,i){const o=0===i,n=o?"clientHeight":"clientWidth",s=o?"top":"left",r=o?"height":"width",a=o?"scrollTop":"scrollLeft",l=$(this.beans),c=l.documentElement,h=this.getPopupParent(),u=t.getBoundingClientRect(),d=h.getBoundingClientRect(),p=l.documentElement.getBoundingClientRect(),g=h===l.body,f=Math.ceil(u[r]);let m=g?(o?xt:kt)(c)+c[a]:h[n];g&&(m-=Math.abs(p[s]-d[s]));const b=m-f;return Math.min(Math.max(e,0),Math.max(b,0))}addPopup(t){const{eChild:e,ariaLabel:i,ariaOwns:o,alwaysOnTop:n,positionCallback:s,anchorToElement:r}=t,a=this.getPopupIndex(e);if(-1!==a){return{hideFunc:this.popupList[a].hideFunc}}this.initialisePopupPosition(e),e.classList.add("ag-popup-child"),e.hasAttribute("role")||q(e,"dialog"),i?J(e,i):o&&(e.id||(e.id=`popup-component-${Bo}`),vt(o,e.id));const l=oe({tag:"div",cls:"ag-popup"});l.appendChild(e);const c=je(this.beans.environment,this.getPopupParent(),l);n?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e);const h=this.addEventListenersToPopup({...t,wrapperEl:l,disconnect:c});return s&&s(),this.addPopupToPopupList(e,h,r),{hideFunc:h}}initialisePopupPosition(t){const e=this.getPopupParent().getBoundingClientRect();O(t.style.top)||(t.style.top=-1*e.top+"px"),O(t.style.left)||(t.style.left=-1*e.left+"px")}addEventListenersToPopup(t){const e=this.beans,i=$(e),{wrapperEl:n,eChild:s,closedCallback:r,afterGuiAttached:a,closeOnEsc:l,modal:c,ariaOwns:h,eventSourceToIgnore:u}=t;let d=!1;const p=t=>{if(!n.contains(H(e)))return;t.key!==o.ESCAPE||this.isStopPropagation(t)||m({keyboardEvent:t})},g=t=>m({mouseEvent:t}),f=t=>m({touchEvent:t}),m=(e={})=>{const{mouseEvent:o,touchEvent:n,keyboardEvent:a,forceHide:l}=e,c=o??n,m="mousedown"===o?.type&&0===o.button||"touchstart"===n?.type;!l&&(this.isEventFromCurrentPopup({mouseEvent:o,touchEvent:n},s)||u&&m&&c&&le(u,c)||d)||(d=!0,t.disconnect(),i.removeEventListener("keydown",p),i.removeEventListener("mousedown",g),i.removeEventListener("touchstart",f),i.removeEventListener("contextmenu",g),this.eventSvc.removeListener("dragStarted",g),r&&r(o||n||a),this.removePopupFromPopupList(s,h))};return a&&a({hidePopup:m}),window.setTimeout(()=>{l&&i.addEventListener("keydown",p),c&&(i.addEventListener("mousedown",g),this.eventSvc.addListener("dragStarted",g),i.addEventListener("touchstart",f),i.addEventListener("contextmenu",g))},0),m}addPopupToPopupList(t,e,i){this.popupList.push({element:t,hideFunc:e,instanceId:Bo,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(t,i),Bo+=1}getPopupIndex(t){return this.popupList.findIndex(e=>e.element===t)}setPopupPositionRelatedToElement(t,e){const i=this.getPopupIndex(t);if(-1===i)return;const o=this.popupList[i];if(o.stopAnchoringPromise&&o.stopAnchoringPromise.then(t=>t?.()),o.stopAnchoringPromise=void 0,o.isAnchored=!1,!e)return;const n=this.keepPopupPositionedRelativeTo({element:e,ePopup:t,hidePopup:o.hideFunc});return o.stopAnchoringPromise=n,o.isAnchored=!0,n}removePopupFromPopupList(t,e){this.setAlignedStyles(t,null),this.setPopupPositionRelatedToElement(t,null),e&&vt(e,null),this.popupList=this.popupList.filter(e=>e.element!==t)}keepPopupPositionedRelativeTo(t){const e=this.getPopupParent(),i=e.getBoundingClientRect(),{element:o,ePopup:n}=t,s=o.getBoundingClientRect(),r=t=>Number.parseInt(t.substring(0,t.length-1),10),a=(t,e)=>{const o=i[t]-s[t],a=r(n.style[t]);return{initialDiff:o,lastDiff:o,initial:a,last:a,direction:e}},l=a("top",0),c=a("left",1),h=this.beans.frameworkOverrides;return new y(i=>{h.wrapIncoming(()=>{var s,a;(s=()=>{const i=e.getBoundingClientRect(),s=o.getBoundingClientRect();if(0==s.top&&0==s.left&&0==s.height&&0==s.width)return void t.hidePopup();const a=(t,e)=>{const o=r(n.style[e]);t.last!==o&&(t.initial=o,t.last=o);const a=i[e]-s[e];if(a!=t.lastDiff){const i=this.keepXYWithinBounds(n,t.initial+t.initialDiff-a,t.direction);n.style[e]=`${i}px`,t.last=i}t.lastDiff=a};a(l,"top"),a(c,"left")},a=200,new y(t=>{t(window.setInterval(s,a))})).then(t=>{i(()=>{null!=t&&window.clearInterval(t)})})},"popupPositioning")})}isEventFromCurrentPopup(t,e){const{mouseEvent:i,touchEvent:o}=t,n=i||o;if(!n)return!1;const s=this.getPopupIndex(e);if(-1===s)return!1;for(let t=s;t<this.popupList.length;t++){if(le(this.popupList[t].element,n))return!0}return this.isElementWithinCustomPopup(n.target)}isElementWithinCustomPopup(t){const e=$(this.beans);for(;t&&t!==e.body;){if(t.classList.contains("ag-custom-component-popup")||null===t.parentElement)return!0;t=t.parentElement}return!1}getWrapper(t){for(;!t.classList.contains("ag-popup")&&t.parentElement;)t=t.parentElement;return t.classList.contains("ag-popup")?t:null}getPopupRoot(t){const e=this.getPopupParent();let i=t;for(;i.parentElement&&i.parentElement!==e;)i=i.parentElement;return i}setAlwaysOnTop(t,e){const i=this.getWrapper(t);i&&(i.classList.toggle("ag-always-on-top",!!e),e&&this.bringPopupToFront(i))}bringPopupToFront(t){const e=this.getPopupParent(),i=Array.prototype.slice.call(e.querySelectorAll(".ag-popup")),o=i.length,n=this.getWrapper(t);if(!n||o<=1||!e.contains(t))return;const s=[],r=[];for(const t of i)t!==n&&(t.classList.contains("ag-always-on-top")?r.push(t):s.push(t));const a=[],l=r.length,c=n.classList.contains("ag-always-on-top")||!l?[...s,...r,n]:[...s,n,...r];for(let t=0;t<=o;t++){const o=c[t];if(i[t]===c[t]||o===n)continue;const s=o.querySelectorAll("div");for(const t of s)0!==t.scrollTop&&a.push([t,t.scrollTop]);0===t?e.prepend(this.getPopupRoot(o)):this.getPopupRoot(c[t-1]).after(this.getPopupRoot(o))}for(;a.length;){const t=a.pop();t[0].scrollTop=t[1]}}},zo="ag-resizer-wrapper",Ro=(t,e)=>({tag:"div",ref:`${t}Resizer`,cls:`ag-resizer ag-resizer-${e}`}),Go={tag:"div",cls:zo,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")]},Wo=class extends Se{constructor(t,e){super(),this.element=t,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={popup:!1,...e}}wireBeans(t){this.popupSvc=t.popupSvc,this.dragSvc=t.dragSvc}center(t){const{clientHeight:e,clientWidth:i}=this.offsetParent,o=i/2-this.getWidth()/2,n=e/2-this.getHeight()/2;this.offsetElement(o,n,t)}initialisePosition(t){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:i,minWidth:o,width:n,minHeight:s,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,h=0;const u=zt(this.element);if(u){const t=this.findBoundaryElement(),e=window.getComputedStyle(t);if(null!=e.minWidth){const i=t.offsetWidth-this.element.offsetWidth;h=Number.parseInt(e.minWidth,10)-i}if(null!=e.minHeight){const i=t.offsetHeight-this.element.offsetHeight;c=Number.parseInt(e.minHeight,10)-i}}if(this.minHeight=s||c,this.minWidth=o||h,n&&this.setWidth(n),r&&this.setHeight(r),n&&r||this.refreshSize(),e)this.center(t);else if(a||l)this.offsetElement(a,l,t);else if(u&&i){let e=this.boundaryEl,i=!0;if(e||(e=this.findBoundaryElement(),i=!1),e){const o=Number.parseFloat(e.style.top),n=Number.parseFloat(e.style.left);i?this.offsetElement(Number.isNaN(n)?0:n,Number.isNaN(o)?0:o,t):this.setPosition(n,o)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(t,e){if(!this.config.popup||t===this.movable)return;this.movable=t;const i=this.moveElementDragListener||{eElement:e,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};t?(this.dragSvc?.addDragSource(i),this.moveElementDragListener=i):(this.dragSvc?.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(t){if(this.clearResizeListeners(),t?this.addResizers():this.removeResizers(),"boolean"==typeof t){if(!1===t)return;t={topLeft:t,top:t,topRight:t,right:t,bottomRight:t,bottom:t,bottomLeft:t,left:t}}for(const e of Object.keys(t)){const i=!!t[e],o=this.getResizerElement(e),n={dragStartPixels:0,eElement:o,onDragStart:t=>this.onResizeStart(t,e),onDragging:this.onResize.bind(this),onDragStop:t=>this.onResizeEnd(t,e)};(i||!this.isAlive()&&!i)&&(i?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[e]=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:t,width:e}=this.lastSize;-1!==e&&(this.element.style.width=`${e}px`),-1!==t&&(this.element.style.height=`${t}px`)}getHeight(){return this.element.offsetHeight}setHeight(t){const{popup:e}=this.config,i=this.element;let o=!1;if("string"==typeof t&&t.includes("%"))_t(i,t),t=xt(i),o=!0;else if(t=Math.max(this.minHeight,t),this.positioned){const e=this.getAvailableHeight();e&&t>e&&(t=e)}""!==i.style.height&&this.getHeight()===t||(o?(i.style.maxHeight="unset",i.style.minHeight="unset"):e?_t(i,t):(i.style.height=`${t}px`,i.style.flex="0 0 auto",this.lastSize.height="number"==typeof t?t:Number.parseFloat(t)))}getAvailableHeight(){const{popup:t,forcePopupParentAsOffsetParent:e}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),s=t?this.position.y:o.top,r=t?0:n.top;let a=0;if(e){const t=this.element.parentElement;if(t){const{bottom:e}=t.getBoundingClientRect();a=e-o.bottom}}return i+r-s-a}getWidth(){return this.element.offsetWidth}setWidth(t){const e=this.element,{popup:i}=this.config;let o=!1;if("string"==typeof t&&t.includes("%"))Kt(e,t),t=kt(e),o=!0;else if(this.positioned){t=Math.max(this.minWidth,t);const{clientWidth:e}=this.offsetParent,o=i?this.position.x:this.element.getBoundingClientRect().left;e&&t+o>e&&(t=e-o)}this.getWidth()!==t&&(o?(e.style.maxWidth="unset",e.style.minWidth="unset"):this.config.popup?Kt(e,t):(e.style.width=`${t}px`,e.style.flex=" unset",this.lastSize.width="number"==typeof t?t:Number.parseFloat(t)))}offsetElement(t=0,e=0,i){const{forcePopupParentAsOffsetParent:o}=this.config,n=o?this.boundaryEl:this.element;n&&(this.popupSvc?.positionPopup({ePopup:n,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:t,y:e}),postProcessCallback:i}),this.setPosition(Number.parseFloat(n.style.left),Number.parseFloat(n.style.top)))}constrainSizeToAvailableHeight(t){if(!this.config.forcePopupParentAsOffsetParent)return;const e=()=>{const t=this.getAvailableHeight();this.element.style.setProperty("max-height",`${t}px`)};t&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=Zt(this.beans,this.popupSvc?.getPopupParent(),e)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(t,e){this.position.x=t,this.position.y=e}updateDragStartPosition(t,e){this.dragStartPosition={x:t,y:e}}calculateMouseMovement(t){const{e,isLeft:i,isTop:o,anywhereWithin:n,topBuffer:s}=t,r=e.clientX-this.dragStartPosition.x,a=e.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(e,!!i,!!n,r)?0:r,movementY:this.shouldSkipY(e,!!o,s,a)?0:a}}shouldSkipX(t,e,i,o){const n=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:n.left;let l=a<=0&&s.left>=t.clientX||s.right<=t.clientX&&s.right<=r.right;return!!l||(l=e?o<0&&t.clientX>a+s.left||o>0&&t.clientX<a+s.left:i?o<0&&t.clientX>r.right||o>0&&t.clientX<a+s.left:o<0&&t.clientX>r.right||o>0&&t.clientX<r.right,l)}shouldSkipY(t,e,i=0,o){const n=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:n.top;let l=a<=0&&s.top>=t.clientY||s.bottom<=t.clientY&&s.bottom<=r.bottom;return!!l||(l=e?o<0&&t.clientY>a+s.top+i||o>0&&t.clientY<a+s.top:o<0&&t.clientY>r.bottom||o>0&&t.clientY<r.bottom,l)}createResizeMap(){const t=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:t("eTopLeft"),top:t("eTop"),topRight:t("eTopRight"),right:t("eRight"),bottomRight:t("eBottomRight"),bottom:t("eBottom"),bottomLeft:t("eBottomLeft"),left:t("eLeft")}}addResizers(){if(this.resizersAdded)return;const t=this.element;t&&(t.appendChild(oe(Go)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const t=this.element.querySelector(`.${zo}`);t?.remove(),this.resizersAdded=!1}getResizerElement(t){return this.resizerMap[t].element}onResizeStart(t,e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!e.match(/top/i),isRight:!!e.match(/right/i),isBottom:!!e.match(/bottom/i),isLeft:!!e.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[e].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:o}=this.config;i||o||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(t.clientX,t.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(t=>!t.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const t=this.getSiblings()||[];let e=0,i=0;for(const o of t){const t=!!o.style.flex&&"0 0 auto"!==o.style.flex;if(o===this.element)continue;let n=this.minHeight||0,s=this.minWidth||0;if(t){const t=window.getComputedStyle(o);t.minHeight&&(n=Number.parseInt(t.minHeight,10)),t.minWidth&&(s=Number.parseInt(t.minWidth,10))}else n=o.offsetHeight,s=o.offsetWidth;e+=n,i+=s}return{height:e,width:i}}applySizeToSiblings(t){let e=null;const i=this.getSiblings();if(i){for(let o=0;o<i.length;o++){const n=i[o];n!==e&&(t?n.style.height=`${n.offsetHeight}px`:n.style.width=`${n.offsetWidth}px`,n.style.flex="0 0 auto",n===this.element&&(e=i[o+1]))}e&&(e.style.removeProperty("height"),e.style.removeProperty("min-height"),e.style.removeProperty("max-height"),e.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(t=>t)}onResize(t){if(!this.isResizing||!this.currentResizer)return;const{popup:e,forcePopupParentAsOffsetParent:i}=this.config,{isTop:o,isRight:n,isBottom:s,isLeft:r}=this.currentResizer,a=n||r,l=s||o,{movementX:c,movementY:h}=this.calculateMouseMovement({e:t,isLeft:r,isTop:o}),u=this.position.x,d=this.position.y;let p=0,g=0;if(a&&c){const t=r?-1:1,e=this.getWidth(),i=e+c*t;let o=!1;r&&(p=e-i,(u+p<=0||i<=this.minWidth)&&(o=!0,p=0)),o||this.setWidth(i)}if(l&&h){const t=o?-1:1,e=this.getHeight(),i=e+h*t;let n=!1;o?(g=e-i,(d+g<=0||i<=this.minHeight)&&(n=!0,g=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&e<i&&this.getMinSizeOfSiblings().height+i>this.element.parentElement.offsetHeight&&(n=!0),n||this.setHeight(i)}this.updateDragStartPosition(t.clientX,t.clientY),((e||i)&&p||g)&&this.offsetElement(u+p,d+g)}onResizeEnd(t,e){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[e].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const t=this.element;this.config.popup&&(this.config.width||this.setWidth(t.offsetWidth),this.config.height||this.setHeight(t.offsetHeight))}onMoveStart(t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(t.clientX,t.clientY)}onMove(t){if(!this.isMoving)return;const{x:e,y:i}=this.position;let o;this.config.calculateTopBuffer&&(o=this.config.calculateTopBuffer());const{movementX:n,movementY:s}=this.calculateMouseMovement({e:t,isTop:!0,anywhereWithin:!0,topBuffer:o});this.offsetElement(e+n,i+s),this.updateDragStartPosition(t.clientX,t.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 t=this.element;for(;t;){if("static"!==window.getComputedStyle(t).position)return t;t=t.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const t=this.resizeListeners.pop();this.dragSvc?.removeDragSource(t)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},No=class{constructor(t){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=t.scrollContainer,this.scrollHorizontally=t.scrollAxis.includes("x"),this.scrollVertically=t.scrollAxis.includes("y"),this.scrollByTick=t.scrollByTick??20,t.onScrollCallback&&(this.onScrollCallback=t.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=t.getVerticalPosition,this.setVerticalPosition=t.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=t.getHorizontalPosition,this.setHorizontalPosition=t.setHorizontalPosition),this.shouldSkipVerticalScroll=t.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=t.shouldSkipHorizontalScroll||(()=>!1),this.getTopOffset=t.getTopOffset||(()=>0),this.getBottomOffset=t.getBottomOffset||(()=>0)}get scrolling(){return null!==this.tickingInterval}check(t,e=!1){const i=!this.scrollVertically||e||this.shouldSkipVerticalScroll(),o=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(i&&o)return;const n=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick,r=this.getTopOffset(),a=this.getBottomOffset();this.tickLeft=!o&&t.clientX<n.left+s,this.tickRight=!o&&t.clientX>n.right-s,this.tickUp=!i&&t.clientY<n.top+r+s,this.tickDown=!i&&t.clientY>n.bottom-a-s,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const t=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const e=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(e-t),this.tickDown&&this.setVerticalPosition(e+t)}if(this.scrollHorizontally){const e=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(e-t),this.tickRight&&this.setHorizontalPosition(e+t)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Ho=class extends Se{constructor(t,e){super(),this.ctrl=t,this.getLatestTooltip=()=>(this.updateTooltipText(),this.tooltip),e&&(this.beans=e)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(t,e){const i="title",o=this.ctrl.getGui();o&&(null==t||""==t&&!e?o.removeAttribute(i):o.setAttribute(i,t))}updateTooltipText(){const{getTooltipValue:t}=this.ctrl;t&&(this.tooltip=t())}createTooltipFeatureIfNeeded(){if(null==this.tooltipManager){const t=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,this.getLatestTooltip);t&&(this.tooltipManager=this.createBean(t,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(t){this.tooltip=t,this.refreshTooltip()}refreshTooltip(t){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips");const e=this.tooltipManager;e?.isShowing()&&e.hideTooltip(!0),this.browserTooltips?(this.updateTooltipText(),this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(t?"":null,t),this.createTooltipFeatureIfNeeded())}destroy(){this.setBrowserTooltip(null),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},$o=new WeakMap,Yo=0,jo=class extends Se{constructor(t,e){super(),this.tooltipCtrl=t,this.getTooltipValue=e,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1,this.showEventDispatched=!1}wireBeans(t){this.popupSvc=t.popupSvc}getPopupPositionParams(){}postConstruct(){let t=$o.get(this.gos);t||(t={},$o.set(this.gos,t)),this.sharedState=t,this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();0===this.tooltipTrigger&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),1===this.tooltipTrigger&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.interactionEnabled&&1!==this.tooltipTrigger&&this.addManagedListeners(e,{focusout:this.onFocusOut.bind(this)}),this.interactionEnabled&&this.addManagedListeners(e,{keydown:this.onInteractiveSourceKeyDown.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)})}getTooltipDelay(t){const e=this.tooltipCtrl[`getTooltip${t}DelayOverride`]?.()??this.gos.get(`tooltip${t}Delay`);return Math.max(0,e)}destroy(){this.hideTooltip(!0),super.destroy()}getTooltipTrigger(){const t=this.gos.get("tooltipTrigger");return t&&"hover"!==t?1:0}isShowing(){return 2===this.state}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout());const e=t.sourceCapabilities?.firesTouchEvents;ci()||e||(this.isLocked()?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},100):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled&&2===this.state?this.lockService():this.setToDoNothing()}onFocusIn(){!1!==this.tooltipCtrl.shouldDisplayTooltipOnFocus?.()&&this.prepareToShowTooltip()}onFocusOut(t){const e=t.relatedTarget,i=this.tooltipCtrl.getGui(),o=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(e)||this.interactionEnabled&&o?.contains(e)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(t,e){if(0!=this.state||this.isLocked())return;let i=null==e?0:Math.max(0,e);t&&null==e&&(i=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}canShowTooltip(){return O(this.getTooltipValue())&&(!this.tooltipCtrl.shouldDisplayTooltip||this.tooltipCtrl.shouldDisplayTooltip())}isLastTooltipHiddenRecently(){const t=Date.now(),e=this.sharedState.lastHideTime;return null!=e&&t-e<1e3}setToDoNothing(t){t||2!==this.state||this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.onDocumentTouchStartCallback&&(this.onDocumentTouchStartCallback(),this.onDocumentTouchStartCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const t=this.getTooltipValue(),e=this.tooltipCtrl;if(!O(t)||e.shouldDisplayTooltip&&!e.shouldDisplayTooltip())return void this.setToDoNothing();const i=this.gos.addCommon({location:e.getLocation?.()??"UNKNOWN",value:t,hideTooltipCallback:()=>this.hideTooltip(!0),...e.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(i,o)}hideTooltip(t){!t&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),this.sharedState.lastHideTime=Date.now()),this.showEventDispatched&&(this.showEventDispatched=!1,this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()})),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(t,e){if(2!==this.state||this.tooltipInstanceCount!==t)return void this.destroyBean(e);const i=e.getGui();this.tooltipComp=e,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive"),i.hasAttribute("role")||q(i,this.interactionEnabled?"dialog":"tooltip"),this.connectAriaDescription(i);const o=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:i,...this.interactionEnabled?{ariaLabel:o("ariaLabelTooltip","Tooltip")}:{ariaOwns:this.tooltipCtrl.getGui()}});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),1===this.tooltipTrigger){const t=()=>this.hideTooltip(!0);[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:t}),this.setEventHandlers(t)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners($(this.beans),{keydown:t=>{t&&this.onDocumentKeyDown(t,i)}}),[this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)})),[this.onDocumentTouchStartCallback]=this.addManagedElementListeners($(this.beans),{touchstart:t=>{t&&!i.contains(t.target)&&this.hideTooltip(!0)}}),this.showEventDispatched=!0,this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}connectAriaDescription(t){t.id||(t.id="ag-tooltip-"+ ++Yo);const e=t.id,i=this.tooltipCtrl.getGui(),o=i.getAttribute("aria-describedby")?.split(/\s+/).filter(Boolean)??[];o.includes(e)||i.setAttribute("aria-describedby",[...o,e].join(" ")),this.describedById=e,this.describedBySource=i}disconnectAriaDescription(){const t=this.describedById,e=this.describedBySource;if(!t||!e)return;this.describedById=void 0,this.describedBySource=void 0;const i=e.getAttribute("aria-describedby")?.split(/\s+/).filter(e=>e&&e!==t);i?.length?e.setAttribute("aria-describedby",i.join(" ")):e.removeAttribute("aria-describedby")}onDocumentKeyDown(t,e){const i=this.tooltipCtrl.getGui();if("Escape"===t.key){const o=t.target,n=e.contains(o);return(n||i.contains(o))&&(t.preventDefault(),t.stopPropagation()),n&&i.isConnected&&i.focus({preventScroll:!0}),void this.hideTooltip(!0)}if("Tab"===t.key&&i.contains(t.target)){const i=go(e),o=t.shiftKey?i.at(-1):i[0];if(o)return t.preventDefault(),this.isInteractingWithTooltip=!0,void o.focus()}e.contains(t.target)||this.onKeyDown()}onInteractiveSourceKeyDown(t){if(2!==this.state||!this.tooltipComp)return;if("Escape"===t.key)return t.preventDefault(),t.stopPropagation(),void this.hideTooltip(!0);if("Tab"!==t.key)return;const e=go(this.tooltipComp.getGui()),i=t.shiftKey?e.at(-1):e[0];i&&(t.preventDefault(),t.stopPropagation(),this.isInteractingWithTooltip=!0,i.focus())}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const t=this.tooltipComp?.getGui(),e=H(this.beans);return!!t&&t.contains(e)}onTooltipFocusOut(t){const e=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui(),o=t.relatedTarget;this.isTooltipFocused()||i?.contains(o)||(this.isInteractingWithTooltip=!1,e.contains(o)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack,additionalParams:this.getPopupPositionParams()};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...t,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...t,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.disconnectAriaDescription();const t=this.tooltipComp.getGui();t.classList.remove("ag-tooltip-interactive"),t.classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,i=this.tooltipComp,o=0===this.tooltipTrigger?1e3:0;window.setTimeout(()=>{e?.(),this.destroyBean(i)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const t of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])t&&t();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){this.sharedState.lockOwner=this,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},100)}unlockService(){this.sharedState.lockOwner===this&&(this.sharedState.lockOwner=void 0),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,this.sharedState.lockOwner===this&&(this.sharedState.lockOwner=void 0))}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}isLocked(){return null!=this.sharedState.lockOwner}},Ko=class extends Ho{constructor(t,e,i){super(t,i),this.highlightTracker=e,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:t})=>{this.setTooltipMode(t)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(t){1===this.tooltipMode&&(t.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(t="focus"){this.tooltipMode="focus"===t?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},_o=/[&<>"']/g,Vo={"&":"&","<":"<",">":">",'"':""","'":"'"};function Xo(t){return t?.toString().toString()??null}function Uo(t){return Xo(t)?.replace(_o,t=>Vo[t])??null}function qo(t,e,i){return"string"==typeof t&&(i&&(t=t.trim()),"string"==typeof t&&t.length>e)}function Zo(t){return qo(t,1)&&61===t.codePointAt(0)}function Jo(t){if(!t||null==t)return null;return t.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(t=>t.substring(0,1).toUpperCase()+(t.length>1?t.substring(1,t.length):"")).join(" ")}var Qo=class extends xo{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(t){const{value:e}=t,i=this.getGui();i.textContent=Xo(e);const o=t.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();i.classList.add(`ag-${o}-tooltip`)}},tn=t=>{if("bigint"==typeof t)return t;let e;if("number"==typeof t)e=t;else if("string"==typeof t){if(e=t.trim(),""===e)return null;if(e.endsWith("n")&&(e=e.slice(0,-1)),!/^[+-]?\d+$/.test(e))return null}if(null==e)return null;try{return BigInt(e)}catch{return null}},en=new RegExp("[T ]"),on=new RegExp("^\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2})?(\\.\\d+)?(Z|[+-]\\d{2}(:?\\d{2})?)?)?$");function nn(t,e){return t.toString().padStart(e,"0")}function sn(t,e=!0,i="T"){if(!t)return null;let o=[nn(t.getFullYear(),4),nn(t.getMonth()+1,2),nn(t.getDate(),2)].join("-");return e&&(o+=i+[t.getHours(),t.getMinutes(),t.getSeconds()].map(t=>nn(t,2)).join(":")),o}function rn(t,e=!0){return t?e?[String(t.getFullYear()),String(t.getMonth()+1),nn(t.getDate(),2),nn(t.getHours(),2),`:${nn(t.getMinutes(),2)}`,`:${nn(t.getSeconds(),2)}`]:[t.getFullYear(),t.getMonth()+1,nn(t.getDate(),2)].map(String):null}var an=t=>{if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},ln=["January","February","March","April","May","June","July","August","September","October","November","December"],cn=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function hn(t,e){if(null==e)return sn(t,!1);const i=nn(t.getFullYear(),4),o={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${t.getFullYear()}`,MMMM:()=>ln[t.getMonth()],MMM:()=>ln[t.getMonth()].slice(0,3),MM:()=>nn(t.getMonth()+1,2),Mo:()=>`${t.getMonth()+1}${an(t.getMonth()+1)}`,M:()=>`${t.getMonth()+1}`,Do:()=>`${t.getDate()}${an(t.getDate())}`,DD:()=>nn(t.getDate(),2),D:()=>`${t.getDate()}`,dddd:()=>cn[t.getDay()],ddd:()=>cn[t.getDay()].slice(0,3),dd:()=>cn[t.getDay()].slice(0,2),do:()=>`${t.getDay()}${an(t.getDay())}`,d:()=>`${t.getDay()}`},n=new RegExp(Object.keys(o).join("|"),"g");return e.replace(n,t=>t in o?o[t]():t)}function un(t,e=!1){return!!pn(t,e)}function dn(t){return un(t,!0)}function pn(t,e=!1,i){if(!t)return null;if(!i&&!on.test(t))return null;const[o,n]=t.split(en);if(!o)return null;const s=o.split("-").map(t=>Number.parseInt(t,10));if(3!==s.filter(t=>!isNaN(t)).length)return null;const[r,a,l]=s,c=new Date(r,a-1,l);if(r>=0&&r<100&&c.setFullYear(r,a-1,l),c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l)return null;if(!n&&e)return null;if(!n||"00:00:00"===n)return c;const[h,u,d]=n.split(":").map(t=>Number.parseInt(t,10));if(h>=0&&h<24)c.setHours(h);else if(e)return null;if(u>=0&&u<60)c.setMinutes(u);else if(e)return null;if(d>=0&&d<60)c.setSeconds(d);else if(e)return null;return c}function gn(t,e){const i=document.defaultView??window;if(!i)return;const o=document.createElement("a"),n=i.URL.createObjectURL(e);o.setAttribute("href",n),o.setAttribute("download",t),o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),o.remove(),i.setTimeout(()=>{i.URL.revokeObjectURL(n)},0)}function fn(t){const{inputValue:e,allSuggestions:i,hideIrrelevant:o,maxSuggestions:n}=t;let s=(i??[]).map((t,i)=>({value:t,relevance:mn(e,t),idx:i}));s.sort((t,e)=>t.relevance-e.relevance),o&&(s=s.filter(t=>t.relevance<Math.max(t.value.length,e.length))),null!=n&&n>0&&(s=s.slice(0,n));const r=[],a=[];for(const t of s)r.push(t.value),a.push(t.idx);return{values:r,indices:a}}function mn(t,e){const i=t.length,o=e.length;if(0===o)return i||0;let n,s=t.toLocaleLowerCase(),r=e.toLocaleLowerCase();if(i>0){const t=r.indexOf(s);if(t>=0)return.01*t}t.length<e.length&&(n=r,r=s,s=n,n=e,e=t,t=n);let a=new Uint16Array(o+1),l=new Uint16Array(o+1);for(let t=0;t<=o;t++)a[t]=t;let c=0;const h=i/2-10;for(let u=1;u<=i;u++){const i=t[u-1],d=s[u-1];l[0]=u;for(let n=1;n<=o;n++){const o=e[n-1];if(d!==r[n-1]){const t=l[n-1],e=a[n],i=a[n-1];let o=t<e?t:e;i<o&&(o=i),l[n]=o+1|0;continue}if(c++,i===o&&c++,u>1&&n>1){const i=t[u-2],o=s[u-2],a=e[n-2];o===r[n-2]&&(c++,i===a&&c++)}u<h&&c++,l[n]=a[n-1]}n=a,a=l,l=n}return a[o]/(c+1)}function bn(t){if(t.altKey||t.ctrlKey||t.metaKey)return!1;return 1===t.key?.length}function vn(t,e){const i=e.split(".");let o=t;for(let t=0;t<i.length;t++){if(null==o)return;o=o[i[t]]}return o}}}]);
|
|
2
|
+
//# sourceMappingURL=npm.ag-stack.fc8e4c2148dda04a475d563648e63f21.js.map
|