PageSourceSearch

https://console.culturebiosciences.com/_next/static/chunks/fe5f3c06-d18c9c08fea5e092.js

js culturebiosciences.com collected 2026-09-28 07:38:21 UTC 96,106 bytes, 60 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0a9444cc-e1df-4698-9c1e-40711ae4f190",e._sentryDebugIdIdentifier="sentry-dbid-0a9444cc-e1df-4698-9c1e-40711ae4f190")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[951],{98480:function(e,t,s){s.d(t,{$z:function(){return S},CP:function(){return f},Lu:function(){return y},O_:function(){return T},QE:function(){return P},WD:function(){return R},WN:function(){return l},ZP:function(){return p},_3:function(){return w},f$:function(){return d},js:function(){return h},nA:function(){return k},x$:function(){return G},xu:function(){return D}});var i=s(56931),a=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")}md5cycle(e,t){let s=e[0],i=e[1],a=e[2],n=e[3];s=this.ff(s,i,a,n,t[0],7,-680876936),n=this.ff(n,s,i,a,t[1],12,-389564586),a=this.ff(a,n,s,i,t[2],17,606105819),i=this.ff(i,a,n,s,t[3],22,-1044525330),s=this.ff(s,i,a,n,t[4],7,-176418897),n=this.ff(n,s,i,a,t[5],12,1200080426),a=this.ff(a,n,s,i,t[6],17,-1473231341),i=this.ff(i,a,n,s,t[7],22,-45705983),s=this.ff(s,i,a,n,t[8],7,1770035416),n=this.ff(n,s,i,a,t[9],12,-1958414417),a=this.ff(a,n,s,i,t[10],17,-42063),i=this.ff(i,a,n,s,t[11],22,-1990404162),s=this.ff(s,i,a,n,t[12],7,1804603682),n=this.ff(n,s,i,a,t[13],12,-40341101),a=this.ff(a,n,s,i,t[14],17,-1502002290),i=this.ff(i,a,n,s,t[15],22,1236535329),s=this.gg(s,i,a,n,t[1],5,-165796510),n=this.gg(n,s,i,a,t[6],9,-1069501632),a=this.gg(a,n,s,i,t[11],14,643717713),i=this.gg(i,a,n,s,t[0],20,-373897302),s=this.gg(s,i,a,n,t[5],5,-701558691),n=this.gg(n,s,i,a,t[10],9,38016083),a=this.gg(a,n,s,i,t[15],14,-660478335),i=this.gg(i,a,n,s,t[4],20,-405537848),s=this.gg(s,i,a,n,t[9],5,568446438),n=this.gg(n,s,i,a,t[14],9,-1019803690),a=this.gg(a,n,s,i,t[3],14,-187363961),i=this.gg(i,a,n,s,t[8],20,1163531501),s=this.gg(s,i,a,n,t[13],5,-1444681467),n=this.gg(n,s,i,a,t[2],9,-51403784),a=this.gg(a,n,s,i,t[7],14,1735328473),i=this.gg(i,a,n,s,t[12],20,-1926607734),s=this.hh(s,i,a,n,t[5],4,-378558),n=this.hh(n,s,i,a,t[8],11,-2022574463),a=this.hh(a,n,s,i,t[11],16,1839030562),i=this.hh(i,a,n,s,t[14],23,-35309556),s=this.hh(s,i,a,n,t[1],4,-1530992060),n=this.hh(n,s,i,a,t[4],11,1272893353),a=this.hh(a,n,s,i,t[7],16,-155497632),i=this.hh(i,a,n,s,t[10],23,-1094730640),s=this.hh(s,i,a,n,t[13],4,681279174),n=this.hh(n,s,i,a,t[0],11,-358537222),a=this.hh(a,n,s,i,t[3],16,-722521979),i=this.hh(i,a,n,s,t[6],23,76029189),s=this.hh(s,i,a,n,t[9],4,-640364487),n=this.hh(n,s,i,a,t[12],11,-421815835),a=this.hh(a,n,s,i,t[15],16,530742520),i=this.hh(i,a,n,s,t[2],23,-995338651),s=this.ii(s,i,a,n,t[0],6,-198630844),n=this.ii(n,s,i,a,t[7],10,1126891415),a=this.ii(a,n,s,i,t[14],15,-1416354905),i=this.ii(i,a,n,s,t[5],21,-57434055),s=this.ii(s,i,a,n,t[12],6,1700485571),n=this.ii(n,s,i,a,t[3],10,-1894986606),a=this.ii(a,n,s,i,t[10],15,-1051523),i=this.ii(i,a,n,s,t[1],21,-2054922799),s=this.ii(s,i,a,n,t[8],6,1873313359),n=this.ii(n,s,i,a,t[15],10,-30611744),a=this.ii(a,n,s,i,t[6],15,-1560198380),i=this.ii(i,a,n,s,t[13],21,1309151649),s=this.ii(s,i,a,n,t[4],6,-145523070),n=this.ii(n,s,i,a,t[11],10,-1120210379),a=this.ii(a,n,s,i,t[2],15,718787259),i=this.ii(i,a,n,s,t[9],21,-343485551),e[0]=this.add32(s,e[0]),e[1]=this.add32(i,e[1]),e[2]=this.add32(a,e[2]),e[3]=this.add32(n,e[3])}cmn(e,t,s,i,a,n){return t=this.add32(this.add32(t,e),this.add32(i,n)),this.add32(t<<a|t>>>32-a,s)}ff(e,t,s,i,a,n,r){return this.cmn(t&s|~t&i,e,t,a,n,r)}gg(e,t,s,i,a,n,r){return this.cmn(t&i|s&~i,e,t,a,n,r)}hh(e,t,s,i,a,n,r){return this.cmn(t^s^i,e,t,a,n,r)}ii(e,t,s,i,a,n,r){return this.cmn(s^(t|~i),e,t,a,n,r)}md51(e){let t;let s=e.length,i=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)this.md5cycle(i,this.md5blk(e.substring(t-64,t)));e=e.substring(t-64);let a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)a[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>
155)for(this.md5cycle(i,a),t=0;t<16;t++)a[t]=0;return a[14]=8*s,this.md5cycle(i,a),i}md5blk(e){let t=[];for(let s=0;s<64;s+=4)t[s>>2]=e.charCodeAt(s)+(e.charCodeAt(s+1)<<8)+(e.charCodeAt(s+2)<<16)+(e.charCodeAt(s+3)<<24);return t}rhex(e){let t="0123456789abcdef".split(""),s="",i=0;for(;i<4;i++)s+=t[e>>8*i+4&15]+t[e>>8*i&15];return s}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){let s=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(s>>16)<<16|65535&s}},n={"01":"GRID","02":"CHARTS","0102":"BOTH"},r=class e{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new a,this.md5.init()}validateLicense(){let t=this.getLicenseDetails(e.licenseKey),s=`AG Grid ${"BOTH"===t.currentLicenseType?"and AG Charts ":""}Enterprise`,i=void 0===t.suppliedLicenseType?"":`AG ${"BOTH"===t.suppliedLicenseType?"Grid and AG Charts":"GRID"===t.suppliedLicenseType?"Grid":"Charts"} Enterprise`;if(t.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(s);else if(t.expired){let a=e.getGridReleaseDate(),n=e.formatDate(a);this.outputExpiredKey(t.expiry,n,s,i)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,s,i):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,s,i)}static extractExpiry(t){let s=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(e.decode(s),10))}static extractLicenseComponents(t){let s=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(s=s.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};let i=s.length-32,a=s.substring(i),n=s.substring(0,i),[r,o,l]=e.extractBracketedInformation(s);return{md5:a,license:n,version:r,isTrial:o,type:l}}getLicenseDetails(t){let s,a,r;let o=e.chartsLicenseManager?"BOTH":"GRID";if((0,i.vfG)(t))return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:o};let l=e.getGridReleaseDate(),{md5:h,license:d,version:u,isTrial:c,type:p}=e.extractLicenseComponents(t),g=h===this.md5.md5(d)&&-1===t.indexOf("For_Trialing_ag-Grid_Only"),m=null,C=!1;function f(){let e=new Date;s=m<e,a=void 0}if(g&&(g=!isNaN((m=e.extractExpiry(d)).getTime())))switch(a=l>m,u){case"legacy":case"2":c&&f();break;case"3":(0,i.vfG)(p)?g=!1:(r=p,p!==n["01"]&&p!==n["0102"]||"BOTH"===o&&"BOTH"!==r?(g=!1,C=!0):c&&f())}return g?{licenseKey:t,valid:g,expiry:e.formatDate(m),expired:a,version:u,isTrial:c,trialExpired:s,incorrectLicenseType:C,currentLicenseType:o,suppliedLicenseType:r}:{licenseKey:t,valid:g,incorrectLicenseType:C,currentLicenseType:o,suppliedLicenseType:r}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!(0,i.vfG)(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){let{hostname:e=""}=(this.document.defaultView||window).location;return e}isForceWatermark(){let{pathname:e}=(this.document.defaultView||window).location;return!!e&&-1!==e.indexOf("forceWatermark")}isWebsiteUrl(){return null!==this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)}isLocalhost(){return null!==this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)}static formatDate(e){return e.getDate()+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]+" "+e.getFullYear()}static getGridReleaseDate(){return new Date(parseInt(e.decode(e.RELEASE_INFORMATION),10))}static decode(t){let s,i,a,n,r,o,l;let h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d="",u=0,c=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<c.length;)n=h.indexOf(c.charAt(u++)),r=h.indexOf(c.charAt(u++)),o=h.indexOf(c.charAt(u++)),l=h.indexOf(c.charAt(u++)),s=n<<2|r>>4,i=(15&r)<<4|o>>2,a=(3&o)<<6|l,d+=String.fromCharCode(s),64!=o&&(d+=String.fromCharCode(i)),64!=l&&(d+=String.fromCharCode(a));return e.utf8_decode(d)}static utf8_decode(e){e=e.replace(/rn/g,"n");let t="";for(let s=0;s<e.length;s++){let i=e.charCodeAt(s);i<128?t+=String.fromCharCode(i):i>127&&i<2048?t+=String.fromCharCode(i>>6|192)+String.fromCharCode(63&i|128):t+=String.fromCharCode(i>>12|224)+String.fromCharCode(i>>6&63|128)+String.fromCharCode(63&i|128)}return t}static setChartsLicenseManager(e){this.chartsLicenseManager=e}static setLicenseKey(e){this.licenseKey=e,this.chartsLicenseManager&&this.chartsLicenseManager.setLicenseKey(e,!0)}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];let t=e.match(/\[(.*?)\]/g).map(e=>e.replace("[","").replace("]",""));if(!t||0===t.length)return["legacy",!1,void 0];let s=1===t.filter(e=>"TRIAL"===e).length,i=t.filter(e=>0===e.indexOf("v"))[0];return[i?i.replace("v",""):"legacy",s,n[t.filter(e=>n[e])[0]]]}centerPadAndOutput(e){let t=this.totalMessageLength-e.length;console.error(e.padStart(t/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,t="*",s=""){console.error(e.padEnd(this.totalMessageLength-s.length,t)+s)}outputInvalidLicenseKey(e,t,s){e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${s} only and does not cover you for ${t}.`," ","*")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not val
1id."," ","*")),this.padAndOutput("* To troubleshoot your license key visit https://ag-grid.com/licensing/."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,t,s){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${s} expired on ${e}.`," ","*"),this.padAndOutput("* Please email [email protected] to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(e){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${e} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${e} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email [email protected] for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(e,t,s,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${s} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${i} released before ${e}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${t}.`," ","*"),this.padAndOutput("* Please contact [email protected] to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};r.RELEASE_INFORMATION="MTc1NTA3NzEwMDgwOQ==";var o={selector:"AG-WATERMARK",component:class extends i.wA2{constructor(){super(`<div class="ag-watermark">
2                <div data-ref="eLicenseTextRef" class="ag-watermark-text"></div>
3            </div>`),this.eLicenseTextRef=i.CUI}wireBeans(e){this.licenseManager=e.licenseManager}postConstruct(){let e=this.shouldDisplayWatermark();this.setDisplayed(e),e&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}}},l=class extends i.AS9{constructor(){super(...arguments),this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){this.licenseManager=new r((0,i.rtB)(this.gos)),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new r(null).getLicenseDetails(e)}getWatermarkSelector(){return o}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){r.setLicenseKey(e)}static setChartsLicenseManager(e){r.setChartsLicenseManager(e)}},h=class extends i.wA2{constructor(){super(),this.setTemplate("<div></div>")}init(e){this.params=e,this.cssClassPrefix=this.params.cssClassPrefix??"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;let e=(0,i.awi)(`<span data-ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`),{checked:t,icon:s}=this.params;t?e.appendChild((0,i.scM)("check",this.gos)):s&&((0,i.Iul)(s)?e.appendChild(s):"string"==typeof s?e.innerHTML=s:(0,i.Brh)("menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){let e=(0,i.awi)(`<span data-ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;let e=(0,i.awi)(`<span data-ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){let e=(0,i.awi)(`<span data-ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){let s=this.gos.get("enableRtl")?"smallLeft":"smallRight";(0,i.mmg)(t,!1),e.appendChild((0,i.scM)(s,this.gos))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},d=(0,i.eiH)({version:"32.3.9",moduleName:i.GXE.EnterpriseCoreModule,beans:[l],userComponents:[{name:"agMenuItem",classImp:h}]}),u="ag-disabled-group-title-bar",c=class extends i.wA2{constructor(e={}){super(function(e){let t=e.cssIdentifier??"default",s=e.suppressKeyboardNavigation?"presentation":"role";return`
4        <div class="ag-group-title-bar ag-${t}-group-title-bar ag-unselectable" role="${s}">
5            <span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" data-ref="eGroupOpenedIcon" role="presentation"></span>
6            <span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" data-ref="eGroupClosedIcon" role="presentation"></span>
7            <span data-ref="eTitle" class="ag-group-title ag-${t}-group-title"></span>
8        </div>
9    `}(e)),this.suppressOpenCloseIcons=!1,this.suppressKeyboardNavigation=!1,this.eGroupOpenedIcon=i.CUI,this.eGroupClosedIcon=i.CUI,this.eTitle=i.CUI;let{title:t,suppressOpenCloseIcons:s,suppressKeyboardNavigation:a}=e;t&&t.length>0&&(this.title=t),null!=s&&(this.suppressOpenCloseIcons=s),this.suppressKeyboardNavigation=a??!1}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild((0,i.ucQ)("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild((0,i.ucQ)("columnSelectOpen",this.gos,null)),this.addManagedElementListeners(this.getGui(),{click:()=>this.dispatchExpandChanged(),keydown:e=>{switch(e.key){case i.KeyCode.ENTER:case i.KeyCode.SPACE:e.preventDefault(),this.dispatchExpandChanged();break;case i.KeyCode.RIGHT:case i.KeyCode.LEFT:e.preventDefault(),this.dispatchExpandChanged(e.key===i.KeyCode.RIGHT)}}})}refreshOnExpand(e){this.refreshAriaStatus(e),this.refreshOpenCloseIcons(e)}refreshAriaStatus(e){this.suppressOpenCloseIcons||(0,i.mmg)(this.getGui(),e)}refreshOpenCloseIcons(e){let t=!this.suppressOpenCloseIcons;(0,i.DIH)(this.eGroupOpenedIcon,t&&e),(0,i.DIH)(this.eGroupClosedIcon,t&&!e)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(e){this.dispatchLocalEvent({type:"expandedChanged",expanded:e})}setTitle(e){let t=this.getGui(),s=!!e&&e.length>0;e=s?e:void 0,this.eTitle.textContent=e??"",(0,i.DIH)(t,s),e!==this.title&&(this.title=e);let a=t.classList.contains(u);return this.refreshDisabledStyles(a),this}addWidget(e){return this.getGui().appendChild(e),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(e){let t=this.getGui();e?(t.classList.add(u),t.removeAttribute("tabindex")):(t.classList.remove(u),"string"!=typeof this.title||this.suppressKeyboardNavigation?t.removeAttribute("tabindex"):t.setAttribute("tabindex","0"))}},p={selector:"AG-GROUP-COMPONENT",component:class extends i.wA2{constructor(e={}){super(function(e){let t=e.cssIdentifier||"default",s=e.direction||"vertical";return`
10        <div class="ag-group ag-${t}-group" role="presentation">
11            <div data-ref="eToolbar" class="ag-group-toolbar ag-${t}-group-toolbar">
12                <ag-checkbox data-ref="cbGroupEnabled"></ag-checkbox>
13            </div>
14            <div data-ref="eContainer" class="ag-group-container ag-group-container-${s} ag-${t}-group-container"></div>
15        </div>
16    `}(e),[i.I$4]),this.params=e,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1,this.eToolbar=i.CUI,this.cbGroupEnabled=i.CUI,this.eContainer=i.CUI;let{enabled:t,items:s,suppressEnabledCheckbox:a,expanded:n,suppressToggleExpandOnEnableChange:r,useToggle:o}=e;this.cssIdentifier=e.cssIdentifier||"default",this.enabled=null==t||t,this.items=s||[],this.useToggle=o??!1,this.alignItems=e.alignItems||"center",this.expanded=null==n||n,null!=a&&(this.suppressEnabledCheckbox=a),null!=r&&(this.suppressToggleExpandOnEnableChange=r)}postConstruct(){if(this.setupTitleBar(),this.items.length){let e=this.items;this.items=[],this.addItems(e)}let e=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);let{onEnableChange:t,onExpandedChange:s,suppressOpenCloseIcons:a}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(a??!1),this.refreshChildDisplay(),(0,i.DIH)(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(e=>{this.setEnabled(e,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(e)}),null!=t&&this.onEnableChange(t),null!=s&&this.onExpandedChange(s)}refreshChildDisplay(){(0,i.DIH)(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),this.eTitleBar?.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(e){this.alignItems!==e&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=e;let t=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(t),this}toggleGroupExpand(e,t){if(this.eTitleBar?.isSuppressCollapse()&&!this.useToggle)e=!0,t=!0;else if(e=null!=e?e:!this.expanded,this.expanded===e)return this;return this.expanded=e,this.refreshChildDisplay(),(0,i.DIH)(this.eContainer,e),t||this.dispatchLocalEvent({type:e?"expanded":"collapsed"}),this}
16addItems(e){e.forEach(e=>this.addItem(e))}prependItem(e){this.insertItem(e,!0)}addItem(e){this.insertItem(e,!1)}insertItem(e,t){let s=this.eContainer,a=e instanceof i.wA2?e.getGui():e;a.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),t?(s.insertAdjacentElement("afterbegin",a),this.items.unshift(a)):(s.appendChild(a),this.items.push(a))}hideItem(e,t){let s=this.items[t];(0,i.DIH)(s,!e)}getItemIndex(e){let t=e instanceof i.wA2?e.getGui():e;return this.items.indexOf(t)}setTitle(e){return this.eTitleBar?.setTitle(e),this}addTitleBarWidget(e){return this.eTitleBar?.addWidget(e),this}addCssClassToTitleBar(e){this.eTitleBar?.addCssClass(e)}dispatchEnableChangeEvent(e){this.dispatchLocalEvent({type:"enableChange",enabled:e})}setEnabled(e,t,s){return this.enabled=e,this.refreshDisabledStyles(),s||this.toggleGroupExpand(e),t||(this.cbGroupEnabled.setValue(e),this.eToggle?.setValue(e)),this}isEnabled(){return this.enabled}onEnableChange(e){return this.addManagedListeners(this,{enableChange:t=>e(t.enabled)}),this}onExpandedChange(e){return this.addManagedListeners(this,{expanded:()=>e(!0),collapsed:()=>e(!1)}),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){return this.eTitleBar?.hideOpenCloseIcons(e),this}refreshDisabledStyles(){let e=!this.enabled;this.eContainer.classList.toggle("ag-disabled",e),this.eTitleBar?.refreshDisabledStyles(this.suppressEnabledCheckbox&&e),this.eContainer.classList.toggle("ag-disabled-group-container",e)}setupTitleBar(){let e=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",e.getGui())}createDefaultTitleBar(){let e=this.createManagedBean(new c(this.params));return this.eTitleBar=e,e.refreshOnExpand(this.expanded),this.addManagedListeners(e,{expandedChanged:e=>this.toggleGroupExpand(e.expanded)}),e}createToggleTitleBar(){let e=this.createManagedBean(new i.nN0({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:e=>{this.setEnabled(e,!0),this.dispatchEnableChangeEvent(e)}}));return e.addCssClass("ag-group-title-bar"),e.addCssClass(`ag-${this.params.cssIdentifier??"default"}-group-title-bar ag-unselectable`),this.eToggle=e,this.toggleGroupExpand(this.enabled),e}}},g=class extends i.wA2{constructor(e){super(`
17            <div class="ag-pill" role="option">
18                <span class="ag-pill-text" data-ref="eText"></span>
19                <span class="ag-button ag-pill-button" data-ref="eButton" role="presentation"></span>
20            </div>
21        `),this.config=e,this.eText=i.CUI,this.eButton=i.CUI}postConstruct(){let{config:e,eButton:t}=this,{onKeyDown:s,onButtonClick:i}=e;this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),this.addGuiEventListener("focus",()=>{this.eButton.focus()}),s&&this.addGuiEventListener("keydown",s),i&&this.addManagedElementListeners(t,{click:i})}toggleCloseButtonClass(e,t){this.eButton.classList.toggle(e,t)}setText(e){this.eText.textContent=e}getText(){return this.eText.textContent}},m=class extends i.wA2{constructor(){super(`
22            <div class="ag-pill-container" role="listbox"></div>
23            `),this.pills=[]}wireBeans(e){this.focusService=e.focusService}init(e){this.params=e,this.refresh()}refresh(){this.clearPills();let{params:e,onPillKeyDown:t}=this,s=e.getValue();if(!Array.isArray(s))return;let a=s.length;for(let n=0;n<a;n++){let r=s[n],o=this.createBean(new g({onButtonClick:()=>this.onPillButtonClick(o),onKeyDown:t.bind(this)})),l=o.getGui();(0,i.Qnv)(l,n+1),(0,i.VzM)(l,a),e.onPillMouseDown&&o.addGuiEventListener("mousedown",e.onPillMouseDown),e.announceItemFocus&&o.addGuiEventListener("focus",e.announceItemFocus),o.setText(r),o.toggleCloseButtonClass("ag-icon-cancel",!0),this.appendChild(l),this.pills.push(o)}}onNavigationKeyDown(e){let{key:t}=e;if(!this.pills.length||t!==i.KeyCode.LEFT&&t!==i.KeyCode.RIGHT)return;e.preventDefault();let s=(0,i.HB1)(this.gos),a=this.getGui(),{params:n,focusService:r}=this;if(a.contains(s)){let e=r.findNextFocusableElement(a,!1,t===i.KeyCode.LEFT);
23e?e.focus():n.eWrapper&&n.eWrapper.focus()}else{let e=r.findFocusableElements(a);e.length>0&&e[t===i.KeyCode.RIGHT?0:e.length-1].focus()}}clearPills(){let e=this.getGui();e.contains((0,i.HB1)(this.gos))&&this.params.eWrapper&&this.params.eWrapper.focus(),(0,i.wvc)(e),this.destroyBeans(this.pills),this.pills=[]}onPillButtonClick(e){this.deletePill(e)}onPillKeyDown(e){let t=e.key;if(t!==i.KeyCode.DELETE&&t!==i.KeyCode.BACKSPACE)return;e.preventDefault();let s=(0,i.rtB)(this.gos),a=this.pills.findIndex(e=>e.getGui().contains(s.activeElement));if(-1===a)return;let n=this.pills[a];n&&this.deletePill(n,a)}deletePill(e,t){let s=e.getText(),i=(this.params.getValue()||[]).filter(e=>e!==s);if(this.params.setValue(i),!i.length&&this.params.eWrapper)this.params.eWrapper.focus();else if(null!=t){let e=this.pills[Math.min(t,this.pills.length-1)];e&&e.getFocusableElement().focus()}}destroy(){this.clearPills(),super.destroy()}},C=class extends i.wA2{constructor(e){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e}wireBeans(e){this.userComponentFactory=e.userComponentFactory}setState(e){let t="",{params:s}=this;s.valueFormatter&&(t=s.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}highlightString(e){let{parsedValue:t}=this;if(this.params.cellRenderer||!(0,i.fTC)(t))return;let s=(0,i.fTC)(e);if(s){let a=t?.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(a>=0){let s=a+e.length,n=(0,i.BYN)(t.slice(0,a),!0),r=(0,i.BYN)(t.slice(a,s),!0),o=(0,i.BYN)(t.slice(s));this.renderValueWithoutRenderer(`${n}<span class="ag-rich-select-row-text-highlight">${r}</span>${o}`)}else s=!1}s||this.renderValueWithoutRenderer(t)}updateSelected(e){let t=this.getGui();(0,i.N41)(t.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}getValue(){return this.value}toggleHighlighted(e){this.addOrRemoveCssClass("ag-rich-select-row-highlighted",e)}populateWithoutRenderer(e,t){let s=(0,i.rtB)(this.gos),a=this.getGui(),n=s.createElement("span");n.style.overflow="hidden",n.style.textOverflow="ellipsis";let r=(0,i.BYN)((0,i.fTC)(t)?t:e,!0);this.parsedValue=(0,i.fTC)(r)?r:null,a.appendChild(n),this.renderValueWithoutRenderer(r),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>n.scrollWidth>n.clientWidth})}renderValueWithoutRenderer(e){let t=this.getGui().querySelector("span");t&&(t.innerHTML=(0,i.fTC)(e)?e:"&nbsp;")}populateWithRenderer(e,t){let s,a;if(this.params.cellRenderer){let s=this.getParentComponent()?.getParentComponent();a=this.userComponentFactory.getEditorRendererDetails(this.params,{value:e,valueFormatted:t,getValue:()=>s?.getValue(),setValue:e=>{s?.setValue(e,!0)},setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})}return a&&(s=a.newAgStackInstance()),s&&(0,i.GRU)(s,this.getGui()),!!s&&(s.then(e=>{this.addDestroyFunc(()=>{this.destroyBean(e)})}),!0)}},f=class extends i.BxR{constructor(e){var t;super((t=e?.cssIdentifier||"default",`<div class="ag-virtual-list-viewport ag-${t}-virtual-list-viewport" role="presentation">
24            <div class="ag-virtual-list-container ag-${t}-virtual-list-container" data-ref="eContainer"></div>
25        </div>`)),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=i.CUI,this.awaitStableCallbacks=[];let{cssIdentifier:s="default",ariaRole:a="listbox",listName:n}=e||{};this.cssIdentifier=s,this.ariaRole=a,this.listName=n}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.animationFrameService=e.animationFrameService,this.environment=e.environment}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.setAriaProperties(),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanged.bind(this)})}onGridStylesChanged(e){e.listItemHeightChanged&&(this.rowHeight=this.getItemHeight(),this.refresh())}setAriaProperties(){let e=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),t=this.eContainer;(0,i.Znd)(t,this.ariaRole),(0,i.xER)(t,e)}addResizeObserver(){let e=this.resizeObserverService.observeResize(this.getGui(),()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()));this.addDestroyFunc(e)}focusInnerElement(e){this.focusRow(e?this.model.getRowCount()-1:0)}onFocusIn(e){let t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=(0,i.zRb)(t)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){switch(e.key){case i.KeyCode.UP:case i.KeyCode.DOWN:this.navigate(e.key===i.KeyCode.UP)&&e.preventDefault();break;case i.KeyCode.PAGE_HOME:case i.KeyCode.PAGE_END:case i.KeyCode.PAGE_UP:case i.KeyCode.PAGE_DOWN:null!==this.navigateToPage(e.key)&&e.preventDefault()}}onTabKeyDown(e){(0,i.yth)(e),this.forceFocusOutOfContainer(e.shiftKey)}navigate(e){if(null==this.lastFocusedRowIndex)return!1;let t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount())&&(this.focusRow(t),!0)}navigateToPage(e,t="focused"){let s=!1;"focused"===t&&(t=this.getLastFocusedRow(),s=!0);let a=this.model.getRowCount()-1,n=-1;return(e===i.KeyCode.PAGE_HOME?n=0:e===i.KeyCode.PAGE_END?n=a:e===i.KeyCode.PAGE_DOWN?n=Math.min(t+this.pageSize,a):e===i.KeyCode.PAGE_UP&&(n=Math.max(t-this.pageSize,0)),-1===n)?null:(s?this.focusRow(n):this.ensureIndexVisible(n),n)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;let t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){let t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,s)=>e(t.rowComponent,s))}getItemHeight(){return this.isHeightFromTheme?this.environment.getDefaultListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){let s=this.model.getRowCount();if("number"!=typeof e||e<0||e>=s)return(0,i.Brh)("invalid row index for ensureIndexVisible: ",e),!1;let a=e*this.rowHeight,n=a+this.rowHeight,r=this.getGui(),o=r.scrollTop,l=r.offsetHeight,h=t?0:this.rowHeight;return o>a+h?(r.scrollTop=a,!0):o+l<n-h&&(r.scrollTop=n-l,!0)}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(null==this.model||!this.isAlive())return;let t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,this.awaitStable(()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}awaitStable(e){if(this.awaitStableCallbacks.push(e),this.awaitStableCallbacks.length>1)return;let t=this.model.getRowCount();(0,i.naX)(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{let e=this.awaitStableCallbacks;
25this.awaitStableCallbacks=[],e.forEach(e=>e())})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&"function"==typeof this.model.areRowsEqual&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive()||!this.model)return;let t=this.getGui(),s=t.scrollTop,i=s+t.offsetHeight,a=Math.floor(s/this.rowHeight),n=Math.floor(i/this.rowHeight);this.pageSize=Math.floor((i-s)/this.rowHeight),this.ensureRowsRendered(a,n,e)}ensureRowsRendered(e,t,s){this.renderedRows.forEach((s,i)=>{(i<e||i>t)&&i!==this.lastFocusedRowIndex&&this.removeRow(i)}),s&&this.refreshRows();for(let s=e;s<=t;s++)!this.renderedRows.has(s)&&s<this.model.getRowCount()&&this.insertRow(s)}insertRow(e){let t=this.model.getRow(e),s=document.createElement("div");s.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),(0,i.Znd)(s,"tree"===this.ariaRole?"treeitem":"option"),(0,i.VzM)(s,this.model.getRowCount()),(0,i.Qnv)(s,e+1),s.setAttribute("tabindex","-1"),s.style.height=`${this.rowHeight}px`,s.style.top=`${this.rowHeight*e}px`;let a=this.componentCreator(t,s);a.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),s.appendChild(a.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",s):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",s):this.eContainer.appendChild(s),this.renderedRows.set(e,{rowComponent:a,eDiv:s,value:t})}removeRow(e){let t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){let e=this.model.getRowCount();this.renderedRows.forEach((t,s)=>{if(s>=e)this.removeRow(s);else{let e=this.model.getRow(s);this.model.areRowsEqual?.(t.value,e)?this.componentUpdater(e,t.rowComponent):this.removeRow(s)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),this.awaitStableCallbacks.length=0,super.destroy())}},v="ag-rich-select-list",b="ag-rich-select-row",I=class extends f{constructor(e,t,s){super({cssIdentifier:"rich-select"}),this.params=e,this.richSelectWrapper=t,this.getSearchString=s,this.lastRowHovered=-1,this.selectedItems=new Set,this.params=e,this.setComponentCreator(this.createRowComponent.bind(this)),this.setComponentUpdater(()=>{})}postConstruct(){super.postConstruct(),this.createLoadingElement();let{cellRowHeight:e,pickerAriaLabelKey:t,pickerAriaLabelValue:s}=this.params;e&&this.setRowHeight(e);let a=this.getGui(),n=this.getAriaElement();this.addManagedListeners(a,{mousemove:this.onMouseMove.bind(this),mouseout:this.onMouseOut.bind(this),mousedown:this.onMouseDown.bind(this),click:this.onClick.bind(this)}),a.classList.add(v);let r=`${v}-${this.getCompId()}`;n.setAttribute("id",r);let o=this.localeService.getLocaleTextFunc()(t,s);(0,i.xER)(n,o),(0,i.RXA)(this.richSelectWrapper,n)}navigateToPage(e){let t=super.navigateToPage(e,this.lastRowHovered);return null!=t&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightIndex(t)}),t}drawVirtualRows(e){super.drawVirtualRows(e),this.refreshSelectedItems()}highlightFilterMatch(e){this.forEachRenderedRow(t=>{t.highlightString(e)})}onNavigationKeyDown(e,t){this.animationFrameService.requestAnimationFrame(()=>{if(!this.currentList||!this.isAlive())return;let s=this.currentList.length,a=this.lastRowHovered,n=e===i.KeyCode.DOWN?1:-1;this.highlightIndex(Math.min(Math.max(-1===a?0:a+n,0),s-1)),t()})}selectValue(e){if(!this.currentList)return this.eLoading&&this.appendChild(this.eLoading),!1;if(this.eLoading?.offsetParent&&this.eLoading.parentElement?.removeChild(this.eLoading),null==e)return!1;let t=this.getIndicesForValues(e),s=t.length>0;return s&&(this.refresh(),this.ensureIndexVisible(t[0]),this.refresh(!0)),this.selectListItems(Array.isArray(e)?e:[e]),s}selectListItems(e,t=!1){t||this.selectedItems.clear();for(let t=0;t<e.length;t++){let s=e[t];this.selectedItems.has(s)||this.selectedItems.add(s)}this.refreshSelectedItems()}getCurrentList(){return this.currentList}setCurrentList(e){this.currentList=e,this.setModel({getRowCount:()=>e.length,getRow:t=>e[t],areRowsEqual:(e,t)=>e===t})}getSelectedItems(){return this.selectedItems}getLastItemHovered(){return this.currentList[this.lastRowHovered]}highlightIndex(e,t){this.currentList&&(e<0||e>=this.currentList.length?this.lastRowHovered=-1:(this.lastRowHovered=e,this.ensureIndexVisible(e,!t)&&!t&&this.refresh(!0)),this.forEachRenderedRow((t,s)=>{let a=e===s;if(t.toggleHighlighted(a),a){let e=`${b}-${t.getCompId()}`;(0,i.TTY)(this.richSelectWrapper,e),this.richSelectWrapper.setAttribute("data-active-option",e)}}))}getIndicesForValues(e){let{currentList:t}=this;if(!t||0===t.length||null==e||(Array.isArray(e)||(e=[e]),0===e.length))return[];let s=[];for(let i=0;i<e.length;i++){let a=t.indexOf(e[i]);a>=0&&s.push(a)}return s}toggleListItemSelection(e){this.selectedItems.has(e)?this.selectedItems.delete(e):this.selectedItems.add(e),this.refreshSelectedItems(),this.dispatchValueSelected()}refreshSelectedItems(){this.forEachRenderedRow(e=>{let t=this.selectedItems.has(e.getValue());e.updateSelected(t)})}createLoadingElement(){let e=(0,i.rtB)(this.gos),t=this.localeService.getLocaleTextFunc(),s=e.createElement("div");s.classList.add("ag-loading-text"),s.innerText=t("loadingOoo","Loading..."),this.eLoading=s}createRowComponent(e,t){let s=new C(this.params);t.setAttribute("id",`${b}-${s.getCompId()}`),s.setParentComponent(this),this.createBean(s),s.setState(e);let{highlightMatch:i,searchType:a="fuzzy"}=this.params;return i&&"fuzzy"!==a&&s.highlightString(this.getSearchString()),s}getRowForMouseEvent(e){let t=this.getGui().getBoundingClientRect(),s=this.getScrollTop();return Math.floor((e.clientY-t.top+s)/this.getRowHeight())}onMouseMove(e){let t=this.getRowForMouseEvent(e);-1!==t&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.highlightIndex(t,!0))}onMouseDown(e){e.preventDefault()}onMouseOut(e){this.getGui().contains(e.relatedTarget)||this.highlightIndex(-1)}onClick(e){let{multiSelect:t}=this.params;if(!this.currentList)return;let s=this.getRowForMouseEvent(e),i=this.currentList[s];t?this.toggleListItemSelection(i):(this.selectListItems([i]),this.dispatchValueSelected())}dispatchValueSelected(){this.dispatchLocalEvent({type:"richSelectListRowSelected",fromEnterKey:!1,value:this.selectedItems})}destroy(){super.destroy(),this.eLoading=void 0}},y=class extends i.MQo{constructor(e){super({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:e?.template??`
26            <div class="ag-picker-field" role="presentation">
27                <div data-ref="eLabel"></div>
28                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">
29                    <span data-ref="eDisplayField" class="ag-picker-field-display"></span>
30                    <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
31                    <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
32                    <span data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></span>
33                </div>
34            </div>`,agComponents:[i.jvp],modalPicker:!1,...e,maxPickerHeight:e?.maxPickerHeight??"calc(var(--ag-row-height) * 6.5)"}),this.searchString="",this.searchStringCreator=null,this.eInput=i.CUI,this.eDeselect=i.CUI,this.skipWrapperAnnouncement=!1;let{value:t,valueList:s,searchStringCreator:a}=e||{};void 0!==t&&(this.value=t),null!=s&&(this.values=s),a&&(this.searchStringCreator=a)}wireBeans(e){super.wireBeans(e),this.userComponentFactory=e.userComponentFactory,this.ariaAnnouncementService=e.ariaAnnouncementService}postConstruct(){super.postConstruct(),this.createListComponent(),this.eDeselect.appendChild((0,i.scM)("cancel",this.gos));let{allowTyping:e,placeholder:t,suppressDeselectAll:s}=this.config;this.eDeselect.classList.add("ag-hidden"),e?(this.eInput.setAutoComplete(!1).setInputPlaceholder(t),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.setupAriaProperties();let{searchDebounceDelay:a=300}=this.config;this.clearSearchString=(0,i.eTz)(this.clearSearchString,a),this.renderSelectedValue(),e&&this.eInput.onValueChange(e=>this.searchTextFromString(e)),this.addManagedElementListeners(this.eWrapper,{focus:this.onWrapperFocus.bind(this)}),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)}),s||this.addManagedElementListeners(this.eDeselect,{mousedown:this.onDeselectAllMouseDown.bind(this),click:this.onDeselectAllClick.bind(this)})}setupAriaProperties(){let{eWrapper:e,gos:t,localeService:s}=this;e.tabIndex=t.get("tabIndex");let i=s.getLocaleTextFunc();this.ariaDeleteSelection=i("ariaLabelRichSelectDeleteSelection","Press DELETE to deselect item"),this.ariaDeselectAllItems=i("ariaLabelRichSelectDeselectAllItems","Press DELETE to deselect all items"),this.ariaToggleSelection=i("ariaLabelRichSelectToggleSelection","Press SPACE to toggle selection")}createListComponent(){this.listComponent=this.createBean(new I(this.config,this.eWrapper,()=>this.searchString)),this.listComponent.setParentComponent(this),this.addManagedListeners(this.listComponent,{richSelectListRowSelected:e=>{this.onListValueSelected(e.value,e.fromEnterKey)}})}renderSelectedValue(){let e,t;let{value:s,eDisplayField:a,config:n}=this,{allowTyping:r,cellRenderer:o,initialInputValue:l,multiSelect:h,suppressDeselectAll:d,suppressMultiSelectPillRenderer:u}=n,c=this.config.valueFormatter?this.config.valueFormatter(s):s;if(r){this.eInput.setValue(l??c);return}if(h&&!d){let e=null==s||Array.isArray(s)&&0===s.length;this.eDeselect.classList.toggle("ag-hidden",e)}if(h&&!u){this.createOrUpdatePillContainer(a);return}if(o&&(e=this.userComponentFactory.getEditorRendererDetails(n,{value:s,valueFormatted:c,getValue:()=>this.getValue(),setValue:e=>{this.setValue(e,!0)},setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})),e&&(t=e.newAgStackInstance()),t)(0,i.wvc)(a),(0,i.GRU)(t,a),t.then(e=>{this.addDestroyFunc(()=>this.destroyBean(e))});else{if((0,i.fTC)(this.value))a.innerText=c,a.classList.remove("ag-display-as-placeholder");else{let{placeholder:e}=n;(0,i.fTC)(e)?(a.innerHTML=`${(0,i.BYN)(e)}`,a.classList.add("ag-display-as-placeholder")):(0,i.wvc)(a)}this.setTooltip({newTooltipText:c??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}}createPickerComponent(){let{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){let{valueList:t,refresh:s}=e;this.listComponent&&this.listComponent.getCurrentList()!==t&&(this.listComponent.setCurrentList(t),s&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&!this.listComponent.selectValue(this.value)&&this.listComponent.refresh()),this.alignPickerToComponent()))}showPicker(){super.showPicker();let{listComponent:e,value:t}=this;if(!e)return;let s=null;null!=this.value&&(e.selectValue(this.value),s=e.getIndicesForValues(Array.isArray(t)?t:[t])[0]),null!=s?e.highlightIndex(s):e.refresh(),this.displayOrHidePicker()}beforeHidePicker(){super.beforeHidePicker()}createOrUpdatePillContainer(e){if(!this.pillContainer){let t=this.pillContainer=this.createBean(new m);this.addDestroyFunc(()=>{this.destroyBean(this.pillContainer),this.pillContainer=null}),(0,i.wvc)(e),e.appendChild(t.getGui()),t.init({eWrapper:this.eWrapper,onPillMouseDown:e=>{e.stopImmediatePropagation()},announceItemFocus:()=>{this.announceAriaValue(this.ariaDeleteSelection)},getValue:()=>this.getValue(),setValue:e=>this.setValue(e,!0)})}this.doWhileBlockingAnnouncement(()=>this.pillContainer?.refresh())}doWhileBlockingAnnouncement(e){this.skipWrapperAnnouncement=!0,e(),this.skipWrapperAnnouncement=!1}onWrapperFocus(){let{eInput:e,config:t}=this,{allowTyping:s,multiSelect:i,suppressDeselectAll:a}=t;if(s){let t=e.getFocusableElement();t.focus(),t.select()}else!i||a||this.skipWrapperAnnouncement||this.announceAriaValue(this.ariaDeselectAllItems)}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}onDeselectAllMouseDown(e){e.stopImmediatePropagation()}onDeselectAllClick(){this.setValue([],!0)}buildSearchStringFromKeyboardEvent(e){let{key:t}=e;if(t===i.KeyCode.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!(0,i.aCc)(e))return;e.preventDefault(),this.searchTextFromCharacter(t)}searchTextFromCharacter(e){this.searchString+=e,this.runSearch(),this.clearSearchString()}searchTextFromString(e){null==e&&(e=""),this.searchString=e,this.runSearch()}buildSearchStrings(e){let t;let{valueFormatter:s=e=>e}=this.config;return"number"==typeof e[0]||"string"==typeof e[0]?t=e.map(e=>s(e)):"object"==typeof e[0]&&this.searchStringCreator&&(t=this.searchStringCreator(e)),t}filterListModel(e){let{filterList:t}=this.config;t&&this.setValueList({valueList:e,refresh:!0})}runSearch(){if(!this.listComponent)return;let{values:e}=this,t=this.buildSearchStrings(e);if(!t){this.listComponent.highlightIndex(-1);return}let{suggestions:s,filteredValues:a}=this.getSuggestionsAndFilteredValues(this.searchString,t),{filterList:n,highlightMatch:r,searchType:o="fuzzy"}=this.config,l=a.length,h=!!(n&&""!==this.searchString);if(this.filterListModel(h?a:e),s.length){let e=h?0:t.indexOf(s[0]);this.listComponent?.highlightIndex(e)}else if(this.listComponent?.highlightIndex(-1),!h||l)this.listComponent?.ensureIndexVisible(0);else if(h){this.getAriaElement().removeAttribute("data-active-option");let e=this.listComponent?.getAriaElement();e&&(0,i.TTY)(e,null)}r&&"fuzzy"!==o&&this.listComponent?.highlightFilterMatch(this.searchString),this.displayOrHidePicker()}getSuggestionsAndFilteredValues(e,t){let s=[],a=[];if(!e.length)return{suggestions:s,filteredValues:a};let{searchType:n="fuzzy",filterList:r}=this.config;if("fuzzy"===n){let n=(0,i.CBg)({inputValue:e,allSuggestions:t,hideIrrelevant:!0,addSequentialWeight:!0});s=n.values;let o=n.indices;if(r&&o.length)for(let e=0;e<o.length;e++)a.push(this.values[o[e]])}else s=t.filter((e,t)=>
34{let s=e.toLocaleLowerCase(),i=this.searchString.toLocaleLowerCase(),o="match"===n?s.startsWith(i):-1!==s.indexOf(i);return r&&o&&a.push(this.values[t]),o});return{suggestions:s,filteredValues:a}}displayOrHidePicker(){if(!this.listComponent)return;let e=this.listComponent.getGui(),t=this.listComponent.getCurrentList(),s=!!t&&0===t.length;e.classList.toggle("ag-hidden",s)}clearSearchString(){this.searchString=""}setValue(e,t,s,i){if(this.value===e)return this;let a=Array.isArray(e);if(null!=e){if(!a){let t=this.listComponent?.getCurrentList();if(-1===(t?t.indexOf(e):-1))return this}s||this.listComponent?.selectValue(e)}return super.setValue(e,t),i||this.renderSelectedValue(),this}onNavigationKeyDown(e,t,s){e.preventDefault();let a=t===i.KeyCode.DOWN;if(!this.isPickerDisplayed&&a){this.showPicker();return}this.listComponent?.onNavigationKeyDown(t,s)}onEnterKeyDown(e){if(this.isPickerDisplayed&&(e.preventDefault(),this.listComponent?.getCurrentList())){let e=this.listComponent.getLastItemHovered();this.config.multiSelect||!e?this.dispatchPickerEventAndHidePicker(this.value,!0):this.onListValueSelected(new Set([e]),!0)}}onDeleteKeyDown(e){let{eWrapper:t,gos:s}=this;(0,i.HB1)(s)===t&&(e.preventDefault(),this.setValue([],!0))}onTabKeyDown(){let{config:e,isPickerDisplayed:t,listComponent:s}=this,{multiSelect:i}=e;if(t&&s){if(i){let e=this.getValueFromSet(s.getSelectedItems());e&&this.setValue(e,!1,!0,!0)}else this.setValue(s.getLastItemHovered(),!1,!0);this.hidePicker()}}getValueFromSet(e){let{multiSelect:t}=this.config,s=null;for(let i of e){if(1===e.size&&!t){s=i;break}s||(s=[]),s.push(i)}return Array.isArray(s)&&s.sort(),s}onListValueSelected(e,t){let s=this.getValueFromSet(e);this.setValue(s,!1,!0),this.config.multiSelect||this.dispatchPickerEventAndHidePicker(s,t)}dispatchPickerEventAndHidePicker(e,t){this.dispatchLocalEvent({type:"fieldPickerValueSelected",fromEnterKey:t,value:e}),this.hidePicker()}getFocusableElement(){let{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(e){let{key:t}=e,{isPickerDisplayed:s,config:a,listComponent:n,pickerComponent:r}=this,{allowTyping:o,multiSelect:l,suppressDeselectAll:h}=a;switch(t){case i.KeyCode.LEFT:case i.KeyCode.RIGHT:(!o||this.pillContainer)&&(e.preventDefault(),this.pillContainer&&(this.listComponent?.highlightIndex(-1),this.pillContainer.onNavigationKeyDown(e)));break;case i.KeyCode.PAGE_HOME:case i.KeyCode.PAGE_END:if(o){e.preventDefault();let s=this.eInput.getInputElement(),a=t===i.KeyCode.PAGE_HOME?0:s.value.length;s.setSelectionRange(a,a);break}case i.KeyCode.PAGE_UP:case i.KeyCode.PAGE_DOWN:e.preventDefault(),r&&n?.navigateToPage(t);break;case i.KeyCode.DOWN:case i.KeyCode.UP:this.onNavigationKeyDown(e,t,()=>{l&&(this.doWhileBlockingAnnouncement(()=>this.eWrapper.focus()),this.announceAriaValue(this.ariaToggleSelection))});break;case i.KeyCode.ESCAPE:s&&((0,i.Y4l)(this.listComponent.getGui())&&(e.preventDefault(),(0,i.yth)(e)),this.hidePicker());break;case i.KeyCode.ENTER:this.onEnterKeyDown(e);break;case i.KeyCode.SPACE:if(s&&l&&n){e.preventDefault();let t=n.getLastItemHovered();t&&n.toggleListItemSelection(t)}break;case i.KeyCode.TAB:this.onTabKeyDown();break;case i.KeyCode.DELETE:l&&!h&&this.onDeleteKeyDown(e);break;default:o||this.buildSearchStringFromKeyboardEvent(e)}}announceAriaValue(e){this.ariaAnnouncementService.announceValue(e,"richSelect")}destroy(){this.listComponent&&(this.listComponent=this.destroyBean(this.listComponent)),super.destroy()}},w=class extends i.wA2{constructor(e,t,s,a,n){super(),this.dragSourceDropTarget=e,this.ghost=t,this.horizontal=s,this.template=a,this.agComponents=n,this.eText=i.CUI,this.eDragHandle=i.CUI,this.eButton=i.CUI}wireBeans(e){this.dragAndDropService=e.dragAndDropService}postConstruct(){this.setTemplate(this.template??`
35            <span role="option">
36              <span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
37              <span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
38              <span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
39            </span>`,this.agComponents);let e=this.getGui();this.addElementClasses(e),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild((0,i.scM)("columnDrag",this.gos)),this.eButton.appendChild((0,i.scM)("cancel",this.gos)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}isDraggable(){return!0}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}setupAria(){let e=this.localeService.getLocaleTextFunc(),t=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(t,e),(0,i.xER)(this.getGui(),t.join(". "))}addAdditionalAriaInstructions(e,t){if(this.isRemovable()){let s=t("ariaDropZoneColumnComponentDescription","Press DELETE to remove");e.push(s)}}setupTooltip(){let e=()=>{let e=this.getTooltip();this.setTooltip({newTooltipText:e})};e(),this.addManagedEventListeners({newColumnsLoaded:e})}getDragSourceId(){}getDefaultIconName(){return"notAllowed"}addDragSource(){let{dragAndDropService:e,eDragHandle:t}=this,s=this.createGetDragItem(),i=this.getDefaultIconName(),a={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:t,getDefaultIconName:()=>i,getDragItem:s,dragItemName:this.getDisplayName()};e.addDragSource(a,!0),this.addDestroyFunc(()=>e.removeDragSource(a))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){(0,i.DIH)(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();let e={type:"columnRemove"};this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addManagedElementListeners(this.eButton,{click:t=>{this.dispatchLocalEvent(e),t.stopPropagation()}});let t=new i.rwP(this.eButton);this.addManagedListeners(t,{tap:()=>this.dispatchLocalEvent(e)}),this.addDestroyFunc(t.destroy.bind(t))}onKeyDown(e){e.key===i.KeyCode.DELETE&&this.isRemovable()&&(e.preventDefault(),this.dispatchLocalEvent({type:"columnRemove"}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){let e=this.getDisplayValue(),t=(0,i.BYN)(e);this.eText.innerHTML=t}addElementClasses(e,t){t=t?`-${t}`:"";let s=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop-cell${t}`,`ag-column-drop-${s}-cell${t}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}},D=class extends i.wA2{constructor(e){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=e,this.state="notDragging",this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),(0,i.Znd)(this.ePillDropList,"listbox")}wireBeans(e){this.focusService=e.focusService,this.dragAndDropService=e.dragAndDropService}isHorizontal(){return this.horizontal}toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0}),this.resizeEnabled=e}isSourceEventFromTarget(e){let{dropZoneTarget:t,dragSource:s}=e;return t.contains(s.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach(e=>e()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,(0,i.wvc)(this.getGui()),(0,i.wvc)(this.ePillDropList)}init(e){this.params=e??{},this.createManagedBean(new i.D_6(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.onKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new i.Gxm(this.getGui()),this.createManagedBean(this.positionableFeature),this.refreshGui(),(0,i.xER)(this.ePillDropList,this.getAriaLabel())}onTabKeyDown(e){let t=this.focusService.findFocusableElements(this.getFocusableElement(),null,!0),s=t.length;if(0===s)return;let{shiftKey:a}=e,n=(0,i.HB1)(this.gos),r=n===t[0],o=n===(0,i._O9)(t);1===s||r&&a||o&&!a||t[a?0:s-1].focus()}onKeyDown(e){let{key:t}=e,s=!this.horizontal,a=t===i.KeyCode.DOWN,n=t===i.KeyCode.UP;if(!s){let e=this.gos.get("enableRtl");a=!e&&t===i.KeyCode.RIGHT||e&&t===i.KeyCode.LEFT,n=!e&&t===i.KeyCode.LEFT||e&&t===i.KeyCode.RIGHT}if(!a&&!n)return;let r=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,n);r&&(e.preventDefault(),r.focus())}
39addElementClasses(e,t){t=t?`-${t}`:"";let s=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop${t}`,`ag-column-drop-${s}${t}`)}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),onDragCancel:this.onDragCancel.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(e){let t=this.getNewInsertIndex(e);if(t<0)return!1;let s=Math.max(this.minimumAllowedNewInsertIndex(),t),i=s!==this.insertIndex;return i&&(this.insertIndex=s),i}getNewInsertIndex(e){let t=e.event,s=this.horizontal?t.clientX:t.clientY,i=this.childPillComponents.map(e=>e.getGui().getBoundingClientRect()),a=i.findIndex(e=>this.horizontal?e.right>s&&e.left<s:e.top<s&&e.bottom>s);if(-1===a){let e=this.gos.get("enableRtl");return i.every(e=>s>(this.horizontal?e.right:e.bottom))?e&&this.horizontal?0:this.childPillComponents.length:i.every(e=>s<(this.horizontal?e.left:e.top))?e&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=a?a+1:a}checkDragStartedBySelf(e){"notDragging"===this.state&&(this.state="rearrangeItems",this.potentialDndItems=this.getItems(e.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(e),this.refreshGui())}onDragging(e){this.checkDragStartedBySelf(e),this.checkInsertIndex(e)&&this.refreshGui()}handleDragEnterEnd(e){}onDragEnter(e){let t=this.getItems(e.dragSource.getDragItem());this.state="newItemsIn";let s=t.filter(t=>this.isItemDroppable(t,e)),i=s.every(e=>-1!==this.childPillComponents.map(e=>e.getItem()).indexOf(e));if(0!==s.length){if(this.potentialDndItems=s,i){this.state="notDragging";return}this.handleDragEnterEnd(e),this.checkInsertIndex(e),this.refreshGui()}}isPotentialDndItems(){return(0,i.zwR)(this.potentialDndItems)}handleDragLeaveEnd(e){}onDragLeave(e){if("rearrangeItems"===this.state){let t=this.getItems(e.dragSource.getDragItem());this.removeItems(t)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(e),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}onDragCancel(e){this.isPotentialDndItems()&&("newItemsIn"===this.state&&this.handleDragLeaveEnd(e),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}onDragStop(){this.isPotentialDndItems()&&("newItemsIn"===this.state?this.addItems(this.potentialDndItems):this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}removeItems(e){let t=this.getExistingItems().filter(t=>!(0,i.W7Q)(e,t));this.updateItems(t)}addItems(e){if(!e)return;let t=this.getExistingItems().slice(),s=e.filter(e=>0>t.indexOf(e));(0,i.g02)(t,s,this.insertIndex),this.updateItems(t)}addItem(e){this.insertIndex=this.getExistingItems().length,this.addItems([e]),this.refreshGui()}rearrangeItems(e){let t=this.getNonGhostItems().slice();return(0,i.g02)(t,e,this.insertIndex),!(0,i.Vgs)(t,this.getExistingItems())&&(this.updateItems(t),!0)}refreshGui(){let e=this.ePillDropList.scrollTop,t=this.resizeEnabled,s=this.getFocusedItem(),i=this.focusService.findNextFocusableElement();i||(i=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=e),t&&this.toggleResizable(t),this.focusService.isKeyboardMode()&&this.restoreFocus(s,i)}getFocusedItem(){let e=this.getGui(),t=(0,i.HB1)(this.gos);return e.contains(t)?Array.from(e.querySelectorAll(".ag-column-drop-cell")).indexOf(t):-1}restoreFocus(e,t){let s=Array.from(this.getGui().querySelectorAll(".ag-column-drop-cell"));if(-1===e)return;0===s.length&&t.focus();let i=Math.min(s.length-1,e),a=s[i];a&&a.focus()}focusList(e){let t=e?this.childPillComponents.length-1:0;this.restoreFocus(t,this.getFocusableElement())}getNonGhostItems(){let e=this.getExistingItems();return this.isPotentialDndItems()?e.filter(e=>!(0,i.W7Q)(this.potentialDndItems,e)):e}addItemsToGui(){let e=this.getNonGhostItems().map(e=>this.createItemComponent(e,!1));if(this.isPotentialDndItems()){let t=this.potentialDndItems.map(e=>this.createItemComponent(e,!0));this.insertIndex>=e.length?e.push(...t):e.splice(this.insertIndex,0,...t)}this.appendChild(this.ePillDropList),e.forEach((e,t)=>{t>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(e.getGui())}),this.addAriaLabelsToComponents()}
39addAriaLabelsToComponents(){this.childPillComponents.forEach((e,t)=>{let s=e.getGui();(0,i.Qnv)(s,t+1),(0,i.VzM)(s,this.childPillComponents.length)})}createItemComponent(e,t){let s=this.createPillComponent(e,this.dropTarget,t,this.horizontal);return s.addEventListener("columnRemove",this.removeItems.bind(this,[e])),this.createBean(s),this.guiDestroyFunctions.push(()=>this.destroyBean(s)),t||this.childPillComponents.push(s),s}addIconAndTitleToGui(){let{title:e,icon:t}=this.params;if(!e||!t)return;let s=document.createElement("div");if((0,i.OMQ)(s,!0),this.addElementClasses(s,"title-bar"),this.addElementClasses(t,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),s.appendChild(t),!this.horizontal){let t=document.createElement("span");this.addElementClasses(t,"title"),t.innerHTML=e,s.appendChild(t)}this.appendChild(s)}isExistingItemsEmpty(){return 0===this.getExistingItems().length}addEmptyMessageToGui(){let{emptyMessage:e}=this.params;if(!e||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;let t=document.createElement("span");t.innerHTML=e,this.addElementClasses(t,"empty-message"),this.ePillDropList.appendChild(t)}addArrow(e){if(this.horizontal){let t=this.gos.get("enableRtl"),s=(0,i.scM)(t?"smallLeft":"smallRight",this.gos);this.addElementClasses(s,"cell-separator"),e.appendChild(s)}}},x=class e extends i.wA2{constructor(e){super(function(e){let t=e.cssIdentifier||"default";return`<div class="ag-panel ag-${t}-panel" tabindex="-1">
40        <div data-ref="eTitleBar" class="ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable">
41            <span data-ref="eTitle" class="ag-panel-title-bar-title ag-${t}-panel-title-bar-title"></span>
42            <div data-ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons"></div>
43        </div>
44        <div data-ref="eContentWrapper" class="ag-panel-content-wrapper ag-${t}-panel-content-wrapper"></div>
45    </div>`}(e)),this.config=e,this.closable=!0,this.eContentWrapper=i.CUI,this.eTitleBar=i.CUI,this.eTitleBarButtons=i.CUI,this.eTitle=i.CUI}postConstruct(){let{component:e,closable:t,hideTitleBar:s,title:a,minWidth:n=250,width:r,minHeight:o=250,height:l,centered:h,popup:d,x:u,y:c}=this.config;this.positionableFeature=new i.Gxm(this.getGui(),{minWidth:n,width:r,minHeight:o,height:l,centered:h,x:u,y:c,popup:d,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);let p=this.getGui();e&&this.setBodyComponent(e),s?(0,i.DIH)(this.eTitleBar,!1):(a&&this.setTitle(a),this.setClosable(null!=t?t:this.closable)),this.addManagedElementListeners(this.eTitleBar,{mousedown:e=>{if(p.contains(e.relatedTarget)||p.contains((0,i.HB1)(this.gos))||this.eTitleBarButtons.contains(e.target)){e.preventDefault();return}let t=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");t&&t.focus()}}),d&&this.positionableFeature.isPositioned()||(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){let e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(t){if(t!==this.closable&&(this.closable=t),t){let t=this.closeButtonComp=new i.wA2(e.CLOSE_BTN_TEMPLATE);this.createBean(t);let s=t.getGui(),a=(0,i.scM)("close",this.gos);a.classList.add("ag-panel-title-bar-button-icon"),s.appendChild(a),this.addTitleBarButton(t),t.addManagedElementListeners(s,{click:this.onBtClose.bind(this)})}else if(this.closeButtonComp){let e=this.closeButtonComp.getGui();e.parentElement.removeChild(e),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}addTitleBarButton(e,t){let s=this.eTitleBarButtons,i=s.children,a=i.length;null==t&&(t=a),t=Math.max(0,Math.min(t,a)),e.addCssClass("ag-panel-title-bar-button");let n=e.getGui();0===t?s.insertAdjacentElement("afterbegin",n):t===a?s.insertAdjacentElement("beforeend",n):i[t-1].insertAdjacentElement("afterend",n),e.setParentComponent(this)}getBodyHeight(){return(0,i.laX)(this.eContentWrapper)}getBodyWidth(){return(0,i.lJf)(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));let e=this.getGui();e&&(0,i.Y4l)(e)&&this.close(),super.destroy()}};x.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>';
45var E=x,S=class extends E{constructor(e){super({...e,popup:!0}),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}wireBeans(e){this.popupService=e.popupService,this.focusService=e.focusService}postConstruct(){let e=this.getGui(),{movable:t,resizable:s,maximizable:a,modal:n,postProcessPopupParams:r}=this.config;if(this.addCssClass("ag-dialog"),super.postConstruct(),r){let{type:t,eventSource:s,column:i,mouseEvent:a,rowNode:n}=r;this.popupService.callPostProcessPopup(t,e,s,a,i,n)}if(this.tabGuardFeature=this.createManagedBean(new i.D19(this)),this.tabGuardFeature.initialiseTabGuard({isFocusableContainer:!0,onFocusIn:()=>{this.popupService.bringPopupToFront(e)},onTabKeyDown:t=>{if(n)return;let s=t.shiftKey,i=this.focusService.findNextFocusableElement(e,!1,s);(!i||this.tabGuardFeature.getTabGuardCtrl().isTabGuard(i))&&this.focusService.focusNextGridCoreContainer(s)&&t.preventDefault()}}),t&&this.setMovable(t),a&&this.setMaximizable(a),s&&this.setResizable(s),!this.config.modal){let{focusService:e}=this;e.addFocusableContainer(this),this.addDestroyFunc(()=>e.removeFocusableContainer(this))}}setAllowFocus(e){this.tabGuardFeature.getTabGuardCtrl().setAllowFocus(e)}renderComponent(){let e=this.getGui(),{alwaysOnTop:t,modal:s,title:i,afterGuiAttached:a}=this.config,n=this.localeService.getLocaleTextFunc(),r=this.popupService.addPopup({modal:s,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:i||n("ariaLabelDialog","Dialog"),afterGuiAttached:a});r&&(this.close=r.hideFunc)}onClosed(e){this.destroy(),this.config.closedCallback?.(e)}toggleMaximize(){let e=this.positionableFeature.getPosition();if(this.isMaximized){let{x:e,y:t,width:s,height:i}=this.lastPosition;this.setWidth(s),this.setHeight(i),this.positionableFeature.offsetElement(e,t)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){(0,i.DIH)(this.maximizeIcon,!this.isMaximized),(0,i.DIH)(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}let t=this.eTitleBar;if(!t||e===this.isMaximizable)return;let s=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),s.addManagedElementListeners(s.getGui(),{click:this.toggleMaximize.bind(this)}),this.addTitleBarButton(s,0),this.maximizeListeners.push(...this.addManagedElementListeners(t,{dblclick:this.toggleMaximize.bind(this)})),[this.resizeListenerDestroy]=this.addManagedListeners(this.positionableFeature,{resize:()=>{this.isMaximized=!1,this.refreshMaximizeIcon()}})}buildMaximizeAndMinimizeElements(){let e=this.maximizeButtonComp=this.createBean(new i.wA2('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=(0,i.scM)("maximize",this.gos),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=(0,i.scM)("minimize",this.gos),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}},T=class extends i.BxR{constructor(e=0,t){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[],this.params=t??{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){let t=this.getParentComponent(),s=t&&t.getGui();s&&s.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case i.KeyCode.UP:case i.KeyCode.RIGHT:case i.KeyCode.DOWN:case i.KeyCode.LEFT:e.preventDefault(),this.handleNavKey(e.ke
45y);break;case i.KeyCode.ESCAPE:this.closeIfIsChild()&&(0,i.yth)(e)}}handleFocusIn(e){let t=e.relatedTarget;!this.tabGuardFeature.getTabGuardCtrl().isTabGuard(t)&&(this.getGui().contains(t)||this.activeMenuItem?.getSubMenuGui()?.contains(t))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){let t=e.relatedTarget;!(!this.activeMenuItem||this.getGui().contains(t)||this.activeMenuItem.getSubMenuGui()?.contains(t))&&(this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate())}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){null!=e&&i.j_S.all(e.map(e=>"separator"===e?i.j_S.resolve({eGui:this.createSeparator()}):"string"==typeof e?((0,i.Brh)(`unrecognised menu item ${e}`),i.j_S.resolve({eGui:null})):this.addItem(e))).then(e=>{(e??[]).forEach(e=>{e?.eGui&&(this.appendChild(e.eGui),e.comp&&this.menuItems.push(e.comp))})})}addItem(e){let t=this.createManagedBean(new A);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(e=>e.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListeners(t,{closeMenu:e=>{this.dispatchLocalEvent(e)},menuItemActivated:e=>{this.activeMenuItem&&this.activeMenuItem!==e.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=e.menuItem}}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){let e=this.menuItems.filter(e=>!e.isDisabled())[0];e&&e.activate()}createSeparator(){let e=`
46            <div class="ag-menu-separator" aria-hidden="true">
47                <div class="ag-menu-separator-part"></div>
48                <div class="ag-menu-separator-part"></div>
49                <div class="ag-menu-separator-part"></div>
50                <div class="ag-menu-separator-part"></div>
51            </div>`;return(0,i.awi)(e)}handleNavKey(e){switch(e){case i.KeyCode.UP:case i.KeyCode.DOWN:{let t=this.findNextItem(e===i.KeyCode.UP);t&&t!==this.activeMenuItem&&t.activate();return}}e===(this.gos.get("enableRtl")?i.KeyCode.RIGHT:i.KeyCode.LEFT)?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){let t=this.getParentComponent();return!!t&&t instanceof A&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0)}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){let t;let s=this.menuItems.filter(e=>!e.isDisabled());if(!s.length)return;if(!this.activeMenuItem)return e?(0,i._O9)(s):s[0];e&&s.reverse();let a=!1;for(let e=0;e<s.length;e++){let i=s[e];if(!a){i===this.activeMenuItem&&(a=!0);continue}t=i;break}return a&&!t?s[0]:t||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}},L=class extends i.BxR{constructor(e){super(),this.setTemplateFromElement(e.getGui(),void 0,void 0,!0)}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===i.KeyCode.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){let e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}},A=class extends i.AS9{constructor(){super(...arguments),this.ACTIVATION_DELAY=80,this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}wireBeans(e){this.popupService=e.popupService,this.userComponentFactory=e.userComponentFactory}init(e){let{menuItemDef:t,isAnotherSubMenuOpen:s,level:i,childComponent:a,contextParams:n}=e;return this.params=e.menuItemDef,this.level=i,this.isAnotherSubMenuOpen=s,this.childComponent=a,this.contextParams=n,this.cssClassPrefix=this.params.menuItemParams?.cssClassPrefix??"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,{...t,level:i,isAnotherSubMenuOpen:s,openSubMenu:e=>this.openSubMenu(e),closeSubMenu:()=>this.closeSubMenu(),closeMenu:e=>this.closeMenu(e),updateTooltip:(e,t)=>this.refreshTooltip(e,t),onItemActivated:()=>this.onItemActivated()}).newAgStackInstance().then(e=>{this.menuItemComp=e;let t=e.configureDefaults?.();t&&this.configureDefaults(!0===t?void 0:t)})}addListeners(e,t){t?.suppressClick||this.addManagedElementListeners(e,{click:e=>this.onItemSelected(e)}),t?.suppressKeyboardSelect||this.addManagedElementListeners(e,{keydown:e=>{(e.key===i.KeyCode.ENTER||e.key===i.KeyCode.SPACE)&&(e.preventDefault(),this.onItemSelected(e))}}),t?.suppressMouseDown||this.addManagedElementListeners(e,{mousedown:e=>{e.stopPropagation(),e.preventDefault()}}),t?.suppressMouseOver||this.addManagedElementListeners(e,{mouseenter:()=>this.onMouseEnter(),mouseleave:()=>this.onMouseLeave()})}isDisabled(){return!!this.params.disabled}openSubMenu(e=!1,t){let s;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;let a=(0,i.awi)('<div class="ag-menu" role="presentation"></div>');this.eSubMenuGui=a;let n=()=>{this.subMenuIsOpening=!1};if(this.childComponent){let e=this.createBean(new L(this.childComponent));e.setParentComponent(this);let t=e.getGui(),i="mouseenter",r=()=>this.cancelDeactivate();t.addEventListener(i,r),s=()=>t.removeEventListener(i,r),a.appendChild(t),this.childComponent.afterGuiAttached&&(n=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){let t=this.createBean(new T(this.level+1,this.contextParams));t.setParentComponent(this),t.addMenuItems(this.params.subMenu),a.appendChild(t.getGui()),this.addManagedListeners(t,{closeMenu:e=>this.dispatchLocalEvent(e)}),t.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),s=()=>this.destroyBean(t),e&&(n=()=>{t.activateFirstItem(),this.subMenuIsOpening=!1})}let{popupService:r}=this,o=this.localeService.getLocaleTextFunc(),l=r.addPopup({modal:!0,e
51Child:a,positionCallback:()=>{let e=this.eGui;r.positionPopupForMenu({eventSource:e,ePopup:a});let{column:s,node:i}=this.contextParams;r.callPostProcessPopup("subMenu",a,e,t instanceof MouseEvent?t:void 0,s,i)},anchorToElement:this.eGui,ariaLabel:o("ariaLabelSubMenu","SubMenu"),afterGuiAttached:n});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{l&&l.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),s(),this.menuItemComp.setExpanded?.(!1),this.eSubMenuGui=void 0},this.menuItemComp.setExpanded?.(!0)}setAriaExpanded(e){this.suppressAria||(0,i.mmg)(this.eGui,e)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(e){this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(e){this.parentComponent=e}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(e){this.menuItemComp.select?.(),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams({...this.contextParams}))):this.openSubMenu(e&&"keydown"===e.type,e),this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect||this.closeMenu(e)}closeMenu(e){let t={type:"closeMenu"};e&&(e instanceof MouseEvent?t.mouseEvent=e:t.keyboardEvent=e),this.dispatchLocalEvent(t)}onItemActivated(){this.dispatchLocalEvent({type:"menuItemActivated",menuItem:this})}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),this.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),this.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(e));return}let t=this.menuItemComp.getGui(),s=this.menuItemComp.getRootElement?.();s&&(e?.suppressRootStyles||t.classList.add("ag-menu-option-custom"),t=s),this.eGui=t,this.suppressRootStyles=!!e?.suppressRootStyles,!this.suppressRootStyles&&(t.classList.add(this.cssClassPrefix),this.params.cssClasses?.forEach(e=>t.classList.add(e)),this.params.disabled&&t.classList.add(`${this.cssClassPrefix}-disabled`)),e?.suppressTooltip||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!e?.suppressAria,!this.suppressAria&&((0,i.Znd)(t,"treeitem"),(0,i.icB)(t,this.level+1),this.params.disabled&&(0,i.Key)(t,!0)),e?.suppressTabIndex||t.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(t,e),this.suppressFocus=!!e?.suppressFocus}refreshTooltip(e,t){this.tooltip=e,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),e&&this.menuItemComp&&(this.tooltipFeature=this.createBean(new i.w4P({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t})))}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.menuItemComp?.destroy?.(),super.destroy()}},M="ag-list-item-hovered",G=class extends i.AS9{constructor(e,t,s){super(),this.comp=e,this.virtualList=t,this.params=s,this.currentDragValue=null,this.lastHoveredListItem=null}wireBeans(e){this.dragAndDropService=e.dragAndDropService}postConstruct(){this.addManagedListeners(this.params.eventSource,{[this.params.listItemDragStartEvent]:this.listItemDragStart.bind(this),[this.params.listItemDragEndEvent]:this.listItemDragEnd.bind(this)}),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){this.dragAndDropService.addDropTarget({isInterestedIn:e=>e===this.params.dragSourceType,getIconName:()=>this.moveBlocked?"pinned":"move",getContainer:()=>this.comp.getGui(),onDragging:e=>this.onDragging(e),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave(),onDragCancel:()=>this.onDragCancel()})}createAutoScrollService(){let e=this.virtualList.getGui();
51this.autoScrollService=new i.Cvn({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;let t=this.getListDragItem(e),s=this.virtualList.getComponentAt(t.rowIndex);if(!s)return;let a=s.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,(0,i.I1_)(a,M),(0,i.I1_)(a,`ag-item-highlight-${t.position}`))}getListDragItem(e){let t=this.virtualList.getGui(),s=parseFloat(window.getComputedStyle(t).paddingTop),i=this.virtualList.getRowHeight(),a=this.virtualList.getScrollTop(),n=Math.max(0,(e.y-s+a)/i),r=this.params.getNumRows(this.comp)-1,o=0|Math.min(r,n);return{rowIndex:o,position:Math.round(n)>n||n>r?"bottom":"top",component:this.virtualList.getComponentAt(o)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearDragProperties())}onDragCancel(){this.clearDragProperties()}onDragLeave(){this.clearDragProperties()}clearDragProperties(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${M}`).forEach(e=>{[M,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(t=>{e.classList.remove(t)})}),this.lastHoveredListItem=null}},R=class extends i.BxR{constructor(e){var t;super((t=e.cssClass,`<div class="ag-tabs ${t}">
52        <div data-ref="eHeader"></div>
53        <div data-ref="eBody" role="presentation" class="ag-tabs-body ${t?`${t}-body`:""}"></div>
54    </div>`)),this.eHeader=i.CUI,this.eBody=i.CUI,this.items=[],this.tabbedItemScrollMap=new Map,this.params=e}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(e=>this.addItem(e)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>this.activeItem?.tabbedItem?.afterDetachedCallback?.())}setupHeader(){let{enableCloseButton:e,cssClass:t}=this.params,s=(e,s)=>{e.classList.add(`ag-tabs-${s}`),t&&e.classList.add(`${t}-${s}`)};e?(this.setupCloseButton(s),this.eTabHeader=(0,i.rtB)(this.gos).createElement("div"),s(this.eHeader,"header-wrapper"),(0,i.Znd)(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,(0,i.Znd)(this.eTabHeader,"tablist"),s(this.eTabHeader,"header")}setupCloseButton(e){let t=(0,i.rtB)(this.gos),s=t.createElement("button");e(s,"close-button");let a=(0,i.scM)("close",this.gos,void 0,!0);(0,i.xER)(s,this.params.closeButtonAriaLabel),s.appendChild(a),this.addManagedElementListeners(s,{click:()=>this.params.onCloseClicked?.()});let n=t.createElement("div");e(n,"close-button-wrapper"),(0,i.Znd)(n,"presentation"),n.appendChild(s),this.eHeader.appendChild(n),this.eCloseButton=s}handleKeyDown(e){switch(e.key){case i.KeyCode.RIGHT:case i.KeyCode.LEFT:{if(!this.eTabHeader.contains((0,i.HB1)(this.gos)))return;let t=e.key===i.KeyCode.RIGHT,s=this.gos.get("enableRtl"),a=this.items.indexOf(this.activeItem),n=t!==s?Math.min(a+1,this.items.length-1):Math.max(a-1,0);if(a===n)return;e.preventDefault();let r=this.items[n];this.showItemWrapper(r),r.eHeaderButton.focus();break}case i.KeyCode.UP:case i.KeyCode.DOWN:e.stopPropagation()}}onTabKeyDown(e){if(e.defaultPrevented)return;let{focusService:t,eHeader:s,eBody:a,activeItem:n,params:r}=this,{suppressTrapFocus:o,enableCloseButton:l}=r,h=(0,i.HB1)(this.gos),d=e.target,u=e.shiftKey;if(s.contains(h)){e.preventDefault(),l&&u&&!this.eCloseButton?.contains(h)?this.eCloseButton?.focus():o&&u?this.focusService.findFocusableElementBeforeTabGuard(i.rtB(this.gos).body,d)?.focus():this.focusBody(e.shiftKey);return}let c=null;if(!t.isTargetUnderManagedComponent(a,d)||(u&&(c=this.focusService.findFocusableElementBeforeTabGuard(a,d)),c||o||(c=n.eHeaderButton)),!c&&a.contains(h)&&!(c=t.findNextFocusableElement(a,!1,u))){o&&!u?this.forceFocusOutOfContainer(u):l&&!u?(e.preventDefault(),this.eCloseButton?.focus()):(e.preventDefault(),this.focusHeader());return}c&&(e.preventDefault(),c.focus())}focusInnerElement(e){e?this.focusBody(!0):this.focusHeader()}focusHeader(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}focusBody(e){this.focusService.focusInto(this.eBody,e)}setAfterAttachedParams(e){this.afterAttachedParams=e}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(e){let t=document.createElement("span");(0,i.Znd)(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eTabHeader.appendChild(t),(0,i.xER)(t,e.titleLabel);let s={tabbedItem:e,eHeaderButton:t};this.items.push(s),t.addEventListener("click",this.showItemWrapper.bind(this,s))}showItem(e){let t=this.items.find(t=>t.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){let{tabbedItem:t,eHeaderButton:s}=e;if(this.params.onItemClicked?.({item:t}
54),this.activeItem===e){this.params.onActiveItemClicked?.();return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),(0,i.wvc)(this.eBody),t.bodyPromise.then(e=>{this.eBody.appendChild(e);let s=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,s),t.afterAttachedCallback&&t.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){let s=t.getScrollableContainer&&t.getScrollableContainer()||e;[this.lastScrollListener]=this.addManagedElementListeners(s,{scroll:()=>{this.tabbedItemScrollMap.set(t.name,s.scrollTop)}});let i=this.tabbedItemScrollMap.get(t.name);void 0!==i&&setTimeout(()=>{s.scrollTop=i},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),this.activeItem.tabbedItem.afterDetachedCallback?.()),s.classList.add("ag-tab-selected"),this.activeItem=e}},P=class extends i.AS9{wireBeans(e){this.expressionService=e.expressionService,this.valueService=e.valueService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.userComponentFactory=e.userComponentFactory,this.ctrlsService=e.ctrlsService,this.funcColsService=e.funcColsService}init(e,t,s,i,a,n,r){this.params=r,this.eGui=t,this.eCheckbox=s,this.eExpanded=i,this.eContracted=a,this.comp=e,this.compClass=n;let{node:o,colDef:l}=r,h=this.isTopLevelFooter();if(!(!h&&(this.isEmbeddedRowMismatch()||o.footer&&this.gos.get("groupHideOpenParents")&&(l&&l.showRowGroup)!==(o.rowGroupColumn&&o.rowGroupColumn.getColId())))){if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!h){let e=r.node.footer&&r.node.rowGroupIndex===this.funcColsService.getRowGroupColumns().findIndex(e=>e.getColId()===r.colDef?.showRowGroup),t="multipleColumns"!=this.gos.get("groupDisplayType")||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!r.node.footer&&(!r.node.group||null!=r.node.rowGroupIndex&&r.node.rowGroupIndex>this.funcColsService.getRowGroupColumns().findIndex(e=>e.getColId()===r.colDef?.showRowGroup)),s=!o.group&&(this.params.colDef?.field||this.params.colDef?.valueGetter),i=this.isExpandable(),a=this.columnModel.isPivotMode()&&o.leafGroup&&o.rowGroupColumn?.getColId()===r.column?.getColDef().showRowGroup;if(!this.showingValueForOpenedParent&&!i&&!s&&!t&&!e&&!a)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}}getCellAriaRole(){let e=this.params.colDef?.cellAriaRole,t=this.params.column?.getColDef().cellAriaRole;return e||t||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){let{node:e,eGridCell:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable()){(0,i.LRm)(t);return}let s=()=>{(0,i.mmg)(t,this.showingValueForOpenedParent||!!e.expanded)};[this.expandListener]=this.addManagedListeners(e,{expandedChanged:s})||null,s()}
54isTopLevelFooter(){if(!(0,i.dhi)(this.gos)||null!=this.params.value||-1!=this.params.node.level)return!1;let e=this.params.colDef;if(null==e||!0===e.showRowGroup)return!0;let t=this.funcColsService.getRowGroupColumns();return!t||0===t.length||t[0].getId()===e.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;let e="left"===this.params.pinned,t="right"===this.params.pinned,s=!e&&!t;return this.gos.get("enableRtl")?this.visibleColsService.isPinningLeft()?!t:!s:this.visibleColsService.isPinningLeft()?!e:!s}findDisplayedGroupNode(){let e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let s=t.parent;for(;null!=s;){if(s.rowGroupColumn&&e.isRowGroupDisplayed(s.rowGroupColumn.getId())){this.displayedGroupNode=s;break}s=s.parent}}(0,i.n92)(this.displayedGroupNode)&&(this.displayedGroupNode=t)}setupShowingValueForOpenedParent(){let e=this.params.node,t=this.params.column;if(!this.gos.get("groupHideOpenParents")||!e.groupData){this.showingValueForOpenedParent=!1;return}if(null!=e.rowGroupColumn){let s=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(s)){this.showingValueForOpenedParent=!1;return}}let s=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=s}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){let e=this.adjustParamsWithDetailsFromRelatedColumn(),t=this.getInnerCompDetails(e),{valueFormatted:s,value:i}=e,a=s;if(null==a){let e=this.displayedGroupNode.rowGroupColumn&&this.params.column?.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId());a=""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&e?this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):i??null}this.comp.setInnerRenderer(t,a)}adjustParamsWithDetailsFromRelatedColumn(){let e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e||null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;let s=this.params,{value:i,node:a}=this.params,n=this.valueService.formatValue(e,a,i);return{...s,valueFormatted:n}}addFooterValue(){let e=this.params.totalValueGetter;if(!e){let t=this.params.footerValueGetter;t&&(e=t,(0,i.Brh)("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let t="";if(e){let s=(0,i.n9G)(this.params);s.value=this.params.value,"function"==typeof e?t=e(s):"string"==typeof e?t=this.expressionService.evaluate(e,s):(0,i.Brh)("footerValueGetter should be either a function or a string (expression)")}else t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(null!=this.params.value?this.params.value:"");let s=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(s,t)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);let t=this.userComponentFactory.getInnerRendererDetails(e,e);if(t&&!(t&&t.componentClass==this.compClass))return t;let s=this.displayedGroupNode.rowGroupColumn,i=s?s.getColDef():void 0;if(!i)return;let a=this.userComponentFactory.getCellRendererDetails(i,e);return a&&!(a&&a.componentClass==this.compClass)?a:a&&a.componentClass==this.compClass&&i.cellRendererParams&&i.cellRendererParams.innerRenderer?this.userComponentFactory.getInnerRendererDetails(i.cellRendererParams,e):void 0}addChildCount(){this.params.suppressCount||(this.addManagedListeners(this.displayedGroupNode,{allChildrenCountChanged:this.updateChildCount.bind(this)}),this.updateChildCount())}updateChildCount(){let e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?`(${e})`:"";this.comp.setChildCount(t)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;let e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;let t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())}addExpandAndContract(){let e=this.params,t=(e,t)=>{let s=(0,i.scM)(e,this.gos,null);s&&(t.appendChild(s),this.addDestroyFunc(()=>t.removeChild(s)))};t("groupExpanded",this.eExpanded),t("groupContracted",this.eContracted);let s=e.eGridCell;!(this.params.column?.isCellEditable(e.node)&&this.gos.get("enableGroupEdit"))&&this.isExpandable()&&!e.suppressDoubleClickExpand&&this.addManagedListeners(s,{dblclick:this.onCellDblClicked.bind(this)}),this.addManagedListeners(this.eExpanded,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(this.eContracted,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(s,{keydown:this.onKeyDown.bind(this)}),this.addManagedListeners(e.node,{expandedChanged:this.showExpandAndContractIcons.bind(this)}),this.showExpandAndContractIcons();let a=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListeners(this.displayedGroupNode,{allChildrenCountChanged:a,masterChanged:a,groupChanged:a,hasChildrenChanged:a})}onExpandClicked(e){(0,i.p71)(e)||((0,i.yth)(e),this.onExpandOrContract(e))}onExpandOrContract(e){let t=this.displayedGroupNode,s=!t.expanded;!s&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(s,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature
54().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;let e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;let s=this.params.column;return null==s||"string"!=typeof s.getColDef().showRowGroup||this.isShowRowGroupForThisRow()}showExpandAndContractIcons(){let{params:e,displayedGroupNode:t,columnModel:s}=this,{node:i}=e,a=this.isExpandable();if(a){let e=!!this.showingValueForOpenedParent||i.expanded;this.comp.setExpandedDisplayed(e),this.comp.setContractedDisplayed(!e)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);let n=s.isPivotMode(),r=n&&t.leafGroup,o=a&&!r,l=i.footer&&-1===i.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",o),this.comp.addOrRemoveCssClass("ag-row-group",o),n?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",!!r):l||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!o)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){let e=this.params.node;this.params.suppressPadding||(this.addManagedListeners(e,{uiLevelChanged:this.setIndent.bind(this)}),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;let e=this.params,t=e.node,s=!!e.colDef,i=this.gos.get("treeData"),a=!s||i||!0===e.colDef.showRowGroup?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+a,this.comp.addOrRemoveCssClass(this.indentClass,!0),this.eGui.style.setProperty("--ag-indentation-level",String(a))}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;let e=new i.l1x(()=>this.params.value,this.params.node);this.createManagedBean(e),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){let e=this.params.checkbox;return"function"==typeof e||!0===e}addCheckboxIfNeeded(){let e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){let e=new i.BSb;this.createBean(e),e.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(e.getGui()),this.addDestroyFunc(()=>{this.eCheckbox.removeChild(e.getGui()),this.destroyBean(e)})}this.comp.setCheckboxVisible(t)}onKeyDown(e){e.key!==i.KeyCode.ENTER||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){!(0,i.p71)(e)&&((0,i.WU1)(this.eExpanded,e)||(0,i.WU1)(this.eContracted,e)||this.onExpandOrContract(e))}},F=`<span class="ag-cell-wrapper">
55        <span class="ag-group-expanded" data-ref="eExpanded"></span>
56        <span class="ag-group-contracted" data-ref="eContracted"></span>
57        <span class="ag-group-checkbox ag-invisible" data-ref="eCheckbox"></span>
58        <span class="ag-group-value" data-ref="eValue"></span>
59        <span class="ag-group-child-count" data-ref="eChildCount"></span>
60    </span>`,k=class extends i.wA2{constructor(){super(F),this.eExpanded=i.CUI,this.eContracted=i.CUI,this.eCheckbox=i.CUI,this.eValue=i.CUI,this.eChildCount=i.CUI}init(e){let t=this.createManagedBean(new P),s=!e.colDef,a=this.getGui();t.init({setInnerRenderer:(e,t)=>this.setRenderDetails(e,t),setChildCount:e=>this.eChildCount.textContent=e,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setContractedDisplayed:e=>(0,i.DIH)(this.eContracted,e),setExpandedDisplayed:e=>(0,i.DIH)(this.eExpanded,e),setCheckboxVisible:e=>this.eCheckbox.classList.toggle("ag-invisible",!e)},a,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),s&&(0,i.Znd)(a,t.getCellAriaRole())}setRenderDetails(e,t){if(e){let t=e.newAgStackInstance();null!=t&&t.then(e=>{if(!e)return;let t=()=>this.destroyBean(e);this.isAlive()?(this.eValue.appendChild(e.getGui()),this.addDestroyFunc(t)):t()})}else this.eValue.innerText=t}destroy(){this.destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}}}}]);

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