PageSourceSearch

https://codearenaeval.github.io/static/js/main.21514e5d.js

js codearenaeval.github.io collected 2026-10-03 08:48:53 UTC 2,879,419 bytes, 76 lines download raw bytes

vendor: 1,300 bytes, lines 1-2
1/*! For license information please see main.21514e5d.js.LICENSE.txt */
2(()=>{var e={803:(e,t,i)=>{"use strict";i.d(t,{A:()=>ne});var s=function(){function e(e){var t=this;this._insertTag=function(e){var i;i=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,i),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{i.insertRule(e,i.cssRules.length)}catch(s){}}else t.appendChild(document.createTextNode(e));this.ctr++}
vendor: 5,083 bytes, line 2
2,t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),n=Math.abs,r=String.fromCharCode,o=Object.assign;function a(e){return e.trim()}function l(e,t,i){return e.replace(t,i)}function h(e,t){return e.indexOf(t)}function c(e,t){return 0|e.charCodeAt(t)}function d(e,t,i){return e.slice(t,i)}function u(e){return e.length}function p(e){return e.length}function g(e,t){return t.push(e),e}var m=1,f=1,v=0,y=0,C=0,S="";function w(e,t,i,s,n,r,o){return{value:e,root:t,parent:i,type:s,props:n,children:r,line:m,column:f,length:o,return:""}}function b(e,t){return o(w("",null,null,"",null,null,0),e,{length:-e.length},t)}function x(){return C=y>0?c(S,--y):0,f--,10===C&&(f=1,m--),C}function M(){return C=y<v?c(S,y++):0,f++,10===C&&(f=1,m++),C}function D(){return c(S,y)}function I(){return y}function R(e,t){return d(S,e,t)}function E(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function A(e){return m=f=1,v=u(S=e),y=0,[]}function T(e){return S="",e}function P(e){return a(R(y-1,k(91===e?e+2:40===e?e+1:e)))}function L(e){for(;(C=D())&&C<33;)M();return E(e)>2||E(C)>3?"":" "}function F(e,t){for(;--t&&M()&&!(C<48||C>102||C>57&&C<65||C>70&&C<97););return R(e,I()+(t<6&&32==D()&&32==M()))}function k(e){for(;M();)switch(C){case e:return y;case 34:case 39:34!==e&&39!==e&&k(C);break;case 40:41===e&&k(e);break;case 92:M()}return y}function N(e,t){for(;M()&&e+C!==57&&(e+C!==84||47!==D()););return"/*"+R(t,y-1)+"*"+r(47===e?e:M())}function O(e){for(;!E(D());)M();return R(e,y)}var G="-ms-",B="-moz-",V="-webkit-",z="comm",H="rule",W="decl",j="@keyframes";function U(e,t){for(var i="",s=p(e),n=0;n<s;n++)i+=t(e[n],n,e,t)||"";return i}function _(e,t,i,s){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case W:return e.return=e.return||e.value;case z:return"";case j:return e.return=e.value+"{"+U(e.children,s)+"}";case H:e.value=e.props.join(",")}return u(i=U(e.children,s))?e.return=e.value+"{"+i+"}":""}function K(e){return T($("",null,null,null,[""],e=A(e),0,[0],e))}function $(e,t,i,s,n,o,a,d,p){for(var m=0,f=0,v=a,y=0,C=0,S=0,w=1,b=1,R=1,E=0,A="",T=n,k=o,G=s,B=A;b;)switch(S=E,E=M()){case 40:if(108!=S&&58==c(B,v-1)){-1!=h(B+=l(P(E),"&","&\f"),"&\f")&&(R=-1);break}case 34:case 39:case 91:B+=P(E);break;case 9:case 10:case 13:case 32:B+=L(S);break;case 92:B+=F(I()-1,7);continue;case 47:switch(D()){case 42:case 47:g(Z(N(M(),I()),t,i),p);break;default:B+="/"}break;case 123*w:d[m++]=u(B)*R;case 125*w:case 59:case 0:switch(E){case 0:case 125:b=0;case 59+f:-1==R&&(B=l(B,/\f/g,"")),C>0&&u(B)-v&&g(C>32?q(B+";",s,i,v-1):q(l(B," ","")+";",s,i,v-2),p);break;case 59:B+=";";default:if(g(G=Y(B,t,i,m,f,n,d,A,T=[],k=[],v),o),123===E)if(0===f)$(B,t,G,G,T,o,v,d,k);else switch(99===y&&110===c(B,3)?100:y){case 100:case 108:case 109:case 115:$(e,G,G,s&&g(Y(e,G,G,0,0,n,d,A,n,T=[],v),k),n,k,v,d,s?T:k);break;default:$(B,G,G,G,[""],k,0,d,k)}}m=f=C=0,w=R=1,A=B="",v=a;break;case 58:v=1+u(B),C=S;default:if(w<1)if(123==E)--w;else if(125==E&&0==w++&&125==x())continue;switch(B+=r(E),E*w){case 38:R=f>0?1:(B+="\f",-1);break;case 44:d[m++]=(u(B)-1)*R,R=1;break;case 64:45===D()&&(B+=P(M())),y=D(),f=v=u(A=B+=O(I())),E++;break;case 45:45===S&&2==u(B)&&(w=0)}}return o}function Y(e,t,i,s,r,o,h,c,u,g,m){for(var f=r-1,v=0===r?o:[""],y=p(v),C=0,S=0,b=0;C<s;++C)for(var x=0,M=d(e,f+1,f=n(S=h[C])),D=e;x<y;++x)(D=a(S>0?v[x]+" "+M:l(M,/&\f/g,v[x])))&&(u[b++]=D);return w(e,t,i,0===r?H:c,u,g,m)}function Z(e,t,i){return w(e,t,i,z,r(C),d(e,2,-2),0)}function q(e,t,i,s){return w(e,t,i,W,d(e,0,s),d(e,s+1,-1),s)}var Q=function(e,t,i){for(var s=0,n=0;s=n,n=D(),38===s&&12===n&&(t[i]=1),!E(n);)M();return R(e,y)},X=function(e,t){return T(function(e,t){var i=-1,s=44;do{switch(E(s)){case 0:38===s&&12===D()&&(t[i]=1),e[i]+=Q(y-1,t,i);break;case 2:e[i]+=P(s);break;case 4:if(44===s){e[++i]=58===D()?"&\f":"",t[i]=e[i].length;break}default:e[i]+=r(s)}}while(s=M());return e}(A(e),t))},J=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,i=e.parent,s=e.column===i.column&&e.line===i.line;"rule"!==i.type;)if(!(i=i.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(i))&&!s){J.set(e,!0);for(var n=[],r=X(t,n),o=i.props,a=0,l=0;a<r.length;a++)for(var h=0;h<o.length;h++,l++)e.props[l]=n[a]?r[a].replace(/&\f/g,o[h]):o[h]+" "+r[a]}}},te=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ie(e,t){switch(function(e,t){return 45^c(e,0)?(((t<<2^c(e,0))<<2^c(e,1))<<2^c(e,2))<<2^c(e,3):0}(e,t)){case 5103:return V+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return V+e+e;
vendor: 5,398 bytes, line 2
2case 5349:case 4246:case 4810:case 6968:case 2756:return V+e+B+e+G+e+e;case 6828:case 4268:return V+e+G+e+e;case 6165:return V+e+G+"flex-"+e+e;case 5187:return V+e+l(e,/(\w+).+(:[^]+)/,V+"box-$1$2"+G+"flex-$1$2")+e;case 5443:return V+e+G+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return V+e+G+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return V+e+G+l(e,"shrink","negative")+e;case 5292:return V+e+G+l(e,"basis","preferred-size")+e;case 6060:return V+"box-"+l(e,"-grow","")+V+e+G+l(e,"grow","positive")+e;case 4554:return V+l(e,/([^-])(transform)/g,"$1"+V+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,V+"$1"),/(image-set)/,V+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,V+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,V+"box-pack:$3"+G+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+V+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,V+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(u(e)-1-t>6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+V+"$2-$3$1"+B+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~h(e,"stretch")?ie(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,u(e)-3-(~h(e,"!important")&&10))){case 107:return l(e,":",":"+V)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+V+(45===c(e,14)?"inline-":"")+"box$3$1"+V+"$2$3$1"+G+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return V+e+G+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return V+e+G+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return V+e+G+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return V+e+G+e+e}return e}var se=[function(e,t,i,s){if(e.length>-1&&!e.return)switch(e.type){case W:e.return=ie(e.value,e.length);break;case j:return U([b(e,{value:l(e.value,"@","@"+V)})],s);case H:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return U([b(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],s);case"::placeholder":return U([b(e,{props:[l(t,/:(plac\w+)/,":"+V+"input-$1")]}),b(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),b(e,{props:[l(t,/:(plac\w+)/,G+"input-$1")]})],s)}return""}))}}],ne=function(e){var t=e.key;if("css"===t){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var n,r,o=e.stylisPlugins||se,a={},l=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),i=1;i<t.length;i++)a[t[i]]=!0;l.push(e)}));var h,c,d=[_,(c=function(e){h.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],u=function(e){var t=p(e);return function(i,s,n,r){for(var o="",a=0;a<t;a++)o+=e[a](i,s,n,r)||"";return o}}([ee,te].concat(o,d));r=function(e,t,i,s){h=i,U(K(e?e+"{"+t.styles+"}":t.styles),u),s&&(g.inserted[t.name]=!0)};var g={key:t,sheet:new s({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:r};return g.sheet.hydrate(l),g}},918:(e,t,i)=>{"use strict";function s(e){var t=Object.create(null);return function(i){return void 0===t[i]&&(t[i]=e(i)),t[i]}}i.d(t,{A:()=>s})},575:(e,t,i)=>{"use strict";i.d(t,{C:()=>o,T:()=>l,w:()=>a});var s=i(43),n=i(803),r=(i(217),i(436),s.createContext("undefined"!==typeof HTMLElement?(0,n.A)({key:"css"}):null)),o=r.Provider,a=function(e){return(0,s.forwardRef)((function(t,i){var n=(0,s.useContext)(r);return e(t,n,i)}))},l=s.createContext({})},290:(e,t,i)=>{"use strict";i.d(t,{AH:()=>h,i7:()=>c,mL:()=>l});var s=i(575),n=i(43),r=i(722),o=i(436),a=i(217),l=(i(803),i(219),(0,s.w)((function(e,t){var i=e.styles,l=(0,a.J)([i],void 0,n.useContext(s.T)),h=n.useRef();return(0,o.i)((function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,n=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==n&&(s=!0,n.setAttribute("data-emotion",e),i.hydrate([n])),h.current=[i,s],function(){i.flush()}}),[t]),(0,o.i)((function(){var e=h.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,r.sk)(t,l.next,!0),i.tags.length){var s=i.tags[i.tags.length-1].nextElementSibling;i.before=s,i.flush()}t.insert("",l,i,!1)}}),[t,l.name]),null})));function h(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return(0,a.J)(t)}var c=function(){var e=h.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},217:(e,t,i)=>{"use strict";i.d(t,{J:()=>f});var s={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGr
2idRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},n=i(918),r=!1,o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},h=function(e){return null!=e&&"boolean"!==typeof e},c=(0,n.A)((function(e){return l(e)?e:e.replace(o,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(a,(function(e,t,i){return g={name:t,styles:i,next:g},t}))}return 1===s[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},u="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function p(e,t,i){if(null==i)return"";var s=i;if(void 0!==s.__emotion_styles)return s;switch(typeof i){case"boolean":return"";case"object":var n=i;if(1===n.anim)return g={name:n.name,styles:n.styles,next:g},n.name;var o=i;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)g={name:a.name,styles:a.styles,next:g},a=a.next;return o.styles+";"}return function(e,t,i){var s="";if(Array.isArray(i))for(var n=0;n<i.length;n++)s+=p(e,t,i[n])+";";else for(var o in i){var a=i[o];if("object"!==typeof a){var l=a;null!=t&&void 0!==t[l]?s+=o+"{"+t[l]+"}":h(l)&&(s+=c(o)+":"+d(o,l)+";")}else{if("NO_COMPONENT_SELECTOR"===o&&r)throw new Error(u);if(!Array.isArray(a)||"string"!==typeof a[0]||null!=t&&void 0!==t[a[0]]){var g=p(e,t,a);switch(o){case"animation":case"animationName":s+=c(o)+":"+g+";";break;default:s+=o+"{"+g+"}"}}else for(var m=0;m<a.length;m++)h(a[m])&&(s+=c(o)+":"+d(o,a[m])+";")}}return s}(e,t,i);case"function":if(void 0!==e){var l=g,m=i(e);return g=l,p(e,t,m)}}var f=i;if(null==t)return f;var v=t[f];return void 0!==v?v:f}var g,m=/label:\s*([^\s;{]+)\s*(;|$)/g;function f(e,t,i){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var s=!0,n="";g=void 0;var r=e[0];null==r||void 0===r.raw?(s=!1,n+=p(i,t,r)):n+=r[0];for(var o=1;o<e.length;o++){if(n+=p(i,t,e[o]),s)n+=r[o]}m.lastIndex=0;for(var a,l="";null!==(a=m.exec(n));)l+="-"+a[1];var h=function(e){for(var t,i=0,s=0,n=e.length;n>=4;++s,n-=4)t=1540483477*(65535&(t=255&e.charCodeAt(s)|(255&e.charCodeAt(++s))<<8|(255&e.charCodeAt(++s))<<16|(255&e.charCodeAt(++s))<<24))+(59797*(t>>>16)<<16),i=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&i)+(59797*(i>>>16)<<16);switch(n){case 3:i^=(255&e.charCodeAt(s+2))<<16;case 2:i^=(255&e.charCodeAt(s+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(s)))+(59797*(i>>>16)<<16)}return(((i=1540483477*(65535&(i^=i>>>13))+(59797*(i>>>16)<<16))^i>>>15)>>>0).toString(36)}(n)+l;return{name:h,styles:n,next:g}}},436:(e,t,i)=>{"use strict";var s;i.d(t,{i:()=>a,s:()=>o});var n=i(43),r=!!(s||(s=i.t(n,2))).useInsertionEffect&&(s||(s=i.t(n,2))).useInsertionEffect,o=r||function(e){return e()},a=r||n.useLayoutEffect},722:(e,t,i)=>{"use strict";i.d(t,{Rk:()=>s,SF:()=>n,sk:()=>r});function s(e,t,i){var s="";return i.split(" ").forEach((function(i){void 0!==e[i]?t.push(e[i]+";"):i&&(s+=i+" ")})),s}var n=function(e,t,i){var s=e.key+"-"+t.name;!1===i&&void 0===e.registered[s]&&(e.registered[s]=t.styles)},r=function(e,t,i){n(e,t,i);var s=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+s:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}},713:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GlobalStyles:()=>x,StyledEngineProvider:()=>b,ThemeContext:()=>l.T,css:()=>y.AH,default:()=>M,internal_processStyles:()=>D,keyframes:()=>y.i7});var s=i(168),n=i(43),r=i(918),o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInl
2ine|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,a=(0,r.A)((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=i(575),h=i(722),c=i(217),d=i(436),u=a,p=function(e){return"theme"!==e},g=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?u:p},m=function(e,t,i){var s;if(t){var n=t.shouldForwardProp;s=e.__emotion_forwardProp&&n?function(t){return e.__emotion_forwardProp(t)&&n(t)}:n}return"function"!==typeof s&&i&&(s=e.__emotion_forwardProp),s},f=function(e){var t=e.cache,i=e.serialized,s=e.isStringTag;return(0,h.SF)(t,i,s),(0,d.s)((function(){return(0,h.sk)(t,i,s)})),null},v=function e(t,i){var r,o,a=t.__emotion_real===t,d=a&&t.__emotion_base||t;void 0!==i&&(r=i.label,o=i.target);var u=m(t,i,a),p=u||g(d),v=!p("as");return function(){var y=arguments,C=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&C.push("label:"+r+";"),null==y[0]||void 0===y[0].raw)C.push.apply(C,y);else{C.push(y[0][0]);for(var S=y.length,w=1;w<S;w++)C.push(y[w],y[0][w])}var b=(0,l.w)((function(e,t,i){var s=v&&e.as||d,r="",a=[],m=e;if(null==e.theme){for(var y in m={},e)m[y]=e[y];m.theme=n.useContext(l.T)}"string"===typeof e.className?r=(0,h.Rk)(t.registered,a,e.className):null!=e.className&&(r=e.className+" ");var S=(0,c.J)(C.concat(a),t.registered,m);r+=t.key+"-"+S.name,void 0!==o&&(r+=" "+o);var w=v&&void 0===u?g(s):p,b={};for(var x in e)v&&"as"===x||w(x)&&(b[x]=e[x]);return b.className=r,i&&(b.ref=i),n.createElement(n.Fragment,null,n.createElement(f,{cache:t,serialized:S,isStringTag:"string"===typeof s}),n.createElement(s,b))}));return b.displayName=void 0!==r?r:"Styled("+("string"===typeof d?d:d.displayName||d.name||"Component")+")",b.defaultProps=t.defaultProps,b.__emotion_real=b,b.__emotion_base=d,b.__emotion_styles=C,b.__emotion_forwardProp=u,Object.defineProperty(b,"toString",{value:function(){return"."+o}}),b.withComponent=function(t,n){return e(t,(0,s.A)({},i,n,{shouldForwardProp:m(b,n,!0)})).apply(void 0,C)},b}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){v[e]=v(e)}));var y=i(290),C=i(803),S=i(579);let w;function b(e){const{injectFirst:t,children:i}=e;return t&&w?(0,S.jsx)(l.C,{value:w,children:i}):i}function x(e){const{styles:t,defaultTheme:i={}}=e,s="function"===typeof t?e=>{return t(void 0===(s=e)||null===s||0===Object.keys(s).length?i:e);var s}:t;return(0,S.jsx)(y.mL,{styles:s})}function M(e,t){return v(e,t)}
2"object"===typeof document&&(w=(0,C.A)({key:"css",prepend:!0}));const D=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},266:(e,t,i)=>{"use strict";var s=i(994);t.X4=p,t.e$=g,t.eM=function(e,t){const i=u(e),s=u(t);return(Math.max(i,s)+.05)/(Math.min(i,s)+.05)},t.a=m;var n=s(i(457)),r=s(i(214));function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,r.default)(e,t,i)}function a(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let i=e.match(t);return i&&1===i[0].length&&(i=i.map((e=>e+e))),i?`rgb${4===i.length?"a":""}(${i.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(a(e));const t=e.indexOf("("),i=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(i))throw new Error((0,n.default)(9,e));let s,r=e.substring(t+1,e.length-1);if("color"===i){if(r=r.split(" "),s=r.shift(),4===r.length&&"/"===r[3].charAt(0)&&(r[3]=r[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(s))throw new Error((0,n.default)(10,s))}else r=r.split(",");return r=r.map((e=>parseFloat(e))),{type:i,values:r,colorSpace:s}}const h=e=>{const t=l(e);return t.values.slice(0,3).map(((e,i)=>-1!==t.type.indexOf("hsl")&&0!==i?`${e}%`:e)).join(" ")};function c(e){const{type:t,colorSpace:i}=e;let{values:s}=e;return-1!==t.indexOf("rgb")?s=s.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(s[1]=`${s[1]}%`,s[2]=`${s[2]}%`),s=-1!==t.indexOf("color")?`${i} ${s.join(" ")}`:`${s.join(", ")}`,`${t}(${s})`}function d(e){e=l(e);const{values:t}=e,i=t[0],s=t[1]/100,n=t[2]/100,r=s*Math.min(n,1-n),o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+i/30)%12;return n-r*Math.max(Math.min(t-3,9-t,1),-1)};let a="rgb";const h=[Math.round(255*o(0)),Math.round(255*o(8)),Math.round(255*o(4))];return"hsla"===e.type&&(a+="a",h.push(t[3])),c({type:a,values:h})}function u(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(d(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function p(e,t){return e=l(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,c(e)}function g(e,t){if(e=l(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let i=0;i<3;i+=1)e.values[i]*=1-t;return c(e)}function m(e,t){if(e=l(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let i=0;i<3;i+=1)e.values[i]+=(255-e.values[i])*t;else if(-1!==e.type.indexOf("color"))for(let i=0;i<3;i+=1)e.values[i]+=(1-e.values[i])*t;return c(e)}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return u(e)>.5?g(e,t):m(e,t)}},52:(e,t,i)=>{"use strict";var s=i(994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:i=m,rootShouldForwardProp:s=g,slotShouldForwardProp:l=g}=e,c=e=>(0,h.default)((0,n.default)({},e,{theme:v((0,n.default)({},e,{defaultTheme:i,themeId:t}))}));return c.__mui_systemSx=!0,function(e){let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:p,skipVariantsResolver:m,skipSx:S,overridesResolver:w=y(f(p))}=h,b=(0,r.default)(h,u),x=void 0!==m?m:p&&"Root"!==p&&"root"!==p||!1,M=S||!1;let D=g;"Root"===p||"root"===p?D=s:p?D=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(D=void 0);const I=(0,o.default)(e,(0,n.default)({shouldForwardProp:D,label:undefined},b)),R=e=>"function"===typeof e&&e.__emotion_real!==e||(0,a.isPlainObject)(e)?s=>C(e,(0,n.default)({},s,{theme:v({theme:s.theme,defaultTheme:i,themeId:t})})):e,E=function(s){let r=R(s);for(var o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];const h=a?a.map(R):[];d&&w&&h.push((e=>{const s=v((0,n.default)({},e,{defaultTheme:i,themeId:t}));if(!s.components||!s.components[d]||!s.components[d].styleOverrides)return null;const r=s.components[d].styleOverrides,o={};return Object.entries(r).forEach((t=>{let[i,r]=t;o[i]=C(r,(0,n.default)({},e,{theme:s}))})),w(e,o)})),d&&!x&&h.push((e=>{var s;const r=v((0,n.default)({},e,{defaultTheme:i,themeId:t}));return C({variants:null==r||null==(s=r.components)||null==(s=s[d])?void 0:s.variants},(0,n.default)({},e,{theme:r}))})),M||h.push(c);const u=h.length-a.length;if(Array.isArray(s)&&u>0){const e=new Array(u).fill("");r=[...s,...e],r.raw=[...s.raw,...e]}const p=I(r,...h);return e.muiName&&(p.muiName=e.muiName),p};return I.withConfig&&(E.withConfig=I.withConfig),E}};
2var n=s(i(634)),r=s(i(893)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=p(t);if(i&&i.has(e))return i.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var o=n?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(s,r,o):s[r]=e[r]}return s.default=e,i&&i.set(e,s),s}(i(713)),a=i(482),l=(s(i(537)),s(i(382)),s(i(989))),h=s(i(996));const c=["ownerState"],d=["variants"],u=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(p=function(e){return e?i:t})(e)}function g(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const m=(0,l.default)(),f=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function v(e){let{defaultTheme:t,theme:i,themeId:s}=e;return n=i,0===Object.keys(n).length?t:i[s]||i;var n}function y(e){return e?(t,i)=>i[e]:null}function C(e,t){let{ownerState:i}=t,s=(0,r.default)(t,c);const o="function"===typeof e?e((0,n.default)({ownerState:i},s)):e;if(Array.isArray(o))return o.flatMap((e=>C(e,(0,n.default)({ownerState:i},s))));if(o&&"object"===typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,r.default)(o,d);return e.forEach((e=>{let r=!0;"function"===typeof e.props?r=e.props((0,n.default)({ownerState:i},s,i)):Object.keys(e.props).forEach((t=>{(null==i?void 0:i[t])!==e.props[t]&&s[t]!==e.props[t]&&(r=!1)})),r&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,n.default)({ownerState:i},s,i)):e.style))})),t}return o}},751:(e,t,i)=>{"use strict";i.d(t,{EU:()=>a,NI:()=>o,iZ:()=>h,kW:()=>c,vf:()=>l,zu:()=>n});var s=i(172);const n={xs:0,sm:600,md:900,lg:1200,xl:1536},r={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${n[e]}px)`};function o(e,t,i){const s=e.theme||{};if(Array.isArray(t)){const e=s.breakpoints||r;return t.reduce(((s,n,r)=>(s[e.up(e.keys[r])]=i(t[r]),s)),{})}if("object"===typeof t){const e=s.breakpoints||r;return Object.keys(t).reduce(((s,r)=>{if(-1!==Object.keys(e.values||n).indexOf(r)){s[e.up(r)]=i(t[r],r)}else{const e=r;s[e]=t[e]}return s}),{})}return i(t)}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,i)=>(t[e.up(i)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e}),t)}function h(e){const t=a(e);for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];const o=[t,...n].reduce(((e,t)=>(0,s.A)(e,t)),{});return l(Object.keys(t),o)}function c(e){let{values:t,breakpoints:i,base:s}=e;const n=s||function(e,t){if("object"!==typeof e)return{};const i={},s=Object.keys(t);return Array.isArray(e)?s.forEach(((t,s)=>{s<e.length&&(i[t]=!0)})):s.forEach((t=>{null!=e[t]&&(i[t]=!0)})),i}(t,i),r=Object.keys(n);if(0===r.length)return t;let o;return r.reduce(((e,i,s)=>(Array.isArray(t)?(e[i]=null!=t[s]?t[s]:t[o],o=s):"object"===typeof t?(e[i]=null!=t[i]?t[i]:t[o],o=i):e[i]=t,e)),{})}},703:(e,t,i)=>{"use strict";function s(e,t){const i=this;if(i.vars&&"function"===typeof i.getColorSchemeSelector){const s=i.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[s]:t}}return i.palette.mode===e?t:{}}i.d(t,{A:()=>s})},615:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var s=i(587),n=i(168);const r=["values","unit","step"],o=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,n.A)({},e,{[t.key]:t.val})),{})};function a(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:a=5}=e,l=(0,s.A)(e,r),h=o(t),c=Object.keys(h);function d(e){return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${i})`}function u(e){return`@media (max-width:${("number"===typeof t[e]?t[e]:e)-a/100}${i})`}function p(e,s){const n=c.indexOf(s);return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==n&&"number"===typeof t[c[n]]?t[c[n]]:s)-a/100}${i})`}return(0,n.A)({keys:c,values:h,up:d,down:u,between:p,only:function(e){return c.indexOf(e)+1<c.length?p(e,c[c.indexOf(e)+1]):d(e)},not:function(e){const t=c.indexOf(e);return 0===t?d(c[1]):t===c.length-1?u(c[t]):p(e,c[c.indexOf(e)+1]).replace("@media","@media not all and")},unit:i},l)}},280:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var s=i(168),n=i(587),r=i(172),o=i(615);const a={borderRadius:4};var l=i(604);var h=i(812),c=i(758),d=i(703);const u=["breakpoints","palette","spacing","shape"];const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:i={},spacing:p,shape:g={}}=e,m=(0,n.A)(e,u),f=(0,o.A)(t),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),i=function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return(0===i.length?[1]:i).map((e=>{const i=t(e);return"number"===typeof i?`${i}px`:i})).join(" ")};return i.mui=!0,i}(p);let y=(0,r.A)({breakpoints:f,direction:"ltr",components:{},palette:(0,s.A)({mode:"light"},i),spacing:v,shape:(0,s.A)({},a,g)},m);y.applyStyles=d.A;for(var C=arguments.length,S=new Array(C>1?C-1:0),w=1;w<C;w++)S[w-1]=arguments[w];return y=S.reduce(((e,t)=>(0,r.A)(e,t)),y),y.unstable_sxConfig=(0,s.A)({},c.A,null==m?void 0:m.unstable_sxConfig),y.unstable_sx=function(e){return(0,h.A)({sx:e,theme:this})},y}},989:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s.A,private_createBreakpoints:()=>n.A,unstable_applyStyles:()=>r.A});var s=i(280),n=i(615),r=i(703)},815:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var s=i(172);const n=function(e,t){return t?(0,s.A)(e,t,{clone:!1}):e}},604:(e,t,i)=>{"use strict";i.d(t,{LX:()=>g,MA:()=>p,_W:()=>m,Lc:()=>y,Ms:()=>C});var s=i(751),n=i(162),r=i(815);const o={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},h=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,i]=e.split(""),s=o[t],n=a[i]||"";return Array.isArray(n)?n.map((e=>s+e)):[s+n]}
2)),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],u=[...c,...d];function p(e,t,i,s){var r;const o=null!=(r=(0,n.Yn)(e,t,!1))?r:i;return"number"===typeof o?e=>"string"===typeof e?e:o*e:Array.isArray(o)?e=>"string"===typeof e?e:o[e]:"function"===typeof o?o:()=>{}}function g(e){return p(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;const i=e(Math.abs(t));return t>=0?i:"number"===typeof i?-i:`-${i}`}function f(e,t,i,n){if(-1===t.indexOf(i))return null;const r=function(e,t){return i=>e.reduce(((e,s)=>(e[s]=m(t,i),e)),{})}(h(i),n),o=e[i];return(0,s.NI)(e,o,r)}function v(e,t){const i=g(e.theme);return Object.keys(e).map((s=>f(e,t,s,i))).reduce(r.A,{})}function y(e){return v(e,c)}function C(e){return v(e,d)}function S(e){return v(e,u)}y.propTypes={},y.filterProps=c,C.propTypes={},C.filterProps=d,S.propTypes={},S.filterProps=u},162:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>a,BO:()=>o,Yn:()=>r});var s=i(598),n=i(751);function r(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=i)return i}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function o(e,t,i){let s,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;return s="function"===typeof e?e(i):Array.isArray(e)?e[i]||n:r(e,i)||n,t&&(s=t(s,n,e)),s}const a=function(e){const{prop:t,cssProperty:i=e.prop,themeKey:a,transform:l}=e,h=e=>{if(null==e[t])return null;const h=e[t],c=r(e.theme,a)||{};return(0,n.NI)(e,h,(e=>{let n=o(c,l,e);return e===n&&"string"===typeof e&&(n=o(c,l,`${t}${"default"===e?"":(0,s.A)(e)}`,e)),!1===i?n:{[i]:n}}))};return h.propTypes={},h.filterProps=[t],h}},758:(e,t,i)=>{"use strict";i.d(t,{A:()=>k});var s=i(604),n=i(162),r=i(815);const o=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const s=t.reduce(((e,t)=>(t.filterProps.forEach((i=>{e[i]=t})),e)),{}),n=e=>Object.keys(e).reduce(((t,i)=>s[i]?(0,r.A)(t,s[i](e)):t),{});return n.propTypes={},n.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),n};var a=i(751);function l(e){return"number"!==typeof e?e:`${e}px solid`}function h(e,t){return(0,n.Ay)({prop:e,themeKey:"borders",transform:t})}const c=h("border",l),d=h("borderTop",l),u=h("borderRight",l),p=h("borderBottom",l),g=h("borderLeft",l),m=h("borderColor"),f=h("borderTopColor"),v=h("borderRightColor"),y=h("borderBottomColor"),C=h("borderLeftColor"),S=h("outline",l),w=h("outlineColor"),b=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,s.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:(0,s._W)(t,e)});return(0,a.NI)(e,e.borderRadius,i)}return null};b.propTypes={},b.filterProps=["borderRadius"];o(c,d,u,p,g,m,f,v,y,C,b,S,w);const x=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,s.MA)(e.theme,"spacing",8,"gap"),i=e=>({gap:(0,s._W)(t,e)});return(0,a.NI)(e,e.gap,i)}return null};x.propTypes={},x.filterProps=["gap"];const M=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,s.MA)(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:(0,s._W)(t,e)});return(0,a.NI)(e,e.columnGap,i)}return null};M.propTypes={},M.filterProps=["columnGap"];const D=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,s.MA)(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:(0,s._W)(t,e)});return(0,a.NI)(e,e.rowGap,i)}return null};D.propTypes={},D.filterProps=["rowGap"];o(x,M,D,(0,n.Ay)({prop:"gridColumn"}),(0,n.Ay)({prop:"gridRow"}),(0,n.Ay)({prop:"gridAutoFlow"}),(0,n.Ay)({prop:"gridAutoColumns"}),(0,n.Ay)({prop:"gridAutoRows"}),(0,n.Ay)({prop:"gridTemplateColumns"}),(0,n.Ay)({prop:"gridTemplateRows"}),(0,n.Ay)({prop:"gridTemplateAreas"}),(0,n.Ay)({prop:"gridArea"}));function I(e,t){return"grey"===t?t:e}o((0,n.Ay)({prop:"color",themeKey:"palette",transform:I}),(0,n.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:I}),(0,n.Ay)({prop:"backgroundColor",themeKey:"palette",transform:I}));function R(e){return e<=1&&0!==e?100*e+"%":e}const E=(0,n.Ay)({prop:"width",transform:R}),A=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var i,s;const n=(null==(i=e.theme)||null==(i=i.breakpoints)||null==(i=i.values)?void 0:i[t])||a.zu[t];return n?"px"!==(null==(s=e.theme)||null==(s=s.breakpoints)?void 0:s.unit)?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:R(t)}};return(0,a.NI)(e,e.maxWidth,t)}return null};A.filterProps=["maxWidth"];const T=(0,n.Ay)({prop:"minWidth",transform:R}),P=(0,n.Ay)({prop:"height",transform:R}),L=(0,n.Ay)({prop:"maxHeight",transform:R}),F=(0,n.Ay)({prop:"minHeight",transform:R}),k=((0,n.Ay)({prop:"size",cssProperty:"width",transform:R}),(0,n.Ay)({prop:"size",cssProperty:"height",transform:R}),o(E,A,T,P,L,F,(0,n.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:b},color:{themeKey:"palette",transform:I},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:I},backgroundColor:{themeKey:"palette",transform:I},p:{style:s.Ms},pt:{style:s.Ms},pr:{style:s.Ms},pb:{style:s.Ms}
2,pl:{style:s.Ms},px:{style:s.Ms},py:{style:s.Ms},padding:{style:s.Ms},paddingTop:{style:s.Ms},paddingRight:{style:s.Ms},paddingBottom:{style:s.Ms},paddingLeft:{style:s.Ms},paddingX:{style:s.Ms},paddingY:{style:s.Ms},paddingInline:{style:s.Ms},paddingInlineStart:{style:s.Ms},paddingInlineEnd:{style:s.Ms},paddingBlock:{style:s.Ms},paddingBlockStart:{style:s.Ms},paddingBlockEnd:{style:s.Ms},m:{style:s.Lc},mt:{style:s.Lc},mr:{style:s.Lc},mb:{style:s.Lc},ml:{style:s.Lc},mx:{style:s.Lc},my:{style:s.Lc},margin:{style:s.Lc},marginTop:{style:s.Lc},marginRight:{style:s.Lc},marginBottom:{style:s.Lc},marginLeft:{style:s.Lc},marginX:{style:s.Lc},marginY:{style:s.Lc},marginInline:{style:s.Lc},marginInlineStart:{style:s.Lc},marginInlineEnd:{style:s.Lc},marginBlock:{style:s.Lc},marginBlockStart:{style:s.Lc},marginBlockEnd:{style:s.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:x},rowGap:{style:D},columnGap:{style:M},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:R},maxWidth:{style:A},minWidth:{transform:R},height:{transform:R},maxHeight:{transform:R},minHeight:{transform:R},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},698:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var s=i(168),n=i(587),r=i(172),o=i(758);const a=["sx"],l=e=>{var t,i;const s={systemProps:{},otherProps:{}},n=null!=(t=null==e||null==(i=e.theme)?void 0:i.unstable_sxConfig)?t:o.A;return Object.keys(e).forEach((t=>{n[t]?s.systemProps[t]=e[t]:s.otherProps[t]=e[t]})),s};function h(e){const{sx:t}=e,i=(0,n.A)(e,a),{systemProps:o,otherProps:h}=l(i);let c;return c=Array.isArray(t)?[o,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,r.Q)(e)?(0,s.A)({},o,e):o}:(0,s.A)({},o,t),(0,s.A)({},h,{sx:c})}},996:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s.A,extendSxProp:()=>n.A,unstable_createStyleFunctionSx:()=>s.k,unstable_defaultSxConfig:()=>r.A});var s=i(812),n=i(698),r=i(758)},812:(e,t,i)=>{"use strict";i.d(t,{A:()=>c,k:()=>l});var s=i(598),n=i(815),r=i(162),o=i(751),a=i(758);function l(){function e(e,t,i,n){const a={[e]:t,theme:i},l=n[e];if(!l)return{[e]:t};const{cssProperty:h=e,themeKey:c,transform:d,style:u}=l;if(null==t)return null;if("typography"===c&&"inherit"===t)return{[e]:t};const p=(0,r.Yn)(i,c)||{};if(u)return u(a);return(0,o.NI)(a,t,(t=>{let i=(0,r.BO)(p,d,t);return t===i&&"string"===typeof t&&(i=(0,r.BO)(p,d,`${e}${"default"===t?"":(0,s.A)(t)}`,t)),!1===h?i:{[h]:i}}))}return function t(i){var s;const{sx:r,theme:l={}}=i||{};if(!r)return null;const h=null!=(s=l.unstable_sxConfig)?s:a.A;function c(i){let s=i;if("function"===typeof i)s=i(l);else if("object"!==typeof i)return i;if(!s)return null;const r=(0,o.EU)(l.breakpoints),a=Object.keys(r);let c=r;return Object.keys(s).forEach((i=>{const r=(a=s[i],d=l,"function"===typeof a?a(d):a);var a,d;if(null!==r&&void 0!==r)if("object"===typeof r)if(h[i])c=(0,n.A)(c,e(i,r,l,h));else{const e=(0,o.NI)({theme:l},r,(e=>({[i]:e})));!function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const s=t.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(s);return t.every((e=>n.size===Object.keys(e).length))}(e,r)?c=(0,n.A)(c,e):c[i]=t({sx:r,theme:l})}else c=(0,n.A)(c,e(i,r,l,h))})),(0,o.vf)(a,c)}return Array.isArray(r)?r.map(c):c(r)}}const h=l();h.filterProps=["sx"];const c=h},598:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var s=i(868);
2function n(e){if("string"!==typeof e)throw new Error((0,s.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},537:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s.A});var s=i(598)},214:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,i))}},172:(e,t,i)=>{"use strict";i.d(t,{A:()=>a,Q:()=>r});var s=i(168),n=i(43);function r(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function o(e){if(n.isValidElement(e)||!r(e))return e;const t={};return Object.keys(e).forEach((i=>{t[i]=o(e[i])})),t}function a(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const l=i.clone?(0,s.A)({},e):e;return r(e)&&r(t)&&Object.keys(t).forEach((s=>{n.isValidElement(t[s])?l[s]=t[s]:r(t[s])&&Object.prototype.hasOwnProperty.call(e,s)&&r(e[s])?l[s]=a(e[s],t[s],i):i.clone?l[s]=r(t[s])?o(t[s]):t[s]:l[s]=t[s]})),l}},482:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s.A,isPlainObject:()=>s.Q});var s=i(172)},868:(e,t,i)=>{"use strict";function s(e){let t="https://mui.com/production-error/?code="+e;for(let i=1;i<arguments.length;i+=1)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}i.d(t,{A:()=>s})},457:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s.A});var s=i(868)},382:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>l,getFunctionName:()=>r});var s=i(86);const n=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function r(e){const t=`${e}`.match(n);return t&&t[1]||""}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||r(e)||t}function a(e,t,i){const s=o(t);return e.displayName||(""!==s?`${i}(${s})`:i)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return o(e,"Component");if("object"===typeof e)switch(e.$$typeof){case s.ForwardRef:return a(e,e.render,"ForwardRef");case s.Memo:return a(e,e.type,"memo");default:return}}}},219:(e,t,i)=>{"use strict";var s=i(763),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return s.isMemo(e)?o:a[e.$$typeof]||n}a[s.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[s.Memo]=o;var h=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(t,i,s){if("string"!==typeof i){if(g){var n=p(i);n&&n!==g&&e(t,n,s)}var o=c(i);d&&(o=o.concat(d(i)));for(var a=l(t),m=l(i),f=0;f<o.length;++f){var v=o[f];if(!r[v]&&(!s||!s[v])&&(!m||!m[v])&&(!a||!a[v])){var y=u(i,v);try{h(t,v,y)}catch(C){}}}}return t}},983:(e,t)=>{"use strict";var i="function"===typeof Symbol&&Symbol.for,s=i?Symbol.for("react.element"):60103,n=i?Symbol.for("react.portal"):60106,r=i?Symbol.for("react.fragment"):60107,o=i?Symbol.for("react.strict_mode"):60108,a=i?Symbol.for("react.profiler"):60114,l=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,c=i?Symbol.for("react.async_mode"):60111,d=i?Symbol.for("react.concurrent_mode"):60111,u=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,g=i?Symbol.for("react.suspense_list"):60120,m=i?Symbol.for("react.memo"):60115,f=i?Symbol.for("react.lazy"):60116,v=i?Symbol.for("react.block"):60121,y=i?Symbol.for("react.fundamental"):60117,C=i?Symbol.for("react.responder"):60118,S=i?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case s:switch(e=e.type){case c:case d:case r:case a:case o:case p:return e;default:switch(e=e&&e.$$typeof){case h:case u:case f:case m:case l:return e;default:return t}}case n:return t}}}function b(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=h,t.ContextProvider=l,t.Element=s,t.ForwardRef=u,t.Fragment=r,t.Lazy=f,t.Memo=m,t.Portal=n,t.Profiler=a,t.StrictMode=o,t.Suspense=p,t.isAsyncMode=function(e){return b(e)||w(e)===c},t.isConcurrentMode=b,t.isContextConsumer=function(e){return w(e)===h},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===s},t.isForwardRef=function(e){return w(e)===u},t.isFragment=function(e){return w(e)===r},t.isLazy=function(e){return w(e)===f},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===n},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===o},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===r||e===d||e===a||e===o||e===p||e===g||"object"===typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===m||e.$$typeof===l||e.$$typeof===h||e.$$typeof===u||e.$$typeof===y||e.$$typeof===C||e.$$typeof===S||e.$$typeof===v)},t.typeOf=w},763:(e,t,i)=>{"use strict";e.exports=i(983)},730:(e,t,i)=>{"use strict";var s=i(43),n=i(853);function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,a={};function l(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(a[e]=t,e=0;e<t.length;e++)o.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function m(e,t,i,s,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=s,this.attributeNamespace=n,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=r,this.removeEmptyString=o}var f={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){f[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEac
vendor: 19,924 bytes, line 2
2h((function(e){var t=e[0];f[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){f[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){f[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){f[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){f[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){f[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){f[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){f[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function C(e,t,i,s){var n=f.hasOwnProperty(t)?f[t]:null;(null!==n?0!==n.type:s||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,i,s){if(null===t||"undefined"===typeof t||function(e,t,i,s){if(null!==i&&0===i.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!s&&(null!==i?!i.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,i,s))return!0;if(s)return!1;if(null!==i)switch(i.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,i,n,s)&&(i=null),s||null===n?function(e){return!!d.call(g,e)||!d.call(p,e)&&(u.test(e)?g[e]=!0:(p[e]=!0,!1))}(t)&&(null===i?e.removeAttribute(t):e.setAttribute(t,""+i)):n.mustUseProperty?e[n.propertyName]=null===i?3!==n.type&&"":i:(t=n.attributeName,s=n.attributeNamespace,null===i?e.removeAttribute(t):(i=3===(n=n.type)||4===n&&!0===i?"":""+i,s?e.setAttributeNS(s,t,i):e.setAttribute(t,i))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);f[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);f[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);f[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){f[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),f.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){f[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var S=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),b=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),R=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),L=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var F=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var k=Symbol.iterator;function N(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=k&&e[k]||e["@@iterator"])?e:null}var O,G=Object.assign;function B(e){if(void 0===O)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);O=t&&t[1]||""}return"\n"+O+e}var V=!1;function z(e,t){if(!e||V)return"";V=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(h){var s=h}Reflect.construct(e,[],t)}else{try{t.call()}catch(h){s=h}e.call(t.prototype)}else{try{throw Error()}catch(h){s=h}e()}}catch(h){if(h&&s&&"string"===typeof h.stack){for(var n=h.stack.split("\n"),r=s.stack.split("\n"),o=n.length-1,a=r.length-1;1<=o&&0<=a&&n[o]!==r[a];)a--;for(;1<=o&&0<=a;o--,a--)if(n[o]!==r[a]){if(1!==o||1!==a)do{if(o--,0>--a||n[o]!==r[a]){var l="\n"+n[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=a);break}}}finally{V=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?B(e):""}function H(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=z(e.type,!1);case 11:return e=z(e.type.render,!1);case 1:return e=z(e.type,!0);default:return""}}function W(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case x:return"Fragment";case b:return"Portal";case D:return"Profiler";case M:return"StrictMode";case A:return"Suspense";case T:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case R:return(e.displayName||"Context")+".Consumer";case I:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case P:return null!==(t=e.displayName||null)?t:W(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return W(e(t))}catch(i){}}return null}function j(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(t);case 8:return t===M?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function U(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function _(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function K(e){e._valueTracker||(e._valueTracker=function(e){var t=_(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof i&&"function"===typeof i.get&&"function"===typeof i.set){var n=i.get,r=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(e){s=""+e,r.call(this,e)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return s},setValue:function(e){s=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function $(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=_(e)?e.checked?"true":"false":e.value),(e=s)!==i&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var i=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=i?i:e._wrapperState.initialChecked})}function q(e,t){var i=null==t.defaultValue?"":t.defaultValue,s=null!=t.checked?t.checked:t.defaultChecked;i=U(null!=t.value?t.value:i),e._wrapperState={initialChecked:s,initialValue:i,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Q(e,t){null!=(t=t.checked)&&C(e,"checked",t,!1)}function X(e,t){Q(e,t);var i=U(t.value),s=t.type;if(null!=i)"number"===s?(0===i&&""===e.value||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if("submit"===s||"reset"===s)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,i):t.hasOwnProperty("defaultValue")&&ee(e,t.type,U(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,i){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!("submit"!==s&&"reset"!==s||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,i||t===e.value||(e.value=t),e.defaultValue=t}""!==(i=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==i&&(e.name=i)}function ee(e,t,i){"number"===t&&Y(e.ownerDocument)===e||(null==i?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var te=Array.isArray;function ie(e,t,i,s){if(e=e.options,t){t={};for(var n=0;n<i.length;n++)t["$"+i[n]]=!0;for(i=0;i<e.length;i++)n=t.hasOwnProperty("$"+e[i].value),e[i].selected!==n&&(e[i].selected=n),n&&s&&(e[i].defaultSelected=!0)}else{for(i=""+U(i),t=null,n=0;n<e.length;n++){if(e[n].value===i)return e[n].selected=!0,void(s&&(e[n].defaultSelected=!0));null!==t||e[n].disabled||(t=e[n])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(r(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ne(e,t){var i=t.value;if(null==i){if(i=t.children,t=t.defaultValue,null!=i){if(null!=t)throw Error(r(92));if(te(i)){if(1<i.length)throw Error(r(93));i=i[0]}t=i}null==t&&(t=""),i=t}e._wrapperState={initialValue:U(i)}}function re(e,t){var i=U(t.value),s=U(t.defaultValue);null!=i&&((i=""+i)!==e.value&&(e.value=i),null==t.defaultValue&&e.defaultValue!==i&&(e.defaultValue=i)),null!=s&&(e.defaultValue=""+s)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,i,s){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function ue(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&3===i.nodeType)return void(i.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ge=["Webkit","ms","Moz","O"];function me(e,t,i){return null==t||"boolean"===typeof t||""===t?"":i||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function fe(e,t){for(var i in e=e.style,t)if(t.hasOwnProperty(i)){var s=0===i.indexOf("--"),n=me(i,t[i],s);"float"===i&&(i="cssFloat"),s?e.setProperty(i,n):e[i]=n}}Object.keys(pe).forEach((function(e){ge.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ve=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(r(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(r(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(r(62))}}function Ce(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Se=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var be=null,xe=null,Me=null;function De(e){if(e=Cn(e)){if("function"!==typeof be)throw Error(r(280));var t=e.stateNode;t&&(t=wn(t),be(e.stateNode,e.type,t))}}function Ie(e){xe?Me?Me.push(e):Me=[e]:xe=e}function Re(){if(xe){var e=xe,t=Me;if(Me=xe=null,De(e),t)for(e=0;e<t.length;e++)De(t[e])}}function Ee(e,t){return e(t)}function Ae(){}var Te=!1;function Pe(e,t,i){if(Te)return e(t,i);Te=!0;try{return Ee(e,t,i)}finally{Te=!1,(null!==xe||null!==Me)&&(Ae(),Re())}}function Le(e,t){var i=e.stateNode;if(null===i)return null;var s=wn(i);if(null===s)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(s=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!s;break e;default:e=!1}if(e)return null;if(i&&"function"!==typeof i)throw Error(r(231,t,typeof i));return i}var Fe=!1;if(c)try{var ke={};Object.defineProperty(ke,"passive",{get:function(){Fe=!0}}),window.addEventListener("test",ke,ke),window.removeEventListener("test",ke,ke)}catch(ce){Fe=!1}function Ne(e,t,i,s,n,r,o,a,l){var h=Array.prototype.slice.call(arguments,3);try{t.apply(i,h)}catch(c){this.onError(c)}}var Oe=!1,Ge=null,Be=!1,Ve=null,ze={onError:function(e){Oe=!0,Ge=e}};function He(e,t,i,s,n,r,o,a,l){Oe=!1,Ge=null,Ne.apply(ze,arguments)}function We(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(i=t.return),e=t.return}while(e)}return 3===t.tag?i:null}function je(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ue(e){if(We(e)!==e)throw Error(r(188))}function _e(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=We(e)))throw Error(r(188));return t!==e?null:e}for(var i=e,s=t;;){var n=i.return;if(null===n)break;var o=n.alternate;if(null===o){if(null!==(s=n.return)){i=s;continue}break}if(n.child===o.child){for(o=n.child;o;){if(o===i)return Ue(n),e;if(o===s)return Ue(n),t;o=o.sibling}throw Error(r(188))}if(i.return!==s.return)i=n,s=o;else{for(var a=!1,l=n.child;l;){if(l===i){a=!0,i=n,s=o;break}if(l===s){a=!0,s=n,i=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===i){a=!0,i=o,s=n;break}if(l===s){a=!0,s=o,i=n;break}l=l.sibling}if(!a)throw Error(r(189))}}if(i.alternate!==s)throw Error(r(190))}if(3!==i.tag)throw Error(r(188));return i.stateNode.current===i?e:t}(e))?Ke(e):null}function Ke(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ke(e);if(null!==t)return t;e=e.sibling}return null}var $e=n.unstable_scheduleCallback,Ye=n.unstable_cancelCallback,Ze=n.unstable_shouldYield,qe=n.unstable_requestPaint,Qe=n.unstable_now,Xe=n.unstable_getCurrentPriorityLevel,Je=n.unstable_ImmediatePriority,et=n.unstable_UserBlockingPriority,tt=n.unstable_NormalPriority,it=n.unstable_LowPriority,st=n.unstable_IdlePriority,nt=null,rt=null;var ot=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2;var ht=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ut(e,t){var i=e.pendingLanes;if(0===i)return 0;var s=0,n=e.suspendedLanes,r=e.pingedLanes,o=268435455&i;if(0!==o){var a=o&~n;0!==a?s=dt(a):0!==(r&=o)&&(s=dt(r))}else 0!==(o=i&~n)?s=dt(o):0!==r&&(s=dt(r));if(0===s)return 0;if(0!==t&&t!==s&&0===(t&n)&&((n=s&-s)>=(r=t&-t)||16===n&&0!==(4194240&r)))return t;if(0!==(4&s)&&(s|=16&i),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=s;0<t;)n=1<<(i=31-ot(t)),s|=e[i],t&=~n;return s}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function gt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ht;return 0===(4194240&(ht<<=1))&&(ht=64),e}function ft(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function vt(e,t,i){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=i}function yt(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-ot(i),n=1<<s;n&t|e[s]&t&&(e[s]|=t),i&=~n}}var Ct=0;function St(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,bt,xt,Mt,Dt,It=!1,Rt=[],Et=null,At=null,Tt=null,Pt=new Map,Lt=new Map,Ft=[],kt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Nt(e,t){switch(e){case"focusin":case"focusout":Et=null;break;case"dragenter":case"dragleave":At=null;break;case"mouseover":case"mouseout":Tt=null;break;case"pointerover":case"pointerout":Pt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lt.delete(t.pointerId)}}function Ot(e,t,i,s,n,r){return null===e||e.nativeEvent!==r?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:r,targetContainers:[n]},null!==t&&(null!==(t=Cn(t))&&bt(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,null!==n&&-1===t.indexOf(n)&&t.push(n),e)}function Gt(e){var t=yn(e.target);if(null!==t){var i=We(t);
vendor: 4,495 bytes, line 2
2if(null!==i)if(13===(t=i.tag)){if(null!==(t=je(i)))return e.blockedOn=t,void Dt(e.priority,(function(){xt(i)}))}else if(3===t&&i.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===i.tag?i.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var i=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==i)return null!==(t=Cn(i))&&bt(t),e.blockedOn=i,!1;var s=new(i=e.nativeEvent).constructor(i.type,i);Se=s,i.target.dispatchEvent(s),Se=null,t.shift()}return!0}function Vt(e,t,i){Bt(e)&&i.delete(t)}function zt(){It=!1,null!==Et&&Bt(Et)&&(Et=null),null!==At&&Bt(At)&&(At=null),null!==Tt&&Bt(Tt)&&(Tt=null),Pt.forEach(Vt),Lt.forEach(Vt)}function Ht(e,t){e.blockedOn===t&&(e.blockedOn=null,It||(It=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,zt)))}function Wt(e){function t(t){return Ht(t,e)}if(0<Rt.length){Ht(Rt[0],e);for(var i=1;i<Rt.length;i++){var s=Rt[i];s.blockedOn===e&&(s.blockedOn=null)}}for(null!==Et&&Ht(Et,e),null!==At&&Ht(At,e),null!==Tt&&Ht(Tt,e),Pt.forEach(t),Lt.forEach(t),i=0;i<Ft.length;i++)(s=Ft[i]).blockedOn===e&&(s.blockedOn=null);for(;0<Ft.length&&null===(i=Ft[0]).blockedOn;)Gt(i),null===i.blockedOn&&Ft.shift()}var jt=S.ReactCurrentBatchConfig,Ut=!0;function _t(e,t,i,s){var n=Ct,r=jt.transition;jt.transition=null;try{Ct=1,$t(e,t,i,s)}finally{Ct=n,jt.transition=r}}function Kt(e,t,i,s){var n=Ct,r=jt.transition;jt.transition=null;try{Ct=4,$t(e,t,i,s)}finally{Ct=n,jt.transition=r}}function $t(e,t,i,s){if(Ut){var n=Zt(e,t,i,s);if(null===n)js(e,t,s,Yt,i),Nt(e,s);else if(function(e,t,i,s,n){switch(t){case"focusin":return Et=Ot(Et,e,t,i,s,n),!0;case"dragenter":return At=Ot(At,e,t,i,s,n),!0;case"mouseover":return Tt=Ot(Tt,e,t,i,s,n),!0;case"pointerover":var r=n.pointerId;return Pt.set(r,Ot(Pt.get(r)||null,e,t,i,s,n)),!0;case"gotpointercapture":return r=n.pointerId,Lt.set(r,Ot(Lt.get(r)||null,e,t,i,s,n)),!0}return!1}(n,e,t,i,s))s.stopPropagation();else if(Nt(e,s),4&t&&-1<kt.indexOf(e)){for(;null!==n;){var r=Cn(n);if(null!==r&&wt(r),null===(r=Zt(e,t,i,s))&&js(e,t,s,Yt,i),r===n)break;n=r}null!==n&&s.stopPropagation()}else js(e,t,s,null,i)}}var Yt=null;function Zt(e,t,i,s){if(Yt=null,null!==(e=yn(e=we(s))))if(null===(t=We(e)))e=null;else if(13===(i=t.tag)){if(null!==(e=je(t)))return e;e=null}else if(3===i){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Je:return 1;case et:return 4;case tt:case it:return 16;case st:return 536870912;default:return 16}default:return 16}}var Qt=null,Xt=null,Jt=null;function ei(){if(Jt)return Jt;var e,t,i=Xt,s=i.length,n="value"in Qt?Qt.value:Qt.textContent,r=n.length;for(e=0;e<s&&i[e]===n[e];e++);var o=s-e;for(t=1;t<=o&&i[s-t]===n[r-t];t++);return Jt=n.slice(e,1<t?1-t:void 0)}function ti(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function ii(){return!0}function si(){return!1}function ni(e){function t(t,i,s,n,r){for(var o in this._reactName=t,this._targetInst=s,this.type=i,this.nativeEvent=n,this.target=r,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(n):n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?
vendor: 101,440 bytes, line 2
2ii:si,this.isPropagationStopped=si,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ii)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ii)},persist:function(){},isPersistent:ii}),t}var ri,oi,ai,li={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hi=ni(li),ci=G({},li,{view:0,detail:0}),di=ni(ci),ui=G({},ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mi,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ai&&(ai&&"mousemove"===e.type?(ri=e.screenX-ai.screenX,oi=e.screenY-ai.screenY):oi=ri=0,ai=e),ri)},movementY:function(e){return"movementY"in e?e.movementY:oi}}),pi=ni(ui),gi=ni(G({},ui,{dataTransfer:0})),mi=ni(G({},ci,{relatedTarget:0})),fi=ni(G({},li,{animationName:0,elapsedTime:0,pseudoElement:0})),vi=G({},li,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yi=ni(vi),Ci=ni(G({},li,{data:0})),Si={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wi={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bi={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xi(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=bi[e])&&!!t[e]}function Mi(){return xi}var Di=G({},ci,{key:function(e){if(e.key){var t=Si[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ti(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?wi[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mi,charCode:function(e){return"keypress"===e.type?ti(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ti(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ii=ni(Di),Ri=ni(G({},ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ei=ni(G({},ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mi})),Ai=ni(G({},li,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ti=G({},ui,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pi=ni(Ti),Li=[9,13,27,32],Fi=c&&"CompositionEvent"in window,ki=null;c&&"documentMode"in document&&(ki=document.documentMode);var Ni=c&&"TextEvent"in window&&!ki,Oi=c&&(!Fi||ki&&8<ki&&11>=ki),Gi=String.fromCharCode(32),Bi=!1;function Vi(e,t){switch(e){case"keyup":return-1!==Li.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zi(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Hi=!1;var Wi={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ji(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wi[e.type]:"textarea"===t}function Ui(e,t,i,s){Ie(s),0<(t=_s(t,"onChange")).length&&(i=new hi("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var _i=null,Ki=null;function $i(e){Gs(e,0)}function Yi(e){if($(Sn(e)))return e}function Zi(e,t){if("change"===e)return t}var qi=!1;if(c){var Qi;if(c){var Xi="oninput"in document;if(!Xi){var Ji=document.createElement("div");Ji.setAttribute("oninput","return;"),Xi="function"===typeof Ji.oninput}Qi=Xi}else Qi=!1;qi=Qi&&(!document.documentMode||9<document.documentMode)}function es(){_i&&(_i.detachEvent("onpropertychange",ts),Ki=_i=null)}function ts(e){if("value"===e.propertyName&&Yi(Ki)){var t=[];Ui(t,Ki,e,we(e)),Pe($i,t)}}function is(e,t,i){"focusin"===e?(es(),Ki=i,(_i=t).attachEvent("onpropertychange",ts)):"focusout"===e&&es()}function ss(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yi(Ki)}function ns(e,t){if("click"===e)return Yi(t)}function rs(e,t){if("input"===e||"change"===e)return Yi(t)}var os="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function as(e,t){if(os(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var n=i[s];if(!d.call(t,n)||!os(e[n],t[n]))return!1}return!0}function ls(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hs(e,t){var i,s=ls(e);for(e=0;s;){if(3===s.nodeType){if(i=e+s.textContent.length,e<=t&&i>=t)return{node:s,offset:t-e};e=i}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ls(s)}}function cs(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?cs(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ds(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var i="string"===typeof t.contentWindow.location.href}catch(s){i=!1}if(!i)break;t=Y((e=t.contentWindow).document)}return t}function us(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function ps(e){var t=ds(),i=e.focusedElem,s=e.selectionRange;if(t!==i&&i&&i.ownerDocument&&cs(i.ownerDocument.documentElement,i)){if(null!==s&&us(i))if(t=s.start,void 0===(e=s.end)&&(e=t),"selectionStart"in i)i.selectionStart=t,i.selectionEnd=Math.min(e,i.value.length);else if((e=(t=i.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var n=i.textContent.length,r=Math.min(s.start,n);s=void 0===s.end?r:Math.min(s.end,n),!e.extend&&r>s&&(n=s,s=r,r=n),n=hs(i,r);var o=hs(i,s);n&&o&&(1!==e.rangeCount||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(n.node,n.offset),e.removeAllRanges(),r>s?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=i;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof i.focus&&i.focus(),i=0;i<t.length;i++)(e=t[i]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gs=c&&"documentMode"in document&&11>=document.documentMode,ms=null,fs=null,vs=null,ys=!1;function Cs(e,t,i){var s=i.window===i?i.document:9===i.nodeType?i:i.ownerDocument;ys||null==ms||ms!==Y(s)||("selectionStart"in(s=ms)&&us(s)?s={start:s.selectionStart,end:s.selectionEnd}:s={anchorNode:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset},vs&&as(vs,s)||(vs=s,0<(s=_s(fs,"onSelect")).length&&(t=new hi("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=ms)))}function Ss(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var ws={animationend:Ss("Animation","AnimationEnd"),animationiteration:Ss("Animation","AnimationIteration"),animationstart:Ss("Animation","AnimationStart"),transitionend:Ss("Transition","TransitionEnd")},bs={},xs={};function Ms(e){if(bs[e])return bs[e];if(!ws[e])return e;var t,i=ws[e];for(t in i)if(i.hasOwnProperty(t)&&t in xs)return bs[e]=i[t];return e}c&&(xs=document.createElement("div").style,"AnimationEvent"in window||(delete ws.animationend.animation,delete ws.animationiteration.animation,delete ws.animationstart.animation),"TransitionEvent"in window||delete ws.transitionend.transition);var Ds=Ms("animationend"),Is=Ms("animationiteration"),Rs=Ms("animationstart"),Es=Ms("transitionend"),As=new Map,Ts="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ps(e,t){As.set(e,t),l(t,[e])}for(var Ls=0;Ls<Ts.length;Ls++){var Fs=Ts[Ls];Ps(Fs.toLowerCase(),"on"+(Fs[0].toUpperCase()+Fs.slice(1)))}Ps(Ds,"onAnimationEnd"),Ps(Is,"onAnimationIteration"),Ps(Rs,"onAnimationStart"),Ps("dblclick","onDoubleClick"),Ps("focusin","onFocus"),Ps("focusout","onBlur"),Ps(Es,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ks="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ns=new Set("cancel close invalid load scroll toggle".split(" ").concat(ks));function Os(e,t,i){var s=e.type||"unknown-event";e.currentTarget=i,function(e,t,i,s,n,o,a,l,h){if(He.apply(this,arguments),Oe){if(!Oe)throw Error(r(198));var c=Ge;Oe=!1,Ge=null,Be||(Be=!0,Ve=c)}}(s,t,void 0,e),e.currentTarget=null}function Gs(e,t){t=0!==(4&t);for(var i=0;i<e.length;i++){var s=e[i],n=s.event;s=s.listeners;e:{var r=void 0;if(t)for(var o=s.length-1;0<=o;o--){var a=s[o],l=a.instance,h=a.currentTarget;if(a=a.listener,l!==r&&n.isPropagationStopped())break e;Os(n,a,h),r=l}else for(o=0;o<s.length;o++){if(l=(a=s[o]).instance,h=a.currentTarget,a=a.listener,l!==r&&n.isPropagationStopped())break e;Os(n,a,h),r=l}}}if(Be)throw e=Ve,Be=!1,Ve=null,e}function Bs(e,t){var i=t[mn];void 0===i&&(i=t[mn]=new Set);var s=e+"__bubble";i.has(s)||(Ws(t,e,2,!1),i.add(s))}function Vs(e,t,i){var s=0;t&&(s|=4),Ws(i,e,s,t)}var zs="_reactListening"+Math.random().toString(36).slice(2);function Hs(e){if(!e[zs]){e[zs]=!0,o.forEach((function(t){"selectionchange"!==t&&(Ns.has(t)||Vs(t,!1,e),Vs(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zs]||(t[zs]=!0,Vs("selectionchange",!1,t))}}function Ws(e,t,i,s){switch(qt(t)){case 1:var n=_t;break;case 4:n=Kt;break;default:n=$t}i=n.bind(null,t,i,e),n=void 0,!Fe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(n=!0),s?void 0!==n?e.addEventListener(t,i,{capture:!0,passive:n}):e.addEventListener(t,i,!0):void 0!==n?e.addEventListener(t,i,{passive:n}):e.addEventListener(t,i,!1)}function js(e,t,i,s,n){var r=s;if(0===(1&t)&&0===(2&t)&&null!==s)e:for(;;){if(null===s)return;var o=s.tag;if(3===o||4===o){var a=s.stateNode.containerInfo;if(a===n||8===a.nodeType&&a.parentNode===n)break;if(4===o)for(o=s.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===n||8===l.nodeType&&l.parentNode===n))return;o=o.return}for(;null!==a;){if(null===(o=yn(a)))return;if(5===(l=o.tag)||6===l){s=r=o;continue e}a=a.parentNode}}s=s.return}Pe((function(){var s=r,n=we(i),o=[];e:{var a=As.get(e);if(void 0!==a){var l=hi,h=e;switch(e){case"keypress":if(0===ti(i))break e;case"keydown":case"keyup":l=Ii;break;case"focusin":h="focus",l=mi;break;case"focusout":h="blur",l=mi;break;case"beforeblur":case"afterblur":l=mi;break;case"click":if(2===i.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pi;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Ei;break;case Ds:case Is:case Rs:l=fi;break;case Es:l=Ai;break;case"scroll":l=di;break;case"wheel":l=Pi;break;case"copy":case"cut":case"paste":l=yi;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Ri}var c=0!==(4&t),d=!c&&"scroll"===e,u=c?null!==a?a+"Capture":null:a;c=[];for(var p,g=s;null!==g;){var m=(p=g).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==u&&(null!=(m=Le(g,u))&&c.push(Us(g,m,p)))),d)break;g=g.return}0<c.length&&(a=new l(a,h,null,i,n),o.push({event:a,listeners:c}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||i===Se||!(h=i.relatedTarget||i.fromElement)||!yn(h)&&!h[gn])&&(l||a)&&(a=n.window===n?n:(a=n.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=s,null!==(h=(h=i.relatedTarget||i.toElement)?yn(h):null)&&(h!==(d=We(h))||5!==h.tag&&6!==h.tag)&&(h=null)):(l=null,h=s),l!==h)){if(c=pi,m="onMouseLeave",u="onMouseEnter",g="mouse","pointerout"!==e&&"pointerover"!==e||(c=Ri,m="onPointerLeave",u="onPointerEnter",g="pointer"),d=null==l?a:Sn(l),p=null==h?a:Sn(h),(a=new c(m,g+"leave",l,i,n)).target=d,a.relatedTarget=p,m=null,yn(n)===s&&((c=new c(u,g+"enter",h,i,n)).target=p,c.relatedTarget=d,m=c),d=m,l&&h)e:{for(u=h,g=0,p=c=l;p;p=Ks(p))g++;for(p=0,m=u;m;m=Ks(m))p++;for(;0<g-p;)c=Ks(c),g--;for(;0<p-g;)u=Ks(u),p--;for(;g--;){if(c===u||null!==u&&c===u.alternate)break e;c=Ks(c),u=Ks(u)}c=null}else c=null;null!==l&&$s(o,a,l,c,!1),null!==h&&null!==d&&$s(o,d,h,c,!0)}if("select"===(l=(a=s?Sn(s):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var f=Zi;else if(ji(a))if(qi)f=rs;else{f=ss;var v=is}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(f=ns);switch(f&&(f=f(e,s))?Ui(o,f,i,n):(v&&v(e,a,s),"focusout"===e&&(v=a._wrapperState)&&v.controlled&&"number"===a.type&&ee(a,"number",a.value)),v=s?Sn(s):window,e){case"focusin":(ji(v)||"true"===v.contentEditable)&&(ms=v,fs=s,vs=null);break;case"focusout":vs=fs=ms=null;break;case"mousedown":ys=!0;break;case"contextmenu":case"mouseup":case"dragend":ys=!1,Cs(o,i,n);break;case"selectionchange":if(gs)break;case"keydown":case"keyup":Cs(o,i,n)}var y;if(Fi)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Hi?Vi(e,i)&&(C="onCompositionEnd"):"keydown"===e&&229===i.keyCode&&(C="onCompositionStart");C&&(Oi&&"ko"!==i.locale&&(Hi||"onCompositionStart"!==C?"onCompositionEnd"===C&&Hi&&(y=ei()):(Xt="value"in(Qt=n)?Qt.value:Qt.textContent,Hi=!0)),0<(v=_s(s,C)).length&&(C=new Ci(C,e,null,i,n),o.push({event:C,listeners:v}),y?C.data=y:null!==(y=zi(i))&&(C.data=y))),(y=Ni?function(e,t){switch(e){case"compositionend":return zi(t);case"keypress":return 32!==t.which?null:(Bi=!0,Gi);case"textInput":return(e=t.data)===Gi&&Bi?null:e;default:return null}}(e,i):function(e,t){if(Hi)return"compositionend"===e||!Fi&&Vi(e,t)?(e=ei(),Jt=Xt=Qt=null,Hi=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Oi&&"ko"!==t.locale?null:t.data}}(e,i))&&(0<(s=_s(s,"onBeforeInput")).length&&(n=new Ci("onBeforeInput","beforeinput",null,i,n),o.push({event:n,listeners:s}),n.data=y))}Gs(o,t)}))}function Us(e,t,i){return{instance:e,listener:t,currentTarget:i}}function _s(e,t){for(var i=t+"Capture",s=[];null!==e;){var n=e,r=n.stateNode;5===n.tag&&null!==r&&(n=r,null!=(r=Le(e,i))&&s.unshift(Us(e,r,n)),null!=(r=Le(e,t))&&s.push(Us(e,r,n))),e=e.return}return s}function Ks(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function $s(e,t,i,s,n){for(var r=t._reactName,o=[];null!==i&&i!==s;){var a=i,l=a.alternate,h=a.stateNode;if(null!==l&&l===s)break;5===a.tag&&null!==h&&(a=h,n?null!=(l=Le(i,r))&&o.unshift(Us(i,l,a)):n||null!=(l=Le(i,r))&&o.push(Us(i,l,a))),i=i.return}0!==o.length&&e.push({event:t,listeners:o})}var Ys=/\r\n?/g,Zs=/\u0000|\uFFFD/g;function qs(e){return("string"===typeof e?e:""+e).replace(Ys,"\n").replace(Zs,"")}function Qs(e,t,i){if(t=qs(t),qs(e)!==t&&i)throw Error(r(425))}function Xs(){}var Js=null,en=null;function tn(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var sn="function"===typeof setTimeout?setTimeout:void 0,nn="function"===typeof clearTimeout?clearTimeout:void 0,rn="function"===typeof Promise?Promise:void 0,on="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof rn?function(e){return rn.resolve(null).then(e).catch(an)}:sn;function an(e){setTimeout((function(){throw e}))}function ln(e,t){var i=t,s=0;do{var n=i.nextSibling;if(e.removeChild(i),n&&8===n.nodeType)if("/$"===(i=n.data)){if(0===s)return e.removeChild(n),void Wt(t);s--}else"$"!==i&&"$?"!==i&&"$!"!==i||s++;i=n}while(i);Wt(t)}function hn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function cn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var i=e.data;if("$"===i||"$!"===i||"$?"===i){if(0===t)return e;t--}else"/$"===i&&t++}e=e.previousSibling}return null}var dn=Math.random().toString(36).slice(2),un="__reactFiber$"+dn,pn="__reactProps$"+dn,gn="__reactContainer$"+dn,mn="__reactEvents$"+dn,fn="__reactListeners$"+dn,vn="__reactHandles$"+dn;function yn(e){var t=e[un];if(t)return t;for(var i=e.parentNode;i;){if(t=i[gn]||i[un]){if(i=t.alternate,null!==t.child||null!==i&&null!==i.child)for(e=cn(e);null!==e;){if(i=e[un])return i;e=cn(e)}return t}i=(e=i).parentNode}return null}function Cn(e){return!(e=e[un]||e[gn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Sn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(r(33))}function wn(e){return e[pn]||null}var bn=[],xn=-1;function Mn(e){return{current:e}}function Dn(e){0>xn||(e.current=bn[xn],bn[xn]=null,xn--)}function In(e,t){xn++,bn[xn]=e.current,e.current=t}var Rn={},En=Mn(Rn),An=Mn(!1),Tn=Rn;function Pn(e,t){var i=e.type.contextTypes;if(!i)return Rn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var n,r={};for(n in i)r[n]=t[n];return s&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function Ln(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Fn(){Dn(An),Dn(En)}function kn(e,t,i){if(En.current!==Rn)throw Error(r(168));In(En,t),In(An,i)}function Nn(e,t,i){var s=e.stateNode;if(t=t.childContextTypes,"function"!==typeof s.getChildContext)return i;for(var n in s=s.getChildContext())if(!(n in t))throw Error(r(108,j(e)||"Unknown",n));return G({},i,s)}function On(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Rn,Tn=En.current,In(En,e),In(An,An.current),!0}function Gn(e,t,i){var s=e.stateNode;if(!s)throw Error(r(169));i?(e=Nn(e,t,Tn),s.__reactInternalMemoizedMergedChildContext=e,Dn(An),Dn(En),In(En,e)):Dn(An),In(An,i)}var Bn=null,Vn=!1,zn=!1;function Hn(e){null===Bn?Bn=[e]:Bn.push(e)}function Wn(){if(!zn&&null!==Bn){zn=!0;var e=0,t=Ct;try{var i=Bn;for(Ct=1;e<i.length;e++){var s=i[e];do{s=s(!0)}while(null!==s)}Bn=null,Vn=!1}catch(n){throw null!==Bn&&(Bn=Bn.slice(e+1)),$e(Je,Wn),n}finally{Ct=t,zn=!1}}return null}var jn=[],Un=0,_n=null,Kn=0,$n=[],Yn=0,Zn=null,qn=1,Qn="";function Xn(e,t){jn[Un++]=Kn,jn[Un++]=_n,_n=e,Kn=t}function Jn(e,t,i){$n[Yn++]=qn,$n[Yn++]=Qn,$n[Yn++]=Zn,Zn=e;var s=qn;e=Qn;var n=32-ot(s)-1;s&=~(1<<n),i+=1;var r=32-ot(t)+n;if(30<r){var o=n-n%5;r=(s&(1<<o)-1).toString(32),s>>=o,n-=o,qn=1<<32-ot(t)+n|i<<n|s,Qn=r+e}else qn=1<<r|i<<n|s,Qn=e}function er(e){null!==e.return&&(Xn(e,1),Jn(e,1,0))}function tr(e){for(;e===_n;)_n=jn[--Un],jn[Un]=null,Kn=jn[--Un],jn[Un]=null;for(;e===Zn;)Zn=$n[--Yn],$n[Yn]=null,Qn=$n[--Yn],$n[Yn]=null,qn=$n[--Yn],$n[Yn]=null}var ir=null,sr=null,nr=!1,rr=null;function or(e,t){var i=Ph(5,null,null,0);i.elementType="DELETED",i.stateNode=t,i.return=e,null===(t=e.deletions)?(e.deletions=[i],e.flags|=16):t.push(i)}function ar(e,t){switch(e.tag){case 5:var i=e.type;return null!==(t=1!==t.nodeType||i.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ir=e,sr=hn(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ir=e,sr=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(i=null!==Zn?{id:qn,overflow:Qn}:null,e.memoizedState={dehydrated:t,treeContext:i,retryLane:1073741824},(i=Ph(18,null,null,0)).stateNode=t,i.return=e,e.child=i,ir=e,sr=null,!0);default:return!1}}function lr(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function hr(e){if(nr){var t=sr;if(t){var i=t;if(!ar(e,t)){if(lr(e))throw Error(r(418));t=hn(i.nextSibling);var s=ir;t&&ar(e,t)?or(s,i):(e.flags=-4097&e.flags|2,nr=!1,ir=e)}}else{if(lr(e))throw Error(r(418));e.flags=-4097&e.flags|2,nr=!1,ir=e}}}function cr(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ir=e}function dr(e){if(e!==ir)return!1;if(!nr)return cr(e),nr=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!tn(e.type,e.memoizedProps)),t&&(t=sr)){if(lr(e))throw ur(),Error(r(418));for(;t;)or(e,t),t=hn(t.nextSibling)}if(cr(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var i=e.data;if("/$"===i){if(0===t){sr=hn(e.nextSibling);break e}t--}else"$"!==i&&"$!"!==i&&"$?"!==i||t++}e=e.nextSibling}sr=null}}else sr=ir?hn(e.stateNode.nextSibling):null;return!0}function ur(){for(var e=sr;e;)e=hn(e.nextSibling)}function pr(){sr=ir=null,nr=!1}function gr(e){null===rr?rr=[e]:rr.push(e)}var mr=S.ReactCurrentBatchConfig;function fr(e,t,i){if(null!==(e=i.ref)&&"function"!==typeof e&&"object"!==typeof e){if(i._owner){if(i=i._owner){if(1!==i.tag)throw Error(r(309));var s=i.stateNode}if(!s)throw Error(r(147,e));var n=s,o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=n.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(r(284));if(!i._owner)throw Error(r(290,e))}return e}function vr(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yr(e){return(0,e._init)(e._payload)}function Cr(e){function t(t,i){if(e){var s=t.deletions;null===s?(t.deletions=[i],t.flags|=16):s.push(i)}}function i(i,s){if(!e)return null;for(;null!==s;)t(i,s),s=s.sibling;return null}function s(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function n(e,t){return(e=Fh(e,t)).index=0,e.sibling=null,e}function o(t,i,s){return t.index=s,e?null!==(s=t.alternate)?(s=s.index)<i?(t.flags|=2,i):s:(t.flags|=2,i):(t.flags|=1048576,i)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,i,s){return null===t||6!==t.tag?((t=Gh(i,e.mode,s)).return=e,t):((t=n(t,i)).return=e,t)}function h(e,t,i,s){var r=i.type;return r===x?d(e,t,i.props.children,s,i.key):null!==t&&(t.elementType===r||"object"===typeof r&&null!==r&&r.$$typeof===L&&yr(r)===t.type)?((s=n(t,i.props)).ref=fr(e,t,i),s.return=e,s):((s=kh(i.type,i.key,i.props,null,e.mode,s)).ref=fr(e,t,i),s.return=e,s)}function c(e,t,i,s){return null===t||4!==t.tag||t.stateNode.containerInfo!==i.containerInfo||t.stateNode.implementation!==i.implementation?((t=Bh(i,e.mode,s)).return=e,t):((t=n(t,i.children||[])).return=e,t)}function d(e,t,i,s,r){return null===t||7!==t.tag?((t=Nh(i,e.mode,s,r)).return=e,t):((t=n(t,i)).return=e,t)}function u(e,t,i){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Gh(""+t,e.mode,i)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(i=kh(t.type,t.key,t.props,null,e.mode,i)).ref=fr(e,null,t),i.return=e,i;case b:return(t=Bh(t,e.mode,i)).return=e,t;case L:return u(e,(0,t._init)(t._payload),i)}if(te(t)||N(t))return(t=Nh(t,e.mode,i,null)).return=e,t;vr(e,t)}return null}function p(e,t,i,s){var n=null!==t?t.key:null;if("string"===typeof i&&""!==i||"number"===typeof i)return null!==n?null:l(e,t,""+i,s);if("object"===typeof i&&null!==i){switch(i.$$typeof){case w:return i.key===n?h(e,t,i,s):null;case b:return i.key===n?c(e,t,i,s):null;case L:return p(e,t,(n=i._init)(i._payload),s)}if(te(i)||N(i))return null!==n?null:d(e,t,i,s,null);vr(e,i)}return null}function g(e,t,i,s,n){if("string"===typeof s&&""!==s||"number"===typeof s)return l(t,e=e.get(i)||null,""+s,n);if("object"===typeof s&&null!==s){switch(s.$$typeof){case w:return h(t,e=e.get(null===s.key?i:s.key)||null,s,n);case b:return c(t,e=e.get(null===s.key?i:s.key)||null,s,n);case L:return g(e,t,i,(0,s._init)(s._payload),n)}if(te(s)||N(s))return d(t,e=e.get(i)||null,s,n,null);vr(t,s)}return null}function m(n,r,a,l){for(var h=null,c=null,d=r,m=r=0,f=null;null!==d&&m<a.length;m++){d.index>m?(f=d,d=null):f=d.sibling;var v=p(n,d,a[m],l);if(null===v){null===d&&(d=f);break}e&&d&&null===v.alternate&&t(n,d),r=o(v,r,m),null===c?h=v:c.sibling=v,c=v,d=f}if(m===a.length)return i(n,d),nr&&Xn(n,m),h;if(null===d){for(;m<a.length;m++)null!==(d=u(n,a[m],l))&&(r=o(d,r,m),null===c?h=d:c.sibling=d,c=d);return nr&&Xn(n,m),h}for(d=s(n,d);m<a.length;m++)null!==(f=g(d,n,m,a[m],l))&&(e&&null!==f.alternate&&d.delete(null===f.key?m:f.key),r=o(f,r,m),null===c?h=f:c.sibling=f,c=f);return e&&d.forEach((function(e){return t(n,e)})),nr&&Xn(n,m),h}function f(n,a,l,h){var c=N(l);if("function"!==typeof c)throw Error(r(150));if(null==(l=c.call(l)))throw Error(r(151));for(var d=c=null,m=a,f=a=0,v=null,y=l.next();null!==m&&!y.done;f++,y=l.next()){m.index>f?(v=m,m=null):v=m.sibling;var C=p(n,m,y.value,h);if(null===C){null===m&&(m=v);break}e&&m&&null===C.alternate&&t(n,m),a=o(C,a,f),null===d?c=C:d.sibling=C,d=C,m=v}if(y.done)return i(n,m),nr&&Xn(n,f),c;if(null===m){for(;!y.done;f++,y=l.next())null!==(y=u(n,y.value,h))&&(a=o(y,a,f),null===d?c=y:d.sibling=y,d=y);return nr&&Xn(n,f),c}for(m=s(n,m);!y.done;f++,y=l.next())null!==(y=g(m,n,f,y.value,h))&&(e&&null!==y.alternate&&m.delete(null===y.key?f:y.key),a=o(y,a,f),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(n,e)})),nr&&Xn(n,f),c}return function e(s,r,o,l){if("object"===typeof o&&null!==o&&o.type===x&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case w:e:{for(var h=o.key,c=r;null!==c;){if(c.key===h){if((h=o.type)===x){if(7===c.tag){i(s,c.sibling),(r=n(c,o.props.children)).return=s,s=r;break e}}else if(c.elementType===h||"object"===typeof h&&null!==h&&h.$$typeof===L&&yr(h)===c.type){i(s,c.sibling),(r=n(c,o.props)).ref=fr(s,c,o),r.return=s,s=r;break e}i(s,c);break}t(s,c),c=c.sibling}o.type===x?((r=Nh(o.props.children,s.mode,l,o.key)).return=s,s=r):((l=kh(o.type,o.key,o.props,null,s.mode,l)).ref=fr(s,r,o),l.return=s,s=l)}return a(s);case b:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){i(s,r.sibling),(r=n(r,o.children||[])).return=s,s=r;break e}i(s,r);break}t(s,r),r=r.sibling}(r=Bh(o,s.mode,l)).return=s,s=r}return a(s);case L:return e(s,r,(c=o._init)(o._payload),l)}if(te(o))return m(s,r,o,l);if(N(o))return f(s,r,o,l);vr(s,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==r&&6===r.tag?(i(s,r.sibling),(r=n(r,o)).return=s,s=r):(i(s,r),(r=Gh(o,s.mode,l)).return=s,s=r),a(s)):i(s,r)}}var Sr=Cr(!0),wr=Cr(!1),br=Mn(null),xr=null,Mr=null,Dr=null;function Ir(){Dr=Mr=xr=null}function Rr(e){var t=br.current;Dn(br),e._currentValue=t}function Er(e,t,i){for(;null!==e;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==s&&(s.childLanes|=t)):null!==s&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Ar(e,t){xr=e,Dr=Mr=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Ca=!0),e.firstContext=null)}function Tr(e){var t=e._currentValue;if(Dr!==e)if(e={context:e,memoizedValue:t,next:null},null===Mr){if(null===xr)throw Error(r(308));Mr=e,xr.dependencies={lanes:0,firstContext:e}}else Mr=Mr.next=e;return t}var Pr=null;function Lr(e){null===Pr?Pr=[e]:Pr.push(e)}function Fr(e,t,i,s){var n=t.interleaved;return null===n?(i.next=i,Lr(t)):(i.next=n.next,n.next=i),t.interleaved=i,kr(e,s)}function kr(e,t){e.lanes|=t;var i=e.alternate;for(null!==i&&(i.lanes|=t),i=e,e=e.return;null!==e;)e.childLanes|=t,null!==(i=e.alternate)&&(i.childLanes|=t),i=e,e=e.return;return 3===i.tag?i.stateNode:null}var Nr=!1;function Or(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Br(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vr(e,t,i){var s=e.updateQueue;if(null===s)return null;if(s=s.shared,0!==(2&El)){var n=s.pending;return null===n?t.next=t:(t.next=n.next,n.next=t),s.pending=t,kr(e,i)}return null===(n=s.interleaved)?(t.next=t,Lr(s)):(t.next=n.next,n.next=t),s.interleaved=t,kr(e,i)}function zr(e,t,i){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&i))){var s=t.lanes;i|=s&=e.pendingLanes,t.lanes=i,yt(e,i)}}function Hr(e,t){var i=e.updateQueue,s=e.alternate;if(null!==s&&i===(s=s.updateQueue)){var n=null,r=null;if(null!==(i=i.firstBaseUpdate)){do{var o={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};null===r?n=r=o:r=r.next=o,i=i.next}while(null!==i);null===r?n=r=t:r=r.next=t}else n=r=t;return i={baseState:s.baseState,firstBaseUpdate:n,lastBaseUpdate:r,shared:s.shared,effects:s.effects},void(e.updateQueue=i)}null===(e=i.lastBaseUpdate)?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}function Wr(e,t,i,s){var n=e.updateQueue;Nr=!1;var r=n.firstBaseUpdate,o=n.lastBaseUpdate,a=n.shared.pending;if(null!==a){n.shared.pending=null;var l=a,h=l.next;l.next=null,null===o?r=h:o.next=h,o=l;var c=e.alternate;null!==c&&((a=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===a?c.firstBaseUpdate=h:a.next=h,c.lastBaseUpdate=l))}if(null!==r){var d=n.baseState;for(o=0,c=h=l=null,a=r;;){var u=a.lane,p=a.eventTime;if((s&u)===u){null!==c&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,m=a;switch(u=t,p=i,m.tag){case 1:if("function"===typeof(g=m.payload)){d=g.call(p,d,u);break e}d=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null===(u="function"===typeof(g=m.payload)?g.call(p,d,u):g)||void 0===u)break e;d=G({},d,u);break e;case 2:Nr=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(u=n.effects)?n.effects=[a]:u.push(a))}else p={eventTime:p,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===c?(h=c=p,l=d):c=c.next=p,o|=u;if(null===(a=a.next)){if(null===(a=n.shared.pending))break;a=(u=a).next,u.next=null,n.lastBaseUpdate=u,n.shared.pending=null}}if(null===c&&(l=d),n.baseState=l,n.firstBaseUpdate=h,n.lastBaseUpdate=c,null!==(t=n.shared.interleaved)){n=t;do{o|=n.lane,n=n.next}while(n!==t)}else null===r&&(n.shared.lanes=0);Ol|=o,e.lanes=o,e.memoizedState=d}}function jr(e,t,i){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var s=e[t],n=s.callback;if(null!==n){if(s.callback=null,s=i,"function"!==typeof n)throw Error(r(191,n));n.call(s)}}}var Ur={},_r=Mn(Ur),Kr=Mn(Ur),$r=Mn(Ur);function Yr(e){if(e===Ur)throw Error(r(174));return e}function Zr(e,t){switch(In($r,t),In(Kr,e),In(_r,Ur),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Dn(_r),In(_r,t)}function qr(){Dn(_r),Dn(Kr),Dn($r)}function Qr(e){Yr($r.current);var t=Yr(_r.current),i=le(t,e.type);t!==i&&(In(Kr,e),In(_r,i))}function Xr(e){Kr.current===e&&(Dn(_r),Dn(Kr))}var Jr=Mn(0);function eo(e){for(var t=e;null!==t;){if(13===t.tag){var i=t.memoizedState;if(null!==i&&(null===(i=i.dehydrated)||"$?"===i.data||"$!"===i.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var to=[];function io(){for(var e=0;e<to.length;e++)to[e]._workInProgressVersionPrimary=null;to.length=0}var so=S.ReactCurrentDispatcher,no=S.ReactCurrentBatchConfig,ro=0,oo=null,ao=null,lo=null,ho=!1,co=!1,uo=0,po=0;function go(){throw Error(r(321))}function mo(e,t){if(null===t)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!os(e[i],t[i]))return!1;return!0}function fo(e,t,i,s,n,o){if(ro=o,oo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,so.current=null===e||null===e.memoizedState?Jo:ea,e=i(s,n),co){o=0;do{if(co=!1,uo=0,25<=o)throw Error(r(301));o+=1,lo=ao=null,t.updateQueue=null,so.current=ta,e=i(s,n)}while(co)}if(so.current=Xo,t=null!==ao&&null!==ao.next,ro=0,lo=ao=oo=null,ho=!1,t)throw Error(r(300));return e}function vo(){var e=0!==uo;return uo=0,e}function yo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===lo?oo.memoizedState=lo=e:lo=lo.next=e,lo}function Co(){if(null===ao){var e=oo.alternate;e=null!==e?e.memoizedState:null}else e=ao.next;var t=null===lo?oo.memoizedState:lo.next;if(null!==t)lo=t,ao=e;else{if(null===e)throw Error(r(310));e={memoizedState:(ao=e).memoizedState,baseState:ao.baseState,baseQueue:ao.baseQueue,queue:ao.queue,next:null},null===lo?oo.memoizedState=lo=e:lo=lo.next=e}return lo}function So(e,t){return"function"===typeof t?t(e):t}function wo(e){var t=Co(),i=t.queue;if(null===i)throw Error(r(311));i.lastRenderedReducer=e;var s=ao,n=s.baseQueue,o=i.pending;if(null!==o){if(null!==n){var a=n.next;n.next=o.next,o.next=a}s.baseQueue=n=o,i.pending=null}if(null!==n){o=n.next,s=s.baseState;var l=a=null,h=null,c=o;do{var d=c.lane;if((ro&d)===d)null!==h&&(h=h.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),s=c.hasEagerState?c.eagerState:e(s,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===h?(l=h=u,a=s):h=h.next=u,oo.lanes|=d,Ol|=d}c=c.next}while(null!==c&&c!==o);null===h?a=s:h.next=l,os(s,t.memoizedState)||(Ca=!0),t.memoizedState=s,t.baseState=a,t.baseQueue=h,i.lastRenderedState=s}if(null!==(e=i.interleaved)){n=e;do{o=n.lane,oo.lanes|=o,Ol|=o,n=n.next}while(n!==e)}else null===n&&(i.lanes=0);return[t.memoizedState,i.dispatch]}function bo(e){var t=Co(),i=t.queue;if(null===i)throw Error(r(311));i.lastRenderedReducer=e;var s=i.dispatch,n=i.pending,o=t.memoizedState;if(null!==n){i.pending=null;var a=n=n.next;do{o=e(o,a.action),a=a.next}while(a!==n);os(o,t.memoizedState)||(Ca=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),i.lastRenderedState=o}return[o,s]}function xo(){}function Mo(e,t){var i=oo,s=Co(),n=t(),o=!os(s.memoizedState,n);if(o&&(s.memoizedState=n,Ca=!0),s=s.queue,Oo(Ro.bind(null,i,s,e),[e]),s.getSnapshot!==t||o||null!==lo&&1&lo.memoizedState.tag){if(i.flags|=2048,Po(9,Io.bind(null,i,s,n,t),void 0,null),null===Al)throw Error(r(349));0!==(30&ro)||Do(i,t,n)}return n}function Do(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},null===(t=oo.updateQueue)?(t={lastEffect:null,stores:null},oo.updateQueue=t,t.stores=[e]):null===(i=t.stores)?t.stores=[e]:i.push(e)}function Io(e,t,i,s){t.value=i,t.getSnapshot=s,Eo(t)&&Ao(e)}function Ro(e,t,i){return i((function(){Eo(t)&&Ao(e)}))}function Eo(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!os(e,i)}catch(s){return!0}}function Ao(e){var t=kr(e,1);null!==t&&ih(t,e,1,-1)}function To(e){var t=yo();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:So,lastRenderedState:e},t.queue=e,e=e.dispatch=Yo.bind(null,oo,e),[t.memoizedState,e]}function Po(e,t,i,s){return e={tag:e,create:t,destroy:i,deps:s,next:null},null===(t=oo.updateQueue)?(t={lastEffect:null,stores:null},oo.updateQueue=t,t.lastEffect=e.next=e):null===(i=t.lastEffect)?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Lo(){return Co().memoizedState}function Fo(e,t,i,s){var n=yo();oo.flags|=e,n.memoizedState=Po(1|t,i,void 0,void 0===s?null:s)}function ko(e,t,i,s){var n=Co();s=void 0===s?null:s;var r=void 0;if(null!==ao){var o=ao.memoizedState;if(r=o.destroy,null!==s&&mo(s,o.deps))return void(n.memoizedState=Po(t,i,r,s))}oo.flags|=e,n.memoizedState=Po(1|t,i,r,s)}function No(e,t){return Fo(8390656,8,e,t)}function Oo(e,t){return ko(2048,8,e,t)}function Go(e,t){return ko(4,2,e,t)}function Bo(e,t){return ko(4,4,e,t)}function Vo(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function zo(e,t,i){return i=null!==i&&void 0!==i?i.concat([e]):null,ko(4,4,Vo.bind(null,t,e),i)}function Ho(){}function Wo(e,t){var i=Co();t=void 0===t?null:t;var s=i.memoizedState;return null!==s&&null!==t&&mo(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function jo(e,t){var i=Co();t=void 0===t?null:t;var s=i.memoizedState;return null!==s&&null!==t&&mo(t,s[1])?s[0]:(e=e(),i.memoizedState=[e,t],e)}function Uo(e,t,i){return 0===(21&ro)?(e.baseState&&(e.baseState=!1,Ca=!0),e.memoizedState=i):(os(i,t)||(i=mt(),oo.lanes|=i,Ol|=i,e.baseState=!0),t)}function _o(e,t){var i=Ct;Ct=0!==i&&4>i?i:4,e(!0);var s=no.transition;no.transition={};try{e(!1),t()}finally{Ct=i,no.transition=s}}function Ko(){return Co().memoizedState}function $o(e,t,i){var s=th(e);if(i={lane:s,action:i,hasEagerState:!1,eagerState:null,next:null},Zo(e))qo(t,i);else if(null!==(i=Fr(e,t,i,s))){ih(i,e,s,eh()),Qo(i,t,s)}}function Yo(e,t,i){var s=th(e),n={lane:s,action:i,hasEagerState:!1,eagerState:null,next:null};if(Zo(e))qo(t,n);else{var r=e.alternate;if(0===e.lanes&&(null===r||0===r.lanes)&&null!==(r=t.lastRenderedReducer))try{var o=t.lastRenderedState,a=r(o,i);if(n.hasEagerState=!0,n.eagerState=a,os(a,o)){var l=t.interleaved;return null===l?(n.next=n,Lr(t)):(n.next=l.next,l.next=n),void(t.interleaved=n)}}catch(h){}null!==(i=Fr(e,t,n,s))&&(ih(i,e,s,n=eh()),Qo(i,t,s))}}function Zo(e){var t=e.alternate;return e===oo||null!==t&&t===oo}function qo(e,t){co=ho=!0;var i=e.pending;null===i?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Qo(e,t,i){if(0!==(4194240&i)){var s=t.lanes;i|=s&=e.pendingLanes,t.lanes=i,yt(e,i)}}var Xo={readContext:Tr,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useInsertionEffect:go,useLayoutEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useMutableSource:go,useSyncExternalStore:go,useId:go,unstable_isNewReconciler:!1},Jo={readContext:Tr,useCallback:function(e,t){return yo().memoizedState=[e,void 0===t?null:t],e},useContext:Tr,useEffect:No,useImperativeHandle:function(e,t,i){return i=null!==i&&void 0!==i?i.concat([e]):null,Fo(4194308,4,Vo.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Fo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fo(4,2,e,t)},useMemo:function(e,t){var i=yo();return t=void 0===t?null:t,e=e(),i.memoizedState=[e,t],e},useReducer:function(e,t,i){var s=yo();return t=void 0!==i?i(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=$o.bind(null,oo,e),[s.memoizedState,e]},useRef:function(e){return e={current:e},yo().memoizedState=e},useState:To,useDebugValue:Ho,useDeferredValue:function(e){return yo().memoizedState=e},useTransition:function(){var e=To(!1),t=e[0];return e=_o.bind(null,e[1]),yo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,i){var s=oo,n=yo();if(nr){if(void 0===i)throw Error(r(407));i=i()}else{if(i=t(),null===Al)throw Error(r(349));0!==(30&ro)||Do(s,t,i)}n.memoizedState=i;var o={value:i,getSnapshot:t};return n.queue=o,No(Ro.bind(null,s,o,e),[e]),s.flags|=2048,Po(9,Io.bind(null,s,o,i,t),void 0,null),i},useId:function(){var e=yo(),t=Al.identifierPrefix;if(nr){var i=Qn;t=":"+t+"R"+(i=(qn&~(1<<32-ot(qn)-1)).toString(32)+i),0<(i=uo++)&&(t+="H"+i.toString(32)),t+=":"}else t=":"+t+"r"+(i=po++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ea={readContext:Tr,useCallback:Wo,useContext:Tr,useEffect:Oo,useImperativeHandle:zo,useInsertionEffect:Go,useLayoutEffect:Bo,useMemo:jo,useReducer:wo,useRef:Lo,useState:function(){return wo(So)},useDebugValue:Ho,useDeferredValue:function(e){return Uo(Co(),ao.memoizedState,e)},useTransition:function(){return[wo(So)[0],Co().memoizedState]},useMutableSource:xo,useSyncExternalStore:Mo,useId:Ko,unstable_isNewReconciler:!1},ta={readContext:Tr,useCallback:Wo,useContext:Tr,useEffect:Oo,useImperativeHandle:zo,useInsertionEffect:Go,useLayoutEffect:Bo,useMemo:jo,useReducer:bo,useRef:Lo,useState:function(){return bo(So)},useDebugValue:Ho,useDeferredValue:function(e){var t=Co();return null===ao?t.memoizedState=e:Uo(t,ao.memoizedState,e)},useTransition:function(){return[bo(So)[0],Co().memoizedState]},useMutableSource:xo,useSyncExternalStore:Mo,useId:Ko,unstable_isNewReconciler:!1};function ia(e,t){if(e&&e.defaultProps){for(var i in t=G({},t),e=e.defaultProps)void 0===t[i]&&(t[i]=e[i]);return t}return t}function sa(e,t,i,s){i=null===(i=i(s,t=e.memoizedState))||void 0===i?t:G({},t,i),e.memoizedState=i,0===e.lanes&&(e.updateQueue.baseState=i)}var na={isMounted:function(e){return!!(e=e._reactInternals)&&We(e)===e},enqueueSetState:function(e,t,i){e=e._reactInternals;var s=eh(),n=th(e),r=Br(s,n);r.payload=t,void 0!==i&&null!==i&&(r.callback=i),null!==(t=Vr(e,r,n))&&(ih(t,e,n,s),zr(t,e,n))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=eh(),n=th(e),r=Br(s,n);r.tag=1,r.payload=t,void 0!==i&&null!==i&&(r.callback=i),null!==(t=Vr(e,r,n))&&(ih(t,e,n,s),zr(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=eh(),s=th(e),n=Br(i,s);n.tag=2,void 0!==t&&null!==t&&(n.callback=t),null!==(t=Vr(e,n,s))&&(ih(t,e,s,i),zr(t,e,s))}};function ra(e,t,i,s,n,r,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(s,r,o):!t.prototype||!t.prototype.isPureReactComponent||(!as(i,s)||!as(n,r))}function oa(e,t,i){var s=!1,n=Rn,r=t.contextType;return"object"===typeof r&&null!==r?r=Tr(r):(n=Ln(t)?Tn:En.current,r=(s=null!==(s=t.contextTypes)&&void 0!==s)?Pn(e,n):Rn),t=new t(i,r),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=na,e.stateNode=t,t._reactInternals=e,s&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=r),t}function aa(e,t,i,s){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(i,s),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&na.enqueueReplaceState(t,t.state,null)}function la(e,t,i,s){var n=e.stateNode;n.props=i,n.state=e.memoizedState,n.refs={},Or(e);var r=t.contextType;"object"===typeof r&&null!==r?n.context=Tr(r):(r=Ln(t)?Tn:En.current,n.context=Pn(e,r)),n.state=e.memoizedState,"function"===typeof(r=t.getDerivedStateFromProps)&&(sa(e,t,r,i),n.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof n.getSnapshotBeforeUpdate||"function"!==typeof n.UNSAFE_componentWillMount&&"function"!==typeof n.componentWillMount||(t=n.state,"function"===typeof n.componentWillMount&&n.componentWillMount(),"function"===typeof n.UNSAFE_componentWillMount&&n.UNSAFE_componentWillMount(),t!==n.state&&na.enqueueReplaceState(n,n.state,null),Wr(e,i,n,s),n.state=e.memoizedState),"function"===typeof n.componentDidMount&&(e.flags|=4194308)}function ha(e,t){try{var i="",s=t;do{i+=H(s),s=s.return}while(s);var n=i}catch(r){n="\nError generating stack: "+r.message+"\n"+r.stack}return{value:e,source:t,stack:n,digest:null}}function ca(e,t,i){return{value:e,source:null,stack:null!=i?i:null,digest:null!=t?t:null}}function da(e,t){try{console.error(t.value)}catch(i){setTimeout((function(){throw i}))}}var ua="function"===typeof WeakMap?WeakMap:Map;function pa(e,t,i){(i=Br(-1,i)).tag=3,i.payload={element:null};var s=t.value;return i.callback=function(){Ul||(Ul=!0,_l=s),da(0,t)},i}function ga(e,t,i){(i=Br(-1,i)).tag=3;var s=e.type.getDerivedStateFromError;if("function"===typeof s){var n=t.value;i.payload=function(){return s(n)},i.callback=function(){da(0,t)}}var r=e.stateNode;return null!==r&&"function"===typeof r.componentDidCatch&&(i.callback=function(){da(0,t),"function"!==typeof s&&(null===Kl?Kl=new Set([this]):Kl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),i}function ma(e,t,i){var s=e.pingCache;if(null===s){s=e.pingCache=new ua;var n=new Set;s.set(t,n)}else void 0===(n=s.get(t))&&(n=new Set,s.set(t,n));n.has(i)||(n.add(i),e=Dh.bind(null,e,t,i),t.then(e,e))}function fa(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function va(e,t,i,s,n){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,i.flags|=131072,i.flags&=-52805,1===i.tag&&(null===i.alternate?i.tag=17:((t=Br(-1,1)).tag=2,Vr(i,t,1))),i.lanes|=1),e):(e.flags|=65536,e.lanes=n,e)}var ya=S.ReactCurrentOwner,Ca=!1;function Sa(e,t,i,s){t.child=null===e?wr(t,null,i,s):Sr(t,e.child,i,s)}function wa(e,t,i,s,n){i=i.render;var r=t.ref;return Ar(t,n),s=fo(e,t,i,s,r,n),i=vo(),null===e||Ca?(nr&&i&&er(t),t.flags|=1,Sa(e,t,s,n),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ua(e,t,n))}function ba(e,t,i,s,n){if(null===e){var r=i.type;return"function"!==typeof r||Lh(r)||void 0!==r.defaultProps||null!==i.compare||void 0!==i.defaultProps?((e=kh(i.type,null,s,t,t.mode,n)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=r,xa(e,t,r,s,n))}if(r=e.child,0===(e.lanes&n)){var o=r.memoizedProps;if((i=null!==(i=i.compare)?i:as)(o,s)&&e.ref===t.ref)return Ua(e,t,n)}return t.flags|=1,(e=Fh(r,s)).ref=t.ref,e.return=t,t.child=e}function xa(e,t,i,s,n){if(null!==e){var r=e.memoizedProps;if(as(r,s)&&e.ref===t.ref){if(Ca=!1,t.pendingProps=s=r,0===(e.lanes&n))return t.lanes=e.lanes,Ua(e,t,n);0!==(131072&e.flags)&&(Ca=!0)}}return Ia(e,t,i,s,n)}function Ma(e,t,i){var s=t.pendingProps,n=s.children,r=null!==e?e.memoizedState:null;if("hidden"===s.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},In(Fl,Ll),Ll|=i;else{if(0===(1073741824&i))return e=null!==r?r.baseLanes|i:i,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,In(Fl,Ll),Ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=null!==r?r.baseLanes:i,In(Fl,Ll),Ll|=s}else null!==r?(s=r.baseLanes|i,t.memoizedState=null):s=i,In(Fl,Ll),Ll|=s;return Sa(e,t,n,i),t.child}function Da(e,t){var i=t.ref;(null===e&&null!==i||null!==e&&e.ref!==i)&&(t.flags|=512,t.flags|=2097152)}function Ia(e,t,i,s,n){var r=Ln(i)?Tn:En.current;return r=Pn(t,r),Ar(t,n),i=fo(e,t,i,s,r,n),s=vo(),null===e||Ca?(nr&&s&&er(t),t.flags|=1,Sa(e,t,i,n),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ua(e,t,n))}function Ra(e,t,i,s,n){if(Ln(i)){var r=!0;On(t)}else r=!1;if(Ar(t,n),null===t.stateNode)ja(e,t),oa(t,i,s),la(t,i,s,n),s=!0;else if(null===e){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,h=i.contextType;"object"===typeof h&&null!==h?h=Tr(h):h=Pn(t,h=Ln(i)?Tn:En.current);var c=i.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof o.getSnapshotBeforeUpdate;d||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==s||l!==h)&&aa(t,o,s,h),Nr=!1;var u=t.memoizedState;o.state=u,Wr(t,s,o,n),l=t.memoizedState,a!==s||u!==l||An.current||Nr?("function"===typeof c&&(sa(t,i,c,s),l=t.memoizedState),(a=Nr||ra(t,i,a,s,u,l,h))?(d||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=l),o.props=s,o.state=l,o.context=h,s=a):("function"===typeof o.componentDidMount&&(t.flags|=4194308),s=!1)}else{o=t.stateNode,Gr(e,t),a=t.memoizedProps,h=t.type===t.elementType?a:ia(t.type,a),o.props=h,d=t.pendingProps,u=o.context,"object"===typeof(l=i.contextType)&&null!==l?l=Tr(l):l=Pn(t,l=Ln(i)?Tn:En.current);var p=i.getDerivedStateFromProps;(c="function"===typeof p||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==d||u!==l)&&aa(t,o,s,l),Nr=!1,u=t.memoizedState,o.state=u,Wr(t,s,o,n);var g=t.memoizedState;a!==d||u!==g||An.current||Nr?("function"===typeof p&&(sa(t,i,p,s),g=t.memoizedState),(h=Nr||ra(t,i,h,s,u,g,l)||!1)?(c||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(s,g,l),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(s,g,l)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=g),o.props=s,o.state=g,o.context=l,s=h):("function"!==typeof o.componentDidUpdate||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=1024),s=!1)}return Ea(e,t,i,s,r,n)}function Ea(e,t,i,s,n,r){Da(e,t);var o=0!==(128&t.flags);if(!s&&!o)return n&&Gn(t,i,!1),Ua(e,t,r);s=t.stateNode,ya.current=t;var a=o&&"function"!==typeof i.getDerivedStateFromError?null:s.render();return t.flags|=1,null!==e&&o?(t.child=Sr(t,e.child,null,r),t.child=Sr(t,null,a,r)):Sa(e,t,a,r),t.memoizedState=s.state,n&&Gn(t,i,!0),t.child}function Aa(e){var t=e.stateNode;t.pendingContext?kn(0,t.pendingContext,t.pendingContext!==t.context):t.context&&kn(0,t.context,!1),Zr(e,t.containerInfo)}function Ta(e,t,i,s,n){return pr(),gr(n),t.flags|=256,Sa(e,t,i,s),t.child}var Pa,La,Fa,ka,Na={dehydrated:null,treeContext:null,retryLane:0};function Oa(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ga(e,t,i){var s,n=t.pendingProps,o=Jr.current,a=!1,l=0!==(128&t.flags);if((s=l)||(s=(null===e||null!==e.memoizedState)&&0!==(2&o)),s?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),In(Jr,1&o),null===e)return hr(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=n.children,e=n.fallback,a?(n=t.mode,a=t.child,l={mode:"hidden",children:l},0===(1&n)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Oh(l,n,0,null),e=Nh(e,n,i,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Oa(i),t.memoizedState=Na,e):Ba(t,l));if(null!==(o=e.memoizedState)&&null!==(s=o.dehydrated))return function(e,t,i,s,n,o,a){if(i)return 256&t.flags?(t.flags&=-257,Va(e,t,a,s=ca(Error(r(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=s.fallback,n=t.mode,s=Oh({mode:"visible",children:s.children},n,0,null),(o=Nh(o,n,a,null)).flags|=2,s.return=t,o.return=t,s.sibling=o,t.child=s,0!==(1&t.mode)&&Sr(t,e.child,null,a),t.child.memoizedState=Oa(a),t.memoizedState=Na,o);if(0===(1&t.mode))return Va(e,t,a,null);if("$!"===n.data){if(s=n.nextSibling&&n.nextSibling.dataset)var l=s.dgst;return s=l,Va(e,t,a,s=ca(o=Error(r(419)),s,void 0))}if(l=0!==(a&e.childLanes),Ca||l){if(null!==(s=Al)){switch(a&-a){case 4:n=2;break;case 16:n=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:n=32;break;case 536870912:n=268435456;break;default:n=0}0!==(n=0!==(n&(s.suspendedLanes|a))?0:n)&&n!==o.retryLane&&(o.retryLane=n,kr(e,n),ih(s,e,n,-1))}return mh(),Va(e,t,a,s=ca(Error(r(421))))}return"$?"===n.data?(t.flags|=128,t.child=e.child,t=Rh.bind(null,e),n._reactRetry=t,null):(e=o.treeContext,sr=hn(n.nextSibling),ir=t,nr=!0,rr=null,null!==e&&($n[Yn++]=qn,$n[Yn++]=Qn,$n[Yn++]=Zn,qn=e.id,Qn=e.overflow,Zn=t),t=Ba(t,s.children),t.flags|=4096,t)}(e,t,l,n,s,o,i);if(a){a=n.fallback,l=t.mode,s=(o=e.child).sibling;var h={mode:"hidden",children:n.children};return 0===(1&l)&&t.child!==o?((n=t.child).childLanes=0,n.pendingProps=h,t.deletions=null):(n=Fh(o,h)).subtreeFlags=14680064&o.subtreeFlags,null!==s?a=Fh(s,a):(a=Nh(a,l,i,null)).flags|=2,a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,l=null===(l=e.child.memoizedState)?Oa(i):{baseLanes:l.baseLanes|i,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~i,t.memoizedState=Na,n}return e=(a=e.child).sibling,n=Fh(a,{mode:"visible",children:n.children}),0===(1&t.mode)&&(n.lanes=i),n.return=t,n.sibling=null,null!==e&&(null===(i=t.deletions)?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=n,t.memoizedState=null,n}function Ba(e,t){return(t=Oh({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Va(e,t,i,s){return null!==s&&gr(s),Sr(t,e.child,null,i),(e=Ba(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function za(e,t,i){e.lanes|=t;var s=e.alternate;null!==s&&(s.lanes|=t),Er(e.return,t,i)}function Ha(e,t,i,s,n){var r=e.memoizedState;null===r?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:n}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=s,r.tail=i,r.tailMode=n)}function Wa(e,t,i){var s=t.pendingProps,n=s.revealOrder,r=s.tail;if(Sa(e,t,s.children,i),0!==(2&(s=Jr.current)))s=1&s|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&za(e,i,t);else if(19===e.tag)za(e,i,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(In(Jr,s),0===(1&t.mode))t.memoizedState=null;else switch(n){case"forwards":for(i=t.child,n=null;null!==i;)null!==(e=i.alternate)&&null===eo(e)&&(n=i),i=i.sibling;null===(i=n)?(n=t.child,t.child=null):(n=i.sibling,i.sibling=null),Ha(t,!1,n,i,r);break;case"backwards":for(i=null,n=t.child,t.child=null;null!==n;){if(null!==(e=n.alternate)&&null===eo(e)){t.child=n;break}e=n.sibling,n.sibling=i,i=n,n=e}Ha(t,!0,i,null,r);break;case"together":Ha(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ja(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ua(e,t,i){if(null!==e&&(t.dependencies=e.dependencies),Ol|=t.lanes,0===(i&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(i=Fh(e=t.child,e.pendingProps),t.child=i,i.return=t;null!==e.sibling;)e=e.sibling,(i=i.sibling=Fh(e,e.pendingProps)).return=t;i.sibling=null}return t.child}function _a(e,t){if(!nr)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;null!==t;)null!==t.alternate&&(i=t),t=t.sibling;null===i?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;null!==i;)null!==i.alternate&&(s=i),i=i.sibling;null===s?t||null===e.tail?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ka(e){var t=null!==e.alternate&&e.alternate.child===e.child,i=0,s=0;if(t)for(var n=e.child;null!==n;)i|=n.lanes|n.childLanes,s|=14680064&n.subtreeFlags,s|=14680064&n.flags,n.return=e,n=n.sibling;else for(n=e.child;null!==n;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags,s|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function $a(e,t,i){var s=t.pendingProps;switch(tr(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ka(t),null;case 1:case 17:return Ln(t.type)&&Fn(),Ka(t),null;case 3:return s=t.stateNode,qr(),Dn(An),Dn(En),io(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),null!==e&&null!==e.child||(dr(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==rr&&(oh(rr),rr=null))),La(e,t),Ka(t),null;case 5:Xr(t);var n=Yr($r.current);if(i=t.type,null!==e&&null!=t.stateNode)Fa(e,t,i,s,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(null===t.stateNode)throw Error(r(166));return Ka(t),null}if(e=Yr(_r.current),dr(t)){s=t.stateNode,i=t.type;var o=t.memoizedProps;switch(s[un]=t,s[pn]=o,e=0!==(1&t.mode),i){case"dialog":Bs("cancel",s),Bs("close",s);break;case"iframe":case"object":case"embed":Bs("load",s);break;case"video":case"audio":for(n=0;n<ks.length;n++)Bs(ks[n],s);break;case"source":Bs("error",s);break;case"img":case"image":case"link":Bs("error",s),Bs("load",s);break;case"details":Bs("toggle",s);break;case"input":q(s,o),Bs("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!o.multiple},Bs("invalid",s);break;case"textarea":ne(s,o),Bs("invalid",s)}for(var l in ye(i,o),n=null,o)if(o.hasOwnProperty(l)){var h=o[l];"children"===l?"string"===typeof h?s.textContent!==h&&(!0!==o.suppressHydrationWarning&&Qs(s.textContent,h,e),n=["children",h]):"number"===typeof h&&s.textContent!==""+h&&(!0!==o.suppressHydrationWarning&&Qs(s.textContent,h,e),n=["children",""+h]):a.hasOwnProperty(l)&&null!=h&&"onScroll"===l&&Bs("scroll",s)}switch(i){case"input":K(s),J(s,o,!0);break;case"textarea":K(s),oe(s);break;case"select":case"option":break;default:"function"===typeof o.onClick&&(s.onclick=Xs)}s=n,t.updateQueue=s,null!==s&&(t.flags|=4)}else{l=9===n.nodeType?n:n.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(i)),"http://www.w3.org/1999/xhtml"===e?"script"===i?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof s.is?e=l.createElement(i,{is:s.is}):(e=l.createElement(i),"select"===i&&(l=e,s.multiple?l.multiple=!0:s.size&&(l.size=s.size))):e=l.createElementNS(e,i),e[un]=t,e[pn]=s,Pa(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ce(i,s),i){case"dialog":Bs("cancel",e),Bs("close",e),n=s;break;case"iframe":case"object":case"embed":Bs("load",e),n=s;break;case"video":case"audio":for(n=0;n<ks.length;n++)Bs(ks[n],e);n=s;break;case"source":Bs("error",e),n=s;break;case"img":case"image":case"link":Bs("error",e),Bs("load",e),n=s;break;case"details":Bs("toggle",e),n=s;break;case"input":q(e,s),n=Z(e,s),Bs("invalid",e);break;case"option":default:n=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},n=G({},s,{value:void 0}),Bs("invalid",e);break;case"textarea":ne(e,s),n=se(e,s),Bs("invalid",e)}for(o in ye(i,n),h=n)if(h.hasOwnProperty(o)){var c=h[o];"style"===o?fe(e,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===o?"string"===typeof c?("textarea"!==i||""!==c)&&ue(e,c):"number"===typeof c&&ue(e,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(a.hasOwnProperty(o)?null!=c&&"onScroll"===o&&Bs("scroll",e):null!=c&&C(e,o,c,l))}switch(i){case"input":K(e),J(e,s,!1);break;case"textarea":K(e),oe(e);break;case"option":null!=s.value&&e.setAttribute("value",""+U(s.value));break;case"select":e.multiple=!!s.multiple,null!=(o=s.value)?ie(e,!!s.multiple,o,!1):null!=s.defaultValue&&ie(e,!!s.multiple,s.defaultValue,!0);break;default:"function"===typeof n.onClick&&(e.onclick=Xs)}switch(i){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ka(t),null;case 6:if(e&&null!=t.stateNode)ka(e,t,e.memoizedProps,s);else{if("string"!==typeof s&&null===t.stateNode)throw Error(r(166));if(i=Yr($r.current),Yr(_r.current),dr(t)){if(s=t.stateNode,i=t.memoizedProps,s[un]=t,(o=s.nodeValue!==i)&&null!==(e=ir))switch(e.tag){case 3:Qs(s.nodeValue,i,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qs(s.nodeValue,i,0!==(1&e.mode))}o&&(t.flags|=4)}else(s=(9===i.nodeType?i:i.ownerDocument).createTextNode(s))[un]=t,t.stateNode=s}return Ka(t),null;case 13:if(Dn(Jr),s=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(nr&&null!==sr&&0!==(1&t.mode)&&0===(128&t.flags))ur(),pr(),t.flags|=98560,o=!1;else if(o=dr(t),null!==s&&null!==s.dehydrated){if(null===e){if(!o)throw Error(r(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(r(317));o[un]=t}else pr(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ka(t),o=!1}else null!==rr&&(oh(rr),rr=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=i,t):((s=null!==s)!==(null!==e&&null!==e.memoizedState)&&s&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&Jr.current)?0===kl&&(kl=3):mh())),null!==t.updateQueue&&(t.flags|=4),Ka(t),null);case 4:return qr(),La(e,t),null===e&&Hs(t.stateNode.containerInfo),Ka(t),null;case 10:return Rr(t.type._context),Ka(t),null;case 19:if(Dn(Jr),null===(o=t.memoizedState))return Ka(t),null;if(s=0!==(128&t.flags),null===(l=o.rendering))if(s)_a(o,!1);else{if(0!==kl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=eo(e))){for(t.flags|=128,_a(o,!1),null!==(s=l.updateQueue)&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=i,i=t.child;null!==i;)e=s,(o=i).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),i=i.sibling;return In(Jr,1&Jr.current|2),t.child}e=e.sibling}null!==o.tail&&Qe()>Wl&&(t.flags|=128,s=!0,_a(o,!1),t.lanes=4194304)}else{if(!s)if(null!==(e=eo(l))){if(t.flags|=128,s=!0,null!==(i=e.updateQueue)&&(t.updateQueue=i,t.flags|=4),_a(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!nr)return Ka(t),null}else 2*Qe()-o.renderingStartTime>Wl&&1073741824!==i&&(t.flags|=128,s=!0,_a(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(i=o.last)?i.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,i=Jr.current,In(Jr,s?1&i|2:1&i),t):(Ka(t),null);case 22:case 23:return dh(),s=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==s&&(t.flags|=8192),s&&0!==(1&t.mode)?0!==(1073741824&Ll)&&(Ka(t),6&t.subtreeFlags&&(t.flags|=8192)):Ka(t),null;case 24:case 25:return null}throw Error(r(156,t.tag))}function Ya(e,t){switch(tr(t),t.tag){case 1:return Ln(t.type)&&Fn(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return qr(),Dn(An),Dn(En),io(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Xr(t),null;case 13:if(Dn(Jr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));pr()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Dn(Jr),null;case 4:return qr(),null;case 10:return Rr(t.type._context),null;case 22:case 23:return dh(),null;default:return null}}Pa=function(e,t){for(var i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},La=function(){},Fa=function(e,t,i,s){var n=e.memoizedProps;if(n!==s){e=t.stateNode,Yr(_r.current);var r,o=null;switch(i){case"input":n=Z(e,n),s=Z(e,s),o=[];break;case"select":n=G({},n,{value:void 0}),s=G({},s,{value:void 0}),o=[];break;case"textarea":n=se(e,n),s=se(e,s),o=[];break;default:"function"!==typeof n.onClick&&"function"===typeof s.onClick&&(e.onclick=Xs)}for(c in ye(i,s),i=null,n)if(!s.hasOwnProperty(c)&&n.hasOwnProperty(c)&&null!=n[c])if("style"===c){var l=n[c];for(r in l)l.hasOwnProperty(r)&&(i||(i={}),i[r]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(a.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in s){var h=s[c];if(l=null!=n?n[c]:void 0,s.hasOwnProperty(c)&&h!==l&&(null!=h||null!=l))if("style"===c)if(l){for(r in l)!l.hasOwnProperty(r)||h&&h.hasOwnProperty(r)||(i||(i={}),i[r]="");for(r in h)h.hasOwnProperty(r)&&l[r]!==h[r]&&(i||(i={}),i[r]=h[r])}else i||(o||(o=[]),o.push(c,i)),i=h;else"dangerouslySetInnerHTML"===c?(h=h?h.__html:void 0,l=l?l.__html:void 0,null!=h&&l!==h&&(o=o||[]).push(c,h)):"children"===c?"string"!==typeof h&&"number"!==typeof h||(o=o||[]).push(c,""+h):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(a.hasOwnProperty(c)?(null!=h&&"onScroll"===c&&Bs("scroll",e),o||l===h||(o=[])):(o=o||[]).push(c,h))}i&&(o=o||[]).push("style",i);var c=o;(t.updateQueue=c)&&(t.flags|=4)}},ka=function(e,t,i,s){i!==s&&(t.flags|=4)};var Za=!1,qa=!1,Qa="function"===typeof WeakSet?WeakSet:Set,Xa=null;function Ja(e,t){var i=e.ref;if(null!==i)if("function"===typeof i)try{i(null)}catch(s){Mh(e,t,s)}else i.current=null}function el(e,t,i){try{i()}catch(s){Mh(e,t,s)}}var tl=!1;function il(e,t,i){var s=t.updateQueue;if(null!==(s=null!==s?s.lastEffect:null)){var n=s=s.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&el(t,i,r)}n=n.next}while(n!==s)}}function sl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var i=t=t.next;do{if((i.tag&e)===e){var s=i.create;i.destroy=s()}i=i.next}while(i!==t)}}function nl(e){var t=e.ref;if(null!==t){var i=e.stateNode;e.tag,e=i,"function"===typeof t?t(e):t.current=e}}function rl(e){var t=e.alternate;null!==t&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[un],delete t[pn],delete t[mn],delete t[fn],delete t[vn])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ol(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,i){var s=e.tag;if(5===s||6===s)e=e.stateNode,t?8===i.nodeType?i.parentNode.insertBefore(e,t):i.insertBefore(e,t):(8===i.nodeType?(t=i.parentNode).insertBefore(e,i):(t=i).appendChild(e),null!==(i=i._reactRootContainer)&&void 0!==i||null!==t.onclick||(t.onclick=Xs));else if(4!==s&&null!==(e=e.child))for(ll(e,t,i),e=e.sibling;null!==e;)ll(e,t,i),e=e.sibling}function hl(e,t,i){var s=e.tag;if(5===s||6===s)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(4!==s&&null!==(e=e.child))for(hl(e,t,i),e=e.sibling;null!==e;)hl(e,t,i),e=e.sibling}var cl=null,dl=!1;function ul(e,t,i){for(i=i.child;null!==i;)pl(e,t,i),i=i.sibling}function pl(e,t,i){if(rt&&"function"===typeof rt.onCommitFiberUnmount)try{rt.onCommitFiberUnmount(nt,i)}catch(a){}switch(i.tag){case 5:qa||Ja(i,t);case 6:var s=cl,n=dl;cl=null,ul(e,t,i),dl=n,null!==(cl=s)&&(dl?(e=cl,i=i.stateNode,8===e.nodeType?e.parentNode.removeChild(i):e.removeChild(i)):cl.removeChild(i.stateNode));break;case 18:null!==cl&&(dl?(e=cl,i=i.stateNode,8===e.nodeType?ln(e.parentNode,i):1===e.nodeType&&ln(e,i),Wt(e)):ln(cl,i.stateNode));break;case 4:s=cl,n=dl,cl=i.stateNode.containerInfo,dl=!0,ul(e,t,i),cl=s,dl=n;break;case 0:case 11:case 14:case 15:if(!qa&&(null!==(s=i.updateQueue)&&null!==(s=s.lastEffect))){n=s=s.next;do{var r=n,o=r.destroy;r=r.tag,void 0!==o&&(0!==(2&r)||0!==(4&r))&&el(i,t,o),n=n.next}while(n!==s)}ul(e,t,i);break;case 1:if(!qa&&(Ja(i,t),"function"===typeof(s=i.stateNode).componentWillUnmount))try{s.props=i.memoizedProps,s.state=i.memoizedState,s.componentWillUnmount()}catch(a){Mh(i,t,a)}ul(e,t,i);break;case 21:ul(e,t,i);break;case 22:1&i.mode?(qa=(s=qa)||null!==i.memoizedState,ul(e,t,i),qa=s):ul(e,t,i);break;default:ul(e,t,i)}}function gl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var i=e.stateNode;null===i&&(i=e.stateNode=new Qa),t.forEach((function(t){var s=Eh.bind(null,e,t);i.has(t)||(i.add(t),t.then(s,s))}))}}function ml(e,t){var i=t.deletions;if(null!==i)for(var s=0;s<i.length;s++){var n=i[s];try{var o=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:cl=l.stateNode,dl=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===cl)throw Error(r(160));pl(o,a,n),cl=null,dl=!1;var h=n.alternate;null!==h&&(h.return=null),n.return=null}catch(c){Mh(n,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)fl(t,e),t=t.sibling}function fl(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),vl(e),4&s){try{il(3,e,e.return),sl(3,e)}catch(f){Mh(e,e.return,f)}try{il(5,e,e.return)}catch(f){Mh(e,e.return,f)}}break;case 1:ml(t,e),vl(e),512&s&&null!==i&&Ja(i,i.return);break;case 5:if(ml(t,e),vl(e),512&s&&null!==i&&Ja(i,i.return),32&e.flags){var n=e.stateNode;try{ue(n,"")}catch(f){Mh(e,e.return,f)}}if(4&s&&null!=(n=e.stateNode)){var o=e.memoizedProps,a=null!==i?i.memoizedProps:o,l=e.type,h=e.updateQueue;if(e.updateQueue=null,null!==h)try{"input"===l&&"radio"===o.type&&null!=o.name&&Q(n,o),Ce(l,a);var c=Ce(l,o);for(a=0;a<h.length;a+=2){var d=h[a],u=h[a+1];"style"===d?fe(n,u):"dangerouslySetInnerHTML"===d?de(n,u):"children"===d?ue(n,u):C(n,d,u,c)}switch(l){case"input":X(n,o);break;case"textarea":re(n,o);break;case"select":var p=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!o.multiple;var g=o.value;null!=g?ie(n,!!o.multiple,g,!1):p!==!!o.multiple&&(null!=o.defaultValue?ie(n,!!o.multiple,o.defaultValue,!0):ie(n,!!o.multiple,o.multiple?[]:"",!1))}n[pn]=o}catch(f){Mh(e,e.return,f)}}break;case 6:if(ml(t,e),vl(e),4&s){if(null===e.stateNode)throw Error(r(162));n=e.stateNode,o=e.memoizedProps;try{n.nodeValue=o}catch(f){Mh(e,e.return,f)}}break;case 3:if(ml(t,e),vl(e),4&s&&null!==i&&i.memoizedState.isDehydrated)try{Wt(t.containerInfo)}catch(f){Mh(e,e.return,f)}break;case 4:default:ml(t,e),vl(e);break;case 13:ml(t,e),vl(e),8192&(n=e.child).flags&&(o=null!==n.memoizedState,n.stateNode.isHidden=o,!o||null!==n.alternate&&null!==n.alternate.memoizedState||(Hl=Qe())),4&s&&gl(e);break;case 22:if(d=null!==i&&null!==i.memoizedState,1&e.mode?(qa=(c=qa)||d,ml(t,e),qa=c):ml(t,e),vl(e),8192&s){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&0!==(1&e.mode))for(Xa=e,d=e.child;null!==d;){for(u=Xa=d;null!==Xa;){switch(g=(p=Xa).child,p.tag){case 0:case 11:case 14:case 15:il(4,p,p.return);break;case 1:Ja(p,p.return);var m=p.stateNode;if("function"===typeof m.componentWillUnmount){s=p,i=p.return;try{t=s,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(f){Mh(s,i,f)}}break;case 5:Ja(p,p.return);break;case 22:if(null!==p.memoizedState){wl(u);continue}}null!==g?(g.return=p,Xa=g):wl(u)}d=d.sibling}e:for(d=null,u=e;;){if(5===u.tag){if(null===d){d=u;try{n=u.stateNode,c?"function"===typeof(o=n.style).setProperty?o.setProperty("display","none","important"):o.display="none":(l=u.stateNode,a=void 0!==(h=u.memoizedProps.style)&&null!==h&&h.hasOwnProperty("display")?h.display:null,l.style.display=me("display",a))}catch(f){Mh(e,e.return,f)}}}else if(6===u.tag){if(null===d)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(f){Mh(e,e.return,f)}}else if((22!==u.tag&&23!==u.tag||null===u.memoizedState||u===e)&&null!==u.child){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;null===u.sibling;){if(null===u.return||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:ml(t,e),vl(e),4&s&&gl(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var i=e.return;null!==i;){if(ol(i)){var s=i;break e}i=i.return}throw Error(r(160))}switch(s.tag){case 5:var n=s.stateNode;32&s.flags&&(ue(n,""),s.flags&=-33),hl(e,al(e),n);break;case 3:case 4:var o=s.stateNode.containerInfo;ll(e,al(e),o);break;default:throw Error(r(161))}}catch(a){Mh(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,i){Xa=e,Cl(e,t,i)}function Cl(e,t,i){for(var s=0!==(1&e.mode);null!==Xa;){var n=Xa,r=n.child;if(22===n.tag&&s){var o=null!==n.memoizedState||Za;if(!o){var a=n.alternate,l=null!==a&&null!==a.memoizedState||qa;a=Za;var h=qa;if(Za=o,(qa=l)&&!h)for(Xa=n;null!==Xa;)l=(o=Xa).child,22===o.tag&&null!==o.memoizedState?bl(n):null!==l?(l.return=o,Xa=l):bl(n);for(;null!==r;)Xa=r,Cl(r,t,i),r=r.sibling;Xa=n,Za=a,qa=h}Sl(e)}else 0!==(8772&n.subtreeFlags)&&null!==r?(r.return=n,Xa=r):Sl(e)}}function Sl(e){for(;null!==Xa;){var t=Xa;if(0!==(8772&t.flags)){var i=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:qa||sl(5,t);break;case 1:var s=t.stateNode;if(4&t.flags&&!qa)if(null===i)s.componentDidMount();else{var n=t.elementType===t.type?i.memoizedProps:ia(t.type,i.memoizedProps);s.componentDidUpdate(n,i.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&jr(t,o,s);break;case 3:var a=t.updateQueue;if(null!==a){if(i=null,null!==t.child)switch(t.child.tag){case 5:case 1:i=t.child.stateNode}jr(t,a,i)}break;case 5:var l=t.stateNode;if(null===i&&4&t.flags){i=l;var h=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":h.autoFocus&&i.focus();break;case"img":h.src&&(i.src=h.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var u=d.dehydrated;null!==u&&Wt(u)}}}break;default:throw Error(r(163))}qa||512&t.flags&&nl(t)}catch(p){Mh(t,t.return,p)}}if(t===e){Xa=null;break}if(null!==(i=t.sibling)){i.return=t.return,Xa=i;break}Xa=t.return}}function wl(e){for(;null!==Xa;){var t=Xa;if(t===e){Xa=null;break}var i=t.sibling;if(null!==i){i.return=t.return,Xa=i;break}Xa=t.return}}function bl(e){for(;null!==Xa;){var t=Xa;try{switch(t.tag){case 0:case 11:case 15:var i=t.return;try{sl(4,t)}catch(l){Mh(t,i,l)}break;case 1:var s=t.stateNode;if("function"===typeof s.componentDidMount){var n=t.return;try{s.componentDidMount()}catch(l){Mh(t,n,l)}}var r=t.return;try{nl(t)}catch(l){Mh(t,r,l)}break;case 5:var o=t.return;try{nl(t)}catch(l){Mh(t,o,l)}}}catch(l){Mh(t,t.return,l)}if(t===e){Xa=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Xa=a;break}Xa=t.return}}var xl,Ml=Math.ceil,Dl=S.ReactCurrentDispatcher,Il=S.ReactCurrentOwner,Rl=S.ReactCurrentBatchConfig,El=0,Al=null,Tl=null,Pl=0,Ll=0,Fl=Mn(0),kl=0,Nl=null,Ol=0,Gl=0,Bl=0,Vl=null,zl=null,Hl=0,Wl=1/0,jl=null,Ul=!1,_l=null,Kl=null,$l=!1,Yl=null,Zl=0,ql=0,Ql=null,Xl=-1,Jl=0;function eh(){return 0!==(6&El)?Qe():-1!==Xl?Xl:Xl=Qe()}function th(e){return 0===(1&e.mode)?1:0!==(2&El)&&0!==Pl?Pl&-Pl:null!==mr.transition?(0===Jl&&(Jl=mt()),Jl):0!==(e=Ct)?e:e=void 0===(e=window.event)?16:qt(e.type)}function ih(e,t,i,s){if(50<ql)throw ql=0,Ql=null,Error(r(185));vt(e,i,s),0!==(2&El)&&e===Al||(e===Al&&(0===(2&El)&&(Gl|=i),4===kl&&ah(e,Pl)),sh(e,s),1===i&&0===El&&0===(1&t.mode)&&(Wl=Qe()+500,Vn&&Wn()))}function sh(e,t){var i=e.callbackNode;!function(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,n=e.expirationTimes,r=e.pendingLanes;0<r;){var o=31-ot(r),a=1<<o,l=n[o];-1===l?0!==(a&i)&&0===(a&s)||(n[o]=pt(a,t)):l<=t&&(e.expiredLanes|=a),r&=~a}}(e,t);var s=ut(e,e===Al?Pl:0);if(0===s)null!==i&&Ye(i),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(null!=i&&Ye(i),1===t)0===e.tag?function(e){Vn=!0,Hn(e)}(lh.bind(null,e)):Hn(lh.bind(null,e)),on((function(){0===(6&El)&&Wn()})),i=null;else{switch(St(s)){case 1:i=Je;break;case 4:i=et;break;case 16:default:i=tt;break;case 536870912:i=st}i=Ah(i,nh.bind(null,e))}e.callbackPriority=t,e.callbackNode=i}}function nh(e,t){if(Xl=-1,Jl=0,0!==(6&El))throw Error(r(327));var i=e.callbackNode;if(bh()&&e.callbackNode!==i)return null;var s=ut(e,e===Al?Pl:0);if(0===s)return null;if(0!==(30&s)||0!==(s&e.expiredLanes)||t)t=fh(e,s);else{t=s;var n=El;El|=2;var o=gh();for(Al===e&&Pl===t||(jl=null,Wl=Qe()+500,uh(e,t));;)try{yh();break}catch(l){ph(e,l)}Ir(),Dl.current=o,El=n,null!==Tl?t=0:(Al=null,Pl=0,t=kl)}if(0!==t){if(2===t&&(0!==(n=gt(e))&&(s=n,t=rh(e,n))),1===t)throw i=Nl,uh(e,0),ah(e,s),sh(e,Qe()),i;if(6===t)ah(e,s);else{if(n=e.current.alternate,0===(30&s)&&!function(e){for(var t=e;;){if(16384&t.flags){var i=t.updateQueue;if(null!==i&&null!==(i=i.stores))for(var s=0;s<i.length;s++){var n=i[s],r=n.getSnapshot;n=n.value;try{if(!os(r(),n))return!1}catch(a){return!1}}}if(i=t.child,16384&t.subtreeFlags&&null!==i)i.return=t,t=i;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(n)&&(2===(t=fh(e,s))&&(0!==(o=gt(e))&&(s=o,t=rh(e,o))),1===t))throw i=Nl,uh(e,0),ah(e,s),sh(e,Qe()),i;switch(e.finishedWork=n,e.finishedLanes=s,t){case 0:case 1:throw Error(r(345));case 2:case 5:wh(e,zl,jl);break;case 3:if(ah(e,s),(130023424&s)===s&&10<(t=Hl+500-Qe())){if(0!==ut(e,0))break;if(((n=e.suspendedLanes)&s)!==s){eh(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=sn(wh.bind(null,e,zl,jl),t);break}wh(e,zl,jl);break;case 4:if(ah(e,s),(4194240&s)===s)break;for(t=e.eventTimes,n=-1;0<s;){var a=31-ot(s);o=1<<a,(a=t[a])>n&&(n=a),s&=~o}if(s=n,10<(s=(120>(s=Qe()-s)?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*Ml(s/1960))-s)){e.timeoutHandle=sn(wh.bind(null,e,zl,jl),s);break}wh(e,zl,jl);break;default:throw Error(r(329))}}}return sh(e,Qe()),e.callbackNode===i?nh.bind(null,e):null}function rh(e,t){var i=Vl;return e.current.memoizedState.isDehydrated&&(uh(e,t).flags|=256),2!==(e=fh(e,t))&&(t=zl,zl=i,null!==t&&oh(t)),e}function oh(e){null===zl?zl=e:zl.push.apply(zl,e)}function ah(e,t){for(t&=~Bl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var i=31-ot(t),s=1<<i;e[i]=-1,t&=~s}}function lh(e){if(0!==(6&El))throw Error(r(327));bh();var t=ut(e,0);if(0===(1&t))return sh(e,Qe()),null;var i=fh(e,t);if(0!==e.tag&&2===i){var s=gt(e);0!==s&&(t=s,i=rh(e,s))}if(1===i)throw i=Nl,uh(e,0),ah(e,t),sh(e,Qe()),i;if(6===i)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wh(e,zl,jl),sh(e,Qe()),null}function hh(e,t){var i=El;El|=1;try{return e(t)}finally{0===(El=i)&&(Wl=Qe()+500,Vn&&Wn())}}function ch(e){null!==Yl&&0===Yl.tag&&0===(6&El)&&bh();var t=El;El|=1;var i=Rl.transition,s=Ct;try{if(Rl.transition=null,Ct=1,e)return e()}finally{Ct=s,Rl.transition=i,0===(6&(El=t))&&Wn()}}function dh(){Ll=Fl.current,Dn(Fl)}function uh(e,t){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;if(-1!==i&&(e.timeoutHandle=-1,nn(i)),null!==Tl)for(i=Tl.return;null!==i;){var s=i;switch(tr(s),s.tag){case 1:null!==(s=s.type.childContextTypes)&&void 0!==s&&Fn();break;case 3:qr(),Dn(An),Dn(En),io();break;case 5:Xr(s);break;case 4:qr();break;case 13:case 19:Dn(Jr);break;case 10:Rr(s.type._context);break;case 22:case 23:dh()}i=i.return}if(Al=e,Tl=e=Fh(e.current,null),Pl=Ll=t,kl=0,Nl=null,Bl=Gl=Ol=0,zl=Vl=null,null!==Pr){for(t=0;t<Pr.length;t++)if(null!==(s=(i=Pr[t]).interleaved)){i.interleaved=null;var n=s.next,r=i.pending;if(null!==r){var o=r.next;r.next=n,s.next=o}i.pending=s}Pr=null}return e}function ph(e,t){for(;;){var i=Tl;try{if(Ir(),so.current=Xo,ho){for(var s=oo.memoizedState;null!==s;){var n=s.queue;null!==n&&(n.pending=null),s=s.next}ho=!1}if(ro=0,lo=ao=oo=null,co=!1,uo=0,Il.current=null,null===i||null===i.return){kl=1,Nl=t,Tl=null;break}e:{var o=e,a=i.return,l=i,h=t;if(t=Pl,l.flags|=32768,null!==h&&"object"===typeof h&&"function"===typeof h.then){var c=h,d=l,u=d.tag;if(0===(1&d.mode)&&(0===u||11===u||15===u)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=fa(a);if(null!==g){g.flags&=-257,va(g,a,l,0,t),1&g.mode&&ma(o,c,t),h=c;var m=(t=g).updateQueue;if(null===m){var f=new Set;f.add(h),t.updateQueue=f}else m.add(h);break e}if(0===(1&t)){ma(o,c,t),mh();break e}h=Error(r(426))}else if(nr&&1&l.mode){var v=fa(a);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),va(v,a,l,0,t),gr(ha(h,l));break e}}o=h=ha(h,l),4!==kl&&(kl=2),null===Vl?Vl=[o]:Vl.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Hr(o,pa(0,h,t));break e;case 1:l=h;var y=o.type,C=o.stateNode;if(0===(128&o.flags)&&("function"===typeof y.getDerivedStateFromError||null!==C&&"function"===typeof C.componentDidCatch&&(null===Kl||!Kl.has(C)))){o.flags|=65536,t&=-t,o.lanes|=t,Hr(o,ga(o,l,t));break e}}o=o.return}while(null!==o)}Sh(i)}catch(S){t=S,Tl===i&&null!==i&&(Tl=i=i.return);continue}break}}function gh(){var e=Dl.current;return Dl.current=Xo,null===e?Xo:e}function mh(){0!==kl&&3!==kl&&2!==kl||(kl=4),null===Al||0===(268435455&Ol)&&0===(268435455&Gl)||ah(Al,Pl)}function fh(e,t){var i=El;El|=2;var s=gh();for(Al===e&&Pl===t||(jl=null,uh(e,t));;)try{vh();break}catch(n){ph(e,n)}if(Ir(),El=i,Dl.current=s,null!==Tl)throw Error(r(261));return Al=null,Pl=0,kl}function vh(){for(;null!==Tl;)Ch(Tl)}function yh(){for(;null!==Tl&&!Ze();)Ch(Tl)}function Ch(e){var t=xl(e.alternate,e,Ll);e.memoizedProps=e.pendingProps,null===t?Sh(e):Tl=t,Il.current=null}function Sh(e){var t=e;do{var i=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(i=$a(i,t,Ll)))return void(Tl=i)}else{if(null!==(i=Ya(i,t)))return i.flags&=32767,void(Tl=i);if(null===e)return kl=6,void(Tl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Tl=t);Tl=t=e}while(null!==t);0===kl&&(kl=5)}function wh(e,t,i){var s=Ct,n=Rl.transition;try{Rl.transition=null,Ct=1,function(e,t,i,s){do{bh()}while(null!==Yl);if(0!==(6&El))throw Error(r(327));i=e.finishedWork;var n=e.finishedLanes;if(null===i)return null;if(e.finishedWork=null,e.finishedLanes=0,i===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=i.lanes|i.childLanes;if(function(e,t){var i=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0<i;){var n=31-ot(i),r=1<<n;t[n]=0,s[n]=-1,e[n]=-1,i&=~r}}(e,o),e===Al&&(Tl=Al=null,Pl=0),0===(2064&i.subtreeFlags)&&0===(2064&i.flags)||$l||($l=!0,Ah(tt,(function(){return bh(),null}))),o=0!==(15990&i.flags),0!==(15990&i.subtreeFlags)||o){o=Rl.transition,Rl.transition=null;var a=Ct;Ct=1;var l=El;El|=4,Il.current=null,function(e,t){if(Js=Ut,us(e=ds())){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{var s=(i=(i=e.ownerDocument)&&i.defaultView||window).getSelection&&i.getSelection();if(s&&0!==s.rangeCount){i=s.anchorNode;var n=s.anchorOffset,o=s.focusNode;s=s.focusOffset;try{i.nodeType,o.nodeType}catch(w){i=null;break e}var a=0,l=-1,h=-1,c=0,d=0,u=e,p=null;t:for(;;){for(var g;u!==i||0!==n&&3!==u.nodeType||(l=a+n),u!==o||0!==s&&3!==u.nodeType||(h=a+s),3===u.nodeType&&(a+=u.nodeValue.length),null!==(g=u.firstChild);)p=u,u=g;for(;;){if(u===e)break t;if(p===i&&++c===n&&(l=a),p===o&&++d===s&&(h=a),null!==(g=u.nextSibling))break;p=(u=p).parentNode}u=g}i=-1===l||-1===h?null:{start:l,end:h}}else i=null}i=i||{start:0,end:0}}else i=null;for(en={focusedElem:e,selectionRange:i},Ut=!1,Xa=t;null!==Xa;)if(e=(t=Xa).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Xa=e;else for(;null!==Xa;){t=Xa;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var f=m.memoizedProps,v=m.memoizedState,y=t.stateNode,C=y.getSnapshotBeforeUpdate(t.elementType===t.type?f:ia(t.type,f),v);y.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var S=t.stateNode.containerInfo;1===S.nodeType?S.textContent="":9===S.nodeType&&S.documentElement&&S.removeChild(S.documentElement);break;default:throw Error(r(163))}}catch(w){Mh(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Xa=e;break}Xa=t.return}m=tl,tl=!1}(e,i),fl(i,e),ps(en),Ut=!!Js,en=Js=null,e.current=i,yl(i,e,n),qe(),El=l,Ct=a,Rl.transition=o}else e.current=i;if($l&&($l=!1,Yl=e,Zl=n),o=e.pendingLanes,0===o&&(Kl=null),function(e){if(rt&&"function"===typeof rt.onCommitFiberRoot)try{rt.onCommitFiberRoot(nt,e,void 0,128===(128&e.current.flags))}catch(t){}}(i.stateNode),sh(e,Qe()),null!==t)for(s=e.onRecoverableError,i=0;i<t.length;i++)n=t[i],s(n.value,{componentStack:n.stack,digest:n.digest});if(Ul)throw Ul=!1,e=_l,_l=null,e;0!==(1&Zl)&&0!==e.tag&&bh(),o=e.pendingLanes,0!==(1&o)?e===Ql?ql++:(ql=0,Ql=e):ql=0,Wn()}(e,t,i,s)}finally{Rl.transition=n,Ct=s}return null}function bh(){if(null!==Yl){var e=St(Zl),t=Rl.transition,i=Ct;try{if(Rl.transition=null,Ct=16>e?16:e,null===Yl)var s=!1;else{if(e=Yl,Yl=null,Zl=0,0!==(6&El))throw Error(r(331));var n=El;for(El|=4,Xa=e.current;null!==Xa;){var o=Xa,a=o.child;if(0!==(16&Xa.flags)){var l=o.deletions;if(null!==l){for(var h=0;h<l.length;h++){var c=l[h];for(Xa=c;null!==Xa;){var d=Xa;switch(d.tag){case 0:case 11:case 15:il(8,d,o)}var u=d.child;if(null!==u)u.return=d,Xa=u;else for(;null!==Xa;){var p=(d=Xa).sibling,g=d.return;if(rl(d),d===c){Xa=null;break}if(null!==p){p.return=g,Xa=p;break}Xa=g}}}var m=o.alternate;if(null!==m){var f=m.child;if(null!==f){m.child=null;do{var v=f.sibling;f.sibling=null,f=v}while(null!==f)}}Xa=o}}if(0!==(2064&o.subtreeFlags)&&null!==a)a.return=o,Xa=a;else e:for(;null!==Xa;){if(0!==(2048&(o=Xa).flags))switch(o.tag){case 0:case 11:case 15:il(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,Xa=y;break e}Xa=o.return}}var C=e.current;for(Xa=C;null!==Xa;){var S=(a=Xa).child;if(0!==(2064&a.subtreeFlags)&&null!==S)S.return=a,Xa=S;else e:for(a=C;null!==Xa;){if(0!==(2048&(l=Xa).flags))try{switch(l.tag){case 0:case 11:case 15:sl(9,l)}}catch(b){Mh(l,l.return,b)}if(l===a){Xa=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Xa=w;break e}Xa=l.return}}if(El=n,Wn(),rt&&"function"===typeof rt.onPostCommitFiberRoot)try{rt.onPostCommitFiberRoot(nt,e)}catch(b){}s=!0}return s}finally{Ct=i,Rl.transition=t}}return!1}function xh(e,t,i){e=Vr(e,t=pa(0,t=ha(i,t),1),1),t=eh(),null!==e&&(vt(e,1,t),sh(e,t))}function Mh(e,t,i){if(3===e.tag)xh(e,e,i);else for(;null!==t;){if(3===t.tag){xh(t,e,i);break}if(1===t.tag){var s=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof s.componentDidCatch&&(null===Kl||!Kl.has(s))){t=Vr(t,e=ga(t,e=ha(i,e),1),1),e=eh(),null!==t&&(vt(t,1,e),sh(t,e));break}}t=t.return}}function Dh(e,t,i){var s=e.pingCache;null!==s&&s.delete(t),t=eh(),e.pingedLanes|=e.suspendedLanes&i,Al===e&&(Pl&i)===i&&(4===kl||3===kl&&(130023424&Pl)===Pl&&500>Qe()-Hl?uh(e,0):Bl|=i),sh(e,t)}function Ih(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var i=eh();null!==(e=kr(e,t))&&(vt(e,t,i),sh(e,i))}function Rh(e){var t=e.memoizedState,i=0;null!==t&&(i=t.retryLane),Ih(e,i)}function Eh(e,t){var i=0;switch(e.tag){case 13:var s=e.stateNode,n=e.memoizedState;null!==n&&(i=n.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(r(314))}null!==s&&s.delete(t),Ih(e,i)}function Ah(e,t){return $e(e,t)}function Th(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ph(e,t,i,s){return new Th(e,t,i,s)}function Lh(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Fh(e,t){var i=e.alternate;return null===i?((i=Ph(e.tag,t,e.key,e.mode)).elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=14680064&e.flags,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function kh(e,t,i,s,n,o){var a=2;if(s=e,"function"===typeof e)Lh(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case x:return Nh(i.children,n,o,t);case M:a=8,n|=8;break;case D:return(e=Ph(12,i,t,2|n)).elementType=D,e.lanes=o,e;case A:return(e=Ph(13,i,t,n)).elementType=A,e.lanes=o,e;case T:return(e=Ph(19,i,t,n)).elementType=T,e.lanes=o,e;case F:return Oh(i,n,o,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case I:a=10;break e;case R:a=9;break e;case E:a=11;break e;case P:a=14;break e;case L:a=16,s=null;break e}throw Error(r(130,null==e?e:typeof e,""))}return(t=Ph(a,i,t,n)).elementType=e,t.type=s,t.lanes=o,t}function Nh(e,t,i,s){return(e=Ph(7,e,s,t)).lanes=i,e}function Oh(e,t,i,s){return(e=Ph(22,e,s,t)).elementType=F,e.lanes=i,e.stateNode={isHidden:!1},e}function Gh(e,t,i){return(e=Ph(6,e,null,t)).lanes=i,e}function Bh(e,t,i){return(t=Ph(4,null!==e.children?e.children:[],e.key,t)).lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vh(e,t,i,s,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ft(0),this.expirationTimes=ft(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.identifierPrefix=s,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function zh(e,t,i,s,n,r,o,a,l){return e=new Vh(e,t,i,a,l),1===t?(t=1,!0===r&&(t|=8)):t=0,r=Ph(3,null,null,t),e.current=r,r.stateNode=e,r.memoizedState={element:s,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Or(r),e}function Hh(e){if(!e)return Rn;e:{if(We(e=e._reactInternals)!==e||1!==e.tag)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ln(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(r(171))}if(1===e.tag){var i=e.type;if(Ln(i))return Nn(e,i,t)}return t}function Wh(e,t,i,s,n,r,o,a,l){return(e=zh(i,s,!0,e,0,r,0,a,l)).context=Hh(null),i=e.current,(r=Br(s=eh(),n=th(i))).callback=void 0!==t&&null!==t?t:null,Vr(i,r,n),e.current.lanes=n,vt(e,n,s),sh(e,s),e}function jh(e,t,i,s){var n=t.current,r=eh(),o=th(n);return i=Hh(i),null===t.context?t.context=i:t.pendingContext=i,(t=Br(r,o)).payload={element:e},null!==(s=void 0===s?null:s)&&(t.callback=s),null!==(e=Vr(n,t,o))&&(ih(e,n,o,r),zr(e,n,o)),o}function Uh(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function _h(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var i=e.retryLane;e.retryLane=0!==i&&i<t?i:t}}function Kh(e,t){_h(e,t),(e=e.alternate)&&_h(e,t)}xl=function(e,t,i){if(null!==e)if(e.memoizedProps!==t.pendingProps||An.current)Ca=!0;else{if(0===(e.lanes&i)&&0===(128&t.flags))return Ca=!1,function(e,t,i){switch(t.tag){case 3:Aa(t),pr();break;case 5:Qr(t);break;case 1:Ln(t.type)&&On(t);break;case 4:Zr(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,n=t.memoizedProps.value;In(br,s._currentValue),s._currentValue=n;break;case 13:if(null!==(s=t.memoizedState))return null!==s.dehydrated?(In(Jr,1&Jr.current),t.flags|=128,null):0!==(i&t.child.childLanes)?Ga(e,t,i):(In(Jr,1&Jr.current),null!==(e=Ua(e,t,i))?e.sibling:null);In(Jr,1&Jr.current);break;case 19:if(s=0!==(i&t.childLanes),0!==(128&e.flags)){if(s)return Wa(e,t,i);t.flags|=128}if(null!==(n=t.memoizedState)&&(n.rendering=null,n.tail=null,n.lastEffect=null),In(Jr,Jr.current),s)break;return null;case 22:case 23:return t.lanes=0,Ma(e,t,i)}return Ua(e,t,i)}(e,t,i);Ca=0!==(131072&e.flags)}else Ca=!1,nr&&0!==(1048576&t.flags)&&Jn(t,Kn,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;ja(e,t),e=t.pendingProps;var n=Pn(t,En.current);Ar(t,i),n=fo(null,t,s,e,n,i);var o=vo();return t.flags|=1,"object"===typeof n&&null!==n&&"function"===typeof n.render&&void 0===n.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ln(s)?(o=!0,On(t)):o=!1,t.memoizedState=null!==n.state&&void 0!==n.state?n.state:null,Or(t),n.updater=na,t.stateNode=n,n._reactInternals=t,la(t,s,e,i),t=Ea(null,t,s,!0,o,i)):(t.tag=0,nr&&o&&er(t),Sa(null,t,n,i),t=t.child),t;case 16:s=t.elementType;e:{switch(ja(e,t),e=t.pendingProps,s=(n=s._init)(s._payload),t.type=s,n=t.tag=function(e){if("function"===typeof e)return Lh(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===E)return 11;if(e===P)return 14}return 2}(s),e=ia(s,e),n){case 0:t=Ia(null,t,s,e,i);break e;case 1:t=Ra(null,t,s,e,i);break e;case 11:t=wa(null,t,s,e,i);break e;case 14:t=ba(null,t,s,ia(s.type,e),i);break e}throw Error(r(306,s,""))}return t;case 0:return s=t.type,n=t.pendingProps,Ia(e,t,s,n=t.elementType===s?n:ia(s,n),i);case 1:return s=t.type,n=t.pendingProps,Ra(e,t,s,n=t.elementType===s?n:ia(s,n),i);case 3:e:{if(Aa(t),null===e)throw Error(r(387));s=t.pendingProps,n=(o=t.memoizedState).element,Gr(e,t),Wr(t,s,null,i);var a=t.memoizedState;if(s=a.element,o.isDehydrated){if(o={element:s,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Ta(e,t,s,i,n=ha(Error(r(423)),t));break e}if(s!==n){t=Ta(e,t,s,i,n=ha(Error(r(424)),t));break e}for(sr=hn(t.stateNode.containerInfo.firstChild),ir=t,nr=!0,rr=null,i=wr(t,null,s,i),t.child=i;i;)i.flags=-3&i.flags|4096,i=i.sibling}else{if(pr(),s===n){t=Ua(e,t,i);break e}Sa(e,t,s,i)}t=t.child}return t;case 5:return Qr(t),null===e&&hr(t),s=t.type,n=t.pendingProps,o=null!==e?e.memoizedProps:null,a=n.children,tn(s,n)?a=null:null!==o&&tn(s,o)&&(t.flags|=32),Da(e,t),Sa(e,t,a,i),t.child;case 6:return null===e&&hr(t),null;case 13:return Ga(e,t,i);case 4:return Zr(t,t.stateNode.containerInfo),s=t.pendingProps,null===e?t.child=Sr(t,null,s,i):Sa(e,t,s,i),t.child;case 11:return s=t.type,n=t.pendingProps,wa(e,t,s,n=t.elementType===s?n:ia(s,n),i);case 7:return Sa(e,t,t.pendingProps,i),t.child;case 8:case 12:return Sa(e,t,t.pendingProps.children,i),t.child;case 10:e:{if(s=t.type._context,n=t.pendingProps,o=t.memoizedProps,a=n.value,In(br,s._currentValue),s._currentValue=a,null!==o)if(os(o.value,a)){if(o.children===n.children&&!An.current){t=Ua(e,t,i);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){a=o.child;for(var h=l.firstContext;null!==h;){if(h.context===s){if(1===o.tag){(h=Br(-1,i&-i)).tag=2;var c=o.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?h.next=h:(h.next=d.next,d.next=h),c.pending=h}}o.lanes|=i,null!==(h=o.alternate)&&(h.lanes|=i),Er(o.return,i,t),l.lanes|=i;break}h=h.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(r(341));a.lanes|=i,null!==(l=a.alternate)&&(l.lanes|=i),Er(a,i,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}Sa(e,t,n.children,i),t=t.child}return t;case 9:return n=t.type,s=t.pendingProps.children,Ar(t,i),s=s(n=Tr(n)),t.flags|=1,Sa(e,t,s,i),t.child;case 14:return n=ia(s=t.type,t.pendingProps),ba(e,t,s,n=ia(s.type,n),i);case 15:return xa(e,t,t.type,t.pendingProps,i);case 17:return s=t.type,n=t.pendingProps,n=t.elementType===s?n:ia(s,n),ja(e,t),t.tag=1,Ln(s)?(e=!0,On(t)):e=!1,Ar(t,i),oa(t,s,n),la(t,s,n,i),Ea(null,t,s,!0,e,i);case 19:return Wa(e,t,i);case 22:return Ma(e,t,i)}throw Error(r(156,t.tag))};var $h="function"===typeof reportError?reportError:function(e){console.error(e)};function Yh(e){this._internalRoot=e}function Zh(e){this._internalRoot=e}function qh(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qh(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xh(){}function Jh(e,t,i,s,n){var r=i._reactRootContainer;if(r){var o=r;if("function"===typeof n){var a=n;n=function(){var e=Uh(o);a.call(e)}}jh(t,o,e,n)}else o=function(e,t,i,s,n){if(n){if("function"===typeof s){var r=s;s=function(){var e=Uh(o);r.call(e)}}var o=Wh(t,s,e,0,null,!1,0,"",Xh);return e._reactRootContainer=o,e[gn]=o.current,Hs(8===e.nodeType?e.parentNode:e),ch(),o}for(;n=e.lastChild;)e.removeChild(n);if("function"===typeof s){var a=s;s=function(){var e=Uh(l);a.call(e)}}var l=zh(e,0,!1,null,0,!1,0,"",Xh);return e._reactRootContainer=l,e[gn]=l.current,Hs(8===e.nodeType?e.parentNode:e),ch((function(){jh(t,l,i,s)})),l}(i,t,e,n,s);return Uh(o)}Zh.prototype.render=Yh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(r(409));jh(e,t,null,null)},Zh.prototype.unmount=Yh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;ch((function(){jh(null,e,null,null)})),t[gn]=null}},Zh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mt();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ft.length&&0!==t&&t<Ft[i].priority;i++);Ft.splice(i,0,e),0===i&&Gt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var i=dt(t.pendingLanes);0!==i&&(yt(t,1|i),sh(t,Qe()),0===(6&El)&&(Wl=Qe()+500,Wn()))}break;case 13:ch((function(){var t=kr(e,1);if(null!==t){var i=eh();ih(t,e,1,i)}})),Kh(e,1)}},bt=function(e){if(13===e.tag){var t=kr(e,134217728);if(null!==t)ih(t,e,134217728,eh());Kh(e,134217728)}},xt=function(e){if(13===e.tag){var t=th(e),i=kr(e,t);if(null!==i)ih(i,e,t,eh());Kh(e,t)}},Mt=function(){return Ct},Dt=function(e,t){var i=Ct;try{return Ct=e,t()}finally{Ct=i}},be=function(e,t,i){switch(t){case"input":if(X(e,i),t=i.name,"radio"===i.type&&null!=t){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var n=wn(s);if(!n)throw Error(r(90));$(s),X(s,n)}}}break;case"textarea":re(e,i);break;case"select":null!=(t=i.value)&&ie(e,!!i.multiple,t,!1)}},Ee=hh,Ae=ch;var ec={usingClientEntryPoint:!1,Events:[Cn,Sn,wn,Ie,Re,hh]},tc={findFiberByHostInstance:yn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ic={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=_e(e))?null:e.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sc.isDisabled&&sc.supportsFiber)try{nt=sc.inject(ic),rt=sc}catch(ce){}}
vendor: 6,985 bytes, line 2
2t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ec,t.createPortal=function(e,t){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!qh(t))throw Error(r(200));return function(e,t,i){var s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:b,key:null==s?null:""+s,children:e,containerInfo:t,implementation:i}}(e,t,null,i)},t.createRoot=function(e,t){if(!qh(e))throw Error(r(299));var i=!1,s="",n=$h;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(i=!0),void 0!==t.identifierPrefix&&(s=t.identifierPrefix),void 0!==t.onRecoverableError&&(n=t.onRecoverableError)),t=zh(e,1,!1,null,0,i,0,s,n),e[gn]=t.current,Hs(8===e.nodeType?e.parentNode:e),new Yh(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(r(188));throw e=Object.keys(e).join(","),Error(r(268,e))}return e=null===(e=_e(t))?null:e.stateNode},t.flushSync=function(e){return ch(e)},t.hydrate=function(e,t,i){if(!Qh(t))throw Error(r(200));return Jh(null,e,t,!0,i)},t.hydrateRoot=function(e,t,i){if(!qh(e))throw Error(r(405));var s=null!=i&&i.hydratedSources||null,n=!1,o="",a=$h;if(null!==i&&void 0!==i&&(!0===i.unstable_strictMode&&(n=!0),void 0!==i.identifierPrefix&&(o=i.identifierPrefix),void 0!==i.onRecoverableError&&(a=i.onRecoverableError)),t=Wh(t,null,e,1,null!=i?i:null,n,0,o,a),e[gn]=t.current,Hs(e),s)for(e=0;e<s.length;e++)n=(n=(i=s[e])._getVersion)(i._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[i,n]:t.mutableSourceEagerHydrationData.push(i,n);return new Zh(t)},t.render=function(e,t,i){if(!Qh(t))throw Error(r(200));return Jh(null,e,t,!1,i)},t.unmountComponentAtNode=function(e){if(!Qh(e))throw Error(r(40));return!!e._reactRootContainer&&(ch((function(){Jh(null,null,e,!1,(function(){e._reactRootContainer=null,e[gn]=null}))})),!0)},t.unstable_batchedUpdates=hh,t.unstable_renderSubtreeIntoContainer=function(e,t,i,s){if(!Qh(i))throw Error(r(200));if(null==e||void 0===e._reactInternals)throw Error(r(38));return Jh(e,t,i,!1,s)},t.version="18.3.1-next-f1338f8080-20240426"},950:(e,t,i)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=i(730)},82:(e,t)=>{"use strict";var i,s=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),h=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case s:switch(e=e.type){case r:case a:case o:case u:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case d:case m:case g:case l:return e;default:return t}}case n:return t}}}i=Symbol.for("react.module.reference"),t.ForwardRef=d,t.Memo=g},86:(e,t,i)=>{"use strict";e.exports=i(82)},153:(e,t,i)=>{"use strict";var s=i(43),n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function h(e,t,i){var s,r={},h=null,c=null;for(s in void 0!==i&&(h=""+i),void 0!==t.key&&(h=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,s)&&!l.hasOwnProperty(s)&&(r[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===r[s]&&(r[s]=t[s]);return{$$typeof:n,type:e,key:h,ref:c,props:r,_owner:a.current}}t.jsx=h,t.jsxs=h},202:(e,t)=>{"use strict";var i=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),p=Symbol.iterator;var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,f={};function v(e,t,i){this.props=e,this.context=t,this.refs=f,this.updater=i||g}function y(){}function C(e,t,i){this.props=e,this.context=t,this.refs=f,this.updater=i||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var S=C.prototype=new y;S.constructor=C,m(S,v.prototype),S.isPureReactComponent=!0;var w=Array.isArray,b=Object.prototype.hasOwnProperty,x={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,s){var n,r={},o=null,a=null;if(null!=t)for(n in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)b.call(t,n)&&!M.hasOwnProperty(n)&&(r[n]=t[n]);var l=arguments.length-2;if(1===l)r.children=s;else if(1<l){for(var h=Array(l),c=0;c<l;c++)h[c]=arguments[c+2];r.children=h}if(e&&e.defaultProps)for(n in l=e.defaultProps)void 0===r[n]&&(r[n]=l[n]);return{$$typeof:i,type:e,key:o,ref:a,props:r,_owner:x.current}}function I(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var R=/\/+/g;function E(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(e,t,n,r,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case i:case s:l=!0}}if(l)return o=o(l=e),e=""===r?"."+E(l,0):r,w(o)?(n="",null!=e&&(n=e.replace(R,"$&/")+"/"),A(o,t,n,"",(function(e){return e}))):null!=o&&(I(o)&&(o=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(R,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=""===r?".":r+":",w(e))for(var h=0;h<e.length;h++){var c=r+E(a=e[h],h);l+=A(a,t,n,c,o)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),h=0;!(a=e.next()).done;)l+=A(a=a.value,t,n,c=r+E(a,h++),o);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function T(e,t,i){if(null==e)return e;var s=[],n=0;
vendor: 7,533 bytes, line 2
2return A(e,s,"","",(function(e){return t.call(i,e,n++)})),s}function P(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L={current:null},F={transition:null},k={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:F,ReactCurrentOwner:x};function N(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:T,forEach:function(e,t,i){T(e,(function(){t.apply(this,arguments)}),i)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!I(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=n,t.Profiler=o,t.PureComponent=C,t.StrictMode=r,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,t.act=N,t.cloneElement=function(e,t,s){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=m({},e.props),r=e.key,o=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,a=x.current),void 0!==t.key&&(r=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(h in t)b.call(t,h)&&!M.hasOwnProperty(h)&&(n[h]=void 0===t[h]&&void 0!==l?l[h]:t[h])}var h=arguments.length-2;if(1===h)n.children=s;else if(1<h){l=Array(h);for(var c=0;c<h;c++)l[c]=arguments[c+2];n.children=l}return{$$typeof:i,type:e.type,key:r,ref:o,props:n,_owner:a}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=D,t.createFactory=function(e){var t=D.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:h,render:e}},t.isValidElement=I,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=F.transition;F.transition={};try{e()}finally{F.transition=t}},t.unstable_act=N,t.useCallback=function(e,t){return L.current.useCallback(e,t)},t.useContext=function(e){return L.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return L.current.useDeferredValue(e)},t.useEffect=function(e,t){return L.current.useEffect(e,t)},t.useId=function(){return L.current.useId()},t.useImperativeHandle=function(e,t,i){return L.current.useImperativeHandle(e,t,i)},t.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return L.current.useMemo(e,t)},t.useReducer=function(e,t,i){return L.current.useReducer(e,t,i)},t.useRef=function(e){return L.current.useRef(e)},t.useState=function(e){return L.current.useState(e)},t.useSyncExternalStore=function(e,t,i){return L.current.useSyncExternalStore(e,t,i)},t.useTransition=function(){return L.current.useTransition()},t.version="18.3.1"},43:(e,t,i)=>{"use strict";e.exports=i(202)},579:(e,t,i)=>{"use strict";e.exports=i(153)},234:(e,t)=>{"use strict";function i(e,t){var i=e.length;e.push(t);e:for(;0<i;){var s=i-1>>>1,n=e[s];if(!(0<r(n,t)))break e;e[s]=t,e[i]=n,i=s}}function s(e){return 0===e.length?null:e[0]}function n(e){if(0===e.length)return null;var t=e[0],i=e.pop();if(i!==t){e[0]=i;e:for(var s=0,n=e.length,o=n>>>1;s<o;){var a=2*(s+1)-1,l=e[a],h=a+1,c=e[h];if(0>r(l,i))h<n&&0>r(c,l)?(e[s]=c,e[h]=i,s=h):(e[s]=l,e[a]=i,s=a);else{if(!(h<n&&0>r(c,i)))break e;e[s]=c,e[h]=i,s=h}}}return t}function r(e,t){var i=e.sortIndex-t.sortIndex;return 0!==i?i:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var h=[],c=[],d=1,u=null,p=3,g=!1,m=!1,f=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,C="undefined"!==typeof setImmediate?setImmediate:null;function S(e){for(var t=s(c);null!==t;){if(null===t.callback)n(c);else{if(!(t.startTime<=e))break;n(c),t.sortIndex=t.expirationTime,i(h,t)}t=s(c)}}function w(e){if(f=!1,S(e),!m)if(null!==s(h))m=!0,F(b);else{var t=s(c);null!==t&&k(w,t.startTime-e)}}function b(e,i){m=!1,f&&(f=!1,y(I),I=-1),g=!0;var r=p;try{for(S(i),u=s(h);null!==u&&(!(u.expirationTime>i)||e&&!A());){var o=u.callback;if("function"===typeof o){u.callback=null,p=u.priorityLevel;var a=o(u.expirationTime<=i);i=t.unstable_now(),"function"===typeof a?u.callback=a:u===s(h)&&n(h),S(i)}else n(h);u=s(h)}if(null!==u)var l=!0;else{var d=s(c);null!==d&&k(w,d.startTime-i),l=!1}return l}finally{u=null,p=r,g=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,M=!1,D=null,I=-1,R=5,E=-1;function A(){return!(t.unstable_now()-E<R)}function T(){if(null!==D){var e=t.unstable_now();E=e;var i=!0;try{i=D(!0,e)}finally{i?x():(M=!1,D=null)}}else M=!1}if("function"===typeof C)x=function(){C(T)};else if("undefined"!==typeof MessageChannel){var P=new MessageChannel,L=P.port2;P.port1.onmessage=T,x=function(){L.postMessage(null)}}else x=function(){v(T,0)};function F(e){D=e,M||(M=!0,x())}function k(e,i){I=v((function(){e(t.unstable_now())}),i)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||g||(m=!0,F(b))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return s(h)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var i=p;p=t;try{return e()}finally{p=i}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var i=p;p=e;try{return t()}finally{p=i}},t.unstable_scheduleCallback=function(e,n,r){var o=t.unstable_now();switch("object"===typeof r&&null!==r?r="number"===typeof(r=r.delay)&&0<r?o+r:o:r=o,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:d++,callback:n,priorityLevel:e,startTime:r,expirationTime:a=r+a,sortIndex:-1},r>o?(e.sortIndex=r,i(c,e),null===s(h)&&e===s(c)&&(f?(y(I),I=-1):f=!0,k(w,r-o))):(e.sortIndex=a,i(h,e),m||g||(m=!0,F(b))),e},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(e){var t=p;return function(){var i=p;p=t;try{return e.apply(this,arguments)}finally{p=i}}}},853:(e,t,i)=>{"use strict";e.exports=i(234)},634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}
2e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},893:e=>{e.exports=function(e,t){if(null==e)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.includes(s))continue;i[s]=e[s]}return i},e.exports.__esModule=!0,e.exports.default=e.exports},168:(e,t,i)=>{"use strict";function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},s.apply(null,arguments)}i.d(t,{A:()=>s})},587:(e,t,i)=>{"use strict";function s(e,t){if(null==e)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.includes(s))continue;i[s]=e[s]}return i}i.d(t,{A:()=>s})}},t={};function i(s){var n=t[s];if(void 0!==n)return n.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;i.t=function(s,n){if(1&n&&(s=this(s)),8&n)return s;if("object"===typeof s&&s){if(4&n&&s.__esModule)return s;if(16&n&&"function"===typeof s.then)return s}var r=Object.create(null);i.r(r);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&s;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>s[e]));return o.default=()=>s,i.d(r,o),r}})(),i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};i.r(e),i.d(e,{AG_CHARTS_LOCALE_EN_US:()=>ap,AgCharts:()=>XL,AgErrorBarSupportedSeriesTypes:()=>lp,AgTooltipPositionType:()=>cp,ICONS_LEGACY:()=>hp,Marker:()=>UM,VERSION:()=>Tw,_ModuleSupport:()=>yF,_Scale:()=>fF,_Scene:()=>iF,_Theme:()=>gF,_Util:()=>vF,setupCommunityModules:()=>tF,time:()=>dp});var t=i(43),s=i(950),n=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}
2setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let n=s.get(e);return!n&&i&&(n=new Set,s.set(e,n)),n}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.getListeners(e,i,!0).add(t)}removeEventListener(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.getListeners(e,i,!1);if(s&&(s.delete(t),0===s.size)){(i?this.allAsyncListeners:this.allSyncListeners).delete(e)}}addGlobalListener(e){(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e){(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}const s=(i,s)=>i.forEach((i=>{if(!s.has(i))return;const n=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming((()=>i(e))):()=>i(e);t?this.dispatchAsync(n):n()})),n=this.getListeners(i,t,!1)??new Set,r=new Set(n);r.size>0&&s(r,n);new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach((s=>{const n=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming((()=>s(i,e))):()=>s(i,e);t?this.dispatchAsync(n):n()}))}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach((e=>e()))}},r=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(r||{}),o={};function a(e,t){o[t]||(e(),o[t]=!0)}function l(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];console.log("AG Grid: "+e,...i)}function h(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];a((()=>console.warn("AG Grid: "+e,...i)),e+i?.join(""))}function c(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];a((()=>console.error("AG Grid: "+e,...i)),e+i?.join(""))}function d(e){return!!(e&&e.constructor&&e.call&&e.apply)}function u(e){!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e.length>0&&window.setTimeout((()=>e.forEach((e=>e()))),t)}(e,400)}var p=[],g=!1;function m(e){p.push(e),g||(g=!0,window.setTimeout((()=>{const e=p.slice();p.length=0,g=!1,e.forEach((e=>e()))}),0))}function f(e,t){let i;return function(){for(var s=arguments.length,n=new Array(s),r=0;r<s;r++)n[r]=arguments[r];const o=this;window.clearTimeout(i),i=window.setTimeout((function(){e.apply(o,n)}),t)}}function v(e,t){let i=0;return function(){const s=(new Date).getTime();if(!(s-i<t)){i=s;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r)}}}function y(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,s=arguments.length>3?arguments[3]:void 0;const n=(new Date).getTime();let r=null,o=!1;const a=()=>{const a=(new Date).getTime()-n>i;(e()||a)&&(t(),o=!0,null!=r&&(window.clearInterval(r),r=null),a&&s&&h(s))};a(),o||(r=window.setInterval(a,10))}function C(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return e=>t.reduce(((e,t)=>t(e)),e)}function S(e){return null==e||""===e?null:e}function w(e){return null!=e&&(""!==e||arguments.length>1&&void 0!==arguments[1]&&arguments[1])}function b(e){return!w(e)}function x(e){return null==e||0===e.length}function M(e){return null!=e&&"function"===typeof e.toString?e.toString():null}function D(e){if(void 0===e)return;if(null===e||""===e)return null;if("number"===typeof e)return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function I(e){if(void 0!==e)return null!==e&&""!==e&&R(e)}function R(e){return"boolean"===typeof e?e:"string"===typeof e&&("TRUE"===e.toUpperCase()||""==e)}function E(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function A(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=null==e,n=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&n)return 0;if(s)return-1;if(n)return 1;function r(e,t){return e>t?1:e<t?-1:0}if("string"!==typeof e)return r(e,t);if(!i)return r(e,t);try{return e.localeCompare(t)}catch(o){return r(e,t)}}function T(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach((e=>t.push(e))),t}return Object.values(e)}function P(e,t){return e.get("rowModelType")===t}function L(e){return P(e,"clientSide")}function F(e){return P(e,"serverSide")}function k(e,t){return e.get("domLayout")===t}function N(e){return void 0!==ge(e)}function O(e){return!e.get("suppressAsyncEvents")}function G(e){return"function"===typeof e.get("getRowHeight")}function B(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0;if(null==s&&(s=e.environment.getDefaultRowHeight()),G(e)){if(i)return{height:s,estimated:!0};const n={node:t,data:t.data},r=e.getCallback("getRowHeight")(n);if(z(r))return 0===r&&h("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,r),estimated:!1}}if(t.detail&&e.get("masterDetail"))return function(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");if(z(t))return{height:t,estimated:!1};return{height:300,estimated:!1}}(e);const n=e.get("rowHeight");return{height:n&&z(n)?n:s,estimated:!1}}function V(e){const{environment:t}=e,i=e.get("rowHeight");if(!i||b(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return-1!==s?s:(h("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function z(e){return!isNaN(e)&&"number"===typeof e&&isFinite(e)}function H(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function W(e,t,i,s){const n=e.getDomDataKey();let r=t[n];b(r)&&(r={},t[n]=r),r[i]=s}function j(e){let t=null;const i=e.get("getDocument");return i&&w(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&w(t)?t:document}function U(e){return j(e).defaultView||window}function _(e){return e.eGridDiv.getRootNode()}function K(e){return _(e).activeElement}function $(e){const t=j(e),i=K(e);return null===i||i===t.body}function Y(e){return!e.get("ensureDomOrder")&&e.get("animateRows")}function Z(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||k(e,"print"))}function q(e){const t=e.get("autoGroupColumnDef");return!t?.comparator&&!e.get("treeData")}function Q(e){const t=e.get("groupAggFiltering");return"function"===typeof t?e.getCallback("groupAggFiltering"):!0===t?()=>!0:void 0}function X(e){const t=e.get("grandTotalRow");if(t)return t;return e.get("groupIncludeTotalFooter")?"bottom":void 0}function J(e){const t=e.get("groupTotalRow");if("function"===typeof t)return e.getCallback("groupTotalRow");if(t)return()=>t;const i=e.get("groupIncludeFooter");if("function"===typeof i){const t=e.getCallback("groupIncludeFooter");return e=>t(e)?"bottom":void 0}return()=>i?"bottom":void 0}function ee(e){return e.exists("groupDisplayType")?"multipleColumns"===e.get("groupDisplayType"):e.get("groupHideOpenParents")}function te(e,t){return!t&&"groupRows"===e.get("groupDisplayType")}function ie(e){const t=e.getCallback("getRowId");return void 0===t?t:e=>{let i=t(e);return"string"!==typeof i&&(h("The getRowId callback must return a string. The ID ",i," is being cast to a string."),i=String(i)),i}}function se(e){return e?.checkboxes??!0}function ne(e){return"multiRow"===e?.mode&&(e.headerCheckbox??!0)}function re(e){return"string"!==typeof e.get("rowSelection")}
vendor: 8,596 bytes, line 2
2function oe(e){return void 0!==e.get("cellSelection")}function ae(e){const t=e.get("cellSelection");return void 0!==t?"boolean"!==typeof t&&(t?.suppressMultiRanges??!1):e.get("suppressMultiRangeSelection")}function le(e){const t=e.get("cellSelection");return void 0!==t?!!t:e.get("enableRangeSelection")}function he(e){const t=e.get("cellSelection");return void 0!==t?"boolean"!==typeof t&&"fill"===t.handle?.mode:e.get("enableFillHandle")}function ce(e){const t=e.get("cellSelection");return void 0!==t?"boolean"!==typeof t&&"fill"===t.handle?.mode?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function de(e){const t=e.get("rowSelection")??"single";if("string"===typeof t){const t=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return(!t||!i)&&(t?"enableDeselection":!i||"enableSelection")}return("singleRow"===t.mode||"multiRow"===t.mode)&&(t.enableClickSelection??!1)}function ue(e){const t=de(e);return!0===t||"enableDeselection"===t}function pe(e){const t=e.get("rowSelection");return"string"===typeof t?e.get("isRowSelectable"):t?.isRowSelectable}function ge(e){const t=e.get("rowSelection");if("string"===typeof t)switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return t?.mode}function me(e){return"multiRow"===ge(e)}function fe(e){const t=e.get("rowSelection");if("string"===typeof t){const t=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return t&&i?"filteredDescendants":t?"descendants":"self"}return"multiRow"===t?.mode?t.groupSelects:void 0}function ve(e){const t=fe(e);return"descendants"===t||"filteredDescendants"===t}function ye(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function Ce(e){return null!=e&&e.length>0}function Se(e){if(e&&e.length)return e[e.length-1]}function we(e,t,i){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every(((e,s)=>i?i(e,t[s]):t[s]===e))}function be(e,t){return we(e,t)}function xe(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function Me(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function De(e,t,i){e.splice(i,0,t)}function Ie(e,t,i){if(null!=e&&null!=t)for(let s=t.length-1;s>=0;s--){De(e,t[s],i)}}function Re(e,t,i){!function(e,t){for(let i=0;i<t.length;i++)Me(e,t[i])}(e,t),t.slice().reverse().forEach((t=>De(e,t,i)))}function Ee(e,t){return e.indexOf(t)>-1}function Ae(e){return e?.flatMap((e=>e))??[]}function Te(e,t){null!=t&&null!=e&&t.forEach((t=>e.push(t)))}function Pe(e,t){if(null!=e)for(let i=e.length-1;i>=0;i--)t(e[i],i)}var Le="__ag_Grid_Stop_Propagation",Fe=["touchstart","touchend","touchmove","touchcancel","scroll"],ke={};function Ne(e){e[Le]=!0}function Oe(e){return!0===e[Le]}var Ge=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if("boolean"===typeof ke[t])return ke[t];const i=document.createElement(e[t]||"div");return ke[t="on"+t]=t in i}})();function Be(e,t,i){let s=t;for(;s;){const t=H(e,s,i);if(t)return t;s=s.parentElement}return null}function Ve(e,t){return!(!t||!e)&&function(e){const t=e;if(t.path)return t.path;if(t.composedPath)return t.composedPath();return function(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}(t)}(t).indexOf(e)>=0}var ze=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new n),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService&&this.localEventService.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const s in t){const n=t[s];n&&i.push(this._setupListener(e,s,n))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?function(e,t,i,s){const n=Ee(Fe,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,s,n)}(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const s=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter((e=>e!==s)),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);const i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter((e=>e!==i)),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=e.changeSet.id}const s={type:"gridPropertyChanged",changeSet:e.changeSet,source:e.source};t(s)};e.forEach((e=>this.setupGridOptionListener(e,s)))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function He(e){return e instanceof We}var We=class extends ze{constructor(e,t,i,s){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=ht(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=s}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some((e=>e.isVisible()))}isPadding(){return this.padding}setExpanded(e){this.expanded=void 0!==e&&e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach((t=>{ct(t)?e.push(t):He(t)&&t.addLeafColumns(e)}))}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach((t=>t.addEventListener("visibleChanged",e))),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach((t=>t.removeEventListener("visibleChanged",e))),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let r=0,o=s.length;r<o;r++){const n=s[r];if(!n.isVisible())continue;const o=n.getColumnGroupShow();"open"===o?(e=!0,i=!0):"closed"===o?(t=!0,i=!0):(e=!0,t=!0)}const n=e&&t&&i;this.expandable!==n&&(this.expandable=n,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{i.forEach((i=>{He(i)&&i.isPadding()?t(i.children):e.push(i)}))};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},je="ag-Grid-ControlsColumn",Ue=class extends ze{constructor(){super(...arguments),this.beanName="
2controlsColService"}createControlsCols(){const{gos:e}=this,t=e.get("rowSelection");if(!t||"object"!==typeof t)return[];const i=se(t),s=ne(t);if(i||s){const t=e.get("selectionColumnDef"),i={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(e,t,i,s){const n=i.isSelected(),r=s.isSelected();return n&&r?0:n?1:-1},editable:!1,suppressFillHandle:!0,...t,colId:`${je}`},s=new dt(i,null,i.colId,!1);return this.createBean(s),[s]}return[]}},_e="ag-Grid-AutoColumn";function Ke(e){const t=[],i=e=>{for(let s=0;s<e.length;s++){const n=e[s];ct(n)?t.push(n):He(n)&&i(n.getChildren())}};return i(e),t}function $e(e){return e.reduce(((e,t)=>e+t.getActualWidth()),0)}function Ye(e,t,i){const s={};if(!t)return;mt(null,t,(e=>{s[e.getInstanceId()]=e})),i&&mt(null,i,(e=>{s[e.getInstanceId()]=null}));const n=Object.values(s).filter((e=>null!=e));e.destroyBeans(n)}function Ze(e){return e.getId().startsWith(_e)}function qe(e){return e.getColId().startsWith(je)}function Qe(e){let t=[];if(e instanceof Array){e.some((e=>"string"!==typeof e))?h("if colDef.type is supplied an array it should be of type 'string[]'"):t=e}else"string"===typeof e?t=e.split(","):h("colDef.type should be of type 'string' | 'string[]'");return t}var Xe=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=t=>{this.frameworkOverrides.wrapOutgoing((()=>e(t)))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(t,i)=>{this.frameworkOverrides.wrapOutgoing((()=>e(t,i)))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){return this.wrappedListeners.get(e)??e}unwrapGlobal(e){return this.wrappedGlobalListeners.get(e)??e}},Je=new Set(["__proto__","constructor","prototype"]);function et(e,t){if(null!=e)if(Array.isArray(e))for(let i=0;i<e.length;i++)t(i.toString(),e[i]);else for(const[i,s]of Object.entries(e))t(i,s)}function tt(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(Je.has(i[s]))continue;const n=i[s],r=e[n];t[n]=r}return t}function it(e,t){if(!e)return;const i=e,s={};
vendor: 50,872 bytes, line 2
2return Object.keys(i).forEach((e=>{if(t&&t.indexOf(e)>=0||Je.has(e))return;const n=i[e],r=ot(n)&&n.constructor===Object;s[e]=r?it(n):n})),s}function st(e){if(!e)return[];const t=Object;if("function"===typeof t.values)return t.values(e);const i=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&i.push(e[s]);return i}function nt(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];w(t)&&et(t,((t,n)=>{if(Je.has(t))return;let r=e[t];if(r!==n){if(s){if(null==r&&null!=n){"object"===typeof n&&n.constructor===Object&&(r={},e[t]=r)}}ot(n)&&ot(r)&&!Array.isArray(r)?nt(r,n,i,s):(i||void 0!==n)&&(e[t]=n)}}))}function rt(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let n=e;for(let r=0;r<s.length;r++){if(null==n)return;n=n[s[r]]}return n}function ot(e){return"object"===typeof e&&null!==e}var at={resizable:!0,sortable:!0},lt=0;function ht(){return lt++}function ct(e){return e instanceof dt}var dt=class extends ze{constructor(e,t,i,s){super(),this.isColumn=!0,this.instanceId=ht(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new n,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){void 0!==e.sort?"asc"!==e.sort&&"desc"!==e.sort||(this.sort=e.sort):"asc"!==e.initialSort&&"desc"!==e.initialSort||(this.sort=e.initialSort);const t=e.sortIndex,i=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==i&&(this.sortIndex=i);const s=e.hide,n=e.initialHide;this.visible=void 0!==s?!s:!n,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);const r=e.flex,o=e.initialFlex;void 0!==r?this.flex=r:void 0!==o&&(this.flex=o)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=w(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=w(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=w(this.colDef.tooltipField)||w(this.colDef.tooltipValueGetter)||w(this.colDef.tooltipComponent)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=D(e.width),s=D(e.initialWidth);return t=null!=i?i:null!=s?s:200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(b(this.colDef)||b(this.colDef.showRowGroup))return!1;const t=!0===this.colDef.showRowGroup,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Xe(this.frameworkOverrides));const i=this.frameworkEventListenerService?.wrap(t)??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(t)??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if("boolean"===typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"===typeof this.colDef.suppressNavigable){const t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1}isCellEditable(e){if(e.group)if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1;return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){const t=this.gos.get("rowSelection");if(t&&"string"!==typeof t){const i=qe(this)&&se(t);return this.isColumnFunc(e,i)}return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??at[e]}isColumnFunc(e,t){if("boolean"===typeof t)return t;if("function"===typeof t){return t(this.createColumnFunctionCallbackParams(e))}return!1}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.sort}isSortDescending(){return"desc"===this.sort}isSortNone(){return b(this.sort)}isSorting(){return w(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const s=this.createColumnEvent("filterChanged",t);i&&nt(s,i),this.columnEventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){this.pinned=!0===e||"left"===e?"left":"right"===e?"right":null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(e,t){const i=!0===e;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(b(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(b(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},ut={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},pt=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=M(e);let i=0;for(;;){let s;if(e?(s=e,0!==i&&(s+="_"+i)):t?(s=t,0!==i&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},gt=class extends ze{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(e){this.dataTypeService=e.dataTypeService}createColumnTree(e,t,i,s){const n=new pt,{existingCols:r,existingGroups:o,existingColKeys:a}=this.extractExistingTreeData(i);n.addExistingKeys(a);const l=this.recursivelyCreateColumns(e,0,t,r,n,o,s),h=this.findMaxDept(l,0),c=this.balanceColumnTree(l,0,h,n);return mt(null,c,((e,t)=>{He(e)&&e.setupExpandable(),e.setOriginalParent(t)})),{columnTree:c,treeDept:h}}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&mt(null,e,(e=>{if(He(e)){const t=e;i.push(t)}else{const i=e;s.push(i.getId()),t.push(i)}})),{existingCols:t,existingGroups:i,existingColKeys:s}}balanceTreeForAutoCols(e,t){const i=[],s=this.findDepth(t);return e.forEach((e=>{let t=e;for(let i=s-1;i>=0;i--){const s=new We(null,`FAKE_PATH_${e.getId()}}_${i}`,!0,i);this.createBean(s),s.setChildren([t]),t.setOriginalParent(s),t=s}0===s&&e.setOriginalParent(null),i.push(t)})),[i,s]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&He(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){const n=[];for(let r=0;r<e.length;r++){const o=e[r];if(He(o)){const e=o,r=this.balanceColumnTree(e.getChildren(),t+1,i,s);e.setChildren(r),n.push(e)}else{let r,a;for(let e=i-1;e>=t;e--){const e=s.getUniqueKey(null,null),i=this.createMergedColGroupDef(null),n=new We(i,e,!0,t);this.createBean(n),a&&a.setChildren([n]),a=n,r||(r=a)}if(r&&a){n.push(r);if(e.some((e=>He(e)))){a.setChildren([o]);continue}a.setChildren(e);break}n.push(o)}}return n}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;s++){const n=e[s];if(He(n)){const e=n,s=this.findMaxDept(e.getChildren(),t+1);i<s&&(i=s)}}return i}recursivelyCreateColumns(e,t,i,s,n,r,o){if(!e)return[];const a=new Array(e.length);for(let l=0;l<a.length;l++){const h=e[l];this.isColumnGroup(h)?a[l]=this.createColumnGroup(i,h,t,s,n,r,o):a[l]=this.createColumn(i,h,s,n,o)}return a}createColumnGroup(e,t,i,s,n,r,o){const a=this.createMergedColGroupDef(t),l=n.getUniqueKey(a.groupId||null,null),h=new We(a,l,!1,i);this.createBean(h);const c=this.findExistingGroup(t,r);c&&r.splice(c.idx,1);const d=c?.group;d&&h.setExpanded(d.isExpanded());const u=this.recursivelyCreateColumns(a.children,i+1,e,s,n,r,o);return h.setChildren(u),h}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,s,n){const r=this.findExistingColumn(t,i);r&&i?.splice(r.idx,1);let o=r?.column;if(o){const e=this.addColumnDefaultAndTypes(t,o.getColId());o.setColDef(e,t,n),this.applyColumnState(o,e,n)}else{const i=s.getUniqueKey(t.colId,t.field),n=this.addColumnDefaultAndTypes(t,i);o=new dt(n,t,i,e),this.createBean(o)}return this.dataTypeService?.addColumnListeners(o),o}applyColumnState(e,t,i){const s=D(t.flex);void 0!==s&&e.setFlex(s);if(e.getFlex()<=0){const s=D(t.width);if(null!=s)e.setActualWidth(s,i);else{const t=e.getActualWidth();e.setActualWidth(t,i)}}void 0!==t.sort&&("asc"==t.sort||"desc"==t.sort?e.setSort(t.sort,i):e.setSort(void 0,i));const n=D(t.sortIndex);void 0!==n&&e.setSortIndex(n);const r=I(t.hide);void 0!==r&&e.setVisible(!r,i),void 0!==t.pinned&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(!s)continue;if(null!=e.colId){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(null!=e.field){if(s.field===e.field)return{idx:i,column:t[i]}}else if(s===e)return{idx:i,column:t[i]}}}findExistingGroup(e,t){if(null!=e.groupId)for(let i=0;i<t.length;i++){const s=t[i];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:i,group:s}}}addColumnDefaultAndTypes(e,t){const i={};nt(i,this.gos.get("defaultColDef"),!1,!0);const s=this.updateColDefAndGetColumnType(i,e,t);s&&this.assignColumnTypes(s,i),nt(i,e,!1,!0);const n=this.gos.get("autoGroupColumnDef"),r=q(this.gos);return e.rowGroup&&n&&r&&nt(i,{sort:n.sort,initialSort:n.initialSort},!1,!0),this.dataTypeService?.validateColDef(i),i}updateColDefAndGetColumnType(e,t,i){const s=this.dataTypeService?.updateColDefAndGetColumnType(e,t,i),n=t.type??s??e.type;return e.type=n,n?Qe(n):void 0}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},ut);et(this.gos.get("columnTypes")||{},((e,t)=>{if(e in i)h(`the column type '${e}' is a default column type and cannot be overridden.`);else{t.type&&h("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[e]=t}})),e.forEach((e=>{const s=i[e.trim()];s?nt(t,s,!1,!0):h("colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")}))}isColumnGroup(e){return void 0!==e.children}};function mt(e,t,i){if(t)for(let s=0;s<t.length;s++){const n=t[s];He(n)&&mt(n,n.getChildren(),i),i(n,e)}}var ft=class extends ze{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(e){this.context=e.context,this.ctrlsService=e.ctrlsService,this.columnFactory=e.columnFactory,this.columnSizeService=e.columnSizeService,this.visibleColsService=e.visibleColsService,this.columnViewportService=e.columnViewportService,this.pivotResultColsService=e.pivotResultColsService,this.columnAnimationService=e.columnAnimationService,this.autoColService=e.autoColService,this.controlsColService=e.controlsColService,this.valueCache=e.valueCache,this.columnDefFactory=e.columnDefFactory,this.columnApplyStateService=e.columnApplyStateService,this.columnGroupStateService=e.columnGroupStateService,this.eventDispatcher=e.columnEventDispatcher,this.columnMoveService=e.columnMoveService,this.columnAutosizeService=e.columnAutosizeService,this.funcColsService=e.funcColsService,this.quickFilterService=e.quickFilterService,this.showRowGroupColsService=e.showRowGroupColsService,this.environment=e.environment}postConstruct(){const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],(e=>this.refreshAll(vt(e.source)))),this.addManagedPropertyListener("rowSelection",(e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,vt(e.source))})),this.addManagedPropertyListener("autoGroupColumnDef",(e=>this.onAutoGroupColumnDefChanged(vt(e.source)))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],(e=>this.recreateColumnDefs(vt(e.source)))),this.addManagedPropertyListener("pivotMode",(e=>this.setPivotMode(this.gos.get("pivotMode"),vt(e.source)))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){const t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();const i=this.colDefCols?.list,s=this.colDefCols?.tree,n=this.columnFactory.createColumnTree(this.colDefs,!0,s,e);Ye(this.context,this.colDefCols?.tree,n.columnTree);const r=n.columnTree,o=n.treeDept,a=Ke(r),l={};a.forEach((e=>l[e.getId()]=e)),this.colDefCols={tree:r,treeDepth:o,list:a,map:l},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),"gridInitializing"===e&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;const t=this.cols?.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();const i=(s=this.gos,this.showingPivotResult?!s.get("enableStrictPivotColumnOrder"):s.get("maintainColumnOrder"));var s;e&&!i||this.restoreColOrder(),this.positionLockedCols(),this.showRowGroupColsService?.refresh(),this.quickFilterService?.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear();!we(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){const e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=null!=e,e){const{map:t,list:i,tree:s,treeDepth:n}=e;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:n};e.list.some((e=>void 0!==this.cols?.map[e.getColId()]))||(this.lastPivotOrder=null)}else{const{map:e,list:t,tree:i,treeDepth:s}=this.colDefCols;this.cols={list:t.slice(),map:{...e},tree:i.slice(),treeDepth:s}}}getColsToShow(){const e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns();return this.cols.list.filter((i=>{const s=Ze(i);if(e){const e=t&&Ee(t,i);return s||e}return s||i.isVisible()}))}addAutoCols(){null!=this.autoCols&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),yt(this.cols))}createAutoCols(){const e=te(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),s=()=>{this.autoCols&&(Ye(this.context,this.autoCols.tree),this.autoCols=null)};if(!(i.length>0||this.gos.get("treeData"))||t||e||!this.autoColService)return void s();const n=this.autoColService.createAutoCols(i)??[],r=St(n,this.autoCols?.list||null),o=this.cols.treeDepth,a=this.autoCols?this.autoCols.treeDepth:-1;if(r&&a==o)return;s();const[l,h]=this.columnFactory.balanceTreeForAutoCols(n,this.cols.tree);this.autoCols={list:n,tree:l,treeDepth:h,map:{}};const c=e=>{if(!e)return null;const t=e.filter((e=>!Ze(e)));return[...n,...t]};this.lastOrder=c(this.lastOrder),this.lastPivotOrder=c(this.lastPivotOrder)}createControlsCols(){const e=()=>{Ye(this.context,this.controlsCols?.tree),this.controlsCols=null};this.controlsColService||e();const t=this.cols.treeDepth,i=(this.controlsCols?.treeDepth??-1)==t,s=this.controlsColService?.createControlsCols()??[];if(St(s,this.controlsCols?.list??[])&&i)return;e();const[n,r]=this.columnFactory.balanceTreeForAutoCols(s,this.cols.tree);this.controlsCols={list:s,tree:n,treeDepth:r,map:{}};const o=e=>{if(!e)return null;const t=e.filter((e=>!qe(e)));return[...s,...t]};this.lastOrder=o(this.lastOrder),this.lastPivotOrder=o(this.lastPivotOrder)}addControlsCols(){null!=this.controlsCols&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),yt(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;this.columnApplyStateService.applyColumnState({state:e.map((e=>({colId:"string"===typeof e?e:e.getColId(),hide:!t})))},i)}setColsPinned(e,t,i){if(!this.cols)return;if(x(e))return;if(k(this.gos,"print"))return void h("Changing the column pinning status is not allowed with domLayout='print'");let s;this.columnAnimationService.start(),s=!0===t||"left"===t?"left":"right"===t?"right":null;const n=[];e.forEach((e=>{if(!e)return;const t=this.getCol(e);t&&t.getPinned()!==s&&(t.setPinned(s),n.push(t))})),n.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(n,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;s=He(e)?e.getId():e||"",this.columnGroupStateService.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){let t=null;return mt(null,this.cols?.tree,(i=>{He(i)&&i.getId()===e&&(t=i)})),t}isColGroupLocked(e){const t=this.gos.get("groupLockGroupColumns");if(!e.isRowGroupActive()||0===t)return!1;if(-1===t)return!0;return t>this.funcColsService.getRowGroupColumns().findIndex((t=>t.getColId()===e.getColId()))}isSuppressAutoCol(){if("custom"===this.gos.get("groupDisplayType"))return!0;return"custom"===this.gos.get("treeDataDisplayType")}setAutoHeightActive(){if(this.autoHeightActive=this.cols.list.some((e=>e.isVisible()&&e.isAutoHeight())),this.autoHeightActive){this.autoHeightActiveAtLeastOnce=!0;L(this.gos)||F(this.gos)||h("autoHeight columns only work with Client Side Row Model and Server Side Row Model.")}}restoreColOrder(){const e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;const t=new Map(e.map(((e,t)=>[e,t])));if(!this.cols.list.some((e=>t.has(e))))return;const i=new Map(this.cols.list.map((e=>[e,!0]))),s=e.filter((e=>i.has(e))),n=new Map(s.map((e=>[e,!0]))),r=this.cols.list.filter((e=>!n.has(e))),o=s.slice();r.forEach((e=>{let t=e.getOriginalParent();if(!t)return void o.push(e);const i=[];for(;!i.length&&t;){t.getLeafColumns().forEach((e=>{const t=o.indexOf(e)>=0,s=i.indexOf(e)<0;t&&s&&i.push(e)})),t=t.getOriginalParent()}if(!i.length)return void o.push(e);const s=i.map((e=>o.indexOf(e))),n=Math.max(...s);De(o,e,n+1)})),this.cols.list=o}sortColsLikeKeys(e){if(null==this.cols)return;let t=[];const i={};e.forEach((e=>{if(i[e])return;const s=this.cols.map[e];s&&(t.push(s),i[e]=!0)}));let s=0;this.cols.list.forEach((e=>{const n=e.getColId();if(null!=i[n])return;n.startsWith(_e)?De(t,e,s++):t.push(e)})),t=this.columnMoveService.placeLockedColumns(t),this.columnMoveService.doesMovePassMarryChildren(t)?this.cols.list=t:h("Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}sortColsLikeCols(e){if(!e||e.length<=1)return;e.filter((e=>this.cols.list.indexOf(e)<0)).length>0||e.sort(((e,t)=>this.cols.list.indexOf(e)-this.cols.list.indexOf(t)))}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach((e=>e())),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){Re(this.cols?.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list:this.lastOrder=this.cols?.list}getColumnDefs(){if(!this.colDefCols)return;const e=this.colDefCols.list.slice();this.showingPivotResult?e.sort(((e,t)=>this.lastOrder.indexOf(e)-this.lastOrder.indexOf(t))):this.lastOrder&&e.sort(((e,t)=>this.cols.list.indexOf(e)-this.cols.list.indexOf(t)));const t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){return this.colDefCols?.treeDepth>0}setColSpanActive(){this.colSpanActive=this.cols.list.some((e=>null!=e.getColDef().colSpan))}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)&&(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return!e||!this.gos.get("treeData")||(h("Pivot mode not available with treeData."),!1)}isPivotActive(){const e=this.funcColsService.getPivotColumns();return this.pivotMode&&!x(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Ye(this.context,this.colDefCols?.tree),Ye(this.context,this.autoCols?.tree),Ye(this.context,this.controlsCols?.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){return this.colDefCols?.list?this.colDefCols.list:null}getCols(){return this.cols?.list??[]}getAllCols(){const e=this.pivotResultColsService.getPivotResultCols(),t=e?.list;return[this.colDefCols?.list??[],this.autoCols?.list??[],this.controlsCols?.list??[],t??[]].flat()}getColsForKeys(e){return e?e.map((e=>this.getCol(e))).filter((e=>null!=e)):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return null==e?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(null==t)return null;const{map:i,list:s}=t;if("string"==typeof e&&i[e])return i[e];for(let n=0;n<s.length;n++)if(Ct(s[n],e))return s[n];return this.getAutoCol(e)}getAutoCol(e){return this.autoCols?.list.find((t=>Ct(t,e)))??null}getAutoCols(){return this.autoCols?.list??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){const e=[],t=this.ctrlsService.getHeaderRowContainerCtrls();for(const i of t){if(!i)continue;const t=i.getGroupRowCount()||0;for(let s=0;s<t;s++){const t=i.getGroupRowCtrlAtIndex(s),n=e[s];if(t){const i=this.getColumnGroupHeaderRowHeight(t);(null==n||i>n)&&(e[s]=i)}}}return e}getColumnGroupHeaderRowHeight(e){const t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight();let i=0;const s=e.getHeaderCtrls();for(const n of s){const e=n.getColumn();if(e.isAutoHeaderHeight()){const t=e.getAutoHeaderHeight();null!=t&&t>i&&(i=t)}}return Math.max(t,i)}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.visibleColsService.getAllCols().filter((e=>e.isAutoHeaderHeight())).map((e=>e.getAutoHeaderHeight()||0));return Math.max(e,...t)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if("fitCellContents"!==e?.type)return;const{colIds:t,skipHeader:i}=e;setTimeout((()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)}))}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){const s=(t&&"string"!==typeof t?se(t):void 0)!==(e&&"string"!==typeof e?se(e):void 0),n=t&&"string"!==typeof t?ne(t):void 0,r=e&&"string"!==typeof e?ne(e):void 0;(s||n!==r)&&this.refreshAll(i)}};function vt(e){return"gridOptionsUpdated"===e?"gridOptionsChanged":e}function yt(e){e.map={},e.list.forEach((t=>e.map[t.getId()]=t))}function Ct(e,t){const i=e===t,s=e.getColDef()===t,n=e.getColId()==t;return i||s||n}function St(e,t){return we(e,t,((e,t)=>e.getColId()===t.getColId()))}var wt=class extends ze{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation((()=>this.autoSizeCols(e)));const{colKeys:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:n,source:r="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered())return this.timesDelayed++,void setTimeout((()=>this.autoSizeCols(e)));this.timesDelayed=0;const o=[];let a=-1;const l=null!=i?i:this.gos.get("skipHeaderOnAutoSize"),h=null!=s?s:l;for(;0!==a;){a=0;const e=[];t.forEach((t=>{if(!t)return;const i=this.columnModel.getCol(t);if(!i)return;if(o.indexOf(i)>=0)return;const s=this.autoWidthCalculator.getPreferredWidthForColumn(i,l);if(s>0){const e=this.normaliseColumnWidth(i,s);i.setActualWidth(e,r),o.push(i),a++}e.push(i)})),e.length&&this.visibleColsService.refresh(r)}h||this.autoSizeColumnGroupsByColumns(t,r,n),this.eventDispatcher.columnResized(o,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set;let n;this.columnModel.getColsForKeys(e).forEach((e=>{let t=e.getParent();for(;t&&t!=i;)t.isPadding()||s.add(t),t=t.getParent()}));for(const r of s){for(const e of this.ctrlsService.getHeaderRowContainerCtrls())if(n=e.getHeaderCtrlForColumn(r),n)break;n&&n.resizeLeafColumnsToFit(t)}return[]}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation((()=>this.autoSizeAllColumns(e,t)));const i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){const i=e.getMinWidth();t<i&&(t=i);const s=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=s),t}},bt=class extends ze{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.aggFuncService=e.aggFuncService,this.visibleColsService=e.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:e=>this.rowGroupCols.push(e),removeGroupCol:e=>Me(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>Me(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>Me(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(!0===t)return this.rowGroupCols.slice(0);const i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return x(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;const s=this.columnModel.getColDefCol(e);s&&(s.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[s],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,((e,i)=>this.setRowGroupActive(e,i,t)),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),e||this.gos.get("suppressMakeColumnVisibleAfterUnGroup")||this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,(e=>this.setRowGroupActive(!0,e,t)),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,(e=>this.setRowGroupActive(!1,e,t)),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,(e=>e.setPivotActive(!0,t)),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,((e,i)=>{i.setPivotActive(e,t)}),t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,(e=>e.setPivotActive(!1,t)),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,((e,i)=>this.setValueActive(e,i,t)),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const e=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(e)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,(e=>this.setValueActive(!0,e,t)),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,(e=>this.setValueActive(!1,e,t)),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupCols[e],n=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,s),this.eventDispatcher.rowGroupChanged(n,i)}setColList(e,t,i,s,n,r,o){if(!this.columnModel.getCols())return;const a=new Map;t.forEach(((e,t)=>a.set(e,t))),t.length=0,w(e)&&e.forEach((e=>{const i=this.columnModel.getColDefCol(e);i&&t.push(i)})),t.forEach(((e,t)=>{const i=a.get(e);void 0!==i?s&&i!==t||a.delete(e):a.set(e,0)}));(this.columnModel.getColDefCols()||[]).forEach((e=>{const i=t.indexOf(e)>=0;r(i,e)})),n&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(o),this.eventDispatcher.columnChanged(i,[...a.keys()],o)}updateColList(e,t,i,s,n,r,o){if(!e||x(e))return;let a=!1;const l=new Set;e.forEach((e=>{if(!e)return;const s=this.columnModel.getColDefCol(e);if(s){if(l.add(s),i){if(t.indexOf(s)>=0)return;t.push(s)}else{const e=t.indexOf(s);if(e<0)return;for(let i=e+1;i<t.length;i++)l.add(t[i]);Me(t,s)}n(s),a=!0}})),a&&(s&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(o),this.eventDispatcher.genericColumnEvent(r,Array.from(l),o))}extractCols(e,t){this.extractRowGroupCols(e,t),this.extractPivotCols(e,t),this.extractValueCols(e,t)}extractValueCols(e,t){this.valueCols=this.extractColsCommon(t,this.valueCols,((t,i)=>t.setValueActive(i,e)),(()=>{}),(()=>{}),(e=>{const t=e.aggFunc;return null===t||""===t?null:void 0!==t?!!t:void 0}),(e=>null!=e.initialAggFunc&&""!=e.initialAggFunc)),this.valueCols.forEach((e=>{const t=e.getColDef();null!=t.aggFunc&&""!=t.aggFunc?e.setAggFunc(t.aggFunc):e.getAggFunc()||e.setAggFunc(t.initialAggFunc)}))}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,((t,i)=>t.setRowGroupActive(i,e)),(e=>e.rowGroupIndex),(e=>e.initialRowGroupIndex),(e=>e.rowGroup),(e=>e.initialRowGroup))}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,((t,i)=>t.setPivotActive(i,e)),(e=>e.pivotIndex),(e=>e.initialPivotIndex),(e=>e.pivot),(e=>e.initialPivot))}extractColsCommon(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0;const a=[],l=[];(this.columnModel.getColDefCols()||[]).forEach((i=>{const h=e.indexOf(i)<0,c=i.getColDef(),d=I(r(c)),u=I(o(c)),p=D(s(c)),g=D(n(c));let m;if(m=void 0!==d?d:void 0!==p?null!==p&&p>=0:h?void 0!==u?u:!!(void 0!==g)&&(null!=g&&g>=0):t.indexOf(i)>=0,m){(h?null!=p||null!=g:null!=p)?a.push(i):l.push(i)}}));const h=e=>{const t=s(e.getColDef()),i=n(e.getColDef());return null!=t?t:i};a.sort(((e,t)=>{const i=h(e),s=h(t);return i===s?0:i<s?-1:1}));const c=[].concat(a);return t.forEach((e=>{l.indexOf(e)>=0&&c.push(e)})),l.forEach((e=>{c.indexOf(e)<0&&c.push(e)})),t.forEach((e=>{c.indexOf(e)<0&&i(e,!1)})),c.forEach((e=>{t.indexOf(e)<0&&i(e,!0)})),c}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},s=(e,t,s,n,r,o)=>{const a=this.columnModel.getColDefCols();if(!t.length||!a)return[];const l=Object.keys(e),h=new Set(l),c=new Set(l),d=new Set(t.map((e=>{const t=e.getColId();return c.delete(t),t})).concat(l)),u=[],p={};let g=0;for(let i=0;i<a.length;i++){const e=a[i].getColId();d.has(e)&&(u.push(e),p[e]=g++)}let m=1e3,f=!1,v=0;const y=t=>{const i=p[t];for(let s=v;s<i;s++){const t=u[s];c.has(t)&&(e[t][r]=m++,c.delete(t))}v=i};t.forEach((t=>{const a=t.getColId();if(h.has(a))y(a),e[a][r]=m++;else{const l=t.getColDef();if(null===l[r]||void 0===l[r]&&null==l[o]){if(!f){l[s]||void 0===l[s]&&l[n]?y(a):(c.forEach((t=>{e[t][r]=m+p[t]})),m+=u.length,f=!0)}i[a]||(i[a]={colId:a}),i[a][r]=m++}}}))};return s(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},xt=class extends ze{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){const i=this.columnModel.getColDefCols()||[];if(x(i))return!1;if(e&&e.state&&!e.state.forEach)return h("applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const s=this.funcColsService.getModifyColumnsNoEventsCallbacks(),n=(i,n,r)=>{const o=this.compareColumnStatesAndDispatchEvents(t),a=n.slice(),l={},h={},c=[],d=[];let u=0;const p=this.funcColsService.getRowGroupColumns().slice(),g=this.funcColsService.getPivotColumns().slice();i.forEach((i=>{const n=i.colId||"";if(n.startsWith(_e))return c.push(i),void d.push(i);const o=r(n);o?(this.syncColumnWithStateItem(o,i,e.defaultState,l,h,!1,t,s),Me(a,o)):(d.push(i),u+=1)}));const m=i=>this.syncColumnWithStateItem(i,null,e.defaultState,l,h,!1,t,s);a.forEach(m),this.funcColsService.sortRowGroupColumns(Mt.bind(this,l,p)),this.funcColsService.sortPivotColumns(Mt.bind(this,h,g)),this.columnModel.refreshCols(!1);const f=(this.columnModel.getAutoCols()||[]).slice();return c.forEach((i=>{const n=this.columnModel.getAutoCol(i.colId);Me(f,n),this.syncColumnWithStateItem(n,i,e.defaultState,null,null,!0,t,s)})),f.forEach(m),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),o(),{unmatchedAndAutoStates:d,unmatchedCount:u}};this.columnAnimationService.start();let{unmatchedAndAutoStates:r,unmatchedCount:o}=n(e.state||[],i,(e=>this.columnModel.getColDefCol(e)));if(r.length>0||w(e.defaultState)){const e=this.pivotResultColsService.getPivotResultCols(),t=e?.list;o=n(r,t||[],(e=>this.pivotResultColsService.getPivotResultCol(e))).unmatchedCount}return this.columnAnimationService.finish(),0===o}resetColumnState(e){if(x(this.columnModel.getColDefCols()))return;const t=Ke(this.columnModel.getColDefColTree()),i=[];let s=1e3,n=1e3,r=[];const o=this.columnModel.getAutoCols();o&&(r=r.concat(o)),t&&(r=r.concat(t)),r.forEach((e=>{const t=this.getColumnStateFromColDef(e);b(t.rowGroupIndex)&&t.rowGroup&&(t.rowGroupIndex=s++),b(t.pivotIndex)&&t.pivot&&(t.pivotIndex=n++),i.push(t)})),this.applyColumnState({state:i,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(e,t)=>null!=e?e:null!=t?t:null,i=e.getColDef(),s=t(i.sort,i.initialSort),n=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),o=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex);let h=t(i.rowGroupIndex,i.initialRowGroupIndex),c=t(i.rowGroup,i.initialRowGroup);null!=h||null!=c&&0!=c||(h=null,c=null);let d=t(i.pivotIndex,i.initialPivotIndex),u=t(i.pivot,i.initialPivot);null!=d||null!=u&&0!=u||(d=null,u=null);const p=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:n,hide:r,pinned:o,width:a,flex:l,rowGroup:c,rowGroupIndex:h,pivot:u,pivotIndex:d,aggFunc:p}}syncColumnWithStateItem(e,t,i,s,n,r,o,a){if(!e)return;const l=(e,s)=>{const n={value1:void 0,value2:void 0};let r=!1;return t&&(void 0!==t[e]&&(n.value1=t[e],r=!0),w(s)&&void 0!==t[s]&&(n.value2=t[s],r=!0)),!r&&i&&(void 0!==i[e]&&(n.value1=i[e]),w(s)&&void 0!==i[s]&&(n.value2=i[s])),n},c=l("hide").value1;void 0!==c&&e.setVisible(!c,o);const d=l("pinned").value1;void 0!==d&&e.setPinned(d);const u=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),p=l("flex").value1;if(void 0!==p&&e.setFlex(p),null==p){const t=l("width").value1;null!=t&&null!=u&&t>=u&&e.setActualWidth(t,o)}const g=l("sort").value1;void 0!==g&&("desc"===g||"asc"===g?e.setSort(g,o):e.setSort(void 0,o));const m=l("sortIndex").value1;if(void 0!==m&&e.setSortIndex(m),r||!e.isPrimary())return;const f=l("aggFunc").value1;void 0!==f&&("string"===typeof f?(e.setAggFunc(f),e.isValueActive()||(e.setValueActive(!0,o),a.addValueCol(e))):(w(f)&&h("stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,o),a.removeValueCol(e))));const{value1:v,value2:y}=l("rowGroup","rowGroupIndex");void 0===v&&void 0===y||("number"===typeof y||v?(e.isRowGroupActive()||(e.setRowGroupActive(!0,o),a.addGroupCol(e)),s&&"number"===typeof y&&(s[e.getId()]=y)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,o),a.removeGroupCol(e)));const{value1:C,value2:S}=l("pivot","pivotIndex");void 0===C&&void 0===S||("number"===typeof S||C?(e.isPivotActive()||(e.setPivotActive(!0,o),a.addPivotCol(e)),n&&"number"===typeof S&&(n[e.getId()]=S)):e.isPivotActive()&&(e.setPivotActive(!1,o),a.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;const t=[];e.state.forEach((e=>{null!=e.colId&&t.push(e.colId)})),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),s={};return i.forEach((e=>{s[e.colId]=e})),()=>{const n=this.columnModel.getAllCols(),r=(t,i,s,n)=>{if(we(i.map(n),s.map(n)))return;const r=new Set(i);s.forEach((e=>{r.delete(e)||r.add(e)}));const o=[...r];this.eventService.dispatchEvent({type:t,columns:o,column:1===o.length?o[0]:null,source:e})},o=e=>{const t=[];return n.forEach((i=>{const n=s[i.getColId()];n&&e(n,i)&&t.push(i)})),t},a=e=>e.getColId();r("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),a),r("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),a);const l=o(((e,t)=>{const i=null!=e.aggFunc,s=i!=t.isValueActive(),n=i&&e.aggFunc!=t.getAggFunc();return s||n}));l.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",l,e);this.eventDispatcher.columnResized(o(((e,t)=>e.width!=t.getActualWidth())),!0,e);this.eventDispatcher.columnPinned(o(((e,t)=>e.pinned!=t.getPinned())),e);this.eventDispatcher.columnVisible(o(((e,t)=>e.hide==t.isVisible())),e);const h=o(((e,t)=>e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex()));h.length>0&&this.sortController.dispatchSortChangedEvents(e,h),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){const i=this.columnGetStateService.getColumnState(),s={};i.forEach((e=>s[e.colId]=e));const n={};e.forEach((e=>{s[e.colId]&&(n[e.colId]=!0)}));const r=e.filter((e=>n[e.colId])),o=i.filter((e=>n[e.colId])),a=[];o.forEach(((e,t)=>{const i=r&&r[t];if(i&&i.colId!==e.colId){const e=this.columnModel.getCol(i.colId);e&&a.push(e)}})),a.length&&this.eventDispatcher.columnMoved({movedColumns:a,source:t,finished:!0})}},Mt=(e,t,i,s)=>{const n=e[i.getId()],r=e[s.getId()],o=null!=n,a=null!=r;if(o&&a)return n-r;if(o)return-1;if(a)return 1;const l=t.indexOf(i),h=t.indexOf(s),c=l>=0;return c&&h>=0?l-h:c?-1:1},Dt=class extends ze{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){const s=this.columnModel.getCols();if(!s)return;const n=s[e];this.moveColumns([n],t,i)}moveColumns(e,t,i){let s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const n=this.columnModel.getCols();if(!n)return;if(t>n.length-e.length)return h("tried to insert columns in invalid location, toIndex = ",t),void h("remember that you should not count the moving columns when calculating the new index");this.columnAnimationService.start();const r=this.columnModel.getColsForKeys(e);this.doesMovePassRules(r,t)&&(this.columnModel.moveInCols(r,t,i),this.eventDispatcher.columnMoved({movedColumns:r,source:i,toIndex:t,finished:s})),this.columnAnimationService.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)}getProposedColumnOrder(e,t){const i=this.columnModel.getCols().slice();return Re(i,e,t),i}doesMovePassLockedPositions(e){const t=this.gos.get("enableRtl");let i=t?1:-1,s=!0;return e.forEach((e=>{const n=(r=e.getColDef().lockPosition)?"left"===r||!0===r?-1:1:0;var r;t?n>i&&(s=!1):n<i&&(s=!1),i=n})),s}doesMovePassMarryChildren(e){let t=!0;return mt(null,this.columnModel.getColTree(),(i=>{if(!He(i))return;const s=i,n=s.getColGroupDef();if(!(n&&n.marryChildren))return;const r=[];s.getLeafColumns().forEach((t=>{const i=e.indexOf(t);r.push(i)}));Math.max.apply(Math,r)-Math.min.apply(Math,r)>s.getLeafColumns().length-1&&(t=!1)})),t}placeLockedColumns(e){const t=[],i=[],s=[];e.forEach((e=>{const n=e.getColDef().lockPosition;"right"===n?s.push(e):"left"===n||!0===n?t.push(e):i.push(e)}));return this.gos.get("enableRtl")?[...s,...i,...t]:[...t,...i,...s]}},It=/[&<>"']/g,Rt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Et(e){const t=String.fromCharCode;function i(e,i){return t(e>>i&63|128)}function s(e){if(0==(4294967168&e))return t(e);let s="";return 0==(4294965248&e)?s=t(e>>6&31|192):0==(4294901760&e)?(!function(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}(e),s=t(e>>12&15|224),s+=i(e,6)):0==(4292870144&e)&&(s=t(e>>18&7|240),s+=i(e,12),s+=i(e,6)),s+=t(63&e|128),s}const n=function(e){const t=[];if(!e)return[];const i=e.length;let s,n,r=0;for(;r<i;)s=e.charCodeAt(r++),s>=55296&&s<=56319&&r<i?(n=e.charCodeAt(r++),56320==(64512&n)?t.push(((1023&s)<<10)+(1023&n)+65536):(t.push(s),r--)):t.push(s);return t}(e),r=n.length;let o,a=-1,l="";for(;++a<r;)o=n[a],l+=s(o);return l}function At(e,t){if(null==e)return null;const i=e.toString().toString();return t?i:i.replace(It,(e=>Rt[e]))}var Tt=class extends ze{constructor(){super(...arguments),this.beanName="
2columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,n){const r=e.headerValueGetter;if(r){const o=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:n});return"function"===typeof r?r(o):"string"===typeof r?this.expressionService.evaluate(r,o):(h("headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?(o=e.field)&&null!=o?o.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map((e=>e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):""))).join(" "):null:"";var o}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn;let s,n=null;if(w(i)){const r=this.funcColsService.getValueColumns(),o=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===r.length,a=void 0!==e.getColDef().pivotTotalColumnIds;if(o&&!a)return t;n=i?i.getAggFunc():null,s=!0}else{const t=e.isValueActive(),i=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();t&&i?(n=e.getAggFunc(),s=!0):s=!1}if(s){const e="string"===typeof n?n:"func";return`${this.localeService.getLocaleTextFunc()(e,e)}(${t})`}return t}},Pt=class extends ze{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){Ye(this.context,this.pivotResultCols?.tree),super.destroy()}isPivotResultColsPresent(){return null!=this.pivotResultCols}lookupPivotResultCol(e,t){if(null==this.pivotResultCols)return null;const i=this.columnModel.getColDefCol(t);let s=null;return this.pivotResultCols.list.forEach((t=>{const n=t.getColDef().pivotKeys,r=t.getColDef().pivotValueColumn;we(n,e)&&r===i&&(s=t)})),s}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){if(this.columnModel.isReady()&&(null!=e||null!=this.pivotResultCols)){if(e){this.processPivotResultColDef(e);const i=this.columnFactory.createColumnTree(e,!1,this.pivotResultCols?.tree||this.previousPivotResultCols||void 0,t);Ye(this.context,this.pivotResultCols?.tree,i.columnTree);const s=i.columnTree,n=i.treeDept,r=Ke(s),o={};this.pivotResultCols={tree:s,treeDepth:n,list:r,map:o},this.pivotResultCols.list.forEach((e=>this.pivotResultCols.map[e.getId()]=e));const a=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!a)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=e=>{e.forEach((e=>{if(w(e.children)){const t=e;i&&i(t),s(t.children)}else{t&&t(e)}}))};e&&s(e)}},Lt=class extends ze{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,s){const n=[];e.forEach((e=>{const i=this.columnModel.getColDefCol(e.key)||this.columnModel.getCol(e.key);if(!i)return;n.push({width:e.newWidth,ratios:[1],columns:[i]});if("shift"===this.gos.get("colResizeDefault")&&(t=!t),t){const t=this.visibleColsService.getColAfter(i);if(!t)return;const s=i.getActualWidth()-e.newWidth,r=t.getActualWidth()+s;n.push({width:r,ratios:[1],columns:[t]})}})),0!==n.length&&this.resizeColumnSets({resizeSets:n,finished:i,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every((e=>this.checkMinAndMaxWidthsForSet(e))))){if(i){const e=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(e,i,s)}return}const n=[],r=[];t.forEach((e=>{const{width:t,columns:i,ratios:o}=e,a={},l={};
vendor: 17,976 bytes, line 2
2i.forEach((e=>r.push(e)));let h=!0,d=0;for(;h;){if(d++,d>1e3){c("infinite loop in resizeColumnSets");break}h=!1;const e=[];let s=0,n=t;i.forEach(((t,i)=>{if(l[t.getId()])n-=a[t.getId()];else{e.push(t);const n=o[i];s+=n}}));const r=1/s;e.forEach(((i,s)=>{let c;s===e.length-1?c=n:(c=Math.round(o[s]*t*r),n-=c);const d=i.getMinWidth(),u=i.getMaxWidth();c<d?(c=d,l[i.getId()]=!0,h=!0):u>0&&c>u&&(c=u,l[i.getId()]=!0,h=!0),a[i.getId()]=c}))}i.forEach((e=>{const t=a[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,s),n.push(e))}))}));const o=n.length>0;let a=[];o&&(a=this.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}),this.visibleColsService.setLeftValues(s),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());const l=r.concat(a);(o||i)&&this.eventDispatcher.columnResized(l,i,s,a)}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,n=0,r=!0;t.forEach((e=>{const t=e.getMinWidth();s+=t||0;const i=e.getMaxWidth();i>0?n+=i:r=!1}));return i>=s&&(!r||i<=n)}refreshFlexedColumns(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];const i=this.visibleColsService.getCenterCols();let s=-1;if(e.resizingCols){const t=new Set(e.resizingCols);for(let e=i.length-1;e>=0;e--)if(t.has(i[e])){s=e;break}}let n=0,r=[],o=0,a=0;for(let u=0;u<i.length;u++){i[u].getFlex()&&u>s?(r.push(i[u]),a+=i[u].getFlex(),o+=i[u].getMinWidth()):n+=i[u].getActualWidth()}if(!r.length)return[];let l=[];n+o>this.flexViewportWidth&&(r.forEach((e=>e.setActualWidth(e.getMinWidth(),t))),l=r,r=[]);const h=[];let c;e:for(;;){c=this.flexViewportWidth-n;const e=c/a;for(let i=0;i<r.length;i++){const s=r[i],o=e*s.getFlex();let c=0;const d=s.getMinWidth(),u=s.getMaxWidth();if(o<d?c=d:o>u&&(c=u),c){s.setActualWidth(c,t),xe(r,s),a-=s.getFlex(),l.push(s),n+=s.getActualWidth();continue e}h[i]=Math.floor(o)}break}let d=c;return r.forEach(((e,i)=>{const s=i<r.length-1?Math.min(h[i],d):Math.max(h[i],d);e.setActualWidth(s,t),l.push(e),d-=h[i]})),e.skipSetLeft||this.visibleColsService.setLeftValues(t),e.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),e.fireResizedEvent&&this.eventDispatcher.columnResized(l,!0,t,r),r}sizeColumnsToFit(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sizeColumnsToFit",i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation((()=>this.sizeColumnsToFit(e,t,i,s)));const n={};s&&s?.columnLimits?.forEach((e=>{let{key:t,...i}=e;n["string"===typeof t?t:t.getColId()]=i}));const r=this.visibleColsService.getAllCols(),o=e===$e(r);if(e<=0||!r.length||o)return;const a=[],l=[];r.forEach((e=>{!0===e.getColDef().suppressSizeToFit?l.push(e):a.push(e)}));const h=a.slice(0);let c=!1;const d=e=>{Me(a,e),l.push(e)};for(a.forEach((e=>{e.resetActualWidth(t);const i=n?.[e.getId()],r=i?.minWidth??s?.defaultMinWidth,o=i?.maxWidth??s?.defaultMaxWidth,a=e.getActualWidth();"number"===typeof r&&a<r?e.setActualWidth(r,t,!0):"number"===typeof o&&a>o&&e.setActualWidth(o,t,!0)}));!c;){c=!0;const i=e-$e(l);if(i<=0)a.forEach((e=>{const i=n?.[e.getId()]?.minWidth??s?.defaultMinWidth;"number"!==typeof i?e.setMinimum(t):e.setActualWidth(i,t,!0)}));else{const e=i/$e(a);let r=i;for(let i=a.length-1;i>=0;i--){const o=a[i],l=n?.[o.getId()],h=l?.minWidth??s?.defaultMinWidth,u=l?.maxWidth??s?.defaultMaxWidth,p=o.getMinWidth(),g=o.getMaxWidth(),m="number"===typeof h&&h>p?h:p,f="number"===typeof u&&u<g?u:g;let v=Math.round(o.getActualWidth()*e);v<m?(v=m,d(o),c=!1):v>f?(v=f,d(o),c=!1):0===i&&(v=r),o.setActualWidth(v,t,!0),r-=v}}}h.forEach((e=>{e.fireColumnWidthChangedEvent(t)})),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),i||this.eventDispatcher.columnResized(h,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout((()=>{if("fitGridWidth"===t){const{columnLimits:t,defaultMinWidth:i,defaultMaxWidth:s}=e,n=t?.map((e=>{let{colId:t,minWidth:i,maxWidth:s}=e;return{key:t,minWidth:i,maxWidth:s}}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:n})}else"fitProvidedWidth"===t&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")}))}};function Ft(e,t){return e+"_"+t}function kt(e){return e instanceof Nt}var Nt=class extends ze{constructor(e,t,i,s){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=s}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return Ft(this.groupId,this.partId)}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every((e=>e.isMoving()))}checkLeft(){if(this.displayedChildren.forEach((e=>{kt(e)&&e.checkLeft()})),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const e=Se(this.displayedChildren).getLeft();this.setLeft(e)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach((t=>{e+=t.getActualWidth()})),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach((t=>{t.isResizable()&&(e=!0)})),e}getMinWidth(){let e=0;return this.displayedChildren.forEach((t=>{e+=t.getMinWidth()})),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach((t=>{ct(t)?e.push(t):kt(t)&&t.addDisplayedLeafColumns(e)}))}addLeafColumns(e){this.children.forEach((t=>{ct(t)?e.push(t):kt(t)&&t.addLeafColumns(e)}))}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;null!=e&&e.isPadding();)e=e.getParent();if(!(!!e&&e.getProvidedColumnGroup().isExpandable()))return this.displayedChildren=this.children,void this.dispatchLocalEvent({type:"displayedChildrenChanged"});this.children.forEach((t=>{if(kt(t)&&(!t.displayedChildren||!t.displayedChildren.length))return;switch(t.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(t);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(t);break;default:this.displayedChildren.push(t)}})),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},Ot=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return i="number"!==typeof t?0:t+1,this.existingIds[e]=i,i}},Gt=class extends ze{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=Vt(this.treeLeft),this.columnsCenter=Vt(this.treeCenter),this.columnsRight=Vt(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter((e=>e.isAutoHeight())),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){const e=$e(this.columnsCenter),t=$e(this.columnsLeft),i=$e(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e;(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?Se(this.columnsRight):null):(t=this.columnsLeft?Se(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach((s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)}))}buildTrees(){const e=this.columnModel.getColsToShow(),t=e.filter((e=>"left"==e.getPinned())),i=e.filter((e=>"right"==e.getPinned())),s=e.filter((e=>"left"!=e.getPinned()&&"right"!=e.getPinned())),n=new Ot;this.treeLeft=this.createGroups({columns:t,idCreator:n,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:n,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:s,idCreator:n,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){const e=this.columnModel.getCols(),t=[],i=[],s=[];for(const n of e){const e=n.getPinned();e?!0===e||"left"===e?t.push(n):s.push(n):i.push(n)}this.ariaOrderColumns=t.concat(i).concat(s)}getAriaColIndex(e){let t;return t=kt(e)?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach((e=>{e.forEach((e=>{if(kt(e)){e.checkLeft()}}))}))}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;const t=this.columnModel.getCols().slice(0),i=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach((s=>{if(i){let t=$e(s);s.forEach((i=>{t-=i.getActualWidth(),i.setLeft(t,e)}))}else{let t=0;s.forEach((i=>{i.setLeft(t,e),t+=i.getActualWidth()}))}!function(e,t){for(let i=0;i<t.length;i++)xe(e,t[i])}(t,s)})),t.forEach((t=>{t.setLeft(null,e)}))}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,s){const n=[];let r=null;for(let o=0;o<t.length;o++){const a=t[o],l=t.length-o,h=Math.min(a.getColSpan(e),l),c=[a];if(h>1){const e=h-1;for(let i=1;i<=e;i++)c.push(t[o+i]);o+=e}let d;if(i?(d=!1,c.forEach((e=>{i(e)&&(d=!0)}))):d=!0,d){if(0===n.length&&r){!!s&&s(a)&&n.push(r)}n.push(a)}r=a}return n}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){const t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),n="After"===t?Se(s):s[0],r=`getCol${t}`;for(;;){const t=this[r](n);if(!t)return null;const s=this.getColGroupAtLevel(t,i);if(s!==e)return s}}getColGroupAtLevel(e,t){let i,s,n=e.getParent();for(;;){if(i=n.getProvidedColumnGroup().getLevel(),s=n.getPaddingLevel(),i+s<=t)break;n=n.getParent()}return n}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=e=>{this.colsAndGroupsMap[e.getUniqueId()]=e};Bt(this.treeCenter,!1,e),Bt(this.treeLeft,!1,e),Bt(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){Bt(this.getAllTrees(),!1,(e=>{kt(e)&&e.calculateDisplayedColumns()}))}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]]();if(s.length)return e?Se(s):s[0]}return null}getColumnGroup(e,t){if(!e)return null;if(kt(e))return e;const i=this.getAllTrees(),s="number"===typeof t;let n=null;return Bt(i,!1,(i=>{if(kt(i)){const r=i;let o;o=s?e===r.getGroupId()&&t===r.getPartId():e===r.getGroupId(),o&&(n=r)}})),n}getColAfter(e){const t=this.getAllCols(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return $e(this.columnsLeft)}getDisplayedColumnsRightWidth(){return $e(this.columnsRight)}isColAtEdge(e,t){const i=this.getAllCols();if(!i.length)return!1;const s="first"===t;let n;if(kt(e)){const t=e.getDisplayedLeafColumns();if(!t.length)return!1;n=s?t[0]:Se(t)}else n=e;return(s?i[0]:Se(i))===n}createGroups(e){const{columns:t,idCreator:i,pinned:s,oldDisplayedGroups:n,isStandaloneStructure:r}=e,o=this.mapOldGroupsById(n),a=[];let l=t;for(;l.length;){const e=l;l=[];let t=0;const n=n=>{const h=t;t=n;const c=e[h],d=(kt(c)?c.getProvidedColumnGroup():c).getOriginalParent();if(null==d){for(let t=h;t<n;t++)a.push(e[t]);return}const u=this.createColGroup(d,i,o,s,r);for(let t=h;t<n;t++)u.addChild(e[t]);l.push(u)};for(let i=1;i<e.length;i++){const s=e[i],r=(kt(s)?s.getProvidedColumnGroup():s).getOriginalParent(),o=e[t];r!==(kt(o)?o.getProvidedColumnGroup():o).getOriginalParent()&&n(i)}t<e.length&&n(e.length)}return r||this.setupParentsIntoCols(a,null),a}createColGroup(e,t,i,s,n){const r=e.getGroupId(),o=t.getInstanceIdForKey(r);let a=i[Ft(r,o)];return a&&a.getProvidedColumnGroup()!==e&&(a=null),w(a)?a.reset():(a=new Nt(e,r,o,s),n||this.createBean(a)),a}mapOldGroupsById(e){const t={},i=e=>{e.forEach((e=>{if(kt(e)){const s=e;t[e.getUniqueId()]=s,i(s.getChildren())}}))};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach((e=>{if(e.setParent(t),kt(e)){const t=e;this.setupParentsIntoCols(t.getChildren(),t)}}))}};function Bt(e,t,i){if(e)for(let s=0;s<e.length;s++){const n=e[s];if(kt(n)){Bt(t?n.getDisplayedChildren():n.getChildren(),t,i)}i(n)}}function Vt(e){const t=[];return Bt(e,!0,(e=>{ct(e)&&t.push(e)})),t}var zt=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDrag
2Cancel"],Ht=[...zt,"scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],Wt={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},jt=class{};jt.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],jt.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"],jt.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],jt.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],jt.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],jt.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"],jt.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","
2sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],jt.ALL_PROPERTIES=[...jt.ARRAY_PROPERTIES,...jt.OBJECT_PROPERTIES,...jt.STRING_PROPERTIES,...jt.NUMBER_PROPERTIES,...jt.FUNCTION_PROPERTIES,...jt.BOOLEAN_PROPERTIES,...jt.OTHER_PROPERTIES];var Ut=jt,_t=class{static getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}};_t.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",_t.PUBLIC_EVENTS=zt,_t.EVENT_CALLBACKS=Ht.map((e=>_t.getCallbackForEvent(e))),_t.BOOLEAN_PROPERTIES=Ut.BOOLEAN_PROPERTIES,_t.ALL_PROPERTIES=Ut.ALL_PROPERTIES,_t.ALL_PROPERTIES_AND_CALLBACKS=[..._t.ALL_PROPERTIES,..._t.EVENT_CALLBACKS],_t.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(_t.ALL_PROPERTIES_AND_CALLBACKS);var Kt=_t;var $t=class extends ze{};function Yt(e,t,i){return i&&e.addDestroyFunc((()=>t.destroyBean(i))),i??e}var Zt,qt,Qt,Xt,Jt,ei,ti,ii,si,ni,ri=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1)return void t.forEach((e=>this.addCssClass(e)));if(!0!==this.cssClassStates[e]&&e.length){const t=this.getGui();t&&t.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1)return void t.forEach((e=>this.removeCssClass(e)));if(!1!==this.cssClassStates[e]&&e.length){const t=this.getGui();t&&t.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return!!t&&t.classList.contains(e)}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const i=(e||"").split(" ");if(i.length>1)return void i.forEach((e=>this.addOrRemoveCssClass(e,t)))}if(this.cssClassStates[e]!==t&&e.length){const i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}};function oi(e,t,i){null==i||"string"===typeof i&&""==i?li(e,t):ai(e,t,i)}function ai(e,t,i){e.setAttribute(hi(t),i.toString())}function li(e,t){e.removeAttribute(hi(t))}function hi(e){return`aria-${e}`}function ci(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function di(e,t){oi(e,"label",t)}function ui(e,t){oi(e,"labelledby",t)}function pi(e,t){oi(e,"describedby",t)}function gi(e,t){oi(e,"live",t)}function mi(e,t){oi(e,"level",t)}function fi(e,t){oi(e,"disabled",t)}function vi(e,t){oi(e,"hidden",t)}function yi(e,t){oi(e,"activedescendant",t)}function Ci(e,t){ai(e,"expanded",t)}function Si(e){li(e,"expanded")}function wi(e,t){ai(e,"setsize",t)}function bi(e,t){ai(e,"posinset",t)}function xi(e,t){ai(e,"rowcount",t)}function Mi(e,t){ai(e,"rowindex",t)}function Di(e,t){ai(e,"colcount",t)}function Ii(e,t){ai(e,"colindex",t)}function Ri(e,t){ai(e,"colspan",t)}function Ei(e,t){ai(e,"sort",t)}function Ai(e){li(e,"sort")}function Ti(e,t){oi(e,"selected",t)}function Pi(e,t){oi(e,"controls",t.id),ui(t,e.id)}function Li(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function Fi(){return void 0===Zt&&(Zt=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Zt}function ki(){if(void 0===qt)if(Fi()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(qt=null!=e[1]?parseFloat(e[1]):0)}else qt=0;return qt}function Ni(){if(void 0===Qt){const e=window;Qt=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Qt}function Oi(){return void 0===Xt&&(Xt=/(firefox)/i.test(navigator.userAgent)),Xt}function Gi(){return void 0===Jt&&(Jt=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Jt}function Bi(){return void 0===ei&&(ei=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),ei}function Vi(){return!Fi()||ki()>=15}function zi(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return-1!==t||null!==i&&(""!==i||Oi())?t.toString():null}function Hi(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;0===i&&0===t.clientWidth&&(i=null),t.parentNode&&t.parentNode.removeChild(t),null!=i&&(ii=i,ti=0===i)}function Wi(){return null==ti&&Hi(),ti}function ji(e,t,i){const s=e.parentElement;let n=s&&s.firstChild;for(;n;)t&&n.classList.toggle(t,n===e),i&&n.classList.toggle(i,n!==e),n=n.nextSibling}var Ui="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function _i(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,Ui),n=ls(e);return i&&!s&&n}function Ki(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||vi(e,!t)}function $i(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||vi(e,!t)}function Yi(e,t){const i="disabled",s=t?e=>
vendor: 18,035 bytes, line 2
2e.setAttribute(i,""):e=>e.removeAttribute(i);s(e),Cs(e.querySelectorAll("input"),(e=>s(e)))}function Zi(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof i){if(++s>i)break}else if(e===i)break}return!1}function qi(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:n,borderBottomWidth:r,borderLeftWidth:o,paddingTop:a,paddingRight:l,paddingBottom:h,paddingLeft:c,marginTop:d,marginRight:u,marginBottom:p,marginLeft:g,boxSizing:m}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(n||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(o||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(h||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(d||"0"),marginRight:parseFloat(u||"0"),marginBottom:parseFloat(p||"0"),marginLeft:parseFloat(g||"0"),boxSizing:m}}function Qi(e){const t=qi(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function Xi(e){const t=qi(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function Ji(e){const{height:t,marginBottom:i,marginTop:s}=qi(e);return Math.floor(t+i+s)}function es(e){const{width:t,marginLeft:i,marginRight:s}=qi(e);return Math.floor(t+i+s)}function ts(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:n,borderBottomWidth:r}=qi(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(n||0),bottom:t.bottom+(r||0)}}function is(){if("boolean"===typeof ni)return ni;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML='<div style="width: 2px">\n            <span style="display: inline-block; width: 1px"></span>\n            <span style="display: inline-block; width: 1px"></span>\n        </div>',document.body.appendChild(e),e.scrollLeft=1,ni=0===Math.floor(e.scrollLeft),document.body.removeChild(e),ni}function ss(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),Ni()&&!is()&&(i=e.scrollWidth-e.getBoundingClientRect().width-i)),i}function ns(e,t,i){i&&(is()?t*=-1:(Fi()||Ni())&&(t=e.scrollWidth-e.getBoundingClientRect().width-t)),e.scrollLeft=t}function rs(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function os(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function as(e){return!!e.offsetParent}function ls(e){const t=e;if(t.checkVisibility)return t.checkVisibility({checkVisibilityCSS:!0});return!(!as(e)||"visible"!==window.getComputedStyle(e).visibility)}function hs(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function cs(e,t,i){i&&i.nextSibling===t||(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function ds(e,t){for(let i=0;i<t.length;i++){const s=t[i],n=e.children[i];n!==s&&e.insertBefore(s,n)}}function us(e,t){if(t)for(const[i,s]of Object.entries(t)){if(!i||!i.length||null==s)continue;const t=i.replace(/[A-Z]/g,(e=>`-${e.toLocaleLowerCase()}`)),n=s.toString(),r=n.replace(/\s*!important/g,""),o=r.length!=n.length?"important":void 0;e.style.setProperty(t,r,o)}}function ps(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):gs(e,t)}function gs(e,t){t=fs(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function ms(e,t){t=fs(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function fs(e){return"number"===typeof e?`${e}px`:e}function vs(e){return e instanceof Node||e instanceof HTMLElement}function ys(e,t,i){null==i||""===i?e.removeAttribute(t):e.setAttribute(t,i.toString())}function Cs(e,t){if(null!=e)for(let i=0;i<e.length;i++)t(e[i])}function Ss(e,t){e.then((e=>{const i=e.getGui();null!=i&&("object"===typeof i?t.appendChild(i):t.innerHTML=i)}))}var ws=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.nextValue=e,this.step=t}next(){const e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},bs=class e extends ze{constructor(e,t,i,s){super(),this.parentComp=e,this.tooltipShowDelayOverride=t,this.tooltipHideDelayOverride=i,this.shouldDisplayTooltip=s,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupService=e.popupService,this.userComponentFactory=e.userComponentFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.parentComp.getGui();0===this.tooltipTrigger&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),1===this.tooltipTrigger&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return t<0&&h(`${e} should not be lower than 0`),Math.max(200,t)}getTooltipDelay(e){return"show"===e?this.tooltipShowDelayOverride??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipHideDelayOverride??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return e&&"hover"!==e?1:0}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),Bi()||(e.isLocked?this.showTooltipTimeoutId=window.setTimeout((()=>{this.prepareToShowTooltip(t)}),100):this.prepareToShowTooltip(t))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,i=this.parentComp.getGui(),s=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(t)||this.interactionEnabled&&s?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(t){if(0!=this.state||e.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){return(new Date).getTime()-e.lastTooltipHideTime<1e3}setToDoNothing(e){e||2!==this.state||this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e={...this.parentComp.getTooltipParams()};if(!w(e.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip())return void this.setToDoNothing();this.state=2,this.tooltipInstanceCount++;const t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(e).newAgStackInstance().then(t)}hideTooltip(t){!t&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),e.lastTooltipHideTime=(new Date).getTime()),this.eventService.dispatchEvent({type:"tooltipHide",parentGui:this.parentComp.getGui()}),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(2!==this.state||this.tooltipInstanceCount!==e)return void this.destroyBean(t);const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),1===this.tooltipTrigger){const e=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:e,columnMoved:e})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(j(this.gos),{keydown:e=>{i.contains(e?.target)||this.onKeyDown()}}),1===this.tooltipTrigger&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=K(this.gos);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupService.positionPopupByComponent({...e,eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=0===this.tooltipTrigger?1e3:0;window.setTimeout((()=>{e(),this.destroyBean(t)}),i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach((e=>{e&&e()})),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){e.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout((()=>{this.unlockService(),this.setToDoNothing()}),100)}unlockService(){e.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};bs.isLocked=!1;var xs=bs,Ms=class extends ze{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}wireBeans(e){this.beans=e}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(null!=e&&""!=e?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){if(null!=this.tooltipManager)return;const e={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new xs(e,this.ctrl.getTooltipShowDelayOverride?.(),this.ctrl.getTooltipHideDelayOverride?.(),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){const e=this.ctrl,t=e.getColumn?.(),i=e.getColDef?.(),s=e.getRowNode?.();return{location:e.getLocation(),colDef:i,column:t,rowIndex:e.getRowIndex?.(),node:s,data:s?.data,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?.(),hideTooltipCallback:()=>this.tooltipManager?.hideTooltip(!0)}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},Ds=new ws,Is=null,Rs=class e extends ze{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Ds.next(),this.cssClassManager=new ri((()=>this.eGui)),this.componentSelectors=new Map((t??[]).map((e=>[e.selector,e]))),e&&this.setTemplate(e)}preWireBeans(e){super.preWireBeans(e)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(e){const{newTooltipText:t,showDelayOverride:i,hideDelayOverride:s,location:n,shouldDisplayTooltip:r}=e||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==t&&(this.tooltipText=t);const o=()=>this.tooltipText;null!=t&&(this.tooltipFeature=this.createBean(new Ms({getTooltipValue:o,getGui:()=>this.getGui(),getLocation:()=>n??"UNKNOWN",getColDef:e?.getColDef,getColumn:e?.getColumn,getTooltipShowDelayOverride:null!=i?()=>i:void 0,getTooltipHideDelayOverride:null!=s?()=>s:void 0,shouldDisplayTooltip:r})))}getDataRefAttribute(e){return e.getAttribute?e.getAttribute("data-ref"):null}applyElementsToComponent(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(void 0===t&&(t=this.getDataRefAttribute(e)),t){const n=this[t];if(n===Is)this[t]=s??e;else{const e=i&&i[t];this.suppressDataRefValidation||e||h(`Issue with data-ref: ${t} on ${this.constructor.name} with ${n}`)}}}createChildComponentsFromTags(e,t){(function(e){if(null==e)return[];const t=[];return Cs(e,(e=>t.push(e))),t})(e.childNodes).forEach((i=>{if(!(i instanceof HTMLElement))return;const s=this.createComponentFromElement(i,(e=>{e.getGui()&&this.copyAttributesFromNode(i,e.getGui())}),t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const e=Array.prototype.slice.call(i.children);s.addItems(e)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}))}createComponentFromElement(t,i,s){const n=t.nodeName,r=this.getDataRefAttribute(t),o=0===n.indexOf("AG-"),a=o?this.componentSelectors.get(n):null;let l=null;if(a){e.elementGettingCreated=t;const n=s&&r?s[r]:void 0;l=new a.component(n),l.setParentComponent(this),this.createBean(l,null,i)}else o&&h(`Missing selector: ${n}`);return this.applyElementsToComponent(t,r,s,l),l}copyAttributesFromNode(e,t){!function(e,t){if(e)for(let i=0;i<e.length;i++){const s=e[i];t(s.name,s.value)}}(e.attributes,((e,i)=>t.setAttribute(e,i)))}swapComponentForNode(e,t,i){const s=e.getGui();t.replaceChild(s,i),t.insertBefore(document.createComment(i.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach((e=>e.setAttribute("tabindex",t.toString())))}setTemplate(e,t,i){const s=hs(e);this.setTemplateFromElement(s,t,i)}setTemplateFromElement(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.eGui=e,this.suppressDataRefValidation=s,t)for(let n=0;n<t.length;n++){const e=t[n];this.componentSelectors.set(e.selector,e)}this.wireTemplate(e,i)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let i=t;return null==e?null:(i||(i=this.eGui),vs(e)?{element:e,parent:i}:{element:e.getGui(),parent:i})}prependChild(e,t){const{element:i,parent:s}=this.getContainerAndElement(e,t)||{};i&&s&&s.insertAdjacentElement("afterbegin",i)}appendChild(e,t){const{element:i,parent:s}=this.getContainerAndElement(e,t)||{};i&&s&&s.appendChild(i)}isDisplayed(){return this.displayed}setVisible(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e!==this.visible){this.visible=e;const{skipAriaHidden:i}=t;$i(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:i}=t;Ki(this.eGui,e,{skipAriaHidden:i});const s={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(s)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}
2addGuiEventListener(e,t,i){this.eGui.addEventListener(e,t,i),this.addDestroyFunc((()=>this.eGui.removeEventListener(e,t)))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}},Es={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},As=(()=>{const e=new Set(Object.values(Es));return e.add("eye"),e})();function Ts(e,t,i){const s=Ps(e,t,i);if(s){const{className:e}=s;if("string"===typeof e&&e.indexOf("ag-icon")>-1||"object"===typeof e&&e["ag-icon"])return s}const n=document.createElement("span");return n.appendChild(s),n}function Ps(e,t,i,s){let n=null;const r=i&&i.getColDef().icons;if(r&&(n=r[e]),t&&!n){const i=t.get("icons");i&&(n=i[e])}if(!n){const t=document.createElement("span");let i=Es[e]??(As.has(e)?e:void 0);return i||(s?i=e:(h(`Did not find icon ${e}`),i="")),t.setAttribute("class",`ag-icon ag-icon-${i}`),t.setAttribute("unselectable","on"),ci(t,"presentation"),t}{let e;if("function"===typeof n)e=n();else{if("string"!==typeof n)throw new Error("icon from grid options needs to be a string or a function");e=n}if("string"===typeof e)return hs(e);if(vs(e))return e;h("iconRenderer should return back a string or a dom object")}}var Ls=class extends Rs{constructor(){super(...arguments),this.dragSource=null,this.eIcon=Is,this.eLabel=Is}postConstruct(){const e=e=>Ts(e,this.gos,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate('<div class="ag-dnd-ghost ag-unselectable">\n                <span data-ref="eIcon" class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>\n                <div data-ref="eLabel" class="ag-dnd-ghost-label"></div>\n            </div>')}destroy(){this.dragSource=null,super.destroy()}setIcon(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];rs(this.eIcon);let i=null;e||(e=this.dragSource?.getDefaultIconName?this.dragSource?.getDefaultIconName():"notAllowed"),i=this.dropIconMap[e],this.eIcon.classList.toggle("ag-shake-left-to-right",t),i===this.dropIconMap.hide&&this.gos.get("suppressDragLeaveHidesColumns")||i&&this.eIcon.appendChild(i)}setLabel(e){this.eLabel.textContent=At(e)}};function Fs(e,t,i){if(0===i)return!1;const s=Math.abs(e.clientX-t.clientX),n=Math.abs(e.clientY-t.clientY);return Math.max(s,n)<=i}var ks=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new n,this.eElement=e,this.preventMouseClick=t;const i=this.onTouchStart.bind(this),s=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",s,{passive:!0}),this.eElement.addEventListener("touchend",r,{passive:!1}),this.destroyFuncs.push((()=>{this.eElement.removeEventListener("touchstart",i,{passive:!0}),this.eElement.removeEventListener("touchmove",s,{passive:!0}),this.eElement.removeEventListener("touchend",r,{passive:!1})}
vendor: 10,384 bytes, line 2
2))}getActiveTouch(e){for(let t=0;t<e.length;t++){if(e[t].identifier===this.touchStart.identifier)return e[t]}return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout((()=>{const i=this.touchStart===t;if(this.touching&&i&&!this.moved){this.moved=!0;const t={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(t)}}),500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!Fs(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const e={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(e),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=(new Date).getTime();if(this.lastTapTime&&this.lastTapTime>0){if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const e={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(e),this.lastTapTime=null}else this.lastTapTime=e}else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach((e=>e()))}};function Ns(e,t){return`<span data-ref="eSort${e}" class="ag-sort-indicator-icon ag-sort-${t} ag-hidden" aria-hidden="true"></span>`}var Os=`<span class="ag-sort-indicator-container">\n        ${Ns("Order","order")}\n        ${Ns("Asc","ascending-icon")}\n        ${Ns("Desc","descending-icon")}\n        ${Ns("Mixed","mixed-icon")}\n        ${Ns("None","none-icon")}\n    </span>`,Gs=class extends Rs{constructor(e){super(),this.eSortOrder=Is,this.eSortAsc=Is,this.eSortDesc=Is,this.eSortMixed=Is,this.eSortNone=Is,e||this.setTemplate(Os)}wireBeans(e){this.sortController=e.sortController}attachCustomElements(e,t,i,s,n){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=s,this.eSortNone=n}setupSort(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!this.column.isSortable()&&!this.column.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const i=this.updateIcons.bind(this),s=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:s,columnRowGroupChanged:s}),this.onSortChanged()}addInIcon(e,t,i){if(null==t)return;const s=Ps(e,this.gos,i);s&&t.appendChild(s)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){const t="asc"===e;Ki(this.eSortAsc,t,{skipAriaHidden:!0})}if(this.eSortDesc){const t="desc"===e;Ki(this.eSortDesc,t,{skipAriaHidden:!0})}if(this.eSortNone){const t=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon"),i=null===e||void 0===e;Ki(this.eSortNone,!t&&i,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);const e=this.column.getColDef().showRowGroup;q(this.gos)&&e&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){const e="mixed"===this.sortController.getDisplaySortForColumn(this.column);Ki(this.eSortMixed,e,{skipAriaHidden:!0})}}updateSortOrder(){if(!this.eSortOrder)return;const e=this.sortController.getColumnsWithSortingOrdered(),t=this.sortController.getDisplaySortIndexForColumn(this.column)??-1,i=e.some((e=>this.sortController.getDisplaySortIndexForColumn(e)??!1)),s=t>=0&&i;Ki(this.eSortOrder,s,{skipAriaHidden:!0}),t>=0?this.eSortOrder.textContent=(t+1).toString():rs(this.eSortOrder)}},Bs={selector:"AG-SORT-INDICATOR",component:Gs},Vs=class extends Rs{constructor(){super(...arguments),this.eFilter=Is,this.eFilterButton=Is,this.eSortIndicator=Is,this.eMenu=Is,this.eLabel=Is,this.eText=Is,this.eSortOrder=Is,this.eSortAsc=Is,this.eSortDesc=Is,this.eSortMixed=Is,this.eSortNone=Is,this.lastMovingChanged=0}wireBeans(e){this.sortController=e.sortController,this.menuService=e.menuService,this.funcColsService=e.funcColsService}destroy(){super.destroy()}refresh(e){const t=this.params;return this.params=e,this.workOutTemplate()==this.currentTemplate&&this.workOutShowMenu()==this.currentShowMenu&&this.workOutSort()==this.currentSort&&this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&t.enableFilterButton==e.enableFilterButton&&t.enableFilterIcon==e.enableFilterIcon&&(this.setDisplayName(e),!0)}workOutTemplate(){let e=this.params.template??'<div class="ag-cell-label-container" role="presentation">\n        <span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>\n        <span data-ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>\n        <div data-ref="eLabel" class="ag-header-cell-label" role="presentation">\n            <span data-ref="eText" class="ag-header-cell-text"></span>\n            <span data-ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>\n            <ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>\n        </div>\n    </div>';return e=e&&e.trim?e.trim():e,e}init(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate,[Bs]),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(e)}setDisplayName(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;const t=At(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=t)}}addInIcon(e,t,i){if(null==t)return;const s=Ps(e,this.gos,i);s&&t.appendChild(s)}setupTap(){const{gos:e}=this;if(e.get("suppressTouch"))return;const t=new ks(this.getGui(),!0),i=this.shouldSuppressMenuHide(),s=i&&w(this.eMenu),n=s?new ks(this.eMenu,!0):t;if(this.params.enableMenu){const e=s?"tap":"longTap",t=e=>this.params.showColumnMenuAfterMouseClick(e.touchStart);this.addManagedListeners(n,{[e]:t})}if(this.params.enableSorting){const e=e=>{const t=e.touchStart.target;i&&(this.eMenu?.contains(t)||this.eFilterButton?.contains(t))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")};this.addManagedListeners(t,{tap:e})}if(this.params.enableFilterButton){const e=new ks(this.eFilterButton,!0);this.addManagedListeners(e,{tap:()=>this.params.showFilter(this.eFilterButton)}),this.addDestroyFunc((()=>e.destroy()))}this.addDestroyFunc((()=>t.destroy())),s&&this.addDestroyFunc((()=>n.destroy()))}workOutShowMenu(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu)return os(this.eMenu),void(this.eMenu=void 0);const e=this.menuService.isLegacyMenuEnabled();this.addInIcon(e?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!e),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedElementListeners(this.eMenu,{click:()=>this.params.showColumnMenu(this.eMenu)}),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}onMenuKeyboardShortcut(e){const t=this.params.column,i=this.menuService.isLegacyMenuEnabled();if(e&&!i){if(this.menuService.isFilterMenuInHeaderEnabled(t))return this.params.showFilter(this.eFilterButton??this.eMenu??this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu(this.eMenu??this.eFilterButton??this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.createBean(new Gs(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListeners(this.params.column,{movingChanged:()=>{this.lastMovingChanged=(new Date).getTime()}}),this.eLabel&&this.addManagedElementListeners(this.eLabel,{click:e=>{const t=this.params.column.isMoving(),i=(new Date).getTime()-this.lastMovingChanged<50;if(!(t||i)){const t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.params.progressSort(t)}}});const e=()=>{const e=this.params.column.getSort();if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc","asc"===e),this.addOrRemoveCssClass("ag-header-cell-sorted-desc","desc"===e),this.addOrRemoveCssClass("ag-header-cell-sorted-none",!e),this.params.column.getColDef().showRowGroup){const e=this.funcColsService.getSourceColumnsForGroupColumn(this.params.column),t=e?.every((e=>this.params.column.getSort()==e.getSort())),i=!t;this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",i)}};this.addManagedEventListeners({sortChanged:e,columnRowGroupChanged:e})}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}setupFilterButton(){if(!this.eFilterButton)return;this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedElementListeners(this.eFilterButton,{click:()=>this.params.showFilter(this.eFilterButton)}):this.eFilterButton=void 0}configureFilter(e,t,i){if(!e)return os(t),!1;const s=this.params.column;return this.addInIcon("filter",t,s),this.addManagedListeners(s,{filterChanged:i}),i(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();Ki(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){return e?this.eFilterButton??this.eMenu??this.getGui():this.eMenu??this.eFilterButton??this.getGui()}},zs=class extends Rs{constructor(){super('<div class="ag-header-group-cell-label" role="presentation">
2\n            <span data-ref="agLabel" class="ag-header-group-text" role="presentation"></span>\n            <span data-ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>\n            <span data-ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>\n        </div>'),this.agOpened=Is,this.agClosed=Is,this.agLabel=Is}wireBeans(e){this.columnModel=e.columnModel}destroy(){super.destroy()}init(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&h("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}setupExpandIcons(){this.addInIcon("columnGroupOpened",this.agOpened),this.addInIcon("columnGroupClosed",this.agClosed);const e=e=>{if(Oe(e))return;const t=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),t,"uiColumnExpanded")};this.addTouchAndClickListeners(this.agClosed,e),this.addTouchAndClickListeners(this.agOpened,e);const t=e=>{Ne(e)};this.addManagedElementListeners(this.agClosed,{dblclick:t}),this.addManagedElementListeners(this.agOpened,{dblclick:t}),this.addManagedElementListeners(this.getGui(),{dblclick:e}),this.updateIconVisibility();const i=this.params.columnGroup.getProvidedColumnGroup(),s=this.updateIconVisibility.bind(this);this.addManagedListeners(i,{expandedChanged:s,expandableChanged:s})}addTouchAndClickListeners(e,t){const i=new ks(e,!0);this.addManagedListeners(i,{tap:t}),this.addDestroyFunc((()=>i.destroy())),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){const e=this.params.columnGroup.isExpanded();Ki(this.agOpened,e),Ki(this.agClosed,!e)}else Ki(this.agOpened,!1),Ki(this.agClosed,!1)}addInIcon(e,t){const i=Ps(e,this.gos,null);i&&t.appendChild(i)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable())return Ki(this.agOpened,!1),void Ki(this.agClosed,!1)}setupLabel(){const{displayName:e,columnGroup:t}=this.params;if(w(e)){const t=At(e,!0);this.agLabel.textContent=t}this.addOrRemoveCssClass("ag-sticky-label",!t.getColGroupDef()?.suppressStickyLabel)}},Hs=class extends Rs{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-change-delta");const i=document.createElement("span");i.setAttribute("class","ag-value-change-value"),e.appendChild(t),e.appendChild(i),this.setTemplateFromElement(e)}wireBeans(e){this.filterManager=e.filterManager}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0)}showDelta(e,t){const i=Math.abs(t),s=e.formatValue(i),n=w(s)?s:i,r=t>=0;this.eDelta.textContent=r?"\u2191"+n:"\u2193"+n,this.eDelta.classList.toggle("ag-value-change-delta-up",r),this.eDelta.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.getFrameworkOverrides().wrapIncoming((()=>{window.setTimeout((()=>{e===this.refreshCount&&this.hideDeltaValue()}),2e3)}))}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),rs(this.eDelta)}refresh(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=e.value;if(i===this.lastValue)return!1;if(w(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:w(e.value)?this.eValue.textContent=i:rs(this.eValue),this.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;if("number"===typeof i&&"number"===typeof this.lastValue){const t=i-this.lastValue;this.showDelta(e,t)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}},Ws=class extends Rs{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-slide-current"),e.appendChild(t),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}wireBeans(e){this.filterManager=e.filterManager}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const t=document.createElement("span");t.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=t,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming((()=>{window.setTimeout((()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")}),50),window.setTimeout((()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)}),3e3)}))}refresh(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.value;return b(i)&&(i=""),i!==this.lastValue&&(!this.filterManager?.isSuppressFlashingCellsBecauseFiltering()&&(t||this.addSlideAnimation(),this.lastValue=i,w(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:w(e.value)?this.eCurrent.textContent=i:rs(this.eCurrent),!0))}},js=class{};js.BACKSPACE="Backspace",js.TAB="Tab",js.ENTER="Enter",js.ESCAPE="Escape",js.SPACE=" ",js.LEFT="ArrowLeft",js.UP="ArrowUp",js.RIGHT="ArrowRight",js.DOWN="ArrowDown",js.DELETE="Delete",js.F2="F2",js.PAGE_UP="PageUp",js.PAGE_DOWN="PageDown",js.PAGE_HOME="Home",js.PAGE_END="End",js.A="KeyA",js.C="KeyC",js.D="KeyD",js.V="KeyV",js.X="KeyX",js.Y="KeyY",js.Z="KeyZ";var Us=class extends Rs{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:s,disabled:n}=this.config;null!=n&&this.setDisabled(n),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=i&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){rs(this.eLabel),"string"===typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(Ki(this.eLabel,!1),ci(this.eLabel,"presentation")):(Ki(this.eLabel,!0),ci(this.eLabel,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.id}getLabel(){return this.label}setLabel(e){return this.label===e||(this.label=e,this.refreshLabel()),this}setLabelAlignment(e){const t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||ps(this.eLabel,e),this}setDisabled(e){e=!!e;const t=this.getGui();return Yi(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},_s=class extends Us{constructor(e,t,i,s){super(e,t,i),this.className=s}
vendor: 20,970 bytes, line 2
2postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=i&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();null==i||""==i||null!==e.getAttribute("aria-label")?ui(e,""):ui(e,t??"")}setAriaLabel(e){return di(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return gs(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}},Ks=class extends _s{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"input";super(e,e?.template??`\n            <div role="presentation">\n                <div data-ref="eLabel" class="ag-input-field-label"></div>\n                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n                    <${s} data-ref="eInput" class="ag-input-field-input"></${s}>\n                </div>\n            </div>`,[],t),this.inputType=i,this.displayFieldTag=s,this.eLabel=Is,this.eWrapper=Is,this.eInput=Is}postConstruct(){super.postConstruct(),this.setInputType(),this.eLabel.classList.add(`${this.className}-label`),this.eWrapper.classList.add(`${this.className}-input-wrapper`),this.eInput.classList.add(`${this.className}-input`),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||`ag-${this.getCompId()}-input`;const{inputName:e,inputWidth:t}=this.config;null!=e&&this.setInputName(e),null!=t&&this.setInputWidth(t),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return ps(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return ys(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return di(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Yi(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(!0===e)ys(this.eInput,"autocomplete",null);else{const t="string"===typeof e?e:"off";ys(this.eInput,"autocomplete",t)}return this}},$s=class extends Ks{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ag-checkbox",arguments.length>2&&void 0!==arguments[2]?arguments[2]:"checkbox"),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;"boolean"===typeof e&&this.setReadOnly(e),"boolean"===typeof t&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return void 0===this.selected||!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"===typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});const s=this.getInputElement();this.eventService.dispatchEvent({type:"checkboxChanged",id:s.id,name:s.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)}},Ys={selector:"AG-CHECKBOX",component:$s},Zs=class extends Rs{constructor(){super('\n            <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">\n                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>\n            </div>',[Ys]),this.eCheckbox=Is}init(e){this.refresh(e);const t=this.eCheckbox.getInputElement();t.setAttribute("tabindex","-1"),gi(t,"polite"),this.addManagedListeners(t,{click:e=>{if(Ne(e),this.eCheckbox.isDisabled())return;const t=this.eCheckbox.getValue();this.onCheckboxChanged(t)},dblclick:e=>{Ne(e)}}),this.addManagedElementListeners(this.params.eGridCell,{keydown:e=>{if(e.key===js.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===K(this.gos)&&this.eCheckbox.toggle();const t=this.eCheckbox.getValue();this.onCheckboxChanged(t),e.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,i=!0;if(e.node.group&&e.column)if("boolean"===typeof e.value)t=e.value;else{const s=e.column.getColId();s.startsWith(_e)?t=null==e.value||""===e.value?void 0:"true"===e.value:e.node.aggData&&void 0!==e.node.aggData[s]?t=e.value??void 0:i=!1}else t=e.value??void 0;if(!i)return void this.eCheckbox.setDisplayed(!1);this.eCheckbox.setValue(t);const s=null!=e.disabled?e.disabled:!e.column?.isCellEditable(e.node);this.eCheckbox.setDisabled(s);const n=this.localeService.getLocaleTextFunc(),r=Li(n,t),o=s?r:`${n("ariaToggleCellValue","Press SPACE to toggle cell value")} (${r})`;this.eCheckbox.setInputAriaLabel(o)}onCheckboxChanged(e){const{column:t,node:i,value:s}=this.params;this.eventService.dispatchEvent({type:"cellEditingStarted",column:t,colDef:t?.getColDef(),data:i.data,node:i,rowIndex:i.rowIndex,rowPinned:i.rowPinned,value:s});const n=this.params.node.setDataValue(this.params.column,e,"edit");this.eventService.dispatchEvent({type:"cellEditingStopped",column:t,colDef:t?.getColDef(),data:i.data,node:i,rowIndex:i.rowIndex,rowPinned:i.rowPinned,value:s,oldValue:s,newValue:e,valueChanged:n}),n||this.updateCheckbox(this.params)}},qs=class extends Rs{constructor(){super('<div class="ag-loading">\n            <span class="ag-loading-icon" data-ref="eLoadingIcon"></span>\n            <span class="ag-loading-text" data-ref="eLoadingText"></span>\n        </div>'),this.eLoadingIcon=Is,this.eLoadingText=Is}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){const e=Ps("groupLoading",this.gos,null);e&&this.eLoadingIcon.appendChild(e);const t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}destroy(){super.destroy()}},Qs=class extends Rs{constructor(){super('<div class="ag-skeleton-container"></div>')}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc((()=>ui(e.eParentOfValue))),ui(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.localeService.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");di(this.getGui(),t)}setupLoading(e){const t=j(this.gos).createElement("div");t.classList.add("ag-skeleton-effect");const i=e.node.rowIndex;if(null!=i){const e=75+25*(i%2===0?Math.sin(i):Math.cos(i));t.style.width=`${e}%`}this.getGui().appendChild(t);const s=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");di(this.getGui(),s)}refresh(e){return!1}destroy(){super.destroy()}},Xs=class extends Rs{constructor(){super()}destroy(){super.destroy()}},Js=class extends Xs{init(){const e=S(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??'<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>'),!e){const e=this.localeService.getLocaleTextFunc();setTimeout((()=>{this.getGui().textContent=e("loadingOoo","Loading...")}))}}},en=class extends Xs{init(){const e=S(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??'<span class="ag-overlay-no-rows-center"></span>'),!e){const e=this.localeService.getLocaleTextFunc();setTimeout((()=>{this.getGui().textContent=e("noRowsToShow","No Rows To Show")}))}}},tn=class extends Rs{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},sn=class extends tn{constructor(){super('<div class="ag-tooltip"></div>')}init(e){const{value:t}=e;this.getGui().textContent=At(t,!0)}};function nn(e){const{inputValue:t,allSuggestions:i,hideIrrelevant:s,filterByPercentageOfBestMatch:n,addSequentialWeight:r}=e;let o=i.map(((e,i)=>({value:e,relevance:rn(t.toLowerCase(),e.toLocaleLowerCase(),r),idx:i})));if(o.sort(((e,t)=>t.relevance-e.relevance)),s&&(o=o.filter((e=>0!==e.relevance))),o.length>0&&n&&n>0){const e=o[0].relevance*n;o=o.filter((t=>e-t.relevance<0))}const a=[],l=[];for(const h of o)a.push(h.value),l.push(h.idx);return{values:a,indices:l}}function rn(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=e.replace(/\s/g,""),n=t.replace(/\s/g,""),r=s.length,o=n.length,a=new Array(r+1).fill(null).map((()=>new Array(o+1).fill(0)));for(let c=0;c<=r;c+=1)a[c][0]=c;for(let c=0;c<=o;c+=1)a[0][c]=c;for(let c=1;c<=r;c++)for(let e=1;e<=o;e++)s[c-1]===n[e-1]?a[c][e]=a[c-1][e-1]:a[c][e]=1+Math.min(a[c][e-1],Math.min(a[c-1][e],a[c-1][e-1]));const l=a[r][o];let h=Math.max(r,o)-l;if(i){const e=function(e){const t=[],i=e.length;for(let s=1;s<=i;s++)for(let n=0;n<=i-s;n++){const i=n+s-1;t.push(e.slice(n,i+1))}return t}(s);for(let t=0;t<e.length;t++){const i=e[t];-1!==n.indexOf(i)&&(h+=1,h*=i.length)}}return h}var on=class extends ze{constructor(){super(...arguments),this.beanName="userComponentRegistry",this.agGridDefaults={agDragAndDropImage:Ls,agColumnHeader:Vs,agColumnGroupHeader:zs,agSortIndicator:Gs,agAnimateShowChangeCellRenderer:Hs,agAnimateSlideCellRenderer:Ws,agLoadingCellRenderer:qs,agSkeletonCellRenderer:Qs,agCheckboxCellRenderer:Zs,agLoadingOverlay:Js,agNoRowsOverlay:en,agTooltipComponent:sn},this.agGridDefaultParams={},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agGroupCellRenderer:"@ag-grid-enterprise/row-grouping",agGroupRowRenderer:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={}}postConstruct(){const e=this.gos.get("components");null!=e&&et(e,((e,t)=>this.registerJsComponent(e,t)))}registerDefaultComponent(e,t,i){this.agGridDefaults[e]=t,i&&(this.agGridDefaultParams[e]=i)}registerJsComponent(e,t){this.jsComps[e]=t}retrieve(e,t){const i=(e,t,i)=>({componentFromFramework:t,component:e,params:i}),s=this.getFrameworkOverrides().frameworkComponent(t,this.gos.get("components"));if(null!=s)return i(s,!0);const n=this.jsComps[t];if(n){return i(n,this.getFrameworkOverrides().isFrameworkComponent(n))}const r=this.agGridDefaults[t];if(r)return i(r,!1,this.agGridDefaultParams[t]);const o=this.enterpriseAgDefaultCompsModule[t];return o?this.gos.assertModuleRegistered(o,`AG Grid '${e}' component: ${t}`):a((()=>{this.warnAboutMissingComponent(e,t)}),"MissingComp"+t),null}warnAboutMissingComponent(e,t){const i=nn({inputValue:t,allSuggestions:[...Object.keys(this.agGridDefaults).filter((e=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(e))),...Object.keys(this.jsComps)],hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;h(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.`),i.length>0&&h(`         Did you mean: [${i.slice(0,3)}]?`),h(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}},an=class e{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e((e=>this.onDone(e)),(e=>this.onReject(e)))}static all(t){return t.length?new e((e=>{let i=t.length;const s=new Array(i);t.forEach(((t,n)=>{t.then((t=>{s[n]=t,i--,0===i&&e(s)}))}))})):e.resolve()}static resolve(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new e((e=>e(t)))}then(t){return new e((e=>{1===this.status?e(t(this.resolution)):this.waiters.push((i=>e(t(i))))}))}onDone(e){this.status=1,this.resolution=e,this.waiters.forEach((t=>t(e)))}onReject(e){}},ln={propertyName:"dateComponent",cellRenderer:!1},hn={propertyName:"dragAndDropImageComponent",cellRenderer:!1},cn={propertyName:"headerComponent",cellRenderer:!1},dn={propertyName:"headerGroupComponent",cellRenderer:!1},un={propertyName:"cellRenderer",cellRenderer:!0},pn={propertyName:"cellRenderer",cellRenderer:!1},gn={propertyName:"loadingCellRenderer",cellRenderer:!0},mn={propertyName:"cellEditor",cellRenderer:!1},fn={propertyName:"innerRenderer",cellRenderer:!0},vn={propertyName:"loadingOverlayComponent",cellRenderer:!1},yn={propertyName:"noRowsOverlayComponent",cellRenderer:!1},Cn={propertyName:"tooltipComponent",cellRenderer:!1},Sn={propertyName:"filter",cellRenderer:!1},wn={propertyName:"floatingFilterComponent",cellRenderer:!1},bn={propertyName:"toolPanel",cellRenderer:!1},xn={propertyName:"statusPanel",cellRenderer:!1},Mn={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Dn={propertyName:"loadingCellRenderer",cellRenderer:!0},In={propertyName:"groupRowRenderer",cellRenderer:!0},Rn={propertyName:"detailCellRenderer",cellRenderer:!0},En={propertyName:"menuItem",cellRenderer:!1},An=class e extends ze{constructor(){super(...arguments),this.beanName="userComponentFactory"}wireBeans(e){this.agComponentUtils=e.agComponentUtils,this.componentMetadataProvider=e.componentMetadataProvider,this.userComponentRegistry=e.userComponentRegistry,this.frameworkComponentWrapper=e.frameworkComponentWrapper,this.gridOptions=e.gridOptions}getDragAndDropImageCompDetails(e){return this.getCompDetails(this.gridOptions,hn,"agDragAndDropImage",e,!0)}getHeaderCompDetails(e,t){return this.getCompDetails(e,cn,"agColumnHeader",t)}getHeaderGroupCompDetails(e){const t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,dn,"agColumnGroupHeader",e)}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Mn,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Dn,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,In,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Rn,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,t){return this.getCompDetails(e,fn,null,t)}getFullWidthGroupRowInnerCellRenderer(e,t){return this.getCompDetails(e,fn,null,t)}getCellRendererDetails(e,t){return this.getCompDetails(e,un,null,t)}getEditorRendererDetails(e,t){return this.getCompDetails(e,pn,null,t)}getLoadingCellRendererDetails(e,t){return this.getCompDetails(e,gn,"agSkeletonCellRenderer",t,!0)}getCellEditorDetails(e,t){return this.getCompDetails(e,mn,"agCellEditor",t,!0)}getFilterDetails(e,t,i){return this.getCompDetails(e,Sn,i,t,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,ln,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,vn,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,yn,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,Cn,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,t){return this.getCompDetails(e,un,null,t)}getFloatingFilterCompDetails(e,t,i){return this.getCompDetails(e,wn,i,t)}getToolPanelCompDetails(e,t){return this.getCompDetails(e,bn,null,t,!0)}getStatusPanelCompDetails(e,t){return this.getCompDetails(e,xn,null,t,!0)}getMenuItemCompDetails(e,t){return this.getCompDetails(e,En,"agMenuItem",t,!0)}getCompDetails(t,i,s,n){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{propertyName:o,cellRenderer:a}=i;let l,{compName:h,jsComp:d,fwComp:u,paramsFromSelector:p,popupFromSelector:g,popupPositionFromSelector:m}=e.getCompKeys(this.frameworkOverrides,t,i,n);const f=e=>{const t=this.userComponentRegistry.retrieve(o,e);t&&(d=t.componentFromFramework?void 0:t.component,u=t.componentFromFramework?t.component:void 0,l=t.params)};if(null!=h&&f(h),null==d&&null==u&&null!=s&&f(s),d&&a&&!this.agComponentUtils.doesImplementIComponent(d)&&(d=this.agComponentUtils.adaptFunction(o,d)),!d&&!u)return void(r&&c(`Could not find component ${h}, did you forget to configure this component?`));const v=this.mergeParamsWithApplicationProvidedParams(t,i,n,p,l),y=null==d,C=d||u;return{componentFromFramework:y,componentClass:C,params:v,type:i,popupFromSelector:g,popupPositionFromSelector:m,newAgStackInstance:()=>this.newAgStackInstance(C,y,v,i)}}static getCompKeys(e,t,i,s){const{propertyName:n}=i;let r,o,a,l,h,c;if(t){const i=t,d=i[n+"Selector"],u=d?d(s):null,p=t=>{if("string"===typeof t)r=t;else if(null!=t&&!0!==t){e.isFrameworkComponent(t)?a=t:o=t}};u?(p(u.component),l=u.params,h=u.popup,c=u.popupPosition):p(i[n])}return{compName:r,jsComp:o,fwComp:a,paramsFromSelector:l,popupFromSelector:h,popupPositionFromSelector:c}}newAgStackInstance(e,t,i,s){const n=s.propertyName;let r;if(!t)r=new e;else{const t=this.componentMetadataProvider.retrieve(n);r=this.frameworkComponentWrapper.wrap(e,t.mandatoryMethodList,t.optionalMethodList,s)}const o=this.initComponent(r,i);return null==o?an.resolve(r):o.then((()=>r))}mergeParamsWithApplicationProvidedParams(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=arguments.length>4?arguments[4]:void 0;const r=this.gos.getGridCommonParams();nt(r,i),n&&nt(r,n);const o=e&&e[t.propertyName+"Params"];if("function"===typeof o){nt(r,o(i))}else"object"===typeof o&&nt(r,o);return nt(r,s),r}initComponent(e,t){if(this.createBean(e),null!=e.init)return e.init(t)}};function Tn(e){const t=e;return null!=t&&null!=t.getFrameworkComponentInstance?t.getFrameworkComponentInstance():e}var Pn=class e{static register(t){e.__register(t,!0,void 0)}static registerModules(t){e.__registerModules(t,!0,void 0)}static __register(t,i,s){e.runVersionChecks(t),void 0!==s?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[s]&&(e.gridModulesMap[s]={}),e.gridModulesMap[s][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(i)}static __unRegisterGridModules(t){delete e.gridModulesMap[t]}static __registerModules(t,i,s){e.setModuleBased(i),t&&t.forEach((t=>e.__register(t,i,s)))}static isValidModuleVersion(t){const[i,s]=t.version.split(".")||[],[n,r]=e.currentModuleVersion.split(".")||[];return i===n&&s===r}static runVersionChecks(t){e.currentModuleVersion||(e.currentModuleVersion=t.version);const i=e=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${e} Please update all modules to the same version.`;if(t.version?e.isValidModuleVersion(t)||c(i(`'${t.moduleName}' is version ${t.version} but the other modules are version ${e.currentModuleVersion}.`)):c(i(`'${t.moduleName}' is incompatible.`)),t.validate){const e=t.validate();if(!e.isValid){c(`${e.message}`)}}}static setModuleBased(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&(c("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) 
2- you can only use one or the other of these mechanisms."),c("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information."))}static __setIsBundled(){e.isBundled=!0}static __assertRegistered(t,i,s){if(this.__isRegistered(t,s))return!0;let n;if(e.isBundled)n=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n        \n        <script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>\n        \nFor more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(e.moduleBased||void 0===e.moduleBased){const o=Object.entries(r).find((e=>{let[i,s]=e;return s===t}))?.[0];n=`AG Grid: unable to use ${i} as the ${o} is not registered${e.areGridScopedModules?` for gridId: ${s}`:""}. Check if you have registered the module:\n           \n    import { ModuleRegistry } from '@ag-grid-community/core';\n    import { ${o} } from '${t}';\n    \n    ModuleRegistry.registerModules([ ${o} ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/`}else n=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n            \n    import 'ag-grid-enterprise';`;return c(n),!1}static __isRegistered(t,i){return!!e.globalModulesMap[t]||!!e.gridModulesMap[i]?.[t]}static __getRegisteredModules(t){return[...T(e.globalModulesMap),...T(e.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){return T(e.gridModulesMap[t]??{})||[]}static __isPackageBased(){return!e.moduleBased}};Pn.globalModulesMap={},Pn.gridModulesMap={},Pn.areGridScopedModules=!1;var Ln=Pn,Fn=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,e&&e.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){Object.entries(e.providedBeanInstances).forEach((e=>{let[t,i]=e;this.beans[t]=i})),e.beanClasses.forEach((e=>{const t=new e;t.beanName?this.beans[t.beanName]=t:console.error(`Bean ${e.name} is missing beanName`),this.createdBeans.push(t)})),e.derivedBeans?.forEach((e=>{const{beanName:t,bean:i}=e(this);this.beans[t]=i,this.createdBeans.push(i)})),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.initBeans([e],t),e}initBeans(e,t){e.forEach((e=>{e.preWireBeans?.(this.beans),e.wireBeans?.(this.beans)})),e.forEach((e=>e.preConstruct?.())),t&&e.forEach(t),e.forEach((e=>e.postConstruct?.()))}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},kn=class extends Fn{init(e){this.gridId=e.gridId,this.beans.context=this,super.init(e)}destroy(){super.destroy(),Ln.__unRegisterGridModules(this.gridId)}getGridId(){return this.gridId}},Nn=(e=>(e[e.SINGLE_SHEET=0]="SINGLE_SHEET",e[e.MULTI_SHEET=1]="MULTI_SHEET",e))(Nn||{}),On=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(On||{}),Gn=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(Gn||{}),Bn=class extends ze{constructor(){super(...arguments),this.beanName="dragAndDropService",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsService=e.ctrlsService,this.dragService=e.dragService,this.mouseEventService=e.mouseEventService,this.environment=e.environment,this.userComponentFactory=e.userComponentFactory}addDragSource(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return e&&e.comp?e.comp:null}removeDragSource(e){const t=this.dragSourceAndParamsList.find((t=>t.dragSource===e));t&&(this.dragService.removeDragSource(t.params),Me(this.dragSourceAndParamsList,t))}destroy(){this.dragSourceAndParamsList.forEach((e=>this.dragService.removeDragSource(e.params))),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.dragSource.onDragStarted?.(),this.createDragAndDropImageComponent()}onDragStop(e){if(this.dragSource?.onDragStopped?.(),this.lastDropTarget?.onDragStop){const t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.clearDragAndDropProperties()}
vendor: 87,799 bytes, line 2
2onDragCancel(){this.dragSource?.onDragCancelled?.(),this.lastDropTarget?.onDragCancel&&this.lastDropTarget.onDragCancel(this.createDropTargetEvent(this.lastDropTarget,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.getHorizontalDirection(e),s=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const n=this.dropTargets.filter((t=>this.isMouseOnDropTarget(e,t))),r=this.findCurrentDropTarget(e,n);if(r!==this.lastDropTarget){if(this.leaveLastTargetIfExists(e,i,s,t),null!==this.lastDropTarget&&null===r&&this.dragSource?.onGridExit?.(this.dragItem),null===this.lastDropTarget&&null!==r&&this.dragSource?.onGridEnter?.(this.dragItem),this.enterDragTargetIfExists(r,e,i,s,t),r&&this.dragAndDropImageComp){const{comp:e,promise:t}=this.dragAndDropImageComp;e?e.setIcon(r.getIconName?r.getIconName():null):t.then((e=>{e&&e.setIcon(r.getIconName?r.getIconName():null)}))}this.lastDropTarget=r}else if(r&&r.onDragging){const n=this.createDropTargetEvent(r,e,i,s,t);r.onDragging(n)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}allContainersIntersect(e,t){for(const i of t){const{width:t,height:s,left:n,right:r,top:o,bottom:a}=i.getBoundingClientRect();if(0===t||0===s)return!1;const l=e.clientX>=n&&e.clientX<r,h=e.clientY>=o&&e.clientY<a;if(!l||!h)return!1}return!0}isMouseOnDropTarget(e,t){const i=this.getAllContainersFromDropTarget(t);let s=!1;for(const o of i)if(this.allContainersIntersect(e,o)){s=!0;break}const{eElement:n,type:r}=this.dragSource;return!(t.targetContainsSource&&!t.getContainer().contains(n))&&(s&&t.isInterestedIn(r,n))}findCurrentDropTarget(e,t){const i=t.length;if(0===i)return null;if(1===i)return t[0];const s=_(this.gos).elementsFromPoint(e.clientX,e.clientY);for(const n of s)for(const e of t){if(-1!==Ae(this.getAllContainersFromDropTarget(e)).indexOf(n))return e}return null}enterDragTargetIfExists(e,t,i,s,n){if(e&&e.onDragEnter){const r=this.createDropTargetEvent(e,t,i,s,n);e.onDragEnter(r)}}leaveLastTargetIfExists(e,t,i,s){if(!this.lastDropTarget)return;if(this.lastDropTarget.onDragLeave){const n=this.createDropTargetEvent(this.lastDropTarget,e,t,i,s);this.lastDropTarget.onDragLeave(n)}const n=this.getDragAndDropImageComponent();n&&n.setIcon(null)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter((t=>t.getContainer()!==e.getContainer()))}hasExternalDropZones(){return this.dropTargets.some((e=>e.external))}findExternalZone(e){return this.dropTargets.filter((e=>e.external)).find((t=>t.getContainer()===e.getContainer()))||null}isDropZoneWithinThisGrid(e){const t=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:i}=e;return t.contains(i)}getHorizontalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientX,i=e.clientX;return t===i?null:t>i?0:1}getVerticalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientY,i=e.clientY;return t===i?null:t>i?0:1}createDropTargetEvent(e,t,i,s,n){const r=e.getContainer(),o=r.getBoundingClientRect(),{dragItem:a,dragSource:l}=this,h=t.clientX-o.left,c=t.clientY-o.top;return this.gos.addGridCommonParams({event:t,x:h,y:c,vDirection:s,hDirection:i,dragSource:l,fromNudge:n,dragItem:a,dropZoneTarget:r})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();if(!t)return;const i=t.getGui(),s=i.getBoundingClientRect().height,n=(document.body?.clientWidth??(window.innerHeight||document.documentElement?.clientWidth||-1))-2,r=(document.body?.clientHeight??(window.innerHeight||document.documentElement?.clientHeight||-1))-2;if(!i.offsetParent)return;const o=ts(i.offsetParent),{clientY:a,clientX:l}=e;let h=a-o.top-s/2,c=l-o.left-10;const d=j(this.gos),u=d.defaultView||window,p=u.pageYOffset||d.documentElement.scrollTop,g=u.pageXOffset||d.documentElement.scrollLeft;n>0&&c+i.clientWidth>n+g&&(c=n+g-i.clientWidth),c<0&&(c=0),r>0&&h+i.clientHeight>r+p&&(h=r+p-i.clientHeight),h<0&&(h=0),i.style.left=`${c}px`,i.style.top=`${h}px`}removeDragAndDropImageComponent(){if(this.dragAndDropImageComp){const{comp:e}=this.dragAndDropImageComp;if(e){const t=e.getGui();this.dragAndDropImageParent&&this.dragAndDropImageParent.removeChild(t),this.destroyBean(e)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e}=this;if(!e)return;const t=this.userComponentFactory.getDragAndDropImageCompDetails({dragSource:e}).newAgStackInstance();this.dragAndDropImageComp={promise:t},t.then((e=>{e&&this.isAlive()&&(this.processDragAndDropImageComponent(e),this.dragAndDropImageComp.comp=e)}))}processDragAndDropImageComponent(e){const{dragSource:t,mouseEventService:i,environment:s}=this;if(!t)return;const n=e.getGui();n.style.setProperty("position","absolute"),n.style.setProperty("z-index","9999"),i.stampTopLevelGridCompWithGridInstance(n),s.applyThemeClasses(n),e.setIcon(null);let{dragItemName:r}=t;d(r)&&(r=r()),e.setLabel(r||""),n.style.top="20px",n.style.left="20px";const o=j(this.gos);let a=null,l=null;try{a=o.fullscreenElement}catch(c){}finally{a||(a=_(this.gos));const e=a.querySelector("body");l=e||(a instanceof ShadowRoot?a:a instanceof Document?a?.documentElement:a)}this.dragAndDropImageParent=l,l?l.appendChild(n):h("Could not find document body, it is needed for drag and drop.")}},Vn=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=-1!==e.scrollAxis.indexOf("x"),this.scrollVertically=-1!==e.scrollAxis.indexOf("y"),this.scrollByTick=null!=e.scrollByTick?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e){const t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.shouldSkipVerticalScroll();if(t&&this.shouldSkipHorizontalScroll())return;const i=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<i.left+s,this.tickRight=e.clientX>i.right-s,this.tickUp=e.clientY<i.top+s&&!t,this.tickDown=e.clientY>i.bottom-s&&!t,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},zn=class extends ze{wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService,this.focusService=e.focusService,this.sortController=e.sortController,this.filterManager=e.filterManager,this.selectionService=e.selectionService,this.mouseEventService=e.mouseEventService,this.ctrlsService=e.ctrlsService,this.funcColsService=e.funcColsService,this.rangeService=e.rangeService}constructor(e){super(),this.eContainer=e}postConstruct(){L(this.gos)&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(this,(e=>{const t=e.gridBodyCtrl;this.autoScrollService=new Vn({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})}))}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){if(this.funcColsService.getRowGroupColumns().length)return!0;const e=this.filterManager?.isAnyFilterPresent();if(e)return!0;return!!this.sortController.isSortActive()}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const e=[...this.selectionService.getSelectedNodes()].sort(((e,t)=>null==e.rowIndex||null==t.rowIndex?0:this.getRowIndexNumber(e)-this.getRowIndexNumber(t)));if(-1!==e.indexOf(t))return e}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent("rowDragEnter",e),this.getRowNodes(e).forEach((e=>{e.setDragging(!0)})),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}onEnterOrDragging(e){this.dispatchGridEvent("rowDragMove",e),this.lastDraggingEvent=e;const t=this.mouseEventService.getNormalisedPosition(e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const i=this.isFromThisGrid(e),s=this.gos.get("rowDragManaged"),n=e.dragItem.rowNodes;s&&this.shouldPreventRowMove()||(this.gos.get("suppressMoveWhenRowDragging")||!i?this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.highlightRowAtPixel(n[0],t):this.moveRows(n,t))}getRowIndexNumber(e){const t=e.getRowIndexString();return parseInt(Se(t.split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel.getLastHighlightedRowNode(),i=t&&1===t.highlighted,s=this.mouseEventService.getNormalisedPosition(e).y,n=e.dragItem.rowNodes;let r=i?1:0;if(this.isFromThisGrid(e))n.forEach((e=>{e.rowTop<s&&(r-=1)})),this.moveRows(n,s,r);else{const e=ie(this.gos);let t=this.clientSideRowModel.getRowIndexAtPixel(s)+1;0===this.clientSideRowModel.getHighlightPosition(s)&&t--,this.clientSideRowModel.updateRowData({add:n.filter((t=>!this.clientSideRowModel.getRowNode(e?.({data:t.data,level:0,rowPinned:t.rowPinned})??t.data.id))).map((e=>e.data)),addIndex:t})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(this.focusService.clearFocusedCell(),this.rangeService?.removeAllCellRanges())}addRowDropZone(e){if(!e.getContainer())return void h("addRowDropZone - A container target needs to be provided");if(this.dragAndDropService.findExternalZone(e))return void h("addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");let t={getContainer:e.getContainer};e.fromGrid?t=e:(e.onDragEnter&&(t.onDragEnter=t=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",t))}),e.onDragLeave&&(t.onDragLeave=t=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",t))}),e.onDragging&&(t.onDragging=t=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",t))}),e.onDragStop&&(t.onDragStop=t=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",t))}),e.onDragCancel&&(t.onDragCancel=t=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",t))}));const i={isInterestedIn:e=>2===e,getIconName:()=>"move",external:!0,...t};this.dragAndDropService.addDropTarget(i),this.addDestroyFunc((()=>this.dragAndDropService.removeDropTarget(i)))}getRowDropZone(e){const t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),n=this.onDragging.bind(this),r=this.onDragStop.bind(this),o=this.onDragCancel.bind(this);let a;return a=e?{getContainer:t,onDragEnter:e.onDragEnter?t=>{i(t),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",t))}:i,onDragLeave:e.onDragLeave?t=>{s(t),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",t))}:s,onDragging:e.onDragging?t=>{n(t),e.onDragging(this.draggingToRowDragEvent("rowDragMove",t))}:n,onDragStop:e.onDragStop?t=>{r(t),e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",t))}:r,onDragCancel:e.onDragCancel?t=>{o(t),e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",t))}:o,fromGrid:!0}:{getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:n,onDragStop:r,onDragCancel:o,fromGrid:!0},a}draggingToRowDragEvent(e,t){const i=this.mouseEventService.getNormalisedPosition(t).y;let s,n,r=-1;switch(i>this.pageBoundsService.getCurrentPageHeight()||(r=this.rowModel.getRowIndexAtPixel(i),s=this.rowModel.getRow(r)),t.vDirection){case 1:n="down";break;case 0:n="up";break;default:n=null}return this.gos.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:r,overNode:s,y:i,vDirection:n})}dispatchGridEvent(e,t){const i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent("rowDragEnd",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.clearRowHighlight()}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach((e=>{e.setDragging(!1)}))}},Hn=class extends ze{constructor(){super(...arguments),this.beanName="dragService",this.dragEndFunctions=[],this.dragSources=[]}wireBeans(e){this.mouseEventService=e.mouseEventService}destroy(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){const i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){const t=this.dragSources.find((t=>t.dragSource===e));t&&(this.removeListener(t),Me(this.dragSources,t))}isDragging(){return this.dragging}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:n}=e;i.addEventListener("mousedown",t);let r=null;const o=this.gos.get("suppressTouch");s&&!o&&(r=t=>{_i(t.target)||(n&&t.stopPropagation(),this.onTouchStart(e,t))},i.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:r,touchEnabled:!!s})}getStartTarget(){return this.startTarget}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const i=t.touches[0];this.touchLastTime=i,this.touchStart=i;const s=t=>this.onTouchUp(t,e.eElement),n=t.target,r=[{target:_(this.gos),type:"touchmove",listener:e=>{e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:n,type:"touchmove",listener:t=>this.onTouchMove(t,e.eElement),options:{passive:!0}},{target:n,type:"touchend",listener:s,options:{passive:!0}},{target:n,type:"touchcancel",listener:s,options:{passive:!0}}];this.addTemporaryEvents(r),0===e.dragStartPixels&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){const i=t;if(e.skipMouseEvent&&e.skipMouseEvent(t))return;if(i._alreadyProcessedByDragService)return;if(i._alreadyProcessedByDragService=!0,0!==t.button)return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const s=_(this.gos),n=[{target:s,type:"mousemove",listener:t=>this.onMouseMove(t,e.eElement)},{target:s,type:"mouseup",listener:t=>this.onMouseUp(t,e.eElement)},{target:s,type:"contextmenu",listener:e=>e.preventDefault()},{target:s,type:"keydown",listener:t=>{t.key===js.ESCAPE&&this.cancelDrag(e.eElement)}}];this.addTemporaryEvents(n),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach((e=>{const{target:t,type:i,listener:s,options:n}=e;t.addEventListener(i,s,n)})),this.dragEndFunctions.push((()=>{e.forEach((e=>{const{target:t,type:i,listener:s,options:n}=e;t.removeEventListener(i,s,n)}))}))}isEventNearStartEvent(e,t){const{dragStartPixels:i}=this.currentDragParams;return Fs(e,t,w(i)?i:4)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventService.dispatchEvent({type:"dragStarted",target:i}),this.currentDragParams.onDragStart(t),!this.currentDragParams)return void(this.dragging=!1);this.currentDragParams.onDragging(t)}this.currentDragParams?.onDragging(e)}onTouchMove(e,t){const i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){if(Fi()){const e=j(this.gos);e.getSelection()?.removeAllRanges()}this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const t=this.gos.get("enableCellTextSelection"),i="mousemove"===e.type;return t&&i&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}isOverFormFieldElement(e){const t=e.target,i=t?.tagName.toLocaleLowerCase();return!!i?.match("^a$|textarea|input|select|button")}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventService.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){this.eventService.dispatchEvent({type:"dragCancelled",target:e}),this.currentDragParams?.onDragCancel?.(),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach((e=>e())),this.dragEndFunctions.length=0}},Wn=class extends Rs{constructor(e,t,i,s,n,r){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=s,this.dragStartPixels=n,this.suppressVisibilityChange=r,this.dragSource=null}wireBeans(e){this.beans=e}isCustomGui(){return null!=this.customGui}postConstruct(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(Ps("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){const e=this.gos.get("rowDragManaged")?new _n(this,this.beans,this.rowNode,this.column):new Un(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}getSelectedNodes(){if(!this.gos.get("rowDragMultiRow"))return[this.rowNode];const e=this.beans.selectionService.getSelectedNodes();return-1!==e.indexOf(this.rowNode)?e:[this.rowNode]}checkCompatibility(){const e=this.gos.get("rowDragManaged");this.gos.get("treeData")&&e&&h("If using row drag with tree data, you cannot have rowDragManaged=true")}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4;this.dragSource&&this.removeDragSource();const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:e=>{e?.preventDefault()}})[0]);const i=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:()=>{const e=this.getDragItem(),t=e.rowNodes?.length||1,s=this.getRowDragText(this.column);return s?s(e,t):1===t?this.cellValueFn():`${t} ${i("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},jn=class extends ze{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i}setDisplayedOrVisible(e){const t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let e=!0,i=!1;this.column&&(e=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),i=d(this.column.getColDef().rowDrag)),i?(this.parent.setDisplayed(!0,t),this.parent.setVisible(e,t)):(this.parent.setDisplayed(e,t),this.parent.setVisible(!0,t))}}},Un=class extends jn{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));const e=this.workOutVisibility.bind(this);this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedListeners(this.beans.eventService,{newColumnsLoaded:e}),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}},_n=class extends jn{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){const e=this.workOutVisibility.bind(this);this.addManagedListeners(this.beans.eventService,{sortChanged:e,filterChanged:e,columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),t=e&&e.shouldPreventRowMove(),i=this.gos.get("suppressRowDrag"),s=this.beans.dragAndDropService.hasExternalDropZones(),n=t&&!s||i;this.setDisplayedOrVisible(n)}},Kn=new Set(["localEventService","__objectId","sticky","__autoHeights","checkAutoHeightsDebounced"]),$n=class e{constructor(t){this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=e.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const i=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();const s=this.createDataChangedEvent(e,i,t);this.localEventService?.dispatchEvent(s)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return null==this.rowIndex?(c("Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid."),null):"top"===this.rowPinned?e.ID_PREFIX_TOP_PINNED+this.rowIndex:"bottom"===this.rowPinned?e.ID_PREFIX_BOTTOM_PINNED+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){const t=new e(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t}setDataAndId(e,t){const i=w(this.id)?this.createDaemonNode():null,s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,i);const n=this.createDataChangedEvent(e,s,!1);this.localEventService?.dispatchEvent(n)}checkRowSelectable(){const e=pe(this.beans.gos);this.setRowSelectable(!e||e(this))}setRowSelectable(e,t){if(this.selectable!==e){if(this.selectable=e,this.dispatchRowEvent("selectableChanged"),t)return;if(ve(this.beans.gos)){const e=this.calculateSelectedFromChildren();return void this.setSelectedParams({newValue:e??!1,source:"selectableChanged"})}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(t){const i=ie(this.beans.gos);if(i)if(this.data){const t=this.parent?.getRoute()??[];this.id=i({data:this.data,parentKeys:t.length>0?t:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(e.ID_PREFIX_ROW_GROUP)&&c(`Row IDs cannot start with ${e.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`)}else this.id=void 0;else this.id=t}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(null!==e))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setMaster(e){this.master!==e&&(this.master&&!e&&(this.expanded=!1),this.master=e,this.dispatchRowEvent("masterChanged"))}setGroup(e){this.group!==e&&(this.group&&!e&&(this.expanded=!1),this.group=e,this.updateHasChildren(),this.checkRowSelectable(),this.dispatchRowEvent("groupChanged"))}setRowHeight(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setRowAutoHeight(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,null!=e&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=f(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){let e=!1,t=!0,i=0;const s=this.__autoHeights;if(null==s)return;if(this.beans.visibleColsService.getAllAutoHeightCols().forEach((n=>{let r=s[n.getId()];if(null==r){if(!this.beans.columnModel.isColSpanActive())return void(e=!0);{let t=[];switch(n.getPinned()){case"left":t=this.beans.visibleColsService.getLeftColsForRow(this);break;case"right":t=this.beans.visibleColsService.getRightColsForRow(this);break;case null:t=this.beans.columnViewportService.getColsWithinViewport(this)}if(t.includes(n))return void(e=!0);r=-1}}else t=!1;r>i&&(i=r)})),e)return;if((t||i<10)&&(i=B(this.beans.gos,this).height),i==this.rowHeight)return;this.setRowHeight(i);const n=this.beans.rowModel;n.onRowHeightChangedDebounced?.()}setExpanded(e,t,i){if(this.expanded===e)return;this.expanded=e,this.dispatchRowEvent("expandedChanged");const s={...this.createGlobalRowEvent("rowGroupOpened"),expanded:e,event:t||null};this.beans.rowNodeEventThrottle.dispatchExpanded(s,i),this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(e){return this.beans.gos.addGridCommonParams({type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}setDataValue(e,t,i){const s=(()=>"string"!==typeof e?e:this.beans.columnModel.getCol(e)??this.beans.columnModel.getColDefCol(e))(),n=this.beans.valueService.getValueForDisplay(s,this);if(this.beans.gos.get("readOnlyEdit"))return this.beans.eventService.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:s,colDef:s.getColDef(),data:this.data,node:this,oldValue:n,newValue:t,value:t,source:i}),!1;const r=this.beans.valueService.setValue(this,s,t,i);return this.dispatchCellChangedEvent(s,t,n),this.checkRowSelectable(),r}setGroupValue(e,t){const i=this.beans.columnModel.getCol(e);b(this.groupData)&&(this.groupData={});const s=i.getColId(),n=this.groupData[s];n!==t&&(this.groupData[s]=t,this.dispatchCellChangedEvent(i,t,n))}setAggData(e){const t=this.aggData;if(this.aggData=e,this.localEventService){const i=e=>{const i=this.aggData?this.aggData[e]:void 0,s=t?t[e]:void 0;if(i===s)return;const n=this.beans.columnModel.getCol(e);n&&this.dispatchCellChangedEvent(n,i,s)};for(const e in t)i(e);for(const s in e)t&&s in t||i(s)}}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(F(this.beans.gos)){const t=this.beans.gos.get("treeData"),i=this.beans.gos.get("isServerSideGroup");e=!this.stub&&!this.footer&&(t?!!i&&i(this.data):!!this.group)}e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){const s={type:"cellChanged",node:this,column:e,newValue:t,oldValue:i};this.localEventService?.dispatchEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master)}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach((t=>t.depthFirstSearch(e))),e(this)}calculateSelectedFromChildren(){let e=!1,t=!1;if(!this.childrenAfterGroup?.length)return this.selectable?this.selected:null;for(let i=0;i<this.childrenAfterGroup.length;i++){const s=this.childrenAfterGroup[i];let n=s.isSelected();if(!s.selectable){const e=s.calculateSelectedFromChildren();if(null===e)continue;n=e}switch(n){case!0:e=!0;break;case!1:t=!0;break;default:return}}return e&&t?void 0:!!e||!t&&(this.selectable?this.selected:null)}setSelectedInitialValue(e){this.selected=e}dispatchRowEvent(e){this.localEventService?.dispatchEvent({type:e,node:this})}selectThisNode(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"api";const s=!this.selectable&&e,n=this.selected===e;if(s||n)return!1;this.selected=e,this.dispatchRowEvent("rowSelected");const r=this.sibling;return r&&r.footer&&r.localEventService&&r.dispatchRowEvent("rowSelected"),this.beans.eventService.dispatchEvent({...this.createGlobalRowEvent("rowSelected"),event:t||null,source:i}),!0}setSelected(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"api";"boolean"!==typeof i?this.setSelectedParams({newValue:e,clearSelection:t,rangeSelect:!1,source:i}):h("since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.")}setSelectedParams(e){return this.rowPinned?(h("cannot select pinned rows"),0):void 0===this.id?(h("cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected({...e,nodes:[this.footer?this.sibling:this]})}isRowPinned(){return!!this.rowPinned}addEventListener(e,t){this.localEventService||(this.localEventService=new n),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.localEventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new Xe(this.beans.frameworkOverrides));const i=this.frameworkEventListenerService?.wrap(t)??t;this.localEventService.addEventListener(e,i)}removeEventListener(e,t){if(!this.localEventService)return;const i=this.frameworkEventListenerService?.unwrap(t)??t;this.localEventService.removeEventListener(e,i),this.localEventService.noRegisteredListenersExist()&&(this.localEventService=null)}onMouseEnter(){this.dispatchRowEvent("mouseEnter")}onMouseLeave(){this.dispatchRowEvent("mouseLeave")}isFullWidthCell(){if(h("since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option."),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}getRoute(){if(-1===this.level)return[];if(null==this.key)return;const e=[];let t=this;for(;t&&null!=t.key;)e.push(t.key),t=t.parent;return e.reverse()}createFooter(){if(this.sibling)return;const t=new e(this.beans);Object.keys(this).forEach((e=>{Kn.has(e)||(t[e]=this[e])})),t.footer=!0,t.setRowTop(null),t.setRowIndex(null),t.oldRowTop=null,t.id="rowGroupFooter_"+this.id,t.sibling=this,this.sibling=t}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setLastChild(e){this.lastChild!==e&&(this.lastChild=e,this.dispatchRowEvent("lastChildChanged"))}setChildIndex(e){this.childIndex!==e&&(this.childIndex=e,this.dispatchRowEvent("childIndexChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setDragging(e){this.dragging!==e&&(this.dragging=e,this.dispatchRowEvent("draggingChanged"))}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.dispatchRowEvent("rowHighlightChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}};$n.ID_PREFIX_ROW_GROUP="row-group-",$n.ID_PREFIX_TOP_PINNED="t-",$n.ID_PREFIX_BOTTOM_PINNED="b-",$n.OBJECT_ID_SEQUENCE=0;var Yn=$n,Zn=class extends Rs{constructor(e,t){super('<div class="ag-filter"></div>'),this.column=e,this.source=t,this.filterWrapper=null}wireBeans(e){this.filterManager=e.filterManager,this.columnModel=e.columnModel}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then((()=>{}))??an.resolve()}afterGuiAttached(e){this.filterWrapper?.filterPromise?.then((t=>{t?.afterGuiAttached?.(e)}))}afterGuiDetached(){this.filterWrapper?.filterPromise?.then((e=>{e?.afterGuiDetached?.()}))}createFilter(e){const{column:t,source:i}=this;this.filterWrapper=this.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then((s=>{const n=s.getGui();w(n)||h(`getGui method from filter returned ${n}; it should be a DOM element.`),this.appendChild(n),e&&this.eventService.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()})}))}onFilterDestroyed(e){"api"!==e.source&&"paramsUpdated"!==e.source||e.column.getId()!==this.column.getId()||!this.columnModel.getColDefCol(this.column)||(rs(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},qn="ag-resizer-wrapper",Qn=(e,t)=>`<div data-ref="${e}Resizer" class="ag-resizer ag-resizer-${t}"></div>`,Xn=`<div class="${qn}">\n        ${Qn("eTopLeft","topLeft")}\n        ${Qn("eTop","top")}\n        ${Qn("eTopRight","topRight")}\n        ${Qn("eRight","right")}\n        ${Qn("eBottomRight","bottomRight")}\n        ${Qn("eBottom","bottom")}\n        ${Qn("eBottomLeft","bottomLeft")}\n        ${Qn("eLeft","left")}\n    </div>`,Jn=class extends ze{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupService=e.popupService,this.resizeObserverService=e.resizeObserverService,this.dragService=e.dragService}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(i,s)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:s,minHeight:n,height:r,x:o,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,h=0;const c=ls(this.element);if(c){const e=this.findBoundaryElement(),t=window.getComputedStyle(e);if(null!=t.minWidth){const i=e.offsetWidth-this.element.offsetWidth;h=parseInt(t.minWidth,10)-i}if(null!=t.minHeight){const i=e.offsetHeight-this.element.offsetHeight;l=parseInt(t.minHeight,10)-i}}if(this.minHeight=n||l,this.minWidth=i||h,s&&this.setWidth(s),r&&this.setHeight(r),s&&r||this.refreshSize(),e)this.center();else if(o||a)this.offsetElement(o,a);else if(c&&t){let e=this.boundaryEl,t=!0;if(e||(e=this.findBoundaryElement(),t=!1),e){const i=parseFloat(e.style.top),s=parseFloat(e.style.left);t?this.offsetElement(isNaN(s)?0:s,isNaN(i)?0:i):this.setPosition(s,i)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(i),this.moveElementDragListener=i):(this.dragService.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"===typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach((t=>{const i=!!e[t],s=this.getResizerElement(t),n={dragStartPixels:0,eElement:s,onDragStart:e=>this.onResizeStart(e,t),onDragging:this.onResize.bind(this),onDragStop:e=>this.onResizeEnd(e,t)};(i||!this.isAlive()&&!i)&&(i?(this.dragService.addDragSource(n),this.resizeListeners.push(n),s.style.pointerEvents="all"):s.style.pointerEvents="none",this.resizable[t]=i)}))}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,i=this.element;let s=!1;if("string"===typeof e&&-1!==e.indexOf("%"))ms(i,e),e=Ji(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const t=this.getAvailableHeight();t&&e>t&&(e=t)}this.getHeight()!==e&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?ms(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height="number"===typeof e?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=e?this.position.y:s.top,o=e?0:n.top;let a=0;if(t){const e=this.element.parentElement;if(e){const{bottom:t}=e.getBoundingClientRect();a=t-s.bottom}}return i+o-r-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let s=!1;if("string"===typeof e&&-1!==e.indexOf("%"))gs(t,e),e=es(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:t}=this.offsetParent,s=i?this.position.x:this.element.getBoundingClientRect().left;t&&e+s>t&&(e=t-s)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?gs(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"===typeof e?e:parseFloat(e)))}offsetElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupService.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const e=this.getAvailableHeight();this.element.style.setProperty("max-height",`${e}px`)};e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:i,isTop:s,anywhereWithin:n,topBuffer:r}=e,o=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!i,!!n,o)?0:o,movementY:this.shouldSkipY(t,!!s,r,a)?0:a}}shouldSkipX(e,t,i,s){const n=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:n.left;let l=a<=0&&r.left>=e.clientX||r.right<=e.clientX&&r.right<=o.right;return!!l||(l=t?s<0&&e.clientX>a+r.left||s>0&&e.clientX<a+r.left:i?s<0&&e.clientX>o.right||s>0&&e.clientX<a+r.left:s<0&&e.clientX>o.right||s>0&&e.clientX<o.right,l)}shouldSkipY(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3?arguments[3]:void 0;const n=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:n.top;let l=a<=0&&r.top>=e.clientY||r.bottom<=e.clientY&&r.bottom<=o.bottom;return!!l||(l=t?s<0&&e.clientY>a+r.top+i||s>0&&e.clientY<a+r.top:s<0&&e.clientY>o.bottom||s>0&&e.clientY<o.bottom,l)}createResizeMap(){const e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[data-ref=eTopLeftResizer]")},top:{element:e.querySelector("[data-ref=eTopResizer]")},topRight:{element:e.querySelector("[data-ref=eTopRightResizer]")},right:{element:e.querySelector("[data-ref=eRightResizer]")},bottomRight:{element:e.querySelector("[data-ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[data-ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[data-ref=eBottomLeftResizer]")},left:{element:e.querySelector("[data-ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;const e=this.element;if(!e)return;const t=(new DOMParser).parseFromString(Xn,"text/html").body;e.appendChild(t.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${qn}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:s}=this.config;i||s||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter((e=>!e.classList.contains("ag-hidden"))):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,i=0;for(let s=0;s<e.length;s++){const n=e[s],r=!!n.style.flex&&"0 0 auto"!==n.style.flex;if(n===this.element)continue;let o=this.minHeight||0,a=this.minWidth||0;if(r){const e=window.getComputedStyle(n);e.minHeight&&(o=parseInt(e.minHeight,10)),e.minWidth&&(a=parseInt(e.minWidth,10))}else o=n.offsetHeight,a=n.offsetWidth;t+=o,i+=a}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){const n=i[s];n!==t&&(e?n.style.height=`${n.offsetHeight}px`:n.style.width=`${n.offsetWidth}px`,n.style.flex="0 0 auto",n===this.element&&(t=i[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some((e=>e))}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:s,isRight:n,isBottom:r,isLeft:o}=this.currentResizer,a=n||o,l=r||s,{movementX:h,movementY:c}=this.calculateMouseMovement({e:e,isLeft:o,isTop:s}),d=this.position.x,u=this.position.y;let p=0,g=0;if(a&&h){const e=o?-1:1,t=this.getWidth(),i=t+h*e;let s=!1;o&&(p=t-i,(d+p<=0||i<=this.minWidth)&&(s=!0,p=0)),s||this.setWidth(i)}if(l&&c){const e=s?-1:1,t=this.getHeight(),i=t+c*e;let n=!1;s?(g=t-i,(u+g<=0||i<=this.minHeight)&&(n=!0,g=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&t<i&&this.getMinSizeOfSiblings().height+i>this.element.parentElement.offsetHeight&&(n=!0),n||this.setHeight(i)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&p||g)&&this.offsetElement(d+p,u+g)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:i}=this.position;let s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:n,movementY:r}=this.calculateMouseMovement({e:e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+n,i+r),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},er=class e extends ze{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.eFocusableElement=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:e=>{if(e.defaultPrevented)return;const t=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())},...t}}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.eFocusableElement.classList.add(e.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedElementListeners(this.eFocusableElement,{focusin:this.callbacks.onFocusIn}),this.callbacks.onFocusOut&&this.addManagedElementListeners(this.eFocusableElement,{focusout:this.callbacks.onFocusOut})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:e=>{e.defaultPrevented||Oe(e)||(this.callbacks.shouldStopEventPropagation(e)?Ne(e):e.key===js.TAB?this.callbacks.onTabKeyDown(e):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(e))}})}};er.FOCUS_MANAGED_CLASS="ag-focus-managed";var tr=er,ir={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function sr(e,t){return nr(e)?(null!=e.debounceMs&&h("debounceMs is ignored when apply button is present"),0):null!=e.debounceMs?e.debounceMs:t}function nr(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0}var rr=class extends Rs{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=Is,this.buttonListeners=[]}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.resetTemplate(),this.createManagedBean(new tr(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Jn(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);const i=`\n            <form class="ag-filter-wrapper">\n                <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" data-ref="eFilterBody">\n                    ${this.createBodyTemplate()}\n                </div>\n            </form>`;this.setTemplate(i,this.getAgComponents(),e),t=this.getGui(),t&&t.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then((()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()}))}setParams(e){this.providedFilterParams=e,this.applyActive=nr(e),this.resetButtonsPanel(e)}updateParams(e){this.providedFilterParams=e,this.applyActive=nr(e),this.resetUiToActiveModel(this.getModel(),(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()}))}resetButtonsPanel(e,t){const{buttons:i,readOnly:s}=t??{},{buttons:n,readOnly:r}=e;if(s===r&&E(i,n))return;const o=n&&n.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(rs(this.eButtonsPanel),this.buttonListeners.forEach((e=>e())),this.buttonListeners=[]):o&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!o)return void(this.eButtonsPanel&&os(this.eButtonsPanel));const a=document.createDocumentFragment(),l=e=>{let t,i;switch(e){case"apply":t=this.translate("applyFilter"),i=e=>this.onBtApply(!1,!1,e);break;case"clear":t=this.translate("clearFilter"),i=()=>this.onBtClear();break;case"reset":t=this.translate("resetFilter"),i=()=>this.onBtReset();break;case"cancel":t=this.translate("cancelFilter"),i=e=>{this.onBtCancel(e)};break;default:return void h("Unknown button type specified")}const s=hs(`<button\n                    type="${"apply"===e?"submit":"button"}"\n                    data-ref="${e}FilterButton"\n                    class="ag-button ag-standard-button ag-filter-apply-panel-button"\n                >${t}\n                </button>`);this.buttonListeners.push(...this.addManagedElementListeners(s,{click:i})),a.append(s)};n.forEach((e=>l(e))),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){const e=sr(this.providedFilterParams,this.getDefaultDebounceMs()),t=f(this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(e){return(null!=e?this.setModelIntoUi(e):this.resetUiToDefaults()).then((()=>{this.updateUiVisibility(),this.applyModel("api")}))}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),(()=>{this.handleCancelEnd(e)}))}handleCancelEnd(e){this.providedFilterParams.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const i=()=>{this.onUiChanged(!1,"prevent"),t?.()};null!=e?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)}onBtClear(){this.resetUiToDefaults().then((()=>this.onUiChanged()))}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(){const e=this.getModelFromUi();if(!this.isModelValid(e))return!1;const t=this.appliedModel;return this.appliedModel=e,!this.areModelsEqual(t,e)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;if(i&&i.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")){const i="columnFilter";this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:i})}const{closeOnApply:s}=this.providedFilterParams;s&&this.applyActive&&!e&&!t&&this.close(i)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,i=t&&t.key;let s;"Enter"!==i&&"Space"!==i||(s={keyboardEvent:t}),this.hidePopup(s),this.hidePopup=null}onUiChanged(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const e=this.isModelValid(this.getModelFromUi()),t=this.queryForHtmlElement('[data-ref="applyFilterButton"]');t&&Yi(t,!e)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){if(!this.positionableFeature||"toolPanel"===e)return;const t="floatingFilter"===e||"columnFilter"===e,{positionableFeature:i,gos:s}=this;t?(i.restoreLastSize(),i.setResizable(s.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.providedFilterParams;return this.providedFilterParams=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.localeService.getLocaleTextFunc()(e,ir[e])}getCellValue(e){return this.providedFilterParams.getValue(e)}getPositionableElement(){return this.eFilterBody}},or=class extends $s{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)}},ar=class extends Rs{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super(`<div class="ag-list ag-${e}-list" role="listbox"></div>`),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),this.unFocusable||this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case js.ENTER:if(this.highlightedEl){const e=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(e)}else this.setValue(this.getValue());break;case js.DOWN:case js.UP:e.preventDefault(),this.navigate(t);break;case js.PAGE_DOWN:case js.PAGE_UP:case js.PAGE_HOME:case js.PAGE_END:e.preventDefault(),this.navigateToPage(t)}}navigate(e){const t=e===js.DOWN;let i;if(this.highlightedEl){let e=this.itemEls.indexOf(this.highlightedEl)+(t?1:-1);e=Math.min(Math.max(e,0),this.itemEls.length-1),i=this.itemEls[e]}else i=this.itemEls[t?0:this.itemEls.length-1];this.highlightItem(i)}navigateToPage(e){if(!this.highlightedEl||0===this.itemEls.length)return;const t=this.itemEls.indexOf(this.highlightedEl),i=this.options.length-1,s=this.itemEls[0].clientHeight,n=Math.floor(this.getGui().clientHeight/s);let r=-1;e===js.PAGE_HOME?r=0:e===js.PAGE_END?r=i:e===js.PAGE_DOWN?r=Math.min(t+n,i):e===js.PAGE_UP&&(r=Math.max(t-n,0)),-1!==r&&this.highlightItem(this.itemEls[r])}addOptions(e){return e.forEach((e=>this.addOption(e))),this}addOption(e){const{value:t,text:i}=e,s=i||t;return this.options.push({value:t,text:s}),this.renderOption(t,s),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach((e=>{os(e)})),this.itemEls=[]}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");e.forEach(((t,i)=>{bi(t,i+1),wi(t,e.length)}))}renderOption(e,t){const i=j(this.gos),s=i.createElement("div");ci(s,"option"),s.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const n=i.createElement("span");s.appendChild(n),n.textContent=t,this.unFocusable||(s.tabIndex=-1),this.itemEls.push(s),this.addManagedListeners(s,{mouseover:()=>this.highlightItem(s),mousedown:t=>{t.preventDefault(),t.stopPropagation(),this.setValue(e)}}),this.createManagedBean(new Ms({getTooltipValue:()=>t,getGui:()=>s,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>n.scrollWidth>n.clientWidth})),this.getGui().appendChild(s)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;const i=this.options.findIndex((t=>t.value===e));if(-1!==i){const e=this.options[i];this.value=e.value,this.displayValue=e.text,this.highlightItem(this.itemEls[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex((e=>e.value===this.value));-1!==e&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!ls(e))return;this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(this.activeClass),Ti(this.highlightedEl,!0);const t=this.getGui(),{scrollTop:i,clientHeight:s}=t,{offsetTop:n,offsetHeight:r}=e;(n+r>i+s||n<i)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){this.highlightedEl&&ls(this.highlightedEl)&&(this.highlightedEl.classList.remove(this.activeClass),Ti(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},lr=class extends _s{constructor(e){if(super(e,e?.template||'\n            <div class="ag-picker-field" role="presentation">\n                <div data-ref="eLabel"></div>\n                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">\n                    <div data-ref="eDisplayField" class="ag-picker-field-display"></div>\n                    <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n                </div>\n            </div>',e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=Is,this.eWrapper=Is,this.eDisplayField=Is,this.eIcon=Is,this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:s,minPickerWidth:n,maxPickerWidth:r}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!s,null!=i&&this.setPickerMaxHeight(i),null!=n&&this.setPickerMinWidth(n),null!=r&&this.setPickerMaxWidth(r)}wireBeans(e){this.popupService=e.popupService}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:i,inputWidth:s}=this.config;if(i){const e=Ps(i,this.gos);e&&this.eIcon.appendChild(e)}null!=s&&this.setInputWidth(s)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Ci(e,!1),this.ariaRole&&ci(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case js.UP:case js.DOWN:case js.ENTER:case js.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case js.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:i,pickerAriaLabelValue:s,modalPicker:n=!0}=this.config,r={modal:n,eChild:e,closeOnEsc:!0,closedCallback:()=>{const e=$(this.gos);this.beforeHidePicker(),e&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,s),anchorToElement:this.eWrapper};e.style.position="absolute";const o=this.popupService.addPopup(r),{maxPickerHeight:a,minPickerWidth:l,maxPickerWidth:h,variableWidth:c}=this;c?(l&&(e.style.minWidth=l),e.style.width=fs(es(this.eWrapper)),h&&(e.style.maxWidth=h)):ps(e,h??es(this.eWrapper));const d=a??`${Qi(this.popupService.getPopupParent())}px`;return e.style.setProperty("max-height",d),this.alignPickerToComponent(),o.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerType:e}=this.config,{pickerGap:t}=this,i=this.gos.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:t})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;Ci(this.getAriaElement(),e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&this.hideCurrentPicker()}setInputWidth(e){return ps(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"===typeof e&&(e=`${e}px`),this.minPickerWidth=null==e?void 0:e,this}setPickerMaxWidth(e){return"number"===typeof e&&(e=`${e}px`),this.maxPickerWidth=null==e?void 0:e,this}setPickerMaxHeight(e){return"number"===typeof e&&(e=`${e}px`),this.maxPickerHeight=null==e?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}},hr=class extends lr{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox",...e})}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:i}=this.config;null!=e&&this.addOptions(e),null!=t&&this.setValue(t,!0),i&&null==t&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new ar("select",!0)),this.listComponent.setParentComponent(this);const e=this.listComponent.getAriaElement(),t=`ag-select-list-${this.listComponent.getCompId()}`;e.setAttribute("id",t),Pi(this.getAriaElement(),e),this.listComponent.addManagedListeners(this.listComponent,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})}}),this.listComponent.addManagedListeners(this.listComponent,{fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){const{key:t}=e;switch(t===js.TAB&&this.hidePicker(),t){case js.ENTER:case js.UP:case js.DOWN:case js.PAGE_UP:case js.PAGE_DOWN:case js.PAGE_HOME:case js.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case js.ESCAPE:super.onKeyDown(e);break;case js.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e)}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}addOptions(e){return e.forEach((e=>this.addOption(e))),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this}setValue(e,t,i){if(this.value===e||!this.listComponent)return this;i||this.listComponent.setValue(e,!0);if(this.listComponent.getValue()===this.getValue())return this;let s=this.listComponent.getDisplayValue();return null==s&&this.config.placeholder&&(s=this.config.placeholder),this.eDisplayField.textContent=s,this.setTooltip({newTooltipText:s??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}),super.setValue(e,t)}destroy(){this.listComponent&&(this.listComponent=this.destroyBean(this.listComponent)),super.destroy()}},cr={selector:"AG-SELECT",component:hr},dr=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}getFilterOptions(){return this.filterOptions}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach((e=>{if("string"===typeof e)return;[["displayKey"],["displayName"],["predicate","test"]].every((t=>!!t.some((t=>null!=e[t]))||(h(`ignoring FilterOptionDef as it doesn't contain one of '${t}'`),!1)))?this.customFilterOptions[e.displayKey]=e:this.filterOptions=this.filterOptions.filter((t=>t===e))||[]}))}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){const e=this.filterOptions[0];"string"===typeof e?this.defaultOption=e:e.displayKey?this.defaultOption=e.displayKey:h("invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else h("no filter options for filter")}getDefaultOption(){return this.defaultOption}getCustomOption(e){return this.customFilterOptions[e]}},ur=class extends rr{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(e){const t=this.optionsFactory.getCustomOption(e);if(t){const{numberOfInputs:e}=t;return null!=e?e:1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:"inRange"===e?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach(((t,i)=>{0===i?t.setValue(e,!0):t.setValue(this.optionsFactory.getDefaultOption(),!0)}))}getModelFromUi(){const e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map((e=>e.getValue()))}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;const i=!e.operator,s=!t.operator;if(!i&&s||i&&!s)return!1;let n;if(i){const i=e,s=t;n=this.areSimpleModelsEqual(i,s)}else{const i=e,s=t;n=i.operator===s.operator&&we(i.conditions,s.conditions,((e,t)=>this.areSimpleModelsEqual(e,t)))}return n}shouldRefresh(e){const t=this.getModel(),i=t?t.conditions??[t]:null,s=e.filterOptions?.map((e=>"string"===typeof e?e:e.displayKey))??this.getDefaultFilterOptions();return!(i&&!i.every((e=>void 0!==s.find((t=>t===e.type)))))&&!("number"===typeof e.maxNumConditions&&i&&i.length>e.maxNumConditions)}refresh(e){if(!this.shouldRefresh(e))return!1;return!!super.refresh(e)&&(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(e){if(e.operator){const t=e;let i=t.conditions;null==i&&(i=[],h("Filter model is missing 'conditions'"));const s=this.validateAndUpdateConditions(i),n=this.getNumConditions();if(s<n)this.removeConditionsAndOperators(s);else if(s>n)for(let e=n;e<s;e++)this.createJoinOperatorPanel(),this.createOption();const r="OR"===t.operator;this.eJoinOperatorsAnd.forEach((e=>e.setValue(!r,!0))),this.eJoinOperatorsOr.forEach((e=>e.setValue(r,!0))),i.forEach(((e,t)=>{this.eTypes[t].setValue(e.type,!0),this.setConditionIntoUi(e,t)}))}else{const t=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(t.type,!0),this.setConditionIntoUi(t,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),an.resolve()}validateAndUpdateConditions(e){let t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),h('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),t=this.maxNumConditions),t}doesFilterPass(e){const t=this.getModel();if(null==t)return!0;const{operator:i}=t,s=[];if(i){const e=t;s.push(...e.conditions??[])}else s.push(t);return s[i&&"OR"===i?"some":"every"]((t=>this.individualConditionPasses(e,t)))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new dr,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(e){this.maxNumConditions=e.maxNumConditions??2,this.maxNumConditions<1&&(h('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=e.numAlwaysVisibleConditions??1,this.numAlwaysVisibleConditions<1&&(h('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(h('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){const e=this.createManagedBean(new hr);this.eTypes.push(e),e.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());const t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);const i=this.getNumConditions()-1;this.forEachPositionInput(i,(e=>this.resetInput(e))),this.addChangedListeners(e,i)}createJoinOperatorPanel(){const e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");const t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),i=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);const s=this.eJoinOperatorPanels.length-1,n=this.joinOperatorId++;this.resetJoinOperatorAnd(t,s,n),this.resetJoinOperatorOr(i,s,n),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){const s=this.createManagedBean(new or);return e.push(s),s.addCssClass("ag-filter-condition-operator"),s.addCssClass(`ag-filter-condition-operator-${i}`),t.appendChild(s.getGui()),s}getDefaultJoinOperator(e){return"AND"===e||"OR"===e?e:"AND"}createFilterListOptions(){const e=this.optionsFactory.getFilterOptions();this.filterListOptions=e.map((e=>"string"===typeof e?this.createBoilerplateListOption(e):this.createCustomListOption(e)))}putOptionsIntoDropdown(e){this.filterListOptions.forEach((t=>{e.addOption(t)})),e.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.localeService.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}}createBodyTemplate(){return""}getAgComponents(){return[]}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?e=i:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const t=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<t){this.removeConditionsAndOperators(t+1);const i=e+1,s=t-i;s>0&&this.removeConditionsAndOperators(i,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach(((t,i)=>{const s=this.isConditionDisabled(i,e);t.setDisabled(s||this.filterListOptions.length<=1),1===i&&(Yi(this.eJoinOperatorPanels[0],s),this.eJoinOperatorsAnd[0].setDisabled(s),this.eJoinOperatorsOr[0].setDisabled(s))})),this.eConditionBodies.forEach(((e,t)=>{Ki(e,this.isConditionBodyVisible(t))}));const i="OR"===(t??this.getJoinOperator());this.eJoinOperatorsAnd.forEach((e=>{e.setValue(!i,!0)})),this.eJoinOperatorsOr.forEach((e=>{e.setValue(i,!0)})),this.forEachInput(((t,i,s,n)=>{this.setElementDisplayed(t,i<n),this.setElementDisabled(t,this.isConditionDisabled(s,e))})),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);const i=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,i,t),this.removeComponents(this.eJoinOperatorsAnd,i,t),this.removeComponents(this.eJoinOperatorsOr,i,t)}removeElements(e,t,i){this.removeItems(e,t,i).forEach((e=>os(e)))}removeComponents(e,t,i){this.removeItems(e,t,i).forEach((e=>{os(e.getGui()),this.destroyBean(e)}))}removeItems(e,t,i){return null==i?e.splice(t):e.splice(t,i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus)if(this.isReadOnly())this.eFilterBody.focus();else{const e=this.getInputs(0)[0];if(!e)return;e instanceof Ks&&e.getInputElement().focus()}}afterGuiDetached(){super.afterGuiDetached();const e=this.getModel();this.resetUiToActiveModel(e);let t=-1,i=-1,s=!1;const n=this.getJoinOperator();for(let o=this.getNumConditions()-1;o>=0;o--)if(this.isConditionUiComplete(o))-1===t&&(t=o,i=o);else{const e=o<t;(o>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(o-1)||e)&&(this.removeConditionsAndOperators(o,1),s=!0,e&&i--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(i,n),s&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getPlaceholderText(e,t){let i=this.translate(e);if(d(this.filterPlaceholder)){const e=this.filterPlaceholder,s=this.eTypes[t].getValue();i=e({filterOptionKey:s,filterOption:this.translate(s),placeholder:i})}else"string"===typeof this.filterPlaceholder&&(i=this.filterPlaceholder);return i}resetPlaceholder(){const e=this.localeService.getLocaleTextFunc();this.forEachInput(((t,i,s,n)=>{if(!(t instanceof Ks))return;const r=0===i&&n>1?"inRangeStart":0===i?"filterOoo":"inRangeEnd",o=0===i&&n>1?e("ariaFilterFromValue","Filter from value"):0===i?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(r,s)),t.setInputAriaLabel(o)}))}setElementValue(e,t,i){e instanceof Ks&&e.setValue(null!=t?String(t):null,!0)}setElementDisplayed(e,t){e instanceof Rs&&Ki(e.getGui(),t)}setElementDisabled(e,t){e instanceof Rs&&Yi(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ks&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach(((t,i)=>{this.forEachPositionTypeInput(i,t,e)}))}forEachPositionInput(e,t){const i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){const s=this.getNumberOfInputs(t),n=this.getInputs(e);for(let r=0;r<n.length;r++){const t=n[r];null!=t&&i(t,r,e,s)}}isConditionDisabled(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(e){if(e>=this.getNumConditions())return!1;return"empty"!==this.getConditionType(e)&&!this.getValues(e).some((e=>null==e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach((e=>this.resetType(e))),this.eJoinOperatorsAnd.forEach(((e,t)=>this.resetJoinOperatorAnd(e,t,this.joinOperatorId+t))),this.eJoinOperatorsOr.forEach(((e,t)=>this.resetJoinOperatorOr(e,t,this.joinOperatorId+t))),this.joinOperatorId++,this.forEachInput((e=>this.resetInput(e))),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),an.resolve()}resetType(e){const t=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(t).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("AND"),this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("OR"),this.translate("orCondition"),i)}resetJoinOperator(e,t,i,s,n){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${n}`).setLabel(s),t)}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach(((e,t)=>this.updateJoinOperatorDisabled(e,t))),this.eJoinOperatorsOr.forEach(((e,t)=>this.updateJoinOperatorDisabled(e,t)))}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const i=this.mapValuesFromModel(e);this.forEachInput(((e,s,n)=>{n===t&&this.setElementValue(e,null!=i[s]?i[s]:null)}))}setValueFromFloatingFilter(e){this.forEachInput(((t,i,s)=>{this.setElementValue(t,0===i&&0===s?e:null,!0)}))}isDefaultOperator(e){return e===this.defaultJoinOperator}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,(e=>{this.attachElementOnChange(e,this.listener)})))}individualConditionPasses(e,t){const i=this.getCellValue(e.node),s=this.mapValuesFromModel(t),n=this.optionsFactory.getCustomOption(t.type),r=this.evaluateCustomFilter(n,s,i);return null!=r?r:null==i?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,i,t,e)}evaluateCustomFilter(e,t,i){if(null==e)return;const{predicate:s}=e;return null==s||t.some((e=>null==e))?void 0:s(t,i)}isBlank(e){return null==e||"string"===typeof e&&0===e.trim().length}hasInvalidInputs(){return!1}},pr=class extends ur{setParams(e){super.setParams(e),this.scalarFilterParams=e}evaluateNullValue(e){switch(e){case"equals":if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case"notEqual":if(this.scalarFilterParams.includeBlanksInNotEqual)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case"lessThan":case"lessThanOrEqual":if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case"inRange":if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,i){const s=this.comparator(),n=null!=e[0]?s(e[0],t):0;switch(i.type){case"equals":return 0===n;case"notEqual":return 0!==n;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const i=s(e[1],t);return this.scalarFilterParams.inRangeInclusive?n>=0&&i<=0:n>0&&i<0}case"blank":return this.isBlank(t);case"notBlank":return!this.isBlank(t);default:return h('Unexpected type of filter "'+i.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}};function gr(e){if(e.altKey||e.ctrlKey||e.metaKey)return!1;return 1===e.key?.length}function mr(e,t,i,s,n){const r=s?s.getColDef().suppressKeyboardEvent:void 0;if(!r)return!1;const o=e.addGridCommonParams({event:t,editing:n,column:s,node:i,data:i.data,colDef:s.getColDef()});if(r){if(r(o))return!0}return!1}var fr=class extends Ks{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ag-text-field",arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text")}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){return this.eInput.value!==e&&(this.eInput.value=w(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListeners(this.eInput,{keydown:t=>{gr(t)&&t.key&&!e.test(t.key)&&t.preventDefault()},paste:t=>{const i=t.clipboardData?.getData("text");i&&i.split("").some((t=>!e.test(t)))&&t.preventDefault()}})}},vr={selector:"AG-INPUT-TEXT-FIELD",component:fr},yr=class extends fr{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListeners(this.eInput,{blur:()=>{const e=parseFloat(this.eInput.value),t=isNaN(e)?"":this.normalizeValue(e.toString());this.value!==t&&this.setValue(t)},wheel:this.onWheel.bind(this)}),this.eInput.step="any";const{precision:e,min:t,max:i,step:s}=this.config;"number"===typeof e&&this.setPrecision(e),"number"===typeof t&&this.setMin(t),"number"===typeof i&&this.setMax(i),"number"===typeof s&&this.setStep(s)}onWheel(e){K(this.gos)===this.eInput&&e.preventDefault()}normalizeValue(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));const t=parseFloat(e);return null!=this.min&&t<this.min?e=this.min.toString():null!=this.max&&t>this.max&&(e=this.max.toString()),e}adjustPrecision(e,t){if(null==this.precision)return e;if(t){const t=parseFloat(e).toFixed(this.precision);return parseFloat(t).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return`${i[0]}.${i[1].slice(0,this.precision)}`}return i[0]}setMin(e){return this.min===e||(this.min=e,ys(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,ys(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,ys(this.eInput,"step",e)),this}setValue(e,t){return this.setValueOrInputValue((e=>super.setValue(e,t)),(()=>this),e)}setStartValue(e){return this.setValueOrInputValue((e=>super.setValue(e,!0)),(e=>{this.eInput.value=e}),e)}setValueOrInputValue(e,t,i){if(w(i)){let s=this.isScientificNotation(i);if(s&&this.eInput.validity.valid)return e(i);if(!s){s=(i=this.adjustPrecision(i))!=this.normalizeValue(i)}if(s)return t(i)}return e(i)}getValue(){if(!this.eInput.validity.valid)return;const e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(e){return"string"===typeof e&&e.includes("e")}},Cr={selector:"AG-INPUT-NUMBER-FIELD",component:yr},Sr=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"],wr=class{constructor(e,t,i){this.localeService=e,this.optionsFactory=t,this.valueFormatter=i}getModelAsString(e){if(!e)return null;const t=null!=e.operator,i=this.localeService.getLocaleTextFunc();if(t){const t=e,s=(t.conditions??[]).map((e=>this.getModelAsString(e))),n="AND"===t.operator?"andCondition":"orCondition";return s.join(` ${i(n,ir[n])} `)}if("blank"===e.type||"notBlank"===e.type)return i(e.type,e.type);{const t=e,s=this.optionsFactory.getCustomOption(t.type),{displayKey:n,displayName:r,numberOfInputs:o}=s||{};return n&&r&&0===o?(i(n,r),r):this.conditionToString(t,s)}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){return this.valueFormatter?this.valueFormatter(e??null)??"":String(e)}},br=class extends wr{conditionToString(e,t){const{numberOfInputs:i}=t||{};return"inRange"==e.type||2===i?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}
2`:null!=e.filter?this.formatValue(e.filter):`${e.type}`}};function xr(e){const{allowedCharPattern:t}=e??{};return t??null}var Mr=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],Dr=class extends wr{conditionToString(e,t){const{numberOfInputs:i}=t||{};return"inRange"==e.type||2===i?`${e.filter}-${e.filterTo}`:null!=e.filter?`${e.filter}`:`${e.type}`}};function Ir(e){const t=e&&e.trim();return""===t?e:t}function Rr(e){if("number"===typeof e)return e;if("string"===typeof e){const t=parseInt(e);if(isNaN(t))return;return t}}function Er(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return i=>{const s=Rr(i);if(!(null==s||s<e||s>t))return s}}function Ar(e,t){return e.toString().padStart(t,"0")}function Tr(e,t,i){return"number"!==typeof e?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t}`)}function Pr(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-";if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map((e=>Ar(e,2))).join(i);return t&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map((e=>Ar(e,2))).join(":")),s}var Lr=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function Fr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD";const i=Ar(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],r={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>s[e.getMonth()],MMM:()=>s[e.getMonth()].slice(0,3),MM:()=>Ar(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Lr(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Lr(e.getDate())}`,DD:()=>Ar(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>n[e.getDay()],ddd:()=>n[e.getDay()].slice(0,3),dd:()=>n[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Lr(e.getDay())}`,d:()=>`${e.getDay()}`},o=new RegExp(Object.keys(r).join("|"),"g");return t.replace(o,(e=>e in r?r[e]():e))}function kr(e){if(!e)return null;const[t,i]=e.split(" ");if(!t)return null;const s=t.split("-").map((e=>parseInt(e,10)));if(3!==s.filter((e=>!isNaN(e))).length)return null;const[n,r,o]=s,a=new Date(n,r-1,o);if(a.getFullYear()!==n||a.getMonth()!==r-1||a.getDate()!==o)return null;if(!i||"00:00:00"===i)return a;const[l,h,c]=i.split(":").map((e=>parseInt(e,10)));return l>=0&&l<24&&a.setHours(l),h>=0&&h<60&&a.setMinutes(h),c>=0&&c<60&&a.setSeconds(c),a}var Nr=class{constructor(e,t,i,s,n){this.alive=!0,this.context=e,this.eParent=s;t.getDateCompDetails(i).newAgStackInstance().then((t=>{this.alive?(this.dateComp=t,t&&(s.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached(),this.tempValue&&t.setDate(this.tempValue),null!=this.disabled&&this.setDateCompDisabled(this.disabled),n?.(this))):e.destroyBean(t)}))}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e}setDisabled(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e}setDisplayed(e){Ki(this.eParent,e)}setInputPlaceholder(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)}setInputAriaLabel(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)}afterGuiAttached(e){this.dateComp&&"function"===typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)}updateParams(e){let t=!1;if(this.dateComp?.refresh&&"function"===typeof this.dateComp.refresh){null!==this.dateComp.refresh(e)&&(t=!0)}if(!t&&this.dateComp?.onParamsUpdated&&"function"===typeof this.dateComp.onParamsUpdated){null!==this.dateComp.onParamsUpdated(e)&&h("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}}setDateCompDisabled(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)}},Or=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"],Gr=class extends wr{constructor(e,t,i){super(t,i),this.dateFilterParams=e}conditionToString(e,t){const{type:i}=e,{numberOfInputs:s}=t||{},n="inRange"==i||2===s,r=kr(e.dateFrom),o=kr(e.dateTo),a=this.dateFilterParams.inRangeFloatingFilterDateFormat;
vendor: 14,875 bytes, line 2
2if(n){return`${null!==r?Fr(r,a):"null"}-${null!==o?Fr(o,a):"null"}`}return null!=r?Fr(r,a):`${i}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},Br=1/0,Vr=class extends ze{constructor(e,t,i,s){super(),this.columnOrGroup=e,this.columnOrGroup=e,this.eCell=t,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=s,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?Se(this.colsSpanning):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const e=this.beans.gos.get("suppressColumnMoveAnimation"),t=w(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=e.getLeft(),i=e.getOldLeft(),s=this.modifyLeftForPrintLayout(e,i),n=this.modifyLeftForPrintLayout(e,t);this.setLeft(s),this.actualLeft=n,this.beans.columnAnimationService.executeNextVMTurn((()=>{this.actualLeft===n&&this.setLeft(n)}))}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){if(!k(this.beans.gos,"print"))return t;if("left"===e.getPinned())return t;const i=this.beans.visibleColsService.getColsLeftWidth();if("right"===e.getPinned()){return i+this.beans.visibleColsService.getBodyContainerWidth()+t}return i+t}setLeft(e){if(w(e)&&(this.eCell.style.left=`${e}px`),kt(this.columnOrGroup)){const e=this.columnOrGroup.getLeafColumns();if(!e.length)return;e.length>1&&Ri(this.ariaEl,e.length)}}};function zr(e,t,i,s){return b(e)?[]:jr(e.headerClass,e,t,i,s)}function Hr(e,t,i,s){return b(e)?[]:jr(e.toolPanelClass,e,t,i,s)}function Wr(e,t,i){e.addOrRemoveCssClass("ag-column-first",i.isColAtEdge(t,"first")),e.addOrRemoveCssClass("ag-column-last",i.isColAtEdge(t,"last"))}function jr(e,t,i,s,n){if(b(e))return[];let r;if("function"===typeof e){const o=function(e,t,i,s){return t.addGridCommonParams({colDef:e,column:i,columnGroup:s})}(t,i,s,n);r=e(o)}else r=e;return"string"===typeof r?[r]:Array.isArray(r)?[...r]:[]}var Ur=0,_r=class e extends ze{constructor(e,t,i){super(),this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.columnGroupChild=e,this.parentRowCtrl=i,this.beans=t,this.instanceId=e.getUniqueId()+"-"+Ur++}wireBeans(e){this.pinnedWidthService=e.pinnedWidthService,this.focusService=e.focusService,this.userComponentFactory=e.userComponentFactory,this.ctrlsService=e.ctrlsService,this.dragAndDropService=e.dragAndDropService,this.menuService=e.menuService}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.focusService.getFocusedHeader();return function(e,t,i,s){const n=s.getDefinition(),r=n&&n.suppressHeaderKeyboardEvent;return!!w(r)&&!!r(e.addGridCommonParams({colDef:n,column:s,headerRowIndex:i,event:t}))}(this.gos,e,t,i)}getWrapperHasFocus(){return K(this.gos)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventService,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onGuiFocus(){this.eventService.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:i,compBean:s}=e,{animationFrameService:n,resizeObserverService:r,columnModel:o,gos:a}=this.beans,l=e=>{if(!this.isAlive()||!s.isAlive())return;const{paddingTop:i,paddingBottom:r,borderBottomWidth:h,borderTopWidth:c}=qi(this.getGui()),d=i+r+h+c,u=t.offsetHeight+d;if(e<5){const i=j(a);if(!i||!i.contains(t)||0==u)return void n.requestAnimationFrame((()=>l(e+1)))}o.setColHeaderHeight(this.column,u)};let h,c=!1;const d=()=>{const e=this.column.isAutoHeaderHeight();e&&!c&&u(),!e&&c&&p()},u=()=>{c=!0,l(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),h=r.observeResize(t,(()=>l(0)))},p=()=>{c=!1,h&&h(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),h=void 0};d(),s.addDestroyFunc((()=>p())),s.addManagedListeners(this.column,{widthChanged:()=>c&&l(0)}),s.addManagedEventListeners({sortChanged:()=>{c&&window.setTimeout((()=>l(0)))}}),i&&i(d)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:i,eGui:s}=this;e&&t&&s&&(Wr(e,t,i.visibleColsService),Ii(s,i.visibleColsService.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){this.resizeFeature&&e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=this.focusService.isHeaderFocusSuppressed();this.eGui&&ys(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=K(this.gos),i=e.key===js.LEFT||e.key===js.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey)return;if((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),!i)return;const s=e.key===js.LEFT!==this.gos.get("enableRtl"),n=On[s?"Left":"Right"];if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const t=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(t,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(n)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e);if(this.column.getPinned()){const e=this.pinnedWidthService.getPinnedLeftWidth(),i=this.pinnedWidthService.getPinnedRightWidth(),s=Xi(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(e+i+t>s){if(!(s>e+i))return 0;t=s-e-i}}return t}getResizeDiff(e){let t=e.key===js.LEFT!==this.gos.get("enableRtl");const i=this.column.getPinned(),s=this.gos.get("enableRtl");return i&&s!==("right"===i)&&(t=!t),(t?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout((()=>{this.resizeFeature?.toggleColumnResizing(!1)}),150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case js.PAGE_DOWN:case js.PAGE_UP:case js.PAGE_HOME:case js.PAGE_END:t&&e.preventDefault()}}addDomData(t){const i=e.DOM_DATA_KEY_HEADER_CTRL;W(this.gos,this.eGui,i,this),t.addDestroyFunc((()=>W(this.gos,this.eGui,i,null)))}getGui(){return this.eGui}focus(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)}getRowIndex(){return this.parentRowCtrl.getRowIndex()}getParentRowCtrl(){return this.parentRowCtrl}getPinned(){return this.parentRowCtrl.getPinned()}getColumnGroupChild(){return this.columnGroupChild}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){const s=e??t;this.gos.get("preventDefaultOnContextMenu")&&s.preventDefault(),this.menuService.isHeaderContextMenuEnabled(i)&&this.menuService.showHeaderContextMenu(i,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(e,t){this.eventService.dispatchEvent({type:e,column:t})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null}};_r.DOM_DATA_KEY_HEADER_CTRL="headerCtrl";var Kr=_r,$r=class extends ze{wireBeans(e){this.columnHoverService=e.columnHoverService}constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListeners(this.element,{mouseout:this.onMouseOut.bind(this),mouseover:this.onMouseOver.bind(this)})}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}};var Yr="32.3.3";function Zr(e,t,i){if(null==t)return null;let s=null;const{compName:n,jsComp:r,fwComp:o}=An.getCompKeys(e,t,Sn);if(n){s={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[n]}else{null==r&&null==o&&!0===t.filter&&(s=i())}return s}var qr={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Qr=["january","february","march","april","may","june","july","august","september","october","november","december"];var Xr=class extends Rs{wireBeans(e){this.columnNameService=e.columnNameService}getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter}isEventFromDataChange(e){return e?.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(e){if(!e)return void(this.lastType=this.optionsFactory.getDefaultOption());let t;if(e.operator){t=e.conditions[0]}else t=e;this.lastType=t.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const t=e;return this.isTypeEditable(t.type)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.optionsFactory=new dr,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(i)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.setSimpleParams(e)}doesFilterHaveSingleInput(e){const t=this.optionsFactory.getCustomOption(e),{numberOfInputs:i}=t||{};return null==i||1==i}isTypeEditable(e){return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&["inRange","empty","blank","notBlank"].indexOf(e)<0}getAriaLabel(e){return`${this.columnNameService.getDisplayNameForColumn(e.column,"header",!0)} ${this.localeService.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},Jr=class extends ze{constructor(e){super(),this.params=e,this.eFloatingFilterTextInput=Is,this.valueChangedListener=()=>{}}setupGui(e){this.eFloatingFilterTextInput=this.createManagedBean(new fr(this.params?.config));const t=this.eFloatingFilterTextInput.getGui();e.appendChild(t);const i=e=>this.valueChangedListener(e);this.addManagedListeners(t,{input:i,keydown:i})}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e)}setAutoComplete(e){this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(e,t){this.eFloatingFilterTextInput.setValue(e,t)}setValueChangedListener(e){this.valueChangedListener=e}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)}},eo=class extends Xr{constructor(){super(...arguments),this.eFloatingFilterInputContainer=Is}postConstruct(){this.setTemplate('\n            <div class="ag-floating-filter-input" role="presentation" data-ref="eFloatingFilterInputContainer"></div>\n        ')}getDefaultDebounceMs(){return 500}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){this.params=e;const t=e.browserAutoComplete??!1;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=nr(this.params.filterParams),!this.isReadOnly()){const e=sr(this.params.filterParams,this.getDefaultDebounceMs()),t=f(this.syncUpWithParentFilter.bind(this),e);this.floatingFilterInputService.setValueChangedListener(t)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const t=this.floatingFilterInputService.getValue();rs(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}syncUpWithParentFilter(e){const t=e.key===js.ENTER;if(this.applyActive&&!t)return;let i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=Ir(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance((e=>{e&&e.onFloatingFilterChanged(this.getLastType()||null,i||null)}))}setEditable(e){this.floatingFilterInputService.setEditable(e)}},to=class extends ze{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new yr),this.eFloatingFilterTextInput=this.createManagedBean(new fr),this.eFloatingFilterTextInput.setDisabled(!0);const t=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,(e=>this.valueChangedListener(e))),this.setupListeners(i,(e=>this.valueChangedListener(e)))}setEditable(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}setValueChangedListener(e){this.valueChangedListener=e}
2setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}};var io={version:Yr,moduleName:"@ag-grid-community/filter-core",beans:[class extends ze{constructor(){super(...arguments),this.beanName="filterManager",this.advancedFilterModelUpdateQueue=[]}wireBeans(e){this.columnModel=e.columnModel,this.dataTypeService=e.dataTypeService,this.quickFilterService=e.quickFilterService,this.advancedFilterService=e.advancedFilterService,this.columnFilterService=e.columnFilterService}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvancedFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:e=>{let{enabled:t}=e;return this.onAdvancedFilterEnabledChanged(t)},dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],(()=>{this.onFilterChanged({source:"api"})})),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",(()=>{this.updateAggFiltering(),this.onFilterChanged()})),this.addManagedPropertyListener("advancedFilterModel",(e=>this.setAdvancedFilterModel(e.currentValue))),this.quickFilterService&&this.addManagedListeners(this.quickFilterService,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return"function"===typeof e&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return"function"===typeof t&&t(e)}setFilterModel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";this.isAdvancedFilterEnabled()?this.warnAdvancedFilters():this.columnFilterService?.setFilterModel(e,t)}getFilterModel(){return this.columnFilterService?.getFilterModel()??{}}isColumnFilterPresent(){return!!this.columnFilterService?.isColumnFilterPresent()}isAggregateFilterPresent(){return!!this.columnFilterService?.isAggregateFilterPresent()}isExternalFilterPresent(){return this.externalFilterPresent}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}onAdvancedFilterEnabledChanged(e){e?this.columnFilterService?.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilterService?.isFilterPresent()&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvancedFilterEnabled(){return!!this.advancedFilterService?.isEnabled()}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}resetQuickFilterCache(){this.quickFilterService?.resetQuickFilterCache()}refreshFiltersForAggregations(){Q(this.gos)&&this.onFilterChanged()}onFilterChanged(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{source:t,additionalEventAttributes:i,columns:s=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.columnFilterService?this.columnFilterService.updateBeforeFilterChanged(e):an.resolve()).then((()=>{const e={source:t,type:"filterChanged",columns:s};i&&nt(e,i),this.eventService.dispatchEvent(e),this.columnFilterService?.updateAfterFilterChanged()}))}isSuppressFlashingCellsBecauseFiltering(){return!!this.columnFilterService?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilterService?.isQuickFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Q(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode))&&!(this.isAggregateFilterPresent()&&!this.columnFilterService.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode))&&(!(this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode))&&(!(this.isColumnFilterPresent()&&!this.columnFilterService.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip))&&!(this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))))}isFilterActive(e){return!!this.columnFilterService?.isFilterActive(e)}getOrCreateFilterWrapper(e){return this.columnFilterService?.getOrCreateFilterWrapper(e)??null}getDefaultFloatingFilter(e){return this.columnFilterService.getDefaultFloatingFilter(e)}createFilterParams(e,t){return this.columnFilterService.createFilterParams(e,t)}isFilterAllowed(e){return!this.isAdvancedFilterEnabled()&&!!this.columnFilterService?.isFilterAllowed(e)}
vendor: 33,840 bytes, line 2
2getFloatingFilterCompDetails(e,t){return this.columnFilterService?.getFloatingFilterCompDetails(e,t)}getCurrentFloatingFilterParentModel(e){return this.columnFilterService?.getCurrentFloatingFilterParentModel(e)}destroyFilter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";this.columnFilterService?.destroyFilter(e,t)}areFilterCompsDifferent(e,t){return!!this.columnFilterService?.areFilterCompsDifferent(e,t)}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(e){this.isAdvancedFilterEnabled()&&(this.dataTypeService?.isPendingInference()?this.advancedFilterModelUpdateQueue.push(e):(this.advancedFilterService.setModel(e??null),this.onFilterChanged({source:"advancedFilter"})))}toggleAdvancedFilterBuilder(e,t){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return!this.isAdvancedFilterEnabled()&&!!this.columnFilterService?.hasFloatingFilters()}getFilterInstance(e,t){if(!this.isAdvancedFilterEnabled())return this.columnFilterService?.getFilterInstance(e,t);this.warnAdvancedFilters()}getColumnFilterInstance(e){return this.isAdvancedFilterEnabled()?(this.warnAdvancedFilters(),Promise.resolve(void 0)):this.columnFilterService?.getColumnFilterInstance(e)??Promise.resolve(void 0)}warnAdvancedFilters(){h("Column Filter API methods have been disabled as Advanced Filters are enabled.")}setupAdvancedFilterHeaderComp(e){this.advancedFilterService?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvancedFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advancedFilterModelUpdateQueue.forEach((e=>this.setAdvancedFilterModel(e))),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(e){return this.columnFilterService?.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.isAdvancedFilterEnabled()?(this.warnAdvancedFilters(),Promise.resolve()):this.columnFilterService?.setColumnFilterModel(e,t)??Promise.resolve()}setColDefPropertiesForDataType(e,t,i){this.columnFilterService?.setColDefPropertiesForDataType(e,t,i)}}]},so={version:Yr,moduleName:"@ag-grid-community/filter-api",apiFunctions:{isAnyFilterPresent:function(e){return!!e.filterManager?.isAnyFilterPresent()},onFilterChanged:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";e.filterManager?.onFilterChanged({source:t})}},dependantModules:[io]},no={version:Yr,moduleName:"@ag-grid-community/column-filter",beans:[class extends ze{constructor(){super(...arguments),this.beanName="columnFilterService",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.rowModel=e.rowModel,this.userComponentFactory=e.userComponentFactory,this.rowRenderer=e.rowRenderer,this.dataTypeService=e.dataTypeService,this.filterManager=e.filterManager}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),rowDataUpdated:()=>this.onNewRowsLoaded("rowDataUpdated"),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel={...this.gos.get("initialState")?.filter?.filterModel??{}}}setFilterModel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";if(this.dataTypeService?.isPendingInference())return void this.filterModelUpdateQueue.push({model:e,source:t});const i=[],s=this.getFilterModel(!0);if(e){const t=new Set(Object.keys(e));this.allColumnFilters.forEach(((s,n)=>{const r=e[n];i.push(this.setModelOnFilterWrapper(s.filterPromise,r)),t.delete(n)})),t.forEach((t=>{const s=this.columnModel.getColDefCol(t)||this.columnModel.getCol(t);if(!s)return void h("setFilterModel() - no column found for colId: "+t);if(!s.isFilterAllowed())return void h("setFilterModel() - unable to fully apply model, filtering disabled for colId: "+t);const n=this.getOrCreateFilterWrapper(s);n?i.push(this.setModelOnFilterWrapper(n.filterPromise,e[t])):h("setFilterModel() - unable to fully apply model, unable to create filter for colId: "+t)}))}else this.allColumnFilters.forEach((e=>{i.push(this.setModelOnFilterWrapper(e.filterPromise,null))}));an.all(i).then((()=>{const e=this.getFilterModel(!0),i=[];this.allColumnFilters.forEach(((t,n)=>{E(s?s[n]:null,e?e[n]:null)||i.push(t.column)})),i.length>0&&this.filterManager?.onFilterChanged({columns:i,source:t})}))}setModelOnFilterWrapper(e,t){return new an((i=>{e.then((e=>{"function"!==typeof e.setModel&&(h("filter missing setModel method, which is needed for setFilterModel"),i()),(e.setModel(t)||an.resolve()).then((()=>i()))}))}))}getFilterModel(e){const t={},{allColumnFilters:i,initialFilterModel:s}=this;return i.forEach(((e,i)=>{const s=this.getModelFromFilterWrapper(e);w(s)&&(t[i]=s)})),e||Object.entries(s).forEach((e=>{let[s,n]=e;w(n)&&!i.has(s)&&this.columnModel.getCol(s)?.isFilterAllowed()&&(t[s]=n)})),t}getModelFromFilterWrapper(e){const{filter:t}=e;return t?"function"!==typeof t.getModel?(h("filter API missing getModel method, which is needed for getFilterModel"),null):t.getModel():this.getModelFromInitialState(e.column)}getModelFromInitialState(e){return this.initialFilterModel[e.getColId()]??null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){return!!this.allColumnFilters.size&&(this.allColumnFilters.forEach((e=>this.disposeFilterWrapper(e,"advancedFilterEnabled"))),!0)}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){const e=!!Q(this.gos),t=t=>{if(!t.isPrimary())return!0;const i=!this.columnModel.isPivotActive();return!(!t.isValueActive()||!i)&&(!!this.columnModel.isPivotMode()||e)},i=[],s=[];return this.forEachColumnFilter(((e,n)=>{const r=(e=>!!e&&(e.isFilterActive?e.isFilterActive():(h("Filter is missing isFilterActive() method"),!1)))(e);r&&(t(n.column)?i.push(e):s.push(e))})).then((()=>{this.activeAggregateFilters=i,this.activeColumnFilters=s}))}updateFilterFlagInColumns(e,t){return this.forEachColumnFilter(((i,s)=>s.column.setFilterActive(i.isFilterActive(),e,t)))}forEachColumnFilter(e){return an.all(Array.from(this.allColumnFilters.values()).map((t=>t.filterPromise.then((i=>e(i,t))))))}doColumnFiltersPass(e,t,i){const{data:s,aggData:n}=e,r=i?this.activeAggregateFilters:this.activeColumnFilters,o=i?n:s;for(let a=0;a<r.length;a++){const i=r[a];if(null!=i&&i!==t){if("function"!==typeof i.doesFilterPass)throw new Error("Filter is missing method doesFilterPass");if(!i.doesFilterPass({node:e,data:o}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(e){const t=()=>this.filterManager?.onFilterChanged(e);this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t()}updateBeforeFilterChanged(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{filterInstance:t,additionalEventAttributes:i}=e;return this.updateDependentFilters(),this.updateActiveFilters().then((()=>this.updateFilterFlagInColumns("filterChanged",i).then((()=>{this.allColumnFilters.forEach((e=>{e.filterPromise&&e.filterPromise.then((e=>{e&&e!==t&&e.onAnyFilterChanged&&e.onAnyFilterChanged()}))})),this.processingFilterChange=!0}))))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){this.forEachColumnFilter((e=>{e.onNewRowsLoaded&&e.onNewRowsLoaded()})).then((()=>this.updateFilterFlagInColumns(e,{afterDataChange:!0}))).then((()=>this.updateActiveFilters()))}createValueGetter(e){return t=>{let{node:i}=t;return this.valueService.getValue(e,i,!0)}}createGetValue(e){return(t,i)=>{const s=i?this.columnModel.getCol(i):e;return s?this.valueService.getValue(s,t,!0):void 0}}isFilterActive(e){const{filter:t}=this.cachedFilter(e)??{};return t?t.isFilterActive():null!=this.getModelFromInitialState(e)}getOrCreateFilterWrapper(e){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;if(ye(this.gos))t="agSetColumnFilter";else{const i=this.dataTypeService?.getBaseDataType(e);t="number"===i?"agNumberColumnFilter":"date"===i||"dateString"===i?"agDateColumnFilter":"agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;if(ye(this.gos))t="agSetColumnFloatingFilter";else{const i=this.dataTypeService?.getBaseDataType(e);t="number"===i?"agNumberColumnFloatingFilter":"date"===i||"dateString"===i?"agDateColumnFloatingFilter":"agTextColumnFloatingFilter"}return t}createFilterInstance(e,t){const i=this.getDefaultFilter(e),s=e.getColDef();let n;const r={...this.createFilterParams(e,s),filterModifiedCallback:()=>this.filterModifiedCallbackFactory(n,e)(),filterChangedCallback:t=>this.filterChangedCallbackFactory(n,e)(t),doesRowPassOtherFilter:e=>!this.filterManager||this.filterManager.doesRowPassOtherFilters(n,e)},o=this.userComponentFactory.getFilterDetails(s,r,i);return o?{filterPromise:()=>{const e=o.newAgStackInstance();return null!=e&&e.then((e=>{n=e,t&&(t.filter=e)})),e},compDetails:o}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return this.gos.addGridCommonParams({column:e,colDef:tt(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e){const t={column:e,filterPromise:null,compiledElement:null,compDetails:null},{filterPromise:i,compDetails:s}=this.createFilterInstance(e,t);return t.filterPromise=i?.()??null,t.compDetails=s,t}onColumnsChanged(){const e=[];this.allColumnFilters.forEach(((t,i)=>{let s;s=t.column.isPrimary()?this.columnModel.getColDefCol(i):this.columnModel.getCol(i),s&&s===t.column||(e.push(t.column),this.disposeFilterWrapper(t,"columnChanged"),this.disposeColumnListener(i))}));const t=e.every((e=>"agGroupColumnFilter"===e.getColDef().filter));e.length>0&&!t?this.filterManager?.onFilterChanged({columns:e,source:"api"}):this.updateDependentFilters()}updateDependentFilters(){const e=this.columnModel.getAutoCols();e?.forEach((e=>{"agGroupColumnFilter"===e.getColDef().filter&&this.getOrCreateFilterWrapper(e)}))}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const{filter:t}=this.allColumnFilters.get(e.getColId())??{};return!t||("function"!==typeof t?.isFilterAllowed||t.isFilterAllowed())}getFloatingFilterCompDetails(e,t){const i=t=>{const i=this.getOrCreateFilterWrapper(e)?.filterPromise;null!=i&&i.then((e=>{t(Tn(e))}))},s=e.getColDef(),n={...this.createFilterParams(e,s),filterChangedCallback:()=>i((t=>this.filterChangedCallbackFactory(t,e)()))},r=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(s,Sn,n);let o=Zr(this.frameworkOverrides,s,(()=>this.getDefaultFloatingFilter(e)));null==o&&(o="agReadOnlyFloatingFilter");const a={column:e,filterParams:r,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(s,a,o)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";const i=e.getColId(),s=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialFilterModel[i],s&&(this.disposeFilterWrapper(s,t),this.filterManager?.onFilterChanged({columns:[e],source:"api"}))}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){e.filterPromise.then((i=>{this.destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventService.dispatchEvent({type:"filterDestroyed",source:t,column:e.column})}))}filterModifiedCallbackFactory(e,t){return()=>{this.eventService.dispatchEvent({type:"filterModified",column:t,filterInstance:e})}}filterChangedCallbackFactory(e,t){return i=>{const s={filter:e,additionalEventAttributes:i,columns:[t],source:i?.source??"columnFilter"};this.callOnFilterChangedOutsideRenderCycle(s)}}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const i=t.column,{compDetails:s}=i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,s))return void this.destroyFilter(i,"paramsUpdated");const n=i.getColDef().filterParams;t.filterPromise?t.filterPromise.then((e=>{!1===(!e?.refresh||e.refresh({...this.createFilterParams(i,i.getColDef()),filterModifiedCallback:this.filterModifiedCallbackFactory(e,i),filterChangedCallback:this.filterChangedCallbackFactory(e,i),doesRowPassOtherFilter:t=>!this.filterManager||this.filterManager.doesRowPassOtherFilters(e,t),...n}))&&this.destroyFilter(i,"paramsUpdated")})):this.destroyFilter(i,"paramsUpdated")}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListeners(e,{colDefChanged:()=>this.checkDestroyFilter(i)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:s}=t;return!(i===s||i?.render&&s?.render&&i.render===s.render)}hasFloatingFilters(){return this.columnModel.getCols().some((e=>e.getColDef().floatingFilter))}getFilterInstance(e,t){t&&this.getFilterInstanceImpl(e).then((e=>{const i=Tn(e);t(i)}))}getColumnFilterInstance(e){return new Promise((t=>{this.getFilterInstanceImpl(e).then((e=>{t(Tn(e))}))}))}getFilterInstanceImpl(e){const t=this.columnModel.getColDefCol(e);if(!t)return an.resolve(void 0);const i=this.getOrCreateFilterWrapper(t)?.filterPromise;return i??an.resolve(null)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach((e=>{let{model:t,source:i}=e;return this.setFilterModel(t,i)})),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach((e=>{let{key:t,model:i,resolve:s}=e;this.setColumnFilterModel(t,i).then((()=>s()))})),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){if(this.dataTypeService?.isPendingInference()){let i=()=>{};const s=new Promise((e=>{i=e}));return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:i}),s}const i=this.columnModel.getColDefCol(e),s=i?this.getOrCreateFilterWrapper(i):null;return s?(n=this.setModelOnFilterWrapper(s.filterPromise,t),new Promise((e=>{n.then((t=>e(t)))}))):Promise.resolve();var n}getFilterWrapper(e){const t=this.columnModel.getColDefCol(e);return t?this.cachedFilter(t)??null:null}setColDefPropertiesForDataType(e,t,i){const s=ye(this.gos),n=this.localeService.getLocaleTextFunc(),r=t=>{const{filterParams:i}=e;e.filterParams="object"===typeof i?{...i,...t}:t};switch(t.baseDataType){case"number":s&&r({comparator:(e,t)=>{const i=null==e?0:parseInt(e),s=null==t?0:parseInt(t);return i===s?0:i>s?1:-1}});break;case"boolean":r(s?{valueFormatter:e=>w(e.value)?n(String(e.value),e.value?"True":"False"):n("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>!1===t,numberOfInputs:0}]});break;case"date":s&&r({valueFormatter:e=>{const t=i(e);return w(t)?t:n("blanks","(Blanks)")},treeList:!0,treeListFormatter:(e,t)=>{if(1===t&&null!=e){const t=Qr[Number(e)-1];return n(t,qr[t])}return e??n("blanks","(Blanks)")}});break;case"dateString":{const e=t.dateParser;r(s?{valueFormatter:e=>{const t=i(e);return w(t)?t:n("blanks","(Blanks)")},treeList:!0,treeListPathGetter:t=>{const i=e(t??void 0);return i?[String(i.getFullYear()),String(i.getMonth()+1),String(i.getDate())]:null},treeListFormatter:(e,t)=>{if(1===t&&null!=e){const t=Qr[Number(e)-1];return n(t,qr[t])}return e??n("blanks","(Blanks)")}}:{comparator:(t,i)=>{const s=e(i);return null==i||s<t?-1:s>t?1:0}});break}case"object":s?r({valueFormatter:e=>{const t=i(e);return w(t)?t:n("blanks","(Blanks)")}}):e.filterValueGetter=e=>i({column:e.column,node:e.node,value:this.valueService.getValue(e.column,e.node)})}}destroy(){super.destroy(),this.allColumnFilters.forEach((e=>this.disposeFilterWrapper(e,"gridDestroyed"))),this.allColumnListeners.clear()}}],dependantModules:[io]},ro={version:Yr,moduleName:"@ag-grid-community/column-filter-api",apiFunctions:{isColumnFilterPresent:function(e){return!!e.filterManager?.isColumnFilterPresent()||!!e.filterManager?.isAggregateFilterPresent()},getFilterInstance:function(e,t,i){return e.filterManager?.getFilterInstance(t,i)},getColumnFilterInstance:function(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)},destroyFilter:function(e,t){const i=e.columnModel.getColDefCol(t);if(i)return e.filterManager?.destroyFilter(i,"api")},setFilterModel:function(e,t){e.frameworkOverrides.wrapIncoming((()=>e.filterManager?.setFilterModel(t)))},getFilterModel:function(e){return e.filterManager?.getFilterModel()??{}},getColumnFilterModel:function(e,t){return e.filterManager?.getColumnFilterModel(t)??null},setColumnFilterModel:function(e,t,i){return e.filterManager?.setColumnFilterModel(t,i)??Promise.resolve()},showColumnFilter:function(e,t){const i=e.columnModel.getCol(t);i?e.menuService.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"}):c(`column '${t}' not found`)}},dependantModules:[no,so]},oo={version:Yr,moduleName:"@ag-grid-community/floating-filter-core",controllers:[{name:"headerFilterCell",classImp:class extends Kr{constructor(e,t,i){super(e,t,i),this.iconCreated=!1,this.column=e}setComp(e,t,i,s,n){this.comp=e,n=Yt(this,this.beans.context,n),this.eButtonShowMainFilter=i,this.eFloatingFilterBody=s,this.setGui(t,n),this.setupActive(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n),n.addManagedListeners(this.column,{colDefChanged:()=>this.onColDefChanged(n)}),n.addDestroyFunc((()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()}))}resizeHeader(){}moveHeader(){}setupActive(){const e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=Ps("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new tr(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.localeService.getLocaleTextFunc();di(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(K(this.gos)===this.eGui)return;const t=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(t)return this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),void t.focus();const i=this.findNextColumnWithFloatingFilter(e.shiftKey);i&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:i},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleColsService;let i=this.column;do{if(i=e?t.getColBefore(i):t.getColAfter(i),!i)break}while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case js.UP:case js.DOWN:t||e.preventDefault();case js.LEFT:case js.RIGHT:if(t)return;e.stopPropagation();case js.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case js.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&Zi(e.relatedTarget,"ag-floating-filter");if(t&&i&&e.target===this.eGui){const e=this.lastFocusEvent,t=!(!e||e.key!==js.TAB);if(e&&t){const t=e.shiftKey;this.focusService.focusInto(this.eGui,t)}}const s=this.getRowIndex();this.beans.focusService.setFocusedHeader(s,this.column)}setupHover(e){e.createManagedBean(new $r([this.column],this.eGui));const t=()=>{if(!this.gos.get("columnHoverHighlight"))return;const e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};e.addManagedEventListeners({columnHoverChanged:t}),t()}setupLeft(e){const t=new Vr(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){if(!this.active)return;const e=this.beans.filterManager?.getFloatingFilterCompDetails(this.column,(()=>this.showParentFilter()));e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{filterManager:t}=this.beans,i=e=>{if("filterDestroyed"===e?.source&&!this.isAlive())return;const i=this.comp.getFloatingFilterComp();i&&i.then((i=>{if(i){const s=t?.getCurrentFloatingFilterParentModel(this.column),n=e?{...e,columns:e.columns??[],source:"api"===e.source?"api":"columnFilter"}:null;i.onParentModelChanged(s,n)}}))};[this.destroySyncListener]=e.addManagedListeners(this.column,{filterChanged:i}),t?.isFilterActive(this.column)&&i(null)}setupWidth(e){const t=()=>{const e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const i=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const s=this.active?this.beans.filterManager?.getFloatingFilterCompDetails(this.column,(()=>this.showParentFilter())):null,n=this.comp.getFloatingFilterComp();n&&s?n.then((t=>{!t||this.beans.filterManager?.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,i):this.updateFloatingFilterParams(s)})):this.updateCompDetails(e,s,i)}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e){if(!e)return;const t=e.params;this.comp.getFloatingFilterComp()?.then((e=>{let i=!1;if(e?.refresh&&"function"===typeof e.refresh){null!==e.refresh(t)&&(i=!0)}if(!i&&e?.onParamsUpdated&&"function"===typeof e.onParamsUpdated){null!==e.onParamsUpdated(t)&&h("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}}))}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}}}],dependantModules:[no]},ao={version:Yr,moduleName:"@ag-grid-community/floating-filter",dependantModules:[oo,no]},lo={version:Yr,moduleName:"@ag-grid-community/read-only-floating-filter",userComponents:[{name:"agReadOnlyFloatingFilter",classImp:class extends Rs{constructor(){super('\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>\n            </div>',[vr]),this.eFloatingFilterText=Is}wireBeans(e){this.columnNameService=e.columnNameService}destroy(){super.destroy()}init(e){this.params=e;const t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){null!=e?this.params.parentFilterInstance((t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})):this.eFloatingFilterText.setValue("")}onParamsUpdated(e){this.refresh(e)}refresh(e){this.init(e)}}}],dependantModules:[oo]},ho={version:Yr,moduleName:"@ag-grid-community/simple-floating-filter",dependantModules:[{version:Yr,moduleName:"@ag-grid-community/simple-filter",dependantModules:[no],userComponents:[{name:"agTextColumnFilter",classImp:class extends ur{constructor(){super("textFilter"),this.defaultFormatter=e=>e,this.defaultLowercaseFormatter=e=>null==e?null:e.toString().toLowerCase(),this.defaultMatcher=e=>{let{filterOption:t,value:i,filterText:s}=e;if(null==s)return!1;switch(t){case"contains":return i.indexOf(s)>=0;case"notContains":return i.indexOf(s)<0;case"equals":return i===s;case"notEqual":return i!=s;case"startsWith":return 0===i.indexOf(s);case"endsWith":{const e=i.lastIndexOf(s);return e>=0&&e===i.length-s.length}default:return!1}},this.eValuesFrom=[],this.eValuesTo=[]}getDefaultDebounceMs(){return 500}setParams(e){this.textFilterParams=e,super.setParams(e),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?this.defaultFormatter:this.defaultLowercaseFormatter),this.filterModelFormatter=new Dr(this.localeService,this.optionsFactory)}getTextMatcher(){const e=this.textFilterParams.textCustomComparator;return e?(h("textCustomComparator is deprecated, use textMatcher instead."),t=>{let{filterOption:i,value:s,filterText:n}=t;return e(i,s,n)}):this.textFilterParams.textMatcher||this.defaultMatcher}createCondition(e){const t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},s=this.getValuesWithSideEffects(e,!0);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}getFilterType(){return"text"}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getValues(e){return this.getValuesWithSideEffects(e,!1)}getValuesWithSideEffects(e,t){const i=[];return this.forEachPositionInput(e,((e,s,n,r)=>{if(s<r){let s=S(e.getValue());t&&this.textFilterParams.trimInput&&(s=Ir(s)??null,e.setValue(s,!0)),i.push(s)}})),i}getDefaultFilterOptions(){return Mr}createValueElement(){const e=document.createElement("div");return e.classList.add("ag-filter-body"),ci(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,i){const s=this.createManagedBean(new fr);s.addCssClass(`ag-filter-${i}`),s.addCssClass("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}mapValuesFromModel(e){const{filter:t,filterTo:i,type:s}=e||{};return[t||null,i||null].slice(0,this.getNumberOfInputs(s))}evaluateNullValue(e){return!!e&&["notEqual","notContains","blank"].indexOf(e)>=0}evaluateNonNullValue(e,t,i,s){const n=e.map((e=>this.formatter(e)))||[],r=this.formatter(t),{api:o,colDef:a,column:l,context:h,textFormatter:c}=this.textFilterParams;if("blank"===i.type)return this.isBlank(t);if("notBlank"===i.type)return!this.isBlank(t);const d={api:o,colDef:a,column:l,context:h,node:s.node,data:s.data,filterOption:i.type,value:r,textFormatter:c};return n.some((e=>this.matcher({...d,filterText:e})))}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}}},{name:"agNumberColumnFilter",classImp:class extends pr{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(e){return this.numberFilterParams.allowedCharPattern===e.allowedCharPattern&&super.refresh(e)}mapValuesFromModel(e){const{filter:t,filterTo:i,type:s}=e||{};return[this.processValue(t),this.processValue(i)].slice(0,this.getNumberOfInputs(s))}getDefaultDebounceMs(){return 500}comparator(){return(e,t)=>e===t?0:e<t?1:-1}setParams(e){this.numberFilterParams=e,super.setParams(e),this.filterModelFormatter=new br(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return Sr}setElementValue(e,t,i){const s=!i&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(t??null):t;super.setElementValue(e,s)}createValueElement(){const e=xr(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),ci(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,i,s){const n=this.createManagedBean(s?new fr({allowedCharPattern:s}):new yr);n.addCssClass(`ag-filter-${i}`),n.addCssClass("ag-filter-filter"),t.push(n),e.appendChild(n.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}getValues(e){const t=[];return this.forEachPositionInput(e,((e,i,s,n)=>{i<n&&t.push(this.processValue(this.stringToFloat(e.getValue())))})),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getFilterType(){return"number"}processValue(e){return null==e||isNaN(e)?null:e}stringToFloat(e){if("number"===typeof e)return e;let t=S(e);return null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)}createCondition(e){const t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},s=this.getValues(e);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}hasInvalidInputs(){let e=!1;return this.forEachInput((t=>{t.getInputElement().validity.valid||(e=!0)})),e}}},{name:"agDateColumnFilter",classImp:class extends pr{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=Br,this.minValidDate=null,this.maxValidDate=null}wireBeans(e){super.wireBeans(e),this.context=e.context,this.userComponentFactory=e.userComponentFactory}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}mapValuesFromModel(e){const{dateFrom:t,dateTo:i,type:s}=e||{};return[t&&kr(t)||null,i&&kr(i)||null].slice(0,this.getNumberOfInputs(s))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(e,t){return null==t||t<e?-1:t>e?1:0}setParams(e){this.dateFilterParams=e,super.setParams(e);const t=(t,i)=>{if(null!=e[t]){if(!isNaN(e[t]))return null==e[t]?i:Number(e[t]);h(`DateFilter ${t} is not a number`)}return i};this.minValidYear=t("minValidYear",1e3),this.maxValidYear=t("maxValidYear",Br),this.minValidYear>this.maxValidYear&&h("DateFilter minValidYear should be <= maxValidYear"),e.minValidDate?this.minValidDate=e.minValidDate instanceof Date?e.minValidDate:kr(e.minValidDate):this.minValidDate=null,e.maxValidDate?this.maxValidDate=e.maxValidDate instanceof Date?e.maxValidDate:kr(e.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&h("DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new Gr(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(e){const t=new Nr(this.context,this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},e);return this.addDestroyFunc((()=>t.destroy())),t}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}getDefaultFilterOptions(){return Or}createValueElement(){const e=j(this.gos).createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,s){const n=j(this.gos).createElement("div");n.classList.add(`ag-filter-${s}`),n.classList.add(`ag-filter-date-${s}
2`),t.push(n),e.appendChild(n),i.push(this.createDateCompWrapper(n))}removeValueElements(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),this.removeItems(this.eConditionPanelsFrom,e,t),this.removeItems(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){this.removeItems(e,t,i).forEach((e=>e.destroy()))}isValidDateValue(e){if(null===e)return!1;if(this.minValidDate){if(e<this.minValidDate)return!1}else if(e.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(e>this.maxValidDate)return!1}else if(e.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput(((i,s,n,r)=>{n!==e||!t||s>=r||(t=t&&this.isValidDateValue(i.getDate()))})),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}getFilterType(){return"date"}createCondition(e){const t=this.getConditionType(e),i={},s=this.getValues(e);return s.length>0&&(i.dateFrom=Pr(s[0])),s.length>1&&(i.dateTo=Pr(s[1])),{dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t,...i}}resetPlaceholder(){const e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput((e=>{e.setInputPlaceholder(t),e.setInputAriaLabel(i)}))}getInputs(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,((e,i,s,n)=>{i<n&&t.push(e.getDate())})),t}translate(e){return"lessThan"===e?super.translate("before"):"greaterThan"===e?super.translate("after"):super.translate(e)}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}}},{name:"agDateInput",classImp:class extends Rs{constructor(){super('\n            <div class="ag-filter-filter">\n                <ag-input-text-field class="ag-date-filter" data-ref="eDateInput"></ag-input-text-field>\n            </div>',[vr]),this.eDateInput=Is}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus()},input:e=>{e.target===K(this.gos)&&(this.eDateInput.isDisabled()||this.params.onDateChanged())}})}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&Fi(),t.type=i?"date":"text";const{minValidYear:s,maxValidYear:n,minValidDate:r,maxValidDate:o}=e.filterParams||{};if(r&&s&&h("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),o&&n&&h("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),r&&o){const[e,t]=[r,o].map((e=>e instanceof Date?e:kr(e)));e&&t&&e.getTime()>t.getTime()&&h("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}r?r instanceof Date?t.min=Fr(r):t.min=r:s&&(t.min=`${s}-01-01`),o?o instanceof Date?t.max=Fr(o):t.max=o:n&&(t.max=`${n}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return kr(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(Pr(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()}shouldUseBrowserDatePicker(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:Ni()||Oi()||Fi()&&ki()>=14.1}}}]},oo],userComponents:[{name:"agTextColumnFloatingFilter",classImp:class extends eo{init(e){super.init(e),this.filterModelFormatter=new Dr(this.localeService,this.optionsFactory)}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return Mr}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new Jr)}}},{name:"agNumberColumnFloatingFilter",classImp:class extends eo{init(e){super.init(e),this.filterModelFormatter=new br(this.localeService,this.optionsFactory,e.filterParams?.numberFormatter)}onParamsUpdated(e){this.refresh(e)}refresh(e){xr(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return Sr}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return this.allowedCharPattern=xr(e.filterParams),this.allowedCharPattern?this.createManagedBean(new Jr({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new to)}}},{name:"agDateColumnFloatingFilter",classImp:class extends Xr{constructor(){super('\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field data-ref="eReadOnlyText"></ag-input-text-field>\n                <div data-ref="eDateWrapper" style="display: flex;"></div>\n            </div>',[vr]),this.eReadOnlyText=Is,this.eDateWrapper=Is}wireBeans(e){super.wireBeans(e),this.context=e.context,this.userComponentFactory=e.userComponentFactory}getDefaultFilterOptions(){return Or}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new Gr(this.filterParams,this.localeService,this.optionsFactory);const t=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){if(e){const t=e;this.dateComp.setDate(kr(t.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Ki(this.eDateWrapper,e),Ki(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){const e=Pr(this.dateComp.getDate());this.params.parentFilterInstance((t=>{if(t){const i=kr(e);t.onFloatingFilterChanged(this.getLastType()||null,i)}}))}getDateComponentParams(){const e=sr(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:f(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new Nr(this.context,this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,(e=>{e.setInputAriaLabel(this.getAriaLabel(this.params))}
vendor: 37,878 bytes, line 2
2)),this.addDestroyFunc((()=>this.dateComp.destroy()))}updateDateComponent(){const e=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}getFilterModelFormatter(){return this.filterModelFormatter}}}]},co={version:Yr,moduleName:"@ag-grid-community/quick-filter-core",beans:[class extends ze{constructor(){super(...arguments),this.beanName="quickFilterService",this.quickFilter=null,this.quickFilterParts=null}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.rowModel=e.rowModel,this.pivotResultColsService=e.pivotResultColsService}postConstruct(){const e=this.resetQuickFilterCache.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}}),this.addManagedPropertyListener("quickFilterText",(e=>this.setQuickFilter(e.currentValue))),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],(()=>this.onQuickFilterColumnConfigChanged())),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],(()=>this.setQuickFilterParserAndMatcher()))}refreshQuickFilterCols(){const e=this.columnModel.isPivotMode(),t=this.columnModel.getAutoCols(),i=this.columnModel.getColDefCols();let s=(e&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?this.pivotResultColsService.getPivotResultCols()?.list:i)??[];t&&(s=s.concat(t)),this.colsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?s:s.filter((e=>e.isVisible()||e.isRowGroupActive()))}isQuickFilterPresent(){return null!==this.quickFilter}doesRowPassQuickFilter(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(t,e):this.quickFilterParts.every((i=>t?this.doesRowPassQuickFilterCache(e,i):this.doesRowPassQuickFilterNoCache(e,i)))}resetQuickFilterCache(){this.rowModel.forEachNode((e=>e.quickFilterAggregateText=null))}setQuickFilterParts(){const{quickFilter:e,parser:t}=this;this.quickFilterParts=e?t?t(e):e.split(" "):null}parseQuickFilter(e){return w(e)?L(this.gos)?e.toUpperCase():(h("Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(e){if(null!=e&&"string"!==typeof e)return void h("Grid option quickFilterText only supports string inputs, received: "+typeof e);const t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setQuickFilterParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setQuickFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onQuickFilterColumnConfigChanged(){this.refreshQuickFilterCols(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassQuickFilterNoCache(e,t){return this.colsForQuickFilter.some((i=>{const s=this.getQuickFilterTextForColumn(i,e);return w(s)&&s.indexOf(t)>=0}))}doesRowPassQuickFilterCache(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassQuickFilterMatcher(e,t){let i;e?(this.checkGenerateQuickFilterAggregateText(t),i=t.quickFilterAggregateText):i=this.getQuickFilterAggregateText(t);const{quickFilterParts:s,matcher:n}=this;return n(s,i)}checkGenerateQuickFilterAggregateText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))}getQuickFilterTextForColumn(e,t){let i=this.valueService.getValue(e,t,!0);const s=e.getColDef();if(s.getQuickFilterText){const n=this.gos.addGridCommonParams({value:i,node:t,data:t.data,column:e,colDef:s});i=s.getQuickFilterText(n)}return w(i)?i.toString().toUpperCase():null}getQuickFilterAggregateText(e){const t=[];return this.colsForQuickFilter.forEach((i=>{const s=this.getQuickFilterTextForColumn(i,e);w(s)&&t.push(s)})),t.join("\n")}}],dependantModules:[io]},uo={version:Yr,moduleName:"@ag-grid-community/filter",dependantModules:[ho,lo,{version:Yr,moduleName:"@ag-grid-community/quick-filter",dependantModules:[co,{version:Yr,moduleName:"@ag-grid-community/quick-filter-api",apiFunctions:{isQuickFilterPresent:function(e){return!!e.filterManager?.isQuickFilterPresent()},getQuickFilter:function(e){return e.gos.get("quickFilterText")},resetQuickFilter:function(e){e.filterManager?.resetQuickFilterCache()}},dependantModules:[co]}]},ro]},po=class extends Rs{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},go=class extends po{constructor(e){super('<div class="ag-header-cell ag-floating-filter" role="gridcell">\n            <div data-ref="eFloatingFilterBody" role="presentation"></div>\n            <div class="ag-floating-filter-button ag-hidden" data-ref="eButtonWrapper" role="presentation">\n                <button type="button" class="ag-button ag-floating-filter-button-button" data-ref="eButtonShowMainFilter" tabindex="-1"></button>\n            </div>\n        </div>',e),this.eFloatingFilterBody=Is,this.eButtonWrapper=Is,this.eButtonShowMainFilter=Is}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveBodyCssClass:(e,t)=>this.eFloatingFilterBody.classList.toggle(e,t),setButtonWrapperDisplayed:e=>Ki(this.eButtonWrapper,e),setCompDetails:e=>this.setCompDetails(e),getFloatingFilterComp:()=>this.compPromise,setWidth:t=>e.style.width=t,setMenuIcon:e=>this.eButtonShowMainFilter.appendChild(e)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=e.newAgStackInstance(),this.compPromise.then((e=>this.afterCompCreated(e)))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){e&&(this.isAlive()?(this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()):this.destroyBean(e))}},mo=class extends po{constructor(e){super('<div class="ag-header-cell" role="columnheader">\n            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>\n        </div>',e),this.eResize=Is,this.eHeaderCompWrapper=Is,this.headerCompVersion=0,this.column=e.getColumnGroupChild(),this.pinned=e.getPinned()}postConstruct(){const e=this.getGui();var t,i;t="col-id",null!=(i=this.column.getColId())&&""!=i?e.setAttribute(t,i):e.removeAttribute(t);const s={setWidth:t=>e.style.width=t,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setAriaSort:t=>t?Ei(e,t):Ai(e),setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(s,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);const n=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",n)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then((e=>this.afterCompCreated(t,e)))}afterCompCreated(e,t){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(t)}},fo=class extends po{constructor(e){super('<div class="ag-header-group-cell" role="columnheader">\n            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>\n            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n        </div>',e),this.eResize=Is,this.eHeaderCompWrapper=Is}postConstruct(){const e=this.getGui();e.setAttribute("col-id",this.ctrl.getColId());const t={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setHeaderWrapperHidden:e=>{e?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:e=>{null!=e?this.eHeaderCompWrapper.style.setProperty("max-height",`${e}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",null!=e)},setResizableDisplayed:e=>Ki(this.eResize,e),setWidth:t=>e.style.width=t,setAriaExpanded:t=>{return i="aria-expanded",void 0!=(s=t)?e.setAttribute(i,s):e.removeAttribute(i);var i,s},setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(t,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then((e=>this.afterHeaderCompCreated(e)))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive())return void t();const i=this.getGui(),s=e.getGui();this.eHeaderCompWrapper.appendChild(s),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}addOrRemoveHeaderWrapperStyle(e,t){const{eHeaderCompWrapper:i}=this;t?i.style.setProperty(e,t):i.style.removeProperty(e)}},vo=(e=>(e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter",e))(vo||{}),yo=class extends Rs{constructor(e){super(),this.headerComps={},this.ctrl=e,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}postConstruct(){Mi(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:e=>this.getGui().style.height=e,setTop:e=>this.getGui().style.top=e,setHeaderCtrls:(e,t)=>this.setHeaderCtrls(e,t),setWidth:e=>this.getGui().style.width=e};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;if(this.headerComps={},e.forEach((e=>{const t=e.instanceId;let s=i[t];delete i[t],null==s&&(s=this.createHeaderComp(e),this.getGui().appendChild(s.getGui())),this.headerComps[t]=s})),et(i,((e,t)=>{this.getGui().removeChild(t.getGui()),this.destroyBean(t)})),t){const e=st(this.headerComps);e.sort(((e,t)=>e.getCtrl().getColumnGroupChild().getLeft()-t.getCtrl().getColumnGroupChild().getLeft()));const t=e.map((e=>e.getGui()));ds(this.getGui(),t)}}createHeaderComp(e){let t;switch(this.ctrl.getType()){case"group":t=new fo(e);break;case"filter":t=new go(e);break;default:t=new mo(e)}return this.createBean(t),t.setParentComponent(this),t}},Co=class extends ze{constructor(){super(...arguments),this.beanName="headerNavigationService",this.currentHeaderRowWithoutSpan=-1}wireBeans(e){this.focusService=e.focusService,this.headerPositionUtils=e.headerPositionUtils,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.visibleColService=e.visibleColsService}postConstruct(){this.ctrlsService.whenReady(this,(e=>{this.gridBodyCon=e.gridBodyCtrl}));const e=j(this.gos);this.addManagedElementListeners(e,{mousedown:()=>this.setCurrentHeaderRowWithoutSpan(-1)})}getHeaderRowCount(){return this.ctrlsService.getHeaderRowContainerCtrl()?.getRowCount()??0}getHeaderPositionForColumn(e,t){let i;if("string"===typeof e?(i=this.columnModel.getCol(e),i||(i=this.visibleColService.getColumnGroup(e))):i=e,!i)return null;const s=this.ctrlsService.getHeaderRowContainerCtrl(),n=s?.getAllCtrls(),r="filter"===Se(n||[]).getType(),o=this.getHeaderRowCount()-1;let a=-1,l=i;for(;l;)a++,l=l.getParent();let h=a;return t&&r&&h===o-1&&h++,-1===h?null:{headerRowIndex:h,column:i}}navigateVertically(e,t,i){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;const{headerRowIndex:s}=t,n=t.column,r=this.getHeaderRowCount(),o=0===e;let{headerRowIndex:a,column:l,headerRowIndexWithoutSpan:h}=o?this.headerPositionUtils.getColumnVisibleParent(n,s):this.headerPositionUtils.getColumnVisibleChild(n,s),c=!1;return a<0&&(a=0,l=n,c=!0),a>=r?(a=-1,this.setCurrentHeaderRowWithoutSpan(-1)):void 0!==h&&(this.currentHeaderRowWithoutSpan=h),!(!c&&!l)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a,column:l},allowUserOverride:!0,event:i})}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e}navigateHorizontally(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;const s=this.focusService.getFocusedHeader(),n=2===e,r=this.gos.get("enableRtl");let o,a;if(-1!==this.currentHeaderRowWithoutSpan?s.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=s.headerRowIndex,n!==r?(a="Before",o=this.headerPositionUtils.findHeader(s,a)):(a="After",o=this.headerPositionUtils.findHeader(s,a)),o||!t)return this.focusService.focusHeaderPosition({headerPosition:o,direction:a,fromTab:t,allowUserOverride:!0,event:i});if(t){const e=this.gos.getCallback("tabToNextHeader");if(e)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:e,headerPosition:o,direction:a})}return this.focusNextHeaderRow(s,a,i)}focusNextHeaderRow(e,t,i){const s=e.headerRowIndex;let n,r=null;if("Before"===t?s>0&&(n=s-1,this.currentHeaderRowWithoutSpan-=1,r=this.headerPositionUtils.findColAtEdgeForHeaderRow(n,"end")):(n=s+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),r=this.headerPositionUtils.findColAtEdgeForHeaderRow(n,"start")),!r)return!1;const{column:o,headerRowIndex:a}=this.headerPositionUtils.getHeaderIndexToFocus(r.column,r?.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:a},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"After";if(!e.getPinned()){if(kt(e)){const s=e.getDisplayedLeafColumns();t="Before"===i?Se(s):s[0]}else t=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(t)}}},So=class extends ze{wireBeans(e){this.animationFrameService=e.animationFrameService,this.headerNavigationService=e.headerNavigationService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService,this.filterManager=e.filterManager,this.menuService=e.menuService}setComp(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new tr(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),this.onPivotModeChanged(),this.setupHeaderHeight();const s=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:s}),this.mockContextMenuForIPad(s),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>this.animationFrameService.requestAnimationFrame((()=>e())),gridStylesChanged:e,advancedFilterEnabledChanged:e})}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){const{columnModel:e}=this;let t=0;const i=this.columnModel.getGroupRowsHeight().reduce(((e,t)=>e+t),0),s=this.columnModel.getColumnHeaderRowHeight();if(this.filterManager?.hasFloatingFilters()&&(t+=e.getFloatingFiltersHeight()),t+=i,t+=s,this.headerHeight===t)return;this.headerHeight=t;const n=`${t+1}px`;this.comp.setHeightAndMinHeight(n),this.eventService.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){const e=this.visibleColsService.getAllCols().some((e=>e.isSpanHeaderHeight()));this.comp.addOrRemoveCssClass("ag-header-allow-overflow",e)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey,s=i!==t?2:3;(this.headerNavigationService.navigateHorizontally(s,!0,e)||!i&&this.focusService.focusOverlay(!1)||this.focusService.focusNextGridCoreContainer(i,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;switch(e.key){case js.LEFT:t=2;case js.RIGHT:w(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e)&&e.preventDefault();break;case js.UP:t=0;case js.DOWN:w(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}}onFocusOut(e){const{relatedTarget:t}=e;!t&&this.eGui.contains(K(this.gos))||this.eGui.contains(t)||this.focusService.clearFocusedHeader()}onHeaderContextMenu(e,t,i){if(!e&&!i||!this.menuService.isHeaderContextMenuEnabled())return;const{target:s}=e??t;s!==this.eGui&&s!==this.ctrlsService.getHeaderRowContainerCtrl()?.getViewportElement()||this.menuService.showHeaderContextMenu(void 0,e,i)}mockContextMenuForIPad(e){if(!Bi())return;const t=new ks(this.eGui);this.addManagedListeners(t,{longTap:t=>{e(void 0,t.touchStart,t.touchEvent)}}),this.addDestroyFunc((()=>t.destroy()))}},wo=class extends ze{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super(),this.callback=e,this.addSpacer=t}wireBeans(e){this.visibleColsService=e.visibleColsService,this.scrollVisibleService=e.scrollVisibleService}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=k(this.gos,"print"),t=this.visibleColsService.getBodyContainerWidth(),i=this.visibleColsService.getColsLeftWidth(),s=this.visibleColsService.getDisplayedColumnsRightWidth();let n;if(e)n=t+i+s;else if(n=t,this.addSpacer){0===(this.gos.get("enableRtl")?i:s)&&this.scrollVisibleService.isVerticalScrollShowing()&&(n+=this.scrollVisibleService.getScrollbarWidth())}this.callback(n)}},bo=class extends ze{constructor(e){super(),this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}wireBeans(e){this.funcColsService=e.funcColsService}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach((e=>{e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?this.columnsToAggregate.push(e):e.isAllowRowGroup()?this.columnsToGroup.push(e):e.isAllowPivot()&&this.columnsToPivot.push(e)))}))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){this.columnsToAggregate.length>0&&this.funcColsService.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.funcColsService.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.funcColsService.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function xo(e){const{isFromHeader:t,fromLeft:i,xPosition:s,fromEnter:n,fakeEvent:r,pinned:o,gos:a,columnModel:l,columnMoveService:h,visibleColsService:c}=e;let{allMovingColumns:d}=e;if(t){const e=[];d.forEach((t=>{let i=null,s=t.getParent();for(;null!=s&&1===s.getDisplayedLeafColumns().length;)i=s,s=s.getParent();if(null!=i){(!!i.getColGroupDef()?.marryChildren?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns()).forEach((t=>{e.includes(t)||e.push(t)}))}else e.includes(t)||e.push(t)})),d=e}const u=d.slice();l.sortColsLikeCols(u);const p=function(e){const{movingCols:t,draggingRight:i,xPosition:s,pinned:n,gos:r,columnModel:o,visibleColsService:a}=e,l=r.get("suppressMovableColumns")||t.some((e=>e.getColDef().suppressMovable));if(l)return[];const h=function(e,t){switch(t){case"left":return e.getLeftCols();case"right":return e.getRightCols();default:return e.getCenterCols()}}(a,n),c=o.getCols(),d=h.filter((e=>Ee(t,e))),u=h.filter((e=>!Ee(t,e))),p=c.filter((e=>!Ee(t,e)));let g,m=0,f=s;if(i){let e=0;d.forEach((t=>e+=t.getActualWidth())),f-=e}if(f>0){for(let e=0;e<u.length;e++){if(f-=u[e].getActualWidth(),f<0)break;m++}i&&m++}if(m>0){const e=u[m-1];g=p.indexOf(e)+1}else g=p.indexOf(u[0]),-1===g&&(g=0);const v=[g],y=(e,t)=>e-t;if(i){let e=g+1;const t=c.length-1;for(;e<=t;)v.push(e),e++;v.sort(y)}else{let e=g;const t=c.length-1;let i=c[e];for(;e<=t&&h.indexOf(i)<0;)e++,v.push(e),i=c[e];e=g-1;const s=0;for(;e>=s;)v.push(e),e--;v.sort(y).reverse()}return v}({movingCols:u,draggingRight:i,xPosition:s,pinned:o,gos:a,columnModel:l,visibleColsService:c}),g=function(e,t){const i=t.getCols(),s=(o=e.map((e=>i.indexOf(e))),o.sort(((e,t)=>e-t))),n=s[0],r=Se(s);var o;return r-n!==s.length-1?null:n}(u,l);if(0===p.length)return;const m=p[0];let f=null!==g&&!n;if(t&&(f=null!==g),f&&!r){if(!i&&m>=g)return;if(i&&m<=g)return}const v=c.getAllCols(),y=[];let C=null;for(let w=0;w<p.length;w++){const e=p[w],t=h.getProposedColumnOrder(u,e);if(!h.doesOrderPassRules(t))continue;const i=t.filter((e=>v.includes(e)));if(null===C)C=i;else if(!we(i,C))break;const s=Do(t);y.push({move:e,fragCount:s})}if(0===y.length)return;y.sort(((e,t)=>e.fragCount-t.fragCount));const S=y[0].move;return S>l.getCols().length-d.length?void 0:{columns:d,toIndex:S}}function Mo(e){const{columns:t,toIndex:i}=xo(e)||{},{finished:s,columnMoveService:n}=e;return t&&null!=i?(n.moveColumns(t,i,"uiColumnMoved",s),s?null:{columns:t,toIndex:i}):null}function Do(e){function t(e){const t=[];let i=e.getOriginalParent();for(;null!=i;)t.push(i),i=i.getOriginalParent();return t}let i=0;for(let s=0;s<e.length-1;s++){let n=t(e[s]),r=t(e[s+1]);[n,r]=n.length>r.length?[n,r]:[r,n],n.forEach((e=>{-1===r.indexOf(e)&&i++}))}return i}function Io(e){const{pinned:t,fromKeyboard:i,gos:s,ctrlsService:n,useHeaderRow:r,skipScrollPadding:o}=e;let a=n.getHeaderRowContainerCtrl(t)?.getViewportElement(),{x:l}=e;return a?(i&&(l-=a.getBoundingClientRect().left),s.get("enableRtl")&&(r&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),null!=t||o||(l+=n.get("center").getCenterViewportScrollLeft()),l):0}function Ro(e,t){for(const i of e)i.setMoving(t,"uiColumnMoved")}var Eo=class extends ze{constructor(e){super(),this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!w(e)}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnMoveService=e.columnMoveService,this.dragAndDropService=e.dragAndDropService,this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,(e=>{this.gridBodyCon=e.gridBodyCtrl}))}getIconName(){const e=this.lastDraggingEvent?.dragItem.columns??[];for(const t of e){const e=t.getPinned();if(t.getColDef().lockPinned){if(e==this.pinned)return"move"}else{if(e===this.pinned||!this.pinned)return"move";if(!e&&this.pinned)return"pinned"}}return"notAllowed"}onDragEnter(e){const t=e.dragItem.columns;if(0===e.dragSource.type)this.setColumnsVisible(t,!0,"uiColumnDragged");else{const i=e.dragItem.visibleState,s=(t||[]).filter((e=>i[e.getId()]));this.setColumnsVisible(s,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(t,this.pinned),this.onDragging(e,!0,!0)}onDragging(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastDraggingEvent,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=this.gos.get("suppressMoveWhenColumnDragging");if(s&&!n)return void this.finishColumnMoving();if(this.lastDraggingEvent=e,!e||!s&&b(e.hDirection))return;const{pinned:r,gos:o,ctrlsService:a}=this,l=Io({x:e.x,pinned:r,gos:o,ctrlsService:a});t||this.checkCenterForScrolling(l),n?this.handleColumnDragWhileSuppressingMovement(e,t,i,l,s):this.handleColumnDragWhileAllowingMovement(e,t,i,l,s)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(!e)return;const s=e.filter((e=>!e.getColDef().lockVisible));this.columnModel.setColsVisible(s,t,i)}finishColumnMoving(){if(this.clearHighlighted(),!this.lastMovedInfo)return;const{columns:e,toIndex:t}=this.lastMovedInfo;this.columnMoveService.moveColumns(e,t,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,i,s,n){const r=this.getAllMovingColumns(e,!0);if(n){const e=this.isAttemptingToPin(r);e&&this.attemptToPinColumns(r,void 0,!0);const{fromLeft:s,xPosition:n}=this.getNormalisedXPositionInfo(r,e)||{};if(null==s||null==n)return void this.finishColumnMoving();this.moveColumnsAfterHighlight({allMovingColumns:r,xPosition:n,fromEnter:t,fakeEvent:i,fromLeft:s})}else{if(!this.dragAndDropService.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(r,s)}}handleColumnDragWhileAllowingMovement(e,t,i,s,n){const r=this.getAllMovingColumns(e),o=1===this.normaliseDirection(e.hDirection),a=1===e.dragSource.type,l=Mo({...this.getMoveColumnParams({allMovingColumns:r,isFromHeader:a,xPosition:s,fromLeft:o,fromEnter:t,fakeEvent:i}),finished:n});l&&(this.lastMovedInfo=l)}getAllMovingColumns(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=e.dragSource.getDragItem();let s=null;t?(s=i.columnsInSplit,s||(s=i.columns)):s=i.columns;return s?s.filter((e=>!e.getColDef().lockPinned||e.getPinned()==this.pinned)):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:i,xPosition:s,fromLeft:n,fromEnter:r,fakeEvent:o}=e,{pinned:a,gos:l,columnModel:h,columnMoveService:c,visibleColsService:d}=this;return{allMovingColumns:t,isFromHeader:i,fromLeft:n,xPosition:s,pinned:a,fromEnter:r,fakeEvent:o,gos:l,columnModel:h,columnMoveService:c,visibleColsService:d}}findFirstAndLastMovingColumns(e){const t=e.length;let i,s;for(let n=0;n<=t;n++){if(!i){const t=e[n];null!=t.getLeft()&&(i=t)}if(!s){const i=e[t-1-n];null!=i.getLeft()&&(s=i)}if(i&&s)break}return{firstMovingCol:i,lastMovingCol:s}}highlightHoveredColumn(e,t){const{gos:i,columnModel:s}=this,n=i.get("enableRtl"),r=s.getCols().filter((e=>e.isVisible()&&e.getPinned()===this.pinned));let o,a=null,l=null,h=null;for(const c of r){if(l=c.getActualWidth(),a=this.getNormalisedColumnLeft(c,0,n),null!=a){if(a<=t&&a+l>=t){h=c;break}}a=null,l=null}if(h)-1!==e.indexOf(h)&&(h=null);else{for(let e=r.length-1;e>=0;e--){const t=r[e],i=r[e].getParent();if(!i){h=t;break}const s=i?.getDisplayedLeafColumns();if(s.length){h=Se(s);break}}if(!h)return;a=this.getNormalisedColumnLeft(h,0,n),l=h.getActualWidth()}this.lastHighlightedColumn?.column!==h&&this.clearHighlighted(),null!=h&&null!=a&&null!=l&&(o=t-a<l/2!==n?0:1,h.setHighlighted(o),this.lastHighlightedColumn={column:h,position:o})}getNormalisedXPositionInfo(e,t){const{gos:i,visibleColsService:s}=this,n=i.get("enableRtl"),{firstMovingCol:r,column:o,position:a}=this.getColumnMoveAndTargetInfo(e,t,n);if(!r||!o||null==a)return;const l=s.getAllCols(),h=l.indexOf(r),c=l.indexOf(o),d=0===a!==n,u=h<c||h===c&&!d;let p=0;if(d?u&&(p-=1):u||(p+=1),c+p===h)return;const g=l[c+p];if(!g)return;return{fromLeft:u,xPosition:this.getNormalisedColumnLeft(g,20,n)}}getColumnMoveAndTargetInfo(e,t,i){const s=this.lastHighlightedColumn||{},{firstMovingCol:n,lastMovingCol:r}=this.findFirstAndLastMovingColumns(e);if(!n||!r||s.column||!t)return{firstMovingCol:n,...s};const o="left"===this.getPinDirection();return{firstMovingCol:n,position:o?1:0,column:o!==i?n:r}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case 0:return 1;case 1:return 0}return e}getNormalisedColumnLeft(e,t,i){const{gos:s,ctrlsService:n}=this,r=e.getLeft();if(null==r)return null;const o=e.getActualWidth();return Io({x:i?r+o-t:r+t,pinned:e.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:s,ctrlsService:n})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>7;return t&&i||e.some((e=>e.getPinned()!==this.pinned))}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:i,fromEnter:s,fakeEvent:n,fromLeft:r}=e,o=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:r,fromEnter:s,fakeEvent:n}),{columns:a,toIndex:l}=xo(o)||{};a&&null!=l&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){this.lastHighlightedColumn&&(this.lastHighlightedColumn.column.setHighlighted(null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.ctrlsService.get("center"),i=t.getCenterViewportScrollLeft(),s=i+t.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<i+50,this.needToMoveLeft=e>s-50):(this.needToMoveLeft=e<i+50,this.needToMoveRight=e>s-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.dragAndDropService.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.dragAndDropService.getDragAndDropImageComponent()?.setIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+5*this.intervalCount,e>100&&(e=100);let t=null;const i=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{if(this.failedMoveAttempts++,this.failedMoveAttempts<=8)return;if(this.dragAndDropService.getDragAndDropImageComponent()?.setIcon("pinned"),!this.gos.get("suppressMoveWhenColumnDragging")){const e=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(e,void 0,!0)}}}getPinDirection(){return this.needToMoveLeft||"left"===this.pinned?"left":this.needToMoveRight||"right"===this.pinned?"right":void 0}attemptToPinColumns(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=(e||[]).filter((e=>!e.getColDef().lockPinned));return s.length?(i&&(t=this.getPinDirection()),this.columnModel.setColsPinned(s,t,"uiColumnDragged"),i&&this.dragAndDropService.nudge(),s.length):0}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}},Ao=class extends ze{wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){this.ctrlsService.whenReady(this,(e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.left.getContainerElement()],[e.bottomLeft.getContainerElement()],[e.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.right.getContainerElement()],[e.bottomRight.getContainerElement()],[e.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.center.getViewportElement()],[e.bottomCenter.getViewportElement()],[e.topCenter.getViewportElement()]]}})),this.moveColumnFeature=this.createManagedBean(new Eo(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new bo(this.pinned)),this.dragAndDropService.addDropTarget(this),this.addDestroyFunc((()=>this.dragAndDropService.removeDropTarget(this)))}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&0===e.dragSource.type}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},To=class extends ze{wireBeans(e){this.horizontalResizeService=e.horizontalResizeService,this.pinnedWidthService=e.pinnedWidthService,this.ctrlsService=e.ctrlsService,this.columnSizeService=e.columnSizeService,this.columnAutosizeService=e.columnAutosizeService}constructor(e,t,i,s,n){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=s,this.ctrl=n}postConstruct(){const e=[];let t,i;const s=()=>{if(Ki(this.eResize,t),!t)return;const s=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(e.push(s),i){const t=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.columnAutosizeService.autoSizeColumn(this.column,"uiColumnResized",t)};this.eResize.addEventListener("dblclick",i);const s=new ks(this.eResize);s.addEventListener("doubleTap",i),e.push((()=>{this.eResize.removeEventListener("dblclick",i),s.removeEventListener("doubleTap",i),s.destroy()}))}},n=()=>{e.forEach((e=>e())),e.length=0},r=()=>{const e=this.column.isResizable(),r=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(e!==t||r!==i)&&(t=e,i=r,n(),s())};r(),this.addDestroyFunc(n),this.ctrl.setRefreshFunction("resize",r)}onResizing(e,t){const{column:i,lastResizeAmount:s,resizeStartWidth:n}=this,r=this.normaliseResizeAmount(t),o=[{key:i,newWidth:n+r}];if(this.column.getPinned()){if(this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(r-s)>Xi(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50)return}this.lastResizeAmount=r,this.columnSizeService.setColumnWidths(o,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i="left"!==this.pinned,s="right"===this.pinned;return this.gos.get("enableRtl")?i&&(t*=-1):s&&(t*=-1),t}},Po=class extends ze{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(K(this.gos))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new $s),this.cbSelectAll.addCssClass("ag-header-select-all"),ci(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:this.onNewColumnsLoaded.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedListeners(this.cbSelectAll,{fieldValueChanged:this.onCbSelectAll.bind(this)}),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onNewColumnsLoaded(){this.showOrHideSelectAll()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);const t=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){const e=this.localeService.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),i=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",`${i} (${t}
2)`):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(e("ariaHeaderSelection","Column with Header Selection")),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(e){return!!me(this.gos)||(h(`${e} is only available if using 'multiRow' selection mode.`),!1)}checkRightRowModelType(e){return!(!L(this.gos)&&!F(this.gos))||(h(`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${this.rowModel.getType()}.`),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox)return;if(!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),i=this.isCurrentPageOnly();let s="uiSelectAll";i?s="uiSelectAllCurrentPage":t&&(s="uiSelectAllFiltered");const n={source:s,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(n):this.selectionService.deselectAllRowNodes(n)}isCheckboxSelection(){const e=this.gos.get("rowSelection"),t="object"===typeof e&&ne(e)&&qe(this.column),i=this.column.getColDef().headerCheckboxSelection;let s=!1;return s=!!t||("function"===typeof i?i(this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()})):!!i),s&&this.checkRightRowModelType(t?"headerCheckbox":"headerCheckboxSelection")&&this.checkSelectionType(t?"headerCheckbox":"headerCheckboxSelection")}isFilteredOnly(){const e=this.gos.get("rowSelection");return"object"===typeof e?"multiRow"===e.mode&&"filtered"===e.selectAll:!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){const e=this.gos.get("rowSelection");return"object"===typeof e?"multiRow"===e.mode&&"currentPage"===e.selectAll:!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}},Lo=class extends Kr{constructor(e,t,i){super(e,t,i),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=e}setComp(e,t,i,s,n){this.comp=e,n=Yt(this,this.beans.context,n),this.setGui(t,n),this.updateState(),this.setupWidth(n),this.setupMovingCss(n),this.setupMenuClass(n),this.setupSortableClass(n),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:s,checkMeasuringCallback:e=>this.setRefreshFunction("measuring",e),compBean:n}),this.addColumnHoverListener(n),this.setupFilterClass(n),this.setupClassesFromColDef(),this.setupTooltip(n),this.addActiveHeaderMouseListeners(n),this.setupSelectAll(n),this.setupUserComp(n),this.refreshAria(),this.resizeFeature=n.createManagedBean(new To(this.getPinned(),this.column,i,e,this)),n.createManagedBean(new $r([this.column],t)),n.createManagedBean(new Vr(this.column,t,this.beans)),n.createManagedBean(new tr(t,{shouldStopEventPropagation:e=>this.shouldStopEventPropagation(e),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(n),n.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],(()=>this.refresh(n))),n.addManagedListeners(this.column,{colDefChanged:()=>this.refresh(n)}),n.addManagedListeners(this.column,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const r=()=>this.checkDisplayName(n);n.addManagedEventListeners({columnValueChanged:r,columnRowGroupChanged:r,columnPivotChanged:r,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),n.addDestroyFunc((()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()}))}resizeHeader(e,t){if(!this.column.isResizable())return;const i=this.column.getActualWidth(),s=this.column.getMinWidth(),n=this.column.getMaxWidth(),r=Math.min(Math.max(i+e,s),n);this.beans.columnSizeService.setColumnWidths([{key:this.column,newWidth:r}],t,!0,"uiColumnResized")}moveHeader(e){const{eGui:t,beans:i,column:s,ctrlsService:n}=this,{gos:r,columnModel:o,columnMoveService:a,visibleColsService:l}=i,h=this.getPinned(),c=t.getBoundingClientRect().left,d=s.getActualWidth(),u=Io({x:0===e!==r.get("enableRtl")?c-20:c+d+20,pinned:h,fromKeyboard:!0,gos:r,ctrlsService:n}),p=this.focusService.getFocusedHeader();Mo({allMovingColumns:[s],isFromHeader:!0,fromLeft:1===e,xPosition:u,pinned:h,fromEnter:!1,fakeEvent:!1,gos:r,columnModel:o,columnMoveService:a,visibleColsService:l,finished:!0}
vendor: 97,937 bytes, line 2
2),n.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(s,"auto"),this.isAlive()&&!this.beans.gos.get("ensureDomOrder")||!p||this.restoreFocus(p)}restoreFocus(e){this.focusService.focusHeaderPosition({headerPosition:{...e,column:this.column}})}setupUserComp(e){const t=this.lookupUserCompDetails(e);this.setCompDetails(t)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(e){const t=this.createParams(e),i=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(i,t)}createParams(e){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:e=>{this.menuService.showColumnMenu({column:this.column,buttonElement:e,positionBy:"button"})},showColumnMenuAfterMouseClick:e=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:e,positionBy:"mouse"})},showFilter:e=>{this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"columnFilter",positionBy:"button"})},progressSort:e=>{this.beans.sortController.progressSort(this.column,!!e,"uiColumnSorted")},setSort:(e,t)=>{this.beans.sortController.setSortForColumn(this.column,e,!!t,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(t,i)=>{this.setupTooltip(e,t,i)}})}setupSelectAll(e){this.selectAllFeature=e.createManagedBean(new Po(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===js.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===js.ENTER&&this.onEnterKeyDown(e),e.key===js.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){if(e.ctrlKey||e.metaKey)this.showMenuOnKeyPress(e,!0);else if(this.sortable){const t=e.shiftKey;this.beans.sortController.progressSort(this.column,t,"uiColumnSorted")}}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();i&&i instanceof Vs&&i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){const e=this.getRowIndex();this.focusService.setFocusedHeader(e,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t,i){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const s="whenTruncated"===this.gos.get("tooltipShowMode"),n=this.eGui,r=this.column.getColDef();i||!s||r.headerComponent||(i=()=>{const e=n.querySelector(".ag-header-cell-text");return!e||e.scrollWidth>e.clientWidth});const o={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>n,getLocation:()=>"header",getTooltipValue:()=>{if(null!=t)return t;return this.column.getColDef().headerTooltip},shouldDisplayTooltip:i},a=e.createManagedBean(new Ms(o));this.setRefreshFunction("tooltip",(()=>a.refreshToolTip()))}setupClassesFromColDef(){const e=()=>{const e=zr(this.column.getColDef(),this.gos,this.column,null),t=this.userHeaderClasses;this.userHeaderClasses=new Set(e),e.forEach((e=>{t.has(e)?t.delete(e):this.comp.addOrRemoveCssClass(e,!0)})),t.forEach((e=>this.comp.addOrRemoveCssClass(e,!1)))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;const{column:t,beans:i,displayName:s,dragAndDropService:n,gos:r}=this,{columnModel:o}=i;let a=!this.gos.get("suppressDragLeaveHidesColumns");const l=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:()=>this.createDragItem(t),dragItemName:s,onDragStarted:()=>{a=!r.get("suppressDragLeaveHidesColumns"),Ro([t],!0)},onDragStopped:()=>Ro([t],!1),onDragCancelled:()=>Ro([t],!1),onGridEnter:e=>{if(a){const t=e?.columns?.filter((e=>!e.getColDef().lockVisible))||[];o.setColsVisible(t,!0,"uiColumnMoved")}},onGridExit:e=>{if(a){const t=e?.columns?.filter((e=>!e.getColDef().lockVisible))||[];o.setColsVisible(t,!1,"uiColumnMoved")}}};n.addDragSource(l,!0)}createDragItem(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(e){this.updateState(),this.refreshHeaderComp(e),this.refreshAria(),Object.values(this.refreshFunctions).forEach((e=>e()))}refreshHeaderComp(e){const t=this.lookupUserCompDetails(e);!!(null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==t.componentClass)&&this.attemptHeaderCompRefresh(t.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(t)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();if(!t)return!1;if(!t.refresh)return!1;return t.refresh(e)}calculateDisplayName(){return this.beans.columnNameService.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(e){this.displayName!==this.calculateDisplayName()&&this.refresh(e)}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const e=this.column.getActualWidth();this.comp.setWidth(`${e}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const e=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",e),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const e=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",e)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=0===e,i=1===e;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",i)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:s}=this,n=this.beans.columnModel.getGroupRowsHeight(),r=0===n.reduce(((e,t)=>e+t),0);if(i.addOrRemoveCssClass("ag-header-parent-hidden",r),!t.isSpanHeaderHeight())return e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),void i.addOrRemoveCssClass("ag-header-span-total",!1);const{numberOfParents:o,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",o>0);const{columnModel:l}=s,h=l.getColumnHeaderRowHeight();if(0===o)return i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),void e.style.setProperty("height",`${h}px`);i.addOrRemoveCssClass("ag-header-span-total",a);let c=0;for(let d=0;d<o;d++)c+=n[n.length-1-d];e.style.setProperty("top",-c+"px"),e.style.setProperty("height",`${h+c}px`)}refreshAriaSort(){if(this.sortable){const e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(function(e){let t;return t="asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none",t}(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(K(this.beans.gos)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort(((e,t)=>"filter"===e?-1:t.charCodeAt(0)-e.charCodeAt(0))).map((e=>this.ariaDescriptionProperties.get(e))).join(". ");this.beans.ariaAnnouncementService.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){const t=()=>{if(!this.gos.get("columnHoverHighlight"))return;const e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};e.addManagedEventListeners({columnHoverChanged:t}),t()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(e){const t=e=>this.handleMouseOverChange("mouseenter"===e.type);e.addManagedListeners(this.getGui(),{mouseenter:t,mouseleave:t,click:()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column),contextmenu:e=>this.handleContextMenuMouseEvent(e,void 0,this.column)})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventService.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return t instanceof Vs?t.getAnchorElementForMenu(e):this.getGui()}destroy(){super.destroy()}},Fo=class extends ze{wireBeans(e){this.horizontalResizeService=e.horizontalResizeService,this.autoWidthCalculator=e.autoWidthCalculator,this.visibleColsService=e.visibleColsService,this.columnSizeService=e.columnSizeService,this.columnAutosizeService=e.columnAutosizeService}constructor(e,t,i,s){super(),this.eResize=t,this.comp=e,this.pinned=i,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gos.get("suppressAutoSize")){const e=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",(()=>{const t=[];this.columnGroup.getDisplayedLeafColumns().forEach((e=>{e.getColDef().suppressAutoSize||t.push(e.getColId())})),t.length>0&&this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:e,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")}))}}onResizeStart(e){const t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)}onResizing(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"uiColumnResized";const s=this.normaliseDragChange(t),n=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(n,i,e)}getInitialValues(e){const t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),s={columnsToResize:t,resizeStartWidth:i,resizeRatios:this.getSizeRatiosOfColumns(t,i)};let n=null;if(e&&(n=this.visibleColsService.getGroupAtDirection(this.columnGroup,"After")),n){const e=n.getDisplayedLeafColumns(),t=s.groupAfterColumns=e.filter((e=>e.isResizable())),i=s.groupAfterStartWidth=this.getInitialSizeOfColumns(t);s.groupAfterRatios=this.getSizeRatiosOfColumns(t,i)}else s.groupAfterColumns=void 0,s.groupAfterStartWidth=void 0,s.groupAfterRatios=void 0;return s}storeLocalValues(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:n,groupAfterStartWidth:r,groupAfterRatios:o}=e;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=n,this.resizeTakeFromStartWidth=r,this.resizeTakeFromRatios=o}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}resizeLeafColumnsToFit(e){const t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!this.resizeCols||!this.resizeRatios)return;const s={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols??void 0,groupAfterStartWidth:this.resizeTakeFromStartWidth??void 0,groupAfterRatios:this.resizeTakeFromRatios??void 0};this.resizeColumns(s,e,t,i)}resizeColumns(e,t,i){let s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const{columnsToResize:n,resizeStartWidth:r,resizeRatios:o,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:h}=e,c=[];if(c.push({columns:n,ratios:o,width:t}),a){const e=t-r;c.push({columns:a,ratios:h,width:l-e})}this.columnSizeService.resizeColumnSets({resizeSets:c,finished:s,source:i}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter((e=>e.isResizable()))}getInitialSizeOfColumns(e){return e.reduce(((e,t)=>e+t.getActualWidth()),0)}getSizeRatiosOfColumns(e,t){return e.map((e=>e.getActualWidth()/t))}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}destroy(){super.destroy(),this.clearLocalValues()}},ko=class extends ze{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach((t=>{t.addEventListener("widthChanged",e),t.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push((()=>{t.removeEventListener("widthChanged",e),t.removeEventListener("visibleChanged",e)}))}))}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach((e=>e())),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",0===e)}},No=class extends Kr{constructor(e,t,i){super(e,t,i),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){const e=this.getGui();this.setDragSource(e)}},this.column=e}setComp(e,t,i,s,n){this.comp=e,n=Yt(this,this.beans.context,n),this.setGui(t,n),this.displayName=this.beans.columnNameService.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(n),this.setupExpandable(n),this.setupTooltip(n),this.setupAutoHeight({wrapperElement:s,compBean:n}),this.setupUserComp(n),this.addHeaderMouseListeners(n),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const r=this.getParentRowCtrl().getPinned(),o=this.column.getProvidedColumnGroup().getLeafColumns();n.createManagedBean(new $r(o,t)),n.createManagedBean(new Vr(this.column,t,this.beans)),n.createManagedBean(new ko(e,this.column)),this.resizeFeature=n.createManagedBean(new Fo(e,i,r,this.column)),n.createManagedBean(new tr(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(n,o),n.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(n),n.addDestroyFunc((()=>this.clearComponent()))}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");null!=i?0===i?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(i):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),i=t[0]===e,s=Se(t)===e;if(!i&&!s)return;const n=e.getHighlighted();let r=!1,o=!1;if(!!this.getParentRowCtrl().findHeaderCellCtrl((e=>e.getColumnGroupChild().isMoving()))){const e=this.beans.gos.get("enableRtl"),t=1===n,a=0===n;i&&(e?o=t:r=a),s&&(e?r=a:o=t)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",r),this.comp.addOrRemoveCssClass("ag-header-highlight-after",o)}getColumn(){return this.column}resizeHeader(e,t){if(!this.resizeFeature)return;const i=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}moveHeader(e){const{beans:t,eGui:i,column:s,ctrlsService:n}=this,{gos:r,columnModel:o,columnMoveService:a,visibleColsService:l}=t,h=r.get("enableRtl"),c=0===e,d=this.getPinned(),u=i.getBoundingClientRect(),p=u.left,g=u.width,m=Io({x:c!==h?p-20:p+g+20,pinned:d,fromKeyboard:!0,gos:r,ctrlsService:n}),f=s.getGroupId(),v=this.focusService.getFocusedHeader();Mo({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,fromLeft:1===e,xPosition:m,pinned:d,fromEnter:!1,fakeEvent:!1,gos:r,columnModel:o,columnMoveService:a,visibleColsService:l,finished:!0});const y=s.getDisplayedLeafColumns(),C=c?y[0]:Se(y);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(C,"auto"),this.isAlive()&&!this.beans.gos.get("ensureDomOrder")||!v||this.restoreFocus(f,s,v)}restoreFocus(e,t,i){const s=t.getLeafColumns();if(!s.length)return;const n=s[0].getParent();if(!n)return;const r=this.findGroupWidthId(n,e);r&&this.focusService.focusHeaderPosition({headerPosition:{...i,column:r}})}findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return null}resizeLeafColumnsToFit(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)}setupUserComp(e){const t=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:e=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),e,"gridInitializing")},setTooltip:(t,i)=>{this.setupTooltip(e,t,i)}}),i=this.userComponentFactory.getHeaderGroupCompDetails(t);this.comp.setUserCompDetails(i)}addHeaderMouseListeners(e){const t=e=>this.handleMouseOverChange("mouseenter"===e.type);e.addManagedListeners(this.getGui(),{mouseenter:t,mouseleave:t,click:()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),contextmenu:e=>this.handleContextMenuMouseEvent(e,void 0,this.column.getProvidedColumnGroup())})}handleMouseOverChange(e){this.eventService.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t,i){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const s=this.column.getColGroupDef(),n="whenTruncated"===this.gos.get("tooltipShowMode"),r=this.eGui;i||!n||s?.headerGroupComponent||(i=()=>{const e=r.querySelector(".ag-header-group-text");return!e||e.scrollWidth>e.clientWidth});const o={getColumn:()=>this.column,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>t??(s&&s.headerTooltip),shouldDisplayTooltip:i};s&&(o.getColDef=()=>s),e.createManagedBean(new Ms(o))}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)}getColId(){return this.column.getUniqueId()}addClasses(){const e=this.column.getColGroupDef(),t=zr(e,this.gos,null,this.column);if(this.column.isPadding()){t.push("ag-header-group-cell-no-group");this.column.getLeafColumns().every((e=>e.isSpanHeaderHeight()))&&t.push("ag-header-span-height")}else t.push("ag-header-group-cell-with-group"),e?.wrapHeaderText&&t.push("ag-header-cell-wrap-text");t.forEach((e=>this.comp.addOrRemoveCssClass(e,!0)))}setupMovingCss(e){const t=this.column.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());t.forEach((t=>{e.addManagedListeners(t,{movingChanged:i})})),i()}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){const e=this.getRowIndex();this.beans.focusService.setFocusedHeader(e,this.column)}}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(this.expandable&&t&&e.key===js.ENTER){const e=this.column,t=!e.isExpanded();this.beans.columnModel.setColumnGroupOpened(e.getProvidedColumnGroup(),t,"uiColumnExpanded")}}setDragSource(e){if(!this.isAlive()||this.isSuppressMoving())return;if(this.removeDragSource(),!e)return;const{beans:t,column:i,displayName:s,gos:n,dragAndDropService:r}=this,{columnModel:o}=t,a=i.getProvidedColumnGroup().getLeafColumns();let l=!n.get("suppressDragLeaveHidesColumns");const h=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",dragItemName:s,getDragItem:()=>this.getDragItemForGroup(i),onDragStarted:()=>{l=!n.get("suppressDragLeaveHidesColumns"),Ro(a,!0)},onDragStopped:()=>Ro(a,!1),onDragCancelled:()=>Ro(a,!1),onGridEnter:e=>{if(l){const{columns:t=[],visibleState:i}=e??{},s=t.filter((e=>!e.getColDef().lockVisible&&(!i||i[e.getColId()])));o.setColsVisible(s,!0,"uiColumnMoved")}},onGridExit:e=>{if(l){const t=e?.columns?.filter((e=>!e.getColDef().lockVisible))||[];o.setColsVisible(t,!1,"uiColumnMoved")}}};r.addDragSource(h,!0)}getDragItemForGroup(e){const t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach((e=>i[e.getId()]=e.isVisible()));const s=[];this.beans.visibleColsService.getAllCols().forEach((e=>{t.indexOf(e)>=0&&(s.push(e),Me(t,e))})),t.forEach((e=>s.push(e)));const n=[],r=e.getLeafColumns();for(const o of s)-1!==r.indexOf(o)&&n.push(o);return{columns:s,columnsInSplit:n,visibleState:i}}isSuppressMoving(){let e=!1;this.column.getLeafColumns().forEach((t=>{(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)}));return e||this.gos.get("suppressMovableColumns")}destroy(){super.destroy()}},Oo=0,Go=class extends ze{constructor(e,t,i){super(),this.instanceId=Oo++,this.rowIndex=e,this.pinned=t,this.type=i;const s="group"==i?"ag-header-row-column-group":"filter"==i?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${s}`}wireBeans(e){this.beans=e}postConstruct(){this.isPrintLayout=k(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return!!this.comp&&this.getHeaderCellCtrls().every((e=>null!=e.getGui()))}setComp(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.comp=e,t=Yt(this,this.beans.context,t),i&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this);e.addManagedEventListeners({columnResized:this.onColumnResized.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:e=>this.onVirtualColumnsChanged(e.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),e.addManagedPropertyListener("ensureDomOrder",(e=>this.isEnsureDomOrder=e.currentValue)),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}getHeaderCellCtrl(e){if(this.headerCellCtrls)return T(this.headerCellCtrls).find((t=>t.getColumnGroupChild()===e))}onDisplayedColumnsChanged(){this.isPrintLayout=k(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleColsService:e}=this.beans;if(this.isPrintLayout){return null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null)}return e.getContainerWidth(this.pinned)}onRowHeightChanged(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{columnModel:e,filterManager:t}=this.beans,i=[],s=e.getGroupRowsHeight(),n=e.getColumnHeaderRowHeight();i.push(...s),i.push(n),t?.hasFloatingFilters()&&i.push(e.getFloatingFiltersHeight());let r=0;for(let o=0;o<this.rowIndex;o++)r+=i[o];return{topOffset:r,rowHeight:i[this.rowIndex]}}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.getHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getHeaderCtrls(){const e=this.headerCellCtrls;this.headerCellCtrls=new Map;const t=this.getColumnsInViewport();for(const s of t)this.recycleAndCreateHeaderCtrls(s,e);const i=e=>{const{focusService:t,visibleColsService:i}=this.beans;if(!t.isHeaderWrapperFocused(e))return!1;return i.isVisible(e.getColumnGroupChild())};if(e)for(const[s,n]of e){i(n)?this.headerCellCtrls.set(s,n):this.destroyBean(n)}return this.getHeaderCellCtrls()}getHeaderCellCtrls(){return Array.from(this.headerCellCtrls?.values()??[])}recycleAndCreateHeaderCtrls(e,t){if(!this.headerCellCtrls)return;if(e.isEmptyGroup())return;const i=e.getUniqueId();let s;t&&(s=t.get(i),t.delete(i));if(s&&s.getColumnGroupChild()!=e&&(this.destroyBean(s),s=void 0),null==s)switch(this.type){case"filter":s=this.createBean(this.beans.ctrlsFactory.getInstance("headerFilterCell",e,this.beans,this));break;case"group":s=this.createBean(new No(e,this.beans,this));break;default:s=this.createBean(new Lo(e,this.beans,this))}this.headerCellCtrls.set(i,s)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(null!=this.pinned)return[];let e=[];const t=this.getActualDepth(),{columnViewportService:i}=this.beans;return["left",null,"right"].forEach((s=>{const n=i.getHeadersToRender(s,t);e=e.concat(n)})),e}getActualDepth(){return"filter"==this.type?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnViewportService.getHeadersToRender(this.pinned,this.getActualDepth())}findHeaderCellCtrl(e){if(!this.headerCellCtrls)return;const t=this.getHeaderCellCtrls();let i;return i="function"===typeof e?t.find(e):t.find((t=>t.getColumnGroupChild()==e)),i}focusHeader(e,t){const i=this.findHeaderCellCtrl(e);if(!i)return!1;return i.focus(t)}destroy(){this.headerCellCtrls?.forEach((e=>{this.destroyBean(e)})),this.headerCellCtrls=void 0,super.destroy()}},Bo=class extends ze{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}wireBeans(e){this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService,this.pinnedWidthService=e.pinnedWidthService,this.columnModel=e.columnModel,this.focusService=e.focusService,this.filterManager=e.filterManager}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport);const i=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:i,advancedFilterEnabledChanged:i});const s=`${"string"===typeof this.pinned?this.pinned:"center"}Header`;this.ctrlsService.register(s,this),this.columnModel.isReady()&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=new ws,i=this.focusService.getFocusHeaderToUseAfterRefresh();(()=>{const e=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let i=0;i<e;i++){const e=this.createBean(new Go(t.next(),this.pinned,"group"));this.groupsRowCtrls.push(e)}})(),(()=>{const i=t.next(),s=!this.hidden&&(null==this.columnsRowCtrl||!e||this.columnsRowCtrl.getRowIndex()!==i);(s||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),s&&(this.columnsRowCtrl=this.createBean(new Go(i,this.pinned,"column")))})(),(()=>{this.includeFloatingFilter=!!this.filterManager?.hasFloatingFilters()&&!this.hidden;const i=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter)return void i();const s=t.next();if(this.filtersRowCtrl){const t=this.filtersRowCtrl.getRowIndex()!==s;e&&!t||i()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new Go(s,this.pinned,"filter")))})();const s=this.getAllCtrls();this.comp.setCtrls(s),this.restoreFocusOnHeader(i)}getHeaderCtrlForColumn(e){if(ct(e))return this.columnsRowCtrl?.getHeaderCellCtrl(e);if(0!==this.groupsRowCtrls.length)for(let t=0;t<this.groupsRowCtrls.length;t++){const i=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(i)return i}}getHtmlElementForColumnHeader(e){const t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null}getRowType(e){const t=this.getAllCtrls()[e];return t?t.getType():void 0}focusHeader(e,t,i){const s=this.getAllCtrls()[e];return!!s&&s.focusHeader(t,i)}getViewportElement(){return this.eViewport}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy()}setupDragAndDrop(e){const t=new Ao(this.pinned,e);this.createManagedBean(t)}restoreFocusOnHeader(e){if(!e)return;const{column:t}=e;t.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){const e=this.filterManager?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new wo((e=>this.comp.setCenterWidth(`${e}px`)),!0))}setupPinnedWidth(){if(null==this.pinned)return;const e="left"===this.pinned,t="right"===this.pinned;this.hidden=!0;const i=()=>{const i=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(null==i)return;const s=0==i,n=this.hidden!==s,r=this.gos.get("enableRtl"),o=this.scrollVisibleService.getScrollbarWidth(),a=this.scrollVisibleService.isVerticalScrollShowing()&&(r&&e||!r&&t)?i+o:i;this.comp.setPinnedContainerWidth(`${a}px`),this.comp.setDisplayed(!s),n&&(this.hidden=s,this.refresh())};this.addManagedEventListeners({leftPinnedWidthChanged:i,rightPinnedWidthChanged:i,scrollVisibilityChanged:i,scrollbarWidthChanged:i})}},Vo=class extends Rs{constructor(e){super(),this.eCenterContainer=Is,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:e=>this.setDisplayed(e),setCtrls:e=>this.setCtrls(e),setCenterWidth:e=>this.eCenterContainer.style.width=e,setViewportScrollLeft:e=>this.getGui().scrollLeft=e,setPinnedContainerWidth:e=>{const t=this.getGui();t.style.width=e,t.style.maxWidth=e,t.style.minWidth=e}};this.createManagedBean(new Bo(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e="left"==this.pinned,t="right"==this.pinned,i=e?'<div class="ag-pinned-left-header" role="rowgroup"></div>':t?'<div class="ag-pinned-right-header" role="rowgroup"></div>':'<div class="ag-header-viewport" role="presentation">\n        <div class="ag-header-container" data-ref="eCenterContainer" role="rowgroup"></div>\n    </div>';this.setTemplate(i),this.eRowContainer=this.eCenterContainer!==Is?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;let i;this.headerRowComps={},this.rowCompsList=[];const s=e=>{const t=e.getGui();t.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(t),i&&cs(this.eRowContainer,t,i),i=t};e.forEach((e=>{const i=e.instanceId,n=t[i];delete t[i];const r=n||this.createBean(new yo(e));this.headerRowComps[i]=r,this.rowCompsList.push(r),s(r)})),st(t).forEach((e=>this.destroyRowComp(e)))}},zo={selector:"AG-HEADER-ROOT",component:class extends Rs{constructor(){super('<div class="ag-header" role="presentation"/>')}postConstruct(){const e={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setHeightAndMinHeight:e=>{this.getGui().style.height=e,this.getGui().style.minHeight=e}};this.createManagedBean(new So).setComp(e,this.getGui(),this.getFocusableElement());const t=e=>{this.createManagedBean(e),this.appendChild(e)};t(new Vo("left")),t(new Vo(null)),t(new Vo("right"))}}},Ho=class extends ze{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.getDomLayout(),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},i=t.autoHeight?"ag-layout-auto-height":t.print?"ag-layout-print":"ag-layout-normal";this.view.updateLayoutClasses(i,t)}getDomLayout(){const e=this.gos.get("domLayout")??"normal";return-1===["normal","print","autoHeight"].indexOf(e)?(h(`${e} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):e}},Wo=class extends Rs{constructor(){super('\n            <div class="ag-overlay" role="presentation">\n                <div class="ag-overlay-panel" role="presentation">\n                    <div class="ag-overlay-wrapper" data-ref="eOverlayWrapper" role="presentation"></div>\n                </div>\n            </div>'),this.eOverlayWrapper=Is,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeOverlayWrapperCssClass=null,this.elToFocusAfter=null}wireBeans(e){this.overlayService=e.overlayService,this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}handleKeyDown(e){if(e.key!==js.TAB||e.defaultPrevented||Oe(e))return;if(this.focusService.findNextFocusableElement(this.eOverlayWrapper,!1,e.shiftKey))return;let t=!1;t=e.shiftKey?this.focusService.focusGridView(Se(this.visibleColsService.getAllCols()),!0,!1):this.focusService.focusNextGridCoreContainer(!1),t&&e.preventDefault()}updateLayoutClasses(e,t){const i=this.eOverlayWrapper.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print)}postConstruct(){this.createManagedBean(new Ho(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&t.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i,s){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),i&&this.focusService.isGridFocused()){const e=K(this.gos);e&&!$(this.gos)&&(this.elToFocusAfter=e)}e.then((t=>{if(this.activePromise!==e)return void(this.activeOverlay!==t&&(this.destroyBean(t),t=null));if(this.activePromise=null,!t)return;if(this.activeOverlay!==t&&(this.eOverlayWrapper.appendChild(t.getGui()),this.activeOverlay=t,s)){const e=t;this.updateListenerDestroyFunc=this.addManagedPropertyListener(s,(t=>{let{currentValue:i}=t;e.refresh?.(this.gos.addGridCommonParams({...i??{}}))}))}const n=this.focusService;i&&n.isGridFocused()&&n.focusInto(this.eOverlayWrapper)}))}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.focusService.isGridFocused()&&(t=null);const i=this.updateListenerDestroyFunc;i&&(i(),this.updateListenerDestroyFunc=null),this.destroyBean(e),rs(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.overlayService.setOverlayWrapperComp(void 0),super.destroy()}},jo={selector:"AG-OVERLAY-WRAPPER",component:Wo},Uo=class extends Rs{constructor(e,t){super(),this.direction=t,this.eViewport=Is,this.eContainer=Is,this.hideTimeout=null,this.setTemplate(e)}wireBeans(e){this.animationFrameService=e.animationFrameService}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Gi()||Bi())}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=Wi(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),i=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame((()=>this.setScrollVisible()))}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(null!==this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout((()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null}),400)}})}attemptSettingScrollPosition(e){const t=this.getViewportElement();y((()=>ls(t)),(()=>this.setScrollPosition(e)),100)}getViewportElement(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}},_o=class extends Uo{constructor(){super('<div class="ag-body-horizontal-scroll" aria-hidden="true">\n            <div class="ag-horizontal-left-spacer" data-ref="eLeftSpacer"></div>\n            <div class="ag-body-horizontal-scroll-viewport" data-ref="eViewport">\n                <div class="ag-body-horizontal-scroll-container" data-ref="eContainer"></div>\n            </div>\n            <div class="ag-horizontal-right-spacer" data-ref="eRightSpacer"></div>\n        </div>',"horizontal"),this.eLeftSpacer=Is,this.eRightSpacer=Is}wireBeans(e){super.wireBeans(e),this.visibleColsService=e.visibleColsService,this.pinnedRowModel=e.pinnedRowModel,this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new wo((e=>this.eContainer.style.width=`${e}px`))),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleService.isVerticalScrollShowing();let t=this.visibleColsService.getDisplayedColumnsRightWidth();const i=!this.enableRtl&&e,s=this.scrollVisibleService.getScrollbarWidth();i&&(t+=s),gs(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=s);let n=this.visibleColsService.getColsLeftWidth();this.enableRtl&&e&&(n+=s),gs(this.eLeftSpacer,n),this.eLeftSpacer.classList.toggle("ag-scroller-corner",n<=s)}setScrollVisible(){const e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),s=e&&this.scrollVisibleService.getScrollbarWidth()||0,n=i?0:0===s&&t?16:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),ms(this.getGui(),n),ms(this.eViewport,n),ms(this.eContainer,n),this.setDisplayed(e,{skipAriaHidden:!0})}getScrollPosition(){return ss(this.getViewportElement(),this.enableRtl)}setScrollPosition(e){ls(this.getViewportElement())||this.attemptSettingScrollPosition(e),ns(this.getViewportElement(),e,this.enableRtl)}},Ko={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:_o},$o=class extends ze{wireBeans(e){this.maxDivHeightScaler=e.rowContainerHeightService}constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this)})}onHeightChanged(){const e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?`${e}px`:"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)}},Yo=class extends Uo{wireBeans(e){super.wireBeans(e),this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService}constructor(){super('<div class="ag-body-vertical-scroll" aria-hidden="true">\n            <div class="ag-body-vertical-scroll-viewport" data-ref="eViewport">\n                <div class="ag-body-vertical-scroll-container" data-ref="eContainer"></div>\n            </div>\n        </div>',"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new $o(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this)})}setScrollVisible(){const e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.invisibleScrollbar,i=e&&this.scrollVisibleService.getScrollbarWidth()||0,s=0===i&&t?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),gs(this.getGui(),s),gs(this.eViewport,s),gs(this.eContainer,s),this.setDisplayed(e,{skipAriaHidden:!0})}onRowContainerHeightChanged(){const{ctrlsService:e}=this,t=e.getGridBodyCtrl().getBodyViewportElement(),i=this.getScrollPosition(),s=t.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.getViewportElement().scrollTop}setScrollPosition(e,t){t||ls(this.getViewportElement())||this.attemptSettingScrollPosition(e),this.getViewportElement().scrollTop=e}},Zo={selector:"AG-FAKE-VERTICAL-SCROLL",component:Yo},qo=(e=>(e.FakeHScrollbar="fakeHScrollComp",e.Header="centerHeader",e.PinnedTop="topCenter",e.PinnedBottom="bottomCenter",e.StickyTop="stickyTopCenter",e.StickyBottom="stickyBottomCenter",e))(qo||{}),Qo=class extends ze{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.eBodyViewport=e,this.resetLastHScrollDebounced=f((()=>this.lastScrollSource[1]=null),500),this.resetLastVScrollDebounced=f((()=>this.lastScrollSource[0]=null),500)}wireBeans(e){this.ctrlsService=e.ctrlsService,this.animationFrameService=e.animationFrameService,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService,this.rowModel=e.rowModel,this.heightScaler=e.rowContainerHeightService,this.rowRenderer=e.rowRenderer,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this)}),this.ctrlsService.whenReady(this,(e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()}))}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.getViewportElement(),{scroll:this.onHScroll.bind(this,"Viewport")});for(const e of Object.values(qo)){const t=this.ctrlsService.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsService.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),i=t?f(this.onVScroll.bind(this,"Viewport"),100):this.onVScroll.bind(this,"Viewport"),s=t?f(this.onVScroll.bind(this,"fakeVScrollComp"),100):this.onVScroll.bind(this,"fakeVScrollComp");this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(e,s)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){null==this.centerRowsCtrl||(void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...Object.values(qo),"Viewport"]){if(this.lastScrollSource[1]===t)continue;ns(this.getViewportForSource(t),e,this.enableRtl)}}getViewportForSource(e){return"Viewport"===e?this.centerRowsCtrl.getViewportElement():this.ctrlsService.get(e).getViewportElement()}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(0===t?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.getViewportElement(),{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;const s=ss(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(s),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;t="Viewport"===e?this.eBodyViewport.scrollTop:this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0)||(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,"Viewport"===e?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())}doHorizontalScroll(e){const t=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:"bodyScroll",direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout((()=>{this.eventService.dispatchEvent({...t,type:"bodyScrollEnd"})}),100)}shouldBlockScrollUpdate(e,t){return!(arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&!Bi())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}shouldBlockVerticalScroll(e){const t=Qi(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.getViewportElement();if(this.enableRtl&&is()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll("Viewport")}scrollGridIfNeeded(){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl&&is()?e>0?0:i:Math.min(Math.max(e,0),i)),ns(this.centerRowsCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight;return{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){const t=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.getViewportElement().scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=this.rowModel.getRowCount();let s=-1;for(let n=0;n<i;n++){const t=this.rowModel.getRow(n);if("function"===typeof e){if(t&&e(t)){s=n;break}}else if(e===t||e===t.data){s=n;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t){if(k(this.gos,"print"))return;const i=this.rowModel.getRowCount();if("number"!==typeof e||e<0||e>=i)return void h("Invalid row index for ensureIndexVisible: "+e);const s=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming((()=>{s||this.paginationService?.goToPageWithIndex(e);const i=this.ctrlsService.getGridBodyCtrl(),n=i.getStickyTopHeight(),r=i.getStickyBottomHeight(),o=this.rowModel.getRow(e);let a;do{const e=o.rowTop,i=o.rowHeight,s=this.pageBoundsService.getPixelOffset(),l=o.rowTop-s,h=l+o.rowHeight,c=this.getVScrollPosition(),d=this.heightScaler.getDivStretchOffset(),u=c.top+d,p=c.bottom+d,g=p-u,m=this.heightScaler.getScrollPositionForPixel(l),f=this.heightScaler.getScrollPositionForPixel(h-g),v=Math.min((m+f)/2,l);let y=null;"top"===t?y=m:"bottom"===t?y=f:"middle"===t?y=v:u+n>l?y=m-n:p-r<h&&(y=f+r),null!==y&&(this.setVerticalScrollPosition(y),this.rowRenderer.redraw({afterScroll:!0})),a=e!==o.rowTop||i!==o.rowHeight}while(a);this.animationFrameService.flushAllFrames()}))}ensureColumnVisible(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const i=this.columnModel.getCol(e);if(!i)return;if(i.isPinned())return;if(!this.visibleColsService.isColDisplayed(i))return;const s=this.getPositionedHorizontalScroll(i,t);this.getFrameworkOverrides().wrapIncoming((()=>{null!==s&&this.centerRowsCtrl.setCenterViewportScrollLeft(s),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()}))}setScrollPosition(e,t){this.getFrameworkOverrides().wrapIncoming((()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(t),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()}))}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:s}=this.isColumnOutsideViewport(e),n=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),r=this.centerRowsCtrl.getCenterWidth(),o=this.enableRtl;let a=(o?i:s)||n,l=o?s:i;"auto"!==t&&(a="start"===t,l="end"===t);const h="middle"===t;if(a||l||h){const{colLeft:t,colMiddle:i,colRight:s}=this.getColumnBounds(e);return h?i-r/2:a?o?s:t:o?t-r:s-r}return null}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:s,colRight:n}=this.getColumnBounds(e),r=this.enableRtl;return{columnBeforeStart:r?t>n:i<n,columnAfterEnd:r?i<s:t>s}}getColumnBounds(e){const t=this.enableRtl,i=this.visibleColsService.getBodyContainerWidth(),s=e.getActualWidth(),n=e.getLeft(),r=t?-1:1,o=t?i-n:n;return{colLeft:o,colMiddle:o+s/2*r,colRight:o+s*r}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}},Xo=class extends ze{wireBeans(e){this.animationFrameService=e.animationFrameService,this.ctrlsService=e.ctrlsService,this.pinnedWidthService=e.pinnedWidthService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnSizeService=e.columnSizeService,this.scrollVisibleService=e.scrollVisibleService,this.columnViewportService=e.columnViewportService}constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(this,(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()})),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],(()=>{this.checkViewportAndScrolls()}))}listenForResize(){const e=()=>{this.animationFrameService.requestAnimationFrame((()=>{this.onCenterViewportResized()}))};this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleService.onCentreViewportResized(),this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnSizeService.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){const e=Xi(this.gridBodyCtrl.getBodyViewportElement());if(e<=50)return;let t=this.getPinnedColumnsOverflowingViewport(e-50);const i=this.gos.getCallback("processUnpinnedColumns");if(t.length){if(i){t=i({columns:t,viewportWidth:e})}this.columnModel.setColsPinned(t,null,"viewportSizeFeature")}}getPinnedColumnsOverflowingViewport(e){const t=this.pinnedWidthService.getPinnedRightWidth()+this.pinnedWidthService.getPinnedLeftWidth();if(t<e)return[];const i=[...this.visibleColsService.getLeftCols()],s=[...this.visibleColsService.getRightCols()];let n=0,r=0;const o=[];let a=t-0-e;for(;(r<i.length||n<s.length)&&a>0;){if(n<s.length){const e=s[n++];a-=e.getActualWidth(),o.push(e)}if(r<i.length&&a>0){const e=i[r++];a-=e.getActualWidth(),o.push(e)}}return o}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=Qi(this.gridBodyCtrl.getBodyViewportElement());this.bodyHeight!==e&&(this.bodyHeight=e,this.eventService.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnViewportService.setScrollPosition(e,t)}},Jo=class extends ze{wireBeans(e){this.dragService=e.dragService,this.rangeService=e.rangeService}constructor(e){super(),this.eContainer=e}postConstruct(){if(!this.rangeService)return;this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],(()=>{le(this.gos)?this.enableFeature():this.disableFeature()})),this.addDestroyFunc((()=>this.disableFeature()));le(this.gos)&&this.enableFeature()}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}},ea=class extends Rs{constructor(){super('\n            <div class="ag-selection-checkbox" role="presentation">\n                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>\n            </div>',[Ys]),this.eCheckbox=Is}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),i=Li(e,t),[s,n]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],r=e(s,n);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${r} (${i})`)}onClicked(e,t,i){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:i.shiftKey,groupSelectsFiltered:t,event:i,source:"checkboxSelected"})}init(e){this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:e=>Ne(e),click:e=>{Ne(e);const t="filteredDescendants"===fe(this.gos),i=this.eCheckbox.getValue();if(this.shouldHandleIndeterminateState(i,t)){0===this.onClicked(!0,t,e||{})&&this.onClicked(!1,t,e)}else i?this.onClicked(!1,t,e):this.onClicked(!0,t,e||{})}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)});if(pe(this.gos)||"function"===typeof this.getIsVisible()){const e=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&L(this.gos)}showOrHideSelect(){let e=this.rowNode.selectable;const t=this.getIsVisible();if(e)if("function"===typeof t){const i=this.overrides?.callbackParams;if(this.column){const s=this.column.createColumnFunctionCallbackParams(this.rowNode);e=t({...i,...s})}else e=t({...i,node:this.rowNode,data:this.rowNode.data})}else e=t??!1;const i=this.gos.get("rowSelection");var s;if(i&&"string"!==typeof i?(s=i,!s?.hideDisabledCheckboxes):this.column?.getColDef().showDisabledCheckboxes)return this.eCheckbox.setDisabled(!e),this.setVisible(!0),void this.setDisplayed(!0);this.overrides?.removeHidden?this.setDisplayed(e):this.setVisible(e)}getIsVisible(){if(this.overrides)return this.overrides.isVisible;const e=this.gos.get("rowSelection");return e&&"string"!==typeof e?se(e):this.column?.getColDef()?.checkboxSelection}},ta=class extends Rs{constructor(e,t,i){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(Ps("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",(e=>{e.stopPropagation()})),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const t=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);const i=()=>{try{const t=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",t),e.dataTransfer.setData("text/plain",t)}catch(t){}};if(t){t(this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:e}))}else i()}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},ia=class extends ze{constructor(e,t){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const e=this.column.getColDef(),{cellClassRules:t}=e,i=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(t===this.cellClassRules?void 0:this.cellClassRules,t,i,(e=>this.cellComp.addOrRemoveCssClass(e,!0)),(e=>this.cellComp.addOrRemoveCssClass(e,!1))),this.cellClassRules=t}applyUserStyles(){const e=this.column.getColDef();if(!e.cellStyle)return;let t;if("function"===typeof e.cellStyle){const i=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});t=(0,e.cellStyle)(i)}else t=e.cellStyle;t&&this.cellComp.setUserStyles(t)}applyClassesFromColDef(){const e=this.column.getColDef(),t=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex});this.staticClasses.length&&this.staticClasses.forEach((e=>this.cellComp.addOrRemoveCssClass(e,!1))),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,t),this.staticClasses.length&&this.staticClasses.forEach((e=>this.cellComp.addOrRemoveCssClass(e,!0)))}destroy(){super.destroy()}},sa=class extends ze{constructor(e,t,i,s,n){super(),this.cellCtrl=e,this.beans=t,this.rowNode=s,this.rowCtrl=n}setComp(e){this.eGui=e}onKeyDown(e){const t=e.key;switch(t){case js.ENTER:this.onEnterKeyDown(e);break;case js.F2:this.onF2KeyDown(e);break;case js.ESCAPE:this.onEscapeKeyDown(e);break;case js.TAB:this.onTabKeyDown(e);break;case js.BACKSPACE:case js.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case js.DOWN:case js.UP:case js.RIGHT:case js.LEFT:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())}onShiftRangeSelect(e){if(!this.beans.rangeService)return;const t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:i,beans:s,rowNode:n}=this,{gos:r,rangeService:o,eventService:a}=s;if(!i.isEditing()){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e===js.DELETE||!t&&e===js.BACKSPACE&&Gi()}(e,r.get("enableCellEditingOnBackspace"))){if(o&&le(r))o.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){const e=i.getColumn(),t=this.beans.valueService.getDeleteValue(e,n);n.setDataValue(e,t,"cellClear")}}else i.startRowOrCellEdit(e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gos.get("enterNavigatesVertically")){const t=e.shiftKey?js.UP:js.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(js.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(js.F2,e)}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;const t=e.key;" "===t?this.onSpaceKeyDown(e):this.cellCtrl.startRowOrCellEdit(t,e)&&e.preventDefault()}onSpaceKeyDown(e){const{gos:t}=this.beans;if(!this.cellCtrl.isEditing()&&N(t)){const i=this.rowNode.isSelected(),s=!i,n="filteredDescendants"===fe(t),r=this.rowNode.setSelectedParams({newValue:s,rangeSelect:e.shiftKey,groupSelectsFiltered:n,event:e,source:"spaceKey"});void 0===i&&0===r&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:n,event:e,source:"spaceKey"})}e.preventDefault()}destroy(){super.destroy()}},na=class extends ze{constructor(e,t,i){super(),this.cellCtrl=e,this.beans=t,this.column=i}onMouseEvent(e,t){if(!Oe(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}}onCellClicked(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();const{eventService:t,rangeService:i,gos:s}=this.beans,n=e.ctrlKey||e.metaKey;i&&n&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(r);const o=this.column.getColDef();o.onCellClicked&&window.setTimeout((()=>{this.beans.frameworkOverrides.wrapOutgoing((()=>{o.onCellClicked(r)}))}),0);!((s.get("singleClickEdit")||o.singleClickEdit)&&!s.get("suppressClickEdit"))||e.shiftKey&&0!=i?.getCellRanges().length||this.cellCtrl.startRowOrCellEdit()}isDoubleClickOnIPad(){if(!Bi()||Ge("dblclick"))return!1;const e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}onCellDoubleClicked(e){const{column:t,beans:i,cellCtrl:s}=this,{eventService:n,frameworkOverrides:r,gos:o}=i,a=t.getColDef(),l=s.createEvent(e,"cellDoubleClicked");n.dispatchEvent(l),"function"===typeof a.onCellDoubleClicked&&window.setTimeout((()=>{r.wrapOutgoing((()=>{a.onCellDoubleClicked(l)}))}),0);!o.get("singleClickEdit")&&!o.get("suppressClickEdit")&&s.startRowOrCellEdit(null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:s}=e,n=e.target,{cellCtrl:r,beans:o}=this,{eventService:a,rangeService:l,focusService:h,gos:c}=o;if(this.isRightClickInExistingRange(e))return;const d=l&&0!=l.getCellRanges().length;if(!s||!d){const t=c.get("enableCellTextSelection")&&e.defaultPrevented,i=(Fi()||t)&&!r.isEditing()&&!_i(n);r.focusCell(i)}if(s&&d&&!h.isCellFocused(r.getCellPosition())){e.preventDefault();const t=h.getFocusedCell();if(t){const{column:e,rowIndex:i,rowPinned:s}=t,n=o.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:s}),r=n?.getCellCtrl(e);r?.isEditing()&&r.stopEditing(),h.setFocusedCell({column:e,rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(n)){if(l){const e=this.cellCtrl.getCellPosition();if(s)l.extendLatestRangeToCell(e);else{const s=t||i;l.setRangeToCell(e,s)}}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeService:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),s=2===e.button||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&s)return!0}return!1}containsWidget(e){return Zi(e,"ag-selection-checkbox",3)}onMouseOut(e){this.mouseStayingInsideCell(e)||(this.beans.eventService.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),this.beans.columnHoverService.clearMouseOver())}onMouseOver(e){this.mouseStayingInsideCell(e)||(this.beans.eventService.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),this.beans.columnHoverService.setMouseOver([this.column]))}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.getGui(),i=t.contains(e.target),s=t.contains(e.relatedTarget);return i&&s}destroy(){super.destroy()}},ra=class extends ze{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventService,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();we(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventService,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eGui)return;const e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce(((e,t)=>e+t.getActualWidth()),0):this.column.getActualWidth()}getColSpanningList(){const e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else{let i=this.column;const s=this.column.getPinned();for(let n=0;i&&n<e&&(t.push(i),i=this.beans.visibleColsService.getColAfter(i),i&&!b(i))&&s===i.getPinned();n++);}return t}onLeftChanged(){if(!this.eGui)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}getCellLeft(){let e;return e=this.beans.gos.get("enableRtl")&&this.colsSpanning?Se(this.colsSpanning):this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||"left"===this.column.getPinned())return e;const t=this.beans.visibleColsService.getColsLeftWidth();if("right"===this.column.getPinned()){return t+this.beans.visibleColsService.getBodyContainerWidth()+(e||0)}return t+(e||0)}applyRowSpan(e){if(1===this.rowSpan&&!e)return;const t=V(this.beans.gos)*this.rowSpan;this.eGui.style.height=`${t}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},oa=(e=>(e[e.FILL=0]="FILL",e[e.RANGE=1]="RANGE",e))(oa||{}),aa=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(aa||{}),la="ag-cell-range-selected",ha=class{constructor(e,t){this.beans=e,this.rangeService=e.rangeService,this.selectionHandleFactory=e.selectionHandleFactory,this.cellCtrl=t}setComp(e,t){this.cellComp=e,this.eGui=t,this.onCellSelectionChanged()}onCellSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(la,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass(`${la}-1`,1===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${la}-2`,2===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${la}-3`,3===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${la}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),Ti(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){const e=this.getRangeBorders(),t=this.isSingleCell(),i=!t&&e.top,s=!t&&e.right,n=!t&&e.bottom,r=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",i),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",s),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",n),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",r)}isSingleCell(){const{rangeService:e}=this.beans;return 1===this.rangeCount&&!!e&&!e.isMoreThanOneCell()}getHasChartRange(){const{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;const t=e.getCellRanges();return t.length>0&&t.every((e=>Ee([1,0],e.type)))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){const e=this.beans.gos.get("enableRtl");let t=!1,i=!1,s=!1,n=!1;const r=this.cellCtrl.getCellPosition().column,o=this.beans.visibleColsService;let a,l;e?(a=o.getColAfter(r),l=o.getColBefore(r)):(a=o.getColBefore(r),l=o.getColAfter(r));const h=this.rangeService.getCellRanges().filter((e=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),e)));a||(n=!0),l||(i=!0);for(let c=0;c<h.length&&!(t&&i&&s&&n);c++){const e=h[c],r=this.rangeService.getRangeStartRow(e),o=this.rangeService.getRangeEndRow(e);!t&&this.beans.rowPositionUtils.sameRow(r,this.cellCtrl.getCellPosition())&&(t=!0),!s&&this.beans.rowPositionUtils.sameRow(o,this.cellCtrl.getCellPosition())&&(s=!0),!n&&a&&e.columns.indexOf(a)<0&&(n=!0),!i&&l&&e.columns.indexOf(l)<0&&(i=!0)}return{top:t,right:i,bottom:s,left:n}}refreshHandle(){if(this.beans.context.isDestroyed())return;const e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass("ag-cell-range-handle",!!this.selectionHandle)}shouldHaveSelectionHandle(){const e=this.beans.gos,t=this.rangeService.getCellRanges(),i=t.length;if(this.rangeCount<1||i<1)return!1;const s=Se(t),n=this.cellCtrl.getCellPosition(),r=he(e)&&!this.cellCtrl.isSuppressFillHandle(),o=function(e){const t=e.get("cellSelection");return void 0!==t?"boolean"!==typeof t&&"range"===t.handle?.mode:e.get("enableRangeHandle")}(e);let a=1===i&&!this.cellCtrl.isEditing()&&(r||o);if(this.hasChartRange){const e=1===t[0].type&&this.rangeService.isCellInSpecificRange(n,t[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",e),a=0===s.type}return a&&null!=s.endRow&&this.rangeService.isContiguousRange(s)&&this.rangeService.isBottomRightCell(s,n)}addSelectionHandle(){const e=Se(this.rangeService.getCellRanges()).type,t=he(this.beans.gos)&&b(e)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==t&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(t)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},ca=0,da=class e extends ze{constructor(e,t,i,s){super(),this.column=e,this.rowNode=t,this.beans=i,this.rowCtrl=s,this.cellRangeFeature=void 0,this.cellPositionFeature=void 0,this.cellCustomStyleFeature=void 0,this.tooltipFeature=void 0,this.cellMouseListenerFeature=void 0,this.cellKeyboardListenerFeature=void 0,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.onCellEditorAttachedFuncs=[],this.instanceId=e.getId()+"-"+ca++,this.colIdSanitised=At(this.column.getId()),this.createCellPosition(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}onFocusOut(){this.beans.focusService.clearRestoreFocus()}addFeatures(){this.cellPositionFeature=new ra(this,this.beans),this.cellCustomStyleFeature=new ia(this,this.beans),this.cellMouseListenerFeature=new na(this,this.beans,this.column),this.cellKeyboardListenerFeature=new sa(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature();this.beans.rangeService&&le(this.beans.gos)&&(this.cellRangeFeature=new ha(this.beans,this))}removeFeatures(){const e=this.beans.context;this.cellPositionFeature=e.destroyBean(this.cellPositionFeature),this.cellCustomStyleFeature=e.destroyBean(this.cellCustomStyleFeature),this.cellMouseListenerFeature=e.destroyBean(this.cellMouseListenerFeature),this.cellKeyboardListenerFeature=e.destroyBean(this.cellKeyboardListenerFeature),this.cellRangeFeature=e.destroyBean(this.cellRangeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){const i="whenTruncated"===this.beans.gos.get("tooltipShowMode");t||!i||this.isCellRenderer()||(t=()=>{const e=this.getGui(),t=0===e.children.length?e:e.querySelector(".ag-cell-value");return!t||t.scrollWidth>t.clientWidth});const s={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:null!=e?()=>e:()=>{const e=this.column.getColDef(),t=this.rowNode.data;if(e.tooltipField&&w(t))return rt(t,e.tooltipField,this.column.isTooltipFieldContainsDots());const i=e.tooltipValueGetter;return i?i(this.beans.gos.addGridCommonParams({location:"cell",colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted})):null},getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:t};this.tooltipFeature=new Ms(s,this.beans)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,i,s,n,r){this.cellComp=e,this.eGui=t,this.printLayout=s,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc((()=>this.removeFeatures())),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.cellPositionFeature?.setComp(t),this.cellCustomStyleFeature?.setComp(e),this.tooltipFeature?.refreshToolTip(),this.cellKeyboardListenerFeature?.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,t),n&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach((e=>e())),this.onCellCompAttachedFuncs=[])}setupAutoHeight(e,t){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!e)return;const i=e.parentElement,s=B(this.beans.gos,this.rowNode).height,n=r=>{if(this.editing)return;if(!this.isAlive()||!t.isAlive())return;const{paddingTop:o,paddingBottom:a,borderBottomWidth:l,borderTopWidth:h}=qi(i),c=o+a+l+h,d=e.offsetHeight+c;if(r<5){const t=j(this.beans.gos);if(!t||!t.contains(e)||0==d)return void window.setTimeout((()=>n(r+1)),0)}const u=Math.max(d,s);this.rowNode.setRowAutoHeight(u,this.column)},r=()=>n(0);r();const o=this.beans.resizeObserverService.observeResize(e,r);t.addDestroyFunc((()=>{o(),this.rowNode.setRowAutoHeight(void 0,this.column)}))}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return null!=e.cellRenderer||null!=e.cellRendererSelector}getValueToDisplay(){return this.valueFormatted??this.value}showValue(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{beans:t,column:i,rowNode:s,cellRangeFeature:n,cellComp:r}=this,{userComponentFactory:o,animationFrameService:a}=t,l=this.getValueToDisplay();let h;if(s.stub&&null==s.groupData?.[this.column.getId()]){const e=this.createCellRendererParams();h=o.getLoadingCellRendererDetails(i.getColDef(),e)}else if(this.isCellRenderer()){const e=this.createCellRendererParams();h=o.getCellRendererDetails(i.getColDef(),e)}r.setRenderDetails(h,l,e),a.requestAnimationFrame((()=>n?.refreshHandle()))}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return!(null!=this.rowNode.rowPinned)&&("function"===typeof e||!0===e)}isCheckboxSelection(e){const{rowSelection:t}=this.beans.gridOptions;return e.checkboxSelection||qe(this.column)&&t&&"string"!==typeof t&&se(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),s=this.includeDndSource!=this.isIncludeControl(e.dndSource),n=this.isAutoHeight!=this.column.isAutoHeight();return t||i||s||n}startEditing(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{editService:s}=this.beans;return!(this.isCellEditable()&&!this.editing&&s)||(this.cellComp?s.startEditing(this,e,t,i):(this.onCellCompAttachedFuncs.push((()=>{this.startEditing(e,t,i)})),!0))}setEditing(e,t){this.editCompDetails=t,this.editing!==e&&(this.editing=e)}stopRowOrCellEdit(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.stopEditing(e):this.stopEditing(e)}onPopupEditorClosed(){this.editing&&this.stopEditingAndFocus()}stopEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onCellEditorAttachedFuncs=[];const{editService:t}=this.beans;return!(!this.editing||!t)&&t.stopEditing(this,e)}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.beans.valueService.getValueForDisplay(this.column,this.rowNode),setValue:e=>this.beans.valueService.setValue(this.rowNode,this.column,e),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(e,t,i,s)=>this.registerRowDragger(e,t,s),setTooltip:(e,t)=>{this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(e,t),this.tooltipFeature?.refreshToolTip()}})}setFocusOutOnEditor(){this.editing&&this.beans.editService?.setFocusOutOnEditor(this)}setFocusInOnEditor(){this.editing&&this.beans.editService?.setFocusInOnEditor(this)}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e)}refreshCell(e){if(this.suppressRefreshCell||this.editing)return;const t=this.column.getColDef(),i=null!=e&&!!e.newData,s=null!=e&&!!e.suppressFlash||!!t.suppressCellFlash,n=null==t.field&&null==t.valueGetter&&null==t.showRowGroup,r=e&&e.forceRefresh||n||i,o=!!this.cellComp,a=this.updateAndFormatValue(o);if(o){if(r||a){this.showValue(i);const e=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!s&&!e&&(this.beans.gos.get("enableCellChangeFlash")||t.enableCellChangeFlash)&&this.flashCell(),this.cellCustomStyleFeature?.applyUserStyles(),this.cellCustomStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshToolTip(),this.cellCustomStyleFeature?.applyCellClassRules()}}stopEditingAndFocus(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.beans.editService?.stopEditingAndFocus(this,e,t)}flashCell(e){const t=e?.flashDuration??e?.flashDelay,i=e?.fadeDuration??e?.fadeDelay;this.animateCell("data-changed",t,i)}animateCell(e,t,i){if(!this.cellComp)return;const{gos:s}=this.beans;if(t||(t=s.get("cellFlashDuration")),0===t)return;w(i)||(i=s.get("cellFadeDuration"));const n=`ag-cell-${e}`,r=`ag-cell-${e}-animation`;this.cellComp.addOrRemoveCssClass(n,!0),this.cellComp.addOrRemoveCssClass(r,!1),this.beans.frameworkOverrides.wrapIncoming((()=>{window.setTimeout((()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(n,!1),this.cellComp.addOrRemoveCssClass(r,!0),this.eGui.style.transition=`background-color ${i}ms`,window.setTimeout((()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(r,!1),this.eGui.style.transition="")}),i))}),t)}))}onFlashCells(e){if(!this.cellComp)return;const t=this.beans.cellPositionUtils.createId(this.getCellPosition());e.cells[t]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueService.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,i=this.valueFormatted;return this.value=this.beans.valueService.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),!e||(!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i)}valuesAreEqual(e,t){const i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}getComp(){return this.cellComp}getValue(){return this.value}addDomData(t){const i=this.getGui();W(this.beans.gos,i,e.DOM_DATA_KEY_CELL_CTRL,this),t.addDestroyFunc((()=>W(this.beans.gos,i,e.DOM_DATA_KEY_CELL_CTRL,null)))}createEvent(e,t){return this.beans.gos.addGridCommonParams({type:t,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex})}processCharacter(e){this.cellKeyboardListenerFeature?.processCharacter(e)}onKeyDown(e){this.cellKeyboardListenerFeature?.onKeyDown(e)}onMouseEvent(e,t){this.cellMouseListenerFeature?.onMouseEvent(e,t)}getGui(){return this.eGui}getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){this.cellComp&&this.cellPositionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{cellComp:e,column:t,beans:i}=this;Wr(e,t,i.visibleColsService)}refreshAriaColIndex(){const e=this.beans.visibleColsService.getAriaColIndex(this.column);Ii(this.getGui(),e)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){return this.cellPositionFeature?.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}isPrintLayout(){return this.printLayout}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cellComp?"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.startRowEditing(e,this):this.startEditing(e,!0,t):(this.onCellCompAttachedFuncs.push((()=>{this.startRowOrCellEdit(e,t)})),!0)}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onCellSelectionChanged()}isRangeSelectionEnabled(){return null!=this.cellRangeFeature}focusCell(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onCellSelectionChanged()}onSuppressCellFocusChanged(e){this.eGui&&ys(this.eGui,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.cellComp)return;const e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",e)}onLastLeftPinnedChanged(){if(!this.cellComp)return;const e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",e)}onCellFocused(e){if(this.beans.focusService.isCellFocusSuppressed())return;const t=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp)return void(t&&e?.forceBrowserFocus&&(this.focusEventToRestore=e));if(this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass("ag-cell-focus",t),t&&e&&e.forceBrowserFocus){let t=this.cellComp.getFocusableElement();if(this.editing){const e=this.beans.focusService.findFocusableElements(t,null,!0);e.length&&(t=e[0])}t.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const i="fullRow"===this.beans.gos.get("editType");t||i||!this.editing||this.stopRowOrCellEdit(),t&&this.rowCtrl.announceDescription()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:S(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass("ag-cell-not-inline-editing",!0);const e=1==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",e),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!e)}onColumnHover(){if(!this.cellComp)return;if(!this.beans.gos.get("columnHoverHighlight"))return;const e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",e)}onColDefChanged(){if(!this.cellComp)return;this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?this.beans.editService?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}setWrapText(){const e=1==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu");this.beans.eventService.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout((()=>{this.beans.frameworkOverrides.wrapOutgoing((()=>{t.onCellContextMenu(i)}))}),0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],this.onCellEditorAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){const e=new ea;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=new ta(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp)return void this.customRowDragComp.setDragElement(e,t);const s=this.createRowDragComp(e,t,i);s&&(this.customRowDragComp=s,this.addDestroyFunc((()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null})))}createRowDragComp(e,t,i){const s=this.beans.gos.get("pagination"),n=this.beans.gos.get("rowDragManaged"),r=L(this.beans.gos);if(n){if(!r)return void h("managed row dragging is only allowed in the Client Side Row Model");if(s)return void h("managed row dragging is not possible when doing pagination")}const o=new Wn((()=>this.value),this.rowNode,this.column,e,t,i);return this.beans.context.createBean(o),o}setSuppressRefreshCell(e){this.suppressRefreshCell=e}getEditCompDetails(){return this.editCompDetails}onCellEditorAttached(e){this.onCellEditorAttachedFuncs.push(e)}cellEditorAttached(){this.onCellEditorAttachedFuncs.forEach((e=>e())),this.onCellEditorAttachedFuncs=[]}};da.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var ua=da,pa=0,ga=class e extends ze{constructor(e,t,i,s,n){super(),this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKeySanitised=null,this.beans=t,this.gos=t.gos,this.rowNode=e,this.paginationPage=t.paginationService?.getCurrentPage()??0,this.useAnimationFrameForCreate=s,this.printLayout=n,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+pa++,this.rowId=At(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=t.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!==typeof this.businessKeyForNodeFunc)return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=At(e)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}isSticky(){return this.rowNode.sticky}updateGui(e,t){"left"===e?this.leftGui=t:"right"===e?this.rightGui=t:"fullWidth"===e?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,i,s){const n={rowComp:e,element:t,containerType:i,compBean:s=Yt(this,this.beans.context,s)};this.allRowGuis.push(n),this.updateGui(i,n),this.initialiseRowComp(n),"FullWidthLoading"===this.rowType||this.rowNode.rowPinned||this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter((t=>t.containerType!==e)),this.updateGui(e,void 0)}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach((e=>e.element.style.display=t))}initialiseRowComp(t){const i=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),N(i)&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=t.rowComp;this.getInitialRowClasses(t.containerType).forEach((e=>s.addOrRemoveCssClass(e,!0))),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&Ci(t.element,1==this.rowNode.expanded),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),W(i,t.element,e.DOM_DATA_KEY_ROW_CTRL,this),t.compBean.addDestroyFunc((()=>W(i,t.element,e.DOM_DATA_KEY_ROW_CTRL,null))),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t),this.isFullWidth()&&this.setupFullWidth(t),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask((()=>{this.isAlive()&&t.rowComp.addOrRemoveCssClass("ag-after-created",!0)})),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){null!=this.businessKeySanitised&&e.setRowBusinessKey(this.businessKeySanitised)}getBusinessKey(){return this.businessKeySanitised}setRowCompRowId(e){this.rowId=At(this.rowNode.id),null!=this.rowId&&e.setRowId(this.rowId)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(m((()=>{this.onTopChanged()})),this.slideInAnimation[t]=!1);this.fadeInAnimation[t]&&(m((()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)})),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){if(le(this.gos))return void h("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `cellSelection: true`");const t=this.beans.localeService.getLocaleTextFunc(),i=new Wn((()=>`1 ${t("rowDragRow","row")}`),this.rowNode,void 0,e.element,void 0,!0),s=this.createBean(i,this.beans.context);this.rowDragComps.push(s),e.compBean.addDestroyFunc((()=>{this.rowDragComps=this.rowDragComps.filter((e=>e!==s)),this.destroyBean(s,this.beans.context)}))}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType);if("FullWidthDetail"==this.rowType&&!this.gos.assertModuleRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)"))return;
2const i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map((e=>e?.rowComp?.getFullWidthCellRenderer())):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}getCellElement(e){const t=this.getCellCtrl(e);return t?t.getGui():null}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;e({eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})}areAllContainersReady(){const e=!!this.leftGui||!this.beans.visibleColsService.isPinningLeft(),t=!!this.centerGui,i=!!this.rightGui||!this.beans.visibleColsService.isPinningRight();return e&&t&&i}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this.rowNode})}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),i=this.gos.get("masterDetail")&&this.rowNode.detail,s=this.beans.columnModel.isPivotMode(),n=!!this.rowNode.group&&!this.rowNode.footer&&te(this.gos,s);this.rowType=e?"FullWidthLoading":i?"FullWidthDetail":t?"FullWidth":n?"FullWidthGroup":"Normal"}updateColumnLists(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.isFullWidth())return;e||this.gos.get("suppressAnimationFrame")||this.printLayout?this.updateColumnListsImpl(t):this.updateColumnListsPending||(this.beans.animationFrameService.createTask((()=>{this.active&&this.updateColumnListsImpl(!0)}),this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}createCellCtrls(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const s={list:[],map:{}},n=(e,t)=>{s.list.push(t),s.map[e]=t};return t.forEach((t=>{const i=t.getInstanceId();let s=e.map[i];s||(s=new ua(t,this.rowNode,this.beans,this)),n(i,s)})),e.list.forEach((e=>{const t=e.getColumn().getInstanceId();if(null!=s.map[t])return;this.isCellEligibleToBeRemoved(e,i)?e.destroy():n(t,e)})),s}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach((t=>{const i=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(i,e)}))}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.columnViewportService,t=this.beans.visibleColsService;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllCols()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const i=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);const s=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");const n=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,n,"right")}}isCellEligibleToBeRemoved(e,t){const i=!0;if(e.getColumn().getPinned()!=t)return i;const s=e.isEditing(),n=this.beans.focusService.isCellFocused(e.getCellPosition());if(s||n){const t=e.getColumn();return!(this.beans.visibleColsService.getAllCols().indexOf(t)>=0)&&i}return i}getDomOrder(){return this.gos.get("ensureDomOrder")||k(this.gos,"print")}listenOnDomOrder(e){e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],(()=>{e.rowComp.setDomOrder(this.getDomOrder())}))}setAnimateFlags(e){if(this.isSticky()||!e)return;const t=w(this.rowNode.oldRowTop),i=this.beans.visibleColsService.isPinningLeft(),s=this.beans.visibleColsService.isPinningRight();if(t){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(this.slideInAnimation.fullWidth=!0);
vendor: 9,616 bytes, line 2
2this.slideInAnimation.center=!0,this.slideInAnimation.left=i,this.slideInAnimation.right=s}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(this.fadeInAnimation.fullWidth=!0);this.fadeInAnimation.center=!0,this.fadeInAnimation.left=i,this.fadeInAnimation.right=s}}isEditing(){return this.editingRow}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){const e=(e,t)=>!e||e.rowComp.refreshFullWidth((()=>this.createFullWidthCompDetails(e.element,t).params)),t=e(this.fullWidthGui,null),i=e(this.centerGui,null),s=e(this.leftGui,"left"),n=e(this.rightGui,"right");return t&&i&&s&&n}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),expandedChanged:this.updateExpandedCss.bind(this),hasChildrenChanged:this.updateExpandedCss.bind(this)}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventService,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.addDestroyFunc((()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))})),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",(()=>{this.gos.get("rowDragEntireRow")?this.allRowGuis.forEach((e=>{this.addRowDraggerToRow(e)})):this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)})),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach((e=>e.onRowIndexChanged()))},cellChanged:e=>{this.getAllCellCtrls().forEach((t=>t.onCellChanged(e)))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell())this.beans.rowRenderer.redrawRow(this.rowNode);else if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode)}else this.getAllCellCtrls().forEach((t=>t.refreshCell({suppressFlash:!e.update,newData:!e.update}))),this.allRowGuis.forEach((e=>{this.setRowCompRowId(e.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(e.rowComp)})),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach((t=>{const i=0===e,s=1===e;t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",i),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",s)}))}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach((t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e)))}updateExpandedCss(){const e=this.rowNode.isExpandable(),t=1==this.rowNode.expanded;this.allRowGuis.forEach((i=>{i.rowComp.addOrRemoveCssClass("ag-row-group",e),i.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),i.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),Ci(i.element,e&&t)}))}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:S(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}findFullWidthRowGui(e){return this.allRowGuis.find((t=>t.element.contains(e)))}onKeyboardNavigate(e){const t=this.findFullWidthRowGui(e.target);if(!((t?t.element:null)===e.target))return;const i=this.rowNode,s=this.beans.focusService.getFocusedCell(),n={rowIndex:i.rowIndex,rowPinned:i.rowPinned,column:s?.column??this.getColumnForFullWidth(t)};this.beans.navigationService.navigateToNextCell(e,e.key,n,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||Oe(e))return;const t=this.allRowGuis.find((t=>t.element.contains(e.target))),i=t?t.element:null,s=i===e.target,n=K(this.gos);let r=!1;i&&n&&(r=i.contains(n)&&n.classList.contains("ag-cell"));let o=null;s||r||(o=this.beans.focusService.findNextFocusableElement(i,!1,e.shiftKey)),(this.isFullWidth()&&s||!o)&&this.beans.navigationService.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find((e=>ls(e.element)))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach((e=>{ys(e.element,"tabindex",t)}))}onFullWidthRowFocused(e){const t=this.rowNode,i=!!e&&(this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned),s=this.fullWidthGui?this.fullWidthGui.element:this.centerGui?.element;s&&(s.classList.toggle("ag-full-width-focus",i),i&&e?.forceBrowserFocus&&s.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const i={list:[],map:{}};return e.list.forEach((e=>{e!==t&&(i.list.push(e),i.map[e.getColumn().getInstanceId()]=e)})),i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t)}}createRowEvent(e,t){return this.gos.addGridCommonParams({type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:t})}createRowEventWithSource(e,t){const i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){Oe(e)||this.beans.eventService.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}getColumnForFullWidth(e){const{visibleColsService:t}=this.beans;switch(e?.containerType){case"center":return t.getCenterCols()[0];case"left":return t.getLeftCols()[0];case"right":return t.getRightCols()[0];default:return t.getAllCols()[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=Zi(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges();const i=this.findFullWidthRowGui(e.target),s=i?.element,n=e.target;let r=!0;s&&s.contains(n)&&_i(n)&&(r=!1),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:this.getColumnForFullWidth(i),rowPinned:t.rowPinned,forceBrowserFocus:r})}onRowClick(e){if(Oe(e)||this.lastMouseDownOnDragger)return;const{gos:t}=this;this.beans.eventService.dispatchEvent(this.createRowEventWithSource("rowClicked",e));const i=e.ctrlKey||e.metaKey,s=e.shiftKey,n=this.rowNode.isSelected(),r=ve(t),o=ue(t),a=function(e){const t=de(e);return!0===t||"enableSelection"===t}(t);if(r&&this.rowNode.group||this.isRowSelectionBlocked()||!a&&!n||!o&&n)return;const l=function(e){const t=e.get("rowSelection");return"string"===typeof t?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}(t),h="rowClicked";if(n)l?this.rowNode.setSelectedParams({newValue:!1,event:e,source:h}):i?o&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:h}):a&&this.rowNode.setSelectedParams({newValue:!0,clearSelection:!s,rangeSelect:s,event:e,source:h});else{const t=!l&&!i;this.rowNode.setSelectedParams({newValue:!0,clearSelection:t,rangeSelect:s,event:e,source:h})}}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!N(this.gos)}setupDetailRowAutoHeight(e){if("FullWidthDetail"!==this.rowType)return;if(!this.gos.get("detailRowAutoHeight"))return;const t=()=>{const t=e.clientHeight;if(null!=t&&t>0){const e=()=>{this.rowNode.setRowHeight(t),(L(this.gos)||F(this.gos))&&this.beans.rowModel.onRowHeightChanged()};window.setTimeout(e,0)}},i=this.beans.resizeObserverService.observeResize(e,t);this.addDestroyFunc(i),t()}createFullWidthCompDetails(e,t){const{gos:i,rowNode:s}=this,n=i.addGridCommonParams({fullWidth:!0,data:s.data,node:s,value:s.key,valueFormatted:s.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(e,t,i,s)=>this.addFullWidthRowDragging(e,t,i,s),setTooltip:(e,t)=>this.refreshRowTooltip(e,t)}),r=this.beans.userComponentFactory;switch(this.rowType){case"FullWidthDetail":return r.getFullWidthDetailCellRendererDetails(n);case"FullWidthGroup":return r.getFullWidthGroupCellRendererDetails(n);case"FullWidthLoading":return r.getFullWidthLoadingCellRendererDetails(n);default:return r.getFullWidthCellRendererDetails(n)}}refreshRowTooltip(e,t){if(!this.fullWidthGui)return;const i={getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>e,getLocation:()=>
2"fullWidthRow",shouldDisplayTooltip:t};this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new Ms(i,this.beans))}addFullWidthRowDragging(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=arguments.length>3?arguments[3]:void 0;if(!this.isFullWidth())return;const n=new Wn((()=>i),this.rowNode,void 0,e,t,s);this.createBean(n,this.beans.context),this.addDestroyFunc((()=>{this.destroyBean(n,this.beans.context)}))}onUiLevelChanged(){const e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach((e=>{e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(i,!1)}))}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBoundsService.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBoundsService.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach((t=>t.rowComp.addOrRemoveCssClass("ag-row-first",e)))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach((e=>e.rowComp.addOrRemoveCssClass("ag-row-last",t))))}stopEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.stoppingRowEdit||this.beans.rowEditService?.stopEditing(this,e)}setInlineEditingCss(){const e=this.editingRow||this.getAllCellCtrls().some((e=>e.isEditing()));this.allRowGuis.forEach((t=>{t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)}))}setEditingRow(e){this.editingRow=e}startRowEditing(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return!!this.editingRow||(this.beans.rowEditService?.startEditing(this,e,t,i)??!0)}getAllCellCtrls(){if(0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length)return this.centerCellCtrls.list;return[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);e&&e.length&&e.forEach((e=>{this.allRowGuis.forEach((t=>t.rowComp.addOrRemoveCssClass(e,!0)))}))}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,(e=>{this.allRowGuis.forEach((t=>t.rowComp.addOrRemoveCssClass(e,!0)))}),(e=>{this.allRowGuis.forEach((t=>t.rowComp.addOrRemoveCssClass(e,!1)))}))}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,(e=>e.rowComp.setUserStyles(this.rowStyles)))}getPinnedForContainer(e){return"left"===e||"right"===e?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),i={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2===0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:t};return this.beans.rowCssClassCalculator.getInitialRowClasses(i)}processStylesFromGridOptions(){const e=this.gos.get("rowStyle");if(e&&"function"===typeof e)return void h("rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");const t=this.gos.getCallback("getRowStyle");let i;if(t){i=t({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex})}return i||e?Object.assign({},e,i):this.emptyStyle}onRowSelected(e){const t=!!this.rowNode.isSelected();this.forEachGui(e,(e=>{e.rowComp.addOrRemoveCssClass("ag-row-selected",t),Ti(e.element,t);!e.element.contains(K(this.gos))||e!==this.centerGui&&e!==this.fullWidthGui||this.announceDescription()}))}announceDescription(){if(this.isRowSelectionBlocked())return;const e=this.rowNode.isSelected();if(e&&!ue(this.gos))return;const t=this.beans.localeService.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${e?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(t,"rowSelection")}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:i}=e,{rowNode:s,beans:n,gos:r}=this;i.addManagedListeners(t,{mouseenter:()=>s.onMouseEnter(),mouseleave:()=>s.onMouseLeave()}),i.addManagedListeners(s,{mouseEnter:()=>{n.dragService.isDragging()||r.get("suppressRowHoverHighlight")||(t.classList.add("ag-row-hover"),s.setHovered(!0))},mouseLeave:()=>{t.classList.remove("ag-row-hover"),s.setHovered(!1)}})}roundRowTopToBounds(e){const t=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature
vendor: 39,025 bytes, line 2
2().getApproximateVScollPosition(),i=this.applyPaginationOffset(t.top,!0)-100,s=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(i,e),s)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}onRowHeightChanged(e){if(null==this.rowNode.rowHeight)return;const t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),s=G(this.gos)?B(this.gos,this.rowNode).height:void 0,n=s?Math.min(i,s)-2+"px":void 0;this.forEachGui(e,(e=>{e.element.style.height=`${t}px`,n&&e.element.style.setProperty("--ag-line-height",n)}))}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}destroyFirstPass(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.active=!1,!e&&Y(this.gos)&&!this.isSticky()){if(null!=this.rowNode.rowTop){const e=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(e)}else this.allRowGuis.forEach((e=>e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0)))}this.rowNode.setHovered(!1);const t=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(t),this.beans.eventService.dispatchEvent(t),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();const e=e=>(e.list.forEach((e=>e.destroy())),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,(e=>{e.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),e.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)}))}onCellFocusChanged(){const e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){const e=this.beans.paginationService?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;return e+this.beans.pageBoundsService.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&w(e)){const t=this.applyPaginationOffset(e),i=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeightService.getRealPixelPosition(t)}px`;this.setRowTopStyle(i)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let i;if(this.isSticky())i=t.stickyRowTop;else{const s=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,n=this.applyPaginationOffset(s);i=t.isRowPinned()?n:this.beans.rowContainerHeightService.getRealPixelPosition(n)}return i+"px"}setRowTopStyle(e){this.allRowGuis.forEach((t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)))}getRowNode(){return this.rowNode}getCellCtrl(e){let t=null;return this.getAllCellCtrls().forEach((i=>{i.getColumn()==e&&(t=i)})),null!=t||this.getAllCellCtrls().forEach((i=>{i.getColSpanningList().indexOf(e)>=0&&(t=i)})),t}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getRowIndex(){return this.rowNode.getRowIndexString()}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(null===t)return;const i=this.beans.headerNavigationService.getHeaderRowCount()+(this.beans.filterManager?.getHeaderRowCount()??0),s=this.rowNode.rowIndex%2===0,n=i+this.rowNode.rowIndex+1;this.forEachGui(e,(e=>{e.rowComp.setRowIndex(t),e.rowComp.addOrRemoveCssClass("ag-row-even",s),e.rowComp.addOrRemoveCssClass("ag-row-odd",!s),Mi(e.element,n)}))}setStoppingRowEdit(e){this.stoppingRowEdit=e}};ga.DOM_DATA_KEY_ROW_CTRL="renderedRow";var ma=ga,fa=class extends ze{wireBeans(e){this.mouseEventService=e.mouseEventService,this.valueService=e.valueService,this.menuService=e.menuService,this.ctrlsService=e.ctrlsService,this.navigationService=e.navigationService,this.focusService=e.focusService,this.undoRedoService=e.undoRedoService,this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.rangeService=e.rangeService,this.clipboardService=e.clipboardService}constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Ge("touchstart")?"touchstart":"mousedown"].forEach((e=>{const t=this.processMouseEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}))}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||Oe(t))return;const i=this.getRowForEvent(t),s=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,void 0,i,s):(s&&s.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}mockContextMenuForIPad(){if(!Bi())return;const e=new ks(this.element);this.addManagedListeners(e,{longTap:e=>{const t=this.getRowForEvent(e.touchEvent),i=this.mouseEventService.getRenderedCellForEvent(e.touchEvent);this.handleContextMenuMouseEvent(void 0,e.touchEvent,t,i)}}),this.addDestroyFunc((()=>e.destroy()))}getRowForEvent(e){let t=e.target;for(;t;){const e=H(this.gos,t,ma.DOM_DATA_KEY_ROW_CTRL);if(e)return e;t=t.parentElement}return null}handleContextMenuMouseEvent(e,t,i,s){const n=i?i.getRowNode():null,r=s?s.getColumn():null;let o=null;if(r){const i=e||t;s.dispatchCellContextMenuEvent(i??null),o=this.valueService.getValue(r,n)}const a=this.ctrlsService.getGridBodyCtrl(),l=s?s.getGui():a.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:n,column:r,value:o,anchorToElement:l})}getControlsForEventTarget(e){return{cellCtrl:Be(this.gos,e,ua.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Be(this.gos,e,ma.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,i){const s=e.getRowNode(),n=e.getColumn(),r=e.isEditing();if(!mr(this.gos,i,s,n,r)&&"keydown"===t){!r&&this.navigationService.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),gr(i)&&e.processCharacter(i)}"keydown"===t&&this.eventService.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){const s=e.getRowNode(),n=this.focusService.getFocusedCell(),r=n&&n.column;if(!mr(this.gos,i,s,r,!1)){const s=i.key;if("keydown"===t)switch(s){case js.PAGE_HOME:case js.PAGE_END:case js.PAGE_UP:case js.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case js.UP:case js.DOWN:e.onKeyboardNavigate(i);break;case js.TAB:e.onTabKeyDown(i)}}"keydown"===t&&this.eventService.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey)return;if(t)return;if(!this.mouseEventService.isEventFromThisGrid(e))return;const i=function(e){const{keyCode:t}=e;let i;switch(t){case 65:i=js.A;break;case 67:i=js.C;break;case 86:i=js.V;break;case 68:i=js.D;break;case 90:i=js.Z;break;case 89:i=js.Y;break;default:i=e.code}return i}(e);return i===js.A?this.onCtrlAndA(e):i===js.C?this.onCtrlAndC(e):i===js.D?this.onCtrlAndD(e):i===js.V?this.onCtrlAndV(e):i===js.X?this.onCtrlAndX(e):i===js.Y?this.onCtrlAndY():i===js.Z?this.onCtrlAndZ(e):void 0}onCtrlAndA(e){const{pinnedRowModel:t,rowModel:i,rangeService:s}=this;if(s&&i.isRowsToRender()){const[e,n]=[t.isEmpty("top"),t.isEmpty("bottom")],r=e?null:"top";let o,a;n?(o=null,a=i.getRowCount()-1):(o="bottom",a=t.getPinnedBottomRowCount()-1);const l=this.visibleColsService.getAllCols();if(x(l))return;s.setCellRange({rowStartIndex:0,rowStartPinned:r,rowEndIndex:a,rowEndPinned:o,columnStart:l[0],columnEnd:Se(l)})}e.preventDefault()}onCtrlAndC(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t?.isEditing()||i?.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t?.isEditing()||i?.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(e){const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t?.isEditing()||i?.isEditing()||this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()}onCtrlAndD(e){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}onCtrlAndZ(e){this.gos.get("undoRedoCellEditing")&&this.undoRedoService&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){this.undoRedoService?.redo("ui")}},va=class extends ze{wireBeans(e){this.pinnedWidthService=e.pinnedWidthService}constructor(e){super(),this.element=e}postConstruct(){this.addManagedEventListeners({leftPinnedWidthChanged:this.onPinnedLeftWidthChanged.bind(this)})}onPinnedLeftWidthChanged(){const e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;Ki(this.element,t),gs(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}},ya=class extends ze{wireBeans(e){this.pinnedWidthService=e.pinnedWidthService}constructor(e){super(),this.element=e}postConstruct(){this.addManagedEventListeners({rightPinnedWidthChanged:this.onPinnedRightWidthChanged.bind(this)})}onPinnedRightWidthChanged(){const e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;Ki(this.element,t),gs(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}},Ca=e=>e.getTopRowCtrls(),Sa=e=>e.getStickyTopRowCtrls(),wa=e=>e.getStickyBottomRowCtrls(),ba=e=>e.getBottomRowCtrls(),xa=e=>e.getCentreRowCtrls(),Ma={center:{type:"center",container:"ag-center-cols-container",viewport:"ag-center-cols-viewport",getRowCtrls:xa},left:{type:"left",container:"ag-pinned-left-cols-container",pinnedType:"left",getRowCtrls:xa},right:{type:"right",container:"ag-pinned-right-cols-container",pinnedType:"right",getRowCtrls:xa},fullWidth:{type:"fullWidth",container:"ag-full-width-container",fullWidth:!0,getRowCtrls:xa},topCenter:{type:"center",container:"ag-floating-top-container",viewport:"ag-floating-top-viewport",getRowCtrls:Ca},topLeft:{type:"left",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Ca},topRight:{type:"right",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Ca},topFullWidth:{type:"fullWidth",container:"ag-floating-top-full-width-container",fullWidth:!0,getRowCtrls:Ca},stickyTopCenter:{type:"center",container:"ag-sticky-top-container",viewport:"ag-sticky-top-viewport",getRowCtrls:Sa},stickyTopLeft:{type:"left",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Sa},stickyTopRight:{type:"right",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Sa},stickyTopFullWidth:{type:"fullWidth",container:"ag-sticky-top-full-width-container",fullWidth:!0,getRowCtrls:Sa},stickyBottomCenter:{type:"center",container:"ag-sticky-bottom-container",viewport:"ag-sticky-bottom-viewport",getRowCtrls:wa},stickyBottomLeft:{type:"left",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:wa},stickyBottomRight:{type:"right",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:wa},stickyBottomFullWidth:{type:"fullWidth",container:"ag-sticky-bottom-full-width-container",fullWidth:!0,getRowCtrls:wa},bottomCenter:{type:"center",container:"ag-floating-bottom-container",viewport:"ag-floating-bottom-viewport",getRowCtrls:ba},bottomLeft:{type:"left",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:ba},bottomRight:{type:"right",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:ba},bottomFullWidth:{type:"fullWidth",container:"ag-floating-bottom-full-width-container",fullWidth:!0,getRowCtrls:ba}};function Da(e){return Ma[e]}var Ia=["center","left","right","fullWidth"],Ra=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],Ea=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Aa=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],Ta=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Pa=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],La=[...Ta,"stickyTopFullWidth",...Pa,"stickyBottomFullWidth"],Fa=["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right",...Ta,...Pa],ka=class extends ze{constructor(e){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=e,this.options=Da(e)}wireBeans(e){this.dragService=e.dragService,this.ctrlsService=e.ctrlsService,this.columnViewportService=e.columnViewportService,this.resizeObserverService=e.resizeObserverService,this.rowRenderer=e.rowRenderer}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],(()=>{this.viewportSizeFeature=this.createManagedBean(new Xo(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})}))}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.ctrlsService.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(e,t,i){this.comp=e,this.eContainer=t,this.eViewport=i,this.createManagedBean(new fa(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const s=()=>this.onPinnedWidthChanged();this.forContainers(Ea,(()=>{this.pinnedWidthFeature=this.createManagedBean(new va(this.eContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:s})})),this.forContainers(Aa,(()=>{this.pinnedWidthFeature=this.createManagedBean(new ya(this.eContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:s})})),this.forContainers(Ia,(()=>this.createManagedBean(new $o(this.eContainer,"center"===this.name?i:void 0)))),this.forContainers(Fa,(()=>this.createManagedBean(new Jo(this.eContainer)))),this.forContainers(Ra,(()=>this.createManagedBean(new wo((e=>this.comp.setContainerWidth(`${e}px`)))))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}addListeners(){this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),displayedRowsChanged:e=>this.onDisplayedRowsChanged(e.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(La.indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);const e=()=>{const e=this.gos.get("ensureDomOrder"),t=k(this.gos,"print");this.comp.setDomOrder(e||t)};this.addManagedPropertyListener("domLayout",e),e()}onDisplayedColumnsChanged(){this.forContainers(["center"],(()=>this.onHorizontalViewportChanged()))}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],(()=>this.onHorizontalViewportChanged()))}addPreventScrollWhileDragging(){const e=e=>{this.dragService.isDragging()&&e.cancelable&&e.preventDefault()};this.eContainer.addEventListener("touchmove",e,{passive:!1}),this.addDestroyFunc((()=>this.eContainer.removeEventListener("touchmove",e)))}onHorizontalViewportChanged(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.columnViewportService.setScrollPosition(t,i,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return Xi(this.eViewport)}getCenterViewportScrollLeft(){return ss(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc((()=>t()))}isViewportInTheDOMTree(){return as(this.eViewport)}getViewportScrollLeft(){return ss(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||(e=this.eViewport).clientWidth<e.scrollWidth;var e}getViewportElement(){return this.eViewport}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){ns(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(null!=this.options.pinnedType)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.options.getRowCtrls(this.rowRenderer);if(!this.visible||0===t.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});const i=k(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||i,n=t.filter((e=>{const t=e.isFullWidth();return this.options.fullWidth?!s&&t:s||!t}));this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},Na="ag-force-vertical-scroll",Oa=class extends ze{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.animationFrameService=e.animationFrameService,this.rowContainerHeightService=e.rowContainerHeightService,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.scrollVisibleService=e.scrollVisibleService,this.menuService=e.menuService,this.headerNavigationService=e.headerNavigationService,this.dragAndDropService=e.dragAndDropService,this.pinnedRowModel=e.pinnedRowModel,this.rowRenderer=e.rowRenderer,this.popupService=e.popupService,this.mouseEventService=e.mouseEventService,this.rowModel=e.rowModel,this.filterManager=e.filterManager,this.environment=e.environment}getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,t,i,s,n,r,o){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=s,this.eBottom=n,this.eStickyTop=r,this.eStickyBottom=o,this.eCenterColsViewport=i.querySelector(`.${Da("center").viewport}`),this.eFullWidthContainer=i.querySelector(`.${Da("fullWidth").container}`),this.eStickyTopFullWidthContainer=r.querySelector(`.${Da("stickyTopFullWidth").container}`),this.eStickyBottomFullWidthContainer=o.querySelector(`.${Da("stickyBottomFullWidth").container}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",(e=>this.setCellTextSelection(e.currentValue))),this.createManagedBean(new Ho(this.comp)),this.bodyScrollFeature=this.createManagedBean(new Qo(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,n,r,o]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvancedFilterHeaderComp(s),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){const e=this.setFloatingHeights.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.onScrollGapChanged.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.onHeaderHeightChanged.bind(this)})}addFocusListeners(e){e.forEach((e=>{this.addManagedElementListeners(e,{focusin:t=>{const{target:i}=t,s=Zi(i,"ag-root",e);e.classList.toggle("ag-has-focus",!s)},focusout:t=>{const{target:i,relatedTarget:s}=t,n=e.contains(s),r=Zi(s,"ag-root",e);Zi(i,"ag-root",e)||n&&!r||e.classList.remove("ag-has-focus")}})}))}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.comp.setCellSelectableCss("ag-selectable",e)}onScrollVisibilityChanged(){const e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();const t=`calc(100% + ${(e&&this.scrollVisibleService.getScrollbarWidth()||0)+(Wi()?16:0)}px)`;this.animationFrameService.requestAnimationFrame((()=>this.comp.setBodyViewportWidth(t))),this.updateScrollingClasses()}onScrollGapChanged(){this.updateScrollingClasses()}updateScrollingClasses(){this.eGridBody.classList.toggle("ag-body-vertical-content-no-gap",!this.scrollVisibleService.hasVerticalScrollGap()),this.eGridBody.classList.toggle("ag-body-horizontal-content-no-gap",!this.scrollVisibleService.hasHorizontalScrollGap())}onGridColumnsChanged(){const e=this.columnModel.getCols();this.comp.setColumnCount(e.length)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;const e=e=>{const i=e.relatedTarget;if(null===zi(i))return void this.rowRenderer.stopEditing();let s=t.some((e=>e.contains(i)))&&this.mouseEventService.isElementInThisGrid(i);if(!s){const e=this.popupService;s=e.getActivePopups().some((e=>e.contains(i)))||e.isElementWithinCustomPopup(i)}s||this.rowRenderer.stopEditing()},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];t.forEach((t=>this.addManagedElementListeners(t,{focusout:e})))}updateRowCount(){const e=this.headerNavigationService.getHeaderRowCount()+(this.filterManager?.getHeaderRowCount()??0),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,i=-1===t?-1:e+t;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?Na:null,i=k(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&(s=this.eBodyViewport).clientHeight<s.scrollHeight;var s}setupRowAnimationCssClass(){let e=this.environment.hasMeasuredSizes();const t=()=>{const t=e&&Y(this.gos)&&!this.rowContainerHeightService.isStretching(),i=t?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(i,t)};t(),this.addManagedEventListeners({heightScaleChanged:t}),this.addManagedPropertyListener("animateRows",t),this.addManagedEventListeners({gridStylesChanged:()=>{!e&&this.environment.hasMeasuredSizes()&&(e=!0,t())}})}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){const e=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:e}),this.mockContextMenuForIPad(e),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:i,shiftKey:s}=e;(s||Math.abs(t)>Math.abs(i))&&this.mouseEventService.isEventFromThisGrid(e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:i,shiftKey:s}=e,n=s||Math.abs(t)>Math.abs(i),r=e.target;n?(this.eStickyTopFullWidthContainer.contains(r)||this.eStickyBottomFullWidthContainer.contains(r))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(i))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:i}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||i})}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;if(this.gos.get("preventDefaultOnContextMenu")){(e||i).preventDefault()}const{target:s}=e||t;s!==this.eBodyViewport&&s!==this.ctrlsService.get("center").getViewportElement()||this.menuService.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody})}mockContextMenuForIPad(e){if(!Bi())return;const t=new ks(this.eBodyViewport);this.addManagedListeners(t,{longTap:t=>{e(void 0,t.touchStart,t.touchEvent)}}),this.addDestroyFunc((()=>t.destroy()))}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}getGui(){return this.eGridBody}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new zn(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature),this.addDestroyFunc((()=>this.dragAndDropService.removeDropTarget(this.rowDragFeature)))}getRowDragFeature(){return this.rowDragFeature}setFloatingHeights(){const{pinnedRowModel:e}=this,t=e.getPinnedTopTotalHeight(),i=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}getStickyTopHeight(){return this.stickyTopHeight}setStickyBottomHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}getStickyBottomHeight(){return this.stickyBottomHeight}setStickyWidth(e){if(e){const e=this.scrollVisibleService.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${e}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${e}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){const e=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+(this.filterManager?.getHeaderHeight()??0),t=this.pinnedRowModel.getPinnedTopTotalHeight();let i=0;e>0&&(i+=e),t>0&&(i+=t),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const e=this.pinnedRowModel.getPinnedBottomTotalHeight()+(this.scrollVisibleService.isHorizontalScrollShowing()&&this.scrollVisibleService.getScrollbarWidth()||0);this.comp.setStickyBottomBottom(`${e}px`)}sizeColumnsToFit(e,t){const i=this.isVerticalScrollShowing()?this.scrollVisibleService.getScrollbarWidth():0,s=Xi(this.eGridBody)-i;s>0?this.columnSizeService.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout((()=>{this.sizeColumnsToFit(e,100)}),0):100===t?window.setTimeout((()=>{this.sizeColumnsToFit(e,500)}),100):500===t?window.setTimeout((()=>{this.sizeColumnsToFit(e,-1)}),500):h("tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e)}},Ga=class extends Rs{constructor(e,t,i,s,n){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.getColumn(),this.rowNode=t.getRowNode(),this.rowCtrl=t.getRowCtrl(),this.eRow=s,this.cellCtrl=t;const r=document.createElement("div");r.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(r);const o=this.getGui();this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1),ci(o,t.getCellAriaRole()),o.setAttribute("col-id",t.colIdSanitised);const a={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>us(o,e),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:e=>this.includeSelection=e,setIncludeRowDrag:e=>this.includeRowDrag=e,setIncludeDndSource:e=>this.includeDndSource=e,setRenderDetails:(e,t,i)=>this.setRenderDetails(e,t,i),setEditDetails:(e,t,i)=>this.setEditDetails(e,t,i),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(a,this.getGui(),this.eCellWrapper,i,n,void 0)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=null==this.firstRender;const s=this.refreshWrapper(!1);if(this.refreshEditStyles(!1),e){!(i||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e))}else this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,s=i&&null==this.eCellWrapper;if(s){const e=document.createElement("div");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=e,this.getGui().appendChild(this.eCellWrapper)}const n=!i&&null!=this.eCellWrapper;n&&(os(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!i);const r=!e&&i,o=r&&null==this.eCellValue;if(o){const e=document.createElement("span");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-value"),this.eCellValue=e,this.eCellWrapper.appendChild(this.eCellValue)}const a=!r&&null!=this.eCellValue;a&&(os(this.eCellValue),this.eCellValue=void 0);const l=s||n||o||a;return l&&this.removeControls(),e||t&&this.addControls(),l}addControls(){this.includeRowDrag&&null==this.rowDraggingComp&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&null==this.dndSourceComp&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(e,t,i){const s=this.editorVersion,n=e.newAgStackInstance();if(null==n)return;const{params:r}=e;n.then((e=>this.afterCellEditorCreated(s,e,r,t,i)));b(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();rs(t);const i=null!=e?At(e,!0):null;null!=i&&(t.textContent=i)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),os(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),os(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh)return!1;if(this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t}createCellRendererInstance(e){const t=!this.beans.gos.get("suppressAnimationFrame"),i=this.rendererVersion,{componentClass:s}=e,n=()=>{if(this.rendererVersion!==i||!this.isAlive())return;const t=e.newAgStackInstance(),n=this.afterCellRendererCreated.bind(this,i,s);t&&t.then(n)};t&&this.firstRender?this.beans.animationFrameService.createTask(n,this.rowNode.rowIndex,"createTasksP2"):n()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion)this.beans.context.destroyBean(i);else if(this.cellRenderer=i,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){const e=this.getParentOfValue();rs(e),e.appendChild(this.cellRendererGui)}}afterCellEditorCreated(e,t,i,s,n){if(e!==this.editorVersion)return void this.beans.context.destroyBean(t);if(t.isCancelBeforeStart&&t.isCancelBeforeStart())return this.beans.context.destroyBean(t),void this.cellCtrl.stopEditing(!0);if(!t.getGui)return h(`cellEditor for column ${this.column.getId()} is missing getGui() method`),void this.beans.context.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui();const r=s||void 0!==t.isPopup&&t.isPopup();r?this.addPopupCellEditor(i,n):this.addInCellEditor(),this.refreshEditStyles(!0,r),t.afterGuiAttached&&t.afterGuiAttached(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),this.rowCtrl?.setInlineEditingCss()}addInCellEditor(){const e=this.getGui();if(e.contains(K(this.beans.gos))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui){this.getParentOfValue().appendChild(this.cellEditorGui)}}addPopupCellEditor(e,t){"fullRow"===this.beans.gos.get("editType")&&h("popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");const i=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(this.beans.editService.createPopupEditorWrapper(e));const s=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&s.appendChild(this.cellEditorGui);const n=this.beans.popupService,r=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),o=null!=t?t:i.getPopupPosition?.()??"over",a=this.beans.gos.get("enableRtl"),l={ePopup:s,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:o,alignSide:a?"right":"left",keepWithinBounds:!0},c=n.positionPopupByComponent.bind(n,l),d=this.beans.localeService.getLocaleTextFunc(),u=n.addPopup({modal:r,eChild:s,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:c,ariaLabel:d("ariaLabelCellEditor","Cell Editor")});u&&(this.hideEditorPopup=u.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){const e=this.getGui();e.contains(K(this.beans.gos))&&Vi()&&e.focus({preventScroll:!0}),rs(this.getParentOfValue())}},Ba=class extends Rs{constructor(e,t,i){super(),this.cellComps={},this.beans=t,this.rowCtrl=e;const s=document.createElement("div");s.setAttribute("comp-id",`${this.getCompId()}`),s.setAttribute("style",this.getInitialStyle(i)),this.setTemplateFromElement(s);const n=this.getGui(),r=n.style;this.domOrder=this.rowCtrl.getDomOrder(),ci(n,"row");const o={setDomOrder:e=>this.domOrder=e,setCellCtrls:e=>this.setCellCtrls(e),showFullWidth:e=>this.showFullWidth(e),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>us(n,e),setTop:e=>r.top=e,setTransform:e=>r.transform=e,setRowIndex:e=>n.setAttribute("row-index",e),setRowId:e=>n.setAttribute("row-id",e),setRowBusinessKey:e=>n.setAttribute("row-business-key",e),refreshFullWidth:e=>this.fullWidthCellRenderer?.refresh?.(e())??!1};e.setComp(o,this.getGui(),i,void 0),this.addDestroyFunc((()=>{e.unsetComp(i)}))}getInitialStyle(e){const t=this.rowCtrl.getInitialTransform(e);return t?`transform: ${t}`:`top: ${this.rowCtrl.getInitialRowTop(e)}`}showFullWidth(e){const t=e.newAgStackInstance();null!=t&&t.then((e=>{if(this.isAlive()){const t=e.getGui();this.getGui().appendChild(t),this.rowCtrl.setupDetailRowAutoHeight(t),this.setFullWidthRowComp(e)}else this.beans.context.destroyBean(e)}))}setCellCtrls(e){const t=Object.assign({},this.cellComps);e.forEach((e=>{const i=e.instanceId;null==this.cellComps[i]?this.newCellComp(e):t[i]=null}));const i=st(t).filter((e=>null!=e));this.destroyCells(i),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];e.forEach((e=>{const i=this.cellComps[e.instanceId];i&&t.push(i.getGui())})),ds(this.getGui(),t)}newCellComp(e){const t=new Ga(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.instanceId]=t,this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){const e=st(this.cellComps).filter((e=>null!=e));this.destroyCells(e)}setFullWidthRowComp(e){this.fullWidthCellRenderer&&c("should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc((()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)}))}destroyCells(e){e.forEach((e=>{if(!e)return;const t=e.getCtrl().instanceId;this.cellComps[t]===e&&(e.detach(),e.destroy(),this.cellComps[t]=null)}))}};var Va={selector:"AG-ROW-CONTAINER",component:class extends Rs{constructor(){super(),this.eViewport=Is,this.eContainer=Is,this.rowComps={},this.name=Rs.elementGettingCreated.getAttribute("name"),this.options=Da(this.name),this.setTemplate(function(e){let t;return t="center"===e.type?`<div class="${e.viewport}" data-ref="eViewport" role="presentation">\n                <div class="${e.container}" data-ref="eContainer"></div>\n            </div>`:`<div class="${e.container}" data-ref="eContainer"></div>`,t}(this.options))}wireBeans(e){this.beans=e}postConstruct(){const e={setHorizontalScroll:e=>
2this.eViewport.scrollLeft=e,setViewportHeight:e=>this.eViewport.style.height=e,setRowCtrls:e=>{let{rowCtrls:t}=e;return this.setRowCtrls(t)},setDomOrder:e=>{this.domOrder=e},setContainerWidth:e=>this.eContainer.style.width=e,setOffsetTop:e=>this.eContainer.style.transform=`translateY(${e})`};this.createManagedBean(new ka(this.name)).setComp(e,this.eContainer,this.eViewport)}destroy(){this.setRowCtrls([]),super.destroy()}setRowCtrls(e){const t={...this.rowComps};this.rowComps={},this.lastPlacedElement=null;e.forEach((e=>{const i=e.instanceId,s=t[i];if(s)this.rowComps[i]=s,delete t[i],this.ensureDomOrder(s.getGui());else{if(!e.getRowNode().displayed)return;const t=new Ba(e,this.beans,this.options.type);this.rowComps[i]=t,this.appendRow(t.getGui())}})),st(t).forEach((e=>{this.eContainer.removeChild(e.getGui()),e.destroy()})),ci(this.eContainer,"rowgroup")}appendRow(e){var t,i,s;this.domOrder?(t=this.eContainer,i=e,(s=this.lastPlacedElement)?s.insertAdjacentElement("afterend",i):t.firstChild?t.insertAdjacentElement("afterbegin",i):t.appendChild(i)):this.eContainer.appendChild(e),this.lastPlacedElement=e}ensureDomOrder(e){this.domOrder&&(cs(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)}}};function za(e){return e.map((e=>`<ag-row-container name="${e}"></ag-row-container>`)).join("")}var Ha=`<div class="ag-root ag-unselectable" role="treegrid">\n        <ag-header-root></ag-header-root>\n        <div class="ag-floating-top" data-ref="eTop" role="presentation">\n            ${za(["topLeft","topCenter","topRight","topFullWidth"])}\n        </div>\n        <div class="ag-body" data-ref="eBody" role="presentation">\n            <div class="ag-body-viewport" data-ref="eBodyViewport" role="presentation">\n            ${za(["left","center","right","fullWidth"])}\n            </div>\n            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>\n        </div>\n        <div class="ag-sticky-top" data-ref="eStickyTop" role="presentation">\n            ${za(["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])}\n        </div>\n        <div class="ag-sticky-bottom" data-ref="eStickyBottom" role="presentation">\n            ${za(["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])}\n        </div>\n        <div class="ag-floating-bottom" data-ref="eBottom" role="presentation">\n            ${za(["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])}\n        </div>\n        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n        <ag-overlay-wrapper></ag-overlay-wrapper>\n    </div>`,Wa={selector:"AG-GRID-BODY",component:class extends Rs{constructor(){super(Ha,[jo,Ko,Zo,zo,Va]),this.eBodyViewport=Is,this.eStickyTop=Is,this.eStickyBottom=Is,this.eTop=Is,this.eBottom=Is,this.eBody=Is}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.rangeService=e.rangeService}postConstruct(){const e=(e,t)=>{const i=`${e}px`;t.style.minHeight=i,t.style.height=i},t={setRowAnimationCssOnBodyViewport:(e,t)=>this.setRowAnimationCssOnBodyViewport(e,t),setColumnCount:e=>Di(this.getGui(),e),setRowCount:e=>xi(this.getGui(),e),setTopHeight:t=>e(t,this.eTop),setBottomHeight:t=>e(t,this.eBottom),setTopDisplay:e=>this.eTop.style.display=e,setBottomDisplay:e=>this.eBottom.style.display=e,setStickyTopHeight:e=>this.eStickyTop.style.height=e,setStickyTopTop:e=>this.eStickyTop.style.top=e,setStickyTopWidth:e=>this.eStickyTop.style.width=e,setStickyBottomHeight:e=>{this.eStickyBottom.style.height=e,this.eStickyBottom.classList.toggle("ag-hidden","0px"===e)},setStickyBottomBottom:e=>this.eStickyBottom.style.bottom=e,setStickyBottomWidth:e=>this.eStickyBottom.style.width=e,setColumnMovingCss:(e,t)=>this.addOrRemoveCssClass(e,t),updateLayoutClasses:(e,t)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach((e=>{e.toggle("ag-layout-auto-height",t.autoHeight),e.toggle("ag-layout-normal",t.normal),e.toggle("ag-layout-print",t.print)})),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)},setAlwaysVerticalScrollClass:(e,t)=>this.eBodyViewport.classList.toggle(Na,t),registerBodyViewportResizeListener:e=>{const t=this.resizeObserverService.observeResize(this.eBodyViewport,e);this.addDestroyFunc((()=>t()))},setPinnedTopBottomOverflowY:e=>this.eTop.style.overflowY=this.eBottom.style.overflowY=e,setCellSelectableCss:(e,t)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach((i=>i.classList.toggle(e,t)))},setBodyViewportWidth:e=>this.eBodyViewport.style.width=e};
vendor: 63,998 bytes, line 2
2this.ctrl=this.createManagedBean(new Oa),this.ctrl.setComp(t,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&le(this.gos)||me(this.gos))&&ai(this.getGui(),"multiselectable",!0)}setRowAnimationCssOnBodyViewport(e,t){const i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}}},ja=class extends ze{constructor(){super(...arguments),this.beanName="scrollVisibleService"}wireBeans(e){this.ctrlsService=e.ctrlsService,this.columnAnimationService=e.columnAnimationService}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this)})}onDisplayedColumnsChanged(){this.updateScrollVisible()}onDisplayedColumnsWidthChanged(){this.updateScrollVisible()}onCentreViewportResized(){this.updateScrollGap()}updateScrollVisible(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn((()=>{this.columnAnimationService.executeLaterVMTurn((()=>this.updateScrollVisibleImpl()))})):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsService.get("center");if(!e||this.columnAnimationService.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsService.get("center"),t=e.hasHorizontalScrollGap(),i=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==i)&&(this.horizontalScrollGap=t,this.verticalScrollGap=i,this.eventService.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventService.dispatchEvent({type:"scrollVisibilityChanged"}))}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}hasHorizontalScrollGap(){return this.horizontalScrollGap}hasVerticalScrollGap(){return this.verticalScrollGap}getScrollbarWidth(){if(null==this.scrollbarWidth){const e=this.gos.get("scrollbarWidth"),t="number"===typeof e&&e>=0?e:(null==ii&&Hi(),ii);null!=t&&(this.scrollbarWidth=t,this.eventService.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},Ua="__ag_grid_instance",_a=class e extends ze{constructor(){super(...arguments),this.beanName="mouseEventService",this.gridInstanceId=e.gridInstanceSequence.next()}wireBeans(e){this.ctrlsService=e.ctrlsService}stampTopLevelGridCompWithGridInstance(e){e[Ua]=this.gridInstanceId}getRenderedCellForEvent(e){return Be(this.gos,e.target,ua.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let t=e;for(;t;){const e=t[Ua];if(w(e)){return e===this.gridInstanceId}t=t.parentElement}return!1}getCellPositionForEvent(e){const t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null}getNormalisedPosition(e){const t=k(this.gos,"normal"),i=e;let s,n;if(null!=i.clientX||null!=i.clientY?(s=i.clientX,n=i.clientY):(s=i.x,n=i.y),t){const e=this.ctrlsService.getGridBodyCtrl(),t=e.getScrollFeature().getVScrollPosition();s+=e.getScrollFeature().getHScrollPosition().left,n+=t.top}return{x:s,y:n}}};_a.gridInstanceSequence=new ws;var Ka=_a,$a=class extends ze{constructor(){super(),this.beanName="navigationService",this.onPageDown=v(this.onPageDown,100),this.onPageUp=v(this.onPageUp,100)}wireBeans(e){this.mouseEventService=e.mouseEventService,this.pageBoundsService=e.pageBoundsService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.ctrlsService=e.ctrlsService,this.rowRenderer=e.rowRenderer,this.headerNavigationService=e.headerNavigationService,this.rowPositionUtils=e.rowPositionUtils,this.cellNavigationService=e.cellNavigationService,this.pinnedRowModel=e.pinnedRowModel,this.scrollVisibleService=e.scrollVisibleService,this.rangeService=e.rangeService}postConstruct(){this.ctrlsService.whenReady(this,(e=>{this.gridBodyCon=e.gridBodyCtrl}))}handlePageScrollingKey(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=e.key,s=e.altKey,n=e.ctrlKey||e.metaKey,r=!!this.rangeService&&e.shiftKey,o=this.mouseEventService.getCellPositionForEvent(e);let a=!1;switch(i){case js.PAGE_HOME:case js.PAGE_END:n||s||(this.onHomeOrEndKey(i),a=!0);break;case js.LEFT:case js.RIGHT:case js.UP:case js.DOWN:if(!o)return!1;!n||s||r||(this.onCtrlUpDownLeftRight(i,o),a=!0);break;case js.PAGE_DOWN:case js.PAGE_UP:n||s||(a=this.handlePageUpDown(i,o,t))}return a&&e.preventDefault(),a}handlePageUpDown(e,t,i){return i&&(t=this.focusService.getFocusedCell()),!!t&&(e===js.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0)}navigateTo(e){const{scrollIndex:t,scrollType:i,scrollColumn:s,focusIndex:n,focusColumn:r}=e;w(s)&&!s.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(s),w(t)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t,i),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(n),this.focusService.setFocusedCell({rowIndex:n,column:r,rowPinned:null,forceBrowserFocus:!0}),this.rangeService?.setRangeToCell({rowIndex:n,rowPinned:null,column:r})}onPageDown(e){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.getViewportHeight(),s=this.pageBoundsService.getPixelOffset(),n=t.top+i,r=this.rowModel.getRowIndexAtPixel(n+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r):this.navigateToNextPage(e,r)}onPageUp(e){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.pageBoundsService.getPixelOffset(),s=t.top,n=this.rowModel.getRowIndexAtPixel(s+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,n,!0):this.navigateToNextPage(e,n,!0)}navigateToNextPage(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.getViewportHeight(),n=this.pageBoundsService.getFirstRow(),r=this.pageBoundsService.getLastRow(),o=this.pageBoundsService.getPixelOffset(),a=this.rowModel.getRow(e.rowIndex),l=i?a?.rowHeight-s-o:s-o,h=a?.rowTop+l;let c,d=this.rowModel.getRowIndexAtPixel(h+o);if(d===e.rowIndex){const s=i?-1:1;t=d=e.rowIndex+s}i?(c="bottom",d<n&&(d=n),t<n&&(t=n)):(c="top",d>r&&(d=r),t>r&&(t=r)),this.isRowTallerThanView(d)&&(t=d,c="top"),this.navigateTo({scrollIndex:t,scrollType:c,scrollColumn:null,focusIndex:d,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout((()=>{const s=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})}),50)}getNextFocusIndexForAutoHeight(e){const t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?-1:1,i=this.getViewportHeight(),s=this.pageBoundsService.getLastRow();let n=0,r=e.rowIndex;for(;r>=0&&r<=s;){const e=this.rowModel.getRow(r);if(e){const t=e.rowHeight??0;if(n+t>i)break;n+=t}r+=t}return Math.max(0,Math.min(r,s))}getViewportHeight(){const e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),t=this.scrollVisibleService.getScrollbarWidth();let i=e.bottom-e.top;return this.ctrlsService.get("center").isHorizontalScrollShowing()&&(i-=t),i}isRowTallerThanView(e){const t=this.rowModel.getRow(e);if(!t)return!1;const i=t.rowHeight;return"number"===typeof i&&i>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.cellNavigationService.getNextCellToFocus(e,t,!0),{rowIndex:s}=i,n=i.column;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:n,focusIndex:s,focusColumn:n})}onHomeOrEndKey(e){const t=e===js.PAGE_HOME,i=this.visibleColsService.getAllCols(),s=t?i[0]:Se(i),n=t?this.pageBoundsService.getFirstRow():this.pageBoundsService.getLastRow();this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:s,focusIndex:n,focusColumn:s})}onTabKeyDown(e,t){const i=t.shiftKey,s=this.tabToNextCellCommon(e,i,t);if(!1===s)if(i){const{rowIndex:i,rowPinned:s}=e.getRowPosition();(s?0===i:i===this.pageBoundsService.getFirstRow())&&(0===this.gos.get("headerHeight")||this.focusService.isHeaderFocusSuppressed()?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof ua&&e.focusCell(!0),(!i&&this.focusService.focusOverlay(!1)||this.focusService.focusNextGridCoreContainer(i))&&t.preventDefault();else s?t.preventDefault():null===s&&this.focusService.allowFocusForNextGridCoreContainer(i)}tabToNextCell(e,t){const i=this.focusService.getFocusedCell();if(!i)return!1;let s=this.getCellByPosition(i);return!!(s||(s=this.rowRenderer.getRowByPosition(i),s&&s.isFullWidth()))&&!!this.tabToNextCellCommon(s,e,t)}tabToNextCellCommon(e,t,i){let s,n=e.isEditing();if(!n&&e instanceof ua){const t=e.getRowCtrl();t&&(n=t.isEditing())}return s=n?"fullRow"===this.gos.get("editType")?this.moveToNextEditingRow(e,t,i):this.moveToNextEditingCell(e,t,i):this.moveToNextCellNotEditing(e,t),null===s?s:s||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const s=e.getCellPosition();e.getGui().focus(),e.stopEditing();const n=this.findNextCellToFocusOn(s,t,!0);return!1===n?null:null!=n&&(n.startEditing(null,!0,i),n.focusCell(!1),!0)}moveToNextEditingRow(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const s=e.getCellPosition(),n=this.findNextCellToFocusOn(s,t,!0);if(!1===n)return null;if(null==n)return!1;const r=n.getCellPosition(),o=this.isCellEditable(s),a=this.isCellEditable(r),l=r&&s.rowIndex===r.rowIndex&&s.rowPinned===r.rowPinned;if(o&&e.setFocusOutOnEditor(),!l){e.getRowCtrl().stopEditing();n.getRowCtrl().startRowEditing(void 0,void 0,i)}return a?(n.setFocusInOnEditor(),n.focusCell()):n.focusCell(!0),!0}moveToNextCellNotEditing(e,t){const i=this.visibleColsService.getAllCols();let s;s=e instanceof ma?{...e.getRowPosition(),column:t?i[0]:Se(i)}:e.getCellPosition();const n=this.findNextCellToFocusOn(s,t,!1);if(!1===n)return null;if(n instanceof ua)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n.getRowPosition(),t);return w(n)}findNextCellToFocusOn(e,t,i){let s=e;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextTabbedCell(s,t);const n=this.gos.getCallback("tabToNextCell");if(w(n)){const r=n({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(!0===r||null===r)null===r&&h("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),s=e;else{if(!1===r)return!1;s={rowIndex:r.rowIndex,column:r.column,rowPinned:r.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const e=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:e+s.rowIndex,column:s.column},fromCell:!0}),null}const r="fullRow"===this.gos.get("editType");if(i&&!r){if(!this.isCellEditable(s))continue}this.ensureCellVisible(s);const o=this.getCellByPosition(s);if(!o){const e=this.rowRenderer.getRowByPosition(s);if(!e||!e.isFullWidth()||i)continue;return e}if(!o.isSuppressNavigable())return this.rangeService?.setRangeToCell(s),o}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}getCellByPosition(e){const t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null}lookupRowNodeForCell(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.rowModel.getRow(e.rowIndex)}navigateToNextCell(e,t,i,s){let n=i,r=!1;for(;n&&(n===i||!this.isValidNavigateCell(n));)this.gos.get("enableRtl")?t===js.LEFT&&(n=this.getLastCellOfColSpan(n)):t===js.RIGHT&&(n=this.getLastCellOfColSpan(n)),n=this.cellNavigationService.getNextCellToFocus(t,n),r=b(n);if(r&&e&&e.key===js.UP&&(n={rowIndex:-1,rowPinned:null,column:i.column}),s){const s=this.gos.getCallback("navigateToNextCell");if(w(s)){const r=s({key:t,previousCellPosition:i,nextCellPosition:n||null,event:e});n=w(r)?{rowPinned:r.rowPinned,rowIndex:r.rowIndex,column:r.column}:null}}if(!n)return;if(n.rowIndex<0){const t=this.headerNavigationService.getHeaderRowCount();return void this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:t+n.rowIndex,column:i.column},event:e||void 0,fromCell:!0})}const o=this.getNormalisedPosition(n);o?this.focusPosition(o):this.tryToFocusFullWidthRow(n)}getNormalisedPosition(e){this.ensureCellVisible(e);const t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const i=this.visibleColsService.getAllCols(),s=this.rowRenderer.getRowByPosition(e);if(!s||!s.isFullWidth())return!1;const n=this.focusService.getFocusedCell(),r={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Se(i):i[0])};this.focusPosition(r);const o=null==t?null!=n&&this.rowPositionUtils.before(r,n):t;return this.eventService.dispatchEvent({type:"fullWidthRowFocused",rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:r.column,isFullWidthCell:!0,fromBelow:o}),!0}focusPosition(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService?.setRangeToCell(e)}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e)}getLastCellOfColSpan(e){const t=this.getCellByPosition(e);if(!t)return e;const i=t.getColSpanningList();return 1===i.length?e:{rowIndex:e.rowIndex,column:Se(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=Z(this.gos),i=this.rowModel.getRow(e.rowIndex);!(t&&i?.sticky)&&b(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}},Ya=class extends ze{constructor(){super(...arguments),this.beanName="horizontalResizeService"}wireBeans(e){this.dragService=e.dragService,this.ctrlsService=e.ctrlsService}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};this.dragService.addDragSource(t);return()=>this.dragService.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const i=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(i)}setResizeIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},Za=class extends ze{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupService=e.popupService,this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.menuService=e.menuService}hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(e,t,i){this.showPopup(e,(s=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:s})}),i,t.target,this.menuService.isLegacyMenuEnabled())}showMenuAfterButtonClick(e,t,i){let s=-1,n="left";const r=this.menuService.isLegacyMenuEnabled();!r&&this.gos.get("enableRtl")&&(s=1,n="right");const o=r?void 0:4*s,a=r?void 0:4;this.showPopup(e,(s=>{this.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:s,nudgeX:o,nudgeY:a,alignSide:n,keepWithinBounds:!0,position:"under",column:e})}),i,t,r)}showPopup(e,t,i,s,n){const r=e?this.createBean(new Zn(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");const o=document.createElement("div");let a;ci(o,"presentation"),o.classList.add("ag-menu"),n||o.classList.add("ag-filter-menu"),[this.tabListener]=this.addManagedElementListeners(o,{keydown:e=>this.trapFocusWithin(e,o)}),o.appendChild(r?.getGui());const l=this.menuService.isColumnMenuAnchoringEnabled()?s??this.ctrlsService.getGridBodyCtrl().getGui():void 0,h=this.localeService.getLocaleTextFunc(),c=n&&"columnFilter"!==i?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),d=this.popupService.addPopup({modal:!0,eChild:o,closeOnEsc:!0,closedCallback:t=>{e.setMenuVisible(!1,"contextMenu");const n=t instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),n&&s&&ls(s)){const e=this.focusService.findTabbableParent(s);e&&e.focus()}r?.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e)},positionCallback:()=>t(o),anchorToElement:l,ariaLabel:c});d&&(this.hidePopup=a=d.hideFunc),r.afterInit().then((()=>{t(o),r.afterGuiAttached({container:i,hidePopup:a})})),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==js.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:i??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},qa=class extends ze{constructor(){super(...arguments),this.beanName="resizeObserverService"}observeResize(e,t){const i=U(this.gos).ResizeObserver,s=i?new i(t):null;return s?.observe(e),()=>s?.disconnect()}},Qa=class extends ze{constructor(){super(...arguments),this.beanName="animationFrameService",this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}wireBeans(e){this.ctrlsService=e.ctrlsService,this.paginationService=e.paginationService}setScrollTop(e){const t=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&0===e){const e=this.paginationService?.getCurrentPage()??0;e!==this.lastPage&&(this.lastPage=e,this.scrollGoingDown=!0)}this.lastScrollTop=e}postConstruct(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){!1===this.useAnimationFrame&&h(`AnimationFrameService.${e} called but animation frames are off`)}createTask(e,t,i){this.verifyAnimationFrameOn(i);const s={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],s),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort(((e,i)=>e.index!==i.index?t*(i.index-e.index):i.createOrder-e.createOrder)),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const t=this.createTasksP1,i=t.list,s=this.createTasksP2,n=s.list,r=this.destroyTasks,o=(new Date).getTime();let a=(new Date).getTime()-o;const l=e<=0,h=this.ctrlsService.getGridBodyCtrl();for(;l||a<e;){if(!h.getScrollFeature().scrollGridIfNeeded()){let e;if(i.length)this.sortTaskList(t),e=i.pop().task;else if(n.length)this.sortTaskList(s),e=n.pop().task;else{if(!r.length){this.cancelledTasks.clear();break}e=r.pop()}this.cancelledTasks.has(e)||e()}a=(new Date).getTime()-o}i.length||n.length||r.length?this.requestFrame():this.stopTicking()}stopTicking(){this.ticking=!1}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1)}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}requestAnimationFrame(e){const t=U(this.gos);t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)}isQueueEmpty(){return!this.ticking}debounce(e){let t=!1;return()=>{this.isOn()?t||(t=!0,this.addDestroyTask((()=>{t=!1,e()}))):window.setTimeout(e,0)}}},Xa=class extends ze{constructor(){super(...arguments),this.beanName="expansionService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.isClientSideRowModel=L(this.gos)}expandRows(e){if(!this.isClientSideRowModel)return;const t=new Set(e);this.rowModel.forEachNode((e=>{e.id&&t.has(e.id)&&(e.expanded=!0)})),this.onGroupExpandedOrCollapsed()}getExpandedRows(){const e=[];return this.rowModel.forEachNode((t=>{let{expanded:i,id:s}=t;i&&s&&e.push(s)})),e}expandAll(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)}setRowNodeExpanded(e,t,i,s){e&&(i&&e.parent&&-1!==e.parent.level&&this.setRowNodeExpanded(e.parent,t,i,s),e.setExpanded(t,void 0,s))}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}},Ja=class extends ze{constructor(){super(...arguments),this.beanName="menuService"}wireBeans(e){this.valueService=e.valueService,this.filterMenuFactory=e.filterMenuFactory,this.ctrlsService=e.ctrlsService,this.animationFrameService=e.animationFrameService,this.filterManager=e.filterManager,this.rowRenderer=e.rowRenderer,this.columnChooserFactory=e.columnChooserFactory,this.contextMenuFactory=e.contextMenuFactory,this.enterpriseMenuFactory=e.enterpriseMenuFactory}postConstruct(){this.activeMenuFactory=this.enterpriseMenuFactory??this.filterMenuFactory}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const t=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(t,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,t,i)}getContextMenuPosition(e,t){const i=this.getRowCtrl(e),s=this.getCellGui(i,t);if(!s)return i?{x:0,y:i.getRowYPosition()}:{x:0,y:0};const n=s.getBoundingClientRect();return{x:n.x+n.width/2,y:n.y+n.height/2}}showContextMenu(e){const t=e.rowNode,i=e.column;let{anchorToElement:s,value:n}=e;t&&i&&null==n&&(n=this.valueService.getValueForDisplay(i,t)),null==s&&(s=this.getContextMenuAnchorElement(t,i)),this.contextMenuFactory?.onContextMenu(e.mouseEvent??null,e.touchEvent??null,t??null,i??null,n,s)}showColumnChooser(e){this.columnChooserFactory?.showColumnChooser(e)}hidePopupMenu(){this.contextMenuFactory?.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}hideColumnChooser(){this.columnChooserFactory?.hideActiveColumnChooser()}isColumnMenuInHeaderEnabled(e){const{suppressMenu:t,suppressHeaderMenuButton:i}=e.getColDef();return!(i??t)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){const t=e&&ct(e)?e.getColDef():e?.getColGroupDef();return!t?.suppressHeaderContextMenu&&"new"===this.getColumnMenuType()}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Bi()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.filterManager?.isFilterAllowed(e)&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled()}areAdditionalColumnMenuItemsEnabled(){return"new"===this.getColumnMenuType()}isLegacyMenuEnabled(){return"legacy"===this.getColumnMenuType()}isFloatingFilterButtonEnabled(e){const t=e.getColDef(),i=t.floatingFilterComponentParams?.suppressFilterButton;return null!=i&&h("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),null==t.suppressFloatingFilterButton?!i:!t.suppressFloatingFilterButton}getColumnMenuType(){return this.gos.get("columnMenu")}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos.get("suppressMenuHide");return this.isLegacyMenuEnabled()?!!this.gos.exists("suppressMenuHide")&&e:e}showColumnMenuCommon(e,t,i,s){const{positionBy:n}=t,r=t.column;if("button"===n){const{buttonElement:n}=t;e.showMenuAfterButtonClick(r,n,i,s)}else if("mouse"===n){const{mouseEvent:n}=t;e.showMenuAfterMouseEvent(r,n,i,s)}else r&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(r,"auto"),this.animationFrameService.requestAnimationFrame((()=>{const t=this.ctrlsService.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);t&&e.showMenuAfterButtonClick(r,t.getAnchorElementForMenu(s),i,!0)})))}getRowCtrl(e){const{rowIndex:t,rowPinned:i}=e||{};if(null!=t)return this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i})||void 0}getCellGui(e,t){if(!e||!t)return;const i=e.getCellCtrl(t);return i?.getGui()||void 0}getContextMenuAnchorElement(e,t){const i=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),s=this.getRowCtrl(e);if(!s)return i;const n=this.getCellGui(s,t);return n||(s.isFullWidth()?s.getFullWidthElement():i)}},el={selector:"AG-INPUT-TEXT-AREA",component:class extends Ks{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}}},tl=class extends tn{constructor(e){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=e}postConstruct(){W(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params;this.addManagedElementListeners(e,{keydown:e=>{mr(this.gos,e,t.node,t.column,!0)||t.onKeyDown(e)}})}},il=class extends tn{constructor(e){super(`\n            <div class="ag-cell-edit-wrapper">\n                ${e.getTemplate()}\n            </div>`,e.getAgComponents()),this.cellEditorInput=e,this.eInput=Is}init(e){this.params=e;const{cellStartedEdit:t,eventKey:i,suppressPreventDefault:s}=e,n=this.eInput;let r;this.cellEditorInput.init(n,e);let o=!0;t?(this.focusAfterAttached=!0,i===js.BACKSPACE||i===js.DELETE?r="":i&&1===i.length?s?o=!1:r=i:(r=this.cellEditorInput.getStartValue(),i!==js.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=this.cellEditorInput.getStartValue()),o&&null!=r&&n.setStartValue(r),this.addManagedElementListeners(n.getGui(),{keydown:e=>{const{key:t}=e;t!==js.PAGE_UP&&t!==js.PAGE_DOWN||e.preventDefault()}})}afterGuiAttached(){const e=this.localeService.getLocaleTextFunc(),t=this.eInput;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Fi()||t.getFocusableElement().focus();const i=t.getInputElement();this.highlightAllOnFocus?i.select():this.cellEditorInput.setCaret?.()}focusIn(){const e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}},sl=class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" data-ref="eInput"></ag-input-text-field>'}getAgComponents(){return[vr]}init(e,t){this.eInput=e,this.params=t,null!=t.maxLength&&e.setMaxLength(t.maxLength)}getValue(){const e=this.eInput.getValue();return w(e)||w(this.params.value)?this.params.parseValue(e):this.params.value}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}setCaret(){const e=this.eInput.getValue(),t=w(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}},nl=class extends il{constructor(){super(new sl)}},rl=class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" data-ref="eInput"></ag-input-number-field>'}getAgComponents(){return[Cr]}init(e,t){this.eInput=e,this.params=t,null!=t.max&&e.setMax(t.max),null!=t.min&&e.setMin(t.min),null!=t.precision&&e.setPrecision(t.precision),null!=t.step&&e.setStep(t.step);const i=e.getInputElement();t.preventStepping?e.addManagedElementListeners(i,{keydown:this.preventStepping}):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}preventStepping(e){e.key!==js.UP&&e.key!==js.DOWN||e.preventDefault()}getValue(){const e=this.eInput.getValue();if(!w(e)&&!w(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(null==t)return t;if("string"===typeof t){if(""===t)return null;t=Number(t)}return isNaN(t)?null:t}getStartValue(){return this.params.value}setCaret(){Fi()&&this.eInput.getInputElement().focus({preventScroll:!0})}},ol=class extends fr{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Fi();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){K(this.gos)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Pr(e??null,!1)??void 0:e;return this.min===t||(this.min=t,ys(this.eInput,"min",t)),this}setMax(e){const t=e instanceof Date?Pr(e??null,!1)??void 0:e;return this.max===t||(this.max=t,ys(this.eInput,"max",t)),this}setStep(e){return this.step===e||(this.step=e,ys(this.eInput,"step",e)),this}getDate(){if(this.eInput.validity.valid)return kr(this.getValue())??void 0}setDate(e,t){this.setValue(Pr(e??null,!1),t)}},al={selector:"AG-INPUT-DATE-FIELD",component:ol},ll=class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[al]}init(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){const e=this.eInput.getDate();return w(e)||w(this.params.value)?e??null:this.params.value}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Pr(e,!1)}},hl=class{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[al]}init(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){const e=this.formatDate(this.eInput.getDate());return w(e)||w(this.params.value)?this.params.parseValue(e??""):this.params.value}getStartValue(){return Pr(this.parseDate(this.params.value??void 0)??null,!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):kr(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Pr(e??null,!1)??void 0}},cl=class{constructor(e){this.cellValueChanges=e}},dl=class extends cl{constructor(e,t,i,s){super(e),this.initialRange=t,this.finalRange=i,this.ranges=s}},ul=class{constructor(e){this.actionStack=[],this.maxStackSize=e||10,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}};function pl(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";e.frameworkOverrides.wrapIncoming((()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(t,i)),"ensureVisible")}function gl(e,t,i){e.frameworkOverrides.wrapIncoming((()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureIndexVisible(t,i)),"ensureVisible")}var ml={version:Yr,moduleName:"@ag-grid-community/edit-core",beans:[class extends ze{constructor(){super(...arguments),this.beanName="editService"}wireBeans(e){this.navigationService=e.navigationService,this.userComponentFactory=e.userComponentFactory,this.valueService=e.valueService}startEditing(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const n=this.createCellEditorParams(e,t,i),r=e.getColumn().getColDef(),o=this.userComponentFactory.getCellEditorDetails(r,n),a=null!=o?.popupFromSelector?o.popupFromSelector:!!r.cellEditorPopup,l=null!=o?.popupPositionFromSelector?o.popupPositionFromSelector:r.cellEditorPopupPosition;return e.setEditing(!0,o),e.getComp().setEditDetails(o,a,l,this.gos.get("reactiveCustomComponents")),this.eventService.dispatchEvent(e.createEvent(s,"cellEditingStarted")),!o?.params?.suppressPreventDefault}stopEditing(e,t){const i=e.getComp(),{newValue:s,newValueExists:n}=this.takeValueFromCellEditor(t,i),r=e.getRowNode(),o=e.getColumn(),a=this.valueService.getValueForDisplay(o,r);let l=!1;return n&&(l=this.saveNewValue(e,a,s,r,o)),e.setEditing(!1,void 0),i.setEditDetails(),e.updateAndFormatValue(!1),e.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.eventService.dispatchEvent({...e.createEvent(null,"cellEditingStopped"),oldValue:a,newValue:s,valueChanged:l}),l}handleColDefChanged(e){const t=e.getCellEditor();if(t?.refresh){const{eventKey:i,cellStartedEdit:s}=e.getEditCompDetails().params,n=this.createCellEditorParams(e,i,s),r=e.getColumn().getColDef(),o=this.userComponentFactory.getCellEditorDetails(r,n);t.refresh(o.params)}}setFocusOutOnEditor(e){const t=e.getComp().getCellEditor();t&&t.focusOut&&t.focusOut()}setFocusInOnEditor(e){const t=e.getComp(),i=t.getCellEditor();i?.focusIn?i.focusIn():(e.focusCell(!0),e.onCellEditorAttached((()=>t.getCellEditor()?.focusIn?.())))}stopEditingAndFocus(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.stopRowOrCellEdit(),e.focusCell(!0),t||this.navigateAfterEdit(i,e.getCellPosition())}createPopupEditorWrapper(e){return new tl(e)}takeValueFromCellEditor(e,t){const i={newValueExists:!1};if(e)return i;const s=t.getCellEditor();if(!s)return i;if(s.isCancelAfterEnd&&s.isCancelAfterEnd())return i;return{newValue:s.getValue(),newValueExists:!0}}saveNewValue(e,t,i,s,n){if(i===t)return!1;e.setSuppressRefreshCell(!0);const r=s.setDataValue(n,i,"edit");return e.setSuppressRefreshCell(!1),r}createCellEditorParams(e,t,i){const s=e.getColumn(),n=e.getRowNode();return this.gos.addGridCommonParams({value:this.valueService.getValueForDisplay(s,n),eventKey:t,column:s,colDef:s.getColDef(),rowIndex:e.getCellPosition().rowIndex,node:n,data:n.data,cellStartedEdit:i,onKeyDown:e.onKeyDown.bind(e),stopEditing:e.stopEditingAndFocus.bind(e),eGridCell:e.getGui(),parseValue:t=>this.valueService.parseValue(s,n,t,e.getValue()),formatValue:e.formatValue.bind(e)})}navigateAfterEdit(e,t){if(this.gos.get("enterNavigatesVerticallyAfterEdit")){const i=e?js.UP:js.DOWN;this.navigationService.navigateToNextCell(null,i,t,!1)}}}]},fl={version:Yr,moduleName:"@ag-grid-community/edit-api",apiFunctions:{undoCellEditing:function(e){e.undoRedoService?.undo("api")},redoCellEditing:function(e){e.undoRedoService?.redo("api")},getCellEditorInstances:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.rowRenderer.getCellEditorInstances(t).map(Tn)},getEditingCells:function(e){return e.rowRenderer.getEditingCells()},stopEditing:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.rowRenderer.stopEditing(t)},startEditingCell:function(e,t){const i=e.columnModel.getCol(t.colKey);if(!i)return void h(`no column found for ${t.colKey}`);const s={rowIndex:t.rowIndex,rowPinned:t.rowPinned||null,column:i};null==t.rowPinned&&gl(e,t.rowIndex),pl(e,t.colKey);const n=e.navigationService.getCellByPosition(s);if(!n)return;const{focusService:r,gos:o}=e,a=o.get("stopEditingWhenCellsLoseFocus")&&(()=>{const e=K(o),t=n.getGui();return e!==t&&!!t?.contains(e)})();!a&&r.isCellFocused(s)||r.setFocusedCell({...s,forceBrowserFocus:a,preventScrollOnBrowserFocus:!0}),n.startRowOrCellEdit(t.key)},getCurrentUndoSize:function(e){return e.undoRedoService?.getCurrentUndoStackSize()??0},getCurrentRedoSize:function(e){return e.undoRedoService?.getCurrentRedoStackSize()??0}},dependantModules:[ml]},vl={version:Yr,moduleName:"@ag-grid-community/default-editor",userComponents:[{name:"agCellEditor",classImp:nl}],dependantModules:[ml]},yl={version:Yr,moduleName:"@ag-grid-community/editing",dependantModules:[ml,{version:Yr,moduleName:"@ag-grid-community/undo-redo-edit",beans:[class extends ze{constructor(){super(...arguments),this.beanName="undoRedoService",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=null!==this.activeCellEdit&&this.cellPositionUtils.equals(this.activeCellEdit,t),s=null!==this.activeRowEdit&&this.rowPositionUtils.sameRow(this.activeRowEdit,t);if(!(i||s||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:o,oldValue:a,value:l}=e,h={rowPinned:n,rowIndex:r,columnId:o.getColId(),newValue:l,oldValue:a};this.cellValueChanges.push(h)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}wireBeans(e){this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.columnModel=e.columnModel,this.rangeService=e.rangeService}postConstruct(){if(!this.gos.get("undoRedoCellEditing"))return;const e=this.gos.get("undoRedoCellEditingLimit");if(e<=0)return;this.undoStack=new ul(e),this.redoStack=new ul(e),this.addListeners();const t=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:e=>{e.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:t,newColumnsLoaded:t,columnGroupOpened:t,columnRowGroupChanged:t,columnMoved:t,columnPinned:t,columnVisible:t,rowDragEnd:t}),this.ctrlsService.whenReady(this,(e=>{this.gridBodyCtrl=e.gridBodyCtrl}))}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){this.eventService.dispatchEvent({type:"undoStarted",source:e});const t=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo");this.eventService.dispatchEvent({type:"undoEnded",source:e,operationPerformed:t})}redo(e){this.eventService.dispatchEvent({type:"redoStarted",source:e});const t=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo");this.eventService.dispatchEvent({type:"redoEnded",source:e,operationPerformed:t})}undoRedo(e,t,i,s,n){if(!e)return!1;const r=e.pop();return!(!r||!r.cellValueChanges)&&(this.processAction(r,(e=>e[s]),n),r instanceof dl?this.processRange(this.rangeService,r.ranges||[r[i]]):this.processCell(r.cellValueChanges),t.push(r),!0)}processAction(e,t,i){e.cellValueChanges.forEach((e=>{const{rowIndex:s,rowPinned:n,columnId:r}=e,o={rowIndex:s,rowPinned:n},a=this.rowPositionUtils.getRowNode(o);a.displayed&&a.setDataValue(r,t(e),i)}))}processRange(e,t){let i;e.removeAllCellRanges(!0),t.forEach(((s,n)=>{if(!s)return;const r=s.startRow,o=s.endRow;n===t.length-1&&(i={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(i));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:s.startColumn,columns:s.columns};e.addCellRange(a)}))}processCell(e){const t=e[0],{rowIndex:i,rowPinned:s}=t,n={rowIndex:i,rowPinned:s},r=this.rowPositionUtils.getRowNode(n),o={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(o,this.rangeService)}setLastFocusedCell(e,t){const{rowIndex:i,columnId:s,rowPinned:n}=e,r=this.gridBodyCtrl.getScrollFeature(),o=this.columnModel.getCol(s);if(!o)return;r.ensureIndexVisible(i),r.ensureColumnVisible(o);const a={rowIndex:i,column:o,rowPinned:n};this.focusService.setFocusedCell({...a,forceBrowserFocus:!0}),t?.setRangeToCell(a)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new cl(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{this.activeCellEdit=null;if(e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const e=new cl(this.cellValueChanges);this.pushActionsToUndoStack(e)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new cl(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new dl(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;e=this.rangeService&&le(this.gos)?new dl(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):new cl(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1}})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}}],dependantModules:[ml]},{version:Yr,moduleName:"@ag-grid-community/full-row-edit",beans:[class extends ze{constructor(){super(...arguments),this.beanName="rowEditService"}startEditing(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=!0;return e.getAllCellCtrls().reduce(((e,r)=>{const o=r===i;return o?n=r.startEditing(t,o,s):r.startEditing(null,o,s),!!e||r.isEditing()}),!1)&&this.setEditing(e,!0),n}stopEditing(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=e.getAllCellCtrls(),s=e.isEditing();e.setStoppingRowEdit(!0);let n=!1;for(const r of i){const e=r.stopEditing(t);s&&!t&&!n&&e&&(n=!0)}n&&this.eventService.dispatchEvent(e.createRowEvent("rowValueChanged")),s&&this.setEditing(e,!1),e.setStoppingRowEdit(!1)}setEditing(e,t){e.setEditingRow(t),e.forEachGui(void 0,(e=>e.rowComp.addOrRemoveCssClass("ag-row-editing",t)));const i=t?e.createRowEvent("rowEditingStarted"):e.createRowEvent("rowEditingStopped");this.eventService.dispatchEvent(i)}}],dependantModules:[ml]},{version:Yr,moduleName:"@ag-grid-community/all-editors",dependantModules:[vl,{version:Yr,moduleName:"@ag-grid-community/data-type-editors",userComponents:[{name:"agTextCellEditor",classImp:nl},{name:"agNumberCellEditor",classImp:class extends il{constructor(){super(new rl)}},params:{suppressPreventDefault:!0}},{name:"agDateCellEditor",classImp:class extends il{constructor(){super(new ll)}}},{name:"agDateStringCellEditor",classImp:class extends il{wireBeans(e){this.dataTypeService=e.dataTypeService}constructor(){super(new hl((()=>this.dataTypeService)))}}},{name:"agCheckboxCellEditor",classImp:class extends tn{constructor(){super('\n            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">\n                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>\n            </div>',[Ys]),this.eCheckbox=Is}init(e){this.params=e;const t=e.value??void 0;this.eCheckbox.setValue(t);this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(this.eCheckbox,{fieldValueChanged:e=>this.setAriaLabel(e.selected)})}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.localeService.getLocaleTextFunc(),i=Li(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${s} (${i})`)}}}],dependantModules:[vl]},{version:Yr,moduleName:"@ag-grid-community/select-editor",userComponents:[{name:"agSelectCellEditor",classImp:class extends tn{constructor(){super('<div class="ag-cell-edit-wrapper">\n                <ag-select class="ag-cell-editor" data-ref="eSelect"></ag-select>\n            </div>',[cr]),this.eSelect=Is,this.startedByEnter=!1}wireBeans(e){this.valueService=e.valueService}init(e){this.focusAfterAttached=e.cellStartedEdit;const{eSelect:t,valueService:i,gos:s}=this,{values:n,value:r,eventKey:o}=e;if(b(n))return void h("no values found for select cellEditor");this.startedByEnter=null!=o&&o===js.ENTER;let a=!1;n.forEach((s=>{const n={value:s},o=i.formatValue(e.column,null,s),l=null!==o&&void 0!==o;n.text=l?o:s,t.addOption(n),a=a||r===s})),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;null!=l&&t.setPickerGap(l),null!=d&&t.setPickerMaxHeight(d),null!=c&&t.setPickerMaxWidth(c),"fullRow"!==s.get("editType")&&this.addManagedListeners(this.eSelect,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout((()=>{this.isAlive()&&this.eSelect.showPicker()}))}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}}}],dependantModules:[ml]},{version:Yr,moduleName:"@ag-grid-community/large-text-editor",userComponents:[{name:"agLargeTextCellEditor",classImp:class extends tn{constructor(){super('<div class="ag-large-text">\n        <ag-input-text-area data-ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>\n        </div>',[el]),this.eTextArea=Is}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),w(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===js.LEFT||t===js.UP||t===js.RIGHT||t===js.DOWN||e.shiftKey&&t===js.ENTER)&&e.stopPropagation()}afterGuiAttached(){const e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){const e=this.eTextArea.getValue();return w(e)||w(this.params.value)?this.params.parseValue(e):this.params.value}}}],dependantModules:[ml]}]},fl]},Cl=class extends ze{constructor(){super(...arguments),this.beanName="autoWidthCalculator"}wireBeans(e){this.rowRenderer=e.rowRenderer,this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,(e=>{this.centerRowContainerCtrl=e.center}))}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const s=this.rowRenderer.getAllCellsForColumn(e);return t||s.push(i),this.addElementsToContainerAndGetWidth(s)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1}addElementsToContainerAndGetWidth(e){const t=document.createElement("form");t.style.position="fixed";const i=this.centerRowContainerCtrl.getContainerElement();e.forEach((e=>this.cloneItemIntoDummy(e,t))),i.appendChild(t);const s=t.offsetWidth;i.removeChild(t);return s+this.getAutoSizePadding()}getAutoSizePadding(){return this.gos.get("autoSizePadding")}getHeaderCellForColumn(e){let t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach((i=>{const s=i.getHtmlElementForColumnHeader(e);null!=s&&(t=s)})),t}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const s=document.createElement("div"),n=s.classList;["ag-header-cell","ag-header-group-cell"].some((e=>i.classList.contains(e)))?(n.add("ag-header","ag-header-row"),s.style.position="static"):n.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some((e=>r.classList.contains(e)))){for(let e=0;e<r.classList.length;e++){const t=r.classList[e];"ag-row-position-absolute"!=t&&n.add(t)}break}r=r.parentElement}s.appendChild(i),t.appendChild(s)}},Sl=class extends ze{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.extraTopHeight=0,this.extraBottomHeight=0}wireBeans(e){this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer,this.ctrlsService=e.ctrlsService,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.isClientSide=L(this.gos),this.ctrlsService.whenReady(this,(e=>{this.gridBodyCtrl=e.gridBodyCtrl})),this.resetStickyContainers()}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}setOffsetTop(e){this.extraTopHeight!==e&&(this.extraTopHeight=e,this.eventService.dispatchEvent({type:"stickyTopOffsetChanged",offset:e}))}setOffsetBottom(e){this.extraBottomHeight!==e&&(this.extraBottomHeight=e)}resetOffsets(){this.setOffsetBottom(0),this.setOffsetTop(0)}getExtraTopHeight(){return this.extraTopHeight}getExtraBottomHeight(){return this.extraBottomHeight}getLastPixelOfGroup(e){return this.isClientSide?this.getClientSideLastPixelOfGroup(e):this.getServerSideLastPixelOfGroup(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}getServerSideLastPixelOfGroup(e){if(this.isClientSide)throw new Error("This func should only be called in server side row model.");if(e.isExpandable()||e.footer){if(e.master)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){let t=e.childStore?.getStoreBounds();return e.footer&&(t=e.sibling.childStore?.getStoreBounds()),(t?.heightPx??0)+(t?.topPx??0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}getClientSideLastPixelOfGroup(e){if(!this.isClientSide)throw new Error("This func should only be called in client side row model.");if(e.isExpandable()||e.footer){if(e.footer&&0===e.rowIndex)return Number.MAX_SAFE_INTEGER;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){let t=e.footer?e.sibling:e;for(;t.isExpandable()&&t.expanded;)if(t.master)t=t.detailNode;else if(t.childrenAfterSort){if(0===t.childrenAfterSort.length)break;t=Se(t.childrenAfterSort)}return t.rowTop+t.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}updateStickyRows(e){const t="top"===e;let i=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,i);const s=t?this.rowRenderer.getFirstVisibleVerticalPixel()-this.extraTopHeight:this.rowRenderer.getLastVisibleVerticalPixel()-this.extraTopHeight,n=new Set,r=e=>{if(n.add(e),t){const t=this.getLastPixelOfGroup(e),n=s+i+e.rowHeight;e.stickyRowTop=t<n?i+(t-n):i}else{const t=this.getFirstPixelOfGroup(e),n=s-(i+e.rowHeight);e.stickyRowTop=t>n?i-(t-n):i}i=0,n.forEach((e=>{const t=e.stickyRowTop+e.rowHeight;i<t&&(i=t)}))},o=this.areFooterRowsStickySuppressed(),a=this.gos.get("suppressGroupRowsSticky"),l=t=>{if(!t.displayed)return!1;if(t.footer){if(!0===o)return!1;if("grand"===o&&-1===t.level)return!1;if("group"===o&&t.level>-1)return!1;const i=!!t.sibling.rowIndex&&t.sibling.rowIndex+1===t.rowIndex;if("bottom"===e&&i)return!1;return!n.has(t)}if(t.isExpandable()){if(!0===a)return!1;if("bottom"===e)return!1;return!n.has(t)&&t.expanded}return!1};for(let h=0;h<100;h++){let e=s+i;t||(e=s-i);const n=this.rowModel.getRowIndexAtPixel(e),o=this.rowModel.getRow(n);if(null==o)break;const a=this.getStickyAncestors(o).find((e=>(t?e.rowIndex<n:e.rowIndex>n)&&l(e)));if(a){r(a);continue}if(!(t?o.rowTop<e:o.rowTop+o.rowHeight>e)||!l(o))break;r(o)}return t||n.forEach((e=>{e.stickyRowTop=i-(e.stickyRowTop+e.rowHeight)})),this.refreshNodesAndContainerHeight(e,n,i)}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(!0===e)return!0;const t=!!this.gos.get("groupIncludeFooter")||"group"===e,i=!!this.gos.get("groupIncludeTotalFooter")||"grand"===e;return!(!t||!i)||(i?"grand":!!t&&"group")}canRowsBeSticky(){const e=Z(this.gos),t=this.areFooterRowsStickySuppressed(),i=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!i)}getStickyAncestors(e){const t=[];let i=e.footer?e.sibling:e.parent;for(;i;)i.sibling&&t.push(i.sibling),t.push(i),i=i.parent;return t.reverse()}checkStickyRows(){const e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.resetStickyContainers()}resetStickyContainers(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){const t=new Set;if(this.stickyTopRowCtrls.some((t=>t.getRowNode()===e))){for(let i=0;i<this.stickyTopRowCtrls.length;i++){const s=this.stickyTopRowCtrls[i].getRowNode();s!==e&&t.add(s)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows()}else{for(let i=0;i<this.stickyBottomRowCtrls.length;i++){const s=this.stickyBottomRowCtrls[i].getRowNode();s!==e&&t.add(s)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}}refreshNodesAndContainerHeight(e,t,i){const s="top"===e,n=s?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,r={},o=[];for(let u=0;u<n.length;u++){const e=n[u].getRowNode();!t.has(e)?(r[e.id]=n[u],e.sticky=!1):o.push(n[u])}const a=new Set;for(let u=0;u<o.length;u++)a.add(o[u].getRowNode());const l=[];t.forEach((e=>{a.has(e)||(e.sticky=!0,l.push(this.createRowCon(e,!1,!1)))}));let h=!!l.length||o.length!==n.length;s?this.topContainerHeight!==i&&(this.topContainerHeight=i,this.gridBodyCtrl.setStickyTopHeight(i),h=!0):this.bottomContainerHeight!==i&&(this.bottomContainerHeight=i,this.gridBodyCtrl.setStickyBottomHeight(i),h=!0),this.destroyRowCtrls(r,!1);const c=[...o,...l];c.sort(((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex)),s||c.reverse(),c.forEach((e=>e.setRowTop(e.getRowNode().stickyRowTop)));let d=0;return s?(t.forEach((e=>{e.rowIndex<this.pageBoundsService.getFirstRow()&&(d+=e.rowHeight)})),d>this.topContainerHeight&&(d=this.topContainerHeight),this.setOffsetTop(d)):(t.forEach((e=>{e.rowIndex>this.pageBoundsService.getLastRow()&&(d+=e.rowHeight)})),d>this.bottomContainerHeight&&(d=this.bottomContainerHeight),this.setOffsetBottom(d)),!!h&&(s?this.stickyTopRowCtrls=c:this.stickyBottomRowCtrls=c,!0)}ensureRowHeightsValid(){let e=!1;const t=t=>{const i=t.getRowNode();if(i.rowHeightEstimated){const t=B(this.gos,i);i.setRowHeight(t.height),e=!0}};return this.stickyTopRowCtrls.forEach(t),this.stickyBottomRowCtrls.forEach(t),e}},wl=class extends ze{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach((e=>e.onCellSelectionChanged()))},t=()=>{this.getAllCellCtrls().forEach((e=>e.updateRangeBordersIfRangeCount()))},i=()=>{this.eventService.addEventListener("cellSelectionChanged",e),this.eventService.addEventListener("columnMoved",t),this.eventService.addEventListener("columnPinned",t),this.eventService.addEventListener("columnVisible",t)},s=()=>{this.eventService.removeEventListener("cellSelectionChanged",e),this.eventService.removeEventListener("columnMoved",t),this.eventService.removeEventListener("columnPinned",t),this.eventService.removeEventListener("columnVisible",t)};this.addDestroyFunc((()=>s())),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],(()=>{le(this.gos)?i():s()}));le(this.gos)&&i()}}wireBeans(e){this.animationFrameService=e.animationFrameService,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusService=e.focusService,this.beans=e,this.rowContainerHeightService=e.rowContainerHeightService,this.ctrlsService=e.ctrlsService,this.environment=e.environment}postConstruct(){this.ctrlsService.whenReady(this,(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()}))}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],(()=>this.onDomLayoutChanged())),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],(()=>this.redraw())),this.addManagedPropertyListener("suppressCellFocus",(e=>this.onSuppressCellFocusChanged(e.currentValue))),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection","rowSelection"],(()=>this.redrawRows())),Z(this.gos)&&(L(this.gos)||F(this.gos))&&(this.stickyRowFeature=this.createManagedBean(new Sl(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this)))),this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=k(this.gos,"print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=null!=e?e:3;this.cachedRowCtrls=new bl(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){const e=st(this.rowCtrlsByRowIndex),t=st(this.zombieRowCtrls),i=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}onCellFocusChanged(e){this.getAllCellCtrls().forEach((t=>t.onCellFocused(e))),this.getFullWidthRowCtrls().forEach((t=>t.onFullWidthRowFocused(e)))}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach((t=>t.onSuppressCellFocusChanged(e))),this.getFullWidthRowCtrls().forEach((t=>t.onSuppressCellFocusChanged(e)))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>{this.onCellFocusChanged(e)},cellFocusCleared:()=>this.onCellFocusChanged(),flashCells:e=>{this.getAllCellCtrls().forEach((t=>t.onFlashCells(e)))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach((e=>e.onColumnHover()))},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach((e=>e.onDisplayedColumnsChanged()))},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach((e=>e.onLeftChanged()))}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach((e=>e())),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();this.columnModel.getCols().forEach((e=>{const t=t=>{this.getAllCellCtrls().forEach((i=>{i.getColumn()===e&&t(i)}))},i=()=>{t((e=>e.onLeftChanged()))},s=()=>{t((e=>e.onWidthChanged()))},n=()=>{t((e=>e.onFirstRightPinnedChanged()))},r=()=>{t((e=>e.onLastLeftPinnedChanged()))},o=()=>{t((e=>e.onColDefChanged()))};e.addEventListener("leftChanged",i),e.addEventListener("widthChanged",s),e.addEventListener("firstRightPinnedChanged",n),e.addEventListener("lastLeftPinnedChanged",r),e.addEventListener("colDefChanged",o),this.destroyFuncsForColumnListeners.push((()=>{e.removeEventListener("leftChanged",i),e.removeEventListener("widthChanged",s),e.removeEventListener("firstRightPinnedChanged",n),e.removeEventListener("lastLeftPinnedChanged",r),e.removeEventListener("colDefChanged",o)}))}))}onDomLayoutChanged(){const e=k(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsForColumn(e){const t=[];return this.getAllRowCtrls().forEach((i=>{const s=i.getCellElement(e);s&&t.push(s)})),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,t){const{pinnedRowModel:i,beans:s,printLayout:n}=this,r=Object.fromEntries(e.map((e=>[e.getRowNode().id,e])));i.forEachPinnedRow(t,((o,a)=>{const l=e[a];l&&void 0===i.getPinnedRowById(l.getRowNode().id,t)&&(l.destroyFirstPass(),l.destroySecondPass()),o.id in r?(e[a]=r[o.id],delete r[o.id]):e[a]=new ma(o,s,!1,!1,n)}));const o="top"===t?i.getPinnedTopRowCount():i.getPinnedBottomRowCount();e.length=o}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else{if(this.cachedRowCtrls?.has(e))return void this.cachedRowCtrls.removeRow(e);{const t=t=>{const i=t[e.rowIndex];i&&i.getRowNode()===e&&(i.destroyFirstPass(),i.destroySecondPass(),t[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":t(this.topRowCtrls);break;case"bottom":t(this.bottomRowCtrls);break;default:t(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(null!=e)return e?.forEach((e=>this.redrawRow(e,!0))),void this.dispatchDisplayedRowsChanged(!1);this.redrawAfterModelUpdate()}getCellToRestoreFocusToAfterRefresh(e){const t=e?.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==t)return null;const i=K(this.gos),s=H(this.gos,i,ua.DOM_DATA_KEY_CELL_CTRL),n=H(this.gos,i,ma.DOM_DATA_KEY_ROW_CTRL);return s||n?t:null}redrawAfterModelUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.getLockOnRefresh();const t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);
2const i=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&Y(this.gos),n=i?this.getRowsToRecycle():null;if(i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature){this.stickyRowFeature.checkStickyRows();const e=this.stickyRowFeature.getExtraTopHeight()+this.stickyRowFeature.getExtraBottomHeight();e&&this.updateContainerHeights(e)}this.recycleRows(n,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&(this.gridBodyCtrl.getScrollFeature().scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.printLayout)return void this.rowContainerHeightService.setModelHeight(null);let t=this.pageBoundsService.getCurrentPageHeight();0===t&&(t=1),this.rowContainerHeightService.setModelHeight(t+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }
2, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0,this.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&this.focusService.restoreFocusedCell(e,(()=>{this.onCellFocusChanged(this.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}))}stopEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.getAllRowCtrls().forEach((t=>{t.stopEditing(e)}))}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let s=0;s<i;s++){const i=t[s].getAllCellCtrls(),n=i.length;for(let t=0;t<n;t++)e.push(i[t])}return e}getAllRowCtrls(){const e=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],t=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],i=[...this.topRowCtrls,...this.bottomRowCtrls,...e,...t];for(const s in this.rowCtrlsByRowIndex)i.push(this.rowCtrlsByRowIndex[s]);return i}addRenderedRowListener(e,t,i){const s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,i)}flashCells(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.getCellCtrls(e.rowNodes,e.columns).forEach((t=>t.flashCell(e)))}refreshCells(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(const i of this.getCellCtrls(e.rowNodes,e.columns))i.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=null;this.stickyRowFeature&&Vi()&&(t=this.getCellToRestoreFocusToAfterRefresh()||null);for(const i of this.getRowCtrls(e)){if(!i.isFullWidth())continue;i.refreshFullWidth()||this.redrawRow(i.getRowNode(),!0)}this.dispatchDisplayedRowsChanged(!1),t&&this.restoreFocusedCell(t)}getCellRendererInstances(e){const t=this.getCellCtrls(e.rowNodes,e.columns).map((e=>e.getCellRenderer())).filter((e=>null!=e));if(e.columns?.length)return t;const i=[],s=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach((e=>{if(s&&!this.isRowInMap(e.getRowNode(),s))return;if(!e.isFullWidth())return;const t=e.getFullWidthCellRenderers();for(let s=0;s<t.length;s++){const e=t[s];null!=e&&i.push(e)}})),[...i,...t]}getCellEditorInstances(e){const t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach((e=>{const i=e.getCellEditor();i&&t.push(i)})),t}getEditingCells(){const e=[];return this.getAllCellCtrls().forEach((t=>{if(t.isEditing()){const i=t.getCellPosition();e.push(i)}})),e}mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach((e=>{const i=e.id;switch(e.rowPinned){case"top":t.top[i]=e;break;case"bottom":t.bottom[i]=e;break;default:t.normal[i]=e}})),t}isRowInMap(e,t){const i=e.id;switch(e.rowPinned){case"top":return null!=t.top[i];case"bottom":return null!=t.bottom[i];default:return null!=t.normal[i]}}getRowCtrls(e){const t=this.mapRowNodes(e),i=this.getAllRowCtrls();return e&&t?i.filter((e=>{const i=e.getRowNode();return this.isRowInMap(i,t)})):i}getCellCtrls(e,t){let i;w(t)&&(i={},t.forEach((e=>{const t=this.columnModel.getCol(e);w(t)&&(i[t.getId()]=!0)})));const s=[];return this.getRowCtrls(e).forEach((e=>{e.getAllCellCtrls().forEach((e=>{const t=e.getColumn().getId();i&&!i[t]||s.push(e)}))})),s}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){const e=[];et(this.rowCtrlsByRowIndex,((t,i)=>{null==i.getRowNode().id&&e.push(t)})),this.removeRowCtrls(e);const t={};return et(this.rowCtrlsByRowIndex,((e,i)=>{const s=i.getRowNode();t[s.id]=i})),this.rowCtrlsByRowIndex={},t}removeRowCtrls(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.forEach((e=>{const i=this.rowCtrlsByRowIndex[e];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[e]}))}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{afterScroll:t}=e;let i;this.stickyRowFeature&&Vi()&&(i=this.getCellToRestoreFocusToAfterRefresh()||void 0);
vendor: 13,368 bytes, line 2
2const s=this.firstRenderedRow,n=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let r=!1;if(this.stickyRowFeature){r=this.stickyRowFeature.checkStickyRows();const e=this.stickyRowFeature.getExtraTopHeight()+this.stickyRowFeature.getExtraBottomHeight();e&&this.updateContainerHeights(e)}const o=this.firstRenderedRow!==s||this.lastRenderedRow!==n;if((!t||r||o)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,t),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(t&&!r),null!=i)){const e=this.getCellToRestoreFocusToAfterRefresh();null!=i&&null==e&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const i={};e.forEach((e=>i[e]=!0));const s=Object.keys(this.rowCtrlsByRowIndex).filter((e=>!i[e]));this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){const t=function(e,t){const i=[];for(let s=e;s<=t;s++)i.push(s);return i}(this.firstRenderedRow,this.lastRenderedRow),i=(e,i)=>{const s=i.getRowNode().rowIndex;null!=s&&(s<this.firstRenderedRow||s>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(i)&&t.push(s)};et(this.rowCtrlsByRowIndex,i),et(e,i),t.sort(((e,t)=>e-t));const s=[];for(let n=0;n<t.length;n++){const e=t[n],i=this.rowModel.getRow(e);i&&!i.sticky&&s.push(e)}return s}recycleRows(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(s,!t);const n=[];if(s.forEach((s=>{const r=this.createOrUpdateRowCtrl(s,e,t,i);w(r)&&n.push(r)})),e){i&&!this.gos.get("suppressAnimationFrame")&&!this.printLayout?this.beans.animationFrameService.addDestroyTask((()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()})):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.eventService.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const e=this.visibleColsService.isPinningLeft(),t=this.visibleColsService.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach((t=>{const i=t.getRowNode().rowIndex;e.push(i.toString())})),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=this.mapRowNodes(e);return this.getAllRowCtrls().filter((e=>{if(!e.isFullWidth())return!1;const i=e.getRowNode();return!(null!=t&&!this.isRowInMap(i,t))}))}createOrUpdateRowCtrl(e,t,i,s){let n,r=this.rowCtrlsByRowIndex[e];r||(n=this.rowModel.getRow(e),w(n)&&w(t)&&t[n.id]&&n.alreadyRendered&&(r=t[n.id],t[n.id]=null));if(!r){if(n||(n=this.rowModel.getRow(e)),!w(n))return;r=this.createRowCon(n,i,s)}return n&&(n.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r,r}destroyRowCtrls(e,t){const i=[];et(e,((e,s)=>{if(s)if(this.cachedRowCtrls&&s.isCacheable())this.cachedRowCtrls.addRow(s);else if(s.destroyFirstPass(!t),t){const e=s.instanceId;this.zombieRowCtrls[e]=s,i.push((()=>{s.destroySecondPass(),delete this.zombieRowCtrls[e]}))}else s.destroySecondPass()})),t&&(i.push((()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()})),u(i))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*V(this.gos)}workOutFirstAndLastRowsToRender(){let e,t;if(this.rowContainerHeightService.updateOffset(),this.rowModel.isRowsToRender())if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.pageBoundsService.getFirstRow(),t=this.pageBoundsService.getLastRow();else{const i=this.getRowBufferInPixels(),s=this.ctrlsService.getGridBodyCtrl(),n=this.gos.get("suppressRowVirtualisation");let r,o,a=!1;do{const e=this.pageBoundsService.getPixelOffset(),{pageFirstPixel:t,pageLastPixel:l}=this.pageBoundsService.getCurrentPagePixelRange(),h=this.rowContainerHeightService.getDivStretchOffset(),c=s.getScrollFeature().getVScrollPosition(),d=c.top,u=c.bottom;n?(r=t+h,o=l+h):(r=Math.max(d+e-i,t)+h,o=Math.min(u+e+i,l)+h),this.firstVisibleVPixel=Math.max(d+e,t)+h,this.lastVisibleVPixel=Math.min(u+e,l)+h,a=this.ensureAllRowsInRangeHaveHeightsCalculated(r,o)}while(a);let l=this.rowModel.getRowIndexAtPixel(r),h=this.rowModel.getRowIndexAtPixel(o);const c=this.pageBoundsService.getFirstRow(),d=this.pageBoundsService.getLastRow();l<c&&(l=c),h>d&&(h=d),e=l,t=h}else e=0,t=-1;const i=k(this.gos,"normal"),s=this.gos.get("suppressMaxRenderedRowRestriction"),n=Math.max(this.getRowBuffer(),500);i&&!s&&t-e>n&&(t=e+n);const r=e!==this.firstRenderedRow,o=t!==this.lastRenderedRow;(r||o)&&(this.firstRenderedRow=e,this.lastRenderedRow=t,this.eventService.dispatchEvent({type:"viewportChanged",firstRow:e,lastRow:t}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,window.requestAnimationFrame((()=>{this.beans.eventService.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})})))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.pinnedRowModel?.ensureRowHeightsValid(),s=this.stickyRowFeature?.ensureRowHeightsValid(),n=this.rowModel.ensureRowHeightsValid(e,t,this.pageBoundsService.getFirstRow(),this.pageBoundsService.getLastRow());return(n||s)&&this.eventService.dispatchEvent({type:"recalculateRowBounds"}),!!(s||n||i)&&(this.updateContainerHeights(),!0)}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){const t=!1,i=e.getRowNode(),s=this.focusService.isRowNodeFocused(i),n=e.isEditing(),r=i.detail;if(!(s||n||r))return t;return!!this.isRowPresent(i)||t}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&(!this.paginationService||this.paginationService.isRowPresent(e))}createRowCon(e,t,i){const s=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(s)return s;const n=this.gos.get("suppressAnimationFrame"),r=i&&!n&&!this.printLayout;return new ma(e,this.beans,t,r,this.printLayout)}getRenderedNodes(){const e=this.rowCtrlsByRowIndex;return Object.values(e).map((e=>e.getRowNode()))}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find((e=>e.getRowNode().rowIndex===i))||null,t||(t=this.getStickyBottomRowCtrls().find((e=>e.getRowNode().rowIndex===i))||null))}return t}isRangeInRenderedViewport(e,t){if(null==e||null==t)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},bl=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}}getRow(e){if(null==e||null==e.id)return null;const t=this.entriesMap[e.id];if(!t)return null;this.removeFromCache(t),t.setCached(!1);return t.getRowNode()!=e?null:t}has(e){return null!=this.entriesMap[e.id]}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],Me(this.entriesList,i)}removeFromCache(e){const t=e.getRowNode().id;delete this.entriesMap[t],Me(this.entriesList,e)}getEntries(){return this.entriesList}},xl=class extends ze{constructor(){super(...arguments),this.beanName="pinnedRowModel",this.nextId=0,this.pinnedTopRows=new Ml,this.pinnedBottomRows=new Ml}wireBeans(e){this.beans=e}postConstruct(){this.setPinnedRowData(this.gos.get("pinnedTopRowData"),"top"),this.setPinnedRowData(this.gos.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",(e=>this.setPinnedRowData(e.currentValue,"top"))),this.addManagedPropertyListener("pinnedBottomRowData",(e=>this.setPinnedRowData(e.currentValue,"bottom"))),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}isEmpty(e){return("top"===e?this.pinnedTopRows:this.pinnedBottomRows).isEmpty()}isRowsToRender(e){return!this.isEmpty(e)}onGridStylesChanges(e){if(e.rowHeightChanged){const e=e=>{e.setRowHeight(e.rowHeight,!0)};this.pinnedBottomRows.forEach(e),this.pinnedTopRows.forEach(e)}}ensureRowHeightsValid(){let e=!1,t=0;const i=i=>{if(i.rowHeightEstimated){const s=B(this.gos,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return this.pinnedBottomRows?.forEach(i),t=0,this.pinnedTopRows?.forEach(i),this.eventService.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventService.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const i="top"===t?this.pinnedTopRows:this.pinnedBottomRows;if(void 0===e)return void i.clear();const s=ie(this.gos),n="top"===t?Yn.ID_PREFIX_TOP_PINNED:Yn.ID_PREFIX_BOTTOM_PINNED,r=i.getIds(),o=[],a=new Set;let l=0,c=-1;for(const d of e){const e=s?.({data:d,level:0,rowPinned:t})??n+this.nextId++;if(a.has(e)){h("Duplicate ID",e,"found for pinned row with data",d,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter.");continue}c++,a.add(e),o.push(e);const u=i.getById(e);if(void 0!==u)u.data!==d&&u.setData(d),l+=this.setRowTopAndRowIndex(u,l,c),r.delete(e);else{const s=new Yn(this.beans);s.id=e,s.data=d,s.rowPinned=t,l+=this.setRowTopAndRowIndex(s,l,c),i.push(s)}}r.forEach((e=>{i.getById(e)?.clearRowTopAndRowIndex()})),i.removeAllById(r),i.setOrder(o)}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(B(this.gos,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getPinnedTopRowCount(){return this.pinnedTopRows.getSize()}getPinnedBottomRowCount(){return this.pinnedBottomRows.getSize()}getPinnedTopRow(e){return this.pinnedTopRows.getByIndex(e)}getPinnedBottomRow(e){return this.pinnedBottomRows.getByIndex(e)}getPinnedRowById(e,t){return"top"===t?this.pinnedTopRows.getById(e):this.pinnedBottomRows.getById(e)}forEachPinnedRow(e,t){return"top"===e?this.pinnedTopRows.forEach(t):this.pinnedBottomRows.forEach(t)}getTotalHeight(e){const t=e.getSize();if(0===t)return 0;const i=e.getByIndex(t-1);return void 0===i?0:i.rowTop+i.rowHeight}},Ml=class{constructor(){this.cache={},this.ordering=[]}getById(e){return this.cache[e]}getByIndex(e){const t=this.ordering[e];return this.cache[t]}push(e){this.cache[e.id]=e,this.ordering.push(e.id)}removeAllById(e){for(const t of e)delete this.cache[t];this.ordering=this.ordering.filter((t=>!e.has(t)))}setOrder(e){this.ordering=e}forEach(e){this.ordering.forEach(((t,i)=>{const s=this.cache[t];s&&e(s,i)}))}clear(){this.ordering.length=0,this.cache={}}isEmpty(){return 0===this.ordering.length}getSize(){return this.ordering.length}getIds(){return new Set(this.ordering)}},Dl=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(Dl||{}),Il=class extends ze{constructor(e){super(),this.state="needsLoading",this.version=0,this.id=e}getId(){return this.id}load(){this.state="loading",this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}getState(){return this.state}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed",this.processServerFail()),this.dispatchLoadCompleted(!1)}success(e,t){this.successCommon(e,t)}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){const t=e===this.version,i=this.isAlive();return t&&i}successCommon(e,t){this.dispatchLoadCompleted();this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}dispatchLoadCompleted(){const e={type:"loadComplete",success:!(arguments.length>0&&void 0!==arguments[0])||arguments[0],block:this};this.dispatchLocalEvent(e)}},Rl={version:Yr,moduleName:"@ag-grid-community/row-node-block",beans:[class extends ze{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=f(this.performCheckBlocksToLoad.bind(this),e))}getMaxConcurrentDatasourceRequests(){const e=this.gos.get("maxConcurrentDatasourceRequests");return null==e?2:e<=0?void 0:e}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Me(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchLocalEvent({type:"blockLoaded"}),0==this.activeBlockLoadsCount&&this.dispatchLocalEvent({type:"blockLoaderFinis
2hed"})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)return void(this.gos.get("debug")&&l("RowNodeBlockLoader - checkBlockToLoad: max loads exceeded"));const e=this.getAvailableLoadingCount(),t=this.blocks.filter((e=>"needsLoading"===e.getState())).slice(0,e);this.registerLoads(t.length),t.forEach((e=>e.load())),this.printCacheStatus()}getBlockState(){if(F(this.gos)){return this.rowModel.getBlockStates()}const e={};return this.blocks.forEach((t=>{const{id:i,state:s}=t.getBlockStateJson();e[i]=s})),e}printCacheStatus(){this.gos.get("debug")&&l(`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(e){this.activeBlockLoadsCount+=e}getAvailableLoadingCount(){return void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}}]},El=class{constructor(){this.root=null,this.end=null,this.cachedRange=[]}init(e){this.rowModel=e}reset(){this.root=null,this.end=null,this.cachedRange.length=0}setRoot(e){this.root=e,this.end=null,this.cachedRange.length=0}setEndRange(e){this.end=e,this.cachedRange.length=0}getRange(){if(0===this.cachedRange.length){const e=this.getRoot(),t=this.getEnd();if(null==e||null==t)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)}return this.cachedRange}isInRange(e){return null!==this.root&&this.getRange().some((t=>t.id===e.id))}getRoot(){return this.root&&null===this.root?.key&&(this.root=this.rowModel.getRowNode(this.root.id)??null),this.root}getEnd(){return this.end&&null===this.end?.key&&(this.end=this.rowModel.getRowNode(this.end.id)??null),this.end}truncate(e){const t=this.getRange();if(0===t.length)return{keep:[],discard:[]};const i=t[0].id===this.root.id,s=t.findIndex((t=>t.id===e.id));if(s>-1){const n=t.slice(0,s),r=t.slice(s+1);return this.setEndRange(e),i?{keep:n,discard:r}:{keep:r,discard:n}}return{keep:t,discard:[]}}extend(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.getRoot();if(null==i){const i=this.getRange().slice();return t&&e.depthFirstSearch((e=>!e.group&&i.push(e))),i.push(e),this.setRoot(e),{keep:i,discard:[]}}if(this.rowModel.getNodesInRangeForSelection(i,e).find((e=>e.id===this.end?.id)))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const t=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:t}}}},Al=class extends ze{constructor(){super(...arguments),this.beanName="stylingService"}wireBeans(e){this.expressionService=e.expressionService}processAllCellClasses(e,t,i,s){this.processClassRules(void 0,e.cellClassRules,t,i,s),this.processStaticCellClasses(e,t,i)}processClassRules(e,t,i,s,n){if(null==t&&null==e)return;const r={},o={},a=(e,t)=>{e.split(" ").forEach((e=>{""!=e.trim()&&t(e)}))};if(t){const e=Object.keys(t);for(let s=0;s<e.length;s++){const n=e[s],l=t[n];let h;"string"===typeof l?h=this.expressionService.evaluate(l,i):"function"===typeof l&&(h=l(i)),a(n,(e=>{h?r[e]=!0:o[e]=!0}))}}e&&n&&Object.keys(e).forEach((e=>a(e,(e=>{r[e]||(o[e]=!0)})))),n&&Object.keys(o).forEach(n),Object.keys(r).forEach(s)}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let s;if("function"===typeof i){s=i(t)}else s=i;return"string"===typeof s&&(s=[s]),s||[]}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach((e=>{i(e)}))}},Tl=class extends $s{constructor(e){super(e,"ag-toggle-button")}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},Pl={selector:"AG-TOGGLE-BUTTON",component:Tl},Ll=(e=>(e.TAB_GUARD="ag-tab-guard",e.TAB_GUARD_TOP="ag-tab-guard-top",e.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",e))(Ll||{}),Fl=class extends ze{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:i,eBottomGuard:s,focusTrapActive:n,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:o,focusInnerElement:a,onFocusIn:l,onFocusOut:h,shouldStopEventPropagation:c,onTabKeyDown:d,handleKeyDown:u,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=a,this.eFocusableElement=p,this.focusTrapActive=!!n,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!o,this.providedFocusIn=l,this.providedFocusOut=h,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=d,this.providedHandleKeyDown=u}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.createManagedBean(new tr(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEac
vendor: 20,360 bytes, line 2
2h((e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);if(this.skipTabGuardFocus)return void(this.skipTabGuardFocus=!1);if(this.forceFocusOutWhenTabGuardsAreEmpty){if(0===this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){const t=j(this.gos),i=this.focusService.findFocusableElements(t.body,null,!0),s=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===s)return;let n,r;e?(n=0,r=s):(n=s+1,r=i.length);const o=i.slice(n,r),a=this.gos.get("tabIndex");o.sort(((e,t)=>{const i=parseInt(e.getAttribute("tabindex")||"0"),s=parseInt(t.getAttribute("tabindex")||"0");return s===a?1:i===a?-1:0===i?1:0===s?-1:i-s})),o[e?o.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown)return void this.providedOnTabKeyDown(e);if(this.focusTrapActive)return;if(e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout((()=>this.activateTabGuards()),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}forceFocusOutOfContainer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout((()=>{this.forcingFocusOut=!1,this.activateTabGuards()}))}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},kl=class extends ze{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:i,eFocusableElement:s}=this,n=[t,i],r={setTabIndex:e=>{n.forEach((t=>null!=e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")))}};this.addTabGuards(t,i);const{focusTrapActive:o=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:h,handleKeyDown:c,onTabKeyDown:d,shouldStopEventPropagation:u,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:g}=e;this.tabGuardCtrl=this.createManagedBean(new Fl({comp:r,focusTrapActive:o,eTopGuard:t,eBottomGuard:i,eFocusableElement:s,onFocusIn:a,onFocusOut:l,focusInnerElement:h,handleKeyDown:c,onTabKeyDown:d,shouldStopEventPropagation:u,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:g}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=j(this.gos).createElement("div"),i="top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom";return t.classList.add("ag-tab-guard",i),ci(t,"presentation"),t}addTabGuards(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];rs(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){vs(t)||(t=t.getGui());const{eBottomGuard:s}=this;s?s.insertAdjacentElement("beforebegin",t):e(t,i)}},Nl=class extends Rs{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new kl(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},Ol=0,Gl=class extends ze{constructor(){super(...arguments),this.beanName="popupService",this.popupList=[]}wireBeans(e){this.ctrlsService=e.ctrlsService,this.resizeObserverService=e.resizeObserverService,this.environment=e.environment}postConstruct(){this.ctrlsService.whenReady(this,(e=>{this.gridCtrl=e.gridCtrl})),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:i}=e,s=this.getPopupIndex(i);if(-1!==s){this.popupList[s].alignedToElement=t}const n=t.getBoundingClientRect(),r=this.getParentRect(),o=this.keepXYWithinBounds(i,n.top-r.top,0),a=i.clientWidth>0?i.clientWidth:200;i.style.minWidth=`${a}px`;const l=r.right-r.left-a;let h;function c(){return n.right-r.left-2}function d(){return n.left-r.left-a}this.gos.get("enableRtl")?(h=d(),h<0&&(h=c(),this.setAlignedStyles(i,"left")),h>l&&(h=0,this.setAlignedStyles(i,"right"))):(h=c(),h>l&&(h=d(),this.setAlignedStyles(i,"right")),h<0&&(h=0,this.setAlignedStyles(i,"left"))),i.style.left=`${h}px`,i.style.top=`${o}px`}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:i,nudgeY:s,skipObserver:n}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:!0,skipObserver:n,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:n,eventSource:r,alignSide:o="left",position:a="over",column:l,rowNode:h,type:c}=e,d=r.getBoundingClientRect(),u=this.getParentRect(),p=this.getPopupIndex(t);if(-1!==p){this.popupList[p].alignedToElement=r}this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:n,updatePosition:()=>{let i,n=d.left-u.left;if("right"===o&&(n-=t.offsetWidth-d.width),"over"===a)i=d.top-u.top,this.setAlignedStyles(t,"over");else{this.setAlignedStyles(t,"under");i="under"===this.shouldRenderUnderOrAbove(t,d,u,e.nudgeY||0)?d.top-u.top+d.height:d.top-t.offsetHeight-2*(s||0)-u.top}return{x:n,y:i}},postProcessCallback:()=>this.callPostProcessPopup(c,t,r,null,l,h)})}shouldRenderUnderOrAbove(e,t,i,s){const n=i.bottom-t.bottom,r=t.top-i.top,o=e.offsetHeight+s;return n>o?"under":r>o||r>n?"above":"under"}setAlignedStyles(e,t){const i=this.getPopupIndex(e);if(-1===i)return;const s=this.popupList[i],{alignedToElement:n}=s;if(!n)return;["right","left","over","above","under"].forEach((t=>{n.classList.remove(`ag-has-popup-positioned-${t}`),e.classList.remove(`ag-popup-positioned-${t}`)})),t&&(n.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}callPostProcessPopup(e,t,i,s,n,r){const o=this.gos.getCallback("postProcessPopup");if(o){o({column:n,rowNode:r,ePopup:t,type:e,eventSource:i,mouseEvent:s})}}positionPopup(e){var t=this;const{ePopup:i,keepWithinBounds:s,nudgeX:n,nudgeY:r,skipObserver:o,updatePosition:a}=e,l={width:0,height:0},h=function(){let o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{x:h,y:c}=a();o&&i.clientWidth===l.width&&i.clientHeight===l.height||(l.width=i.clientWidth,l.height=i.clientHeight,n&&(h+=n),r&&(c+=r),s&&(h=t.keepXYWithinBounds(i,h,1),c=t.keepXYWithinBounds(i,c,0)),i.style.left=`${h}px`,i.style.top=`${c}px`,e.postProcessCallback&&e.postProcessCallback())};if(h(),!o){const e=this.resizeObserverService.observeResize(i,(()=>h(!0)));setTimeout((()=>e()),200)}}getActivePopups(){return this.popupList.map((e=>e.element))}getPopupList(){return this.popupList}getParentRect(){const e=j(this.gos);let t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),ts(t)}keepXYWithinBounds(e,t,i){const s=0===i,n=s?"clientHeight":"clientWidth",r=s?"top":"left",o=s?"height":"width",a=s?"scrollTop":"scrollLeft",l=j(this.gos),h=l.documentElement,c=this.getPopupParent(),d=e.getBoundingClientRect(),u=c.getBoundingClientRect(),p=l.documentElement.getBoundingClientRect(),g=c===l.body,m=Math.ceil(d[o]);let f=g?(s?Ji:es)(h)+h[a]:c[n];g&&(f-=Math.abs(p[r]-u[r]));const v=f-m;return Math.min(Math.max(t,0),Math.abs(v))}addPopup(e){const t=j(this.gos),{eChild:i,ariaLabel:s,alwaysOnTop:n,positionCallback:r,anchorToElement:o}=e;if(!t)return h("could not find the document, document is empty"),{hideFunc:()=>{}};const a=this.getPopupIndex(i);if(-1!==a){return{hideFunc:this.popupList[a].hideFunc}}this.initialisePopupPosition(i);const l=this.createPopupWrapper(i,s,!!n),c=this.addEventListenersToPopup({...e,wrapperEl:l});return r&&r(),this.addPopupToPopupList(i,l,c,o),{hideFunc:c}}initialisePopupPosition(e){const t=this.getPopupParent().getBoundingClientRect();w(e.style.top)||(e.style.top=-1*t.top+"px"),w(e.style.left)||(e.style.left=-1*t.left+"px")}createPopupWrapper(e,t,i){const s=this.getPopupParent(),n=document.createElement("div");return this.environment.applyThemeClasses(n),n.classList.add("ag-popup"),e.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||ci(e,"dialog"),di(e,t),n.appendChild(e),s.appendChild(n),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),n}handleThemeChange(e){if(e.themeChanged)for(const t of this.popupList)this.environment.applyThemeClasses(t.wrapper)}addEventListenersToPopup(e){var t=this;const i=j(this.gos),s=this.getPopupParent(),{wrapperEl:n,eChild:r,closedCallback:o,afterGuiAttached:a,closeOnEsc:l,modal:h}=e;let c=!1;const d=e=>{if(!n.contains(K(this.gos)))return;e.key!==js.ESCAPE||Oe(e)||g({keyboardEvent:e})},u=e=>g({mouseEvent:e}),p=e=>g({touchEvent:e}),g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mouseEvent:a,touchEvent:l,keyboardEvent:h,forceHide:g}=e;(g||!t.isEventFromCurrentPopup({mouseEvent:a,touchEvent:l},r)&&!c)&&(c=!0,s.removeChild(n),i.removeEventListener("keydown",d),i.removeEventListener("mousedown",u),i.removeEventListener("touchstart",p),i.removeEventListener("contextmenu",u),t.eventService.removeEventListener("dragStarted",u),o&&o(a||l||h),t.removePopupFromPopupList(r))};return a&&a({hidePopup:g}),window.setTimeout((()=>{l&&i.addEventListener("keydown",d),h&&(i.addEventListener("mousedown",u),this.eventService.addEventListener("dragStarted",u),i.addEventListener("touchstart",p),i.addEventListener("contextmenu",u))}),0),g}addPopupToPopupList(e,t,i,s){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:Ol++,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(e,s)}getPopupIndex(e){return this.popupList.findIndex((t=>t.element===e))}setPopupPositionRelatedToElement(e,t){const i=this.getPopupIndex(e);if(-1===i)return;const s=this.popupList[i];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then((e=>e&&e())),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!t)return;const n=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:s.hideFunc});return s.stopAnchoringPromise=n,s.isAnchored=!0,n}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter((t=>t.element!==e))}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:s,ePopup:n}=e,r=s.getBoundingClientRect(),o=e=>parseInt(e.substring(0,e.length-1),10),a=(e,t)=>{const s=i[e]-r[e],a=o(n.style[e]);return{initialDiff:s,lastDiff:s,initial:a,last:a,direction:t}},l=a("top",0),h=a("left",1),c=this.getFrameworkOverrides();return new an((i=>{c.wrapIncoming((()=>{c.setInterval((()=>{const i=t.getBoundingClientRect(),r=s.getBoundingClientRect();if(0==r.top&&0==r.left&&0==r.height&&0==r.width)return void e.hidePopup();const a=(e,t)=>{const s=o(n.style[t]);e.last!==s&&(e.initial=s,e.last=s);const a=i[t]-r[t];if(a!=e.lastDiff){const i=this.keepXYWithinBounds(n,e.initial+e.initialDiff-a,e.direction);n.style[t]=`${i}px`,e.last=i}e.lastDiff=a};a(l,"top"),a(h,"left")}),200).then((e=>{i((()=>{null!=e&&window.clearInterval(e)}))}))}),"popupPositioning")}))}hasAnchoredPopup(){return this.popupList.some((e=>e.isAnchored))}isEventFromCurrentPopup(e,t){const{mouseEvent:i,touchEvent:s}=e,n=i||s;if(!n)return!1;const r=this.getPopupIndex(t);if(-1===r)return!1;for(let o=r;o<this.popupList.length;o++){if(Ve(this.popupList[o].element,n))return!0}return this.isElementWithinCustomPopup(n.target)}isElementWithinCustomPopup(e){const t=j(this.gos);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){const t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),s=i.length,n=this.getWrapper(e);if(!n||s<=1||!t.contains(e))return;const r=[],o=[];for(const c of i)c!==n&&(c.classList.contains("ag-always-on-top")?o.push(c):r.push(c));const a=[],l=o.length,h=n.classList.contains("ag-always-on-top")||!l?[...r,...o,n]:[...r,n,...o];for(let c=0;c<=s;c++){const e=h[c];if(i[c]===h[c]||e===n)continue;e.querySelectorAll("div").forEach((e=>{0!==e.scrollTop&&a.push([e,e.scrollTop])})),0===c?t.insertAdjacentElement("afterbegin",e):h[c-1].insertAdjacentElement("afterend",e)}for(;a.length;){const e=a.pop();e[0].scrollTop=e[1]}}},Bl=["touchstart","touchend","touchmove","touchcancel"],Vl=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"javascript";this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=e=>e(),this.wrapOutgoing=e=>e()}setInterval(e,t){return new an((i=>{i(window.setInterval(e,t))}))}addEventListener(e,t,i,s){const n=Ee(Bl,t);e.addEventListener(t,i,{capture:!!s,passive:n})}get shouldWrapOutgoing(){return!1}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`https://www.ag-grid.com/${"solid"===this.frameworkName?"react":this.frameworkName}-data-grid${e?`/${e}`:""}`}},zl=class extends ze{constructor(){super(...arguments),this.beanName="cellNavigationService"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer,this.pinnedRowModel=e.pinnedRowModel,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService}getNextCellToFocus(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===js.UP,s=e===js.DOWN,n=e===js.LEFT;let r,o;if(i||s)o=i?this.pageBoundsService.getFirstRow():this.pageBoundsService.getLastRow(),r=t.column;else{const e=this.visibleColsService.getAllCols(),i=this.gos.get("enableRtl");o=t.rowIndex,r=n!==i?e[0]:Se(e)}return{rowIndex:o,rowPinned:null,column:r}}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,s=!1;for(;!s;){switch(e){case js.UP:i=this.getCellAbove(i);break;case js.DOWN:i=this.getCellBelow(i);break;case js.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case js.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,h("unknown key for navigation ",e)}s=!i||this.isCellGoodToFocusOn(i)}return i}isCellGoodToFocusOn(e){const t=e.column;let i;switch(e.rowPinned){case"top":i=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":i=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:i=this.rowModel.getRow(e.rowIndex)}if(!i)return!1;return!t.isSuppressNavigable(i)}getCellToLeft(e){if(!e)return null;const t=this.visibleColsService.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.visibleColsService.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){const t=e.rowIndex,i=e.rowPinned;let s=!1;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.pageBoundsService.getFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}else i&&(s=!0);const n=this.rowModel.getRow(e.rowIndex),r=s?void 0:this.getNextStickyPosition(n);return r||{rowIndex:t+1,rowPinned:i}}getNextStickyPosition(e,t){if(!Z(this.gos)||!e||!e.sticky)return;let i=[];i=this.rowRenderer.getStickyTopRowCtrls().some((t=>t.getRowNode().rowIndex===e.rowIndex))?[...this.rowRenderer.getStickyTopRowCtrls()].sort(((e,t)=>e.getRowNode().rowIndex-t.getRowNode().rowIndex)):[...this.rowRenderer.getStickyBottomRowCtrls()].sort(((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex));const s=t?-1:1,n=i.findIndex((t=>t.getRowNode().rowIndex===e.rowIndex)),r=i[n+s];return r?{rowIndex:r.getRowNode().rowIndex,rowPinned:null}:void 0}getCellBelow(e){if(!e)return null;const t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}isLastRowInContainer(e){const t=e.rowPinned,i=e.rowIndex;if("top"===t){return this.pinnedRowModel.getPinnedTopRowCount()-1<=i}if("bottom"===t){return this.pinnedRowModel.getPinnedBottomRowCount()-1<=i}return this.pageBoundsService.getLastRow()<=i}getRowAbove(e){const t=e.rowIndex,i=e.rowPinned;let s=!1;if(i?0===t:t===this.pageBoundsService.getFirstRow())return"top"===i?null:i&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;i&&(s=!0);const n=this.rowModel.getRow(e.rowIndex),r=s?void 0:this.getNextStickyPosition(n,!0);return r||{rowIndex:t-1,rowPinned:i}}getCellAbove(e){if(!e)return null;const t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.pageBoundsService.getLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowCount()-1,rowPinned:"top"}}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const t=this.visibleColsService.getAllCols();let i=e.rowIndex,s=e.rowPinned,n=this.visibleColsService.getColAfter(e.column);if(!n){n=t[0];const r=this.getRowBelow(e);if(b(r))return null;if(!r.rowPinned&&!(this.paginationService?.isRowInPage(r)??1))return null;i=r?r.rowIndex:null,s=r?r.rowPinned:null}return{rowIndex:i,column:n,rowPinned:s}}getNextTabbedCellBackwards(e){const t=this.visibleColsService.getAllCols();let i=e.rowIndex,s=e.rowPinned,n=this.visibleColsService.getColBefore(e.column);if(!n){n=Se(t);const r=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(b(r))return null;if(!r.rowPinned&&!(this.paginationService?.isRowInPage(r)??1))return null;i=r?r.rowIndex:null,s=r?r.rowPinned:null}return{rowIndex:i,column:n,rowPinned:s}}}
2,Hl=(e,t)=>{for(const i in t)t[i]=e;return t},Wl={...Hl("@ag-grid-community/core",{dispatchEvent:0,destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,getState:0,setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0,redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRow:0,getFirstDisplayedRowIndex:0,getLastDisplayedRow:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0,getModel:0,getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0,getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0,addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0,expireValueCache:0,getValue:0,getCellValue:0,showColumnMenuAfterButtonClick:0,showColumnMenuAfterMouseClick:0,showColumnMenu:0,hidePopupMenu:0,onSortChanged:0,getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0,setGridAriaProperty:0,refreshCells:0,flashCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0,addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getColumnDef:0,getColumnDefs:0,sizeColumnsToFit:0,setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumn:0,getDisplayNameForColumnGroup:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnVisible:0,setColumnsVisible:0,setColumnPinned:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0,moveColumn:0,moveColumnByIndex:0,moveColumns:0,setColumnWidth:0,setColumnWidths:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0,autoSizeColumn:0,autoSizeColumns:0,autoSizeAllColumns:0,undoCellEditing:0,redoCellEditing:0,getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0,getCurrentUndoSize:0,getCurrentRedoSize:0,isAnyFilterPresent:0,onFilterChanged:0,isColumnFilterPresent:0,getFilterInstance:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0,paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0,expandAll:0,collapseAll:0,onRowHeightChanged:0,setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...Hl("@ag-grid-community/client-side-row-model",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...Hl("@ag-grid-community/csv-export",{getDataAsCsv:0,exportDataAsCsv:0}),...Hl("@ag-grid-community/infinite-row-model",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...Hl("@ag-grid-enterprise/advanced-filter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...Hl("@ag-grid-enterprise/charts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...Hl("@ag-grid-enterprise/clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...Hl("@ag-grid-enterprise/excel-export",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...Hl("@ag-grid-enterprise/master-detail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...Hl("@ag-grid-enterprise/menu",{showContextMenu:0,showColumnChooser:0,hideColumnChooser:0}),...Hl("@ag-grid-enterprise/range-selection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...Hl("@ag-grid-enterprise/row-grouping",{addAggFunc:0,addAggFuncs:0,clearAggFuncs:0,setColumnAggFu
vendor: 4,148 bytes, line 2
2nc:0,isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumn:0,removeValueColumns:0,addValueColumn:0,addValueColumns:0,setRowGroupColumns:0,removeRowGroupColumn:0,removeRowGroupColumns:0,addRowGroupColumn:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0,setPivotColumns:0,removePivotColumn:0,removePivotColumns:0,addPivotColumn:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...Hl("@ag-grid-enterprise/server-side-row-model",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...Hl("@ag-grid-enterprise/side-bar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...Hl("@ag-grid-enterprise/status-bar",{getStatusPanel:0})},jl={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Ul=(e,t)=>e.eventService.dispatchEvent(t),_l=class{};Reflect.defineProperty(_l,"name",{value:"GridApi"});var Kl=class extends ze{constructor(){super(),this.beanName="apiFunctionService",this.api=new _l,this.fns={...jl,dispatchEvent:Ul},this.beans=null,this.preDestroyLink="";const{api:e}=this;for(const t in Wl)e[t]=this.makeApi(t)[t]}wireBeans(e){this.beans=e}postConstruct(){this.preDestroyLink=this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:i,beans:s}=this;i!==jl&&(i[e]=s?.validationService?.validateApiFunction(e,t)??t)}makeApi(e){var t=this;return{[e]:function(){const{beans:i,fns:{[e]:s}}=t;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return s?s(i,...r):t.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:i,preDestroyLink:s}=this;if(t){const t=Wl[e];i.assertModuleRegistered(t,`api.${e}`)&&h(`API function '${e}' not registered to module '${t}'`)}else h(`Grid API function ${e}() cannot be called as the grid has been destroyed.\nEither clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\nTo run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${s}`)}destroy(){super.destroy(),this.fns=jl,this.beans=null}};function $l(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionService").api}}var Yl=class extends ze{constructor(){super(...arguments),this.beanName="columnDefFactory"}buildColumnDefs(e,t,i){const s=[],n={};return e.forEach((e=>{let r=!0,o=this.createDefFromColumn(e,t,i),a=e.getOriginalParent(),l=null;for(;a;){let e=null;if(a.isPadding()){a=a.getOriginalParent();continue}const t=n[a.getGroupId()];if(t){t.children.push(o),r=!1;break}if(e=this.createDefFromGroup(a),e&&(e.children=[o],n[e.groupId]=e,o=e,a=a.getOriginalParent()),null!=a&&l===a){r=!1;break}l=a}r&&s.push(o)})),s}createDefFromGroup(e){const t=it(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const s=it(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?i.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=!e.isVisible()||void 0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,s.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,s}},Zl=class extends ze{constructor(){super(...arguments),this.beanName="columnEventDispatcher"}visibleCols(e){this.eventService.dispatchEvent({type:"displayedColumnsChanged",source:e})}gridColumns(){this.eventService.dispatchEvent({type:"gridColumnsChanged"})}headerHeight(e){this.eventService.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"})}groupHeaderHeight(e){this.eventService.dispatchEvent({type:"columnGroupHeaderHeight
2Changed",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}groupOpened(e){this.eventService.dispatchEvent({type:"columnGroupOpened",columnGroup:1===e.length?e[0]:void 0,columnGroups:e})}rowGroupChanged(e,t){this.eventService.dispatchEvent({type:"columnRowGroupChanged",columns:e,column:1===e.length?e[0]:null,source:t})}genericColumnEvent(e,t,i){this.eventService.dispatchEvent({type:e,columns:t,column:1===t.length?t[0]:null,source:i})}pivotModeChanged(){this.eventService.dispatchEvent({type:"columnPivotModeChanged"})}virtualColumnsChanged(e){this.eventService.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}newColumnsLoaded(e){this.eventService.dispatchEvent({type:"newColumnsLoaded",source:e})}everythingChanged(e){this.eventService.dispatchEvent({type:"columnEverythingChanged",source:e})}columnMoved(e){const{movedColumns:t,source:i,toIndex:s,finished:n}=e;this.eventService.dispatchEvent({type:"columnMoved",columns:t,column:t&&1===t.length?t[0]:null,toIndex:s,finished:n,source:i})}columnPinned(e,t){if(!e.length)return;const i=1===e.length?e[0]:null,s=this.getCommonValue(e,(e=>e.getPinned()));this.eventService.dispatchEvent({type:"columnPinned",pinned:null!=s?s:null,columns:e,column:i,source:t})}columnVisible(e,t){if(!e.length)return;const i=1===e.length?e[0]:null,s=this.getCommonValue(e,(e=>e.isVisible()));this.eventService.dispatchEvent({type:"columnVisible",visible:s,columns:e,column:i,source:t})}getCommonValue(e,t){if(!e||0==e.length)return;const i=t(e[0]);for(let s=1;s<e.length;s++)if(i!==t(e[s]))return;return i}columnChanged(e,t,i){this.eventService.dispatchEvent({type:e,columns:t,column:t&&1==t.length?t[0]:null,source:i})}columnResized(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;e&&e.length&&this.eventService.dispatchEvent({type:"columnResized",columns:e,column:1===e.length?e[0]:null,flexColumns:s,finished:t,source:i})}},ql=class extends ze{constructor(){super(...arguments),this.beanName="columnGetStateService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}getColumnState(){if(b(this.columnModel.getColDefCols())||!this.columnModel.isAlive())return[];const e=this.columnModel.getAllCols().map((e=>this.createStateItemFromColumn(e)));return this.orderColumnStateList(e),e}createStateItemFromColumn(e){const t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns(),s=e.isRowGroupActive()?t.indexOf(e):null,n=e.isPivotActive()?i.indexOf(e):null,r=e.isValueActive()?e.getAggFunc():null,o=null!=e.getSort()?e.getSort():null,a=null!=e.getSortIndex()?e.getSortIndex():null,l=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:o,sortIndex:a,aggFunc:r,rowGroup:e.isRowGroupActive(),rowGroupIndex:s,pivot:e.isPivotActive(),pivotIndex:n,flex:l}}orderColumnStateList(e){const t=this.columnModel.getCols(),i=new Map(t.map(((e,t)=>[e.getColId(),t])));e.sort(((e,t)=>(i.has(e.colId)?i.get(e.colId):-1)-(i.has(t.colId)?i.get(t.colId):-1)))}},Ql=class extends ze{constructor(){super(...arguments),this.beanName="columnGroupStateService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService}getColumnGroupState(){const e=[];return mt(null,this.columnModel.getColTree(),(t=>{He(t)&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})})),e}resetColumnGroupState(e){const t=this.columnModel.getColDefColTree();if(!t)return;const i=[];mt(null,t,(e=>{if(He(e)){const t=e.getColGroupDef(),s={groupId:e.getGroupId(),open:t?t.openByDefault:void 0};i.push(s)}})),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){if(!this.columnModel.getColTree())return;this.columnAnimationService.start();const i=[];e.forEach((e=>{const t=e.groupId,s=e.open,n=this.columnModel.getProvidedColGroup(t);n&&n.isExpanded()!==s&&(n.setExpanded(s),i.push(n))})),this.visibleColsService.refresh(t,!0),i.length&&this.eventDispatcher.groupOpened(i),this.columnAnimationService.finish()}},Xl=class extends ze{constructor(){super(...arguments),this.beanName="
2columnViewportService",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleColsService=e.visibleColsService,this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.visibleColsService.isBodyWidthDirty();if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,this.visibleColsService.setBodyWidthDirty(),this.gos.get("enableRtl")){const e=this.visibleColsService.getBodyContainerWidth();this.viewportLeft=e-this.scrollPosition-this.scrollWidth,this.viewportRight=e-this.scrollPosition}else this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition;this.columnModel.isReady()&&this.checkViewportColumns(i)}}getHeadersToRender(e,t){let i;switch(e){case"left":i=this.rowsOfHeadersToRenderLeft[t];break;case"right":i=this.rowsOfHeadersToRenderRight[t];break;default:i=this.rowsOfHeadersToRenderCenter[t]}return i||[]}extractViewportColumns(){const e=this.visibleColsService.getCenterCols();this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||0===this.viewportRight}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return!(!e.isAutoHeaderHeight()&&!this.isAnyParentAutoHeaderHeight(e))||this.isColumnInRowViewport(e)}isAnyParentAutoHeaderHeight(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),s=this.viewportLeft-200,n=this.viewportRight+200;return!(t<s&&i<s)&&!(t>n&&i>n)}getViewportColumns(){const e=this.visibleColsService.getLeftCols(),t=this.visibleColsService.getRightCols();return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.columnModel.isColSpanActive())return this.colsWithinViewport;const t=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),i=this.visibleColsService.getColsCenter();return this.visibleColsService.getColsForRow(e,i,t,(e=>{const t=e.getLeft();return w(t)&&t>this.viewportLeft}))}checkViewportColumns(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.extractViewport()&&this.eventDispatcher.virtualColumnsChanged(e)}calculateHeaderRows(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={};const e={},t=this.visibleColsService.getLeftCols(),i=this.visibleColsService.getRightCols();this.headerColsWithinViewport.concat(t).concat(i).forEach((t=>e[t.getId()]=!0));const s=(t,i,n)=>{let r=!1;for(let o=0;o<t.length;o++){const a=t[o];let l=!1;if(ct(a))l=!0===e[a.getId()];else{const e=a.getDisplayedChildren();e&&(l=s(e,i,n+1))}l&&(r=!0,i[n]||(i[n]=[]),i[n].push(a))}return r};s(this.visibleColsService.getTreeLeft(),this.rowsOfHeadersToRenderLeft,0),s(this.visibleColsService.getTreeRight(),this.rowsOfHeadersToRenderRight,0),s(this.visibleColsService.getTreeCenter(),this.rowsOfHeadersToRenderCenter,0)}extractViewport(){this.extractViewportColumns();const e=this.getViewportColumns().map((e=>`${e.getId()}-${e.getPinned()||"normal"}`)).join("#"),t=this.colsWithinViewportHash!==e;return t&&(this.colsWithinViewportHash=e,this.calculateHeaderRows()),t}},Jl=class extends ze{constructor(){super(...arguments),this.beanName="agComponentUtils"}wireBeans(e){this.componentMetadataProvider=e.componentMetadataProvider}adaptFunction(e,t){const i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null}adaptCellRendererFunction(e){return class{refresh(){return!1}getGui(){return this.eGui}init(t){const i=e(t),s=typeof i;this.eGui="string"!==s&&"number"!==s&&"boolean"!==s?null!=i?i:hs("<span></span>"):hs("<span>"+i+"</span>")}}}doesImplementIComponent(e){return!!e&&(e.prototype&&"getGui"in e.prototype)}},eh=class extends ze{constructor(){super(...arguments),this.beanName="
2componentMetadataProvider"}wireBeans(e){this.agComponentUtils=e.agComponentUtils}postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},dragAndDropImageComponent:{mandatoryMethodList:["setIcon","setLabel"],optionalMethodList:[]},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}}}retrieve(e){return this.componentMetaData[e]}},th=Object.fromEntries(["rowPositionUtils","cellPositionUtils","headerPositionUtils","paginationAutoPageSizeService","apiFunctionService","gridApi","userComponentRegistry","agComponentUtils","componentMetadataProvider","resizeObserverService","userComponentFactory","rowContainerHeightService","horizontalResizeService","localeService","validationService","pinnedRowModel","dragService","visibleColsService","eventService","gos","popupService","selectionService","columnFilterService","quickFilterService","filterManager","columnModel","headerNavigationService","pageBoundsService","paginationService","pageBoundsListener","rowRenderer","expressionService","columnFactory","alignedGridsService","navigationService","valueCache","valueService","loggerFactory","autoWidthCalculator","filterMenuFactory","dragAndDropService","focusService","mouseEventService","environment","cellNavigationService","stylingService","scrollVisibleService","sortController","columnHoverService","columnAnimationService","selectableService","autoColService","controlsColService","changeDetectionService","animationFrameService","undoRedoService","columnDefFactory","rowCssClassCalculator","rowNodeBlockLoader","rowNodeSorter","ctrlsService","pinnedWidthService","rowNodeEventThrottle","ctrlsFactory","dataTypeService","syncService","overlayService","stateService","expansionService","apiEventService","ariaAnnouncementService","menuService","columnApplyStateService","columnEventDispatcher","columnMoveService","columnAutosizeService","columnGetStateService","columnGroupStateService","columnSizeService","funcColsService","columnNameService","columnViewportService","pivotResultColsService","showRowGroupColsService"].map(((e,t)=>[e,t])));function ih(e,t){return((e.beanName?th[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER)-((t.beanName?th[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER)}function sh(e,t){return"gridDestroyService"===e?.beanName?-1:0}var nh=class extends ze{constructor(){super(...arguments),this.beanName="
2ctrlsFactory",this.registry={}}register(e){this.registry[e.name]=e.classImp}getInstance(e){const t=this.registry[e];if(null!=t){for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return new t(...s)}}},rh=class extends ze{constructor(){super(...arguments),this.beanName="ctrlsService",this.params={gridCtrl:void 0,gridBodyCtrl:void 0,center:void 0,left:void 0,right:void 0,bottomCenter:void 0,bottomLeft:void 0,bottomRight:void 0,topCenter:void 0,topLeft:void 0,topRight:void 0,stickyTopCenter:void 0,stickyTopLeft:void 0,stickyTopRight:void 0,stickyBottomCenter:void 0,stickyBottomLeft:void 0,stickyBottomRight:void 0,fakeHScrollComp:void 0,fakeVScrollComp:void 0,gridHeaderCtrl:void 0,centerHeader:void 0,leftHeader:void 0,rightHeader:void 0},this.ready=!1,this.readyCallbacks=[],this.runReadyCallbacksAsync=!1}wireBeans(e){this.runReadyCallbacksAsync=e.frameworkOverrides.runWhenReadyAsync?.()??!1}postConstruct(){this.addEventListener("ready",(()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach((e=>e(this.params))),this.readyCallbacks.length=0)}),this.runReadyCallbacksAsync)}updateReady(){this.ready=Object.values(this.params).every((e=>e?.isAlive()??!1))}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc((()=>{const e=this.readyCallbacks.indexOf(t);e>=0&&this.readyCallbacks.splice(e,1)}))}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc((()=>{this.updateReady()}))}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:i}=this.params;return[e,i,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}},oh=class extends ze{constructor(){super(...arguments),this.beanName="cellPositionUtils"}createId(e){const{rowIndex:t,rowPinned:i,column:s}=e;return this.createIdFromValues({rowIndex:t,column:s,rowPinned:i})}createIdFromValues(e){const{rowIndex:t,rowPinned:i,column:s}=e;return`${t}.${null==i?"null":i}.${s.getId()}`}equals(e,t){const i=e.column===t.column,s=e.rowPinned===t.rowPinned,n=e.rowIndex===t.rowIndex;return i&&s&&n}},ah=class extends ze{constructor(){super(...arguments),this.beanName="rowNodeEventThrottle",this.events=[]}wireBeans(e){this.animationFrameService=e.animationFrameService,this.rowModel=e.rowModel}postConstruct(){L(this.gos)&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(e,t){if(null==this.clientSideRowModel)return void this.eventService.dispatchEvent(e);this.events.push(e);const i=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach((e=>this.eventService.dispatchEvent(e))),this.events=[]};t?i():(null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced())}},lh=class extends ze{constructor(){super(...arguments),this.beanName="rowPositionUtils"}wireBeans(e){this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.pageBoundsService=e.pageBoundsService}getFirstRow(){let e,t=0;return this.pinnedRowModel.getPinnedTopRowCount()?e="top":this.rowModel.getRowCount()?(e=null,t=this.pageBoundsService.getFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e="bottom"),void 0===e?null:{rowIndex:t,rowPinned:e}}getLastRow(){let e,t=null;const i=this.pinnedRowModel.getPinnedBottomRowCount(),s=this.pinnedRowModel.getPinnedTopRowCount();return i?(t="bottom",e=i-1):this.rowModel.getRowCount()?(t=null,e=this.pageBoundsService.getLastRow()):s&&(t="top",e=s-1),void 0===e?null:{rowIndex:e,rowPinned:t}}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRow(e.rowIndex);case"bottom":return this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);default:return this.rowModel.getRow(e.rowIndex)}}sameRow(e,t){return!e&&!t||!(e&&!t||!e&&t)&&(e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned)}before(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(w(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}}
vendor: 43,376 bytes, line 2
2,hh={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},ch={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},dh={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},uh=class extends ze{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.ancestorThemeClasses=[],this.sizesMeasured=!1,this.gridTheme=null}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.eGridDiv=e.eGridDiv}postConstruct(){this.addManagedPropertyListener("theme",(()=>this.handleThemeGridOptionChange())),this.handleThemeGridOptionChange(),this.addDestroyFunc((()=>this.stopUsingTheme())),this.addManagedPropertyListener("rowHeight",(()=>this.refreshRowHeightVariable())),this.ancestorThemeClasses=this.readAncestorThemeClasses(),this.setUpThemeClassObservers(),this.getSizeEl(hh),this.getSizeEl(ch),this.getSizeEl(dh)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(hh)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(ch)}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(dh)}hasMeasuredSizes(){return this.sizesMeasured}getGridThemeClass(){return this.gridTheme?.getCssClass()||null}getThemeClasses(){return this.gridTheme?[this.gridTheme.getCssClass()]:this.ancestorThemeClasses}applyThemeClasses(e){const t=this.getThemeClasses();for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&!t.includes(i)&&e.classList.remove(i);e.classList.add(...t)}refreshRowHeightVariable(){const e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gos.get("rowHeight");if(null==t||isNaN(t)||!isFinite(t))return null!==e&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;const i=`${t}px`;return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),t):""!=e?parseFloat(e):-1}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(null!=t)return t;const i=this.measureSizeEl(e);return"detached"===i||"no-styles"===i?e.defaultValue:(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){const t=this.getSizeEl(e);if(null==t.offsetParent)return"detached";const i=t.offsetWidth;return i===gh?"no-styles":(this.sizesMeasured=!0,i)}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;let i=this.eMeasurementContainer;i||(i=this.eMeasurementContainer=document.createElement("div"),i.className="ag-measurement-container",this.gos.get("theme")&&this.applyThemeClasses(i),this.eGridDiv.appendChild(i)),t=document.createElement("div"),t.style.width=`var(${e.cssName}, ${gh}px)`,i.appendChild(t),this.sizeEls.set(e,t);let s=this.measureSizeEl(e);"no-styles"===s&&h(`no value for ${e.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e.defaultValue} will be used and updated when styles load.`);const n=this.resizeObserverService.observeResize(t,(()=>{const t=this.measureSizeEl(e);"detached"!==t&&"no-styles"!==t&&(this.lastKnownValues.set(e,t),t!==s&&(s=t,this.fireGridStylesChangedEvent(e.changeKey)))}));return this.addDestroyFunc((()=>n())),t}fireGridStylesChangedEvent(e){this.eventService.dispatchEvent({type:"gridStylesChanged",[e]:!0})}setUpThemeClassObservers(){const e=new MutationObserver((()=>{const e=this.readAncestorThemeClasses();ph(e,this.ancestorThemeClasses)||(this.ancestorThemeClasses=e,this.fireGridStylesChangedEvent("themeChanged"))}));let t=this.eGridDiv;for(;t;)e.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement;this.addDestroyFunc((()=>e.disconnect()))}readAncestorThemeClasses(){let e=this.eGridDiv;const t=[];for(;e;){const i=Array.from(e.classList).filter((e=>e.startsWith("ag-theme-")));for(const e of i)t.includes(e)||t.unshift(e);e=e.parentElement}return Object.freeze(t)}handleThemeGridOptionChange(){const{gos:e,eMeasurementContainer:t,gridTheme:i}=this,s=e.get("theme")||null;s!==i&&(i?.stopUse(),this.gridTheme=s,s?.startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),container:this.eGridDiv}),t&&this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged"))}stopUsingTheme(){this.gridTheme?.stopUse(),this.gridTheme=null}},ph=(e,t)=>e.length===t.length&&-1===e.findIndex(((i,s)=>e[s]!==t[s])),gh=15538,mh=class extends ze{constructor(){super(...arguments),this.beanName="eventService",this.globalEventService=new n}wireBeans(e){this.globalEventListener=e.globalEventListener,this.globalSyncEventListener=e.globalSyncEventListener}postConstruct(){if(this.globalEventListener){const e=O(this.gos);this.addGlobalListener(this.globalEventListener,e)}this.globalSyncEventListener&&this.addGlobalListener(this.globalSyncEventListener,!1)}addEventListener(e,t,i){this.globalEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.globalEventService.removeEventListener(e,t,i)}addGlobalListener(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.globalEventService.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(this.gos.addGridCommonParams(e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(this.gos.addGridCommonParams(e))}},fh=class e extends ze{constructor(){super(...arguments),this.beanName="focusService"}wireBeans(e){this.eGridDiv=e.eGridDiv,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.headerNavigationService=e.headerNavigationService,this.headerPositionUtils=e.headerPositionUtils,this.rowRenderer=e.rowRenderer,this.rowPositionUtils=e.rowPositionUtils,this.cellPositionUtils=e.cellPositionUtils,this.navigationService=e.navigationService,this.ctrlsService=e.ctrlsService,this.filterManager=e.filterManager,this.rangeService=e.rangeService,this.advancedFilterService=e.advancedFilterService,this.overlayService=e.overlayService}static addKeyboardModeEvents(t){this.instanceCount>0||(t.addEventListener("keydown",e.toggleKeyboardMode),t.addEventListener("mousedown",e.toggleKeyboardMode))}static removeKeyboardModeEvents(t){this.instanceCount>0||(t.removeEventListener("keydown",e.toggleKeyboardMode),t.removeEventListener("mousedown",e.toggleKeyboardMode))}static toggleKeyboardMode(t){const i=e.keyboardModeActive,s="keydown"===t.type;s&&(t.ctrlKey||t.metaKey||t.altKey)||i!==s&&(e.keyboardModeActive=s)}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(this,(e=>{this.gridCtrl=e.gridCtrl}))}registerKeyboardFocusEvents(){const t=j(this.gos);e.addKeyboardModeEvents(t),e.instanceCount++,this.addDestroyFunc((()=>{e.instanceCount--,e.removeKeyboardModeEvents(t)}))}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;const e=this.focusedCellPosition.column,t=this.columnModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}isKeyboardMode(){return e.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(K(this.gos),ma.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(K(this.gos),Kr.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(e,t){let i=e;for(;i;){if(H(this.gos,i,t))return!1;i=i.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(e){return!!this.isCellRestoreFocused(e)&&(setTimeout((()=>{this.restoredFocusedCellPosition=null}),0),!0)}clearRestoreFocus(){this.restoredFocusedCellPosition=null,this.awaitRestoreFocusedCell=!1}restoreFocusedCell(e,t){this.awaitRestoreFocusedCell=!0,setTimeout((()=>{this.awaitRestoreFocusedCell&&(this.setRestoreFocusedCell(e),t())}))}isCellRestoreFocused(e){return null!=this.restoredFocusedCellPosition&&this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)}setRestoreFocusedCell(e){"react"===this.getFrameworkOverrides().renderingEngine&&(this.restoredFocusedCellPosition=e)}getFocusEventParams(e){const{rowIndex:t,rowPinned:i,column:s}=e,n={rowIndex:t,rowPinned:i,column:s,isFullWidthCell:!1},r=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return r&&(n.isFullWidthCell=r.isFullWidth()),n}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,null==this.focusedCellPosition)return;const e=this.getFocusEventParams(this.focusedCellPosition);this.focusedCellPosition=null,this.eventService.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){const{column:t,rowIndex:i,rowPinned:s,forceBrowserFocus:n=!1,preventScrollOnBrowserFocus:r=!1}=e,o=this.columnModel.getCol(t);o?(this.focusedCellPosition={rowIndex:i,rowPinned:S(s),column:o},this.eventService.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCellPosition),forceBrowserFocus:n,preventScrollOnBrowserFocus:r})):this.focusedCellPosition=null}isCellFocused(e){return null!=this.focusedCellPosition&&this.cellPositionUtils.equals(e,this.focusedCellPosition)}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}isHeaderWrapperFocused(e){if(null==this.focusedHeaderPosition)return!1;const t=e.getColumnGroupChild(),i=e.getRowIndex(),s=e.getPinned(),{column:n,headerRowIndex:r}=this.focusedHeaderPosition;return t===n&&i===r&&s==n.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}}isHeaderFocusSuppressed(){return this.gos.get("suppressHeaderFocus")||this.overlayService.isExclusive()}isCellFocusSuppressed(){return this.gos.get("suppressCellFocus")||this.overlayService.isExclusive()}focusHeaderPosition(e){if(this.isHeaderFocusSuppressed())return!1;const{direction:t,fromTab:i,allowUserOverride:s,event:n,fromCell:r,rowWithoutSpanValue:o}=e;let{headerPosition:a}=e;if(r&&this.filterManager?.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(a);if(s){const e=this.getFocusedHeader(),s=this.headerNavigationService.getHeaderRowCount();if(i){const i=this.gos.getCallback("tabToNextHeader");i&&(a=this.getHeaderPositionFromUserFunc({userFunc:i,direction:t,currentPosition:e,headerPosition:a,headerRowCount:s}))}else{const t=this.gos.getCallback("navigateToNextHeader");if(t&&n){a=t({key:n.key,previousHeaderPosition:e,nextHeaderPosition:a,headerRowCount:s,event:n})}}}return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:n,fromCell:r,rowWithoutSpanValue:o})}focusHeaderPositionFromUserFunc(e){if(this.isHeaderFocusSuppressed())return!1;const{userFunc:t,headerPosition:i,direction:s,event:n}=e,r=this.getFocusedHeader(),o=this.headerNavigationService.getHeaderRowCount(),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:s,currentPosition:r,headerPosition:i,headerRowCount:o});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:s,event:n})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:s,headerPosition:n,headerRowCount:r}=e,o=t({backwards:"Before"===i,previousHeaderPosition:s,nextHeaderPosition:n,headerRowCount:r});return!0===o||null===o?(null===o&&h("Since v31.3 Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),s):!1===o?null:o}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:s,rowWithoutSpanValue:n,event:r}=e,{column:o,headerRowIndex:a}=t;if(-1===a)return this.filterManager?.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView(o);this.headerNavigationService.scrollToColumn(o,i);const l=this.ctrlsService.getHeaderRowContainerCtrl(o.getPinned()),h=l?.focusHeader(t.headerRowIndex,o,r)||!1;return h&&(null!=n||s)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(n??-1),h}focusFirstHeader(){if(this.overlayService.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleColsService.getAllCols()[0];if(!e)return!1;e.getParent()&&(e=this.visibleColsService.getColGroupAtLevel(e,0));const t=this.headerPositionUtils.getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlayService.isExclusive()&&this.focusOverlay(!0))return!0;const t=this.headerNavigationService.getHeaderRowCount()-1,i=Se(this.visibleColsService.getAllCols());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(e,t){return null!=this.focusedCellPosition&&(this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===S(t))}findFocusableElements(e,t){let i=Ui;t&&(i+=", "+t),arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(i+=', [tabindex="-1"]');const s=Array.prototype.slice.apply(e.querySelectorAll("[tabindex], input, select, button, textarea, [href]")).filter((e=>ls(e))),n=Array.prototype.slice.apply(e.querySelectorAll(i));if(!n.length)return s;return r=n,s.filter((e=>-1===r.indexOf(e)));var r}focusInto(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.findFocusableElements(e,null,i),n=t?Se(s):s[0];return!!n&&(n.focus({preventScroll:!0}),!0)}findFocusableElementBeforeTabGuard(e,t){if(!t)return null;const i=this.findFocusableElements(e),s=i.indexOf(t);if(-1===s)return null;let n=-1;for(let r=s-1;r>=0;r--)if(i[r].classList.contains("ag-tab-guard-top")){n=r;break}return n<=0?null:i[n-1]}findNextFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.eGridDiv,t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;const s=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),n=K(this.gos);let r;r=t?s.findIndex((e=>e.contains(n))):s.indexOf(n);const o=r+(i?-1:1);return o<0||o>=s.length?null:s[o]}isTargetUnderManagedComponent(e,t){if(!t)return!1;const i=e.querySelectorAll(`.${tr.FOCUS_MANAGED_CLASS}`);if(!i.length)return!1;for(let s=0;s<i.length;s++)if(i[s].contains(t))return!0;return!1}findTabbableParent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,i=0;for(;e&&null===zi(e)&&++i<=t;)e=e.parentElement;return null===zi(e)?null:e}focusOverlay(e){const t=this.overlayService.isVisible()&&this.overlayService.getOverlayWrapper()?.getGui();return!!t&&this.focusInto(t,e)}focusGridViewFailed(e,t){return t&&this.focusOverlay(e)||e&&this.focusLastHeader()}focusGridView(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.overlayService.isExclusive())return i&&this.focusOverlay(t);if(this.isCellFocusSuppressed())return t&&!this.isHeaderFocusSuppressed()?this.focusLastHeader():!(!i||!this.focusOverlay(t))||this.focusNextGridCoreContainer(!1);const s=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(s){const{rowIndex:i,rowPinned:n}=s;if(e??(e=this.getFocusedHeader()?.column),e&&void 0!==i&&null!==i){if(this.navigationService.ensureCellVisible({rowIndex:i,column:e,rowPinned:n}),t){const e=this.rowRenderer.getRowByPosition(s);if(e?.isFullWidth()&&this.navigationService.tryToFocusFullWidthRow(s,t))return!0}return this.setFocusedCell({rowIndex:i,column:e,rowPinned:S(n),forceBrowserFocus:!0}),this.rangeService?.setRangeToCell({rowIndex:i,rowPinned:n,column:e}),!0}}return!(!i||!this.focusOverlay(t))||!(!t||!this.focusLastHeader())}isGridFocused(){const e=K(this.gos);return!!e&&this.eGridDiv.contains(e)}focusNextGridCoreContainer(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(t||!this.gridCtrl.focusNextInnerContainer(e))||((t||!e&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(e),!1)}focusAdvancedFilter(e){return this.advancedFilterFocusColumn=e?.column,this.advancedFilterService?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const i=(t?void 0:this.advancedFilterFocusColumn)??this.visibleColsService.getAllCols()?.[0];return e?this.focusHeaderPosition({headerPosition:{column:i,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(i)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}addFocusableContainer(e){this.gridCtrl.addFocusableContainer(e)}removeFocusableContainer(e){this.gridCtrl.removeFocusableContainer(e)}focusGridInnerElement(e){return this.gridCtrl.focusInnerElement(e)}allowFocusForNextGridCoreContainer(e){this.gridCtrl.allowFocusForNextCoreContainer(e)}};fh.keyboardModeActive=!1,fh.instanceCount=0;var vh=fh,yh=class extends ze{constructor(){super(...arguments),this.beanName="pinnedWidthService"}wireBeans(e){this.visibleColsService=e.visibleColsService}postConstruct(){const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const e=k(this.gos,"print"),t=e?0:this.visibleColsService.getColsLeftWidth(),i=e?0:this.visibleColsService.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:"leftPinnedWidthChanged"})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:"rightPinnedWidthChanged"}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}},Ch=class extends ze{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}wireBeans(e){this.beans=e,this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDropService:s,mouseEventService:n,ctrlsService:r,resizeObserverService:o}=this.beans,a={getContainer:()=>this.eGui,isInterestedIn:e=>1===e||0===e,getIconName:()=>"notAllowed"};s.addDropTarget(a),this.addDestroyFunc((()=>s.removeDropTarget(a))),n.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new Ho(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),this.updateGridThemeClass(),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)});const l=o.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc((()=>l())),r.register("gridCtrl",this)}isDetailGrid(){const e=this.focusService.findTabbableParent(this.getGui());return e?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.paginationService?.getPaginationSelector(),gridHeaderDropZonesSelector:e.columnDropZonesService?.getDropZoneSelector(),sideBarSelector:e.sideBarService?.getSideBarSelector(),statusBarSelector:e.statusBarService?.getStatusPanelSelector(),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventService.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:s}=this.getNextFocusableIndex(t,e);if(s<0||s>=t.length)return!1;if(0===s){if(i>0){const e=Se(this.visibleColsService.getAllCols());if(this.focusService.focusGridView(e,!0))return!0}return!1}return this.focusContainer(t[s],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const i=this.getFocusableContainers(),s=this.visibleColsService.getAllCols();if(e){if(i.length>1)return this.focusContainer(Se(i),!0);const e=Se(s);if(this.focusService.focusGridView(e,!0))return!0}if(0===this.gos.get("headerHeight")||this.focusService.isHeaderFocusSuppressed()){if(this.focusService.focusGridView(s[0]))return!0;for(let e=1;e<i.length;e++)if(this.focusService.focusInto(i[e].getGui()))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:i,indexWithFocus:s}=this.getNextFocusableIndex(t,e);if(-1===s||i<0||i>=t.length)return;const n=t[i];n.setAllowFocus?.(!0),setTimeout((()=>{n.setAllowFocus?.(!1)}))}getNextFocusableIndex(e,t){const i=K(this.gos),s=e.findIndex((e=>e.getGui().contains(i)));return{indexWithFocus:s,nextIndex:s+(t?-1:1)}}focusContainer(e,t){e.setAllowFocus?.(!0);const i=this.focusService.focusInto(e.getGui(),t);return e.setAllowFocus?.(!1),i}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}updateGridThemeClass(){const e=this.beans.environment.getGridThemeClass();e&&this.view.setGridThemeClass(e)}handleThemeChange(e){e.themeChanged&&this.updateGridThemeClass()}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},Sh=class extends Nl{constructor(e){super(),this.gridBody=Is,this.sideBar=Is,this.pagination=Is,this.rootWrapperBody=Is,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:e=>this.addCssClass(e),setGridThemeClass:e=>this.addCssClass(e),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:e=>{this.getGui().style.userSelect=null!=e?e:"",this.getGui().style.webkitUserSelect=null!=e?e:""},setCursor:e=>{this.getGui().style.cursor=null!=e?e:""}},t=this.createManagedBean(new Ch),i=t.getOptionalSelectors(),s=this.createTemplate(i),n=[Wa,...Object.values(i).filter((e=>!!e))];this.setTemplate(s,n),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:e=>t.focusInnerElement(e),forceFocusOutWhenTabGuardsAreEmpty:!0})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc((()=>{this.eGridDiv.removeChild(e),this.gos.get("debug")&&l("Grid removed from DOM")}))}updateLayoutClasses(e,t){const i=this.rootWrapperBody.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",i=e.sideBarSelector?'<ag-side-bar data-ref="sideBar"></ag-side-bar>':"",s=e.statusBarSelector?"<ag-status-bar></ag-status-bar>":"",n=e.watermarkSelector?"<ag-watermark></ag-watermark>":"";return`<div class="ag-root-wrapper" role="presentation">\n                ${t}\n                <div class="ag-root-wrapper-body" data-ref="rootWrapperBody" role="presentation">\n                    <ag-grid-body data-ref="gridBody"></ag-grid-body>\n                    ${i}\n                </div>\n                ${s}\n                ${e.paginationSelector?'<ag-pagination data-ref="pagination"></ag-pagination>':""}\n                ${n}\n            </div>`}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e||!this.pagination?.isDisplayed()?super.forceFocusOutOfContainer(e):this.pagination.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];return[this.sideBar,this.pagination].forEach((t=>{t&&e.push(t)})),e.filter((e=>ls(e.getGui())))}},wh={version:Yr,moduleName:"@ag-grid-community/aligned-grid",beans:[class extends ze{constructor(){super(...arguments),this.beanName="alignedGridsService",this.consuming=!1}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.ctrlsService=e.ctrlsService,this.columnApplyStateService=e.columnApplyStateService}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t="function"===typeof e;"function"===typeof e&&(e=e());const i=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return e.map((e=>{if(!e)return c("alignedGrids contains an undefined option."),t||c('You may want to configure via a callback to avoid setup race conditions:\n                     "alignedGrids: () => [linkedGrid]"'),void c(i());if(this.isGridApi(e))return e;const s=e;return"current"in s?s.current?.api:(s.api||c(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${i()}`),s.api)})).filter((e=>!!e&&!e.isDestroyed()))}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:e=>{let{event:t}=e;return this.onColumnEvent(t)},alignedGridScroll:e=>{let{event:t}=e;return this.onScrollEvent(t)}})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach((t=>{t.isDestroyed()||t.dispatchEvent(e)}))}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){"horizontal"===e.direction&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent((()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)}))}extractDataFromEvent(e,t){const i=[];return e.columns?e.columns.forEach((e=>{i.push(t(e))})):e.column&&i.push(t(e.column)),i}getMasterColumns(e){return this.extractDataFromEvent(e,(e=>e))}getColumnIds(e){return this.extractDataFromEvent(e,(e=>e.getColId()))}onColumnEvent(e){this.onEvent((()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":this.processColumnEvent(e);break;case"columnGroupOpened":this.processGroupOpenedEvent(e);break;case"columnPivotChanged":h("pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.")}}))}processGroupOpenedEvent(e){const{columnModel:t}=this;e.columnGroups.forEach((e=>{let i=null;e&&(i=t.getProvidedColGroup(e.getGroupId())),e&&!i||t.setColumnGroupOpened(i,e.isExpanded(),"alignedGridChanged")}))}processColumnEvent(e){const t=e.column;let i=null;if(t&&(i=this.columnModel.getColDefCol(t.getColId())),t&&!i)return;const s=this.getMasterColumns(e),{columnApplyStateService:n,columnSizeService:r,ctrlsService:o}=this;switch(e.type){case"columnMoved":{const t=e.api.getColumnState().map((e=>({colId:e.colId})));n.applyColumnState({state:t,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const t=e.api.getColumnState().map((e=>({colId:e.colId,hide:e.hide})));n.applyColumnState({state:t},"alignedGridChanged")}break;case"columnPinned":{const t=e.api.getColumnState().map((e=>({colId:e.colId,pinned:e.pinned})));n.applyColumnState({state:t},"alignedGridChanged")}break;case"columnResized":{const t=e,i={};s.forEach((e=>{i[e.getId()]={key:e.getColId(),newWidth:e.getActualWidth()}})),t.flexColumns?.forEach((e=>{i[e.getId()]&&delete i[e.getId()]})),r.setColumnWidths(Object.values(i),!1,t.finished,"alignedGridChanged");break}}const a=o.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach((e=>{e.setGridOption("alwaysShowVerticalScroll",a)}))}}]};var bh={version:Yr,moduleName:"@ag-grid-community/data-type",beans:[class extends ze{constructor(){super(...arguments),this.beanName="dataTypeService",this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.rowModel=e.rowModel,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.columnApplyStateService=e.columnApplyStateService,this.filterManager=e.filterManager}postConstruct(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",(()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents")})),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",(e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(vt(e.source))}))}processDataTypeDefinitions(){const e=this.getDefaultDataTypes();this.dataTypeDefinitions={},this.formatValueFuncs={};const t=e=>t=>{const{column:i,node:s,value:n}=t;let r=i.getColDef().valueFormatter;return r===e.groupSafeValueFormatter&&(r=e.valueFormatter),this.valueService.formatValue(i,s,n,r)};Object.entries(e).forEach((e=>{let[i,s]=e;const n={...s,groupSafeValueFormatter:this.createGroupSafeValueFormatter(s)};this.dataTypeDefinitions[i]=n,this.formatValueFuncs[i]=t(n)}));const i=this.gos.get("dataTypeDefinitions")??{};this.dataTypeMatchers={},Object.entries(i).forEach((s=>{let[n,r]=s;const o=this.processDataTypeDefinition(r,i,[n],e);o&&(this.dataTypeDefinitions[n]=o,r.dataTypeMatcher&&(this.dataTypeMatchers[n]=r.dataTypeMatcher),this.formatValueFuncs[n]=t(o))})),this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach((t=>{const i=this.dataTypeMatchers[t];i&&delete this.dataTypeMatchers[t],this.dataTypeMatchers[t]=i??e[t].dataTypeMatcher}))}mergeDataTypeDefinitions(e,t){const i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...Qe(e.columnTypes),...Qe(t.columnTypes)]),i}processDataTypeDefinition(e,t,i,s){let n;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let i=s[r];const o=t[r];if(i&&o&&(i=o),!this.validateDataTypeDefinition(e,i,r))return;n=this.mergeDataTypeDefinitions(i,e)}else{if(i.includes(r))return void h('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');const o=t[r];if(!this.validateDataTypeDefinition(e,o,r))return;const a=this.processDataTypeDefinition(o,t,[...i,r],s);if(!a)return;n=this.mergeDataTypeDefinitions(a,e)}return{...n,groupSafeValueFormatter:this.createGroupSafeValueFormatter(n)}}validateDataTypeDefinition(e,t,i){return t?t.baseDataType===e.baseDataType||(h('The "baseDataType" property of a data type definition must match that of its parent.'),!1):(h(`The data type definition ${i} does not exist.`),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{if(t.node?.group){const i=(t.colDef.pivotValueColumn??t.column).getAggFunc();if(i){if("first"===i||"last"===i)return e.valueFormatter(t);if("number"===e.baseDataType&&"count"!==i){if("number"===typeof t.value)return e.valueFormatter(t);if("object"===typeof t.value){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter({...t,value:t.value.toNumber()});if("value"in t.value)return e.valueFormatter({...t,value:t.value.value})}}return}if((this.gos.get("suppressGroupMaintainValueType")||"groupRows"===this.gos.get("groupDisplayType"))&&!this.gos.get("treeData"))return}else if(this.groupHideOpenParents&&t.column.isRowGroupActive()&&"string"===typeof t.value&&!e.dataTypeMatcher?.(t.value))return;return e.valueFormatter(t)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:s}=t;const{field:n}=t;if(void 0===s&&(s=e.cellDataType),null!=s&&!0!==s||(s=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(n,i)),!s)return void(e.cellDataType=!1);const r=this.dataTypeDefinitions[s];if(r)return e.cellDataType=s,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,s,r,i),r.columnTypes;h(`Missing data type definition - "${s}"`)}addColumnListeners(e){if(!this.isWaitingForRowData)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=e=>{t.add(e.key)};e.addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push((()=>e.removeEventListener("columnStateUpdated",i)))}canInferCellDataType(e,t){if(!L(this.gos))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(t,i))return!1;const s=null===t.type?e.type:t.type;if(s){const e=this.gos.get("columnTypes")??{};if(Qe(s).some((t=>{const s=e[t.trim()];return s&&this.doColDefPropsPreventInference(s,i)})))return!1}return!this.doColDefPropsPreventInference(e,i)}doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some((i=>{let[s,n]=i;return this.doesColDefPropPreventInference(e,t,s,n)}))}doesColDefPropPreventInference(e,t,i,s){if(!t[i])return!1;const n=e[i];return null===n?(t[i]=!1,!1):void 0===s?!!n:n===s}inferCellDataType(e,t){if(!e)return;let i;const s=this.getInitialData();if(s){const t=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");i=rt(s,e,t)}else this.initWaitForRowData(t);if(null==i)return;const[n]=Object.entries(this.dataTypeMatchers).find((e=>{let[t,s]=e;return s(i)}))??["object"];return n}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const e=this.rowModel.getRootNode().allLeafChildren;if(e?.length)return e[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions;t&&this.columnModel.queueResizeOperations();const[i]=this.addManagedEventListeners({rowDataUpdateStarted:e=>{const{firstRowData:s}=e;s&&(i?.(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(s,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations(),this.eventService.dispatchEvent({type:"dataTypesInferred"}))}})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.destroyColumnStateUpdateListeners();const s={},n={};Object.entries(this.columnStateUpdatesPendingInference).forEach((e=>{let[r,o]=e;const a=this.columnModel.getCol(r);if(!a)return;const l=a.getColDef();if(!this.columnModel.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const h=a.getColDef();if(t&&h.type&&h.type!==l.type){const e=this.getUpdatedColumnState(a,o);e.rowGroup&&null==e.rowGroupIndex&&(s[r]=e),e.pivot&&null==e.pivotIndex&&(n[r]=e),i.push(e)}})),t&&i.push(...this.funcColsService.generateColumnStateForRowGroupAndPivotIndexes(s,n)),i.length&&this.columnApplyStateService.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,t){const i=this.columnApplyStateService.getColumnStateFromColDef(e);return t.forEach((e=>{delete i[e],"rowGroup"===e?delete i.rowGroupIndex:"pivot"===e&&delete i.pivotIndex})),i}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}getDateStringTypeDefinition(e){return e?this.getDataTypeDefinition(e)??this.dataTypeDefinitions.dateString:this.dataTypeDefinitions.dateString}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(null==t)return!0;const i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!i||i(t)}validateColDef(e){const t=e=>h(`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`);"object"===e.cellDataType&&(e.valueFormatter!==this.dataTypeDefinitions.object.groupSafeValueFormatter||this.hasObjectValueFormatter||t("Formatter"),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&t("Parser"))}getFormatValue(e){return this.formatValueFuncs[e]}setColDefPropertiesForBaseDataType(e,t,i,s){const n=this.formatValueFuncs[t];switch(i.baseDataType){case"number":e.cellEditor="agNumberCellEditor";break;case"boolean":e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=e=>!!e.colDef.editable&&e.event.key===js.SPACE;break;case"date":e.cellEditor="agDateCellEditor",e.keyCreator=n;break;case"dateString":e.cellEditor="agDateStringCellEditor",e.keyCreator=n;break;case"object":e.cellEditorParams={useFormatter:!0},e.comparator=(e,t)=>{const i=this.columnModel.getColDefCol(s),r=i?.getColDef();if(!i||!r)return 0;const o=null==e?"":n({column:i,node:null,value:e}),a=null==t?"":n({column:i,node:null,value:t});return o===a?0:o>a?1:-1},e.keyCreator=n}this.filterManager?.setColDefPropertiesForDataType(e,i,n)}getDefaultDataTypes(){const e=e=>!!e.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:e=>""===e.newValue?.trim?.()?null:Number(e.newValue),valueFormatter:e=>null==e.value?"":"number"!==typeof e.value||isNaN(e.value)?t("invalidNumber","Invalid Number"):String(e.value),dataTypeMatcher:e=>"number"===typeof e},text:{baseDataType:"text",valueParser:e=>""===e.newValue?null:M(e.newValue),dataTypeMatcher:e=>"string"===typeof e},boolean:{baseDataType:"boolean",valueParser:e=>null==e.newValue?e.newValue:""===e.newValue?.trim?.()?null:"true"===String(e.newValue).toLowerCase(),valueFormatter:e=>null==e.value?"":String(e.value),dataTypeMatcher:e=>"boolean"===typeof e},date:{baseDataType:"date",valueParser:e=>kr(null==e.newValue?null:String(e.newValue)),valueFormatter:e=>null==e.value?"":e.value instanceof Date&&!isNaN(e.value.getTime())?Pr(e.value,!1)??"":t("invalidDate","Invalid Date"),dataTypeMatcher:e=>e instanceof Date},dateString:{baseDataType:"dateString",dateParser:e=>kr(e)??void 0,dateFormatter:e=>Pr(e??null,!1)??void 0,valueParser:t=>e(String(t.newValue))?t.newValue:null,valueFormatter:t=>e(String(t.value))?t.value:"",dataTypeMatcher:t=>"string"===typeof t&&e(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:e=>M(e.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach((e=>e())),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}}]};function xh(e,t){const{colKey:i,rowNode:s,useFormatter:n}=t,r=e.columnModel.getColDefCol(i)??e.columnModel.getCol(i);if(b(r))return null;const o=e.valueService.getValueForDisplay(r,s);if(n){return e.valueService.formatValue(r,s,o)??At(o,!0)}return o}function Mh(e,t){e.gos.updateGridOptions({options:t})}function Dh(e){return e.rowRenderer.getFirstVirtualRenderedRow()}function Ih(e){return e.rowRenderer.getLastVirtualRenderedRow()}var Rh={version:Yr,moduleName:"@ag-grid-community/menu-api",apiFunctions:{showColumnMenuAfterButtonClick:function(e,t,i){const s=e.columnModel.getCol(t);e.menuService.showColumnMenu({column:s,buttonElement:i,positionBy:"button"})},showColumnMenuAfterMouseClick:function(e,t,i){let s=e.columnModel.getCol(t);s||(s=e.columnModel.getColDefCol(t)),s?e.menuService.showColumnMenu({column:s,mouseEvent:i,positionBy:"mouse"}):c(`column '${t}' not found`)},showColumnMenu:function(e,t){const i=e.columnModel.getCol(t);i?e.menuService.showColumnMenu({column:i,positionBy:"auto"}):c(`column '${t}' not found`)},hidePopupMenu:function(e){e.menuService.hidePopupMenu()}}},Eh={version:Yr,moduleName:"@ag-grid-community/api",dependantModules:[{version:Yr,moduleName:"@ag-grid-community/core-api",apiFunctions:{getGridId:function(e){return e.context.getGridId()},destroy:function(e){e.gridDestroyService.destroy()},isDestroyed:function(e){return e.gridDestroyService.isDestroyCalled()},getGridOption:function(e,t){return e.gos.get(t)},setGridOption:function(e,t,i){Mh(e,{[t]:i})},updateGridOptions:Mh}},{version:Yr,moduleName:"@ag-grid-community/pinned-row-api",apiFunctions:{getPinnedTopRowCount:function(e){return e.pinnedRowModel.getPinnedTopRowCount()},getPinnedBottomRowCount:function(e){return e.pinnedRowModel.getPinnedBottomRowCount()},getPinnedTopRow:function(e,t){return e.pinnedRowModel.getPinnedTopRow(t)},getPinnedBottomRow:function(e,t){return e.pinnedRowModel.getPinnedBottomRow(t)}}},{version:Yr,moduleName:"@ag-grid-community/row-selection-api",apiFunctions:{setNodesSelected:function(e,t){if(!t.nodes.every((e=>e.rowPinned?(h("cannot select pinned rows"),!1):void 0!==e.id||(h("cannot select node until id for node is known"),!1))))return;const{nodes:i,source:s,newValue:n}=t,r=i;e.selectionService.setNodesSelected({nodes:r,source:s??"api",newValue:n})},selectAll:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"apiSelectAll";e.selectionService.selectAllRowNodes({source:t})},deselectAll:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"apiSelectAll";e.selectionService.deselectAllRowNodes({source:t})},selectAllFiltered:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"apiSelectAllFiltered";e.selectionService.selectAllRowNodes({source:t,justFiltered:!0})},deselectAllFiltered:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"apiSelectAllFiltered";e.selectionService.deselectAllRowNodes({source:t,justFiltered:!0})},selectAllOnCurrentPage:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"apiSelectAllCurrentPage";e.selectionService.selectAllRowNodes({source:t,justCurrentPage:!0})},deselectAllOnCurrentPage:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"apiSelectAllCurrentPage";e.selectionService.deselectAllRowNodes({source:t,justCurrentPage:!0})},getSelectedNodes:function(e){return e.selectionService.getSelectedNodes()},getSelectedRows:function(e){return e.selectionService.getSelectedRows()}}},{version:Yr,moduleName:"@ag-grid-community/column-api",apiFunctions:{getColumnDef:function(e,t){const i=e.columnModel.getColDefCol(t);return i?i.getColDef():null},getColumnDefs:function(e){return e.columnModel.getColumnDefs()},sizeColumnsToFit:function(e,t){"number"=
vendor: 2,650 bytes, line 2
2==typeof t?e.columnSizeService.sizeColumnsToFit(t,"api"):e.ctrlsService.getGridBodyCtrl().sizeColumnsToFit(t)},setColumnGroupOpened:function(e,t,i){e.columnModel.setColumnGroupOpened(t,i,"api")},getColumnGroup:function(e,t,i){return e.visibleColsService.getColumnGroup(t,i)},getProvidedColumnGroup:function(e,t){return e.columnModel.getProvidedColGroup(t)},getDisplayNameForColumn:function(e,t,i){return e.columnNameService.getDisplayNameForColumn(t,i)||""},getDisplayNameForColumnGroup:function(e,t,i){return e.columnNameService.getDisplayNameForColumnGroup(t,i)||""},getColumn:function(e,t){return e.columnModel.getColDefCol(t)},getColumns:function(e){return e.columnModel.getColDefCols()},applyColumnState:function(e,t){return e.columnApplyStateService.applyColumnState(t,"api")},getColumnState:function(e){return e.columnGetStateService.getColumnState()},resetColumnState:function(e){e.columnApplyStateService.resetColumnState("api")},getColumnGroupState:function(e){return e.columnGroupStateService.getColumnGroupState()},setColumnGroupState:function(e,t){e.columnGroupStateService.setColumnGroupState(t,"api")},resetColumnGroupState:function(e){e.columnGroupStateService.resetColumnGroupState("api")},isPinning:function(e){return e.visibleColsService.isPinningLeft()||e.visibleColsService.isPinningRight()},isPinningLeft:function(e){return e.visibleColsService.isPinningLeft()},isPinningRight:function(e){return e.visibleColsService.isPinningRight()},getDisplayedColAfter:function(e,t){return e.visibleColsService.getColAfter(t)},getDisplayedColBefore:function(e,t){return e.visibleColsService.getColBefore(t)},setColumnVisible:function(e,t,i){e.columnModel.setColsVisible([t],i,"api")},setColumnsVisible:function(e,t,i){e.columnModel.setColsVisible(t,i,"api")},setColumnPinned:function(e,t,i){e.columnModel.setColsPinned([t],i,"api")},setColumnsPinned:function(e,t,i){e.columnModel.setColsPinned(t,i,"api")},getAllGridColumns:function(e){return e.columnModel.getCols()},getDisplayedLeftColumns:function(e){return e.visibleColsService.getLeftCols()},getDisplayedCenterColumns:function(e){return e.visibleColsService.getCenterCols()},getDisplayedRightColumns:function(e){return e.visibleColsService.getRightCols()},getAllDisplayedColumns:function(e){return e.visibleColsService.getAllCols()},getAllDisplayedVirtualColumns:function(e){return e.columnViewportService.getViewportColumns()},moveColumn:function(e,t,i){e.columnMoveService.moveColumns([t],i,"api")},moveColumnByIndex:function(e,t,i){e.columnMoveService.moveColumnByIndex(t,i,"api")},moveColumns:function(e,t,i){e.columnMoveService.moveColumns(t,i,"api")},setColumnWidth:function(e,t,i
2){let s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"api";e.columnSizeService.setColumnWidths([{key:t,newWidth:i}],!1,s,n)},setColumnWidths:function(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"api";e.columnSizeService.setColumnWidths(t,!1,i,s)},getLeftDisplayedColumnGroups:function(e){return e.visibleColsService.getTreeLeft()},getCenterDisplayedColumnGroups:function(e){return e.visibleColsService.getTreeCenter()},getRightDisplayedColumnGroups:function(e){return e.visibleColsService.getTreeRight()},getAllDisplayedColumnGroups:function(e){return e.visibleColsService.getAllTrees()},autoSizeColumn:function(e,t,i){return e.columnAutosizeService.autoSizeCols({colKeys:[t],skipHeader:i,source:"api"})},autoSizeColumns:function(e,t,i){e.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"api"})},autoSizeAllColumns:function(e,t){e.columnAutosizeService.autoSizeAllColumns("api",t)}}},{version:Yr,moduleName:"@ag-grid-community/row-api",apiFunctions:{redrawRows:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming((()=>e.rowRenderer.redrawRows(i)))},setRowNodeExpanded:function(e,t,i,s,n){e.expansionService.setRowNodeExpanded(t,i,s,n)},getRowNode:function(e,t){return e.rowModel.getRowNode(t)},addRenderedRowListener:function(e,t,i,s){e.rowRenderer.addRenderedRowListener(t,i,s)},getRenderedNodes:function(e){return e.rowRenderer.getRenderedNodes()},forEachNode:function(e,t,i){e.rowModel.forEachNode(t,i)},getFirstDisplayedRow:function(e){return Dh(e)},getFirstDisplayedRowIndex:Dh,getLastDisplayedRow:function(e){return Ih(e)},getLastDisplayedRowIndex:Ih,getDisplayedRowAtIndex:function(e,t){return e.rowModel.getRow(t)},getDisplayedRowCount:function(e){return e.rowModel.getRowCount()},getModel:function(e){return e.rowModel}}},{version:Yr,moduleName:"@ag-grid-community/drag-api",apiFunctions:{addRowDropZone:function(e,t){e.ctrlsService.getGridBodyCtrl().getRowDragFeature().addRowDropZone(t)},removeRowDropZone:function(e,t){const i=e.dragAndDropService.findExternalZone(t);i&&e.dragAndDropService.removeDropTarget(i)},getRowDropZoneParams:function(e,t){return e.ctrlsService.getGridBodyCtrl().getRowDragFeature().getRowDropZone(t)}}},{version:Yr,moduleName:"@ag-grid-community/scroll-api",apiFunctions:{getVerticalPixelRange:function(e){return e.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition()},getHorizontalPixelRange:function(e){return e.ctrlsService.getGridBodyCtrl().getScrollFeature().getHScrollPosition()},ensureColumnVisible:pl,ensureIndexVisible:gl,ensureNodeVisible:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.frameworkOverrides.wrapIncoming((()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureNodeVisible(t,i)),"ensureVisible")}}},{version:Yr,moduleName:"@ag-grid-community/overlay-api",apiFunctions:{showLoadingOverlay:function(e){e.overlayService.showLoadingOverlay()},showNoRowsOverlay:function(e){e.overlayService.showNoRowsOverlay()},hideOverlay:function(e){e.overlayService.hideOverlay()}}},{version:Yr,moduleName:"@ag-grid-community/keyboard-navigation-api",apiFunctions:{getFocusedCell:function(e){return e.focusService.getFocusedCell()},clearFocusedCell:function(e){return e.focusService.clearFocusedCell()},setFocusedCell:function(e,t,i,s){e.focusService.setFocusedCell({rowIndex:t,column:i,rowPinned:s,forceBrowserFocus:!0})},setFocusedHeader:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=e.headerNavigationService.getHeaderPositionForColumn(t,i);s&&e.focusService.focusHeaderPosition({headerPosition:s})},tabToNextCell:function(e,t){return e.navigationService.tabToNextCell(!1,t)},tabToPreviousCell:function(e,t){return e.navigationService.tabToNextCell(!0,t)}}},{version:Yr,moduleName:"@ag-grid-community/event-api",apiFunctions:{addEventListener:function(e,t,i){e.apiEventService.addEventListener(t,i)},addGlobalListener:function(e,t){e.apiEventService.addGlobalListener(t)},removeEventListener:function(e,t,i){e.apiEventService.removeEventListener(t,i)},removeGlobalListener:function(e,t){e.apiEventService.removeGlobalListener(t)}}},{version:Yr,moduleName:"@ag-grid-community/render-api",apiFunctions:{setGridAriaProperty:function(e,t,i){if(!t)return;const s=e.ctrlsService.getGridBodyCtrl().getGui(),n=`aria-${t}`;null===i?s.removeAttribute(n):s.setAttribute(n,i)},refreshCells:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.frameworkOverrides.wrapIncoming((()=>e.rowRenderer.refreshCells(t)))},flashCells:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=e=>h(`Since v31.1 api.flashCells parameter '${e}Delay' is deprecated. Please use '${e}Duration' instead.`);w(t.fadeDelay)&&i("fade"),w(t.flashDelay)&&i("flash"),e.frameworkOverrides.wrapIncoming((()=>e.rowRenderer.flashCells(t)))},refreshHeader:function(e){e.frameworkOverrides.wrapIncoming((()=>
vendor: 33,492 bytes, line 2
2e.ctrlsService.getHeaderRowContainerCtrls().forEach((e=>e.refresh()))))},isAnimationFrameQueueEmpty:function(e){return e.animationFrameService.isQueueEmpty()},flushAllAnimationFrames:function(e){e.animationFrameService.flushAllFrames()},getSizesForCurrentTheme:function(e){return{rowHeight:V(e.gos),headerHeight:e.columnModel.getHeaderHeight()}},getCellRendererInstances:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.rowRenderer.getCellRendererInstances(t).map(Tn)}}},{version:Yr,moduleName:"@ag-grid-community/cell-api",apiFunctions:{expireValueCache:function(e){e.valueCache.expire()},getValue:function(e,t,i){return xh(e,{colKey:t,rowNode:i})},getCellValue:xh}},Rh,{version:Yr,moduleName:"@ag-grid-community/sort-api",apiFunctions:{onSortChanged:function(e){e.sortController.onSortChanged("api")}}}]};function Ah(e){if((e={...e}).version||(e.version="32.1.0"),"32.1.0"===e.version)e=function(e){return e.cellSelection=function(e,t){if(e&&"object"===typeof e)return e[t]}(e,"rangeSelection"),e}(e);return e}var Th={version:Yr,moduleName:"@ag-grid-community/state-core",beans:[class extends ze{constructor(){super(...arguments),this.beanName="stateService",this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=f((()=>this.dispatchQueuedStateUpdateEvents()),0),this.onRowGroupOpenedDebounced=f((()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())),0),this.onRowSelectedDebounced=f((()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())}),0),this.staleStateKeys=new Set}wireBeans(e){this.filterManager=e.filterManager,this.ctrlsService=e.ctrlsService,this.pivotResultColsService=e.pivotResultColsService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnGroupStateService=e.columnGroupStateService,this.columnGetStateService=e.columnGetStateService,this.paginationService=e.paginationService,this.selectionService=e.selectionService,this.expansionService=e.expansionService,this.columnAnimationService=e.columnAnimationService,this.columnApplyStateService=e.columnApplyStateService,this.sideBarService=e.sideBarService,this.rangeService=e.rangeService}postConstruct(){this.isClientSideRowModel=L(this.gos),this.cachedState=this.getInitialState(),this.setCachedStateValue("version",Yr),this.ctrlsService.whenReady(this,(()=>this.suppressEventsAndDispatchInitEvent((()=>this.setupStateOnGridReady()))));const[e,t,i]=this.addManagedEventListeners({newColumnsLoaded:t=>{let{source:i}=t;"gridInitializing"===i&&(e(),this.suppressEventsAndDispatchInitEvent((()=>this.setupStateOnColumnsInitialised())))},rowCountReady:()=>{t?.(),this.suppressEventsAndDispatchInitEvent((()=>this.setupStateOnRowCountReady()))},firstDataRendered:()=>{i?.(),this.suppressEventsAndDispatchInitEvent((()=>this.setupStateOnFirstDataRendered()))}})}getInitialState(){return Ah(this.gos.get("initialState")??{})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState());const e=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}setupStateOnColumnsInitialised(){const e=this.getInitialState();this.setColumnState(e),this.setColumnGroupState(e),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());const t=e=>()=>this.updateColumnState([e]);this.addManagedEventListeners({columnValueChanged:t("aggregation"),columnMoved:t("columnOrder"),columnPinned:t("columnPinning"),columnResized:t("columnSizing"),columnVisible:t("columnVisibility"),columnPivotChanged:t("pivot"),columnPivotModeChanged:t("pivot"),columnRowGroupChanged:t("rowGroup"),sortChanged:t("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){const{filter:e,rowGroupExpansion:t,rowSelection:i,pagination:s}=this.getInitialState(),n=this.gos.get("advancedFilterModel");(e||n)&&this.setFilterState(e,n),t&&this.setRowGroupExpansionState(t),i&&this.setRowSelectionState(i),s&&this.setPaginationState(s),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState());const r=()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState());this.addManagedEventListeners({filterChanged:()=>this.updateCachedState("filter",this.getFilterState()),rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:r,columnRowGroupChanged:r,rowDataUpdated:()=>{0!==this.gos.get("groupDefaultExpanded")&&setTimeout((()=>{r()}))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:e=>{(e.newPage||e.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){const{scroll:e,cellSelection:t,focusedCell:i,columnOrder:s}=this.getInitialState();i&&this.setFocusedCellState(i),t&&this.setCellSelectionState(t),e&&this.setScrollState(e),this.setColumnPivotState(!!s?.orderedColIds),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState());const n=this.getRangeSelectionState();this.updateCachedState("rangeSelection",n),this.updateCachedState("cellSelection",n),this.updateCachedState("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>this.updateCachedState("focusedCell",this.getFocusedCellState()),cellSelectionChanged:e=>{if(e.finished){const e=this.getRangeSelectionState();this.updateCachedState("rangeSelection",e),this.updateCachedState("cellSelection",e)}},bodyScrollEnd:()=>this.updateCachedState("scroll",this.getScrollState())})}getColumnState(){const e=this.columnModel.isPivotMode(),t=[],i=[],s=[],n=[],r=[],o=[],a=[],l=[],h=[];let c=0;const d=this.columnGetStateService.getColumnState();for(let u=0;u<d.length;u++){const{colId:e,sort:p,sortIndex:g,rowGroup:m,rowGroupIndex:f,aggFunc:v,pivot:y,pivotIndex:C,pinned:S,hide:w,width:b,flex:x}=d[u];h.push(e),p&&(t[g??c++]={colId:e,sort:p}),m&&(i[f??0]=e),"string"===typeof v&&s.push({colId:e,aggFunc:v}),y&&(n[C??0]=e),S&&("right"===S?o:r).push(e),w&&a.push(e),(x||b)&&l.push({colId:e,flex:x??void 0,width:b})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||e?{pivotMode:e,pivotColIds:n}:void 0,columnPinning:r.length||o.length?{leftColIds:r,rightColIds:o}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:l.length?{columnSizingModel:l}:void 0,columnOrder:h.length?{orderedColIds:h}:void 0}}setColumnState(e){const{sort:t,rowGroup:i,aggregation:s,pivot:n,columnPinning:r,columnVisibility:o,columnSizing:a,columnOrder:l,partialColumnState:h}=e,c={},d=e=>{let t=c[e];return t||(t={colId:e},c[e]=t,t)},u=h?{}:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};t&&(t.sortModel.forEach(((e,t)=>{let{colId:i,sort:s}=e;const n=d(i);n.sort=s,n.sortIndex=t})),u.sort=null,u.sortIndex=null),i&&(i.groupColIds.forEach(((e,t)=>{const i=d(e);i.rowGroup=!0,i.rowGroupIndex=t})),u.rowGroup=null,u.rowGroupIndex=null),s&&(s.aggregationModel.forEach((e=>{let{colId:t,aggFunc:i}=e;d(t).aggFunc=i})),u.aggFunc=null),n&&(n.pivotColIds.forEach(((e,t)=>{const i=d(e);i.pivot=!0,i.pivotIndex=t})),this.gos.updateGridOptions({options:{pivotMode:n.pivotMode},source:"gridInitializing"}),u.pivot=null,u.pivotIndex=null),r&&(r.leftColIds.forEach((e=>{d(e).pinned="left"})),r.rightColIds.forEach((e=>{d(e).pinned="right"})),u.pinned=null),o&&(o.hiddenColIds.forEach((e=>{d(e).hide=!0})),u.hide=null),a&&(a.columnSizingModel.forEach((e=>{let{colId:t,flex:i,width:s}=e;const n=d(t);n.flex=i??null,n.width=s})),u.flex=null);const p=l?.orderedColIds,g=!!p?.length,m=g?p.map((e=>d(e))):Object.values(c);m.length&&(this.columnStates=m,this.columnApplyStateService.applyColumnState({state:m,applyOrder:g,defaultState:u},"gridInitializing"))}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;if(this.columnGroupStates=void 0,this.pivotResultColsService.isPivotResultColsPresent()){if(t){const i=[];for(const e of t)this.pivotResultColsService.getPivotResultCol(e.colId)&&i.push(e);this.columnApplyStateService.applyColumnState({state:i,applyOrder:e},"gridInitializing")}i&&this.columnGroupStateService.setColumnGroupState(i,"gridInitializing")}}getColumnGroupState(){const e=this.columnGroupStateService.getColumnGroupState(),t=[];return e.forEach((e=>{let{groupId:i,open:s}=e;s&&t.push(i)})),t.length?{openColumnGroupIds:t}:void 0}setColumnGroupState(e){if(!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const t=new Set(e.columnGroup?.openColumnGroupIds),i=this.columnGroupStateService.getColumnGroupState().map((e=>{let{groupId:i}=e;const s=t.has(i);return s&&t.delete(i),{groupId:i,open:s}}));t.forEach((e=>{i.push({groupId:e,open:!0})})),i.length&&(this.columnGroupStates=i),this.columnGroupStateService.setColumnGroupState(i,"gridInitializing")}getFilterState(){let e=this.filterManager?.getFilterModel();e&&0===Object.keys(e).length&&(e=void 0);const t=this.filterManager?.getAdvancedFilterModel()??void 0;return e||t?{filterModel:e,advancedFilterModel:t}:void 0}setFilterState(e,t){const{filterModel:i,advancedFilterModel:s}=e??{advancedFilterModel:t};i&&this.filterManager?.setFilterModel(i,"columnFilter"),s&&this.filterManager?.setAdvancedFilterModel(s)}getRangeSelectionState(){const e=this.rangeService?.getCellRanges().map((e=>{const{id:t,type:i,startRow:s,endRow:n,columns:r,startColumn:o}=e;return{id:t,type:i,startRow:s,endRow:n,colIds:r.map((e=>e.getColId())),startColId:o.getColId()}}));return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeService:i,columnModel:s,visibleColsService:n}=this;if(!le(t)||!i)return;const r=[];if(e.cellRanges.forEach((e=>{const t=[];if(e.colIds.forEach((e=>{const i=s.getCol(e);i&&t.push(i)})),!t.length)return;let i=s.getCol(e.startColId);if(!i){const e=n.getAllCols(),s=new Set(t);i=e.find((e=>s.has(e)))}r.push({...e,columns:t,startColumn:i})})),oe(t)&&ae(t)&&r.length>1)return h("cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`");i.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.ctrlsService.getGridBodyCtrl()?.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:i}=e?.getVScrollPosition()??{top:0};return i||t?{top:i,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:i}=e;this.ctrlsService.getGridBodyCtrl()?.getScrollFeature().setScrollPosition(t,i)}getSideBarState(){return this.sideBarService?.getSideBarComp()?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.focusService.getFocusedCell();if(e){const{column:t,rowIndex:i,rowPinned:s}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:t,rowIndex:i,rowPinned:s}=e;this.focusService.setFocusedCell({column:this.columnModel.getCol(t),rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){if(!this.paginationService)return;const e=this.paginationService.getCurrentPage(),t=this.gos.get("paginationAutoPageSize")?void 0:this.paginationService.getPageSize();return e||t?{page:e,pageSize:t}:void 0}setPaginationState(e){this.paginationService&&(e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationService.setPageSize(e.pageSize,"initialState"),"number"===typeof e.page&&this.paginationService.setPage(e.page))}getRowSelectionState(){const e=this.selectionService.getSelectionState();return!e||!Array.isArray(e)&&(!1===e.selectAll||!1===e.selectAllChildren)&&!e?.toggledNodes?.length?void 0:e}setRowSelectionState(e){this.selectionService.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){const e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0}setRowGroupExpansionState(e){this.expansionService.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const t=this.getColumnState();let i=!1;Object.entries(t).forEach((e=>{let[t,s]=e;E(s,this.cachedState[t])||(i=!0)})),this.cachedState={...this.cachedState,...t},i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),E(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){this.staleStateKeys.forEach((e=>{if("rowSelection"===e)this.setCachedStateValue(e,this.getRowSelectionState())})),this.staleStateKeys.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach((e=>this.queuedUpdateSources.add(e))),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear(),this.eventService.dispatchEvent({type:"stateUpdated",sources:e,state:this.cachedState})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout((()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))}))}}]},Ph={version:Yr,moduleName:"@ag-grid-community/state",dependantModules:[Th,{version:Yr,moduleName:"@ag-grid-community/state-api",apiFunctions:{getState:function(e){return e.stateService?.getState()??{}}},dependantModules:[Th]}]};function Lh(e,t,i){e.addManagedElementListeners(t,{keydown:e=>{if(!e.defaultPrevented&&e.key===js.TAB){const s=e.shiftKey;i.findNextFocusableElement(t,!1,s)||i.focusNextGridCoreContainer(s)&&e.preventDefault()}}})}var Fh="paginationPageSizeSelector",kh={selector:"AG-PAGE-SIZE-SELECTOR",component:class extends Rs{constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.paginationService.getPageSize()||(this.paginationService.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.paginationService=e.paginationService}postConstruct(){this.addManagedPropertyListener(Fh,(()=>{this.onPageSizeSelectorValuesChange()})),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.paginationService.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){rs(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get(Fh)}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.paginationService.getPageSize(),i=!t||!e.includes(t);if(i){const i=this.gos.exists("paginationPageSize"),s=!0!==this.gos.get(Fh);h(`'paginationPageSize=${t}'${i?"":" (default value)"}, but ${t} is not included in${s?"":" the default"} paginationPageSizeSelector=[${e.join(", ")}].`),s||h(`Either set '${Fh}' to an array that includes ${t} or to 'false' to disable the page size selector.`),e.unshift("")}const s=String(i?"":t);this.selectPageSizeComp?(we(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(s,!0)):this.createPageSizeSelectorComp(e,s),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map((e=>({value:String(e)})))}createPageSizeSelectorComp(e,t){const i=this.localeService.getLocaleTextFunc(),s=i("pageSizeSelectorLabel","Page Size:"),n=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new hr).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(n).setLabel(s).onValueChange((()=>this.handlePageSizeItemSelected())),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Fh);return!Array.isArray(t)||x(t)?e:[...t].sort(((e,t)=>e-t))}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},Nh={selector:"AG-PAGINATION",component:class extends Nl{constructor(){super(),this.btFirst=Is,this.btPrevious=Is,this.btNext=Is,this.btLast=Is,this.lbRecordCount=Is,this.lbFirstRowOnPage=Is,this.lbLastRowOnPage=Is,this.lbCurrent=Is,this.lbTotal=Is,this.pageSizeComp=Is,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1}wireBeans(e){this.rowModel=e.rowModel,this.paginationService=e.paginationService,this.focusService=e.focusService,this.ariaAnnouncementService=e.ariaAnnouncementService}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[kh]);const{btFirst:t,btPrevious:i,btNext:s,btLast:n}=this;this.activateTabIndex([t,i,s,n]),t.insertAdjacentElement("afterbegin",Ps(e?"last":"first",this.gos)),i.insertAdjacentElement("afterbegin",Ps(e?"next":"previous",this.gos)),s.insertAdjacentElement("afterbegin",Ps(e?"previous":"next",this.gos)),n.insertAdjacentElement("afterbegin",Ps(e?"first":"last",this.gos)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],(()=>this.onPageSizeRelatedOptionsChange())),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:e=>{this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(e):this.focusService.focusGridInnerElement(e)},forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const e=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)}),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach((e=>{const{el:t,fn:i}=e;this.addManagedListeners(t,{click:i,keydown:e=>{e.key!==js.ENTER&&e.key!==js.SPACE||(e.preventDefault(),i())}})})),Lh(this,this.getGui(),this.focusService),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationService.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");if(t){return t({value:e})}const i=this.localeService.getLocaleTextFunc();return Tr(e,i("thousandSeparator",","),i("decimalSeparator","."))}getTemplate(){const e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),s=e("of","of"),n=e("firstPage","First Page"),r=e("previousPage","Previous Page"),o=e("nextPage","Next Page"),a=e("lastPage","Last Page"),l=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${l}">\n                <ag-page-size-selector data-ref="pageSizeComp"></ag-page-size-selector>\n                <span class="ag-paging-row-summary-panel">\n                    <span id="ag-${l}-first-row" data-ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n                    <span id="ag-${l}-to">${i}</span>\n                    <span id="ag-${l}-last-row" data-ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n                    <span id="ag-${l}-of">${s}</span>\n                    <span id="ag-${l}-row-count" data-ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>\n                </span>\n                <span class="ag-paging-page-summary-panel" role="presentation">\n                    <div data-ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>\n                    <div data-ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>\n                    <span class="ag-paging-description">\n                        <span id="ag-${l}-start-page">${t}</span>\n                        <span id="ag-${l}-start-page-number" data-ref="lbCurrent" class="ag-paging-number"></span>\n                        <span id="ag-${l}-of-page">${s}</span>\n                        <span id="ag-${l}-of-page-number" data-ref="lbTotal" class="ag-paging-number"></span>\n                    </span>\n                    <div data-ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>\n                    <div data-ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${a}"></div>\n                </span>\n            </div>`}onBtNext(){this.nextButtonDisabled||this.paginationService.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationService.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationService.goToLastPage()}enableOrDisableButtons(){const e=this.paginationService.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),i=this.paginationService.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const s=this.isZeroPagesToDisplay(),n=e===i-1;this.nextButtonDisabled=n||s,this.lastButtonDisabled=!t||s||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){fi(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.paginationService.getTotalPages();return e&&0===t}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.paginationService.getTotalPages(),i=this.paginationService.getMasterRowCount(),s=e?i:null;if(1===s){const e=this.rowModel.getRow(0);if(e&&e.group&&!(e.groupData||e.aggData))return void this.setTotalLabelsToZero()}const n=this.paginationService.getCurrentPage(),r=this.paginationService.getPageSize();let o,a;this.isZeroPagesToDisplay()?o=a=0:(o=r*n+1,a=o+r-1,e&&a>s&&(a=s));const l=!e&&i<o+r-1,h=this.formatNumber(o);let c;this.lbFirstRowOnPage.textContent=h;const d=this.localeService.getLocaleTextFunc();c=l?d("pageLastRowUnknown","?"):this.formatNumber(a),this.lbLastRowOnPage.textContent=c;const u=t>0?n+1:0,p=this.formatNumber(u);let g,m;if(this.lbCurrent.textContent=p,e)g=this.formatNumber(t),m=this.formatNumber(s);else{const e=d("more","more");g=e,m=e}this.lbTotal.textContent=g,this.lbRecordCount.textContent=m,this.announceAriaStatus(h,c,m,p,g)}announceAriaStatus(e,t,i,s,n){const r=this.localeService.getLocaleTextFunc(),o=r("page","Page"),a=r("to","to"),l=r("of","of"),h=`${e} ${a} ${t} ${l} ${i}`,c=`${o} ${s} ${l} ${n}`;h!==this.ariaRowStatus&&(this.ariaRowStatus=h,this.ariaAnnouncementService.announceValue(h,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,this.ariaAnnouncementService.announceValue(c,"paginationPage"))}setTotalLabelsToZero(){const e=this.formatNumber(0);this.lbFirstRowOnPage.textContent=e,this.lbCurrent.textContent=e,this.lbLastRowOnPage.textContent=e,this.lbTotal.textContent=e,this.lbRecordCount.textContent=e,this.announceAriaStatus(e,e,e,e,e)}}},Oh={version:Yr,moduleName:"@ag-grid-community/pagination-core",beans:[class extends ze{constructor(){super(...arguments),this.beanName="paginationService",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}wireBeans(e){this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return Nh}isPaginateChildRows(){return!(!this.gos.get("groupRemoveSingleChildren")&&!this.gos.get("groupRemoveLowestSingleChildren"))||this.gos.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){this.active&&this.currentPage!==e&&"number"===typeof this.currentPage&&(this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0}))}isRowPresent(e){return e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;const t=this.getPageForIndex(e);this.goToPage(t)}isRowInPage(e){if(!this.active)return!0;return this.getPageForIndex(e.rowIndex)===this.currentPage}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return w(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:w(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:w(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:w(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.pageBoundsService.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}i!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0)return void this.setZeroRows();const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();const t=this.pageSize*this.currentPage;let i=this.pageSize*(this.currentPage+1)-1;if(i>e&&(i=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),i===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{const e=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=e-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),0===this.masterRowCount)return void this.setZeroRows();const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:i=!1,newPageSize:s=!1}=e;this.eventService.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:s,keepRenderedRows:t})}},class extends ze{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeService"}wireBeans(e){this.ctrlsService=e.ctrlsService,this.paginationService=e.paginationService}postConstruct(){this.ctrlsService.whenReady(this,(e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()}))}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.paginationService.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){const t=()=>{const t=Math.max(V(this.gos),1),i=Math.floor(e/t);this.paginationService.setPageSize(i,"autoCalculated")};this.isBodyRendered?f((()=>t()),50)():(t(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}}]},Gh={version:Yr,moduleName:"@ag-grid-community/pagination",dependantModules:[Oh,{version:Yr,moduleName:"@ag-grid-community/pagination-api",dependantModules:[Oh],apiFunctions:{paginationIsLastPageFound:function(e){return e.rowModel.isLastRowIndexKnown()},paginationGetPageSize:function(e){return e.paginationService?.getPageSize()??100},paginationGetCurrentPage:function(e){return e.paginationService?.getCurrentPage()??0},paginationGetTotalPages:function(e){return e.paginationService?.getTotalPages()??1},paginationGetRowCount:function(e){return e.paginationService?e.paginationService.getMasterRowCount():e.rowModel.getRowCount()},paginationGoToNextPage:function(e){e.paginationService?.goToNextPage()},paginationGoToPreviousPage:function(e){e.paginationService?.goToPreviousPage()},paginationGoToFirstPage:function(e){e.paginationService?.goToFirstPage()},paginationGoToLastPage:function(e){e.paginationService?.goToLastPage()},paginationGoToPage:function(e,t){e.paginationService?.goToPage(t)}}}]},Bh="clientSide",Vh="serverSide",zh="infinite",Hh={onGroupExpandedOrCollapsed:[Bh],refreshClientSideRowModel:[Bh],isRowDataEmpty:[Bh],forEachLeafNode:[Bh],forEachNodeAfterFilter:[Bh],forEachNodeAfterFilterAndSort:[Bh],resetRowHeights:[Bh],applyTransaction:[Bh],applyTransactionAsync:[Bh],flushAsyncTransactions:[Bh],getBestCostNodeSelection:[Bh],getServerSideSelectionState:[Vh],setServerSideSelectionState:[Vh],applyServerSideTransaction:[Vh],applyServerSideTransactionAsync:[Vh],applyServerSideRowData:[Vh],retryServerSideLoads:[Vh],flushServerSideAsyncTransactions:[Vh],refreshServerSide:[Vh],getServerSideGroupLevelState:[Vh],refreshInfiniteCache:[zh],purgeInfiniteCache:[zh],getInfiniteRowCount:[zh],isLastRowIndexKnown:[zh,Vh],expandAll:[Bh,Vh],collapseAll:[Bh,Vh],onRowHeightChanged:[Bh,Vh],setRowCount:[zh,Vh],getCacheBlockState:[zh,Vh]},Wh={getValue:{version:"v31.3",new:"getCellValue"},getFirstDisplayedRow:{version:"v31.1",new:"getFirstDisplayedRowIndex"},getLastDisplayedRow:{version:"v31.1",new:"getLastDisplayedRowIndex"},getModel:{version:"v31.1",message:"Please use the appropriate grid API methods instead."}
2,setColumnVisible:{version:"v31.1",old:"setColumnVisible(key,visible)",new:"setColumnsVisible([key],visible)"},setColumnPinned:{version:"v31.1",old:"setColumnPinned(key,pinned)",new:"setColumnsPinned([key],pinned)"},moveColumn:{version:"v31.1",old:"moveColumn(key, toIndex)",new:"moveColumns([key], toIndex)"},setColumnWidth:{version:"v31.1",old:"setColumnWidth(col, width)",new:"setColumnWidths([{key: col, newWidth: width}])"},autoSizeColumn:{version:"v31.1",old:"autoSizeColumn(key, skipHeader)",new:"autoSizeColumns([key], skipHeader)"},addAggFunc:{version:"v31.1",old:"addAggFunc(key, func)",new:"addAggFuncs({ key: func })"},removeValueColumn:{version:"v31.1",old:"removeValueColumn(colKey)",new:"removeValueColumns([colKey])"},addValueColumn:{version:"v31.1",old:"addValueColumn(colKey)",new:"addValueColumns([colKey])"},removeRowGroupColumn:{version:"v31.1",old:"removeRowGroupColumn(colKey)",new:"removeRowGroupColumns([colKey])"},addRowGroupColumn:{version:"v31.1",old:"addRowGroupColumn(colKey)",new:"addRowGroupColumns([colKey])"},removePivotColumn:{version:"v31.1",old:"removePivotColumn(colKey)",new:"removePivotColumns([colKey])"},addPivotColumn:{version:"v31.1",old:"addPivotColumn(colKey)",new:"addPivotColumns([colKey])"},showColumnMenuAfterButtonClick:{version:"v31.1",message:"Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere."},showColumnMenuAfterMouseClick:{version:"v31.1",message:"Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere."},getFilterInstance:{version:"v31.1",message:"'getFilterInstance' is deprecated. To get/set individual filter models, use 'getColumnFilterModel' or 'setColumnFilterModel' instead. To get hold of the filter instance, use 'getColumnFilterInstance' which returns the instance asynchronously."},showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"}};var jh=(e,t)=>{const i=t.rowModelType??"clientSide";return"clientSide"===i||"serverSide"===i?{module:"@ag-grid-enterprise/row-grouping"}:null},Uh={enableRowGroup:jh,rowGroup:jh,rowGroupIndex:jh,enablePivot:jh,enableValue:jh,pivot:jh,pivotIndex:jh,aggFunc:jh,cellEditor:e=>"agRichSelect"===e.cellEditor||"agRichSelectCellEditor"===e.cellEditor?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some((e=>t.includes(e)))?{module:"@ag-grid-enterprise/menu"}:null},columnsMenuParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},columnChooserParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,t)=>{let{rowSelection:i}=t;return"multiple"===i?null:"headerCheckboxSelection is only supported with rowSelection=multiple"}},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,t)=>{let{rowSelection:i}=t;return"multiple"===i?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"}},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,t)=>{let{rowSelection:i}=t;return"multiple"===i?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"}},children:()=>_h},_h={objectName:"colDef",allProperties:Object.keys({headerName:void 0,columnGroupShow:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnsMenuParams:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressCellFlash:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressMenu:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressS
vendor: 6,390 bytes, line 2
2panHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0}),docsUrl:"column-properties/",deprecations:{columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."},suppressCellFlash:{version:"31.2",message:"Use `enableCellChangeFlash={false}` in the ColDef"},checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."}},validations:Uh},Kh={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"\t",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,enableCellChangeFlash:!1,cellFlashDelay:500,cellFlashDuration:500,cellFadeDelay:1e3,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,suppressGroupMaintainValueType:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1};var $h={version:Yr,moduleName:"@ag-grid-community/core-community-features",dependantModules:[{version:Yr,moduleName:"@ag-grid-community/core"},{version:Yr,moduleName:"@ag-grid-community/core-validations",beans:[class extends ze{constructor(){super(...arguments),this.beanName="validationService"}wireBeans(e){this.beans=e,this.gridOptions=e.gridOptions}postConstruct(){this.processGridOptions(this.gridOptions)}processGridOptions(e){this.processOptions(e,{objectName:"gridOptions",allProperties:[...Ut.ALL_PROPERTIES,...K
vendor: 5,448 bytes, line 2
2t.EVENT_CALLBACKS],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:{advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."},cellFadeDelay:{version:"31.1",renamed:"cellFadeDuration"},cellFlashDelay:{version:"31.1",renamed:"cellFlashDuration"},suppressServerSideInfiniteScroll:{version:"31.1"},serverSideSortOnServer:{version:"31.1"},serverSideFilterOnServer:{version:"31.1"},enableCellChangeFlash:{version:"31.2",message:"Use `enableCellChangeFlash` in the `ColDef` or `defaultColDef` for all columns."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."},suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."}},validations:{sideBar:{module:"@ag-grid-enterprise/side-bar"},statusBar:{module:"@ag-grid-enterprise/status-bar"},enableCharts:{module:"@ag-grid-enterprise/charts"},getMainMenuItems:{module:"@ag-grid-enterprise/menu"},getContextMenuItems:{module:"@ag-grid-enterprise/menu"},allowContextMenuWithControlKey:{module:"@ag-grid-enterprise/menu"},enableAdvancedFilter:{module:"@ag-grid-enterprise/advanced-filter"},treeData:{supportedRowModels:["clientSide","serverSide"],module:"@ag-grid-enterprise/row-grouping",validate:e=>{const t=e.rowModelType??"clientSide";switch(t){case"clientSide":{const i=`treeData requires 'getDataPath' in the ${t} row model.`;return e.getDataPath?null:i}case"serverSide":{const i=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${t} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:i}}return null}},masterDetail:{module:"@ag-grid-enterprise/master-detail"},enableRangeSelection:{module:"@ag-grid-enterprise/range-selection"},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],validate:e=>{switch(e.rowModelType??"clientSide"){case"clientSide":return null;case"serverSide":{const t="groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll";return e.suppressServerSideInfiniteScroll?t:null}}return null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:[void 0,"bottom"]}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},viewportDatasource:{supportedRowModels:["viewport"],module:"@ag-grid-enterprise/viewport-row-model"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"@ag-grid-enterprise/server-side-row-model"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:"@ag-grid-community/infinite-row-model"},rowData:{supportedRowModels:["clientSide"],module:"@ag-grid-community/client-side-row-model"},paginationPageSizeSelector:{validate:e=>{const t=e.paginationPageSizeSelector;return"boolean"==
2=typeof t||null==t||t.length?null:"'paginationPageSizeSelector' cannot be an empty array.\n                    If you want to hide the page size selector, set paginationPageSizeSelector to false."}},rowSelection:{validate(e){let{rowSelection:t}=e;return t&&"string"===typeof t?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':t&&"object"!==typeof t?"Expected `RowSelectionOptions` object for the `rowSelection` property.":null}},cellSelection:{module:"@ag-grid-enterprise/range-selection"},columnDefs:()=>_h,defaultColDef:()=>_h,defaultColGroupDef:()=>_h,autoGroupColumnDef:()=>_h,selectionColumnDef:()=>_h}})}validateApiFunction(e,t){return function(e,t,i){const s=Wh[e];if(s){const{version:i,new:n,old:r,message:o}=s,a=r??e;return function(){h(`Since ${i} api.${a} is deprecated. ${n?`Please use ${n} instead. `:""}${o??""}`);for(var e=arguments.length,s=new Array(e),r=0;r<e;r++)s[r]=arguments[r];return t.apply(t,s)}}const n=Hh[e];return n?function(){const s=i.rowModel.getType();if(n.includes(s)){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t.apply(t,o)}c(`api.${e} can only be called when gridOptions.rowModelType is ${n.join(" or ")}`)}:t}(e,t,this.beans)}processOptions(e,t){const{validations:i,deprecations:s,allProperties:n,propertyExceptions:r,objectName:o,docsUrl:a}=t;n&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...r??[],...Object.keys(s)],n,o,a);const l=new Set;Object.keys(e).forEach((t=>{const n=s[t];if(n)if("renamed"in n){const{renamed:i,version:s}=n;l.add(`As of v${s}, ${String(t)} is deprecated. Please use ${String(i)} instead.`),e[i]=e[t]}else{const{message:e,version:i}=n;l.add(`As of v${i}, ${String(t)} is deprecated. ${e??""}`)}const r=e[t];if(null==r||!1===r)return;const o=i[t];let a;if(!o)return;if("function"===typeof o){const i=o(e,this.gridOptions);if(!i)return;if("objectName"in i){const s=e[t];return Array.isArray(s)?void s.forEach((e=>{this.processOptions(e,i)})):void this.processOptions(e[t],i)}a=i}else a=o;const{module:h,dependencies:c,validate:d,supportedRowModels:u}=a;if(u){const e=this.gridOptions.rowModelType??"clientSide";if(!u.includes(e))return void l.add(`${String(t)} is not supported with the '${e}' row model.`)}if(h){const e=Array.isArray(h)?h:[h];let i=!0;if(e.forEach((e=>{this.gos.assertModuleRegistered(e,String(t))||(i=!1,l.add(`${String(t)} is only available when ${e} is loaded.`))})),!i)return}if(c){const i=this.checkForRequiredDependencies(t,c,e);if(i)return void l.add(i)}if(d){const t=d(e,this.gridOptions);if(t)return void l.add(t)}})),l.size>0&&l.forEach((e=>{h(e)}))}checkForRequiredDependencies(e,t,i){const s=Object.entries(t).find((e=>{let[t,s]=e;const n=i[t];return!s.includes(n)}));if(!s)return null;const[n,r]=s;return r.length>1?`'${String(e)}' requires '${n}' to be one of [${r.join(", ")}].`:`'${String(e)}' requires '${n}' to be ${r[0]}.`}checkProperties(e,t,i,s,n){const r=function(e,t,i){const s={},n=e.filter((e=>!t.some((t=>t===e))));n.length>0&&n.forEach((e=>s[e]=nn({inputValue:e,allSuggestions:i}).values));return s}(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...t,...i],i);if(et(r,((e,t)=>
vendor: 13,391 bytes, line 2
2{let n=`invalid ${s} property '${e}' did you mean any of these: ${t.slice(0,8).join(", ")}.`;i.includes("context")&&(n+=`\nIf you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`),h(n)})),Object.keys(r).length>0&&n){const e=this.getFrameworkOverrides().getDocLink(n);h(`to see all the valid ${s} properties please check: ${e}`)}}}]},yl,uo,Ph,bh,wh,Gh,Eh]},Yh=class extends ze{constructor(){super(...arguments),this.beanName="gridDestroyService",this.destroyCalled=!1}wireBeans(e){this.beans=e}destroy(){this.destroyCalled||(this.eventService.dispatchEvent({type:"gridPreDestroyed",state:this.beans.stateService?.getState()??{}}),this.destroyCalled=!0,this.beans.ctrlsService.get("gridCtrl")?.destroyGridUi(),this.beans.context.destroy(),super.destroy())}isDestroyCalled(){return this.destroyCalled}},Zh=new Set(["gridPreDestroyed","fillStart","pasteStart"]),qh=e=>"checkboxSelected"===e||"rowClicked"===e||"spaceKey"===e||"uiSelectAll"===e||"uiSelectAllCurrentPage"===e||"uiSelectAllFiltered"===e,Qh=new Map([...Ut.BOOLEAN_PROPERTIES.map((e=>[e,R])),...Ut.NUMBER_PROPERTIES.map((e=>[e,Rr])),["groupAggFiltering",e=>"function"===typeof e?e:R(e)],["pageSize",Er(1)],["autoSizePadding",Er(0)],["keepDetailRowsCount",Er(1)],["rowBuffer",Er(0)],["infiniteInitialRowCount",Er(1)],["cacheOverflowSize",Er(1)],["cacheBlockSize",Er(1)],["serverSideInitialRowCount",Er(1)],["viewportRowModelPageSize",Er(1)],["viewportRowModelBufferSize",Er(0)]]);function Xh(e,t){const i=Qh.get(e);return i?i(t):t}var Jh=class e extends ze{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new n,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;const s=Zh.has(t);if(s&&!e||!s&&e)return;const n=Kt.getCallbackForEvent(t),r=this.gridOptions[n];"function"===typeof r&&this.frameworkOverrides.wrapOutgoing((()=>{r(i)}))}}wireBeans(e){this.gridOptions=e.gridOptions,this.eGridDiv=e.eGridDiv,this.validationService=e.validationService,this.environment=e.environment,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){const e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:e=>{let{options:t}=e;this.updateGridOptions({options:t,force:!0,source:"gridOptionsUpdated"})}})}get(e){return this.gridOptions[e]??Kh[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return w(this.gridOptions[e])}mergeGridCommonParams(e){if(e){return t=>{const i=t;return i.api=this.api,i.context=this.gridOptionsContext,e(i)}}return e}updateGridOptions(t){let{options:i,force:s,source:n="api"}=t;const r={id:e.changeSetId++,properties:[]},o=[];Object.entries(i).forEach((e=>{let[t,i]=e;"api"===n&&Wt[t]&&h(`${t} is an initial property and cannot be updated.`);const a=Xh(t,i),l=s||"object"===typeof a&&"api"===n,c=this.gridOptions[t];if(l||c!==a){this.gridOptions[t]=a;const e={type:t,currentValue:a,previousValue:c,changeSet:r,source:n};o.push(e)}})),this.validationService?.processGridOptions(this.gridOptions),r.properties=o.map((e=>e.type)),o.forEach((e=>{this.gridOptions.debug&&l(`Updated property ${e.type} from`,e.previousValue," to ",e.currentValue),this.propertyEventService.dispatchEvent(e)}))}addPropertyEventListener(e,t){this.propertyEventService.addEventListener(e,t)}removePropertyEventListener(e,t){this.propertyEventService.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}getGridCommonParams(){return{api:this.api,context:this.gridOptionsContext}}addGridCommonParams(e){const t=e;return t.api=this.api,t.context=this.gridOptionsContext,t}assertModuleRegistered(e,t){return Ln.__assertRegistered(e,t,this.gridId)}isModuleRegistered(e){return Ln.__isRegistered(e,this.gridId)}};Jh.changeSetId=0;var ec=Jh,tc=class extends ze{constructor(){super(...arguments),this.beanName="headerPositionUtils"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}findHeader(e,t){let i,s;if(kt(e.column)?i=this.visibleColsService.getGroupAtDirection(e.column,t):(s=`getCol${t}`,i=this.visibleColsService[s](e.column)),!i)return;const{headerRowIndex:n}=e;if("filter"!==this.getHeaderRowType(n)){const e=[i];for(;i.getParent();)i=i.getParent(),e.push(i);i=e[e.length-1-n]}const{column:r,headerRowIndex:o}=this.getHeaderIndexToFocus(i,n);return{column:r,headerRowIndex:o}}getHeaderIndexToFocus(e,t){let i;if(kt(e)&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){const s=e;i=s.getLeafColumns()[0];let n=i;for(;n!==s;)t++,n=n.getParent()}return{column:i||e,headerRowIndex:t}}isAnyChildSpanningHeaderHeight(e){return!!e&&e.getLeafColumns().some((e=>e.isSpanHeaderHeight()))}getColumnVisibleParent(e,t){const i=this.getHeaderRowType(t),s="column"===i;let n="filter"===i?e:e.getParent(),r=t-1,o=r;if(s&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;n&&n.isPadding();)n=n.getParent(),r--;o=r,r<0&&(n=e,r=t,o=void 0)}return{column:n,headerRowIndex:r,headerRowIndexWithoutSpan:o}}getColumnVisibleChild(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"After";let s=e,n=t+1;const r=n;if("group"===this.getHeaderRowType(t)){const t=e.getDisplayedLeafColumns(),r="After"===i?t[0]:Se(t),o=[];let a=r;for(;a.getParent()!==e;)a=a.getParent(),o.push(a);if(s=r,r.isSpanHeaderHeight())for(let e=o.length-1;e>=0;e--){const t=o[e];if(!t.isPadding()){s=t;break}n++}else s=Se(o),s||(s=r)}return{column:s,headerRowIndex:n,headerRowIndexWithoutSpan:r}}getHeaderRowType(e){const t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const i=this.visibleColsService.getAllCols(),s=i["start"===t?0:i.length-1];if(!s)return;const n=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()),r=n?.getRowType(e);if("group"==r){return{headerRowIndex:e,column:this.visibleColsService.getColGroupAtLevel(s,e)}}return{headerRowIndex:null==r?-1:e,column:s}}},ic=class extends ze{constructor(){super(...arguments),this.beanName="localeService"}getLocaleTextFunc(){const e=this.gos.getCallback("getLocaleText");if(e)return(t,i,s)=>e({key:t,defaultValue:i,variableValues:s});const t=this.gos.get("localeText");return(e,i,s)=>{let n=t&&t[e];if(n&&s&&s.length){let e=0;for(;!(e>=s.length);){if(-1===n.indexOf("${variable}"))break;n=n.replace("${variable}",s[e++])}}return n??i}}},sc=class extends ze{constructor(){super(...arguments),this.beanName="apiEventService",this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new Xe(this.getFrameworkOverrides())}addEventListener(e,t){const i=this.frameworkEventWrappingService.wrap(t),s=O(this.gos)&&!Zh.has(e),n=s?this.asyncEventListeners:this.syncEventListeners;n.has(e)||n.set(e,new Set),n.get(e).add(i),this.eventService.addEventListener(e,i,s)}removeEventListener(e,t){const i=this.frameworkEventWrappingService.unwrap(t),s=this.asyncEventListeners.get(e),n=!!s?.delete(i);n||this.syncEventListeners.get(e)?.delete(i),this.eventService.removeEventListener(e,i,n)}addGlobalListener(e){const t=this.frameworkEventWrappingService.wrapGlobal(e);if(O(this.gos)){const i=(e,i)=>{Zh.has(e)&&t(e,i)},s=(e,i)=>{Zh.has(e)||t(e,i)};this.globalEventListenerPairs.set(e,{syncListener:i,asyncListener:s}),this.eventService.addGlobalListener(i,!1),this.eventService.addGlobalListener(s,!0)}else this.syncGlobalEventListeners.add(t),this.eventService.addGlobalListener(t,!1)}removeGlobalListener(e){const t=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(t)){const{syncListener:i,asyncListener:s}=this.globalEventListenerPairs.get(t);this.eventService.removeGlobalListener(i,!1),this.eventService.removeGlobalListener(s,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1)}destroyEventListeners(e,t){e.forEach(((e,i)=>{e.forEach((e=>this.eventService.removeEventListener(i,e,t))),e.clear()})),e.clear()}destroyGlobalListeners(e,t){e.forEach((e=>this.eventService.removeGlobalListener(e,t))),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach((e=>{let{syncListener:t,asyncListener:i}=e;this.eventService.removeGlobalListener(t,!1),this.eventService.removeGlobalListener(i,!0)})),this.globalEventListenerPairs.clear()}},nc=class extends ze{constructor(){super(...arguments),this.beanName="pageBoundsListener"}wireBeans(e){this.rowModel=e.rowModel,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventService.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){this.paginationService?this.paginationService.calculatePages():this.pageBoundsService.calculateBounds(0,this.rowModel.getRowCount()-1)}},rc=class extends ze{constructor(){super(...arguments),this.beanName="pageBoundsService",this.pixelOffset=0}wireBeans(e){this.rowModel=e.rowModel}getFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getCurrentPageHeight(){return b(this.topRowBounds)||b(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0}}calculateBounds(e,t){this.topRowBounds=this.rowModel.getRowBounds(e),this.topRowBounds&&(this.topRowBounds.rowIndex=e),this.bottomRowBounds=this.rowModel.getRowBounds(t),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=t),this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=w(this.topRowBounds)?this.topRowBounds.rowTop:0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},oc=class extends ze{constructor(){super(),this.beanName="ariaAnnouncementService",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.updateAnnouncement=f(this.updateAnnouncement.bind(this),200)}wireBeans(e){this.eGridDiv=e.eGridDiv}postConstruct(){const e=j(this.gos),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),gi(t,"polite"),oi(t,"relevant","additions text"),function(e,t){oi(e,"atomic",t)}(t,!0),this.eGridDiv.appendChild(t)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout((()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e)}),50)}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(rs(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null,this.pendingAnnouncements.clear()}},ac=class extends ze{constructor(){super(...arguments),this.beanName="columnAnimationService",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}wireBeans(e){this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,(e=>this.gridBodyCtrl=e.gridBodyCtrl))}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush((()=>this.activeNext=!1),(()=>this.active=!1))}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push((()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1)}))}flush(e,t){if(0===this.executeNextFuncs.length&&0===this.executeLaterFuncs.length)return e(),void t();const i=e=>{for(;e.length;){const t=e.pop();t&&t()}};this.getFrameworkOverrides().wrapIncoming((()=>{window.setTimeout((()=>{e(),i(this.executeNextFuncs)}),0),window.setTimeout((()=>{t(),i(this.executeLaterFuncs)}),200)}))}},lc=class extends ze{constructor(){super(...arguments),this.beanName="
2columnHoverService"}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}updateState(e){this.selectedColumns=e,this.eventService.dispatchEvent({type:"columnHoverChanged"})}},hc=class extends ze{constructor(){super(...arguments),this.beanName="overlayService",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}wireBeans(e){this.userComponentFactory=e.userComponentFactory,this.rowModel=e.rowModel,this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}postConstruct(){this.isClientSide=L(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.onGridSizeChanged.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.overlayWrapperComp=e,this.updateOverlayVisibility()}isVisible(){return 0!==this.state&&!!this.overlayWrapperComp}isExclusive(){return 1===this.state&&!!this.overlayWrapperComp}getOverlayWrapper(){return this.overlayWrapperComp}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos.get("loading");(e||void 0===e&&!this.gos.get("suppressLoadingOverlay"))&&this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1,this.gos.get("loading")||this.gos.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){this.showInitialOverlay=!1,this.gos.get("loading")?h("Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead."):this.doHideOverlay()}updateOverlayVisibility(){if(!this.overlayWrapperComp)return void(this.state=0);let e=this.gos.get("loading");this.showInitialOverlay&&void 0===e&&!this.gos.get("suppressLoadingOverlay")&&(e=!this.gos.get("columnDefs")||!this.columnModel.isReady()||!this.gos.get("rowData")&&this.isClientSide),e?1!==this.state&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,this.rowModel.isEmpty()&&!this.gos.get("suppressNoRowsOverlay")&&this.isClientSide?2!==this.state&&this.doShowNoRowsOverlay():0!==this.state&&this.doHideOverlay())}doShowLoadingOverlay(){this.overlayWrapperComp&&(this.state=1,this.showOverlay(this.userComponentFactory.getLoadingOverlayCompDetails({}),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.overlayWrapperComp&&(this.state=2,this.showOverlay(this.userComponentFactory.getNoRowsOverlayCompDetails({}),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.overlayWrapperComp&&(this.state=0,this.overlayWrapperComp.hideOverlay(),this.updateExclusive())}showOverlay(e,t,i){const s=e.newAgStackInstance();this.overlayWrapperComp?.showOverlay(s,t,this.isExclusive(),i),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventService.dispatchEvent({type:"overlayExclusiveChanged"})}onGridSizeChanged(){this.refreshWrapperPadding()}refreshWrapperPadding(){if(!this.overlayWrapperComp)return;let e=0;if(2===this.state){const t=this.ctrlsService.get("gridHeaderCtrl");e=t?.getHeaderHeight()||0}else 0!==this.wrapperPadding&&(e=0);this.wrapperPadding!==e&&(this.wrapperPadding=e,this.overlayWrapperComp.updateOverlayWrapperPaddingTop(e))}},cc=class extends ze{constructor(){super(...arguments),this.beanName="rowCssClassCalculator"}wireBeans(e){this.stylingService=e.stylingService}getInitialRowClasses(e){const t=[];return w(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),Te(t,this.processClassesFromGridOptions(e.rowNode)),Te(t,this.preProcessRowClassRules(e.rowNode)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&("left"===e.pinned&&t.push("ag-cell-last-left-pinned"),"right"===e.pinned&&t.push("ag-cell-first-right-pinned")),t}processClassesFromGridOptions(e){const t=[],i=e=>{"string"===typeof e?t.push(e):Array.isArray(e)&&e.forEach((e=>t.push(e)))},s=this.gos.get("rowClass");if(s){if("function"===typeof s)return h("rowClass should not be a function, please use getRowClass instead"),[];i(s)}const n=this.gos.getCallback("getRowClass");if(n){i(n({data:e.data,node:e,rowIndex:e.rowIndex}))}return t}preProcessRowClassRules(e){const t=[];return this.processRowClassRules(e,(e=>{t.push(e)}),(()=>{})),t}processRowClassRules(e,t,i){const s=this.gos.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),s,t,i)}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0}},dc=class extends ze{constructor(){super(...arguments),this.beanName="rowContainerHeightService",this.scrollY=0,this.uiBodyHeight=0}wireBeans(e){this.ctrlsService=e.ctrlsService}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=function(){if(void 0!==si)return si;if(!document.body)return-1;let e=1e6;const t=Oi()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=2*e;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),si=e,e}(),this.gos.get("debug")&&l("RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;
vendor: 31,578 bytes, line 2
2const e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.gos.get("debug")&&l(`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t="number"===typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=e/(this.modelHeight-this.getUiBodyHeight());return this.maxScrollY*t}},uc=class extends ze{constructor(){super(...arguments),this.beanName="rowNodeSorter"}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.showRowGroupColsService=e.showRowGroupColsService}postConstruct(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=q(this.gos),this.addManagedPropertyListener("accentedSort",(e=>this.isAccentedSort=e.currentValue)),this.addManagedPropertyListener("autoGroupColumnDef",(()=>this.primaryColumnsSortGroups=q(this.gos)))}doFullSort(e,t){const i=e.map(((e,t)=>({currentPos:t,rowNode:e})));return i.sort(this.compareRowNodes.bind(this,t)),i.map((e=>e.rowNode))}compareRowNodes(e,t,i){const s=t.rowNode,n=i.rowNode;for(let r=0,o=e.length;r<o;r++){const t=e[r],i="desc"===t.sort,o=this.getValue(s,t.column),a=this.getValue(n,t.column);let l;const h=this.getComparator(t,s);l=h?h(o,a,s,n,i):A(o,a,this.isAccentedSort);if(!isNaN(l)&&0!==l)return"asc"===t.sort?l:-1*l}return t.currentPos-i.currentPos}getComparator(e,t){const i=e.column,s=i.getColDef().comparator;if(null!=s)return s;if(!i.getColDef().showRowGroup)return;const n=!t.group&&i.getColDef().field;if(!n)return;const r=this.columnModel.getColDefCol(n);return r?r.getColDef().comparator:void 0}getValue(e,t){if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(te(this.gos,this.columnModel.isPivotActive())){const i=e.allLeafChildren?.[0];return i?this.valueService.getValue(t,i,!1,!1):void 0}const i=this.showRowGroupColsService?.getShowRowGroupCol(t.getId());if(!i)return;return e.groupData?.[i.getId()]}return e.group&&t.getColDef().showRowGroup?void 0:this.valueService.getValue(t,e,!1,!1)}},pc=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(e,t){if(e.children)for(let i=0;i<e.children.length;i++)this.depthFirstSearchChangedPath(e.children[i],t);t(e.rowNode)}depthFirstSearchEverything(e,t,i){if(e.childrenAfterGroup)for(let s=0;s<e.childrenAfterGroup.length;s++){const n=e.childrenAfterGroup[s];n.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[s],t,i):i&&t(n)}t(e)}forEachChangedNodeDepthFirst(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){const e={rowNode:t,children:null};this.mapToItems[t.id]=e,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach((e=>this.nodeIdsToColumns[i.id][e.getId()]=!0)),i=i.parent}linkPathItems(e,t){let i=e;for(let s=0;s<t;s++){const e=this.mapToItems[i.id],t=this.mapToItems[i.parent.id];t.children||(t.children=[]),t.children.push(e),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const i=this.nodeIdsToColumns[e.id];return t.filter((e=>i[e.getId()]))}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter((e=>!i[e.getId()]))}},gc=class extends ze{constructor(){super(...arguments),this.beanName="selectionService",this.selectedNodes=new Map,this.selectionCtx=new El,this.rowSelectionMode=void 0}wireBeans(e){this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService}postConstruct(){const{gos:e,rowModel:t,onRowSelected:i}=this;this.selectionCtx.init(t),this.rowSelectionMode=ge(e),this.groupSelectsChildren=ve(e),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],(()=>{const t=ve(e),i=ge(e);t===this.groupSelectsChildren&&i===this.rowSelectionMode||(this.groupSelectsChildren=t,this.rowSelectionMode=i,this.deselectAllRowNodes({source:"api"}))})),this.addManagedEventListeners({rowSelected:i.bind(this)})}destroy(){super.destroy(),this.resetNodes(),this.selectionCtx.reset()}isMultiSelect(){return"multiRow"===this.rowSelectionMode}overrideSelectionValue(e,t){if(!qh(t))return e;const i=this.selectionCtx.getRoot();return!i||(i.isSelected()??!1)}setNodesSelected(e){const{newValue:t,clearSelection:i,suppressFinishActions:s,rangeSelect:n,nodes:r,event:o,source:a}=e;if(0===r.length)return 0;if(r.length>1&&!this.isMultiSelect())return h("cannot multi select unless selection mode is 'multiRow'"),0;const l=this.groupSelectsChildren&&!0===e.groupSelectsFiltered,c=r.map((e=>e.footer?e.sibling:e));if(n){if(c.length>1)return h("cannot range select while selecting multiple rows"),0;const e=c[0],i=this.overrideSelectionValue(t,a);if(this.isMultiSelect()){if(this.selectionCtx.isInRange(e)){const t=this.selectionCtx.truncate(e);return i&&this.selectRange(t.discard,!1,a),this.selectRange(t.keep,i,a)}if(this.selectionCtx.getRoot()!==e){const t=this.selectionCtx.extend(e,this.groupSelectsChildren);return i&&this.selectRange(t.discard,!1,a),this.selectRange(t.keep,i,a)}}else;}s||this.selectionCtx.setRoot(c[0]);let d=0;for(let h=0;h<c.length;h++){const e=c[h];if(!(l&&e.group)){e.selectThisNode(t,o,a)&&d++}this.groupSelectsChildren&&e.childrenAfterGroup?.length&&(d+=this.selectChildren(e,t,l,a))}if(!s){t&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(c[0],a)),d>0&&(this.updateGroupsFromChildrenSelections(a),this.dispatchSelectionChanged(a))}return d}selectRange(e,t,i){let s=0;return e.forEach((e=>{if(e.group&&this.groupSelectsChildren)return;e.selectThisNode(t,void 0,i)&&s++})),s>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),s}selectChildren(e,t,i,s){const n=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return b(n)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:s,nodes:n})}getSelectedNodes(){const e=[];return this.selectedNodes.forEach((t=>{t&&e.push(t)})),e}getSelectedRows(){const e=[];return this.selectedNodes.forEach((t=>{t&&t.data&&e.push(t.data)})),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach(((i,s)=>{i&&e(i)&&t.set(s,i)})),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsChildren)return!1;if(!L(this.gos))return!1;const i=this.rowModel.getRootNode();t||(t=new pc(!0,i)).setInactive();let s=!1;return t.forEachChangedNodeDepthFirst((t=>{if(t!==i){const i=t.calculateSelectedFromChildren();s=t.selectThisNode(null!==i&&i,void 0,e)||s}})),s}clearOtherNodes(e,t){const i=new Map;let s=0;return this.selectedNodes.forEach((n=>{if(n&&n.id!==e.id){const e=this.selectedNodes.get(n.id);s+=e.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&n.parent&&i.set(n.parent.id,n.parent)}})),i.forEach((e=>{const i=e.calculateSelectedFromChildren();e.selectThisNode(null!==i&&i,void 0,t)})),s}onRowSelected(e){const t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}syncInOldRowNode(e,t){if(w(t)&&e.id!==t.id&&t){const i=t.id;this.selectedNodes.get(i)==e&&this.selectedNodes.set(t.id,t)}}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes?.clear()}getBestCostNodeSelection(){if(!L(this.gos))return;const e=this.rowModel.getTopLevelNodes();if(null===e)return;const t=[];return function e(i){for(let s=0,n=i.length;s<n;s++){const n=i[s];if(n.isSelected())t.push(n);else{const t=n;t.group&&t.children&&e(t.children)}}}(e),t}isEmpty(){let e=0;return this.selectedNodes.forEach((t=>{t&&e++})),0===e}deselectAllRowNodes(e){const t=e=>e.selectThisNode(!1,void 0,s),i=L(this.gos),{source:s,justFiltered:n,justCurrentPage:r}=e;if(r||n){if(!i)return void c("selecting just filtered only works when gridOptions.rowModelType='clientSide'");this.getNodesToSelect(n,r).forEach(t)}else this.selectedNodes.forEach((e=>{e&&t(e)})),this.reset(s);this.selectionCtx.reset(),i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)}getSelectedCounts(e,t){let i=0,s=0;return this.getNodesToSelect(e,t).forEach((e=>{this.groupSelectsChildren&&e.group||(e.isSelected()?i++:e.selectable&&s++)})),{selectedCount:i,notSelectedCount:s}}getSelectAllState(e,t){const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(e,t);return(0!==i||0!==s)&&(i>0&&s>0?null:i>0)}hasNodesToSelect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getNodesToSelect(e,t).filter((e=>e.selectable)).length>0}getNodesToSelect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.validateSelectAllType();const i=[];if(t)return this.forEachNodeOnPage((e=>{if(e.group)if(e.expanded)this.groupSelectsChildren||i.push(e);else{const t=e=>{i.push(e),e.childrenAfterFilter?.length&&e.childrenAfterFilter.forEach(t)};t(e)}else i.push(e)})),i;const s=this.rowModel;return e?(s.forEachNodeAfterFilter((e=>{i.push(e)})),i):(s.forEachNode((e=>{i.push(e)})),i)}forEachNodeOnPage(e){const t=this.pageBoundsService.getFirstRow(),i=this.pageBoundsService.getLastRow();for(let s=t;s<=i;s++){const t=this.rowModel.getRow(s);t&&e(t)}}selectAllRowNodes(e){if(re(this.gos)&&!me(this.gos))return h("cannot multi select unless selection mode is 'multiRow'");this.validateSelectAllType();const{source:t,justFiltered:i,justCurrentPage:s}=e,n=this.getNodesToSelect(i,s);n.forEach((e=>e.selectThisNode(!0,void 0,t))),this.selectionCtx.setRoot(n[0]??null),this.selectionCtx.setEndRange(Se(n)??null),L(this.gos)&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t),this.dispatchSelectionChanged(t)}getSelectionState(){const e=[];return this.selectedNodes.forEach((t=>{t?.id&&e.push(t.id)})),e.length?e:null}setSelectionState(e,t){if(!Array.isArray(e))return c("Invalid selection state. When using client-side row model, the state must conform to `string[]`.");const i=new Set(e),s=[];this.rowModel.forEachNode((e=>{i.has(e.id)&&s.push(e)})),this.setNodesSelected({newValue:!0,nodes:s,source:t})}dispatchSelectionChanged(e){this.eventService.dispatchEvent({type:"selectionChanged",source:e})}validateSelectAllType(){if(!L(this.gos))throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`)}},mc=class extends ze{constructor(){super(...arguments),this.beanName="selectableService"}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],(()=>this.updateSelectable()))}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{gos:t}=this,i=N(t),s=pe(t);if(!i||!s)return;const n=ve(t),r=L(t)&&n,o=[],a=t=>{if(e&&!t.group)return;if(r&&t.group){const e=t.childrenAfterGroup.some((e=>!0===e.selectable));return void t.setRowSelectable(e,!0)}const i=s?.(t)??!0;t.setRowSelectable(i,!0),!i&&t.isSelected()&&o.push(t)};if(r){const e=this.rowModel;new pc(!1,e.getRootNode()).forEachChangedNodeDepthFirst(a,!0,!0)}else this.rowModel.forEachNode(a);o.length&&this.selectionService.setNodesSelected({nodes:o,newValue:!1,source:"selectableChanged"}),r&&this.selectionService instanceof gc&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}},fc=["asc","desc",null],vc=class extends ze{constructor(){super(...arguments),this.beanName="sortController"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.showRowGroupColsService=e.showRowGroupColsService}progressSort(e,t,i){const s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,i)}setSortForColumn(e,t,i,s){"asc"!==t&&"desc"!==t&&(t=null);let n=[e];if(q(this.gos)&&e.getColDef().showRowGroup){const t=this.funcColsService.getSourceColumnsForGroupColumn(e),i=t?.filter((e=>e.isSortable()));i&&(n=[e,...i])}n.forEach((e=>e.setSort(t,s)));const r=[];if(!((i||this.gos.get("alwaysMultiSort"))&&!this.gos.get("suppressMultiSort"))){const e=this.clearSortBarTheseColumns(n,s);r.push(...e)}this.updateSortIndex(e),r.push(...n),this.dispatchSortChangedEvents(s,r)}updateSortIndex(e){const t=q(this.gos),i=this.showRowGroupColsService?.getShowRowGroupCol(e.getId()),s=t&&i||e,n=this.getColumnsWithSortingOrdered();this.columnModel.getAllCols().forEach((e=>e.setSortIndex(null)));const r=n.filter((e=>(!t||!e.getColDef().showRowGroup)&&e!==s));(s.getSort()?[...r,s]:r).forEach(((e,t)=>{e.setSortIndex(t)}))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){const e=this.columnModel.getAllCols().filter((e=>!!e.getSort()));return e&&e.length>0}dispatchSortChangedEvents(e,t){const i={type:"sortChanged",source:e};t&&(i.columns=t),this.eventService.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[];return this.columnModel.getAllCols().forEach((s=>{e.includes(s)||(s.getSort()&&i.push(s),s.setSort(void 0,t))})),i}getNextSortDirection(e){let t;if(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gos.get("sortingOrder")?this.gos.get("sortingOrder"):fc,!Array.isArray(t)||t.length<=0)return h(`sortingOrder must be an array with at least one element, currently it's ${t}`),null;const i=t.indexOf(e.getSort()),s=i<0,n=i==t.length-1;let r;return r=s||n?t[0]:t[i+1],fc.indexOf(r)<0?(h("invalid sort type ",r),null):r}getIndexedSortMap(){let e=this.columnModel.getAllCols().filter((e=>!!e.getSort()));if(this.columnModel.isPivotMode()){const t=q(this.gos);e=e.filter((e=>{const i=!!e.getAggFunc(),s=!e.isPrimary(),n=t?this.showRowGroupColsService?.getShowRowGroupCol(e.getId()):e.getColDef().showRowGroup;return i||s||n}))}const t=this.funcColsService.getRowGroupColumns().filter((e=>!!e.getSort())),i={};e.forEach(((e,t)=>i[e.getId()]=t)),e.sort(((e,t)=>{const s=e.getSortIndex(),n=t.getSortIndex();if(null!=s&&null!=n)return s-n;if(null==s&&null==n){return i[e.getId()]>i[t.getId()]?1:-1}return null==n?-1:1}));const s=q(this.gos)&&!!t.length;s&&(e=[...new Set(e.map((e=>this.showRowGroupColsService?.getShowRowGroupCol(e.getId())??e)))]);const n=new Map;return e.forEach(((e,t)=>n.set(e,t))),s&&t.forEach((e=>{const t=this.showRowGroupColsService.getShowRowGroupCol(e.getId());n.set(e,n.get(t))})),n}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(((e,t)=>{let[i,s]=e,[n,r]=t;return s-r})).map((e=>{let[t]=e;return t}))}getSortModel(){return this.getColumnsWithSortingOrdered().filter((e=>e.getSort())).map((e=>({sort:e.getSort(),colId:e.getId()})))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter((e=>e.getSort())).map((e=>({sort:e.getSort(),column:e})))}canColumnDisplayMixedSort(e){const t=q(this.gos),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){const t=this.funcColsService.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const i=null!=e.getColDef().field||!!e.getColDef().valueGetter?[e,...t]:t,s=i[0].getSort();return i.every((e=>e.getSort()==s))?s:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}},yc=class extends ze{constructor(){super(...arguments),this.beanName="syncService",this.waitingForColumns=!1}wireBeans(e){this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.rowModel=e.rowModel}postConstruct(){this.addManagedPropertyListener("columnDefs",(e=>this.setColumnDefs(e)))}start(){this.ctrlsService.whenReady(this,(()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()}))}setColumnsAndData(e){this.columnModel.setColumnDefs(e??[],"gridInitializing"),this.rowModel.start()}gridReady(){this.eventService.dispatchEvent({type:"gridReady"});const e=this.gos.isModuleRegistered("@ag-grid-enterprise/core");this.gos.get("debug")&&l(`initialised successfully, enterprise = ${e}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t)return this.waitingForColumns?(this.waitingForColumns=!1,void this.setColumnsAndData(t)):void this.columnModel.setColumnDefs(t,vt(e.source))}},Cc=class extends ze{constructor(){super(...arguments),this.beanName="changeDetectionService"}wireBeans(e){this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer}postConstruct(){L(this.gos)&&(this.clientSideRowModel=this.rowModel),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){"paste"!==e.source&&this.doChangeDetection(e.node,e.column)}doChangeDetection(e,t){if(this.gos.get("suppressChangeDetection"))return;const i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){const s=this.gos.get("aggregateOnlyChangedColumns"),n=new pc(s,this.clientSideRowModel.getRootNode());n.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(n),n.forEachChangedNodeDepthFirst((e=>{i.push(e)}))}this.rowRenderer.refreshCells({rowNodes:i})}},Sc=class extends ze{constructor(){super(...arguments),this.beanName="expressionService",this.expressionToFunctionCache={}}evaluate(e,t){if("string"===typeof e)return this.evaluateExpression(e,t);c("value should be either a string or a function",e)}evaluateExpression(e,t){try{const i=this.createExpressionFunction(e);return i(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(i){return l("Processing of the expression failed"),l("Expression = ",e),l("Params = ",t),l("Exception = ",i),null}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];const t=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},wc=class extends ze{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=i)}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}},bc=class extends ze{constructor(){super(...arguments),this.beanName="valueService",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionService=e.expressionService,this.columnModel=e.columnModel,this.valueCache=e.valueCache,this.dataTypeService=e.dataTypeService}postConstruct(){this.initialised||this.init()}init(){this.isSsrm=F(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=e=>this.callColumnCellValueChangedHandler(e),t=O(this.gos);this.eventService.addEventListener("cellValueChanged",e,t),this.addDestroyFunc((()=>this.eventService.removeEventListener("cellValueChanged",e,t))),this.addManagedPropertyListener("treeData",(e=>this.isTreeData=e.currentValue))}getValueForDisplay(e,t){const i=t.leafGroup&&this.columnModel.isPivotMode(),s=t.group&&t.expanded&&!t.footer&&!i,n=this.gos.get("groupSuppressBlankHeader");if(!s||n)return this.getValue(e,t);let r=!1;const o=this.gos.get("groupTotalRow")??this.gos.get("groupIncludeFooter");if("function"!==typeof o)r=!!o;else{r=!!(this.gos.getCallback("groupTotalRow")??this.gos.getCallback("groupIncludeFooter"))({node:this})}const a=s&&r;return this.getValue(e,t,!1,a)}getValue(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.initialised||this.init(),!t)return;const n=e.getColDef(),r=n.field,o=e.getColId(),a=t.data;let l;const h=t.groupData&&void 0!==t.groupData[o],c=!s&&t.aggData&&void 0!==t.aggData[o],d=this.isSsrm&&s&&!!e.getColDef().aggFunc,u=this.isSsrm&&t.footer&&t.field&&(!0===e.getColDef().showRowGroup||e.getColDef().showRowGroup===t.field);if(i&&n.filterValueGetter?l=this.executeFilterValueGetter(n.filterValueGetter,a,e,t):this.isTreeData&&c?l=t.aggData[o]:this.isTreeData&&n.valueGetter?l=this.executeValueGetter(n.valueGetter,a,e,t):this.isTreeData&&r&&a?l=rt(a,r,e.isFieldContainsDots()):h?l=t.groupData[o]:c?l=t.aggData[o]:n.valueGetter?l=this.executeValueGetter(n.valueGetter,a,e,t):u?l=rt(a,t.field,e.isFieldContainsDots()):r&&a&&!d&&(l=rt(a,r,e.isFieldContainsDots())),this.cellExpressions&&"string"===typeof l&&0===l.indexOf("=")){const i=l.substring(1);l=this.executeValueGetter(i,a,e,t)}if(null==l){const i=this.getOpenedGroup(t,e);if(null!=i)return i}return l}parseValue(e,t,i,s){const n=e.getColDef(),r=n.valueParser;if(w(r)){const o=this.gos.addGridCommonParams({node:t,data:t?.data,oldValue:s,newValue:i,colDef:n,column:e});return"function"===typeof r?r(o):this.expressionService.evaluate(r,o)}return i}getDeleteValue(e,t){return w(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t))??null:null}formatValue(e,t,i,s){let n,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=null;const a=e.getColDef();if(s?n=s:r&&(n=a.valueFormatter),n){const s=this.gos.addGridCommonParams({value:i,node:t,data:t?t.data:null,colDef:a,column:e});o="function"===typeof n?n(s):this.expressionService.evaluate(n,s)}else if(a.refData)return a.refData[i]||"";return null==o&&Array.isArray(i)&&(o=i.join(", ")),o}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup"))return;if(!t.getColDef().showRowGroup)return;const i=t.getColDef().showRowGroup;let s=e.parent;for(;null!=s;){if(s.rowGroupColumn&&(!0===i||i===s.rowGroupColumn.getColId()))return s.key;s=s.parent}}setValue(e,t,i,s){const n=this.columnModel.getColDefCol(t);if(!e||!n)return!1;b(e.data)&&(e.data={});const{field:r,valueSetter:o}=n.getColDef();if(b(r)&&b(o))return h("you need either field or valueSetter set on colDef for editing to work"),!1;if(this.dataTypeService&&!this.dataTypeService.checkType(n,i))return h("Data type of the new value does not match the cell data type of the column"),!1;const a=this.gos.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(n,e),newValue:i,colDef:n.getColDef(),column:n});let l;if(a.newValue=i,l=w(o)?"function"===typeof o?o(a):this.expressionService.evaluate(o,a):this.setValueUsingField(e.data,r,i,n.isFieldContainsDots()),void 0===l&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged();const c=this.getValue(n,e);return this.eventService.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,colDef:a.colDef,data:e.data,node:e,oldValue:a.oldValue,newValue:c,value:c,source:s}),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;"function"===typeof t&&this.getFrameworkOverrides().wrapOutgoing((()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})}))}setValueUsingField(e,t,i,s){if(!t)return!1;let n=!1;if(s){const s=t.split(".");let r=e;for(;s.length>0&&r;){const e=s.shift();0===s.length?(n=r[e]===i,n||(r[e]=i)):r=r[e]}}else n=e[t]===i,n||(e[t]=i);return!n}executeFilterValueGetter(e,t,i,s){const n=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});return"function"===typeof e?e(n):this.expressionService.evaluate(e,n)}executeValueGetter(e,t,i,s){const n=i.getColId(),r=this.valueCache.getValue(s,n);if(void 0!==r)return r;const o=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});let a;return a="function"===typeof e?e(o):this.expressionService.evaluate(e,o),this.valueCache.setValue(s,n,a),a}getValueCallback(e,t){const i=this.columnModel.getColDefCol(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){const i=this.getValue(e,t),s=e.getColDef().keyCreator;let n=i;if(s){n=s(this.gos.addGridCommonParams({value:i,colDef:e.getColDef(),column:e,node:t,data:t.data}))}return"string"===typeof n||null==n||(n=String(n),"[object Object]"===n&&h("a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key")),n}},xc=class e{static applyGlobalGridOptions(t){if(!e.gridOptions)return t;let i={};return nt(i,e.gridOptions,!0,!0),"deep"===e.mergeStrategy?nt(i,t,!0,!0):i={...i,...t},e.gridOptions.context&&(i.context=e.gridOptions.context),t.context&&("deep"===e.mergeStrategy&&i.context&&nt(t.context,i.context,!0,!0),i.context=t.context),i}};xc.gridOptions=void 0,xc.mergeStrategy="shallow";var Mc=xc;var Dc=1,Ic=class{create(e,t,i,s,n){const r=function(e){const t={};return Object.entries(e).forEach((e=>{let[i,s]=e;const n=Xh(i,s);t[i]=n})),t}(Mc.applyGlobalGridOptions(t)),o=r.gridId??String(Dc++),a=this.getRegisteredModules(n,o),l=this.createBeansList(r.rowModelType,a,o),h=this.createProvidedBeans(e,r,n);if(!l)return void c("Failed to create grid.");const d=new kn({providedBeanInstances:h,beanClasses:l,gridId:o,beanInitComparator:ih,beanDestroyComparator:sh,derivedBeans:[$l]});return this.registerModuleUserComponents(d,a),this.registerControllers(d,a),this.registerModuleApiFunctions(d,a),i(d),d.getBean("syncService").start(),s&&s(d),d.getBean("gridApi")}registerControllers(e,t){const i=e.getBean("ctrlsFactory");t.forEach((e=>{e.controllers&&e.controllers.forEach((e=>i.register(e)))}))}getRegisteredModules(e,t){const i=e?e.modules:null,s=Ln.__getRegisteredModules(t),n=[],r={},o=(e,t,i)=>{var s;r[(s=t).moduleName]||(r[s.moduleName]=!0,n.push(s),Ln.__register(s,e,i)),t.dependantModules&&t.dependantModules.forEach((t=>o(e,t,i)))};return o(!!i?.length||!Ln.__isPackageBased(),$h,void 0),i&&i.forEach((e=>o(!0,e,t))),s&&s.forEach((e=>o(!Ln.__isPackageBased(),e,void 0))),n}registerModuleUserComponents(e,t){const i=this.extractModuleEntity(t,(e=>e.userComponents?e.userComponents:[])),s=e.getBean("userComponentRegistry");i.forEach((e=>{let{name:t,classImp:i,params:n}=e;s.registerDefaultComponent(t,i,n)}))}registerModuleApiFunctions(e,t){const i=e.getBean("apiFunctionService");t.forEach((e=>{const t=e.apiFunctions;if(t){Object.keys(t).forEach((e=>{i?.addFunction(e,t[e])}))}}))}createProvidedBeans(e,t,i){let s=i?i.frameworkOverrides:null;b(s)&&(s=new Vl);const n={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:s};return i&&i.providedBeanInstances&&Object.assign(n,i.providedBeanInstances),n}createBeansList(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"clientSide",t=arguments.length>2?arguments[2]:void 0;const i=(arguments.length>1?arguments[1]:void 0).filter((t=>!t.rowModel||t.rowModel===e)),s={clientSide:"@ag-grid-community/client-side-row-model",infinite:"@ag-grid-community/infinite-row-model",serverSide:"@ag-grid-enterprise/server-side-row-model",viewport:"@ag-grid-enterprise/viewport-row-model"};if(!s[e])return void c("Could not find row model for rowModelType = ",e);if(!Ln.__assertRegistered(s[e],`rowModelType = '${e}'`,t))return;const n=[lh,oh,tc,Yh,Kl,on,Jl,eh,qa,An,dc,Ya,ic,xl,Hn,Gt,mh,ec,Gl,gc,ft,Co,rc,nc,wl,Sc,gt,$a,wc,bc,Cl,Za,Bn,vh,Ka,uh,zl,Al,ja,vc,lc,ac,mc,Cc,Qa,Yl,cc,uc,rh,yh,ah,nh,yc,hc,Xa,sc,oc,Ja,xt,Zl,Dt,wt,ql,Ql,Lt,bt,Tt,Xl,Pt,Ue],r=this.extractModuleEntity(i,(e=>e.beans?e.beans:[]));n.push(...r);const o=[];return n.forEach((e=>{o.indexOf(e)<0&&o.push(e)})),o}extractModuleEntity(e,t){return[].concat(...e.map(t))}},Rc=class extends ze{constructor(){super(...arguments),this.beanName="rowModelHelperService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){const e=this.rowModel;switch(e.getType()){case"clientSide":this.clientSideRowModel=e;break;case"infinite":this.infiniteRowModel=e;break;case"serverSide":this.serverSideRowModel=e}}getClientSideRowModel(){return this.clientSideRowModel}getInfiniteRowModel(){return this.infiniteRowModel}getServerSideRowModel(){return this.serverSideRowModel}};var Ec={version:Yr,moduleName:"@ag-grid-community/csrm-ssrm-shared-api",apiFunctions:{expandAll:function(e){e.expansionService.expandAll(!0)},collapseAll:function(e){e.expansionService.expandAll(!1)},onRowHeightChanged:function(e){const t=e.rowModelHelperService?.getClientSideRowModel(),i=e.rowModelHelperService?.getServerSideRowModel();t?t.onRowHeightChanged():i&&i.onRowHeightChanged()}}},Ac={version:Yr,moduleName:"@ag-grid-community/ssrm-infinite-shared-api",apiFunctions:{setRowCount:function(e,t,i){const s=e.rowModelHelperService?.getServerSideRowModel();if(s)return e.funcColsService.isRowGroupEmpty()?void s.setRowCount(t,i):void c("setRowCount cannot be used while using row grouping.");const n=e.rowModelHelperService?.getInfiniteRowModel();n&&n.setRowCount(t,i)},getCacheBlockState:function(e){return e.rowNodeBlockLoader?.getBlockState()??{}},isLastRowIndexKnown:function(e){return e.rowModel.isLastRowIndexKnown()}}},Tc=class{wrap(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=arguments.length>3?arguments[3]:void 0;const n=this.createWrapper(e,s);return t.forEach((e=>{this.createMethod(n,e,!0)}
2)),i.forEach((e=>{this.createMethod(n,e,!1)})),n}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&h("Framework component is missing the method "+t+"()"),null)}}},Pc=class{};Pc.CHART_TYPE_TO_SERIES_TYPE={column:"bar",groupedColumn:"bar",stackedColumn:"bar",normalizedColumn:"bar",bar:"bar",groupedBar:"bar",stackedBar:"bar",normalizedBar:"bar",line:"line",scatter:"scatter",bubble:"bubble",pie:"pie",donut:"donut",doughnut:"donut",area:"area",stackedArea:"area",normalizedArea:"area",histogram:"histogram",radarLine:"radar-line",radarArea:"radar-area",nightingale:"nightingale",radialColumn:"radial-column",radialBar:"radial-bar",sunburst:"sunburst",rangeBar:"range-bar",rangeArea:"range-area",boxPlot:"box-plot",treemap:"treemap",heatmap:"heatmap",waterfall:"waterfall"},Pc.COMBO_CHART_TYPES=["columnLineCombo","areaColumnCombo","customCombo"],Pc.SERIES_GROUP_TYPES=["grouped","stacked","normalized"];var Lc="undefined"===typeof global?{}:global;Lc.HTMLElement="undefined"===typeof HTMLElement?{}:HTMLElement,Lc.HTMLButtonElement="undefined"===typeof HTMLButtonElement?{}:HTMLButtonElement,Lc.HTMLSelectElement="undefined"===typeof HTMLSelectElement?{}:HTMLSelectElement,Lc.HTMLInputElement="undefined"===typeof HTMLInputElement?{}:HTMLInputElement,Lc.Node="undefined"===typeof Node?{}:Node,Lc.MouseEvent="undefined"===typeof MouseEvent?{}:MouseEvent;var Fc=class{constructor(e,t,i,s,n,r){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=e,this.gos=t,this.eventService=i,this.funcColsService=s,this.beans=r,this.selectionService=n,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id="ROOT_NODE_ID",this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return tt(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(e){if("string"===typeof e)return void h("rowData must be an array.");this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e);const t=this.rootNode,i=this.rootNode.sibling;t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.nextId=0,this.allNodesMap={},e?t.allLeafChildren=e.map(((e,t)=>this.createNode(e,this.rootNode,0,t))):(t.allLeafChildren=[],t.childrenAfterGroup=[]),i&&(i.childrenAfterFilter=t.childrenAfterFilter,i.childrenAfterGroup=t.childrenAfterGroup,i.childrenAfterAggFilter=t.childrenAfterAggFilter,i.childrenAfterSort=t.childrenAfterSort,i.childrenMapped=t.childrenMapped,i.allLeafChildren=t.allLeafChildren)}updateRowData(e){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);const t={rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},i=[];return this.executeRemove(e,t,i),this.executeUpdate(e,t,i),this.executeAdd(e,t),this.updateSelection(i,"rowDataChanged"),t}updateRowOrderFromRowData(e){const t=this.rootNode.allLeafChildren,i=t?.length??0,s=new Map;let n=-1,r=-1;for(let o=0;o<i;++o){const i=t[o],a=i.data;a!==e[o]&&(r<0&&(n=o),r=o,s.set(a,i))}if(n<0)return!1;for(let o=n;o<=r;++o){const i=s.get(e[o]);void 0!==i&&(t[o]=i,i.sourceRowIndex=o)}return!0}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){this.eventService.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}updateSelection(e,t){const i=e.length>0;i&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),i&&this.eventService.dispatchEvent({type:"selectionChanged",source:t})}executeAdd(e,t){const i=e.add;if(x(i))return;const s=this.rootNode.allLeafChildren;let n=s.length;if("number"===typeof e.addIndex&&(n=this.sanitizeAddIndex(e.addIndex),n>0)){if(this.gos.get("treeData"))for(let e=0;e<s.length;e++){const t=s[e];if(t?.rowIndex==n-1){n=e+1;break}}}const r=i.map(((e,t)=>this.createNode(e,this.rootNode,0,n+t)));if(n<s.length){const e=s.slice(0,n),i=s.slice(n,s.length),o=e.length+r.length;for(let t=0,s=i.length;t<s;++t)i[t].sourceRowIndex=o+t;this.rootNode.allLeafChildren=[...e,...r,...i],t.rowsInserted=!0}else this.rootNode.allLeafChildren=s.concat(r);const o=this.rootNode.sibling;o&&(o.allLeafChildren=s),t.rowNodeTransaction.add=r}sanitizeAddIndex(e){const t=this.rootNode.allLeafChildren?.length??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}executeRemove(e,t,i){let{rowNodeTransaction:s}=t;const{remove:n}=e;if(x(n))return;const r={};
2n.forEach((e=>{const t=this.lookupRowNode(e);t&&(t.isSelected()&&i.push(t),t.clearRowTopAndRowIndex(),r[t.id]=!0,delete this.allNodesMap[t.id],s.remove.push(t))})),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren?.filter((e=>!r[e.id]))??null,this.rootNode.allLeafChildren?.forEach(((e,t)=>{e.sourceRowIndex=t}));const o=this.rootNode.sibling;o&&(o.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(e,t,i){let{rowNodeTransaction:s}=t;const{update:n}=e;x(n)||n.forEach((e=>{const t=this.lookupRowNode(e);t&&(t.updateData(e),!t.selectable&&t.isSelected()&&i.push(t),this.setMasterForRow(t,e,0,!1),s.update.push(t))}))}lookupRowNode(e){const t=ie(this.gos);let i;if(t){const s=t({data:e,level:0});if(i=this.allNodesMap[s],!i)return c(`could not find row id=${s}, data item was not found for this id`),null}else if(i=this.rootNode.allLeafChildren?.find((t=>t.data===e)),!i)return c("could not find data item as object was not found",e),c("Consider using getRowId to help the Grid find matching row data"),null;return i||null}createNode(e,t,i,s){const n=new Yn(this.beans);return n.sourceRowIndex=s,n.group=!1,this.setMasterForRow(n,e,i,!0),t&&(n.parent=t),n.level=i,n.setDataAndId(e,this.nextId.toString()),this.allNodesMap[n.id]&&h(`duplicate node id '${n.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[n.id]=n,this.nextId++,n}setMasterForRow(e,t,i,s){if(this.gos.get("treeData"))e.setMaster(!1),s&&(e.expanded=!1);else{if(this.gos.get("masterDetail")){const i=this.gos.get("isRowMaster");i?e.setMaster(i(t)):e.setMaster(!0)}else e.setMaster(!1);if(s){const t=this.funcColsService.getRowGroupColumns(),s=i+(t?t.length:0);e.expanded=!!e.master&&this.isExpanded(s)}}}isExpanded(e){const t=this.gos.get("groupDefaultExpanded");return-1===t||e<t}};var kc="32.3.3",Nc={version:kc,moduleName:"@ag-grid-community/client-side-row-model-core",rowModel:"clientSide",beans:[class extends ze{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=f(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}wireBeans(e){this.beans=e,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.selectionService=e.selectionService,this.valueCache=e.valueCache,this.environment=e.environment,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggregationStage=e.aggregationStage,this.pivotStage=e.pivotStage,this.filterAggregatesStage=e.filterAggregatesStage}postConstruct(){const e=this.refreshModel.bind(this,{step:"group"}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new Yn(this.beans),this.nodeManager=new Fc(this.rootNode,this.gos,this.eventService,this.funcColsService,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),n=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),o=new Set([]),a=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),l=[...e,...t,...i,...s,...s,...n,...r,...o,...a];this.addManagedPropertyListeners(l,(l=>{const h=l.changeSet?.properties;if(!h)return;const c=e=>h.some((t=>e.has(t)));c(e)?this.setRowData(this.rootNode.allLeafChildren.map((e=>e.data))):c(t)?this.refreshModel({step:"group"}):c(i)?this.refreshModel({step:"filter"}):c(s)?this.refreshModel({step:"pivot"}):c(n)?this.refreshModel({step:"aggregate"}):c(r)?this.refreshModel({step:"sort"}):c(o)?this.refreshModel({step:"filter_aggregates"}):c(a)&&this.refreshModel({step:"map"})})),this.addManagedPropertyListener("rowHeight",(()=>
2this.resetRowHeights()))}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){const e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,t,i,s){let n,r=!1;do{n=!1;const o=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(o,i),h=Math.min(a,s);for(let e=l;e<=h;e++){const t=this.getRow(e);if(t.rowHeightEstimated){const e=B(this.gos,t);t.setRowHeight(e.height),n=!0,r=!0}}n&&this.setRowTopAndRowIndex()}while(n);return r}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const i=new Set,s=k(this.gos,"normal");for(let n=0;n<this.rowsToDisplay.length;n++){const r=this.rowsToDisplay[n];if(null!=r.id&&i.add(r.id),null==r.rowHeight){const t=B(this.gos,r,s,e);r.setRowHeight(t.height,t.estimated)}r.setRowTop(t),r.setRowIndex(n),t+=r.rowHeight}return i}clearRowTopAndRowIndex(e,t){const i=e.isActive(),s=e=>{e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},n=e=>{if(s(e),s(e.detailNode),s(e.sibling),e.hasChildren()&&e.childrenAfterGroup){const t=-1==e.level;i&&!t&&!e.expanded||e.childrenAfterGroup.forEach(n)}};n(this.rootNode)}ensureRowsAtPixel(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.getRowIndexAtPixel(t),n=this.getRow(s),r=!this.gos.get("suppressAnimationFrame");if(n===e[0])return!1;const o=this.rootNode.allLeafChildren;return e.forEach((e=>{Me(o,e)})),e.forEach(((e,t)=>{De(o,e,Math.max(s+i,0)+t)})),e.forEach(((e,t)=>{e.sourceRowIndex=t})),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:r,rowNodesOrderChanged:!0}),!0}highlightRowAtPixel(e,t){const i=null!=t?this.getRowIndexAtPixel(t):null,s=null!=i?this.getRow(i):null;if(!s||!e||null==t)return void this.clearHighlightedRow();const n=this.getHighlightPosition(t,s),r=this.isHighlightingCurrentPosition(e,s,n),o=null!=this.lastHighlightedRow&&this.lastHighlightedRow!==s;(r||o)&&(this.clearHighlightedRow(),r)||(s.setHighlighted(n),this.lastHighlightedRow=s)}getHighlightPosition(e,t){if(!t){const i=this.getRowIndexAtPixel(e);if(!(t=this.getRow(i||0)))return 1}const{rowTop:i,rowHeight:s}=t;return e-i<s/2?0:1}getLastHighlightedRowNode(){return this.lastHighlightedRow}isHighlightingCurrentPosition(e,t,i){if(e===t)return!0;const s=0===i?-1:1;return this.getRow(t.rowIndex+s)===e}clearHighlightedRow(){this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(0===this.rowsToDisplay.length)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;const e=this.rootNode.childrenAfterAggFilter,t=this.rootNode.sibling?1:0;return(e?e.length:0)+t}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let t=e;if(this.rowsToDisplay[0].footer){if(0===e)return 0;t-=1}const i=this.rowsToDisplay[this.rowsToDisplay.length-1],s=t>=this.rootNode.childrenAfterSort.length;if(i.footer&&s)return i.rowIndex;let n=this.rootNode.childrenAfterSort[t];if(this.gos.get("groupHideOpenParents"))for(;n.expanded&&n.childrenAfterSort&&n.childrenAfterSort.length>0;)n=n.childrenAfterSort[0];return n.rowIndex}getRowBounds(e){if(b(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=Y(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=Y(this.gos),i=0===e.columns.length||e.columns.some((e=>e.isPrimary()))?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=Y(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}createChangePath(e){const t=x(e),i=new pc(!1,this.rootNode);return t&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;if(null==e.rowNodeTransactions)return!1;const t=e.rowNodeTransactions.filter((e=>null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0));return null==t||0==t.length}buildRefreshModelParams(e){let t="group";const i={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",filter_aggregates:"filter_aggregates",sort:"sort",pivot:"pivot",nothing:"nothing"};
2if(w(e)&&(t=i[e]),b(t))return void c(`invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`);return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")}}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.isChangeEventsDispatching())return;const t="object"===typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!t)return;if(this.isSuppressModelUpdateAfterUpdateTransaction(t))return;const i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case"group":this.doRowGrouping(t.rowNodeTransactions,i,!!t.rowNodesOrderChanged,!!t.afterColumnsChanged);case"filter":this.doFilter(i);case"pivot":this.doPivot(i);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(t.rowNodeTransactions,i);case"map":this.doRowsToDisplay()}const s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,s),this.isRefreshingModel=!1,this.eventService.dispatchEvent({type:"modelUpdated",animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack})}isEmpty(){const e=b(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return b(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return w(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!1,s=!1;const n=[],r=ve(this.gos);return this.forEachNodeAfterFilterAndSort((o=>{if(s)return;if(i&&(o===t||o===e)&&(s=!0,o.group&&r))return void n.push(...o.allLeafChildren);if(!i){if(o!==t&&o!==e)return;i=!0}(!o.group||!r)&&n.push(o)})),n}setDatasource(e){c("should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return-1;let t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;if(Se(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let s=-1,n=-1;for(;;){const r=Math.floor((t+i)/2),o=this.rowsToDisplay[r];if(this.isRowInPixel(o,e))return r;o.rowTop<e?t=r+1:o.rowTop>e&&(i=r-1);if(s===t&&n===i)return r;s=t,n=i}}isRowInPixel(e,t){const i=e.rowTop,s=e.rowTop+e.rowHeight;return i<=t&&s>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach(((t,i)=>e(t,i)))}forEachNode(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:t})}forEachPivotNode(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){const{nodes:t,callback:i,recursionType:s,includeFooterNodes:n}=e;let{index:r}=e;const o=e=>{const s=t[0]?.parent;if(!s)return;const o=n&&X(this.gos),a=J(this.gos),l=n&&a({node:s});s===this.rootNode?o===e&&(s.createFooter(),i(s.sibling,r++)):l===e&&(s.createFooter(),i(s.sibling,r++))};o("top");for(let a=0;a<t.length;a++){const e=t[a];if(i(e,r++),e.hasChildren()&&!e.footer){let t=null;switch(s){case 0:t=e.childrenAfterGroup;break;case 1:t=e.childrenAfterAggFilter;break;case 2:t=e.childrenAfterSort;break;case 3:t=e.leafGroup?null:e.childrenAfterSort}t&&(r=this.recursivelyWalkNodesAndCallback({nodes:[...t],callback:i,recursionType:s,index:r,includeFooterNodes:n}))}}return o("bottom"),r}doAggregate(e){this.aggregationStage?.execute({rowNode:this.rootNode,changedPath:e})}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(e){const t=this.gos.get("treeData"),i=this.columnModel.isPivotActive(),s=n=>
vendor: 13,216 bytes, line 2
2{n&&n.forEach((n=>{const r=()=>{n.expanded=e,s(n.childrenAfterGroup)};if(t){return void(w(n.childrenAfterGroup)&&r())}if(i){return void(!n.leafGroup&&r())}n.group&&r()}))};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"}),this.eventService.dispatchEvent({type:"expandOrCollapseAll",source:e?"expandAll":"collapseAll"})}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,s){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodesOrderChanged:i,changedPath:t}):this.groupStage.execute({rowNode:this.rootNode,changedPath:t,afterColumnsChanged:s}),ve(this.gos)){this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",t)&&this.eventService.dispatchEvent({type:"selectionChanged",source:"rowGroupChanged"})}}else{const e=this.rootNode,t=e.sibling;e.childrenAfterGroup=e.allLeafChildren,t&&(t.childrenAfterGroup=e.childrenAfterGroup),this.rootNode.updateHasChildren()}this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getNodeManager(){return this.nodeManager}getRowNode(e){if("string"==typeof e&&0==e.indexOf(Yn.ID_PREFIX_ROW_GROUP)){let t;return this.forEachNode((i=>{i.id===e&&(t=i)})),t}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];const e=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout((()=>{this.isAlive()&&this.executeBatchUpdateRowData()}),e)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();const e=[],t=[];let i=!1;this.rowDataTransactionBatch?.forEach((s=>{const{rowNodeTransaction:n,rowsInserted:r}=this.nodeManager.updateRowData(s.rowDataTransaction);r&&(i=!0),t.push(n),s.callback&&e.push(s.callback.bind(null,n))})),this.commonUpdateRowData(t,i),e.length>0&&window.setTimeout((()=>{e.forEach((e=>e()))}),0),t.length>0&&this.eventService.dispatchEvent({type:"asyncTransactionsFlushed",results:t}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e){this.valueCache.onDataChanged();const{rowNodeTransaction:t,rowsInserted:i}=this.nodeManager.updateRowData(e);return this.commonUpdateRowData([t],i),t}afterImmutableDataChange(e,t){this.commonUpdateRowData([e],t)}commonUpdateRowData(e,t){if(!this.hasStarted)return;const i=!this.gos.get("suppressAnimationFrame");this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodesOrderChanged:t,keepRenderedRows:!0,keepEditingRows:!0,animate:i})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode((t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0})),e}onGridStylesChanges(e){if(e.rowHeightChanged){if(this.columnModel.isAutoRowHeightActive())return;this.resetRowHeights()}}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.clearHighlightedRow()}},class extends ze{constructor(){super(...arguments),this.beanName="filterStage"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const i=(t,i)=>{t.hasChildren()?t.childrenAfterFilter=e&&!i?t.childrenAfterGroup.filter((e=>{const t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,i=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||i})):t.childrenAfterGroup:t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const e=(t,s)=>{if(t.childrenAfterGroup)for(let n=0;n<t.childrenAfterGroup.length;n++){const r=t.childrenAfterGroup[n],o=s||this.filterManager.doesRowPassFilter({rowNode:r});r.childrenAfterGroup?e(t.childrenAfterGroup[n],o):i(r,o)}i(t,s)},s=t=>e(t,!1);t.executeFromRootNode(s)}else{const e=e=>i(e,!1);t.forEachChangedNodeDepthFirst(e,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},class extends ze{constructor(){super(...arguments),this.beanName="sortStage"}wireBeans(e){this.sortService=e.sortService,this.sortController=e.sortController}execute(e){const t=this.sortController.getSortOptions(),i=w(t)&&t.length>0,s=i&&w(e.rowNodeTransactions)&&this.gos.get("deltaSort"),n=t.some((e=>q(this.gos)?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup));this.sortService.sort(t,i,s,e.rowNodeTransactions,e.changedPath,n)}},class extends ze{constructor(){super(...arguments),this.beanName="flattenStage"}wireBeans(e){this.beans=e,this.columnModel=e.columnModel}execute(e){const t=e.rowNode,i=[],s=this.columnModel.isPivotMode(),n=s&&t.leafGroup,r=n?[t]:t.childrenAfterSort,o=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(o,r,i,s,0);if(!n&&i.length>0&&o.grandTotalRow){t.createFooter();const e="top"===o.grandTotalRow;this.addRowNodeToRowsToDisplay(o,t.sibling,i,0,e)}return i}getFlattenDetails(){const e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:ee(this.gos),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:X(this.gos),groupTotalRow:J(this.gos)}}recursivelyAddToRowsToDisplay(e,t,i,s,n){if(!x(t))for(let r=0;r<t.length;r++){const o=t[r],a=o.hasChildren(),l=s&&!a,h=e.groupRemoveSingleChildren&&a&&1===o.childrenAfterGroup.length,c=e.groupRemoveLowestSingleChildren&&a&&o.leafGroup&&1===o.childrenAfterGroup.length,d=s&&o.leafGroup,u=e.hideOpenParents&&o.expanded&&!o.master&&!d;if(!l&&!u&&!h&&!c&&this.addRowNodeToRowsToDisplay(e,o,i,n),!s||!o.leafGroup)if(a){const t=h||c;if(o.expanded||t){const r=e.groupTotalRow({node:o});r||o.destroyFooter();const a=t?n:n+1;"top"===r&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,a)),this.recursivelyAddToRowsToDisplay(e,o.childrenAfterSort,i,s,a),"bottom"===r&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,a))}}else if(o.master&&o.expanded){const t=this.createDetailNode(o);this.addRowNodeToRowsToDisplay(e,t,i,n)}}}addRowNodeToRowsToDisplay(e,t,i,s,n){n?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:s)}createDetailNode(e){if(w(e.detailNode))return e.detailNode;const t=new Yn(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,w(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}},class extends ze{constructor(){super(...arguments),this.beanName="sortService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.rowNodeSorter=e.rowNodeSorter,this.showRowGroupColsService=e.showRowGroupColsService}sort(e,t,i,s,n,r){const o=this.gos.get("groupMaintainOrder"),a=this.columnModel.getCols().some((e=>e.isRowGroupActive()));let l={};i&&s&&(l=this.calculateDirtyNodes(s));const h=this.columnModel.isPivotMode(),c=this.gos.getCallback("postSortRows"),d=s=>{this.pullDownGroupDataForHideOpenParents(s.childrenAfterAggFilter,!0);const d=h&&s.leafGroup;if(o&&a&&!s.leafGroup&&!r){const e=this.funcColsService.getRowGroupColumns()?.[s.level+1],t=null===e?.getSort(),i=s.childrenAfterAggFilter.slice(0);if(s.childrenAfterSort&&!t){const e={};s.childrenAfterSort.forEach(((t,i)=>{e[t.id]=i})),i.sort(((t,i)=>(e[t.id]??0)-(e[i.id]??0)))}s.childrenAfterSort=i}else s.childrenAfterSort=!t||d?s.childrenAfterAggFilter.slice(0):i?this.doDeltaSort(s,l,n,e):this.rowNodeSorter.doFullSort(s.childrenAfterAggFilter,e);if(s.sibling&&(s.sibling.childrenAfterSort=s.childrenAfterSort),this.updateChildIndexes(s),c){const e={nodes:s.childrenAfterSort};c(e)}};n&&n.forEachChangedNodeDepthFirst(d),this.updateGroupDataForHideOpenParents(n)}calculateDirtyNodes(e){const t={},i=e=>{e&&e.forEach((e=>t[e.id]=!0))};return e&&e.forEach((e=>{i(e.add),i(e.update),i(e.remove)})),t}doDeltaSort(e,t,i,s){const n=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(n,s);const o={},a=[];n.forEach((e=>{t[e.id]||!i.canSkip(e)?a.push(e):o[e.id]=!0}));const l=r.filter((e=>o[e.id])),h=(e,t)=>({currentPos:t,rowNode:e}),c=a.map(h).sort(((e,t)=>this.rowNodeSorter.compareRowNodes(s,e,t)));return this.mergeSortedArrays(s,c,l.map(h)).map((e=>{let{rowNode:t}=e;return t}))}mergeSortedArrays(e,t,i){const s=[];let n=0,r=0;for(;n<t.length&&r<i.length;){this.rowNodeSorter.compareRowNodes(e,t[n],i[r])<0?s.push(t[n++]):s.push(i[r++])}for(;n<t.length;)s.push(t[n++]);for(;r<i.length;)s.push(i[r++]);return s}updateChildIndexes(e){if(b(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let i=0;i<t.length;i++){const s=t[i],n=0===i,r=i===e.childrenAfterSort.length-1;s.setFirstChild(n),s.setLastChild(r),s.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return h("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;const t=e=>{this.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach((e=>{e.hasChildren()&&t(e)}))};e&&e.executeFromRootNode((e=>t(e)))}pullDownGroupDataForHideOpenParents(e,t){this.gos.get("groupHideOpenParents")&&!b(e)&&e.forEach((e=>{(this.showRowGroupColsService?.getShowRowGroupCols()??[]).forEach((i=>{const s=i.getColDef().showRowGroup;if("string"!==typeof s)return void c("groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");const n=s,r=this.columnModel.getColDefCol(n);if(!(r===e.rowGroupColumn))if(t)e.setGroupValue(i.getId(),void 0);else{const t=this.getFirstChildOfFirstChild(e,r);t&&e.setGroupValue(i.getId(),t.key)}}))}))}getFirstChildOfFirstChild(e,t){let i=e;for(;i;){const e=i.parent;if(!e||!i.firstChild)return null;if(e.rowGroupColumn===t)return e;i=e}return null}},class extends ze{constructor(){super(...arguments),this.beanName="immutableService"}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){L(this.gos)&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",(()=>this.onRowDataUpdated())))}isActive(){const e=this.gos.exists("getRowId");return!this.gos.get("resetRowDataOnUpdate")&&e}setRowData(e){const t=this.createTransactionForRowData(e);if(!t)return;const i=this.clientSideRowModel.getNodeManager(),{rowNodeTransaction:s,rowsInserted:n}=i.updateRowData(t);let r=!1;this.gos.get("suppressMaintainUnsortedOrder")||(r=i.updateRowOrderFromRowData(e)),this.clientSideRowModel.afterImmutableDataChange(s,r||n)}createTransactionForRowData(e){if(!L(this.gos))return c("ImmutableService only works with ClientSideRowModel"),null;const t=ie(this.gos);if(null==t)return c("ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!"),null;const i=this.clientSideRowModel.getNodeManager().getCopyOfNodesMap(),s=[],n=[],r=[];return w(e)&&e.forEach((e=>{const s=t({data:e,level:0}),o=i[s];if(o){o.data!==e&&n.push(e),i[s]=void 0}else r.push(e)})),et(i,((e,t)=>{t&&s.push(t.data)})),{remove:s,update:n,add:r}}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}}]},Oc={version:kc,moduleName:"@ag-grid-community/client-side-row-model",dependantModules:[Nc,{version:kc,moduleName:"@ag-grid-community/client-side-row-model-api",beans:[Rc],apiFunctions:{onGroupExpandedOrCollapsed:function(e){e.expansionService.onGroupExpandedOrCollapsed()},refreshClientSideRowModel:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.refreshModel(t)},isRowDataEmpty:function(e){return e.rowModelHelperService?.getClientSideRowModel()?.isEmpty()??!0}
2,forEachLeafNode:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachLeafNode(t)},forEachNodeAfterFilter:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachNodeAfterFilter(t)},forEachNodeAfterFilterAndSort:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachNodeAfterFilterAndSort(t)},resetRowHeights:function(e){e.columnModel.isAutoRowHeightActive()?h("calling gridApi.resetRowHeights() makes no sense when using Auto Row Height."):e.rowModelHelperService?.getClientSideRowModel()?.resetRowHeights()},applyTransaction:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.rowModelHelperService?.getClientSideRowModel()?.updateRowData(t)))},applyTransactionAsync:function(e,t,i){e.frameworkOverrides.wrapIncoming((()=>e.rowModelHelperService?.getClientSideRowModel()?.batchUpdateRowData(t,i)))},flushAsyncTransactions:function(e){e.frameworkOverrides.wrapIncoming((()=>e.rowModelHelperService?.getClientSideRowModel()?.flushAsyncTransactions()))},getBestCostNodeSelection:function(e){return e.selectionService.getBestCostNodeSelection()}},dependantModules:[Nc,Ec]}]},Gc=class extends ze{setBeans(e){this.beans=e}getFileName(e){const t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},Bc=class{constructor(e){this.groupColumns=[];const{columnModel:t,funcColsService:i,columnNameService:s,valueService:n,gos:r,processCellCallback:o,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:h}=e;this.columnModel=t,this.funcColsService=i,this.columnNameService=s,this.valueService=n,this.gos=r,this.processCellCallback=o,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=h}prepare(e){this.groupColumns=e.filter((e=>!!e.getColDef().showRowGroup))}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,i,s,n){const r=this.gos.get("groupHideOpenParents")&&!n.footer||!this.shouldRenderGroupSummaryCell(n,e,t)?this.valueService.getValue(e,n):this.createValueForGroupNode(e,n);return this.processCell({accumulatedRowIndex:i,rowNode:n,column:e,value:r,processCellCallback:this.processCellCallback,type:s})}shouldRenderGroupSummaryCell(e,t,i){if(!(e&&e.group))return!1;if(-1!==this.groupColumns.indexOf(t)){const i=e.groupData?.[t.getId()],s=this.gos.get("suppressGroupMaintainValueType");if(s&&null!=i||!s&&void 0!==i)return!0;if(F(this.gos)&&e.group)return!0;if(e.footer&&-1===e.level){const e=t.getColDef();return null==e||!0===e.showRowGroup||e.showRowGroup===this.funcColsService.getRowGroupColumns()[0].getId()}}const s=te(this.gos,this.columnModel.isPivotMode());return 0===i&&s}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnNameService.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:t}));const i=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType"),n=t=>{if(i||s)return t.key;const n=t.groupData?.[e.getId()];return n&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport?this.valueService.formatValue(t.rowGroupColumn,t,n)??n:n},r=t.footer,o=[n(t)];if(!ee(this.gos))for(;t.parent;)t=t.parent,o.push(n(t));const a=o.reverse().join(" -> ");return r?`Total ${a}`:a}processCell(e){const{accumulatedRowIndex:t,rowNode:i,column:s,value:n,processCellCallback:r,type:o}=e;return r?{value:r(this.gos.addGridCommonParams({accumulatedRowIndex:t,column:s,node:i,value:n,type:o,parseValue:e=>this.valueService.parseValue(s,i,e,this.valueService.getValue(s,i)),formatValue:e=>this.valueService.formatValue(s,i,e)??e}))??""}:!1!==s.getColDef().useValueFormatterForExport?{value:n??"",valueFormatted:this.valueService.formatValue(s,i,n)}:{value:n??""}}},Vc=class{static download(e,t){const i=document.defaultView||window;if(!i)return void h("There is no `window` associated with the current `document`");const s=document.createElement("a"),n=i.URL.createObjectURL(t);s.setAttribute("href",n),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(s),i.setTimeout((()=>{i.URL.revokeObjectURL(n)}),0)}},zc=class extends Bc{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&("string"===typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach((e=>{this.beginNewLine(),e.forEach(((e,t)=>{0!==t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||""),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)}))})))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,s){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){0!=t&&(this.result+=this.columnSeparator);const s=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(s.valueFormatted??s.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(null===e||void 0===e)return'""';let t;"string"===typeof e?t=e:"function"===typeof e.toString?t=e.toString():(h("unknown value type during csv conversion"),t="");return'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}};var Hc=(e=>(e[e.HEADER_GROUPING=0]="HEADER_GROUPING",e[e.HEADER=1]="HEADER",e[e.BODY=2]="BODY",e))(Hc||{}),Wc="32.3.3",jc={version:Wc,moduleName:"@ag-grid-community/csv-export-core",beans:[class extends Gc{constructor(){super(...arguments),this.beanName="
2csvCreator"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.gridSerializer=e.gridSerializer}postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed())return void h("Export cancelled. Export is not allowed as per your configuration.");const t=this.getMergedParams(e),i=this.getData(t),s=new Blob(["\ufeff",i],{type:"text/plain"}),n="function"===typeof t.fileName?t.fileName(this.gos.getGridCommonParams()):t.fileName;Vc.download(this.getFileName(n),s)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e){const t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?Object.assign({},e):this.getMergedParams(e);return this.getData(t)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{columnModel:t,columnNameService:i,funcColsService:s,valueService:n,gos:r}=this,{processCellCallback:o,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:h,suppressQuotes:c,columnSeparator:d}=e;return new zc({columnModel:t,columnNameService:i,funcColsService:s,valueService:n,gos:r,processCellCallback:o||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:h||void 0,suppressQuotes:c||!1,columnSeparator:d||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}},class extends ze{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.selectionService=e.selectionService,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController}serialize(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{allColumns:i,columnKeys:s,skipRowGroups:n}=t,r=this.getColumnsToExport(i,n,s);return C(this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t))(e).parse()}processRow(e,t,i,s){const n=t.shouldRowBeSkipped||(()=>!1),r=this.gos.get("groupRemoveSingleChildren"),o=this.gos.get("groupRemoveLowestSingleChildren"),a=null!=t.rowPositions||!!t.onlySelected,l=this.gos.get("groupHideOpenParents")&&!a,h=this.columnModel.isPivotMode()?s.leafGroup:!s.group,c=!!s.footer,d=o&&s.leafGroup,u=1===s.allChildrenCount&&1===s.childrenAfterGroup?.length&&(r||d);if(!h&&!c&&(t.skipRowGroups||u||l)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&"top"===s.rowPinned||t.skipPinnedBottom&&"bottom"===s.rowPinned)return;if(-1===s.level&&!h&&!c)return;if(n(this.gos.addGridCommonParams({node:s})))return;const p=e.onNewBodyRow(s);if(i.forEach(((e,t)=>{p.onColumn(e,t,s)})),t.getCustomContentBelowRow){const i=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:s}));i&&e.addCustomContent(i)}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){const s=new Ot,n=this.visibleColsService.createGroups({columns:t,idCreator:s,pinned:null,isStandaloneStructure:!0});this.recursivelyAddHeaderGroups(n,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){const e=i.onNewHeaderRow();t.forEach(((t,i)=>{e.onColumn(t,i,void 0)}))}return i}}processPinnedTopRows(e,t){return i=>{const s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter((e=>"top"===e.rowPinned)).sort(((e,t)=>e.rowIndex-t.rowIndex)).map((e=>this.pinnedRowModel.getPinnedTopRow(e.rowIndex))).forEach(s):this.pinnedRowModel.forEachPinnedRow("top",s),i}}processRows(e,t){return i=>{const s=this.rowModel,n=L(this.gos),r=F(this.gos),o=!n&&e.onlySelected,a=this.processRow.bind(this,i,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter((e=>null==e.rowPinned)).sort(((e,t)=>e.rowIndex-t.rowIndex)).map((e=>
vendor: 14,062 bytes, line 2
2s.getRow(e.rowIndex))).forEach(a);else if(this.columnModel.isPivotMode())n?s.forEachPivotNode(a,!0):r?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);else if(e.onlySelectedAllPages||o){const e=this.selectionService.getSelectedNodes();this.replicateSortedOrder(e),e.forEach(a)}else"all"===l?s.forEachNode(a):n||r?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);return i}}replicateSortedOrder(e){const t=this.sortController.getSortOptions(),i=(e,s)=>null!=e.rowIndex&&null!=s.rowIndex?e.rowIndex-s.rowIndex:e.level===s.level?e.parent?.id===s.parent?.id?this.rowNodeSorter.compareRowNodes(t,{rowNode:e,currentPos:e.rowIndex??-1},{rowNode:s,currentPos:s.rowIndex??-1}):i(e.parent,s.parent):e.level>s.level?i(e.parent,s):i(e,s.parent);e.sort(i)}processPinnedBottomRows(e,t){return i=>{const s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter((e=>"bottom"===e.rowPinned)).sort(((e,t)=>e.rowIndex-t.rowIndex)).map((e=>this.pinnedRowModel.getPinnedBottomRow(e.rowIndex))).forEach(s):this.pinnedRowModel.forEachPinnedRow("bottom",s),i}}getColumnsToExport(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;const s=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getColsForKeys(i);const n=this.gos.get("treeData");let r=[];return r=e&&!s?this.columnModel.getCols():this.visibleColsService.getAllCols(),t&&!n&&(r=r.filter((e=>Ze(e)||qe(e)))),r}recursivelyAddHeaderGroups(e,t,i){const s=[];e.forEach((e=>{const t=e;t.getChildren&&t.getChildren().forEach((e=>s.push(e)))})),e.length>0&&kt(e[0])&&this.doAddHeaderHeader(t,e,i),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,i)}doAddHeaderHeader(e,t,i){const s=e.onNewHeaderGroupingRow();let n=0;t.forEach((e=>{const t=e;let r;r=i?i(this.gos.addGridCommonParams({columnGroup:t})):this.columnNameService.getDisplayNameForColumnGroup(t,"header");const o=t.getLeafColumns().reduce(((e,t,i,s)=>{let n=Se(e);return"open"===t.getColumnGroupShow()?n&&null==n[1]||(n=[i],e.push(n)):n&&null==n[1]&&(n[1]=i-1),i===s.length-1&&n&&null==n[1]&&(n[1]=i),e}),[]);s.onColumn(t,r||"",n++,t.getLeafColumns().length-1,o)}))}}]},Uc={version:Wc,moduleName:"@ag-grid-community/csv-export",dependantModules:[jc,{version:Wc,moduleName:"@ag-grid-community/csv-export-api",apiFunctions:{getDataAsCsv:function(e,t){return e.csvCreator?.getDataAsCsv(t)},exportDataAsCsv:function(e,t){e.csvCreator?.exportDataAsCsv(t)}},dependantModules:[jc]}]},_c="\r\n";function Kc(e,t,i){if(!t&&""!==t&&0!==t)return"";let s=t;return"boolean"===typeof t&&i&&(s=i(t)),` ${e}="${s}"`}var $c=class{static createHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["version"];e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone");return`<?xml ${t.map((t=>`${t}="${e[t]}"`)).join(" ")} ?>`}static createXml(e,t){let i="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach((e=>{Object.keys(e.map).forEach((s=>{i+=Kc(e.prefix+s,e.map[s],t)}))})),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach((s=>{i+=Kc(s,e.properties.rawMap[s],t)})));let s="<"+e.name+i;return e.children||null!=e.textNode?null!=e.textNode?s+">"+e.textNode+"</"+e.name+">"+_c:(s+=">\r\n",e.children&&e.children.forEach((e=>{s+=this.createXml(e,t)})),s+"</"+e.name+">"+_c):s+"/>"+_c}},Yc=async e=>{const t=new Blob([e]),{size:i,content:s}=await(async e=>{let t=0;const i=[],s=new WritableStream({write:e=>{i.push(e),t+=e.length}}),n=new ReadableStream({start:t=>{const i=new FileReader;i.onload=e=>{e.target?.result&&t.enqueue(e.target.result),t.close()},i.readAsArrayBuffer(e)}}),r=new window.CompressionStream("deflate-raw");return await n.pipeThrough(r).pipeTo(s),{size:t,content:new Blob(i)}})(t);return{size:i,content:new Uint8Array(await s.arrayBuffer())}};function Zc(e,t){let i="";for(let s=0;s<t;s++)i+=String.fromCharCode(255&e),e>>>=8;return i}var qc=e=>{if(!e.length)return 0;let t=~0,i=0,s=0,n=0;for(let r=0;r<e.length;r++)i=e[r],s=255&(t^i),n=Xc[s],t=t>>>8^n;return~t},Qc=e=>e.length?qc("string"===typeof e?(new TextEncoder).encode(e):e):0,Xc=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),Jc=(e,t,i,s,n,r)=>{const{content:o,path:a,created:l}=e,h=(e=>{let t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|=e.getSeconds()/2,t})(l),c=(e=>{let t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|=e.getDate(),t})(l),d=Qc(n),u=void 0!==r?r:s,p=Et(a),g=p!==a;let m="";if(g){const e=Zc(1,1)+Zc(Qc(p),4)+p;m="up"+Zc(e.length,2)+e}const f="\x14\0"+(g?"\0\b":"\0\0")+Zc(t?8:0,2)+Zc(h,2)+Zc(c,2)+Zc(u?d:0,4)+Zc(r??s,4)+Zc(s,4)+Zc(p.length,2)+Zc(m.length,2),v="PK\x03\x04"+f+p+m,y="PK\x01\x02\x14\0"+f+"\0\0\0\0\0\0"+(o?"\0\0\0\0":"\x10\0\0\0")+Zc(i,4)+p+m;return{localFileHeader:Uint8Array.from(v,(e=>e.charCodeAt(0))),centralDirectoryHeader:Uint8Array.from(y,(e=>e.charCodeAt(0)))}},ed=e=>{let t;if("string"===typeof e){const i=atob(e.split(";base64,")[1]);t=Uint8Array.from(i,(e=>e.charCodeAt(0)))}else t=e;return{size:t.length,content:t}},td=async(e,t)=>{const{content:i}=e,{size:s,content:n}=i?ed(i):{size:0,content:Uint8Array.from([])};let r,o,a=!1;if("file"===e.type&&n&&s>0){const e=await Yc(n);r=e.content,o=e.size,a=!0}return{...Jc(e,a,t,s,n,o),content:r||n,isCompressed:a}},id=(e,t)=>{const{content:i}=e,{content:s}=i?ed(i):{content:Uint8Array.from([])};return{...Jc(e,!1,t,s.length,s,void 0),content:s,isCompressed:!1}},sd=class{static addFolders(e){e.forEach(this.addFolder.bind(this))}static addFolder(e){this.folders.push({path:e,created:new Date,isBase64:!1,type:"folder"})}static addFile(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.files.push({path:e,created:new Date,content:i?t:(new TextEncoder).encode(t),isBase64:i,type:"file"})}static async getZipFile(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"application/zip";const t=await this.buildCompressedFileStream();return this.clearStream(),new Blob([t],{type:e})}static getUncompressedZipFile(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"application/zip";const t=this.buildFileStream();return this.clearStream(),new Blob([t],{type:e})}static clearStream(){this.folders=[],this.files=[]}static packageFiles(e){let t=0,i=0;for(const h of e){const{localFileHeader:e,centralDirectoryHeader:s,content:n}=h;t+=e.length+n.length,i+=s.length}const s=new Uint8Array(t),n=new Uint8Array(i);let r=0,o=0;for(const h of e){const{localFileHeader:e,centralDirectoryHeader:t,content:i}=h;s.set(e,r),r+=e.length,s.set(i,r),r+=i.length,n.set(t,o),o+=t.length}const a=((e,t,i)=>{const s="PK\x05\x06\0\0\0\0"+Zc(e,2)+Zc(e,2)+Zc(t,4)+Zc(i,4)+"\0\0";return Uint8Array.from(s,(e=>e.charCodeAt(0)))})(e.length,i,t),l=new Uint8Array(s.length+n.length+a.length);return l.set(s),l.set(n,s.length),l.set(a,s.length+n.length),l}static async buildCompressedFileStream(){const e=[...this.folders,...this.files],t=[];let i=0;for(const s of e){const e=await td(s,i),{localFileHeader:n,content:r}=e;t.push(e),i+=n.length+r.length}return this.packageFiles(t)}static buildFileStream(){const e=[...this.folders,...this.files],t=[];let i=0;for(const s of e){const e=id(s,i),{localFileHeader:n,content:r}=e;t.push(e),i+=n.length+r.length}return this.packageFiles(t)}};sd.folders=[],sd.files=[];var nd=class extends Il{wireBeans(e){this.beans=e}constructor(e,t,i){super(e),this.parentCache=t,this.params=i,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}postConstruct(){this.createRowNodes()}getBlockStateJson(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}}setDataAndId(e,t,i){w(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();b(this.params.datasource.getRows)?h("datasource is missing getRows method"):window.setTimeout((()=>{this.params.datasource.getRows(e)}),0)}processServerFail(){}createLoadParams(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gos.getGridCommonParams().context}}forEachNode(e,t,i){this.rowNodes.forEach(((s,n)=>{this.startRow+n<i&&e(s,t.next())}))}getLastAccessed(){return this.lastAccessed}getRow(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(this.lastAccessed=this.params.lastAccessedSequence.next());const t=e-this.startRow;return this.rowNodes[t]}getStartRow(){return this.startRow}getEndRow(){return this.endRow}createRowNodes(){this.rowNodes=[];for(let e=0;e<this.params.blockSize;e++){const t=this.startRow+e,i=new Yn(this.beans);i.setRowHeight(this.params.rowHeight),i.uiLevel=0,i.setRowIndex(t),i.setRowTop(this.params.rowHeight*t),this.rowNodes.push(i)}}processServerResult(e){this.rowNodes.forEach(((t,i)=>{const s=e.rowData?e.rowData[i]:void 0;!t.id&&t.alreadyRendered&&s&&(this.rowNodes[i]=new Yn(this.beans),this.rowNodes[i].setRowIndex(t.rowIndex),this.rowNodes[i].setRowTop(t.rowTop),this.rowNodes[i].setRowHeight(t.rowHeight),t.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[i],s,this.startRow+i)}));const t=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroy(){this.rowNodes.forEach((e=>{e.clearRowTopAndRowIndex()})),super.destroy()}},rd=class extends ze{constructor(e){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount,this.params=e}wireBeans(e){this.rowRenderer=e.rowRenderer,this.focusService=e.focusService}getRow(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=Math.floor(e/this.params.blockSize);let s=this.blocks[i];if(!s){if(t)return;s=this.createBlock(i)}return s.getRow(e)}createBlock(e){const t=this.createBean(new nd(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t}refreshCache(){0==this.blockCount?this.purgeCache():(this.getBlocksInOrder().forEach((e=>e.setStateWaitingToLoad())),this.params.rowNodeBlockLoader.checkBlockToLoad())}destroy(){this.getBlocksInOrder().forEach((e=>this.destroyBlock(e))),super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(this.gos.get("debug")&&l(`InfiniteCache - onPageLoaded: page = ${e.getId()}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter((t=>t!=e));t.sort(((e,t)=>t.getLastAccessed()-e.getLastAccessed()));const i=this.params.maxBlocksInCache>0,s=i?this.params.maxBlocksInCache-1:null;t.forEach(((e,t)=>{if("needsLoading"===e.getState()&&t>=1||!!i&&t>=s){if(this.isBlockCurrentlyDisplayed(e))return;if(this.isBlockFocused(e))return;this.removeBlockFromCache(e)}}))}isBlockFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;const i=e.getStartRow(),s=e.getEndRow();return t.rowIndex>=i&&t.rowIndex<s}isBlockCurrentlyDisplayed(e){const t=e.getStartRow(),i=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,i)}
2removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if("number"===typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const t=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<t&&(this.rowCount=t)}}setRowCount(e,t){this.rowCount=e,w(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t=new ws;this.getBlocksInOrder().forEach((i=>i.forEachNode(e,t,this.rowCount)))}getBlocksInOrder(){return st(this.blocks).sort(((e,t)=>e.getId()-t.getId()))}destroyBlock(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventService.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];this.getBlocksInOrder().forEach((t=>{t.getId()*this.params.blockSize>=this.rowCount&&e.push(t)})),e.length>0&&e.forEach((e=>this.destroyBlock(e)))}purgeCache(){this.getBlocksInOrder().forEach((e=>this.removeBlockFromCache(e))),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const i=[];let s=-1,n=!1;const r=new ws;let o=!1;this.getBlocksInOrder().forEach((a=>{o||(n&&s+1!==a.getId()?o=!0:(s=a.getId(),a.forEachNode((s=>{const r=s===e||s===t;(n||r)&&i.push(s),r&&(n=!n)}),r,this.rowCount)))}));return o||n?[]:i}};var od="32.3.3",ad={version:od,moduleName:"@ag-grid-community/infinite-row-model-core",rowModel:"infinite",beans:[class extends ze{constructor(){super(...arguments),this.beanName="rowModel"}wireBeans(e){this.filterManager=e.filterManager,this.sortController=e.sortController,this.selectionService=e.selectionService,this.rowRenderer=e.rowRenderer,this.rowNodeBlockLoader=e.rowNodeBlockLoader}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){"infinite"===this.gos.get("rowModelType")&&(this.rowHeight=V(this.gos),this.addEventListeners(),this.addDestroyFunc((()=>this.destroyCache())),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&h("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onCacheUpdated.bind(this)}),this.addManagedPropertyListener("datasource",(()=>this.setDatasource(this.gos.get("datasource")))),this.addManagedPropertyListener("cacheBlockSize",(()=>this.resetCache())),this.addManagedPropertyListener("rowHeight",(()=>{this.rowHeight=V(this.gos),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()}))}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){let e;e=!this.cacheParams||this.isSortModelDifferent(),e&&this.reset()}isSortModelDifferent(){return!E(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]}reset(){if(!this.datasource)return;null!=ie(this.gos)||this.selectionService.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventService.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager?.getFilterModel()??{},sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:V(this.gos),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new ws},this.infiniteCache=this.createBean(new rd(this.cacheParams)),this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode((e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)})),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}
2onCacheUpdated(){this.dispatchModelUpdatedEvent()}getRow(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}getRowNode(e){let t;return this.forEachNode((i=>{i.id===e&&(t=i)})),t}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(0!==this.rowHeight){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()}setRowCount(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)}}],dependantModules:[Rl]},ld={version:od,moduleName:"@ag-grid-community/infinite-row-model",dependantModules:[ad,{version:od,moduleName:"@ag-grid-community/infinite-row-model-api",beans:[Rc],apiFunctions:{refreshInfiniteCache:function(e){e.rowModelHelperService?.getInfiniteRowModel()?.refreshCache()},purgeInfiniteCache:function(e){e.rowModelHelperService?.getInfiniteRowModel()?.purgeCache()},getInfiniteRowCount:function(e){return e.rowModelHelperService?.getInfiniteRowModel()?.getRowCount()}},dependantModules:[ad,Ac]}]};(e=>{const t=new Map})((e=>
2{if(/Color$/.test(e))return"color";if(/Scale?$/.test(e))return"scale";if("spacing"===e||/(Padding|Spacing|Size|Width|Height|Radius|Indent|Start|End|Top|Bottom|Horizontal|Vertical)$/.test(e))return"length";if(/Border$/.test(e))return"border";if(/BorderStyle$/.test(e))return"borderStyle";if(/Shadow$/.test(e))return"shadow";if(/Image$/.test(e))return"image";if(/Family$/.test(e))return"fontFamily";if(/Weight$/.test(e))return"fontWeight";if(/Duration$/.test(e))return"duration";if(/ColorScheme$/.test(e))return"colorScheme";throw new Error(`"${e}" is not a valid theme parameter.`)})),"object"!==typeof window||!window||"object"!==typeof document||(window.document,document);Ln.__registerModules([$h,Oc,ld,Uc],!1,void 0);var hd=t.createContext({}),cd=(e,t,i,s)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const n=e.newAgStackInstance();if(null==n)return;let r,o,a=!1;return n.then((e=>{a?t.destroyBean(e):(r=e,o=r.getGui(),i.appendChild(o),dd(s,r))})),()=>{a=!0,r&&(o?.parentElement?.removeChild(o),t.destroyBean(r),s&&dd(s,void 0))}},dd=(e,t)=>{if(e)if(e instanceof Function){e(t)}else{e.current=t}},ud=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.filter((e=>null!=e&&""!==e)).join(" ")},pd=class e{constructor(){this.classesMap={};for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach((e=>{this.classesMap[e]=!0}))}setClass(t,i){if(!!this.classesMap[t]==i)return this;const s=new e;return s.classesMap={...this.classesMap},s.classesMap[t]=i,s}toString(){return Object.keys(this.classesMap).filter((e=>this.classesMap[e])).join(" ")}},gd=e=>"function"===typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"===typeof e&&e.$$typeof===("function"===typeof Symbol&&Symbol.for?Symbol.for("react.memo"):60115),md=t.version?.split(".")[0],fd="16"===md||"17"===md;var vd=!1;var yd=(e,t)=>{fd||!e||vd?t():s.flushSync(t)};function Cd(e,t,i){if(null==t||null==e)return t;if(e===t||0===t.length&&0===e.length)return e;if(i||0===e.length&&t.length>0||e.length>0&&0===t.length)return t;const s=[],n=[],r=new Map,o=new Map;for(let a=0;a<t.length;a++){const e=t[a];o.set(e.instanceId,e)}for(let a=0;a<e.length;a++){const t=e[a];r.set(t.instanceId,t),o.has(t.instanceId)&&s.push(t)}for(let a=0;a<t.length;a++){const e=t[a],i=e.instanceId;r.has(i)||n.push(e)}return s.length===e.length&&0===n.length?e:0===s.length&&n.length===t.length?t:0===s.length?n:0===n.length?s:[...s,...n]}var Sd=(0,t.forwardRef)(((e,i)=>{const{ctrlsFactory:s,context:n}=(0,t.useContext)(hd),r=(0,t.useRef)(null),o=(0,t.useRef)(null),a=(0,t.useRef)(null),l=(0,t.useRef)(null),h=(0,t.useRef)(null),c=(0,t.useRef)(),[d,u]=(0,t.useState)(),[p,g]=(0,t.useState)(),[m,f]=(0,t.useState)(),[v,y]=(0,t.useState)((()=>new pd)),[C,S]=(0,t.useState)((()=>new pd("ag-hidden"))),[w,b]=(0,t.useState)((()=>new pd("ag-hidden"))),[x,M]=(0,t.useState)((()=>new pd("ag-invisible")));(0,t.useImperativeHandle)(i,(()=>({refresh:()=>!1}))),(0,t.useLayoutEffect)((()=>cd(d,n,o.current)),[d]);const D=(0,t.useCallback)((t=>{if(r.current=t,!t)return void(c.current=n.destroyBean(c.current));const i={setInnerRenderer:(e,t)=>{u(e),f(t)},setChildCount:e=>g(e),addOrRemoveCssClass:(e,t)=>y((i=>i.setClass(e,t))),setContractedDisplayed:e=>b((t=>t.setClass("ag-hidden",!e))),setExpandedDisplayed:e=>S((t=>t.setClass("ag-hidden",!e))),setCheckboxVisible:e=>M((t=>t.setClass("ag-invisible",!e)))},o=s.getInstance("groupCellRendererCtrl");o&&(c.current=n.createBean(o),c.current.init(i,t,a.current,l.current,h.current,Sd,e))}),[]),I=(0,t.useMemo)((()=>`ag-cell-wrapper ${v.toString()}`),[v]),R=(0,t.useMemo)((()=>`ag-group-expanded ${C.toString()}`),[C]),E=(0,t.useMemo)((()=>`ag-group-contracted ${w.toString()}`),[w]),A=(0,t.useMemo)((()=>`ag-group-checkbox ${x.toString()}`),[x]),T=d&&d.componentFromFramework,P=T?d.componentClass:void 0,L=null==d&&null!=m,F=At(m,!0);return t.createElement("span",{className:I,ref:D,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},t.createElement("span",{className:R,ref:l}),t.createElement("span",{className:E,ref:h}),t.createElement("span",{className:A,ref:a}),t.createElement("span",{className:"ag-group-value",ref:o},L&&t.createElement(t.Fragment,null,F),T&&t.createElement(P,{...d.params})),t.createElement("span",{className:"ag-group-child-count"},p))})),wd=Sd,bd=(0,t.createContext)({setMethods:()=>{}}),xd=(0,t.memo)((e=>{const{initialProps:i,addUpdateCallback:s,CustomComponentClass:n,setMethods:r}=e,[{key:o,...a},l]=(0,t.useState)(i);return(0,t.useEffect)((()=>{s((e=>l(e)))}),[]),t.createElement(bd.Provider,{value:{setMethods:r}},t.createElement(n,{key:o,...a}))})),Md=0;function Dd(){return"agPortalKey_"+ ++Md}var Id=class{constructor(e,t,i,s){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=i,this.suppressFallbackMethods=!!s,this.statelessComponent=this.isStateless(this.reactComponent),this.key=Dd(),this.portalKey=Dd(),this.instanceCreated=this.isStatelessComponent()?an.resolve(!1):new an((e=>{this.resolveInstanceCreated=e}))}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&"function"==typeof this.componentInstance.destroy&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),i=document.createElement(t||"div");return i.classList.add("ag-react-container"),e.reactContainer=i,i}
2addParentContainerStyleAndClasses(){if(this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(h('Since v31.1 "getReactContainerStyle" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle())),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses())){h('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.');this.componentInstance.getReactContainerClasses().forEach((e=>this.eParentElement.classList.add(e)))}}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return"function"===typeof Symbol&&Symbol.for}isStateless(e){return"function"===typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"===typeof e&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&null!=t[e]||this.fallbackMethodAvailable(e)}callMethod(e,t){const i=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!i)return void setTimeout((()=>this.callMethod(e,t)));const s=i[e];return s?s.apply(i,t):this.fallbackMethodAvailable(e)?this.fallbackMethod(e,t&&t[0]?t[0]:{}):void 0}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new an((e=>this.createReactComponent(e)))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=e=>{this.componentInstance=e,this.addParentContainerStyleAndClasses(),this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=(0,s.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,i){return(0,t.createElement)(e,i)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const i=this[`${e}Component`];if(!this.suppressFallbackMethods&&i)return i.bind(this)(t)}fallbackMethodAvailable(e){if(this.suppressFallbackMethods)return!1;return!!this[`${e}Component`]}};function Rd(e,t,i){e.forEach((e=>{const s=t[e];s&&(i[e]=s)}))}var Ed=class extends Id{constructor(){super(...arguments),this.awaitUpdateCallback=new an((e=>{this.resolveUpdateCallback=e})),this.wrapperComponent=xd}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then((()=>this.componentInstance))}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:e=>this.setMethods(e),addUpdateCallback:e=>{this.updateCallback=()=>(e(this.getProps()),new an((e=>{setTimeout((()=>{e()}))}))),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Rd(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new an((e=>this.awaitUpdateCallback.then((()=>{this.updateCallback().then((()=>e()))}))))}},Ad=class extends Ed{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},Td=class extends Ed{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}
2setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},Pd=class extends Ed{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:i,shake:s}=this;return e.label=t,e.icon=i,e.shake=s,e}},Ld=class extends Ed{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1}isFilterActive(){return null!=this.model}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getOptionalMethods(){return["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){!1===this.expectingNewMethods&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout((()=>{this.sourceParams.filterChangedCallback()})),this.expectingNewMethods=!1,super.setMethods(e)}updateModel(e){this.setModel(e).then((()=>this.sourceParams.filterChangedCallback()))}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,delete e.filterModifiedCallback,delete e.valueGetter,e}};function Fd(e,t){e.parentFilterInstance((i=>{(i.setModel(t)||an.resolve()).then((()=>{e.filterParams.filterChangedCallback()}))}))}var kd=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=e=>this.updateModel(e)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Rd(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),Fd(this.floatingFilterParams,e)}},Nd=class extends Ed{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),Fd(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},Od=class extends Ed{refresh(e){this.sourceParams=e,this.refreshProps()}},Gd=class extends Ed{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then((()=>this.sourceParams.onItemActivated()))}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},Bd=class extends Ed{refresh(e){this.sourceParams=e,this.refreshProps()}},Vd=class extends Ed{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},zd=class extends Ed{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function Hd(){h("As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.")}var Wd=class{constructor(e,t,i){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=i||1e3}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter((t=>t!==e)),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,i){this.portals=[...this.portals,e],this.waitForInstance(t,i),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout((()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)})),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();if(this.destroyed)t(null);else if(e.rendered())t(e);else{if(Date.now()-i>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return;window.setTimeout((()=>{this.waitForInstance(e,t,i)}))}}},jd=(0,t.memo)((e=>{let{ctrl:i}=e;const s=i.isAlive(),{context:n}=(0,t.useContext)(hd),r=s?i.getColId():void 0,[o,a]=(0,t.useState)(),l=(0,t.useRef)(),h=(0,t.useRef)(null),c=(0,t.useRef)(null),d=(0,t.useRef)(null),u=(0,t.useRef)(),p=(0,t.useRef)();
2s&&!p.current&&(p.current=new ri((()=>h.current)));const g=(0,t.useCallback)((e=>{if(h.current=e,l.current=e?n.createBean(new $t):n.destroyBean(l.current),!e||!s)return;const t={setWidth:e=>{h.current&&(h.current.style.width=e)},addOrRemoveCssClass:(e,t)=>p.current.addOrRemoveCssClass(e,t),setAriaSort:e=>{h.current&&(e?Ei(h.current,e):Ai(h.current))},setUserCompDetails:e=>a(e),getUserCompInstance:()=>u.current||void 0};i.setComp(t,e,c.current,d.current,l.current);const r=i.getSelectAllGui();c.current?.insertAdjacentElement("afterend",r),l.current.addDestroyFunc((()=>r.remove()))}),[]);(0,t.useLayoutEffect)((()=>cd(o,n,d.current,u)),[o]),(0,t.useEffect)((()=>{i.setDragSource(h.current)}),[o]);const m=(0,t.useMemo)((()=>!!(o?.componentFromFramework&&gd(o.componentClass))),[o]),f=o&&o.componentFromFramework,v=o&&o.componentClass;return t.createElement("div",{ref:g,className:"ag-header-cell","col-id":r,role:"columnheader"},t.createElement("div",{ref:c,className:"ag-header-cell-resize",role:"presentation"}),t.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},f&&m&&t.createElement(v,{...o.params}),f&&!m&&t.createElement(v,{...o.params,ref:u})))})),Ud=(0,t.memo)((e=>{let{ctrl:i}=e;const{context:s,gos:n}=(0,t.useContext)(hd),[r,o]=(0,t.useState)((()=>new pd("ag-header-cell","ag-floating-filter"))),[a,l]=(0,t.useState)((()=>new pd)),[h,c]=(0,t.useState)((()=>new pd("ag-floating-filter-button","ag-hidden"))),[d,u]=(0,t.useState)("false"),[p,g]=(0,t.useState)(),[,m]=(0,t.useState)(1),f=(0,t.useRef)(),v=(0,t.useRef)(null),y=(0,t.useRef)(null),C=(0,t.useRef)(null),S=(0,t.useRef)(null),w=(0,t.useRef)(),b=(0,t.useRef)(),x=e=>{null!=e&&w.current&&w.current(e)},M=(0,t.useCallback)((e=>{if(v.current=e,f.current=e?s.createBean(new $t):s.destroyBean(f.current),!e)return;b.current=new an((e=>{w.current=e}));const t={addOrRemoveCssClass:(e,t)=>o((i=>i.setClass(e,t))),addOrRemoveBodyCssClass:(e,t)=>l((i=>i.setClass(e,t))),setButtonWrapperDisplayed:e=>{c((t=>t.setClass("ag-hidden",!e))),u(e?"false":"true")},setWidth:e=>{v.current&&(v.current.style.width=e)},setCompDetails:e=>g(e),getFloatingFilterComp:()=>b.current?b.current:null,setMenuIcon:e=>S.current?.appendChild(e)};i.setComp(t,e,S.current,y.current,f.current)}),[]);(0,t.useLayoutEffect)((()=>cd(p,s,y.current,x)),[p]);const D=(0,t.useMemo)((()=>r.toString()),[r]),I=(0,t.useMemo)((()=>a.toString()),[a]),R=(0,t.useMemo)((()=>h.toString()),[h]),E=(0,t.useMemo)((()=>!!(p&&p.componentFromFramework&&gd(p.componentClass))),[p]),A=(0,t.useMemo)((()=>n.get("reactiveCustomComponents")),[]),T=(0,t.useMemo)((()=>{if(p){if(A){const e=new kd(p.params,(()=>m((e=>e+1))));return x(e),e}p.componentFromFramework&&Hd()}}),[p]),P=T?.getProps(),L=p&&p.componentFromFramework,F=p&&p.componentClass;return t.createElement("div",{ref:M,className:D,role:"gridcell"},t.createElement("div",{ref:y,className:I,role:"presentation"},L&&!A&&t.createElement(F,{...p.params,ref:E?()=>{}:x}),L&&A&&t.createElement(bd.Provider,{value:{setMethods:e=>T.setMethods(e)}},t.createElement(F,{...P}))),t.createElement("div",{ref:C,"aria-hidden":d,className:R,role:"presentation"},t.createElement("button",{ref:S,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))})),_d=(0,t.memo)((e=>{let{ctrl:i}=e;const{context:s}=(0,t.useContext)(hd),[n,r]=(0,t.useState)((()=>new pd)),[o,a]=(0,t.useState)((()=>new pd)),[l,h]=(0,t.useState)("false"),[c,d]=(0,t.useState)(),[u,p]=(0,t.useState)(),g=(0,t.useMemo)((()=>i.getColId()),[]),m=(0,t.useRef)(),f=(0,t.useRef)(null),v=(0,t.useRef)(null),y=(0,t.useRef)(null),C=(0,t.useRef)(),S=(0,t.useCallback)((e=>{if(f.current=e,m.current=e?s.createBean(new $t):s.destroyBean(m.current),!e)return;const t={setWidth:e=>{f.current&&(f.current.style.width=e)},addOrRemoveCssClass:(e,t)=>r((i=>i.setClass(e,t))),setHeaderWrapperHidden:e=>{const t=y.current;t&&(e?t.style.setProperty("display","none"):t.style.removeProperty("display"))},setHeaderWrapperMaxHeight:e=>{const t=y.current;t&&(null!=e?t.style.setProperty("max-height",`${e}px`):t.style.removeProperty("max-height"),t.classList.toggle("ag-header-cell-comp-wrapper-limited-height",null!=e))}
2,setUserCompDetails:e=>p(e),setResizableDisplayed:e=>{a((t=>t.setClass("ag-hidden",!e))),h(e?"false":"true")},setAriaExpanded:e=>d(e),getUserCompInstance:()=>C.current||void 0};i.setComp(t,e,v.current,y.current,m.current)}),[]);(0,t.useLayoutEffect)((()=>cd(u,s,y.current)),[u]),(0,t.useEffect)((()=>{f.current&&i.setDragSource(f.current)}),[u]);const w=(0,t.useMemo)((()=>!!(u?.componentFromFramework&&gd(u.componentClass))),[u]),b=(0,t.useMemo)((()=>"ag-header-group-cell "+n.toString()),[n]),x=(0,t.useMemo)((()=>"ag-header-cell-resize "+o.toString()),[o]),M=u&&u.componentFromFramework,D=u&&u.componentClass;return t.createElement("div",{ref:S,className:b,"col-id":g,role:"columnheader","aria-expanded":c},t.createElement("div",{ref:y,className:"ag-header-cell-comp-wrapper",role:"presentation"},M&&w&&t.createElement(D,{...u.params}),M&&!w&&t.createElement(D,{...u.params,ref:C})),t.createElement("div",{ref:v,"aria-hidden":l,className:x}))})),Kd=(0,t.memo)((e=>{let{ctrl:i}=e;const{context:s}=(0,t.useContext)(hd),{topOffset:n,rowHeight:r}=(0,t.useMemo)((()=>i.getTopAndHeight()),[]),o=i.getAriaRowIndex(),a=i.getHeaderRowClass(),[l,h]=(0,t.useState)((()=>r+"px")),[c,d]=(0,t.useState)((()=>n+"px")),u=(0,t.useRef)(null),p=(0,t.useRef)(null),[g,m]=(0,t.useState)((()=>i.getHeaderCtrls())),f=(0,t.useRef)(),v=(0,t.useRef)(null),y=(0,t.useCallback)((e=>{if(v.current=e,f.current=e?s.createBean(new $t):s.destroyBean(f.current),!e)return;const t={setHeight:e=>h(e),setTop:e=>d(e),setHeaderCtrls:(e,t,i)=>{p.current=u.current,u.current=e;const s=Cd(p.current,e,t);s!==p.current&&yd(i,(()=>m(s)))},setWidth:e=>{v.current&&(v.current.style.width=e)}};i.setComp(t,f.current,!1)}),[]),C=(0,t.useMemo)((()=>({height:l,top:c})),[l,c]),S=(0,t.useCallback)((e=>{switch(i.getType()){case vo.COLUMN_GROUP:return t.createElement(_d,{ctrl:e,key:e.instanceId});case vo.FLOATING_FILTER:return t.createElement(Ud,{ctrl:e,key:e.instanceId});default:return t.createElement(jd,{ctrl:e,key:e.instanceId})}}),[]);return t.createElement("div",{ref:y,className:a,role:"row",style:C,"aria-rowindex":o},g.map(S))})),$d=(0,t.memo)((e=>{let{pinned:i}=e;const[s,n]=(0,t.useState)(!0),[r,o]=(0,t.useState)([]),{context:a}=(0,t.useContext)(hd),l=(0,t.useRef)(null),h=(0,t.useRef)(null),c=(0,t.useRef)(),d="left"===i,u="right"===i,p=!d&&!u,g=(0,t.useCallback)((e=>{if(l.current=e,c.current=e?a.createBean(new Bo(i)):a.destroyBean(c.current),!e)return;const t={setDisplayed:n,setCtrls:e=>o(e),setCenterWidth:e=>{h.current&&(h.current.style.width=e)},setViewportScrollLeft:e=>{l.current&&(l.current.scrollLeft=e)},setPinnedContainerWidth:e=>{l.current&&(l.current.style.width=e,l.current.style.minWidth=e,l.current.style.maxWidth=e)}};c.current.setComp(t,l.current)}),[]),m=s?"":"ag-hidden",f=()=>r.map((e=>t.createElement(Kd,{ctrl:e,key:e.instanceId})));return t.createElement(t.Fragment,null,d&&t.createElement("div",{ref:g,className:"ag-pinned-left-header "+m,"aria-hidden":!s,role:"rowgroup"},f()),u&&t.createElement("div",{ref:g,className:"ag-pinned-right-header "+m,"aria-hidden":!s,role:"rowgroup"},f()),p&&t.createElement("div",{ref:g,className:"ag-header-viewport "+m,role:"presentation"},t.createElement("div",{ref:h,className:"ag-header-container",role:"rowgroup"},f())))})),Yd=(0,t.memo)((()=>{const[e,i]=(0,t.useState)((()=>new pd)),[s,n]=(0,t.useState)(),{context:r}=(0,t.useContext)(hd),o=(0,t.useRef)(null),a=(0,t.useRef)(),l=(0,t.useCallback)((e=>{if(o.current=e,a.current=e?r.createBean(new So):r.destroyBean(a.current),!e)return;const t={addOrRemoveCssClass:(e,t)=>i((i=>i.setClass(e,t))),setHeightAndMinHeight:e=>n(e)};a.current.setComp(t,e,e)}),[]),h=(0,t.useMemo)((()=>"ag-header "+e.toString()),[e]),c=(0,t.useMemo)((()=>({height:s,minHeight:s})),[s]);return t.createElement("div",{ref:l,className:h,style:c,role:"presentation"},t.createElement($d,{pinned:"left"}),t.createElement($d,{pinned:null}),t.createElement($d,{pinned:"right"}))})),Zd=(e,i)=>{(0,t.useEffect)((()=>{const t=i.current;if(t){const i=t.parentElement;if(i){const s=document.createComment(e);return i.insertBefore(s,t),()=>{i.removeChild(s)}}}}),[e])},qd=class{constructor(e,t){this.cellEditorParams=e,this.refreshPro
2ps=t,this.instanceCreated=new an((e=>{this.resolveInstanceCreated=e})),this.onValueChange=e=>this.updateValue(e),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){Rd(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then((()=>this.componentInstance))}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached"]}updateValue(e){this.value=e,this.refreshProps()}},Qd=(0,t.memo)((e=>{const[i,n]=(0,t.useState)(),{context:r,popupService:o,localeService:a,gos:l,editService:h}=(0,t.useContext)(hd);return(e=>{const i=(0,t.useRef)(e),s=(0,t.useRef)(),n=(0,t.useRef)(!1),r=(0,t.useRef)(!1),[,o]=(0,t.useState)(0);n.current&&(r.current=!0),(0,t.useEffect)((()=>(n.current||(s.current=i.current(),n.current=!0),o((e=>e+1)),()=>{r.current&&s.current?.()})),[])})((()=>{const{editDetails:t,cellCtrl:i,eParentCell:s}=e,{compDetails:c}=t,d=l.get("stopEditingWhenCellsLoseFocus"),u=r.createBean(h.createPopupEditorWrapper(c.params)),p=u.getGui();if(e.jsChildComp){const t=e.jsChildComp.getGui();t&&p.appendChild(t)}const g={column:i.getColumn(),rowNode:i.getRowNode(),type:"popupCellEditor",eventSource:s,ePopup:p,position:t.popupPosition,keepWithinBounds:!0},m=o.positionPopupByComponent.bind(o,g),f=a.getLocaleTextFunc(),v=o.addPopup({modal:d,eChild:p,closeOnEsc:!0,closedCallback:()=>{i.onPopupEditorClosed()},anchorToElement:s,positionCallback:m,ariaLabel:f("ariaLabelCellEditor","Cell Editor")}),y=v?v.hideFunc:void 0;return n(u),e.jsChildComp?.afterGuiAttached?.(),()=>{y?.(),r.destroyBean(u)}})),t.createElement(t.Fragment,null,i&&e.wrappedContent&&(0,s.createPortal)(e.wrappedContent,i.getGui()))})),Xd=(e,i,s,n,r,o)=>{const{context:a}=(0,t.useContext)(hd),l=(0,t.useCallback)((()=>{const e=r.current;if(!e)return;const t=e.getGui();t&&t.parentElement&&t.parentElement.removeChild(t),a.destroyBean(e),r.current=void 0}),[]);(0,t.useEffect)((()=>{const t=null!=e,n=e?.compDetails&&!e.compDetails.componentFromFramework;if(!(t&&n&&!(i&&null==s)))return void l();const a=e.compDetails;if(r.current){const t=r.current,i=!!(null!=t.refresh&&0==e.force)&&t.refresh(a.params);if(!0===i||void 0===i)return;l()}const h=a.newAgStackInstance();null!=h&&h.then((e=>{if(!e)return;const t=e.getGui();if(!t)return;(i?s:o.current).appendChild(t),r.current=e}))}),[e,i,n]),(0,t.useEffect)((()=>l),[])},Jd=(e,i,s)=>{const n=e.compProxy;return t.createElement(t.Fragment,null,n?((e,i,s)=>{const{compProxy:n}=e;s(n);const r=n.getProps(),o=gd(i);return t.createElement(bd.Provider,{value:{setMethods:e=>n.setMethods(e)}},o?t.createElement(i,{...r}):t.createElement(i,{...r,ref:e=>n.setRef(e)}))})(e,i,s):t.createElement(i,{...e.compDetails.params,ref:s}))},eu=(0,t.memo)((e=>{let{cellCtrl:i,printLayout:s,editingRow:n}=e;const{context:r}=(0,t.useContext)(hd),{colIdSanitised:o,instanceId:a}=i,l=(0,t.useRef)(),[h,c]=(0,t.useState)((()=>i.isCellRenderer()?void 0:{compDetails:void 0,value:i.getValueToDisplay(),force:!1})),[d,u]=(0,t.useState)(),[p,g]=(0,t.useState)(1),[m,f]=(0,t.useState)(),[v,y]=(0,t.useState)(!1),[C,S]=(0,t.useState)(!1),[w,b]=(0,t.useState)(!1),[x,M]=(0,t.useState)(),D=(0,t.useMemo)((()=>i.isForceWrapper()),[i]),I=(0,t.useMemo)((()=>i.getCellAriaRole()),[i]),R=(0,t.useRef)(null),E=(0,t.useRef)(null),A=(0,t.useRef)(),T=(0,t.useRef)(),P=(0,t.useRef)(),L=(0,t.useRef)([]),F=(0,t.useRef)(),[k,N]=(0,t.useState)(0),O=(0,t.useCallback)((e=>{F.current=e,N((e=>e+1))}),[]),G=D||null!=h&&(v||w||C),B=(0,t.useCallback)((e=>{if(T.current=e,e){const t=e.isCancelBeforeStart&&e.isCancelBeforeStart();setTimeout((()=>{t?(i.stopEditing(!0),i.focusCell(!0)):i.cellEditorAttached()}))}}),[i]),V=(0,t.useRef)();V.current||(V.current=new ri((()=>R.current))),Xd(h,G,F.current,k,A,R);const z=(0,t.useRef)();(0,t.useLayoutEffect)((()=>{const e=z.current,t=h;
2if(z.current=h,null==e||null==e.compDetails||null==t||null==t.compDetails)return;const i=e.compDetails,s=t.compDetails;if(i.componentClass!=s.componentClass)return;if(null==E.current?.refresh)return;1!=E.current.refresh(s.params)&&g((e=>e+1))}),[h]),(0,t.useLayoutEffect)((()=>{if(!(d&&!d.compDetails.componentFromFramework))return;const e=d.compDetails,t=!0===d.popup,i=e.newAgStackInstance();return i.then((e=>{if(!e)return;const i=e.getGui();if(B(e),!t){const t=(D?P:R).current;t?.appendChild(i),e.afterGuiAttached&&e.afterGuiAttached()}M(e)})),()=>{i.then((e=>{const t=e.getGui();r.destroyBean(e),B(void 0),M(void 0),t?.parentElement?.removeChild(t)}))}}),[d]);const H=(0,t.useCallback)((e=>{if(P.current=e,!e)return L.current.forEach((e=>e())),void(L.current=[]);const t=t=>{if(t){const i=t.getGui();e.insertAdjacentElement("afterbegin",i),L.current.push((()=>{r.destroyBean(t),os(i)}))}return t};if(v){t(i.createSelectionCheckbox())}w&&t(i.createDndSource()),C&&t(i.createRowDragComp())}),[i,r,w,C,v]),W=(0,t.useCallback)((e=>{if(R.current=e,l.current=e?r.createBean(new $t):r.destroyBean(l.current),!e||!i)return;const t={addOrRemoveCssClass:(e,t)=>V.current.addOrRemoveCssClass(e,t),setUserStyles:e=>f(e),getFocusableElement:()=>R.current,setIncludeSelection:e=>y(e),setIncludeRowDrag:e=>S(e),setIncludeDndSource:e=>b(e),getCellEditor:()=>T.current||null,getCellRenderer:()=>E.current??A.current,getParentOfValue:()=>F.current??P.current??R.current,setRenderDetails:(e,t,i)=>{c((s=>s?.compDetails!==e||s?.value!==t||s?.force!==i?{value:t,compDetails:e,force:i}:s))},setEditDetails:(e,t,i,s)=>{if(e){let n;s?n=new qd(e.params,(()=>g((e=>e+1)))):e.componentFromFramework&&Hd(),u({compDetails:e,popup:t,popupPosition:i,compProxy:n}),t||c(void 0)}else u((e=>{e?.compProxy&&(T.current=void 0)}))}},o=P.current||void 0;i.setComp(t,e,o,s,n,l.current)}),[]),j=(0,t.useMemo)((()=>!!(h?.compDetails?.componentFromFramework&&gd(h.compDetails.componentClass))),[h]);(0,t.useLayoutEffect)((()=>{R.current&&(V.current.addOrRemoveCssClass("ag-cell-value",!G),V.current.addOrRemoveCssClass("ag-cell-inline-editing",!!d&&!d.popup),V.current.addOrRemoveCssClass("ag-cell-popup-editing",!!d&&!!d.popup),V.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!d||!!d.popup),i.getRowCtrl()?.setInlineEditingCss(),i.shouldRestoreFocus()&&!i.isEditing()&&R.current.focus({preventScroll:!0}))}));const U=()=>t.createElement(t.Fragment,null,null!=h&&((e,i,s,n,r,o,a)=>{const{compDetails:l,value:h}=e,c=!l,d=l&&l.componentFromFramework,u=l&&l.componentClass,p=h?.toString?h.toString():h,g=()=>t.createElement(t.Fragment,null,c&&t.createElement(t.Fragment,null,p),d&&!o&&t.createElement(u,{...l.params,key:i,ref:n}),d&&o&&t.createElement(u,{...l.params,key:i}));return t.createElement(t.Fragment,null,r?t.createElement("span",{role:"presentation",id:`cell-${s}`,className:"ag-cell-value",ref:a},g()):g())})(h,p,a,E,G,j,O),null!=d&&((e,i,s,n,r)=>{const o=e.compDetails,a=o.componentClass,l=o.componentFromFramework&&!e.popup,h=o.componentFromFramework&&e.popup,c=!o.componentFromFramework&&e.popup;return t.createElement(t.Fragment,null,l&&Jd(e,a,i),h&&t.createElement(Qd,{editDetails:e,cellCtrl:n,eParentCell:s,wrappedContent:Jd(e,a,i)}),c&&r&&t.createElement(Qd,{editDetails:e,cellCtrl:n,eParentCell:s,jsChildComp:r}))})(d,B,R.current,i,x)),_=(0,t.useCallback)((()=>i.onFocusOut()),[]);return t.createElement("div",{ref:W,style:m,role:I,"col-id":o,onBlur:_},G?t.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:H},U()):U())})),tu=(0,t.memo)((e=>{let{rowCtrl:i,containerType:s}=e;const{context:n,gos:r}=(0,t.useContext)(hd),o=(0,t.useRef)(),a=(0,t.useRef)(i.getDomOrder()),l=i.isFullWidth(),h=i.getRowNode().displayed,[c,d]=(0,t.useState)((()=>h?i.getRowIndex():null)),[u,p]=(0,t.useState)((()=>i.getRowId())),[g,m]=(0,t.useState)((()=>i.getBusinessKey())),[f,v]=(0,t.useState)((()=>i.getRowStyles())),y=(0,t.useRef)(null),C=(0,t.useRef)(null),[S,w]=(0,t.useState)((()=>null)),[b,x]=(0,t.useState)(),[M,D]=(0,t.useState)((()=>h?i.getInitialRowTop(s):void 0)),[I,R]=(0,t.useState)((()=>h?i.getInitialTransform(s):void 0)),E=(0,t.useRef)(null),A=(0,t.useRef)(),T=(0,t.useRef)(!1),[P,L]=(0,t.useState)(0);(0,t.useEffect)((()=>
2{if(T.current||!b||P>10)return;const e=E.current?.firstChild;e?(i.setupDetailRowAutoHeight(e),T.current=!0):L((e=>e+1))}),[b,P]);const F=(0,t.useRef)();F.current||(F.current=new ri((()=>E.current)));const k=(0,t.useCallback)((e=>{if(E.current=e,o.current=e?n.createBean(new $t):n.destroyBean(o.current),!e)return void i.unsetComp(s);if(!i.isAlive())return;const t={setTop:D,setTransform:R,addOrRemoveCssClass:(e,t)=>F.current.addOrRemoveCssClass(e,t),setDomOrder:e=>a.current=e,setRowIndex:d,setRowId:p,setRowBusinessKey:m,setUserStyles:v,setCellCtrls:(e,t)=>{C.current=y.current,y.current=e;const i=Cd(C.current,e,a.current);i!==C.current&&yd(t,(()=>w(i)))},showFullWidth:e=>x(e),getFullWidthCellRenderer:()=>A.current,refreshFullWidth:e=>V.current?(x((t=>({...t,params:e()}))),!0):!(!A.current||!A.current.refresh)&&A.current.refresh(e())};i.setComp(t,e,s,o.current)}),[]);(0,t.useLayoutEffect)((()=>cd(b,n,E.current,A)),[b]);const N=(0,t.useMemo)((()=>{const e={top:M,transform:I};return Object.assign(e,f),e}),[M,I,f]),O=l&&b?.componentFromFramework,G=!l&&null!=S,B=(0,t.useMemo)((()=>!!(b?.componentFromFramework&&gd(b.componentClass))),[b]),V=(0,t.useRef)(!1);(0,t.useEffect)((()=>{V.current=B&&!!b&&!!r.get("reactiveCustomComponents")}),[B,b]);return t.createElement("div",{ref:k,role:"row",style:N,"row-index":c,"row-id":u,"row-business-key":g},G&&S?.map((e=>t.createElement(eu,{cellCtrl:e,editingRow:i.isEditing(),printLayout:i.isPrintLayout(),key:e.instanceId}))),O&&(()=>{const e=b.componentClass;return t.createElement(t.Fragment,null,B?t.createElement(e,{...b.params}):t.createElement(e,{...b.params,ref:A}))})())})),iu=(0,t.memo)((e=>{let{name:i}=e;const{context:s}=(0,t.useContext)(hd),n=(0,t.useMemo)((()=>Da(i)),[i]),r=(0,t.useRef)(null),o=(0,t.useRef)(null),a=(0,t.useRef)([]),l=(0,t.useRef)([]),[h,c]=(0,t.useState)((()=>[])),d=(0,t.useRef)(!1),u=(0,t.useRef)(),p=(0,t.useMemo)((()=>ud(n.viewport)),[n]),g=(0,t.useMemo)((()=>ud(n.container)),[n]),m="center"===n.type;Zd(" AG Row Container "+i+" ",m?r:o);const f=(0,t.useCallback)((()=>m?null!=r.current&&null!=o.current:null!=o.current),[]),v=(0,t.useCallback)((()=>m?null==r.current&&null==o.current:null==o.current),[]),y=(0,t.useCallback)((()=>{if(v()&&(u.current=s.destroyBean(u.current)),f()){const e=e=>{const t=Cd(l.current,a.current,d.current);t!==l.current&&(l.current=t,yd(e,(()=>c(t))))},t={setHorizontalScroll:e=>{r.current&&(r.current.scrollLeft=e)},setViewportHeight:e=>{r.current&&(r.current.style.height=e)},setRowCtrls:t=>{let{rowCtrls:i,useFlushSync:s}=t;const n=!!s&&a.current.length>0&&i.length>0;a.current=i,e(n)},setDomOrder:t=>{d.current!=t&&(d.current=t,e(!1))},setContainerWidth:e=>{o.current&&(o.current.style.width=e)},setOffsetTop:e=>{o.current&&(o.current.style.transform=`translateY(${e})`)}};u.current=s.createBean(new ka(i)),u.current.setComp(t,o.current,r.current)}}),[f,v]),C=(0,t.useCallback)((e=>{o.current=e,y()}),[y]),S=(0,t.useCallback)((e=>{r.current=e,y()}),[y]),w=()=>t.createElement("div",{className:g,ref:C,role:"rowgroup"},h.map((e=>t.createElement(tu,{rowCtrl:e,containerType:n.type,key:e.instanceId}))));return t.createElement(t.Fragment,null,m?t.createElement("div",{className:p,ref:S,role:"presentation"},w()):w())})),su=(0,t.memo)((()=>{const{context:e,resizeObserverService:i}=(0,t.useContext)(hd),[s,n]=(0,t.useState)(""),[r,o]=(0,t.useState)(0),[a,l]=(0,t.useState)(0),[h,c]=(0,t.useState)("0px"),[d,u]=(0,t.useState)("0px"),[p,g]=(0,t.useState)("100%"),[m,f]=(0,t.useState)("0px"),[v,y]=(0,t.useState)("0px"),[C,S]=(0,t.useState)("100%"),[w,b]=(0,t.useState)(""),[x,M]=(0,t.useState)(""),[D,I]=(0,t.useState)(null),[R,E]=(0,t.useState)(""),[A,T]=(0,t.useState)(null),[P,L]=(0,t.useState)("ag-layout-normal"),F=(0,t.useRef)();F.current||(F.current=new ri((()=>k.current)));const k=(0,t.useRef)(null),N=(0,t.useRef)(null),O=(0,t.useRef)(null),G=(0,t.useRef)(null),B=(0,t.useRef)(null),V=(0,t.useRef)(null),z=(0,t.useRef)(null),H=(0,t.useRef)([]),W=(0,t.useRef)([]);Zd(" AG Grid Body ",k),Zd(" AG Pinned Top ",N),Zd(" AG Sticky Top ",O),Zd(" AG Middle ",V),Zd(" AG Pinned Bottom ",z);const j=(0,t.useCallback)((t=>{if(k.current=t,!t)return H.current=e.destroyBeans(H.current),W.current.forEach((e=>e())),void(W.current=[]);if(!e)return;const s=(e,t)=>{e.appendChild(t),W.current.push((()=>e.removeChild(t)))},r=(t,i,n)=>{s(t,document.createComment(n)),s(t,(t=>{const i=e.createBean(new t);return H.current.push(i),i})(i).getGui())};r(t,_o," AG Fake Horizontal Scroll "),r(t,Wo," AG Overlay Wrapper "),B.current&&r(B.current,Yo," AG Fake 
2Vertical Scroll ");const a={setRowAnimationCssOnBodyViewport:n,setColumnCount:e=>{k.current&&Di(k.current,e)},setRowCount:e=>{k.current&&xi(k.current,e)},setTopHeight:o,setBottomHeight:l,setStickyTopHeight:c,setStickyTopTop:u,setStickyTopWidth:g,setTopDisplay:b,setBottomDisplay:M,setColumnMovingCss:(e,t)=>F.current.addOrRemoveCssClass(e,t),updateLayoutClasses:L,setAlwaysVerticalScrollClass:I,setPinnedTopBottomOverflowY:E,setCellSelectableCss:(e,t)=>T(t?e:null),setBodyViewportWidth:e=>{V.current&&(V.current.style.width=e)},registerBodyViewportResizeListener:e=>{if(V.current){const t=i.observeResize(V.current,e);W.current.push((()=>t()))}},setStickyBottomHeight:f,setStickyBottomBottom:y,setStickyBottomWidth:S},h=e.createBean(new Oa);H.current.push(h),h.setComp(a,t,V.current,N.current,z.current,O.current,G.current)}),[]),U=(0,t.useMemo)((()=>ud("ag-root","ag-unselectable",P)),[P]),_=(0,t.useMemo)((()=>ud("ag-body-viewport",s,P,D,A)),[s,P,D,A]),K=(0,t.useMemo)((()=>ud("ag-body",P)),[P]),$=(0,t.useMemo)((()=>ud("ag-floating-top",A)),[A]),Y=(0,t.useMemo)((()=>ud("ag-sticky-top",A)),[A]),Z=(0,t.useMemo)((()=>ud("ag-sticky-bottom","0px"===m?"ag-hidden":null,A)),[A,m]),q=(0,t.useMemo)((()=>ud("ag-floating-bottom",A)),[A]),Q=(0,t.useMemo)((()=>({height:r,minHeight:r,display:w,overflowY:R})),[r,w,R]),X=(0,t.useMemo)((()=>({height:h,top:d,width:p})),[h,d,p]),J=(0,t.useMemo)((()=>({height:m,bottom:v,width:C})),[m,v,C]),ee=(0,t.useMemo)((()=>({height:a,minHeight:a,display:x,overflowY:R})),[a,x,R]),te=e=>t.createElement(iu,{name:e,key:`${e}-container`}),ie=e=>{let{section:i,children:s,className:n,style:r}=e;return t.createElement("div",{ref:i,className:n,role:"presentation",style:r},s.map(te))};return t.createElement("div",{ref:j,className:U,role:"treegrid"},t.createElement(Yd,null),ie({section:N,className:$,style:Q,children:["topLeft","topCenter","topRight","topFullWidth"]}),t.createElement("div",{className:K,ref:B,role:"presentation"},ie({section:V,className:_,children:["left","center","right","fullWidth"]})),ie({section:O,className:Y,style:X,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),ie({section:G,className:Z,style:J,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),ie({section:z,className:q,style:ee,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))})),nu=(0,t.forwardRef)(((e,i)=>{const{children:s,eFocusableElement:n,onTabKeyDown:r,gridCtrl:o,forceFocusOutWhenTabGuardsAreEmpty:a}=e,{context:l}=(0,t.useContext)(hd),h=(0,t.useRef)(null),c=(0,t.useRef)(null),d=(0,t.useRef)(),u=e=>{const t=null==e?void 0:parseInt(e,10).toString();[h,c].forEach((e=>{void 0===t?e.current?.removeAttribute("tabindex"):e.current?.setAttribute("tabindex",t)}))};(0,t.useImperativeHandle)(i,(()=>({forceFocusOutOfContainer(e){d.current?.forceFocusOutOfContainer(e)}})));const p=(0,t.useCallback)((()=>{const e=h.current,t=c.current;if(e||t){if(e&&t){const i={setTabIndex:u};d.current=l.createBean(new Fl({comp:i,eTopGuard:e,eBottomGuard:t,eFocusableElement:n,onTabKeyDown:r,forceFocusOutWhenTabGuardsAreEmpty:a,focusInnerElement:e=>o.focusInnerElement(e)}))}}else d.current=l.destroyBean(d.current)}),[]),g=(0,t.useCallback)((e=>{h.current=e,p()}),[p]),m=(0,t.useCallback)((e=>{c.current=e,p()}),[p]),f=e=>{const i="top"===e?Ll.TAB_GUARD_TOP:Ll.TAB_GUARD_BOTTOM;return t.createElement("div",{className:`${Ll.TAB_GUARD} ${i}`,role:"presentation",ref:"top"===e?g:m})};return t.createElement(t.Fragment,null,f("top"),s,f("bottom"))})),ru=(0,t.memo)(nu),ou=(0,t.memo)((e=>{let{context:i}=e;const[s,n]=(0,t.useState)(""),[r,o]=(0,t.useState)(""),[a,l]=(0,t.useState)(""),[h,c]=(0,t.useState)(null),[d,u]=(0,t.useState)(null),[p,g]=(0,t.useState)(!1),[m,f]=(0,t.useState)(),v=(0,t.useRef)(),y=(0,t.useRef)(null),C=(0,t.useRef)(),[S,w]=(0,t.useState)(null),b=(0,t.useRef)((()=>{})),x=(0,t.useRef)(),M=(0,t.useRef)([]),D=(0,t.useCallback)((()=>{}),[]),I=(0,t.useMemo)((()=>i.isDestroyed()?null:i.getBeans()),[i]);Zd(" AG Grid ",y);const R=(0,t.useCallback)((e=>{if(y.current=e,v.current=e?i.createBean(new Ch):i.destroyBean(v.current),!e||i.isDestroyed())return;const t=v.current;b.current=t.focusInnerElement.bind(t);const s={destroyGridUi:()=>{},setRtlClass:n,setGridThemeClass:o,forceFocusOutOfContainer:e=>{e||!x.current?.isDisplayed()?C.current?.forceFocusOutOfContainer(e):x.current.forceFocusOutOfContainer(e)},updateLayoutClasses:l,getFocusableContainers:()=>{const e=[],t=y.current?.querySelector(".ag-root");return t&&e.push({getGui:()=>t}),M.current.forEach((t=>{t.isDisplayed()&&e.push(t)})),e},setCursor:c,setUserSelect:u};t.setComp(s,e,e),g(!0)}),[]);(0,t.useEffect)((()=>{const e=v.current,t=y.current;if(!m||!I||!e||!S||!t)return;const s=[],{watermarkSelector:n,paginationSelector:r,sideBarSelector:o,statusBarSelector:a,gridHeaderDropZonesSelector:l}=e.getOptionalSelectors(),h=[];if(l){const e=i.createBean(new l.component),n=e.getGui();t.insertAdjacentElement("afterbegin",n),h.push(n),s.push(e)}if(o){const e=i.createBean(new o.component),t=e.getGui(),n=S.querySelector(".ag-tab-guard-bottom");n&&(n.insertAdjacentElement("beforebegin",t),h.push(t)),s.push(e),M.current.push(e)}const c=e=>
2{const n=i.createBean(new e),r=n.getGui();return t.insertAdjacentElement("beforeend",r),h.push(r),s.push(n),n};if(a&&c(a.component),r){const e=c(r.component);x.current=e,M.current.push(e)}return n&&c(n.component),()=>{i.destroyBeans(s),h.forEach((e=>{e.parentElement?.removeChild(e)}))}}),[m,S,I]);const E=(0,t.useMemo)((()=>ud("ag-root-wrapper",s,r,a)),[s,r,a]),A=(0,t.useMemo)((()=>ud("ag-root-wrapper-body","ag-focus-managed",a)),[a]),T=(0,t.useMemo)((()=>({userSelect:null!=d?d:"",WebkitUserSelect:null!=d?d:"",cursor:null!=h?h:""})),[d,h]),P=(0,t.useCallback)((e=>{C.current=e,f(null!==e)}),[]);return t.createElement("div",{ref:R,className:E,style:T,role:"presentation"},t.createElement("div",{className:A,ref:w,role:"presentation"},p&&S&&I&&t.createElement(hd.Provider,{value:I},t.createElement(ru,{ref:P,eFocusableElement:S,onTabKeyDown:D,gridCtrl:v.current,forceFocusOutWhenTabGuardsAreEmpty:!0},t.createElement(su,null)))))})),au=class extends ze{wireBeans(e){this.ctrlsService=e.ctrlsService}areHeaderCellsRendered(){return this.ctrlsService.getHeaderRowContainerCtrls().every((e=>e.getAllCtrls().every((e=>e.areCellsRendered()))))}},lu=e=>{const i=(0,t.useRef)(),s=(0,t.useRef)(null),n=(0,t.useRef)(null),r=(0,t.useRef)([]),o=(0,t.useRef)([]),a=(0,t.useRef)(e),l=(0,t.useRef)(),h=(0,t.useRef)(),c=(0,t.useRef)(!1),[d,u]=(0,t.useState)(void 0),[,p]=(0,t.useState)(0),g=(0,t.useCallback)((t=>{if(s.current=t,!t)return r.current.forEach((e=>e())),void(r.current.length=0);const a=e.modules||[];n.current||(n.current=new Wd((()=>p((e=>e+1))),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push((()=>{n.current?.destroy(),n.current=null})));const d=function(e,t){"object"!==typeof e&&(e={});const i={...e};return Kt.ALL_PROPERTIES_AND_CALLBACKS.forEach((e=>{const s=t[e];"undefined"!==typeof s&&s!==Kt.VUE_OMITTED_PROPERTY&&(i[e]=s)})),i}(e.gridOptions,e),g=new du((()=>{if(c.current){const e=()=>l.current?.shouldQueueUpdates()?void 0:o.current.shift();let t=e();for(;t;)t(),t=e()}}));l.current=g;const m=new au,f={providedBeanInstances:{frameworkComponentWrapper:new hu(n.current,d.reactiveCustomComponents??(v="reactiveCustomComponents",Mc.gridOptions?.[v])??!0),renderStatusService:m},modules:a,frameworkOverrides:g};var v;const y=new Ic;d.gridId??(d.gridId=h.current),i.current=y.create(t,d,(t=>{u(t),t.createBean(m),r.current.push((()=>{t.destroy()})),t.getBean("ctrlsService").whenReady({addDestroyFunc:e=>{r.current.push(e)}},(()=>{if(t.isDestroyed())return;const s=i.current;s&&e.setGridApi?.(s)}))}),(e=>{e.getBean("ctrlsService").whenReady({addDestroyFunc:e=>{r.current.push(e)}},(()=>{o.current.forEach((e=>e())),o.current.length=0,c.current=!0}))}),f),r.current.push((()=>{i.current=void 0})),i.current&&(h.current=i.current.getGridId())}),[]),m=(0,t.useMemo)((()=>({height:"100%",...e.containerStyle||{}})),[e.containerStyle]),f=(0,t.useCallback)((e=>{c.current&&!l.current?.shouldQueueUpdates()?e():o.current.push(e)}),[]);return(0,t.useEffect)((()=>{const t=function(e,t){const i={};return Object.keys(t).forEach((s=>{const n=t[s];e[s]!==n&&(i[s]=n)})),i}(a.current,e);a.current=e,f((()=>{i.current&&function(e,t){if(!e)return;const i={};let s=!1;if(Object.keys(e).filter((e=>Kt.ALL_PROPERTIES_AND_CALLBACKS_SET.has(e))).forEach((t=>{i[t]=e[t],s=!0})),!s)return;const n={type:"gridOptionsChanged",options:i};t.dispatchEvent(n);const r={type:"componentStateChanged"};et(i,((e,t)=>{r[e]=t})),t.dispatchEvent(r)}(t,i.current)}))}),[e]),t.createElement("div",{style:m,className:e.className,ref:g},d&&!d.isDestroyed()?t.createElement(ou,{context:d}):null,n.current?.getPortals()??null)};var hu=class extends Tc{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const i=(e=>{switch(e){case"filter":return Ld;case"floatingFilterComponent":return Nd;case"dateComponent":return Td;case"dragAndDropImageComponent":return Pd;case"loadingOverlayComponent":return Od;case"noRowsOverlayComponent":return Bd;case"statusPanel":return Vd;case"toolPanel":return zd;case"menuItem":return Gd;case"cellRenderer":return Ad}})(t.propertyName);if(i)return new i(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":Hd()}const i=!t.cellRenderer&&"toolPanel"!==t.propertyName;return new Id(e,this.parent,t,i)}},cu=(0,t.forwardRef)(((e,i)=>{const{ctrlsFactory:s,context:n,gos:r,resizeObserverService:o,rowModel:a}=(0,t.useContext)(hd),[l,c]=(0,t.useState)((()=>new pd)),[d,u]=(0,t.useState)((()=>new pd)),[p,g]=(0,t.useState)(),[m,f]=(0,t.useState)(),v=(0,t.useRef)(),y=(0,t.useRef)(null),C=(0,t.useRef)(),S=(0,t.useMemo)((()=>Ln.__getGridRegisteredModules(e.api.getGridId())),[e]),w=(0,t.useMemo)((()=>l.toString()+" ag-details-row"),[l]),b=(0,t.useMemo)((()=>d.toString()+" ag-details-grid"),[d]);i&&(0,t.useImperativeHandle)(i,(()=>({refresh:()=>v.current?.refresh()??!1}))),e.template&&h("detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/");const x=(0,t.useCallback)((t=>{if(y.current=t,!t)return v.current=n.destroyBean(v.current),void C.current?.();const i={addOrRemoveCssClass:(e,t)=>c((i=>i.setClass(e,t))),addOrRemoveDetailGridCssClass:(e,t)=>u((i=>i.setClass(e,t))),setDetailGrid:e=>g(e),setRowData:e=>f(e),getGui:()=>y.current},l=s.getInstance("detailCellRenderer");if(l&&(n.createBean(l),l.init(i,e),v.current=l,r.get("detailRowAutoHeight"))){const i=()=>
2{if(null==y.current)return;const t=y.current.clientHeight;if(null!=t&&t>0){setTimeout((()=>{e.node.setRowHeight(t),(L(r)||F(r))&&a.onRowHeightChanged()}),0)}};C.current=o.observeResize(t,i),i()}}),[]),M=(0,t.useCallback)((e=>{v.current?.registerDetailWithMaster(e)}),[]);return t.createElement("div",{className:w,ref:x},p&&t.createElement(lu,{className:b,...p,modules:S,rowData:m,setGridApi:M}))})),du=class extends Vl{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.frameworkComponents={agGroupCellRenderer:wd,agGroupRowRenderer:wd,agDetailCellRenderer:cu},this.wrapIncoming=(e,t)=>{return"ensureVisible"===t?(i=e,vd||setTimeout((()=>vd=!1),0),vd=!0,i()):e();var i},this.renderingEngine="react"}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return"19"===md}},uu=class extends t.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e,this.apiListeners.forEach((t=>t(e)))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return t.createElement(lu,{...this.props,setGridApi:this.setGridApi})}};var pu=i(168),gu=i(587),mu=i(868),fu=i(172),vu=i(758),yu=i(812),Cu=i(280);var Su=i(266);const wu={black:"#000",white:"#fff"},bu={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},xu={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Mu={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Du={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Iu={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ru={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Eu={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Au=["mode","contrastThreshold","tonalOffset"],Tu={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:wu.white,default:wu.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Pu={text:{primary:wu.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:wu.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Lu(e,t,i,s){const n=s.light||s,r=s.dark||1.5*s;e[t]||(e.hasOwnProperty(i)?e[t]=e[i]:"light"===t?e.light=(0,Su.a)(e.main,n):"dark"===t&&(e.dark=(0,Su.e$)(e.main,r)))}function Fu(e){const{mode:t="light",contrastThreshold:i=3,tonalOffset:s=.2}=e,n=(0,gu.A)(e,Au),r=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Iu[200],light:Iu[50],dark:Iu[400]}:{main:Iu[700],light:Iu[400],dark:Iu[800]}}(t),o=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:xu[200],light:xu[50],dark:xu[400]}:{main:xu[500],light:xu[300],dark:xu[700]}}(t),a=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Mu[500],light:Mu[300],dark:Mu[700]}:{main:Mu[700],light:Mu[400],dark:Mu[800]}}(t),l=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Ru[400],light:Ru[300],dark:Ru[700]}:{main:Ru[700],light:Ru[500],dark:Ru[900]}}(t),h=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Eu[400],light:Eu[300],dark:Eu[700]}:{main:Eu[800],light:Eu[500],dark:Eu[900]}}(t),c=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Du[400],light:Du[300],dark:Du[700]}:{main:"#ed6c02",light:Du[500],dark:Du[900]}}(t);function d(e){return(0,Su.eM)(e,Pu.text.primary)>=i?Pu.text.primary:Tu.text.primary}const u=e=>{let{color:t,name:i,mainShade:n=500,lightShade:r=300,darkShade:o=700}=e;if(t=(0,pu.A)({},t),!t.main&&t[n]&&(t.main=t[n]),!t.hasOwnProperty("main"))throw new Error((0,mu.A)(11,i?` (${i})`:"",n));if("string"!==typeof t.main)throw new Error((0,mu.A)(12,i?` (${i})`:"",JSON.stringify(t.main)));return Lu(t,"light",r,s),Lu(t,"dark",o,s),t.contrastText||(t.contrastText=d(t.main)),t},p={dark:Pu,light:Tu};return(0,fu.A)((0,pu.A)({common:(0,pu.A)({},wu),mode:t,primary:u({color:r,name:"primary"}
2),secondary:u({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:u({color:a,name:"error"}),warning:u({color:c,name:"warning"}),info:u({color:l,name:"info"}),success:u({color:h,name:"success"}),grey:bu,contrastThreshold:i,getContrastText:d,augmentColor:u,tonalOffset:s},p[t]),n)}const ku=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const Nu={textTransform:"uppercase"},Ou='"Roboto", "Helvetica", "Arial", sans-serif';function Gu(e,t){const i="function"===typeof t?t(e):t,{fontFamily:s=Ou,fontSize:n=14,fontWeightLight:r=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:h=16,allVariants:c,pxToRem:d}=i,u=(0,gu.A)(i,ku);const p=n/14,g=d||(e=>e/h*p+"rem"),m=(e,t,i,n,r)=>{return(0,pu.A)({fontFamily:s,fontWeight:e,fontSize:g(t),lineHeight:i},s===Ou?{letterSpacing:(o=n/t,Math.round(1e5*o)/1e5)+"em"}:{},r,c);var o},f={h1:m(r,96,1.167,-1.5),h2:m(r,60,1.2,-.5),h3:m(o,48,1.167,0),h4:m(o,34,1.235,.25),h5:m(o,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(o,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(o,16,1.5,.15),body2:m(o,14,1.43,.15),button:m(a,14,1.75,.4,Nu),caption:m(o,12,1.66,.4),overline:m(o,12,2.66,1,Nu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,fu.A)((0,pu.A)({htmlFontSize:h,pxToRem:g,fontFamily:s,fontSize:n,fontWeightLight:r,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},f),u,{clone:!1})}function Bu(){return[`${arguments.length<=0?void 0:arguments[0]}px ${arguments.length<=1?void 0:arguments[1]}px ${arguments.length<=2?void 0:arguments[2]}px ${arguments.length<=3?void 0:arguments[3]}px rgba(0,0,0,0.2)`,`${arguments.length<=4?void 0:arguments[4]}px ${arguments.length<=5?void 0:arguments[5]}px ${arguments.length<=6?void 0:arguments[6]}px ${arguments.length<=7?void 0:arguments[7]}px rgba(0,0,0,0.14)`,`${arguments.length<=8?void 0:arguments[8]}px ${arguments.length<=9?void 0:arguments[9]}px ${arguments.length<=10?void 0:arguments[10]}px ${arguments.length<=11?void 0:arguments[11]}px rgba(0,0,0,0.12)`].join(",")}const Vu=["none",Bu(0,2,1,-1,0,1,1,0,0,1,3,0),Bu(0,3,1,-2,0,2,2,0,0,1,5,0),Bu(0,3,3,-2,0,3,4,0,0,1,8,0),Bu(0,2,4,-1,0,4,5,0,0,1,10,0),Bu(0,3,5,-1,0,5,8,0,0,1,14,0),Bu(0,3,5,-1,0,6,10,0,0,1,18,0),Bu(0,4,5,-2,0,7,10,1,0,2,16,1),Bu(0,5,5,-3,0,8,10,1,0,3,14,2),Bu(0,5,6,-3,0,9,12,1,0,3,16,2),Bu(0,6,6,-3,0,10,14,1,0,4,18,3),Bu(0,6,7,-4,0,11,15,1,0,4,20,3),Bu(0,7,8,-4,0,12,17,2,0,5,22,4),Bu(0,7,8,-4,0,13,19,2,0,5,24,4),Bu(0,7,9,-4,0,14,21,2,0,5,26,4),Bu(0,8,9,-5,0,15,22,2,0,6,28,5),Bu(0,8,10,-5,0,16,24,2,0,6,30,5),Bu(0,8,11,-5,0,17,26,2,0,6,32,5),Bu(0,9,11,-5,0,18,28,2,0,7,34,6),Bu(0,9,12,-6,0,19,29,2,0,7,36,6),Bu(0,10,13,-6,0,20,31,3,0,8,38,7),Bu(0,10,13,-6,0,21,33,3,0,8,40,7),Bu(0,10,14,-6,0,22,35,3,0,8,42,7),Bu(0,11,14,-7,0,23,36,3,0,9,44,8),Bu(0,11,15,-7,0,24,38,3,0,9,46,8)],zu=["duration","easing","delay"],Hu={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Wu={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ju(e){return`${Math.round(e)}ms`}function Uu(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function _u(e){const t=(0,pu.A)({},Hu,e.easing),i=(0,pu.A)({},Wu,e.duration);return(0,pu.A)({getAutoHeightDuration:Uu,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:n=i.standard,easing:r=t.easeInOut,delay:o=0}=s;(0,gu.A)(s,zu);return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"===typeof n?n:ju(n)} ${r} ${"string"===typeof o?o:ju(o)}`)).join(",")}},e,{easing:t,duration:i})}const Ku={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},$u=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Yu(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:i={},transitions:s={},typography:n={}}=e,r=(0,gu.A)(e,$u);if(e.vars)throw new Error((0,mu.A)(18));const o=Fu(i),a=(0,Cu.A)(e);let l=(0,fu.A)(a,{mixins:(h=a.breakpoints,c=t,(0,pu.A)({toolbar:{minHeight:56,[h.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[h.up("sm")]:{minHeight:64}}},c)),palette:o,shadows:Vu.slice(),typography:Gu(o,n),transitions:_u(s),zIndex:(0,pu.A)({},Ku)});var h,c;l=(0,fu.A)(l,r);for(var d=arguments.length,u=new Array(d>1?d-1:0),p=1;p<d;p++)u[p-1]=arguments[p];return l=u.reduce(((e,t)=>(0,fu.A)(e,t)),l),l.unstable_sxConfig=(0,pu.A)({},vu.A,null==r?void 0:r.unstable_sxConfig),l.unstable_sx=function(e){return(0,yu.A)({sx:e,theme:this})},l}const Zu=Yu;function qu(e,t,i,s){const n=(e,t)=>{const i=e.split("/");return parseFloat(i[t])};return t.map((t=>{const{dictionary:i}=function(e,t){const i=e.filter((e=>e.model===t)),s={};return i.length>
20&&null!==i[0]?Object.keys(i[0]).forEach((e=>{s[e]=i[0][e]})):console.log(`${t}: \u4e0d\u5b58\u5728`),{dictionary:s}}(e,t.model_name);let s={};return s.Model=t.model_name,s.Contaminated=!1,Object.keys(i).forEach((e=>{"model"!=e&&"date"!=e&&(s[e]=i[e])})),s})).sort(((e,t)=>{const i=n(e.Avg,0),s=n(t.Avg,0),r=n(e.Avg,1),o=n(t.Avg,1);return i!==s?s-i:o-r})).reduce(((e,t)=>{let i=null;i=e.rank;const s=n(t.Avg,0),r=n(t.Avg,1);if(e.results.length>0){const t=n(e.results[e.results.length-1].Avg,0),o=n(e.results[e.results.length-1].Avg,1);s===t&&r===o||(e.rank+=1,i=e.rank)}return e.results.push({Rank:i,...t}),e}),{results:[],rank:1}).results}function Qu(e){return e.map((e=>({value:e,label:new Date(e).toLocaleDateString(void 0,{timeZone:"UTC"})})))}function Xu(e,t,i,s){let n=function(e){const t=(e,t)=>{const i=e.split("/");return parseFloat(i[t])},i=["User Interface&Experience","Development&Programming","Specialized Computing","Tools, Environments, and Practices","Emerging Technologies&Applications","Miscellaneous and General Inquiry","Databases&Data Handling"],s={};return e.forEach((e=>{i.forEach((i=>{const n=e[i],r=t(n,0),o=t(n,1);(!s[i]||r>t(s[i],0)||r===t(s[i],0)&&o>t(s[i],1))&&(s[i]=n)}))})),s}(t);if(console.log("columnNames :",e),console.log("page_idx :",s),"lines"==s){return[{headerName:"Name",field:"Model",pinned:"left"},{headerName:"Avg",field:"Avg",columnGroupShow:"closed",minWidth:75},{headerName:"Rank",field:"Rank",columnGroupShow:"closed",minWidth:75},{headerName:"Size",field:"Size",columnGroupShow:"closed",minWidth:75},{headerName:"User Interface&Experience",columnGroupShow:"closed",field:"User Interface&Experience",minWidth:75,cellStyle:e=>e.value===n["User Interface&Experience"]?{color:"red"}:null},{headerName:"Development&Programming",columnGroupShow:"closed",field:"Development&Programming",minWidth:75,cellStyle:e=>e.value===n["Development&Programming"]?{color:"red"}:null},{headerName:"Specialized Computing",field:"Specialized Computing",columnGroupShow:"closed",minWidth:75,cellStyle:e=>e.value===n["Specialized Computing"]?{color:"red"}:null},{headerName:"Tools, Environments, and Practices",field:"Tools, Environments, and Practices",columnGroupShow:"closed",minWidth:75,cellStyle:e=>e.value===n["Tools, Environments, and Practices"]?{color:"red"}:null},{headerName:"Emerging Technologies&Applications",field:"Emerging Technologies&Applications",columnGroupShow:"closed",minWidth:75,cellStyle:e=>e.value===n["Emerging Technologies&Applications"]?{color:"red"}:null},{headerName:"Miscellaneous and General Inquiry",field:"Miscellaneous and General Inquiry",columnGroupShow:"closed",minWidth:75,cellStyle:e=>e.value===n["Miscellaneous and General Inquiry"]?{color:"red"}:null},{headerName:"Databases&Data Handling",field:"Databases&Data Handling",columnGroupShow:"closed",minWidth:75,cellStyle:e=>e.value===n["Databases&Data Handling"]?{color:"red"}:null}]}return[{headerName:"Model",children:[{headerName:"Open",field:"group1",rowGroup:!0,hide:!0},{headerName:"Parameters",field:"group2",rowGroup:!0,hide:!0},{headerName:"Name",field:"Model",pinned:"left"}]},{headerName:"Score",children:[{headerName:"Avg",field:"Avg",columnGroupShow:"closed",minWidth:75},{headerName:"Rank",field:"Rank",columnGroupShow:"closed",minWidth:75},{headerName:"Size",field:"Size",columnGroupShow:"closed",minWidth:75},{headerName:"User Interface&Experience",columnGroupShow:"closed",field:"User Interface&Experience",minWidth:75,cellStyle:e=>e.value===n["User Interface&Experience"]?{color:"red"}:null},{headerName:"Development&Programming",columnGroupShow:"closed",field:"Development&Programming",minWidth:75,cellStyle:e=>e.value===n["Development&Programming"]?{color:"red"}:null},{headerName:"Specialized Computing",field:"Specialized Computing",columnGroupShow:"closed",minWidth:75,cellStyle:e=>e.value===n["Specialized Computing"]?{color:"red"}:null},{headerName:"Tools, Environments, and Practices",field:"Tools, Environments, and Practices",columnGroupShow:"closed",minWidth:75,cellStyle:e=>e.value===n["Tools, Environments, and Practices"]?{color:"red"}:null},{headerName:"Emerging Technologies&Applications",field:"Emerging Technologies&Applications",columnGroupShow:"closed",minWidth:75,cellStyle:e=>e.value===n["Emerging Technologies&Applications"]?{color:"red"}:null},{headerName:"Miscellaneous and General Inquiry",field:"Miscellaneous and General Inquiry",columnGroupShow:"closed",minWidth:75,cellStyle:e=>e.value===n["Miscellaneous and General Inquiry"]?{color:"red"}:null},{headerName:"Databases&Data Handling",field:"Databases&Data Handling",columnGroupShow:"closed",minWidth:75,cellStyle:e=>e.value===n["Databases&Data Handling"]?{color:"red"}:null}]}]}const Ju="Leaderboard_leaderboardModelContaminated__J1nnr";var ep=i(579);const tp="'JetBrains Mono', monospace, 0.3em",ip=t.memo((function(e){let i=e.args;const[{performances:s,models:n,date_marks:r,tasks:o},a]=i,[l,h]=(0,t.useState)(window.innerWidth<768),c=(0,t.useMemo)((()=>n.reduce(((e,t)=>(e[t.model_name]=t,e)),{})),[n]),[d,u]=t.useState((()=>Qu(r)));(0,t.useEffect)((()=>{u(Qu(r))}),[r]);const[p,g]=t.useState([d[4].value,d[d.length-1].value]);const m=(0,t.useMemo)((()=>qu(s,n)),[s,n,p]),f=s.filter((e=>e.date>=0&&e.date<=1)).length,v=(0,t.useMemo)((()=>Object.keys(m[0])),[m]),y=(0,t.useMemo)((()=>({sortable:!0,resizable:!0,filter:!1,suppressMenu:!0})),[]),C=((0,t.useMemo)((()=>({[Ju]:e=>e.data.Contaminated})),[]),(0,t.useRef)()),[S,w]=(0,t.useState)(m);(0,t.useEffect)((()=>{w(m)}),[m]);const[b,x]=(0,t.useState)(Xu(v,s,0,a));(0,t.useEffect)((()=>{x(Xu(v,s,0,a))}),[v,c,a]);Zu({palette:{mode:e.theme.base},typography:{fontFamily:tp}});const M="dark"===e.theme.base?"ag-theme-quartz-dark":"ag-theme-quartz",D=(0,t.useMemo)((()=>({height:`${Math.min(50*S.length,1e3)}px`,"--ag-font-family":tp,overflow:"auto",margin:"auto"})),[S]);let I=`${f} problems selected in the current time window.`;0===f?I="No problems selected in the current time window. Please select a different time window. ":I+=f<100?"Less than 100 problems selected. We recommend a larger time-window to get a more accurate leaderboard.":"You can change start or end date to change the time window.",I+="<br><br>We estimate cutoff dates based on release date and performance variation. Feel free to adjust the slider to see the leaderboard at different time windows. Please offer feedback if you find any issues!",console.log("columnDefs :",b);return(0,ep.jsx)("div",{className:M,style:{width:"100%",height:"100%"},children:(0,ep.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:(0,ep.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",width:"100%"},id:"flexGridWrapper",children:(0,ep.jsxs)("div",{style:{flexGrow:"1",height:"100%",width:"100%",display:"flex",justifyContent:"center"},children:[" ",(0,ep.jsx)("div",{style:D,className:M,children:(0,ep.jsx)(uu,{ref:C,rowData:S,columnDefs:b,defaultColDef:y,domLayout:"autoHeight",debug:!0,enableCellTextSelection:!0,tooltipShowDelay:0,autoSizeStrategy:{type:"fitCellContents"},groupDisplayType:"groupRows",groupDefaultExpanded:-1,getRowStyle:e=>{if(e.data&&e.data.Model.includes("SynCoder"))return{background:"#C7EDCC"}},autoGroupColumnDef:{pinned:"left",cellRendererParams:{suppressCount:!0}}
2,onGridReady:e=>{e.api.sizeColumnsToFit(),e.api.autoSizeAllColumns(!1),e.api.resetRowHeights()},onGridSizeChanged:e=>{e.api.sizeColumnsToFit(),e.api.autoSizeAllColumns(!1),e.api.resetRowHeights()},onGridColumnsChanged:e=>{e.api.sizeColumnsToFit(),e.api.autoSizeAllColumns(!1),e.api.resetRowHeights()},onRowDataUpdated:e=>{e.api.sizeColumnsToFit(),e.api.autoSizeAllColumns(!1),e.api.resetRowHeights()}})})]})})})})}));var sp=Object.defineProperty,np=Object.getOwnPropertyDescriptor,rp=(e,t)=>{for(var i in t)sp(e,i,{get:t[i],enumerable:!0})},op=(e,t,i,s)=>{for(var n,r=s>1?void 0:s?np(t,i):t,o=e.length-1;o>=0;o--)(n=e[o])&&(r=(s?n(t,i,r):n(r))||r);return s&&r&&sp(t,i,r),r},ap={ariaAnnounceHoverDatum:"${datum}",ariaAnnounceChart:"chart, ${seriesCount}[number] series",ariaAnnounceHierarchyChart:"hierarchy chart, ${caption}",ariaAnnounceGaugeChart:"gauge chart, ${caption}",ariaAnnounceHierarchyDatum:"level ${level}[number], ${count}[number] children, ${description}",ariaAnnounceFlowProportionLink:"link ${index} of ${count}, from ${from} to ${to}, ${sizeName} ${size}",ariaAnnounceFlowProportionNode:"node ${index} of ${count}, ${description}",ariaDescriptionLegendItem:"Press Space or Enter to toggle visibility",ariaLabelAnnotationOptionsToolbar:"Annotation Options",ariaLabelAnnotationSettingsDialog:"Annotation Settings",ariaLabelColorPicker:"Color picker",ariaLabelFinancialCharts:"Financial Charts",ariaLabelLegend:"Legend",ariaLabelLegendPagination:"Legend Pagination",ariaLabelLegendPagePrevious:"Previous Legend Page",ariaLabelLegendPageNext:"Next Legend Page",ariaLabelLegendItem:"${label}, Legend item ${index}[number] of ${count}[number]",ariaLabelLegendItemUnknown:"Unknown legend item",ariaLabelNavigator:"Navigator",ariaLabelNavigatorRange:"Range",ariaLabelNavigatorMinimum:"Minimum",ariaLabelNavigatorMaximum:"Maximum",ariaLabelRangesToolbar:"Ranges",ariaLabelSettingsTabBar:"Settings",ariaLabelZoomToolbar:"Zoom",ariaValuePanRange:"${min}[percent] to ${max}[percent]",iconAltTextLineStyleSolid:"Solid",iconAltTextLineStyleDashed:"Long-dashed",iconAltTextLineStyleDotted:"Short-dashed",iconAltTextPositionTop:"Top",iconAltTextPositionCenter:"Center",iconAltTextPositionBottom:"Bottom",iconAltTextAlignLeft:"Left",iconAltTextAlignCenter:"Center",iconAltTextAlignRight:"Right",iconAltTextClose:"Close",overlayLoadingData:"Loading data...",overlayNoData:"No data to display",overlayNoVisibleSeries:"No visible series",toolbarSeriesTypeDropdown:"Chart Type",toolbarSeriesTypeOHLC:"OHLC",toolbarSeriesTypeHLC:"HLC",toolbarSeriesTypeHighLow:"High Low",toolbarSeriesTypeCandles:"Candles",toolbarSeriesTypeHollowCandles:"Hollow Candles",toolbarSeriesTypeLine:"Line",toolbarSeriesTypeLineWithMarkers:"Line with Markers",toolbarSeriesTypeStepLine:"Step Line",toolbarAnnotationsTrendLine:"Trend Line",toolbarAnnotationsHorizontalLine:"Horizontal Line",toolbarAnnotationsVerticalLine:"Vertical Line",toolbarAnnotationsParallelChannel:"Parallel Channel",toolbarAnnotationsDisjointChannel:"Disjoint Channel",toolbarAnnotationsClearAll:"Clear All",toolbarAnnotationsColor:"Color",toolbarAnnotationsFillColor:"Fill Color",toolbarAnnotationsLineColor:"Line Color",toolbarAnnotationsLineStyle:"Line Style",toolbarAnnotationsLineStrokeWidth:"Line Stroke Width",toolbarAnnotationsSettings:"Settings",toolbarAnnotationsTextColor:"Text Color",toolbarAnnotationsTextSize:"Text Size",toolbarAnnotationsLock:"Lock",toolbarAnnotationsUnlock:"Unlock",toolbarAnnotationsDelete:"Delete",toolbarAnnotationsDragHandle:"Drag Toolbar",toolbarAnnotationsLineAnnotations:"Trend Lines",toolbarAnnotationsTextAnnotations:"Text Annotations",toolbarAnnotationsShapeAnnotations:"Arrows",toolbarAnnotationsMeasurerAnnotations:"Measurers",toolbarAnnotationsCallout:"Callout",toolbarAnnotationsComment:"Comment",toolbarAnnotationsNote:"Note",toolbarAnnotationsText:"Text",toolbarAnnotationsArrow:"Arrow",toolbarAnnotationsArrowUp:"Arrow Up",toolbarAnnotationsArrowDown:"Arrow Down",toolbarAnnotationsDateRange:"Date Range",toolbarAnnotationsPriceRange:"Price Range",toolbarAnnotationsDatePriceRange:"Date and Price",toolbarAnnotationsQuickDatePriceRange:"Measure",toolbarRange1Month:"1M",toolbarRange1MonthAria:"1 month",toolbarRange3Months:"3M",toolbarRange3MonthsAria:"3 months",toolbarRange6Months:"6M",toolbarRange6MonthsAria:"6 months",toolbarRangeYearToDate:"YTD",toolbarRangeYearToDateAria:"Year to date",toolbarRange1Year:"1Y",toolbarRange1YearAria:"1 year",toolbarRangeAll:"All",toolbarRangeAllAria:"All",toolbarZoomZoomOut:"Zoom out",toolbarZoomZoomIn:"Zoom in",toolbarZoomPanLeft:"Pan left",toolbarZoomPanRight:"Pan right",toolbarZoomPanStart:"Pan to the start",toolbarZoomPanEnd:"Pan to the end",toolbarZoomReset:"Reset the zoom",contextMenuDownload:"Download",contextMenuToggleSeriesVisibility:"Toggle Visibility",contextMenuToggleOtherSeries:"Toggle Other Series",contextMenuZoomToCursor:"Zoom to here",contextMenuPanToCursor:"Pan to here",dialogHeaderChannel:"Channel",dialogHeaderLine:"Line",dialogHeaderDateRange:"Date Range",dialogHeaderPriceRange:"Price Range",dialogHeaderDatePriceRange:"Date and Price",dialogHeaderText:"Text",dialogInputAlign:"Align",dialogInputColorPicker:"Color",dialogInputColorPickerAltText:"Text Color",dialogInputFillColorPicker:"Fill",dialogInputFillColorPickerAltText:"Fill Color",dialogInputExtendChannelStart:"Extend channel start",dialogInputExtendChannelEnd:"Extend channel end",dialogInputExtendLineStart:"Extend line start",dialogInputExtendLineEnd:"Extend line end",dialogInputExtendAbove:"Extend above",dialogInputExtendBelow:"Extend below",dialogInputExtendLeft:"Extend left",dialogInputExtendRight:"Extend right",dialogInputFontSize:"Size",dialogInputFontSizeAltText:"Font Size",dialogInputLineStyle:"Dash",dialogInputPosition:"Position",dialogInputStrokeWidth:"Weight",dialogInputStrokeWidthAltText:"Line Weight",inputTextareaPlaceholder:"Add Text",measurerDateRangeBars:"${value}[number] bars",measurerPriceRangeValue:"${value}[number]",measurerPriceRangePercent:"${value}[percent]",measurerVolume:"Vol ${value}"},lp=["bar","line","scatter"],hp=["delete-legacy","disjoint-channel","disjoint-channel-legacy","horizontal-line-legacy","line-color-legacy","lock","lock-legacy","pan-end-legacy","pan-left-legacy","pan-right-legacy","pan-start-legacy","parallel-channel","parallel-channel-legacy","reset-legacy","trend-line","trend-line-legacy","unlock","unlock-legacy","vertical-line","vertical-line-legacy","zoom-in-legacy","zoom-in-alt","zoom-in-alt-legacy","zoom-out-legacy","zoom-out-alt","zoom-out-alt-legacy"];var cp=(e=>(e.POINTER="pointer",e.NODE="node",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e))(cp||{});var dp={};rp(dp,{TimeInterval:()=>vp,day:()=>Gp,friday:()=>_p,hour:()=>Np,millisecond:()=>Cp,minute:()=>Lp,monday:()=>Hp,month:()=>Yp,saturday:()=>Kp,second:()=>Ap,sunday:()=>zp,thursday:()=>Up,tuesday:()=>Wp,utcDay:()=>eg,utcHour:()=>Jp,utcMinute:()=>Xp,utcMonth:()=>tg,utcYear:()=>ig,wednesday:()=>jp,year:()=>qp});var up=new Map;function pp(e,t){up.has(t)||(up.set(t,!0),e())}function gp(e){return e}function mp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;const{leading:s=!0,trailing:n=!0}=i??{};let r,o,a=!1;function l(){n&&o?(r=setTimeout(l,t),e(...o)):a=!1,o=null}return Object.assign((function(){for(var i=arguments.length,n=new Array(i),h=0;h<i;h++)n[h]=arguments[h];a?o=n:(a=!0,r=setTimeout(l,t),s?e(...n):o=n)}
2),{cancel(){clearTimeout(r),a=!1,o=null}})}pp.clear=()=>up.clear();var fp={log(){console.log(...arguments)},warn(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];console.warn(`AG Charts - ${e}`,...i)},error(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];"object"===typeof e?console.error("AG Charts error",e,...i):console.error(`AG Charts - ${e}`,...i)},table(){console.table(...arguments)},warnOnce(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];pp((()=>fp.warn(e,...i)),`Logger.warn: ${e}`)},errorOnce(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];pp((()=>fp.error(e,...i)),`Logger.error: ${e}`)}},vp=class{constructor(e,t,i){this._encode=e,this._decode=t,this._rangeCallback=i}floor(e){const t=new Date(e),i=this._encode(t);return this._decode(i)}ceil(e){const t=new Date(Number(e)-1),i=this._encode(t);return this._decode(i+1)}range(e,t,i){const s=this._rangeCallback?.(e,t),n=this._encode(i?this.floor(e):this.ceil(e)),r=this._encode(i?this.ceil(t):this.floor(t));if(r<n)return[];const o=[];for(let a=n;a<=r;a++){const e=this._decode(a);o.push(e)}return s?.(),o}},yp=class extends vp{getOffset(e,t){const i="number"===typeof e||e instanceof Date?this._encode(new Date(e)):0;return Math.floor(i)%t}every(e,t){let i,s=0;const n=e;n!==(e=Math.max(1,Math.round(e)))&&fp.warnOnce(`interval step of [${n}] rounded to [${e}].`);const{snapTo:r="start"}=t??{};if("string"===typeof r){const t=s;i=(i,n)=>{const o="start"===r?i:n;return s=this.getOffset(o,e),()=>s=t}}else"number"===typeof r?s=this.getOffset(new Date(r),e):r instanceof Date&&(s=this.getOffset(r,e));return new vp((t=>{const i=this._encode(t);return Math.floor((i-s)/e)}),(t=>this._decode(t*e+s)),i)}};var Cp=new yp((function(e){return e.getTime()}),(function(e){return new Date(e)})),Sp=Cp,wp=(new Date(0).getFullYear(),1e3),bp=6e4,xp=36e5,Mp=864e5,Dp=6048e5,Ip=2592e6,Rp=31536e6,Ep=(new Date).getTimezoneOffset()*bp;var Ap=new yp((function(e){return Math.floor((e.getTime()-Ep)/wp)}),(function(e){return new Date(Ep+e*wp)})),Tp=Ap,Pp=(new Date).getTimezoneOffset()*bp;var Lp=new yp((function(e){return Math.floor((e.getTime()-Pp)/bp)}),(function(e){return new Date(Pp+e*bp)})),Fp=Lp,kp=(new Date).getTimezoneOffset()*bp;var Np=new yp((function(e){return Math.floor((e.getTime()-kp)/xp)}),(function(e){return new Date(kp+e*xp)})),Op=Np;var Gp=new yp((function(e){const t=e.getTimezoneOffset()*bp;return Math.floor((e.getTime()-t)/Mp)}),(function(e){const t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t})),Bp=Gp;function Vp(e){const t=(7+e-4)%7;return new yp((function(e){const i=e.getTimezoneOffset()*bp;return Math.floor((e.getTime()-i)/Dp-t/7)}),(function(e){const i=new Date(1970,0,1);return i.setDate(i.getDate()+7*e+t),i}))}var zp=Vp(0),Hp=Vp(1),Wp=Vp(2),jp=Vp(3),Up=Vp(4),_p=Vp(5),Kp=Vp(6),$p=zp;var Yp=new yp((function(e){return 12*e.getFullYear()+e.getMonth()}),(function(e){const t=Math.floor(e/12);return new Date(t,e-12*t,1)})),Zp=Yp;var qp=new yp((function(e){return e.getFullYear()}),(function(e){const t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t})),Qp=qp;var Xp=new yp((function(e){return Math.floor(e.getTime()/bp)}),(function(e){return new Date(e*bp)}));var Jp=new yp((function(e){return Math.floor(e.getTime()/xp)}),(function(e){return new Date(e*xp)}));var eg=new yp((function(e){return Math.floor(e.getTime()/Mp)}),(function(e){const t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}));var tg=new yp((function(e){return 12*e.getUTCFullYear()+e.getUTCMonth()}),(function(e){const t=Math.floor(e/12),i=e-12*t;return new Date(Date.UTC(t,i,1))}));var ig=new yp((function(e){return e.getUTCFullYear()}),(function(e){const t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t})),sg={};rp(sg,{NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>qm,fromToMotion:()=>Qm,staticFromToMotion:()=>Xm});var ng=new Map;function rg(){ng.clear()}function og(e){const t=e.constructor,i=Object.hasOwn(t,"className")?t.className:t.name;if(!i)throw new Error(`The ${t} is missing the 'className' property.`);const s=(ng.get(i)??0)+1;return ng.set(i,s),`${i}-${s}`}function ag(){return crypto.randomUUID?.()??function(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;let t="";for(let i=0;i<e.length;i++)4!==i&&6!==i&&8!==i&&10!==i||(t+="-"),t+=e[i].toString(16).padStart(2,"0");return t}()}function*lg(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(const s of t)yield*s}function hg(e){return null!=e&&"object"===typeof e&&Symbol.iterator in e?e:[e]}var cg=Symbol("interpolate"),dg=e=>null!=e[cg];function ug(e,t,i){const s={nearest:void 0,distanceSquared:arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0};for(const n of i){const i=n.distanceSquared(e,t);if(0===i)return{nearest:n,distanceSquared:0};i<s.distanceSquared&&(s.nearest=n,s.distanceSquared=i)}return s}function pg(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0;const{x:n=e,y:r=t}=i.transformPoint?.(e,t)??{},o={nearest:void 0,distanceSquared:s};for(const a of i.children){const{nearest:e,distanceSquared:t}=a.nearestSquared(n,r,o.distanceSquared);if(0===t)return{nearest:e,distanceSquared:t};t<o.distanceSquared&&(o.nearest=e,o.distanceSquared=t)}return o}var gg={};function mg(e){return e?gg.document?.[e]:gg.document}function fg(e){return e?gg.window?.[e]:gg.window}
2function vg(e,t,i){const s=mg().createElement(e);if("object"===typeof t&&(i=t,t=void 0),t)for(const n of t.split(" "))s.classList.add(n);return i&&Object.assign(s.style,i),s}function yg(e,t){return mg().createElementNS(e,t)}function Cg(e,t){const{body:i}=mg(),s=vg("a",{display:"none"});s.href=e,s.download=t,i.appendChild(s),s.click(),setTimeout((()=>i.removeChild(s)))}function Sg(e){gg.document=e}function wg(e){gg.window=e}function bg(e,t){e&&(e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.left=`${t.x}px`,e.style.top=`${t.y}px`)}function xg(e){if(e.focus({preventScroll:!0}),null==e.lastChild?.textContent)return;const t=mg().createRange();t.setStart(e.lastChild,e.lastChild.textContent.length),t.setEnd(e.lastChild,e.lastChild.textContent.length);const i=fg().getSelection();i?.removeAllRanges(),i?.addRange(t)}"undefined"!==typeof window?gg.window=window:"undefined"!==typeof global&&(gg.window=global.window),"undefined"!==typeof document?gg.document=document:"undefined"!==typeof global&&(gg.document=global.document);var Mg=0;function Dg(e){return`${e??"ag-charts-element"}-${Mg++}`}function Ig(e,t,i){return Math.min(i,Math.max(e,t))}function Rg(e,t){const[i,s]=Eg(t);return Ig(i,e,s)}function Eg(e){if(0===e.length)return[];const t=[1/0,-1/0];for(const i of e)i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i);return t}function Ag(e){const[t,i]=Eg(e);return i-t}function Tg(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-10;return Math.abs(e-t)<i}function Pg(e){return-1===Math.sign(e)||Object.is(e,-0)}function Lg(e){const t=10**(arguments.length>1&&void 0!==arguments[1]?arguments[1]:2);return Math.round(e*t)/t}function Fg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const i=Math.floor(Math.log(Math.abs(e))/Math.LN10);return i>=0||!isFinite(i)?e.toFixed(t):e.toFixed(Math.abs(i)-1+t)}function kg(e,t){return Math.floor(e%t+(e<0?t:0))}function Ng(e){if(Math.floor(e)===e)return 0;let t=String(e),i=0;if(e<1e-6||e>=1e21){let e;[t,e]=t.split("e"),null!=e&&(i=Number(e))}const s=t.split(".")[1]?.length??0;return Math.max(s-i,0)}function Og(e,t){return t=t??fg("navigator").language,new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function Gg(e,t){return Og(e/100,t)}var Bg=class e{constructor(e,t,i,s){this.x=e,this.y=t,this.width=i,this.height=s}static fromDOMRect(t){let{x:i,y:s,width:n,height:r}=t;return new e(i,s,n,r)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON:()=>({})}}clone(){const{x:t,y:i,width:s,height:n}=this;return new e(t,i,s,n)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}containsPoint(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}intersection(t){if(!this.collidesBBox(t))return;const i=Ig(t.x,this.x,t.x+t.width),s=Ig(t.y,this.y,t.y+t.height),n=Ig(t.x,this.x+this.width,t.x+t.width),r=Ig(t.y,this.y+this.height,t.y+t.height);return new e(i,s,n-i,r-s)}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,t){if(this.containsPoint(e,t))return 0;const i=e-Ig(this.x,e,this.x+this.width),s=t-Ig(this.y,t,this.y+this.height);return i*i+s*s}static nearestBox(e,t,i){return ug(e,t,i)}clip(e){if(void 0===e)return this;const t=Math.max(this.x,e.x),i=Math.max(this.y,e.y),s=Math.min(this.x+this.width,e.x+e.width),n=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.y=i,this.width=Math.max(0,s-t),this.height=Math.max(0,n-i),this}shrink(e,t){const i=(e,t)=>{switch(e){case"top":this.y+=t;case"bottom":this.height-=t;break;case"left":this.x+=t;case"right":this.width-=t;break;case"vertical":this.y+=t,this.height-=2*t;break;case"horizontal":this.x+=t,this.width-=2*t;break;case void 0:this.x+=t,this.width-=2*t,this.y+=t,this.height-=2*t}};return"number"===typeof e?i(t,e):"object"===typeof e&&Object.entries(e).forEach((e=>{let[t,s]=e;return i(t,s)})),this}grow(e,t){if("number"===typeof e)this.shrink(-e,t);else{const t={...e};for(const e in t)t[e]*=-1;this.shrink(t)}return this}translate(e,t){return this.x+=e,this.y+=t,this}combine(e){const{x:t,y:i,width:s,height:n}=this;this.x=Math.min(t,e.x),this.y=Math.min(i,e.y),this.width=Math.max(t+s,e.x+e.width)-this.x,this.height=Math.max(i+n,e.y+e.height)-this.y}static merge(t){let i=1/0,s=1/0,n=-1/0,r=-1/0;for(const e of t)e.x<i&&(i=e.x),e.y<s&&(s=e.y),e.x+e.width>n&&(n=e.x+e.width),e.y+e.height>r&&(r=e.y+e.height);return new e(i,s,n-i,r-s)}[cg](t,i){return new e(this.x*(1-i)+t.x*i,this.y*(1-i)+t.y*i,this.width*(1-i)+t.width*i,this.height*(1-i)+t.height*i)}};Bg.zero=Object.freeze(new Bg(0,0,0,0)),Bg.NaN=Object.freeze(new Bg(NaN,NaN,NaN,NaN));var Vg=Bg,zg=(e=>(e[e.NONE=0]="NONE",e[e.TRIVIAL=1]="TRIVIAL",e[e.MINOR=2]="MINOR",e[e.MAJOR=3]="MAJOR",e))(zg||{});function Hg(e){return function(t,i){const s=`__${i}`;t[i]||function(e,t,i,s){const{redraw:n=1,type:r="normal",changeCb:o,convertor:a,checkDirtyOnAssignment:l=!1}=s??{},h={redraw:n,type:r,changeCb:o,checkDirtyOnAssignment:l,convertor:a};let c;switch(r){case"normal":c=function(e,t){const{redraw:i=1,changeCb:s}=t;return function(t){return t!==this[e]?(this[e]=t,this.markDirty(i),s?.(this),t):Wg}}(i,h);break;case"transform":c=function(e,t){const{redraw:i=1}=t;return function(t){return t!==this[e]?(this[e]=t,this.markDirtyTransform(i),t):Wg}}(i,h);break;case"path":c=function(e,t){const{redraw:i=1}=t;return function(t){return t!==this[e]?(this[e]=t,this._dirtyPath||(this._dirtyPath=!0,this.markDirty(i)),t):Wg}}(i,h)}c=function(e,t){const{checkDirtyOnAssignment:i}=t;if(i)return function(t){const i=e.call(this,t);return i!==Wg&&null!=t&&t._dirty>0&&this.markDirty(t._dirty),i};return e}(function(e,t){const{changeCb:i}=t;if(i)return function(t){const s=e.call(this,t);return s!==Wg&&i.call(this,this),s};return e}(function(e,t){const{convertor:i}=t;if(i)return function(t){e.call(this,i(t))};return e}(c,h),h),h);const d=function(){return this[i]};
2Object.defineProperty(e,t,{set:c,get:d,enumerable:!0,configurable:!0})}(t,i,s,e)}}var Wg=Symbol("no-change");var jg=(e=>(e[e.All=0]="All",e[e.None=1]="None",e))(jg||{}),Ug=class e{constructor(t){this.serialNumber=e._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0},this.id=og(this),this.pointerEvents=0,this._dirty=3,this.dirtyZIndex=!1,this.virtualChildrenCount=0,this.isContainerNode=!1,this.visible=!0,this.zIndex=0,this.zIndexSubOrder=void 0,this.name=t?.name,this.isVirtual=t?.isVirtual??!1,this.tag=t?.tag??NaN,this.zIndex=t?.zIndex??0}static*extractBBoxes(e,t){for(const i of e)if(!t||i.visible&&!i.transitionOut){const e=i.getBBox();e&&(yield e)}}get datum(){return this._datum??this.parentNode?.datum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum,this._datum=e)}get previousDatum(){return this._previousDatum}get layerManager(){return this._layerManager}get dirty(){return this._dirty}preRender(){this.childNodeCounts.groups=0,this.childNodeCounts.nonGroups=1;for(const e of this.children()){const t=e.preRender();this.childNodeCounts.groups+=t.groups,this.childNodeCounts.nonGroups+=t.nonGroups}return this.childNodeCounts}render(e){const{stats:t}=e;if(this._dirty=0,e.debugNodeSearch){const t=this.name??this.id;e.debugNodeSearch.some((e=>"string"===typeof e?e===t:e.test(t)))&&(e.debugNodes[this.name??this.id]=this)}t&&t.nodesRendered++}_setLayerManager(e){this._layerManager=e,this._debug=e?.debug;for(const t of this.children(!1))t._setLayerManager(e)}sortChildren(e){if(this.dirtyZIndex=!1,!this.childNodes)return;if(this.hasVirtualChildren())return;const t=[...this.childNodes].sort(e);this.childNodes.clear();for(const i of t)this.childNodes.add(i)}*traverseUp(e){let t=this;for(e&&(yield t);t=t.parentNode;)yield t}children(){var e=this;let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function*(){if(!e.childNodes)return;const i=[];for(const s of e.childNodes)t&&s.isVirtual?i.push(s.children()):yield s;for(const e of i)yield*e}()}*virtualChildren(){if(this.childNodes&&this.virtualChildrenCount)for(const e of this.childNodes)e.isVirtual&&(yield e)}hasVirtualChildren(){return this.virtualChildrenCount>0}isLeaf(){return!this.childNodes?.size}isRoot(){return!this.parentNode}append(e){this.childNodes??(this.childNodes=new Set);for(const t of hg(e))t.parentNode?.removeChild(t),this.childNodes.add(t),t.parentNode=this,t._setLayerManager(this.layerManager),t.isVirtual&&this.virtualChildrenCount++;this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty(3)}appendChild(e){return this.append(e),e}removeChild(e){return!!this.childNodes?.delete(e)&&(delete e.parentNode,e._setLayerManager(),e.
2isVirtual&&this.virtualChildrenCount--,this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty(3),!0)}remove(){return this.parentNode?.removeChild(this)??!1}clear(){for(const e of this.children(!1))delete e.parentNode,e._setLayerManager();this.childNodes?.clear(),this.invalidateCachedBBox(),this.virtualChildrenCount=0}destroy(){this.parentNode?.removeChild(this)}setProperties(e,t){if(t)for(const i of t)this[i]=e[i];else Object.assign(this,e);return this}containsPoint(e,t){return!1}pickNode(e,t){if(!this.visible||1===this.pointerEvents||!this.containsPoint(e,t))return;const i=[...this.children()];if(i.length>1e3)for(let s=i.length-1;s>=0;s--){const n=i[s],r=n.containsPoint(e,t)?n.pickNode(e,t):void 0;if(r)return r}else if(i.length)for(let s=i.length-1;s>=0;s--){const n=i[s].pickNode(e,t);if(n)return n}else if(!this.isContainerNode)return this}invalidateCachedBBox(){this.cachedBBox=void 0,this.parentNode?.invalidateCachedBBox()}getBBox(){return null==this.cachedBBox&&(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}markDirty(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const{_dirty:i}=this,s=i>e||i===e&&e===t;null==this.cachedBBox&&s||(this.invalidateCachedBBox(),this._dirty=Math.max(i,e),this.parentNode?this.parentNode.markDirty(t):this.layerManager&&this.layerManager.markDirty())}markClean(e){const{force:t=!1,recursive:i=!0}=e??{};if(0!==this._dirty||t){this._dirty=0;for(const e of this.children(!1))(e.isVirtual?!1!==i:!0===i)&&e.markClean({force:t})}}onVisibleChange(){}onZIndexChange(){this.parentNode&&(this.parentNode.dirtyZIndex=!0)}toSVG(){}};Ug._nextSerialNumber=0,op([Hg({redraw:3,changeCb:e=>e.onVisibleChange()})],Ug.prototype,"visible",2),op([Hg({redraw:1,changeCb:e=>e.onZIndexChange()})],Ug.prototype,"zIndex",2),op([Hg({redraw:1,changeCb:e=>e.onZIndexChange()})],Ug.prototype,"zIndexSubOrder",2);var _g=Ug,Kg=(e,t,i)=>e*(1-i)+t*i,$g=e=>{const t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*((i+.055)/1.055)**2.4},Yg=e=>{const t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*i**(1/2.4)-.055):12.92*e},Zg=class e{constructor(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.r=Ig(0,e||0,1),this.g=Ig(0,t||0,1),this.b=Ig(0,i||0,1),this.a=Ig(0,s||0,1)}static validColorString(t){return t.indexOf("#")>=0?!!e.parseHex(t):t.indexOf("rgb")>=0?!!e.stringToRgba(t):!!e.nameToHex[t.toLowerCase()]}static fromString(t){if(t.indexOf("#")>=0)return e.fromHexString(t);const i=e.nameToHex[t.toLowerCase()];if(i)return e.fromHexString(i);if(t.indexOf("rgb")>=0)return e.fromRgbaString(t);throw new Error(`Invalid color string: '${t}'`)}static parseHex(e){let t;switch((e=e.replace(/ /g,"").slice(1)).length){case 6:case 8:t=[];for(let i=0;i<e.length;i+=2)t.push(parseInt(`${e[i]}${e[i+1]}`,16));break;case 3:case 4:t=e.split("").map((e=>parseInt(e,16))).map((e=>e+16*e))}if(t?.length>=3&&t.every((e=>e>=0)))return 3===t.length&&t.push(255),t}static fromHexString(t){const i=e.parseHex(t);if(i){const[t,s,n,r]=i;return new e(t/255,s/255,n/255,r/255)}throw new Error(`Malformed hexadecimal color string: '${t}'`)}static stringToRgba(e){let t=-1,i=-1;for(let r=0;r<e.length;r++){const s=e[r];if(-1===t&&"("===s)t=r;else if(")"===s){i=r;break}}if(-1===t||-1===i)return;const s=e.substring(t+1,i).split(","),n=[];for(let r=0;r<s.length;r++){const e=s[r];let t=parseFloat(e);if(!Number.isFinite(t))return;e.indexOf("%")>=0?(t=Ig(0,t,100),t/=100):3===r?t=Ig(0,t,1):(t=Ig(0,t,255),t/=255),n.push(t)}return n}static fromRgbaString(t){const i=e.stringToRgba(t);if(i){if(3===i.length)return new e(i[0],i[1],i[2]);if(4===i.length)return new e(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${t}'`)}static fromArray(t){if(4===t.length)return new e(t[0],t[1],t[2],t[3]);if(3===t.length)return new e(t[0],t[1],t[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(t,i,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=e.HSBtoRGB(t,i,s);return new e(r[0],r[1],r[2],n)}static fromHSL(t,i,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=e.HSLtoRGB(t,i,s);return new e(r[0],r[1],r[2],n)}static fromOKLCH(t,i,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=e.OKLCHtoRGB(t,i,s);return new e(r[0],r[1],r[2],n)}static padHex(e){return 1===e.length?"0"+e:e}toHexString(){let t="#"+e.padHex(Math.round(255*this.r).toString(16))+e.padHex(Math.round(255*this.g).toString(16))+e.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(t+=e.padHex(Math.round(255*this.a).toString(16))),t}toRgbaString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;const t=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],i=Math.pow(10,e);return 1!==this.a?(t.push(Math.round(this.a*i)/i),`rgba(${t.join(", ")})`):`rgb(${t.join(", ")})`}toString(){return 1===this.a?this.toHexString():this.toRgbaString()}toHSB(){return e.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,t,i){const s=$g(e),n=$g(t),r=$g(i),o=Math.cbrt(.4122214708*s+.5363325363*n+.0514459929*r),a=Math.cbrt(.2119034982*s+.6806995451*n+.1073969566*r),l=Math.cbrt(.0883024619*s+.2817188376*n+.6299787005*r),h=.2104542553*o+.793617785*a-.0040720468*l,c=1.9779984951*o-2.428592205*a+.4505937099*l,d=.0259040371*o+.7827717662*a-.808675766*l,u=180*Math.atan2(d,c)/Math.PI;return[h,Math.hypot(c,d),u>=0?u:u+360]}static OKLCHtoRGB(e,t,i){const s=e,n=t*Math.cos(i*Math.PI/180),r=t*Math.sin(i*Math.PI/180),o=(s+.3963377774*n+.2158037573*r)**3,a=(s-.1055613458*n-.0638541728*r)**3,l=(s-.0894841775*n-1.291485548*r)**3,h=-1.2684380046*o+2.6097574011*a-.3413193965*l,c=-.0041960863*o-.7034186147*a+1.707614701*l;return[Yg(4.0767416621*o-3.3077115913*a+.2309699292*l),Yg(h),Yg(c)]}static RGBtoHSL(e,t,i){const s=Math.min(e,t,i),n=Math.max(e,t,i),r=(n+s)/2;let o,a;if(n===s)o=0,a=0;else{const l=n-s;a=r>.5?l/(2-n-s):l/(n+s),o=n===e?(t-i)/l+(t<i?6:0):n===t?(i-e)/l+2:(e-t)/l+4,o*=60}return[o,a,r]}static HSLtoRGB(e,t,i){if(0===t)return[i,i,i];const s=i<.5?i*(1+t):i+t-i*t,n=2*i-s;function r(e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+6*(s-n)*e:e<.5?s:e<2/3?n+(s-n)*(2/3-e)*6:n}return[r((e=(e%360+360)%360)/360+1/3),r(e/360),r(e/360-1/3)]}static RGBtoHSB(e,t,i){const s=Math.min(e,t,i),n=Math.max(e,t,i);let r=0;if(s!==n){const o=n-s,a=(n-e)/o,l=(n-t)/o,h=(n-i)/o;r=e===n?h-l:t===n?2+a-h:4+l-a,r/=6,r<0&&(r+=1)}return[360*r,0===n?0:(n-s)/n,n]}static HSBtoRGB(e,t,i){e=(e%360+360)%360/360;let s=0,n=0,r=0;if(0===t)s=n=r=i;else{const o=6*(e-Math.floor(e)),a=o-Math.floor(o),l=i*(1-t),h=i*(1-t*a),c=i*(1-t*(1-a));switch(o|0){case 0:s=i,n=c,r=l;break;case 1:s=h,n=i,r=l;break;case 2:s=l,n=i,r=c;break;case 3:s=l,n=h,r=i;break;case 4:s=c,n=l,r=i;break;case 5:s=i,n=l,r=h}}return[s,n,r]}static mix(t,i,s){return new e(Kg(t.r,i.r,s),Kg(t.g,i.g,s),Kg(t.b,i.b,s),Kg(t.a,i.a,s))}};Zg.nameToHex={__proto__:null,aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA5
25D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",transparent:"#00000000",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};var qg=Zg;function Qg(e,t){return i=>Number(e)*(1-i)+Number(t)*i}function Xg(e,t){if("string"===typeof e)try{e=qg.fromString(e)}catch(i){e=qg.fromArray([0,0,0])}if("string"===typeof t)try{t=qg.fromString(t)}catch(i){t=qg.fromArray([0,0,0])}return i=>qg.mix(e,t,i).toRgbaString()}var Jg=Symbol("BREAK"),em="__decorator_config";function tm(e,t){null==Object.getOwnPropertyDescriptor(e,em)&&Object.defineProperty(e,em,{value:{}});const i=e[em],s=t.toString();if("undefined"!==typeof i[s])return i[s];const n=new WeakMap;i[s]={setters:[],getters:[],observers:[],valuesMap:n};const r=Object.getOwnPropertyDescriptor(e,t),o=r?.set,a=r?.get;return Object.defineProperty(e,t,{set:function(e){const{setters:r,observers:l}=i[s];let h;r.some((e=>e.length>2))&&(h=a?a.call(this):n.get(this));for(const i of r)if((e=i(this,t,e,h))===Jg)return;o?o.call(this,e):n.set(this,e);for(const t of l)t(this,e,h)},get:function(){let e=a?a.call(this):n.get(this);for(const n of i[s].getters)if(e=n(this,t,e),e===Jg)return;return e},enumerable:!0,configurable:!1}),i[s]}function im(e,t,i){return(s,n)=>{const r=tm(s,n);r.setters.push(e),t&&r.getters.unshift(t),i&&Object.assign(r,i)}}function sm(e){return"undefined"!==typeof e&&em in e}function nm(e){const t=new Set;for(;sm(e);)t.add(e?.[em]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap((e=>Object.keys(e)))}function rm(e){return nm(e).reduce(((t,i)=>(t[i]=e[i]??null,t)),{})}function om(e){return null!=e}function am(e){return Array.isArray(e)}function lm(e){return"boolean"===typeof e}function hm(e){return e instanceof Date}function cm(e){return hm(e)&&!isNaN(Number(e))}function dm(e){return e instanceof RegExp}function um(e){return"function"===typeof e}function pm(e){return"object"===typeof e&&null!==e&&!am(e)}function gm(e){return am(e)||mm(e)}function mm(e){return"object"===typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function fm(e){return"string"===typeof e}function vm(e){return"number"===typeof e}function ym(e){return Number.isFinite(e)}function Cm(e){return"undefined"!==typeof window&&e instanceof HTMLElement}function Sm(e,t){return fm(t)&&Object.keys(e).includes(t)}function wm(e,t){return Object.values(e).includes(t)}function bm(e){return"symbol"===typeof e}function xm(e,t){return e.type!==t}function Mm(e,t,i){for(const s in t)if(!(s in e))return!1;for(const s in e){if(!(s in t))return!1;if(!i(e[s],t[s]))return!1}return!0}function Dm(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Im(...t.reverse())}function Im(){const e={};for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];for(const n of i){if(!pm(n))continue;const t=sm(n)?nm(n):Object.keys(n);for(const i of t)mm(e[i])&&mm(n[i])?e[i]=Im(e[i],n[i]):e[i]??(e[i]=n[i])}return e}function Rm(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return i&&am(e)?e.map((e=>Im(e,...i))):e}function Em(e,t){return Object.entries(e).reduce(((i,s)=>{let[n,r]=s;return i[n]=t(r,n,e),i}),{})}function Am(e,t){const i={...e};for(const s of t)delete i[s];return i}function Tm(e,t){return(am(t)?t:t.split(".")).reduce(((e,t)=>e[t]),e)}var Pm=new Set(["__proto__","constructor","prototype"]);function Lm(e,t,i){const s=am(t)?t.slice():t.split("."),n=s.pop();if(s.some((e=>Pm.has(e))))return;const r=s.reduce(((e,t)=>e[t]),e);return r[n]=i,r[n]}function Fm(e,t,i){if(void 0===i)return t;for(const s of e){const e=i[s];void 0!==e&&(t[s]=e)}return t}var km={};rp(km,{easeIn:()=>Om,easeInOut:()=>Bm,easeInOutQuad:()=>Hm,easeInQuad:()=>Vm,easeOut:()=>Gm,easeOutQuad:()=>zm,inverseEaseOut:()=>Wm,linear:()=>Nm});var Nm=e=>e,Om=e=>1-Math.cos(e*Math.PI/2),Gm=e=>Math.sin(e*Math.PI/2),Bm=e=>-(Math.cos(e*Math.PI)-1)/2,Vm=e=>e*e,zm=e=>1-(1-e)**2,Hm=e=>e<.5?2*e*e:1-(-2*e+2)**2/2,Wm=e=>2*Math.asin(e)/Math.PI,jm=.2,Um=["initial","remove","update","add","trailing","end","none"],_m={initial:{animationDuration:1,animationDelay:0},add:{animationDuration:.25,animationDelay:.75},remove:{animationDuration:.25,animationDelay:0},update:{animationDuration:.5,animationDelay:.25},trailing:{animationDuration:jm,animationDelay:1,skipIfNoEarlierAnimations:!0},end:{animationDelay:1.2,animationDuration:0,skipIfNoEarlierAnimations:!0},none:{animationDuration:0,animationDelay:0}},Km=(e=>(e.Loop="loop",e.Reverse="reverse",e))(Km||{});function $m(e){return e.every((e=>e instanceof _g))?{nodes:e,selections:[]}:{nodes:[],selections:e}}function Ym(e,t){return e===t||(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every(((e,i)=>Ym(e,t[i]))):dg(e)&&dg(t)?e.equals(t):!(!mm(e)||!mm(t))&&Mm(e,t,Ym))}var Zm=class{constructor(e){this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=e.id,this.groupId=e.groupId,this.autoplay=e.autoplay??!0,this.ease=e.ease??Nm,this.phase=e.phase;const t=e.duration??_m[this.phase].animationDuration;this.duration=t*e.defaultDuration,this.delay=(e.delay??0)*e.defaultDuration,this.onComplete=e.onComplete,this.onPlay=e.onPlay,this.onStop=e.onStop,this.onUpdate=e.onUpdate,this.interpolate=this.createInterpolator(e.from,e.to),this.from=e.from,!0===e.skip&&(this.onUpdate?.(e.to,!1,this),this.onStop?.(this),this.onComplete?.(this),this.isComplete=!0),!1!==e.collapsable&&(this.duration=this.checkCollapse(e,this.duration))}checkCollapse(e,t){return Ym(e.from,e.to)?0:t}play(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isPlaying||this.isComplete||(this.isPlaying=!0,this.onPlay?.(this),this.autoplay&&(this.autoplay=!1,e&&this.onUpdate?.(this.from,!0,this)))}pause(){this.isPlaying=!1}stop(){this.isPlaying=!1,this.isComplete||(this.isComplete=!0,this.onStop?.(this))}update(e){if(this.isComplete)return e;!this.isPlaying&&this.autoplay&&this.play(!0);const t=this.elapsed;if(this.elapsed+=e,this.delay>this.elapsed)return 0;const i=this.interpolate(this.isReverse?1-this.delta:this.delta);this.onUpdate?.(i,!1,this);const s=this.delay+this.duration;return this.elapsed>=s?(this.stop(),this.isComplete=!0,this.onComplete?.(this),e-(s-t)):0}get delta(){return this.ease(Ig(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(e,t){if("object"!==typeof t||dg(t))return this.interpolateValue(e,t);const i=[];for(const s in t){const n=this.interpolateValue(e[s],t[s]);null!=n&&i.push([s,n])}return e=>{const t={};for(const[s,n]of i)t[s]=n(e);return t}}interpolateValue(e,t){if(null!=e&&null!=t){if(dg(e))return i=>e[cg](t,i);try{switch(typeof e){case"number":return Qg(e,t);case"string":return Xg(e,t);case"boolean":if(e===t)return()=>e}}
2catch(i){}throw new Error(`Unable to interpolate values: ${e}, ${t}`)}}},qm={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"};function Qm(e,t,i,s,n,r,o){const{fromFn:a,toFn:l,applyFn:h=(e,t)=>e.setProperties(t)}=n,{nodes:c,selections:d}=$m(s),u=(s,n)=>{let c,d=0,u=0;for(const p of n){const g=s[d]===p,m={last:u>=n.length-1,lastLive:d>=s.length-1,prev:n[u-1],prevFromProps:c,prevLive:s[d-1],next:n[u+1],nextLive:s[d+(g?1:0)]},f=`${e}_${t}_${p.id}`;i.stopByAnimationId(f);let v="unknown";g?r&&o&&(v=Jm(p,p.datum,r,o)):v="removed",p.transitionOut="removed"===v;const{phase:y,start:C,finish:S,delay:w,duration:b,...x}=a(p,p.datum,v,m),{phase:M,start:D,finish:I,delay:R,duration:E,...A}=l(p,p.datum,v,m),T=null==S;i.animate({id:f,groupId:e,phase:y??M??"update",duration:b??E,delay:w??R,from:x,to:A,ease:Gm,collapsable:T,onPlay:()=>{h(p,{...C,...D,...x})},onUpdate(e){h(p,e)},onStop:()=>{h(p,{...C,...D,...x,...A,...S,...I})}}),g&&d++,u++,c=x}};let p=0;for(const g of d){const s=g.nodes();u(s.filter((e=>!g.isGarbage(e))),s),i.animate({id:`${e}_${t}_selection_${p}`,groupId:e,phase:"end",from:0,to:1,ease:Gm,onStop(){g.cleanup()}}),p++}u(c,c)}function Xm(e,t,i,s,n,r,o){const{nodes:a,selections:l}=$m(s),{start:h,finish:c,phase:d}=o;i.animate({id:`${e}_${t}`,groupId:e,phase:d??"update",from:n,to:r,ease:Gm,onPlay:()=>{if(h){for(const e of a)e.setProperties(h);for(const e of l)for(const t of e.nodes())t.setProperties(h)}},onUpdate(e){for(const t of a)t.setProperties(e);for(const t of l)for(const i of t.nodes())i.setProperties(e)},onStop:()=>{for(const e of a)e.setProperties({...r,...c});for(const e of l){for(const t of e.nodes())t.setProperties({...r,...c});e.cleanup()}}})}function Jm(e,t,i,s){const n=i(e,t);return s.added.has(n)?"added":s.removed.has(n)?"removed":"updated"}var ef=(e,t)=>{const i=Symbol(String(t));e[i]=void 0,Object.defineProperty(e,t,{get(){return this[i]},set(e){this[i]!==e&&(this[i]=e,this.invalid=!0)},enumerable:!0,configurable:!1})},tf=class e{constructor(t,i){this.invalid=!0,this.nice=!1,this.interval=void 0,this.tickCount=e.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=[],this.defaultClampMode="raw",this.domain=t,this.range=i}static is(t){return t instanceof e}transform(e){return e}transformInvert(e){return e}calcBandwidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t=this.getDomain(),i=this.getPixelRange(),s=Math.abs(t[1]-t[0])/e+1,n=Math.floor(i),r=Math.min(s,n);return i/Math.max(1,r)}getDomain(){return this.nice&&(this.refresh(),this.niceDomain.length)?this.niceDomain:this.domain}convert(e,t){const i=t?.clampMode??this.defaultClampMode;if(!this.domain||this.domain.length<2)return NaN;this.refresh();const s=this.getDomain().map((e=>this.transform(e))),[n,r]=s,{range:o}=this,[a,l]=o;if(e=this.transform(e),"clamped"===i){const[t,i]=Eg(s.map(Number));if(Number(e)<t)return a;
2if(Number(e)>i)return l}return n===r?(a+l)/2:e===n?a:e===r?l:a+(Number(e)-Number(n))/(Number(r)-Number(n))*(l-a)}invert(e){this.refresh();const t=this.getDomain().map((e=>this.transform(e))),[i,s]=t,{range:n}=this,[r,o]=n,a=r>o;let l;return e<(a?o:r)?a?s:i:e>(a?r:o)?a?i:s:(l=r===o?this.toDomain((Number(i)+Number(s))/2):this.toDomain(Number(i)+(e-r)/(o-r)*(Number(s)-Number(i))),this.transformInvert(l))}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&fp.warnOnce("Expected update to not invalidate scale"))}getPixelRange(){const[e,t]=this.range;return Math.abs(t-e)}};tf.defaultTickCount=5,tf.defaultMaxTickCount=6,op([ef],tf.prototype,"domain",2),op([ef],tf.prototype,"range",2),op([ef],tf.prototype,"nice",2),op([ef],tf.prototype,"interval",2),op([ef],tf.prototype,"tickCount",2),op([ef],tf.prototype,"minTickCount",2),op([ef],tf.prototype,"maxTickCount",2);var sf=tf;function nf(e){if(0===e.length)return null;let t=1/0,i=-1/0;for(let n of e)n instanceof Date&&(n=n.getTime()),"number"===typeof n&&(n<t&&(t=n),n>i&&(i=n));const s=[t,i];return s.every(isFinite)?s:null}function rf(e,t,i){let s=!1;return e.length>2&&(e=nf(e)??[NaN,NaN]),isNaN(t)||(s||(s=t>e[0]),e=[t,e[1]]),isNaN(i)||(s||(s=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{extent:e,clipped:s}}function of(e,t){if(null==e||null==t||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(Array.isArray(e[i])&&Array.isArray(t[i])){if(!of(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}function af(e){return"undefined"===typeof e?[]:Array.isArray(e)?e:[e]}function lf(e){return Array.from(new Set(e))}function hf(e,t){return e.reduce(((e,i)=>{const s=t(i);return e[s]??(e[s]=[]),e[s].push(i),e}),{})}function cf(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0===e.length)return[];const s=[];for(let n=0;n<t;n++)s.push(e.at((n+i)%e.length));return s}function df(e,t){const i=new Map;return t.forEach(((e,t)=>{i.set(e,t)})),e.sort(((e,t)=>(i.get(e)??1/0)-(i.get(t)??1/0)))}var uf={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function pf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date(e.getFullYear(),0,1);const i=e.getTimezoneOffset()-t.getTimezoneOffset(),s=e.getTime()-t.getTime()+6e4*i;return Math.floor(s/864e5)}function gf(e,t){const i=(t-new Date(e.getFullYear(),0,1).getDay()+7)%7,s=new Date(e.getFullYear(),0,i+1);return s<=e?Math.floor(pf(e,s)/7)+1:0}function mf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.getFullYear();const i=new Date(t,0,1).getDay(),s=new Date(t,0,(4-i+7)%7-3+1);return s<=e?Math.floor(pf(e,s)/7)+1:mf(e,t-1)}var ff={a:e=>uf.shortDays[e.getDay()],A:e=>uf.days[e.getDay()],b:e=>uf.shortMonths[e.getMonth()],B:e=>uf.months[e.getMonth()],c:"%x, %X",d:(e,t)=>yf(e.getDate(),2,t??"0"),e:"%_d",f:(e,t)=>yf(1e3*e.getMilliseconds(),6,t??"0"),H:(e,t)=>yf(e.getHours(),2,t??"0"),I:(e,t)=>{const i=e.getHours()%12;return 0===i?"12":yf(i,2,t??"0")},j:(e,t)=>yf(pf(e)+1,3,t??"0"),m:(e,t)=>
2yf(e.getMonth()+1,2,t??"0"),M:(e,t)=>yf(e.getMinutes(),2,t??"0"),L:(e,t)=>yf(e.getMilliseconds(),3,t??"0"),p:e=>e.getHours()<12?"AM":"PM",Q:e=>String(e.getTime()),s:e=>String(Math.floor(e.getTime()/1e3)),S:(e,t)=>yf(e.getSeconds(),2,t??"0"),u:e=>{let t=e.getDay();return t<1&&(t+=7),String(t%7)},U:(e,t)=>yf(gf(e,0),2,t??"0"),V:(e,t)=>yf(mf(e),2,t??"0"),w:(e,t)=>yf(e.getDay(),2,t??"0"),W:(e,t)=>yf(gf(e,1),2,t??"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(e,t)=>yf(e.getFullYear()%100,2,t??"0"),Y:(e,t)=>yf(e.getFullYear(),4,t??"0"),Z:e=>function(e){const t=e.getTimezoneOffset(),i=Math.abs(t);return`${t>0?"-":"+"}${yf(Math.floor(i/60),2,"0")}${yf(Math.floor(i%60),2,"0")}`}(e),"%":()=>"%"},vf={_:" ",0:"0","-":""};function yf(e,t,i){const s=String(Math.floor(e));return s.length>=t?s:`${i.repeat(t-s.length)}${s}`}function Cf(e){const t=[];for(;e.length>0;){let i=e.indexOf("%");if(0!==i){const s=i>0?e.substring(0,i):e;t.push(s)}if(i<0)break;const s=e[i+1],n=vf[s];null!=n&&i++;const r=e[i+1],o=ff[r];if("function"===typeof o)t.push([o,n]);else if("string"===typeof o){const e=Cf(o);t.push([e,n])}else t.push(`${n??""}${r}`);e=e.substring(i+2)}return e=>{const i="number"===typeof e?new Date(e):e;return t.map((e=>"string"===typeof e?e:e[0](i,e[1]))).join("")}}function Sf(e){return e instanceof Date?e.getTime():e}function wf(e,t,i){const s=Cf(bf(e,t,i));return e=>s(e)}function bf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=1/0;for(let a=1;a<e.length;a++)s=Math.min(s,Math.abs(e[a]-e[a-1]));const n=new Date(t[0]).getFullYear(),r=new Date(t.at(-1)).getFullYear()-n>0,o=isFinite(s)?function(e,t){if(e<wp)return 0;if(e<bp)return 1;if(e<xp)return 2;if(e<Mp)return 3;if(e<Dp)return 4;if(e<24192e5||e<26784e5&&function(e){let t=new Date(e[0]).getMonth();for(let i=1;i<e.length;i++){const s=new Date(e[i]).getMonth();if(t===s)return!0;t=s}return!1}(t))return 5;if(e<Rp)return 6;return 7}(s,e):function(e){if(Tp.floor(e)<e)return 0;if(Fp.floor(e)<e)return 1;if(Op.floor(e)<e)return 2;if(Bp.floor(e)<e)return 3;if(Zp.floor(e)<e)return $p.floor(e)<e?4:5;if(Qp.floor(e)<e)return 6;return 7}(e[0]);return function(e,t,i){const s=Sf(i[0]),n=Sf(i.at(-1)),r=Math.abs(n-s),o=t||7===e,a=[["hour",216e5,12096e5,3,"%I %p"],["hour",bp,216e5,3,"%I:%M"],["second",1e3,216e5,1,":%S"],["ms",0,216e5,0,".%L"],["am/pm",bp,216e5,3,"%p"]," ",["day",Mp,Dp,4,"%a"],["month",0===r?0:Dp,314496e5,5,"%b %d"],["month",3024e6,31536e7,6,"%B"]," ",["year",o?0:Rp,1/0,7,"%Y"]].filter((t=>{if("string"===typeof t)return!0;const[i,s,n,o]=t;return o>=e&&s<=r&&r<n})).reduce(((e,t)=>("string"===typeof t?e.result.push(t):e.used.has(t[0])||(e.result.push(t),e.used.add(t[0])),e)),{result:[],used:new Set}).result,l=a.findIndex((e=>"string"!==typeof e)),h=a.findLastIndex((e=>"string"!==typeof e));return a.slice(l,h+1).map((e=>"string"===typeof e?e:e[4])).join("").replaceAll(/\s+/g," ").trim()}(Math.max(o-i,0),r,e)}var xf=class e{constructor(){this.type="band",this.invalid=!0,this.range=[0,1],this.round=!1,this.interval=void 0,this.index=new Map,this.ordinalRange=[],this._domain=[],this._bandwidth=1,this._step=1,this._inset=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0}static is(t){return t instanceof e}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&fp.warnOnce("Expected update to not invalidate scale"))}set domain(e){this.index=new Map,this.invalid=!0,this._domain=[];for(const t of e){const e=Sf(t);void 0===this.getIndex(e)&&this.index.set(e,this._domain.push(t)-1)}}get domain(){return this._domain}getDomain(){return this._domain}ticks(){return this.refresh(),this._domain}convert(e){this.refresh();const t=this.getIndex(e);return null==t?NaN:this.ordinalRange[t]??NaN}invert(e){this.refresh();const t=this.ordinalRange.findIndex((t=>t===e));return this.domain[t]}invertNearest(e){this.refresh();let t=-1,i=1/0;const s=this.ordinalRange.findIndex(((s,n)=>{if(s===e)return!0;const r=Math.abs(e-s);return r<i&&(i=r,t=n),!1}));return this.domain[s]??this.domain[t]}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get inset(){return this.refresh(),this._inset}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=Ig(0,e,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this._paddingInner=Ig(0,e,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this._paddingOuter=Ig(0,e,1)}get paddingOuter(){return this._paddingOuter}update(){const e=this._domain.length;if(0===e)return;const[t,i]=this.range;let{_paddingInner:s}=this;const{_paddingOuter:n,round:r}=this,o=i-t;let a;1===e?(s=0,a=o*(1-2*n)):a=o/Math.max(1,e-s+2*n);const l=r?Math.floor(a):a;let h=t+(o-l*(e-s))/2,c=l*(1-s);r&&(h=Math.round(h),c=Math.round(c)),this._step=l,this._inset=h,this._bandwidth=c,this._rawBandwidth=a*(1-s),this.ordinalRange=this._domain.map(((e,t)=>h+l*t))}getIndex(e){return this.index.get(e instanceof Date?e.getTime():e)}};op([ef],xf.prototype,"range",2),op([ef],xf.prototype,"round",2),op([ef],xf.prototype,"interval",2);var Mf=xf,Df=class{set(e){const{className:t=this.constructor.name}=this.constructor;if("object"!==typeof e)return fp.warn(`unable to set ${t} - expecting a properties object`),this;const i=new Set(Object.keys(e));for(const s of nm(this))if(i.has(s)){const t=e[s],n=this;if(Rf(n[s]))if(n[s]instanceof If){const e=n[s].reset(t);null!=e?n[s]=e:fp.warn(`unable to set [${s}] - expecting a properties array`)}else n[s].set(t);else n[s]=t;i.delete(s)}for(const s of i)fp.warn(`unable to set [${s}] in ${t} - property is unknown`);return this}isValid(e){return nm(this).every((t=>{const{optional:i}=function(e,t){const i=t.toString();for(;sm(e);){const t=e[em];if(Object.hasOwn(t,i))return t[i];e=Object.getPrototypeOf(e)}}(this,t),s=!0===i||"undefined"!==typeof this[t];return s||fp.warnOnce(`${e??""}[${t}] is required.`),s}))}toJson(){return nm(this).reduce(((e,t)=>{const i=this[t];return e[t]=Rf(i)?i.toJson():i,e}),{})}},If=class e extends Array{constructor(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];super(i.length);const n=(r=e,Boolean(r?.prototype?.constructor?.name)?t=>(new e).set(t):e);var r;Object.defineProperty(this,"itemFactory",{value:n,enumerable:!1,
2configurable:!1}),this.set(i)}set(e){if(am(e)){this.length=e.length;for(let t=0;t<e.length;t++)this[t]=this.itemFactory(e[t])}return this}reset(t){if(Array.isArray(t))return new e(this.itemFactory,...t)}toJson(){return this.map((e=>e?.toJson?.()??e))}};function Rf(e){return e instanceof Df||e instanceof If}function Ef(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{optional:i=!1,property:s}=t;return im(((n,r,o)=>{const a={...t,target:n,property:r};if(i&&"undefined"===typeof o||e(o,a))return Rf(n[r])&&!Rf(o)?(n[r].set(o),n[r]):o;const l=s??String(r).replace(/^_*/,""),h=n.constructor.className??n.constructor.name.replace(/Properties$/,"");let c=Iv(o);if(null!=c&&c.length>50){const e=c.length-50;c=c.slice(0,50)+`... (+${e} characters)`}return fp.warn(`Property [${l}] of [${h}] cannot be set to [${c}]${e.message?`; expecting ${Mv(e,a)}`:""}, ignoring.`),Jg}),void 0,{optional:i})}var Af,Tf=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const s=[];return xv(((e,i)=>(s.length=0,t.every((t=>{const n=t(e,i);return n||s.push(Mv(t,i)),n})))),(()=>s.filter(Boolean).join(" AND ")))},Pf=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return xv(((e,i)=>t.some((t=>t(e,i)))),(e=>t.map(function(e){return t=>Mv(t,e)}(e)).filter(Boolean).join(" OR ")))},Lf=Dv(xv(((e,t)=>Rf(e)||pm(e)&&Rf(t.target[t.property])),"a properties object")),Ff=Dv(xv((e=>pm(e)),"an object")),kf=xv(lm,"a boolean"),Nf=xv(um,"a function"),Of=xv(fm,"a string"),Gf=(Af=xv(ym,"a number"),Object.assign(Af,{restrict(){let{min:e,max:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=["a number"],s=vm(e),n=vm(t);return s&&n?i.push(`between ${e} and ${t} inclusive`):s?i.push(`greater than or equal to ${e}`):n&&i.push(`less than or equal to ${t}`),xv((i=>ym(i)&&(!s||i>=e)&&(!n||i<=t)),i.join(" "))}})),Bf=xv((e=>vm(e)&&!isNaN(e)),"a real number"),Vf=xv((e=>vm(e)&&isNaN(e)),"NaN"),zf=Gf.restrict({min:0}),Hf=Gf.restrict({min:0,max:1}),Wf=Gf.restrict({min:-360,max:360}),jf=Pf(Gf,Vf),Uf=function(e){return Object.assign(e,{restrict(){let{length:e,minLength:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i="an array";return vm(t)&&t>0?i="a non-empty array":vm(e)&&(i=`an array of length ${e}`),xv((i=>am(i)&&(!vm(e)||i.length===e)&&(!vm(t)||i.length>=t)),i)}})}(xv(am,"an array")),_f=(e,t)=>xv(((t,i)=>am(t)&&t.every((t=>e(t,i)))),(e=>{const i=Mv(Uf,e)??"";return t?`${i} of ${t}`:i})),Kf=e=>ym(e)||cm(e),$f=e=>xv(((t,i)=>!Kf(t)||!Kf(i.target[e])||t<i.target[e]),`to be less than ${e}`),Yf=e=>xv(((t,i)=>!Kf(t)||!Kf(i.target[e])||t>i.target[e]),`to be greater than ${e}`),Zf=xv(cm,"Date object"),qf=Pf(Zf,zf),Qf="A color string can be in one of the following formats to be valid: #rgb, #rrggbb, rgb(r, g, b), rgba(r, g, b, a) or a CSS color name such as 'white', 'orange', 'cyan', etc",Xf=xv((e=>fm(e)&&qg.validColorString(e)),`color String. ${Qf}`),Jf=xv(_f(Xf),`color strings. ${Qf}`),ev=_f(kf,"boolean values"),tv=_f(Gf,"numbers"),iv=_f(Of,"strings"),sv=xv(_f(Zf),"Date objects"),nv=xv(_f(Lf),"objects"),rv=Sv(["butt","round","square"],"a line cap"),ov=Sv(["round","bevel","miter"],"a line join"),av=Sv(["solid","dashed","dotted"],"a line style"),lv=xv(_f(zf),"numbers specifying the length in pixels of alternating dashes and gaps, for example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels."),hv=Sv(["top","right","bottom","left"],"a position"),cv=Sv(["normal","italic","oblique"],"a font style"),dv=Pf(Sv(["normal","bold","bolder","lighter"],"a font weight"),Gf.restrict({min:1,max:1e3})),uv=Sv(["never","always","hyphenate","on-space"],"a text wrap strategy"),pv=Sv(["left","center","right"],"a text align"),gv=Sv(["top","middle","bottom"],"a vertical align"),mv=Sv(["ellipsis","hide"],"an overflow strategy"),fv=Sv(["horizontal","vertical"],"a direction"),vv=Sv(["inside","outside"],"a placement"),yv=Pf(Sv(["exact","nearest"],"interaction range"),Gf),Cv=Sv(["top","bottom","left","right"]);function Sv(e){return xv(((t,i)=>{const s=e.find((e=>{const i="string"===typeof e?e:e.value;return t===i}));if(null==s)return!1;if("string"!==typeof s&&(!0===s.deprecated||null!=s.deprecatedTo)){const e=[`Property [%s] with value '${s.value}' is deprecated.`];s.deprecatedTo&&e.push(`Use ${s.deprecatedTo} instead.`),fp.warnOnce(e.join(" "),i.property)}return!0}),`${arguments.length>1&&void 0!==arguments[1]?arguments[1]:"a"} keyword such as ${function(e){const t=e.filter((e=>"string"===typeof e||!0!==e.undocumented)).map((e=>`'${"string"===typeof e?e:e.value}'`));if(1===t.length)return t[0];const i=t.pop();return`${t.join(", ")} or ${i}`}(e)}`)}var wv=Pf(Tf(Gf.restrict({min:1}),$f("maxSpacing")),Vf),bv=Pf(Tf(Gf.restrict({min:1}),Yf("minSpacing")),Vf);function xv(e,t){return e.message=t,e}function Mv(e,t){return um(e.message)?e.message(t):e.message}function Dv(e){return Object.assign(e,{restrict:t=>xv((e=>e instanceof t),(i=>Mv(e,i)??`an instance of ${t.name}`))})}function Iv(e){if("number"===typeof e){if(isNaN(e))return"NaN";if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity"}return JSON.stringify(e)}var Rv=(e=>(e.X="x",e.Y="y",e))(Rv||{}),Ev=class{constructor(){this.moduleMap=new Map}
2*modules(){for(const e of this.moduleMap.values())yield e.moduleInstance}addModule(e,t){if(this.moduleMap.has(e.optionsKey))throw new Error(`AG Charts - module already initialised: ${e.optionsKey}`);this.moduleMap.set(e.optionsKey,{module:e,moduleInstance:t(e)})}removeModule(e){const t=fm(e)?e:e.optionsKey;this.moduleMap.get(t)?.moduleInstance.destroy(),this.moduleMap.delete(t)}getModule(e){return this.moduleMap.get(fm(e)?e:e.optionsKey)?.moduleInstance}isEnabled(e){return this.moduleMap.has(fm(e)?e:e.optionsKey)}mapModules(e){return Array.from(this.moduleMap.values(),((t,i)=>e(t.moduleInstance,i)))}destroy(){for(const e of this.moduleMap.keys())this.moduleMap.get(e)?.moduleInstance.destroy();this.moduleMap.clear()}},Av={};function Tv(e,t){const{nodes:i,selections:s}=$m(e);for(const n of s){for(const e of n.nodes()){const i=t(e,e.datum);e.setProperties(i)}n.cleanup()}for(const n of i){const e=t(n,n.datum);n.setProperties(e)}}function Pv(e){let t,i;const s=kv.exec(e);s&&([,t,e,i]=s);const n=Fv.exec(e);if(!n)throw new Error(`The number formatter is invalid: ${e}`);const[,r,o,a,l,h,c,d,u,p,g]=n;return{fill:r,align:o,sign:a,symbol:l,zero:h,width:parseInt(c),comma:d,precision:parseInt(u),trim:Boolean(p),type:g,prefix:t,suffix:i}}function Lv(e){const t="string"===typeof e?Pv(e):e,{fill:i,align:s,sign:n="-",symbol:r,zero:o,width:a,comma:l,type:h,prefix:c="",suffix:d="",precision:u}=t;let{trim:p}=t;const g=null==u||isNaN(u);let m,f;if(h)if(h in Ov&&h in Nv)m=g?Nv[h]:Ov[h];else if(h in Ov)m=Ov[h];else{if(!(h in Nv))throw new Error(`The number formatter type is invalid: ${h}`);m=Nv[h]}else m=Ov.g,p=!0;return f=null==u||g?h?6:12:u,e=>{let t=m(e,f);return p&&(t=t.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")),l&&(t=function(e,t){let i=e.indexOf(".");i<0&&(i=e.length);const s=e.substring(0,i).split(""),n=e.substring(i);for(let r=s.length-3;r>0;r-=3)s.splice(r,0,t);return`${s.join("")}${n}`}(t,l)),t=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if("("===i)return e>=0?t:`(${t})`;const s="+"===i?"+":"";return`${e>=0?s:zv}${t}`}(e,t,n),r&&"#"!==r&&(t=`${r}${t}`),"#"===r&&"x"===h&&(t=`0x${t}`),"s"===h&&(t=`${t}${function(e){return Vv[Wv(e)]}(e)}`),"%"!==h&&"p"!==h||(t=`${t}%`),null==a||isNaN(a)||(t=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:">",n=e;if(">"!==s&&s){if("<"===s)n=n.padEnd(t,i);else if("^"===s){const e=Math.max(0,t-n.length),s=Math.ceil(e/2),r=Math.floor(e/2);n=n.padStart(s+n.length,i),n=n.padEnd(r+n.length,i)}}else n=n.padStart(t,i);return n}(t,a,i??o,s)),t=`${c}${t}${d}`,t}}rp(Av,{resetMotion:()=>Tv});var Fv=/^(?:(.)?([<>=^]))?([+\-( ])?([$\u20ac\xa3\xa5\u20a3\u20b9#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,kv=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/,Nv={b:e=>Hv(e).toString(2),c:e=>String.fromCharCode(e),d:e=>Math.round(Math.abs(e)).toFixed(0),o:e=>Hv(e).toString(8),x:e=>Hv(e).toString(16),X:e=>Nv.x(e).toUpperCase(),n:e=>Nv.d(e),"%":e=>`${Hv(100*e).toFixed(0)}`},Ov={e:(e,t)=>Math.abs(e).toExponential(t),E:(e,t)=>Ov.e(e,t).toUpperCase(),f:(e,t)=>Math.abs(e).toFixed(t),F:(e,t)=>Ov.f(e,t).toUpperCase(),g:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),s=Math.floor(Math.log10(i));return s>=-4&&s<t?i.toFixed(t-1-s):i.toExponential(t-1)},G:(e,t)=>Ov.g(e,t).toUpperCase(),n:(e,t)=>Ov.g(e,t),p:(e,t)=>Ov.r(100*e,t),r:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),s=Math.floor(Math.log10(i))-(t-1);if(s<=0)return i.toFixed(-s);const n=10**s;return(Math.round(i/n)*n).toFixed()},s:(e,t)=>{const i=Wv(e);return Ov.r(e/10**i,t)},"%":(e,t)=>Ov.f(100*e,t)},Gv=-24,Bv=24,Vv={[Gv]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"\xb5",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",[Bv]:"Y"},zv="\u2212";function Hv(e){return Math.floor(Math.abs(e))}function Wv(e){return Ig(Gv,e?3*Math.floor(Math.log10(Math.abs(e))/3):0,Bv)}var jv=(e,t,i)=>({duration:t*i,timeInterval:e,step:i}),Uv=[jv(Tp,wp,1),jv(Tp,wp,5),jv(Tp,wp,15),jv(Tp,wp,30),jv(Fp,bp,1),jv(Fp,bp,5),jv(Fp,bp,15),jv(Fp,bp,30),jv(Op,xp,1),jv(Op,xp,3),jv(Op,xp,6),jv(Op,xp,12),jv(Bp,Mp,1),jv(Bp,Mp,2),jv($p,Dp,1),jv($p,Dp,2),jv($p,Dp,3),jv(Zp,Ip,1),jv(Zp,Ip,2),jv(Zp,Ip,3),jv(Zp,Ip,4),jv(Zp,Ip,6),jv(Qp,Rp,1)],_v=[1,2,5,10];function Kv(e,t){return Math.abs(Math.round(e)-e)<t}function $v(e,t,i,s,n){if(i<2)return[e,t];const r=Zv(e,t,i,s,n);return Number.isFinite(r)?(Kv(e/r,1e-12)||(e=Math.ceil(e/r)*r),Kv(t/r,1e-12)||(t=Math.floor(t/r)*r),Xv(e,t,r)):[]}function Yv(e,t,i,s,n,r){const o=r??Math.abs(t-e)/Math.max(i,1);let a=0;for(const u of Uv){if(o<=u.duration)break;a++}if(0===a){const r=Math.max(Zv(e,t,i,s,n),1);return Sp.every(r)}if(a===Uv.length){const o=null==r?Zv(e/Rp,t/Rp,i,s,n):1;return Qp.every(o)}const l=Uv[a-1],h=Uv[a],{timeInterval:c,step:d}=o-l.duration<h.duration-o?l:h;return c.every(d)}function Zv(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1/0;
2if(e===t)return Ig(1,s,n);if(i<1)return NaN;const r=Math.abs(t-e),o=10**Math.floor(Math.log10(r/i));let a=NaN,l=1/0,h=!1;for(const c of _v){const e=Math.ceil(r/(c*o)),t=e>=s&&e<=n;if(h&&!t)continue;const d=Math.abs(e-i);(l>d||h!==t)&&(h||(h=t),l=d,a=c)}return a*o}function qv(e){for(let t=e.length-1;t>=0;t-=1)if("0"!==e[t])return t+1;return 0}function Qv(e,t){const i=Pv(t??",f");(null==i.precision||isNaN(i.precision))&&(!i.type||"eEFgGnprs".includes(i.type)?i.precision=Math.max(...e.map((e=>{if(!Number.isFinite(e))return 0;const[t,s]=e.toExponential((i.type?6:12)-1).split(/\.|e/g);return("1"!==t&&"-1"!==t?1:0)+qv(s)+1}))):"f%".includes(i.type)&&(i.precision=Math.max(...e.map((e=>{if(!Number.isFinite(e)||0===e)return 0;const t=Math.floor(Math.log10(Math.abs(e))),s=i.type?6:12,n=qv(e.toExponential(s-1).split(/\.|e/g)[1]);return Math.max(0,n-t)})))));const s=Lv(i);return e=>s(Number(e))}function Xv(e,t,i){if(!Number.isFinite(i)||i<=0)return[];const s=10**Ng(i),n=Math.min(e,t),r=Math.max(e,t),o=[];for(let a=0;;a+=1){const e=Math.round((n+i*a)*s)/s;if(!(e<=r))break;o.push(e)}return o}function Jv(e,t){return e>=t&&(fp.warnOnce("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0)}var ey=class e extends sf{constructor(){super([1,10],[0,1]),this.type="log",this.base=10,this.baseLog=gp,this.basePow=gp,this.log=e=>Math.min(...this.domain)>=0?this.baseLog(e):-this.baseLog(-e),this.pow=e=>Math.min(...this.domain)>=0?this.basePow(e):-this.basePow(-e),this.defaultClampMode="clamped"}toDomain(e){return e}transform(e){return Math.min(...this.domain)>=0?Math.log(e):-Math.log(-e)}transformInvert(e){return Math.min(...this.domain)>=0?Math.exp(e):-Math.exp(-e)}refresh(){this.base<=0&&(this.base=0,fp.warnOnce("expecting a finite Number greater than to 0")),super.refresh()}update(){!this.domain||this.domain.length<2||(this.baseLog=e.getBaseLogMethod(this.base),this.basePow=e.getBasePowerMethod(this.base),this.nice&&this.updateNiceDomain())}updateNiceDomain(){const[e,t]=this.domain,i=e>t?Math.ceil:Math.floor,s=e>t?Math.floor:Math.ceil,n=this.pow(i(this.log(e))),r=this.pow(s(this.log(t)));this.niceDomain=[n,r]}ticks(){const e=this.tickCount??10;if(!this.domain||this.domain.length<2||e<1)return[];this.refresh();const t=this.base,[i,s]=this.getDomain(),n=Math.min(i,s),r=Math.max(i,s);let o=this.log(n),a=this.log(r);if(this.interval){const e=e=>e>=n&&e<=r,t=Xv(o,a,Math.min(Math.abs(this.interval),Math.abs(a-o))).map(this.pow).filter(e);if(!Jv(t.length,this.getPixelRange()))return t}if(!(t%1===0)||a-o>=e)return $v(o,a,Math.min(a-o,e)).map(this.pow);const l=[],h=n>0;o=Math.floor(o)-1,a=Math.round(a)+1;const c=Ag(this.range)/e;let d=1/0;for(let u=o;u<=a;u++){const e=this.convert(this.pow(u+1));for(let i=1;i<t;i++){const s=h?i:t-i+1,o=this.pow(u)*s,a=this.convert(o),p=Math.abs(d-a),g=Math.abs(a-e);o>=n&&o<=r&&(1===i||p>=c&&g>=c||0===l.length)&&(l.push(o),d=a)}}return l}tickFormat(e){let{count:t,ticks:i,specifier:s}=e;return t!==1/0&&null==i&&this.ticks(),s??(s=10===this.base?".0e":","),fm(s)?Lv(s):s}static getBaseLogMethod(e){switch(e){case 10:return Math.log10;case Math.E:return Math.log;case 2:return Math.log2;default:return t=>Math.log(t)/Math.log(e)}}static getBasePowerMethod(e){switch(e){case 10:return e=>e>=0?10**e:1/10**-e;case Math.E:return Math.exp;default:return t=>e**t}}};op([ef],ey.prototype,"base",2);var ty=ey,iy=class e extends sf{constructor(){super([],[0,1]),this.type="time"}toDomain(e){return new Date(e)}convert(e,t){return super.convert(new Date(e),t)}invert(e){return new Date(super.invert(e))}ticks(){if(!this.domain||this.domain.length<2)return[];this.refresh();const{interval:t,nice:i,tickCount:s,minTickCount:n,maxTickCount:r}=this,[o,a]=Eg(this.getDomain().map(Sf));return null!=t?e.getTicksForInterval({start:o,stop:a,interval:t,availableRange:this.getPixelRange()})??e.getDefaultTicks({start:o,stop:a,tickCount:s,minTickCount:n,maxTickCount:r}):i&&2===s?this.niceDomain:i&&1===s?this.niceDomain.slice(0,1):e.getDefaultTicks({start:o,stop:a,tickCount:s,minTickCount:n,maxTickCount:r})}static getDefaultTicks(e){let{start:t,stop:i,tickCount:s,minTickCount:n,maxTickCount:r}=e;const o=Yv(t,i,s,n,r);return o?o.range(new Date(t),new Date(i)):[]}static getTicksForInterval(e){let{start:t,stop:i,interval:s,availableRange:n}=e;if(!s)return[];if(s instanceof vp){const e=s.range(new Date(t),new Date(i));if(Jv(e.length,n))return;return e}const r=Math.abs(s);if(Jv((i-t)/r,n))return;const o=Uv.findLast((e=>r%e.duration===0));if(o){return o.timeInterval.every(r/(o.duration/o.step)).range(new Date(t),new Date(i))}let a=new Date(t);const l=new Date(i),h=[];for(;a<=l;)h.push(a),a=new Date(a),a.setMilliseconds(a.getMilliseconds()+r);return h}tickFormat(e){let{ticks:t,domain:i,specifier:s,formatOffset:n}=e;return null==s?wf(t,i,n):Cf(s)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}updateNiceDomain(){let[e,t]=this.domain;for(let i=0;i<4;i++){this.updateNiceDomainIteration(e,t);const[i,s]=this.niceDomain;if(Sf(e)===Sf(i)&&Sf(t)===Sf(s))break;e=i,t=s}}updateNiceDomainIteration(e,t){const i=Math.min(Sf(e),Sf(t)),s=Math.max(Sf(e),Sf(t)),n=e>t,{interval:r}=this;let o;if(r instanceof vp)o=r;else{o=Yv(i,s,"number"===typeof r?(s-i)/Math.max(r,1):this.tickCount,this.minTickCount,this.maxTickCount)}if(o){const e=o.range(new Date(i),new Date(s),!0),t=n?[...e].reverse():e,r=t[0],a=t.at(-1);this.niceDomain=[r,a]}}};function sy(e,t){return e-t}var ny=class e extends Mf{constructor(){super(...arguments),this.type="ordinal-time",this.tickCount=sf.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.interval=void 0,this._domain=[],this.timestamps=[],this.sortedTimestamps=[],this.visibleRange=[0,1]}static is(t){return t instanceof e}setVisibleRange(e){this.visibleRange=e}set domain(e){this.invalid=!0,0!==e.length?(this._domain=e,this.timestamps=lf(e.map(Sf)),this.sortedTimestamps=this.timestamps.slice().sort(sy)):this._domain=[]}get domain(){return this._domain}ticks(){this.refresh();const[e,t]=[this.timestamps[0],this.timestamps.at(-1)],i=Math.min(e,t),s=Math.max(e,t),n=e>t;let r;if(null==this.interval)r=this.getDefaultTicks(this.maxTickCount,n);else{const[e,t]=this.range,n=Math.abs(t-e);r=iy.getTicksForInterval({start:i,stop:s,interval:this.interval,availableRange:n})??[]}const o=new Set;return r.filter((e=>{const t=this.convert(e);return!isNaN(t)&&!o.has(t)&&(o.add(t),!0)}))}getDefaultTicks(e,t){const i=[],s=this.timestamps.length,n=Math.ceil(s*(this.visibleRange[1]-this.visibleRange[0])/e),r=Math.floor(n/2);for(const[o,a]of this.timestamps.entries())n>0&&(o+r)%n||(t?i.push(new Date(this.timestamps[s-o-1])):i.push(new Date(a)));return i}convert(e){this.refresh();const t=Number(e);if(t<this.sortedTimestamps[0])return NaN;let i=this.findInterval(t);return this.timestamps[0]!==this.sortedTimestamps[0]&&(i=this.timestamps.length-i-1),this.ordinalRange[i]??NaN}findInterval(e){const{sortedTimestamps:t}=this;let i=0,s=t.length-1;for(;i<=s;){const n=Math.floor((i+s)/2);if(t[n]===e)return n;t[n]<e?i=n+1:s=n-1}return i}tickFormat(e){let{ticks:t,domain:i,specifier:s}=e;return null==s?wf(t,i):Cf(s)}invert(e){this.refresh();const t=this.ordinalRange.findIndex((t=>e<=t));return this.domain[t]}invertNearest(e){return new Date(super.invertNearest(e))}};op([ef],ny.prototype,"tickCount",2),op([ef],ny.prototype,"minTickCount",2),op([ef],ny.prototype,"maxTickCount",2),op([ef],ny.prototype,"interval",2);var ry=ny;function oy(e,t){return"number"===typeof e&&"number"===typeof t?e-t:"string"===typeof e&&"string"===typeof t?e.localeCompare(t):null==e&&null==t?0:null==e?-1:null==t?1:String(e).localeCompare(String(t))}function ay(e){return"function"===typeof e?e():e}function ly(e,t,i){for(const s in e){const n=i(ay(e[s]),ay(t[s]));if(0!==n)return n}return 0}function hy(e){let t=1,i=e.visible?1:0,s=e.dirty>0?1:0;for(const n of e.children(!1)){const e=hy(n);t+=e.count,s+=e.dirtyCount,i+=e.visibleCount}return{count:t,visibleCount:i,dirtyCount:s}}var cy=Object.freeze([1,0,0,1,0,0]);function dy(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-8;return e===t||Math.abs(t-e)<i}var uy=class e{get e(){return[...this.elements]}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[...cy];this.elements=e}setElements(e){const t=this.elements;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],this}get identity(){const e=this.elements;return dy(e[0],1)&&dy(e[1],0)&&dy(e[2],0)&&dy(e[3],1)&&dy(e[4],0)&&dy(e[5],0)}AxB(e,t,i){const s=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],r=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],a=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];(i=i??e)[0]=s,i[1]=n,i[2]=r,i[3]=o,i[4]=a,i[5]=l}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(t){const i=new Array(6);return t instanceof e?this.AxB(this.elements,t.elements,i):this.AxB(this.elements,[t.a,t.b,t.c,t.d,t.e,t.f],i),new e(i)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){const t=this.elements;let i=t[0],s=t[1],n=t[2],r=t[3];const o=t[4],a=t[5],l=1/(i*r-s*n);return i*=l,s*=l,n*=l,r*=l,new e([r,-s,-n,i,n*a-r*o,s*o-i*a])}inverseTo(e){const t=this.elements;let i=t[0],s=t[1],n=t[2],r=t[3];const o=t[4],a=t[5],l=1/(i*r-s*n);return i*=l,s*=l,n*=l,r*=l,e.setElements([r,-s,-n,i,n*a-r*o,s*o-i*a]),this}invertSelf(){const e=this.elements;let t=e[0],i=e[1],s=e[2],n=e[3];const r=e[4],o=e[5],a=1/(t*n-i*s);return t*=a,i*=a,s*=a,n*=a,e[0]=n,e[1]=-i,e[2]=-s,e[3]=t,e[4]=s*o-n*r,e[5]=i*r-t*o,this}transformPoint(e,t){const i=this.elements;return{x:e*i[0]+t*i[2]+i[4],y:e*i[1]+t*i[3]+i[5]}}transformBBox(e,t){const i=this.elements,s=i[0],n=i[1],r=i[2],o=i[3],a=.5*e.width,l=.5*e.height,h=e.x+a,c=e.y+l,d=Math.abs(a*s)+Math.abs(l*r),u=Math.abs(a*n)+Math.abs(l*o);return t??(t=new Vg(0,0,0,0)),t.x=h*s+c*r+i[4]-d,t.y=h*n+c*o+i[5]-u,t.width=d+d,t.height=u+u,t}toContext(e){if(this.identity)return;const t=this.elements;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}static flyweight(t){return e.instance.setElements(t.elements)}static updateTransformMatrix(e,t,i,s,n,r,o){const a=t,l=i;let h,c;1===a&&1===l?(h=0,c=0):(h=o?.scalingCenterX??0,c=o?.scalingCenterY??0);const d=s,u=Math.cos(d),p=Math.sin(d);let g,m;0===d?(g=0,m=0):(g=o?.rotationCenterX??0,m=o?.rotationCenterY??0);const f=n,v=r,y=h*(1-a)-g,C=c*(1-l)-m;return e.setElements([u*a,p*a,-p*l,u*l,u*y-p*C+g+f,p*y+u*C+m+v]),e}static fromContext(t){const i=t.getTransform();return new e([i.a,i.b,i.c,i.d,i.e,i.f])}};uy.instance=new uy;var py=uy;function gy(e){return fy(e.constructor)}var my=Symbol("isMatrixTransform");function fy(e){return!0===e[my]}function vy(e){var t;const i=e;if(fy(e))return e;const s=Symbol("matrix_combined_transform");class n extends i{constructor(){super(...arguments),this[t]=new py,this._dirtyTransform=!0}markDirtyTransform(){this._dirtyTransform=!0,super.markDirty(3)}updateMatrix(e){}computeTransformMatrix(){this._dirtyTransform&&(this[s].setElements(cy),this.updateMatrix(this[s]),this._dirtyTransform=!1)}toParent(e){return this.computeTransformMatrix(),this[s].identity?e.clone():this[s].transformBBox(e)}toParentPoint(e,t){return this.computeTransformMatrix(),this[s].identity?{x:e,y:t}:this[s].transformPoint(e,t)}fromParent(e){return this.computeTransformMatrix(),this[s].identity?e.clone():this[s].inverse().transformBBox(e)}fromParentPoint(e,t){return this.computeTransformMatrix(),this[s].identity?{x:e,y:t}:this[s].inverse().transformPoint(e,t)}computeBBox(){const e=super.computeBBox();return e?this.toParent(e):e}computeBBoxWithoutTransforms(){return super.computeBBox()}pickNode(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]||({x:e,y:t}=this.fromParentPoint(e,t)),super.pickNode(e,t)}render(e){this._dirtyTransform&&(this.computeTransformMatrix(),e.forceRender||(e={...e,forceRender:"dirtyTransform"}));const t=this[s];let i=!1;t.identity||(e.ctx.save(),i=!0,t.toContext(e.ctx)),super.render(e),i&&e.ctx.restore(
2)}toSVG(){const e=super.toSVG(),t=this[s];if(t.identity||null==e)return e;const i=document.createElementNS("http://www.w3.org/2000/svg","g");i.append(...e.elements);const[n,r,o,a,l,h]=t.e;return i.setAttribute("transform",`matrix(${n} ${r} ${o} ${a} ${l} ${h})`),{elements:[i],defs:e.defs}}}return t=s,n[my]=!0,n}function yy(e){var t;const i=e,s=Symbol("matrix_rotation");class n extends(vy(i)){constructor(){super(...arguments),this[t]=new py,this.rotationCenterX=null,this.rotationCenterY=null,this.rotation=0}updateMatrix(e){super.updateMatrix(e);const{rotation:t,rotationCenterX:i,rotationCenterY:n}=this;0!==t&&(py.updateTransformMatrix(this[s],1,1,t,0,0,{rotationCenterX:i,rotationCenterY:n}),e.multiplySelf(this[s]))}}return t=s,op([Hg({type:"transform"})],n.prototype,"rotationCenterX",2),op([Hg({type:"transform"})],n.prototype,"rotationCenterY",2),op([Hg({type:"transform"})],n.prototype,"rotation",2),n}function Cy(e){var t;const i=e,s=Symbol("matrix_scale");class n extends(vy(i)){constructor(){super(...arguments),this[t]=new py,this.scalingX=1,this.scalingY=1,this.scalingCenterX=null,this.scalingCenterY=null}updateMatrix(e){super.updateMatrix(e);const{scalingX:t,scalingY:i,scalingCenterX:n,scalingCenterY:r}=this;1===t&&1===i||(py.updateTransformMatrix(this[s],t,i,0,0,0,{scalingCenterX:n,scalingCenterY:r}),e.multiplySelf(this[s]))}}return t=s,op([Hg({type:"transform"})],n.prototype,"scalingX",2),op([Hg({type:"transform"})],n.prototype,"scalingY",2),op([Hg({type:"transform"})],n.prototype,"scalingCenterX",2),op([Hg({type:"transform"})],n.prototype,"scalingCenterY",2),n}function Sy(e){var t;const i=e,s=Symbol("matrix_translation");class n extends(vy(i)){constructor(){super(...arguments),this[t]=new py,this.translationX=0,this.translationY=0}updateMatrix(e){super.updateMatrix(e);const{translationX:t,translationY:i}=this;0===t&&0===i||(py.updateTransformMatrix(this[s],1,1,0,t,i),e.multiplySelf(this[s]))}}return t=s,op([Hg({type:"transform"})],n.prototype,"translationX",2),op([Hg({type:"transform"})],n.prototype,"translationY",2),n}var wy=class{static fromCanvas(e,t){const i=[];for(const s of e.traverseUp())gy(s)&&i.unshift(s);for(const s of i)t=s.fromParent(t);return gy(e)&&(t=e.fromParent(t)),t}static toCanvas(e,t){null==t?t=e.getBBox():gy(e)&&(t=e.toParent(t));for(const i of e.traverseUp())gy(i)&&(t=i.toParent(t));return t}static fromCanvasPoint(e,t,i){const s=[];for(const n of e.traverseUp())gy(n)&&s.unshift(n);for(const n of s)({x:t,y:i}=n.fromParentPoint(t,i));return gy(e)&&({x:t,y:i}=e.fromParentPoint(t,i)),{x:t,y:i}}static toCanvasPoint(e,t,i){gy(e)&&({x:t,y:i}=e.toParentPoint(t,i));for(const s of e.traverseUp())gy(s)&&({x:t,y:i}=s.toParentPoint(t,i));return{x:t,y:i}}},by=class e extends _g{constructor(e){super(e),this.opts=e,this.opacity=1,this.isContainerNode=!0,this.zIndexSubOrder=e?.zIndexSubOrder}static is(t){return t instanceof e}static computeChildrenBBox(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Vg.merge(_g.extractBBoxes(e,t))}static compareChildren(e,t){return ly([e.zIndex,...e.zIndexSubOrder??[void 0,void 0],e.serialNumber],[t.zIndex,...t.zIndexSubOrder??[void 0,void 0],t.serialNumber],oy)}containsPoint(e,t){return!0}computeBBox(){return e.computeChildrenBBox(this.children())}preRender(){const e=super.preRender();return e.groups+=1,e.nonGroups-=1,e}isDirty(e){const{resized:t}=e,{dirty:i,dirtyZIndex:s}=this,n=i>=2||s||t;let r=n,o=!1;for(const a of this.children())if(r||(r=null==a.layerManager&&a.dirty>=1),o||(o=null!=a.layerManager&&a.dirty>=1),r)break;return this.opts?.name&&this._debug?.({name:this.opts.name,group:this,isDirty:n,isChildDirty:r,renderCtx:e}),{isDirty:n,isChildDirty:r,isChildLayerDirty:o}}debugSkip(e){e.stats&&this.opts?.name&&this._debug?.({name:this.opts.name,group:this,result:"skipping",counts:hy(this),renderCtx:e})}render(t,i){if(i)return super.render(t);const{opts:{name:s}={},_debug:n}=this,{isDirty:r,isChildDirty:o,isChildLayerDirty:a}=this.isDirty(t),{ctx:l,stats:h}=t;let{forceRender:c}=t;if(!r&&!o&&!a&&!c)return this.debugSkip(t),void this.markClean({recursive:!1});"dirtyTransform"!==c&&(c||(c=this.dirtyZIndex)),l.globalAlpha*=this.opacity,this.dirtyZIndex&&this.sortChildren(e.compareChildren);const d=this.sortedChildren(),u=this.renderClip(t)??t.clipBBox,p=c!==t.forceRender||u!==t.clipBBox;this.renderChildren(d,p?{...t,forceRender:c,clipBBox:u}
2:t),super.render(t),this.clipRect&&l.restore();for(const e of this.virtualChildren())e.markClean({recursive:"virtual"});s&&h&&n?.({name:s,renderCtx:t,result:"rendered",skipped:h.nodesSkipped,counts:hy(this),group:this})}sortedChildren(){let t=this.children();return this.hasVirtualChildren()&&(t=[...t].sort(e.compareChildren)),t}renderClip(e){if(!this.clipRect)return;const{x:t,y:i,width:s,height:n}=this.clipRect,{ctx:r}=e;return r.save(),r.beginPath(),r.rect(t,i,s,n),r.clip(),this._debug?.((()=>({name:this.opts?.name,clipRect:this.clipRect,ctxTransform:r.getTransform(),renderCtx:e,group:this}))),wy.toCanvas(this,this.clipRect)}renderChildren(e,t){const{ctx:i,forceRender:s,stats:n}=t;for(const r of e)r.visible&&this.visible?s||0!==r.dirty?(i.save(),r.render(t),i.restore()):n&&(n.nodesSkipped+=hy(r).count):(r.markClean(),n&&(n.nodesSkipped+=hy(r).count))}setClipRect(e){this.clipRect=e?wy.fromCanvas(this,e):void 0}setClipRectCanvasSpace(e){this.clipRect=e}toSVG(){if(!this.visible)return;const e=[],t=[];for(const i of this.sortedChildren()){const s=i.toSVG();null!=s&&(t.push(...s.elements),null!=s.defs&&e.push(...s.defs))}return{elements:t,defs:e}}};by.className="Group",op([Hg({redraw:3,convertor:e=>Ig(0,e,1)})],by.prototype,"opacity",2);var xy=by,My=class extends(Cy(xy)){},Dy=class extends(yy(xy)){},Iy=class extends(Sy(xy)){},Ry=class extends(yy(Sy(xy))){},Ey=Date.now(),Ay={create(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Object.assign((function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];Ay.check(...t)&&("function"===typeof i[0]&&(i=af(i[0]())),(()=>{const e=Date.now()-Ey;if(e>2e3){const t=(Math.floor(e/100)/10).toFixed(1);fp.log(`**** ${t}s since last log message ****`)}Ey=Date.now()})(),fp.log(...i))}),{check:()=>Ay.check(...t)})},check(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];0===t.length&&t.push(!0);return af(fg("agChartsDebug")).some((e=>t.includes(e)))}},Ty=class e{constructor(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.parentNode=e,this.autoCleanup=i,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=Ay.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(_g,t)?()=>new t:t}static select(t,i){return new e(t,i,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}static selectAll(e,t){const i=[],s=e=>{t(e)&&i.push(e);for(const t of e.children())s(t)};return s(e),i}static selectByClass(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];return e.selectAll(t,(e=>s.some((t=>e instanceof t))))}static selectByTag(t,i){return e.selectAll(t,(e=>e.tag===i))}createNode(e,t,i){const s=this.nodeFactory(e);return s.datum=e,t?.(s),null==i?this._nodes.push(s):this._nodes.splice(i,0,s),this.parentNode.appendChild(s),s}update(e,t,i){if(this.garbageBin.size>0&&this.debug(`Selection - update() called with pending garbage: ${e}`),i){const s=new Map(e.map(((e,t)=>[i(e),[e,t]])));for(const[e,t]of this._nodesMap.entries())if(s.has(t)){const[i]=s.get(t);e.datum=i,this.garbageBin.delete(e),s.delete(t)}else this.garbageBin.add(e);for(const[e,[i,n]]of s.entries())this._nodesMap.set(this.createNode(i,t,n),e)}else{const i=Math.max(e.length,this.data.length);for(let s=0;s<i;s++)s>=e.length?this.garbageBin.add(this._nodes[s]):s>=this._nodes.length?this.createNode(e[s],t):(this._nodes[s].datum=e[s],this.garbageBin.delete(this._nodes[s]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){return 0===this.garbageBin.size||(this._nodes=this._nodes.filter((e=>!this.garbageBin.has(e)||(this._nodesMap.delete(e),this.garbageBin.delete(e),e.destroy(),!1)))),this}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}hasGarbage(){return this.garbageBin.size>0}each(e){for(const t of this._nodes.entries())e(t[1],t[1].datum,t[0]);return this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){const t=this._nodes[e];yield{node:t,datum:t.datum,index:e}}}select(t){return e.selectAll(this.parentNode,t)}selectByClass(t){return e.selectByClass(this.parentNode,t)}selectByTag(t){return e.selectByTag(this.parentNode,t)}nodes(){return this._nodes}at(e){return this._nodes.at(e)}},Py=2*Math.PI;function Ly(e){return e%=Py,e+=Py,e%=Py}function Fy(e){return e%=Py,(e+=Py)!==Py&&(e%=Py),e}function ky(e){return(e%=Py)<-Math.PI?e+=Py:e>=Math.PI&&(e-=Py),e}function Ny(e,t,i){const s=Ly(e),n=Ly(t),r=Ly(i);return n<r?n<=s&&s<=r:!(n>r)||(n<=s||s<=r)}function Oy(e){return e/180*Math.PI}function Gy(e){return e/Math.PI*180}function By(e,t,i){i&&([e,t]=[t,e]);const s=Ly(e);return(Ly(t)+Py-s)%Py}function Vy(e,t){return e=Ly(e),(t=Ly(t))-e+(e>t?2*Math.PI:0)}
2function zy(e,t,i,s){return{x:e+i*Math.cos(s),y:t+i*Math.sin(s)}}function Hy(e,t){return Vy(e,t)<1e-6?t:Ly(e-t)+t}function Wy(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=Math.abs(t-e)>=2*Math.PI?2*Math.PI:Ly(t-e);return{startAngle:e=Hy(e,i),endAngle:t=e+s}}function jy(e,t,i,s){const n=e-i,r=t-s;return n*n+r*r}function Uy(e,t,i,s,n,r,o){if(i===n&&s===r)return Math.min(o,jy(e,t,i,s));const a=n-i,l=r-s,h=Math.max(0,Math.min(1,((e-i)*a+(t-s)*l)/(a*a+l*l))),c=i+h*a,d=s+h*l;return Math.min(o,jy(e,t,c,d))}function _y(e,t,i,s,n,r,o,a,l){a&&([o,r]=[r,o]);if(!Ny(Math.atan2(t-s,e-i),r,o)){const o=i+Math.cos(r)*n,a=s+Math.sin(r)*n,h=i+Math.cos(r)*n,c=s+Math.sin(r)*n;return Math.min(l,jy(e,t,o,a),jy(e,t,h,c))}const h=n-Math.sqrt(jy(e,t,i,s));return Math.min(l,h*h)}var Ky=e=>{const t=qg.fromString(e),[i,s,n]=qg.RGBtoOKLCH(t.r,t.g,t.b);return{l:i,c:s,h:n,a:t.a}},$y=1e-6,Yy=e=>e.c<$y||e.l<$y||e.l>.999999,Zy=class{constructor(){this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(Ky)}update(){const{domain:e,range:t}=this;e.length<2&&(fp.warnOnce("`colorDomain` should have at least 2 values."),0===e.length?e.push(0,1):1===e.length&&e.push(e[0]+1));for(let i=1;i<e.length;i++){if(e[i-1]>=e[i]){fp.warnOnce("`colorDomain` values should be supplied in ascending order."),e.sort(((e,t)=>e-t));break}}if(t.length<e.length)for(let i=t.length;i<e.length;i++)t.push(t.length>0?t[0]:"black");this.parsedRange=this.range.map(Ky)}convert(e){this.refresh();const{domain:t,range:i,parsedRange:s}=this,n=t[0],r=t.at(-1),o=i[0],a=i[i.length-1];if(e<=n)return o;if(e>=r)return a;let l,h;if(2===t.length){const t=(e-n)/(r-n),s=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(t*(i.length-1)),i.length-2),h=(t-l*s)/s}else{for(l=0;l<t.length-2&&!(e<t[l+1]);l++);const i=t[l];h=(e-i)/(t[l+1]-i)}return((e,t,i)=>{let s;if(i=Ig(0,i,1),Yy(e))s=t.h;else if(Yy(t))s=e.h;else{const n=e.h;let r=t.h;const o=t.h-e.h;o>180?r-=360:o<-180&&(r+=360),s=n*(1-i)+r*i}const n=e.c*(1-i)+t.c*i,r=e.l*(1-i)+t.l*i,o=e.a*(1-i)+t.a*i;return qg.fromOKLCH(r,n,s,o)})(s[l],s[l+1],h).toRgbaString()}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&fp.warnOnce("Expected update to not invalidate scale"))}};op([ef],Zy.prototype,"domain",2),op([ef],Zy.prototype,"range",2);var qy=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;this.colorSpace=e,this.stops=t,this.bbox=i,this._cache=void 0}createGradient(e,t){const i=this.bbox??t;if(null!=this._cache&&this._cache.ctx===e&&this._cache.bbox.equals(i))return this._cache.gradient;const{stops:s,colorSpace:n}=this;if(0===s.length)return;if(1===s.length)return s[0].color;let r=this.createCanvasGradient(e,i);if(null==r)return;const o="oklch"===n;let a=s[0];r.addColorStop(a.offset,a.color);for(let l=1;l<s.length;l+=1){const e=s[l];if(o){const t=new Zy;t.domain=[a.offset,e.offset],t.range=[a.color,e.color];for(let i=a.offset+.05;i<e.offset;i+=.05)r.addColorStop(i,t.convert(i))}r.addColorStop(e.offset,e.color),a=e}return"createPattern"in r&&(r=r.createPattern()),this._cache={ctx:e,bbox:i,gradient:r},r}},Qy=class extends qy{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;super(e,t,arguments.length>3?arguments[3]:void 0),this.angle=i}createCanvasGradient(e,t){const{angle:i}=this,s=Ly(Oy(i+90)),n=Math.cos(s),r=Math.sin(s),o=t.width,a=t.height,l=t.x+.5*o,h=t.y+.5*a,c=Math.sqrt(a*a+o*o)/2,d=Math.atan2(a,o);let u;u=s<Math.PI/2?s:s<Math.PI?Math.PI-s:s<1.5*Math.PI?s-Math.PI:2*Math.PI-s;const p=c*Math.abs(Math.cos(u-d));return e.createLinearGradient(l+n*p,h+r*p,l-n*p,h-r*p)}},Xy=/^linear-gradient\((-?[\d.]+)deg,(.*?)\)$/i,Jy=class e extends _g{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=e.defaultStyles.fill,this.stroke=e.defaultStyles.stroke,this.strokeWidth=e.defaultStyles.strokeWidth,this.lineDash=e.defaultStyles.lineDash,this.lineDashOffset=e.defaultStyles.lineDashOffset,this.lineCap=e.defaultStyles.lineCap,this.lineJoin=e.defaultStyles.lineJoin,this.miterLimit=void 0,this.opacity=e.defaultStyles.opacity,this.fillShadow=e.defaultStyles.fillShadow}restoreOwnStyles(){const{defaultStyles:e}=this.constructor;Object.assign(this,e)}onFillChange(){const{fill:e}=this;let t;if(e instanceof qy)this.gradient=e;else if(e?.startsWith("linear-gradient")&&(t=Xy.exec(e))){const e=parseFloat(t[1]),i=[],s=t[2],n=/(#[0-9a-f]+)|(rgba?\(.+?\))|([a-z]+)/gi;let r;for(;r=n.exec(s);)i.push(r[0]);this.gradient=new Qy("rgb",i.map(((e,t)=>({color:e,offset:t/(i.length-1)}))),e)}else this.gradient=void 0}align(e,t){const i=this.layerManager?.canvas?.pixelRatio??1,s=Math.round(e*i)/i;return null==t?s:0===t?0:t<1?Math.ceil(t*i)/i:Math.round((t+e)*i)/i-s}fillStroke(e,t){this.renderFill(e,t),this.renderStroke(e,t)}renderFill(e,t){if(this.fill){const{globalAlpha:i}=e;this.applyFill(e),this.applyFillAlpha(e),this.applyShadow(e),this.executeFill(e,t),e.globalAlpha=i}e.shadowColor="rgba(0, 0, 0, 0)"}executeFill(e,t){t?e.fill(t):e.fill()}applyFill(e){e.fillStyle=this.gradient?.createGradient(e,this.getBBox())??("string"===typeof this.fill?this.fill:void 0)??"black"}applyFillAlpha(e){e.globalAlpha*=this.opacity*this.fillOpacity}applyShadow(e){const t=this.layerManager?.canvas.pixelRatio??1,i=this.fillShadow;i?.enabled&&(e.shadowColor=i.color,e.shadowOffsetX=i.xOffset*t,e.shadowOffsetY=i.yOffset*t,e.shadowBlur=i.blur*t)}renderStroke(e,t){if(this.stroke&&this.strokeWidth){const{globalAlpha:i}=e;e.strokeStyle=this.stroke,e.globalAlpha*=this.opacity*this.strokeOpacity,e.lineWidth=this.strokeWidth,this.lineDash&&e.setLineDash(this.lineDash),this.lineDashOffset&&(e.lineDashOffset=this.lineDashOffset),this.lineCap&&(e.lineCap=this.lineCap),this.lineJoin&&(e.lineJoin=this.lineJoin),null!=this.miterLimit&&(e.miterLimit=this.miterLimit),this.executeStroke(e,t),e.globalAlpha=i}}executeStroke(e,t){t?e.stroke(t):e.stroke()}containsPoint(e,t){return this.isPointInPath(e,t)}};Jy.defaultStyles={fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0},op([Hg({redraw:2})],Jy.prototype,"fillOpacity",2),op([Hg({redraw:2})],Jy.prototype,"strokeOpacity",2),op([Hg({redraw:2,changeCb:e=>e.onFillChange()})],Jy.prototype,"fill",2),op([Hg({redraw:2})],Jy.prototype,"stroke",2),op([Hg({redraw:2})],Jy.prototype,"strokeWidth",2),op([Hg({redraw:2})],Jy.prototype,"lineDash",2),op([Hg({redraw:2})],Jy.prototype,"lineDashOffset",2),op([Hg({redraw:2})],Jy.prototype,"lineCap",2),op([Hg({redraw:2})],Jy.prototype,"lineJoin",2),op([Hg({redraw:2})],Jy.prototype,"miterLimit",2),op([Hg({redraw:2,convertor:e=>Ig(0,e,1)})],Jy.prototype,"opacity",2),op([Hg({redraw:2,checkDirtyOnAssignment:!0})],Jy.prototype,"fillShadow",2);var eC=Jy,tC=class extends eC{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.restoreOwnStyles()}set x(e){this.x1=e,this.x2=e}set y(e){this.y1=e,this.y2=e}get midPoint(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}}computeBBox(){return new Vg(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(e,t){return(this.x1===this.x2||this.y1===this.y2)&&this.getBBox().clone().grow(this.strokeWidth/2).containsPoint(e,t)}distanceSquared(e,t){const{x1:i,y1:s,x2:n,y2:r}=this;return Uy(e,t,i,s,n,r,1/0)}render(e){const{ctx:t,forceRender:i,stats:s,devicePixelRatio:n}=e;if(0===this.dirty&&!i)return void(s&&(s.nodesSkipped+=hy(this).count));let{x1:r,y1:o,x2:a,y2:l}=this;if(r===a){const{strokeWidth:e}=this,t=Math.round(r*n)/n+Math.trunc(e*n)%2/(2*n);r=t,a=t}else if(o===l){const{strokeWidth:e}=this,t=Math.round(o*n)/n+Math.trunc(e*n)%2/(2*n);o=t,l=t}t.beginPath(),t.moveTo(r,o),t.lineTo(a,l),this.fillStroke(t),this.fillShadow?.markClean(),super.render(e)}toSVG(){if(!this.visible)return;const e=document.createElementNS("http://www.w3.org/2000/svg","line");return e.setAttribute("x1",String(this.x1)),e.setAttribute("y1",String(this.y1)),e.setAttribute("x2",String(this.x2)),e.setAttribute("y2",String(this.y2)),e.setAttribute("stroke",this.stroke??"none"),e.setAttribute("stroke-opacity",String(this.strokeOpacity)),e.setAttribute("stroke-width",String(this.strokeWidth)),{elements:[e]}}};tC.className="Line",tC.defaultStyles={...eC.defaultStyles,fill:void 0,strokeWidth:1},op([Hg({redraw:3})],tC.prototype,"x1",2),op([Hg({redraw:3})],tC.prototype,"y1",2),op([Hg({redraw:3})],tC.prototype,"x2",2),op([Hg({redraw:3})],tC.prototype,"y2",2);var iC=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;this.maxCacheSize=e,this.store=new Map}get(e){if(!this.store.has(e))return;const t=this.store.get(e);return this.store.delete(e),this.store.set(e,t),t}has(e){return this.store.has(e)}set(e,t){if(this.store.set(e,t),this.store.size>this.maxCacheSize){const e=this.store.keys();let t=this.store.size-this.maxCacheSize;
2for(;t>0;){const i=e.next();i.done||this.store.delete(i.value),t--}}return t}clear(){this.store.clear()}},sC=class{static measureText(e,t){return this.getMeasurer(t).measureText(e)}static measureLines(e,t){return this.getMeasurer(t).measureLines(e)}static getMeasurer(e){const t="string"===typeof e.font?e.font:rC.toFontString(e.font),i=`${t}-${e.textAlign??"start"}-${e.textBaseline??"alphabetic"}`;return this.instanceMap.get(i)??this.createFontMeasurer(t,e,i)}static createFontMeasurer(e,t,i){const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=vg("canvas");return i.style.display="block",i.style.width=e+"px",i.style.height=t+"px",i.getContext("2d")}();s.font=e,s.textAlign=t.textAlign??"start",s.textBaseline=t.textBaseline??"alphabetic";const n=new nC(s,t);return this.instanceMap.set(i,n),n}};sC.instanceMap=new iC(10);var nC=class{constructor(e,t){this.ctx=e,this.measureMap=new iC(100),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline),e.font="string"===typeof t.font?t.font:rC.toFontString(t.font),this.textMeasurer=new oC((e=>this.cachedCtxMeasureText(e)),t.textBaseline??"alphabetic")}textWidth(e,t){return this.textMeasurer.textWidth(e,t)}measureText(e){return this.textMeasurer.measureText(e)}measureLines(e){return this.textMeasurer.measureLines(e)}cachedCtxMeasureText(e){if(!this.measureMap.has(e)){const t=this.ctx.measureText(e);this.measureMap.set(e,{actualBoundingBoxAscent:t.actualBoundingBoxAscent,emHeightAscent:t.emHeightAscent,emHeightDescent:t.emHeightDescent,actualBoundingBoxDescent:t.actualBoundingBoxDescent,actualBoundingBoxLeft:t.actualBoundingBoxLeft,actualBoundingBoxRight:t.actualBoundingBoxRight,alphabeticBaseline:t.alphabeticBaseline,fontBoundingBoxAscent:t.fontBoundingBoxAscent,fontBoundingBoxDescent:t.fontBoundingBoxDescent,hangingBaseline:t.hangingBaseline,ideographicBaseline:t.ideographicBaseline,width:t.width})}return this.measureMap.get(e)}},rC=class{static toFontString(e){let{fontSize:t=10,fontStyle:i,fontWeight:s,fontFamily:n,lineHeight:r}=e,o="";return i&&(o+=`${i} `),s&&(o+=`${s} `),o+=`${t}px`,r&&(o+=`/${r}px`),o+=` ${n}`,o.trim()}static getLineHeight(e){return Math.ceil(e*this.defaultLineHeight)}static getVerticalModifier(e){switch(e){case"hanging":case"top":return 0;case"middle":return.5;default:return 1}}};rC.EllipsisChar="\u2026",rC.defaultLineHeight=1.15,rC.lineSplitter=/\r?\n/g;var oC=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"alphabetic";this.measureTextFn=e,this.textBaseline=t,this.charMap=new Map}getMetrics(e){const t=this.measureTextFn(e);return t.fontBoundingBoxAscent??(t.fontBoundingBoxAscent=t.emHeightAscent),t.fontBoundingBoxDescent??(t.fontBoundingBoxDescent=t.emHeightDescent),{width:t.width,height:t.actualBoundingBoxAscent+t.actualBoundingBoxDescent,lineHeight:t.fontBoundingBoxAscent+t.fontBoundingBoxDescent,offsetTop:t.actualBoundingBoxAscent,offsetLeft:t.actualBoundingBoxLeft}}getMultilineMetrics(e){let t=0,i=0,s=0,n=0,r=0;const o=rC.getVerticalModifier(this.textBaseline),a=[];let l=0;const h=e.length;for(const c of e){const e=this.measureTextFn(c);e.fontBoundingBoxAscent??(e.fontBoundingBoxAscent=e.emHeightAscent),e.fontBoundingBoxDescent??(e.fontBoundingBoxDescent=e.emHeightDescent),t<e.width&&(t=e.width),n<e.actualBoundingBoxLeft&&(n=e.actualBoundingBoxLeft),0===l?(i+=e.actualBoundingBoxAscent,s+=e.actualBoundingBoxAscent):r+=e.fontBoundingBoxAscent,l===h-1?i+=e.actualBoundingBoxDescent:r+=e.fontBoundingBoxDescent,a.push({text:c,width:e.width,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,lineHeight:e.fontBoundingBoxAscent+e.fontBoundingBoxDescent,offsetTop:e.actualBoundingBoxAscent,offsetLeft:e.actualBoundingBoxLeft}),l++}return i+=r,s+=r*o,{width:t,height:i,offsetTop:s,offsetLeft:n,lineMetrics:a}}textWidth(e,t){if(t){let t=0;for(let i=0;i<e.length;i++)t+=this.textWidth(e.charAt(i));return t}return e.length>1?this.measureTextFn(e).width:this.charMap.get(e)??this.charWidth(e)}measureText(e){return this.getMetrics(e)}measureLines(e){const t="string"===typeof e?e.split(rC.lineSplitter):e;return this.getMultilineMetrics(t)}charWidth(e){const{width:t}=this.measureTextFn(e);return this.charMap.set(e,t),t}},aC=class e extends eC{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=e.defaultStyles.textAlign,this.textBaseline=e.defaultStyles.textBaseline}onTextChange(){this.lines=this.text?.split("\n").map((e=>e.trim()))??[]}static computeBBox(e,t,i,s){const{offsetTop:n,offsetLeft:r,width:o,height:a}=sC.measureLines(e,s);return new Vg(t-r,i-n,o,a)}computeBBox(){const{x:t,y:i,lines:s,textBaseline:n,textAlign:r}=this;return e.computeBBox(s,t,i,{font:this,textBaseline:n,textAlign:r})}isPointInPath(e,t){const i=this.getBBox();return!!i&&i.containsPoint(e,t)}render(e){const{ctx:t,forceRender:i,stats:s}=e;if(0===this.dirty&&!i)return void(s&&(s.nodesSkipped+=hy(this).count));if(!this.lines.length||!this.layerManager)return void(s&&(s.nodesSkipped+=hy(this).count));const{fill:n,stroke:r,strokeWidth:o}=this,{pixelRatio:a}=this.layerManager.canvas;if(t.font=rC.toFontString(this),t.textAlign=this.textAlign,t.textBaseline=this.textBaseline,n){this.applyFill(t),t.globalAlpha*=this.opacity*this.fillOpacity;const{fillShadow:e}=this;e?.enabled&&(t.shadowColor=e.color,t.shadowOffsetX=e.xOffset*a,t.shadowOffsetY=e.yOffset*a,t.shadowBlur=e.blur*a),this.renderLines(((e,i,s)=>t.fillText(e,i,s)))}if(r&&o){t.strokeStyle=r,t.lineWidth=o,t.globalAlpha*=this.opacity*this.strokeOpacity;const{lineDash:e,lineDashOffset:i,lineCap:s,lineJoin:n}=this;e&&t.setLineDash(e),i&&(t.lineDashOffset=i),s&&(t.lineCap=s),n&&(t.lineJoin=n),this.renderLines(((e,i,s)=>t.strokeText(e,i,s)))}super.render(e)}renderLines(e){const{lines:t,x:i,y:s}=this,n=this.lineHeight??rC.getLineHeight(this.fontSize);let r=(n-n*t.length)*rC.getVerticalModifier(this.textBaseline);for(const o of t)e(o,i,s+r),r+=n}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}toSVG(){if(!this.visible||!this.text)return;const e=document.createElementNS("http://www.w3.org/2000/svg","text");return e.setAttribute("font-family",this.fontFamily?.split(",")[0]??""),e.setAttribute("font-size",String(this.fontSize)),e.setAttribute("font-style",this.fontStyle??""),e.setAttribute("font-weight",String(this.fontWeight??"")),e.setAttribute("text-anchor",{center:"middle",left:"start",right:"end",start:"start",end:"end"}[this.textAlign??"start"]),e.setAttribute("alignment-baseline",{alphabetic:"alphabetic",top:"top",bottom:"bottom",hanging:"hanging",middle:"middle",ideographic:"ideographic"}[this.textBaseline??"alphabetic"]),e.setAttribute("x",String(this.x)),e.setAttribute("y",String(this.y)),e.textContent=this.text??"",{elements:[e]}}};aC.className="Text",aC.defaultStyles={...eC.defaultStyles,textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"},op([Hg({redraw:3})],aC.prototype,"x",2),op([Hg({redraw:3})],aC.prototype,"y",2),op([Hg({redraw:3,changeCb:e=>e.onTextChange()})],aC.prototype,"text",2),op([Hg()],aC.prototype,"fontStyle",2),op([Hg()],aC.prototype,"fontWeight",2),op([Hg()],aC.prototype,"fontSize",2),op([Hg()],aC.prototype,"fontFamily",2),op([Hg({redraw:3})],aC.prototype,"textAlign",2),op([Hg({redraw:3})],aC.prototype,"textBaseline",2),op([Hg({redraw:3})],aC.prototype,"lineHeight",2);var lC=aC,hC=class extends(yy(lC)){},cC=class extends(yy(Sy(lC))){};function dC(e,t,i,s,n,r){if(0===e.size)return!1;
2let o=e.x,a=e.y;null!=t&&(o-=(t.x-.5)*e.size,a-=(t.y-.5)*e.size);let l=o;o<i?l=i:o>i+n&&(l=i+n);let h=a;a<s?h=s:a>s+r&&(h=s+r);const c=o-l,d=a-h;return Math.sqrt(c*c+d*d)<=.5*e.size}function uC(e,t,i,s,n){const r=e.x+e.width>t&&e.x<t+s,o=e.y+e.height>i&&e.y<i+n;return r&&o}var pC={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0},"top-left":{x:-1,y:-1},"top-right":{x:1,y:-1},"bottom-left":{x:-1,y:1},"bottom-right":{x:1,y:1}};function gC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=[];for(let s=0;s<e.length;s++){const n=e[s],{point:{x:r,y:o},label:{text:a}}=n;let{width:l,height:h}=n.label;if(l+=t,h+=t,i.some((e=>uC(e,r,o,l,h))))return!0;i.push({index:s,text:a,x:r,y:o,width:l,height:h,datum:n})}return!1}function mC(e,t){return e.length===t.length&&e.every(((e,i)=>Number(e)===Number(t[i])))}var fC="class-instance";function vC(e,t,i){if(am(t)){if(!am(e)||e.length!==t.length||t.some(((t,i)=>null!=vC(e[i],t))))return t}else{if(mm(t)){if(!mm(e))return t;const s={},n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r]&&!i?.includes(r))if(typeof e[r]===typeof t[r]){const i=vC(e[r],t[r]);null!==i&&(s[r]=i)}else s[r]=t[r];return Object.keys(s).length?s:null}if(e!==t)return t}return null}function yC(e,t){return am(e)?e.map((e=>yC(e,t))):mm(e)?Em(e,((e,i)=>t?.shallow?.includes(i)?CC(e):yC(e,t))):e instanceof Map?new Map(yC(Array.from(e))):CC(e)}function CC(e){return am(e)?[...e]:mm(e)?{...e}:hm(e)?new Date(e):dm(e)?new RegExp(e.source,e.flags):e}function SC(e,t,i){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];if(am(e))t(e,...n),e.forEach(((e,s)=>{SC(e,t,i,...bC(n,s))}));else if(mm(e)){t(e,...n);for(const s of Object.keys(e)){if(i?.skip?.includes(s))continue;const r=e[s];(am(r)||mm(r))&&SC(r,t,i,...bC(n,s))}}}function wC(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{path:s,matcherPath:n=s?.replace(/(\[[0-9+]+])/i,"[]"),skip:r=[]}=i;if(null==e)throw new Error(`AG Charts - target is uninitialised: ${s??"<root>"}`);if(null==t)return e;if(Rf(e))return e.set(t);const o=e,a=xC(e);for(const h in t){if(Pm.has(h))continue;const c=`${n?n+".":""}${h}`;if(r.includes(c))continue;const d=t[h],u=`${s?s+".":""}${h}`,p=o.constructor,g=o[h];try{const t=xC(g),s=xC(d);if(a===fC&&!(h in e)){fp.warn(`unable to set [${u}] in ${p?.name} - property is unknown`);continue}if(null!=t&&null!=s&&s!==t&&(t!==fC||"object"!==s)){fp.warn(`unable to set [${u}] in ${p?.name} - can't apply type of [${s}], allowed types are: [${t}]`);continue}Rf(g)?o[h].set(d):"object"===s?(null==g&&(o[h]={}),wC(g??o[h],d,{...i,path:u,matcherPath:c})):o[h]=d}catch(l){fp.warn(`unable to set [${u}] in [${p?.name}]; nested error is: ${l.message}`)}}return e}function bC(e,t){return e.map((e=>e?.[t]))}function xC(e){return null==e?null:Cm(e)||hm(e)?"primitive":am(e)?"array":pm(e)?mm(e)?"object":fC:um(e)?"function":"primitive"}function MC(e,t){const i=am(e)?e:e.split(".");if(1===i.length){const[e]=i;return im(((t,i,s)=>t[e]=s),(t=>t[e]),t)}return im(((e,t,s)=>Lm(e,i,s)),(e=>Tm(e,i)),t)}function DC(e){return im(((t,i,s)=>t[e]=s))}function IC(e,t){return im(((i,s,n)=>i[e][t??s]=n))}function RC(e){const{newValue:t,oldValue:i,changeValue:s}=e;return im(((e,n,r,o)=>(r!==o&&(void 0!==o&&i?.call(e,o),void 0!==r&&t?.call(e,r),s?.call(e,r,o)),r)))}function EC(e){return t=e,(e,i)=>{tm(e,i).observers.push(t)};var t}var AC="color: green",TC="color: grey",PC=class e{constructor(e,t,i){this.defaultState=e,this.states=t,this.enterEach=i,this.debug=Ay.create(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,AC)}transition(t,i){if(!this.transitionChild(t,i)||this.state===e.child||this.state===e.parent)return;const s=this.state,n=this.states[this.state];let r=n[t];const o=`%c${this.constructor.name} | ${this.state} -> ${t} ->`;if(Array.isArray(r))r=r.find((e=>{if(!e.guard)return!0;const t=e.guard(i);return t||this.debug(`${o} ${e.target} (guarded)`,TC),t}));else if("object"===typeof r&&!(r instanceof e)&&r.guard&&!r.guard(i))return void this.debug(`${o} ${r.target} (guarded)`,TC);if(!r)return void this.debug(`${o} ${this.state}`,TC);const a=this.getDestinationState(r),l=a===this.state?void 0:n.onExit;this.debug(`${o} ${a}`,AC),this.state=a,"function"===typeof r?r(i):"object"!==typeof r||r instanceof e||r.action?.(i),l?.(),this.enterEach?.(s,a),a!==s&&a!==e.child&&a!==e.parent&&this.states[a].onEnter?.(s,i)}transitionAsync(e,t){setTimeout((()=>{this.transition(e,t)}),0)}is(t){return this.state===e.child&&this.childState?this.childState.is(t):this.state===t}resetHierarchy(){this.debug(`%c${this.constructor.name} | ${this.state} -> [resetHierarchy] -> ${this.defaultState}`,"color: green"),this.state=this.defaultState}transitionChild(t,i){return this.state!==e.child||!this.childState||(this.childState.transition(t,i),!this.childState.is(e.parent)||(this.debug(`%c${this.constructor.name} | ${this.state} -> ${t} -> ${this.defaultState}`,AC),this.state=this.defaultState,this.states[this.state].onEnter?.(),this.childState.resetHierarchy(),!1))}getDestinationState(t){let i=this.state;return"string"===typeof t?i=t:t instanceof e?(this.childState=t,i=e.child):"object"===typeof t&&(t.target instanceof e?(this.childState=t.target,i=e.child):null!=t.target&&(i=t.target)),i}};PC.child="__child",PC.parent="__parent";var LC=PC,FC=class{static wrapText(e,t){return this.wrapLines(e,t).join("\n")}static wrapLines(e,t){const i=this.textWrap(e,t);return"hide"===t.overflow&&i.some((e=>
2e.endsWith(rC.EllipsisChar)))?[]:i}static appendEllipsis(e){return e.replace(/[.,]{1,5}$/,"")+rC.EllipsisChar}static truncateLine(e,t,i,s){const n=t.textWidth(rC.EllipsisChar);let r=0,o=0;for(;o<e.length;o++){const s=t.textWidth(e.charAt(o));if(r+s>i)break;r+=s}if(e.length===o&&(!s||r+n<=i))return s?e+rC.EllipsisChar:e;for(e=e.slice(0,o).trimEnd();e.length&&t.textWidth(e)+n>i;)e=e.slice(0,-1).trimEnd();return e+rC.EllipsisChar}static textWrap(e,t){const i=e.split(rC.lineSplitter),s=sC.getMeasurer(t);if("never"===t.textWrap)return i.map((e=>this.truncateLine(e.trimEnd(),s,t.maxWidth)));const n=[],r="hyphenate"===t.textWrap,o=null==t.textWrap||"on-space"===t.textWrap;for(let a of i)if(a=a.trimEnd(),""!==a){for(let e=0,i=0,l=0;e<a.length;e++){const h=a.charAt(e);if(i+=s.textWidth(h)," "===h&&(l=e),i>t.maxWidth){if(0===e)break;const h=s.textWidth(a.slice(0,e+1));if(h<=t.maxWidth){i=h;continue}if(l){const r=this.getWordAt(a,l+1),h=s.textWidth(r);if(h<=t.maxWidth){n.push(a.slice(0,l).trimEnd()),a=a.slice(l).trimStart(),e=-1,i=0,l=0;continue}o&&h>t.maxWidth&&n.push(a.slice(0,l).trimEnd(),this.truncateLine(a.slice(l).trimStart(),s,t.maxWidth,!0))}else o&&n.push(this.truncateLine(a,s,t.maxWidth,!0));if(o){a="";break}const c=r?"-":"";let d=a.slice(0,e).trim();for(;d.length&&s.textWidth(d+c)>t.maxWidth;)d=d.slice(0,-1).trimEnd();if(n.push(d+c),!d.length){a="";break}a=a.slice(d.length).trimStart(),e=-1,i=0,l=0}}a&&n.push(a)}else n.push(a);return this.avoidOrphans(n,s,t),this.clipLines(n,s,t)}static getWordAt(e,t){const i=e.indexOf(" ",t);return-1===i?e.slice(t):e.slice(t,i)}static clipLines(e,t,i){if(!i.maxHeight)return e;const{height:s,lineMetrics:n}=t.measureLines(e);if(s<=i.maxHeight)return e;for(let r=0,o=0;r<n.length;r++){const{lineHeight:s}=n[r];if(o+=s,o>i.maxHeight){if("hide"===i.overflow)return[];const s=e.slice(0,r||1),n=s.pop();return s.concat(this.truncateLine(n,t,i.maxWidth,!0))}}return e}static avoidOrphans(e,t,i){if(!1===i.avoidOrphans||e.length<2)return;const{length:s}=e,n=e[s-1],r=e[s-2];if(r.length<n.length)return;const o=r.lastIndexOf(" ");if(-1===o||o===r.indexOf(" ")||n.includes(" "))return;const a=r.slice(o+1);t.textWidth(n+a)<=i.maxWidth&&(e[s-2]=r.slice(0,o),e[s-1]=a+" "+n)}},kC={isEnterprise:!1};function NC(e,t,i){void 0===i||""===i?e?.removeAttribute(t):e?.setAttribute(t,i.toString())}function OC(e,t){if(null==t)return;let i;for(i in t)"class"!==i&&NC(e,i,t[i])}function GC(e,t,i){if(!(e instanceof HTMLElement))return;const s=e.getAttribute(t);if(null===s)return i;const n=typeof{}[t];return"boolean"===n?"true"===s:"number"===n?Number(s):"string"===n?s:void 0}function BC(e,t,i){null!=e&&(null==i?e.style.removeProperty(t):e.style.setProperty(t,i))}function VC(e,t,i,s){let{top:n,right:r,bottom:o,left:a,width:l,height:h}=s;return null!=a?null!=l?r=i.width-a+l:null!=r&&(l=i.width-a-r):null!=r&&null!=l&&(a=i.width-r-l),null!=n?null!=h?o=i.height-n-h:null!=o&&(h=i.height-o-n):null!=o&&null!=h&&(n=i.height-o-h),null==l?null==h?(l=e,h=t):l=Math.ceil(e*h/t):null==h&&(h=Math.ceil(t*l/e)),null==a&&(a=null==r?Math.floor((i.width-l)/2):i.width-r-l),null==n&&(n=null==o?Math.floor((i.height-h)/2):i.height-h-o),{x:a,y:n,width:l,height:h}}var zC="ag-chart-tooltip",HC="ag-chart-dark-tooltip",WC={html:"",ariaLabel:""};function jC(e){const t=(e,t,i)=>0===t||"."!==i[t-1]?". ":" ";return e.replace(/<br\s*\/?>/g,t).replace(/<\/p\s+>/g,t).replace(/<\/li\s*>/g,t).replace(/<[^<>]+>/g,"").replace(/\n+/g," ").replace(/\s+/g," ")}function UC(e,t){if("string"===typeof e)return{html:e,ariaLabel:e};const{content:i=t?.content??"",title:s=t?.title,color:n=t?.color??"white",backgroundColor:r=t?.backgroundColor??"#888"}=e;return{html:`${s?`<div class="${zC}-title"\n        style="color: ${n}; background-color: ${r}">${s}</div>`:""}${i?`<div class="${zC}-content">${i}</div>`:""}`,ariaLabel:jC(`${s?`${s}: `:""}${i}`)}}var _C=class extends Df{constructor(){super(...arguments),this.type="pointer",this.xOffset=0,this.yOffset=0}};op([Ef(Sv(["pointer","node","top","right","bottom","left","top-left","top-right","bottom-right","bottom-left",{value:"sparkline",undocumented:!0}],"a position type"))],_C.prototype,"type",2),op([Ef(Gf)],_C.prototype,"xOffset",2),op([Ef(Gf)],_C.prototype,"yOffset",2);var KC=class extends Df{constructor(){super(),this.enabled=!0,this.delay=0,this.range=void 0,this.wrapping="hyphenate",this.position=new _C,this.darkTheme=!1,this.bounds="extended",this.enableInteraction=!1,this.lastVisibilityChange=Date.now(),this.wrapTypes=["always","hyphenate","on-space","never"],this.showTimeout=0,this._showArrow=!0}get interactive(){return this.enableInteraction}setup(e){this.element=e.addChild("canvas-overlay",zC),this.element.classList.add(zC)}destroy(e){e.removeChild("canvas-overlay",zC)}isVisible(){return!this.element?.classList.contains(zC+"-hidden")}show(e,t,i,s){let n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{element:r}=this,o=r?.getBoundingClientRect();if(null!=s&&null!=r)r.innerHTML=s.html;else if(!r?.innerHTML)return void this.toggle(!1);const a=i.position?.type??this.position.type,l=i.position?.xOffset??0,h=i.position?.yOffset??0,c=this.getTooltipBounds({positionType:a,meta:i,yOffset:h,xOffset:l,canvasRect:t}),d={x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height},u=VC(r.clientWidth,r.clientHeight,d,c),p=d.x,g=d.y,m=d.width-r.clientWidth-1+p,f=d.height-r.clientHeight+g,v=Ig(p,u.x,m),y=Ig(g,u.y,f);let C=!1;if(null!=o){const e=d.width-o.width-1+p,t=d.height-o.height+g;C=e>m||t>f}const S=v!==u.x||y!==u.y,w=("node"===a||"pointer"===a||"sparkline"===a)&&!S&&!l&&!h,b=i.showArrow??this.showArrow??w;this.updateShowArrow(b),C&&(r.style.transition="none"),r.style.transform=`translate(${Math.round(v)}px, ${Math.round(y)}px)`,C&&(r.style.transition=""),i.enableInteraction?(this.enableInteraction=!0,r.style.pointerEvents="auto",NC(r,"aria-hidden",void 0)):(this.enableInteraction=!1,r.style.pointerEvents="none",
2NC(r,"aria-hidden",!0)),this.delay>0&&!n?(this.toggle(!1),this.showTimeout=setTimeout((()=>{this.toggle(!0)}),this.delay)):this.toggle(!0)}toggle(e){if(!this.element)return;const{classList:t}=this.element,i=(e,i)=>t.toggle(`${zC}-${e}`,i),s=this.isVisible();let n=1/0;if(e||clearTimeout(this.showTimeout),s!==e){const e=Date.now();n=e-this.lastVisibilityChange,this.lastVisibilityChange=e}n>5&&i("no-animation",!s&&e&&n>100),i("no-interaction",!this.enableInteraction),i("hidden",!e),i("arrow",this._showArrow),t.toggle(HC,this.darkTheme);for(const r of this.wrapTypes)t.toggle(`${zC}-wrap-${r}`,r===this.wrapping)}updateShowArrow(e){this._showArrow=e}getTooltipBounds(e){if(!this.element)return{};const{positionType:t,meta:i,yOffset:s,xOffset:n,canvasRect:r}=e,{clientWidth:o,clientHeight:a}=this.element,l={width:o,height:a};switch(t){case"node":case"pointer":return l.top=i.offsetY+s-a-8,l.left=i.offsetX+n-o/2,l;case"top":return l.top=s,l.left=r.width/2-o/2+n,l;case"right":return l.top=r.height/2-a/2+s,l.left=r.width-o/2+n,l;case"left":return l.top=r.height/2-a/2+s,l.left=n,l;case"bottom":return l.top=r.height-a+s,l.left=r.width/2-o/2+n,l;case"top-left":return l.top=s,l.left=n,l;case"top-right":return l.top=s,l.left=r.width-o+n,l;case"bottom-right":return l.top=r.height-a+s,l.left=r.width-o+n,l;case"bottom-left":return l.top=r.height-a+s,l.left=n,l;case"sparkline":return kC.isEnterprise?l.top=s-a-8:l.top=i.offsetY+s-a-8,l.left=i.offsetX+n-o/2,l}}};op([Ef(kf)],KC.prototype,"enabled",2),op([Ef(kf,{optional:!0})],KC.prototype,"showArrow",2),op([EC(((e,t,i)=>{t&&e.element?.classList.add(t),i&&e.element?.classList.remove(i)})),Ef(Of,{optional:!0})],KC.prototype,"class",2),op([Ef(zf)],KC.prototype,"delay",2),op([Ef(yv,{optional:!0})],KC.prototype,"range",2),op([Ef(uv)],KC.prototype,"wrapping",2),op([Ef(Lf)],KC.prototype,"position",2),op([Ef(kf)],KC.prototype,"darkTheme",2),op([Ef(Sv(["extended","canvas"]))],KC.prototype,"bounds",2);var $C=class extends Df{constructor(){super(...arguments),this.id=og(this),this.node=new hC({zIndex:1}).setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.padding=0,this.layoutStyle="block",this.truncated=!1}registerInteraction(e,t){const{regionManager:i,proxyInteractionService:s,layoutManager:n}=e,r=i.getRegion("root");return function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return()=>{for(const e of t)e()}}(...[n.addListener("layout:complete",(()=>this.updateA11yText(s,t))),r.addListener("hover",(t=>this.handleMouseMove(e,t))),r.addListener("leave",(t=>this.handleMouseLeave(e,t)))])}computeTextWrap(e,t){const{text:i,padding:s,wrapping:n}=this,r=Math.min(this.maxWidth??1/0,e)-2*s,o=this.maxHeight??t-2*s;if(!isFinite(r)&&!isFinite(o))return void(this.node.text=i);const a=FC.wrapText(i??"",{maxWidth:r,maxHeight:o,font:this,textWrap:n});this.node.text=a,this.truncated=a.includes(rC.EllipsisChar)}updateA11yText(e,t){if(this.enabled&&this.text){const i=wy.toCanvas(this.node);if(i){const{id:s}=this;this.proxyText??(this.proxyText=e.createProxyElement({type:"text",id:s,parent:t})),this.proxyText.textContent=this.text,this.proxyText.updateBounds(i)}}else this.proxyText?.remove(),this.proxyText=void 0}handleMouseMove(e,t){if(void 0!==t&&this.enabled&&this.node.visible&&this.truncated){const{offsetX:i,offsetY:s}=t;e.tooltipManager.updateTooltip(this.id,{offsetX:i,offsetY:s,lastPointerEvent:t,showArrow:!1},UC({content:this.text}))}}handleMouseLeave(e,t){e.tooltipManager.removeTooltip(this.id)}};$C.SMALL_PADDING=10,$C.LARGE_PADDING=20,op([Ef(kf),IC("node","visible")],$C.prototype,"enabled",2),op([Ef(Of,{optional:!0}),IC("node")],$C.prototype,"text",2),op([Ef(pv,{optional:!0}),IC("node")],$C.prototype,"textAlign",2),op([Ef(cv,{optional:!0}),IC("node")],$C.prototype,"fontStyle",2),op([Ef(dv,{optional:!0}),IC("node")],$C.prototype,"fontWeight",2),op([Ef(zf),IC("node")],$C.prototype,"fontSize",2),op([Ef(Of),IC("node")],$C.prototype,"fontFamily",2),op([Ef(Xf,{optional:!0}),IC("node","fill")],$C.prototype,"color",2),op([Ef(zf,{optional:!0})],$C.prototype,"spacing",2),op([Ef(zf,{optional:!0})],$C.prototype,"maxWidth",2),op([Ef(zf,{optional:!0})],$C.prototype,"maxHeight",2),op([Ef(uv)],$C.prototype,"wrapping",2),op([Ef(zf)],$C.prototype,"padding",2),op([Ef(Of)],$C.prototype,"layoutStyle",2);var YC=class e extends xy{constructor(e){super(e),this.opts=e,this.lastBBox=void 0}static is(t){return t instanceof e}markDirty(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;super.markDirty(e,1)}preRender(){const e=super.preRender();return e.nonGroups>0&&(this.layer??(this.layer=this._layerManager?.addLayer({name:this.name,zIndex:this.zIndex,zIndexSubOrder:this.zIndexSubOrder,getComputedOpacity:()=>this.getComputedOpacity(),getVisibility:()=>this.getVisibility()})),this.opts?.deriveZIndexFromChildren&&this.deriveZIndexFromChildren()),e}debugSkip(e){super.debugSkip(e);const{stats:t}=e;t&&(t.layersSkipped++,t.nodesSkipped+=hy(this).count)}
2render(e){if(!this.layer)return super.render(e);const{opts:{name:t}={},_debug:i,clipRect:s}=this,{isDirty:n,isChildDirty:r,isChildLayerDirty:o}=this.isDirty(e),{stats:a}=e;let{forceRender:l,clipBBox:h}=e;const c=this.getBBox();if(this.lastBBox?.equals(c)||(l="dirtyTransform",this.lastBBox=c),!n&&!r&&!o&&!l)return this.debugSkip(e),void this.markClean({recursive:!1});"dirtyTransform"!==l&&(l=r||this.dirtyZIndex),l&&this.layer.clear(),this.dirtyZIndex&&this.sortChildren(xy.compareChildren);const d=this.sortedChildren(),u=e.ctx.getTransform(),{context:p}=this.layer;if(p.save(),h){const{width:s,height:n,x:r,y:o}=h;p.beginPath(),p.rect(r,o,s,n),p.clip(),i?.((()=>({name:t,clipBBox:h,renderCtx:e,group:this,ctxTransform:p.getTransform()})))}p.setTransform(u),this.clipRect&&(h=this.renderClip({...e,ctx:p})),this.renderChildren(d,{...e,ctx:p,forceRender:l,clipBBox:h}),super.render(e,!0),s&&p.restore();for(const g of this.virtualChildren())g.markClean({recursive:"virtual"});a&&a.layersRendered++,p.restore(),p.verifyDepthZero?.(),t&&a&&i?.({name:t,renderCtx:e,result:"rendered",skipped:a.nodesSkipped,counts:hy(this),group:this})}deriveZIndexFromChildren(){let e;for(const t of this.children())t.childNodeCounts.nonGroups&&(!e||xy.compareChildren(e,t)<0)&&(e=t);this.zIndex=e?.zIndex??-1/0,this.zIndexSubOrder=e?.zIndexSubOrder}_setLayerManager(e){this.layer&&(this._layerManager?.removeLayer(this.layer),this.layer=void 0),super._setLayerManager(e)}getComputedOpacity(){let e=1;for(const t of this.traverseUp(!0))t instanceof xy&&(e*=t.opacity);return e}getVisibility(){for(const e of this.traverseUp(!0))if(!e.visible)return!1;return!0}onVisibleChange(){this.layer&&(this.layer.enabled=this.visible)}onZIndexChange(){super.onZIndexChange(),this.layer&&this._layerManager?.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder)}};YC.className="Layer";var ZC=YC,qC=class extends(Sy(ZC)){},QC=class extends eC{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.isRange=!1,this.restoreOwnStyles()}computeBBox(){return new Vg(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(e,t){return!1}render(e){const{ctx:t,forceRender:i,stats:s}=e;if(0===this.dirty&&!i)return void(s&&(s.nodesSkipped+=hy(this).count));let{x1:n,y1:r,x2:o,y2:a}=this;n=this.align(n),r=this.align(r),o=this.align(o),a=this.align(a);const{fill:l,opacity:h,isRange:c}=this;if(!(!c||!l)){const{fillOpacity:e}=this;this.applyFill(t),t.globalAlpha=h*e,t.beginPath(),t.moveTo(n,r),t.lineTo(o,r),t.lineTo(o,a),t.lineTo(n,a),t.closePath(),t.fill()}const{stroke:d,strokeWidth:u,startLine:p,endLine:g}=this;if(!(!p&&!g||!d||!u)){const{strokeOpacity:e,lineDash:i,lineDashOffset:s,lineCap:l,lineJoin:c}=this;t.strokeStyle=d,t.globalAlpha=h*e,t.lineWidth=u,i&&t.setLineDash(i),s&&(t.lineDashOffset=s),l&&(t.lineCap=l),c&&(t.lineJoin=c),t.beginPath(),p&&(t.moveTo(n,r),t.lineTo(o,r)),g&&(t.moveTo(o,a),t.lineTo(n,a)),t.stroke()}this.fillShadow?.markClean(),super.render(e)}};QC.className="Range",QC.defaultStyles={...eC.defaultStyles,strokeWidth:1},op([Hg({redraw:2})],QC.prototype,"x1",2),op([Hg({redraw:2})],QC.prototype,"y1",2),op([Hg({redraw:2})],QC.prototype,"x2",2),op([Hg({redraw:2})],QC.prototype,"y2",2),op([Hg({redraw:2})],QC.prototype,"startLine",2),op([Hg({redraw:2})],QC.prototype,"endLine",2),op([Hg({redraw:2})],QC.prototype,"isRange",2);var XC=class extends Df{constructor(){super(...arguments),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}getFont(){return rC.toFontString(this)}};function JC(e){const{parallelFlipRotation:t=0,regularFlipRotation:i=0}=e,s=e.rotation?Ly(Oy(e.rotation)):0,n=!s&&t>=0&&t<=Math.PI?-1:1,r=!s&&i>=0&&i<=Math.PI?-1:1;let o=0;return e.parallel?o=n*Math.PI/2:-1===r&&(o=Math.PI),{configuredRotation:s,defaultRotation:o,parallelFlipFlag:n,regularFlipFlag:r}}function eS(e,t){return isNaN(e)?t?0:10:e}function tS(e,t,i,s,n){const r=t>0&&t<=Math.PI,o=i>0&&i<=Math.PI;if(e){if(!t&&!i)return"center";if(s*(r||o?-1:1)===-1)return"end"}else if(s*n===-1)return"end";return"start"}function iS(e,t,i){const{x:s,y:n,width:r,height:o}=t,a=new Vg(s,n,0,0);i.transformBBox(a,t);const{x:l,y:h}=t;return{point:{x:l,y:h},label:{text:e,width:r,height:o}}}op([Ef(kf)],XC.prototype,"enabled",2),op([Ef(Xf,{optional:!0})],XC.prototype,"color",2),op([Ef(cv,{optional:!0})],XC.prototype,"fontStyle",2),op([Ef(dv,{optional:!0})],XC.prototype,"fontWeight",2),op([Ef(zf)],XC.prototype,"fontSize",2),op([Ef(Of)],XC.prototype,"fontFamily",2),op([Ef(Nf,{optional:!0})],XC.prototype,"formatter",2);var sS=(e=>(e[e.SERIES_BACKGROUND=0]="SERIES_BACKGROUND",e[e.AXIS_GRID=1]="AXIS_GRID",e[e.AXIS=2]="AXIS",e[e.SERIES_CROSSLINE_RANGE=3]="SERIES_CROSSLINE_RANGE",e[e.SERIES_LAYER=4]="SERIES_LAYER",e[e.SERIES_HIGHLIGHT=5]="SERIES_HIGHLIGHT",e[e.AXIS_FOREGROUND=6]="AXIS_FOREGROUND",e[e.SERIES_CROSSHAIR=7]="SERIES_CROSSHAIR",e[e.CHART_OVERLAY=8]="CHART_OVERLAY",e[e.SERIES_CROSSLINE_LINE=9]="SERIES_CROSSLINE_LINE",e[e.SERIES_ANNOTATION=10]="SERIES_ANNOTATION",e[e.CHART_ANNOTATION=11]="CHART_ANNOTATION",e[e.CHART_ANNOTATION_FOCUSED=12]="CHART_ANNOTATION_FOCUSED",e[e.STATUS_BAR=13]="STATUS_BAR",e[e.SERIES_LABEL=14]="SERIES_LABEL",e[e.LEGEND=15]="LEGEND",e[e.NAVIGATOR=16]="NAVIGATOR",e[e.FOREGROUND=17]="FOREGROUND",e))(sS||{});function nS(e){return null!=e&&Object.hasOwn(e,"toString")&&fm(e.toString())}function rS(e){return null!=e&&Object.hasOwn(e,"valueOf")&&ym(e.valueOf())}function oS(e){return ym(e)||cm(e)||rS(e)}function aS(e,t){return null!=e&&(!t||oS(e))}function lS(e){return nS(e)&&Object.hasOwn(e,"id")?e.id:e}var hS=e=>"value"===e?xv(((e,t)=>"line"===t.target.type),(e=>"range"===e.target.type?"crossLine type 'range' to have a 'range' property instead of 'value'":"crossLine property 'type' to be 'line'")):xv(((e,t)=>"range"===t.target.type),(e=>"line"===e.target.type?"crossLine type 'line' to have a 'value' property instead of 'range'":"crossLine property 'type' to be 'range'")),cS=(e,t,i,s,n)=>{const r="line"===e&&void 0!==t,o="range"===e&&void 0!==i;if(!r&&!o)return!0;const[a,l]=i??[t,void 0],h=sf.is(s)||ry.is(s),c=aS(a,h)&&!isNaN(s.convert(a)),d=aS(l,h)&&!isNaN(s.convert(l));if(r&&c||o&&c&&d)return n?.()??!0;const u=["Expecting crossLine"];return o?(c||u.push(`range start ${Iv(a)}`),d||u.push(`${c?"":"and "}range end ${Iv(l)}`)):u.push(`value ${Iv(a)}`),u.push("to match the axis scale domain."),fp.warnOnce(u.join(" ")),!1},dS={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1}
2,left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},topLeft:{xTranslationDirection:1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:-1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:1},bottomRight:{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:1,yTranslationDirection:0},insideRight:{xTranslationDirection:-1,yTranslationDirection:0},insideTop:{xTranslationDirection:0,yTranslationDirection:1},insideBottom:{xTranslationDirection:0,yTranslationDirection:-1},insideTopLeft:{xTranslationDirection:1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomRight:{xTranslationDirection:-1,yTranslationDirection:-1}},uS={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},topLeft:{xTranslationDirection:-1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},bottomRight:{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:0,yTranslationDirection:1},insideRight:{xTranslationDirection:0,yTranslationDirection:-1},insideTop:{xTranslationDirection:-1,yTranslationDirection:0},insideBottom:{xTranslationDirection:1,yTranslationDirection:0},insideTopLeft:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:-1},insideBottomRight:{xTranslationDirection:1,yTranslationDirection:-1}};function pS(e){let{yDirection:t,padding:i=0,position:s="top",bbox:n}=e;const r=t?dS:uS,{xTranslationDirection:o,yTranslationDirection:a}=r[s];return{xTranslation:o*(i+n.width/2),yTranslation:a*(i+n.height/2)}}function gS(e){let{yDirection:t,bbox:i,padding:s=0,position:n="top"}=e;const r={};return n.startsWith("inside")||("top"!==n||t?"bottom"!==n||t?"left"===n&&t?r.left=s+i.width:"right"===n&&t&&(r.right=s+i.width):r.bottom=s+i.height:r.top=s+i.height),r}var mS=e=>{let{direction:t,xEnd:i,yStart:s,yEnd:n}=e;return"y"===t?{x:i/2,y:s}:{x:i,y:isNaN(n)?s:(s+n)/2}},fS=e=>{let{direction:t,xStart:i,xEnd:s,yStart:n,yEnd:r}=e;return"y"===t?{x:i,y:isNaN(r)?n:(n+r)/2}:{x:s/2,y:n}},vS=e=>{let{direction:t,xEnd:i,yStart:s,yEnd:n}=e;return"y"===t?{x:i,y:isNaN(n)?s:(s+n)/2}:{x:i/2,y:isNaN(n)?s:n}},yS=e=>{let{direction:t,xStart:i,xEnd:s,yStart:n,yEnd:r}=e;return"y"===t?{x:s/2,y:isNaN(r)?n:r}:{x:i,y:isNaN(r)?n:(n+r)/2}},CS=e=>{let{direction:t,xStart:i,xEnd:s,yStart:n}=e;return"y"===t?{x:i/2,y:n}:{x:s,y:n}},SS=e=>{let{direction:t,xStart:i,yStart:s,yEnd:n}=e;return"y"===t?{x:i,y:isNaN(n)?s:n}:{x:i,y:s}},wS=e=>{let{direction:t,xEnd:i,yStart:s,yEnd:n}=e;return"y"===t?{x:i,y:s}:{x:i,y:isNaN(n)?s:n}},bS=e=>{let{direction:t,xStart:i,xEnd:s,yStart:n,yEnd:r}=e;return"y"===t?{x:s,y:isNaN(r)?n:r}:{x:i,y:isNaN(r)?n:r}},xS={top:{c:mS},bottom:{c:yS},left:{c:fS},right:{c:vS},topLeft:{c:CS},topRight:{c:wS},bottomLeft:{c:SS},bottomRight:{c:bS},inside:{c:e=>{let{xEnd:t,yStart:i,yEnd:s}=e;return{x:t/2,y:isNaN(s)?i:(i+s)/2}}},insideLeft:{c:fS},insideRight:{c:vS},insideTop:{c:mS},insideBottom:{c:yS},insideTopLeft:{c:CS},insideBottomLeft:{c:SS},insideTopRight:{c:wS},insideBottomRight:{c:bS}},MS=Sv(["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],"crossLine label position"),DS=class extends Df{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};op([Ef(kf,{optional:!0})],DS.prototype,"enabled",2),op([Ef(Of,{optional:!0})],DS.prototype,"text",2),op([Ef(cv,{optional:!0})],DS.prototype,"fontStyle",2),op([Ef(dv,{optional:!0})],DS.prototype,"fontWeight",2),op([Ef(zf)],DS.prototype,"fontSize",2),op([Ef(Of)],DS.prototype,"fontFamily",2),op([Ef(Gf)],DS.prototype,"padding",2),op([Ef(Xf,{optional:!0})],DS.prototype,"color",2),op([Ef(MS,{optional:!0})],DS.prototype,"position",2),op([Ef(Wf,{optional:!0})],DS.prototype,"rotation",2),op([Ef(kf,{optional:!0})],DS.prototype,"parallel",2);var IS=class e extends Df{constructor(){super(),this.id=og(this),this.label=new DS,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction="x",this.group=new ZC({name:this.id,zIndex:e.LINE_LAYER_ZINDEX}),this.labelGroup=new ZC({name:this.id,zIndex:e.LABEL_LAYER_ZINDEX}),this.crossLineRange=new QC,this.crossLineLabel=new cC,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1,this.group.append(this.crossLineRange),this.labelGroup.append(this.crossLineLabel),this.crossLineRange.pointerEvents=1}update(e){const{enabled:t,data:i,type:s,value:n,range:r,scale:o}=this;if(!s||!o||!t||!e||!cS(s,n,r,o)||0===i.length)return this.group.visible=!1,void(this.labelGroup.visible=!1);this.group.visible=e,this.labelGroup.visible=e,this.group.zIndex=this.getZIndex(this.isRange),this.updateNodes()}calculateLayout(e,t){if(!e)return;const{scale:i,gridLength:s,sideFlag:n,direction:r,label:{position:o="top"},clippedRange:a,strokeWidth:l=0}=this;if(this.data=[],!i)return;const h=i.bandwidth??0,c=i.step??0,d=(t?-1:1)*(i instanceof Mf?(c-h)/2:0),[u,p]=[0,n*s];let[g,m]=this.getRange();const f=void 0===m&&ry.is(i)?h/2+d:0;let[v,y]=[Number(i.convert(g,{clampMode:"clamped"}))-d+f,i.convert(m,{clampMode:"clamped"})+h+d];v=Rg(v,a),y=Rg(y,a),[g,m]=[Number(i.convert(g))+f,i.convert(m)+h];const C=(g===v||m===y||v!==y)&&Math.abs(y-v)>0;if(C&&v>y&&([v,y]=[y,v],[g,m]=[m,g]),g-d>=v&&(g-=d),m+d<=y&&(m+=d),this.isRange=C,this.startLine=l>0&&g>=v&&g<=v+d,this.endLine=l>0&&m>=y-h-d&&m<=y,!C&&!this.startLine&&!this.endLine)return;if(this.data=[v,y],!this.label.enabled)return;const{c:S=mS}=xS[o]??{},{x:w,y:b}=S({direction:r,xStart:u,xEnd:p,yStart:v,yEnd:y});this.labelPoint={x:w,y:b}}updateNodes(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())}updateRangeNode(){const{crossLineRange:e,sideFlag:t,gridLength:i,data:s,startLine:n,endLine:r,isRange:o,fill:a,fillOpacity:l,stroke:h,strokeWidth:c,lineDash:d}=this;e.x1=0,e.x2=t*i,e.y1=s[0],e.y2=s[1],e.startLine=n,e.endLine=r,e.isRange=o,e.fill=a,e.fillOpacity=l??1,e.stroke=h,e.strokeWidth=c??1,e.strokeOpacity=this.strokeOpacity??1,e.lineDash=d}updateLabel(){const{crossLineLabel:e,label:t}=this;t.text&&(e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.color,e.text=t.text)}positionLabel(){const{crossLineLabel:e,labelPoint:{x:t,y:i}={},label:{parallel:s,rotation:n,position:r="top",padding:o=0},direction:a,parallelFlipRotation:l,regularFlipRotation:h}=this;if(void 0===t||void 0===i)return;const{defaultRotation:c,configuredRotation:d}=JC({rotation:n,parallel:s,regularFlipRotation:h,parallelFlipRotation:l});e.rotation=c+d,e.textBaseline="middle",e.textAlign="center";const u=e.getBBox();if(!u)return;const p="y"===a,{xTranslation:g,yTranslation:m}=pS({yDirection:p,padding:o,position:r,bbox:u});e.translationX=t+g,e.translationY=i+m}getZIndex(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?e.RANGE_LAYER_ZINDEX:e.LINE_LAYER_ZINDEX}getRange(){const{value:e,range:t,scale:i}=this,s=sf.is(i)||ry.is(i),n=t?.[0]??e;let r=t?.[1];return s||void 0!==r||(r=n),s&&n===r&&(r=void 0),[n,r]}computeLabelBBox(){const{label:e}=this;if(!e.enabled)return;const t=new cC;t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=e.text;const{labelPoint:{x:i,y:s}={},label:{parallel:n,rotation:r,position:o="top",padding:a=0},direction:l,parallelFlipRotation:h,regularFlipRotation:c}=this;if(void 0===i||void 0===s)return;const{configuredRotation:d}=JC({rotation:r,parallel:n,regularFlipRotation:c,parallelFlipRotation:h});t.rotation=d,t.textBaseline="middle",t.textAlign="center";const u=t.getBBox();if(!u)return;const p="y"===l,{xTranslation:g,yTranslation:m}=pS({yDirection:p,padding:a,position:o,bbox:u});return t.x=i+g,t.y=s+m,t.getBBox()}calculatePadding(e){const{isRange:t,startLine:i,endLine:s,direction:n,label:{padding:r=0,position:o="top"}}=this;if(!t&&!i&&!s)return;const a=this.computeLabelBBox();if(null==a?.x||null==a?.y)return;const l=gS({yDirection:"y"===n,padding:r,position:o,bbox:a});e.left=Math.max(e.left??0,l.left??0),e.right=Math.max(e.right??0,l.right??0),e.top=Math.max(e.top??0,l.top??0),e.bottom=Math.max(e.bottom??0,l.bottom??0)}};IS.LINE_LAYER_ZINDEX=9,IS.RANGE_LAYER_ZINDEX=3,IS.LABEL_LAYER_ZINDEX=14,IS.className="CrossLine",op([Ef(kf,{optional:!0})],IS.prototype,"enabled",2),op([Ef(Sv(["range","line"],"a crossLine type"),{optional:!0})],IS.prototype,"type",2),op([Ef(Tf(hS("range"),Uf.restrict({length:2})),{optional:!0})],IS.prototype,"range",2),op([Ef(hS("value"),{optional:!0})],IS.prototype,"value",2),op([Ef(Xf,{optional:!0})],IS.prototype,"fill",2),op([Ef(Hf,{optional:!0})],IS.prototype,"fillOpacity",2),op([Ef(Xf,{optional:!0})],IS.prototype,"stroke",2),op([Ef(Gf,{optional:!0})],IS.prototype,"strokeWidth",2),op([Ef(Hf,{optional:!0})],IS.prototype,"strokeOpacity",2),op([Ef(lv,{optional:!0})],IS.prototype,"lineDash",2),op([Ef(Lf)],IS.prototype,"label",2);var RS=IS,ES=["stroke","lineDash"],AS=_f((e=>pm(e)&&Object.keys(e).every((e=>ES.includes(e)))),"objects with gridline style properties such as 'stroke' or 'lineDash'"),TS=class{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}};function PS(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[void 0];return im(((i,s,n)=>t.includes(n)?um(e)?e(n):e:n))}op([Ef(kf)],TS.prototype,"enabled",2),op([Ef(zf)],TS.prototype,"width",2),op([Ef(AS)],TS.prototype,"style",2);var LS=xv((e=>ym(e)&&e>0||e instanceof vp),"a non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),FS=class extends Df{constructor(){super(...arguments),this.minSpacing=NaN,this.maxSpacing=NaN}};op([Ef(LS,{optional:!0})],FS.prototype,"step",2),op([Ef(Uf,{optional:!0})],FS.prototype,"values",2),op([Ef(wv),PS(NaN)],FS.prototype,"minSpacing",2),op([Ef(bv),PS(NaN)],FS.prototype,"maxSpacing",2);var kS=class extends Df{constructor(){super(...arguments),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=NaN,this.color="#575757",this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1}getSideFlag(){return this.mirrored?1:-1}};op([Ef(kf)],kS.prototype,"enabled",2),op([Ef(cv,{optional:!0})],kS.prototype,"fontStyle",2),op([Ef(dv,{optional:!0})],kS.prototype,"fontWeight",2),op([Ef(Gf.restrict({min:1}))],kS.prototype,"fontSize",2),op([Ef(Of)],kS.prototype,"fontFamily",2),op([Ef(zf)],kS.prototype,"padding",2),op([Ef(jf),PS(NaN)],kS.prototype,"minSpacing",2),op([Ef(Xf,{optional:!0})],kS.prototype,"color",2),op([Ef(Wf,{optional:!0})],kS.prototype,"rotation",2),op([Ef(kf)],kS.prototype,"avoidCollisions",2),op([Ef(kf)],kS.prototype,"mirrored",2),op([Ef(kf)],kS.prototype,"parallel",2),op([Ef(Nf,{optional:!0})],kS.prototype,"formatter",2),op([Ef(Of,{optional:!0})],kS.prototype,"format",2);var NS=class{constructor(){this.enabled=!0,this.width=1,this.stroke=void 0}};op([Ef(kf)],NS.prototype,"enabled",2),op([Ef(zf)],NS.prototype,"width",2),op([Ef(Xf,{optional:!0})],NS.prototype,"stroke",2);var OS=class extends Df{constructor(){super(...arguments),this.enabled=!0,this.width=1,this.size=6}};op([Ef(kf)],OS.prototype,"enabled",2),op([Ef(zf)],OS.prototype,"width",2),op([Ef(zf)],OS.prototype,"size",2),op([Ef(Xf,{optional:!0})],OS.prototype,"stroke",2);var GS=class extends Df{constructor(){super(...arguments),this.caption=new $C,this.enabled=!1,this.spacing=$C.SMALL_PADD
2ING,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always"}};function BS(e){const[t,i]=Eg(e.range),s=Math.floor(t),n=Math.ceil(i);return{min:s,max:n,visible:s!==n}}op([Ef(kf)],GS.prototype,"enabled",2),op([Ef(Of,{optional:!0})],GS.prototype,"text",2),op([Ef(zf,{optional:!0})],GS.prototype,"spacing",2),op([Ef(cv,{optional:!0})],GS.prototype,"fontStyle",2),op([Ef(dv,{optional:!0})],GS.prototype,"fontWeight",2),op([Ef(zf)],GS.prototype,"fontSize",2),op([Ef(Of)],GS.prototype,"fontFamily",2),op([Ef(Xf,{optional:!0})],GS.prototype,"color",2),op([Ef(uv)],GS.prototype,"wrapping",2),op([Ef(Nf,{optional:!0})],GS.prototype,"formatter",2);var VS=2*Math.PI,zS=VS/2;function HS(e){const t=(t,i)=>{const[s=e.min,n=e.max]=Eg(i??[]);return t<s||t>n};return{tick:{fromFn(e,i,s){let n=e.y1+e.translationY,r=e.opacity;return("added"===s||t(e.datum.translationY,e.datum.range))&&(n=i.translationY,r=0),{y:0,translationY:n,opacity:r,phase:qm[s]}},toFn(e,t,i){const s=t.translationY;let n=1;return"removed"===i&&(n=0),{y:0,translationY:s,opacity:n,finish:{y:s,translationY:0}}},applyFn(e,i){e.setProperties(i),e.visible=!t(e.y)}},line:{fromFn:(e,t)=>({...e.previousDatum??t,phase:qm.updated}),toFn:(e,t)=>({...t})},label:{fromFn(e,i,s){const n=e.previousDatum??i,r=n.x,o=n.y,a=n.rotationCenterX;let l=Math.round(e.translationY),h=n.rotation,c=e.opacity;return"removed"===s||t(n.y,n.range)?h=i.rotation:("added"===s||t(e.datum.y,e.datum.range))&&(l=Math.round(n.translationY),c=0,h=i.rotation),{x:r,y:o,rotationCenterX:a,translationY:l,rotation:h,opacity:c,phase:qm[s]}},toFn(e,t,i){const s=t.x,n=t.y,r=t.rotationCenterX,o=Math.round(t.translationY);let a=0,l=1;var h,c;return"added"===i?(l=1,a=t.rotation):"removed"===i?(l=0,a=t.rotation):(h=e.previousDatum?.rotation??t.rotation,c=t.rotation,a=Math.abs(c-h)<zS?c:h>c?c+VS:c-VS),{x:s,y:n,rotationCenterX:r,translationY:o,rotation:a,opacity:l,finish:{rotation:t.rotation}}}},group:{fromFn(e,t){const{rotation:i,translationX:s,translationY:n}=e;return{rotation:i,translationX:s,translationY:n,phase:qm.updated}},toFn(e,t){const{rotation:i,translationX:s,translationY:n}=t;return{rotation:i,translationX:s,translationY:n}}}}}function WS(){return(e,t)=>({rotation:t.rotation,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,translationX:t.translationX,translationY:t.translationY})}function jS(e){const{visible:t,min:i,max:s}=e;return(e,n)=>{const r=n.translationY;return{y:r,translationY:0,opacity:1,visible:t&&r>=i&&r<=s}}}function US(){return(e,t)=>({x:t.x,y:t.y,translationY:t.translationY,rotation:t.rotation,rotationCenterX:t.rotationCenterX})}function _S(){return(e,t)=>({...t})}var KS=class extends(Sy(tC)){},$S=class e{constructor(t,i){let s;this.moduleCtx=t,this.scale=i,this.id=og(this),this.nice=!0,this.reverse=!1,this.keys=[],this.interval=new FS,this.dataDomain={domain:[],clipped:!1},this.layoutConstraints={stacked:!0,align:"start",width:100,unit:"percent"},this.boundSeries=[],this.includeInvisibleDomains=!1,this.interactionEnabled=!0,this.axisGroup=new Ry({name:`${this.id}-axis`,zIndex:2}),this.lineNode=this.axisGroup.appendChild(new KS({name:`${this.id}-Axis-line`}
2)),this.tickLineGroup=this.axisGroup.appendChild(new xy({name:`${this.id}-Axis-tick-lines`,zIndex:2})),this.tickLabelGroup=this.axisGroup.appendChild(new xy({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.crossLineGroup=new Ry({name:`${this.id}-CrossLines`}),this.labelGroup=new xy({name:`${this.id}-Labels`,zIndex:10}),this.gridGroup=new Ry({name:`${this.id}-Axis-grid`}),this.gridLineGroup=this.gridGroup.appendChild(new xy({name:`${this.id}-gridLines`,zIndex:1})),this.tickLineGroupSelection=Ty.select(this.tickLineGroup,KS,!1),this.tickLabelGroupSelection=Ty.select(this.tickLabelGroup,cC,!1),this.gridLineGroupSelection=Ty.select(this.gridLineGroup,KS,!1),this._crossLines=[],this.line=new NS,this.tick=new OS,this.gridLine=new TS,this.label=this.createLabel(),this.defaultTickMinSpacing=e.defaultTickMinSpacing,this.translation={x:0,y:0},this.rotation=0,this.layout={label:{fractionDigits:0,padding:this.label.padding,format:this.label.format}},this.destroyFns=[],this.range=[0,1],this.visibleRange=[0,1],this.title=new GS,this.gridLength=0,this.gridPadding=0,this.seriesAreaPadding=0,this.tickGenerationResult=void 0,this.moduleMap=new Ev,this.range=this.scale.range.slice(),this.crossLines.forEach((e=>this.initCrossLine(e))),this.axisGroup.appendChild(this.title.caption.node),this.animationManager=t.animationManager,this.animationState=new LC("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()},reset:"empty"},ready:{update:e=>this.animateReadyUpdate(e),resize:()=>this.resetSelectionNodes(),reset:"empty"}}),this.destroyFns.push(this.title.caption.registerInteraction(this.moduleCtx,"afterend"),t.layoutManager.addListener("layout:complete",(e=>{null!=s&&null!=vC(e.chart,s)&&this.animationState.transition("resize"),s={...e.chart}})))}get type(){return this.constructor.type??""}set crossLines(e){const{CrossLineConstructor:t}=this.constructor;this._crossLines.forEach((e=>this.detachCrossLine(e))),this._crossLines=e.map((e=>{const i=new t;return i.set(e),i})),this._crossLines.forEach((e=>{this.attachCrossLine(e),this.initCrossLine(e)}))}get crossLines(){return this._crossLines}
2resetAnimation(e){"initial"===e&&this.animationState.transition("reset")}attachCrossLine(e){this.crossLineGroup.appendChild(e.group),this.crossLineGroup.appendChild(e.labelGroup)}detachCrossLine(e){this.crossLineGroup.removeChild(e.group),this.crossLineGroup.removeChild(e.labelGroup)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach((e=>e()))}updateRange(){const{range:e,visibleRange:t,scale:i}=this,s=(e[1]-e[0])/(t[1]-t[0]),n=s*t[0],r=e[0]-n;i.setVisibleRange?.(t),i.range=[r,r+s],this.crossLines.forEach((t=>{t.clippedRange=[e[0],e[1]]}))}setCrossLinesVisible(e){this.crossLineGroup.visible=e}attachAxis(e,t){t.appendChild(this.gridGroup),e.appendChild(this.axisGroup),e.appendChild(this.crossLineGroup),e.appendChild(this.labelGroup)}attachLabel(e){this.labelGroup.append(e)}detachAxis(e,t){t.removeChild(this.gridGroup),e.removeChild(this.axisGroup),e.removeChild(this.crossLineGroup),e.removeChild(this.labelGroup)}inRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const[i,s]=Eg(this.range);return e>=i-t&&e<=s+t}onFormatChange(e,t,i,s){const{scale:n}=this,r=n instanceof ty,o=e=>r?String:i=>"number"===typeof i?i.toFixed(t+e):String(i);if(s&&n&&n.tickFormat)try{const t=n.tickFormat({ticks:e,specifier:s});this.labelFormatter=t,this.datumFormatter=t}catch(a){this.labelFormatter=o(0),this.datumFormatter=o(1),fp.warnOnce(`the axis label format string ${s}
2 is invalid. No formatting will be applied`)}else this.labelFormatter=o(0),this.datumFormatter=o(1)}onGridLengthChange(e,t){t^e&&this.onGridVisibilityChange(),this.crossLines.forEach((e=>this.initCrossLine(e)))}onGridVisibilityChange(){this.gridLineGroupSelection.clear()}createLabel(){return new kS}update(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.tickGenerationResult)return;const{rotation:t,parallelFlipRotation:i,regularFlipRotation:s}=this.calculateRotations(),n=this.label.getSideFlag();this.updatePosition();const r=this.getAxisLineCoordinates(),{tickData:o,combinedRotation:a,textBaseline:l,textAlign:h,primaryTickCount:c}=this.tickGenerationResult,d=this.tickLabelGroupSelection.nodes().map((e=>e.datum.tickId));if(this.updateSelections(r,o.ticks,{combinedRotation:a,textAlign:h,textBaseline:l,range:this.scale.range}),!e||this.animationManager.isSkipped())this.resetSelectionNodes();else{const e=this.calculateUpdateDiff(d,o);this.animationState.transition("update",e)}return this.updateAxisLine(),this.updateLabels(),this.updateVisibility(),this.updateGridLines(n),this.updateTickLines(),this.updateTitle({anyTickVisible:o.ticks.length>0}),this.updateCrossLines({rotation:t,parallelFlipRotation:i,regularFlipRotation:s}),this.updateLayoutState(o.fractionDigits),c}getAxisLineCoordinates(){const[e,t]=Eg(this.range);return{x:0,y1:e,y2:t}}getTickLineCoordinates(e){const t=this.label.getSideFlag()*this.getTickSize(),i=Math.min(0,t);return{x1:i,x2:i+Math.abs(t),y:e.translationY}}getTickLabelProps(e,t){const{label:i}=this,{combinedRotation:s,textBaseline:n,textAlign:r,range:o}=t,a=e.tickLabel,l=i.getSideFlag()*(this.getTickSize()+i.padding+this.seriesAreaPadding),h=""!==a&&null!=a;return{tickId:e.tickId,translationY:e.translationY,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,rotation:s,rotationCenterX:l,text:a,textAlign:r,textBaseline:n,visible:h,x:l,y:0,range:o}}getTickSize(){return this.tick.enabled?this.tick.size:6}setTitleProps(e,t){const{title:i}=this;if(!i.enabled)return e.enabled=!1,void(e.node.visible=!1);e.color=i.color,e.fontFamily=i.fontFamily,e.fontSize=i.fontSize,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.enabled=i.enabled,e.wrapping=i.wrapping;const s=e.node,n=(i.spacing??0)+t.spacing,r=this.label.getSideFlag(),o=Ly(this.rotation),a=-1===r&&o>Math.PI&&o<2*Math.PI?-1:1,l=a*r*Math.PI/2,h=1===a?"bottom":"top",{range:c}=this,d=Math.floor(a*r*(c[0]+c[1])/2),u=-1===r?Math.floor(a*-n):Math.floor(-n),{callbackCache:p}=this.moduleCtx,{formatter:g=e=>e.defaultValue}=i,m=p.call(g,this.getTitleFormatterParams());e.text=m,s.setProperties({visible:!0,text:m,textBaseline:h,x:d,y:u,rotation:l})}calculateLayout(e,t){const{rotation:i,parallelFlipRotation:s,regularFlipRotation:n}=this.calculateRotations(),r=this.label.getSideFlag(),o=r*(this.getTickSize()+this.label.padding+this.seriesAreaPadding);this.updateScale(e),this.tickGenerationResult=this.generateTicks({primaryTickCount:t,parallelFlipRotation:s,regularFlipRotation:n,labelX:o,sideFlag:r});const{tickData:a,combinedRotation:l,textBaseline:h,textAlign:c,...d}=this.tickGenerationResult;this.updateLayoutState(a.fractionDigits);const u=[],{x:p,y1:g,y2:m}=this.getAxisLineCoordinates(),f=new Vg(p+Math.min(r*this.seriesAreaPadding,0),g,this.seriesAreaPadding,m-g);if(u.push(f),this.tick.enabled&&a.ticks.forEach((e=>{const{x1:t,x2:i,y:s}=this.getTickLineCoordinates(e),n=new Vg(t,s,i-t,0);u.push(n)})),this.label.enabled){const e=new cC;a.ticks.forEach((t=>{const i=this.getTickLabelProps(t,{combinedRotation:l,textAlign:c,textBaseline:h,range:this.scale.range});if(!i.visible)return;e.setProperties({...i,translationY:Math.round(t.translationY)});const s=e.getBBox();s&&u.push(s)}))}if(this.title?.enabled){const e=new $C,t=Vg.merge(u).width;this.setTitleProps(e,{spacing:t});const i=e.node.getBBox();i&&u.push(i)}const v=Vg.merge(u),y=this.getTransformBox(v),C=this.isAnySeriesActive();return this.crossLines.forEach((e=>{var t;e.sideFlag=-r,e.direction=i===-Math.PI/2?"x":"y",e instanceof RS&&((t=e.label).parallel??(t.parallel=this.label.parallel)),e.parallelFlipRotation=s,e.regularFlipRotation=n,e.calculateLayout?.(C,this.reverse)})),{primaryTickCount:d.primaryTickCount,bbox:y}}updateLayoutState(e){this.layout.label={fractionDigits:e,padding:this.label.padding,format:this.label.format}}getTransformBox(e){const t=new py,{rotation:i,translationX:s,translationY:n}=this.getAxisTransform();return py.updateTransformMatrix(t,1,1,i,s,n),t.transformBBox(e)}setDomain(e){this.dataDomain=this.normaliseDataDomain(e),this.reverse&&this.dataDomain.domain.reverse(),this.scale.domain=this.dataDomain.domain}updateScale(e){e?this.setDomain(e):this.calculateDomain(),this.updateRange(),this.scale.interval=this.interval.step,sf.is(this.scale)&&(this.scale.nice=this.nice,this.scale.update(
2))}calculateRotations(){const e=Oy(this.rotation);return{rotation:e,parallelFlipRotation:Ly(e),regularFlipRotation:Ly(e-Math.PI/2)}}generateTicks(e){let{primaryTickCount:t,parallelFlipRotation:i,regularFlipRotation:s,labelX:n,sideFlag:r}=e;const{scale:o,interval:{minSpacing:a,maxSpacing:l},label:{parallel:h,rotation:c,fontFamily:d,fontSize:u,fontStyle:p,fontWeight:g}}=this,m=void 0!==t,{defaultRotation:f,configuredRotation:v,parallelFlipFlag:y,regularFlipFlag:C}=JC({rotation:c,parallel:h,regularFlipRotation:s,parallelFlipRotation:i}),S=v+f,w=new py,{maxTickCount:b}=this.estimateTickCount({minSpacing:a,maxSpacing:l}),x=!(sf.is(o)||ry.is(o))||isNaN(b)?10:b;let M=tS(h,v,0,r,C);const D=function(e,t,i,s){return e&&!t?i*s===-1?"hanging":"bottom":"middle"}(h,v,r,y),I=rC.toFontString({fontFamily:d,fontSize:u,fontStyle:p,fontWeight:g}),R=sC.getMeasurer({font:I}),E={fontFamily:d,fontSize:u,fontStyle:p,fontWeight:g,textBaseline:D,textAlign:M};let A={rawTicks:[],fractionDigits:0,ticks:[],labelCount:0},T=0,P=0,L=!0,F=[],k=!1;for(;L&&T<=x&&!k;){P=0,M=tS(h,v,0,r,C);const e=this.getTickStrategies({secondaryAxis:m,index:T});for(const i of e){({tickData:A,index:T,autoRotation:P,terminate:k}=i({index:T,tickData:A,textProps:E,labelOverlap:L,terminate:k,primaryTickCount:t}));const e=0!==v||0!==P,s=S+P,o=eS(this.label.minSpacing,e);py.updateTransformMatrix(w,1,1,s,0,0),M=tS(h,v,P,r,C),F=this.createLabelData(A.ticks,n,w,R),L=!!this.label.avoidCollisions&&gC(F,o)}}const N=f+v+P;return!m&&A.rawTicks.length>0&&(t=A.rawTicks.length),{tickData:A,primaryTickCount:t,combinedRotation:N,textBaseline:D,textAlign:M,labelData:F}}getTickStrategies(e){let{index:t,secondaryAxis:i}=e;const{scale:s,label:n}=this,{minSpacing:r}=this.interval,o=sf.is(s)||ry.is(s),a=n.enabled&&n.avoidCollisions,l=!o&&0!==t&&a,h=!0===n.autoRotate&&void 0===n.rotation,c=[];let d;d=this.interval.values?3:i?1:l?2:0;if(c.push((e=>{let{index:t,tickData:i,primaryTickCount:s,terminate:n}=e;return this.createTickData(d,t,i,n,s)})),!o&&!isNaN(r)){const e=e=>{let{index:t,tickData:i,primaryTickCount:s,terminate:n}=e;return this.createTickData(2,t,i,n,s)};c.push(e)}if(!a)return c;if(h){const e=e=>{let{index:t,tickData:i,labelOverlap:s,terminate:n}=e;return{index:t,tickData:i,autoRotation:this.getAutoRotation(s),terminate:n}};c.push(e)}return c}createTickData(e,t,i,s,n){const{scale:r}=this,{step:o,values:a,minSpacing:l,maxSpacing:h}=this.interval,{maxTickCount:c,minTickCount:d,defaultTickCount:u}=this.estimateTickCount({minSpacing:l,maxSpacing:h}),p=sf.is(r)||ry.is(r),g=!p||isNaN(c)?10:c;let m=p?Math.max(u-t,d):c;const f=void 0===o&&void 0===a&&m>d&&(p||2===e);let v=!0;for(;v&&t<=g;){const s=i.rawTicks;m=p?Math.max(u-t,d):c;const{rawTicks:r,fractionDigits:o,ticks:a,labelCount:l}=this.getTicks({tickGenerationType:e,previousTicks:s,tickCount:m,minTickCount:d,maxTickCount:c,primaryTickCount:n});i.rawTicks=r,i.fractionDigits=o,i.ticks=a,i.labelCount=l,v=!!f&&mC(r,s),t++}return s||(s=void 0!==o||void 0!==a),{tickData:i,index:t,autoRotation:0,terminate:s}}createLabelData(e,t,i,s){const n=[];for(const{tickLabel:r,translationY:o}of e){if(!r)continue;const{width:e,height:a}=s.measureLines(r),l=iS(r,new Vg(t,o,e,a),i);n.push(l)}return n}getAutoRotation(e){return e?Ly(Oy(this.label.autoRotateAngle??0)):0}getTicks(e){let{tickGenerationType:t,previousTicks:i,tickCount:s,minTickCount:n,maxTickCount:r,primaryTickCount:o}=e;const{range:a,scale:l,visibleRange:h}=this;let c;switch(t){case 3:if(c=this.interval.values,sf.is(l)){const[e,t]=Eg(l.getDomain().map(Number));c=c.filter((i=>i>=e&&i<=t)).sort(((e,t)=>e-t))}break;case 1:c=sf.is(l)?this.updateSecondaryAxisTicks(o):this.createTicks(s,n,r);break;case 2:c=this.filterTicks(i,s);break;default:c=this.createTicks(s,n,r)}const d=c.reduce(((e,t)=>Math.max(e,"number"===typeof t?Ng(t):0)),0),u=(l.bandwidth??0)/2,p=[];let g=0;const m=new Map,f=Math.max(0,Math.floor(h[0]*c.length)),v=Math.min(c.length,Math.ceil(h[1]*c.length)),y=c.slice(f,v);this.onFormatChange(y,d,c,this.label.format);for(let C=0;C<y.length;C++){const e=y[C],t=l.convert(e)+u;if(a.length>0&&!this.inRange(t,.001))continue;const i=this.formatTick(e,d,f+C);let s=i;if(m.has(s)){const e=m.get(s);m.set(s,e+1),s=`${s}_${e}`}else m.set(s,1);p.push({tick:e,tickId:s,tickLabel:i,translationY:Math.floor(t)}),""!==i&&null!=i&&g++}return{rawTicks:c,fractionDigits:d,ticks:p,labelCount:g}}filterTicks(e,t){const{minSpacing:i,maxSpacing:s}
2=this.interval,n=!isNaN(i)||!isNaN(s)?Math.ceil(e.length/t):2;return e.filter(((e,t)=>t%n===0))}createTicks(e,t,i){const{scale:s}=this;return e&&(sf.is(s)||ry.is(s))&&(s.tickCount=e,s.minTickCount=t??0,s.maxTickCount=i??1/0),s.ticks?.()??[]}estimateTickCount(e){let{minSpacing:t,maxSpacing:i}=e;if(!this.label.avoidCollisions)return{minTickCount:sf.defaultMaxTickCount,maxTickCount:sf.defaultMaxTickCount,defaultTickCount:sf.defaultMaxTickCount};const s=this.calculateRangeWithBleed(),n=Math.max(this.defaultTickMinSpacing,s/sf.defaultMaxTickCount);let r=!isNaN(i);isNaN(t)&&(t=n),isNaN(i)&&(i=s),t>i&&(t===n?t=i:i=t);r&&(r=2<n);const o=Ig(1,Math.floor(s/t),r?Math.min(Math.floor(s/2),100):100),a=Math.min(o,Math.ceil(s/i));return{minTickCount:a,maxTickCount:o,defaultTickCount:Ig(a,sf.defaultTickCount,o)}}updateVisibility(){this.moduleCtx.animationManager.isSkipped()&&this.resetSelectionNodes(),this.tickLineGroup.visible=this.tick.enabled,this.gridLineGroup.visible=this.gridLine.enabled,this.tickLabelGroup.visible=this.label.enabled}updateCrossLines(e){let{rotation:t,parallelFlipRotation:i,regularFlipRotation:s}=e;const n=this.label.getSideFlag(),r=this.isAnySeriesActive();this.crossLines.forEach((e=>{var o;e.sideFlag=-n,e.direction=t===-Math.PI/2?"x":"y",e instanceof RS&&((o=e.label).parallel??(o.parallel=this.label.parallel)),e.parallelFlipRotation=i,e.regularFlipRotation=s,e.update(r)}))}updateTickLines(){const{tick:e,label:t}=this,i=t.getSideFlag();this.tickLineGroupSelection.each((t=>{t.strokeWidth=e.width,t.stroke=e.stroke,t.x1=i*this.getTickSize(),t.x2=0}))}calculateAvailableRange(){return Ag(this.range)}calculateRangeWithBleed(){const e=1/Ag(this.visibleRange);return Lg(this.calculateAvailableRange()*e,2)}calculateDomain(){const e=this.boundSeries.filter((e=>this.includeInvisibleDomains||e.isEnabled())).flatMap((e=>e.getDomain(this.direction)));this.setDomain(e)}getAxisTransform(){return{rotation:Oy(this.rotation),translationX:Math.floor(this.translation.x),translationY:Math.floor(this.translation.y)}}updatePosition(){const{crossLineGroup:e,axisGroup:t,gridGroup:i,translation:s}=this,{rotation:n}=this.calculateRotations(),r=Math.floor(s.x),o=Math.floor(s.y);e.setProperties({rotation:n,translationX:r,translationY:o}),i.setProperties({rotation:n,translationX:r,translationY:o}),t.datum=this.getAxisTransform()}updateSecondaryAxisTicks(e){throw new Error("AG Charts - unexpected call to updateSecondaryAxisTicks() - check axes configuration.")}updateSelections(e,t,i){const s=e=>e.tickId,n=t.map((e=>this.getTickLabelProps(e,i)));this.lineNode.datum=e,this.gridLineGroupSelection.update(this.gridLength?t:[],void 0,s),this.tickLineGroupSelection.update(t,void 0,s),this.tickLabelGroupSelection.update(n,void 0,s)}updateAxisLine(){const{enabled:e,stroke:t,width:i}=this.line;this.lineNode.setProperties({stroke:t,strokeWidth:e?i:0})}updateGridLines(e){const{gridLine:{style:t,width:i},gridPadding:s,gridLength:n}=this;0!==n&&0!==t.length&&this.gridLineGroupSelection.each(((r,o,a)=>{const{stroke:l,lineDash:h}=t[a%t.length];r.setProperties({x1:s,x2:-e*n+s,stroke:l,strokeWidth:i,lineDash:h})}))}updateLabels(){this.label.enabled&&this.tickLabelGroupSelection.each(((e,t)=>{e.setProperties(t,["fill","fontFamily","fontSize","fontStyle","fontWeight","text","textAlign","textBaseline"])}))}updateTitle(e){const{title:t,lineNode:i,tickLineGroup:s,tickLabelGroup:n}=this;let r=0;
2if(t.enabled&&e.anyTickVisible){r+=xy.computeChildrenBBox([s,n,i]).width+(this.tickLabelGroup.visible?0:this.seriesAreaPadding)}this.setTitleProps(t.caption,{spacing:r})}formatTick(e,t,i){return String(this.getFormatter(i,!0)(e,t))}formatDatum(e){return String(this.getFormatter()(e))}getFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;const{label:i,labelFormatter:s,datumFormatter:n,moduleCtx:{callbackCache:r}}=this;return i.formatter?(t,s)=>r.call(i.formatter,{value:t,index:e,fractionDigits:s})??t:!t&&n?e=>r.call(n,e)??String(e):s?e=>r.call(s,e)??String(e):e=>String(e)}getBBox(){return this.axisGroup.getBBox()}getRegionNode(){}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some((e=>this.includeInvisibleDomains||e.isEnabled()))}clipTickLines(e,t,i,s){this.tickLineGroup.setClipRect(new Vg(e,t,i,s))}clipGrid(e,t,i,s){this.gridGroup.setClipRect(new Vg(e,t,i,s))}getTitleFormatterParams(){const{direction:e}=this,t=[];for(const i of this.boundSeries){const s=i.getKeys(e),n=i.getNames(e);for(let e=0;e<s.length;e++)t.push({key:s[e],name:n[e]})}return{direction:e,boundSeries:t,defaultValue:this.title?.text}}normaliseDataDomain(e){return{domain:[...e],clipped:!1}}getLayoutState(){return{id:this.id,rect:this.getBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize(),direction:this.direction,domain:this.dataDomain.domain,scale:this.scale,...this.layout}}getModuleMap(){return this.moduleMap}createModuleContext(){return this.axisContext??(this.axisContext=this.createAxisContext()),{...this.moduleCtx,parent:this.axisContext}}createAxisContext(){const{scale:e}=this;return{axisId:this.id,scale:this.scale,direction:this.direction,continuous:sf.is(e)||ry.is(e),keys:()=>this.boundSeries.flatMap((e=>e.getKeys(this.direction))),seriesKeyProperties:()=>this.boundSeries.reduce(((e,t)=>(t.getKeyProperties(this.direction).forEach((t=>{e.indexOf(t)<0&&e.push(t)})),e)),[]),scaleValueFormatter:e=>this.getScaleValueFormatter(e),scaleBandwidth:()=>e.bandwidth??0,scaleDomain:()=>e.getDomain?.(),scaleConvert:t=>e.convert(t),scaleInvert:ry.is(e)?t=>e.invertNearest?.(t):t=>e.invert?.(t),scaleInvertNearest:t=>e.invertNearest?.(t),scaleStep:()=>e.step??0,attachLabel:e=>this.attachLabel(e),inRange:(e,t)=>
2this.inRange(e,t)}}getScaleValueFormatter(e){const{scale:t}=this;if(e&&t&&t.tickFormat)try{return t.tickFormat({specifier:e})}catch(i){fp.warnOnce(`the format string ${e} is invalid, ignoring.`)}return this.getFormatter()}animateReadyUpdate(e){const{animationManager:t}=this.moduleCtx,i=HS(BS(this));Qm(this.id,"axis-group",t,[this.axisGroup],i.group),Qm(this.id,"line",t,[this.lineNode],i.line),Qm(this.id,"line-paths",t,[this.gridLineGroupSelection,this.tickLineGroupSelection],i.tick,((e,t)=>t.tickId),e),Qm(this.id,"tick-labels",t,[this.tickLabelGroupSelection],i.label,((e,t)=>t.tickId),e)}resetSelectionNodes(){const{gridLineGroupSelection:e,tickLineGroupSelection:t,tickLabelGroupSelection:i,lineNode:s}=this,n=BS(this);Tv([this.axisGroup],((e,t)=>({rotation:t.rotation,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,translationX:t.translationX,translationY:t.translationY}))),Tv([e,t],jS(n)),Tv([i],((e,t)=>({x:t.x,y:t.y,translationY:t.translationY,rotation:t.rotation,rotationCenterX:t.rotationCenterX}))),Tv([s],((e,t)=>({...t})))}calculateUpdateDiff(e,t){const i=new Set,s=new Set,n={},r=Math.max(e.length,t.ticks.length);for(let o=0;o<r;
2o++){const r=t.ticks[o],a=e[o],l=r?.tickId;n[l??a]=r,a!==l&&(s.has(l)?s.delete(l):l&&i.add(l),i.has(a)?i.delete(a):a&&s.add(a))}return{changed:i.size>0||s.size>0,added:i,removed:s}}isReversed(){return this.reverse}};$S.defaultTickMinSpacing=50,$S.CrossLineConstructor=RS,op([Ef(kf)],$S.prototype,"nice",2),op([Ef(kf)],$S.prototype,"reverse",2),op([Ef(iv)],$S.prototype,"keys",2),op([Ef(Lf)],$S.prototype,"interval",2),op([Ef(Lf)],$S.prototype,"title",2),op([EC(((e,t,i)=>e.onGridLengthChange(t,i)))],$S.prototype,"gridLength",2);var YS=$S,ZS=class extends kS{constructor(){super(...arguments),this.autoRotateAngle=335}};op([Ef(kf,{optional:!0})],ZS.prototype,"autoRotate",2),op([Ef(Wf)],ZS.prototype,"autoRotateAngle",2);var qS=class e extends YS{constructor(){super(...arguments),this.thickness=0}static is(t){return t instanceof e}get direction(){return"top"===this.position||"bottom"===this.position?"x":"y"}updateDirection(){switch(this.position){case"top":this.rotation=-90,this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.rotation=0,this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.rotation=-90,this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.rotation=0,this.label.mirrored=!1,this.label.parallel=!1}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}update(e){return this.updateDirection(),super.update(e)}calculateLayout(e,t){return this.updateDirection(),super.calculateLayout(e,t)}createAxisContext(){return{...super.createAxisContext(),position:this.position}}createLabel(){return new ZS}getRegionNode(){return this.axisGroup}};op([Ef(zf)],qS.prototype,"thickness",2),op([Ef(hv)],qS.prototype,"position",2);var QS=qS,XS=class e extends QS{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Mf),this.groupPaddingInner=.1,this.includeInvisibleDomains=!0}static is(t){return t instanceof e}normaliseDataDomain(e){const t=[],i=new Set;for(const s of e){const e=s instanceof Date?s.getTime():s;i.has(e)||(i.add(e),t.push(s))}return{domain:t,clipped:!1}}updateScale(e){let{paddingInner:t,paddingOuter:i}=this;if(!ym(t)||!ym(i)){const e=this.reduceBandScalePadding();t??(t=e.inner),i??(i=e.outer)}this.scale.paddingInner=t??0,this.scale.paddingOuter=i??0,super.updateScale(e)}reduceBandScalePadding(){return this.boundSeries.reduce(((e,t)=>{const i=t.getBandScalePadding?.();return i&&(e.inner>i.inner&&(e.inner=i.inner),e.outer<i.outer&&(e.outer=i.outer)),e}),{inner:1/0,outer:-1/0})}};XS.className="CategoryAxis",XS.type="category",op([Ef(Hf)],XS.prototype,"groupPaddingInner",2),op([Ef(Hf,{optional:!0})],XS.prototype,"paddingInner",2),op([Ef(Hf,{optional:!0})],XS.prototype,"paddingOuter",2);var JS=XS,ew=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.x=0,this.y=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.screenX=0,this.screenY=0,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.label=e,this.parent=t,this.depth=t?t.depth+1:0,this.number=i}getLeftSibling(){return this.number>0&&this.parent?this.parent.children[this.number-1]:void 0}getLeftmostSibling(){return this.number>0&&this.parent?this.parent.children[0]:void 0}nextLeft(){return this.children?this.children[0]:this.thread}nextRight(){return this.children?this.children[this.children.length-1]:this.thread}getSiblings(){return this.parent?this.parent.children.filter(((e,t)=>t!==this.number)):[]}};function tw(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=new ew;let s=0;return t&&e.forEach((e=>s=Math.max(s,e.labels.length))),e.forEach((e=>{if(t)for(;e.labels.length<s;)e.labels.unshift("");!function(e,t){const i=t.labels.slice().reverse(),s=i.length-1;i.forEach(((t,i)=>{const n=e.children,r=n.find((e=>e.label===t)),o=i!==s;if(r&&o)e=r;else{const i=new ew(t,e);i.number=n.length,n.push(i),o&&(e=i)}}))}(i,e)})),i}function iw(e,t,i){const s=i/(t.number-e.number);t.change-=s,t.shift+=i,e.change+=s,t.prelim+=i,t.mod+=i}function sw(e,t,i){return t.getSiblings().indexOf(e.ancestor)>=0?e.ancestor:i}function nw(e,t){const i=e.children;if(i.length){let s=i[0];
2i.forEach((e=>{nw(e,t),s=function(e,t,i){const s=e.getLeftSibling();if(s){let n=e,r=e,o=s,a=r.getLeftmostSibling(),l=r.mod,h=n.mod,c=o.mod,d=a.mod;for(;o.nextRight()&&r.nextLeft();){o=o.nextRight(),r=r.nextLeft(),a=a.nextLeft(),n=n.nextRight(),n.ancestor=e;const s=o.prelim+c-(r.prelim+l)+i;s>0&&(iw(sw(o,e,t),e,s),l+=s,h+=s),c+=o.mod,l+=r.mod,d+=a.mod,h+=n.mod}o.nextRight()&&!n.nextRight()?(n.thread=o.nextRight(),n.mod+=c-h):(r.nextLeft()&&!a.nextLeft()&&(a.thread=r.nextLeft(),a.mod+=l-d),t=e)}return t}(e,s,t)})),function(e){const t=e.children;if(t){let e=0,i=0;for(let s=t.length-1;s>=0;s--){const n=t[s];n.prelim+=e,n.mod+=e,i+=n.change,e+=n.shift+i}}}(e);const n=(i[0].prelim+i.at(-1).prelim)/2,r=e.getLeftSibling();r?(e.prelim=r.prelim+t,e.mod=e.prelim-n):e.prelim=n}else{const i=e.getLeftSibling();e.prelim=i?i.prelim+t:0}}var rw=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(e,t){const{x:i,y:s}=t(e);i>this.right&&(this.right=i),i<this.left&&(this.left=i),s>this.bottom&&(this.bottom=s),s<this.top&&(this.top=s)}};function ow(e,t,i){e.x=e.prelim+t,e.y=e.depth,i.update(e),e.children.forEach((s=>ow(s,t+e.mod,i)))}function aw(e){const t=e.children;let i=0;t.forEach((e=>{aw(e),e.children.length?i+=e.leafCount:i++})),e.leafCount=i,t.length?(e.subtreeLeft=t[0].subtreeLeft,e.subtreeRight=t[e.children.length-1].subtreeRight,e.x=(e.subtreeLeft+e.subtreeRight)/2):(e.subtreeLeft=e.x,e.subtreeRight=e.x)}function lw(e){const t=new hw;return nw(e,1),ow(e,-e.prelim,t),aw(e),t}var hw=class{constructor(){this.dimensions=new rw,this.leafCount=0,this.nodes=[],this.leafNodes=[],this.nonLeafNodes=[],this.depth=0}update(e){this.dimensions.update(e,(e=>({x:e.x,y:e.y}))),e.children.length?this.nonLeafNodes.push(e):(this.leafCount++,this.leafNodes.push(e)),e.depth>this.depth&&(this.depth=e.depth),this.nodes.push(e)}resize(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const r=this.leafCount-1,o=this.depth,a=this.dimensions;let l=1,h=1;if(e>0&&r){const t=(a.right-a.left)/r;l=e/r/t,n&&(l=-l)}if(t>0&&o){const e=(a.bottom-a.top)/o;h=t/o/e}const c=new rw;this.nodes.forEach((e=>{e.screenX=e.x*l,e.screenY=e.y*h,c.update(e,(e=>({x:e.screenX,y:e.screenY})))}));const d=-c.left,u=-c.top;this.nodes.forEach((e=>{e.screenX+=d+i,e.screenY+=u+s}))}},cw=class extends kS{constructor(){super(...arguments),this.grid=!1}};op([Ef(kf)],cw.prototype,"grid",2);var dw=class extends QS{constructor(e){const t=new Mf;t.paddingOuter=.1,t.paddingInner=2*t.paddingOuter,super(e,t),this.tickScale=new Mf,this.line=new NS,this.label=new cw,this.labelColor="rgba(87, 87, 87, 1)",this.includeInvisibleDomains=!0;const{tickLineGroup:i,tickLabelGroup:s,gridLineGroup:n,tickScale:r}=this;r.paddingInner=1,r.paddingOuter=0,this.gridLineSelection=Ty.select(n,tC),this.axisLineSelection=Ty.select(i,tC),this.separatorSelection=Ty.select(i,tC),this.labelSelection=Ty.select(s,cC),this.lineNode.visible=!1}updateRange(){const{range:e,visibleRange:t,scale:i}=this,s=(e[1]-e[0])/(t[1]-t[0]),n=s*t[0],r=e[0]-n;this.tickScale.range=i.range=[r,r+s],this.resizeTickTree()}resizeTickTree(){const e=this.scale,t=e.domain.length?[e.convert(e.domain[0]),e.convert(e.domain[e.domain.length-1])]:e.range,i=this.tickTreeLayout,s=this.lineHeight;i&&i.resize(Math.abs(t[1]-t[0]),i.depth*s,(Math.min(t[0],t[1])||0)+(e.bandwidth??0)/2,-i.depth*s,t[1]-t[0]<0)}get lineHeight(){return 1.5*this.label.fontSize}onGridVisibilityChange(){this.gridLineSelection.clear(),this.labelSelection.clear()}calculateDomain(){const{direction:e}=this;let t=null;const i=this.boundSeries.filter((e=>e.visible)).flatMap((i=>{if("y"===e||t)return i.getDomain(e);if(null===t){const s=i.getDomain(e);return t=vm(s[0]),s}return[]}));this.setDomain(nf(i)??lf(i));const{domain:s}=this.dataDomain;this.tickTreeLayout=lw(tw(s)),this.tickScale.domain=s.concat(""),this.resizeTickTree()}update(){this.computedLayout&&(this.updatePosition(),this.updateTitleCaption(),this.updateCategoryLabels(),this.updateSeparators(),this.updateAxisLines(),this.updateCategoryGridLines(),this.resetSelectionNodes())}updateTitleCaption(){this.title.caption.node.visible=!1}updateCategoryLabels(){if(!this.computedLayout)return;const{tickLabelLayout:e}=this.computedLayout;this.labelSelection.update(e).each(((e,t)=>{e.setProperties(t)}))}updateSeparators(){if(!this.computedLayout)return;const{separatorLayout:e}=this.computedLayout,{range:t}=this;this.separatorSelection.update(e).each(((e,i)=>{e.x1=i.x1,e.x2=i.x2,e.y1=i.y,e.y2=i.y,e.visible=this.tick.enabled&&i.y>=t[0]-1e-7&&i.y<=t[1]+1e-7,e.stroke=this.tick.stroke,e.strokeWidth=1}))}
2updateAxisLines(){if(!this.computedLayout)return;const{axisLineLayout:e}=this.computedLayout;this.axisLineSelection.update(e).each(((e,t)=>{e.setProperties(t),e.stroke=this.line.stroke,e.strokeWidth=this.line.width}))}updateCategoryGridLines(){const{gridLength:e,gridLine:t,label:i,range:s,tickScale:n}=this,r=n.ticks(),o=i.getSideFlag(),a=this.gridLineSelection.update(e?r:[]);if(e){const{width:i,style:r}=t,l=r.length;a.each(((a,h,c)=>{const d=Math.round(n.convert(h)),{stroke:u,lineDash:p}=r[c%l];a.visible=t.enabled&&d>=s[0]&&d<=s[1],a.x1=0,a.x2=-o*e,a.y1=d,a.y2=d,a.stroke=u,a.strokeWidth=i,a.lineDash=p}))}}computeLayout(){this.updateDirection(),this.calculateDomain(),this.updateRange();const{scale:e,label:t,label:{parallel:i},moduleCtx:{callbackCache:s},range:n,title:r,title:{formatter:o=e=>e.defaultValue}={}}=this,a=e.range[0],l=e.range[1],h=Math.abs(l-a)/e.domain.length||0,c=Math.ceil(t.fontSize/h),d=Oy(this.rotation),u=Math.abs(Math.cos(d))<1e-8,p=t.getSideFlag(),g=this.lineHeight,m=this.tickTreeLayout,f=e.ticks(),v=m?m.nodes:[],y=!!m&&m.depth>1,C=r?.enabled&&f.length>0,{defaultRotation:S,configuredRotation:w,parallelFlipFlag:b}=JC({rotation:t.rotation,parallel:i,regularFlipRotation:Ly(d-Math.PI/2),parallelFlipRotation:Ly(d)}),x=[],M=new Map;let D=0;const I=new cC,R=(e,i)=>{if(0===i){if(C){const t=s.call(o,this.getTitleFormatterParams());return I.setProperties({text:t,fill:r.color,fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,fontWeight:r.fontWeight,textAlign:"center",textBaseline:"hanging",translationX:e.screenY-.25*r.fontSize,translationY:e.screenX}),!0}return!1}return I.setProperties({fill:t.color,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,textAlign:"center",textBaseline:-1===b?"bottom":"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX}),i%c===0&&(!(e.screenX<n[0]||e.screenX>n[1])&&(t.formatter?I.text=s.call(t.formatter,{value:String(e.label),index:i})??String(e.label):I.text=String(e.label),!0))};v.forEach(((e,t)=>{if(!R(e,t))return;const i=I.getBBox();if(!i)return;M.set(t,i);!e.children.length&&i.width>D&&(D=i.width)}));const E=p*t.padding,A=this.label.grid,T=[];v.forEach(((e,t)=>{const i=!e.children.length;let s,n=R(e,t);if(I.x=E,I.y=0===t&&C?r.spacing??0:0,I.rotationCenterX=E,i)I.rotation=w,I.textAlign="end",I.textBaseline="middle";else{const i=e.leafCount*h,s=M.get(t);I.translationX-=D-g+this.label.padding,s&&s.width>i?(n=!1,M.delete(t)):I.rotation=u?S:-Math.PI/2}if(e.parent&&y){const t=i?e.screenX-h/2:e.screenX-e.leafCount*h/2;if(i)(e.number!==e.children.length-1||A)&&T.push({y:t,x1:0,x2:-D-2*this.label.padding});else{const i=-D-2*this.label.padding+e.screenY;T.push({y:t,x1:i+g,x2:i})}}if(n){const e=wy.toCanvas(I);e&&M.set(t,e),s={...(o=I,{fill:o.fill,fontFamily:o.fontFamily,fontSize:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight,rotation:o.rotation,rotationCenterX:o.rotationCenterX,rotationCenterY:o.rotationCenterY,text:o.text,textAlign:o.textAlign,textBaseline:o.textBaseline,translationX:o.translationX,translationY:o.translationY,visible:o.visible,x:o.x,y:o.y}),visible:n}}else M.delete(t),s={visible:n};var o;x.push(s)}));let P=0;T.forEach((e=>P=Math.min(P,e.x2))),T.push({y:Math.max(a,l),x1:0,x2:P});const L=[],F=[];T.forEach((e=>{if(e.y>=n[0]-1e-7&&e.y<=n[1]+1e-7){const{x1:t,x2:i,y:s}=e,n=new Vg(Math.min(t,i),s,Math.abs(t-i),0);F.push(n),L.push({x1:t,x2:i,y:s})}}));const k=[],N=[],O=m?m.depth+1:1;for(let B=0;B<O;B++){const e=f.length>0&&(0===B||A&&y),t=B>0?-D-2*this.label.padding-(B-1)*g:0,i=new Vg(t,Math.min(...n),0,Math.abs(n[1]-n[0]));N.push(i),k.push({x:t,y1:n[0],y2:n[1],visible:e})}const G=Vg.merge(lg(M.values(),F,N));return{bbox:this.getTransformBox(G),tickLabelLayout:x,separatorLayout:L,axisLineLayout:k}}calculateLayout(){const{axisLineLayout:e,separatorLayout:t,tickLabelLayout:i,bbox:s}=this.computeLayout();return this.computedLayout={axisLineLayout:e,separatorLayout:t,tickLabelLayout:i},{bbox:s,primaryTickCount:void 0}}};dw.className="GroupedCategoryAxis",dw.type="grouped-category",op([Ef(Xf,{optional:!0})],dw.prototype,"labelColor",2);var uw=class{constructor(){this.destroyFns=[]}destroy(){for(const e of this.destroyFns)e()}},pw=class{constructor(){this.modules=[],this.dependencies=new Map,this.dependents=new Map}register(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(const s of t){this.registerDependencies(s);const e=this.modules.find((e=>s.type===e.type&&s.optionsKey===e.optionsKey&&s.identifier===e.identifier));if(e){if("enterprise"===s.packageType&&"community"===e.packageType){const t=this.modules.indexOf(e);this.modules.splice(t,1,s)}}else this.modules.push(s)}}hasEnterpriseModules(){return this.modules.some((e=>"enterprise"===e.packageType))}*byType(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const{dependents:s}=this,n=new Set;let r=0;const o=this.modules.filter((e=>t.includes(e.type)));do{for(const e of o)if(!n.has(e.optionsKey)&&!s.has(e.optionsKey)){yield e,n.add(e.optionsKey);for(const[t,i]of s.entries())i.delete(e.optionsKey),0===i.size&&s.delete(t)}r++}while(n.size<o.length&&r<3);if(s.size>0)throw new Error(`Could not resolve module dependencies: [${[...s.keys()]}]`)}registerDependencies(e){if(null!=e.dependencies&&0!==e.dependencies.length){for(const t of e.dependencies){const i=this.dependencies.get(t)??new Set;i.add(e.optionsKey),this.dependencies.set(t,i)}
2this.dependents.set(e.optionsKey,new Set(e.dependencies))}}},gw=new pw;function mw(e){return new Promise((t=>{setTimeout((()=>t(void 0)),e)}))}var fw=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(e){return new Promise((t=>{this.acquireQueue.push([e,t]),this.available&&this.dispatchNext().catch((e=>fp.errorOnce(e)))}))}async acquireImmediately(e){return!!this.available&&(await this.acquire(e),!0)}async waitForClearAcquireQueue(){return this.acquire((async()=>{}))}async dispatchNext(){this.available=!1;let[e,t]=this.acquireQueue.shift()??[];for(;e;){try{await e(),t?.()}catch(i){fp.error("mutex callback error",i),t?.()}[e,t]=this.acquireQueue.shift()??[]}this.available=!0}},vw=class{constructor(){this.eventListeners=new Map}addEventListener(e,t){if("function"!==typeof t)throw new Error("AG Charts - listener must be a Function");const i=this.eventListeners.get(e);i?i.add(t):this.eventListeners.set(e,new Set([t]))}removeEventListener(e,t){this.eventListeners.get(e)?.delete(t),0===this.eventListeners.size&&this.eventListeners.delete(e)}hasEventListener(e){return this.eventListeners.has(e)}clearEventListeners(){this.eventListeners.clear()}fireEvent(e){this.eventListeners.get(e.type)?.forEach((t=>t(e)))}},yw=class extends Df{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t;super(),this.top=e,this.right=t,this.bottom=i,this.left=s}};function Cw(e,t){let i,s,n=0,r=!1;const o=()=>r,a=()=>{r=!1,s?.(),s=void 0,i=void 0,n>0&&e(l)},l=()=>{const e=n;n=0,r=!0;const i=t({count:e});i?i.then(a,a):a()};return{schedule(t){0!==n||o()||e(l,t),n++},async await(){if(o())for(null==i&&(i=new Promise((e=>{s=e})));o();)await i}}}op([Ef(zf)],yw.prototype,"top",2),op([Ef(zf)],yw.prototype,"right",2),op([Ef(zf)],yw.prototype,"bottom",2),op([Ef(zf)],yw.prototype,"left",2);var Sw=class{constructor(){this.events=new Map}on(e,t){return this.events.has(e)||this.events.set(e,new Set),this.events.get(e)?.add(t),()=>this.off(e,t)}off(e,t){const i=this.events.get(e);i&&(i.delete(t),0===i.size&&this.events.delete(e))}emit(e,t){this.events.get(e)?.forEach((e=>e(t)))}clear(e){e?this.events.delete(e):this.events.clear()}},ww=(e=>(e[e.Caption=0]="Caption",e[e.Legend=1]="Legend",e[e.Toolbar=2]="Toolbar",e[e.Navigator=3]="Navigator",e[e.Overlay=4]="Overlay",e))(ww||{}),bw=class{constructor(){this.events=new Sw,this.elements=new Map}addListener(e,t){return this.events.on(e,t)}registerElement(e,t){return this.elements.has(e)?this.elements.get(e).add(t):this.elements.set(e,new Set([t])),()=>this.elements.get(e)?.delete(t)}createContext(e,t){const i=new xw(e,t);for(const s of Object.values(ww))"number"===typeof s&&this.elements.get(s)?.forEach((e=>e(i)));return i}emitLayoutComplete(e,t){const i="layout:complete",{width:s,height:n}=e;this.events.emit(i,{type:i,axes:t.axes??[],chart:{width:s,height:n},clipSeries:t.clipSeries??!1,series:t.series})}},xw=class{constructor(e,t){this.width=e,this.height=t,this.layoutBox=new Vg(0,0,e,t)}},Mw=class{constructor(){this.title=new $C,this.subtitle=new $C,this.footnote=new $C}positionCaptions(e){const{title:t,subtitle:i,footnote:s}=this,n=e.layoutBox.height/10;if(t.enabled){const{spacing:s=(i.enabled?$C.SMALL_PADDING:$C.LARGE_PADDING)}=t;this.positionCaption("top",t,e.layoutBox,n),this.shrinkLayoutByCaption("top",t,e.layoutBox,s)}i.enabled&&(this.positionCaption("top",i,e.layoutBox,n),this.shrinkLayoutByCaption("top",i,e.layoutBox,i.spacing)),s.enabled&&(this.positionCaption("bottom",s,e.layoutBox,n),this.shrinkLayoutByCaption("bottom",s,e.layoutBox,s.spacing))}positionAbsoluteCaptions(e){const{title:t,subtitle:i,footnote:s}=this,{rect:n}=e.series;for(const r of[t,i,s])if("overlay"===r.layoutStyle)if("left"===r.textAlign)r.node.x=n.x+r.padding;else if("right"===r.textAlign){const e=r.node.getBBox();r.node.x=n.x+n.width-e.width-r.padding}}computeX(e,t){return"left"===e?t.x:"right"===e?t.x+t.width:t.x+t.width/2}positionCaption(e,t,i,s){const n=Math.max(rC.getLineHeight(t.fontSize),s);t.node.x=this.computeX(t.textAlign,i)+t.padding,t.node.y=i.y+("top"===e?0:i.height)+t.padding,t.node.textBaseline=e,t.computeTextWrap(i.width,n)}shrinkLayoutByCaption(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
2if("block"===t.layoutStyle){const n=t.node.getBBox();i.shrink("top"===e?Math.ceil(n.y-i.y+n.height+s):Math.ceil(i.y+i.height-n.y+s),e)}}};op([Ef(Lf)],Mw.prototype,"title",2),op([Ef(Lf)],Mw.prototype,"subtitle",2),op([Ef(Lf)],Mw.prototype,"footnote",2);var Dw=class{constructor(){this.registeredListeners=new Map}addListener(e,t){const i={symbol:Symbol(e),handler:t};return this.registeredListeners.has(e)?this.registeredListeners.get(e).push(i):this.registeredListeners.set(e,[i]),()=>this.removeListener(i.symbol)}removeListener(e){for(const[t,i]of this.registeredListeners.entries()){const s=i.findIndex((t=>t.symbol===e));if(s>=0){i.splice(s,1),0===i.length&&this.registeredListeners.delete(t);break}}}dispatch(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];for(const r of this.getListenersByType(e))try{r.handler(...i)}catch(n){fp.errorOnce(n)}}dispatchWrapHandlers(e,t){for(var i=arguments.length,s=new Array(i>2?i-2:0),n=2;n<i;n++)s[n-2]=arguments[n];for(const o of this.getListenersByType(e))try{t(o.handler,...s)}catch(r){fp.errorOnce(r)}}getListenersByType(e){return this.registeredListeners.get(e)??[]}destroy(){this.registeredListeners.clear()}},Iw=class{constructor(){this.listeners=new Dw,this.destroyFns=[]}addListener(e,t){return this.listeners.addListener(e,t)}destroy(){this.listeners.destroy(),this.destroyFns.forEach((e=>e()))}},Rw=(e=>(e[e.Default=32]="Default",e[e.ZoomDrag=16]="ZoomDrag",e[e.Annotations=8]="Annotations",e[e.ContextMenu=4]="ContextMenu",e[e.Animation=2]="Animation",e[e.AnnotationsSelected=1]="AnnotationsSelected",e[e.All=63]="All",e))(Rw||{}),Ew=class extends Iw{addListener(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:32;return super.addListener(e,(e=>{this.getState()&i&&t(e)}))}},Aw=class{constructor(){this.destroyFns=[]}destroy(){this.destroyFns.forEach((e=>e())),this.destroyFns.length=0}setFns(e){this.destroy(),this.destroyFns=e}},Tw="10.3.3",Pw=Symbol("previous-memento-not-found"),Lw=class{constructor(e){this.history=[],this.historyIndex=-1,this.originators=new Map,this.clearState=new Map,this.maxHistoryLength=100,this.debug=Ay.create(!0,"history"),this.destroyFns=new Aw,this.destroyFns.setFns([e.addListener("undo",this.undo.bind(this),63),e.addListener("redo",this.redo.bind(this),63)])}destroy(){this.destroyFns.destroy()}addMementoOriginator(e){this.originators.set(e.mementoOriginatorKey,e),this.clearState.set(e.mementoOriginatorKey,e.createMemento()),this.debugEvent("History add originator:",e.mementoOriginatorKey)}clear(){this.debug("History clear:",Object.keys(this.originators)),this.history=[],this.historyIndex=-1;for(const[e,t]of this.originators.entries())this.clearState.set(e,t.createMemento())}record(e){this.historyIndex<this.history.length-1&&(this.history=this.history.slice(0,this.historyIndex+1)),this.history.length>this.maxHistoryLength&&(this.history=this.history.slice(-this.maxHistoryLength));const t=new Map;for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];for(const r of s){if(!this.originators.has(r.mementoOriginatorKey))throw new Error(`Originator [${r.mementoOriginatorKey}] has not been added to the HistoryManager.`);t.set(r.mementoOriginatorKey,r.createMemento())}this.history.push({label:e,mementos:t}),this.historyIndex=this.history.length-1,this.debugEvent(`History record: [${e}]`)}undo(){const e=this.history[this.historyIndex];if(e){for(const t of e.mementos.keys()){const e=this.findPreviousMemento(t);if(e===Pw)throw new Error(`Could not find previous memento for [${t}].`);this.restoreMemento(t,e)}this.historyIndex-=1,this.debugEvent(`History undo: [${e.label}]`)}}redo(){const e=this.history[this.historyIndex+1];if(e){for(const[t,i]of e.mementos.entries())this.restoreMemento(t,i);this.historyIndex+=1,this.debugEvent(`History redo: [${e.label}]`)}}findPreviousMemento(e){for(let t=this.historyIndex-1;t>=0;t--)if(this.history[t].mementos.has(e))return this.history[t].mementos.get(e);return this.clearState.has(e)?this.clearState.get(e):Pw}restoreMemento(e,t){this.originators.get(e)?.restoreMemento(Tw,Tw,t)}debugEvent(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.debug(...t,this.history.map(((e,t)=>t===this.historyIndex?`** ${e.label} **`:e.label)))}},Fw=class{constructor(e){this.version=e.split("-")[0]}
2save(){const e={version:this.version};for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];for(const n of Object.values(i))e[n.mementoOriginatorKey]=this.encode(n,n.createMemento());return e}restore(e){if("object"===typeof e)if(null!=e)if("version"in e&&"string"===typeof e.version){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];for(const t of i){if(!(t.mementoOriginatorKey in e))continue;const i=this.decode(t,e[t.mementoOriginatorKey]);if(!t.guardMemento(i))return void fp.warnOnce(`Could not restore [${t.mementoOriginatorKey}] data, value was invalid, ignoring.`,i);t.restoreMemento(this.version,e.version,i)}}else fp.warnOnce("Could not restore data, missing [version] string in object, ignoring.");else fp.warnOnce("Could not restore data of type [null], expecting an object, ignoring.");else fp.warnOnce(`Could not restore data of type [${typeof e}], expecting an object, ignoring.`)}encode(e,t){try{return JSON.parse(JSON.stringify(t,this.encodeTypes))}catch(i){throw new Error(`Failed to encode [${e.mementoOriginatorKey}] value [${i}].`,{cause:i})}}decode(e,t){try{return JSON.parse(JSON.stringify(t),this.decodeTypes)}catch(i){throw new Error(`Failed to decode [${e.mementoOriginatorKey}] value [${i}].`,{cause:i})}}encodeTypes(e,t){return hm(this[e])?{__type:"date",value:String(this[e])}:t}decodeTypes(e,t){return pm(this[e])&&"__type"in this[e]&&"date"===this[e].__type?new Date(this[e].value):t}},kw=class{constructor(){this.caretaker=new Fw(Tw),this.state=new Map}setState(e,t){null!=vC(this.state.get(e.mementoOriginatorKey),t)&&(this.state.set(e.mementoOriginatorKey,t),this.restoreState(e))}restoreState(e){const{caretaker:t,state:i}=this;if(!i.has(e.mementoOriginatorKey))return;const s=i.get(e.mementoOriginatorKey);t.restore({version:t.version,[e.mementoOriginatorKey]:s},e)}};function Nw(e,t,i,s){t.addEventListener(i,s);const n=()=>t.removeEventListener(i,s);return e.push(n),n}function Ow(e,t,i){Nw(e,t,"keydown",(e=>{"Escape"===e.key&&i(e)}))}function Gw(e,t,i){const s=Nw(e,window,"mousedown",(e=>{[0,2].includes(e.button)&&!function(e,t){if(t.target instanceof Element){const{x:i,y:s,width:n,height:r}=e.getBoundingClientRect(),{clientX:o,clientY:a}=t;return o>=i&&a>=s&&o<=i+n&&a<=s+r}return!1}(t,e)&&(i(),s())}));return s}function Bw(e){return!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)}function Vw(e,t){for(var i=arguments.length,s=new Array(i>2?i-2:0),n=2;n<i;n++)s[n-2]=arguments[n];return Bw(e)&&(e.key===t||s.some((t=>e.key===t)))}function zw(e,t,i,s){i&&Nw(e,t,"keydown",(e=>{Vw(e,s)&&i.focus()}))}function Hw(e,t,i,s,n,r){zw(e,t,n,r),zw(e,t,i,s),Nw(e,t,"keydown",(e=>{Vw(e,s,r)&&e.preventDefault()}))}var Ww={horizontal:{nextKey:"ArrowRight",prevKey:"ArrowLeft"},vertical:{nextKey:"ArrowDown",prevKey:"ArrowUp"}};function jw(e){return e.toolbar.role="toolbar",e.toolbar.ariaOrientation=e.orientation,e.toolbar.ariaHidden=(0===e.buttons.length).toString(),Uw(e)}function Uw(e){const{orientation:t,buttons:i,wrapAround:s=!1,onEscape:n,onFocus:r,onBlur:o}=e,{nextKey:a,prevKey:l}=Ww[t],h=e=>{e.target&&"tabIndex"in e.target&&(i.forEach((e=>e.tabIndex=-1)),e.target.tabIndex=0)},[c,d]=s?[i.length,i.length]:[0,1/0],u=[];for(let p=0;p<i.length;p++){const e=i[(c+p-1)%d],t=i[p],s=i[(c+p+1)%d];Nw(u,t,"focus",h),r&&Nw(u,t,"focus",r),o&&Nw(u,t,"blur",o),n&&Ow(u,t,n),Hw(u,t,e,l,s,a),t.tabIndex=0===p?0:-1}return u}var _w=class{constructor(e,t,i){this.lastFocus=t,this.closeCallback=i,this.destroyFns=[],this.destroyFns.push(Gw(this.destroyFns,e,(()=>this.close())))}close(){this.destroyFns.forEach((e=>e())),this.destroyFns.length=0,this.closeCallback(),this.finishClosing()}finishClosing(){this.destroyFns.forEach((e=>e())),this.destroyFns.length=0,NC(this.lastFocus,"aria-expanded",!1),this.lastFocus?.focus(),this.lastFocus=void 0}};function Kw(e){const{sourceEvent:t,orientation:i,menu:s,buttons:n,closeCallback:r,autoCloseOnBlur:o=!1}=e,{nextKey:a,prevKey:l}=Ww[i],h=Zw(t);NC(h,"aria-expanded",!0);const c=new _w(s,h,r),d=()=>c.close(),{destroyFns:u}=c;if(s.role="menu",s.ariaOrientation=i,u.push(...Uw({orientation:i,buttons:n,onEscape:d,wrapAround:!0})),s.tabIndex=-1,Ow(u,s,d),Nw(u,s,"keydown",(e=>{e.target!==s||e.key!==a&&e.key!==l||(e.preventDefault(),n[0]?.focu
2s())})),o){const e=e=>{!n.includes(e.relatedTarget)&&d()};for(const t of n)Nw(u,t,"blur",e)}return n[0]?.focus(),c}function $w(e,t){return i=>{if("true"===e.ariaDisabled)return i.preventDefault();t(i)}}function Yw(e){return"button"in e?0===e.button:Bw(e)&&("Space"===e.code||"Enter"===e.key)}function Zw(e){if(e?.target instanceof HTMLElement&&"tabindex"in e.target.attributes)return e.target}function qw(e){const t=e=>{if(e.defaultPrevented)return;GC(e.target,"data-preventdefault",!0)&&Vw(e,"ArrowRight","ArrowLeft","ArrowDown","ArrowUp")&&e.preventDefault()};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}var Qw=class{constructor(){this.elements=new Map,this.documentReady=!1,this.queuedObserveRequests=[],this.onLoad=()=>{this.documentReady=!0,this.queuedObserveRequests.forEach((e=>{let[t,i]=e;return this.observe(t,i)})),this.queuedObserveRequests=[]},"undefined"!==typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((e=>{for(const{target:t,contentRect:{width:i,height:s}}of e){const e=this.elements.get(t);this.checkSize(e,t,i,s)}})),this.documentReady="complete"===mg("readyState"),this.documentReady||fg()?.addEventListener("load",this.onLoad))}destroy(){fg()?.removeEventListener("load",this.onLoad),this.resizeObserver?.disconnect(),this.resizeObserver=null}checkSize(e,t,i,s){e&&(i===e.size?.width&&s===e.size?.height||(e.size={width:i,height:s},e.cb(e.size,t)))}observe(e,t){if(!this.documentReady)return void this.queuedObserveRequests.push([e,t]);this.elements.has(e)?this.removeFromQueue(e):this.resizeObserver?.observe(e);const i={cb:t};this.elements.set(e,i)}unobserve(e){this.resizeObserver?.unobserve(e),this.elements.delete(e),this.removeFromQueue(e),this.elements.size||this.destroy()}removeFromQueue(e){this.queuedObserveRequests=this.queuedObserveRequests.filter((t=>{let[i]=t;return i!==e}))}},Xw=["styles","canvas","canvas-center","canvas-overlay","canvas-proxy","series-area"],Jw=new Map([["styles",{childElementType:"style"}],["canvas",{childElementType:"canvas"}],["canvas-proxy",{childElementType:"div"}],["canvas-overlay",{childElementType:"div"}],["canvas-center",{childElementType:"div"}],["series-area",{childElementType:"div"}]]);var eb={x:0,y:0,width:0,height:0,top:0,bottom:0,left:0,right:0,toJSON:()=>eb},tb=class extends Iw{constructor(e,t){super(),this.styles=new Map,this.container=void 0,this.containerSize=void 0,this.sizeMonitor=new Qw;const i=vg("div");i.innerHTML='<div role="presentation" class="ag-charts-wrapper ag-charts-styles" data-ag-charts><div role="presentation" class="ag-charts-canvas-center"><div role="presentation" class="ag-charts-canvas-container"><div role="presentation" class="ag-charts-canvas" aria-hidden="true"></div><div role="figure" class="ag-charts-canvas-proxy"><div role="img" class="ag-charts-series-area" tabindex="-1"></div></div><div role="presentation" class="ag-charts-canvas-overlay"></div></div></div></div>',this.element=i.children.item(0),this.styleRootElement=t,this.rootElements=Xw.reduce(((e,t)=>{const i=`ag-charts-${t}`,s=this.element.classList.contains(i)?this.element:this.element.querySelector(`.${i}`);if(!s)throw new Error(`AG Charts - unable to find DOM element ${i}`);return e[t]={element:s,children:new Map,listeners:[]},e}),{});let s=!1;this.observer=function(e,t){if("undefined"=
vendor: 59,915 bytes, line 2
2==typeof IntersectionObserver)return;const i=new IntersectionObserver((i=>{for(const s of i)s.target===e&&t(s.intersectionRatio)}),{root:e});return i.observe(e),i}(this.element,(e=>{0!==e||s||this.listeners.dispatch("hidden",{type:"hidden"}),s=0===e})),this.setSizeOptions(),this.addStyles("ag-charts-community",'.ag-charts-wrapper,.ag-charts-wrapper:focus,.ag-charts-wrapper:after,.ag-charts-wrapper:before,.ag-charts-wrapper *,.ag-charts-wrapper *:focus,.ag-charts-wrapper *:after,.ag-charts-wrapper *:before{box-sizing:border-box;outline:none}.ag-charts-wrapper{position:relative;user-select:none}.ag-charts-canvas-center{width:100%;height:100%;position:absolute;touch-action:auto;display:flex;align-items:var(--ag-charts-align);justify-content:var(--ag-charts-justify)}.ag-charts-canvas-container,.ag-charts-canvas{position:relative;user-select:none}.ag-charts-canvas-container>*,.ag-charts-canvas>*{display:block;pointer-events:none}.ag-charts-series-area{opacity:0;pointer-events:auto;position:absolute}.ag-charts-series-area:focus-visible{opacity:1}.ag-charts-canvas-proxy,.ag-charts-canvas-overlay{inset:0;pointer-events:none;position:absolute;user-select:none}.ag-charts-canvas-overlay>*{position:absolute;pointer-events:auto}.ag-charts-theme-default,.ag-charts-theme-default-dark{--ag-charts-active-color: var(--ag-active-color, #2196f3);--ag-charts-background-color: var(--ag-background-color, #fff);--ag-charts-foreground-color: var(--ag-foreground-color, #181d1f);--ag-charts-border-color: var(--ag-border-color, #dddddd);--ag-charts-hover-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 12%);--ag-charts-font-family: "Verdana", sans-serif;--ag-charts-font-size: var(--ag-font-size, 14px);--ag-charts-size: var(--ag-grid-size, 8px);--ag-charts-border: var(--ag-charts-border-color) var(--ag-borders, solid 1px);--ag-charts-border-critical: var(--ag-borders-critical, solid 1px);--ag-charts-layer-ui-overlay: 5;--ag-charts-layer-tooltip: 4;--ag-charts-layer-toolbar: 3;--ag-charts-layer-crosshair: 2;--ag-charts-layer-annotations: 1;--ag-charts-align: center;--ag-charts-justify: center;--ag-charts-axis-label-background-color: #474747;--ag-charts-axis-label-color: #ffffff;--ag-charts-toolbar-foreground-color: var(--ag-header-foreground-color, var(--ag-charts-foreground-color));--ag-charts-toolbar-background-color: var( --ag-header-background-color, color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-foreground-color) 2%) );--ag-charts-toolbar-size: 34px;--ag-charts-toolbar-size-small: 24px;--ag-charts-toolbar-border: var(--ag-charts-border-critical, solid 1px) var(--ag-charts-border-color);--ag-charts-toolbar-hover-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 12% );--ag-charts-toolbar-focus-color: var(--ag-charts-active-color);--ag-charts-toolbar-active-background-color: var(--ag-charts-toolbar-hover-color);--ag-charts-toolbar-active-color: var(--ag-charts-active-color);--ag-charts-toolbar-disabled-foreground-color: var( --ag-disabled-foreground-color, color-mix(in srgb, transparent, var(--ag-charts-toolbar-foreground-color) 50%) );--ag-charts-toolbar-disabled-background-color: color-mix( in srgb, var(--ag-charts-toolbar-background-color), var(--ag-charts-toolbar-foreground-color) 6% );--ag-charts-toolbar-gap: var(--ag-charts-size);--ag-charts-toolbar-font-size: 13px;--ag-charts-toolbar-font-size-small: 12px;--ag-charts-toolbar-button-padding: 6px;--ag-charts-toolbar-button-padding-small: 1px;--ag-charts-popover-background-color: var(--ag-charts-toolbar-background-color);--ag-charts-popover-foreground-color: var(--ag-charts-toolbar-foreground-color);--ag-charts-popover-border: var(--ag-charts-toolbar-border);--ag-charts-popover-border-radius: var(--ag-border-radius, 4px);--ag-charts-popover-active-color: var(--ag-charts-toolbar-active-color);--ag-charts-popover-hover-color: var(--ag-charts-toolbar-hover-color);--ag-charts-popover-active-background-color: var(--ag-charts-toolbar-active-background-color);--ag-charts-popover-font-size: 14px;--ag-charts-popover-font-size-small: var(--ag-charts-toolbar-font-size-small);--ag-charts-dialog-input-group-label-color: color-mix(in srgb, transparent, var(--ag-charts-foreground-color) 55%);--ag-charts-dialog-tab-color--inactive: color-mix(in srgb, transparent, var(--ag-charts-foreground-color) 55%);--ag-charts-button-radius: var(--ag-border-radius, 4px);--ag-charts-focus-border-color: var(--ag-input-focus-border-color, var(--ag-charts-active-color));--ag-charts-focus-border: solid 1px var(--ag-charts-focus-border-color);--ag-charts-focus-border-shadow: var( --ag-input-focus-box-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-input-focus-border-color, var(--ag-charts-active-color)) 20%) );--ag-charts-focus-box-shadow: var(--box-shadow), 0 0 0 2px #fff8, var(--ag-charts-focus-border-shadow);--ag-charts-icon-font-family: "agChartsDefault";--ag-charts-icon-font-weight: normal;--ag-charts-icon-font-color: color-mix(in srgb, transparent, var(--ag-charts-foreground-color), 90%);--ag-charts-icon-size: 20px;--ag-charts-input-background-color: var(--ag-charts-background-color);--ag-charts-input-background-color--hover: var(--ag-charts-hover-color);--ag-charts-input-background-color--active: var(--ag-charts-hover-color);--ag-charts-input-border-color: var(--ag-charts-border-color);--ag-charts-input-border-color--active: var(--ag-charts-active-color);--ag-charts-input-border-radius: var(--ag-border-radius, 4px);--ag-charts-input-color--active: var(--ag-charts-active-color);--ag-charts-input-focus-outline: var(--ag-charts-focus-border);--ag-charts-input-focus-box-shadow: var(--ag-charts-focus-border-shadow);--ag-charts-input-font-family: var(--ag-charts-font-family);--ag-charts-input-font-size: var(--ag-charts-font-size);--ag-charts-input-padding: 8px;--ag-charts-input-padding-large: 10px;--ag-charts-input-placeholder-color: #888888;--ag-charts-input-spacing: 8px;--ag-charts-input-transition-duration: .25s;--ag-charts-input-transition-duration--fast: .1s;--ag-charts-input-transition-timing-function: ease-out;--ag-charts-input-checkbox-background-color: #babbbc;--ag-charts-input-checkbox-background-color--checked: var(--ag-charts-active-color)}.ag-charts-theme-default-dark{--ag-charts-background-color: var(--ag-background-color, color-mix(in srgb, #fff, #182230 97%));--ag-charts-foreground-color: var(--ag-foreground-color, #fff);--ag-charts-border-color: var(--ag-border-color, rgba(255, 255, 255, .16));--ag-charts-hover-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 18%);--ag-charts-axis-label-background-color: #9caebb;--ag-charts-axis-label-color: #000000;--ag-charts-toolbar-background-color: var(--ag-header-background-color, color-mix(in srgb, #fff, #182230 93%));--ag-charts-toolbar-hover-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 18% );--ag-charts-dialog-input-group-label-text-color: #ffffff;--ag-charts-focus-border-shadow: var( --ag-input-focus-box-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-input-focus-border-color, var(--ag-charts-active-color)) 20%) );--ag-charts-input-placeholder-color: #aaaaaa}.ag-charts-icon{display:block;width:var(--ag-charts-icon-size);height:var(--ag-charts-icon-size);speak:none;speak:never;mask:var(--icon) center / contain no-repeat;background-color:currentColor;transition:background-color .25s ease-in-out}.ag-charts-icon-align-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNyAxMGg2djFIN3pNNCA3aDEydjFINHptMSA2aDEwdjFINXoiLz48L3N2Zz4=)}.ag-charts-icon-align-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNCAxMGg2djFINHptMC0zaDEydjFINHptMCA2aDEwdjFINHoiLz48L3N2Zz4=)}.ag-charts-icon-align-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTAgMTBoNnYxaC02ek00IDdoMTJ2MUg0em0yIDZoMTB2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-arrow-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1LjI5MyA0LjVIMTIuNXYtMUgxN3Y0aC0xVjUuMjA3bC05LjY0NiA5LjY0Ny0uNzA4LS43MDh6IiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDE2YTIuNSAyLjUgMCAxIDEtNSAwIDIuNSAyLjUgMCAwIDEgNSAwbS0yLjUgMS41YTEuNSAxLjUgMCAxIDAgMC0zIDEuNSAxLjUgMCAwIDAgMCAzIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-arrow-down-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDhMMS41IDhMMTAgMThMMTguNSA4TDE0IDhMMTQgM0w2IDNMNiA4Wk03IDRMNyA5SDMuNjYyNDRMMTAgMTYuNDU2TDE2LjMzNzYgOUwxMyA5TDEzIDRMNyA0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-arrow-up-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNCAxMkgxOC41TDEwIDJMMS41IDEySDZMNi4wMDAwMiAxN0gxNFYxMlpNMTMgMTZWMTFIMTYuMzM3NkwxMCAzLjU0NDA1TDMuNjYyNDQgMTFIN0w3LjAwMDAyIDE2SDEzWiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-callout-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtNC41MTRhMjYgMjYgMCAwIDAtMi4wMTcgMS41NGwtLjMxNC4yNmMtLjU1LjQ1Ny0xLjExNS45MjYtMS43NiAxLjQtLjY2OS40OTEtMS41NjItLjAxMi0xLjU2Mi0uOFYxNEg0LjVBMS41IDEuNSAwIDAgMSAzIDEyLjV6TTQuNSA0YS41LjUgMCAwIDAtLjUuNXY4YS41LjUgMCAwIDAgLjUuNWgxLjgzM3YzLjM3MmEzNiAzNiAwIDAgMCAxLjY3OC0xLjMzOGwuMzItLjI2NWEyNiAyNiAwIDAgMSAyLjIyNS0xLjY4NWwuMTI2LS4wODRIMTUuNWEuNS41IDAgMCAwIC41LS41di04YS41LjUgMCAwIDAtLjUtLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyAxdjNoMnYxMkg3djNINnYtM0g0VjRoMlYxek01IDVoM3YxMEg1ek0xMSAxNFY2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6bTEtN2gzdjZoLTN6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-close{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNSA1IDEwIDEwTTUgMTUgMTUgNSIgc3Ryb2tlPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-comment-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy41MTMgMy45OTVhNi41IDYuNSAwIDAgMSA2LjA5OCAxMS40MWMtLjU4OC4zOTMtMS4yMTcuNTM2LTEuODI5LjU4NWExMyAxMyAwIDAgMS0xLjI3LjAxN0EyNyAyNyAwIDAgMCAxMCAxNkg0LjVhLjUuNSAwIDAgMS0uNS0uNVYxMHEwLS4yNDctLjAwNy0uNTEzYy0uMDA4LS40MTYtLjAxNi0uODU3LjAxNy0xLjI2OS4wNS0uNjEyLjE5Mi0xLjI0LjU4NS0xLjgzYTYuNSA2LjUgMCAwIDEgMi45MTgtMi4zOTNtMy41Ni42MWE1LjUgNS41IDAgMCAwLTUuNjQ2IDIuMzRjLS4yNjYuMzk3LS4zNzkuODQyLS40MiAxLjM1NC0uMDMuMzYtLjAyMi43MTgtLjAxNSAxLjEwOFE1IDkuNjg5IDUgMTB2NWg1cS4zMTEuMDAxLjU5My4wMDhjLjM5LjAwNy43NDcuMDE1IDEuMTA4LS4wMTUuNTEyLS4wNDEuOTU3LS4xNTQgMS4zNTUtLjQyYTUuNSA1LjUgMCAwIDAtMS45ODMtOS45NjciIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-crosshair-add-line{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-date-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMiAyaDF2MTZIMnptMTUgMGgxdjE2aC0xeiIgZmlsbD0iIzE4MUQxRiIvPjxwYXRoIGQ9Ik0xMy4xNTcgMTFINXYtMWg3Ljc5M0wxMSA4LjIwN2wuNzA3LS43MDcgMy4xODIgMy4xODItMy4xODIgMy4xODItLjcwNy0uNzA3eiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-date-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMyAySDJ2MTZoMXptMy41MDcgNC44OUw4LjUgNC44OTVWMTBINXYxaDMuNXY3aDF2LTdoNS4wODhsLTEuOTU3IDEuOTU3LjcwNy43MDcgMy4xODItMy4xODJMMTMuMzM4IDcuM2wtLjcwNy43MDdMMTQuNjI0IDEwSDkuNVY0LjkzMmwxLjk1NyAxLjk1Ny43MDctLjcwN0w4Ljk4MiAzIDUuOCA2LjE4MnoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-delete{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTguNDk2IDguOTk2QS41LjUgMCAwIDEgOSA5LjQ5MnY0YS41LjUgMCAxIDEtMSAuMDA4di00YS41LjUgMCAwIDEgLjQ5Ni0uNTA0TTEyIDkuNWEuNS41IDAgMCAwLTEgMHY0YS41LjUgMCAwIDAgMSAweiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTYgNVYzLjVBMi41IDIuNSAwIDAgMSA4LjUgMWgzQTIuNSAyLjUgMCAwIDEgMTQgMy41VjVoMi44MzNhLjUuNSAwIDAgMSAwIDFIMTV2MTAuMjVjMCAuNDE1LS4wNjYuODYzLS4zIDEuMjIxLS4yNTcuMzk0LS42NzIuNjEyLTEuMi42MTJoLTdjLS41MjggMC0uOTQzLS4yMTgtMS4yLS42MTItLjIzNC0uMzU4LS4zLS44MDYtLjMtMS4yMjFWNkgzLjMzM2EuNS41IDAgMCAxIDAtMXptMS0xLjVBMS41IDEuNSAwIDAgMSA4LjUgMmgzQTEuNSAxLjUgMCAwIDEgMTMgMy41VjVIN3pNNiAxNi4yNVY2aDh2MTAuMjVjMCAuMzM1LS4wNTkuNTU0LS4xMzguNjc1LS4wNTUuMDg1LS4xNC4xNTgtLjM2Mi4xNThoLTdjLS4yMjIgMC0uMzA3LS4wNzMtLjM2Mi0uMTU4LS4wOC0uMTIxLS4xMzgtLjM0LS4xMzgtLjY3NSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-disjoint-channel,.ag-charts-icon-disjoint-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTkuMDI4IDE3LjQ2YTIuMjUgMi4yNSAwIDAgMC00LjA5Mi0xLjg1bC05LjUxMS0yLjM3OGEyLjI1IDIuMjUgMCAxIDAtLjIyNS45NzRsOS40NzUgMi4zNjlhMi4yNTEgMi4yNTEgMCAwIDAgNC4zNTMuODg2bS0xLjY2Mi0xLjk2NWExLjI1IDEuMjUgMCAxIDEtLjg4NSAyLjMzOCAxLjI1IDEuMjUgMCAwIDEgLjg4NS0yLjMzOE00LjM0MyAxMy42NjlhMS4yNSAxLjI1IDAgMSAwLTIuMzM4LS44ODUgMS4yNSAxLjI1IDAgMCAwIDIuMzM4Ljg4NU0zLjk3IDguNzY5YTIuMjUgMi4yNSAwIDAgMCAxLjQ1NS0yLjExbDkuNTExLTIuMzc4YTIuMjUgMi4yNSAwIDEgMC0uMjYtLjk2NUw1LjIgNS42ODVhMi4yNSAyLjI1IDAgMSAwLTEuMjMgMy4wODRtLjM3My0yLjU0N2ExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjc1LTMuNDM4YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-drag-handle{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjcuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjxjaXJjbGUgY3g9IjEzLjc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iMTMuNzUiIGN5PSIxMS43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjExLjc1IiByPSIuNzUiIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjUiLz48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iMTEuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjwvc3ZnPg==)}.ag-charts-icon-fill-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtOC4wNzEgNC4wNi0uOTI0LS45MjQuNzA3LS43MDcgNy4yODggNy4yODgtNC45NSA0Ljk1YTMuNSAzLjUgMCAwIDEtNC45NSAwbC0xLjQxNC0xLjQxNGEzLjUgMy41IDAgMCAxIDAtNC45NXptLjcwNy43MDhMNC41MzYgOS4wMWEyLjUgMi41IDAgMCAwIDAgMy41MzZMNS45NSAxMy45NmEyLjUgMi41IDAgMCAwIDMuNTM1IDBsNC4yNDMtNC4yNDN6bTYuOSA3LjIwMi0uMzQ1LjM2My0uMzQ0LS4zNjNhLjUuNSAwIDAgMSAuNjg4IDBtLS4zNDUgMS4wOGE4IDggMCAwIDAtLjI4LjMyMyA0LjMgNC4zIDAgMCAwLS40MDkuNTgyYy0uMTEzLjIwMS0uMTQ0LjMyNi0uMTQ0LjM3OGEuODMzLjgzMyAwIDAgMCAxLjY2NyAwYzAtLjA1Mi0uMDMxLS4xNzctLjE0NC0uMzc4YTQuMyA0LjMgMCAwIDAtLjQxLS41ODIgOCA4IDAgMCAwLS4yOC0uMzIybS0uMzQ0LTEuMDguMzQ0LjM2My4zNDQtLjM2My4wMDIuMDAyLjAwNC4wMDQuMDEzLjAxMmE2IDYgMCAwIDEgLjIwNi4yMDhjLjEzMS4xMzYuMzA4LjMyNy40ODUuNTQ1LjE3Ni4yMTUuMzYzLjQ2Ny41MDcuNzI0LjEzNy4yNDMuMjczLjU1My4yNzMuODY4YTEuODMzIDEuODMzIDAgMSAxLTMuNjY3IDBjMC0uMzE1LjEzNi0uNjI1LjI3My0uODY4LjE0NC0uMjU3LjMzLS41MDkuNTA3LS43MjRhOSA5IDAgMCAxIC42NDUtLjcwOGwuMDQ2LS4wNDUuMDEzLS4wMTIuMDA0LS4wMDR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-hollow-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1vcGFjaXR5PSIuMTUiIGQ9Ik01IDVoM3YxMEg1eiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMXYzaDJ2MTJIN3YzSDZ2LTNINFY0aDJWMXpNNSA1aDN2MTBINXptNyAyaDN2NmgtM3ptLTEgN1Y2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-horizontal-line,.ag-charts-icon-horizontal-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNLjUgOS41aDcuMzA2YTIuMjUgMi4yNSAwIDAgMSA0LjM4OCAwSDE5LjV2MWgtNy4zMDZhMi4yNSAyLjI1IDAgMCAxLTQuMzg4IDBILjV6bTkuNSAxLjc1YTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTQuMjQyIDIuNzIyYy0uNjEyIDAtMS4yLjI0My0xLjYzMi42NzVsLTEuMzQzIDEuMzQ0YS41LjUgMCAwIDAtLjExMi4xMTJMNC4wNSAxMS45NTljLS4yMDcuMjA3LS4zNi40Ni0uNDQ2Ljc0di4wMDFsLS42OSAyLjc2N3YuMDAyYS44Mi44MiAwIDAgMCAxLjAyMiAxLjAyMWguMDAybDIuNjM0LS44MjJjLjI4LS4wODUuNTM0LS4yMzcuNzQtLjQ0M2w3LjEwNy03LjEwOGEuNS41IDAgMCAwIC4xMTItLjExMmwxLjM0My0xLjM0M2EyLjMwOCAyLjMwOCAwIDAgMC0xLjYzMi0zLjk0TTE0LjEyMiA3bDEuMDQ0LTEuMDQ1YTEuMzA4IDEuMzA4IDAgMSAwLTEuODQ5LTEuODVMMTIuMjcxIDUuMTV6bS0yLjU1OC0xLjE0Mi02LjgwNyA2LjgwOWEuOC44IDAgMCAwLS4xOTYuMzI1bC0uNzUgMi40NjggMi40Ny0uNzQ5YS44LjggMCAwIDAgLjMyNS0uMTk0bDYuODA4LTYuODF6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTcuMzYyIDQuODczLTQuNTk0IDYuNjU0LTQuODUtMy4zMTctNC4yNTEgNi45NzctLjg1NC0uNTJMNy42MTIgNi43OWw0Ljg5OSAzLjM1IDQuMDI4LTUuODM2eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-line-style-dashed{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDR2MUgyem0xMiAwaDR2MWgtNHpNOCA5aDR2MUg4eiIvPjwvc3ZnPg==)}.ag-charts-icon-line-style-dotted{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIyLjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSI4LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTAuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSIxMi41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjE0LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-line-style-solid{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDE2djFIMnoiLz48L3N2Zz4=)}.ag-charts-icon-line-with-markers-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTk4IDQuODg4LTMuNTU2IDQuOTE4YTIuMjUgMi4yNSAwIDEgMS0zLjg2Ni43NWwtMS40MzItLjlhMi4yNCAyLjI0IDAgMCAxLTIuMDA5LjQzNWwtMy44MjggNi40MjgtLjg2LS41MTJMNi40NSA5LjYyM2EyLjI1IDIuMjUgMCAxIDEgMy41MS0uNzYxbDEuMzI5LjgzNWEyLjI0IDIuMjQgMCAwIDEgMi41NTctLjQ5N2wzLjU0Mi00Ljg5OHptLTQuOTYgNS4xNTNhMS4yNSAxLjI1IDAgMSAwLS42NCAyLjQxOSAxLjI1IDEuMjUgMCAwIDAgLjY0LTIuNDE5TTkuMSA4LjMyMXEuMDY2LS4xOTIuMDY3LS40MDRhMS4yNSAxLjI1IDAgMSAwLS4wNjcuNDA0IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-lock,.ag-charts-icon-locked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuMjA3IDMuNzY0YTIuODk0IDIuODk0IDAgMCAwLTIuODk1IDIuODk0VjloNS43ODlWNi42NThhMi44OTQgMi44OTQgMCAwIDAtMi44OTUtMi44OTRNMTQuMSA5VjYuNjU4YTMuODk0IDMuODk0IDAgMSAwLTcuNzg5IDB2Mi4zNDlBMi41IDIuNSAwIDAgMCA0IDExLjV2M0EyLjUgMi41IDAgMCAwIDYuNSAxN2g4YTIuNSAyLjUgMCAwIDAgMi41LTIuNXYtM0EyLjUgMi41IDAgMCAwIDE0LjUgOXpNNi41IDEwQTEuNSAxLjUgMCAwIDAgNSAxMS41djNBMS41IDEuNSAwIDAgMCA2LjUgMTZoOGExLjUgMS41IDAgMCAwIDEuNS0xLjV2LTNhMS41IDEuNSAwIDAgMC0xLjUtMS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-measurer-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibTQuNDYxIDEyLjcxIDEuNTMyLTEuNTMxIDEuNDE0IDEuNDE0LjcwNy0uNzA3TDYuNyAxMC40NzJsMS41MzItMS41MzMgMiAyIC43MDctLjcwNy0yLTIgNi4wMS02LjAxIDIuODMgMi44MjhMNS4wNSAxNy43NzggMi4yMjIgMTQuOTVsMS41MzItMS41MzIgMS40MTQgMS40MTQuNzA3LS43MDd6TS44MDggMTQuOTVsLjcwNy0uNzA3TDE0LjI0MyAxLjUxNWwuNzA3LS43MDcuNzA3LjcwNyAyLjgyOCAyLjgyOC43MDcuNzA3LS43MDcuNzA3TDUuNzU3IDE4LjQ4NWwtLjcwNy43MDctLjcwNy0uNzA3LTIuODI4LTIuODI4em0xMS4wNzgtNi44MzVMMTAuNDcgNi43bC43MDctLjcwNyAxLjQxNSAxLjQxNHptLjgyNC0zLjY1NCAxIDEgLjcwOC0uNzA3LTEtMXoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-note-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtMy4yMWwtMS40NjkgMi41N2ExIDEgMCAwIDEtMS42ODIuMDg1TDcuMjQzIDE0SDQuNUExLjUgMS41IDAgMCAxIDMgMTIuNXpNNC41IDRhLjUuNSAwIDAgMC0uNS41djhhLjUuNSAwIDAgMCAuNS41aDMuMjU3bDIuMTk2IDMuMDc0TDExLjcxIDEzaDMuNzlhLjUuNSAwIDAgMCAuNS0uNXYtOGEuNS41IDAgMCAwLS41LS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNi41IDYuNUEuNS41IDAgMCAxIDcgNmg2YS41LjUgMCAwIDEgMCAxSDdhLjUuNSAwIDAgMS0uNS0uNU02LjUgOS41QS41LjUgMCAwIDEgNyA5aDZhLjUuNSAwIDAgMSAwIDFIN2EuNS41IDAgMCAxLS41LS41IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-ohlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTEzIDExaC0zdi0xaDNWM2gxdjJoNHYxaC00djExaC0xek02IDE3di0yaDN2LTFINlY0SDV2MUgydjFoM3YxMXoiLz48L3N2Zz4=)}.ag-charts-icon-pan-end{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0ibTYuNjQ2IDEzLjgxMy0uMzUzLjM1NC43MDcuNzA3LjM1NC0uMzU0ek0xMS4xNjYgMTBsLjM1NC4zNTQuMzU0LS4zNTQtLjM1NC0uMzU0ek03LjM1NSA1LjQ4IDcgNS4xMjZsLS43MDcuNzA3LjM1My4zNTR6bTAgOS4wNCA0LjE2Ni00LjE2Ni0uNzA3LS43MDgtNC4xNjcgNC4xNjd6bTQuMTY2LTQuODc0TDcuMzU0IDUuNDhsLS43MDguNzA3IDQuMTY3IDQuMTY3ek0xMy4wODMgNXYxMGgxVjV6Ii8+PC9zdmc+)}.ag-charts-icon-pan-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuNzkgNS44MzMgOC42MjUgMTBsNC4xNjYgNC4xNjctLjcwNy43MDdMNy4yMSAxMGw0Ljg3My00Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy4yMSAxNC4xNjcgMTEuMzc2IDEwIDcuMjEgNS44MzNsLjcwNy0uNzA3TDEyLjc5IDEwbC00Ljg3MyA0Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-start{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgNXYxMGgxVjV6TTkuNjI0IDEwbDQuMTY2LTQuMTY3LS43MDctLjcwN0w4LjIxIDEwbDQuODc0IDQuODc0LjcwNy0uNzA3eiIvPjwvc3ZnPg==)}.ag-charts-icon-parallel-channel,.ag-charts-icon-parallel-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTcuNzIgNS4zMzFBMi4yNSAyLjI1IDAgMSAwIDE0LjcwNSAzLjZsLTkuNDkgNC41NjJhMi4yNSAyLjI1IDAgMSAwIC4yMDkgMS4wMWw5LjY2Mi00LjY0NmEyLjI1IDIuMjUgMCAwIDAgMi42MzQuODA1bS4zNzMtMi41NDdhMS4yNSAxLjI1IDAgMSAxLTIuMzM4Ljg4NSAxLjI1IDEuMjUgMCAwIDEgMi4zMzgtLjg4NU00LjM0MyA4LjY3YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODVNNS4zMDcgMTYuNzI4YTIuMjUgMi4yNSAwIDEgMS0uNTI1LS44NThsOS45MjMtNC43N2EyLjI1IDIuMjUgMCAxIDEgLjM4MS45MjZ6bS0uOTY0LjI3NGExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjAyMy01LjEwNmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-position-bottom{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzem0zLTNoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgMTNoOHYxSDZ6Ii8+PC9zdmc+)}.ag-charts-icon-position-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMyAxMGgxNHYxSDN6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDdoOHYxSDZ6bTAgNmg4djFINnoiLz48L3N2Zz4=)}.ag-charts-icon-position-top{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzeiIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik02IDdoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDEzaDh2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-price-label-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNC41IDNBMS41IDEuNSAwIDAgMCAzIDQuNVYxM2ExLjUgMS41IDAgMCAwIDEuNSAxLjVoLjgzM3YuMDU3Yy4yNDItLjI5OS41OTctLjUwMyAxLS41NDhWMTMuNUg0LjVBLjUuNSAwIDAgMSA0IDEzVjQuNWEuNS41IDAgMCAxIC41LS41aDExYS41LjUgMCAwIDEgLjUuNXY4YS41LjUgMCAwIDEtLjUuNWgtNC44MThsLS4xMjYuMDg0YTI2IDI2IDAgMCAwLTIuMjI1IDEuNjg1bC0uMzIuMjY1LS4wNjguMDU2YTEuNSAxLjUgMCAwIDEtMi42MDkgMS4zNTRjLjAzMy43NjMuOTA1IDEuMjM4IDEuNTYuNzU2LjY0Ni0uNDc0IDEuMjEtLjk0MyAxLjc2MS0xLjRsLjMxMy0uMjZBMjYgMjYgMCAwIDEgMTAuOTg2IDE0SDE1LjVhMS41IDEuNSAwIDAgMCAxLjUtMS41di04QTEuNSAxLjUgMCAwIDAgMTUuNSAzeiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43MTYgMTQuODE1YTIuMjUgMi4yNSAwIDEgMS00LjIxIDEuNTkzIDIuMjUgMi4yNSAwIDAgMSA0LjIxLTEuNTkzbS0xLjY2MiAxLjk2NmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS41IDYuMjI4IDcuMTY3IDguMzc2IDYuNSA3Ljc2MiA5LjUgNWwzIDIuNzYyLS42NjcuNjE0eiIgZmlsbD0iIzAwMCIvPjxwYXRoIGQ9Ik0yIDE4di0xaDE2djF6TTIgM1YyaDE2djF6IiBmaWxsPSIjMTgxRDFGIi8+PC9zdmc+)}.ag-charts-icon-reset{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuMDQgNC40NDVhNS44MSA1LjgxIDAgMCAwLTcuMjU3IDIuNDUzLjUuNSAwIDAgMS0uODY1LS41MDJBNi44MSA2LjgxIDAgMSAxIDMgOS44MTNhLjUuNSAwIDAgMSAxIDAgNS44MSA1LjgxIDAgMSAwIDguMDQtNS4zNjgiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMjg5IDMuMDAyYS41LjUgMCAwIDEgLjUuNXYyLjY1NWgyLjY1NWEuNS41IDAgMCAxIDAgMUg0LjI5YS41LjUgMCAwIDEtLjUtLjVWMy41MDJhLjUuNSAwIDAgMSAuNS0uNSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-settings{--icon: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkIj48cGF0aCBkPSJNMTAgMTNhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2bTAtMWEyIDIgMCAxIDEtLjAwMS0zLjk5OUEyIDIgMCAwIDEgMTAgMTIiLz48cGF0aCBkPSJNMi4zMSAxNC4zNDVjLS44MTctMS40OTEuMDI3LTIuNDk5LjQ3NC0yLjg2NS41MzEtLjQzNC45NjktLjM2NS45NzItMS40OC0uMDAzLTEuMTE1LS40NDEtMS4wNDYtLjk3Mi0xLjQ4MS0uNDU0LS4zNzEtMS4zMTctMS40MDUtLjQzNC0yLjkzNmwuMDA1LS4wMDljLjg4NC0xLjUyIDIuMjA3LTEuMjkgMi43NTUtMS4wODMuNjQxLjI0My44MDEuNjU2IDEuNzY4LjEwMS45NjQtLjU2LjY4Ni0uOTA0Ljc5Ni0xLjU4Mi4wOTQtLjU3OC41NTktMS44NDMgMi4zMjYtMS44NDNoLjAxYzEuNzU5LjAwNSAyLjIyMiAxLjI2NiAyLjMxNiAxLjg0My4xMS42NzgtLjE2OCAxLjAyMi43OTYgMS41ODIuOTY3LjU1NSAxLjEyNy4xNDIgMS43NjgtLjEwMS41NDktLjIwOCAxLjg3Ni0uNDM4IDIuNzYgMS4wOTJzLjAyIDIuNTY1LS40MzQgMi45MzZjLS41MzEuNDM1LS45NjkuMzY2LS45NzIgMS40ODEuMDAzIDEuMTE1LjQ0MSAxLjA0Ni45NzIgMS40OC40NTQuMzcyIDEuMzE3IDEuNDA2LjQzNCAyLjkzN2wtLjAwNS4wMDljLS44ODQgMS41Mi0yLjIwNyAxLjI5LTIuNzU1IDEuMDgzLS42NDEtLjI0My0uODAxLS42NTYtMS43NjgtLjEwMS0uOTY0LjU2LS42ODYuOTA0LS43OTYgMS41ODEtLjA5NC41NzktLjU1OSAxLjg0NC0yLjMyNiAxLjg0NGgtLjAxYy0xLjc1OS0uMDA1LTIuMjIyLTEuMjY2LTIuMzE2LTEuODQ0LS4xMS0uNjc3LjE2OC0xLjAyMS0uNzk2LTEuNTgxLS45NjctLjU1NS0xLjEyNy0uMTQyLTEuNzY4LjEwMS0uNTQ5LjIwOC0xLjg3Ni40MzgtMi43Ni0xLjA5MmwtLjAyLS4wMzZ6TTkuOTg0IDIuMTYySDEwYzEuMzU1IDAgMS4zNDIgMS4wMzkgMS4zNTMgMS40MjUuMDA4LjMxMi4wNCAxLjE2IDEuMjU5IDEuODcybC4wMTUuMDA4YzEuMjI1LjcgMS45NzYuMzA0IDIuMjUxLjE1NS4zMzctLjE4MyAxLjIyNi0uNzExIDEuOTAyLjQ0NWwuMDA4LjAxNGMuNjc4IDEuMTczLS4yMjkgMS42ODItLjU1OCAxLjg4NC0uMjY2LjE2My0uOTg0LjYxNS0uOTkxIDIuMDI3di4wMTZjLjAwNyAxLjQxMi43MjUgMS44NjQuOTkxIDIuMDI3LjMyOC4yMDEgMS4yMjkuNzA3LjU2NiAxLjg3bC0uMDA4LjAxNGMtLjY3NyAxLjE3NC0xLjU3MS42NDMtMS45MS40NTktLjI3NS0uMTQ5LTEuMDI2LS41NDUtMi4yNTEuMTU0bC0uMDE1LjAwOWMtMS4yMTkuNzEyLTEuMjUxIDEuNTYtMS4yNTkgMS44NzItLjAxMS4zODYuMDAyIDEuNDI1LTEuMzUzIDEuNDI1cy0xLjM0Mi0xLjAzOS0xLjM1My0xLjQyNWMtLjAwOC0uMzEyLS4wNC0xLjE2LTEuMjU5LTEuODcybC0uMDE1LS4wMDljLTEuMjI1LS42OTktMS45NzYtLjMwMy0yLjI1MS0uMTU0LS4zMzYuMTgzLTEuMjE5LjcwNi0xLjg5NC0uNDMybC0uMDE2LS4wMjdjLS42NzgtMS4xNzQuMjI5LTEuNjgyLjU1OC0xLjg4NC4yNjYtLjE2My45ODQtLjYxNS45OTEtMi4wMjd2LS4wMTZjLS4wMDctMS40MTItLjcyNS0xLjg2NC0uOTkxLTIuMDI3LS4zMjgtLjIwMS0xLjIyOS0uNzA3LS41NjYtMS44N2wuMDA4LS4wMTRjLjY3Ny0xLjE3NCAxLjU3MS0uNjQzIDEuOTEtLjQ1OS4yNzUuMTQ5IDEuMDI2LjU0NSAyLjI1MS0uMTU1bC4wMTUtLjAwOGMxLjIxOS0uNzEyIDEuMjUxLTEuNTYgMS4yNTktMS44NzIuMDEtLjM4NC0uMDAyLTEuNDE3IDEuMzM3LTEuNDI1Ii8+PC9zdmc+)}.ag-charts-icon-step-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzE4MUQxRiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNiA0aDV2OGgzVjhoNXYxaC00djRoLTVWNUg3djEwSDJ2LTFoNHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-text-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00IDRIMTZWN0gxNVY1SDEwLjVWMTVIMTRWMTZINlYxNUg5LjVWNUg1VjdINFY0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-trend-line,.ag-charts-icon-trend-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS4zMTQgMTAuOTM4YTIuMjUgMi4yNSAwIDEgMSAuMDEtMWg5LjM1MmEyLjI1IDIuMjUgMCAxIDEgLjAxIDF6bS0yLjE4OS43MjlhMS4yNSAxLjI1IDAgMSAwIDAtMi41IDEuMjUgMS4yNSAwIDAgMCAwIDIuNW0xMy43NSAwYTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock,.ag-charts-icon-unlocked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNjUxIDMuNWEyLjg5NCAyLjg5NCAwIDAgMC0yLjg5NCAyLjg5NFY5SDE0LjVhMi41IDIuNSAwIDAgMSAyLjUgMi41djNhMi41IDIuNSAwIDAgMS0yLjUgMi41aC04QTIuNSAyLjUgMCAwIDEgNCAxNC41di0zQTIuNSAyLjUgMCAwIDEgNi41IDloLjI1N1Y2LjM5NGEzLjg5NCAzLjg5NCAwIDEgMSA3Ljc4OSAwIC41LjUgMCAwIDEtMSAwQTIuODk0IDIuODk0IDAgMCAwIDEwLjY1IDMuNU02LjUgMTBBMS41IDEuNSAwIDAgMCA1IDExLjV2M0ExLjUgMS41IDAgMCAwIDYuNSAxNmg4YTEuNSAxLjUgMCAwIDAgMS41LTEuNXYtM2ExLjUgMS41IDAgMCAwLTEuNS0xLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-vertical-line,.ag-charts-icon-vertical-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNSA3LjgwNmEyLjI1IDIuMjUgMCAwIDEgMCA0LjM4OFYxOS41aC0xdi03LjMwNmEyLjI1IDIuMjUgMCAwIDEgMC00LjM4OFYuNWgxem0tLjUuOTQ0YTEuMjUgMS4yNSAwIDEgMSAwIDIuNSAxLjI1IDEuMjUgMCAwIDEgMC0yLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-zoom-in{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS41IDEwYS41LjUgMCAwIDEgLjUtLjVoOGEuNS41IDAgMCAxIDAgMUg2YS41LjUgMCAwIDEtLjUtLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-high-low-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyA0aDJ2MTJINFY0aDNNNSA1aDN2MTBINXpNMTEgMTRWNmg1djhoLTVtMS03aDN2NmgtM3oiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-hlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTYzIDEuODM3LTUuMzM0IDExLjYyMUw2Ljk1NyA4LjEybC00LjE5OSA5LjYyMi0uOTE2LS40IDQuNzU2LTEwLjlMMTIuNDkgMTEuOCAxNy4yNTQgMS40MnoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODI1IDIuNzA0LjU1IDEzLjc4NWwuOTAyLjQzIDQuNzI0LTkuOTE5IDYuMDM0IDUuMDI5IDMuMjU1LTguMTQtLjkyOC0uMzctMi43NDUgNi44NnptNy44NTIgMTQuNjM2IDUuNzgtMTMuMTM5LS45MTUtLjQwMi01LjIxOSAxMS44Ni02LjAwNS01LjUwNC0zLjI3OCA3LjY0OC45Mi4zOTQgMi43MjItNi4zNTJ6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljc1IDQuNWEuNzUuNzUgMCAwIDAtMS41IDB2Mi43NUg0LjVhLjc1Ljc1IDAgMCAwIDAgMS41aDIuNzV2Mi43NWEuNzUuNzUgMCAwIDAgMS41IDBWOC43NWgyLjc1YS43NS43NSAwIDAgMCAwLTEuNUg4Ljc1VjQuNVoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjc1IDhhLjc1Ljc1IDAgMCAxIC43NS0uNzVoN2EuNzUuNzUgMCAwIDEgMCAxLjVoLTdBLjc1Ljc1IDAgMCAxIDMuNzUgOFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-alt,.ag-charts-icon-zoom-in-alt-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20taW4iPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48bGluZSB4MT0iMjEiIHgyPSIxNi42NSIgeTE9IjIxIiB5Mj0iMTYuNjUiLz48bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIvPjxsaW5lIHgxPSI4IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjExIi8+PC9zdmc+)}.ag-charts-icon-zoom-out-alt,.ag-charts-icon-zoom-out-alt-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20tb3V0Ij48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PGxpbmUgeDE9IjIxIiB4Mj0iMTYuNjUiIHkxPSIyMSIgeTI9IjE2LjY1Ii8+PGxpbmUgeDE9IjgiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTEiLz48L3N2Zz4=)}.ag-charts-icon-reset-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00LjQxMiA0LjA1OCAyLjc1IDIuMzk2VjYuNzVoLjc0NGEuNzYuNzYgMCAwIDAgLjAxMiAwaDMuNTk4TDUuNDc4IDUuMTI1YTQuMTI1IDQuMTI1IDAgMCAxIDIuNTIzLS44NzUgMy43NSAzLjc1IDAgMSAxLTMuMTE5IDUuODMzLjc1Ljc1IDAgMCAwLTEuMjQ3LjgzNEE1LjI1IDUuMjUgMCAxIDAgOCAyLjc1aC0uMDAzYTUuNjI1IDUuNjI1IDAgMCAwLTMuNTg1IDEuMzA4WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-left-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC4wMyA0LjQ3YS43NS43NSAwIDAgMSAwIDEuMDZMNy41NiA4bDIuNDcgMi40N2EuNzUuNzUgMCAxIDEtMS4wNiAxLjA2bC0zLTNhLjc1Ljc1IDAgMCAxIDAtMS4wNmwzLTNhLjc1Ljc1IDAgMCAxIDEuMDYgMFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-pan-right-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01Ljk3IDExLjUzYS43NS43NSAwIDAgMSAwLTEuMDZMOC40NCA4IDUuOTcgNS41M2EuNzUuNzUgMCAwIDEgMS4wNi0xLjA2bDMgM2EuNzUuNzUgMCAwIDEgMCAxLjA2bC0zIDNhLjc1Ljc1IDAgMCAxLTEuMDYgMFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-pan-start-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tZmlyc3QiPjxwYXRoIGQ9Im0xNyAxOC02LTYgNi02Ii8+PHBhdGggZD0iTTcgNnYxMiIvPjwvc3ZnPg==)}.ag-charts-icon-pan-end-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tbGFzdCI+PHBhdGggZD0ibTcgMTggNi02LTYtNiIvPjxwYXRoIGQ9Ik0xNyA2djEyIi8+PC9zdmc+)}.ag-charts-icon-trend-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMi41IiBjeT0iOCIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxjaXJjbGUgY3g9IjEzLjUiIGN5PSI4IiByPSIxLjc1IiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMS41Ii8+PHBhdGggc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTQgOGg4Ii8+PC9zdmc+)}.ag-charts-icon-horizontal-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC4zODYgOC43NWEyLjUwMSAyLjUwMSAwIDAgMS00Ljc3MiAwSC43NWEuNzUuNzUgMCAwIDEgMC0xLjVoNC44NjRhMi41MDEgMi41MDEgMCAwIDEgNC43NzIgMGg0Ljg2NGEuNzUuNzUgMCAwIDEgMCAxLjVoLTQuODY0Wk05IDhhMSAxIDAgMSAxLTIgMCAxIDEgMCAwIDEgMiAwWiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-vertical-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljc1IDUuNjE0YTIuNTAxIDIuNTAxIDAgMCAxIDAgNC43NzJ2NC44NjRhLjc1Ljc1IDAgMCAxLTEuNSAwdi00Ljg2NGEyLjUwMSAyLjUwMSAwIDAgMSAwLTQuNzcyVi43NWEuNzUuNzUgMCAwIDEgMS41IDB2NC44NjRaTTggN2ExIDEgMCAxIDEgMCAyIDEgMSAwIDAgMSAwLTJaIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-parallel-channel-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC40MjQgNC45MmEyLjUgMi41IDAgMSAwLTMuMzc3LTIuMTRsLTYuNjMgMi45YTIuNTAxIDIuNTAxIDAgMSAwIC42MDcgMS4zNzJsNi41ODUtMi44OGEyLjUwMSAyLjUwMSAwIDAgMCAyLjgxNS43NDhabS4wNS0yLjY5M2ExIDEgMCAxIDEtMS44Ny43MDggMSAxIDAgMCAxIDEuODctLjcwOFptLTExIDQuNzVhMSAxIDAgMSAxLTEuODcuNzA4IDEgMSAwIDAgMSAxLjg3LS43MDhabTEuNTUgNi4wNzVhMi41MDEgMi41MDEgMCAxIDEtLjYwNy0xLjM3Mmw2LjYzLTIuOWEyLjUwMSAyLjUwMSAwIDEgMSAuNTYyIDEuMzkxbC02LjU4NSAyLjg4Wm0tMS41NS0uMDc1YTEgMSAwIDEgMS0xLjg3LjcwOCAxIDEgMCAwIDEgMS44Ny0uNzA4Wm0xMC40Mi0zLjQ2YTEgMSAwIDEgMC0uNzA5LTEuODcgMSAxIDAgMCAwIC43MDggMS44N1oiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-disjoint-channel-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC40MjQgNC45MmEyLjUgMi41IDAgMSAwLTMuMzgzLTIuNDUzTDQuNjkgNC4wNTVhMi41IDIuNSAwIDEgMCAuMzQ0IDEuNDZsNi4zOTItMS41OThhMi41MDEgMi41MDEgMCAwIDAgMyAxLjAwM1ptLjA1LTIuNjkzYTEgMSAwIDEgMS0xLjg3LjcwOCAxIDEgMCAwIDEgMS44Ny0uNzA4Wm0tMTEgMi43NWExIDEgMCAxIDEtMS44Ny43MDggMSAxIDAgMCAxIDEuODctLjcwOFptMS41NiA1LjQyYTIuNSAyLjUgMCAxIDAtLjM0NSAxLjQ2MWw2LjM1MiAxLjU4OGEyLjUgMi41IDAgMSAwIC4zODQtMS40NWwtNi4zOTItMS41OThabS0xLjU2LjUzOGExIDEgMCAxIDAtMS44Ny0uNzA4IDEgMSAwIDAgMCAxLjg3LjcwOFptMTAuNDIgMS40NjFhMSAxIDAgMSAxLS43MDkgMS44NyAxIDEgMCAwIDEgLjcwOC0xLjg3WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyLjc4OC41ODNhMi42MyAyLjYzIDAgMCAwLTEuODYuNzdMOS41NDQgMi43MzhhLjc1Ny43NTcgMCAwIDAtLjE0LjE0TDIuMDMyIDEwLjI1di4wMDFjLS4yNDIuMjQxLS40Mi41MzgtLjUyLjg2NGwtLjAwMi4wMDItLjg4IDIuOTAyLS4wMDEuMDAzYTEuMDgzIDEuMDgzIDAgMCAwIDEuMzUgMS4zNDdoLjAwMWwyLjkwMi0uODhoLjAwMWMuMzI2LS4xLjYyMy0uMjc3Ljg2NS0uNTE4di0uMDAxbDcuMzc1LTcuMzc2YS43NjMuNzYzIDAgMCAwIC4xMzktLjEzOWwxLjM4NC0xLjM4NEEyLjYzIDIuNjMgMCAwIDAgMTIuNzg4LjU4M1ptLS4xMjYgNC4zNTIuOTI0LS45MjRhMS4xMyAxLjEzIDAgMCAwLTEuNTk3LTEuNTk3bC0uOTI0LjkyNCAxLjU5NyAxLjU5N1ptLTIuNjU3LS41MzYtNi45MTMgNi45MTRIMy4wOWEuNTgzLjU4MyAwIDAgMC0uMTQ2LjI0MmwtLjY1MyAyLjE1MyAyLjE1NS0uNjU0YS41ODMuNTgzIDAgMCAwIC4yNDEtLjE0NGw2LjkxNC02LjkxNC0xLjU5Ny0xLjU5N1oiIGZpbGw9IiMwMDAiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDE2djE2SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+)}.ag-charts-icon-delete-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjA4MyAyLjY2N2MwLS4wOS4wNTMtLjI0Mi4xOTctLjM4Ny4xNDUtLjE0NC4yOTctLjE5Ny4zODctLjE5N2gyLjY2N2MuMDg5IDAgLjI0MS4wNTMuMzg2LjE5Ny4xNDUuMTQ1LjE5Ny4yOTcuMTk3LjM4N3YuNTgzSDYuMDg0di0uNTgzWk01LjMzIDQuNzVIMTEuOTE3djguNTgzYzAgLjA5LS4wNTIuMjQyLS4xOTcuMzg3LS4xNDUuMTQ0LS4yOTcuMTk3LS4zODYuMTk3SDQuNjY3Yy0uMDkgMC0uMjQyLS4wNTMtLjM4Ny0uMTk3LS4xNDQtLjE0NS0uMTk3LS4yOTctLjE5Ny0uMzg3VjQuNzVINS4zM1ptLS43NDUtMS41di0uNTgzYzAtLjU3OC4yOC0xLjA5Mi42MzYtMS40NDcuMzU1LS4zNTYuODctLjYzNyAxLjQ0Ny0uNjM3aDIuNjY3Yy41NzcgMCAxLjA5MS4yODEgMS40NDcuNjM3LjM1NS4zNTUuNjM2Ljg3LjYzNiAxLjQ0N3YuNTgzSDE0YS43NS43NSAwIDAgMSAwIDEuNWgtLjU4M3Y4LjU4M2MwIC41NzgtLjI4MSAxLjA5Mi0uNjM2IDEuNDQ3LS4zNTYuMzU2LS44Ny42MzctMS40NDcuNjM3SDQuNjY3Yy0uNTc3IDAtMS4wOTItLjI4MS0xLjQ0Ny0uNjM3LS4zNTUtLjM1NS0uNjM3LS44Ny0uNjM3LTEuNDQ3VjQuNzVIMmEuNzUuNzUgMCAwIDEgMC0xLjVoMi41ODNabTIuMDgzIDMuMzMzYS43NS43NSAwIDAgMSAuNzUuNzV2NGEuNzUuNzUgMCAxIDEtMS41IDB2LTRhLjc1Ljc1IDAgMCAxIC43NS0uNzVabTMuNDE3Ljc1YS43NS43NSAwIDAgMC0xLjUgMHY0YS43NS43NSAwIDEgMCAxLjUgMHYtNFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-lock-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjE3MyAyLjg0YTIuNTgzIDIuNTgzIDAgMCAxIDQuNDEgMS44Mjd2MS45MTZINS40MTZWNC42NjdjMC0uNjg1LjI3My0xLjM0My43NTctMS44MjdaTTMuOTE3IDYuNTgzVjQuNjY3YTQuMDgzIDQuMDgzIDAgMCAxIDguMTY2IDB2MS45MTZoLjU4NGMxLjE1IDAgMi4wODMuOTMzIDIuMDgzIDIuMDg0djQuNjY2YzAgMS4xNS0uOTMzIDIuMDg0LTIuMDgzIDIuMDg0SDMuMzMzYTIuMDgzIDIuMDgzIDAgMCAxLTIuMDgzLTIuMDg0VjguNjY3YzAtMS4xNTEuOTMzLTIuMDg0IDIuMDgzLTIuMDg0aC41ODNabTcuNDE2IDEuNWgtOGEuNTgzLjU4MyAwIDAgMC0uNTgzLjU4NHY0LjY2NmMwIC4zMjIuMjYxLjU4NC41ODMuNTg0aDkuMzM0YS41ODMuNTgzIDAgMCAwIC41ODMtLjU4NFY4LjY2N2EuNTgzLjU4MyAwIDAgMC0uNTgzLS41ODRoLTEuMzM0WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjkyMyAyLjg0YTIuNTgzIDIuNTgzIDAgMCAxIDMuNjUzIDAgMyAzIDAgMCAxIC41Ny43OThjLjEzNC4yNzguMTcuNDc0LjE3LjU0NWEuNzUuNzUgMCAwIDAgMS41IDBjMC0uMzgxLS4xMzItLjgwOS0uMzItMS4xOThhNC41MDEgNC41MDEgMCAwIDAtLjg1OS0xLjIwNiA0LjA4MyA0LjA4MyAwIDAgMC02Ljk3IDIuODg4djEuOTE2aC0uNTg0QzIuOTMzIDYuNTgzIDIgNy41MTYgMiA4LjY2N3Y0LjY2NmMwIDEuMTUuOTMzIDIuMDg0IDIuMDgzIDIuMDg0aDkuMzM0YzEuMTUgMCAyLjA4My0uOTMzIDIuMDgzLTIuMDg0VjguNjY3YzAtMS4xNTEtLjkzMy0yLjA4NC0yLjA4My0yLjA4NGgtNy4yNVY0LjY2N2MwLS42ODUuMjcyLTEuMzQzLjc1Ni0xLjgyN1pNNS40MTcgOC4wODNINC4wODJhLjU4My41ODMgMCAwIDAtLjU4My41ODR2NC42NjZjMCAuMzIyLjI2MS41ODQuNTgzLjU4NGg5LjMzNGEuNTgzLjU4MyAwIDAgMCAuNTgzLS41ODRWOC42NjdhLjU4My41ODMgMCAwIDAtLjU4My0uNTg0aC04WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-plus-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXBsdXMiPjxwYXRoIGQ9Ik01IDEyaDE0Ii8+PHBhdGggZD0iTTEyIDV2MTQiLz48L3N2Zz4=)}.ag-charts-icon-crossline-add-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43NSA0LjVhLjc1Ljc1IDAgMCAwLTEuNSAwdjIuNzVINC41YS43NS43NSAwIDAgMCAwIDEuNWgyLjc1djIuNzVhLjc1Ljc1IDAgMCAwIDEuNSAwVjguNzVoMi43NWEuNzUuNzUgMCAwIDAgMC0xLjVIOC43NXoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-input{--input-layer-active: 1;--input-layer-focus: 2;color:inherit;font-family:var(--ag-charts-input-font-family);font-size:var(--ag-charts-input-font-size);transition-duration:var(--ag-charts-input-transition-duration);transition-property:none;transition-timing-function:var(--ag-charts-input-transition-timing-function)}.ag-charts-input:focus-visible{outline:var(--ag-charts-input-focus-outline);box-shadow:var(--ag-charts-input-focus-box-shadow);z-index:var(--input-layer-focus)}.ag-charts-button{background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);cursor:pointer;padding:var(--ag-charts-input-padding);transition-property:background,border-color}.ag-charts-button:hover{background:var(--ag-charts-input-background-color--hover)}.ag-charts-button:has(.ag-charts-icon){padding:2px}.ag-charts-checkbox{appearance:none;background:var(--ag-charts-input-checkbox-background-color);border-radius:9px;cursor:pointer;height:18px;margin:0;transition-duration:var(--ag-charts-input-transition-duration--fast);transition-property:margin;width:29px}.ag-charts-checkbox:before{display:block;background:var(--ag-charts-input-background-color);border-radius:7px;content:" ";height:14px;margin:2px;transition-duration:var(--ag-charts-input-transition-duration--fast);transition-property:margin;transition-timing-function:var(--ag-charts-input-transition-easing);width:14px}.ag-charts-checkbox:checked{background:var(--ag-charts-input-checkbox-background-color--checked)}.ag-charts-checkbox:checked:before{margin-left:13px}.ag-charts-select{background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);padding:3px 2px 4px;font-size:inherit}.ag-charts-textarea{--line-height: 1.38;background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);line-height:var(--line-height);font-family:var(--ag-charts-input-font-family);font-size:var(--ag-charts-input-font-size);padding:var(--ag-charts-input-padding-large) var(--ag-charts-input-padding)}.ag-charts-textarea[placeholder]:empty:before{color:var(--ag-charts-input-placeholder);content:attr(placeholder)}.ag-charts-proxy-container{pointer-events:none;position:absolute}.ag-charts-proxy-elem{-webkit-appearance:none;appearance:none;background:none;border:none;color:#0000;overflow:hidden;pointer-events:none;position:absolute}.ag-charts-proxy-elem::-moz-range-thumb,.ag-charts-proxy-elem::-moz-range-track{opacity:0}.ag-charts-proxy-elem::-webkit-slider-runnable-track,.ag-charts-proxy-elem::-webkit-slider-thumb{opacity:0}.ag-charts-proxy-elem:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-focus-indicator{position:absolute;display:block;pointer-events:none;user-select:none;width:100%;height:100%}.ag-charts-focus-indicator>div{position:absolute;outline:var(--ag-charts-focus-border);outline-width:2px;box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-focus-indicator>svg{width:100%;height:100%;fill:none;stroke:var(--ag-charts-focus-border-color);stroke-width:2px}.ag-charts-toolbar{align-items:center;background:none;border:none;display:flex;flex-wrap:nowrap;opacity:1;position:absolute;transform:translateY(0);transition:opacity .2s ease-in-out,transform .2s ease-in-out}.ag-charts-toolbar--hidden,.ag-charts-toolbar--prevent-flash{visibility:hidden}.ag-charts-toolbar--floating-hidden{opacity:0;transition:opacity .4s ease-in-out}.ag-charts-toolbar--small{--ag-charts-toolbar-size: var(--ag-charts-toolbar-size-small);--ag-charts-toolbar-font-size: var(--ag-charts-toolbar-font-size-small);--ag-charts-toolbar-button-padding: var(--ag-charts-toolbar-button-padding-small)}.ag-charts-toolbar--top,.ag-charts-toolbar--bottom{flex-direction:row;width:100%}.ag-charts-toolbar--left,.ag-charts-toolbar--right{flex-direction:column}.ag-charts-toolbar--floating,.ag-charts-toolbar--floating-top,.ag-charts-toolbar--floating-bottom{background:none;border:none;flex-direction:row;pointer-events:none;width:100%}.ag-charts-toolbar--floating{padding:0;width:auto;z-index:var(--ag-charts-layer-toolbar)}.ag-charts-toolbar--floating-top{height:calc(var(--ag-charts-toolbar-size) + 10px);padding-top:10px}.ag-charts-toolbar--floating-bottom{height:calc(var(--ag-charts-toolbar-size) + 10px);padding-bottom:10px;overflow:hidden}.ag-charts-toolbar__align{display:flex;flex-direction:inherit;flex-wrap:inherit;gap:var(--ag-charts-toolbar-gap);max-width:100%;width:100%}.ag-charts-toolbar__align--start{justify-content:start}.ag-charts-toolbar__align--center{justify-content:center}.ag-charts-toolbar__align--end{justify-content:end}.ag-charts-toolbar__align--center,.ag-charts-toolbar__align--end{margin-left:auto}.ag-charts-toolbar--left .ag-charts-toolbar__align--center,.ag-charts-toolbar--left .ag-charts-toolbar__align--end,.ag-charts-toolbar--right .ag-charts-toolbar__align--center,.ag-charts-toolbar--right .ag-charts-toolbar__align--end{margin-left:0;margin-top:auto}.ag-charts-toolbar--floating-top .ag-charts-toolbar__align,.ag-charts-toolbar--floating-bottom .ag-charts-toolbar__align{transition:transform .4s ease-in-out;width:auto}.ag-charts-toolbar__section{display:inherit;flex-direction:inherit;flex-wrap:inherit;justify-content:inherit;max-width:inherit;width:inherit}.ag-charts-toolbar__button{align-items:center;background:var(--ag-charts-toolbar-background-color);border:var(--ag-charts-toolbar-border);color:var(--ag-charts-toolbar-foreground-color);display:flex;font:var(--ag-charts-toolbar-font-size) var(--ag-charts-font-family);justify-content:center;margin:0 0 0 -1px;min-height:var(--ag-charts-toolbar-size);min-width:var(--ag-charts-toolbar-size);padding:var(--ag-charts-toolbar-button-padding);pointer-events:all;position:relative;white-space:nowrap;--stroke-width-color: var(--ag-charts-toolbar-foreground-color)}.ag-charts-toolbar__no-pointer-events{pointer-events:none}.ag-charts-toolbar__button--drag-handle{min-width:24px;padding-left:0;padding-right:0}.ag-charts-toolbar__button--with-transition{transition:background-color .25s ease-in-out,border-color .25s ease-in-out,color .25s ease-in-out}.ag-charts-toolbar__button[data-toolbar-group=ranges]{padding:var(--ag-charts-toolbar-button-padding) calc(var(--ag-charts-toolbar-button-padding) * 1.5)}.ag-charts-toolbar--top,.ag-charts-toolbar--bottom,.ag-charts-toolbar--floating,.ag-charts-toolbar--floating-top,.ag-charts-toolbar--floating-bottom{.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-button-radius);border-top-left-radius:var(--ag-charts-button-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-right-radius:var(--ag-charts-button-radius);border-top-right-radius:var(--ag-charts-button-radius)}}.ag-charts-toolbar--left,.ag-charts-toolbar--right{.ag-charts-toolbar__button{border-radius:0;margin:-1px 0 0;max-width:100%}.ag-charts-toolbar__button--first{border-top-left-radius:var(--ag-charts-button-radius);border-top-right-radius:var(--ag-charts-button-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-left-radius:var(--ag-charts-button-radius);border-bottom-right-radius:var(--ag-charts-button-radius)}}.ag-charts-toolbar__button--hidden-value,.ag-charts-toolbar__button--hidden-toggled{display:none}.ag-charts-toolbar__button:hover:not([aria-disabled=true],.ag-charts-toolbar__button--drag-handle){background:var(--ag-charts-toolbar-hover-color);z-index:1}.ag-charts-toolbar__button:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-toolbar__button.ag-charts-toolbar__button--active{background:var(--ag-charts-toolbar-active-background-color);border-color:var(--ag-charts-toolbar-active-color);color:var(--ag-charts-toolbar-active-color);z-index:2;--stroke-width-color: var(--ag-charts-toolbar-active-color)}.ag-charts-toolbar__button[aria-disabled=true]{background:var(--ag-charts-toolbar-disabled-background-color);color:var(--ag-charts-toolbar-disabled-foreground-color)}.ag-charts-toolbar__button:not([aria-disabled=true]){cursor:pointer}.ag-charts-toolbar__button.ag-charts-toolbar__button--drag-handle{cursor:grab}.ag-charts-toolbar__button.ag-charts-toolbar__button--dragging{cursor:grabbing}.ag-charts-toolbar__button--fill-visible:after{content:"";display:block;position:absolute;bottom:3px;left:5px;right:5px;height:4px;border-radius:99px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ag-charts-foreground-color) 10%,transparent);background:var(--fill)}.ag-charts-toolbar__button--fill-visible[aria-disabled=true]:after{filter:grayscale(1);opacity:.5}.ag-charts-toolbar__button--stroke-width-visible:before{content:"";height:min(var(--strokeWidth),20px);width:12px;background:var(--stroke-width-color);margin-right:var(--ag-charts-toolbar-button-padding)}.ag-charts-toolbar__button--stroke-width-visible[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{margin-left:var(--ag-charts-toolbar-gap)}.ag-charts-toolbar__icon,.ag-charts-toolbar__label{pointer-events:none}.ag-chart-overlay{color:#181d1f;pointer-events:none}.ag-chart-overlay.ag-chart-dark-overlay{color:#fff}.ag-chart-overlay--loading{color:#8c8c8c}.ag-chart-overlay__loading-background{background:#fff;pointer-events:none}.ag-chart-overlay.ag-chart-dark-overlay .ag-chart-overlay__loading-background{background:#192232}.ag-chart-tooltip{transition:transform .1s ease;width:max-content;z-index:99999;font:12px Verdana,sans-serif;color:#464646;box-shadow:0 4px 8px #00000014}.ag-chart-tooltip-wrap-always{overflow-wrap:break-word;word-break:break-word;hyphens:none}.ag-chart-tooltip-wrap-hyphenate{overflow-wrap:break-word;word-break:break-word;hyphens:auto}.ag-chart-tooltip-wrap-on-space{overflow-wrap:normal;word-break:normal}.ag-chart-tooltip-wrap-never{white-space:pre;text-overflow:ellipsis}.ag-chart-tooltip-no-interaction{pointer-events:none;user-select:none}.ag-chart-tooltip-no-animation{transition:none!important}.ag-chart-tooltip-hidden{visibility:hidden}.ag-chart-tooltip-title{overflow:hidden;position:relative;padding:8px 14px;border-top-left-radius:2px;border-top-right-radius:2px;color:#fff;background-color:#888;z-index:1;text-overflow:inherit}.ag-chart-tooltip-title:only-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.ag-chart-tooltip-content{overflow:hidden;padding:6px 14px;line-height:1.7em;background:#fff;border-bottom-left-radius:2px;border-bottom-right-radius:2px;border:1px solid rgba(0,0,0,.15);text-overflow:inherit}.ag-chart-tooltip-arrow:before{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:5px solid #d9d9d9;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;width:0;height:0;margin:0 auto}.ag-chart-tooltip-arrow:after{content:"";position:absolute;top:calc(100% - 1px);left:50%;transform:translate(-50%);border:5px solid white;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;width:0;height:0;margin:0 auto}\n'),e&&this.setContainer(e),this.destroyFns.push(
2qw(this.element))}destroy(){super.destroy(),this.observer?.unobserve(this.element),this.container&&this.sizeMonitor.unobserve(this.container),Object.values(this.rootElements).forEach((e=>{e.children.forEach((e=>e.remove())),e.element.remove()})),this.element.remove()}setSizeOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;const{style:n}=this.element;n.width=`${i??e}px`,n.height=`${s??t}px`}updateContainerSize(){const{style:e}=this.rootElements["canvas-center"].element;e.width=`${this.containerSize?.width??0}px`,e.height=`${this.containerSize?.height??0}px`}setContainer(e){if(e===this.container)return;this.container&&(this.container.removeChild(this.element),this.sizeMonitor.unobserve(this.container));if(!(null!=this.getShadowDocumentRoot(e)))for(const t of this.rootElements.styles.children.keys())this.removeChild("styles",t);this.container=e;for(const[t,i]of this.styles)this.addStyles(t,i);e.appendChild(this.element),this.sizeMonitor.observe(e,(e=>{this.containerSize=e,this.updateContainerSize(),this.listeners.dispatch("resize",{type:"resize"})})),this.listeners.dispatch("container-changed",{type:"container-changed"})}setThemeClass(e){this.element.classList.forEach((t=>{t.startsWith("ag-charts-theme-")&&t!==e&&this.element.classList.remove(t)})),this.element.classList.add(e)}setTabIndex(e){this.rootElements["series-area"].element.tabIndex=e}updateCanvasLabel(e){NC(this.rootElements["canvas-proxy"].element,"aria-label",e)}getEventElement(e,t){return["focus","blur","keydown","keyup"].includes(t)?this.rootElements["series-area"].element:e}addEventListener(e,t,i){this.getEventElement(this.element,e).addEventListener(e,t,i)}removeEventListener(e,t,i){this.getEventElement(this.element,e).removeEventListener(e,t,i)}getBoundingClientRect(){return this.rootElements.canvas.element.getBoundingClientRect()}getOverlayClientRect(){const e=fg(),t=new Vg(0,0,e.innerWidth,e.innerHeight),i=this.getRawOverlayClientRect(),s=Vg.fromDOMRect(i??this.getBoundingClientRect());return t.intersection(s)?.toDOMRect()??eb}getRawOverlayClientRect(){let e=this.element;for(;null!=e;){const t=e.computedStyleMap?.(),i=t?.get("overflow-x")?.toString(),s=t?.get("overflow-y")?.toString();if(null!=i&&"visible"!==i||s&&"visible"!==s)return e.getBoundingClientRect();e=e.parentElement}const t=this.getShadowDocumentRoot();if(t)return t.getBoundingClientRect()}getShadowDocumentRoot(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.container;const t=e?.ownerDocument?.body??mg("body");for(;null!=e;){if(e===t)return;if(e.parentNode instanceof DocumentFragment)return e;e=e.parentNode}return this.container}getChildBoundingClientRect(e){const{children:t}=this.rootElements[e],i=[];for(const s of t.values())i.push(Vg.fromDOMRect(s.getBoundingClientRect()));return Vg.merge(i)}calculateCanvasPosition(e){let t=0,i=0;const{x:s=0,y:n=0}=this.getChildBoundingClientRect("canvas")??{},r=e.getBoundingClientRect();return t=r.x-s,i=r.y-n,{x:t,y:i}}isManagedChildDOMElement(e,t,i){const{children:s}=this.rootElements[t],n=s?.get(i);return null!=n&&e.contains(n)}isEventOverElement(e){const t=e.target;return null!=t&&this.element.contains(t)}addStyles(e,t){const i="data-ag-charts";if(this.styles.set(e,t),null==this.container)return;const s=t=>t.getAttribute(i)===e,n=e=>{for(const i of e.children)if(s(i))return;const t=vg("style");return e.appendChild(t),t};let r;if(this.styleRootElement)r=n(this.styleRootElement);else{r=null!=this.getShadowDocumentRoot(this.container)?this.addChild("styles",e):n(mg("head"))}null==r||s(r)||(r.setAttribute(i,e),r.innerHTML=t)}removeStyles(e){this.removeChild("styles",e)}updateCursor(e){this.element.style.cursor=e}getCursor(){return this.element.style.cursor}addChild(e,t,i,s){const{element:n,children:r,listeners:o}=this.rootElements[e];if(!r)throw new Error("AG Charts - unable to create DOM elements after destroy()");if(r.has(t))return r.get(t);const{childElementType:a="div"}=Jw.get(e)??{};if(i&&i.tagName.toLowerCase()!==a.toLowerCase())throw new Error("AG Charts - mismatching DOM element type");const l=i??vg(a);for(const[h,c,d]of o)l.addEventListener(h,c,d);if(r.set(t,l),s){const e=n.querySelector(s.query);if(null==e)throw new Error(`AG Charts - addChild query failed ${s.query}`);e.insertAdjacentElement(s.where,l)}else n?.appendChild(l);return l}removeChild(e,t){const{children:i}=this.rootElements[e];i&&(i.get(t)?.remove(),i.delete(t))}incrementDataCounter(e){const{dataset:t}=this.element;t[e]??(t[e]="0"),t[e]=String(Number(t[e])+1)}setDataBoolean(e,t){this.element.dataset[e]=String(t)}getIconClassNames(e){return`ag-charts-icon ag-charts-icon-${e}`}};function ib(e,t,i,s){if(0===e)return function(e,t,i){if(0===e)return function(e,t){const i=-t/e;return 0!==e&&i>=0&&i<=1?[i]:[]}(t,i);const s=t*t-4*e*i,n=[];if(0===s){const i=-t/(2*e);i>=0&&i<=1&&n.push(i)}else if(s>0){const i=Math.sqrt(s),r=(-t-i)/(2*e),o=(-t+i)/(2*e);r>=0&&r<=1&&n.push(r),o>=0&&o<=1&&n.push(o)}return n}(t,i,s);const n=t/e,r=i/e,o=(3*r-n*n)/9,a=(9*n*r-27*(s/e)-2*n*n*n)/54,l=o*o*o+a*a,h=1/3,c=[];if(l>=0){const e=Math.sqrt(l),t=Math.sign(a+e)*Math.pow(Math.abs(a+e),h),i=Math.sign(a-e)*Math.pow(Math.abs(a-e),h),s=Math.abs(Math.sqrt(3)*(t-i)/2),r=-h*n+(t+i);if(r>
2=0&&r<=1&&c.push(r),0===s){const e=-h*n-(t+i)/2;e>=0&&e<=1&&c.push(e)}}else{const e=Math.acos(a/Math.sqrt(-o*o*o)),t=h*n,i=2*Math.sqrt(-o),s=i*Math.cos(h*e)-t,r=i*Math.cos(h*(e+2*Math.PI))-t,l=i*Math.cos(h*(e+4*Math.PI))-t;s>=0&&s<=1&&c.push(s),r>=0&&r<=1&&c.push(r),l>=0&&l<=1&&c.push(l)}return c}function sb(e,t,i,s,n,r,o,a){const l=(i-e)*(a-r)-(s-t)*(o-n);if(0===l)return 0;const h=((o-n)*(t-r)-(e-n)*(a-r))/l,c=((i-e)*(t-r)-(s-t)*(e-n))/l;return h>=0&&h<=1&&c>=0&&c<=1?1:0}function nb(e,t,i,s,n,r,o,a,l,h,c,d){let u=0;const p=h-d,g=c-l,m=l*(d-h)-h*(c-l),f=rb(e,i,n,o),v=rb(t,s,r,a),y=ib(p*f[0]+g*v[0],p*f[1]+g*v[1],p*f[2]+g*v[2],p*f[3]+g*v[3]+m);for(const C of y){const e=C*C,t=C*e,i=f[0]*t+f[1]*e+f[2]*C+f[3],s=v[0]*t+v[1]*e+v[2]*C+v[3];let n;n=l===c?(s-h)/(d-h):(i-l)/(c-l),n>=0&&n<=1&&u++}return u}function rb(e,t,i,s){return[3*t-e-3*i+s,3*e-6*t+3*i,-3*e+3*t,e]}function ob(e,t,i,s,n,r,o,a,l,h){if(isNaN(e)||isNaN(t))return 0;r&&([n,s]=[s,n]);const c=(h-a)/(l-o),d=a-c*o,u=Math.pow(c,2)+1,p=2*(c*(d-t)-e),g=Math.pow(e,2)+Math.pow(d-t,2)-Math.pow(i,2),m=Math.pow(p,2)-4*u*g;if(m<0)return 0;const f=(-p+Math.sqrt(m))/2/u,v=(-p-Math.sqrt(m))/2/u;let y=0;return[f,v].forEach((i=>{if(!(i>=Math.min(o,l)&&i<=Math.max(o,l)))return;const r=i-e,a=c*i+d-t;Ny(Math.atan2(a,r),s,n)&&y++})),y}function ab(e,t,i,s,n){return(1-n)**3*e+3*(1-n)**2*n*t+3*(1-n)*n**2*i+n**3*s}function lb(e,t,i,s,n){if(n<=Math.min(e,s))return e<s?0:1;if(n>=Math.max(e,s))return e<s?1:0;let r=0,o=1,a=NaN;for(let l=0;l<12;l+=1){a=(r+o)/2;ab(e,t,i,s,a)<n?r=a:o=a}return a}function hb(e,t,i,s,n,r,o,a,l){const h=(1-l)*e+l*i,c=(1-l)*t+l*s,d=(1-l)*i+l*n,u=(1-l)*s+l*r,p=(1-l)*n+l*o,g=(1-l)*r+l*a,m=(1-l)*h+l*d,f=(1-l)*c+l*u,v=(1-l)*d+l*p,y=(1-l)*u+l*g,C=(1-l)*m+l*v,S=(1-l)*f+l*y;return[[{x:e,y:t},{x:h,y:c},{x:m,y:f},{x:C,y:S}],[{x:C,y:S},{x:v,y:y},{x:p,y:g},{x:o,y:a}]]}function cb(e,t,i,s){const n=3*t-e-3*i+s,r=3*e-6*t+3*i,o=-3*e+3*t;if(0===n){if(0!==r){const e=-o/r;if(e>0&&e<1)return[e]}return[]}const a=r*r-4*n*o;if(a>=0){const e=Math.sqrt(a);return[(-r+e)/(2*n),(-r-e)/(2*n)].filter((e=>e>0&&e<1))}return[]}function db(e,t,i,s,n,r,o,a){return[...cb(e,i,n,o),...cb(t,s,r,a)]}var ub=class{constructor(){this.path2d=new Path2D,this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.openedPath=!1,this.closedPath=!1}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length||this.previousCommands.toString()!==this.commands.toString()||this.previousParams.toString()!==this.params.toString()}getPath2D(){return this.path2d}moveTo(e,t){this.openedPath=!0,this.path2d.moveTo(e,t),this.commands.push(0),this.params.push(e,t)}lineTo(e,t){this.openedPath?(this.path2d.lineTo(e,t),this.commands.push(1),this.params.push(e,t)):this.moveTo(e,t)}rect(e,t,i,s){this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+s),this.lineTo(e,t+s),this.closePath()}roundRect(e,t,i,s,n){n=Math.min(n,i/2,s/2),this.moveTo(e,t+n),this.arc(e+n,t+n,n,Math.PI,1.5*Math.PI),this.lineTo(e+n,t),this.lineTo(e+i-n,t),this.arc(e+i-n,t+n,n,1.5*Math.PI,2*Math.PI),this.lineTo(e+i,t+n),this.lineTo(e+i,t+s-n),this.arc(e+i-n,t+s-n,n,0,Math.PI/2),this.lineTo(e+i-n,t+s),this.lineTo(e+n,t+s),this.arc(e+ +n,t+s-n,n,Math.PI/2,Math.PI),this.lineTo(e,t+s-n),this.closePath()}arc(e,t,i,s,n,r){this.openedPath=!0,this.path2d.arc(e,t,i,s,n,r),this.commands.push(2),this.params.push(e,t,i,s,n,r?1:0)}cubicCurveTo(e,t,i,s,n,r){this.openedPath||this.moveTo(e,t),this.path2d.bezierCurveTo(e,t,i,s,n,r),this.commands.push(3),this.params.push(e,t,i,s,n,r)}closePath(){this.openedPath&&(this.path2d.closePath(),this.commands.push(4),this.openedPath=!1,this.closedPath=!0)}clear(e){e&&(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this.closedPath),this.path2d=new Path2D,this.openedPath=!1,this.closedPath=!1,this.commands=[],this.params=[]}isPointInPath(e,t){const i=this.commands,s=this.params,n=i.length,r=-1e4,o=-1e4;let a=NaN,l=NaN,h=0,c=0,d=0;for(let u=0,p=0;u<n;u++)switch(i[u]){case 0:d+=sb(a,l,h,c,r,o,e,t),h=s[p++],a=h,c=s[p++],l=c;break;case 1:d+=sb(h,c,s[p++],s[p++],r,o,e,t),h=s[p-2],c=s[p-1];break;case 3:d+=nb(h,c,s[p++],s[p++],s[p++],s[p++],s[p++],s[p++],r,o,e,t),h=s[p-2],c=s[p-1];break;case 2:{const i=s[p++],n=s[p++],l=s[p++],u=s[p++],g=s[p++];if(d+=ob(i,n,l,u,g,Boolean(s[p++]),r,o,e,t),!isNaN(a)){d+=sb(h,c,i+Math.cos(u)*l,n+Math.sin(u)*l,r,o,e,t)}h=i+Math.cos(g)*l,c=n+Math.sin(g)*l;break}case 4:d+=sb(a,l,h,c,r,o,e,t)}return d%2===1}distanceSquared(e,t){let i=1/0;const s=this.commands,n=this.params,r=s.length;let o=NaN,a=NaN,l=0,h=0;for(let c=0,d=0;c<r;c++)switch(s[c]){case 0:l=o=n[d++],h=a=n[d++];break;case 1:i=Uy(e,t,l,h,n[d++],n[d++],i);break;case 3:fp.error("Command.Curve distanceSquare not implemented");break;case 2:{const s=n[d++],r=n[d++],o=n[d++],a=n[d++],c=n[d++],u=s+Math.cos(a)*o,p=r+Math.sin(a)*o,g=Boolean(n[d++]);i=Uy(e,t,l,h,u,p,i),i=_y(e,t,s,r,o,a,c,g,i),l=s+Math.cos(c)*o,h=r+Math.sin(c)*o;break}case 4:i=Uy(e,t,l,h,o,a,i)}return i}getPoints(){const{commands:e,params:t}=this,i=[];let s=0;for(const n of e)switch(n){case 0:case 1:i.push({x:t[s++],y:t[s++]});break;case 3:s+=4,i.push({x:t[s++],y:t[s++]});break;case 2:i.push({x:t[s++],y:t[s++]}),s+=4}return i}toSVG(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(e,t)=>({x:e,y:t});const t=[],{commands:i,params:s}=this,n=function(i){t.push(i);for(let s=0;s<(arguments.length<=1?0:arguments.length-1);s+=2){const{x:i,y:n}=e(s+1<1||arguments.length<=s+1?void 0:arguments[s+1],s+1+1<1||arguments.length<=s+1+1?void 0:arguments[s+1+1]);t.push(i,n)}};let r=0;for(const o of i)switch(o){case 0:n("M",s[r++],s[r++]);break;case 1:n("L",s[r++],s[r++]);break;case 3:n("C",s[r++],s[r++],s[r++],s[r++],s[r++],s[r++]);break;case 2:{const e=s[r++],i=s[r++],o=s[r++],a=s[r++],l=s[r++],h=s[r++];let c=h?a-l:l-a;c<0&&(c+=2*Math.ceil(-c/(2*Math.PI))*Math.PI),h&&(c=-c);const d=Math.max(Math.ceil(Math.abs(c)/(Math.PI/2)),1),u=c/d,p=4/3*Math.tan(u/4);n(0===t.length?"M":"L",e+Math.cos(a)*o,i+Math.sin(a)*o);for(let t=0;t<d;t+=1){const s=a+u*(t+0),r=a+u*(t+1),l=o*Math.sin(s),h=o*Math.cos(s),c=o*Math.sin(r),d=o*Math.cos(r);n("C",e+h-p*l,i+l+p*h,e+d+p*c,i+c-p*d,e+d,i+c)}break}case 4:t.push("Z")}return t.join(" ")}computeBBox(){const{commands:e,params:t}=this;let[i,s,n,r]=[1/0,1/0,-1/0,-1/0],[o,a]=[NaN,NaN],[l,h]=[NaN,NaN];const c=(e,t,l)=>{i=Math.min(t,i),s=Math.min(e,s),n=Math.max(e,n),r=Math.max(t,r),l&&([o,a]=[e,t])};let d=0;for(const u of e)switch(u){case 0:c(t[d++],t[d++],!0),[l,h]=[o,a];break;case 1:c(t[d++],t[d++],!0);break;case 3:{const e=t[d++],i=t[d++],s=t[d++],n=t[d++],r=t[d++],l=t[d++];c(r,l,!0);db(o,a,e,i,s,n,r,l).forEach((t=>{const h=ab(o,e,s,r,t),d=ab(a,i,n,l,t);c(h,d)}));break}case 2:{const e=t[d++],i=t[d++],s=t[d++];let n=Ly(t[d++]),r=Ly(t[d++]);t[d++]&&([n,r]=[r,n]);const o=(t,n)=>
2{const r=e+s*Math.cos(t),o=i+s*Math.sin(t);c(r,o,n)};o(n),o(r,!0);const a=[0,Math.PI/2,Math.PI,3*Math.PI/2];for(const t of a)(n<r&&n<=t&&t<=r||n>r&&(n<=t||t<=r))&&o(t);break}case 4:[o,a]=[l,h]}return new Vg(s,i,n-s,r-i)}};function pb(e){const{redraw:t=3,changeCb:i,convertor:s}=e??{};return Hg({redraw:t,type:"path",convertor:s,changeCb:i})}var gb=class extends eC{constructor(){super(...arguments),this.path=new ub,this._clipX=NaN,this._clipY=NaN,this.clip=!1,this._dirtyPath=!0}set clipX(e){this._clipX=e,this.dirtyPath=!0}set clipY(e){this._clipY=e,this.dirtyPath=!0}set dirtyPath(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(3))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){this._dirtyPath||(this.dirtyPath=this.path.isDirty()||(this.fillShadow?.isDirty()??!1)||(this._clipPath?.isDirty()??!1))}isPointInPath(e,t){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(e,t)}distanceSquared(e,t){return this.distanceSquaredTransformedPoint(e,t)}svgPathData(e){return this.dirtyPath&&(this.updatePath(),this.dirtyPath=!1),this.path.toSVG(e)}distanceSquaredTransformedPoint(e,t){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(e,t)?0:this.path.distanceSquared(e,t)}isDirtyPath(){return!1}updatePath(){}updatePathIfDirty(){(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1)}preRender(){return this.updatePathIfDirty(),super.preRender()}render(e){const{ctx:t,forceRender:i,stats:s}=e;if(0!==this.dirty||i){if(!this.clip||isNaN(this._clipX)||isNaN(this._clipY))this._clipPath=void 0,this.drawPath(t);else{t.save();const e=this.strokeWidth/2;
2this._clipPath??(this._clipPath=new ub),this._clipPath.clear(),this._clipPath.rect(-e,-e,this._clipX+e,this._clipY+e+e),t.clip(this._clipPath?.getPath2D()),this._clipX>0&&this._clipY>0&&this.drawPath(t),t.restore()}this.fillShadow?.markClean(),super.render(e)}else s&&(s.nodesSkipped+=hy(this).count)}drawPath(e){this.fillStroke(e,this.path.getPath2D())}toSVG(){if(!this.visible)return;const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("d",this.svgPathData()),e.setAttribute("fill","string"===typeof this.fill?this.fill:"none"),e.setAttribute("fill-opacity",String(this.fillOpacity)),null!=this.stroke&&(e.setAttribute("stroke",this.stroke),e.setAttribute("stroke-opacity",String(this.strokeOpacity)),e.setAttribute("stroke-width",String(this.strokeWidth))),{elements:[e]}}};gb.className="Path",op([pb()],gb.prototype,"clip",2),op([pb()],gb.prototype,"clipX",1),op([pb()],gb.prototype,"clipY",1);var mb="ag-charts-focus-indicator",fb=class{constructor(e){this.domManager=e,this.div=mg().createElement("div"),this.svg=mg().createElementNS("http://www.w3.org/2000/svg","svg"),this.path=mg().createElementNS("http://www.w3.org/2000/svg","path"),this.svg.append(this.path),this.element=e.addChild("series-area",mb),this.element.classList.add(mb),this.element.ariaHidden="true",this.element.append(this.svg)}destroy(){this.domManager.removeStyles(mb),this.domManager.removeChild("series-area",mb)}updateBounds(e){if(void 0===e);else if(e instanceof gb){const t=(t,i)=>wy.toCanvasPoint(e,t,i);this.path.setAttribute("d",e.svgPathData(t)),this.show(this.svg)}else bg(this.div,e),this.show(this.div)}show(e){this.element.innerHTML="",this.element.append(e)}getFocusableElement(){const e=this.element.parentElement;if(null==e||0!==e.tabIndex&&-1!==e.tabIndex)throw new Error("AG Charts - the focus indicator must be a child of a focusable element");return e}overrideFocusVisible(e){this.getFocusableElement().style.setProperty("opacity",{true:"1",false:"0",undefined:""}[`${e}`])}isFocusVisible(){const e=this.getFocusableElement();return null!=e&&"1"===fg().getComputedStyle(e).opacity}},vb=class{set textContent(e){this.textElement.textContent=e;const t=this.textElement,i=t.getBBox?.();i&&this.svgElement.setAttribute("viewBox",`${i.x} ${i.y} ${i.width} ${i.height}`)}get textContent(){return this.textElement.textContent}constructor(){this.textElement=yg("http://www.w3.org/2000/svg","text"),this.textElement.role="presentation",this.svgElement=yg("http://www.w3.org/2000/svg","svg"),this.svgElement.appendChild(this.textElement),this.svgElement.style.width="100%",this.svgElement.style.opacity="0",this.svgElement.role="presentation",this.boundedContainer=vg("div"),this.boundedContainer.appendChild(this.svgElement),this.boundedContainer.role="presentation"}remove(){this.boundedContainer.remove()}getContainer(){return this.boundedContainer}updateBounds(e){bg(this.boundedContainer,e)}};function yb(e,t){return t.params?.type===e}function Cb(e){const t={params:e,result:void 0};return t.result=function(e){if("button"===e)return vg("button");if("slider"===e)return vg("input");if(["toolbar","group","list"].includes(e))return vg("div");if("text"===e)return new vb;if("listswitch"===e)return{button:vg("button"),listitem:vg("div")};throw Error("AG Charts - error allocating meta")}(t.params.type),t}var Sb=class{constructor(e,t){this.localeManager=e,this.domManager=t,this.destroyFns=[]}destroy(){this.destroyFns.forEach((e=>e()))}addLocalisation(e){e(),this.destroyFns.push(this.localeManager.addListener("locale-changed",e))}createProxyContainer(e){const t=Cb(e),{params:i,result:s}=t;return this.domManager.addChild("canvas-proxy",i.id,s),s.classList.add(...i.classList,"ag-charts-proxy-container"),s.role=i.type,"ariaOrientation"in i&&(s.ariaOrientation=i.ariaOrientation),"boolean"===typeof i.ariaHidden&&(s.ariaHidden=i.ariaHidden.toString()),this.addLocalisation((()=>{s.ariaLabel=this.localeManager.t(i.ariaLabel.id,i.ariaLabel.params)})),s}createProxyElement(e){const t=Cb(e);if(yb("button",t)){const{params:e,result:i}=t;if(this.initInteract(e,i),i.style.pointerEvents="auto","string"===typeof e.textContent)i.textContent=e.textContent;else{const{textContent:t}=e;this.addLocalisation((()=>{i.textContent=this.localeManager.t(t.id,t.params)}))}this.setParent(e,i)}if(yb("slider",t)){const{params:e,result:i}=t;this.initInteract(e,i),i.type="range",i.role="presentation",i.style.margin="0px",i.ariaOrientation=e.ariaOrientation,this.addLocalisation((()=>{i.ariaLabel=this.localeManager.t(e.ariaLabel.id,e.ariaLabel.params)})),this.setParent(e,i)}if(yb("text",t)){const{params:e,result:i}=t;this.initElement(e,i.getContainer()),this.setParent(e,i.getContainer())}if(yb("listswitch",t)){const{params:e,result:{button:i,listitem:s}}=t;this.initInteract(e,i),i.style.width="100%",i.style.height="100%",i.textContent=e.textContent,i.role="switch",i.ariaChecked=e.ariaChecked.toString(),i.style.pointerEvents="auto",i.setAttribute("aria-describedby",e.ariaDescribedBy),s.role="listitem",s.style.position="absolute",s.replaceChildren(i),this.setParent(e,s)}return t.result}initElement(e,t){const{id:i}=e;t.id=i,t.classList.toggle("ag-charts-proxy-elem",!0)}initInteract(e,t){const{onclick:i,ondblclick:s,onmouseenter:n,onmouseleave:r,oncontextmenu:o,onchange:a,onfocus:l,onblur:h,tabIndex:c}=e;this.initElement(e,t),void 0!==c&&(t.tabIndex=c),i&&t.addEventListener("click",i),s&&t.addEventListener("dblclick",
2s),n&&t.addEventListener("mouseenter",n),r&&t.addEventListener("mouseleave",r),o&&t.addEventListener("contextmenu",o),l&&t.addEventListener("focus",l),h&&t.addEventListener("blur",h),a&&t.addEventListener("change",a)}setParent(e,t){const{id:i,parent:s}=e;if("string"===typeof s){const e={where:s,query:".ag-charts-series-area"};this.domManager.addChild("canvas-proxy",i,t,e)}else s.appendChild(t)}},wb=/\$\{(\w+)}(?:\[(\w+)])?/gi,bb={number:new Intl.NumberFormat("en-US"),percent:new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}),date:new Intl.DateTimeFormat("en-US",{dateStyle:"full"}),time:new Intl.DateTimeFormat("en-US",{timeStyle:"full"}),datetime:new Intl.DateTimeFormat("en-US",{dateStyle:"full",timeStyle:"full"})},xb=class extends Dw{constructor(){super(...arguments),this.localeText=void 0,this.getLocaleText=void 0}setLocaleText(e){this.localeText!==e&&(this.localeText=e,this.dispatch("locale-changed"))}setLocaleTextFormatter(e){this.getLocaleText=e,this.getLocaleText!==e&&(this.getLocaleText=e,this.dispatch("locale-changed"))}t(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{localeText:i=ap,getLocaleText:s}=this,n=i[e];return s?.({key:e,defaultValue:n,variables:t})??(e=>{let{defaultValue:t,variables:i}=e;return t?.replaceAll(wb,((e,t,s)=>{const n=i[t],r=null!=s?bb[s]:null;return null!=s&&null==r&&fp.warnOnce(`Format style [${s}] is not supported`),null!=r?r.format(n):"number"===typeof n?bb.number.format(n):n instanceof Date?bb.datetime.format(n):String(n)}))})({key:e,defaultValue:n,variables:t})??e}};var Mb=class e{constructor(t){this.enabled=!0,this.width=600,this.height=300;const{width:i,height:s,pixelRatio:n,canvasElement:r,willReadFrequently:o=!1}=t;this.pixelRatio=function(){if("undefined"===typeof navigator)return!1;const e=/\(iPhone; CPU iPhone OS (\d+_\d+_\d+) like Mac OS X\)/.exec(navigator.userAgent);if(null==e)return!1;const[t,i]=e[1].split("_").map(Number);return t<16||16===t&&i<6}()?1:n??fg("devicePixelRatio"),this.element=r??vg("canvas"),this.element.style.display="block",this.element.style.width=(i??this.width)+"px",this.element.style.height=(s??this.height)+"px",this.element.width=Math.round((i??this.width)*this.pixelRatio),this.element.height=Math.round((s??this.height)*this.pixelRatio),this.context=this.element.getContext("2d",{willReadFrequently:o}),this.onEnabledChange(),this.resize(i??0,s??0),e.debugContext(this.context)}static is(t){return t instanceof e}drawImage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e.drawImage(this.context.canvas,t,i)}toDataURL(e){return this.element.toDataURL(e)}resize(e,t){if(!(e>0&&t>0))return;const{element:i,context:s,pixelRatio:n}=this;i.width=Math.round(e*n),i.height=Math.round(t*n),s.setTransform(n,0,0,n,0,0),i.style.width=e+"px",i.style.height=t+"px",this.width=e,this.height=t}clear(){this.context.save(),this.context.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}onEnabledChange(){this.element&&(this.element.style.display=this.enabled?"":"none")}static debugContext(e){if(Ay.check("canvas")){const t=e.save.bind(e),i=e.restore.bind(e);let s=0;Object.assign(e,{save(){t(),s++},restore(){if(0===s)throw new Error("AG Charts - Unable to restore() past depth 0");i(),s--},verifyDepthZero(){if(0!==s)throw new Error(`AG Charts - Save/restore depth is non-zero: ${s}`)}})}}};op([EC((e=>e.onEnabledChange()))],Mb.prototype,"enabled",2);var Db=Mb,Ib=class e{constructor(e,t){this.canvas=e,this.markDirty=t,this.debug=Ay.create(!0,"scene"),this.layersMap=new Map,this.nextZIndex=0,this.nextLayerId=0}static sortLayers(e,t){return ly([e.zIndex,...e.zIndexSubOrder??[void 0,void 0],e.id],[t.zIndex,...t.zIndexSubOrder??[void 0,void 0],t.id],oy)}get size(){return this.layersMap.size}forEach(t){Array.from(this.layersMap.values()).sort(e.sortLayers).forEac
2h(t)}resize(e,t){this.canvas.resize(e,t),this.layersMap.forEach((i=>{let{canvas:s}=i;return s.resize(e,t)}))}addLayer(e){const{width:t,height:i,pixelRatio:s}=this.canvas,{zIndex:n=this.nextZIndex++,name:r,zIndexSubOrder:o,getComputedOpacity:a,getVisibility:l}=e,h=new Db({width:t,height:i,pixelRatio:s});return n>=this.nextZIndex&&(this.nextZIndex=n+1),this.layersMap.set(h,{id:this.nextLayerId++,name:r,canvas:h,zIndex:n,zIndexSubOrder:o,getComputedOpacity:a,getVisibility:l}),this.debug("Scene.addLayer() - layers",this.layersMap),h}removeLayer(e){this.layersMap.has(e)&&(this.layersMap.delete(e),e.destroy(),this.markDirty(),this.debug("Scene.removeLayer() -  layers",this.layersMap))}moveLayer(e,t,i){const s=this.layersMap.get(e);s&&(s.zIndex=t,s.zIndexSubOrder=i,this.markDirty(),this.debug("Scene.moveLayer() -  layers",this.layersMap))}clear(){this.layersMap.clear()}},Rb=class e{constructor(){this.offscreenCanvas="undefined"!==typeof OffscreenCanvas?new OffscreenCanvas(0,0):vg("canvas"),e.offscreenCanvasCount++;const t=this.offscreenCanvas.getContext("2d");if(null==t)throw new TypeError("AG Charts - invalid 2d context");this.renderCtx={ctx:t,devicePixelRatio:1,forceRender:!0,resized:!1,debugNodes:{}}}resize(e){let{spritePixelRatio:t,spriteWidth:i,spriteHeight:s}=e;this.offscreenCanvas.width=Math.max(i,0)*t,this.offscreenCanvas.height=Math.max(s,0)*t}renderSprite(e,t){e=hg(e);const{renderCtx:i,renderCtx:{ctx:s},offscreenCanvas:n}=this,{scale:r=1,translateX:o=0,translateY:a=0}=t??{};s.resetTransform(),s.clearRect(0,0,n.width,n.height),s.save(),s.beginPath(),s.setTransform(r,0,0,r,o,a);for(const h of e)h.preRender(),h.render(i);if(s.closePath(),s.restore(),"transferToImageBitmap"in this.offscreenCanvas)return this.offscreenCanvas.transferToImageBitmap();const l=vg("canvas");return l.style.display="block",l.style.width=n.width+"px",l.style.height=n.height+"px",l.getContext("2d")?.putImageData(s.getImageData(0,0,n.width,n.height),0,0),l}};Rb.offscreenCanvasCount=0;var Eb=Rb;function Ab(e,t,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Vg.zero;if(!Ay.check("scene:stats","scene:stats:verbose"))return;const{layersRendered:o=0,layersSkipped:a=0,nodesRendered:l=0,nodesSkipped:h=0}=s??{},c=performance.now(),{start:d,...u}=t,p=Object.entries(u).map((e=>{let[t,i]=e;return Ob(t,i)})).filter((e=>null!=e)).join(" + "),g=Object.entries(n).map((e=>{let[t,i]=e;return`${t}: ${i}`})).join(" ; "),m=Ay.check("scene:stats:verbose"),f=[`${Ob("\u23f1\ufe0f",d,c)} (${p})`,`${g}`,`Layers: ${m?Nb(o,a):e.size}; Sprites: ${Eb.offscreenCanvasCount}`,m?`Nodes: ${Nb(l,h)}`:null].filter(fm),v=new oC((e=>i.measureText(e))),y=new Map(f.map((e=>[e,v.measureLines(e)]))),C=Math.max(...Array.from(y.values(),(e=>e.width))),S=function(e,t){let i=0;for(const s of e)i+=t(s);return i}(y.values(),(e=>e.height)),w=2+r.x;i.save(),i.fillStyle="white",i.fillRect(w,0,C,S),i.fillStyle="black";let b=0;for(const[x,M]of y.entries())b+=M.height,i.fillText(x,w,b);i.restore()}var Tb=new Set,Pb=new Set(["gradient","zIndex","clipRect","cachedBBox","childNodeCounts","path","__zIndex","name","__scalingCenterX","__scalingCenterY","__rotationCenterX","__rotationCenterY","_previousDatum","__fill","__lineDash","borderPath","borderClipPath","_clipPath"]);
2function Lb(e){const{...t}=e;for(const i in t)Pb.has(i)||"number"!==typeof t[i]&&"string"!==typeof t[i]&&"boolean"!==typeof t[i]&&(Tb.add(i),delete t[i]);return t}function Fb(e,t){if(!Ay.check(!0,"scene"))return{};const{parentNode:i}=e;let s=0;return{node:"json"===t?Lb(e):e,name:e.name??e.id,dirty:zg[e.dirty],...i?.isVirtual?{virtualParentDirty:zg[i.dirty],virtualParent:i}:{},...Array.from(e.children(!1),(e=>Fb(e,t))).reduce(((e,t)=>{let{name:i}=t;const{node:{visible:n,opacity:r,zIndex:o,zIndexSubOrder:a,translationX:l,translationY:h,rotation:c,scalingX:d,scalingY:u},node:p,virtualParent:g}=t;(!n||r<=0)&&(i=`(${i})`),ZC.is(p)&&(i=`*${i}*`);const m=a?.map((e=>"function"===typeof e?`${e()} (fn)`:e)).join(" / "),f=[`${(s++).toString().padStart(3,"0")}|`,`${i??"<unknown>"}`,`z: ${o}`,m&&`zo: ${m}`,g&&"(virtual parent)",l&&`x: ${l}`,h&&`y: ${h}`,c&&`r: ${c}`,null!=d&&1!==d&&`sx: ${d}`,null!=u&&1!==u&&`sy: ${u}`].filter((e=>!!e)).join(" ");let v=f,y=1;for(;null!=e[v]&&y<100;)v=`${f} (${y++})`;return e[v]=t,e}),{})}}function kb(e){if(0===e.dirty)return{dirtyTree:{},paths:[]};const t=Array.from(e.children(),(e=>kb(e))).filter((e=>e.paths.length>0)),i=xy.is(e)?e.name??e.id:e.id,s=t.length?t.flatMap((e=>e.paths)).map((e=>`${i}.${e}`)):[i];return{dirtyTree:{name:i,node:e,dirty:zg[e.dirty],...t.map((e=>e.dirtyTree)).filter((e=>null!=e.dirty)).reduce(((e,t)=>(e[t.name??"<unknown>"]=t,e)),{})},paths:s}}function Nb(e,t){const i=e+t;return`${e} / ${i} (${Math.round(100*e/i)}%)`}function Ob(e,t,i){const s=null!=i?i-t:t;return`${e}: ${Math.round(100*s)/100}ms`}var Gb=class{constructor(e){this.debug=Ay.create(!0,"scene"),this.id=og(this),this.root=null,this.pendingSize=null,this.isDirty=!1,this.canvas=new Db(e),this.layersManager=new Ib(this.canvas,(()=>{this.isDirty=!0}))}get width(){return this.pendingSize?.[0]??this.canvas.width}get height(){return this.pendingSize?.[1]??this.canvas.height}setContainer(e){const{element:t}=this.canvas;return t.parentElement?.removeChild(t),e.appendChild(t),this}setRoot(e){return this.root===e||(this.isDirty=!0,this.root?._setLayerManager(),this.root=e,e&&(e.visible=!0,e._setLayerManager(this.layersManager))),this}attachNode(e){return this.appendChild(e),()=>this.removeChild(e)}appendChild(e){return this.root?.appendChild(e),this}removeChild(e){return this.root?.removeChild(e),this}download(e,t){Cg(this.canvas.toDataURL(t),e?.trim()??"image")}getDataURL(e){return this.canvas.toDataURL(e)}resize(e,t){return e=Math.round(e),t=Math.round(t),e>0&&t>0&&(e!==this.width||t!==this.height)&&(this.pendingSize=[e,t],this.isDirty=!0,!0)}async render(e){const{debugSplitTimes:t={start:performance.now()},extraDebugStats:i,seriesRect:s}=e??{},{canvas:n,canvas:{context:r}={},root:o,pendingSize:a}=this;if(!r)return;const l=performance.now();if(a&&(this.layersManager.resize(...a),this.pendingSize=null),o&&!o.visible)return void(this.isDirty=!1);if(o&&!this.isDirty)return this.debug.check()&&this.debug("Scene.render() - no-op",{redrawType:zg[o.dirty],tree:Fb(o,"console")}),void Ab(this.layersManager,t,r,void 0,i,s);const h={ctx:r,devicePixelRatio:this.canvas.pixelRatio??1,forceRender:!0,resized:Boolean(a),debugNodes:{}};Ay.check("scene:stats:verbose")&&(h.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0}),function(e){const t=af(fg("agChartsSceneDebug")),i=[];for(const s of t)"layout"===s?i.push("seriesRoot","legend","root",/.*Axis-\d+-axis.*/):i.push(s);e.debugNodeSearch=i}(h);let c=!1;if((!o||o.dirty>=1)&&(c=!0,n.clear()),o&&Ay.check("scene:dirtyTree")){const{dirtyTree:e,paths:t}=kb(o);Ay.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:e,paths:t})}if(o&&c){if(o.visible&&o.preRender(),this.debug.check()){const e=Fb(o,"console");this.debug("Scene.render() - before",{redrawType:zg[o.dirty],canvasCleared:c,tree:e})}o.visible&&(r.save(),o.render(h),r.restore())}if(t["\u270d\ufe0f"]=performance.now()-l,this.layersManager.size&&c){const e=performance.now();r.save(),r.resetTransform(),this.layersManager.forEach((e=>{e.canvas.enabled&&e.getVisibility()&&(r.globalAlpha=e.getComputedOpacity(),e.canvas.drawImage(r))}
2)),r.restore(),t["\u26d9"]=performance.now()-e}r.verifyDepthZero?.(),this.isDirty=!1,Ab(this.layersManager,t,r,h.stats,i,s),function(e,t){e.save();for(const[i,s]of Object.entries(t)){const t=wy.toCanvas(s);t?(e.globalAlpha=.8,e.strokeStyle="red",e.lineWidth=1,e.strokeRect(t.x,t.y,t.width,t.height),e.fillStyle="red",e.strokeStyle="white",e.font="16px sans-serif",e.textBaseline="top",e.textAlign="left",e.lineWidth=2,e.strokeText(i,t.x,t.y,t.width),e.fillText(i,t.x,t.y,t.width)):fp.log(`Scene.render() - no bbox for debugged node [${i}].`)}e.restore()}(r,h.debugNodes),o&&this.debug.check()&&this.debug("Scene.render() - after",{redrawType:zg[o.dirty],tree:Fb(o,"console"),canvasCleared:c})}toSVG(){const e=this.root?.toSVG();if(null==e)return;const t=document.createElementNS("http://www.w3.org/2000/svg","svg");if(t.setAttribute("width",String(this.width)),t.setAttribute("height",String(this.height)),null!=e.defs){const i=document.createElementNS("http://www.w3.org/2000/svg","defs");i.append(...e.defs),t.append(i)}return t.append(...e.elements),t.outerHTML}strip(){const{context:e,pixelRatio:t}=this.canvas;e.setTransform(t,0,0,t,0,0),this.layersManager.clear(),this.setRoot(null),this.isDirty=!1}destroy(){this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0})}};Gb.className="Scene";var Bb=class{constructor(){this.cache=new WeakMap}call(e){let t,i=this.cache.get(e);for(var s=arguments.length,n=new Array(s>1?s-1:0),r=1;r<s;r++)n[r-1]=arguments[r];try{t=JSON.stringify(n)}catch(o){return this.invoke(e,n,i)}return null==i&&(i=new Map,this.cache.set(e,i)),i.has(t)?i.get(t):this.invoke(e,n,i,t)}invoke(e,t,i,s){try{const n=e(...t);return i&&null!=s&&i.set(s,n),n}catch(n){return void fp.warnOnce("User callback errored, ignoring",n)}}invalidateCache(){this.cache=new WeakMap}},Vb=class extends Iw{constructor(e){super(),this.annotationRoot=e,this.mementoOriginatorKey="annotations",this.annotations=[]}createMemento(){return this.annotations}guardMemento(e){return am(e)}restoreMemento(e,t,i){this.annotations=this.cleanData(i).map((e=>Im(e,this.getAnnotationTypeStyles(e.type)))),this.listeners.dispatch("restore-annotations",{type:"restore-annotations",annotations:this.annotations})}updateData(e){this.annotations=this.cleanData(e??[])}attachNode(e){return this.annotationRoot.append(e),()=>(this.annotationRoot?.removeChild(e),this)}setAnnotationStyles(e){this.styles=e}getAnnotationTypeStyles(e){return this.styles?.[e]}cleanData(e){for(const t of e)"textAlign"in t&&delete t.textAlign;return e}},zb=class{constructor(e){this.sceneRoot=e,this.axes=new Map,this.axisGridGroup=new ZC({name:"Axes-Grids",zIndex:1}),this.axisGroup=new ZC({name:"Axes",zIndex:2}),this.sceneRoot.appendChild(this.axisGroup),this.sceneRoot.appendChild(this.axisGridGroup)}updateAxes(e,t){for(const i of e)t.includes(i)||(i.detachAxis(this.axisGroup,this.axisGridGroup),i.destroy());for(const i of t)e?.includes(i)||i.attachAxis(this.axisGroup,this.axisGridGroup);this.axes.clear();for(const i of t){const e=i.createAxisContext();this.axes.has(e.direction)?this.axes.get(e.direction)?.push(e):this.axes.set(e.direction,[e])}}getAxisContext(e){return this.axes.get(e)??[]}destroy(){this.axes.clear(),this.sceneRoot.removeChild(this.axisGroup),this.sceneRoot.removeChild(this.axisGridGroup)}},Hb=class extends Dw{constructor(e){super(),this.animationManager=e,this.dispatchOnlyLatest=!0,this.dispatchThrottle=0,this.requestThrottle=300,this.isLoadingInitialData=!1,this.isLoadingData=!1,this.freshRequests=[],this.requestCounter=0,this.debug=Ay.create(!0,"data-model","data-source"),this.throttledFetch=this.createThrottledFetch(this.requestThrottle),this.throttledDispatch=this.createThrottledDispatch(this.dispatchThrottle)}updateCallback(e){"function"===typeof e&&(this.debug("DataService - updated data source callback"),this.dataSourceCallback=e,this.isLoadingInitialData=!0,this.animationManager.skip(),this.dispatch("data-source-change"))}clearCallback(){this.dataSourceCallback=void 0}load(e){this.isLoadingData=!0,this.throttledFetch(e)}isLazy(){return null!=this.dataSourceCallback}isLoading(){return this.isLazy()&&(this.isLoadingInitialData||this.isLoadingData)}createThrottledFetch(e){return mp((e=>this.fetch(e)),e,{leading:!1,trailing:!0})}createThrottledDispatch(e){return mp(((e,t)=>{this.debug(`DataService - dispatching 'data-load' | ${e}`),this.dispatch("data-load",{type:"data-load",data:t})}),e,{leading:!0,trailing:!0})}async fetch(e){if(!this.dataSourceCallback)throw new Error("DataService - [dataSource.getData] callback not initialised");const t=performance.now(),i=this.requestCounter++;let s;this.debug(`DataService - requesting | ${i}`),this.freshRequests.push(i);try{s=await this.dataSourceCallback(e),this.debug(`DataService - response | ${performance.now()-t}ms | ${i}`)}catch(r){this.debug(`DataService - request failed | ${i}`),fp.errorOnce(`DataService - request failed | [${r}]`)}this.isLoadingInitialData=!1;const n=this.freshRequests.findIndex((e=>e===i));-1===n||this.dispatchOnlyLatest&&n!==this.freshRequests.length-1?this.debug(`DataService - discarding stale request | ${i}`):(this.freshRequests=this.freshRequests.slice(n+1),0===this.freshRequests.length&&(this.isLoadingData=!1),Array.isArray(s)?this.throttledDispatch(i,s):this.dispatch("data-error"))}};op([RC({newValue(e){this.throttledDispatch=this.createThrottledDispatch(e)}})],Hb.prototype,"dispatchThrottle",2),op([RC({newValue(e){this.throttledFetch=this.createThrottledFetch(e)}})],Hb.prototype,"requestThrottle",2);var Wb=class{constructor(e){this.maxAnimationTime=e,this.debug=Ay.create(!0,"animation"),this.controllers=new Map,this.stoppedCbs=new Set,this.currentPhase=0,this.phases=new Map(Um.map((e=>[e,[]]))),this.skipAnimations=!1,this.animationTimeConsumed=0,this.isReady=!1}get size(){return this.controllers.size}get consumedTimeMs(){return this.animationTimeConsumed}isActive(){return this.controllers.size>0}getActiveControllers(){return this.phases.get(Um[this.currentPhase])??[]}checkOverlappingId(e){null!=e&&this.controllers.has(e)&&(this.controllers.get(e).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${e}`),this.skip())}addAnimation(e){if(e.isComplete)return;if(Um.indexOf(e.phase)<this.currentPhase)return this.debug("Skipping animation due to being for an earlier phase",e.id),void e.stop();this.controllers.set(e.id,e),this.phases.get(e.phase)?.push(e)}removeAnimation(e){this.controllers.delete(e.id);const t=this.phases.get(e.phase),i=t?.indexOf(e);null!=i&&i>=0&&t?.splice(i,1)}progress(e){if(!this.isReady)return;let t=0===e?.01:e;const i=()=>{const e=Um[this.currentPhase];return{phaseControllers:[...this.getActiveControllers()],phase:e,phaseMeta:_m[e]}};let{phase:s,phaseControllers:n,phaseMeta:r}=i();const o=()=>null==Um[this.currentPhase],a=()=>{for(({phase:s,phaseControllers:n,phaseMeta:r}=i());!o()&&0===n.length;)this.currentPhase++,({phase:s,phaseControllers:n,phaseMeta:r}=i()),this.debug(`AnimationBatch - phase changing to ${s}`,{unusedTime:t},n)},l=this.controllers.size;this.debug(`AnimationBatch - ${e}ms; phase ${s} with ${n?.length} of ${l}`);do{const e=t,i=r.skipIfNoEarlierAnimations&&0===this.animationTimeConsumed;let s=0;for(const r of n)i?r.stop():t=Math.min(r.update(e),t),r.isComplete&&(s++,this.removeAnimation(r));this.animationTimeConsumed+=e-t,this.debug(`AnimationBatch - updated ${n.length} controllers; ${s} completed`),this.debug(`AnimationBatch - animationTimeConsumed: ${this.animationTimeConsumed}`),a()}while(t>0&&!o());this.animationTimeConsumed>this.maxAnimationTime&&(this.debug("Animation batch exceeded max animation time, skipping",[...this.controllers]),this.stop())}ready(){if(this.isReady)return;this.isReady=!0,this.debug(`AnimationBatch - ready; skipped: ${this.skipAnimations}`,[...this.controllers]);let e=!0;for(const[,t]of this.controllers)if(t.duration>0&&!0!==_m[t.phase].skipIfNoEarlierAnimations){e=!1;break}
2if(!e)for(const[,t]of this.controllers)t.autoplay&&t.play(!0)}skip(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!1===this.skipAnimations&&!0===e){for(const e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=e}play(){for(const e of this.controllers.values())e.play()}pause(){for(const e of this.controllers.values())e.pause()}stop(){for(const t of this.controllers.values())try{t.stop(),this.removeAnimation(t)}catch(e){fp.error("Error during animation stop",e)}this.dispatchStopped()}stopByAnimationId(e){if(null!=e&&this.controllers.has(e)){const t=this.controllers.get(e);t&&(t.stop(),this.removeAnimation(t))}}stopByAnimationGroupId(e){for(const t of this.controllers.values())t.groupId===e&&this.stopByAnimationId(t.id)}dispatchStopped(){this.stoppedCbs.forEach((e=>e())),this.stoppedCbs.clear()}isSkipped(){return this.skipAnimations}destroy(){this.stop(),this.controllers.clear()}};function jb(e){const t={...e,preventDefault(){t.sourceEvent?.preventDefault()}};return t}function Ub(e,t){e.dispatchWrapHandlers(t.type,((e,t)=>e(t)),jb(t))}var _b=["drag-start","drag","drag-end"],Kb=[..._b,"click","dblclick","contextmenu","hover","leave","enter","page-left","wheel"],$b=["blur","focus"],Yb=["keydown","keyup"],Zb=["mousemove","mouseup"],qb=["pagehide","mousemove","mouseup"],Qb=["dblclick","contextmenu","mousedown","mouseleave","mouseenter","touchstart","touchmove","touchend","touchcancel","wheel","blur","focus","keydown","keyup"];var Xb=class e extends Ew{constructor(e,t){super(),this.keyboardOptions=e,this.domManager=t,this.debug=Ay.create(!0,"interaction"),this.eventHandler=e=>this.processEvent(e),this.mouseDown=!1,this.touchDown=!1,this.clickHistory=[{offsetX:NaN,offsetY:NaN,type:"mousedown"}],this.dblclickHistory=[{offsetX:NaN,offsetY:NaN,type:"mousedown"},{offsetX:NaN,offsetY:NaN,type:"mouseup"},{offsetX:NaN,offsetY:NaN,type:"mousedown"}],this.stateQueue=34,this.rootElement=this.domManager.getShadowDocumentRoot();for(const i of Qb)i.startsWith("touch")||"wheel"===i?this.domManager.addEventListener(i,this.eventHandler,{passive:!1}):this.domManager.addEventListener(i,this.eventHandler);for(const i of qb)fg().addEventListener(i,this.eventHandler);this.containerChanged(!0),this.domManager.addListener("container-changed",(()=>this.containerChanged()))}containerChanged(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.domManager.getShadowDocumentRoot();if(e||t!==this.rootElement){for(const e of Zb)this.rootElement?.removeEventListener(e,this.eventHandler);this.rootElement=t,this.debug("[InteractionManager] Switching rootElement to:",this.rootElement);for(const e of Zb)this.rootElement?.addEventListener(e,this.eventHandler)}}destroy(){super.destroy();for(const e of qb)fg().removeEventListener(e,this.eventHandler);for(const e of Zb)this.rootElement?.removeEventListener(e,this.eventHandler);for(const e of Qb)this.domManager.removeEventListener(e,this.eventHandler);this.domManager.removeStyles("interactionManager")}pushState(e){this.stateQueue|=e}popState(e){this.stateQueue&=~e}getState(){return this.stateQueue&-this.stateQueue}processEvent(e){this.debug("Received raw event",e);let t=this.decideInteractionEventTypes(e);null==t||Array.isArray(t)||(t=[t]);for(const i of t??[])this.dispatchEvent(e,i).catch((e=>fp.errorOnce(e)))}async dispatchEvent(e,t){if(function(e){return Kb.includes(e)}(t))return void this.dispatchPointerEvent(e,t);const{relatedElement:i,targetElement:s}=this.extractElements(e);if(function(e){return $b.includes(e)}(t)){const n=e;this.dispatchTypedEvent(this.listeners,{type:t,sourceEvent:n,relatedElement:i,targetElement:s})}else if(function(e){return Yb.includes(e)}(t)){const n=e;this.dispatchTypedEvent(this.listeners,{type:t,sourceEvent:n,relatedElement:i,targetElement:s})}}dispatchTypedEvent(e,t){const i=jb(t);this.debug("Dispatching typed event",i,this.getState()),e.dispatchWrapHandlers(t.type,((e,t)=>e(t)),i)}extractElements(e){let t,i;return"relatedTarget"in e&&e.relatedTarget instanceof HTMLElement&&(t=e.relatedTarget),"target"in e&&e.target instanceof HTMLElement&&(i=e.target),{relatedElement:t,targetElement:i}}dispatchPointerEvent(e,t){const i=this.calculateCoordinates(e);if(null==i)return;const s=this.buildPointerEvent({type:t,event:e,...i});
2this.debug("Dispatching pointer event",s,this.getState()),Ub(this.listeners,s)}getEventHTMLTarget(e){return e.target instanceof HTMLElement?e.target:e.currentTarget instanceof HTMLElement?e.currentTarget:void 0}recordDown(e){e instanceof MouseEvent&&(Fm(["offsetX","offsetY"],this.clickHistory[0],e),Fm(["offsetX","offsetY"],this.dblclickHistory[2],this.dblclickHistory[0]),Fm(["offsetX","offsetY"],this.dblclickHistory[0],e)),this.dragPreStartElement=this.getEventHTMLTarget(e)}recordUp(e){return e instanceof MouseEvent&&Fm(["offsetX","offsetY"],this.dblclickHistory[1],e),this.dragPreStartElement=void 0,!!this.dragStartElement&&(this.dragStartElement=void 0,!0)}decideInteractionEventTypes(e){switch(e.type){case"blur":case"focus":case"keydown":case"keyup":return this.keyboardOptions.enabled?e.type:void 0;case"dblclick":case"contextmenu":case"wheel":return e.type;case"mousedown":if(!this.isEventOverElement(e))return;return this.mouseDown=!0,void this.recordDown(e);case"touchstart":if(!this.isEventOverElement(e))return;return this.touchDown=!0,void this.recordDown(e);case"touchmove":case"mousemove":if(!this.mouseDown&&!this.touchDown&&!this.isEventOverElement(e))return;return this.mouseDown||this.touchDown?this.dragStartElement?"drag":(this.dragStartElement=this.dragPreStartElement,this.dragPreStartElement=void 0,["drag-start","drag"]):"hover";case"mouseup":if(!this.mouseDown&&!this.isEventOverElement(e))return;return this.mouseDown=!1,this.recordUp(e)?"drag-end":"click";case"touchend":if(!this.touchDown&&!this.isEventOverElement(e))return;return this.touchDown=!1,this.recordUp(e)?"drag-end":"click";case"mouseleave":case"touchcancel":return"leave";case"mouseenter":return"enter";case"pagehide":return"page-left"}}isEventOverElement(e){return this.domManager.isEventOverElement(e)}calculateCoordinates(t){if(t instanceof MouseEvent)return this.getMouseEventCoords(t);if("undefined"!==typeof TouchEvent&&t instanceof TouchEvent){const i=t.touches[0]??t.changedTouches[0],{clientX:s,clientY:n,pageX:r,pageY:o}=i;return{...e.NULL_COORDS,clientX:s,clientY:n,pageX:r,pageY:o}}if(t instanceof PageTransitionEvent){if(t.persisted)return;return e.NULL_COORDS}}getMouseEventCoords(e){const{clientX:t,clientY:i,pageX:s,pageY:n}=e;let{offsetX:r,offsetY:o}=e;const a=this.getEventHTMLTarget(e),{x:l=0,y:h=0}=a?this.domManager.calculateCanvasPosition(a):{};if(null!=this.dragStartElement&&e.target!==this.dragStartElement){const e=this.domManager.calculateCanvasPosition(this.dragStartElement);r-=e.x-l,o-=e.y-h}else r+=l,o+=h;return{clientX:t,clientY:i,pageX:s,pageY:n,offsetX:r,offsetY:o}}isWheelEvent(e){return"wheel"===e.type}buildPointerEvent(e){const{type:t,event:i,clientX:s,clientY:n}=e;let{offsetX:r,offsetY:o,pageX:a,pageY:l}=e;if(!ym(r)||!ym(o)){const e=this.domManager.getBoundingClientRect();r=s-e.left,o=n-e.top}if(!ym(a)||!ym(l)){const e=this.rootElement?.getBoundingClientRect();a=s-(e?.left??0),l=n-(e?.top??0)}let[h,c]=[NaN,NaN];if(this.isWheelEvent(i)){const e=0===i.deltaMode?.01:1;h=i.deltaX*e,c=i.deltaY*e}let d=[];"click"===i.type?d=this.clickHistory:"dblclick"===i.type&&(d=this.dblclickHistory);const{relatedElement:u,targetElement:p}=this.extractElements(i),g={type:t,offsetX:r,offsetY:o,pageX:a,pageY:l,deltaX:h,deltaY:c,button:"button"in i?Number(i.button):0,pointerHistory:d,sourceEvent:i,relatedElement:u,targetElement:p};return this.debug("InteractionManager - builtEvent: ",g,this.getState()),g}};Xb.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0};var Jb=Xb;function ex(e){return null==e||!isNaN(e)&&e>=0&&e<=2}var tx=class{constructor(e,t){this.interactionManager=e,this.chartUpdateMutex=t,this.defaultDuration=1e3,this.batch=new Wb(1.5*this.defaultDuration),this.debug=Ay.create(!0,"animation"),this.events=new Sw,this.rafAvailable="undefined"!==typeof requestAnimationFrame,this.isPlaying=!0,this.requestId=null,this.skipAnimations=!0,this.currentAnonymousAnimationId=0}addListener(e,t){return this.events.on(e,t)}animate(e){const t=this.batch;try{t.checkOverlappingId(e.id)}catch(a){return void this.failsafeOnError(a)}let{id:i}=e;null==i&&(i=`__${this.currentAnonymousAnimationId}`,this.currentAnonymousAnimationId+=1);const s=this.isSkipped()||"none"===e.phase;s&&this.debug("AnimationManager - skipping animation");const{delay:n,duration:r}=e;if(!ex(n))throw new Error(`Animation delay of ${n} is unsupported (${i})`);
2if(!ex(r))throw new Error(`Animation duration of ${r} is unsupported (${i})`);const o=new Zm({...e,id:i,skip:s,autoplay:!!this.isPlaying&&e.autoplay,phase:e.phase,defaultDuration:this.defaultDuration});if(!this.forceTimeJump(o,this.defaultDuration))return this.batch.addAnimation(o),o}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");try{this.batch.play()}catch(e){this.failsafeOnError(e)}this.requestAnimation()}}pause(){if(this.isPlaying){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.pause()");try{this.batch.pause()}catch(e){this.failsafeOnError(e)}}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()"),this.batch.stop()}stopByAnimationId(e){try{this.batch.stopByAnimationId(e)}catch(t){this.failsafeOnError(t)}}stopByAnimationGroupId(e){try{this.batch.stopByAnimationGroupId(e)}catch(t){this.failsafeOnError(t)}}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.skipAnimations=e}isSkipped(){return!this.rafAvailable||this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}skipCurrentBatch(){this.debug.check()&&this.debug("AnimationManager - skipCurrentBatch()",{stack:(new Error).stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(e){this.requestId=fg().requestAnimationFrame(e)}forceTimeJump(e,t){return!1}requestAnimation(){if(!this.rafAvailable)return;if(!this.batch.isActive()||null!==this.requestId)return;let e;const t=async i=>{const s=async()=>{const t=i-(e??i);e=i,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.size,deltaTime:t}),this.interactionManager.pushState(2);try{this.batch.progress(t)}catch(s){this.failsafeOnError(s)}this.events.emit("animation-frame",{type:"animation-frame",deltaMs:t})};this.isSkippingFrames()?await this.chartUpdateMutex.acquireImmediately(s):await this.chartUpdateMutex.acquire(s),this.batch.isActive()?this.scheduleAnimationFrame(t):(this.batch.stop(),this.events.emit("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}))};this.events.emit("animation-start",{type:"animation-start",deltaMs:0}),this.scheduleAnimationFrame(t)}cancelAnimation(){null!==this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];fp.error("Error during animation, skipping animations",e),t&&this.cancelAnimation()}startBatch(e){this.debug(`AnimationManager - startBatch() with skipAnimations=${e}.`),this.reset(),this.batch.destroy(),this.batch=new Wb(1.5*this.defaultDuration),!0===e&&this.batch.skip()}endBatch(){this.batch.isActive()?(this.batch.ready(),this.requestAnimation()):(this.interactionManager.popState(2),this.batch.isSkipped()&&this.batch.skip(!1))}onBatchStop(e){this.batch.stoppedCbs.add(e)}destroy(){this.stop(),this.events.clear()}},ix=class extends Iw{legendItemClick(e,t,i,s){const n={type:"legend-item-click",series:e,itemId:t,enabled:i,legendItemName:s};this.listeners.dispatch("legend-item-click",n)}legendItemDoubleClick(e,t,i,s,n){const r={type:"legend-item-double-click",series:e,itemId:t,enabled:i,legendItemName:n,numVisibleItems:s};this.listeners.dispatch("legend-item-double-click",r)}axisHover(e,t){const i={type:"axis-hover",axisId:e,direction:t};this.listeners.dispatch("axis-hover",i)}},sx=class e{constructor(e){this.defaultActions=[],this.disabledActions=new Set,this.hiddenActions=new Set,this.listeners=new Dw;const{Default:t,ContextMenu:i}=Rw;this.destroyFns=[e.listenAll("contextmenu",(e=>this.onContextMenu(e)),t|i)]}destroy(){this.destroyFns.forEach((e=>e()))}onContextMenu(t){"all"===e.toContextType(t.region)&&this.dispatchContext("all",t,{})}static toContextType(e){return"legend"===e||"series"===e?e:"all"}static check(e,t){return t.type===e}static checkCallback(e,t,i){return e===t}dispatchContext(e,t,i,s){const{sourceEvent:n}=t,r=s?.x??t.offsetX,o=s?.y??t.offsetY;n.stopPropagation(),this.listeners.dispatch("",jb({type:e,x:r,y:o,context:i,sourceEvent:n}))}addListener(e){return this.listeners.addListener("",e)}
2filterActions(e){return this.defaultActions.filter((t=>t.id&&!this.hiddenActions.has(t.id)&&["all",e].includes(t.type)))}registerDefaultAction(e){const t=null!=e.id&&!this.defaultActions.some((t=>{let{id:i}=t;return i===e.id}));return t&&this.defaultActions.push(e),()=>{const i=t?this.defaultActions.findIndex((t=>{let{id:i}=t;return i===e.id})):-1;-1!==i&&this.defaultActions.splice(i,1)}}enableAction(e){this.disabledActions.delete(e)}disableAction(e){this.disabledActions.add(e)}showAction(e){this.hiddenActions.add(e)}hideAction(e){this.hiddenActions.delete(e)}isDisabled(e){return this.disabledActions.has(e)}},nx=class extends Map{constructor(e,t){super(),this.defaultValue=e,this.defaultState=t}set(e,t){return this.delete(e),"undefined"!==typeof t&&super.set(e,t),this}stateId(){return Array.from(this.keys()).pop()??this.defaultState}stateValue(){return Array.from(this.values()).pop()??this.defaultValue}},rx=(e=>(e.Auto="auto",e.Default="default",e.Grab="grab",e.Grabbing="grabbing",e.Move="move",e.NotAllowed="not-allowed",e.Pointer="pointer",e.EWResize="ew-resize",e.NSResize="ns-resize",e.ZoomIn="zoom-in",e.ZoomOut="zoom-out",e))(rx||{}),ox=class{constructor(e){this.domManager=e,this.stateTracker=new nx("default")}updateCursor(e,t){this.stateTracker.set(e,t),this.domManager.updateCursor(this.stateTracker.stateValue())}getCursor(){return this.domManager.getCursor()}};function ax(e,t){return Math.sqrt(function(e,t){const i=e.screenX-t.screenX,s=e.screenY-t.screenY;return i*i+s*s}(e,t))}var lx=class extends Iw{constructor(e){super(),this.domManager=e,this.touchstart=e=>this.onTouchStart(e),this.touchmove=e=>this.onTouchMove(e),this.touchend=e=>this.onTouchEnd(e),this.touchcancel=e=>this.onTouchCancel(e),this.pinch={finger1:{identifier:NaN,screenX:NaN,screenY:NaN},finger2:{identifier:NaN,screenX:NaN,screenY:NaN},origin:{x:NaN,y:NaN},distance:NaN,status:0},this.domManager.addEventListener("touchstart",this.touchstart,{passive:!0}),this.domManager.addEventListener("touchmove",this.touchmove,{passive:!1}),this.domManager.addEventListener("touchend",this.touchend),this.domManager.addEventListener("touchcancel",this.touchcancel)}destroy(){this.domManager.removeEventListener("touchstart",this.touchstart),this.domManager.removeEventListener("touchmove",this.touchmove),this.domManager.removeEventListener("touchend",this.touchend),this.domManager.removeEventListener("touchcancel",this.touchcancel)}findPinchTouches(e){const{touches:t}=e,{finger1:i,finger2:s}=this.pinch;if(0!==this.pinch.status&&2===t.length){if(t[0].identifier===i.identifier&&t[1].identifier===s.identifier)return[t[0],t[1]];if(t[0].identifier===s.identifier&&t[1].identifier===i.identifier)return[t[1],t[0]]}}copyTouchData(e){const t=["identifier","screenX","screenY"];Fm(t,this.pinch.finger1,e.touches[0]),Fm(t,this.pinch.finger2,e.touches[1]),this.pinch.distance=ax(this.pinch.finger1,this.pinch.finger2)}
2dispatchPinchEvent(e,t,i){const{finger1:s,finger2:n,origin:r}=this.pinch;this.listeners.dispatch(e,jb({sourceEvent:i,type:e,finger1:s,finger2:n,deltaDistance:t,origin:r}))}onTouchStart(e){this.stopPinchTracking(e);const{pinch:t}=this;2===e.touches.length&&(t.status=1,this.copyTouchData(e),t.origin.x=(e.touches[0].clientX+e.touches[1].clientX)/2,t.origin.y=(e.touches[0].clientY+e.touches[1].clientY)/2)}onTouchMove(e){const t=this.findPinchTouches(e);if(void 0!==t){const[i,s]=t,{pinch:n}=this,r=ax(i,s),o=r-n.distance;1===n.status?Math.abs(o)>1&&(n.status=2,this.copyTouchData(e),this.dispatchPinchEvent("pinch-start",0,e)):2===n.status?(n.distance=r,this.copyTouchData(e),this.dispatchPinchEvent("pinch-move",o,e)):fp.error(`unexpected pinch.status: ${n.status}`)}}onTouchEnd(e){this.stopPinchTracking(e)}onTouchCancel(e){this.stopPinchTracking(e)}stopPinchTracking(e){const{pinch:t}=this;2===t.status&&this.dispatchPinchEvent("pinch-end",0,e),this.pinch.status=0}},hx=class extends Iw{constructor(){super(...arguments),this.highlightStates=new nx}updateHighlight(e,t){const{activeHighlight:i}=this;this.highlightStates.set(e,t),this.activeHighlight=this.highlightStates.stateValue(),this.isEqual(this.activeHighlight,i)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:i,callerId:e})}getActiveHighlight(){return this.activeHighlight}isEqual(e,t){return e===t||null!=e&&null!=t&&e?.series===t?.series&&e?.itemId===t?.itemId&&e?.datum===t?.datum}},cx=class extends Ew{constructor(e,t,i){super(),this.focusIndicator=e,this.interactionManager=t,this.previousInputDevice="keyboard";this.destroyFns.push(t.addListener("click",(()=>this.onClick()),41),t.addListener("hover",(()=>this.onMouse()),41),t.addListener("drag-start",(()=>this.onMouse()),41),t.addListener("blur",(e=>this.onBlur(e)),63),t.addListener("focus",(e=>this.onFocus(e)),63),t.addListener("keydown",(e=>this.onKeyDown(e)),63)),this.focusIndicator.overrideFocusVisible("integrated"!==i&&void 0)}getState(){return this.interactionManager.getState()}destroy(){super.destroy()}onClick(){this.focusIndicator.overrideFocusVisible(!1),this.previousInputDevice="mouse"}onMouse(){this.previousInputDevice="mouse"}onBlur(e){this.focusIndicator.overrideFocusVisible(void 0),this.dispatch("blur",0,e)}onFocus(e){this.dispatch("focus",0,e)}onKeyDown(e){const t=this.getState(),{key:i,code:s,altKey:n,shiftKey:r,metaKey:o,ctrlKey:a}=e.sourceEvent;if(a||o){if("y"===i||"z"===i&&r)return this.focusIndicator.overrideFocusVisible("keyboard"===this.previousInputDevice),this.dispatch("redo",0,e);if("z"===i)return this.focusIndicator.overrideFocusVisible("keyboard"===this.previousInputDevice),this.dispatch("undo",0,e)}if(9&t)this.focusIndicator.overrideFocusVisible(!1);else{switch(i){case"+":return this.dispatch("nav-zoom",1,e);case"-":return this.dispatch("nav-zoom",-1,e)}if(!(n||r||o||a))switch(this.focusIndicator.overrideFocusVisible(!0),s){case"ArrowDown":return this.dispatch("nav-vert",1,e);case"ArrowUp":return this.dispatch("nav-vert",-1,e);case"ArrowLeft":return this.dispatch("nav-hori",-1,e);case"ArrowRight":return this.dispatch("nav-hori",1,e);case"ZoomIn":case"Add":return this.dispatch("nav-zoom",1,e);case"ZoomOut":case"Substract":return this.dispatch("nav-zoom",-1,e);case"Space":case"Enter":return this.dispatch("submit",0,e)}}}dispatch(e,t,i){const{previousInputDevice:s}=this;Ub(this.listeners,{type:e,delta:t,sourceEvent:i,previousInputDevice:s});"keydown"!==i.type||["redo","undo","nav-zoom"].includes(e)||(this.previousInputDevice="keyboard")}},dx=(e=>(e.NAVIGATOR="navigator",e.ROOT="root",e.SERIES="series",e.HORIZONTAL_AXES="horizontal-axes",e.VERTICAL_AXES="vertical-axes",e))(dx||{}),ux=class{constructor(e,t){this.node=e,this.overrideId=t}get id(){return this.overrideId??this.node.id}get visible(){return this.node.visible}toCanvasBBox(){return wy.toCanvas(this.node)}fromCanvasPoint(e,t){return wy.fromCanvasPoint(this.node,e,t)}},px=class extends ux{constructor(e,t,i){super(e,i),this.bboxFn=t}toCanvasBBox(){return this.bboxFn()}},gx=class extends Dw{};function mx(e,t,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:32;return e?.addListener(i,(e=>{t.getState()&n&&s(e)}))??(()=>{})}function fx(e){return e instanceof _g?new ux(e):e instanceof ux?e:new ux(e.node,e.id)}function vx(e){const{type:t,sourceEvent:i}=e,{id:s,className:n,classList:r,ariaHidden:o}=i?.target??{};if(!(r instanceof DOMTokenList))return"leave";const a=_b;return r.contains("ag-charts-annotations__axis-button-icon")&&!a.includes(t)||"ag-charts-series-area"===n||"ag-charts-canvas-proxy"===n||"ag-charts-proxy-elem"===n&&!s?.toString().startsWith("ag-charts-legend-item-")||i?.target instanceof HTMLCanvasElement?"none":function(e){if(null==e||!(e instanceof HTMLElement))return;let t=e;for(;null!=t&&!t?.classList.contains("ag-charts-wrapper");){if(t.classList.contains("ag-chart-tooltip"))return t;t=t.parentElement}}(i.target)&&"true"!==o?"wait":"leave"}var yx=class{constructor(e){this.interactionManager=e,this.debug=Ay.create(!0,"region"),this.isDragging=!1,this.leftCanvas=!1,this.regions=new Map,this.destroyFns=[],this.allRegionsListeners=new gx,this.destroyFns.push(...Kb.map((t=>e.addListener(t,this.processPointerEvent.bind(this),63))))}destroy(){this.destroyFns.forEach((e=>e())),this.current=void 0;for(const e of this.regions.values())e.listeners.destroy();this.regions.clear()}addRegion(e){if(this.regions.has(e))throw new Error(`AG Charts - Region: ${e} already exists`);for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];const n={properties:{name:e,bboxproviders:i.map(fx)},listeners:new gx};return this.regions.set(e,n),this.makeObserver(n)}updateRegion(e){const t=this.regions.get(e);if(!t)throw new Error("AG Charts - unknown region: "+e);for(var i=arguments.length,s=new Array(i>1?i-1:0),n=1;n<i;n++)s[n-1]=arguments[n];t.properties.bboxproviders=s.map(fx)}getRegion(e){return this.makeObserver(this.regions.get(e))}listenAll(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:32;return mx(this.allRegionsListeners,this.interactionManager,e,t,i)}makeObserver(e){const{interactionManager:t}=this;return new class{addListener(i,s){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:32;return mx(e?.listeners,t,i,s,n)}}}checkPointerHistory(e,t){for(const i of t.pointerHistory){const{region:t}=this.pickRegion(i.offsetX,i.offsetY)??{};if(e.properties.name!==t?.properties.name)return!1}return!0}
2dispatch(e,t){if(null==e)return;const i=e.region.properties.bboxproviders[0];let s=0,n=0;if("offsetX"in t&&"offsetY"in t)({x:s,y:n}=i.fromCanvasPoint(t.offsetX,t.offsetY));else{const e=i.toCanvasBBox();s=e.width/2,n=e.height/2}const r=jb({...t,region:e.region.properties.name,bboxProviderId:e.bboxProvider?.id,regionOffsetX:s,regionOffsetY:n});this.debug("Dispatching region event: ",r),this.allRegionsListeners.dispatch(r.type,r),e.region.listeners.dispatch(r.type,r)}handleDragging(e){const{current:t}=this;switch(e.type){case"drag-start":this.isDragging=!0,this.leftCanvas=!1;break;case"leave":return this.leftCanvas=!0,this.isDragging;case"enter":return this.leftCanvas=!1,this.isDragging;case"drag":if(this.isDragging)return this.dispatch(t,e),!0;break;case"drag-end":if(this.isDragging)return this.isDragging=!1,this.dispatch(t,e),this.leftCanvas&&this.dispatch(t,{...e,type:"leave"}),!0}return!1}processPointerEvent(e){if(this.handleDragging(e))return;const{current:t}=this;let i;switch(vx(e)){case"wait":return;case"none":i=this.pickRegion(e.offsetX,e.offsetY);break;case"leave":i=void 0}const s=i?.region;void 0!==t&&s?.properties.name!==t.region.properties.name&&this.dispatch(t,{...e,type:"leave"}),void 0!==s&&s.properties.name!==t?.region.properties.name&&this.dispatch(i,{...e,type:"enter"}),void 0!==s&&this.checkPointerHistory(s,e)&&this.dispatch(i,e),this.current=i}pickRegion(e,t){let i,s,n=1/0;for(const r of this.regions.values())for(const o of r.properties.bboxproviders){if(!1===o.visible)continue;const a=o.toCanvasBBox(),l=a.width*a.height;l<n&&a.containsPoint(e,t)&&(n=l,i=r,s=o)}return i?{region:i,bboxProvider:s}:void 0}},Cx=["start","center","end"],Sx=["seriesType","annotations","annotationOptions","ranges","zoom"],wx={seriesType:0,annotations:1,annotationOptions:2,ranges:3,zoom:4},bx=(e=>(e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom",e.Floating="floating",e.FloatingTop="floating-top",e.FloatingBottom="floating-bottom",e))(bx||{}),xx=Object.values(bx);function Mx(e){return["floating-top","floating-bottom"].includes(e)}var Dx=class extends Iw{static isGroup(e,t){return t.group===e}static isChildElement(e,t){for(const i of xx)if(e.isManagedChildDOMElement(t,"canvas-overlay",`toolbar-${i}`))return!0;return!1}pressButton(e,t,i,s,n){this.listeners.dispatch("button-pressed",{type:"button-pressed",group:e,id:t,value:i,rect:s,sourceEvent:n})}cancel(e){this.listeners.dispatch("cancelled",{type:"cancelled",group:e})}toggleButton(e,t,i){const{active:s=!1,enabled:n=!0,visible:r=!0,checked:o=!1}=i;this.listeners.dispatch("button-toggled",{type:"button-toggled",group:e,id:t,active:s,enabled:n,visible:r,checked:o})}updateButton(e,t,i){this.listeners.dispatch("button-updated",{type:"button-updated",group:e,id:t,...i})}toggleGroup(e,t,i){const{active:s,visible:n}=i;this.listeners.dispatch("group-toggled",{type:"group-toggled",caller:e,group:t,active:s,visible:n})}updateGroup(e){this.listeners.dispatch("group-updated",{type:"group-updated",group:e})}groupMoved(e){this.listeners.dispatch("group-moved",{type:"group-moved",group:e})}changeFloatingAnchor(e,t){this.listeners.dispatch("floating-anchor-changed",{type:"floating-anchor-changed",group:e,anchor:t})}buttonMoved(e,t,i,s){this.listeners.dispatch("button-moved",{type:"button-moved",group:e,value:t,rect:i,groupRect:s})}proxyGroupOptions(e,t,i){this.listeners.dispatch("proxy-group-options",{type:"proxy-group-options",caller:e,group:t,options:i})}},Ix=class{constructor(e,t){this.domManager=e,this.tooltip=t,this.stateTracker=new nx,this.suppressState=new nx(!1),this.appliedState=null,t.setup(e),e.addListener("hidden",(()=>this.tooltip.toggle(!1)))}updateTooltip(e,t,i){this.tooltip.enabled&&(i??(i=this.stateTracker.get(e)?.content),this.stateTracker.set(e,{content:i,meta:t}),this.applyStates())}removeTooltip(e){this.tooltip.enabled&&(this.stateTracker.delete(e),this.applyStates())}suppressTooltip(e){this.suppressState.set(e,!0)}unsuppressTooltip(e){this.suppressState.delete(e)}getTooltipMeta(e){return this.stateTracker.get(e)?.meta}destroy(){this.domManager.removeStyles("tooltip")}applyStates(){const e=this.stateTracker.stateId(),t=e?this.stateTracker.get(e):null;if(this.suppressState.stateValue()||null==t?.meta||null==t?.content)return this.appliedState=null,void this.tooltip.toggle(!1);const i=this.domManager.getBoundingClientRect(),s="extended"===this.tooltip.bounds?this.domManager.getOverlayClientRect():i;if(this.appliedState?.content===t?.content){const e=this.tooltip.isVisible();this.tooltip.show(s,i,t?.meta,null,e)}else this.tooltip.show(s,i,t?.meta,t?.content);this.appliedState=t}static makeTooltipMeta(e,t){const{offsetX:i,offsetY:s}=e,n=t.series.properties.tooltip,r={offsetX:i,offsetY:s,enableInteraction:n.interaction?.enabled??!1,lastPointerEvent:{type:e.type,offsetX:i,offsetY:s},showArrow:n.showArrow,position:{type:n.position.type,xOffset:n.position.xOffset,yOffset:n.position.yOffset}},o=t.yBar?.upperPoint??t.midPoint??t.series.datumMidPoint?.(t);if(("node"===n.position.type||"sparkline"===n.position.type)&&o){const{x:e,y:i}=o,s=wy.toCanvasPoint(t.series.contentGroup,e,i);return{...r,offsetX:Math.round(s.x),offsetY:Math.round(s.y)}}return r}},Rx=class extends Iw{constructor(){super(...arguments),this.mementoOriginatorKey="zoom",this.axisZoomManagers=new Map,this.state=new nx(void 0,"initial"),this.rejectCallbacks=new Map}addLayoutListeners(e){this.destroyFns.push(e.addListener("layout:complete",(e=>{this.axes=e.axes})))}createMemento(){const e=this.getDefinedZoom();return{rangeX:this.getRangeDirection(e,"x"),rangeY:this.getRangeDirection(e,"y"),ratioX:{start:e.x.min,end:e.x.max},ratioY:{start:e.y.min,end:e.y.max}}}guardMemento(e){return pm(e)&&(null!=e.ratioX||null!=e.ratioY||null!=e.rangeX||null!=e.rangeY)}restoreMemento(e,t,i){this.listeners.dispatch("restore-zoom",{...i,type:"restore-zoom"})}updateAxes(e){const t=new Map(e.map((e=>[e.id,this.axisZoomManagers.get(e.id)])));this.axisZoomManagers.clear();for(const i of e)this.axisZoomManagers.set(i.id,t.get(i.id)??new Ex(i));this.state.size>0&&e.length>0&&this.updateZoom(this.state.stateId(),this.state.stateValue())}updateZoom(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=arguments.length>3?arguments[3]:void 0;if(s&&this.rejectCallbacks.set(e,s),0!==this.axisZoomManagers.size)this.state.set(e,t),this.axisZoomManagers.forEac
2h((i=>{i.updateZoom(e,t?.[i.getDirection()])})),this.applyChanges(e);else{const n=this.state.stateId();"initial"===n||n===e||i?(this.state.set(e,t),n!==e&&this.rejectCallbacks.get(n)?.(e)):s?.(n)}}updateAxisZoom(e,t,i){this.axisZoomManagers.get(t)?.updateZoom(e,i),this.applyChanges(e)}fireZoomPanStartEvent(e){this.listeners.dispatch("zoom-pan-start",{type:"zoom-pan-start",callerId:e})}getZoom(){let e,t;if(this.axisZoomManagers.forEach((i=>{"x"===i.getDirection()?e??(e=i.getZoom()):"y"===i.getDirection()&&(t??(t=i.getZoom()))})),e||t)return{x:e,y:t}}getAxisZoom(e){return this.axisZoomManagers.get(e)?.getZoom()??{min:0,max:1}}getAxisZooms(){const e={};for(const[t,i]of this.axisZoomManagers.entries())e[t]={direction:i.getDirection(),zoom:i.getZoom()};return e}applyChanges(e){if(!Array.from(this.axisZoomManagers.values(),(e=>e.applyChanges())).some(Boolean))return;const t={};for(const[i,s]of this.axisZoomManagers.entries())t[i]=s.getZoom();this.listeners.dispatch("zoom-change",{type:"zoom-change",...this.getZoom(),axes:t,callerId:e})}getRangeDirection(e,t){for(const i of this.axes??[]){if(i.direction!==t)continue;const s=i.scale.getDomain?.(),n=i.scale.convert?.(s?.at(0)),r=i.scale.convert?.(s?.at(-1));if(!ym(n)||!ym(r))return;let o,a;if(n<=r){const s=r-n;o=i.scale.invert?.(0),a=i.scale.invert?.(n+s*e[t].max)}else{const s=n-r;o=i.scale.invert?.(n-s*e[t].min),a=i.scale.invert?.(0)}return{start:o,end:a}}}getDefinedZoom(){const e=this.getZoom();return{x:{min:e?.x?.min??0,max:e?.x?.max??1},y:{min:e?.y?.min??0,max:e?.y?.max??1}}}},Ex=class{constructor(e){this.axis=e;const[t=0,i=1]=e.visibleRange;this.state=new nx({min:t,max:i}),this.currentZoom=this.state.stateValue()}getDirection(){return this.axis.direction}updateZoom(e,t){this.state.set(e,t)}getZoom(){return yC(this.state.stateValue())}applyChanges(){const e=this.currentZoom;return this.currentZoom=this.state.stateValue(),e.min!==this.currentZoom.min||e.max!==this.currentZoom.max}},Ax=class{constructor(){this.groups={}}registerSeries(e){let{internalId:t,seriesGrouping:i,visible:s,type:n}=e;var r;i&&((r=this.groups)[n]??(r[n]={}),this.groups[n][t]={grouping:i,visible:s})}updateSeries(e){let{internalId:t,seriesGrouping:i,visible:s,type:n}=e;if(!i)return;const r=this.groups[n]?.[t];r&&(r.grouping=i,r.visible=s)}deregisterSeries(e){let{internalId:t,type:i}=e;this.groups[i]&&delete this.groups[i][t],this.groups[i]&&0===Object.keys(this.groups[i]).length&&delete this.groups[i]}getVisiblePeerGroupIndex(e){let{type:t,seriesGrouping:i,visible:s}=e;if(!i)return{visibleGroupCount:s?1:0,visibleSameStackCount:s?1:0,index:0};const n=new Set,r=new Set;for(const a of Object.values(this.groups[t]??{}))a.visible&&(n.add(a.grouping.groupIndex),a.grouping.groupIndex===i.groupIndex&&r.add(a.grouping.stackIndex));const o=Array.from(n);return o.sort(((e,t)=>e-t)),{visibleGroupCount:o.length,visibleSameStackCount:r.size,index:o.indexOf(i.groupIndex)}}},Tx=(e=>(e[e.FULL=0]="FULL",e[e.UPDATE_DATA=1]="UPDATE_DATA",e[e.PROCESS_DATA=2]="PROCESS_DATA",e[e.PERFORM_LAYOUT=3]="PERFORM_LAYOUT",e[e.SERIES_UPDATE=4]="SERIES_UPDATE",e[e.PRE_SCENE_RENDER=5]="PRE_SCENE_RENDER",e[e.SCENE_RENDER=6]="SCENE_RENDER",e[e.NONE=7]="NONE",e))(Tx||{}),Px=class extends Dw{constructor(e){super(),this.updateCallback=e}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;this.updateCallback(e,t)}dispatchUpdateComplete(e){this.dispatch("update-complete",{type:"update-complete",minRect:e?.minRect,minVisibleRect:e?.minVisibleRect})}dispatchPreDomUpdate(){this.dispatch("pre-dom-update",{type:"pre-dom-update"})}dispatchPreSceneRender(e){this.dispatch("pre-scene-render",{type:"pre-scene-render",...e})}},Lx=class{constructor(e,t){this.callbackCache=new Bb,this.chartEventManager=new ix,this.highlightManager=new hx,this.layoutManager=new bw,this.localeManager=new xb,this.seriesStateManager=new Ax,this.stateManager=new kw,this.toolbarManager=new Dx,this.zoomManager=new Rx;const{scene:i,root:s,syncManager:n,container:r,updateCallback:o,updateMutex:a,pixelRatio:l,styleContainer:h}=t;this.chartService=e,this.syncManager=n,this.domManager=new tb(r,h);const c=this.domManager.addChild("canvas","scene-canvas",i?.canvas.element);this.scene=i??new Gb({pixelRatio:l,canvasElement:c}),this.scene.setRoot(s),this.axisManager=new zb(s),this.annotationManager=new Vb(e.annotationRoot),this.cursorManager=new ox(this.domManager),this.interactionManager=new Jb(e.keyboard,this.domManager),this.focusIndicator=new fb(this.domManager),this.keyNavManager=new cx(this.focusIndicator,this.interactionManager,e.mode),this.regionManager=new yx(this.interactionManager),this.contextMenuRegistry=new sx(this.regionManager),this.gestureDetector=new lx(this.domManager),this.updateService=new Px(o),this.proxyInteractionService=new Sb(this.localeManager,this.domManager),this.historyManager=new Lw(this.keyNavManager),this.animationManager=new tx(this.interactionManager,a),this.dataService=new Hb(this.animationManager),this.tooltipManager=new Ix(this.domManager,e.tooltip),this.zoomManager.addLayoutListeners(this.layoutManager)}destroy(){this.animationManager.destroy(),this.highlightManager.destroy(),this.axisManager.destroy(),this.callbackCache.invalidateCache(),this.chartEventManager.destroy(),this.contextMenuRegistry.destroy(),this.domManager.destroy(),this.highlightManager.destroy(),this.interactionManager.destroy(),this.keyNavManager.destroy(),this.focusIndicator.de
2stroy(),this.proxyInteractionService.destroy(),this.regionManager.destroy(),this.syncManager.destroy(),this.tooltipManager.destroy(),this.zoomManager.destroy()}},Fx=class extends Df{constructor(){super(...arguments),this.range="tooltip"}};op([Ef(Sv(["tooltip","node"],"a range"))],Fx.prototype,"range",2);var kx=class e{constructor(){this.domain=new Set}static is(t){return t instanceof e}extend(e){this.domain.add(e)}getDomain(){return Array.from(this.domain)}},Nx=class e{constructor(){this.domain=[1/0,-1/0]}static is(t){return t instanceof e}static extendDomain(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[1/0,-1/0];for(const i of e)"number"===typeof i&&(t[0]>i&&(t[0]=i),t[1]<i&&(t[1]=i));return t}extend(e){this.domain[0]>e&&(this.domain[0]=e),this.domain[1]<e&&(this.domain[1]=e)}getDomain(){return[...this.domain]}};function Ox(e){return e.map((e=>pm(e)?JSON.stringify(e):e)).join("-")}function Gx(e){const t=1e4;return Number.isInteger(e)?e:Math.abs(e)>t?Math.trunc(e):Math.round(e*t)/t}function Bx(e){if(null==e)return[];const[t,i]=e.map(Number);return 0===t&&0===i?[0,1]:ym(t)&&ym(i)?[t,i]:[]}function Vx(e,t){return t?.get(e.id)??0}var zx=Symbol("invalid");function Hx(e){const t=[];let i,s=0;const n=/((?:(?:^|\.)\s*\w+|\[\s*(?:'(?:[^']|\\')*'|"(?:[^"]|\\")*"|-?\d+)\s*\])\s*)/g;for(;i=n.exec(e);){if(i.index!==s)return;s=i.index+i[0].length;const e=i[1].trim();if(e.startsWith("."))t.push(e.slice(1).trim());else if(e.startsWith("[")){const i=e.slice(1,-1).trim();i.startsWith("'")?t.push(i.slice(1,-1).replace(/\\'/g,"'")):i.startsWith('"')?t.push(i.slice(1,-1).replace(/\\"/g,'"')):t.push(i)}else t.push(e)}if(s===e.length)return t}function Wx(e){return t=>{let i=t;for(const s of e)i=i[s];return i}}var jx=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"standalone";this.opts=e,this.mode=t,this.debug=Ay.create(!0,"data-model"),this.scopeCache=new Map,this.keys=[],this.values=[],this.aggregates=[],this.groupProcessors=[],this.propertyProcessors=[],this.reducers=[],this.processors=[];let i=!0;for(const n of e.props){if("key"===n.type&&!i)throw new Error("AG Charts - internal config error: keys must come before values.");"value"===n.type&&i&&(i=!1)}const s=e=>{let{matchGroupIds:t=[]}=e;for(const i of t)if(this.values.every((e=>e.groupId!==i)))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${i}).`)};for(const n of e.props)switch(n.type){case"key":this.keys.push({...n,index:this.keys.length,missing:new Map});break;case"value":if(null==n.property)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(n)}`);this.values.push({...n,index:this.values.length,missing:new Map});break;case"aggregate":s(n),this.aggregates.push({...n,index:this.aggregates.length});break;case"group-value-processor":s(n),this.groupProcessors.push({...n,index:this.groupProcessors.length});break;case"property-value-processor":this.propertyProcessors.push({...n,index:this.propertyProcessors.length});break;case"reducer":this.reducers.push({...n,index:this.reducers.length});break;case"processor":this.processors.push({...n,index:this.processors.length})}}resolveProcessedDataDefById(e,t){const i=this.scopeCache.get(e.id)?.get(t);if(!i)throw new Error(`AG Charts - didn't find property definition for [${t}, ${e.id}]`);return{index:i.index,def:i}}resolveProcessedDataIndexById(e,t){return this.resolveProcessedDataDefById(e,t).index}resolveProcessedDataDefsByIds(e,t){return t.map((t=>[t,this.resolveProcessedDataDefById(e,t)]))}resolveProcessedDataDefsValues(e,t){let{keys:i,values:s}=t;const n={};for(const[r,{index:o,def:a}]of e){const e="key"===a.type?i:s;n[r]=e[o]}return n}getDomain(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",s=arguments.length>3?arguments[3]:void 0;const n=this.getDomainsByType(i,s);return n?.[this.resolveProcessedDataIndexById(e,t)]??[]}getDomainsByType(e,t){switch(e){case"key":return t.domain.keys;case"value":return t.domain.values;case"aggregate":return t.domain.aggValues;case"group-value-processor":return t.domain.groups;default:return null}}
2processData(e,t){const{opts:{groupByKeys:i,groupByFn:s},aggregates:n,groupProcessors:r,reducers:o,processors:a,propertyProcessors:l}=this,h=performance.now();if(i&&0===this.keys.length)return;let c=this.extractData(e,t);if(i?c=this.groupData(c):s&&(c=this.groupData(c,s(c))),r.length>0&&this.postProcessGroups(c),n.length>0&&this.aggregateData(c),l.length>0&&this.postProcessProperties(c),o.length>0&&this.reduceData(c),a.length>0&&this.postProcessData(c),e.length>0)for(const u of lg(this.keys,this.values))for(const[t,i]of u.missing)if(i>=e.length){const e=null==t?"":` for ${t}`;fp.warnOnce(`the key '${u.property}' was not found in any data element${e}.`)}const d=performance.now();c.time=d-h,this.debug.check()&&function(e){const t=(e,t)=>{t.length>0&&(fp.log(`DataModel.processData() - ${e}`),fp.table(t))};if(fp.log("DataModel.processData() - processedData",e),t("Key Domains",e.domain.keys),t("Group Domains",e.domain.groups??[]),t("Value Domains",e.domain.values),t("Aggregate Domains",e.domain.aggValues??[]),"grouped"===e.type){t("Values",e.data.reduce(((e,t)=>{const i=t.keys??[],s=t.aggValues??[],n=t.keys.map((()=>{})),r=s?.map((()=>{}));return e.push(...t.values.map(((e,t)=>[...0===t?i:n,...e??[],...0==t?s:r]))),e}),[]))}else{t("Values",e.data.reduce(((e,t)=>{const i=t.aggValues??[];return e.push([...t.keys,...t.values,...i]),e}),[]))}}(c),this.scopeCache.clear();for(const u of lg(this.keys,this.values,this.aggregates))if(u.idsMap)for(const[e,t]of u.idsMap)for(const i of t)if(this.scopeCache.has(e)){if(this.scopeCache.get(e)?.has(i))throw new Error("duplicate definition ids on the same scope are not allowed.");this.scopeCache.get(e).set(i,u)}else this.scopeCache.set(e,new Map([[i,u]]));return c}valueGroupIdxLookup(e){let{matchGroupIds:t}=e;const i=[];for(const[s,n]of this.values.entries())(!t||n.groupId&&t.includes(n.groupId))&&i.push(s);return i}valueIdxLookup(e,t){const i=null==e||0===e.length,s="string"===typeof t?t:t.id,n=this.values.findIndex((t=>(null==t.scopes||i&&!t.scopes.length||t.scopes.some((t=>e?.includes(t))))&&(t.property===s||t.id===s||(t=>{if(t.idsMap)for(const[i,n]of t.idsMap)if(e?.includes(i)&&n.has(s))return!0;return!1})(t))));if(-1===n)throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(t)} in scope(s) ${JSON.stringify(e)}`);return n}extractData(e,t){const{dataDomain:i,processValue:s,scopes:n,allScopesHaveSameDefs:r}=this.initDataDomainProcessor(),o=new Map(t?.map((e=>[e.id,e]))),{keys:a,values:l}=this,h=new Array(e.length);let c=0,d=0;for(const[p,g]of e.entries()){const e={},t=n.size>0?new Set(n):void 0,i=new Array(a.length);let u,m=0;for(const n of a){if(u=s(n,g,u),u===zx)break;i&&(i[m++]=u)}if(u===zx)continue;const f=l.length>0?new Array(l.length):void 0;let v;for(const[a,h]of l.entries()){for(const t of h.scopes??n){const i=o.get(t);if(v=s(h,i?.data[p]??g,v,t),v!==zx&&f){if(null!=i&&!1!==h.includeProperty){const i=h.includeProperty&&null!=h.id?h.id:h.property;e[t]??(e[t]={}),e[t][i]=v}f[a]=v}}if(v===zx){if(r)break;for(const e of h.scopes??n)t?.delete(e);if(0===t?.size)break}}if(v===zx&&r)continue;if(0===t?.size)continue;const y={datum:{...g,...e},keys:i,values:f};!r&&t&&t.size<n.size&&(d++,y.validScopes=new Set(t)),h[c++]=y}h.length=c;const u=e=>{const t=i.get(e),s=t.getDomain();return Nx.is(t)&&s[0]>s[1]?[]:s};return{type:"ungrouped",input:{count:e.length},data:h,domain:{keys:a.map(u),values:l.map(u)},defs:{allScopesHaveSameDefs:r,keys:a,values:l},partialValidDataCount:d,time:0}}groupData(e,t){const i=new Map;for(const o of e.data){const{keys:e,values:s,datum:n,validScopes:r}=o,a=t?.(o)??e,l=Ox(a);if(i.has(l)){const e=i.get(l);if(e.values.push(s),e.datum.push(n),null!=r&&null!=e.validScopes)for(const t of e.validScopes)r.has(t)||e.validScopes.delete(t)}else i.set(l,{keys:a,values:[s],datum:[n],validScopes:r})}const s=new Array(i.size),n=new Array(i.size);let r=0;for(const{keys:o,values:a,datum:l,validScopes:h}of i.values())0!==h?.size&&(n[r]=o,s[r++]={keys:o,values:a,datum:l,validScopes:h});return{...e,type:"grouped",data:s,domain:{...e.domain,groups:n}}}aggregateData(e){const t="ungrouped"===e.type;e.domain.aggValues=[];for(const[i,s]of this.aggregates.entries()){const n=this.valueGroupIdxLookup(s),r=[1/0,-1/0];for(const o of e.data){if(o.aggValues??(o.aggValues=new Array(this.aggregates.length)),o.validScopes)continue;const e=t?[o.values]:o.values;let a=s.groupAggregateFunction?.()??[1/0,-1/0];for(const t of e){const e=n.map((e=>t[e])),i=s.aggregateFunction(e,o.keys);i&&(a=s.groupAggregateFunction?.(i,a)??Nx.extendDomain(i,a))}const l=(s.finalFunction?.(a)??a).map((e=>Gx(e)));o.aggValues[i]=l,Nx.extendDomain(l,r)}e.domain.aggValues.push(r)}}postProcessGroups(e){const{groupProcessors:t}=this,i=new Set,s=new Map,n=new Map,r=new Map;for(const a of t){const e=this.valueGroupIdxLookup(a);n.set(a,e),r.set(a,a.adjust());for(const t of e){const e="category"===this.values[t].valueType;i.add(t),s.set(t,e?new kx:new Nx)}}const o=e=>{for(const t of i)s.get(t)?.extend(e[t])};for(const a of e.data){for(const i of t){if(a.validScopes)continue;const t=n.get(i)??[],s=r.get(i)?.();if(s)if("grouped"===e.type)for(const e of a.values)e&&s(e,t);else a.values&&s(a.values,t)}if("grouped"===e.type)for(const e of a.values)o(e);else o(a.values)}for(const[a,l]of s)e.domain.values[a]=l.getDomain()}postProcessProperties(e){for(const{adjust:t,property:i,scopes:s}of this.propertyProcessors)t()(e,this.valueIdxLookup(s,i))}reduceData(e){e.reduced??(e.reduced={});for(const t of this.reducers){const i=t.reducer();let s=t.initialValue;for(const n of e.data)n.validScopes&&!t.scopes?.some((e=>n.validScopes?.has(e)))||(s=i(s,n));e.reduced[t.property]=s}}postProcessData(e){e.reduced??(e.reduced={});for(const t of this.processors)e.reduced[t.property]=t.calculate(e)}initDataDomainProcessor(){const{keys:e,values:t}=this,i=new Set;for(const l of t)if(l.scopes)for(const e of l.scopes)i.add(e);const s=new Map,n=new Map;let r=!0;const o=()=>{for(const n of lg(e,t))"category"===n.valueType?s.set(n,new kx):(s.set(n,new Nx),r&&(r=(n.scopes??[]).length===i.size))};o();const a=this.buildAccessors(lg(e,t));return{dataDomain:s,processValue:(e,t,i,r)=>{let l,h;if(a.has(e.property)){try{h=a.get(e.property)(t)}catch(c){}l=null!=h}else l=e.property in t,h=l?t[e.property]:e.missingValue;
2if(null!=e.forceValue){h=l&&Pg(h)?-1*e.forceValue:e.forceValue,l=!0}if(!l&&!("missingValue"in e)){const t=e.missing.get(r)??0;e.missing.set(r,t+1)}if(s.has(e)||o(),l&&!1===e.validation?.(h,t)){if(!("invalidValue"in e))return"integrated"!==this.mode&&fp.warnOnce(`invalid value of type [${typeof h}] for [${e.scopes} / ${e.id}] ignored:`,`[${h}]`),zx;h=e.invalidValue}return e.processor&&(n.has(e)||n.set(e,e.processor()),h=n.get(e)?.(h,i===zx?void 0:i)),s.get(e)?.extend(h),h},initDataDomain:o,scopes:i,allScopesHaveSameDefs:r}}buildAccessors(e){const t=new Map;if("integrated"===this.mode)return t;for(const i of e){if(!(i.property.includes(".")||i.property.includes("[")))continue;const e=Hx(i.property);if(null==e){fp.warnOnce("Invalid property path [%s]",i.property);continue}const s=Wx(e);t.set(i.property,s)}return t}};var Ux=class e{constructor(e){this.mode=e,this.debug=Ay.create(!0,"data-model"),this.requested=[],this.status="setup"}async request(e,t,i){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");return new Promise(((s,n)=>{this.requested.push({id:e,opts:i,data:t,resolve:s,reject:n})}))}execute(){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);const e=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",e);const t=this.mergeRequested(e);this.debug("DataController.execute() - merged",t),this.debug.check()&&(fg().processedData=[]);const i=this.requested.map((e=>{let{id:t}=e;return t})),s=this.hasMultipleDataSources(e);for(const{opts:r,data:o,resolves:a,rejects:l,ids:h}of t)try{const t=new jx(r,this.mode),n=t.processData(o,e);this.debug.check()&&fg("processedData").push(n),0===n?.partialValidDataCount?a.forEach(((e,r)=>e({dataModel:t,processedData:this.processScopedData(h[r],n,i,s)}))):n?this.splitResult(t,n,h,a):l.forEach((e=>e(new Error("AG Charts - no processed data generated"))))}catch(n){l.forEach((e=>e(n)))}}hasMultipleDataSources(e){if(e.length){const[{data:t},...i]=e;return i.some((e=>t!==e.data))}return!1}processScopedData(e,t,i,s){const n=t=>{if(Array.isArray(t))return t.map(n);const r=s?{...t,...t[e]}:t;for(const e of i)delete r[e];return r},r=t=>Array.isArray(t)?t.map(r):t?.[e]??t;return{...t,data:t.data.map((e=>({...e,datum:n(e.datum),values:s?e.values?.map(r):e.values})))}}validateRequests(e){const t=[];for(const[i,s]of e.entries())i>0&&s.data.length!==e[0].data.length&&!1===s.opts.groupByData?s.reject(new Error("all series[].data arrays must be of the same length and have matching keys.")):t.push(s);return t}mergeRequested(t){const i=[];for(const s of t){const t=i.find(e.groupMatch(s));t?t.push(s):i.push([s])}return i.map(e.mergeRequests)}splitResult(e,t,i,s){for(let n=0;n<i.length;n++){const r=i[n];(0,s[n])({dataModel:e,processedData:{...t,data:t.data.filter((e=>{let{validScopes:t}=e;return t?.has(r)??!0}))}})}}static groupMatch(e){let{data:t,opts:i}=e;function s(e){return e.filter((e=>"key"===e.type)).map((e=>e.property)).join(";")}return e=>{let[n]=e;return(!1===i.groupByData||n.data===t)&&n.opts.groupByKeys===i.groupByKeys&&n.opts.groupByFn===i.groupByFn&&s(n.opts.props)===s(i.props)}}static mergeRequests(t){return t.reduce(((t,i)=>{let{id:s,data:n,resolve:r,reject:o,opts:{props:a,...l}}=i;t.ids.push(s),t.rejects.push(o),t.resolves.push(r),t.data??(t.data=n),t.opts??(t.opts={...l,props:[]});for(const h of a){const i={...h,scopes:[s]};e.createIdsMap(s,i);const n=t.opts.props.find((t=>t.type===i.type&&e.deepEqual(t,i)));n?(n.scopes??(n.scopes=[]),n.scopes.push(...i.scopes??[]),"key"!==n.type&&"value"!==n.type||!i.idsMap?.size||e.mergeIdsMap(i.idsMap,n.idsMap)):t.opts.props.push(i)}return t}),{ids:[],rejects:[],resolves:[],data:null,opts:null})}static mergeIdsMap(e,t){for(const[i,s]of e){const e=t.get(i);if(null!=e)for(const t of s)e.add(t);else t.set(i,new Set(s))}}static createIdsMap(e,t){null!=t.id&&(t.idsMap??(t.idsMap=new Map),t.idsMap.has(e)?t.idsMap.get(e).add(t.id):t.idsMap.set(e,new Set([t.id])))}
2static deepEqual(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;let s,n;if(Array.isArray(t)){if(n=t.length,n!==i.length)return!1;for(s=n-1;s>=0;s--)if(!e.deepEqual(t[s],i[s]))return!1;return!0}const r=Object.keys(t);if(n=r.length,n!==Object.keys(i).length)return!1;for(s=n-1;s>=0;s--){const n=r[s];if(!e.skipKeys.has(n)&&(!Object.hasOwn(i,n)||!e.deepEqual(t[n],i[n])))return!1}return!0}return!1}};Ux.skipKeys=new Set(["id","idsMap","type","scopes"]);var _x=Ux,Kx=new class{constructor(){this.axesMap=new Map,this.hidden=new Set,this.themeTemplates=new Map}register(e,t){this.axesMap.set(e,t.moduleFactory),t.themeTemplate&&this.setThemeTemplate(e,t.themeTemplate),t.hidden&&this.hidden.add(e)}create(e,t){const i=this.axesMap.get(e);if(i)return i(t);throw new Error(`AG Charts - unknown axis type: ${e}`)}has(e){return this.axesMap.has(e)}keys(){return this.axesMap.keys()}publicKeys(){return[...this.keys()].filter((e=>!this.hidden.has(e)))}setThemeTemplate(e,t){return this.themeTemplates.set(e,t),this}getThemeTemplate(e){return this.themeTemplates.get(e)}},$x=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"annotations",chartTypes:["cartesian"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"foreground",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"chartToolbar",chartTypes:["cartesian"]},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"statusBar",chartTypes:["cartesian"],identifier:"status-bar"},{type:"root",optionsKey:"dataSource",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"sync",chartTypes:["cartesian"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian","topology"]},{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],identifier:"gradient"},{type:"root",optionsKey:"navigator",chartTypes:["cartesian"],optionsInnerKey:"miniChart"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["cartesian"],identifier:"ordinal-time"},{type:"axis-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"candlestick"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"cone-funnel"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"funnel"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"ohlc"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bullet"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"nightingale"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-area"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-line"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-bar"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-column"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-marker"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape-background"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line-background"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"chord"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"sankey"},{type:"series",optionsKey:"series[]",chartTypes:["standalone"],identifier:"pyramid"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"linear-gauge"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"radial-gauge"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"}];function Yx(e){return $x.find((t=>"series"===t.type&&t.identifier===e))?.chartTypes}function Zx(e){if(!function(e){return"enterprise"===e.packageType}
2(e))throw new Error("AG Charts - internal configuration error, only enterprise modules need verification.");const t=$x.find((t=>t.type===e.type&&t.optionsKey===e.optionsKey&&t.identifier===e.identifier&&e.chartTypes.every((e=>t.chartTypes.includes(e)))));return t&&(t.useCount??(t.useCount=0),t.useCount++),null!=t}var qx=new class{constructor(){this.legendMap=new Map,this.themeTemplates=new Map}register(e,t){let{optionsKey:i,moduleFactory:s,themeTemplate:n}=t;this.legendMap.set(e,{optionsKey:i,moduleFactory:s}),this.themeTemplates.set(i,n)}create(e,t){const i=this.legendMap.get(e)?.moduleFactory;if(i)return i(t);throw new Error(`AG Charts - unknown legend type: ${e}`)}getThemeTemplates(){return Object.fromEntries(this.themeTemplates)}getKeys(){return Array.from(this.legendMap.entries()).reduce(((e,t)=>{let[i,s]=t;return e[i]=s.optionsKey,e}),{})}},Qx=class extends Map{get(e){return super.get(e)??"unknown"}isCartesian(e){return"cartesian"===this.get(e)}isPolar(e){return"polar"===this.get(e)}isHierarchy(e){return"hierarchy"===this.get(e)}isTopology(e){return"topology"===this.get(e)}isFlowProportion(e){return"flow-proportion"===this.get(e)}isStandalone(e){return"standalone"===this.get(e)}isGauge(e){return"gauge"===this.get(e)}get seriesTypes(){return Array.from(this.keys())}get cartesianTypes(){return this.seriesTypes.filter((e=>this.isCartesian(e)))}get polarTypes(){return this.seriesTypes.filter((e=>this.isPolar(e)))}get hierarchyTypes(){return this.seriesTypes.filter((e=>this.isHierarchy(e)))}get topologyTypes(){return this.seriesTypes.filter((e=>this.isTopology(e)))}get flowProportionTypes(){return this.seriesTypes.filter((e=>this.isFlowProportion(e)))}get standaloneTypes(){return this.seriesTypes.filter((e=>this.isStandalone(e)))}get gaugeTypes(){return this.seriesTypes.filter((e=>this.isGauge(e)))}},Xx=class extends Map{set(e,t){return super.set(e,Im(t,this.get(e)))}},Jx=new Qx,eM=new Qx,tM=new Xx,iM=new class{constructor(){this.seriesMap=new Map,this.themeTemplates=new Map}register(e,t){let{chartTypes:[i],moduleFactory:s,tooltipDefaults:n,defaultAxes:r,themeTemplate:o,paletteFactory:a,solo:l,stackable:h,groupable:c,stackedByDefault:d,hidden:u}=t;this.setThemeTemplate(e,o),this.seriesMap.set(e,{moduleFactory:s,tooltipDefaults:n,defaultAxes:r,paletteFactory:a,solo:l,stackable:h,groupable:c,stackedByDefault:d}),Jx.set(e,i),u||eM.set(e,i)}create(e,t){const i=this.seriesMap.get(e)?.moduleFactory;if(i)return i(t);throw new Error(`AG Charts - unknown series type: ${e}`)}cloneDefaultAxes(e,t){const i=this.seriesMap.get(e)?.defaultAxes;if(null==i)return null;return{axes:yC("function"===typeof i?i(t):i)}}setThemeTemplate(e,t){const i=this.themeTemplates.get(e);this.themeTemplates.set(e,Im(t,i))}getThemeTemplate(e){return this.themeTemplates.get(e)}getPaletteFactory(e){return this.seriesMap.get(e)?.paletteFactory}getTooltipDefauls(e){return this.seriesMap.get(e)?.tooltipDefaults}isSolo(e){return this.seriesMap.get(e)?.solo??!1}isGroupable(e){return this.seriesMap.get(e)?.groupable??!1}isStackable(e){return this.seriesMap.get(e)?.stackable??!1}isStackedByDefault(e){return this.seriesMap.get(e)?.stackedByDefault??!1}},sM=class e extends Iw{constructor(e){super(),this.chart=e}subscribe(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_GROUP,i=this.get(t);return i||(i=new Set,e.chartsGroups.set(t,i)),i.add(this.chart),this}unsubscribe(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_GROUP;return this.get(t)?.delete(this.chart),this}getChart(){return this.chart}getGroup(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_GROUP;const i=this.get(t);return i?Array.from(i):[]}getGroupSiblings(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_GROUP;return this.getGroup(t).filter((e=>e!==this.chart))}get(t){return e.chartsGroups.get(t)}};sM.chartsGroups=new Map,sM.DEFAULT_GROUP=Symbol("sync-group-default");var nM=sM,rM=class extends Df{constructor(){super(...arguments),this.enabled=!1}};op([Ef(kf)],rM.prototype,"enabled",2),op([Ef(Gf)],rM.prototype,"tabIndex",2);var oM=["top","right","bottom","left"];var aM=["direction","xKey","yKey","sizeKey","angleKey","radiusKey","normalizedTo"];function lM(e){const{series:t}=e;if(t)return t[0]?.type??"line"}function hM(e){const t=lM(e);return null!=t&&(Jx.isCartesian(t)||function(e){const t=Yx(e)?.find((e=>"cartesian"===e));return"cartesian"===t}(t))}function cM(e){const t=lM(e);return null!=t&&("polar"===t?(fp.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):Jx.isPolar(t)||function(e){const t=Yx(e)?.find((e=>"polar"===e));return"polar"===t}(t))}function dM(e){const t=lM(e);return null!=t&&("hierarchy"===t?(fp.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):Jx.isHierarchy(t)||function(e){const t=Yx(e)?.find((e=>"hierarchy"===e));return"hierarchy"===t}(t))}function uM(e){const t=lM(e);return null!=t&&("topology"===t?(fp.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):Jx.isTopology(t)||function(e){const t=Yx(e)?.find((e=>"topology"===e));return"topology"===t}(t))}function pM(e){const t=lM(e);return null!=t&&("flow-proportion"===t?(fp.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):Jx.isFlowProportion(t)||function(e){const t=Yx(e)?.find((e=>"flow-proportion"===e));return"flow-proportion"===t}(t))}function gM(e){const t=lM(e);return null!=t&&("standalone"===t?(fp.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):Jx.isStandalone(t)||function(e){const t=Yx(e)?.find((e=>"standalone"===e));return"standalone"===t}(t))}function mM(e){const t=lM(e);return null!=t&&("gauge"===t?(fp.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):Jx.isGauge(t)||function(e){const t=Yx(e)?.find((e=>"gauge"===e));return"gauge"===t}(t))}
2var fM=class extends Ev{applyOptions(e){for(const t of this.moduleMap.values())t.module.optionsKey in e&&Rf(t.moduleInstance)&&t.moduleInstance.set(e[t.module.optionsKey])}*legends(){for(const{module:e,moduleInstance:t}of this.moduleMap.values())"legend"===e.type&&(yield{legendType:e.identifier,legend:t})}},vM="ag-chart-overlay",yM="ag-chart-dark-overlay",CM=class extends Df{constructor(e,t){super(),this.className=e,this.defaultMessageId=t}getText(e){return e.t(this.text??this.defaultMessageId)}getElement(e,t,i){if(this.content?.remove(),this.focusBox=i,this.renderer){const e=this.renderer();if(e instanceof HTMLElement)this.content=e;else{const t=vg("div");t.innerHTML=e,this.content=t.firstElementChild}}else{const i=vg("div",{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"100%",margin:"8px",font:"12px Verdana, sans-serif"});i.innerText=this.getText(t),this.content=i,e?.animate({from:0,to:1,id:"overlay",phase:"add",groupId:"opacity",onUpdate(e){i.style.opacity=String(e)},onStop(){i.style.opacity="1"}})}return this.content}removeElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>this.content?.remove(),t=arguments.length>1?arguments[1]:void 0;if(this.content){if(t){const{content:i}=this;t.animate({from:1,to:0,phase:"remove",id:"overlay",groupId:"opacity",onUpdate(e){i.style.opacity=String(e)},onStop(){e?.()}})}else e?.();this.content=void 0,this.focusBox=void 0}}};op([Ef(Of,{optional:!0})],CM.prototype,"text",2),op([Ef(Nf,{optional:!0})],CM.prototype,"renderer",2);var SM=class extends Df{constructor(){super(...arguments),this.darkTheme=!1,this.loading=new CM("ag-chart-loading-overlay","overlayLoadingData"),this.noData=new CM("ag-chart-no-data-overlay","overlayNoData"),this.noVisibleSeries=new CM("ag-chart-no-visible-series","overlayNoVisibleSeries")}getFocusInfo(e){for(const t of[this.loading,this.noData,this.noVisibleSeries])if(void 0!==t.focusBox)return{text:t.getText(e),rect:t.focusBox}}destroy(){this.loading.removeElement(),this.noData.removeElement(),this.noVisibleSeries.removeElement()}};op([Ef(kf)],SM.prototype,"darkTheme",2),op([Ef(Lf)],SM.prototype,"loading",2),op([Ef(Lf)],SM.prototype,"noData",2),op([Ef(Lf)],SM.prototype,"noVisibleSeries",2);var wM=(e=>(e[e.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",e[e.NEAREST_NODE=1]="NEAREST_NODE",e[e.AXIS_ALIGNED=2]="AXIS_ALIGNED",e))(wM||{}),bM=class{constructor(e,t,i,s){let{datum:n}=i;this.type=e,this.event=t,this.datum=n,this.seriesId=s.id}},xM=class{constructor(e,t,i){this.series=e,this.seriesGrouping=t,this.oldGrouping=i,this.type="groupingChanged"}},MM=class extends vw{constructor(e){super(),this.destroyFns=[],this.seriesGrouping=void 0,this.NodeEvent=bM,this.internalId=og(this),this.rootGroup=new xy({name:"seriesRoot",isVirtual:!0}),this.axes={x:void 0,y:void 0},this.directions=["x","y"],this.nodeDataRefresh=!0,this.moduleMap=new Ev,this._declarationOrder=-1,this.seriesListeners=new Dw,this._pickNodeCache=new iC;const{moduleCtx:t,pickModes:i,directionKeys:s={},directionNames:n={},contentGroupVirtual:r=!0,canHaveAxes:o=!1}=e;this.ctx=t,this.directionKeys=s,this.directionNames=n,this.canHaveAxes=o,this.contentGroup=this.rootGroup.appendChild(new Iy({name:`${this.internalId}-content`,isVirtual:r,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.highlightGroup=new Iy({name:`${this.internalId}-highlight`,isVirtual:r,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("highlight")}
2),this.highlightNode=this.highlightGroup.appendChild(new xy({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new xy({name:"highlightLabel",zIndex:10})),this.pickModes=i,this.labelGroup=this.rootGroup.appendChild(new Iy({name:`${this.internalId}-series-labels`,zIndex:14})),this.annotationGroup=new xy({name:`${this.id}-annotation`,isVirtual:r,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("annotation")})}get pickModeAxis(){return"main"}get id(){return this.properties?.id??this.internalId}get type(){return this.constructor.type??""}get data(){return this._data??this._chartData}set visible(e){this.properties.visible=e,this.visibleMaybeChanged()}get visible(){return this.properties.visible}get hasData(){return null!=this.data&&this.data.length>0}get tooltipEnabled(){return this.properties.tooltip?.enabled??!1}onDataChange(){this.nodeDataRefresh=!0,this._pickNodeCache.clear()}setOptionsData(e){this._data=e,this.onDataChange()}setChartData(e){this._chartData=e,this.data===e&&this.onDataChange()}onSeriesGroupingChange(e,t){const{internalId:i,type:s,visible:n}=this;e&&this.ctx.seriesStateManager.deregisterSeries(this),t&&this.ctx.seriesStateManager.registerSeries({internalId:i,type:s,visible:n,seriesGrouping:t}),this.fireEvent(new xM(this,t,e))}getBandScalePadding(){return{inner:1,outer:0}}getGroupZIndexSubOrder(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=0;switch(e){case"data":case"paths":break;case"labels":i+=2e4;break;case"marker":i+=1e4;break;case"highlight":t+=15e3;break;case"annotation":i+=15e3}return[()=>this._declarationOrder+i,t]}addListener(e,t){return this.seriesListeners.addListener(e,t)}dispatch(e,t){this.seriesListeners.dispatch(e,t)}addChartEventListeners(){}destroy(){this.destroyFns.forEach((e=>e())),this.destroyFns=[],this.ctx.seriesStateManager.deregisterSeries(this)}getDirectionValues(e,t){const i=this.resolveKeyDirection(e),s=t?.[i],n=[];if(!s)return n;const r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(const s of t)Array.isArray(s)?r(...s):"object"===typeof s?r(...Object.values(s)):n.push(s)};return r(...s.map((e=>this.properties[e]))),n}getKeys(e){return this.getDirectionValues(e,this.directionKeys)}getKeyProperties(e){return this.directionKeys[this.resolveKeyDirection(e)]??[]}getNames(e){return this.getDirectionValues(e,this.directionNames)}resolveKeyDirection(e){return e}getDomain(e){const t=this.getSeriesDomain(e),i=this.moduleMap.mapModules((t=>t.getDomain(e)));return t.concat(i.flat())}markNodeDataDirty(){this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.visibleMaybeChanged()}visibleMaybeChanged(){this.ctx.seriesStateManager.updateSeries(this)}getOpacity(){const{dimOpacity:e=1,enabled:t=!0}=this.properties.highlightStyle.series;if(!t||1===e)return 1;switch(this.isItemIdHighlighted()){case 0:case 1:return 1;default:return e}}getStrokeWidth(e){const{strokeWidth:t,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||void 0===t)return e;switch(this.isItemIdHighlighted()){case 1:return t;case 0:case 2:return e}}isItemIdHighlighted(){const e=this.ctx.highlightManager?.getActiveHighlight()?.series;return null==e?0:e!==this?2:1}getModuleTooltipParams(){return this.moduleMap.mapModules((e=>e.getTooltipParams())).reduce(((e,t)=>Object.assign(e,t)),{})}pickNode(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{pickModes:s,pickModeAxis:n,visible:r,rootGroup:o}=this;if(!r||!o.visible)return;if("highlight"===t&&!this.properties.highlight.enabled)return;if("highlight-tooltip"===t&&!this.properties.highlight.enabled)return;let a=1/0;if("tooltip"===t||"highlight-tooltip"===t){const{tooltip:e}=this.properties;a="number"===typeof e.range?e.range:1/0,i||(i="exact"===e.range)}else if("event"===t||"context-menu"===t){const{nodeClickRange:e}=this.properties;a="number"===typeof e?e:1/0,i||(i="exact"===e)}const l=s.filter((e=>!i||0===e)),{x:h,y:c}=e,d=JSON.stringify({x:h,y:c,maxDistance:a,selectedPickModes:l});if(this._pickNodeCache.has(d))return this._pickNodeCache.get(d);for(const u of l){let t;switch(u){case 0:t=this.pickNodeExactShape(e);break;case 1:t=this.pickNodeClosestDatum(e);break;case 2:t=null!=u?this.pickNodeMainAxisFirst(e,"main-category"===n):void 0}if(t&&t.distance<=a)return this._pickNodeCache.set(d,{pickMode:u,match:t.datum,distance:t.distance})}return this._pickNodeCache.set(d,void 0)}pickNodeExactShape(e){const t=this.contentGroup.pickNode(e.x,e.y);if(t&&!0!==t.datum.missing)return{datum:t.datum,distance:0}}pickNodeClosestDatum(e){throw new Error("AG Charts - Series.pickNodeClosestDatum(
2) not implemented")}pickNodeNearestDistantObject(e,t){const i=ug(e.x,e.y,t);if(void 0!==i.nearest&&!0!==i.nearest.datum.missing)return{datum:i.nearest.datum,distance:Math.sqrt(i.distanceSquared)}}pickNodeMainAxisFirst(e,t){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}fireNodeClickEvent(e,t){this.fireEvent(new this.NodeEvent("nodeClick",e,t,this))}fireNodeDoubleClickEvent(e,t){this.fireEvent(new this.NodeEvent("nodeDoubleClick",e,t,this))}createNodeContextMenuActionEvent(e,t){return new this.NodeEvent("nodeContextMenuAction",e,t,this)}toggleSeriesItem(e,t){this.visible=t,this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.dispatch("visibility-changed",{itemId:e,enabled:t})}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return{...this.ctx,series:this}}getLabelText(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:String;return e.formatter?this.ctx.callbackCache.call(e.formatter,{seriesId:this.id,...t})??i(t.value):i(t.value)}getMarkerStyle(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getStyle();const s=Im({size:t.datum.point?.size??0},i);if(e.itemStyler){return Im(this.ctx.callbackCache.call(e.itemStyler,{seriesId:this.id,...s,...t,datum:t.datum.datum}),s)}return s}updateMarkerStyle(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.getStyle(),{applyTranslation:n=!0,selected:r=!0}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{point:o}=i.datum,a=this.getMarkerStyle(t,i,s),l=this.visible&&a.size>0&&o&&!isNaN(o.x)&&!isNaN(o.y);if(n?e.setProperties({visible:l,...a,translationX:o?.x,translationY:o?.y}):e.setProperties({visible:l,...a}),r||(e.fillOpacity*=.25,e.strokeOpacity*=.125),"function"===typeof t.shape&&!e.dirtyPath){e.path.clear(!0),e.updatePath(),e.checkPathDirty();const t=e.getBBox();if(void 0!==o&&t.isFinite()){const e=t.computeCenter(),[i,s]=["x","y"].map((t=>(a.strokeWidth??0)+Math.abs(e[t]-o[t]))),n=Math.max(t.width+i,t.height+s);o.focusSize=n}}}getMinRects(e,t){}get nodeDataDependencies(){return this._nodeDataDependencies??{seriesRectWidth:NaN,seriesRectHeight:NaN}}checkResize(e){const{width:t,height:i}=e??{width:NaN,height:NaN},s=e?{seriesRectWidth:t,seriesRectHeight:i}:void 0,n=null!=vC(this.nodeDataDependencies,s);return n&&(this._nodeDataDependencies=s,this.markNodeDataDirty()),n}pickFocus(e){}};function DM(e,t){!function(e,t){const{bounds:i,showFocusBox:s}=t;s&&e?.updateBounds(i)}(e,t);const{x:i,y:s}=function(e){if(null!=e)return e instanceof Vg?e.computeCenter():wy.toCanvas(e).computeCenter()}(t.bounds)??{};if(void 0!==i&&void 0!==s)return{type:"keyboard",offsetX:i,offsetY:s}}function IM(e){let{defs:t,values:i,xAxis:s,yAxis:n}=e;if(!s||!n)throw new Error("Axes must be defined");const r={};for(const[o,{def:a}]of t)if(Object.hasOwn(i,o)){const{scale:e}="key"===a.type?s:n;r[o]=Math.round(e.convert(i[o]))}return r}function RM(e,t,i,s){const n=[...e].reverse();let r;for(const o of n){if(!o.visible||!o.rootGroup.visible)continue;const{match:e,distance:n}=o.pickNode(t,i,s)??{};if(e&&null!=n&&((!r||r.distance>n)&&(r={series:o,distance:n,datum:e}),0===n))break}return r}MM.highlightedZIndex=1e12,op([RC({changeValue:function(e,t){this.onSeriesGroupingChange(t,e)}})],MM.prototype,"seriesGrouping",2);var EM=class{constructor(e,t){this.element=e,this.id=t,e.id=t,e.style.display="none",NC(e.parentElement,"aria-labelledby",t)}layoutComplete(e){this.element.parentElement.style.width=`${e.chart.width}px`,this.element.parentElement.style.height=`${e.chart.height}px`}set text(e){this.element.textContent=e}},AM=class extends Iw{constructor(e){super(),this.chart=e,this.id=og(this),this.series=[],this.highlight={pendingHoverEvent:void 0,appliedHoverEvent:void 0,stashedHoverEvent:void 0},this.tooltip={lastHover:void 0},this.hoverDevice="mouse",this.focus={sortedSeries:[],series:void 0,seriesIndex:0,datumIndex:0,datum:void 0},this.hoverScheduler=Cw(((e,t)=>fg().requestAnimationFrame(e)),(()=>{(this.tooltip.lastHover||this.highlight.pendingHoverEvent)&&(this.chart.getUpdateType()<=4?this.hoverSc
2heduler.schedule():(this.highlight.pendingHoverEvent&&this.handleHoverHighlight(!1),this.tooltip.lastHover&&this.handleHoverTooltip(this.tooltip.lastHover,!1)))}));const t=e.ctx.regionManager.getRegion("series"),i=e.ctx.regionManager.getRegion("horizontal-axes"),s=e.ctx.regionManager.getRegion("vertical-axes"),n=e.ctx.domManager.addChild("series-area","series-area-aria-label");this.ariaLabel=new EM(n,`${this.id}-aria-label`),this.destroyFns.push((()=>e.ctx.domManager.removeChild("series-area","series-area-aria-label")),t.addListener("contextmenu",(e=>this.onContextMenu(e)),63),t.addListener("drag",(e=>this.onHoverLikeEvent(e)),41),t.addListener("hover",(e=>this.onHover(e)),41),t.addListener("leave",(()=>this.onLeave()),41),i.addListener("hover",(e=>this.onHover(e)),41),i.addListener("leave",(()=>this.onLeave())),s.addListener("hover",(e=>this.onHover(e)),41),s.addListener("leave",(()=>this.onLeave())),e.ctx.animationManager.addListener("animation-start",(()=>this.clearAll())),e.ctx.domManager.addListener("resize",(()=>this.clearAll())),e.ctx.highlightManager.addListener("highlight-change",(e=>this.changeHighlightDatum(e))),e.ctx.keyNavManager.addListener("blur",(()=>this.onBlur())),e.ctx.keyNavManager.addListener("focus",(e=>this.onFocus(e)),34),e.ctx.keyNavManager.addListener("nav-hori",(e=>this.onNavHori(e)),34),e.ctx.keyNavManager.addListener("nav-vert",(e=>this.onNavVert(e)),34),e.ctx.keyNavManager.addListener("submit",(e=>this.onSubmit(e)),34),e.ctx.layoutManager.addListener("layout:complete",(e=>this.layoutComplete(e))),e.ctx.regionManager.listenAll("click",(e=>this.onClick(e))),e.ctx.regionManager.listenAll("dblclick",(e=>this.onClick(e))),e.ctx.updateService.addListener("pre-scene-render",(()=>this.preSceneRender())),e.ctx.zoomManager.addListener("zoom-change",(()=>this.clearAll())),e.ctx.zoomManager.addListener("zoom-pan-start",(()=>this.clearAll())))}dataChanged(){var e;(e=this.highlight).stashedHoverEvent??(e.stashedHoverEvent=this.highlight.appliedHoverEvent),this.chart.ctx.tooltipManager.removeTooltip(this.id),this.chart.ctx.focusIndicator.updateBounds(void 0),this.clearHighlight()}preSceneRender(){this.refreshFocus(),null!=this.highlight.stashedHoverEvent&&(this.highlight.pendingHoverEvent=this.highlight.stashedHoverEvent,this.highlight.stashedHoverEvent=void 0,this.handleHoverHighlight(!0)),null!=this.tooltip.lastHover&&this.handleHoverTooltip(this.tooltip.lastHover,!0)}update(e,t){this.chart.ctx.updateService.update(e,t)}seriesChanged(e){this.focus.sortedSeries=[...e].sort(((e,t)=>{let i=e.properties.focusPriority??1/0,s=t.properties.focusPriority??1/0;return i===s&&([i,s]=[e._declarationOrder,t._declarationOrder]),i<s?-1:i>s?1:0})),this.series=e}layoutComplete(e){this.seriesRect=e.series.rect,this.hoverRect=e.series.paddedRect,this.ariaLabel.layoutComplete(e)}onContextMenu(e){const{Default:t,ContextMenu:i}=Rw;let s,n;if(this.chart.ctx.focusIndicator.isFocusVisible())s=this.chart.ctx.highlightManager.getActiveHighlight(),s&&this.seriesRect&&s.midPoint&&(n=wy.toCanvasPoint(s.series.contentGroup,s.midPoint.x,s.midPoint.y));else if(this.chart.ctx.interactionManager.getState()&(t|i)){const t=RM(this.series,{x:e.regionOffsetX,y:e.regionOffsetY},"context-menu");t&&(this.chart.ctx.highlightManager.updateHighlight(this.id),s=t.datum)}this.clearAll(),this.chart.ctx.contextMenuRegistry.dispatchContext("series",e,{pickedNode:s},n)}onLeave(){this.chart.ctx.cursorManager.updateCursor(this.id),this.chart.ctx.focusIndicator.isFocusVisible()||this.clearAll()}onHover(e){this.hoverDevice="mouse",this.onHoverLikeEvent(e)}onHoverLikeEvent(e){if(xm(e,"drag")&&(this.tooltip.lastHover=e),this.highlight.pendingHoverEvent=e,this.hoverScheduler.schedule(),32===this.chart.ctx.interactionManager.getState()){const{regionOffsetX:t,regionOffsetY:i}=e,s=RM(this.series,{x:t,y:i},"event");s?.series.hasEventListener("nodeClick")||s?.series.hasEventListener("nodeDoubleClick")?this.chart.ctx.cursorManager.updateCursor(this.id,"pointer"):this.chart.ctx.cursorManager.updateCursor(this.id)}}onClick(e){if(this.hoverDevice="mouse",this.onHoverLikeEvent(e),this.seriesRect?.containsPoint(e.offsetX,e.offsetY)&&this.checkSeriesNodeClick(e))return this.update(4),void e.preventDefault();const t={type:"click"===e.type?"click":"doubleClick",event:e.sourceEvent};this.chart.fireEvent(t)}onFocus(e){this.hoverDevice=this.chart.ctx.focusIndicator.isFocusVisible()?"keyboard":"mouse",this.handleFocus(0,0),e.preventDefault()}onBlur(){this.hoverDevice="mouse",this.clearAll()}onNavVert(e){this.hoverDevice="keyboard",this.focus.seriesIndex+=e.delta,this.handleFocus(e.delta,0),e.preventDefault()}onNavHori(e){this.hoverDevice="keyboard",this.focus.datumIndex+=e.delta,this.handleFocus(0,e.delta),e.preventDefault()}onSubmit(e){const{series:t,datum:i}=this.focus,s=e.sourceEvent.sourceEvent;void 0!==t&&void 0!==i?t.fireNodeClickEvent(s,i):this.chart.fireEvent({type:"click",event:s}),e.preventDefault()}checkSeriesNodeClick(e){let t={x:e.regionOffsetX,y:e.regionOffsetY};
2"series"!==e.region&&(t=wy.fromCanvasPoint(this.chart.seriesRoot,e.offsetX,e.offsetY));const i=RM(this.series,t,"event");return null!=i&&("click"===e.type?(i.series.fireNodeClickEvent(e.sourceEvent,i.datum),!0):"dblclick"===e.type&&(e.preventZoomDblClick=0===i.distance,i.series.fireNodeDoubleClickEvent(e.sourceEvent,i.datum),!0))}refreshFocus(){this.chart.ctx.focusIndicator.isFocusVisible()&&this.handleSeriesFocus(0,0)}handleFocus(e,t){const i=this.chart.overlays.getFocusInfo(this.chart.ctx.localeManager);null==i?this.handleSeriesFocus(e,t):this.chart.ctx.focusIndicator.updateBounds(i.rect)}handleSeriesFocus(e,t){if("hierarchy"===this.chart.chartType)return void this.handleHierarchySeriesFocus(e,t);const{focus:i,seriesRect:s}=this,n=i.sortedSeries.filter((e=>e.visible));if(0===n.length)return;i.seriesIndex=Ig(0,i.seriesIndex,n.length-1),i.series=n[i.seriesIndex];const{datumIndex:r,seriesIndex:o}=i,a=i.series.pickFocus({datumIndex:r,datumIndexDelta:t,otherIndex:o,otherIndexDelta:e,seriesRect:s});this.updatePickedFocus(a)}handleHierarchySeriesFocus(e,t){this.focus.series=this.focus.sortedSeries[0];const{focus:{series:i,seriesIndex:s,datumIndex:n},seriesRect:r}=this;if(void 0===i)return;const o=i.pickFocus({datumIndex:n,datumIndexDelta:t,otherIndex:s,otherIndexDelta:e,seriesRect:r});this.updatePickedFocus(o)}updatePickedFocus(e){const{focus:t}=this;if(void 0===e||void 0===t.series)return;const{datum:i,datumIndex:s}=e;t.datumIndex=s,t.datum=i,this.chart.ctx.focusIndicator.isFocusVisible()&&this.chart.ctx.animationManager.reset();const n=DM(this.chart.ctx.focusIndicator,e);if(void 0!==n&&"keyboard"===this.hoverDevice){this.tooltip.lastHover=void 0,this.highlight.appliedHoverEvent=void 0,this.highlight.pendingHoverEvent=void 0,this.highlight.stashedHoverEvent=void 0;const e=t.series.getTooltipHtml(i),s=Ix.makeTooltipMeta(n,i);this.chart.ctx.highlightManager.updateHighlight(this.id,i),this.chart.ctx.tooltipManager.updateTooltip(this.id,s,e),this.ariaLabel.text=this.getDatumAriaText(i,e)}}getDatumAriaText(e,t){const i=t.ariaLabel;return this.chart.ctx.localeManager.t("ariaAnnounceHoverDatum",{datum:e.series.getDatumAriaText?.(e,i)??i})}clearHighlight(){this.highlight.pendingHoverEvent=void 0,this.highlight.appliedHoverEvent=void 0,this.chart.ctx.highlightManager.updateHighlight(this.id)}clearTooltip(){this.chart.ctx.tooltipManager.removeTooltip(this.id),this.tooltip.lastHover=void 0}clearAll(){this.clearHighlight(),this.clearTooltip(),this.chart.ctx.focusIndicator.updateBounds(void 0)}handleHoverHighlight(e){this.highlight.appliedHoverEvent=this.highlight.pendingHoverEvent,this.highlight.pendingHoverEvent=void 0;const t=this.highlight.appliedHoverEvent;if(!t)return;const i=this.chart.ctx.interactionManager.getState();if(32!==i&&8!==i&&1!==i)return;const{offsetX:s,offsetY:n}=t;if(e?this.chart.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(s,n))return void this.clearHighlight();let r={x:t.regionOffsetX,y:t.regionOffsetY};"series"!==t.region&&(r=wy.fromCanvasPoint(this.chart.seriesRoot,s,n));const{range:o}=this.chart.highlight,a="tooltip"===o?"highlight-tooltip":"highlight",l=RM(this.series,r,a);if(l)return this.chart.ctx.highlightManager.updateHighlight(this.id,l.datum),void(this.hoverDevice="mouse");this.chart.ctx.highlightManager.updateHighlight(this.id)}handleHoverTooltip(e,t){const i=this.chart.ctx.interactionManager.getState();if(32!==i&&8!==i&&1!==i)return;const{offsetX:s,offsetY:n,targetElement:r,regionOffsetX:o,regionOffsetY:a}=e;if(t?this.chart.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(s,n))return void("mouse"==this.hoverDevice&&this.clearTooltip());if(r&&this.chart.tooltip.interactive&&this.chart.ctx.domManager.isManagedChildDOMElement(r,"canvas-overlay",zC))return;let l={x:o,y:a};"series"!==e.region&&(l=wy.fromCanvasPoint(this.chart.seriesRoot,s,n));const h=RM(this.series,l,"tooltip");if(!h)return void("mouse"==this.hoverDevice&&this.clearTooltip());this.hoverDevice="mouse";const c=h.series.getTooltipHtml(h.datum);if(this.chart.tooltip.enabled&&h.series.tooltipEnabled&&null!=c){const t=Ix.makeTooltipMeta(e,h.datum);this.chart.ctx.tooltipManager.updateTooltip(this.id,t,c)}}changeHighlightDatum(e){const t=new Set,{series:i,datum:s}=e.currentHighlight??{},{series:n,datum:r}=e.previousHighlight??{};n&&t.add(n),i&&t.add(i),n?.properties.cursor&&r&&this.chart.ctx.cursorManager.updateCursor(n.id),i?.properties.cursor&&"default"!==i?.properties.cursor&&s&&this.chart.ctx.cursorManager.updateCursor(i.id,i.properties.cursor);null==i||null==n?this.update(4):this.update(4,{seriesToUpdate:t})}},TM=class{constructor(e,t,i){this.seriesRoot=e,this.highlightRoot=t,this.annotationRoot=i,this.groups={},this.series={},this.expectedSeriesCount=1,this.mode="normal"}setSeriesCount(e){this.expectedSeriesCount=e}requestGroup(e){var t,i;const{internalId:s,type:n,rootGroup:r,highlightGroup:o,annotationGroup:a,seriesGrouping:l}=e,{groupIndex:h=s}=l??{};if(null!=this.series[s])throw new Error(`AG Charts - series already has an allocated layer: ${this.series[s]}`);0===Object.keys(this.series).length&&(this.mode=this.expectedSeriesCount>=30?"aggressive-grouping":"normal"),(t=this.groups)[n]??(t[n]={});const c=this.lookupIdx(h),d=(i=this.groups[n])[c]??(i[c]={type:n,id:c,seriesIds:[],group:this.seriesRoot.appendChild(new ZC({name:`${n}-content`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("data")}
2)),highlight:this.highlightRoot.appendChild(new xy({name:`${n}-highlight`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("highlight")})),annotation:this.annotationRoot.appendChild(new xy({name:`${n}-annotation`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("annotation")}))});return this.series[s]={layerState:d,seriesConfig:e},d.seriesIds.push(s),d.group.appendChild(r),d.highlight.appendChild(o),d.annotation.appendChild(a),d.group}changeGroup(e){const{internalId:t,seriesGrouping:i,type:s,rootGroup:n,highlightGroup:r,annotationGroup:o,oldGrouping:a}=e,{groupIndex:l=t}=i??{};this.groups[s]?.[l]?.seriesIds.includes(t)||(null!=this.series[t]&&this.releaseGroup({internalId:t,seriesGrouping:a,type:s,rootGroup:n,highlightGroup:r,annotationGroup:o}),this.requestGroup(e))}releaseGroup(e){const{internalId:t,rootGroup:i,highlightGroup:s,annotationGroup:n,type:r}=e;if(null==this.series[t])throw new Error(`AG Charts - series doesn't have an allocated layer: ${t}`);const o=this.series[t]?.layerState;if(o&&(o.seriesIds=o.seriesIds.filter((e=>e!==t)),o.group.removeChild(i),o.highlight.removeChild(s),o.annotation.removeChild(n)),0===o?.seriesIds.length)this.seriesRoot.removeChild(o.group),this.highlightRoot.removeChild(o.highlight),this.annotationRoot.removeChild(o.annotation),delete this.groups[o.type][o.id],delete this.groups[r][t];else if(o?.seriesIds.length>0){const e=this.series[o?.seriesIds?.[0]]?.seriesConfig;o.group.zIndexSubOrder=e?.getGroupZIndexSubOrder("data"),o.highlight.zIndexSubOrder=e?.getGroupZIndexSubOrder("highlight"),o.annotation.zIndexSubOrder=e?.getGroupZIndexSubOrder("annotation")}delete this.series[t]}lookupIdx(e){return"normal"===this.mode?e:"string"!==typeof e||(e=Number(e.split("-").at(-1)))?Math.floor(30*Ig(0,e/this.expectedSeriesCount,1)):0}destroy(){for(const e of Object.values(this.groups))for(const t of Object.values(e))this.seriesRoot.removeChild(t.group),this.highlightRoot.removeChild(t.highlight),this.annotationRoot.removeChild(t.annotation);this.groups={},this.series={}}},PM=class{constructor(e,t,i,s){this.chart=e,this.dataService=t,this.updateService=i,this.zoomManager=s,this.dirtyZoom=!1,this.dirtyDataSource=!1,this.lastAxisZooms=new Map,this.destroyFns=[],this.destroyFns.push(this.dataService.addListener("data-source-change",(()=>this.onDataSourceChange())),this.dataService.addListener("data-load",(()=>this.onDataLoad())),this.dataService.addListener("data-error",(()=>this.onDataError())),this.updateService.addListener("update-complete",(()=>this.onUpdateComplete())),this.zoomManager.addListener("zoom-change",(()=>this.onZoomChange())))}destroy(){this.destroyFns.forEach((e=>e()))}onDataLoad(){this.updateService.update(1)}onDataError(){this.updateService.update(3)}onDataSourceChange(){this.dirtyDataSource=!0}onUpdateComplete(){(this.dirtyZoom||this.dirtyDataSource)&&this.updateWindow().catch((e=>fp.errorOnce(e)))}onZoomChange(){this.dirtyZoom=!0}async updateWindow(){if(!this.dataService.isLazy())return;const e=this.getValidAxis();let t,i=!0;if(e){const s=this.zoomManager.getAxisZoom(e.id);t=this.getAxisWindow(e,s),i=this.shouldRefresh(e,s)}this.dirtyZoom=!1,this.dirtyDataSource=!1,i&&this.dataService.load({windowStart:t?.min,windowEnd:t?.max})}getValidAxis(){return this.chart.axes.find((e=>"time"===e.type))}shouldRefresh(e,t){if(this.dirtyDataSource)return!0;if(!this.dirtyZoom)return!1;const i=this.lastAxisZooms.get(e.id);return(!i||t.min!==i.min||t.max!==i.max)&&(this.lastAxisZooms.set(e.id,t),!0)}getAxisWindow(e,t){const i=e.scale.getDomain?.();if(!t||!i||0===i.length||isNaN(Number(i[0])))return;const s=Number(i[1])-Number(i[0]);return{min:new Date(Number(i[0])+s*t.min),max:new Date(Number(i[0])+s*t.max)}}},LM=class{constructor(e,t,i,s,n,r,o){this.chartLike=e,this.overlays=t,this.dataService=i,this.layoutManager=s,this.localeManager=n,this.animationManager=r,this.domManager=o,this.destroyFns=[],this.overlayElem=this.domManager.addChild("canvas-overlay","overlay"),this.overlayElem.role="status",this.overlayElem.ariaAtomic="false",this.overlayElem.ariaLive="polite",this.overlayElem.classList.toggle(vM),this.destroyFns.push(this.layoutManager.addListener("layout:complete",(e=>this.onLayoutComplete(e))))}destroy(){this.destroyFns.forEach((e=>e())),this.domManager.removeStyles("overlays"),this.domManager.removeChild("canvas-overlay","overlay")}onLayoutComplete(e){let{series:{rect:t}}=e;const i=this.dataService.isLoading(),s=this.chartLike.series.some((e=>e.hasData)),n=this.chartLike.series.some((e=>e.visible));this.overlays.darkTheme?this.overlayElem.classList.add(yM):this.overlayElem.classList.remove(yM),this.overlayElem.style.left=`${t.x}px`,this.overlayElem.style.top=`${t.y}px`,this.overlayElem.style.width=`${t.width}px`,this.overlayElem.style.height=`${t.height}px`;
2const r=i,o=!i&&!s,a=s&&!n;r?this.showOverlay(this.overlays.loading,t):this.hideOverlay(this.overlays.loading),o?this.showOverlay(this.overlays.noData,t):this.hideOverlay(this.overlays.noData),a?this.showOverlay(this.overlays.noVisibleSeries,t):this.hideOverlay(this.overlays.noVisibleSeries);const l=r||o||a;NC(this.overlayElem,"aria-hidden",!l)}showOverlay(e,t){const i=e.getElement(this.animationManager,this.localeManager,t);this.overlayElem.appendChild(i)}hideOverlay(e){e.removeElement((()=>{this.overlayElem.innerText="\xa0"}),this.animationManager)}},FM=Ay.create(!0,"opts"),kM=class extends Df{constructor(){super(...arguments),this.padding=new yw(0)}};op([Ef(kf,{optional:!0})],kM.prototype,"clip",2),op([Ef(Lf)],kM.prototype,"padding",2);var NM=class e extends vw{constructor(e,t){var i,s;super(),i=this,this.id=og(this),this.seriesRoot=new Iy({name:`${this.id}-series-root`}),this.highlightRoot=new qC({name:`${this.id}-highlight-root`,zIndex:5,deriveZIndexFromChildren:!0}),this.annotationRoot=new qC({name:`${this.id}-annotation-root`,zIndex:10}),this.debug=Ay.create(),this.extraDebugStats={},this.data=[],this._firstAutoSize=!0,this.padding=new yw(20),this.seriesArea=new kM,this.keyboard=new rM,this.mode="standalone",this.chartCaptions=new Mw,this.destroyed=!1,this._destroyFns=[],this.skipSync=!1,this.chartAnimationPhase="initial",this.modulesManager=new fM,this.processors=[],this.queuedUserOptions=[],this._pendingFactoryUpdatesCount=0,this._performUpdateNoRenderCount=0,this._performUpdateSkipAnimations=!1,this.performUpdateType=7,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new fw,this.updateRequestors={},this.performUpdateTrigger=Cw((function(e){return setTimeout(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}),(async e=>{let{count:t}=e;this.destroyed||this.updateMutex.acquire((async()=>{try{await this.performUpdate(t)}catch(e){fp.error("update error",e)}})).catch((e=>fp.errorOnce(e)))})),this._performUpdateSplits={},this.axes=[],this.series=[],this.onSeriesNodeClick=e=>{this.fireEvent({...e,type:"seriesNodeClick"})},this.onSeriesNodeDoubleClick=e=>{this.fireEvent({...e,type:"seriesNodeDoubleClick"})},this.seriesGroupingChanged=e=>{if(!(e instanceof xM))return;const{series:t,seriesGrouping:i,oldGrouping:s}=e;t.rootGroup.isRoot()||this.seriesLayerManager.changeGroup({internalId:t.internalId,type:t.type,rootGroup:t.rootGroup,highlightGroup:t.highlightGroup,annotationGroup:t.annotationGroup,getGroupZIndexSubOrder:e=>t.getGroupZIndexSubOrder(e),seriesGrouping:i,oldGrouping:s})},this.chartOptions=e;const n=t?.scene,r=t?.container??e.processedOptions.container??void 0,o=t?.styleContainer??e.specialOverrides.styleContainer,a=new xy({name:"root"}),l=new ZC({name:"titles",zIndex:14});a.visible=!1,a.append(l),a.append(this.seriesRoot),a.append(this.highlightRoot),a.append(this.annotationRoot),l.append(this.title.node),l.append(this.subtitle.node),l.append(this.footnote.node),this.tooltip=new KC,this.seriesLayerManager=new TM(this.seriesRoot,this.highlightRoot,this.annotationRoot),this.mode=e.userOptions.mode??this.mode;const h=this.ctx=new Lx(this,{scene:n,root:a,container:r,styleContainer:o,syncManager:new nM(this),pixelRatio:e.specialOverrides.overrideDevicePixelRatio,updateCallback:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return i.update(e,t)},updateMutex:this.updateMutex});this._destroyFns.push(h.domManager.addListener("resize",(()=>this.parentResize(h.domManager.containerSize)))),this.overlays=new SM,(s=this.overlays.loading).renderer??(s.renderer=()=>function(e,t){const{animationDuration:i}=_m.add,s=vg("div",`${vM}--loading`,{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"100%",boxSizing:"border-box",font:"13px Verdana, sans-serif",userSelect:"none",animation:`ag-charts-loading ${i*t}ms linear 50ms both`}),n=vg("span",{width:"45px",height:"40px",backgroundImage:["linear-gradient(#0000 calc(1 * 100% / 6), #ccc 0 calc(3 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(2 * 100% / 6), #ccc 0 calc(4 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(3 * 100% / 6), #ccc 0 calc(5 * 100% / 6), #0000 0)"].join(""),backgroundSize:"10px 400%",backgroundRepeat:"no-repeat",animation:"ag-charts-loading-matrix 1s infinite linear"}),r=vg("p",{marginTop:"1em"});r.innerText=e;const o=vg("div",`${vM}__loading-background`,{position:"absolute",inset:"0",opacity:"0.5",zIndex:"-1"}),a=vg("style");return a.innerText=["@keyframes ag-charts-loading { from { opacity: 0 } to { opacity: 1 } }","@keyframes ag-charts-loading-matrix {","0% { background-position: 0% 0%, 50% 0%, 100% 0%; }","100% { background-position: 0% 100%, 50% 100%, 100% 100%; }","}"].join(" "),s.replaceChildren(a,n,r,o),s}(this.overlays.loading.getText(h.localeManager),h.animationManager.defaultDuration)),this.processors=[new PM(this,h.dataService,h.updateService,h.zoomManager),new LM(this,this.overlays,h.dataService,h.layoutManager,h.localeManager,h.animationManager,h.domManager)],this.highlight=new Fx,this.container=r;const c=this.getModuleContext();h.regionManager.addRegion("series",this.seriesRoot,new px(this.seriesRoot,(()=>this.seriesRect??Vg.zero)),this.ctx.axisManager.axisGridGroup),h.regionManager.addRegion("horizontal-axes"),h.regionManager.addRegion("vertical-axes"),h.regionManager.addRegion("root",a),h.domManager.setDataBoolean("animating",!1),this.seriesAreaManager=new AM(this.initSeriesAreaDependencies()),this._destroyFns.push(h.layoutManager.registerElement(0,(e=>{e.layoutBox.shrink(this.padding.toJson()),this.chartCaptions.positionCaptions(e)})),h.layoutManager.addListener("layout:complete",(e=>this.chartCaptions.positionAbsoluteCaptions(e))),h.dataService.addListener("data-load",(e=>{this.data=e.data})),this.title.registerInteraction(c,"beforebegin"),this.subtitle.registerInteraction(c,"beforebegin"),this.footnote.registerInteraction(c,"afterend"),h.interactionManager.addListener("page-left",(()=>this.destroy())),h.animationManager.addListener("animation-frame",(()=>{this.update(6)})),h.animationManager.addListener("animation-start",(()=>h.domManager.setDataBoolean("animating",!0))),h.animationManager.addListener("animation-stop",(()=>
2h.domManager.setDataBoolean("animating",!1))),h.zoomManager.addListener("zoom-change",(()=>{this.series.forEach((e=>e.animationState?.transition("updateData")));const e="initial"!==this.chartAnimationPhase;this.update(3,{forceNodeDataRefresh:!0,skipAnimations:e})}))),this.parentResize(h.domManager.containerSize)}static getInstance(t){return e.chartsInstances.get(t)}get canvasElement(){return this.ctx.scene.canvas.element}download(e,t){this.ctx.scene.download(e,t)}getCanvasDataURL(e){return this.ctx.scene.getDataURL(e)}toSVG(){return this.ctx.scene.toSVG()}getOptions(){return this.queuedUserOptions.at(-1)??this.chartOptions.userOptions}initSeriesAreaDependencies(){const{ctx:e,tooltip:t,highlight:i,overlays:s,seriesRoot:n}=this,r=this.getChartType();return{fireEvent:this.fireEvent.bind(this),getUpdateType:()=>this.performUpdateType,chartType:r,ctx:e,tooltip:t,highlight:i,overlays:s,seriesRoot:n}}getModuleContext(){return this.ctx}getCaptionText(){return[this.title,this.subtitle,this.footnote].filter((e=>e.enabled&&e.text)).map((e=>e.text)).join(". ")}getAriaLabel(){return this.ctx.localeManager.t("ariaAnnounceChart",{seriesCount:this.series.length})}resetAnimations(){this.chartAnimationPhase="initial";for(const e of this.series)e.resetAnimation(this.chartAnimationPhase);for(const e of this.axes)e.resetAnimation(this.chartAnimationPhase);this.animationRect=void 0,this.ctx.animationManager.reset()}skipAnimations(){this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0}destroy(e){if(this.destroyed)return;const t=e?.keepTransferableResources;let i;return this.performUpdateType=7,this._destroyFns.forEach((e=>e())),this.processors.forEach((e=>e.destroy())),this.tooltip.destroy(this.ctx.domManager),this.overlays.destroy(),this.modulesManager.destroy(),t?(this.ctx.scene.strip(),i={container:this.container,scene:this.ctx.scene}):(this.ctx.scene.destroy(),this.container=void 0),this.destroySeries(this.series),this.seriesLayerManager.destroy(),this.axes.forEach((e=>e.destroy())),this.axes=[],this.animationRect=void 0,this.ctx.destroy(),this.destroyed=!0,Object.freeze(this),i}requestFactoryUpdate(e){this.destroyed||(this._pendingFactoryUpdatesCount++,this.updateMutex.acquire((async()=>{this.destroyed||(await e(this),this.destroyed||this._pendingFactoryUpdatesCount--)})).catch((e=>fp.errorOnce(e))))}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;const{forceNodeDataRefresh:i=!1,skipAnimations:s,seriesToUpdate:n=this.series,newAnimationBatch:r}=t??{};i&&this.series.forEach((e=>e.markNodeDataDirty()));for(const o of n)this.seriesToUpdate.add(o);if(s&&(this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),r&&this.ctx.animationManager.isActive()&&(this._performUpdateSkipAnimations=!0),this.skipSync=t?.skipSync??!1,this.debug.check()){let t=(new Error).stack??"<unknown>";t=t.replace(/\([^)]*/g,""),this.updateRequestors[t]=e}e<this.performUpdateType&&(this.performUpdateType=e,this.ctx.domManager.setDataBoolean("updatePending",!0),this.performUpdateTrigger.schedule(t?.backOffMs))}async performUpdate(e){const{performUpdateType:t,extraDebugStats:i,_performUpdateSplits:s,ctx:n}=this,r=[...this.seriesToUpdate];this.performUpdateType=7,this.seriesToUpdate.clear(),0===this.updateShortcutCount&&t<6&&(n.animationManager.startBatch(this._performUpdateSkipAnimations),n.animationManager.onBatchStop((()=>this.chartAnimationPhase="ready"))),this.debug("Chart.performUpdate() - start",Tx[t]);let o=performance.now();s.start??(s.start=o);const a=e=>{s[e]??(s[e]=0),s[e]+=performance.now()-o,o=performance.now()};let l=!1;switch(t){case 0:this.ctx.updateService.dispatchPreDomUpdate(),this.updateDOM();case 1:await this.updateData(),a("\u2b07\ufe0f");case 2:await this.processData(),this.seriesAreaManager.dataChanged(),a("\ud83c\udfed");case 3:if(this.checkUpdateShortcut(3))break;if(!this.checkFirstAutoSize(r)){l=!0;break}await this.processLayout(),a("\u2316");case 4:{if(this.checkUpdateShortcut(4))break;const{seriesRect:e}=this;await Promise.all(r.map((t=>t.update({seriesRect:e})))),a("\ud83e\udd14"),this.updateAriaLabels()}case 5:if(this.checkUpdateShortcut(5))break;n.updateService.dispatchPreSceneRender(this.getMinRects()),a("\u2196");case 6:if(this.checkUpdateShortcut(6))break;n.animationManager.endBatch(),i.updateShortcutCount=this.updateShortcutCount,await n.scene.render({debugSplitTimes:s,extraDebugStats:i,seriesRect:this.seriesRect}),this.extraDebugStats={};for(const e in s)delete s[e];this.ctx.domManager.incrementDataCounter("sceneRenders");case 7:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=!1,n.animationManager.endBatch()}l||(n.updateService.dispatchUpdateComplete(this.getMinRects()),this.ctx.domManager.setDataBoolean("updatePending",!1));const h=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round(100*(h-s.start))/100,count:e,performUpdateType:Tx[t]})}updateThemeClassName(){const{theme:e}=this.chartOptions.processedOptions,t="ag-charts-theme-",i=[`${t}default`,`${t}default-dark`];let s=i[0],n=!1;"string"===typeof e?(s=e.replace("ag-",t),n=e.includes("-dark")):"string"===typeof e?.baseTheme&&(s=e.baseTheme.replace("ag-",t),n=e.baseTheme.includes("-dark")),i.includes(s)||(s=n?i[1]:i[0]),this.ctx.domManager.setThemeClass(s)}updateDOM(){this.updateThemeClassName();const{enabled:e,tabIndex:t}=this.keyboard;this.ctx.domManager.setTabIndex(e?t??0:-1)}updateAriaLabels(){this.ctx.domManager.updateCanvasLabel(this.getAriaLabel())}checkUpdateShortcut(e){return this.updateShortcutCount>3?(fp.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=e&&(this.updateShortcutCount++,!0)}checkFirstAutoSize(e){if(null!=this.width&&null!=this.height);else if(!this._lastAutoSize){const t=this._performUpdateNoRenderCount++,i=(t+1)**2*40;if(t<8)return this.update(3,{seriesToUpdate:e,backOffMs:i}),this.debug("Chart.checkFirstAutoSize() - backing off until first size update",i),!1;this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}return this._performUpdateNoRenderCount=0,!0}onAxisChange(e,t){null==t&&0===e.length||this.ctx.axisManager.updateAxes(t??[],e)}onSeriesChange(e,t){const i=t?.filter((t=>!e.includes(t)))??[];this.destroySeries(i),this.seriesLayerManager?.setSeriesCount(e.length);for(const s of e){if(t?.includes(s))continue;s.rootGroup.isRoot()&&this.seriesLayerManager.requestGroup(s);const e=this;s.chart={get mode(){return e.mode},get isMiniChart(){return!1},get seriesRect(){return e.seriesRect},placeLabels:t=>e.placeLabels(t)},s.resetAnimation(this.chartAnimationPhase),this.addSeriesListeners(s),s.addChartEventListeners()}this.seriesAreaManager?.seriesChanged(e)}destroySeries(e){e?.forEach((e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.removeEventListener("groupingChanged",this.seriesGroupingChanged),e.destroy(),this.seriesLayerManager.releaseGroup(e),e.chart=void 0}))}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.addEventListener("groupingChanged",this.seriesGroupingChanged)}assignSeriesToAxes(){for(const e of this.axes)e.boundSeries=this.series.filter((t=>t.axes[e.direction]===e))}assignAxesToSeries(){const e=hf(this.axes,(e=>e.direction));
2this.series.forEach((t=>{t.directions.forEach((i=>{const s=e[i];if(!s)return void fp.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);const n=t.getKeys(i),r=s.find((e=>!e.keys.length||n.some((t=>e.keys.includes(t)))));r?t.axes[i]=r:fp.warnOnce(`no matching axis for direction [${i}] and keys [${n}]; check series and axes configuration.`)}))}))}parentResize(e){if(null==e||null!=this.width&&null!=this.height)return;let{width:t,height:i}=e;if(t=Math.floor(t),i=Math.floor(i),0===t&&0===i)return;const[s=0,n=0]=this._lastAutoSize??[];s===t&&n===i||(this._lastAutoSize=[t,i],this.resize("SizeMonitor",{}))}resize(e,t){const{scene:i,animationManager:s}=this.ctx,{inWidth:n,inHeight:r,inMinWidth:o,inMinHeight:a}=t;this.ctx.domManager.setSizeOptions(o??this.minWidth,a??this.minHeight,n??this.width,r??this.height);const l=n??this.width??this._lastAutoSize?.[0],h=r??this.height??this._lastAutoSize?.[1];if(this.debug(`Chart.resize() from ${e}`,{width:l,height:h,stack:(new Error).stack}),null!=l&&null!=h&&ym(l)&&ym(h)&&i.resize(l,h)){s.reset();let e=!0;null!=this.width&&null!=this.height||!this._firstAutoSize||(e=!1,this._firstAutoSize=!1),this.update(3,{forceNodeDataRefresh:!0,skipAnimations:e})}}async updateData(){this.series.forEach((e=>e.setChartData(this.data)));const e=this.modulesManager.mapModules((e=>e.updateData?.(this.data)));await Promise.all(e)}async processData(){this.series.some((e=>e.canHaveAxes))&&(this.assignAxesToSeries(),this.assignSeriesToAxes());const e=new _x(this.mode),t=this.series.map((t=>t.processData(e))),i=this.modulesManager.mapModules((t=>t.processData?.(e)));e.execute(),await Promise.all([...t,...i]);for(const{legendType:s,legend:n}of this.modulesManager.legends())n.data=this.getLegendData(s,"integrated"!==this.mode)}placeLabels(e){const t=[],i=[];for(const c of this.series){if(!c.visible)continue;const e=c.getLabelData();s=e?.[0],null!=s&&"object"===typeof s.point&&"object"===typeof s.label&&(i.push(e),t.push(c))}var s;const{seriesRect:n}=this,{top:r,right:o,bottom:a,left:l}=this.seriesArea.padding,h=n&&i.length>0?function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;const s=[];e=e.map((e=>e.slice().sort(((e,t)=>t.point.size-e.point.size))));for(let l=0;l<e.length;l++){const h=s[l]=[],c=e[l];if(c?.length&&c[0].label)for(let l=0,d=c.length;l<d;l++){const d=c[l],{point:u,label:p,marker:g}=d,{text:m,width:f,height:v}=p,y=.5*u.size;let C=0,S=0;if(y>0&&null!=d.placement){const e=pC[d.placement];C=(.5*f+y+i)*e.x,S=(.5*v+y+i)*e.y}const w=u.x-.5*f+C-((g?.center.x??.5)-.5)*u.size,b=u.y-.5*v+S-((g?.center.y??.5)-.5)*u.size;(!t||(o=b,a=v,(r=w)+f<(n=t).x+n.width&&r>n.x&&o>n.y&&o+a<n.y+n.height))&&(e.some((e=>e.some((e=>dC(e.point,e.marker?.center,w,b,f,v)))))||s.some((e=>e.some((e=>uC(e,w,b,f,v)))))||h.push({index:l,text:m,x:w,y:b,width:f,height:v,datum:d}))}}var n,r,o,a;return s}(i,{x:-l,y:-r,width:n.width+l+o,height:n.height+r+a},e):[];return new Map(h.map(((e,i)=>[t[i],e])))}getLegendData(e,t){var i;const s=this.series.filter((e=>e.properties.showInLegend)).flatMap((t=>t.getLegendData(e)));if(t&&s.every((e=>"category"===e.legendType))){const e={},t=new Map(this.series.map((e=>[e.id,e.type])));for(const{seriesId:n,symbols:[{marker:r}],label:o}of s){if(null==r.fill)continue;const s=t.get(n),a=e[s]??(e[s]={});a[i=o.text]??(a[i]=r.fill),a[o.text]!==r.fill&&fp.warnOnce(`legend item '${o.text}' has multiple fill colors, this may cause unexpected behaviour.`)}}return s}async processLayout(){const e=this.animationRect,{width:t,height:i}=this.ctx.scene,s=this.ctx.layoutManager.createContext(t,i);await this.performLayout(s),e&&!this.animationRect?.equals(e)&&this.ctx.animationManager.skipCurrentBatch(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)}async waitForUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=performance.now();for(this._pendingFactoryUpdatesCount>0&&await this.updateMutex.waitForClearAcquireQueue();7!==this.performUpdateType;){if(performance.now()-i>e){const i=`Chart.waitForUpdate() timeout of ${e} reached - first chart update taking too long.`;if(t)throw new Error(i);fp.warnOnce(i)}await mw(50)}await this.updateMutex.waitForClearAcquireQueue()}getMinRects(){const{width:e,height:t}=this.ctx.scene,i=this.series.map((i=>i.getMinRects(e,t))).filter(om);if(0===i.length)return;let s=0,n=0,r=0,o=0;for(const{minRect:h,minVisibleRect:c}of i)s=Math.max(s,h.width),n=Math.max(n,h.height),r=Math.max(r,c.width),o=Math.max(o,c.height);const a=new Vg(0,0,s,n);let l=a.clone();return r>0&&o>0&&(l=new Vg(0,0,r,o)),{minRect:a,minVisibleRect:l}}
2filterMiniChartSeries(e){return e?.filter((e=>!1!==e.showInMiniChart))}applyOptions(e){const t=e!==this.chartOptions?this.chartOptions.processedOptions:{},i=e.processedOptions,s=e.diffOptions(t);if(null==s)return;FM("Chart.applyOptions() - applying delta",s);const n=this.applyModules(i);s.listeners&&this.registerListeners(this,s.listeners),wC(this,s,{skip:["type","data","series","listeners","preset","theme","legend.listeners","navigator.miniChart.series","navigator.miniChart.label","locale.localeText","axes","topology","nodes","initialState","styleContainer"]});let r=!1,o="no-op";null!=s.series&&(o=this.applySeries(this,s.series,t?.series),r=!0),"replaced"===o&&this.resetAnimations(),this.applyAxes(this,i,t,o,[],!0)&&(r=!0),s.data&&(this.data=s.data),s.legend?.listeners&&this.modulesManager.isEnabled("legend")&&Object.assign(this.legend.listeners,s.legend.listeners),s.locale?.localeText&&(this.modulesManager.getModule("locale").localeText=s.locale?.localeText),this.chartOptions=e;const a=this.modulesManager.getModule("navigator"),l=this.modulesManager.getModule("zoom");a?.enabled||l?.enabled||this.ctx.zoomManager.updateZoom("chart");const h=a?.miniChart,c=i.navigator?.miniChart?.series??i.series;!0===h?.enabled&&null!=c?this.applyMiniChartOptions(h,c,i,t):!1===h?.enabled&&(h.series=[],h.axes=[]),this.ctx.annotationManager.setAnnotationStyles(e.annotationThemes),r||(r=this.shouldForceNodeDataRefresh(s,o));const d=r||n?0:3;this.maybeResetAnimations(o),FM("Chart.applyOptions() - update type",Tx[d],{seriesStatus:o,forceNodeDataRefresh:r}),this.update(d,{forceNodeDataRefresh:r,newAnimationBatch:!0}),(s.initialState||s.theme)&&this.applyInitialState(e.userOptions.initialState)}applyInitialState(e){const{ctx:{annotationManager:t,historyManager:i,stateManager:s}}=this;if(null!=e?.annotations){const i=e.annotations.map((e=>Im(e,t.getAnnotationTypeStyles(e.type))));s.setState(t,i)}null!=e&&i.clear()}maybeResetAnimations(e){if("standalone"===this.mode)switch(e){case"series-grouping-change":case"replaced":this.resetAnimations()}}shouldForceNodeDataRefresh(e,t){const i=!!e.data||"data-change"===t||"replaced"===t,s=qx.getKeys(),n=Object.values(s).some((t=>null!=e[t])),r=null!=e.title&&null!=e.subtitle;return i||n||r}applyMiniChartOptions(e,t,i,s){const n=s?.navigator?.miniChart?.series??s?.series,r=this.applySeries(e,this.filterMiniChartSeries(t),this.filterMiniChartSeries(n));this.applyAxes(e,i,s,r,["axes[].tick","axes[].thickness","axes[].title","axes[].crosshair","axes[].gridLine","axes[].label"]);const o=e.series;for(const h of o)h.properties.id=void 0;const a=e.axes,l=a.find((e=>"x"===e.direction));for(const h of a)h.gridLine.enabled=!1,h.label.enabled=h===l,h.tick.enabled=!1,h.interactionEnabled=!1;if(null!=l){const e=i.navigator?.miniChart,t=e?.label,s=e?.label?.interval;l.line.enabled=!1,l.label.set(Am(t,["interval","rotation","minSpacing","autoRotate","autoRotateAngle"])),l.tick.set(Am(s,["enabled","width","size","color","interval","step"]));const n=s?.step;null!=n&&(l.interval.step=n)}}applyModules(e){const{type:t}=this.constructor;let i=!1;for(const s of gw.byType("root","legend")){const n=null!=e[s.optionsKey]&&s.chartTypes.includes(t);n!==this.modulesManager.isEnabled(s)&&(n?(this.modulesManager.addModule(s,(e=>e.moduleFactory(this.getModuleContext()))),"legend"===s.type&&this.modulesManager.getModule(s)?.attachLegend(this.ctx.scene),this[s.optionsKey]=this.modulesManager.getModule(s)):(this.modulesManager.removeModule(s),delete this[s.optionsKey]),i=!0)}return i}initSeriesDeclarationOrder(e){for(let t=0;t<e.length;t++)e[t]._declarationOrder=t}applySeries(e,t,i){if(!t)return"no-change";const s=function(e,t,i){const s=(e,t,i)=>{const s=[e];for(const n of aM)n in t&&null!=t[n]&&s.push(`${n}=${t[n]}`);return i?.seriesGrouping&&s.push(`seriesGrouping.groupId=${i?.seriesGrouping.groupId}`),s.join(";")},n=new Map;let r=0;for(const h of e){const e=s(h.type,h.properties,i?.[r]);n.has(e)||n.set(e,[]),n.get(e)?.push([h,r++])}const o=new Map;for(const h of t){const e=s(h.type,h,h);o.has(e)||o.set(e,[]),o.get(e)?.push(h)}if(![...n.keys()].some((e=>o.has(e))))return{status:"no-overlap",oldKeys:n.keys(),newKeys:o.keys()};const a=[];let l=-1;for(const[h,c]of o.entries())for(const e of c){l++;const t=n.get(h);if(null==t||t.length<1){a.push({opts:e,idx:l,status:"add"}),n.delete(h);continue}const[s,r]=t.shift(),o=vC(i?.[r]??{},e??{}),{groupIndex:c,stackIndex:d}=o?.seriesGrouping??{};null!=c||null!=d?a.push({opts:e,series:s,diff:o,idx:r,status:"series-grouping"}):o?a.push({opts:e,series:s,diff:o,idx:r,status:"update"}):a.push({opts:e,series:s,idx:r,status:"no-op"}),0===t.length&&n.delete(h)}for(const h of n.values())for(const[e,t]of h)a.push({series:e,idx:t,status:"remove"});return{status:"overlap",changes:a}}(e.series,t,i);if("no-overlap"===s.status)return FM(`Chart.applySeries() - creating new series instances, status: ${s.status}`,s),e.series=t.map((e=>this.createSeries(e))),this.initSeriesDeclarationOrder(e.series),"replaced";FM("Chart.applySeries() - matchResult",s);const n=[];let r=!1,o=!1,a=!1;for(const l of s.changes)switch(o||(o="series-grouping"===l.status),r||(r=null!=l.diff?.data),a||(a="no-op"!==l.status),l.status){case"add":{const e=this.createSeries(l.opts);n.push(e),FM("Chart.applySeries() - created new series",e);break}
2case"remove":FM(`Chart.applySeries() - removing series at previous idx ${l.idx}`,l.series);break;case"no-op":n.push(l.series),FM(`Chart.applySeries() - no change to series at previous idx ${l.idx}`,l.series);break;default:{const{series:e,diff:t,idx:i}=l;FM(`Chart.applySeries() - applying series diff previous idx ${i}`,t,e),this.applySeriesValues(e,t),e.markNodeDataDirty(),n.push(e)}}return this.initSeriesDeclarationOrder(n),FM("Chart.applySeries() - final series instances",n),e.series=n,o?"series-grouping-change":r?"data-change":a?"updated":"no-op"}applyAxes(e,t,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(!("axes"in t)||!t.axes)return!1;n=["axes[].type",...n];const{axes:o}=t;if(!("replaced"===s)&&e.axes.length===o.length&&e.axes.every(((e,t)=>e.type===o[t].type))&&hM(i))return e.axes.forEach(((e,t)=>{const s=vC(i.axes?.[t]??{},o[t]);FM(`Chart.applyAxes() - applying axis diff idx ${t}`,s);wC(e,s,{path:`axes[${t}]`,skip:n})})),!0;FM(`Chart.applyAxes() - creating new axes instances; seriesStatus: ${s}`),e.axes=this.createAxis(o,n);const a={x:[],y:[]};return e.axes.forEach((e=>{const{id:t}=e,i=e.getRegionNode();null!=i&&a[e.direction].push({id:t,node:i})})),r&&(this.ctx.regionManager.updateRegion("horizontal-axes",...a.x),this.ctx.regionManager.updateRegion("vertical-axes",...a.y)),!0}createSeries(e){const t=iM.create(e.type,this.getModuleContext());return this.applySeriesOptionModules(t,e),this.applySeriesValues(t,e),t}applySeriesOptionModules(e,t){const i=e.createModuleContext(),s=e.getModuleMap();for(const n of gw.byType("series-option"))n.optionsKey in t&&n.seriesTypes.includes(e.type)&&s.addModule(n,(e=>e.moduleFactory(i)))}applySeriesValues(e,t){const i=e.getModuleMap(),{type:s,data:n,listeners:r,seriesGrouping:o,showInMiniChart:a,...l}=t;for(const h of $x)if("series-option"===h.type&&h.optionsKey in l){const e=i.getModule(h.optionsKey);if(e){const t=l[h.optionsKey];delete l[h.optionsKey],e.properties.set(t)}}e.properties.set(l),"data"in t&&e.setOptionsData(n),r&&this.registerListeners(e,r),"seriesGrouping"in t&&(e.seriesGrouping=null==o?void 0:{...e.seriesGrouping,...o})}createAxis(e,t){const i=[],s=this.getModuleContext();for(let n=0;n<e.length;n++){const r=e[n],o=Kx.create(r.type,s);this.applyAxisModules(o,r),wC(o,r,{path:`axes[${n}]`,skip:t}),i.push(o)}return function(e){const t=[],i=[],s=[...oM];for(const r of e)r instanceof QS&&("string"===typeof(n=r.position)&&oM.includes(n)?i.push(r.position):t.push(r));var n;for(const r of t){let e;do{e=s.pop()}while(e&&i.includes(e));if(null==e)break;r.position=e}}(i),i}applyAxisModules(e,t){const i=e.createModuleContext(),s=e.getModuleMap();for(const n of gw.byType("axis-option")){const r=null!=t[n.optionsKey];r!==s.isEnabled(n)&&(r?(s.addModule(n,(e=>e.moduleFactory(i))),e[n.optionsKey]=s.getModule(n)):(s.removeModule(n),delete e[n.optionsKey]))}}registerListeners(e,t){e.clearEventListeners();for(const[i,s]of Object.entries(t))um(s)&&e.addEventListener(i,s)}};NM.chartsInstances=new WeakMap,op([RC({newValue(e){this.destroyed||(this.ctx.domManager.setContainer(e),NM.chartsInstances.set(e,this))},oldValue(e){NM.chartsInstances.delete(e)}})],NM.prototype,"container",2),op([RC({newValue(e){this.resize("width option",{inWidth:e})}})],NM.prototype,"width",2),op([RC({newValue(e){this.resize("height option",{inHeight:e})}})],NM.prototype,"height",2),op([RC({newValue(e){this.resize("minWidth option",{inMinWidth:e})}})],NM.prototype,"minWidth",2),op([RC({newValue(e){this.resize("minHeight option",{inMinHeight:e})}})],NM.prototype,"minHeight",2),op([Ef(Lf)],NM.prototype,"padding",2),op([Ef(Lf)],NM.prototype,"seriesArea",2),op([Ef(Lf)],NM.prototype,"keyboard",2),op([Ef(Sv(["standalone","integrated"],"a chart mode"))],NM.prototype,"mode",2),op([MC("chartCaptions.title")],NM.prototype,"title",2),op([MC("chartCaptions.subtitle")],NM.prototype,"subtitle",2),op([MC("chartCaptions.footnote")],NM.prototype,"footnote",2),op([RC({changeValue(e,t){this.onAxisChange(e,t)}})],NM.prototype,"axes",2),op([RC({changeValue(e,t){this.onSeriesChange(e,t)}})],NM.prototype,"series",2);var OM=NM,GM=class{constructor(e,t,i){this.root=new zM(e,t,i)}clear(e){this.root.clear(e)}addValue(e,t){const i={hitTester:e,value:t,distanceSquared:(t,i)=>e.distanceSquared(t,i)};this.root.addElem(i)}find(e,t){const i={best:{nearest:void 0,distanceSquared:1/0}};return this.root.find(e,t,i),i.best}},BM=class{constructor(e,t,i,s){this.nw=e,this.ne=t,this.sw=i,this.se=s}addElem(e){this.nw.addElem(e),this.ne.addElem(e),this.sw.addElem(e),this.se.addElem(e)}find(e,t,i){this.nw.find(e,t,i),this.ne.find(e,t,i),this.sw.find(e,t,i),this.se.find(e,t,i)}},VM=class{constructor(e,t,i){this.capacity=e,this.maxdepth=t,this.boundary=i??Vg.NaN,this.elems=[],this.subdivisions=void 0}clear(e){this.elems.length=0,this.boundary=e,this.subdivisions=void 0}
2addElem(e){this.addCondition(e)&&(void 0===this.subdivisions?0===this.maxdepth||this.elems.length<this.capacity?this.elems.push(e):this.subdivide(e):this.subdivisions.addElem(e))}find(e,t,i){this.findCondition(e,t,i)&&(void 0===this.subdivisions?this.findAction(e,t,i):this.subdivisions.find(e,t,i))}subdivide(e){this.subdivisions=this.makeSubdivisions();for(const t of this.elems)this.subdivisions.addElem(t);this.subdivisions.addElem(e),this.elems.length=0}makeSubdivisions(){const{x:e,y:t,width:i,height:s}=this.boundary,{capacity:n}=this,r=this.maxdepth-1,o=i/2,a=s/2,l=new Vg(e,t,o,a),h=new Vg(e+o,t,o,a),c=new Vg(e,t+a,o,a),d=new Vg(e+o,t+a,o,a);return new BM(this.child(n,r,l),this.child(n,r,h),this.child(n,r,c),this.child(n,r,d))}},zM=class e extends VM{addCondition(e){const{x:t,y:i}=e.hitTester.midPoint;return this.boundary.containsPoint(t,i)}findCondition(e,t,i){const{best:s}=i;return 0!==s.distanceSquared&&this.boundary.distanceSquared(e,t)<s.distanceSquared}findAction(e,t,i){const s=ug(e,t,this.elems,i.best.distanceSquared);void 0!==s.nearest&&s.distanceSquared<i.best.distanceSquared&&(i.best=s)}child(t,i,s){return new e(t,i,s)}},HM=["ArrowDown","ArrowUp","Circle","Cross","Diamond","Heart","MapPin","Plus","Square","Star","Triangle"],WM=Object.freeze({x:.5,y:.5}),jM=class extends gb{constructor(){super(...arguments),this.x=0,this.y=0,this.size=12}isBuiltIn(){return HM.includes(this.constructor.className??"")}computeBBox(){if(!this.isBuiltIn())return this.path.computeBBox();const{x:e,y:t,size:i}=this,{center:s}=this.constructor;return new Vg(e-i*s.x,t-i*s.y,i,i)}applyPath(e,t){const{path:i}=this;let{x:s,y:n}=this;i.clear();for(const{x:r,y:o,t:a}of t)s+=r*e,n+=o*e,"move"===a?i.moveTo(s,n):i.lineTo(s,n);i.closePath()}executeFill(e,t){if(t)return super.executeFill(e,t)}executeStroke(e,t){if(t)return super.executeStroke(e,t)}};op([pb()],jM.prototype,"x",2),op([pb()],jM.prototype,"y",2),op([pb({convertor:Math.abs})],jM.prototype,"size",2);var UM=class extends(yy(Cy(Sy(jM)))){};UM.center=WM;var _M=class extends UM{updatePath(){const{x:e,y:t,path:i,size:s}=this,n=s/2;i.clear(),i.arc(e,t,n,0,2*Math.PI),i.closePath()}};_M.className="Circle";var KM=class e extends UM{updatePath(){const t=this.size/4.2;super.applyPath(t,e.moves)}};KM.className="Cross",KM.moves=[{x:-1,y:0,t:"move"},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:-1,y:1},{x:-1,y:-1}];var $M=KM,YM=class e extends UM{updatePath(){const t=this.size/2;super.applyPath(t,e.moves)}};YM.className="Diamond",YM.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}];var ZM=YM,qM=class extends UM{rad(e){return e/180*Math.PI}updatePath(){const{x:e,path:t,size:i,rad:s}=this,n=i/4,r=this.y+n/2;t.clear(),t.arc(e-n,r-n,n,s(130),s(330)),t.arc(e+n,r-n,n,s(220),s(50)),t.lineTo(e,r+n),t.closePath()}};qM.className="Heart";var QM=class extends UM{updatePath(){const{path:e,x:t,y:i}=this,s=this.size,n=.5;e.clear(),e.moveTo(t+-.34375*s,i+-.65625*s),e.cubicCurveTo(t+-.34375*s,i+-.848509*s,t+-.192259*s,i+-1*s,t+0*s,i+-1*s),e.cubicCurveTo(t+(.692259-n)*s,i+-1*s,t+.34375*s,i+-.848509*s,t+.34375*s,i+-.65625*s),e.cubicCurveTo(t+.34375*s,i+-.506176*s,t+.284625*s,i+(.600181-1)*s,t+(.716461-n)*s,i+(.695393-1)*s),e.cubicCurveTo(t+.199009*s,i+-.280231*s,t+(.681271-n)*s,i+-.256896*s,t+(.663785-n)*s,i+(.766105-1)*s),e.cubicCurveTo(t+(.611893-n)*s,i+(.834367-1)*s,t+(.562228-n)*s,i+(.899699-1)*s,t+(.528896-n)*s,i+(.980648-1)*s),e.cubicCurveTo(t+(.524075-n)*s,i+(.992358-1)*s,t+(.512663-n)*s,i+0*s,t+0*s,i+0*s),e.cubicCurveTo(t+(.487337-n)*s,i+0*s,t+(.475925-n)*s,i+(.992358-1)*s,t+(.471104-n)*s,i+(.980648-1)*s),e.cubicCurveTo(t+(.487337-n)*s,i+0*s,t+(.475925-n)*s,i+(.992358-1)*s,t+(.471104-n)*s,i+(.980648-1)*s),e.cubicCurveTo(t+(.437772-n)*s,i+(.899699-1)*s,t+(.388107-n)*s,i+(.834367-1)*s,t+(.336215-n)*s,i+(.766105-1)*s),e.cubicCurveTo(t+(.318729-n)*s,i+-.256896*s,t+-.199009*s,i+-.280231*s,t+(.283539-n)*s,i+(.695393-1)*s),e.cubicCurveTo(t+-.284625*s,i+(.600181-1)*s,t+-.34375*s,i+-.506176*s,t+-.34375*s,i+-.65625*s),e.closePath()}};QM.className="MapPin",QM.center={x:.5,y:1};var XM=class e extends UM{updatePath(){const t=this.size/3;super.applyPath(t,e.moves)}};XM.className="Plus",XM.moves=[{x:-.5,y:-.5,t:"move"},{x:0,y:-1},{x:1,y:0},{x:0,y:1},{x:1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:-1},{x:-1,y:0},{x:0,y:-1}];var JM=XM,eD=class extends UM{updatePath(){const{path:e,x:t,y:i}=this,s=this.size/2;e.clear(),e.moveTo(this.align(t-s),this.align(i-s)),e.lineTo(this.align(t+s),this.align(i-s)),e.lineTo(this.align(t+s),this.align(i+s)),e.lineTo(this.align(t-s),this.align(i+s)),e.closePath()}};eD.className="Square";var tD=class extends UM{updatePath(){const{x:e,y:t,path:i,size:s}=this,n=s/2,r=Math.PI/2;i.clear();for(let o=0;o<10;o++){const a=o%2===0?s:n,l=o*Math.PI/5-r,h=e+Math.cos(l)*a,c=t+Math.sin(l)*a;i.lineTo(h,c)}i.closePath()}};tD.className="Star";var iD=class e extends UM{updatePath(){const t=1.1*this.size;super.applyPath(t,e.moves)}};iD.className="Triangle",iD.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}];var sD=iD,nD={circle:_M,cross:$M,diamond:ZM,heart:qM,pin:QM,plus:JM,square:eD,star:tD,triangle:sD},rD=Object.keys(nD);function oD(e){return"string"===typeof e&&rD.includes(e)}function aD(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eD;
2return oD(e)?nD[e]:"function"===typeof e?e:eD}var lD=class extends MM{constructor(){super(...arguments),this.showFocusBox=!0}getScaleInformation(e){let{xScale:t,yScale:i}=e;return{isContinuousX:sf.is(t),isContinuousY:sf.is(i),xScaleType:t?.type,yScaleType:i?.type}}getModulePropertyDefinitions(){const e=this.axes.x?.scale,t=this.axes.y?.scale;return this.moduleMap.mapModules((i=>i.getPropertyDefinitions(this.getScaleInformation({xScale:e,yScale:t})))).flat()}async requestDataModel(e,t,i){i.props.push(...this.getModulePropertyDefinitions());const{dataModel:s,processedData:n}=await e.request(this.id,t??[],i);return this.dataModel=s,this.processedData=n,this.dispatch("data-processed",{dataModel:s,processedData:n}),{dataModel:s,processedData:n}}isProcessedDataAnimatable(){const e=this.processedData?.reduced?.animationValidation;if(!e)return!0;const{orderedKeys:t,uniqueKeys:i}=e;return t&&i}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}pickFocus(e){const t=this.getNodeData();if(void 0===t||0===t.length)return;const i=this.computeFocusDatumIndex(e,t);if(void 0===i)return;const{showFocusBox:s}=this,n=t[i],r={...e,datumIndex:i},o=this.computeFocusBounds(r);return void 0!==o?{bounds:o,showFocusBox:s,datum:n,datumIndex:i}:void 0}computeFocusDatumIndex(e,t){const i=e=>{const{missing:i=!1,enabled:s=!0,focusable:n=!0}=t[e];return!i&&s&&n},s=e=>{for(;e>=0&&!i(e);)e--;return-1===e?void 0:e},n=e=>{for(;e<t.length&&!i(e);)e++;return e===t.length?void 0:e};let r;const o=Ig(0,e.datumIndex,t.length-1);return r=e.datumIndexDelta<0?s(o):e.datumIndexDelta>0?n(o):n(o)??s(o),void 0===r?0===e.datumIndexDelta?void 0:e.datumIndex-e.datumIndexDelta:r}},hD=class extends Df{constructor(){super(...arguments),this.fill="rgba(255,255,255, 0.33)",this.stroke="rgba(0, 0, 0, 0.4)",this.strokeWidth=2}};op([Ef(Xf,{optional:!0})],hD.prototype,"fill",2),op([Ef(Hf,{optional:!0})],hD.prototype,"fillOpacity",2),op([Ef(Xf,{optional:!0})],hD.prototype,"stroke",2),op([Ef(zf,{optional:!0})],hD.prototype,"strokeWidth",2),op([Ef(Hf,{optional:!0})],hD.prototype,"strokeOpacity",2),op([Ef(lv,{optional:!0})],hD.prototype,"lineDash",2),op([Ef(zf,{optional:!0})],hD.prototype,"lineDashOffset",2);var cD=class extends Df{};op([Ef(zf,{optional:!0})],cD.prototype,"strokeWidth",2),op([Ef(Hf,{optional:!0})],cD.prototype,"dimOpacity",2),op([Ef(kf,{optional:!0})],cD.prototype,"enabled",2);var dD=class extends Df{constructor(){super(...arguments),this.color="black"}};op([Ef(Xf,{optional:!0})],dD.prototype,"color",2);var uD=class extends Df{constructor(){super(...arguments),this.enabled=!0}};op([Ef(kf,{optional:!0})],uD.prototype,"enabled",2);var pD=class extends Df{constructor(){super(...arguments),this.item=new hD,this.series=new cD,this.text=new dD}};op([Ef(Lf)],pD.prototype,"item",2),op([Ef(Lf)],pD.prototype,"series",2),op([Ef(Lf)],pD.prototype,"text",2);var gD=class extends Df{constructor(){super(...arguments),this.visible=!0,this.focusPriority=1/0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlight=new uD,this.highlightStyle=new pD}};op([Ef(Of,{optional:!0})],gD.prototype,"id",2),op([Ef(kf)],gD.prototype,"visible",2),op([Ef(Bf,{optional:!0})],gD.prototype,"focusPriority",2),op([Ef(kf)],gD.prototype,"showInLegend",2),op([Ef(Of)],gD.prototype,"cursor",2),op([Ef(yv)],gD.prototype,"nodeClickRange",2),op([Ef(Lf)],gD.prototype,"highlight",2),op([Ef(Lf)],gD.prototype,"highlightStyle",2);var mD={x:["xKey"],y:["yKey"]},fD={x:["xName"],y:["yName"]},vD=class extends bM{constructor(e,t,i,s){super(e,t,i,s),this.xKey=s.properties.xKey,this.yKey=s.properties.yKey}},yD=class extends gD{constructor(){super(...arguments),this.pickOutsideVisibleMinorAxis=!1}};op([Ef(Of,{optional:!0})],yD.prototype,"legendItemName",2),op([Ef(kf,{optional:!0})],yD.prototype,"pickOutsideVisibleMinorAxis",2);var CD=class extends lD{constructor(e){let{pathsPerSeries:t=["path"],hasMarkers:i=!1,hasHighlightedLabels:s=!1,pathsZIndexSubOrderOffset:n=[],datumSelectionGarbageCollection:r=!0,markerSelectionGarbageCollection:o=!0,animationAlwaysUp
2dateSelections:a=!1,animationResetFns:l,directionKeys:h,directionNames:c,...d}=e;if(super({directionKeys:h,directionNames:c,canHaveAxes:!0,...d}),this.NodeEvent=vD,this.dataNodeGroup=this.contentGroup.appendChild(new xy({name:`${this.id}-series-dataNodes`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.markerGroup=this.contentGroup.appendChild(new xy({name:`${this.id}-series-markers`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("marker")})),this.labelGroup=this.contentGroup.appendChild(new Iy({name:`${this.id}-series-labels`,zIndex:14,zIndexSubOrder:this.getGroupZIndexSubOrder("labels")})),this.labelSelection=Ty.select(this.labelGroup,lC),this.highlightSelection=Ty.select(this.highlightNode,(()=>this.opts.hasMarkers?this.markerFactory():this.nodeFactory())),this.highlightLabelSelection=Ty.select(this.highlightLabel,lC),this.annotationSelections=new Set,this.minRectsCache={dirtyNodeData:!0},this.debug=Ay.create(),!h||!c)throw new Error(`Unable to initialise series type ${this.type}`);this.opts={pathsPerSeries:t,hasMarkers:i,hasHighlightedLabels:s,pathsZIndexSubOrderOffset:n,directionKeys:h,directionNames:c,animationResetFns:l,animationAlwaysUpdateSelections:a,datumSelectionGarbageCollection:r,markerSelectionGarbageCollection:o},this.paths=[];for(let u=0;u<t.length;u++)this.paths[u]=new gb({name:`${this.id}-${t[u]}`}),this.paths[u].zIndex=4,this.paths[u].zIndexSubOrder=this.getGroupZIndexSubOrder("paths",u),this.contentGroup.appendChild(this.paths[u]);this.datumSelection=Ty.select(this.dataNodeGroup,(()=>this.nodeFactory()),r),this.markerSelection=Ty.select(this.markerGroup,(()=>this.markerFactory()),o),this.animationState=new LC("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready",disable:"disabled"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready",disable:"disabled"},waiting:{update:{target:"ready",action:e=>{this.ctx.animationManager.isSkipped()?this.resetAllAnimation(e):this.animateWaitingUpdateReady(e)}},reset:"empty",skip:"ready",disable:"disabled"},disabled:{update:e=>this.resetAllAnimation(e),reset:"empty"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},(()=>this.checkProcessedDataAnimatable()))}get contextNodeData(){return this._contextNodeData}getNodeData(){return this.contextNodeData?.nodeData}
2resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e?this.animationState.transition("skip"):"disabled"===e&&this.animationState.transition("disable")}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",(e=>this.onLegendItemClick(e))),this.ctx.chartEventManager.addListener("legend-item-double-click",(e=>this.onLegendItemDoubleClick(e))))}destroy(){super.destroy(),this._contextNodeData=void 0}async update(e){let{seriesRect:t}=e;const{visible:i,_contextNodeData:s}=this,n=this.ctx.highlightManager?.getActiveHighlight()?.series,r=n===this,o=this.checkResize(t),a=await this.updateHighlightSelection(r);await this.updateSelections(i),await this.updateNodes(a,r,i);const l=this.getAnimationData(t,s);l&&(o&&this.animationState.transition("resize",l),this.animationState.transition("update",l))}async updateSelections(e){var t;const i=!this.opts.animationAlwaysUpdateSelections&&this.ctx.animationManager.isSkipped();if((e||!i)&&(this.nodeDataRefresh||this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this.markQuadtreeDirty(),this._contextNodeData=await this.createNodeData();const e=this.isProcessedDataAnimatable();this._contextNodeData&&((t=this._contextNodeData).animationValid??(t.animationValid=e)),this.minRectsCache.dirtyNodeData=!0;const{dataModel:i,processedData:s}=this;void 0!==i&&void 0!==s&&this.dispatch("data-update",{dataModel:i,processedData:s})}await this.updateSeriesSelections()}}async updateSeriesSelections(e){const{datumSelection:t,labelSelection:i,markerSelection:s,paths:n}=this,r=this._contextNodeData;if(!r)return;const{nodeData:o,labelData:a,itemId:l}=r;await this.updatePaths({seriesHighlighted:e,itemId:l,contextData:r,paths:n}),this.datumSelection=await this.updateDatumSelection({nodeData:o,datumSelection:t}),this.labelSelection=await this.updateLabelSelection({labelData:a,labelSelection:i}),this.opts.hasMarkers&&(this.markerSelection=await this.updateMarkerSelection({nodeData:o,markerSelection:s}))}markerFactory(){return new(aD())}getGroupZIndexSubOrder(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=super.getGroupZIndexSubOrder(e,t);if("paths"===e){const[e]=i,s=this.opts.pathsZIndexSubOrderOffset[t]??0;i[0]=um(e)?()=>Number(e())+s:Number(e)+s}return i}async updateNodes(e,t,i){const{highlightSelection:s,highlightLabelSelection:n,opts:{hasMarkers:r,hasHighlightedLabels:o}}=this,a=!this.ctx.animationManager.isSkipped(),l=this.visible&&null!=this._contextNodeData&&i;this.rootGroup.visible=a||l,this.contentGroup.visible=a||l,this.highlightGroup.visible=(a||l)&&t;const h=this.getOpacity();r?(await this.updateMarkerNodes({markerSelection:s,isHighlight:!0}),this.animationState.transition("highlightMarkers",s)):(await this.updateDatumNodes({datumSelection:s,isHighlight:!0}),this.animationState.transition("highlight",s)),o&&await this.updateLabelNodes({labelSelection:n});const{dataNodeGroup:c,markerGroup:d,datumSelection:u,labelSelection:p,markerSelection:g,paths:m,labelGroup:f}=this,{itemId:v}=this.contextNodeData??{};c.opacity=h,c.visible=a||l,f.visible=l,r&&(d.opacity=h,d.zIndex=c.zIndex>=4?c.zIndex:c.zIndex+1,d.visible=l),f&&(f.opacity=h),await this.updatePathNodes({seriesHighlighted:t,itemId:v,paths:m,opacity:h,visible:l,animationEnabled:a}),c.visible&&(await this.updateDatumNodes({datumSelection:u,highlightedItems:e,isHighlight:!1}),await this.updateLabelNodes({labelSelection:p}),r&&await this.updateMarkerNodes({markerSelection:g,isHighlight:!1}))}getHighlightLabelData(e,t){const i=e.filter((e=>e.datum===t.datum&&e.itemId===t.itemId));return 0===i.length?void 0:i}getHighlightData(e,t){return t?[t]:void 0}async updateHighlightSelection(e){const{highlightSelection:t,highlightLabelSelection:i,_contextNodeData:s}=this;if(!s)return;const n=this.ctx.highlightManager?.getActiveHighlight(),r=e&&n?.datum?n:void 0;let o,a;if(null!=r){const e=this.isLabelEnabled(),{labelData:t,nodeData:i}=s;a=this.getHighlightData(i,r),o=e?this.getHighlightLabelData(t,r):void 0}return this.highlightSelection=await this.updateHighlightSelectionItem({items:a,highlightSelection:t}),this.highlightLabelSelection=await this.updateHighlightSelectionLabel({items:o,highlightLabelSelection:i}),a}markQuadtreeDirty(){this.quadtree=void 0}*datumNodesIter(){for(const{node:e}of this.datumSelection)!0!==e.datum.missing&&(yield e)}getQuadTree(){if(void 0===this.quadtree){const{width:e,height:t}=this.ctx.scene.canvas,i=new Vg(0,0,e,t);this.quadtree=new GM(100,10,i),this.initQuadTree(this.quadtree)}return this.quadtree}initQuadTree(e){}pickNodeExactShape(e){const t=super.pickNodeExactShape(e);if(t)return t;const{x:i,y:s}=e,{opts:{hasMarkers:n}}=this;let r;const{dataNodeGroup:o,markerGroup:a}=this;if(r=o.pickNode(i,s),!r&&n&&(r=a?.pickNode(i,s)),r&&!0!==r.datum.missing)return{datum:r.datum,distance:0};for(const l of this.moduleMap.modules()){const{datum:t}=l.pickNodeExact(e)??{};if(null!=t&&!0!==t?.missing)return{datum:t,distance:0}}}pickNodeClosestDatum(e){const{x:t,y:i}
2=e,{axes:s,_contextNodeData:n}=this;if(!n)return;const r=s.x,o=s.y,a=t,l=i;let h,c=1/0;for(const d of n.nodeData){const{point:{x:e=NaN,y:t=NaN}={}}=d;if(isNaN(e)||isNaN(t))continue;if(!(r?.inRange(e)&&o?.inRange(t)))continue;const i=Math.max((a-e)**2+(l-t)**2,0);i<c&&(c=i,h=d)}for(const d of this.moduleMap.modules()){const t=d.pickNodeNearest(e);if(void 0!==t&&t.distanceSquared<c){c=t.distanceSquared,h=t.datum;break}}if(h){return{datum:h,distance:Math.max(Math.sqrt(c)-(h.point?.size??0),0)}}}pickNodeMainAxisFirst(e,t){const{x:i,y:s}=e,{axes:n,_contextNodeData:r}=this,{pickOutsideVisibleMinorAxis:o}=this.properties;if(!r)return;const a=n.x,l=n.y,h=[a,l].filter(JS.is).map((e=>e.direction));if(t&&0===h.length)return;const[c="x"]=h,d=[i,s];"x"!==c&&d.reverse();const u=[1/0,1/0];let p;for(const g of r.nodeData){const{x:e=NaN,y:t=NaN}=g.point??g.midPoint??{};if(isNaN(e)||isNaN(t)||!0===g.missing)continue;const i=[a?.inRange(e),l?.inRange(t)];if("x"!==c&&i.reverse(),!i[0]||!o&&!i[1])continue;const s=[e,t];"x"!==c&&s.reverse();let n=!0;for(let r=0;r<s.length;r++){const e=Math.abs(s[r]-d[r]);if(e>u[r]){n=!1;break}e<u[r]&&(u[r]=e,u.fill(1/0,r+1,u.length))}n&&(p=g)}if(p){let t=Math.max(u[0]**2+u[1]**2-(p.point?.size??0),0);for(const i of this.moduleMap.modules()){const s=i.pickNodeMainAxisFirst(e);if(void 0!==s&&s.distanceSquared<t){p=s.datum,t=s.distanceSquared;break}}return{datum:p,distance:Math.sqrt(t)}}}onLegendItemClick(e){const{legendItemName:t}=this.properties,{enabled:i,itemId:s,series:n}=e,r=null!=t&&t===e.legendItemName;(n.id===this.id||r)&&this.toggleSeriesItem(s,i)}onLegendItemDoubleClick(e){const{enabled:t,itemId:i,series:s,numVisibleItems:n}=e,{legendItemName:r}=this.properties,o=null!=r&&r===e.legendItemName;s.id===this.id||o||t&&1===n?this.toggleSeriesItem(i,!0):this.toggleSeriesItem(i,!1)}isPathOrSelectionDirty(){return!1}getLabelData(){return[]}shouldFlipXY(){return!1}getMinRects(e,t){const{dirtyNodeData:i,sizeCache:s,minRect:n,minVisibleRect:r}=this.minRectsCache,o=JSON.stringify({width:e,height:t});if(!(o!==s)&&!i&&n&&r)return{minRect:n,minVisibleRect:r};const a=this.computeMinRects(e,t);return this.minRectsCache={dirtyNodeData:!1,sizeCache:o,minRect:a?.minRect,minVisibleRect:a?.minVisibleRect},a}computeMinRects(e,t){const i=this._contextNodeData;if(!i?.nodeData.length)return;const{nodeData:s}=i,n=Array(s.length),r=Array(s.length);for(const[f,{midPoint:v}]of s.entries())n[f]=v?.x??0,r[f]=v?.y??0;let o,a,l,h;n.sort(((e,t)=>e-t)),r.sort(((e,t)=>e-t));let c=0,d=0;for(let f=1;f<s.length;f++)n[f]>=0&&(o??(o=f)),n[f]>e&&(a??(a=f)),r[f]>=0&&(l??(l=f)),r[f]>t&&(h??(h=f)),c=Math.max(c,n[f]-n[f-1]),d=Math.max(d,r[f]-r[f-1]);a??(a=s.length),h??(h=s.length);const u=null!=o&&null!=a?n.slice(o,a):[],p=null!=l&&null!=h?r.slice(l,h):[];let g=0,m=0;for(let f=1;f<Math.max(u.length,p.length);f++){const e=u[f],t=u[f-1],i=p[f],s=p[f-1];null!=e&&null!=t&&(g=Math.max(g,e-t)),null!=i&&null!=s&&(m=Math.max(m,i-s))}return{minRect:new Vg(0,0,c,d),minVisibleRect:new Vg(0,0,g,m)}}updateHighlightSelectionItem(e){const{opts:{hasMarkers:t}}=this,{items:i,highlightSelection:s}=e,n=i??[];if(t){const e=s;return this.updateMarkerSelection({nodeData:n,markerSelection:e})}return this.updateDatumSelection({nodeData:n,datumSelection:s})}updateHighlightSelectionLabel(e){return this.updateLabelSelection({labelData:e.items??[],labelSelection:e.highlightLabelSelection})}async updateDatumSelection(e){return e.datumSelection}async updateDatumNodes(e){}async updateMarkerSelection(e){return e.markerSelection}async updateMarkerNodes(e){}async updatePaths(e){e.paths.forEach((e=>e.visible=!1))}async updatePathNodes(e){const{paths:t,opacity:i,visible:s}=e;for(const n of t)n.opacity=i,n.visible=s}resetPathAnimation(e){const{path:t}=this.opts?.animationResetFns??{};t&&e.paths.forEach((e=>{Tv([e],t)}))}resetDatumAnimation(e){const{datum:t}=this.opts?.animationResetFns??{};t&&Tv([e.datumSelection],t)}resetLabelAnimation(e){const{label:t}=this.opts?.animationResetFns??{};t&&Tv([e.labelSelection],t)}resetMarkerAnimation(e){const{marker:t}=this.opts?.animationResetFns??{};t&&this.opts.hasMarkers&&Tv([e.markerSelection],t)}resetAllAnimation(e){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.resetPathAnimation(e),this.resetDatumAnimation(e),this.resetLabelAnimation(e),this.resetMarkerAnimation(e),!1===e.contextData?.animationValid&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){const{datum:t}=this.opts?.animationResetFns??{};t&&Tv([e],t)}animateReadyHighlightMarkers(e){const{marker:t}=this.opts?.animationResetFns??{};t&&Tv([e],t)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){const e=this.getAnimationData();e&&this.animationState.transition("clear",e)}getAnimationData(e,t){const{_contextNodeData:i}=this;if(!i)return;return{datumSelection:this.datumSelection,markerSelection:this.markerSelection,labelSelection:this.labelSelection,annotationSelections:[...this.annotationSelections],contextData:i,previousContextData:t,paths:this.paths,seriesRect:e}}calculateScaling(){const e={};for(const t of Object.values(Rv)){const i=this.axes[t];if(i)if(i.scale instanceof ty){const{range:s,domain:n}=i.scale;e[t]={type:"log",convert:e=>i.scale.convert(e),domain:[n[0],n[1]],range:[s[0],s[1]]}}else if(i.scale instanceof sf){const{range:s}=i.scale,n=i.scale.getDomain();e[t]={type:"continuous",domain:[n[0],n[1]],range:[s[0],s[1]]}}else if(i.scale){const{domain:s}=i.scale;e[t]={type:"category",domain:s,range:s.map((e=>i.scale.convert(e)))}}}return e}},SD=["top","right","bottom","left"],wD=class extends OM{constructor(e,t){super(e,t),this.paired=!0,this.firstSeriesTranslation=!0,this.lastUpdateClipRect=void 0,this._lastCrossLineIds=void 0,this._lastAxisAreaWidths=new Map,this._lastClipSeries=!1,this._lastVisibility={crossLines:!0,series:!0}}onAxisChange(e,t){super.onAxisChange(e,t),this.ctx?.zoomManager.updateAxes(e)}destroySeries(e){super.destroySeries(e),this.firstSeriesTranslation=!0}getChartType(){return"cartesian"}setRootClipRects(e){const{seriesRoot:t,annotationRoot:i,highlightRoot:s}=this;t.setClipRect(e),s.setClipRect(e),i.setClipRect(e)}performLayout(e){const{firstSeriesTranslation:t,seriesRoot:i,annotationRoot:s,highlightRoot:n}=this,{seriesRect:r,visibility:o,clipSeries:a}=this.updateAxes(e.layoutBox);this.seriesRoot.visible=o.series,this.seriesRect=r,this.animationRect=e.layoutBox;const{x:l,y:h}=r;if(t){for(const e of[i,s,n])e.translationX=Math.floor(l),e.translationY=Math.floor(h);this.firstSeriesTranslation=!1}else{const{translationX:e,translationY:t}=i;Xm(this.id,"seriesRect",this.ctx.animationManager,[i,n,s],{translationX:e,translationY:t},{translationX:Math.floor(l),translationY:Math.floor(h)},{phase:"update"})}const c=r.clone().grow(this.seriesArea.padding),d=this.seriesArea.clip||a?c:void 0,{lastUpdateClipRect:u}=this;this.lastUpdateClipRect=d,this.ctx.animationManager.isActive()&&null!=u?this.ctx.animationManager.animate({id:this.id,groupId:"clip-rect",phase:"update",from:u,to:c,onUpdate:e=>this.setRootClipRects(e),onComplete:()=>this.setRootClipRects(d)}):this.setRootClipRects(d),this.ctx.layoutManager.emitLayoutComplete(e,{axes:this.axes.map((e=>e.getLayoutState())),series:{rect:r,paddedRect:c,visible:o.series,shouldFlipXY:this.shouldFlipXY()},clipSeries:a})}updateAxes(e){const t=this.axes.flatMap((e=>e.crossLines??[])).map((e=>e.id));let i,s,n;null!=this._lastCrossLineIds&&this._lastCrossLineIds.length===t.length&&this._lastCrossLineIds.every(((e,i)=>t[i]===e))?(i=new Map(this._lastAxisAreaWidths.entries()),s=this._lastClipSeries,n={...this._lastVisibility}):(i=new Map,s=!1,n={crossLines:!0,series:!0},this._lastCrossLineIds=t);const r=new Set(this.axes.map((e=>e.position)));for(const p of i.keys())r.has(p)||i.delete(p);const o=(e,t,r)=>{if([...e.keys()].some((e=>!i.has(e))))return!1;if(n.crossLines!==r.crossLines||n.series!==r.series||s!==t)return!1;for(const[s,n]of i.entries()){const t=e.get(s);if((null!=n||null!=t)&&n!==t)return!1}return!0},a=e=>{for(const[t,i]of e.entries())i&&Math.abs(i)===1/0?e.set(t,0):e.set(t,null!=i?Math.ceil(i):i);return e};let l=new Map,h={},c=!1,d=this.seriesRect?.clone(),u=0;do{i=new Map(l.entries()),s=c,Object.assign(n,h);const t=this.updateAxesPass(i,e.clone(),d);if(l=a(t.axisAreaWidths),h=t.visibility,c=t.clipSeries,({seriesRect:d}=t),u++>10){fp.warn("unable to find stable axis layout.");break}}while(!o(l,c,h));
2this.axes.forEach((e=>{e.update()}));return this.axes.forEach((t=>{if(t.setCrossLinesVisible(n.crossLines),d)switch(t.clipGrid(d.x,d.y,d.width+5,d.height+5),t.position){case"left":case"right":t.clipTickLines(e.x,d.y,e.width+5,d.height+5);break;case"top":case"bottom":t.clipTickLines(d.x,e.y,d.width+5,e.height+5)}})),this._lastAxisAreaWidths=i,this._lastVisibility=n,this._lastClipSeries=s,{seriesRect:d,visibility:n,clipSeries:s}}updateAxesPass(e,t,i){const s=new Map,n=new Map,r={series:!0,crossLines:!0};let o=!1;const a={},l=this.applySeriesPadding(t),h=i?this.buildCrossLinePadding(e):{},c=this.buildAxisBound(l,e,h,r),d=this.buildSeriesRect(c,e);for(const g of this.axes){const{position:e="left"}=g,{clipSeries:t,axisThickness:i}=this.calculateAxisDimensions({axis:g,seriesRect:d,primaryTickCounts:a,clipSeries:o});s.set(g.id,i),n.has(e)||n.set(e,[]),n.get(e)?.push(g),o=o||t}const u=new Map,p=new Map;for(const[g,m]of n.entries()){const e="left"===g||"right"===g;u.set(g,this.calculateAxisArea(m,s,p,e))}for(const[g,m]of n.entries())this.positionAxes({axes:m,position:g,axisWidths:s,axisOffsets:p,axisAreaWidths:u,axisBound:c,seriesRect:d});return{clipSeries:o,seriesRect:d,axisAreaWidths:u,visibility:r}}buildCrossLinePadding(e){const t={};this.axes.forEach((e=>{e.crossLines?.forEach((e=>{e.calculatePadding?.(t)}))}));for(const[i,s=0]of Object.entries(t))t[i]=Math.max(s-(e.get(i)??0),0);return t}applySeriesPadding(e){const t=e.clone();return SD.forEach((e=>{const i=this.seriesArea.padding[e],s=this.axes.findLast((t=>t.position===e));s?s.seriesAreaPadding=i:t.shrink(i,e)})),t}buildAxisBound(e,t,i,s){const n=e.clone(),{top:r=0,right:o=0,bottom:a=0,left:l=0}=i,h=l+o,c=r+a,d=(t.get("left")??0)+(t.get("right")??0)+h,u=(t.get("top")??0)+(t.get("bottom")??0)+c;return n.width<=d||n.height<=u?(s.crossLines=!1,s.series=!1,n):(n.x+=l,n.y+=r,n.width-=h,n.height-=c,n)}buildSeriesRect(e,t){const i=e.clone();return i.x+=t.get("left")??0,i.y+=t.get("top")??0,i.width-=(t.get("left")??0)+(t.get("right")??0),i.height-=(t.get("top")??0)+(t.get("bottom")??0),i.width=Math.max(0,i.width),i.height=Math.max(0,i.height),i}clampToOutsideSeriesRect(e,t,i,s){const{x:n,y:r,width:o,height:a}=e,l=[n,r,n+o,r+a][("x"===i?0:1)+(1===s?0:2)];return(1===s?Math.min:Math.max)(t,l)}calculateAxisDimensions(e){const{axis:t,seriesRect:i,primaryTickCounts:s}=e;let{clipSeries:n}=e;const{position:r="left",direction:o}=t;this.sizeAxis(t,i,r);const a=this.getSyncedDomain(t),l=t.calculateLayout(a,t.nice?s[o]:void 0),h="y"===o;let c;return s[o]??(s[o]=l.primaryTickCount),n||(n=t.dataDomain.clipped||t.visibleRange[0]>0||t.visibleRange[1]<1),c=null!=t.thickness&&t.thickness>0?t.thickness:h?l.bbox.width:l.bbox.height,c=Math.ceil(c),{clipSeries:n,axisThickness:c}}getSyncedDomain(e){const t=this.modulesManager.getModule("sync");if(!t?.enabled)return;const i=t.getSyncedDomain(e);if(i&&e.dataDomain.domain.length){let s;const{domain:n}=e.scale;if(sf.is(e.scale)){const[e,t]=Eg(i);s=e!==n[0]||t!==n[1]}else s=!of(i,n);s&&!this.skipSync&&t.updateSiblings()}return i}sizeAxis(e,t,i){const s=e instanceof JS||e instanceof dw,n="left"===i||"right"===i;let{min:r,max:o}=this.ctx.zoomManager.getAxisZoom(e.id);const{width:a,height:l}=t,h=n?l:a;let c=0,d=h;const{width:u,unit:p,align:g}=e.layoutConstraints;d="px"===p?c+u:d*u/100,"end"===g&&(c=h-(d-c),d=h),s&&n?[r,o]=[1-o,1-r]:n&&([c,d]=[d,c]),e.range=[c,d],e.visibleRange=[r,o],e.gridLength=n?a:l}calculateAxisArea(e,t,i,s){const{width:n,height:r,canvas:o}=this.ctx.scene;let a=s?r%o.pixelRatio:n%o.pixelRatio,l=0;for(const h of e){i.set(h.id,a);const e=t.get(h.id)??0;l=Math.max(l,a+e),h.layoutConstraints.stacked&&(a+=e+15)}return l}positionAxes(e){const{axes:t,axisBound:i,axisWidths:s,axisOffsets:n,axisAreaWidths:r,seriesRect:o,position:a}=e,l=r.get(a)??0;let h="x",c="y",d=1,u=0;"top"!==a&&"bottom"!==a||(h="y",c="x",u+=1),u+=i[h],"right"!==a&&"bottom"!==a||(d=-1,u+="x"===h?i.width:i.height);for(const p of t){const e=r.get("x"===c?"left":"top")??0;p.translation[c]=i[c]+e;const t=s.get(p.id)??0,a=n.get(p.id)??0;p.translation[h]=this.clampToOutsideSeriesRect(o,u+d*(a+t),h,d),p.gridPadding=l-a-t,p.updatePosition()}}shouldFlipXY(){return this.series.every((e=>e instanceof CD&&e.shouldFlipXY()))}};
2wD.className="CartesianChart",wD.type="cartesian";var bD=class e{constructor(e,t,i){this.factoryApi=t,this.licenseManager=i,this.chart=e}static isInstance(t){return t instanceof e||("AgChartInstanceProxy"===t.constructor?.name&&null!=t.chart||null!=t.chart&&this.validateImplementation(t))}static validateImplementation(e){const t=Object.keys(Object.getPrototypeOf(e)??{});return["getOptions","destroy"].every((e=>t.includes(e)))}async update(e){this.factoryApi.update(e,this),await this.chart.waitForUpdate()}async updateDelta(e){this.factoryApi.updateUserDelta(this,e),await this.chart.waitForUpdate()}getOptions(){const e=yC(this.chart.getOptions());for(const t in e)t.startsWith("_")&&delete e[t];return e}waitForUpdate(){return this.chart.waitForUpdate()}async download(e){const t=await this.prepareResizedChart(this,e);try{t.chart.download(e?.fileName,e?.fileFormat)}finally{t.destroy()}}async __toSVG(e){const t=await this.prepareResizedChart(this,{width:600,height:300,...e});try{return t.chart.toSVG()}finally{t.destroy()}}async getImageDataURL(e){const t=await this.prepareResizedChart(this,e);try{return t.chart.getCanvasDataURL(e?.fileFormat)}finally{t.destroy()}}getState(){const{factoryApi:{caretaker:e},chart:{ctx:{annotationManager:t}}}=this;return e.save(t)}async setState(e){const{factoryApi:{caretaker:t},chart:{ctx:{annotationManager:i}}}=this;t.restore(e,i),await this.chart.waitForUpdate()}resetAnimations(){this.chart.resetAnimations()}skipAnimations(){this.chart.skipAnimations()}destroy(){this.chart.publicApi=void 0,this.chart.destroy()}async prepareResizedChart(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{chart:i}=e,s=t.width??i.width??i.ctx.scene.canvas.width,n=t.height??i.height??i.ctx.scene.canvas.height,r=e.getState(),o=gw.hasEnterpriseModules(),a={...i.chartOptions.processedOverrides,container:document.createElement("div"),width:s,height:n},l=i.getOptions();o&&(a.animation={enabled:!1},hM(l)&&(a.toolbar={enabled:!1}),this.licenseManager?.isDisplayWatermark()&&(a.foreground={text:this.licenseManager.getWatermarkMessage(),image:{url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5I
2DMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=",width:170,height:25,right:25,bottom:50,opacity:.7}}));const h={...i.chartOptions.specialOverrides},c={...i.chartOptions.optionMetadata};null!=t.width&&null!=t.height&&(h.overrideDevicePixelRatio=1);const d=await this.factoryApi.create(l,a,h,c);
2return await d.setState(r),d.chart.ctx.zoomManager.updateZoom("chartProxy",i.ctx.zoomManager.getZoom()),i.series.forEach(((e,t)=>{e.visible||(d.chart.series[t].visible=!1)})),d.chart.update(0,{forceNodeDataRefresh:!0}),await d.waitForUpdate(),d}};bD.chartInstances=new WeakMap,op([RC({oldValue(e){e.destroyed||(e.publicApi=void 0),bD.chartInstances.delete(e)},newValue(e){e.publicApi=this,bD.chartInstances.set(e,this)}})],bD.prototype,"chart",2);var xD=bD,MD=class extends uw{constructor(e){super(),this.ctx=e,this.localeText=void 0}};op([EC((e=>{e.ctx.localeManager.setLocaleText(e.localeText)})),Ef(Ff,{optional:!0})],MD.prototype,"localeText",2),op([EC((e=>{e.ctx.localeManager.setLocaleTextFormatter(e.getLocaleText)})),Ef(Nf,{optional:!0})],MD.prototype,"getLocaleText",2);var DD={type:"root",optionsKey:"locale",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new MD(e)},ID=class extends sf{constructor(){super([0,1],[0,1]),this.type="number"}toDomain(e){return e}ticks(){const e=this.tickCount??sf.defaultTickCount;if(!this.domain||this.domain.length<2||e<1||!this.domain.every(isFinite))return[];this.refresh();const[t,i]=this.getDomain();if(this.interval){const e=Math.abs(this.interval);if(!Jv((i-t)/e,this.getPixelRange()))return Xv(t,i,e)}return $v(t,i,e,this.minTickCount,this.maxTickCount)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}getTickStep(e,t){return this.interval??Zv(e,t,this.tickCount,this.minTickCount,this.maxTickCount)}updateNiceDomain(){const e=this.tickCount;if(e<1)return void(this.niceDomain=[...this.domain]);let[t,i]=this.domain;if(1===e)[t,i]=function(e,t){const i=Math.abs(t-e),s=10**Math.floor(Math.log10(i));let n=1/0,r=[e,t];for(const o of _v){const a=o*s,l=Math.floor(e/a)*a,h=Math.ceil(t/a)*a,c=1-i/Math.abs(h-l);
2n>c&&(n=c,r=[l,h])}return r}(t,i);else{const e=t>i?Math.ceil:Math.floor,s=i<t?Math.floor:Math.ceil,n=4;for(let r=0;r<n;r++){const n=t,r=i,o=this.getTickStep(t,i),[a,l]=this.domain;if(o>=1)t=e(a/o)*o,i=s(l/o)*o;else{const n=1/o;t=e(a*n)/n,i=s(l*n)/n}if(t===n&&i===r)break}}this.niceDomain=[t,i]}tickFormat(e){let{ticks:t,specifier:i}=e;return Qv(t??this.ticks(),i)}};function RD(e,t,i){let[s,n]=Eg(e);s=function(e,t,i){const s=Math.abs(t-e)/(i-1),n=Math.floor(Math.log10(s)),r=Math.pow(10,n);return Math.floor(e/r)*r}(Math.floor(s),n,t);const r=function(e,t,i){const s=i-1,n=(t-e)/s;return function(e){const t=Math.floor(Math.log10(e)),i=Math.pow(10,t),s=e/i*10;if(s>0&&s<=1)return i/10;if(s>1&&s<=2)return 2*i/10;if(s>1&&s<=5)return 5*i/10;if(s>5&&s<=10)return 10*i/10;if(s>10&&s<=20)return 20*i/10;if(s>20&&s<=40)return 40*i/10;if(s>40&&s<=50)return 50*i/10;if(s>50&&s<=100)return 100*i/10;return s}(n)}(s,n,t);n=s+(t-1)*r;const o=i?[n,s]:[s,n],a=function(e,t,i){const s=Math.floor(Math.log10(t)),n=t>0&&t<1?Math.abs(s):0,r=Math.pow(10,n),o=[];for(let a=0;a<i;a++){const i=e+t*a;o[a]=Math.round(i*r)/r}return o}(s,r,t);return{domain:o,ticks:a}}var ED=class extends QS{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ID),this.min=NaN,this.max=NaN}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:s,clipped:n}=rf(e,t,i);return{domain:s,clipped:n}}updateSecondaryAxisTicks(e){if(null==this.dataDomain)throw new Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");if(0===this.dataDomain.domain.length)return[];const{domain:t,ticks:i}=RD(this.dataDomain.domain,e??0,this.reverse);return this.scale.nice=!1,this.scale.domain=t,this.scale.update(),i}};ED.className="NumberAxis",ED.type="number",op([Ef(Tf(jf,$f("max"))),PS(NaN)],ED.prototype,"min",2),op([Ef(Tf(jf,Yf("min"))),PS(NaN)],ED.prototype,"max",2);var AD=xv((e=>vm(e)&&0!==e),"a non-zero number"),TD=class extends ED{constructor(e){super(e,new ty),this.min=NaN,this.max=NaN}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:s,clipped:n}=rf(e,t,i),r=s[0]>s[1],o=s[0]<0&&s[1]>0,a=0===s[0]&&0===s[1];return(r||o||a)&&(o?fp.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):a&&fp.warn("the data domain has 0 extent, no data is rendered.")),0===s[0]&&(s[0]=1),0===s[1]&&(s[1]=-1),{domain:s,clipped:n}}set base(e){this.scale.base=e}get base(){return this.scale.base}};TD.className="LogAxis",TD.type="log",op([Ef(Tf(jf,AD,$f("max"))),PS(NaN)],TD.prototype,"min",2),op([Ef(Tf(jf,AD,Yf("min"))),PS(NaN)],TD.prototype,"max",2);var PD=class extends QS{constructor(e){super(e,new iy),this.min=void 0,this.max=void 0}normaliseDataDomain(e){let{min:t,max:i}=this,s=!1;return"number"===typeof t&&(t=new Date(t)),"number"===typeof i&&(i=new Date(i)),e.length>2&&(e=nf(e)?.map((e=>new Date(e)))??[]),t instanceof Date&&(s||(s=t>e[0]),e=[t,e[1]]),i instanceof Date&&(s||(s=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{domain:e,clipped:s}}onFormatChange(e,t,i,s){s?super.onFormatChange(e,t,i,s):(this.labelFormatter=this.scale.tickFormat({ticks:e,domain:i}),this.datumFormatter=this.scale.tickFormat({ticks:e,domain:i,formatOffset:1}))}};PD.className="TimeAxis",PD.type="time",op([Ef(Tf(qf,$f("max")),{optional:!0})],PD.prototype,"min",2),op([Ef(Tf(qf,Yf("min")),{optional:!0})],PD.prototype,"max",2);var LD=(e,t,i,s)=>{let{x0:n,y0:r,x1:o,y1:a,cx:l,cy:h}=t;if(s&&e.moveTo(n,r),n!==o||r!==a){const t=Math.atan2(r-h,n-l),s=Math.atan2(a-h,o-l);e.arc(l,h,i,t,s)}else e.lineTo(n,r)},FD=1e-6,kD=(e,t,i,s,n)=>{let r=!1,o=!1,a=s-Math.sqrt(Math.max(n**2-i**2,0)),l=0,h=0,c=i-Math.sqrt(Math.max(n**2-s**2,0));return a>e?(r=!0,a=e,l=i-Math.sqrt(Math.max(n**2-(s-e)**2))):a<FD&&(a=0),c>t?(o=!0,h=s-Math.sqrt(Math.max(n**2-(i-t)**2)),c=t):c<FD&&(c=0),{leading0:a,leading1:l,trailing0:h,trailing1:c,leadingClipped:r,trailingClipped:o}},ND=(e,t,i,s,n,r,o)=>{let{topLeft:a,topRight:l,bottomRight:h,bottomLeft:c}=r;const d=Math.max(a+c,l+h),u=Math.max(a+l,c+h);if(d<=0&&u<=0)return void(null==o?e.rect(t,i,s,n):e.rect(o.x,o.y,o.width,o.height));if(null==o&&a===l&&a===h&&a===c)return void e.roundRect(t,i,s,n,a);if(s<0&&(t+=s,s=Math.abs(s)),n<0&&(i+=n,n=Math.abs(n)),s<=0||n<=0)return;if(null==o)o=new Vg(t,i,s,n);
2else{const e=Math.max(t,o.x),r=Math.min(t+s,o.x+o.width),a=Math.max(i,o.y),l=Math.min(i+n,o.y+o.height);o=new Vg(e,a,r-e,l-a)}const p=Math.max(d/n,u/s,1);p>1&&(a/=p,l/=p,h/=p,c/=p);let g,m,f,v,y=!0,C=!0,S=!0,w=!0;if(y){const e=kD(o.height,o.width,Math.max(t+a-o.x,0),Math.max(i+a-o.y,0),a);e.leadingClipped&&(w=!1),e.trailingClipped&&(C=!1);g={x0:Math.max(o.x+e.leading1,o.x),y0:Math.max(o.y+e.leading0,o.y),x1:Math.max(o.x+e.trailing1,o.x),y1:Math.max(o.y+e.trailing0,o.y),cx:t+a,cy:i+a}}if(C){const e=kD(o.width,o.height,Math.max(i+l-o.y,0),Math.max(o.x+o.width-(t+s-l),0),l);e.leadingClipped&&(y=!1),e.trailingClipped&&(S=!1);m={x0:Math.min(o.x+o.width-e.leading0,o.x+o.width),y0:Math.max(o.y+e.leading1,o.y),x1:Math.min(o.x+o.width-e.trailing0,o.x+o.width),y1:Math.max(o.y+e.trailing1,o.y),cx:t+s-l,cy:i+l}}if(S){const e=kD(o.height,o.width,Math.max(o.x+o.width-(t+s-h),0),Math.max(o.y+o.height-(i+n-h),0),h);e.leadingClipped&&(C=!1),e.trailingClipped&&(w=!1);f={x0:Math.min(o.x+o.width-e.leading1,o.x+o.width),y0:Math.min(o.y+o.height-e.leading0,o.y+o.height),x1:Math.min(o.x+o.width-e.trailing1,o.x+o.width),y1:Math.min(o.y+o.height-e.trailing0,o.y+o.height),cx:t+s-h,cy:i+n-h}}if(w){const e=kD(o.width,o.height,Math.max(o.y+o.height-(i+n-c),0),Math.max(t+c-o.x,0),c);e.leadingClipped&&(S=!1),e.trailingClipped&&(y=!1);v={x0:Math.max(o.x+e.leading0,o.x),y0:Math.min(o.y+o.height-e.leading1,o.y+o.height),x1:Math.max(o.x+e.trailing0,o.x),y1:Math.min(o.y+o.height-e.trailing1,o.y+o.height),cx:t+c,cy:i+n-c}}let b=!1;y&&null!=g&&(LD(e,g,a,!b),b||(b=!0)),C&&null!=m&&(LD(e,m,l,!b),b||(b=!0)),S&&null!=f&&(LD(e,f,h,!b),b||(b=!0)),w&&null!=v&&(LD(e,v,c,!b),b||(b=!0)),e.closePath()},OD=class extends gb{constructor(){super(...arguments),this.borderPath=new ub,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.clipBBox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=eC.defaultStyles.strokeWidth,this.effectiveStrokeWidth=eC.defaultStyles.strokeWidth,this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint,this.microPixelEffectOpacity=1}set cornerRadius(e){this.topLeftCornerRadius=e,this.topRightCornerRadius=e,this.bottomRightCornerRadius=e,this.bottomLeftCornerRadius=e}isDirtyPath(){return this.lastUpdatePathStrokeWidth!==this.strokeWidth||Boolean(this.path.isDirty()||this.borderPath.isDirty())}updatePath(){const{path:e,borderPath:t,crisp:i,topLeftCornerRadius:s,topRightCornerRadius:n,bottomRightCornerRadius:r,bottomLeftCornerRadius:o}=this;let{x:a,y:l,width:h,height:c,strokeWidth:d,clipBBox:u}=this;const p=1/(this.layerManager?.canvas.pixelRatio??1);let g=1;if(e.clear(!0),t.clear(!0),i&&(h<=p&&(g*=h/p),c<=p&&(g*=c/p),h=this.align(a,h),c=this.align(l,c),a=this.align(a),l=this.align(l),u=null!=u?new Vg(this.align(u.x),this.align(u.y),this.align(u.x,u.width),this.align(u.y,u.height)):void 0),d)if(h<p){const e=a+p/2;t.moveTo(e,l),t.lineTo(e,l+c),d=p,this.borderClipPath=void 0}else if(c<p){const e=l+p/2;t.moveTo(a,e),t.lineTo(a+h,e),d=p,this.borderClipPath=void 0}else if(d<h&&d<c){const i=d/2;a+=i,l+=i,h-=d,c-=d;const p=u?.clone().shrink(i),g={topLeft:s>0?s-d:0,topRight:n>0?n-d:0,bottomRight:r>0?r-d:0,bottomLeft:o>0?o-d:0};this.borderClipPath=void 0,h>0&&c>0&&(null==p||p?.width>0&&p?.height>0)&&(ND(e,a,l,h,c,g,p),ND(t,a,l,h,c,g,p))}else this.borderClipPath=this.borderClipPath??new ub,this.borderClipPath.clear(!0),this.borderClipPath.rect(a,l,h,c),t.rect(a,l,h,c);else{const t={topLeft:s,topRight:n,bottomRight:r,bottomLeft:o};this.borderClipPath=void 0,ND(e,a,l,h,c,t,u)}if([s,n,r,o].every((e=>0===e))){const e=this.getBBox();this.hittester=e.containsPoint.bind(e),this.distanceSquared=(e,t)=>this.getBBox().distanceSquared(e,t)}else this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint;this.effectiveStrokeWidth=d,this.lastUpdatePathStrokeWidth=d,this.microPixelEffectOpacity=g}computeBBox(){const{x:e,y:t,width:i,height:s,clipBBox:n}=this;return n?.clone()??new Vg(e,t,i,s)}isPointInPath(e,t){return this.hittester(e,t)}get midPoint(){return{x:this.x+this.width/2,y:this.y+this.height/2}}distanceSquared(e,t){return this.distanceCalculator(e,t)}applyFillAlpha(e){const{fillOpacity:t,microPixelEffectOpacity:i,opacity:s}=this;e.globalAlpha*=s*t*i}renderStroke(e){const{stroke:t,effectiveStrokeWidth:i}=this;if(t&&i){const{globalAlpha:s}=e,{strokeOpacity:n,lineDash:r,lineDashOffset:o,lineCap:a,lineJoin:l,borderPath:h,borderClipPath:c,opacity:d,microPixelEffectOpacity:u}=this;c&&e.clip(c.getPath2D()),e.strokeStyle=t,e.globalAlpha*=d*n*u,e.lineWidth=i,r&&e.setLineDash(r),o&&(e.lineDashOffset=o),a&&(e.lineCap=a),l&&(e.lineJoin=l),e.stroke(h.getPath2D()),e.globalAlpha=s}}};OD.className="Rect",op([pb()],OD.prototype,"x",2),op([pb()],OD.prototype,"y",2),op([pb()],OD.prototype,"width",2),op([pb()],OD.prototype,"height",2),op([pb()],OD.prototype,"topLeftCornerRadius",2),op([pb()],OD.prototype,"topRightCornerRadius",2),op([pb()],OD.prototype,"bottomRightCornerRadius",2),op([pb()],OD.prototype,"bottomLeftCornerRadius",2),op([pb()],OD.prototype,"clipBBox",2),op([pb()],OD.prototype,"crisp",2);var GD=class extends uw{constructor(e){super(),this.ctx=e,this.rectNode=new OD,this.textNode=new lC,this.fill="white",this.node=this.createNode(),this.node.append([this.rectNode,this.textNode]),this.visible=!0,this.destroyFns.push(e.scene.attachNode(this.node),e.layoutManager.addListener("layout:complete",(e=>this.onLayoutComplete(e))))}
2createNode(){return new xy({name:"background",zIndex:0})}onLayoutComplete(e){const{width:t,height:i}=e.chart;this.rectNode.width=t,this.rectNode.height=i}};op([Ef(kf),IC("node","visible")],GD.prototype,"visible",2),op([Ef(Xf,{optional:!0}),IC("rectNode","fill")],GD.prototype,"fill",2),op([Ef(Lf,{optional:!0})],GD.prototype,"image",2),op([Ef(Of,{optional:!0}),IC("textNode")],GD.prototype,"text",2);var BD={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new GD(e)};function VD(e){let{orientation:t,bboxes:i,maxHeight:s,maxWidth:n,itemPaddingY:r=0,itemPaddingX:o=0,forceResult:a=!1}=e;const l="horizontal"===t,h={max:l?n:s,fn:l?e=>e.width:e=>e.height,padding:l?o:r},c={max:l?s:n,fn:l?e=>e.height:e=>e.width,padding:l?r:o};let d=0;const u=[];for(;d<i.length;){const e=zD(i.slice(d),d,h,c,a);if(!e)return;d+=e.processedBBoxCount,u.push(e.pageIndices)}return function(e,t,i,s,n){let r=0,o=0;const a=e.map((e=>{"horizontal"===t&&(e=function(e){const t=[];for(const i of e[0])t.push([]);return e.forEach(((e,i)=>{e.forEach(((e,s)=>{t[s][i]=e}))})),t}(e));let a=0;const l=e.map((e=>{const t=e.map((e=>(a=Math.max(e,a),i[e])));let r=0,o=0;return t.forEach((e=>{r+=e.height+s,o=Math.max(o,e.width+n)})),{indices:e,bboxes:t,columnHeight:Math.ceil(r),columnWidth:Math.ceil(o)}}));let h=0,c=0;return l.forEach((e=>{h+=e.columnWidth,c=Math.max(c,e.columnHeight)})),r=Math.max(h,r),o=Math.max(c,o),{columns:l,startIndex:e[0][0],endIndex:a,pageWidth:h,pageHeight:c}}));return{pages:a,maxPageWidth:r,maxPageHeight:o}}(u,t,i,r,o)}function zD(e,t,i,s,n){let r=function(e,t){const i=e.length;let s=0;for(let n=0;n<i;n++)if(s+=t.fn(e[n])+t.padding,s>t.max){return i/n<2?Math.ceil(i/2):n}return i}(e,i);if(r<1){if(!n)return;r=1}let o=r;for(;o>=1;){const r=HD(e,t,o,i,s,n);if(null==r&&o<=1)return;if(null==r){o--;continue}if("number"===typeof r){if(r<=1)return;o=r<o&&r>1?r:o,o--;continue}return{processedBBoxCount:r.length*r[0].length,pageIndices:r}}}function HD(e,t,i,s,n,r){const o=[];let a=0,l=0,h=[];const c=[];for(let d=0;d<e.length;d++){const u=(d+i)%i;0===u&&(a+=l,l=0,h.length>0&&o.push(h),h=[]);const p=s.fn(e[d])+s.padding;c[u]=Math.max(c[u]??0,p),l=Math.max(l,n.fn(e[d])+n.padding);const g=a+l,m=!r||o.length>0;if(g>n.max&&m){h=[];break}if(c.reduce(((e,t)=>e+t),0)>s.max&&!r)return c.length<i?c.length:void 0;h.push(d+t)}return h.length>0&&o.push(h),o.length>0?o:void 0}var WD=class extends _g{constructor(e){super(),this.sourceImage=e,this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1}updateBitmap(e,t,i,s){this.sourceImage=e,this.width=e.width/t,this.height=e.height/t,this.x=i/t,this.y=s/t,this.markDirty(3)}render(e){const{ctx:t,forceRender:i,stats:s}=e;if(0===this.dirty&&!i)return void(s&&s.nodesSkipped++);const n=this.sourceImage;n&&(t.globalAlpha=this.opacity,t.drawImage(n,0,0,n.width,n.height,this.x,this.y,this.width,this.height),super.render(e))}};op([Hg({redraw:3})],WD.prototype,"x",2),op([Hg({redraw:3})],WD.prototype,"y",2),op([Hg({redraw:3})],WD.prototype,"width",2),op([Hg({redraw:3})],WD.prototype,"height",2),op([Hg({redraw:3})],WD.prototype,"opacity",2);var jD=class extends(Sy(xy)){constructor(){super({name:"markerLabelGroup"}),this.label=new lC,this.symbolsGroup=new xy({name:"legend-markerLabel-symbols"}),this.bitmap=new WD,this.bitmapDirty=!0,this.enabled=!0,this.pageIndex=NaN,this._markers=[],this._lines=[];const{markers:e,label:t,lines:i}=this;t.textBaseline="middle",t.fontSize=12,t.fontFamily="Verdana, sans-serif",t.fill="black",t.y=1,this.updateSymbols(e,i),this.append([this.symbolsGroup,t])}destroy(){super.destroy(),this.destroyProxyButton()}destroyProxyButton(){this.proxyButton?.button.remove(),this.proxyButton?.listitem.remove(),this.proxyButton=void 0}get markers(){return this._markers}get lines(){return this._lines}updateSymbols(e,t){of(this._markers,e)&&of(this._lines,t)||(this.bitmapDirty=!0,this._markers=e,this._lines=t,this.symbolsGroup.clear(),this.symbolsGroup.append([this.bitmap,...t,...e]))}setEnabled(e){this.enabled=e,this.refreshVisibilities()}refreshVisibilities(){const e=this.enabled?1:.5;
2this.label.opacity=e,this.opacity=e,this.bitmap.opacity=e,this.setBitmapVisibility(!this.enabled)}setBitmapVisibility(e){const{lines:t,markers:i}=this;[t,i].forEach((t=>t.forEach((t=>t.visible=!e)))),this.bitmap.visible=e}update(e,t,i){let{spriteAAPadding:s,spritePixelRatio:n}=t;const{markers:r,lines:o}=this;let a=0,l=0,h=0;for(let y=0;y<Math.max(r.length,o.length);y++){const{length:e,spacing:t,isCustomMarker:s}=i[y]??0,n=r[y],c=o[y],d=n?.size??0;let u=1/0,p=1/0,g=1/0,m=1/0,f=1/0;if(n){const t=n.constructor.center,i=(d+n.strokeWidth)/2;s?(n.x=0,n.y=0,n.translationX=(t.x-.5)*d+e/2+h,n.translationY=(t.y-.5)*d,m=n.translationY-i,f=n.translationX-i):(n.x=(t.x-.5)*d+e/2+h,n.y=(t.y-.5)*d,m=n.y-i,f=n.x-i)}c&&(c.x1=h,c.x2=h+e,c.y1=0,c.y2=0,c.markDirty(3),u=-c.strokeWidth/2,p=c.x1,g=c.x2),h+=t+Math.max(e,d),a=Math.min(a,p,g,f),l=Math.min(l,u,m)}const c=i.at(-1),d=this.lines.at(-1),u=this.markers.at(-1),p=d?d.x2:-1/0,g=(u?.x??0)+(u?.size??0)/2;if(this.label.x=Math.max(p,g)+(c?.spacing??0),this.bitmapDirty){this.setBitmapVisibility(!1);const t=(s+a)*n,i=(s-l)*n,r=e.renderSprite(this.symbolsGroup,{scale:n,translateX:Math.floor(t),translateY:Math.floor(i)});this.bitmap.updateBitmap(r,n,Math.ceil(-t),Math.ceil(-i)),this.bitmapDirty=!1,this.refreshVisibilities()}if(i.length<2)return;const m=this.symbolsGroup.getBBox(),f=Math.max(u?.size??0,c?.length??0),v=new Vg(m.x+f/2,m.y,f,m.height);this.symbolsGroup.setClipRect(v)}computeBBox(){const{label:e,lines:t,markers:i}=this;return this.toParent(xy.computeChildrenBBox(lg([e],t,i),!1))}};jD.className="MarkerLabel",op([IC("label")],jD.prototype,"text",2),op([IC("label")],jD.prototype,"fontStyle",2),op([IC("label")],jD.prototype,"fontWeight",2),op([IC("label")],jD.prototype,"fontSize",2),op([IC("label")],jD.prototype,"fontFamily",2),op([IC("label","fill")],jD.prototype,"color",2);var UD=class extends Df{constructor(){super(...arguments),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};op([Ef(Xf)],UD.prototype,"color",2),op([Ef(cv,{optional:!0})],UD.prototype,"fontStyle",2),op([Ef(dv,{optional:!0})],UD.prototype,"fontWeight",2),op([Ef(zf)],UD.prototype,"fontSize",2),op([Ef(Of)],UD.prototype,"fontFamily",2);var _D=class extends Df{constructor(){super(...arguments),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}};op([Ef(zf)],_D.prototype,"size",2),op([Ef(Xf,{optional:!0})],_D.prototype,"fill",2),op([Ef(Hf,{optional:!0})],_D.prototype,"fillOpacity",2),op([Ef(Xf,{optional:!0})],_D.prototype,"stroke",2),op([Ef(zf)],_D.prototype,"strokeWidth",2),op([Ef(Hf)],_D.prototype,"strokeOpacity",2);var KD=class extends Df{constructor(e){super(),this.parent=e,this.shape=sD,this.size=15,this.padding=8}};op([RC({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],KD.prototype,"shape",2),op([Ef(zf)],KD.prototype,"size",2),op([Ef(zf)],KD.prototype,"padding",2);var $D=class extends Df{constructor(e,t){super(),this.chartUpdateCallback=e,this.pageUpdateCallback=t,this.id=og(this),this.marker=new KD(this),this.activeStyle=new _D,this.inactiveStyle=new _D,this.highlightStyle=new _D,this.label=new UD,this.group=new Iy({name:"pagination"}),this.labelNode=new lC,this.destroyFns=[],this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this._nextButton=new sD,this._previousButton=new sD,this.labelNode.setProperties({textBaseline:"middle",fontSize:12,fontFamily:"Verdana, sans-serif",fill:"black",y:1}),this.group.append([this.nextButton,this.previousButton,this.labelNode]),this.update(),this.updateMarkers()}destroy(){this.destroyFns.forEach((e=>e()))}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(e){if(this._orientation=e,"horizontal"===e)this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2;else this.previousButton.rotation=0,this.nextButton.rotation=Math.PI}get orientation(){return this._orientation}set nextButton(e){this._nextButton!==e&&(this.group.removeChild(this._nextButton),this._nextButton=e,this.group.appendChild(e))}get nextButton(){return this._nextButton}set previousButton(e){this._previousButton!==e&&(this.group.removeChild(this._previousButton),this._previousButton=e,this.group.appendChild(e))}get previousButton(){return this._previousButton}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){const{size:e,padding:t}=this.marker;this.nextButton.size=e,this.previousButton.size=e,this.labelNode.x=e/2+t}updateNextButtonPosition(){const e=this.labelNode.getBBox();this.nextButton.translationX=e.width+2*(this.marker.size/2+this.marker.padding)}updateLabel(){const{currentPage:e,totalPages:t,labelNode:i,label:{color:s,fontStyle:n,fontWeight:r,fontSize:o,fontFamily:a}}=this;i.text=`${e+1} / ${t}`,i.fill=s,i.fontStyle=n,i.fontWeight=r,i.fontSize=o,i.fontFamily=a}updateMarkers(){const{nextButton:e,previousButton:t,nextButtonDisabled:i,previousButtonDisabled:s,activeStyle:n,inactiveStyle:r,highlightStyle:o,highlightActive:a}=this,l=(e,t)=>
2t?r:e===a?o:n;this.updateMarker(e,l("next",i)),this.updateMarker(t,l("previous",s))}updateMarker(e,t){const{size:i}=this.marker;e.size=i,e.fill=t.fill,e.fillOpacity=t.fillOpacity??1,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.strokeOpacity=t.strokeOpacity}enableOrDisableButtons(){const{currentPage:e,totalPages:t}=this,i=0===t,s=e===t-1,n=0===e;this.nextButtonDisabled=s||i,this.previousButtonDisabled=n||i}setPage(e){e=Ig(0,e,this.totalPages-1),this.currentPage!==e&&(this.currentPage=e,this.onPaginationChanged())}getCursor(e){return{previous:this.previousButtonDisabled,next:this.nextButtonDisabled}[e]?void 0:"pointer"}onClick(e,t){e.preventDefault(),"next"!==t||this.nextButtonDisabled?"previous"!==t||this.previousButtonDisabled||(this.decrementPage(),this.onPaginationChanged()):(this.incrementPage(),this.onPaginationChanged())}onMouseHover(e){this.highlightActive=e,this.updateMarkers(),this.chartUpdateCallback(6)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){const e=yy(aD(this.marker.shape||sD));this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(6)}attachPagination(e){e.append(this.group)}getBBox(){return this.group.getBBox()}computeCSSBounds(){return{prev:wy.toCanvas(this.previousButton),next:wy.toCanvas(this.nextButton)}}};$D.className="Pagination",op([Ef(Lf)],$D.prototype,"marker",2),op([Ef(Lf)],$D.prototype,"activeStyle",2),op([Ef(Lf)],$D.prototype,"inactiveStyle",2),op([Ef(Lf)],$D.prototype,"highlightStyle",2),op([Ef(Lf)],$D.prototype,"label",2);var YD=class extends Df{constructor(){super(...arguments),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};op([Ef(zf,{optional:!0})],YD.prototype,"maxLength",2),op([Ef(Xf)],YD.prototype,"color",2),op([Ef(cv,{optional:!0})],YD.prototype,"fontStyle",2),op([Ef(dv,{optional:!0})],YD.prototype,"fontWeight",2),op([Ef(zf)],YD.prototype,"fontSize",2),op([Ef(Of)],YD.prototype,"fontFamily",2),op([Ef(Nf,{optional:!0})],YD.prototype,"formatter",2);var ZD=class extends Df{constructor(){super(...arguments),this.size=15,this.padding=8}};op([EC((e=>e.parent?.onMarkerShapeChange()))],ZD.prototype,"shape",2),op([Ef(zf)],ZD.prototype,"size",2),op([Ef(zf)],ZD.prototype,"padding",2),op([Ef(zf,{optional:!0})],ZD.prototype,"strokeWidth",2),op([Ef(kf)],ZD.prototype,"enabled",2);var qD=class extends Df{};op([Ef(zf,{optional:!0})],qD.prototype,"strokeWidth",2),op([Ef(zf,{optional:!0})],qD.prototype,"length",2);var QD=class extends Df{constructor(){super(...arguments),this.paddingX=16,this.paddingY=8,this.showSeriesStroke=!1,this.marker=new ZD,this.label=new YD,this.line=new qD}};op([Ef(zf,{optional:!0})],QD.prototype,"maxWidth",2),op([Ef(zf)],QD.prototype,"paddingX",2),op([Ef(zf)],QD.prototype,"paddingY",2),op([Ef(kf)],QD.prototype,"showSeriesStroke",2),op([Ef(Lf)],QD.prototype,"marker",2),op([Ef(Lf)],QD.prototype,"label",2),op([Ef(Lf)],QD.prototype,"line",2);var XD=class extends Df{};op([Ef(Nf,{optional:!0})],XD.prototype,"legendItemClick",2),op([Ef(Nf,{optional:!0})],XD.prototype,"legendItemDoubleClick",2);var JD="legend-visibility",eI="legend-other-series",tI=class{constructor(e,t,i,s,n){this.type=e,this.enabled=t,this.itemId=i,this.seriesId=s,this.event=n,this.defaultPrevented=!1}preventDefault(){this.defaultPrevented=!0}},iI=class extends Df{constructor(e){super(),this.ctx=e,this.id=og(this),this.group=new qC({name:"legend",zIndex:15}),this.itemSelection=Ty.select(this.group,jD),this.spriteRenderer=void 0,this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.truncatedItems=new Set,this._data=[],this._symbolsDirty=!0,this.toggleSeries=!0,this.item=new QD,this.listeners=new XD,this.enabled=!0,this.position="bottom",this.spacing=20,this.destroyFns=[],this.proxyLegendDirty=!0,this.proxyLegendToolbarDestroyFns=new Aw,this.size=[0,0],this._visible=!0,this.item.marker.parent=this,this.pagination=new $D((t=>e.updateService.update(t)),(e=>this.updatePageNumber(e))),this.pagination.attachPagination(this.group),this.destroyFns.push(e.contextMenuRegistry.registerDefaultAction({id:JD,type:"legend",label:"contextMenuToggleSeriesVisibility",action:e=>this.contextToggleVisibility(e)}),e.contextMenuRegistry.registerDefaultAction({id:eI,type:"legend",label:"contextMenuToggleOtherSeries",action:e=>this.contextToggleOtherSeries(e)})),this.destroyFns.push(e.layoutManager.registerElement(1,(e=>this.positionLegend(e))),e.localeManager.addListener("locale-changed",(()=>this.onLocaleChanged())),(()=>this.group.remove())),this.proxyLegendToolbar=this.ctx.proxyInteractionService.createProxyContainer({type:"list",id:`${this.id}-toolbar`,classList:["ag-charts-proxy-legend-toolbar"],ariaLabel:{id:"ariaLabelLegend"},ariaHidden:!0}),this.proxyLegendPagination=this.ctx.proxyInteractionService.createProxyContainer({type:"group",id:`${this.id}-pagination`,classList:["ag-charts-proxy-legend-pagination"],ariaLabel:{id:"ariaLabelLegendPagination"},ariaOrientation:"horizontal",ariaHidden:!0}),this.proxyLegendItemDescription=vg("p"),this.proxyLegendItemDescription.style.display="none",this.proxyLegendItemDescription.id=`${this.id}-ariaDescription`,this.proxyLegendItemDescription.textContent=this.getItemAriaDescription(),this.proxyLegendToolbar.append(this.proxyLegendItemDescription)}set data(e){this.onDataUpdate(this._data,e),this._data=e,this._symbolsDirty=!0,this.updateGroupVisibility()}get data(){return this._data}destroy(){this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-toolbar`),this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-pagination`),this.destroyFns.forEach((e=>e())),this.pagination.destroy(),this.itemSelection.clear(),this.proxyLegendToolbarDestroyFns.destroy()}initLegendItemToolbar(){if(!this.proxyLegendDirty)return;this.itemSelection.each(((e,t,i)=>{e.destroyProxyButton(),e.proxyButton??(e.proxyButton=this.ctx.proxyInteractionService.createProxyElement({type:"listswitch",id:`ag-charts-legend-item-${i}`,textContent:this.getItemAriaText(i),ariaChecked:!!e.datum.enabled,ariaDescribedBy:this.proxyLegendItemDescription.id,parent:this.proxyLegendToolbar,onclick:t=>this.onClick(t,e.datum,e.proxyButton.button),ondblclick:t=>this.onDoubleClick(t,e.datum),onmouseenter:t=>this.onHover(t,e),onmouseleave:()=>this.onLeave(),oncontextmenu:t=>this.onContextClick(t,e),onblur:()=>this.onLeave(),onfocus:t=>this.onHover(t,e)}))}
2));const e=this.itemSelection.nodes().map((e=>e.proxyButton?.button)).filter(om);this.proxyLegendToolbarDestroyFns.setFns([...Uw({orientation:"horizontal",buttons:e}),...Uw({orientation:"vertical",buttons:e})]),this.proxyLegendToolbar.ariaHidden=(0===e.length).toString(),this.proxyLegendDirty=!1}onDataUpdate(e,t){this.proxyLegendDirty=e.length!==t.length||e.some(((i,s,n)=>{const[r,o]=[t[s],e[s]];return r.id!==o.id}))}onMarkerShapeChange(){this.itemSelection.clear(),this.group.markDirty(2)}getOrientation(){if(void 0!==this.orientation)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}attachLegend(e){e.appendChild(this.group)}getItemLabel(e){const{ctx:{callbackCache:t}}=this,{formatter:i}=this.item.label;return i?t.call(i,{itemId:e.itemId,value:e.label.text,seriesId:e.seriesId}):e.label.text}calcLayout(e,t){const{paddingX:i,paddingY:s,label:n,maxWidth:r,label:{maxLength:o=1/0,fontStyle:a,fontWeight:l,fontSize:h,fontFamily:c}}=this.item,d=[...this.data];this.reverseOrder&&d.reverse(),this.itemSelection.update(d),this.initLegendItemToolbar();const u=[],p=rC.toFontString(n),g=r??.8*e,m=this.calculateSpriteDimensions();if(this.spriteRenderer??(this.spriteRenderer=new Eb),this.spriteRenderer.resize(m),this.itemSelection.each(((e,t)=>{e.fontStyle=a,e.fontWeight=l,e.fontSize=h,e.fontFamily=c;const i=this.updateMarkerLabel(this.spriteRenderer,e,t,m),s=t.itemId??t.id,n=(this.getItemLabel(t)??"<unknown>").replace(/\r?\n/g," ");e.text=this.truncate(n,o,g,i,p,s),u.push(e.getBBox())})),this._symbolsDirty=!1,e=Math.max(1,e),t=Math.max(1,t),!isFinite(e))return{};const f=this.size,v=this.oldSize;f[0]=e,f[1]=t,f[0]===v[0]&&f[1]===v[1]||(v[0]=f[0],v[1]=f[1]);const{pages:y,maxPageHeight:C,maxPageWidth:S}=this.updatePagination(u,e,t),w=this.pages;this.pages=y,this.maxPageSize=[S-i,C-s];const b=this.pagination.currentPage,x=this.pages[b];return this.pages.length<1||!x?(this.visible=!1,{oldPages:w}):(this.visible=!0,this.updatePositions(b),this.update(),{oldPages:w})}isCustomMarker(e,t){return e&&void 0!==t&&"string"!==typeof t}calcSymbolsEnabled(e){const{showSeriesStroke:t,marker:i}=this.item,s=!!i.enabled||!t||(e.marker.enabled??!0);return{markerEnabled:s,lineEnabled:!(!e.line||!t),isCustomMarker:this.isCustomMarker(s,e.marker.shape)}}calcSymbolsLengths(e){const{marker:t,line:i}=this.item,{markerEnabled:s,lineEnabled:n}=this.calcSymbolsEnabled(e),{strokeWidth:r}=this.getMarkerStyles(e),{strokeWidth:o}=n?this.getLineStyles(e):{strokeWidth:0};let a;const{shape:l}=e.marker;if(this.isCustomMarker(s,l)){const e=new l;e.updatePath();const t=e.getBBox();a=Math.max(t.width,t.height)}return{markerLength:s?t.size:0,markerStrokeWidth:r,lineLength:n?i.length??25:0,lineStrokeWidth:o,customMarkerSize:a}}calculateSpriteDimensions(){let e=0,t=0,i=0,s=0;this.itemSelection.each(((n,r)=>{r.symbols.forEach((n=>{const{markerLength:r,markerStrokeWidth:o,lineLength:a,lineStrokeWidth:l,customMarkerSize:h=-1/0}=this.calcSymbolsLengths(n),c=r+o;s=Math.max(s,a,h,r),t=Math.max(t,a,h,c),i=Math.max(i,l,c),e=Math.max(e,o+.5)}))})),t+=2*e,i+=2*e;return{spritePixelRatio:fg().devicePixelRatio,spriteAAPadding:e,spriteWidth:t,spriteHeight:i,markerWidth:s}}updateMarkerLabel(e,t,i,s){const{marker:n,paddingX:r}=this.item,{markerWidth:o}=s,a=[];let l=r;if(this._symbolsDirty){const e=[],s=[];i.symbols.forEach((t=>{const{shape:i=t.marker.shape}=n,r=aD(i);s.push(new tC({zIndex:0})),e.push(new r({zIndex:1}))})),t.updateSymbols(e,s)}return i.symbols.forEach(((e,i)=>{const s=e.marker.padding??n.padding,{markerEnabled:r,lineEnabled:h,isCustomMarker:c}=this.calcSymbolsEnabled(e);t.markers[i].size=r||!h?n.size:0,a.push({length:o,spacing:s,isCustomMarker:c}),(r||h)&&(l+=s+o);const d=t.markers[i],u=t.lines[i];if(d){const{strokeWidth:t,fill:i,stroke:s,fillOpacity:n,strokeOpacity:r}=this.getMarkerStyles(e);d.fill=i,d.stroke=s,d.strokeWidth=t,d.fillOpacity=n,d.strokeOpacity=r}if(u){const t=this.getLineStyles(e);u.stroke=t.stroke,u.strokeOpacity=t.strokeOpacity,u.strokeWidth=t.strokeWidth,u.lineDash=t.lineDash}})),t.update(e,s,a),l}truncate(e,t,i,s,n,r){let o=!1;e.length>t&&(e=e.substring(0,t),o=!0);const a=sC.getMeasurer({font:n}),l=FC.truncateLine(e,a,i-s,o);
vendor: 25,296 bytes, line 2
2return l.endsWith(rC.EllipsisChar)?this.truncatedItems.add(r):this.truncatedItems.delete(r),l}updatePagination(e,t,i){const s=this.getOrientation(),n=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=s,this.pagination.translationX=0,this.pagination.translationY=0;const{pages:r,maxPageHeight:o,maxPageWidth:a,paginationBBox:l,paginationVertical:h}=this.calculatePagination(e,t,i),c=r.findIndex((e=>e.endIndex>=n));this.pagination.currentPage=Ig(0,c,r.length-1);const{paddingX:d,paddingY:u}=this.item,p=a-d,g=o-u;let m=0,f=-l.y-this.item.marker.size/2;h?f+=g+8:(m+=-l.x+p+8,f+=(g-l.height)/2),this.pagination.translationX=m,this.pagination.translationY=f,this.pagination.update(),this.pagination.updateMarkers();let v=0;return this.itemSelection.each(((e,t,i)=>{i>(r[v]?.endIndex??1/0)&&v++,e.pageIndex=v})),{maxPageHeight:o,maxPageWidth:a,pages:r}}updateItemProxyButtons(){const e=this.toggleSeries?"pointer":void 0,t=Math.max(...this.itemSelection.nodes().map((e=>e.getBBox().height)));this.itemSelection.each((i=>{if(i.proxyButton){const{listitem:s,button:n}=i.proxyButton,r=i.pageIndex===this.pagination.currentPage;let o=wy.toCanvas(i);if(o.height!==t){const e=(t-o.height)/2;o={x:o.x,y:o.y-e,height:t,width:o.width}}BC(n,"pointer-events",r?"auto":"none"),BC(n,"cursor",e),bg(s,o)}}))}updatePaginationProxyButtons(e){this.proxyLegendPagination.style.display=this.pagination.visible?"absolute":"none";const t=(e?.length??this.pages.length)>1,i=this.pages.length>1;t!==i&&(i?(this.proxyPrevButton=this.ctx.proxyInteractionService.createProxyElement({type:"button",id:`${this.id}-prev-page`,textContent:{id:"ariaLabelLegendPagePrevious"},tabIndex:0,parent:this.proxyLegendPagination,onclick:e=>this.pagination.onClick(e,"previous"),onmouseenter:()=>this.pagination.onMouseHover("previous"),onmouseleave:()=>this.pagination.onMouseHover(void 0)}),this.proxyNextButton??(this.proxyNextButton=this.ctx.proxyInteractionService.createProxyElement({type:"button",id:`${this.id}-next-page`,textContent:{id:"ariaLabelLegendPageNext"},tabIndex:0,parent:this.proxyLegendPagination,onclick:e=>this.pagination.onClick(e,"next"),onmouseenter:()=>this.pagination.onMouseHover("next"),onmouseleave:()=>this.pagination.onMouseHover(void 0)})),this.proxyLegendPagination.ariaHidden="false"):(this.proxyNextButton?.remove(),this.proxyPrevButton?.remove(),[this.proxyNextButton,this.proxyPrevButton]=[void 0,void 0],this.proxyLegendPagination.ariaHidden="true"));const{prev:s,next:n}=this.pagination.computeCSSBounds();bg(this.proxyPrevButton,s),bg(this.proxyNextButton,n),BC(this.proxyNextButton,"cursor",this.pagination.getCursor("next")),BC(this.proxyPrevButton,"cursor",this.pagination.getCursor("previous"))}calculatePagination(e,t,i){const{paddingX:s,paddingY:n}=this.item,r=this.getOrientation(),o=["left","right"].includes(this.position);let a=this.pagination.getBBox(),l=new Vg(0,0,0,0),h=[],c=0,d=0,u=0;const p=void 0!==this.maxWidth&&void 0!==this.maxHeight;do{if(u++>10){fp.warn("unable to find stable legend layout.");break}a=l;const g=t-(o?0:a.width),m=VD({orientation:r,bboxes:e,maxHeight:i-(o?a.height:0),maxWidth:g,itemPaddingY:n,itemPaddingX:s,forceResult:p});h=m?.pages??[],c=m?.maxPageWidth??0,d=m?.maxPageHeight??0;const f=h.length;if(this.pagination.visible=f>1,this.pagination.totalPages=f,this.pagination.update(),this.pagination.updateMarkers(),l=this.pagination.getBBox(),!this.pagination.visible)break}while((g=l).width!==a.width||g.height!==a.height);var g;return{maxPageWidth:c,maxPageHeight:d,pages:h,paginationBBox:l,paginationVertical:o}}updatePositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const{item:{paddingY:t},itemSelection:i,pages:s}=this;if(s.length<1||!s[e])return;const{columns:n,startIndex:r,endIndex:o}=s[e];let a=0,l=0;const h=n.length,c=n[0].indices.length,d="horizontal"===this.getOrientation(),u=n[0].bboxes[0].height+t,p=[];i.each(((e,t,i)=>{if(i<r||i>o)return void(e.visible=!1);const s=i-r;let g,m;d?(g=s%h,m=Math.floor(s/h)):(g=Math.floor(s/c),m=s%c),e.visible=!0;const f=n[g];f&&(l=Math.floor(u*m),a=Math.floor(p[m]??0),p[m]=(p[m]??0)+f.columnWidth,e.translationX=a,e.translationY=l)})),this.updateItemProxyButtons()}updatePageNumber(e){const{pages:t}=this,{startIndex:i,endIndex:s}=t[e];0===i?this.paginationTrackingIndex=0:e===t.length-1?this.paginationTrackingIndex=s:this.paginationTrackingIndex=Math.floor((i+s)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),BC(this.proxyNextButton,"cursor",this.pagination.getCursor("next")),BC(this.proxyPrevButton,"cursor",this.pagination.getCursor("previous")),this.ctx.updateService.update(6)}update(){const{label:{color:e}}=this.item;this.itemSelection.each(((t,i)=>{t.setEnabled(i.enabled),t.color=e})),this.updateContextMenu()}updateContextMenu(){const{toggleSeries:e,ctx:{contextMenuRegistry:t}}=this;e?(t.hideAction(JD),t.hideAction(eI)):(t.showAction(JD),t.showAction(eI))}getLineStyles(e){const{stroke:t,strokeOpacity:i=1,strokeWidth:s,lineDash:n}=e.line??{},r=Math.min(2,s??1);return{stroke:t,strokeOpacity:i,strokeWidth:this.item.line.strokeWidth??r,lineDash:n}}getMarkerStyles(e){const{fill:t,stroke:i,strokeOpacity:s=1,fillOpacity:n=1,strokeWidth:r}=e.marker,o=Math.min(2,r??1);return{fill:t,stroke:i,strokeOpacity:s,fillOpacity:n,strokeWidth:this.item.marker.strokeWidth??o}}computePagedBBox(){const e=xy.computeChildrenBBox(this.group.children());if(this.pages.length>1){const[t,i]=this.maxPageSize;e.height=Math.max(i,e.height),e.width=Math.max(t,e.width)}return e}findNode(e){const{datum:t,proxyButton:i}=this.itemSelection.select((t=>t.datum?.itemId===e.itemId))[0]??{};if(void 0===t||void 0===i)throw new Error(`AG Charts - Missing required properties { datum: ${t}, proxyButton: ${i} }`);return{datum:t,proxyButton:i}}contextToggleVisibility(e){const{datum:t,proxyButton:i}=this.findNode(e);this.doClick(e.event,t,i.button)}contextToggleOtherSeries(e){this.doDoubleClick(e.event,this.findNode(e).datum)}onContextClick(e,t){const i=t.datum;this.preventHidingAll&&this.contextMenuDatum?.enabled&&this.getVisibleItemCount()<=1?this.ctx.contextMenuRegistry.disableAction(JD):this.ctx.contextMenuRegistry.enableAction(JD);const{button:s,offsetX:n,offsetY:r}=e,{x:o,y:a}=wy.toCanvasPoint(t,n,r),l={type:"contextmenu",sourceEvent:e,button:s,offsetX:o,offsetY:a,deltaX:0,deltaY:0,pageX:NaN,pageY:NaN,preventDefault:()=>e.preventDefault(),pointerHistory:[]};this.ctx.contextMenuRegistry.dispatchContext("legend",l,{legendItem:i})}onClick(e,t,i){this.doClick(e,t,i)&&e.preventDefault()}getVisibleItemCount(){return this.ctx.chartService.series.flatMap((e=>e.getLegendData("category"))).filter((e=>e.enabled)).length}doClick(e,t,i){const{listeners:{legendItemClick:s},ctx:{chartService:n,highlightManager:r},preventHidingAll:o,toggleSeries:a}=this;if(!t)return!1;const{id:l,itemId:h,enabled:c}=t,d=n.series.find((e=>e.id===l));if(!d)return!1;let u=c;const p=new tI("click",u,h,d.id,e);if(s?.(p),p.defaultPrevented)return!0;if(a){if(u=!c,o&&!u){this.getVisibleItemCount()<2&&(u=!0)}i.ariaChecked=u.toString(),this.ctx.chartEventManager.legendItemClick(d,h,u,t.legendItemName)}return u?r.updateHighlight(this.id,{series:d,itemId:h,datum:void 0}):r.updateHighlight(this.id),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),!0}onDoubleClick(e,t){this.doDoubleClick(e,t)&&e.preventDefault()}doDoubleClick(e,t){const{listeners:{legendItemDoubleClick:i},ctx:{chartService:s},toggleSeries:n}=this;if("integrated"===s.mode)return!1;if(!t)return!1;const{id:r,itemId:o,seriesId:a}=t,l=s.series.find((e=>e.id===r));if(!l)return!1;const h=new tI("dblclick",!0,o,l.id,e);if(i?.(h),h.defaultPrevented)return!0;if(n){const e=s.series.flatMap((e=>e.getLegendData("category"))),t=e.filter((e=>e.enabled)).length,i=e.find((e=>e.itemId===o&&e.seriesId===a));this.ctx.chartEventManager.legendItemDoubleClick(l,o,i?.enabled??!1,t,i?.legendItemName)}return this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),!0}toTooltipMeta(e,t){let i;if(e instanceof FocusEvent){const{x:e,y:s}=wy.toCanvas(t).computeCenter();i={type:"keyboard",offsetX:e,offsetY:s}}else{e.preventDefault();const{x:s,y:n}=wy.toCanvasPoint(t,e.offsetX,e.offsetY);i={type:"hover",offsetX:s,offsetY:n}}const{offsetX:s,offsetY:n}=i;return{offsetX:s,offsetY:n,lastPointerEvent:i,showArrow:!1}}onHover(e,t){if(!this.enabled)throw new Error("AG Charts - onHover handler called on disabled legend");this.pagination.setPage(t.pageIndex);const i=t.datum,s=i?this.ctx.chartService.series.find((e=>e.id===i?.id)):void 0;if(i&&this.truncatedItems.has(i.itemId??i.id)){const s=this.toTooltipMeta(e,t);this.ctx.tooltipManager.updateTooltip(this.id,s,UC({content:this.getItemLabel(i)}))}else this.ctx.tooltipManager.removeTooltip(this.id);i?.enabled&&s?this.updateHighlight({series:s,itemId:i?.itemId,datum:void 0}):this.updateHighlight()}onLeave(){this.ctx.tooltipManager.removeTooltip(this.id),this.updateHighlight()}updateHighlight(e){const t=this.ctx.interactionManager.getState();32===t?this.ctx.highlightManager.updateHighlight(this.id,e):2===t&&(this.pendingHighlightDatum=e,this.ctx.animationManager.onBatchStop((()=>{this.ctx.highlightManager.updateHighlight(this.id,this.pendingHighlightDatum)})))}onLocaleChanged(){this.itemSelection.each(((e,t,i)=>{let{proxyButton:s}=e;null!=s?.button&&(s.button.textContent=this.getItemAriaText(i))})),this.proxyLegendItemDescription.textContent=this.getItemAriaDescription()}getItemAriaText(e){const t=this.data[e],i=t&&this.getItemLabel(t),s=this.ctx.localeManager;if(e>=0&&i){const t=e+1,n=this.data.length;return s.t("ariaLabelLegendItem",{label:i,index:t,count:n})}return s.t("ariaLabelLegendItemUnknown")}getItemAriaDescription(){return this.ctx.localeManager.t("ariaDescriptionLegendItem")}positionLegend(e){if(BC(this.proxyLegendToolbar,"display",this.visible&&this.enabled?void 0:"none"),!this.enabled||!this.data.length)return;const{layoutBox:t}=e,{x:i,y:s,width:n,height:r}=t,[o,a]=this.calculateLegendDimensions(t),{oldPages:l}=this.calcLayout(o,a),h=this.computePagedBBox(),c=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return r-h.height;default:return n-h.width}};if(this.visible){const e=this.spacing;let o,a;switch(this.position){case"top":case"bottom":o=(n-h.width)/2,a=c(),t.shrink(h.height+e,this.position);break;default:o=c(),a=(r-h.height)/2,t.shrink(h.width+e,this.position)}this.group.translationX=Math.floor(i+o-h.x),this.group.translationY=Math.floor(s+a-h.y),this.proxyLegendToolbar.ariaOrientation=this.getOrientation()}this.updateItemProxyButtons(),this.updatePaginationProxyButtons(l)}calculateLegendDimensions(e){const{width:t,height:i}=e,s=t/i;let n,r;switch(this.position){case"top":case"bottom":{const e=s<1?Math.min(.5,1/s*.2):.2;n=this.maxWidth?Math.min(this.maxWidth,t):t,r=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*e);break}default:{const e=s>1?Math.min(.5,.25*s):.25;n=this.maxWidth?Math.min(this.maxWidth,t):Math.round(t*e),r=this.maxHeight?Math.min(this.maxHeight,i):i}}return[n,r]}};iI.className="Legend",op([Ef(kf)],iI.prototype,"toggleSeries",2),op([Ef(Lf)],iI.prototype,"pagination",2),op([Ef(Lf)],iI.prototype,"item",2),op([Ef(Lf)],iI.prototype,"listeners",2),op([EC((e=>e.updateGroupVisibility())),Ef(kf)],iI.prototype,"enabled",2),op([EC((e=>e.proxyLegendDirty=!0)),Ef(hv)],iI.prototype,"position",2),op([Ef(zf,{optional:!0})],iI.prototype,"maxWidth",2),op([Ef(zf,{optional:!0})],iI.prototype,"maxHeight",2),op([Ef(kf,{optional:!0})],iI.prototype,"reverseOrder",2),op([Ef(Sv(["horizontal","vertical"],"an orientation"),{optional:!0})],iI.prototype,"orientation",2),op([Ef(kf,{optional:!0})],iI.prototype,"preventHidingAll",2),op([Ef(zf)],iI.prototype,"spacing",2);var sI={type:"legend",optionsKey:"legend",identifier:"category",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new iI(e),packageType:"community"},nI=class extends gb{constructor(){super(...arguments),this.zIndex=3,this.centerX=0,this.centerY=0,this.width=8,this.height=16,this.gripLineGap=2,this.gripLineLength=8}setCenter(e,t){this.dirtyPath=!0,this.centerX===e&&this.centerY===t||(this.centerX=e,this.centerY=t,this.markDirty(3))}static align(e,t,i,s,n,r,o,a){const l=e.strokeWidth/2,h=e.align(i+n*o)+l,c=h+e.align(i+n*o,n*(a-o))-2*l,d=e.align(s+r/2)+l;e.setCenter(h,d),t.setCenter(c,d)}computeBBox(){const{centerX:e,centerY:t,width:i,height:s}=this;return new Vg(e-i/2,t-s/2,i,s)}isPointInPath(e,t){return this.getBBox().containsPoint(e,t)}updatePath(){const{centerX:e,centerY:t,path:i,strokeWidth:s,gripLineGap:n,gripLineLength:r}=this,o=this.layerManager?.canvas?.pixelRatio??1;i.clear();const a=Math.floor(this.width/2*o)/o,l=Math.floor(this.height/2*o)/o;i.moveTo(e-a,t-l),i.lineTo(e+a,t-l),i.lineTo(e+a,t+l),i.lineTo(e-a,t+l),i.closePath();const h=Math.floor((n+s)/2*o)/o,c=Math.floor(r/2*o)/o;i.moveTo(e-h,t-c),i.lineTo(e-h,t+c),i.moveTo(e+h,t-c),i.lineTo(e+h,t+c)}};nI.className="RangeHandle",op([Ef(zf),Hg({redraw:3,type:"path"})],nI.prototype,"width",2),op([Ef(zf),Hg({redraw:3,type:"path"})],nI.prototype,"height",2),op([Ef(zf),Hg({redraw:3,type:"path"})],nI.prototype,"gripLineGap",2),op([Ef(zf),Hg({redraw:3,type:"path"})],nI.prototype,"gripLineLength",2);var rI=class extends gb{constructor(){super(...arguments),this.zIndex=2,this.x=0,this.y=0,this.width=200,this.height=30,this.min=0,this.max=1}layout(e,t,i,s){e===this.x&&t===this.y&&i===this.width&&this.height===s||(this.x=e,this.y=t,this.width=i,this.height=s,this.dirtyPath=!0,this.markDirty(3))}update(e,t){e=isNaN(e)?this.min:e,t=isNaN(t)?this.max:t,e===this.min&&t===this.max||(this.min=e,this.max=t,this.dirtyPath=!0,this.markDirty(3))}computeBBox(){const{x:e,y:t,width:i,height:s}=this;return new Vg(e,t,i,s)}computeVisibleRangeBBox(){const{x:e,y:t,width:i,height:s,min:n,max:r}=this,o=e+i*n;return new Vg(o,t,e+i*r-o,s)}updatePath(){const{path:e,x:t,y:i,width:s,height:n,min:r,max:o,strokeWidth:a}=this,l=a/2;e.clear();const h=this.align(t)+l,c=this.align(i)+l,d=h+this.align(t,s)-2*l,u=c+this.align(i,n)-2*l;e.moveTo(h,c),e.lineTo(d,c),e.lineTo(d,u),e.lineTo(h,u),e.closePath();const p=this.align(t+s*r)+l,g=p+this.align(t+s*r,s*(o-r))-2*l;e.moveTo(p,c),e.lineTo(p,u),e.lineTo(g,u),e.lineTo(g,c),e.closePath()}};rI.className="RangeMask";var oI=class extends ZC{constructor(e){super({name:"rangeSelectorGroup",zIndex:16}),this.x=0,this.y=0,this.width=200,this.height=30,this.lOffset=0,this.rOffset=0,this.background=this.appendChild(new Iy({name:"navigator-background",zIndex:1})),this.append(e)}layout(e,t,i,s,n,r){this.x=e,this.y=t,this.width=i,this.height=s,this.lOffset=n,this.rOffset=r,this.background.translationX=e,this.background.translationY=t,this.markDirty(3)}updateBackground(e,t){null!=e&&this.background.removeChild(e),null!=t&&this.background.appendChild(t),this.markDirty(3)}computeBBox(){const{x:e,y:t,width:i,height:s,lOffset:n,rOffset:r}=this;return new Vg(e-n,t,i+(n+r),s)}},aI=class extends uw{constructor(e){super(),this.ctx=e,this.miniChart=void 0,this.enabled=!1,this.mask=new rI,this.minHandle=new nI,this.maxHandle=new nI,this.maskVisibleRange={id:"navigator-mask-visible-range",getBBox:()=>this.mask.computeVisibleRangeBBox(),toCanvasBBox:()=>this.mask.computeVisibleRangeBBox(),fromCanvasPoint:(e,t)=>({x:e,y:t})},this.height=30,this.spacing=10,this.x=0,this.y=0,this.width=0,this.rangeSelector=new oI([this.mask,this.minHandle,this.maxHandle]),this._min=0,this._max=1,this.minRange=.001;const t=e.regionManager.addRegion("navigator",this.rangeSelector);this.destroyFns.push(e.scene.attachNode(this.rangeSelector),t.addListener("hover",(e=>this.onHover(e)),50),t.addListener("drag-start",(e=>this.onDragStart(e)),50),t.addListener("drag",(e=>this.onDrag(e)),50),t.addListener("drag-end",(e=>this.onDragEnd(e)),50),t.addListener("leave",(e=>this.onLeave(e)),50),this.ctx.localeManager.addListener("locale-changed",(()=>this.updateZoom())),this.ctx.layoutManager.registerElement(3,(e=>this.onLayoutStart(e))),this.ctx.layoutManager.addListener("layout:complete",(e=>this.onLayoutComplete(e))),e.zoomManager.addListener("zoom-change",(e=>this.onZoomChange(e)))),this.proxyNavigatorToolbar=this.ctx.proxyInteractionService.createProxyContainer({type:"toolbar",id:"navigator-toolbar",classList:["ag-charts-proxy-navigator-toolbar"],ariaOrientation:"vertical",ariaLabel:{id:"ariaLabelNavigator"}}),this.updateGroupVisibility(),this.proxyNavigatorElements=[this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-min",ariaLabel:{id:"ariaLabelNavigatorMinimum"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,onchange:e=>this.onMinSliderChange(e)}),this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-pan",ariaLabel:{id:"ariaLabelNavigatorRange"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,onchange:e=>this.onPanSliderChange(e)}),this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-max",ariaLabel:{id:"ariaLabelNavigatorMaximum"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,onchange:e=>this.onMaxSliderChange(e)})],this.proxyNavigatorElements.forEach((e=>NC(e,"data-preventdefault",!1))),this.setSliderRatio(this.proxyNavigatorElements[0],this._min),this.setSliderRatio(this.proxyNavigatorElements[2],this._max),this.setPanSliderValue(this._min,this._max),jw({orientation:"vertical",toolbar:this.proxyNavigatorToolbar,buttons:this.proxyNavigatorElements}),this.destroyFns.push((()=>{this.proxyNavigatorElements.forEach((e=>e.remove())),this.proxyNavigatorToolbar.remove()}))}updateBackground(e,t){this.rangeSelector?.updateBackground(e,t)}updateGroupVisibility(){const{enabled:e}=this;null!=this.rangeSelector&&e!==this.rangeSelector.visible&&(this.rangeSelector.visible=e,this.proxyNavigatorToolbar.ariaHidden=(!e).toString(),e?this.updateZoom():this.ctx.zoomManager.updateZoom("navigator"))}onLayoutStart(e){if(this.enabled){const{layoutBox:t}=e,i=this.height+this.spacing;t.shrink(i,"bottom"),this.y=t.y+t.height+this.spacing}else this.y=0}onLayoutComplete(e){const{x:t,width:i}=e.series.rect;if(this.enabled){const{y:e,height:s}=this;this.layoutNodes(t,e,i,s),bg(this.proxyNavigatorToolbar,{x:t,y:e,width:i,height:s}),this.proxyNavigatorToolbar.style.removeProperty("display")}else this.proxyNavigatorToolbar.style.display="none";this.x=t,this.width=i}onHover(e){this.enabled&&this.updateCursor(e)}updateCursor(e){if(!this.enabled)return;const{mask:t,minHandle:i,maxHandle:s}=this,{regionOffsetX:n,regionOffsetY:r}=e;i.containsPoint(n,r)||s.containsPoint(n,r)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):t.computeVisibleRangeBBox().containsPoint(n,r)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator")}onDragStart(e){if(!this.enabled)return;this.updateCursor(e);const{mask:t,minHandle:i,maxHandle:s,x:n,width:r,_min:o}=this,{regionOffsetX:a,regionOffsetY:l}=e;i.zIndex<s.zIndex?s.containsPoint(a,l)?this.dragging="max":i.containsPoint(a,l)&&(this.dragging="min"):i.containsPoint(a,l)?this.dragging="min":s.containsPoint(a,l)&&(this.dragging="max"),null==this.dragging&&t.computeVisibleRangeBBox().containsPoint(a,l)&&(this.dragging="pan",this.panStart=(a-n)/r-o),null!=this.dragging&&this.ctx.zoomManager.fireZoomPanStartEvent("navigator")}onDrag(e){if(!this.enabled||null==this.dragging)return;const{dragging:t,minRange:i,panStart:s,x:n,width:r}=this;let{_min:o,_max:a}=this;const{regionOffsetX:l}=e,h=(l-n)/r;if("min"===t)o=Ig(0,h,a-i);else if("max"===t)a=Ig(o+i,h,1);else if("pan"===t&&null!=s){const e=a-o;o=Ig(0,h-s,1-e),a=o+e}this._min=o,this._max=a,this.updateZoom()}onDragEnd(e){this.dragging=void 0,this.updateCursor(e)}onLeave(e){this.ctx.cursorManager.updateCursor("navigator")}onZoomChange(e){const{x:t}=e;t&&(this._min=t.min,this._max=t.max,this.updateNodes(t.min,t.max),this.setPanSliderValue(t.min,t.max),this.setSliderRatio(this.proxyNavigatorElements[0],t.min),this.setSliderRatio(this.proxyNavigatorElements[2],t.max))}onPanSliderChange(e){const t=this.getSliderRatio(this.proxyNavigatorElements[1]),i=this._max-this._min;this._min=Ig(0,t,1-i),this._max=this._min+i,this.updateZoom()}onMinSliderChange(e){const t=this.proxyNavigatorElements[0];this._min=this.setSliderRatioClamped(t,0,this._max-this.minRange),this.updateZoom()}onMaxSliderChange(e){const t=this.proxyNavigatorElements[2];this._max=this.setSliderRatioClamped(t,this._min+this.minRange,1),this.updateZoom()}setPanSliderValue(e,t){this.proxyNavigatorElements[1].value=`${Math.round(100*e)}`,this.proxyNavigatorElements[1].ariaValueText=this.ctx.localeManager.t("ariaValuePanRange",{min:e,max:t})}setSliderRatioClamped(e,t,i){const s=this.getSliderRatio(e),n=Ig(t,s,i);return n!==s&&this.setSliderRatio(e,n),n}setSliderRatio(e,t){const i=Math.round(100*t);e.value=`${i}`,e.ariaValueText=Gg(i)}getSliderRatio(e){return parseFloat(e.value)/100}layoutNodes(e,t,i,s){const{rangeSelector:n,mask:r,minHandle:o,maxHandle:a,_min:l,_max:h}=this;n.layout(e,t,i,s,o.width/2,a.width/2),r.layout(e,t,i,s),nI.align(o,a,e,t,i,s,l,h),l+(h-l)/2<.5?(o.zIndex=3,a.zIndex=4):(o.zIndex=4,a.zIndex=3),[o,this.maskVisibleRange,a].forEach(((i,s)=>{const n=i.getBBox(),r={x:n.x-e,y:n.y-t,height:n.height,width:n.width};bg(this.proxyNavigatorElements[s],r)}))}updateNodes(e,t){this.mask.update(e,t)}updateZoom(){if(!this.enabled)return;const{_min:e,_max:t}=this;if(null==e||null==t)return;return this.ctx.zoomManager.updateZoom("navigator",{x:{min:e,max:t}},!1,(e=>{null==this.min&&null==this.max||fp.warnOnce(`Could not apply [navigator.min] or [navigator.max] as [${e}] has modified the initial zoom state.`)}))}};op([Ef(Lf,{optional:!0})],aI.prototype,"miniChart",2),op([Ef(kf),EC((e=>e.updateGroupVisibility()))],aI.prototype,"enabled",2),op([Ef(zf)],aI.prototype,"height",2),op([Ef(zf)],aI.prototype,"spacing",2),op([RC({newValue(e){this._min=e,this.updateZoom()}}),Ef(Tf(Hf,$f("max")),{optional:!0})],aI.prototype,"min",2),op([RC({newValue(e){this._max=e,this.updateZoom()}}),Ef(Tf(Hf,Yf("min")),{optional:!0})],aI.prototype,"max",2);var lI={type:"root",optionsKey:"navigator",packageType:"community",chartTypes:["cartesian"],moduleFactory:e=>new aI(e),themeTemplate:{navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8}}}};function hI(e){let{takeColors:t}=e;const{fills:[i],strokes:[s]}=t(1);return{fill:i,stroke:s}}function cI(e){return{marker:hI(e)}}var dI=(e=>(e[e.SMALL=12]="SMALL",e[e.MEDIUM=13]="MEDIUM",e[e.LARGE=17]="LARGE",e))(dI||{}),uI=(e=>(e.NORMAL="normal",e.BOLD="bold",e.BOLDER="bolder",e.LIGHTER="lighter",e))(uI||{}),pI=(e=>(e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e))(pI||{}),gI=(e=>(e.CATEGORY="category",e.ORDINAL_TIME="ordinal-time",e.NUMBER="number",e.TIME="time",e.LOG="log",e))(gI||{}),mI=(e=>(e.ANGLE_CATEGORY="angle-category",e.ANGLE_NUMBER="angle-number",e.RADIUS_CATEGORY="radius-category",e.RADIUS_NUMBER="radius-number",e))(mI||{}),fI=(e=>(e.CIRCLE="circle",e.POLYGON="polygon",e))(fI||{}),vI=Symbol("is-dark-theme"),yI=Symbol("is-community"),CI=Symbol("is-enterprise"),SI=Symbol("default-font"),wI=Symbol("default-label-colour"),bI=Symbol("default-inverted-label-colour"),xI=Symbol("default-inside-series-label-colour"),MI=Symbol("default-muted-label-colour"),DI=Symbol("default-axis-grid-colour"),II=Symbol("default-axis-line-colour"),RI=Symbol("default-cross-lines-colour"),EI=Symbol("default-background-colour"),AI=Symbol("default-shadow-colour"),TI=Symbol("default-colours"),PI=Symbol("default-padding"),LI=Symbol("default-caption-layout-style"),FI=Symbol("default-caption-alignment"),kI=Symbol("palette-up-stroke"),NI=Symbol("palette-down-stroke"),OI=Symbol("palette-up-fill"),GI=Symbol("palette-down-fill"),BI=Symbol("palette-neutral-stroke"),VI=Symbol("palette-neutral-fill"),zI=Symbol("palette-alt-up-stroke"),HI=Symbol("palette-alt-down-stroke"),WI=Symbol("palette-alt-up-fill"),jI=Symbol("palette-alt-down-fill"),UI=Symbol("palette-gray-fill"),_I=Symbol("palette-gray-stroke"),KI=Symbol("default-polar-series-stroke"),$I=Symbol("default-diverging-series-colour-range"),YI=Symbol("default-gauge-series-colour-range"),ZI=Symbol("default-funnel-series-colour-range"),qI=Symbol("default-hierarchy-fills"),QI=Symbol("default-hierarchy-strokes"),XI=Symbol("default-annotation-stroke"),JI=Symbol("default-text-annotation-color"),eR=Symbol("default-annotation-background-fill"),tR=Symbol("default-annotation-handle-fill"),iR=Symbol("default-annotation-statistics-fill"),sR=Symbol("default-annotation-statistics-stroke"),nR=Symbol("default-annotation-statistics-color"),rR=Symbol("default-annotation-statistics-divider-stroke"),oR=Symbol("default-annotation-statistics-fill"),aR=Symbol("default-annotation-statistics-stroke"),lR=Symbol("default-textbox-fill"),hR=Symbol("default-textbox-stroke"),cR=Symbol("default-textbox-color"),dR=Symbol("default-toolbar-position"),uR=Symbol("default-gridline-enabled");function pR(e,t,i,s,n){const{addPhaseFn:r,updatePhaseFn:o,removePhaseFn:a}=n,l=(s,n,r)=>
2{i.animate({id:`${e}_${t}_${n.id}_${s}`,groupId:e,from:0,to:1,ease:Gm,collapsable:!1,onUpdate(e,t){t&&"removed"!==s||(n.path.clear(!0),r(e,n),n.checkPathDirty())},onStop(){"added"===s&&(n.path.clear(!0),r(1,n),n.checkPathDirty())},phase:qm[s]})};for(const h of s)i.isSkipped()||(l("removed",h,a),l("updated",h,o)),l("added",h,r)}function gR(e){return"number"===typeof e?e.toFixed(2):String(e??"")}var mR=null;function fR(e){if(null!=e)return""===e?"":(mR??(mR=vg("div")),mR.textContent=String(e),mR.innerHTML)}var vR=new WeakMap;function yR(e,t){const i=JSON.stringify(e,null,0);return vR.has(t)||vR.set(t,new Map),vR.get(t)?.has(i)||vR.get(t)?.set(i,t(e)),vR.get(t)?.get(i)}function CR(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];for(const i of e)"number"===typeof i&&(i<0&&(t[0]+=i),i>0&&(t[1]+=i));return t}function SR(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>CR(e)}}function wR(e,t){return{id:e,type:"aggregate",matchGroupIds:t?[t]:void 0,aggregateFunction:e=>CR(e),groupAggregateFunction:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];return t[0]+=e?.[0]??0,t[1]+=e?.[1]??0,t}}}function bR(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>Nx.extendDomain(e)}}function xR(e){return{id:e,type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];return t[0]+=e?.[0]??0,t[1]+=e?.[1]??0,t}}}function MR(e,t){const i={id:e,matchGroupIds:t?[t]:void 0,type:"aggregate",aggregateFunction:e=>CR(e),groupAggregateFunction:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,-1];return t[0]+=e?.[0]??0,t[1]+=e?.[1]??0,t[2]++,t},finalFunction:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0];const t=e[0]+e[1];return t>=0?[0,t/e[2]]:[t/e[2],0]}};return i}function DR(e,t,i){const s={id:e,matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const s=i[1]-i[0];return t.aggregateFunction(e).map((e=>e/s))}};return t.groupAggregateFunction&&(s.groupAggregateFunction=t.groupAggregateFunction),s}function IR(e){return()=>{let t=0;return i=>ym(i)?(t+=e?Math.max(0,i):i,t):i}}function RR(){return()=>{let e=0;return t=>{if(!ym(t))return t;const i=e;return e+=t,i}}}function ER(e){return null!=e&&oS(e)}function AR(e){return null!=e}function TR(e){switch(e){case"number":case"log":case"ordinal-time":case"time":case"color":return ER;default:return AR}}function PR(e){switch(e){case"number":case"log":case"time":case"color":return"range";default:return"category"}}function LR(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{property:e,type:"key",valueType:PR(t),validation:TR(t),...i}}function FR(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{property:e,type:"value",valueType:PR(t),validation:TR(t),...i}}function kR(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{min:i=-1/0,max:s=1/0,...n}=t;return{type:"value",property:e,valueType:"range",validation:ER,processor:()=>e=>ym(e)?Ig(i,e,s):e,...n}}function NR(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{onlyPositive:s,...n}=i;return{...FR(e,t,n),processor:IR(s)}}function OR(e,t){return{...FR(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),processor:RR()}}function GR(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"current",s=arguments.length>3?arguments[3]:void 0;return[FR(e,arguments.length>4?arguments[4]:void 0,s),ZR(s.groupId,t,i,s.separateNegative),...null!=s.rangeId?[bR(s.rangeId,s.groupId)]:[]]}function BR(e,t,i){return[FR(e,t,i),QR(i.groupId)]}var VR={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let e=NaN;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0;const i=(arguments.length>1?arguments[1]:void 0).keys[0],s=Math.abs(i-e);return e=i,!isNaN(s)&&s>0&&s<t?s:t}}},zR={type:"reducer",property:"largestKeyInterval",initialValue:-1/0,reducer:()=>{let e=NaN;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1/0;const i=(arguments.length>1?arguments[1]:void 0).keys[0],s=Math.abs(i-e);return e=i,!isNaN(s)&&s>0&&s>t?s:t}}},HR={type:"processor",property:"sortedGroupDomain",calculate:e=>{let{domain:{groups:t}}=e;return t?.slice().sort(((e,t)=>{for(let i=0;i<e.length;i++){const s=e[i]-t[i];if(0!==s)return s}return 0}))}};function WR(e){let{normaliseTo:t,mode:i}=e;const s=(e,i)=>{const s=e*t/i;return s>=0?Math.min(t,s):Math.max(-t,s)};return()=>()=>(e,t)=>{const n=[0,0];for(const s of t){const t=e[s],r="number"===typeof t?t:Math.max(...t),o=r<0?0:1;"sum"===i?n[o]+=r:n[o]=0===o?Math.min(n[o],r):Math.max(n[o],r)}const r=Math.max(Math.abs(n[0]),n[1]);for(const i of t){const t=e[i];e[i]="number"===typeof t?s(t,r):t.map((e=>s(e,r)))}}}function jR(e,t){return{type:"group-value-processor",matchGroupIds:e,adjust:yR({normaliseTo:t,mode:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sum"},WR)}}function UR(e){let{normaliseTo:t,zeroDomain:i,rangeMin:s,rangeMax:n}=e;const r=t[1]-t[0],o=(e,s,n)=>{const o=t[0]+(e-s)/n*r;return 0===n?i:o>=t[1]?t[1]:o<t[0]?t[0]:o};return()=>(e,i)=>{let[r,a]=e.domain.values[i];null!=s&&(r=s),null!=n&&(a=n);const l=a-r;e.domain.values[i]=[t[0],t[1]];for(const t of e.data){let s=t.values;"ungrouped"===e.type&&(s=[s]);for(const e of s)e[i]=o(e[i],r,l)}}}function _R(e,t,i,s,n){return{type:"property-value-processor",property:e,adjust:yR({normaliseTo:t,rangeMin:s,rangeMax:n,zeroDomain:i},UR)}}function KR(e){return{type:"processor",property:"animationValidation",calculate(t){const{keys:i,values:s}=t.defs,{input:n,data:r}=t;let o=!0,a=!0;const l=[];for(let c=0;c<s.length;c++)e?.includes(s[c].id)&&l.push([c,s[c]]);const h=(e,i,s)=>{if("category"===i.valueType){const i=t.domain[s][e];return void(o&&(o=i.length===n.count))}let l=r[0]?.[s][e];for(let t=1;(o||a)&&t<r.length;t++){const i=r[t][s][e];a&&(a=l<=i),o&&(o=l!==i),l=i}};for(let e=0;(o||a)&&e<i.length;e++)h(e,i[e],"keys");for(let e=0;(o||a)&&e<l.length;e++){const[t,i]=l[e];h(t,i,"values")}return{uniqueKeys:o,orderedKeys:a}}}}function $R(e){let{mode:t,separateNegative:i}=e;return()=>()=>(e,s)=>{const n=[0,0];for(const r of s){const s=e[r],o=Pg(s)&&i?0:1;ym(s)&&("normal"===t&&(n[o]+=s),e[r]=n[o],"trailing"===t&&(n[o]+=s))}}}function YR(e){let{mode:t,sum:i}=e;return()=>{const e=[];let s=!0;return()=>(n,r)=>{let o=0;for(const a of r){const r=n[a],l=s&&"current"===i?0:e[a];e[a]=r;const h="current"===i?r:l;ym(r)&&ym(l)?("normal"===t&&(o+=h),n[a]=o,"trailing"===t&&(o+=h)):n[a]=o}s=!1}}}function ZR(e,t,i){let s,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t.startsWith("window")){s=yR({mode:t.endsWith("-trailing")?"trailing":"normal",sum:i},YR)}else s=yR({mode:t,separateNegative:n},$R);return{type:"group-value-processor",matchGroupIds:[e],adjust:s}}function qR(){return()=>(e,t)=>{const i=new Float64Array(32);let s=0;
2for(const n of t){const t=e[n];i[s]=Number.isFinite(t)?t:NaN,s+=1,e[n]=i.subarray(0,s)}}}function QR(e){return{type:"group-value-processor",matchGroupIds:[e],adjust:qR}}function XR(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"processor",property:"diff",calculate:i=>{const s=new Map,n=new Map,r=new Map,o=new Map,a=Math.max(e.data.length,i.data.length);for(let l=0;l<a;l++){const a=e.data[l],h=i.data[l],c=a?JR(a.keys):"",d=h?JR(h.keys):"";h&&a&&c===d?of(a.values,h.values)||r.set(d,h):(o.has(d)?(!t&&of(o.get(d).values,h.values)||(r.set(d,h),s.set(d,h)),o.delete(d)):h&&n.set(d,h),n.has(c)?(!t&&of(n.get(c).values,a.values)||(r.set(c,a),s.set(c,a)),n.delete(c)):a&&(r.delete(c),o.set(c,a)))}return{changed:n.size>0||r.size>0||o.size>0,added:n,updated:r,removed:o,moved:s}}}}function JR(e){let t;t=am(e)?e.map((e=>lS(e))).join("___"):lS(e);const i="string"===typeof t||"number"===typeof t||"boolean"===typeof t||t instanceof Date;for(var s=arguments.length,n=new Array(s>1?s-1:0),r=1;r<s;r++)n[r-1]=arguments[r];return i&&n.length>0&&(t+=`___${n.join("___")}`),t}function eE(e,t,i){let{id:s}=e;for(var n=arguments.length,r=new Array(n>3?n-3:0),o=3;o<n;o++)r[o-3]=arguments[o];Xm(s,t,i,r,{opacity:0},{opacity:1},{phase:"trailing"})}function tE(e,t,i){let{id:s}=e;for(var n=arguments.length,r=new Array(n>3?n-3:0),o=3;o<n;o++)r[o-3]=arguments[o];Xm(s,t,i,r,{opacity:1},{opacity:0},{phase:"remove"})}function iE(e){return{opacity:1}}var sE=class extends Df{constructor(){super(...arguments),this._dirty=3}markDirty(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this._dirty<e&&(this._dirty=e)}markClean(e){this._dirty=0}isDirty(){return this._dirty>0}},nE=class extends sE{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}};op([Ef(kf),Hg({redraw:3})],nE.prototype,"enabled",2),op([Ef(Xf),Hg({redraw:3})],nE.prototype,"color",2),op([Ef(Gf),Hg({redraw:3})],nE.prototype,"xOffset",2),op([Ef(Gf),Hg({redraw:3})],nE.prototype,"yOffset",2),op([Ef(zf),Hg({redraw:3})],nE.prototype,"blur",2);var rE=xv((e=>oD(e)||"function"===typeof e&&Object.create(e.prototype)instanceof UM),"a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class"),oE=class extends sE{constructor(){super(...arguments),this.enabled=!0,this.shape=_M,this.size=6,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1}getStyle(){const{size:e,shape:t,fill:i,fillOpacity:s,stroke:n,strokeWidth:r,strokeOpacity:o}=this;return{size:e,shape:t,fill:i,fillOpacity:s,stroke:n,strokeWidth:r,strokeOpacity:o}}getDiameter(){return this.size+this.strokeWidth}};op([Ef(kf),Hg({redraw:3})],oE.prototype,"enabled",2),op([Ef(rE),Hg({redraw:3})],oE.prototype,"shape",2),op([Ef(zf),Hg({redraw:3})],oE.prototype,"size",2),op([Ef(Xf,{optional:!0}),Hg({redraw:3})],oE.prototype,"fill",2),op([Ef(Hf),Hg({redraw:3})],oE.prototype,"fillOpacity",2),op([Ef(Xf,{optional:!0}),Hg({redraw:3})],oE.prototype,"stroke",2),op([Ef(zf),Hg({redraw:3})],oE.prototype,"strokeWidth",2),op([Ef(Hf),Hg({redraw:3})],oE.prototype,"strokeOpacity",2),op([Ef(Nf,{optional:!0}),Hg({redraw:3})],oE.prototype,"itemStyler",2);var aE=class extends Df{constructor(){super(...arguments),this.enabled=!1}};op([Ef(kf)],aE.prototype,"enabled",2);var lE=class extends Df{constructor(){super(...arguments),this.enabled=!0,this.interaction=new aE,this.position=new _C,this.range=void 0}toTooltipHtml(e,t){return this.renderer?UC(this.renderer(t),e):UC(e)}};op([Ef(kf)],lE.prototype,"enabled",2),op([Ef(kf,{optional:!0})],lE.prototype,"showArrow",2),op([Ef(Nf,{optional:!0})],lE.prototype,"renderer",2),op([Ef(Lf)],lE.prototype,"interaction",2),op([Ef(Lf)],lE.prototype,"position",2),op([Ef(yv,{optional:!0})],lE.prototype,"range",2);var hE=Sv(["linear","smooth","step"],"a line style"),cE=Sv(["start","middle","end"]),dE=class extends Df{constructor(){super(...arguments),this.type="linear",this.tension=1,this.position="end"}};op([Ef(hE)],dE.prototype,"type",2),op([Ef(Hf)],dE.prototype,"tension",2),op([Ef(cE)],dE.prototype,"position",2);var uE=class extends yD{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new dE,this.shadow=new nE,this.marker=new oE,this.label=new XC,this.tooltip=new lE,this.connectMissingData=!1}};function pE(e){switch(e.type){case"linear":case"step":return[{x:e.x0,y:e.y0},{x:e.x1,y:e.y1}];case"cubic":return[{x:e.cp0x,y:e.cp0y},{x:e.cp3x,y:e.cp3y}]}}function gE(e,t,i){const[s,n]=pE(e),r=n.x!==s.x?(i.x-t.x)/(n.x-s.x):0,o=n.y!==s.y?(i.y-t.y)/(n.y-s.y):0;switch(e.type){case"linear":return{type:"linear",moveTo:e.moveTo,x0:t.x,y0:t.y,x1:i.x,y1:i.y};case"cubic":return{type:"cubic",moveTo:e.moveTo,cp0x:t.x,cp0y:t.y,cp1x:i.x-(e.cp2x-s.x)*r,cp1y:i.y-(e.cp2y-s.y)*o,cp2x:i.x-(e.cp1x-s.x)*r,cp2y:i.y-(e.cp1y-s.y)*o,cp3x:i.x,cp3y:i.y};case"step":return{type:"step",moveTo:e.moveTo,x0:t.x,y0:t.y,x1:i.x,y1:i.y,stepX:i.x-(e.stepX-s.x)*r}}}function mE(e,t,i){const{moveTo:s}=e,[n,r]=function(e){const t=pE(e);return t[0].x>t[1].x&&t.reverse(),t}(e),{x:o,y:a}=n,{x:l,y:h}=r;if(i<o)return gE(e,n,n);if(t>l)return gE(e,r,r);switch(e.type){case"linear":{const e=a===h?void 0:(h-a)/(l-o);return{type:"linear",moveTo:s,x0:t,y0:null==e?a:e*(t-o)+a,x1:i,y1:null==e?a:e*(i-o)+a}}case"step":if(i<=e.stepX){const n=e.y0;return{type:"step",moveTo:s,x0:t,y0:n,x1:i,y1:n,stepX:i}}if(t>=e.stepX){const n=e.y1;return{type:"step",moveTo:s,x0:t,y0:n,x1:i,y1:n,stepX:t}}{const{y0:n,y1:r,stepX:o}=e;return{type:"step",moveTo:s,x0:t,y0:n,x1:i,y1:r,stepX:o}}case"cubic":{const n=lb(e.cp0x,e.cp1x,e.cp2x,e.cp3x,t);let[r,o]=hb(e.cp0x,e.cp0y,e.cp1x,e.cp1y,e.cp2x,e.cp2y,e.cp3x,e.cp3y,n);const a=lb(o[0].x,o[1].x,o[2].x,o[3].x,i);
vendor: 175,456 bytes, line 2
2return[o,r]=hb(o[0].x,o[0].y,o[1].x,o[1].y,o[2].x,o[2].y,o[3].x,o[3].y,a),{type:"cubic",moveTo:s,cp0x:o[0].x,cp0y:o[0].y,cp1x:o[1].x,cp1y:o[1].y,cp2x:o[2].x,cp2y:o[2].y,cp3x:o[3].x,cp3y:o[3].y}}}}op([Ef(Of)],uE.prototype,"xKey",2),op([Ef(Of,{optional:!0})],uE.prototype,"xName",2),op([Ef(Of)],uE.prototype,"yKey",2),op([Ef(Of,{optional:!0})],uE.prototype,"yName",2),op([Ef(Of,{optional:!0})],uE.prototype,"yFilterKey",2),op([Ef(zf,{optional:!0})],uE.prototype,"normalizedTo",2),op([Ef(Xf)],uE.prototype,"fill",2),op([Ef(Hf)],uE.prototype,"fillOpacity",2),op([Ef(Xf)],uE.prototype,"stroke",2),op([Ef(zf)],uE.prototype,"strokeWidth",2),op([Ef(Hf)],uE.prototype,"strokeOpacity",2),op([Ef(lv)],uE.prototype,"lineDash",2),op([Ef(zf)],uE.prototype,"lineDashOffset",2),op([Ef(Lf)],uE.prototype,"interpolation",2),op([Ef(Lf)],uE.prototype,"shadow",2),op([Ef(Lf)],uE.prototype,"marker",2),op([Ef(Lf)],uE.prototype,"label",2),op([Ef(Lf)],uE.prototype,"tooltip",2),op([Ef(kf)],uE.prototype,"connectMissingData",2);var fE={start:0,middle:.5,end:1};var vE=.05;function yE(e,t,i){return(t-e)*i+e}function CE(e,t){return"linear"===e.type?function(e,t){const{x0:i,y0:s,x1:n,y1:r}=e,o=(r-s)/(n-i)*(t-i)+s;return{leftCp1x:i,leftCp1y:s,leftCp2x:t,leftCp2y:o,stepX:t,stepY0:o,stepY1:o,rightCp1x:t,rightCp1y:o,rightCp2x:n,rightCp2y:r}}(e,t):"cubic"===e.type?function(e,t){const{cp0x:i,cp0y:s,cp1x:n,cp1y:r,cp2x:o,cp2y:a,cp3x:l,cp3y:h}=e,c=lb(i,n,o,l,t),[d,u]=hb(i,s,n,r,o,a,l,h,c),p=d[3].y;return{leftCp1x:d[1].x,leftCp1y:d[1].y,leftCp2x:d[2].x,leftCp2y:d[2].y,stepX:t,stepY0:p,stepY1:p,rightCp1x:u[1].x,rightCp1y:u[1].y,rightCp2x:u[2].x,rightCp2y:u[2].y}}(e,t):function(e){const{x0:t,y0:i,x1:s,y1:n,stepX:r}=e;return{leftCp1x:(t+r)/2,leftCp1y:i,leftCp2x:(t+r)/2,leftCp2y:i,stepX:r,stepY0:i,stepY1:n,rightCp1x:(r+s)/2,rightCp1y:n,rightCp2x:(r+s)/2,rightCp2y:n}}(e)}function SE(e,t,i,s,n,r,o){switch(t){case 1:o?e.moveTo(n,r):e.moveTo(i,s);break;case 2:o?e.lineTo(n,r):e.lineTo(i,s)}}function wE(e,t,i,s,n,r){r?e.lineTo(t,i):e.lineTo(s,n)}function bE(e,t,i,s,n,r,o,a,l,h){h?e.cubicCurveTo(r,o,s,n,t,i):e.cubicCurveTo(s,n,r,o,a,l)}function xE(e,t,i,s,n,r,o){o?(e.lineTo(r,n),e.lineTo(r,i),e.lineTo(t,i)):(e.lineTo(r,i),e.lineTo(r,n),e.lineTo(s,n))}function ME(e,t,i,s){const[n,r]=pE(t);switch(SE(e,i,n.x,n.y,r.x,r.y,s),t.type){case"linear":wE(e,t.x0,t.y0,t.x1,t.y1,s);break;case"cubic":bE(e,t.cp0x,t.cp0y,t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.cp3x,t.cp3y,s);break;case"step":xE(e,t.x0,t.y0,t.x1,t.y1,t.stepX,s)}}function DE(e,t,i,s,n,r){const[o,a]=pE(t),[l,h]=pE(i),c=yE(o.x,l.x,s),d=yE(o.y,l.y,s),u=yE(a.x,h.x,s),p=yE(a.y,h.y,s);if(SE(e,n,c,d,u,p,r),"cubic"===t.type&&"cubic"===i.type){bE(e,c,d,yE(t.cp1x,i.cp1x,s),yE(t.cp1y,i.cp1y,s),yE(t.cp2x,i.cp2x,s),yE(t.cp2y,i.cp2y,s),u,p,r)}else if("step"===t.type&&"step"===i.type){xE(e,c,d,u,p,yE(t.stepX,i.stepX,s),r)}else if("linear"===t.type&&"linear"===i.type)wE(e,c,d,u,p,r);else{let n;n="step"===t.type?t.stepX:"step"===i.type?i.stepX:(c+u)/2;const o=CE(t,n),a=CE(i,n),l=yE(o.leftCp1x,a.leftCp1x,s),h=yE(o.leftCp1y,a.leftCp1y,s),g=yE(o.leftCp2x,a.leftCp2x,s),m=yE(o.leftCp2y,a.leftCp2y,s),f=yE(o.stepX,a.stepX,s),v=yE(o.stepY0,a.stepY0,s),y=yE(o.stepY1,a.stepY1,s),C=yE(o.rightCp1x,a.rightCp1x,s),S=yE(o.rightCp1y,a.rightCp1y,s),w=yE(o.rightCp2x,a.rightCp2x,s),b=yE(o.rightCp2y,a.rightCp2y,s);r?(e.cubicCurveTo(w,b,C,S,f,y),e.lineTo(f,v),e.cubicCurveTo(g,m,l,h,c,d)):(e.cubicCurveTo(l,h,g,m,f,v),e.lineTo(f,y),e.cubicCurveTo(C,S,w,b,u,p))}}function IE(e,t,i){let{id:s}=e;const n={phase:i?qm[i]:"trailing"};for(var r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];Xm(s,"markers",t,o,{opacity:0},{opacity:1},n),o.forEach((e=>e.cleanup()))}function RE(e,t){let{id:i}=e;for(var s=arguments.length,n=new Array(s>2?s-2:0),r=2;r<s;r++)n[r-2]=arguments[r];Xm(i,"markers",t,n,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1},{phase:"initial"}),n.forEach((e=>e.cleanup()))}function EE(e,t){let{id:i,nodeDataDependencies:s}=e;const n=s.seriesRectWidth;for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];Qm(i,"markers",t,o,{fromFn:(e,t)=>{const i=t.midPoint?.x??n;let s=Ig(0,Wm(i/n),1);return isNaN(s)&&(s=0),{scalingX:0,scalingY:0,delay:s,duration:jm,phase:"initial"}},toFn:()=>({scalingX:1,scalingY:1})})}function AE(e){return{opacity:1,scalingX:1,scalingY:1}}function TE(e,t){return{translationX:t.point?.x??NaN,translationY:t.point?.y??NaN}}function PE(e,t){const i=(t,i)=>{const s=e[i][t];return Array.isArray(s)?s[0]:s},s=t=>{const{xValue:s}=t;return e.moved[s]?{point:i(s,"moved"),status:"updated"}:e.removed[s]?{point:i(s,"removed"),status:"removed"}:e.added[s]?{point:i(s,"added"),status:"added"}:{status:"unknown"}};return{fromFn:(e,i)=>{const{status:n,point:r}=s(i);if("unknown"===n)return{opacity:0};const o={translationX:r?.from?.x??e.translationX,translationY:r?.from?.y??e.translationY,opacity:e.opacity,phase:qm[n]};return"added"===t?{...o,opacity:0,translationX:r?.to?.x,translationY:r?.to?.y,phase:qm.added}:("added"===n&&(o.opacity=0),o)},toFn:(e,i)=>{const{status:n,point:r}=s(i);if("unknown"===n)return{opacity:0};const o={translationX:i.point.x,translationY:i.point.y,opacity:1,phase:qm[n]};return"removed"===n||"removed"===t?{...o,translationX:r?.to?.x,translationY:r?.to?.y,opacity:0,phase:qm.removed}:o}}}function LE(e,t){let{datumIndex:i}=t;const s=e.getNodeData();if(void 0===s)return;const n=s[i],{point:r}=n;if(null==n||null==r)return;const o=r.focusSize??e.getFormattedMarkerStyle(n).size,a=o/2,l=n.point.x-a,h=n.point.y-a;return wy.toCanvas(e.contentGroup,new Vg(l,h,o,o))}var FE=.05;function kE(e){return e.reduce(((e,t)=>{let{min:i,max:s}=e;return(null==i||i.point.x>t.point.x)&&(i=t),(null==s||s.point.x<t.point.x)&&(s=t),{min:i,max:s}}),{})}function NE(e,t,i){const s=(t.y-e.y)/(t.x-e.x);return{x:i,y:(i-e.x)*s+e.y}}function OE(e,t,i,s){let n=-1,r=0;const o=[];for(;r<e.length;)e[r].change!==t?e[r].change!==i?(o.length>0&&(s(o,n,r),o.length=0),n=r,r++):r++:(o.push(e[r]),r++);o.length>0&&s(o,n,r)}function GE(e,t){OE(e,"out","in",((i,s,n)=>{-1===s&&e[n]?i.forEach((t=>t.to=e[n].from)):n===e.length&&e[s]?i.forEach((t=>t.to=e[s].from)):"intersect"===t&&e[s]?.from&&e[n]?.from?i.forEach((t=>t.to=NE(e[s].from,e[n].from,t.from.x))):i.forEach((e=>e.to=e.from))})),OE(e,"in","out",((i,s,n)=>{-1===s&&e[n]?i.forEach((t=>t.from=e[n].to)):n===e.length&&e[s]?i.forEach((t=>t.from=e[s].to)):"intersect"===t&&e[s]?.to&&e[n]?.to?i.forEach((t=>t.from=NE(e[s].to,e[n].to,t.to.x))):i.forEach((e=>e.from=e.to))}))}function BE(e,t,i){const s=isNaN(e.x)?t.x:e.x,n=isNaN(e.y)?t.y:e.y,r=t.x-e.x,o=t.y-e.y;return{x:s+(isNaN(r)?0:r*i),y:n+(isNaN(o)?0:o*i)}}var VE={start:0,middle:.5,end:1};function zE(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const{path:n}=t;"smooth"===i?.type?function(e,t,i,s){const n=Array.isArray(t)?t:Array.from(t);if(0===n.length)return;if(s?e.lineTo(n[0].x,n[0].y):e.moveTo(n[0].x,n[0].y),n.length<=1)return;const r=n.map(((e,t)=>{const i=0===t?e:n[t-1],s=t===n.length-1?e:n[t+1],r=0===t||t===n.length-1;if(Math.sign(i.y-e.y)===Math.sign(s.y-e.y))return 0;if(!r){const t=Math.abs(i.y-s.y),n=Math.abs(e.y-i.y)/t,r=Math.abs(e.y-s.y)/t;if(n<=FE||1-n<=FE||r<=FE||1-r<=FE)return 0}return(s.y-i.y)/(s.x-i.x)}));0===r[1]&&(r[0]*=2),0===r[r.length-2]&&(r[r.length-1]*=2);for(let o=1;o<n.length;o+=1){const t=n[o-1],s=r[o-1],a=n[o],l=r[o],h=a.x-t.x,c=a.y-t.y;let d=h*i/3,u=h*s*i/3,p=h*i/3,g=h*l*i/3;0===l&&Math.abs(u)>Math.abs(c)&&(d*=Math.abs(c/u),u=Math.sign(u)*Math.abs(c)),0===s&&Math.abs(g)>Math.abs(c)&&(p*=Math.abs(c/g),g=Math.sign(g)*Math.abs(c)),e.cubicCurveTo(t.x+d,t.y+u,a.x-p,a.y-g,a.x,a.y)}}(n,e,i.tension??1,s):"step"===i?.type?function(e,t,i,s){let n;for(const r of t){if(null!=n){const t=n.x<r.x?i:1-i,s=(r.x-n.x)*t+n.x;e.lineTo(s,n?.y??r.y),e.lineTo(s,r.y),e.lineTo(r.x,r.y)}else s?e.lineTo(r.x,r.y):e.moveTo(r.x,r.y);n=r}}(n,e,VE[i.position??"end"],s):function(e,t,i){let s=i;for(const{x:n,y:r}of t)s?e.lineTo(n,r):(e.moveTo(n,r),s=!0)}(n,e,s)}function HE(e,t){let i,s;const n=[],r=()=>{null!=s&&(n.push(s),s=void 0)};for(const o of e){const{from:e,to:n}=o,a=t[o.change];if(null==a||null==e||null==n)continue;const l=BE(e,n,a);if(!1===o.moveTo)s??(s=[]),s.push(l);else if(!0!==o.moveTo&&i){if(i){const e="in"===o.moveTo?a:1-a,{x:t,y:n}=BE(i,l,e);s??(s=[]),s.push({x:t,y:n}),r(),s=[l]}}else r(),s=[l];i=l}return r(),n}function WE(e,t,i,s){HE(e,t).forEach((e=>{zE(e,i,s)}))}function jE(e,t){let{id:i,visible:s,nodeDataDependencies:n}=e;const{seriesRectWidth:r,seriesRectHeight:o}=n;for(var a=arguments.length,l=new Array(a>2?a-2:0),h=2;h<a;h++)l[h-2]=arguments[h];Xm(i,"path_properties",t,l,{clipX:0},{clipX:r},{phase:"initial",start:{clip:!0,clipY:o,visible:s},finish:{clip:!1,visible:s}})}function UE(e,t,i){let{id:s}=e,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"add";for(var r=arguments.length,o=new Array(r>4?r-4:0),a=4;a<r;a++)o[a-4]=arguments[a];Xm(s,t,i,o,{opacity:0},{opacity:1},{phase:n})}function _E(e,t,i){let{id:s}=e;for(var n=arguments.length,r=new Array(n>3?n-3:0),o=3;o<n;o++)r[o-3]=arguments[o];Xm(s,t,i,r,{opacity:1},{opacity:0},{phase:"remove"})}function KE(e){return t=>({visible:e.getVisible(),opacity:e.getOpacity(),clipScalingX:1,clip:!1})}function $E(e,t){let{nodeDataDependencies:i}=e;const s=e=>isFinite(e)?e:0;t.clipX=s(i.seriesRectWidth),t.clipY=s(i.seriesRectHeight)}function YE(e){return"continuous"===e.type||"log"===e.type}function ZE(e){return"category"===e.type}function qE(e,t){return e.domain.length===t.domain.length&&e.range.length===t.range.length&&e.domain.every(((e,i)=>e===t.domain[i]))&&e.range.every(((e,i)=>e===t.range[i]))}function QE(e,t){return void 0===e||void 0===t?void 0!==e||void 0!==t:YE(e)&&YE(t)?e.type===t.type&&qE(e,t):!(!ZE(e)||!ZE(t))&&qE(e,t)}function XE(e){return null!=e&&(!!e.range.every((e=>Number.isFinite(e)))&&("category"===e.type?e.domain.every((e=>null!=e)):e.domain.every((e=>Number.isFinite(e)||e instanceof Date))))}function*JE(e){let t=-1,i=0;for(const{point:s}of e){if(s.moveTo){const e=t>=0?{start:t,end:i}:void 0;t=i,i=t,void 0!==e&&(yield e)}i+=1}-1!==t&&(yield{start:t,end:i})}function eA(e,t){let{start:i,end:s}=t;return function*(){for(let t=i;t<s;t+=1)yield e[t].point}()}function tA(e,t){let{start:i,end:s}=t;return function*(){for(let t=s-1;t>=i;t-=1)yield e[t].point}()}function iA(e,t){if(!t)return NaN;if(e instanceof Date&&(e=e.getTime()),"continuous"===t.type&&"number"===typeof e){return(e-t.domain[0])/(t.domain[1]-t.domain[0])*(t.range[1]-t.range[0])+t.range[0]}if("log"===t.type&&"number"===typeof e)return t.convert(e);const i=t.domain.findIndex((t=>t===e));if(i>=0)return t.range[i];const s=t.domain.findIndex((t=>{return s=t,null!=(i=e)&&null!=s&&"object"===typeof i&&"object"===typeof s&&("id"in i&&"id"in s?i.id===s.id:i.toString()===s.toString());var i,s}));return s>=0?t.range[s]:NaN}function sA(e,t){const i=Number(e),s=Number(t);return isNaN(i)||isNaN(s)?e===t:Math.abs(s-i)<.25}function nA(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e===(arguments.length>1&&void 0!==arguments[1]&&arguments[1])?Boolean(e):e?"in":"out"}function rA(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{backfillSplitMode:s="intersect"}=i,n=[],r={added:{},moved:{},removed:{}},o=function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"move";e&&(isNaN(e.point.x)||isNaN(e.point.y))&&(e=t);const o={from:e?.point,to:t?.point,moveTo:nA(e?.point.moveTo,t?.point.moveTo),change:s};"move"===s?(r.moved[i]=o,d++,u++):"in"===s?(r.added[i]=o,u++):"out"===s&&(r.removed[i]=o,d++),n.push(o)},{min:a,max:l}=kE(t.nodeData),{min:h,max:c}=kE(e.nodeData);let d=0,u=0;for(;d<t.nodeData.length||u<e.nodeData.length;){const i=t.nodeData[d],s=e.nodeData[u],n=i?iA(i.xValue??NaN,e.scales.x):void 0,r=s?iA(s.xValue??NaN,t.scales.x):void 0,p=void 0;if(null!=n&&sA(n,s?.point.x))o(i,s,s.xValue,"move");else if(null!=n&&n<(h?.point.x??-1/0))o(i,p,i.xValue,"out");else if(null!=n&&n>(c?.point.x??1/0))o(i,p,i.xValue,"out");else if(null!=r&&r<(a?.point.x??-1/0))o(p,s,s.xValue,"in");else if(null!=r&&r>(l?.point.x??1/0))o(p,s,s.xValue,"in");else if(null!=n&&n<s?.point.x)o(i,p,i.xValue,"out");else if(null!=r&&r<i?.point.x)o(p,s,s.xValue,"in");else if(i)o(i,p,i.xValue,"out");else{if(!s)throw new Error("Unable to process points");o(p,s,s.xValue,"in")}}return GE(n,s),{result:n,resultMap:r}}function oA(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{backfillSplitMode:n="intersect",multiDatum:r=!1}=s,o=[],a={added:{},moved:{},removed:{}},l={added:{},moved:{},removed:{}},h={in:"added",move:"moved",out:"removed"};let c,d;const u=(e,t)=>{var i;const s=h[t.change];r?((i=l[s])[e]??(i[e]=[]),l[s][e].push(t)):a[s][e]=t,c=t,d=lS(e)};let p=0,g=0,m=!1;for(;p<t.nodeData.length||g<e.nodeData.length;){const s=t.nodeData[p],n=e.nodeData[g],a=lS(s?.xValue),l=lS(n?.xValue);let h;if(a===l)h={change:"move",moveTo:nA(s.point.moveTo??!1,n.point.moveTo),from:s.point,to:n.point},u(s?.xValue,h),p++,g++;else if(i?.removed.has(String(a)))h={change:"out",moveTo:s.point.moveTo??!1,from:s.point},u(s?.xValue,h),p++;else if(i?.added.has(String(l)))h={change:"in",moveTo:n.point.moveTo??!1,to:n.point},u(n?.xValue,h),g++;else if(r&&c&&d===a)h={...c},u(s?.xValue,h),p++;else{if(!r||!c||d!==l){m=!0;break}h={...c},u(n?.xValue,h),g++}o.push(h)}let f=-1/0;return m||(m=o.some((e=>{const{change:t,to:{x:i=-1/0}={}}=e;if("out"===t)return;const s=i<f;return f=i,s}))),m?{result:void 0,resultMap:void 0}:(GE(o,n),{result:o,resultMap:r?l:a})}function aA(e,t,i){let s="updated";const n=e=>e.visible;if(!n(t)&&n(e))s="added";else if(n(t)&&!n(e))s="removed";else for(let r=0;r<i.length&&"move"===i[r].change&&i[r].from?.x===i[r].to?.x&&i[r].from?.y===i[r].to?.y;r++)if(r===i.length-1)return"no-op";return s}function lA(e,t){const i="none"===t?"updated":e,s={fromFn:t=>{let s;return s="removed"===e?{finish:{visible:!1}}:"added"===e?{start:{visible:!0}}:{},{phase:qm[i],...s}},toFn:e=>({phase:qm[i]})};return"fade"===t?{fromFn:t=>({opacity:"added"===e?0:t.opacity,...s.fromFn(t)}),toFn:t=>({opacity:"removed"===e?0:1,...s.toFn(t)})}:s}function hA(e,t,i,s,n,r){const o=aA(e,t,i);return{status:o,path:{addPhaseFn:(e,t)=>{r(i,{move:1,in:e},t,n)},updatePhaseFn:(e,t)=>{r(i,{move:e},t,n)},removePhaseFn:(e,t)=>{r(i,{move:0,out:e},t,n)}},pathProperties:lA(o,s)}}function cA(e,t,i,s){const n="category"===e.scales.x?.type;if(n!==("category"===t.scales.x?.type)||!XE(e.scales.x)||!XE(t.scales.x))return;const{result:r,resultMap:o}=n?oA(e,t,i):rA(e,t);let a="updated";if(t.visible&&!e.visible?a="removed":!t.visible&&e.visible&&(a="added"),void 0===r||void 0===o)return;const l=(i?.changed??!0)||function(e,t){return!QE(e.scales.x,t.scales.x)||!QE(e.scales.y,t.scales.y)}(e,t)||"updated"!==a;return{...hA(e,t,r,"fade",s,WE),marker:PE(o,a),hasMotion:l}}function dA(e){return lS(e).valueOf()}function uA(e,t){let{data:i}=e;return i.map(((e,i)=>({xValue0Index:t.indexOf(dA(e.xValue0)),xValue1Index:t.indexOf(dA(e.xValue1)),datumIndex:i})))}function pA(e,t){const i=new Set;for(const{xValue0:a,xValue1:l}of e.data){const e=dA(a),t=dA(l);i.add(e).add(t)}const s=Array.from(i).sort(((t,i)=>iA(t,e.scales.x)-iA(i,e.scales.x))),n=[];for(const{xValue0:a,xValue1:l}of t.data){const e=dA(a),t=dA(l);i.has(e)||(i.add(e),n.push(e)),i.has(t)||(i.add(t),n.push(t))}n.sort(((e,i)=>iA(e,t.scales.x)-iA(i,t.scales.x)));const r=s;let o=0;for(const a of n){e:for(let e=r.length;e>o;e-=1){if(iA(a,t.scales.x)>iA(r[e],t.scales.x)){o=e+1;break e}}r.splice(o,0,a),o+=1}if(!function(e,t){let i=-1/0;for(const s of e){const e=iA(s,t.scales.x);if(Number.isFinite(e)){if(e<i)return!1;i=e}}return!0}(r,t))return;return{axisValues:r,oldDataAxisIndices:uA(t,r),newDataAxisIndices:uA(e,r)}}function gA(e,t,i){if(i.xValue1Index===i.xValue0Index+1)return e;const s=pE(e),n=(s[1].x-s[0].x)/(i.xValue1Index-i.xValue0Index),r=s[0].x+(t-i.xValue0Index)*n;return mE(e,r,r+n)}function mA(e,t){const[i,s]=pE(e),n=iA(0,t.scales.y);return gE(e,{x:i.x,y:n},{x:s.x,y:n})}function fA(e,t,i,s,n){let r,o;if(s.xValue0Index>=n.xValue1Index){const e=i.findLast((e=>e.xValue1Index<=n.xValue1Index))?.datumIndex,s=null!=e?t.data[e]:void 0;r=s?.xValue1,o=s?.yValue1}else if(s.xValue0Index<=n.xValue0Index){const e=i.find((e=>e.xValue0Index>=n.xValue0Index))?.datumIndex,s=null!=e?t.data[e]:void 0;r=s?.xValue0,o=s?.yValue0}if(null==r||null==o)return mA(e,t);const a={x:iA(r,t.scales.x),y:iA(o,t.scales.y)};return gE(e,a,a)}function vA(e,t){const i=dA(e.xValue0),s=dA(e.xValue1);return t?.find((e=>dA(e.xValue0)===i&&dA(e.xValue1)===s))?.span}function yA(e,t,i,s,n,r){const o=e.data[i.datumIndex],a=o.span,l=vA(o,s);if(null!=l)r.removed.push({from:l,to:l}),r.moved.push({from:l,to:a}),r.added.push({from:a,to:a});else{const s=fA(a,e,t,i,n);r.added.push({from:s,to:a})}}function CA(e,t,i,s,n,r){const o=e.data[i.datumIndex],a=o.span,l=vA(o,s);if(null!=l)r.removed.push({from:a,to:a}),r.moved.push({from:a,to:l}),r.added.push({from:l,to:l});else{const s=fA(a,e,t,i,n);r.removed.push({from:a,to:s})}}function SA(e,t,i,s,n){const r=t[n.xValue0Index],o=i.data.find((e=>dA(e.xValue0)===r)),a=t[n.xValue1Index],l=i.data.find((e=>dA(e.xValue1)===a));if(null==o||null==l)return;const[{x:h},{x:c}]=pE(e),d=iA(o.xValue0,i.scales.x),u=iA(o.yValue0,i.scales.y),p=iA(l.xValue1,i.scales.x),g=iA(l.yValue1,i.scales.y);let m=s.data[n.datumIndex].span;return m=gE(m,{x:d,y:u},{x:p,y:g}),m=mE(m,h,c),m}function wA(e,t,i,s,n,r,o,a){const l=s+1,h=r.find((e=>e.xValue0Index<=s&&e.xValue1Index>=l)),c=n.find((e=>e.xValue0Index<=s&&e.xValue1Index>=l)),d=t.zeroData,u=e.zeroData;if(null==h&&null!=c)return void yA(e,n,c,d,o,a);if(null!=h&&null==c)return void CA(t,r,h,u,o,a);if(null==h||null==c)return;let p;p=h.xValue0Index===c.xValue0Index&&h.xValue1Index===c.xValue1Index?0:h.xValue0Index<=c.xValue0Index&&h.xValue1Index>=c.xValue1Index?-1:h.xValue0Index>=c.xValue0Index&&h.xValue1Index<=c.xValue1Index?1:0;const g=gA(t.data[h.datumIndex].span,s,h),m=gA(e.data[c.datumIndex].span,s,c);if(1===p){const s=SA(g,i,t,e,c);null!=s?(a.removed.push({from:g,to:s}),a.moved.push({from:s,to:m}),a.added.push({from:m,to:m})):CA(t,r,h,u,o,a)}else if(-1===p){const s=SA(m,i,e,t,h);null!=s?(a.removed.push({from:g,to:g}),a.moved.push({from:g,to:s}),a.added.push({from:s,to:m})):yA(e,n,c,d,o,a)}else a.removed.push({from:g,to:g}),a.moved.push({from:g,to:m}),a.added.push({from:m,to:m})}function bA(e,t){const i={removed:[],moved:[],added:[]},s=pA(e,t);return null==s?function(e,t,i){for(const s of t.data){const e=s.span,n=vA(s,t.zeroData)??mA(e,t);i.removed.push({from:e,to:n})}for(const s of e.data){const t=s.span,n=vA(s,e.zeroData)??mA(t,e);i.added.push({from:n,to:t})}}(e,t,i):function(e,t,i,s){const{axisValues:n,oldDataAxisIndices:r,newDataAxisIndices:o}=e,a={xValue0Index:Math.max(r.at(0)?.xValue0Index??-1/0,o.at(0)?.xValue0Index??-1/0),xValue1Index:Math.min(r.at(-1)?.xValue1Index??1/0,o.at(-1)?.xValue1Index??1/0)};for(let l=0;l<n.length-1;l+=1)wA(t,i,n,l,o,r,a,s)}(s,e,t,i),i}function xA(e,t,i,s){for(let n=0;n<i.length;n+=1){const r=i[n],o=s[n];DE(t.path,r.from,r.to,e,1,!1),DE(t.path,o.from,o.to,e,2,!0),t.path.closePath()}}function MA(e,t,i){for(const s of i)DE(t.path,s.from,s.to,e,1,!1)}function DA(e,t){if("category"===e.scales.x?.type!==("category"===t.scales.x?.type)||!XE(e.scales.x)||!XE(t.scales.x))return;let i="updated";t.visible&&!e.visible?i="removed":!t.visible&&e.visible&&(i="added");const s=bA({scales:e.scales,data:e.fillData.spans,visible:e.visible},{scales:t.scales,data:t.fillData.spans,visible:t.visible}),n=bA({scales:e.scales,data:e.fillData.phantomSpans,visible:e.visible},{scales:t.scales,data:t.fillData.phantomSpans,visible:t.visible}),r=bA({scales:e.scales,data:e.strokeData.spans,visible:e.visible,zeroData:e.fillData.phantomSpans},{scales:t.scales,data:t.strokeData.spans,visible:t.visible,zeroData:t.fillData.phantomSpans}),o="none",a=function(e,t,i,s){return{status:e,path:{addPhaseFn:(e,s)=>xA(e,s,t.added,i.added),updatePhaseFn:(e,s)=>xA(e,s,t.moved,i.moved),removePhaseFn:(e,s)=>xA(e,s,t.removed,i.removed)},pathProperties:lA(e,s)}}(i,s,n,o),l=function(e,t,i){return{status:e,path:{addPhaseFn:(e,i)=>MA(e,i,t.added),updatePhaseFn:(e,i)=>MA(e,i,t.moved),removePhaseFn:(e,i)=>MA(e,i,t.removed)},pathProperties:lA(e,i)}}(i,r,o);return{status:i,fill:a,stroke:l}}var IA=class extends CD{constructor(e){super({moduleCtx:e,directionKeys:mD,directionNames:fD,pathsPerSeries:["fill","stroke"],pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[2,0],animationResetFns:{path:KE({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:iE,marker:(e,t)=>({opacity:1,scalingX:1,scalingY:1,...TE(0,t)})}}),this.properties=new uE}async processData(e){if(null==this.data||!this.properties.isValid())return;const{data:t,visible:i,seriesGrouping:{groupIndex:s=this.id,stackCount:n=1}={}}=this,{xKey:r,yKey:o,yFilterKey:a,connectMissingData:l,normalizedTo:h}=this.properties,c=!this.ctx.animationManager.isSkipped(),d=this.axes.x?.scale,u=this.axes.y?.scale,{xScaleType:p,yScaleType:g}=this.getScaleInformation({xScale:d,yScale:u}),m={value:`area-stack-${s}-yValue`,values:`area-stack-${s}-yValues`,stack:`area-stack-${s}-yValue-stack`,marker:`area-stack-${s}-yValues-marker`},f=[];om(h)&&f.push(jR(Object.values(m),h,"range")),c&&f.push(KR());const v={invalidValue:null};l&&n>1&&(v.invalidValue=0),i||(v.forceValue=0),await this.requestDataModel(e,t,{props:[LR(r,p,{id:"xValue"}),FR(o,g,{id:"yValueRaw",...v}),...null!=a?[FR(a,g,{id:"yFilterRaw"})]:[],...BR(o,g,{id:"yValueStack",...v,groupId:m.stack}),FR(o,g,{id:"yValue",...v,groupId:m.value}),...GR(o,"window","current",{id:"yValueEnd",...v,groupId:m.values},g),...GR(o,"normal","current",{id:"yValueCumulative",...v,groupId:m.marker},g),...f],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}getSeriesDomain(e){const{processedData:t,dataModel:i,axes:s}=this;if(!t||!i||0===t.data.length)return[];const n=s.y,r=i.resolveProcessedDataDefById(this,"xValue"),o=i.getDomain(this,"xValue","key",t),a=i.getDomain(this,"yValueEnd","value",t);if("x"===e)return"key"===r?.def.type&&"category"===r.def.valueType?o:Bx(nf(o));if(n instanceof TD||n instanceof PD)return Bx(a);return Bx([a[0]>0?0:a[0],a[1]<0?0:a[1]])}async createNodeData(){const{axes:e,data:t,processedData:{data:i}={},dataModel:s}=this,n=e.x,r=e.y;if(!n||!r||!t||!s||!this.properties.isValid())return;const{yKey:o,xKey:a,yFilterKey:l,marker:h,label:c,fill:d,stroke:u,connectMissingData:p}=this.properties,{scale:g}=n,{scale:m}=r,{isContinuousY:f}=this.getScaleInformation({xScale:g,yScale:m}),v=(g.bandwidth??0)/2,y=s.resolveProcessedDataDefsByIds(this,["yValueEnd","yValueRaw","yValueCumulative"]),C=null!=l?s.resolveProcessedDataIndexById(this,"yFilterRaw"):void 0,S=s.resolveProcessedDataIndexById(this,"yValueStack"),w=(e,t,i)=>{let s;return(om(this.properties.normalizedTo)?f&&oS(i):!isNaN(i))&&(s=t),{x:g.convert(e)+v,y:m.convert(s),size:h.size}},b=o,x=[],M=[],{visibleSameStackCount:D}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);let I=-1,R=!1;i?.forEach((e=>{const{keys:t,keys:[i],datum:n,values:r}=e;r.forEach(((e,r)=>{I++;const l=n[r],p=s.resolveProcessedDataDefsValues(y,{keys:t,values:e}),{yValueRaw:g,yValueCumulative:m,yValueEnd:f}=p,v=Number.isFinite(g),S=w(i,+m,g),D=null!=C?e[C]===g:void 0;if(!1===D&&(R=!0),v&&h&&M.push({index:I,series:this,itemId:b,datum:l,midPoint:{x:S.x,y:S.y},cumulativeValue:f,yValue:g,xValue:i,yKey:o,xKey:a,point:S,fill:h.fill??d,stroke:h.stroke??u,strokeWidth:h.strokeWidth??this.getStrokeWidth(this.properties.strokeWidth),selected:D}),v&&c){const e=this.getLabelText(c,{value:g,datum:l,xKey:a,yKey:o,xName:this.properties.xName,yName:this.properties.yName},gR);x.push({index:I,series:this,itemId:o,datum:l,x:S.x,y:S.y,labelText:e})}}))}));const{interpolation:E}=this.properties,A=e=>{let t;const i=e.map((e=>e.point));switch(E.type){case"linear":t=function(e){const t=[];let i=0,s=NaN,n=NaN;for(const{x:r,y:o}of e){if(i>0){const e=1===i;t.push({type:"linear",moveTo:e,x0:s,y0:n,x1:r,y1:o})}i+=1,s=r,n=o}return t}(i);break;case"smooth":t=function(e,t){const i=Array.isArray(e)?e:Array.from(e);if(i.length<=1)return[];const s=i.map(((e,t)=>{const s=0===t?e:i[t-1],n=t===i.length-1?e:i[t+1],r=0===t||t===i.length-1;if(Math.sign(s.y-e.y)===Math.sign(n.y-e.y))return 0;if(!r){const t=Math.abs(s.y-n.y),i=Math.abs(e.y-s.y)/t,r=Math.abs(e.y-n.y)/t;if(i<=vE||1-i<=vE||r<=vE||1-r<=vE)return 0}return(n.y-s.y)/(n.x-s.x)}));0===s[1]&&(s[0]*=2),0===s[s.length-2]&&(s[s.length-1]*=2);const n=[];for(let r=1;r<i.length;r+=1){const e=i[r-1],o=s[r-1],a=i[r],l=s[r],h=a.x-e.x,c=a.y-e.y;let d=h*t/3,u=h*o*t/3,p=h*t/3,g=h*l*t/3;0===l&&Math.abs(u)>Math.abs(c)&&(d*=Math.abs(c/u),u=Math.sign(u)*Math.abs(c)),0===o&&Math.abs(g)>Math.abs(c)&&(p*=Math.abs(c/g),g=Math.sign(g)*Math.abs(c)),n.push({type:"cubic",moveTo:1===r,cp0x:e.x,cp0y:e.y,cp1x:e.x+d,cp1y:e.y+u,cp2x:a.x-p,cp2y:a.y-g,cp3x:a.x,cp3y:a.y})}return n}(i,E.tension);break;case"step":t=function(e,t){const i=[];let s=0,n=NaN,r=NaN;const o="number"===typeof t?t:fE[t];for(const{x:a,y:l}of e){if(s>0){const e=1===s,t=n+(a-n)*o;i.push({type:"step",moveTo:e,x0:n,y0:r,x1:a,y1:l,stepX:t})}s+=1,n=a,r=l}return i}(i,E.position)}return t.map(((t,i)=>({span:t,xValue0:e[i].xDatum,yValue0:e[i].yDatum,xValue1:e[i+1].xDatum,yValue1:e[i+1].yDatum})))},T=i?.flatMap((e=>{const{keys:[t],values:i}=e;return i.map((e=>({xDatum:t,values:e})))})),P=(e,t)=>({point:{x:g.convert(e)+v,y:m.convert(t)},xDatum:e,yDatum:t}),L=e=>{const t=[];if(null==T)return[];for(let i=0;i<T.length;i+=1){const{xDatum:s,values:n}=T[i],r=n[S],o=r[e],a=Number.isFinite(o);if(p&&!a)continue;const l=T[i-1]?.values[S],h=T[i+1]?.values[S];let c=0,d=0;for(let t=0;t<=e;t+=1){const e=r[t];if(Number.isFinite(e)){(null==l||Number.isFinite(l[t]))&&(c+=e),(null==h||Number.isFinite(h[t]))&&(d+=e)}}const u=t[t.length-1];if(p||c===d&&a){const e=Math.max(c,d),i=P(s,e);Array.isArray(u)?u.push(i):null!=u?(u.skip+=1,t.push([i])):t.push([i])}else if(!a&&Array.isArray(u)&&1===u.length)t[t.length-1]={skip:1};else{const e=P(s,c),i=P(s,d);Array.isArray(u)?u.push(e):null!=u&&(u.skip+=1),t.push(a?[i]:{skip:0})}}return(e=>e.flatMap((e=>Array.isArray(e)?A(e):new Array(e.skip).fill(null))))(t)},F=this.seriesGrouping?.stackIndex??0,k=()=>{if(null==T)return[];const e=T.map((e=>{let{xDatum:t,values:i}=e;const s=i[S][F];if(!p||Number.isFinite(s))return P(t,0)})).filter((e=>null!=e));return A(e)},N=L(F),O=N.map((()=>null));for(let V=F-1;V>=-1;V-=1){let e;for(let t=0;t<O.length;t+=1)null==O[t]&&(e??(e=-1!==V?L(V):k()),O[t]=e[t])}const G=N.map(((e,t)=>e??O[t])),B=N.filter((e=>null!=e));return{itemId:b,fillData:{itemId:b,spans:G,phantomSpans:O},strokeData:{itemId:b,spans:B},labelData:x,nodeData:M,scales:this.calculateScaling(),visible:this.visible,stackVisible:D>0,crossFiltering:R}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){const{shape:e}=this.properties.marker;return new(aD(e))}async updatePathNodes(e){const{opacity:t,visible:i,animationEnabled:s}=e,[n,r]=e.paths,o=!0===this.contextNodeData?.crossFiltering,a=this.getStrokeWidth(this.properties.strokeWidth);r.setProperties({fill:void 0,lineJoin:r.lineCap="round",pointerEvents:1,stroke:this.properties.stroke,strokeWidth:a,strokeOpacity:this.properties.strokeOpacity*(o?.25:1),lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:t,visible:i||s}),n.setProperties({stroke:void 0,lineJoin:"round",pointerEvents:1,fill:this.properties.fill,fillOpacity:this.properties.fillOpacity*(o?.125:1),fillShadow:this.properties.shadow,opacity:t,visible:i||s}),$E(this,r),$E(this,n)}async updatePaths(e){this.updateAreaPaths(e.paths,e.contextData)}updateAreaPaths(e,t){for(const i of e)i.visible=t.visible;if(t.visible)this.updateFillPath(e,t),this.updateStrokePath(e,t);else for(const i of e)i.path.clear(),i.checkPathDirty()}updateFillPath(e,t){const{spans:i,phantomSpans:s}=t.fillData,[n]=e,{path:r}=n;r.clear(!0);for(let o=0;o<i.length;o+=1){const{span:e}=i[o],t=s[o].span;ME(r,e,1,!1),ME(r,t,2,!0),r.closePath()}n.checkPathDirty()}updateStrokePath(e,t){const{spans:i}=t.strokeData,[,s]=e,{path:n}=s;n.clear(!0);for(const{span:r}of i)ME(n,r,1,!1);s.checkPathDirty()}async updateMarkerSelection(e){const{nodeData:t,markerSelection:i}=e,s=this.properties.marker.enabled||!0===this.contextNodeData?.crossFiltering;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(s?t:[])}async updateMarkerNodes(e){const{markerSelection:t,isHighlight:i}=e,{xKey:s,yKey:n,marker:r,fill:o,stroke:a,strokeWidth:l,fillOpacity:h,strokeOpacity:c,highlightStyle:d}=this.properties,u=Im(i&&d.item,r.getStyle(),{fill:o,stroke:a,strokeWidth:l,fillOpacity:h,strokeOpacity:c});t.each(((e,t)=>{this.updateMarkerStyle(e,r,{datum:t,highlighted:i,xKey:s,yKey:n},u,{selected:t.selected})})),i||this.properties.marker.markClean()}async updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;return i.update(t)}async updateLabelNodes(e){const{labelSelection:t}=e,{enabled:i,fontStyle:s,fontWeight:n,fontSize:r,fontFamily:o,color:a}=this.properties.label;t.each(((e,t)=>{const{x:l,y:h,labelText:c}=t;c&&i&&this.visible?(e.fontStyle=s,e.fontWeight=n,e.fontSize=r,e.fontFamily=o,e.textAlign="center",e.textBaseline="bottom",e.text=c,e.x=l,e.y=h-10,e.fill=a,e.visible=!0):e.visible=!1}))}getTooltipHtml(e){const{id:t,axes:i,dataModel:s}=this,{xKey:n,xName:r,yName:o,tooltip:a,marker:l}=this.properties,{yKey:h,xValue:c,yValue:d,datum:u,itemId:p}=e,g=i.x,m=i.y;if(!this.properties.isValid()||!(g&&m&&ym(d))||!s)return WC;const f=g.formatDatum(c),v=m.formatDatum(d),y=fR(o),C=fR(f+": "+v),S=Im({fill:this.properties.fill},l.getStyle(),{stroke:this.properties.stroke,strokeWidth:this.properties.strokeWidth}),{fill:w}=this.getMarkerStyle(l,{datum:e,xKey:n,yKey:h,highlighted:!1},S);return a.toTooltipHtml({title:y,content:C,backgroundColor:w},{datum:u,itemId:p,xKey:n,xName:r,yKey:h,yName:o,color:w,title:y,seriesId:t})}getLegendData(e){if(!this.data?.length||!this.properties.isValid()||!this.properties.showInLegend||"category"!==e)return[];const{yKey:t,yName:i,fill:s,stroke:n,fillOpacity:r,strokeOpacity:o,strokeWidth:a,lineDash:l,marker:h,visible:c,legendItemName:d}=this.properties,u=!h.enabled||void 0===h.fill;return[{legendType:e,id:this.id,itemId:t,seriesId:this.id,enabled:c,label:{text:d??i??t},symbols:[{marker:{shape:h.shape,fill:u?s:h.fill,fillOpacity:u?r:h.fillOpacity,stroke:h.stroke??n,strokeOpacity:h.strokeOpacity??o,strokeWidth:h.strokeWidth??0,enabled:h.enabled||a<=0},line:{stroke:n,strokeOpacity:o,strokeWidth:a,lineDash:l}}],legendItemName:d}]}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,contextData:s,paths:n}=e,{animationManager:r}=this.ctx;this.updateAreaPaths(n,s),jE(this,r,...n),Tv([t],TE),EE(this,r,t),eE(this,"labels",r,i)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateAreaPaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){const{animationManager:t}=this.ctx,{markerSelection:i,labelSelection:s,contextData:n,paths:r,previousContextData:o}=e,[a,l]=r;if(null==a&&null==l)return;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);const h=()=>{this.resetPathAnimation(e),this.updateAreaPaths(r,n)},c=()=>{t.skipCurrentBatch(),h()};if(null==n||null==o)return h(),IE(this,t,"added",i),UE(this,"fill_path_properties",t,"add",a),UE(this,"stroke_path_properties",t,"add",l),void eE(this,"labels",t,s);if(n.crossFiltering!==o.crossFiltering)return void c();const d=DA(n,o);void 0!==d?"no-op"!==d.status&&(IE(this,t,void 0,i),Qm(this.id,"fill_path_properties",t,[a],d.fill.pathProperties),pR(this.id,"fill_path_update",t,[a],d.fill.path),Qm(this.id,"stroke_path_properties",t,[l],d.stroke.pathProperties),pR(this.id,"stroke_path_update",t,[l],d.stroke.path),eE(this,"labels",t,s),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(r,n)})):c()}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new xy}getFormattedMarkerStyle(e){const{xKey:t,yKey:i}=e;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,highlighted:!0})}computeFocusBounds(e){return LE(this,e)}};IA.className="AreaSeries",IA.type="area";var RA={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",moduleFactory:e=>new IA(e),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{nodeClickRange:"nearest",tooltip:{position:{type:"node"}},fillOpacity:.8,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:AI,xOffset:3,yOffset:3,blur:5},interpolation:{type:"linear",tension:1,position:"end"},marker:{enabled:!1,shape:"circle",size:7,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:SI,color:wI}}},paletteFactory:e=>{const{marker:t}=cI(e);return{fill:t.fill,stroke:t.stroke,marker:t}}};function EA(e,t){return i=>t(i)?[{...e[0],position:e[1].position},{...e[1],position:e[0].position}]:e}function AA(e,t){for(const i of t){const t=i.datum;void 0===t?fp.error("undefined datum"):e.addValue(i,t)}}function TA(e,t){const{x:i,y:s}=t,{nearest:n,distanceSquared:r}=e.getQuadTree().find(i,s);if(void 0!==n)return{datum:n.value,distance:Math.sqrt(r)}}var PA=class extends yD{constructor(){super(...arguments),this.direction="vertical"}};op([Ef(fv)],PA.prototype,"direction",2);var LA=class extends CD{constructor(){super(...arguments),this.groupScale=new Mf,this.smallestDataInterval=void 0,this.largestDataInterval=void 0}padBandExtent(e,t){const i="boolean"===typeof t?1:.5,s=ym(this.smallestDataInterval)?this.smallestDataInterval*i:0,n=nf(e)??[NaN,NaN];return"boolean"===typeof t?n[t?0:1]-=(t?1:-1)*s:(n[0]-=s,n[1]+=s),Bx(n)}getBandScalePadding(){return{inner:.3,outer:.15}}shouldFlipXY(){return!this.isVertical()}isVertical(){return"vertical"===this.properties.direction}getBarDirection(){return this.shouldFlipXY()?"x":"y"}getCategoryDirection(){return this.shouldFlipXY()?"y":"x"}getValueAxis(){const e=this.getBarDirection();return this.axes[e]}getCategoryAxis(){const e=this.getCategoryDirection();return this.axes[e]}getBandwidth(e){return sf.is(e.scale)?e.scale.calcBandwidth(this.smallestDataInterval):e.scale.bandwidth}updateGroupScale(e){const t=[],{groupScale:i}=this,s=this.getBandwidth(e),{index:n,visibleGroupCount:r}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);for(let o=0;o<r;o++)t.push(String(o));i.domain=t,i.range=[0,s??0],e instanceof JS?i.paddingInner=e.groupPaddingInner:i.padding=e instanceof dw?.1:0,i.round=0!==i.padding;return{barWidth:i.bandwidth>=1?i.bandwidth:i.rawBandwidth,groupIndex:n}}resolveKeyDirection(e){return"x"===this.getBarDirection()?"x"===e?"y":"x":e}initQuadTree(e){AA(e,this.datumNodesIter())}pickNodeClosestDatum(e){return TA(this,e)}},FA=class extends XC{constructor(){super(...arguments),this.placement="inside-center",this.padding=0}};op([Ef(Sv(["inside-center","inside-start","inside-end","outside-start","outside-end",{value:"inside",deprecatedTo:"inside-center"},{value:"outside",deprecatedTo:"outside-end"}],"a placement"))],FA.prototype,"placement",2),op([Ef(Gf)],FA.prototype,"padding",2);var kA=class extends PA{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.crisp=void 0,this.shadow=new nE,this.label=new FA,this.tooltip=new lE,this.sparklineMode=!1}};function NA(e,t){e.crisp=t.crisp??!0,e.fill=t.fill,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineDash=t.lineDash,e.lineDashOffset=t.lineDashOffset,e.fillShadow=t.fillShadow,e.topLeftCornerRadius=!1!==t.topLeftCornerRadius?t.cornerRadius??0:0,e.topRightCornerRadius=!1!==t.topRightCornerRadius?t.cornerRadius??0:0,e.bottomRightCornerRadius=!1!==t.bottomRightCornerRadius?t.cornerRadius??0:0,e.bottomLeftCornerRadius=!1!==t.bottomLeftCornerRadius?t.cornerRadius??0:0,e.visible=t.visible??!0}function OA(e){let{datum:t,isHighlighted:i,style:s,highlightStyle:n,itemStyler:r,seriesId:o,ctx:{callbackCache:a},...l}=e;const{fill:h,fillOpacity:c,stroke:d,strokeWidth:u,strokeOpacity:p,lineDash:g,lineDashOffset:m,cornerRadius:f=0}=Im(i&&n,s);let v;return r&&(v=a.call(r,{datum:t.datum,xKey:t.xKey,fill:h,fillOpacity:c,stroke:d,strokeWidth:u,strokeOpacity:p,lineDash:g,lineDashOffset:m,cornerRadius:f,highlighted:i,seriesId:o,...l})),{fill:v?.fill??h,fillOpacity:v?.fillOpacity??c,stroke:v?.stroke??d,strokeWidth:v?.strokeWidth??u,strokeOpacity:v?.strokeOpacity??p,lineDash:v?.lineDash??g,lineDashOffset:v?.lineDashOffset??m,cornerRadius:v?.cornerRadius??f,topLeftCornerRadius:s.topLeftCornerRadius,topRightCornerRadius:s.topRightCornerRadius,bottomRightCornerRadius:s.bottomRightCornerRadius,bottomLeftCornerRadius:s.bottomLeftCornerRadius,fillShadow:s.fillShadow}}function GA(e,t,i,s){if(null!=t){const[e,i]=t;if(0!==e||1!==i)return!1}if(sf.is(e)){const t=e.calcBandwidth(s)-e.calcBandwidth(i);if(t>0&&t<1)return!1}return!0}op([Ef(Of)],kA.prototype,"xKey",2),op([Ef(Of,{optional:!0})],kA.prototype,"xName",2),op([Ef(Of)],kA.prototype,"yKey",2),op([Ef(Of,{optional:!0})],kA.prototype,"yName",2),op([Ef(Of,{optional:!0})],kA.prototype,"yFilterKey",2),op([Ef(Of,{optional:!0})],kA.prototype,"stackGroup",2),op([Ef(Gf,{optional:!0})],kA.prototype,"normalizedTo",2),op([Ef(Xf)],kA.prototype,"fill",2),op([Ef(Hf)],kA.prototype,"fillOpacity",2),op([Ef(Xf)],kA.prototype,"stroke",2),op([Ef(zf)],kA.prototype,"strokeWidth",2),op([Ef(Hf)],kA.prototype,"strokeOpacity",2),op([Ef(lv)],kA.prototype,"lineDash",2),op([Ef(zf)],kA.prototype,"lineDashOffset",2),op([Ef(zf)],kA.prototype,"cornerRadius",2),op([Ef(kf,{optional:!0})],kA.prototype,"crisp",2),op([Ef(Nf,{optional:!0})],kA.prototype,"itemStyler",2),op([Ef(Lf,{optional:!0})],kA.prototype,"shadow",2),op([Ef(Lf)],kA.prototype,"label",2),op([Ef(Lf)],kA.prototype,"tooltip",2),op([Ef(kf)],kA.prototype,"sparklineMode",2);var BA=e=>Pg(e.yValue??0);function VA(e,t,i){const{startingX:s,startingY:n}=function(e,t){const i=t[e?"y":"x"];let s=1/0,n=0;if(!i)return{startingX:s,startingY:n};e?n=i.scale.convert(sf.is(i.scale)?0:Math.max(...i.range)):s=i.scale.convert(sf.is(i.scale)?0:Math.min(...i.range));return{startingX:s,startingY:n}}(e,t);return{isVertical:e,calculate:(t,i)=>{let r=e?t.x:s,o=e?n:t.y,a=e?t.width:0,l=e?0:t.height;const{opacity:h}=t;let c;return i&&(isNaN(r)||isNaN(o))&&(({x:r,y:o}=i),a=e?i.width:0,l=e?0:i.height,e&&!BA(i)?o+=i.height:!e&&BA(i)&&(r+=i.width)),c=null==t.clipBBox?void 0:BA(t)?e?new Vg(r,o-l,a,l):new Vg(r-a,o,a,l):new Vg(r,o,a,l),{x:r,y:o,width:a,height:l,clipBBox:c,opacity:h}},mode:i}}function zA(e,t){return{isVertical:e,calculate:t=>({x:e?t.x:t.x+t.width/2,y:e?t.y+t.height/2:t.y,width:e?t.width:0,height:e?0:t.height,clipBBox:t.clipBBox,opacity:t.opacity}),mode:t}}function HA(e){const t=e=>null==e||isNaN(e.x)||isNaN(e.y);return{toFn:(i,s,n)=>{let r;return r="removed"===n&&null==i.datum&&"fade"===e.mode?{...WA(i,s),opacity:0}:"removed"===n||t(s)?e.calculate(s,i.previousDatum):{x:s.x,y:s.y,width:s.width,height:s.height,clipBBox:s.clipBBox,opacity:s.opacity},r},fromFn:(i,s,n)=>{let r;"updated"===n&&t(s)?n="removed":"updated"===n&&t(i.previousDatum)&&(n="added"),r="added"===n&&null==i.previousDatum&&"fade"===e.mode?{...WA(i,s),opacity:0}:"unknown"===n||"added"===n?e.calculate(s,i.previousDatum):{x:i.x,y:i.y,width:i.width,height:i.height,clipBBox:i.clipBBox,opacity:i.opacity};const o=qm[n];return{...r,phase:o}}}}function WA(e,t){let{x:i,y:s,width:n,height:r,clipBBox:o,opacity:a}=t;return{x:i,y:s,width:n,height:r,clipBBox:o,opacity:a}}function jA(e,t,i){if(void 0===e)return;const{x:s,y:n,width:r,height:o}=e;return wy.toCanvas(t,new Vg(s,n,r,o)).clip(i)}function UA(e,t,i){if(t.enabled&&i){const{x:s,y:n,text:r,textAlign:o,textBaseline:a}=i,{color:l,fontStyle:h,fontWeight:c,fontSize:d,fontFamily:u}=t;e.setProperties({visible:!0,x:s,y:n,text:r,fill:l,fontStyle:h,fontWeight:c,fontSize:d,fontFamily:u,textAlign:o,textBaseline:a})}else e.visible=!1}var _A={"inside-start":{inside:!0,direction:-1,textAlignment:1},"inside-end":{inside:!0,direction:1,textAlignment:-1},"outside-start":{inside:!1,direction:-1,textAlignment:-1},"outside-end":{inside:!1,direction:1,textAlignment:1}};function KA(e){let{isUpward:t,isVertical:i,placement:s,padding:n=0,rect:r}=e,o=r.x+r.width/2,a=r.y+r.height/2,l="center",h="middle";if("inside-center"!==s){const e=(t?1:-1)*(i?-1:1),{direction:c,textAlignment:d}=_A[s],u=.5*(c+1);if(i){a=(t?r.y+r.height:r.y)+r.height*e*u+n*d*e,h=d===e?"top":"bottom"}else{o=(t?r.x:r.x+r.width)+r.width*e*u+n*d*e,l=d===e?"left":"right"}}return{x:o,y:a,textAlign:l,textBaseline:h}}var $A={"inside-center":"inside-center","inside-start":"inside-start","inside-end":"inside-end","outside-start":"outside-start","outside-end":"outside-end",inside:"inside-center",outside:"outside-end"},YA=class extends LA{constructor(e){super({moduleCtx:e,directionKeys:mD,directionNames:fD,pickModes:[2,1,0],pathsPerSeries:[],hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationAlwaysUpdateSelections:!0,animationResetFns:{datum:WA,label:iE}}),this.properties=new kA}get pickModeAxis(){return this.properties.sparklineMode?"main":void 0}crossFilteringEnabled(){return null!=this.properties.yFilterKey&&(null==this.seriesGrouping||0===this.seriesGrouping.stackIndex)}async processData(e){if(!this.properties.isValid()||!this.data)return;const{seriesGrouping:{groupIndex:t=this.id}={},data:i=[]}=this,{xKey:s,yKey:n,yFilterKey:r,normalizedTo:o}=this.properties,a=!this.ctx.animationManager.isSkipped(),l=this.getCategoryAxis()?.scale,h=this.getValueAxis()?.scale,{isContinuousX:c,xScaleType:d,yScaleType:u}=this.getScaleInformation({xScale:l,yScale:h}),p=`bar-stack-${t}-yValues`,g=`${p}-trailing`,m=[];ym(o)&&m.push(jR([p,g],Math.abs(o),"range")),a&&this.processedData&&m.push(XR(this.processedData)),a&&m.push(KR());const f=this.visible?{}:{forceValue:0},{processedData:v}=await this.requestDataModel(e,i,{props:[LR(s,d,{id:"xValue"}),FR(n,u,{id:"yValue-raw",invalidValue:null,...f}),...this.crossFilteringEnabled()?[FR(r,u,{id:"yFilterValue",invalidValue:null,...f})]:[],...GR(n,"normal","current",{id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:p,separateNegative:!0,...f},u),...GR(n,"trailing","current",{id:"yValue-start",invalidValue:null,missingValue:0,groupId:g,separateNegative:!0,...f},u),...c?[VR,zR]:[],...m],groupByKeys:!0,groupByData:!1});this.smallestDataInterval=v.reduced?.smallestKeyInterval,this.largestDataInterval=v.reduced?.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!i||!t?.data.length)return[];const s=i.resolveProcessedDataDefById(this,"xValue"),n=i.getDomain(this,"xValue","key",t);let r=i.getDomain(this,"yValue-end","value",t);const o=this.crossFilteringEnabled()?i.getDomain(this,"yFilterValue","value",t):void 0;if(null!=o&&(r=[Math.min(r[0],o[0]),Math.max(r[1],o[1])]),e===this.getCategoryDirection())return"key"===s?.def.type&&"category"===s.def.valueType?n:this.padBandExtent(n);if(this.getValueAxis()instanceof TD)return Bx(r);return Bx([Math.min(0,r[0]),Math.max(0,r[1])])}async createNodeData(){const{dataModel:e}=this,t=this.getCategoryAxis(),i=this.getValueAxis();if(!e||!t||!i||!this.properties.isValid())return;const s=t.scale,n=i.scale,{xKey:r,yKey:o,xName:a,yName:l,fill:h,stroke:c,strokeWidth:d,cornerRadius:u,legendItemName:p,label:g}=this.properties,m=i.isReversed(),{barWidth:f,groupIndex:v}=this.updateGroupScale(t),y=sf.is(s)?-.5*f:0,C=e.resolveProcessedDataIndexById(this,"xValue"),S=e.resolveProcessedDataIndexById(this,"yValue-raw"),w=this.crossFilteringEnabled()?e.resolveProcessedDataIndexById(this,"yFilterValue"):void 0,b=e.resolveProcessedDataIndexById(this,"yValue-start"),x=e.resolveProcessedDataIndexById(this,"yValue-end"),M=e.resolveProcessedDataIndexById(this,"yValue-range"),D=!this.ctx.animationManager.isSkipped(),I=e=>{let{datum:t,valueIndex:i,xValue:a,yValue:l,cumulativeValue:p,phantom:C,currY:S,prevY:w,isPositive:b,yRange:x,labelText:M,crossScale:D=1}=e;const I=s.convert(a),E=b!==m,A=I+R.convert(String(v))+y,T=n.convert(S),P=n.convert(w),L="x"===this.getBarDirection(),F=n.convert(x),k=n.convert(0),N=.5*f*(1-D),O={x:L?Math.min(T,P):A+N,y:L?A+N:Math.min(T,P),width:L?Math.abs(P-T):f*D,height:L?f*D:Math.abs(P-T)},G=new Vg(O.x,O.y,O.width,O.height),B={x:L?Math.min(k,F):A+N,y:L?A+N:Math.min(k,F),width:L?Math.abs(k-F):f*D,height:L?f*D:Math.abs(k-F)},V=this.shouldFlipXY()?O.height:O.width;return{series:this,itemId:C?JR(o,C):o,datum:t,valueIndex:i,cumulativeValue:p,phantom:C,xValue:a,yValue:l,yKey:o,xKey:r,capDefaults:{lengthRatioMultiplier:V,lengthMax:V},x:B.x,y:B.y,width:B.width,height:B.height,midPoint:{x:O.x+O.width/2,y:O.y+O.height/2},fill:h,stroke:c,opacity:1,strokeWidth:d,cornerRadius:u,topLeftCornerRadius:L!==E,topRightCornerRadius:E,bottomRightCornerRadius:L===E,bottomLeftCornerRadius:!E,clipBBox:G,label:null!=M?{text:M,...KA({isUpward:E,isVertical:!L,placement:$A[g.placement],padding:g.padding,rect:O})}:void 0,missing:null==l,focusable:!C}},{groupScale:R,processedData:E}=this,A=[],T=[],P=[];return E?.data.forEach((e=>{let{keys:t,datum:i,values:s,aggValues:n}=e;s.forEach(((e,s)=>{const h=t[C],c=e[S],d=Number(e[b]),u=null!=w?Number(e[w]):void 0,g=Number(e[x]),m=c>=0&&!Object.is(c,-0),f=n?.[M][m?1:0]??0;if(!Number.isFinite(g))return;if(null!=u&&!Number.isFinite(u))return;const v=null!=c?this.getLabelText(this.properties.label,{datum:i[s],value:u??c,xKey:r,yKey:o,xName:a,yName:l,legendItemName:p},gR):void 0,y=null!=u&&u>c,D=I({datum:i[s],valueIndex:s,xValue:h,yValue:u??c,cumulativeValue:u??g,phantom:!1,currY:null!=u?d+u:g,prevY:d,isPositive:m,yRange:Math.max(d+(u??-1/0),f),labelText:v,crossScale:y?.6:void 0});if(T.push(D),P.push(D),null!=u){const e=I({datum:i[s],valueIndex:s,xValue:h,yValue:u,cumulativeValue:u,phantom:!0,currY:g,prevY:d,isPositive:m,yRange:f,labelText:void 0,crossScale:void 0});A.push(e)}}))})),{itemId:o,nodeData:A.length>0?[...A,...T]:T,labelData:P,scales:this.calculateScaling(),visible:this.visible||D}}nodeFactory(){return new OD}getHighlightData(e,t){const i=e.find((e=>e.datum===t.datum&&!e.phantom));return null!=i?[i]:void 0}async updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,(e=>JR(e.xValue,e.valueIndex,e.phantom)))}async updateDatumNodes(e){if(!this.properties.isValid())return;const{yKey:t,stackGroup:i,fill:s,fillOpacity:n,stroke:r,strokeWidth:o,strokeOpacity:a,lineDash:l,lineDashOffset:h,itemStyler:c,shadow:d,highlightStyle:{item:u}}=this.properties,p=this.axes.x,g=this.properties.crisp??GA(p?.scale,p?.visibleRange,this.smallestDataInterval,this.largestDataInterval),m="x"===this.getCategoryDirection(),f={fill:s,stroke:r,lineDash:l,lineDashOffset:h,fillShadow:d,strokeWidth:this.getStrokeWidth(o),fillOpacity:0,strokeOpacity:0},v={datum:void 0,ctx:this.ctx,seriesId:this.id,isHighlighted:e.isHighlight,highlightStyle:u,yKey:t,style:f,itemStyler:c,stackGroup:i};e.datumSelection.each(((e,t)=>{f.fillOpacity=n*(t.phantom?.2:1),f.strokeOpacity=a*(t.phantom?.2:1),f.cornerRadius=t.cornerRadius,f.topLeftCornerRadius=t.topLeftCornerRadius,f.topRightCornerRadius=t.topRightCornerRadius,f.bottomRightCornerRadius=t.bottomRightCornerRadius,f.bottomLeftCornerRadius=t.bottomLeftCornerRadius;const i=m?(t.clipBBox?.width??t.width)>0:(t.clipBBox?.height??t.height)>0;v.datum=t;const s=OA(v);s.crisp=g,s.visible=i,NA(e,s)}))}async updateLabelSelection(e){const t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t,(e=>{e.pointerEvents=1}))}async updateLabelNodes(e){e.labelSelection.each(((e,t)=>{UA(e,this.properties.label,t.label)}))}getTooltipHtml(e){const{id:t,processedData:i,ctx:{callbackCache:s}}=this,n=this.getCategoryAxis(),r=this.getValueAxis();if(!i||!this.properties.isValid()||!n||!r)return WC;const{xKey:o,yKey:a,xName:l,yName:h,fill:c,stroke:d,strokeWidth:u,tooltip:p,itemStyler:g,stackGroup:m,legendItemName:f}=this.properties,{xValue:v,yValue:y,datum:C,itemId:S}=e,w=n.formatDatum(v),b=r.formatDatum(y),x=fR(h),M=fR(w+": "+b);let D;g&&(D=s.call(g,{seriesId:t,datum:C,xKey:o,yKey:a,stackGroup:m,fill:c,stroke:d,strokeWidth:this.getStrokeWidth(u),highlighted:!1,cornerRadius:this.properties.cornerRadius,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash??[],lineDashOffset:this.properties.lineDashOffset}));const I=D?.fill??c;return p.toTooltipHtml({title:x,content:M,backgroundColor:I},{seriesId:t,itemId:S,datum:C,xKey:o,yKey:a,xName:l,yName:h,stackGroup:m,title:x,color:I,legendItemName:f,...this.getModuleTooltipParams()})}getLegendData(e){const{showInLegend:t}=this.properties;if("category"!==e||!this.data?.length||!this.properties.isValid()||!t)return[];const{yKey:i,yName:s,fill:n,stroke:r,strokeWidth:o,fillOpacity:a,strokeOpacity:l,legendItemName:h,visible:c}=this.properties;return[{legendType:"category",id:this.id,itemId:i,seriesId:this.id,enabled:c,label:{text:h??s??i},symbols:[{marker:{fill:n,fillOpacity:a,stroke:r,strokeWidth:o,strokeOpacity:l}}],legendItemName:h}]}animateEmptyUpdateReady(e){let{datumSelection:t,labelSelection:i,annotationSelections:s}=e;const n=HA(VA(this.isVertical(),this.axes,"normal"));Qm(this.id,"nodes",this.ctx.animationManager,[t],n),eE(this,"labels",this.ctx.animationManager,i),eE(this,"annotations",this.ctx.animationManager,...s)}animateWaitingUpdateReady(e){const{datumSelection:t,labelSelection:i,annotationSelections:s,previousContextData:n}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id);const r=this.processedData?.reduced?.diff,o=null==n?"fade":"normal",a=HA(VA(this.isVertical(),this.axes,o));Qm(this.id,"nodes",this.ctx.animationManager,[t],a,((e,t)=>JR(t.xValue,t.valueIndex,t.phantom)),r);(r?.changed??!0)&&(eE(this,"labels",this.ctx.animationManager,i),eE(this,"annotations",this.ctx.animationManager,...s))}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds(e){let{datumIndex:t,seriesRect:i}=e;const s=this.contextNodeData?.nodeData[t].clipBBox;return jA(s,this.contentGroup,i)}};YA.className="BarSeries",YA.type="bar";var ZA={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",moduleFactory:e=>new YA(e),stackable:!0,groupable:!0,tooltipDefaults:{range:"exact"},defaultAxes:EA([{type:"number",position:"left"},{type:"category",position:"bottom"}],(e=>"horizontal"===e?.direction)),themeTemplate:{series:{direction:"vertical",fillOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontWeight:"normal",fontSize:12,fontFamily:SI,color:xI,placement:"inside-center"},shadow:{enabled:!1,color:AI,xOffset:3,yOffset:3,blur:5},errorBar:{cap:{lengthRatio:.3}}}},paletteFactory:hI},qA=class extends oE{constructor(){super(...arguments),this.maxSize=30}};op([Ef(zf),Hg({redraw:3})],qA.prototype,"maxSize",2),op([Ef(tv,{optional:!0}),Hg({redraw:3})],qA.prototype,"domain",2);var QA=class extends XC{constructor(){super(...arguments),this.placement="top"}};op([Ef(Cv)],QA.prototype,"placement",2);var XA=class extends yD{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.label=new QA,this.tooltip=new lE,this.marker=new qA}};op([Ef(Of)],XA.prototype,"xKey",2),op([Ef(Of)],XA.prototype,"yKey",2),op([Ef(Of)],XA.prototype,"sizeKey",2),op([Ef(Of,{optional:!0})],XA.prototype,"labelKey",2),op([Ef(Of,{optional:!0})],XA.prototype,"colorKey",2),op([Ef(Of,{optional:!0})],XA.prototype,"xFilterKey",2),op([Ef(Of,{optional:!0})],XA.prototype,"yFilterKey",2),op([Ef(Of,{optional:!0})],XA.prototype,"sizeFilterKey",2),op([Ef(Of,{optional:!0})],XA.prototype,"xName",2),op([Ef(Of,{optional:!0})],XA.prototype,"yName",2),op([Ef(Of,{optional:!0})],XA.prototype,"sizeName",2),op([Ef(Of,{optional:!0})],XA.prototype,"labelName",2),op([Ef(Of,{optional:!0})],XA.prototype,"colorName",2),op([Ef(tv,{optional:!0})],XA.prototype,"colorDomain",2),op([Ef(Jf)],XA.prototype,"colorRange",2),op([Ef(Of,{optional:!0})],XA.prototype,"title",2),op([MC("marker.shape")],XA.prototype,"shape",2),op([MC("marker.size")],XA.prototype,"size",2),op([MC("marker.maxSize")],XA.prototype,"maxSize",2),op([MC("marker.domain",{optional:!0})],XA.prototype,"domain",2),op([MC("marker.fill",{optional:!0})],XA.prototype,"fill",2),op([MC("marker.fillOpacity")],XA.prototype,"fillOpacity",2),op([MC("marker.stroke",{optional:!0})],XA.prototype,"stroke",2),op([MC("marker.strokeWidth")],XA.prototype,"strokeWidth",2),op([MC("marker.strokeOpacity")],XA.prototype,"strokeOpacity",2),op([MC("marker.itemStyler",{optional:!0})],XA.prototype,"itemStyler",2),op([Ef(Lf)],XA.prototype,"label",2),op([Ef(Lf)],XA.prototype,"tooltip",2);var JA=class extends vD{constructor(e,t,i,s){super(e,t,i,s),this.sizeKey=s.properties.sizeKey}},eT=class extends CD{constructor(e){super({moduleCtx:e,directionKeys:mD,directionNames:fD,pickModes:[2,1,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:iE,marker:AE}}),this.NodeEvent=JA,this.properties=new XA,this.sizeScale=new ID,this.colorScale=new Zy}get pickModeAxis(){return"main-category"}async processData(e){if(!this.properties.isValid()||null==this.data||!this.visible)return;const t=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:s,yScaleType:n}=this.getScaleInformation({xScale:t,yScale:i}),r=this.colorScale.type,o=this.sizeScale.type,{xKey:a,yKey:l,sizeKey:h,xFilterKey:c,yFilterKey:d,sizeFilterKey:u,labelKey:p,colorDomain:g,colorRange:m,colorKey:f,marker:v}=this.properties,{dataModel:y,processedData:C}=await this.requestDataModel(e,this.data,{props:[FR(a,s,{id:"xValue"}),FR(l,n,{id:"yValue"}),...null!=c?[FR(c,s,{id:"xFilterValue"})]:[],...null!=d?[FR(d,n,{id:"yFilterValue"})]:[],...null!=u?[FR(u,o,{id:"sizeFilterValue"})]:[],FR(h,o,{id:"sizeValue"}),...f?[FR(f,r,{id:"colorValue"})]:[],...p?[FR(p,"band",{id:"labelValue"})]:[]]}),S=y.resolveProcessedDataIndexById(this,"sizeValue"),w=C.domain.values[S]??[];if(this.sizeScale.domain=v.domain?v.domain:w,f){const e=y.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=g??C.domain.values[e]??[],this.colorScale.range=m,this.colorScale.update()}this.animationState.transition("updateData")}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const s="x"===e?"xValue":"yValue",n=t.resolveProcessedDataDefById(this,s),r=t.getDomain(this,s,"value",i);return"value"===n?.def.type&&"category"===n?.def.valueType?r:Bx(nf(r))}async createNodeData(){const{axes:e,dataModel:t,processedData:i,colorScale:s,sizeScale:n}=this,{xKey:r,yKey:o,sizeKey:a,xFilterKey:l,yFilterKey:h,sizeFilterKey:c,labelKey:d,xName:u,yName:p,sizeName:g,labelName:m,label:f,colorKey:v,marker:y,visible:C}=this.properties,S=aD(y.shape),{placement:w}=f,b=e.x,x=e.y;if(!(t&&i&&C&&b&&x))return;const M=t.resolveProcessedDataIndexById(this,"xValue"),D=t.resolveProcessedDataIndexById(this,"yValue"),I=null!=a?t.resolveProcessedDataIndexById(this,"sizeValue"):void 0,R=null!=v?t.resolveProcessedDataIndexById(this,"colorValue"):-1,E=null!=d?t.resolveProcessedDataIndexById(this,"labelValue"):-1,A=null!=l?t.resolveProcessedDataIndexById(this,"xFilterValue"):void 0,T=null!=h?t.resolveProcessedDataIndexById(this,"yFilterValue"):void 0,P=null!=c?t.resolveProcessedDataIndexById(this,"sizeFilterValue"):void 0,L=b.scale,F=x.scale,k=(L.bandwidth??0)/2,N=(F.bandwidth??0)/2,O=[];n.range=[y.size,y.maxSize];const G=f.getFont(),B=sC.getMeasurer({font:G});for(const{values:V,datum:z}of i.data??[]){const e=V[M],t=V[D],i=null!=I?V[I]:void 0,l=L.convert(e)+k,h=F.convert(t)+N;let c;null!=A&&null!=T&&(c=V[A]===e&&V[T]===t,null!=P&&c&&(c=V[P]===i));const C=this.getLabelText(f,{value:d?V[E]:t,datum:z,xKey:r,yKey:o,sizeKey:a,labelKey:d,xName:u,yName:p,sizeName:g,labelName:m}),b=B.measureText(String(C)),x=i?n.convert(i):y.size,G=v?s.convert(V[R]):void 0;O.push({series:this,itemId:o,yKey:o,xKey:r,datum:z,xValue:e,yValue:t,sizeValue:i,point:{x:l,y:h,size:x},midPoint:{x:l,y:h},fill:G,label:{text:C,...b},marker:S,placement:w,selected:c})}return{itemId:o,nodeData:O,labelData:O,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.contextNodeData?.labelData??[]}markerFactory(){const{shape:e}=this.properties.marker;return new(aD(e))}async updateMarkerSelection(e){const{nodeData:t,markerSelection:i}=e;this.properties.marker.isDirty()&&(i.clear(),i.cleanup());const s=this.properties.marker.enabled?t:[];return i.update(s,void 0,(e=>JR([e.xValue,e.yValue,e.label.text])))}async updateMarkerNodes(e){const{markerSelection:t,isHighlight:i}=e,{xKey:s,yKey:n,sizeKey:r,labelKey:o,marker:a}=this.properties,{size:l,shape:h,fill:c,fillOpacity:d,stroke:u,strokeWidth:p,strokeOpacity:g}=Im(i&&this.properties.highlightStyle.item,a.getStyle()),m={size:l,shape:h,fill:c,fillOpacity:d,stroke:u,strokeWidth:p,strokeOpacity:g};this.sizeScale.range=[a.size,a.maxSize],t.each(((e,t)=>{this.updateMarkerStyle(e,a,{datum:t,highlighted:i,xKey:s,yKey:n,sizeKey:r,labelKey:o},m,{selected:t.selected})})),i||this.properties.marker.markClean()}async updateLabelSelection(e){const t=this.properties.label.enabled?this.chart?.placeLabels().get(this)??[]:[];return e.labelSelection.update(t.map((e=>({...e.datum,point:{x:e.x,y:e.y,size:e.datum.point.size}}))))}async updateLabelNodes(e){const{label:t}=this.properties;e.labelSelection.each(((e,i)=>{e.text=i.label.text,e.fill=t.color,e.x=i.point?.x??0,e.y=i.point?.y??0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"}))}getTooltipHtml(e){const t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return WC;const{xKey:s,yKey:n,sizeKey:r,labelKey:o,xName:a,yName:l,sizeName:h,labelName:c,marker:d,tooltip:u}=this.properties,p=this.properties.title??l,g=Im({fill:e.fill,strokeWidth:this.getStrokeWidth(d.strokeWidth)},d.getStyle()),{fill:m="gray"}=this.getMarkerStyle(d,{datum:e,highlighted:!1,xKey:s,yKey:n,sizeKey:r,labelKey:o},g),{datum:f,xValue:v,yValue:y,sizeValue:C,label:{text:S},itemId:w}=e,b=fR(t.formatDatum(v)),x=fR(i.formatDatum(y));let M=`<b>${fR(a??s)}</b>: ${b}<br><b>${fR(l??n)}</b>: ${x}`;return r&&(M+=`<br><b>${fR(h??r)}</b>: ${fR(String(C))}`),o&&(M=`<b>${fR(c??o)}</b>: ${fR(S)}<br>`+M),u.toTooltipHtml({title:p,content:M,backgroundColor:m},{datum:f,itemId:w,xKey:s,xName:a,yKey:n,yName:l,sizeKey:r,sizeName:h,labelKey:o,labelName:c,title:p,color:m,seriesId:this.id})}getLegendData(){if(!this.data?.length||!this.properties.isValid())return[];const{yKey:e,yName:t,title:i,marker:s,visible:n}=this.properties,{shape:r,fill:o,stroke:a,fillOpacity:l,strokeOpacity:h,strokeWidth:c}=s;return[{legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:n,label:{text:i??t??e},symbols:[{marker:{shape:r,fill:o??"rgba(0, 0, 0, 0)",stroke:a??"rgba(0, 0, 0, 0)",fillOpacity:l??1,strokeOpacity:h??1,strokeWidth:c??0}}]}]}animateEmptyUpdateReady(e){let{markerSelection:t,labelSelection:i}=e;RE(this,this.ctx.animationManager,t),eE(this,"labels",this.ctx.animationManager,i)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new xy}getFormattedMarkerStyle(e){const{xKey:t,yKey:i,sizeKey:s,labelKey:n}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,sizeKey:s,labelKey:n,highlighted:!1})}computeFocusBounds(e){return LE(this,e)}};eT.className="BubbleSeries",eT.type="bubble";var tT={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",moduleFactory:e=>new eT(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,maxSize:30,fillOpacity:.8,tooltip:{position:{type:"node"}},label:{enabled:!1,fontSize:12,fontFamily:SI,color:wI}}},paletteFactory:hI},iT=class extends yD{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new nE,this.label=new XC,this.tooltip=new lE}};op([Ef(Of)],iT.prototype,"xKey",2),op([Ef(Of,{optional:!0})],iT.prototype,"yKey",2),op([Ef(Of,{optional:!0})],iT.prototype,"xName",2),op([Ef(Of,{optional:!0})],iT.prototype,"yName",2),op([Ef(Xf,{optional:!0})],iT.prototype,"fill",2),op([Ef(Hf)],iT.prototype,"fillOpacity",2),op([Ef(Xf,{optional:!0})],iT.prototype,"stroke",2),op([Ef(zf)],iT.prototype,"strokeWidth",2),op([Ef(Hf)],iT.prototype,"strokeOpacity",2),op([Ef(lv)],iT.prototype,"lineDash",2),op([Ef(zf)],iT.prototype,"lineDashOffset",2),op([Ef(zf)],iT.prototype,"cornerRadius",2),op([Ef(kf)],iT.prototype,"areaPlot",2),op([Ef(Uf,{optional:!0})],iT.prototype,"bins",2),op([Ef(Sv(["count","sum","mean"],"a histogram aggregation"))],iT.prototype,"aggregation",2),op([Ef(zf,{optional:!0})],iT.prototype,"binCount",2),op([Ef(Lf)],iT.prototype,"shadow",2),op([Ef(Lf)],iT.prototype,"label",2),op([Ef(Lf)],iT.prototype,"tooltip",2);var sT=class extends CD{constructor(e){super({moduleCtx:e,directionKeys:mD,directionNames:fD,pickModes:[1,0],datumSelectionGarbageCollection:!1,animationResetFns:{datum:WA,label:iE}}),this.properties=new iT,this.calculatedBins=[]}deriveBins(e){const t=$v(e[0],e[1],10),i=Zv(e[0],e[1],10),[s]=t;return[[s-i,s],...t.map((e=>[e,e+i]))]}calculateNiceBins(e,t){const i=Math.floor(e[0]),s=e[1],n=t||1,{start:r,binSize:o}=this.calculateNiceStart(i,s,n);return this.getBins(r,s,o,n)}getBins(e,t,i,s){const n=[],r=this.calculatePrecision(i);for(let o=0;o<s;o++){const a=Math.round((e+o*i)*r)/r;let l=Math.round((e+(o+1)*i)*r)/r;o===s-1&&(l=Math.max(l,t)),n[o]=[a,l]}return n}calculatePrecision(e){let t=10;if(isFinite(e)&&e>0)for(;e<1;)t*=10,e*=10;return t}calculateNiceStart(e,t,i){const s=Math.abs(t-e)/i,n=Math.floor(Math.log10(s)),r=Math.pow(10,n);return{start:Math.floor(e/r)*r,binSize:s}}async processData(e){this.visible||(this.processedData=void 0,this.animationState.transition("updateData"));const{xKey:t,yKey:i,areaPlot:s,aggregation:n}=this.properties,r=this.axes.x?.scale,o=this.axes.y?.scale,{xScaleType:a,yScaleType:l}=this.getScaleInformation({yScale:o,xScale:r}),h=[LR(t,a),HR];if(i){let e=xR("groupAgg");"count"===n||("sum"===n?e=wR("groupAgg"):"mean"===n&&(e=MR("groupAgg"))),s&&(e=DR("groupAgg",e)),h.push(FR(i,l,{invalidValue:void 0}),e)}else{let e=xR("groupAgg");s&&(e=DR("groupAgg",e)),h.push(e)}!this.ctx.animationManager.isSkipped()&&this.processedData&&h.push(XR(this.processedData,!1)),await this.requestDataModel(e,this.data,{props:h,groupByFn:e=>{const t=Bx(e.domain.keys[0]);if(0===t.length)return e.domain.groups=[],()=>[];const i=vm(this.properties.binCount)?this.calculateNiceBins(t,this.properties.binCount):this.properties.bins??this.deriveBins(t),s=i.length;return this.calculatedBins=[...i],e=>{const t=e.keys[0];for(let n=0;n<s;n++){const e=i[n];if(t>=e[0]&&t<e[1])return e;if(n===s-1&&t<=e[1])return e}return[]}}}),this.animationState.transition("updateData")}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!t||!i||!this.calculatedBins.length)return[];const s=i.getDomain(this,"groupAgg","aggregate",t),n=this.calculatedBins?.[0][0],r=this.calculatedBins?.[(this.calculatedBins?.length??0)-1][1];return Bx("x"===e?[n,r]:s)}async createNodeData(){const{id:e,axes:t,processedData:i,ctx:{callbackCache:s}}=this,n=t.x,r=t.y;if(!n||!r)return;const{scale:o}=n,{scale:a}=r,{xKey:l,yKey:h,xName:c,yName:d,fill:u,stroke:p,strokeWidth:g,cornerRadius:m}=this.properties,f=this.properties.label.formatter??(e=>String(e.value)),v=[],y={itemId:this.properties.yKey??this.id,nodeData:v,labelData:v,scales:this.calculateScaling(),animationValid:!0,visible:this.visible};return this.visible&&i&&"grouped"===i.type?(i.data.forEach((t=>{const{aggValues:[[i,n]]=[[0,0]],datum:y,datum:{length:C},keys:S,keys:[w,b]}=t,x=o.convert(w),M=o.convert(b),D=i+n,I=a.convert(0),R=a.convert(D),E=Math.abs(M-x),A=Math.abs(R-I),T=Math.min(x,M),P=Math.min(I,R);let L;0!==D&&(L={x:T+E/2,y:P+A/2,text:s.call(f,{value:D,datum:y,seriesId:e,xKey:l,yKey:h,xName:c,yName:d})??String(D)});const F={x:T+E/2,y:P+A/2},k=r.isReversed();v.push({series:this,datum:y,aggregatedValue:D,frequency:C,domain:S,yKey:h,xKey:l,x:T,y:P,xValue:x,yValue:R,width:E,height:A,midPoint:F,fill:u,stroke:p,cornerRadius:m,topLeftCornerRadius:!k,topRightCornerRadius:!k,bottomRightCornerRadius:k,bottomLeftCornerRadius:k,opacity:1,strokeWidth:g,label:L})})),v.sort(((e,t)=>e.x-t.x)),y):y}nodeFactory(){return new OD}async updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e;return i.update(t,(e=>{e.crisp=!0}),(e=>e.domain.join("_")))}async updateDatumNodes(e){const{isHighlight:t}=e,{fillOpacity:i,strokeOpacity:s,lineDash:n,lineDashOffset:r,shadow:o,highlightStyle:{item:{fill:a,fillOpacity:l=i,stroke:h,strokeWidth:c}}}=this.properties;e.datumSelection.each(((e,d,u)=>{const{cornerRadius:p,topLeftCornerRadius:g,topRightCornerRadius:m,bottomRightCornerRadius:f,bottomLeftCornerRadius:v}=d,y=t&&void 0!==c?c:d.strokeWidth,C=t?l:i;e.fill=(t?a:void 0)??d.fill,e.stroke=(t?h:void 0)??d.stroke,e.fillOpacity=C,e.strokeOpacity=s,e.strokeWidth=y,e.lineDash=n,e.lineDashOffset=r,e.topLeftCornerRadius=g?p:0,e.topRightCornerRadius=m?p:0,e.bottomRightCornerRadius=f?p:0,e.bottomLeftCornerRadius=v?p:0,e.fillShadow=o,e.zIndex=t?MM.highlightedZIndex:u,e.visible=d.height>0}))}async updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;return i.update(t,(e=>{e.pointerEvents=1,e.textAlign="center",e.textBaseline="middle"}))}async updateLabelNodes(e){const{fontStyle:t,fontWeight:i,fontFamily:s,fontSize:n,color:r}=this.properties.label,o=this.isLabelEnabled();e.labelSelection.each(((e,a)=>{o&&a?.label?(e.text=a.label.text,e.x=a.label.x,e.y=a.label.y,e.fontStyle=t,e.fontWeight=i,e.fontFamily=s,e.fontSize=n,e.fill=r,e.visible=!0):e.visible=!1}))}initQuadTree(e){const{value:t}=this.contentGroup.children().next();t&&AA(e,t.children())}pickNodeClosestDatum(e){return TA(this,e)}getTooltipHtml(e){const t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return WC;const{xKey:s,yKey:n,xName:r,yName:o,fill:a,aggregation:l,tooltip:h}=this.properties,{aggregatedValue:c,frequency:d,domain:[u,p],itemId:g}=e,m=`${fR(r??s)}: ${t.formatDatum(u)} - ${t.formatDatum(p)}`;let f=n?`<b>${fR(o??n)} (${l})</b>: ${i.formatDatum(c)}<br>`:"";f+=`<b>Frequency</b>: ${d}`;const v={title:m,backgroundColor:a,content:f};return h.toTooltipHtml(v,{datum:{data:e.datum,aggregatedValue:e.aggregatedValue,domain:e.domain,frequency:e.frequency},itemId:g,xKey:s,xName:r,yKey:n,yName:o,color:a,title:m,seriesId:this.id})}getLegendData(e){if(!this.data?.length||"category"!==e)return[];const{xKey:t,yName:i,fill:s,fillOpacity:n,stroke:r,strokeWidth:o,strokeOpacity:a,visible:l}=this.properties;return[{legendType:"category",id:this.id,itemId:t,seriesId:this.id,enabled:l,label:{text:i??t??"Frequency"},symbols:[{marker:{fill:s??"rgba(0, 0, 0, 0)",stroke:r??"rgba(0, 0, 0, 0)",fillOpacity:n,strokeOpacity:a,strokeWidth:o}}]}]}animateEmptyUpdateReady(e){let{datumSelection:t,labelSelection:i}=e;const s=HA(VA(!0,this.axes,"normal"));Qm(this.id,"datums",this.ctx.animationManager,[t],s),eE(this,"labels",this.ctx.animationManager,i)}animateWaitingUpdateReady(e){const t=this.processedData?.reduced?.diff,i=HA(VA(!0,this.axes,"normal"));Qm(this.id,"datums",this.ctx.animationManager,[e.datumSelection],i,((e,t)=>JR(t.domain)),t),eE(this,"labels",this.ctx.animationManager,e.labelSelection)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds(e){let{datumIndex:t,seriesRect:i}=e;return jA(this.contextNodeData?.nodeData[t],this.contentGroup,i)}};sT.className="HistogramSeries",sT.type="histogram";var nT={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",moduleFactory:e=>new sT(e),tooltipDefaults:{range:"exact"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontSize:12,fontFamily:SI,color:xI},shadow:{enabled:!1,color:AI,xOffset:3,yOffset:3,blur:5}}},paletteFactory:e=>{let{takeColors:t}=e;const{fills:[i],strokes:[s]}=t(1);return{fill:i,stroke:s}}},rT=class extends yD{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new dE,this.marker=new oE,this.label=new XC,this.tooltip=new lE,this.connectMissingData=!1}};op([Ef(Of)],rT.prototype,"xKey",2),op([Ef(Of)],rT.prototype,"yKey",2),op([Ef(Of,{optional:!0})],rT.prototype,"xName",2),op([Ef(Of,{optional:!0})],rT.prototype,"yName",2),op([Ef(Of,{optional:!0})],rT.prototype,"yFilterKey",2),op([Ef(Of,{optional:!0})],rT.prototype,"stackGroup",2),op([Ef(zf,{optional:!0})],rT.prototype,"normalizedTo",2),op([Ef(Of,{optional:!0})],rT.prototype,"title",2),op([Ef(Xf)],rT.prototype,"stroke",2),op([Ef(zf)],rT.prototype,"strokeWidth",2),op([Ef(Hf)],rT.prototype,"strokeOpacity",2),op([Ef(lv)],rT.prototype,"lineDash",2),op([Ef(zf)],rT.prototype,"lineDashOffset",2),op([Ef(Lf)],rT.prototype,"interpolation",2),op([Ef(Lf)],rT.prototype,"marker",2),op([Ef(Lf)],rT.prototype,"label",2),op([Ef(Lf)],rT.prototype,"tooltip",2),op([Ef(kf)],rT.prototype,"connectMissingData",2);var oT=class extends CD{constructor(e){super({moduleCtx:e,directionKeys:mD,directionNames:fD,hasMarkers:!0,pickModes:[2,1,0],markerSelectionGarbageCollection:!1,animationResetFns:{path:KE({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:iE,marker:(e,t)=>({opacity:1,scalingX:1,scalingY:1,...TE(0,t)})}}),this.properties=new rT}get pickModeAxis(){return"main-category"}async processData(e){if(null==this.data||!this.properties.isValid())return;const{data:t,visible:i,seriesGrouping:{groupIndex:s=this.id,stackCount:n=1}={}}=this,{xKey:r,yKey:o,yFilterKey:a,connectMissingData:l,normalizedTo:h}=this.properties,c=!this.ctx.animationManager.isSkipped(),d=this.axes.x?.scale,u=this.axes.y?.scale,{isContinuousX:p,xScaleType:g,yScaleType:m}=this.getScaleInformation({xScale:d,yScale:u}),f={invalidValue:null};l&&n>1&&(f.invalidValue=0),i||(f.forceValue=0);const v=[];if(p||v.push(LR(r,g,{id:"xKey"})),v.push(FR(r,g,{id:"xValue"}),FR(o,m,{id:"yValueRaw",...f,invalidValue:void 0})),null!=a&&v.push(FR(a,m,{id:"yFilterRaw"})),n>1){const e=[`line-stack-${s}-yValues`,`line-stack-${s}-yValues-trailing`,`line-stack-${s}-yValues-marker`];v.push(...GR(o,"window","current",{id:"yValueEnd",...f,groupId:e[0]},m),...GR(o,"window-trailing","current",{id:"yValueStart",...f,groupId:e[1]},m),...GR(o,"normal","current",{id:"yValueCumulative",...f,groupId:e[2]},m)),om(h)&&v.push(jR([e[0],e[1],e[2]],h,"range"))}c&&(v.push(KR(p?["xValue"]:void 0)),this.processedData&&v.push(XR(this.processedData))),await this.requestDataModel(e,t,{props:v}),this.animationState.transition("updateData")}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!t||!i?.data.length)return[];const s=t.resolveProcessedDataDefById(this,"xValue");if("x"===e){const e=t.getDomain(this,"xValue","value",i);return"value"===s?.def.type&&"category"===s.def.valueType?e:Bx(nf(e))}return Bx((this.seriesGrouping?.stackCount??1)>1?t.getDomain(this,"yValueEnd","value",i):t.getDomain(this,"yValueRaw","value",i))}async createNodeData(){const{processedData:e,dataModel:t,axes:i}=this,s=i.x,n=i.y;if(!e||!t||!s||!n)return;const{xKey:r,yKey:o,yFilterKey:a,xName:l,yName:h,marker:c,label:d,connectMissingData:u,legendItemName:p}=this.properties,g=(this.seriesGrouping?.stackCount??1)>1,m=s.scale,f=n.scale,v=(m.bandwidth??0)/2,y=(f.bandwidth??0)/2,C=[],S=c.enabled?c.size:0,w=t.resolveProcessedDataIndexById(this,"xValue"),b=t.resolveProcessedDataIndexById(this,"yValueRaw"),x=null!=a?t.resolveProcessedDataIndexById(this,"yFilterRaw"):void 0,M=g?t.resolveProcessedDataIndexById(this,"yValueCumulative"):b,D=g?t.resolveProcessedDataIndexById(this,"yValueEnd"):void 0;let I=!0,R=!1;return e.data?.forEach((e=>{let{datum:t,values:i}=e;const s=i[w],n=i[b],a=i[M],c=null!=D?i[D]:void 0;if(null==n)return void(I||(I=!u));const g=m.convert(s)+v;if(isNaN(g))return void(I||(I=!u));const E=f.convert(a)+y,A=null!=x?i[x]===n:void 0;!1===A&&(R=!0);const T=this.getLabelText(d,{value:n,datum:t,xKey:r,yKey:o,xName:l,yName:h,legendItemName:p},gR);C.push({series:this,datum:t,yKey:o,xKey:r,point:{x:g,y:E,moveTo:I,size:S},midPoint:{x:g,y:E},cumulativeValue:c,yValue:n,xValue:s,capDefaults:{lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},labelText:T,selected:A}),I=!1})),{itemId:o,nodeData:C,labelData:C,scales:this.calculateScaling(),visible:this.visible,crossFiltering:R}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){const{shape:e}=this.properties.marker;return new(aD(e))}async updatePathNodes(e){const{paths:[t],opacity:i,visible:s,animationEnabled:n}=e,r=!0===this.contextNodeData?.crossFiltering;t.setProperties({fill:void 0,lineJoin:"round",pointerEvents:1,opacity:i,stroke:this.properties.stroke,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.properties.strokeOpacity*(r?.25:1),lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset}),n||(t.visible=s),$E(this,t)}async updateMarkerSelection(e){let{nodeData:t}=e;const{markerSelection:i}=e;return t=this.properties.marker.enabled||!0===this.contextNodeData?.crossFiltering?t:[],this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(t,void 0,(e=>JR(e.xValue)))}async updateMarkerNodes(e){const{markerSelection:t,isHighlight:i}=e,{xKey:s,yKey:n,stroke:r,strokeWidth:o,strokeOpacity:a,marker:l,highlightStyle:h}=this.properties,c=Im(i&&h.item,l.getStyle(),{stroke:r,strokeWidth:o,strokeOpacity:a}),d=this.ctx.animationManager.isSkipped();t.each(((e,t)=>{this.updateMarkerStyle(e,l,{datum:t,highlighted:i,xKey:s,yKey:n},c,{applyTranslation:d,selected:t.selected})})),i||l.markClean()}async updateLabelSelection(e){return e.labelSelection.update(this.isLabelEnabled()?e.labelData:[])}async updateLabelNodes(e){const{enabled:t,fontStyle:i,fontWeight:s,fontSize:n,fontFamily:r,color:o}=this.properties.label;e.labelSelection.each(((e,a)=>{t&&a?.labelText?(e.fontStyle=i,e.fontWeight=s,e.fontSize=n,e.fontFamily=r,e.textAlign="center",e.textBaseline="bottom",e.text=a.labelText,e.x=a.point.x,e.y=a.point.y-10,e.fill=o,e.visible=!0):e.visible=!1}))}getTooltipHtml(e){const t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return WC;const{xKey:s,yKey:n,xName:r,yName:o,strokeWidth:a,marker:l,tooltip:h}=this.properties,{datum:c,xValue:d,yValue:u,itemId:p}=e,g=t.formatDatum(d),m=i.formatDatum(u),f=fR(this.properties.title??o),v=fR(g+": "+m),y=Im({fill:l.stroke},l.getStyle(),{strokeWidth:a}),{fill:C}=this.getMarkerStyle(l,{datum:e,xKey:s,yKey:n,highlighted:!1},y);return h.toTooltipHtml({title:f,content:v,backgroundColor:C},{datum:c,itemId:p,xKey:s,xName:r,yKey:n,yName:o,title:f,color:C,seriesId:this.id,...this.getModuleTooltipParams()})}getLegendData(e){if(!this.data?.length||!this.properties.isValid()||"category"!==e)return[];const{yKey:t,yName:i,stroke:s,strokeOpacity:n,strokeWidth:r,lineDash:o,title:a,marker:l,visible:h,legendItemName:c}=this.properties,d="rgba(0, 0, 0, 0)";return[{legendType:"category",id:this.id,itemId:t,legendItemName:c,seriesId:this.id,enabled:h,label:{text:c??a??i??t},symbols:[{marker:{shape:l.shape,fill:l.fill??d,stroke:l.stroke??s??d,fillOpacity:l.fillOpacity??1,strokeOpacity:l.strokeOpacity??n??1,strokeWidth:l.strokeWidth??0,enabled:l.enabled},line:{stroke:s??d,strokeOpacity:n,strokeWidth:r,lineDash:o}}]}]}async updatePaths(e){this.updateLinePaths(e.paths,e.contextData)}updateLinePaths(e,t){const{interpolation:i}=this.properties,{nodeData:s}=t,[n]=e;n.path.clear(!0);for(const r of JE(s))zE(eA(s,r),n,i);n.checkPathDirty()}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,annotationSelections:s,contextData:n,paths:r}=e,{animationManager:o}=this.ctx;this.updateLinePaths(r,n),jE(this,o,...r),Tv([t],TE),EE(this,o,t),eE(this,"labels",o,i),eE(this,"annotations",o,...s)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateLinePaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){const{animationManager:t}=this.ctx,{markerSelection:i,labelSelection:s,annotationSelections:n,contextData:r,paths:o,previousContextData:a}=e,[l]=o;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);const h=()=>{this.resetPathAnimation(e),this.updateLinePaths(o,r)},c=()=>{t.skipCurrentBatch(),h()};if(null==r||null==a)return h(),IE(this,t,"added",i),UE(this,"path_properties",t,"add",l),eE(this,"labels",t,s),void eE(this,"annotations",t,...n);if(r.crossFiltering!==a.crossFiltering)return void c();let d;try{d=cA(r,a,this.processedData?.reduced?.diff,this.properties.interpolation)}catch{d=void 0}void 0!==d?"no-op"!==d.status&&(IE(this,t,void 0,i),Qm(this.id,"path_properties",t,[l],d.pathProperties),"added"===d.status?this.updateLinePaths(o,r):"removed"===d.status?this.updateLinePaths(o,a):pR(this.id,"path_update",t,[l],d.path),d.hasMotion&&(eE(this,"labels",t,s),eE(this,"annotations",t,...n))):c()}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new xy}getFormattedMarkerStyle(e){const{xKey:t,yKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,highlighted:!0})}computeFocusBounds(e){return LE(this,e)}};oT.className="LineSeries",oT.type="line";var aT={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",moduleFactory:e=>new oT(e),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{tooltip:{position:{type:"node"}},strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,interpolation:{type:"linear",tension:1,position:"end"},marker:{shape:"circle",size:7,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:SI,color:wI},errorBar:{cap:{lengthRatio:1}}}},paletteFactory:e=>{const{marker:t}=cI(e);return{stroke:t.fill,marker:t}}},lT=class extends XC{constructor(){super(...arguments),this.placement="top"}};op([Ef(Cv)],lT.prototype,"placement",2);var hT=class extends yD{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.label=new lT,this.tooltip=new lE,this.marker=new oE}};op([Ef(Of)],hT.prototype,"xKey",2),op([Ef(Of)],hT.prototype,"yKey",2),op([Ef(Of,{optional:!0})],hT.prototype,"labelKey",2),op([Ef(Of,{optional:!0})],hT.prototype,"colorKey",2),op([Ef(Of,{optional:!0})],hT.prototype,"xFilterKey",2),op([Ef(Of,{optional:!0})],hT.prototype,"yFilterKey",2),op([Ef(Of,{optional:!0})],hT.prototype,"xName",2),op([Ef(Of,{optional:!0})],hT.prototype,"yName",2),op([Ef(Of,{optional:!0})],hT.prototype,"labelName",2),op([Ef(Of,{optional:!0})],hT.prototype,"colorName",2),op([Ef(tv,{optional:!0})],hT.prototype,"colorDomain",2),op([Ef(Jf)],hT.prototype,"colorRange",2),op([Ef(Of,{optional:!0})],hT.prototype,"title",2),op([MC("marker.shape")],hT.prototype,"shape",2),op([MC("marker.size")],hT.prototype,"size",2),op([MC("marker.fill")],hT.prototype,"fill",2),op([MC("marker.fillOpacity")],hT.prototype,"fillOpacity",2),op([MC("marker.stroke")],hT.prototype,"stroke",2),op([MC("marker.strokeWidth")],hT.prototype,"strokeWidth",2),op([MC("marker.strokeOpacity")],hT.prototype,"strokeOpacity",2),op([MC("marker.itemStyler",{optional:!0})],hT.prototype,"itemStyler",2),op([Ef(Lf)],hT.prototype,"label",2),op([Ef(Lf)],hT.prototype,"tooltip",2);var cT=class extends CD{constructor(e){super({moduleCtx:e,directionKeys:mD,directionNames:fD,pickModes:[2,1,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:AE,label:iE}}),this.properties=new hT,this.colorScale=new Zy}get pickModeAxis(){return"main-category"}async processData(e){if(!this.properties.isValid()||null==this.data||!this.visible)return;const t=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:s,yScaleType:n}=this.getScaleInformation({xScale:t,yScale:i}),r=this.colorScale.type,{xKey:o,yKey:a,xFilterKey:l,yFilterKey:h,labelKey:c,colorKey:d,colorDomain:u,colorRange:p}=this.properties,{dataModel:g,processedData:m}=await this.requestDataModel(e,this.data,{props:[FR(o,s,{id:"xValue"}),FR(a,n,{id:"yValue"}),...null!=l?[FR(l,s,{id:"xFilterValue"})]:[],...null!=h?[FR(h,n,{id:"yFilterValue"})]:[],...d?[FR(d,r,{id:"colorValue"})]:[],...c?[FR(c,"band",{id:"labelValue"})]:[]]});if(d){const e=g.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=u??m.domain.values[e]??[],this.colorScale.range=p,this.colorScale.update()}this.animationState.transition("updateData")}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const s="x"===e?"xValue":"yValue",n=t.resolveProcessedDataDefById(this,s),r=t.getDomain(this,s,"value",i);return"value"===n?.def.type&&"category"===n?.def.valueType?r:Bx(nf(r))}async createNodeData(){const{axes:e,dataModel:t,processedData:i,colorScale:s}=this,{xKey:n,yKey:r,xFilterKey:o,yFilterKey:a,labelKey:l,colorKey:h,xName:c,yName:d,labelName:u,marker:p,label:g,visible:m}=this.properties,{placement:f}=g,v=aD(p.shape),y=e.x,C=e.y;if(!(t&&i&&m&&y&&C))return;const S=t.resolveProcessedDataIndexById(this,"xValue"),w=t.resolveProcessedDataIndexById(this,"yValue"),b=null!=h?t.resolveProcessedDataIndexById(this,"colorValue"):-1,x=null!=l?t.resolveProcessedDataIndexById(this,"labelValue"):-1,M=null!=o?t.resolveProcessedDataIndexById(this,"xFilterValue"):void 0,D=null!=a?t.resolveProcessedDataIndexById(this,"yFilterValue"):void 0,I=y.scale,R=C.scale,E=(I.bandwidth??0)/2,A=(R.bandwidth??0)/2,T=[],P=g.getFont(),L=sC.getMeasurer({font:P});for(const{values:F,datum:k}of i.data??[]){const e=F[S],t=F[w],i=I.convert(e)+E,o=R.convert(t)+A,a=null!=M&&null!=D?F[M]===e&&F[D]===t:void 0,m=this.getLabelText(g,{value:l?F[x]:t,datum:k,xKey:n,yKey:r,labelKey:l,xName:c,yName:d,labelName:u}),y=L.measureText(m),C=h?s.convert(F[b]):void 0;T.push({series:this,itemId:r,yKey:r,xKey:n,datum:k,xValue:e,yValue:t,capDefaults:{lengthRatioMultiplier:p.getDiameter(),lengthMax:1/0},point:{x:i,y:o,size:p.size},midPoint:{x:i,y:o},fill:C,label:{text:m,...y},marker:v,placement:f,selected:a})}return{itemId:r,nodeData:T,labelData:T,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.contextNodeData?.labelData??[]}markerFactory(){const{shape:e}=this.properties.marker;return new(aD(e))}async updateMarkerSelection(e){const{nodeData:t,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?t:[])}async updateMarkerNodes(e){const{markerSelection:t,isHighlight:i}=e,{xKey:s,yKey:n,labelKey:r,marker:o,highlightStyle:a}=this.properties,l=Im(i&&a.item,o.getStyle());t.each(((e,t)=>{this.updateMarkerStyle(e,o,{datum:t,highlighted:i,xKey:s,yKey:n,labelKey:r},l,{selected:t.selected})})),i||o.markClean()}async updateLabelSelection(e){const t=this.isLabelEnabled()?this.chart?.placeLabels().get(this)??[]:[];return e.labelSelection.update(t.map((e=>{let{datum:t,x:i,y:s}=e;return{...t,point:{x:i,y:s,size:t.point.size},placement:"top"}})),(e=>{e.pointerEvents=1}))}async updateLabelNodes(e){const{label:t}=this.properties;e.labelSelection.each(((e,i)=>{e.text=i.label.text,e.fill=t.color,e.x=i.point?.x??0,e.y=i.point?.y??0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"}))}getTooltipHtml(e){const t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return WC;const{xKey:s,yKey:n,labelKey:r,xName:o,yName:a,labelName:l,title:h=a,marker:c,tooltip:d}=this.properties,{datum:u,xValue:p,yValue:g,label:m,itemId:f}=e,v=Im({fill:e.fill,strokeWidth:this.getStrokeWidth(c.strokeWidth)},c.getStyle()),{fill:y="gray"}=this.getMarkerStyle(c,{datum:e,highlighted:!1,xKey:s,yKey:n,labelKey:r},v),C=fR(t.formatDatum(p)),S=fR(i.formatDatum(g));let w=`<b>${fR(o??s)}</b>: ${C}<br><b>${fR(a??n)}</b>: ${S}`;return r&&(w=`<b>${fR(l??r)}</b>: ${fR(m.text)}<br>`+w),d.toTooltipHtml({title:h,content:w,backgroundColor:y},{datum:u,itemId:f,xKey:s,xName:o,yKey:n,yName:a,labelKey:r,labelName:l,title:h,color:y,seriesId:this.id,...this.getModuleTooltipParams()})}getLegendData(e){const{yKey:t,yName:i,title:s,marker:n,visible:r}=this.properties,{fill:o,stroke:a,fillOpacity:l,strokeOpacity:h,strokeWidth:c}=n;return this.data?.length&&this.properties.isValid()&&"category"===e?[{legendType:"category",id:this.id,itemId:t,seriesId:this.id,enabled:r,label:{text:s??i??t},symbols:[{marker:{shape:n.shape,fill:n.fill??o??"rgba(0, 0, 0, 0)",stroke:n.stroke??a??"rgba(0, 0, 0, 0)",fillOpacity:l??1,strokeOpacity:h??1,strokeWidth:c??0}}]}]:[]}animateEmptyUpdateReady(e){const{markerSelection:t,labelSelection:i,annotationSelections:s}=e;RE(this,this.ctx.animationManager,t),eE(this,"labels",this.ctx.animationManager,i),eE(this,"annotations",this.ctx.animationManager,...s)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new xy}getFormattedMarkerStyle(e){const{xKey:t,yKey:i,labelKey:s}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,labelKey:s,highlighted:!0})}computeFocusBounds(e){return LE(this,e)}};cT.className="ScatterSeries",cT.type="scatter";var dT={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",moduleFactory:e=>new cT(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,fillOpacity:.8,tooltip:{position:{type:"node"}},label:{enabled:!1,fontSize:12,fontFamily:SI,color:wI},errorBar:{cap:{lengthRatio:1}}}},paletteFactory:hI},uT=class e{constructor(e,t,i,s){this.startAngle=e,this.endAngle=t,this.innerRadius=i,this.outerRadius=s}clone(){const{startAngle:t,endAngle:i,innerRadius:s,outerRadius:n}=this;return new e(t,i,s,n)}equals(e){return this.startAngle===e.startAngle&&this.endAngle===e.endAngle&&this.innerRadius===e.innerRadius&&this.outerRadius===e.outerRadius}[cg](t,i){return new e(this.startAngle*(1-i)+t.startAngle*i,this.endAngle*(1-i)+t.endAngle*i,this.innerRadius*(1-i)+t.innerRadius*i,this.outerRadius*(1-i)+t.outerRadius*i)}};function pT(e){let{startAngle:t,endAngle:i,innerRadius:s,outerRadius:n}=e,r=1/0,o=1/0,a=-1/0,l=-1/0;const h=(e,t)=>{r=Math.min(e,r),o=Math.min(t,o),a=Math.max(e,a),l=Math.max(t,l)};return h(s*Math.cos(t),s*Math.sin(t)),h(s*Math.cos(i),s*Math.sin(i)),h(n*Math.cos(t),n*Math.sin(t)),h(n*Math.cos(i),n*Math.sin(i)),Ny(0,t,i)&&h(n,0),Ny(.5*Math.PI,t,i)&&h(0,n),Ny(Math.PI,t,i)&&h(-n,0),Ny(1.5*Math.PI,t,i)&&h(0,-n),new Vg(r,o,a-r,l-o)}function gT(e,t,i){const s=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),{innerRadius:n,outerRadius:r}=i;if(i.startAngle===i.endAngle||s<Math.min(n,r)||s>Math.max(n,r))return!1;const o=ky(i.startAngle),a=ky(i.endAngle),l=Math.atan2(t,e);return o<a?l<=a&&l>=o:l<=a&&l>=-Math.PI||l>=o&&l<=Math.PI}function mT(e,t){const{startAngle:i,endAngle:s,innerRadius:n,outerRadius:r}=t,o={x:r*Math.cos(i),y:r*Math.sin(i)},a={x:r*Math.cos(s),y:r*Math.sin(s)},l=0===n?{x:0,y:0}:{x:n*Math.cos(i),y:n*Math.sin(i)},h=0===n?{x:0,y:0}:{x:n*Math.cos(s),y:n*Math.sin(s)};return sb(e.start.x,e.start.y,e.end.x,e.end.y,o.x,o.y,l.x,l.y)||sb(e.start.x,e.start.y,e.end.x,e.end.y,a.x,a.y,h.x,h.y)||ob(0,0,r,i,s,!0,e.start.x,e.start.y,e.end.x,e.end.y)}function fT(e,t){const i={x:e.x,y:e.y},s={x:e.x+e.width,y:e.y},n={x:e.x,y:e.y+e.height},r={x:e.x+e.width,y:e.y+e.height};return mT({start:i,end:s},t)||mT({start:n,end:r},t)}function vT(e,t,i,s){if(0===i&&0===s)return 0;if(Math.asin(Math.abs(1*i)/(e+1*i))+Math.asin(Math.abs(1*s)/(e+1*s))-t<0)return 1;let n=0,r=1;for(let o=0;o<8;o+=1){const o=(n+r)/2;Math.asin(Math.abs(o*i)/(e+o*i))+Math.asin(Math.abs(o*s)/(e+o*s))-t<0?n=o:r=o}return n}function yT(e,t){return Vy(e,t)<1e-6?t:Ly(e-t)+t}function CT(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=Math.abs(t-e)>=2*Math.PI?2*Math.PI:Ly(t-e);return{startAngle:e=yT(e,i),endAngle:t=e+s}}function ST(e,t,i,s,n,r){const o=Math.sin(r),a=Math.cos(r),l=e**2+t**2-i**2;let h=NaN,c=NaN,d=NaN,u=NaN;if(a>.5){const i=o/a,s=1+i**2,n=-2*(e+t*i),r=n**2-4*s*l;if(r<0)return;const p=(-n+Math.sqrt(r))/(2*s),g=(-n-Math.sqrt(r))/(2*s);h=p,c=p*i,d=g,u=g*i}else{const i=a/o,s=1+i**2,n=-2*(t+e*i),r=n**2-4*s*l;if(r<0)return;const p=(-n+Math.sqrt(r))/(2*s),g=(-n-Math.sqrt(r))/(2*s);h=p*i,c=p,d=g*i,u=g}const p=d*a+u*o,g=h*a+c*o>0?yT(Math.atan2(c-t,h-e),s):NaN,m=p>0?yT(Math.atan2(u-t,d-e),s):NaN;return g>=s&&g<=n?g:m>=s&&m<=n?m:void 0}function wT(e,t,i,s,n,r){const o=Math.hypot(e,t),a=o-(o**2-i**2+r**2)/(2*o),l=Math.atan2(t,e),h=Math.acos(-a/i),c=yT(l+h,s),d=yT(l-h,s);return c>=s&&c<=n?c:d>=s&&d<=n?d:void 0}var bT=class{constructor(e,t,i,s,n){this.cx=e,this.cy=t,this.r=i,this.a0=s,this.a1=n,this.a0>=this.a1&&(this.a0=NaN,this.a1=NaN)}isValid(){return Number.isFinite(this.a0)&&Number.isFinite(this.a1)}pointAt(e){return{x:this.cx+this.r*Math.cos(e),y:this.cy+this.r*Math.sin(e)}}clipStart(e){null==e||!this.isValid()||e<this.a0||(this.a0=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}clipEnd(e){null==e||!this.isValid()||e>this.a1||(this.a1=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}},xT=class extends gb{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=2*Math.PI,this.clipSector=void 0,this.concentricEdgeInset=0,this.radialEdgeInset=0,this.startOuterCornerRadius=0,this.endOuterCornerRadius=0,this.startInnerCornerRadius=0,this.endInnerCornerRadius=0}set inset(e){this.concentricEdgeInset=e,this.radialEdgeInset=e}set cornerRadius(e){this.startOuterCornerRadius=e,this.endOuterCornerRadius=e,this.startInnerCornerRadius=e,this.endInnerCornerRadius=e}computeBBox(){return pT(this).translate(this.centerX,this.centerY)}normalizedRadii(){const{concentricEdgeInset:e}=this;let{innerRadius:t,outerRadius:i}=this;return t=t>0?t+e:0,i=Math.max(i-e,0),{innerRadius:t,outerRadius:i}}normalizedClipSector(){const{clipSector:e}=this;if(null==e)return;const{startAngle:t,endAngle:i}=CT(this.startAngle,this.endAngle),{innerRadius:s,outerRadius:n}=this.normalizedRadii(),r=CT(e.startAngle,e.endAngle,t);return new uT(Math.max(t,r.startAngle),Math.min(i,r.endAngle),Math.max(s,e.innerRadius),Math.min(n,e.outerRadius))}getAngleOffset(e){return e>0?this.radialEdgeInset/e:0}arc(e,t,i,s,n,r,o,a){if(e<=0)return;const{startAngle:l,endAngle:h}=CT(this.startAngle,this.endAngle),{innerRadius:c,outerRadius:d}=this.normalizedRadii(),u=this.normalizedClipSector();if(a&&c<=0)return;const p=a?this.getAngleOffset(c+e):this.getAngleOffset(d-e),g=o?l+p+t:h-p-t,m=a?c+e:d-e,f=m*Math.cos(g),v=m*Math.sin(g);if(null!=u){const e=1e-6;if(!o&&!(g>=l-e&&g<=u.endAngle-e))return;if(o&&!(g>=u.startAngle+e&&g<=h-e))return;if(a&&m<u.innerRadius-e)return;if(!a&&m>u.outerRadius+e)return}const y=new bT(f,v,e,i,s);if(null!=u){let t,h;if(a?(y.clipStart(ST(f,v,e,i,s,u.endAngle)),y.clipEnd(ST(f,v,e,i,s,u.startAngle))):(y.clipStart(ST(f,v,e,i,s,u.startAngle)),y.clipEnd(ST(f,v,e,i,s,u.endAngle))),o?(t=wT(f,v,e,i,s,u.innerRadius),h=wT(f,v,e,i,s,u.outerRadius)):(t=wT(f,v,e,i,s,u.outerRadius),h=wT(f,v,e,i,s,u.innerRadius)),y.clipStart(t),y.clipEnd(h),null!=t){const{x:e,y:i}=y.pointAt(t),s=yT(Math.atan2(i,e),l);o?r?.clipStart(s):n.clipEnd(s)}if(null!=h){const{x:e,y:t}=y.pointAt(h),i=yT(Math.atan2(t,e),l);o?n.clipStart(i):r?.clipEnd(i)}}if(null!=u){const{x:e,y:t}=y.pointAt((y.a0+y.a1)/2);if(!gT(e,t,u))return}const{x:C,y:S}=y.pointAt(o===a?y.a0:y.a1),w=yT(Math.atan2(S,C),l),b=a?r:n;return o?b?.clipStart(w):b?.clipEnd(w),y}updatePath(){const e=1e-6,{path:t,centerX:i,centerY:s,concentricEdgeInset:n,radialEdgeInset:r}=this;let{startOuterCornerRadius:o,endOuterCornerRadius:a,startInnerCornerRadius:l,endInnerCornerRadius:h}=this;const{startAngle:c,endAngle:d}=CT(this.startAngle,this.endAngle),{innerRadius:u,outerRadius:p}=this.normalizedRadii(),g=this.normalizedClipSector(),m=d-c,f=m>=2*Math.PI-e;if(t.clear(),0===u&&0===p||u>p)return;if((g?.startAngle??c)===(g?.endAngle??d))return;if(f&&null==this.clipSector&&0===o&&0===a&&0===l&&0===h)return t.moveTo(i+p*Math.cos(c),s+p*Math.sin(c)),t.arc(i,s,p,c,d),u>n&&(t.moveTo(i+u*Math.cos(d),s+u*Math.sin(d)),t.arc(i,s,u,d,c,!0)),void t.closePath();if(null==this.clipSector&&Math.abs(u-p)<1e-6)return t.arc(i,s,p,c,d,!1),t.arc(i,s,p,d,c,!0),void t.closePath();const v=this.getAngleOffset(u),y=this.getAngleOffset(p);if(m<2*y)return;const C=(g?.innerRadius??u)>n,S=u<n||m<2*v,w=p-u,b=Math.max(o,l,a,h),x=b>0?Math.min(w/b,1):1;o*=x,a*=x,l*=x,h*=x;const M=vT(p,m-2*y,-o,-a);if(o*=M,a*=M,!S&&C){const e=vT(u,m-2*v,l,h);l*=e,h*=e}else l=0,h=0;const D=Math.max(o+l,a+h),I=D>0?Math.min(w/D,1):1;o*=I,a*=I,l*=I,h*=I;let R=0,E=0;const A=o/(p-o),T=a/(p-a);if(A>=0&&A<.999999)R=Math.asin(A);else{R=m/2;const e=p/(1/Math.sin(R)+1);o=Math.min(e,o)}if(T>=0&&T<.999999)E=Math.asin(T);else{E=m/2;const e=p/(1/Math.sin(E)+1);a=Math.min(e,a)}const P=Math.asin(l/(u+l)),L=Math.asin(h/(u+h)),F=g?.outerRadius??p,k=this.getAngleOffset(F),N=new bT(0,0,F,c+k,d-k),O=g?.innerRadius??u,G=this.getAngleOffset(O),B=C?new bT(0,0,O,c+G,d-G):void 0;null!=g&&(N.clipStart(g.startAngle),N.clipEnd(g.endAngle),B?.clipStart(g.startAngle),B?.clipEnd(g.endAngle));const V=this.arc(o,R,c-.5*Math.PI,c+R,N,B,!0,!1),z=this.arc(a,E,d-E,d+.5*Math.PI,N,B,!1,!1),H=this.arc(h,L,d+.5*Math.PI,d+Math.PI-L,N,B,!1,!0),W=this.arc(l,P,c+Math.PI+P,c+1.5*Math.PI,N,B,!0,!0);if(S){const e=m<.5*Math.PI?r*(1+Math.cos(m))/Math.sin(m):NaN;let n;n=e>0&&e<p?Math.max(Math.hypot(r,e),u):r,n=Math.max(n,u);const o=c+.5*m;t.moveTo(i+n*Math.cos(o),s+n*Math.sin(o))}else if(!0===W?.isValid()||!0===B?.isValid());else{const e=c+m/2,n=u*Math.cos(e),r=u*Math.sin(e);t.moveTo(i+n,s+r)}if(!0===V?.isValid()){const{cx:e,cy:n,r:r,a0:o,a1:a}=V;t.arc(i+e,s+n,r,o,a)}if(N.isValid()){const{r:e,a0:n,a1:r}=N;t.arc(i,s,e,n,r)}if(!0===z?.isValid()){const{cx:e,cy:n,r:r,a0:o,a1:a}=z;t.arc(i+e,s+n,r,o,a)}if(!S){if(!0===H?.isValid()){const{cx:e,cy:n,r:r,a0:o,a1:a}=H;t.arc(i+e,s+n,r,o,a)}if(!0===B?.isValid()){const{r:e,a0:n,a1:r}=B;t.arc(i,s,e,r,n,!0)}if(!0===W?.isValid()){const{cx:e,cy:n,r:r,a0:o,a1:a}=W;t.arc(i+e,s+n,r,o,a)}}t.closePath()}isPointInPath(e,t){const{startAngle:i,endAngle:s,innerRadius:n,outerRadius:r}=this.clipSector??this;return gT(e-this.centerX,t-this.centerY,{startAngle:i,endAngle:s,innerRadius:Math.min(n,r),outerRadius:Math.max(n,r)})}};xT.className="Sector",op([pb()],xT.prototype,"centerX",2),op([pb()],xT.prototype,"centerY",2),op([pb()],xT.prototype,"innerRadius",2),op([pb()],xT.prototype,"outerRadius",2),op([pb()],xT.prototype,"startAngle",2),op([pb()],xT.prototype,"endAngle",2),op([pb()],xT.prototype,"clipSector",2),op([pb()],xT.prototype,"concentricEdgeInset",2),op([pb()],xT.prototype,"radialEdgeInset",2),op([pb()],xT.prototype,"startOuterCornerRadius",2),op([pb()],xT.prototype,"endOuterCornerRadius",2),op([pb()],xT.prototype,"startInnerCornerRadius",2),op([pb()],xT.prototype,"endInnerCornerRadius",2);var MT={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},DT={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"},IT=class extends $C{constructor(){super(...arguments),this.showInLegend=!1}};op([Ef(kf)],IT.prototype,"showInLegend",2);var RT=class extends XC{constructor(){super(...arguments),this.spacing=2}set(e,t){return super.set(e)}};op([Ef(Of)],RT.prototype,"text",2),op([Ef(Gf)],RT.prototype,"spacing",2);var ET=class extends Df{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}};op([Ef(Xf)],ET.prototype,"fill",2),op([Ef(Hf)],ET.prototype,"fillOpacity",2);var AT=class extends XC{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};op([Ef(zf)],AT.prototype,"offset",2),op([Ef(Wf)],AT.prototype,"minAngle",2),op([Ef(zf)],AT.prototype,"minSpacing",2),op([Ef(zf)],AT.prototype,"maxCollisionOffset",2),op([Ef(kf)],AT.prototype,"avoidCollisions",2);var TT=class extends XC{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};op([Ef(Gf)],TT.prototype,"positionOffset",2),op([Ef(Hf)],TT.prototype,"positionRatio",2);var PT=class extends Df{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};op([Ef(Jf,{optional:!0})],PT.prototype,"colors",2),op([Ef(zf)],PT.prototype,"length",2),op([Ef(zf)],PT.prototype,"strokeWidth",2);var LT=class extends gD{constructor(){super(...arguments),this.fills=Object.values(MT),this.strokes=Object.values(DT),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.innerLabels=new If(RT),this.title=new IT,this.innerCircle=new ET,this.shadow=new nE,this.calloutLabel=new AT,this.sectorLabel=new TT,this.calloutLine=new PT,this.tooltip=new lE}isValid(){const e=super.isValid();return null==this.innerRadiusRatio&&null==this.innerRadiusOffset?(fp.warnOnce("Either an [innerRadiusRatio] or an [innerRadiusOffset] must be set to render a donut series."),!1):e}};function FT(e,t,i,s){const n=[i.convert(0),i.convert(1)],r=[s.convert(0),s.convert(1)],o=Math.PI/-2+Oy(t),a=e?"initial":"update";return{nodes:{toFn:(e,t,i,s)=>{let{prevLive:r}=s,{startAngle:a,endAngle:l,innerRadius:h,outerRadius:c}=t;const{stroke:d,fill:u}=t.sectorFormat;if("removed"===i&&r?(a=r.datum?.endAngle,l=r.datum?.endAngle):"removed"!==i||r||(a=o,l=o),"removed"===i){const e=(e=>{let{radius:t}=e;return{innerRadius:n[0],outerRadius:n[0]+(n[1]-n[0])*t}})(t);h=e.innerRadius,c=e.outerRadius}return{startAngle:a,endAngle:l,outerRadius:c,innerRadius:h,stroke:d,fill:u}},fromFn:(t,i,s,n)=>{let{prevFromProps:l}=n,{startAngle:h,endAngle:c,innerRadius:d,outerRadius:u}=t,{fill:p,stroke:g}=i.sectorFormat;if("unknown"===s||"added"===s&&!l?(h=o,c=o,d=i.innerRadius,u=i.outerRadius):"added"===s&&l&&(h=l.endAngle??o,c=l.endAngle??o,d=l.innerRadius??i.innerRadius,u=l.outerRadius??i.outerRadius),"added"===s&&!e){const e=(e=>{let{radius:t}=e;return{innerRadius:r[0],outerRadius:r[0]+(r[1]-r[0])*t}})(i);d=e.innerRadius,u=e.outerRadius}return"updated"===s&&(p=t.fill??p,g=t.stroke??g),{startAngle:h,endAngle:c,innerRadius:d,outerRadius:u,fill:p,stroke:g,phase:a}}},innerCircle:{fromFn:(e,t)=>({size:e.previousDatum?.radius??e.size??0,phase:a}),toFn:(e,t)=>({size:t.radius??0})}}}function kT(e,t){return{startAngle:t.startAngle,endAngle:t.endAngle,innerRadius:t.innerRadius,outerRadius:t.outerRadius,fill:t.sectorFormat.fill,stroke:t.sectorFormat.stroke}}function NT(e,t){const i=t.y-e.centerY,s=t.x-e.centerX,n=Math.atan2(i,s),r=e.getItemNodes();for(const o of r)if(!0!==o.datum.missing&&Ny(n,o.startAngle,o.endAngle)){const e=Math.sqrt(s*s+i*i);let t=0;return e<o.innerRadius?t=o.innerRadius-e:e>o.outerRadius&&(t=e-o.outerRadius),{datum:o.datum,distance:t}}}op([Ef(Of)],LT.prototype,"angleKey",2),op([Ef(Of,{optional:!0})],LT.prototype,"angleName",2),op([Ef(Of,{optional:!0})],LT.prototype,"angleFilterKey",2),op([Ef(Of,{optional:!0})],LT.prototype,"radiusKey",2),op([Ef(Of,{optional:!0})],LT.prototype,"radiusName",2),op([Ef(zf,{optional:!0})],LT.prototype,"radiusMin",2),op([Ef(zf,{optional:!0})],LT.prototype,"radiusMax",2),op([Ef(Of,{optional:!0})],LT.prototype,"calloutLabelKey",2),op([Ef(Of,{optional:!0})],LT.prototype,"calloutLabelName",2),op([Ef(Of,{optional:!0})],LT.prototype,"sectorLabelKey",2),op([Ef(Of,{optional:!0})],LT.prototype,"sectorLabelName",2),op([Ef(Of,{optional:!0})],LT.prototype,"legendItemKey",2),op([Ef(Jf)],LT.prototype,"fills",2),op([Ef(Jf)],LT.prototype,"strokes",2),op([Ef(Hf)],LT.prototype,"fillOpacity",2),op([Ef(Hf)],LT.prototype,"strokeOpacity",2),op([Ef(lv)],LT.prototype,"lineDash",2),op([Ef(zf)],LT.prototype,"lineDashOffset",2),op([Ef(zf)],LT.prototype,"cornerRadius",2),op([Ef(Nf,{optional:!0})],LT.prototype,"itemStyler",2),op([Ef(Wf)],LT.prototype,"rotation",2),op([Ef(Gf)],LT.prototype,"outerRadiusOffset",2),op([Ef(Hf)],LT.prototype,"outerRadiusRatio",2),op([Ef(Gf,{optional:!0})],LT.prototype,"innerRadiusOffset",2),op([Ef(Hf,{optional:!0})],LT.prototype,"innerRadiusRatio",2),op([Ef(zf)],LT.prototype,"strokeWidth",2),op([Ef(Gf)],LT.prototype,"sectorSpacing",2),op([Ef(nv)],LT.prototype,"innerLabels",2),op([Ef(Lf)],LT.prototype,"title",2),op([Ef(Lf)],LT.prototype,"innerCircle",2),op([Ef(Lf)],LT.prototype,"shadow",2),op([Ef(Lf)],LT.prototype,"calloutLabel",2),op([Ef(Lf)],LT.prototype,"sectorLabel",2),op([Ef(Lf)],LT.prototype,"calloutLine",2),op([Ef(Lf)],LT.prototype,"tooltip",2);var OT=class extends lD{constructor(e){let{useLabelLayer:t=!1,pickModes:i=[1,0],canHaveAxes:s=!1,animationResetFns:n,...r}=e;super({...r,useLabelLayer:t,pickModes:i,contentGroupVirtual:!1,directionKeys:{x:["angleKey"],y:["radiusKey"]},directionNames:{x:["angleName"],y:["radiusName"]},canHaveAxes:s}),this.itemGroup=this.contentGroup.appendChild(new xy),this.nodeData=[],this.itemSelection=Ty.select(this.itemGroup,(()=>this.nodeFactory()),!1),this.labelSelection=Ty.select(this.labelGroup,(()=>this.labelFactory()),!1),this.highlightSelection=Ty.select(this.highlightGroup,(()=>this.nodeFactory())),this.highlightLabelSelection=Ty.select(this.highlightLabel,(()=>this.labelFactory())),this.centerX=0,this.centerY=0,this.radius=0,this.itemGroup.zIndexSubOrder=[()=>this._declarationOrder,1],this.animationResetFns=n,this.animationState=new LC("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},(()=>this.checkProcessedDataAnimatable()))}getItemNodes(){return[...this.itemGroup.children()]}getNodeData(){return this.nodeData}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}labelFactory(){const e=new lC;return e.pointerEvents=1,e}getInnerRadius(){return 0}getLabelData(){return[]}computeLabelsBBox(e,t){return null}resetAllAnimation(){const{item:e,label:t}=this.animationResetFns??{};this.ctx.animationManager.stopByAnimationGroupId(this.id),e&&Tv([this.itemSelection,this.highlightSelection],e),t&&Tv([this.labelSelection,this.highlightLabelSelection],t),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup(),this.highlightLabelSelection.cleanup()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(e){const{item:t,label:i}=this.animationResetFns??{};t&&Tv([this.highlightSelection],t),i&&Tv([this.highlightLabelSelection],i)}animateReadyHighlightMarkers(e){}animateReadyResize(e){this.resetAllAnimation()}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(e){return{seriesRect:e}}computeFocusBounds(e){const t=this.getNodeData()?.[e.datumIndex];if(void 0!==t)return this.itemSelection.select((e=>e instanceof gb&&e.datum===t))[0]}},GT=class extends bM{constructor(e,t,i,s){super(e,t,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey,this.calloutLabelKey=s.properties.calloutLabelKey,this.sectorLabelKey=s.properties.sectorLabelKey}},BT=class extends OT{constructor(e){super({moduleCtx:e,pickModes:[1,0],useLabelLayer:!0,animationResetFns:{item:kT,label:iE}}),this.properties=new LT,this.phantomNodeData=void 0,this.previousRadiusScale=new ID,this.radiusScale=new ID,this.phantomGroup=this.contentGroup.appendChild(new xy),this.phantomSelection=Ty.select(this.phantomGroup,(()=>this.nodeFactory()),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new xy({name:"pieCalloutLabels"})),this.calloutLabelSelection=new Ty(this.calloutLabelGroup,xy),this.backgroundGroup=this.rootGroup.appendChild(new qC({name:`${this.id}-background`,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new xy({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new _M),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new _M),this.innerLabelsGroup=this.contentGroup.appendChild(new xy({name:"innerLabels"})),this.innerCircleGroup=this.backgroundGroup.appendChild(new xy({name:`${this.id}-innerCircle`})),this.innerLabelsSelection=Ty.select(this.innerLabelsGroup,lC),this.innerCircleSelection=Ty.select(this.innerCircleGroup,_M),this.seriesItemEnabled=[],this.legendItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=GT,this.angleScale=new ID,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map((e=>e+Math.PI/2)),this.phantomGroup.opacity=.2,this.phantomGroup.zIndexSubOrder=[()=>this._declarationOrder,0]}get calloutNodeData(){return this.phantomNodeData??this.nodeData}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",(e=>this.onLegendItemClick(e))))}get visible(){return super.visible&&(0===this.seriesItemEnabled.length||this.seriesItemEnabled.includes(!0))}nodeFactory(){return new xT}getSeriesDomain(e){return"x"===e?this.angleScale.domain:this.radiusScale.domain}async processData(e){if(null==this.data||!this.properties.isValid())return;let{data:t}=this;const{visible:i,seriesItemEnabled:s}=this,{angleKey:n,angleFilterKey:r,radiusKey:o,calloutLabelKey:a,sectorLabelKey:l,legendItemKey:h}=this.properties,c=!this.ctx.animationManager.isSkipped(),d=[],u=[];h?d.push(LR(h,"band",{id:"legendItemKey"})):a?d.push(LR(a,"band",{id:"calloutLabelKey"})):l&&d.push(LR(l,"band",{id:"sectorLabelKey"}));const p=this.radiusScale.type,g=this.radiusScale.type;o&&u.push(kR(o,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax}),FR(o,p,{id:"radiusRaw"}),_R("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),a&&u.push(FR(a,"band",{id:"calloutLabelValue"})),l&&u.push(FR(l,"band",{id:"sectorLabelValue"})),h&&u.push(FR(h,"band",{id:"legendItemValue"})),r&&u.push(NR(r,g,{id:"angleFilterValue",onlyPositive:!0}),FR(r,g,{id:"angleFilterRaw"}),_R("angleFilterValue",[0,1],0,0)),c&&this.processedData&&d.length>0&&u.push(XR(this.processedData)),u.push(KR()),t=t.map(((e,t)=>i&&s[t]?e:{...e,[n]:0})),await this.requestDataModel(e,t,{props:[...d,NR(n,g,{id:"angleValue",onlyPositive:!0}),FR(n,g,{id:"angleRaw"}),_R("angleValue",[0,1],0,0),...u]});for(const m of this.processedData?.defs?.values??[]){const{id:e,missing:t,property:i}=m,s=Vx(this,t);"angleRaw"!==e&&s>0&&fp.warnOnce(`no value was found for the key '${String(i)}' on ${s} data element${s>1?"s":""}`)}this.animationState.transition("updateData")}async maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;const{nodeData:e=[],phantomNodeData:t}=await this.createNodeData()??{};this.nodeData=e,this.phantomNodeData=t,this.nodeDataRefresh=!1}getProcessedDataIndexes(e){return{angleIdx:e.resolveProcessedDataIndexById(this,"angleValue"),angleRawIdx:e.resolveProcessedDataIndexById(this,"angleRaw"),angleFilterIdx:null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterValue"):void 0,angleFilterRawIdx:null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterRaw"):void 0,radiusIdx:this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):void 0,radiusRawIdx:this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusRaw"):void 0,calloutLabelIdx:this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):void 0,sectorLabelIdx:this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):void 0,legendItemIdx:this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):void 0}}async createNodeData(){const{id:e,processedData:t,dataModel:i,angleScale:s}=this,{rotation:n,innerRadiusRatio:r}=this.properties;if(!this.properties.isValid())return this.zerosumOuterRing.visible=!0,this.zerosumInnerRing.visible=!0,{itemId:e,nodeData:[],labelData:[]};if(!t||!i||"ungrouped"!==t.type)return;const{angleIdx:o,angleRawIdx:a,angleFilterIdx:l,angleFilterRawIdx:h,radiusIdx:c,radiusRawIdx:d,calloutLabelIdx:u,sectorLabelIdx:p,legendItemIdx:g}=this.getProcessedDataIndexes(i),m=null!=h&&t.data.some((e=>{let{values:t}=e;return t[h]>t[a]}));let f=0,v=0;const y=[],C=null!=h?[]:void 0;return t.data.forEach(((e,t)=>{const{datum:i,values:r}=e,S=m?r[l]:r[o],w=null==h||m?1:Math.sqrt(r[h]/r[a]),b=s.convert(f)+Oy(n);f=S,v+=S;const x=s.convert(f)+Oy(n),M=Math.abs(x-b),D=b+M/2,I=r[a],R=(null!=c?r[c]??1:1)*w,E=null!=d?r[d]:void 0,A=null!=g?r[g]:void 0,T=this.getLabels(i,D,M,!0,null!=u?r[u]:void 0,null!=p?r[p]:void 0,A),P=this.getSectorFormat(i,t,!1),L={itemId:t,series:this,datum:i,index:t,angleValue:I,midAngle:D,midCos:Math.cos(D),midSin:Math.sin(D),startAngle:b,endAngle:x,radius:R,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(R),0),sectorFormat:P,radiusValue:E,legendItemValue:A,enabled:this.seriesItemEnabled[t],focusable:!0,...T};y.push(L),null!=C&&C.push({...L,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0),focusable:!1})})),this.zerosumOuterRing.visible=0===v,this.zerosumInnerRing.visible=0===v&&null!=r&&1!==r&&r>0,{itemId:e,nodeData:y,labelData:y,phantomNodeData:C}}getLabels(e,t,i,s,n,r,o){const{calloutLabel:a,sectorLabel:l,legendItemKey:h}=this.properties,c=!s||a.enabled?this.properties.calloutLabelKey:void 0,d=!s||l.enabled?this.properties.sectorLabelKey:void 0;if(!c&&!d&&!h)return{};const u={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return c&&i>Oy(a.minAngle)&&(p.calloutLabel={...this.getTextAlignment(t),text:this.getLabelText(a,{...u,value:n}),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),d&&(p.sectorLabel={text:this.getLabelText(l,{...u,value:r})}),null!=h&&null!=o&&(p.legendItem={key:h,text:o}),p}getTextAlignment(e){const t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=ky(e)- -.75*Math.PI;return t[kg(Math.floor(i/(Math.PI/2)),t.length)]}getSectorFormat(e,t,i){const{callbackCache:s}=this.ctx,{angleKey:n,radiusKey:r,calloutLabelKey:o,sectorLabelKey:a,legendItemKey:l,fills:h,strokes:c,itemStyler:d}=this.properties,u=c[t%c.length],{fill:p,fillOpacity:g,stroke:m,strokeWidth:f,strokeOpacity:v,lineDash:y,lineDashOffset:C,cornerRadius:S}=Im(i&&this.properties.highlightStyle.item,{fill:h.length>0?h[t%h.length]:void 0,stroke:u,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties);let w;return d&&(w=s.call(d,{datum:e,angleKey:n,radiusKey:r,calloutLabelKey:o,sectorLabelKey:a,legendItemKey:l,fill:p,fillOpacity:g,stroke:m,strokeWidth:f,strokeOpacity:v,lineDash:y,lineDashOffset:C,cornerRadius:S,highlighted:i,seriesId:this.id})),{fill:w?.fill??p,fillOpacity:w?.fillOpacity??g,stroke:w?.stroke??m,strokeWidth:w?.strokeWidth??f,strokeOpacity:w?.strokeOpacity??v,lineDash:w?.lineDash??y,lineDashOffset:w?.lineDashOffset??C,cornerRadius:w?.cornerRadius??S}}getInnerRadius(){const{radius:e}=this,{innerRadiusRatio:t=1,innerRadiusOffset:i=0}=this.properties,s=e*t+i;return s===e||s<0?0:s}getOuterRadius(){const{outerRadiusRatio:e,outerRadiusOffset:t}=this.properties;return Math.max(this.radius*e+t,0)}updateRadiusScale(e){const t=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t);const i=e=>({...e,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(e.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){const e=Math.max(0,this.radiusScale.range[1]);if(0===e)return NaN;return-e-(2+(this.properties.title?.spacing??0))-Math.max(0,-e)}async update(e){let{seriesRect:t}=e;const{title:i}=this.properties,s={seriesRectWidth:t?.width,seriesRectHeight:t?.height},n=null!=vC(this.nodeDataDependencies,s);if(n&&(this._nodeDataDependencies=s),await this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(n),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),i){const e=this.getTitleTranslationY();i.node.y=isFinite(e)?e:0;const t=i.node.getBBox();i.node.visible=i.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(t)}for(const r of[this.zerosumInnerRing,this.zerosumOuterRing])r.fillOpacity=0,r.stroke=this.properties.calloutLabel.color,r.strokeWidth=1,r.strokeOpacity=1;this.updateNodeMidPoint(),await this.updateSelections(),await this.updateNodes(t)}updateTitleNodes(){const{oldTitle:e}=this,{title:t}=this.properties;e!==t&&(e&&this.labelGroup?.removeChild(e.node),t&&(t.node.textBaseline="bottom",this.labelGroup?.appendChild(t.node)),this.oldTitle=t)}updateNodeMidPoint(){const e=e=>{const t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}};this.nodeData.forEach(e),this.phantomNodeData?.forEach(e)}async updateSelections(){await this.updateGroupSelection(),this.updateInnerCircleSelection()}async updateGroupSelection(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,highlightLabelSelection:s,calloutLabelSelection:n,labelSelection:r,innerLabelsSelection:o}=this,a=this.nodeData.map((e=>({...e,sectorFormat:{...e.sectorFormat}}))),l=(e,t)=>{e.update(t,void 0,(e=>this.getDatumId(e))),this.ctx.animationManager.isSkipped()&&e.cleanup()};l(e,this.nodeData),l(t,a),l(i,this.phantomNodeData??[]),n.update(this.calloutNodeData,(e=>{const t=new tC;t.tag=0,t.pointerEvents=1,e.appendChild(t);const i=new lC;i.tag=1,i.pointerEvents=1,e.appendChild(i)})),r.update(this.nodeData),s.update(a),o.update(this.properties.innerLabels,(e=>{e.pointerEvents=1}))}updateInnerCircleSelection(){const{innerCircle:e}=this.properties;let t=0;const i=this.getInnerRadius();if(i>0){const e=Math.min(i,this.getOuterRadius()),s=1;t=Math.ceil(2*e+s)}const s=e?[{radius:t}]:[];this.innerCircleSelection.update(s)}async updateNodes(e){const t=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.includes(!0);this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&t?.series===this,this.highlightLabel.visible=i&&t?.series===this,this.labelGroup.visible=i,this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each(((e,t)=>{let{radius:i}=t;e.setProperties({fill:this.properties.innerCircle?.fill,opacity:this.properties.innerCircle?.fillOpacity,size:i})}));const s=this.ctx.animationManager.isSkipped(),n=(e,t,i,n)=>{const r=this.getSectorFormat(t.datum,t.itemId,n);t.sectorFormat.fill=r.fill,t.sectorFormat.stroke=r.stroke,s&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(n||s)&&(e.fill=r.fill,e.stroke=r.stroke),e.strokeWidth=r.strokeWidth,e.fillOpacity=r.fillOpacity,e.strokeOpacity=r.strokeOpacity,e.lineDash=r.lineDash,e.lineDashOffset=r.lineDashOffset,e.cornerRadius=r.cornerRadius,e.fillShadow=this.properties.shadow;const o=Math.max((this.properties.sectorSpacing+(null!=r.stroke?r.strokeWidth:0))/2,0);e.inset=o,e.lineJoin=this.properties.sectorSpacing>=0||o>0?"miter":"round"};this.itemSelection.each(((e,t,i)=>n(e,t,0,!1))),this.highlightSelection.each(((e,i,s)=>{n(e,i,0,!0),e.visible=i.itemId===t?.itemId})),this.phantomSelection.each(((e,t,i)=>n(e,t,0,!1))),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){const{calloutLine:e}=this.properties,t=e.length,i=e.strokeWidth,s=e.colors??this.properties.strokes,{offset:n}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach(((e,r)=>{const o=e.datum,{calloutLabel:a,outerRadius:l}=o;if(a?.text&&!a.hidden&&0!==l){e.visible=!0,e.strokeWidth=i,e.stroke=s[r%s.length],e.fill=void 0;const h=o.midCos*l,c=o.midSin*l;let d=o.midCos*(l+t),u=o.midSin*(l+t);if((a.collisionTextAlign??0!==a.collisionOffsetY)&&null!=a.box){const e=a.box;let t=d,i=u;d<e.x?t=e.x:d>e.x+e.width&&(t=e.x+e.width),u<e.y?i=e.y:u>e.y+e.height&&(i=e.y+e.height);const s=t-d,r=i-u,o=Math.sqrt(Math.pow(s,2)+Math.pow(r,2)),l=o-n;l>0&&(d+=s*l/o,u+=r*l/o)}e.x1=h,e.y1=c,e.x2=d,e.y2=u}else e.visible=!1}))}getLabelOverflow(e,t,i){const s=i.x-this.centerX,n=i.x+i.width-this.centerX,r=i.y-this.centerY,o=i.y+i.height-this.centerY;let a=1;t.x+1<s?a=(t.x+t.width-s)/t.width:t.x+t.width-1>n&&(a=(n-t.x)/t.width);const l=t.y+1<r||t.y+t.height-1>o;return{textLength:1===a?e.length:Math.floor(e.length*a)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e){const{surroundingRadius:t}=this;if(null==t)return!1;const i=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],s=t**2;return i.some((e=>e.x**2+e.y**2>s))}computeCalloutLabelCollisionOffsets(){const{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:s,minSpacing:n}=t,r=e.convert(0),o=this.calloutNodeData,a=o.filter((e=>{return!(!(t=e).calloutLabel||0===t.outerRadius);var t}));if(a.forEach((e=>{const t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)})),a.length<=1)return;const l=a.filter((e=>e.midCos<0)).sort(((e,t)=>e.midSin-t.midSin)),h=a.filter((e=>e.midCos>=0)).sort(((e,t)=>e.midSin-t.midSin)),c=a.filter((e=>e.midSin<0&&"center"===e.calloutLabel?.textAlign)).sort(((e,t)=>e.midCos-t.midCos)),d=a.filter((e=>e.midSin>=0&&"center"===e.calloutLabel?.textAlign)).sort(((e,t)=>e.midCos-t.midCos)),u=e=>{const t=e.calloutLabel;if(null==t)return Vg.zero.clone();const n=e.outerRadius+i.length+s,r=e.midCos*n,o=e.midSin*n+t.collisionOffsetY,a=t.collisionTextAlign??t.textAlign,l=t.textBaseline;return lC.computeBBox(t.text,r,o,{font:this.properties.calloutLabel,textAlign:a,textBaseline:l})},p=(e,t,i)=>{const s=u(e).grow(n/2),r=u(t).grow(n/2);if(s.x<r.x+r.width&&s.x+s.width>r.x&&("to-top"===i?s.y<r.y+r.height:s.y+s.height>r.y)){const e="to-top"===i?s.y-r.y-r.height:s.y+s.height-r.y;t.calloutLabel.collisionOffsetY=e}},g=e=>{const t=e.slice().sort(((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin)))[0],i=e.indexOf(t);for(let s=i-1;s>=0;s--){const t=e[s+1],i=e[s];p(t,i,"to-top")}for(let s=i+1;s<e.length;s++){const t=e[s-1],i=e[s];p(t,i,"to-bottom")}},m=e=>{const t=a.some((e=>0!==e.calloutLabel.collisionOffsetY)),i=e.map((e=>u(e))),s=i.map((e=>e.clone().grow(n/2)));let l=!1;for(let n=0;n<s.length&&!l;n++){const t=s[n];for(let i=n+1;i<e.length;i++){const e=s[i];if(t.collidesBBox(e)){l=!0;break}}}const h=o.map((e=>{const{startAngle:t,endAngle:i,outerRadius:s}=e;return{startAngle:t,endAngle:i,innerRadius:r,outerRadius:s}})),c=i.some((e=>h.some((t=>fT(e,t)))));(l||t||c)&&e.filter((e=>"center"===e.calloutLabel.textAlign)).forEach((e=>{const t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"}))};g(l),g(h),m(c),m(d)}updateCalloutLabelNodes(e){const{radiusScale:t}=this,{calloutLabel:i,calloutLine:s}=this.properties,n=s.length,{offset:r,color:o}=i,a=new lC;this.calloutLabelSelection.selectByTag(1).forEach((s=>{const{datum:l}=s,h=l.calloutLabel,c=t.convert(l.radius),d=Math.max(0,c);if(!h?.text||0===d||h.hidden)return void(s.visible=!1);const u=d+n+r,p=l.midCos*u,g=l.midSin*u+h.collisionOffsetY,m={textAlign:h.collisionTextAlign??h.textAlign,textBaseline:h.textBaseline};a.text=h.text,a.x=p,a.y=g,a.setFont(this.properties.calloutLabel),a.setAlign(m);const f=a.getBBox();let v=h.text,y=!0;if(i.avoidCollisions){const{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(h.text,f,e);v=h.text.length===t?h.text:`${h.text.substring(0,t)}\u2026`,y=!i}s.text=v,s.x=p,s.y=g,s.setFont(this.properties.calloutLabel),s.setAlign(m),s.fill=o,s.visible=y}))}async computeLabelsBBox(e,t){const{calloutLabel:i,calloutLine:s}=this.properties,n=s.length,{offset:r,maxCollisionOffset:o,minSpacing:a}=i;if(!i.avoidCollisions)return null;await this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],h=new lC;let c;const{title:d}=this.properties;if(d?.text&&d.enabled){const e=this.getTitleTranslationY();isFinite(e)&&(h.text=d.text,h.x=0,h.y=e,h.setFont(d),h.setAlign({textBaseline:"bottom",textAlign:"center"}),c=h.getBBox(),l.push(c))}return this.calloutNodeData.forEach((i=>{const s=i.calloutLabel;if(!s||0===i.outerRadius)return null;const d=i.outerRadius+n+r,u=i.midCos*d,p=i.midSin*d+s.collisionOffsetY;h.text=s.text,h.x=u,h.y=p,h.setFont(this.properties.calloutLabel),h.setAlign({textAlign:s.collisionTextAlign??s.textAlign,textBaseline:s.textBaseline});const g=h.getBBox();if(s.box=g,Math.abs(s.collisionOffsetY)>o)s.hidden=!0;else{if(c){const e=t.y-this.centerY,i=new Vg(c.x-a,e,c.width+2*a,c.y+c.height+a-e);if(g.collidesBBox(i))return void(s.hidden=!0)}if(e.hideWhenNecessary){const{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:n}=this.getLabelOverflow(s.text,g,t),r=s.text.length>2&&e<2;if(i||r||n)return void(s.hidden=!0)}s.hidden=!1,l.push(g)}})),0===l.length?null:Vg.merge(l)}updateSectorLabelNodes(){const{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:s,fontWeight:n,fontFamily:r,positionOffset:o,positionRatio:a,color:l}=this.properties.sectorLabel,h=(e,h)=>{const{sectorLabel:c,outerRadius:d}=h;let u=!1;if(c&&0!==d){const p=t*(1-a)+d*a+o;e.fill=l,e.fontStyle=s,e.fontWeight=n,e.fontSize=i,e.fontFamily=r,e.text=c.text,e.x=h.midCos*p,e.y=h.midSin*p,e.textAlign="center",e.textBaseline="middle";const g=e.getBBox(),m=[[g.x,g.y],[g.x+g.width,g.y],[g.x+g.width,g.y+g.height],[g.x,g.y+g.height]],{startAngle:f,endAngle:v}=h,y={startAngle:f,endAngle:v,innerRadius:t,outerRadius:d};m.every((e=>{let[t,i]=e;return gT(t,i,y)}))&&(u=!0)}e.visible=u};this.labelSelection.each(h),this.highlightLabelSelection.each(h)}updateInnerLabelNodes(){const e=[],t=[];this.innerLabelsSelection.each(((i,s)=>{const{fontStyle:n,fontWeight:r,fontSize:o,fontFamily:a,color:l}=s;i.fontStyle=n,i.fontWeight=r,i.fontSize=o,i.fontFamily=a,i.text=s.text,i.x=0,i.y=0,i.fill=l,i.textAlign="center",i.textBaseline="alphabetic",e.push(i.getBBox()),t.push(s.spacing)}));const i=e=>0===e?0:t[e],s=e=>e===t.length-1?0:t[e],n=e.reduce(((e,t,n)=>e+t.height+i(n)+s(n)),0),r=Math.max(...e.map((e=>e.width))),o=this.getInnerRadius(),a=Math.sqrt(Math.pow(r/2,2)+Math.pow(n/2,2))<=(o>0?o:this.getOuterRadius()),l=[];for(let h=0,c=-n/2;h<e.length;h++){const t=e[h].height+c+i(h);l.push(t),c=t+s(h)}this.innerLabelsSelection.each(((e,t,i)=>{e.y=l[i],e.visible=a}))}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius(),this.zerosumInnerRing.size=2*this.getInnerRadius()}getDatumLegendName(e){const{angleKey:t,calloutLabelKey:i,sectorLabelKey:s,legendItemKey:n}=this.properties,{sectorLabel:r,calloutLabel:o,legendItem:a}=e;return n&&void 0!==a?a.text:i&&i!==t&&void 0!==o?.text?o.text:s&&s!==t&&void 0!==r?.text?r.text:void 0}pickNodeClosestDatum(e){return NT(this,e)}getTooltipHtml(e){if(!this.properties.isValid())return WC;const{datum:t,angleValue:i,sectorFormat:{fill:s},itemId:n}=e,r=fR(this.properties.title?.text),o=ym(i)?Fg(i):String(i),a=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:r??a,content:r&&a?`${a}: ${o}`:o,backgroundColor:s},{datum:t,itemId:n,title:r,color:s,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){const{visible:t,processedData:i,dataModel:s}=this;if(!s||!i?.data.length||!this.properties.isValid()||"category"!==e)return[];const{angleKey:n,calloutLabelKey:r,sectorLabelKey:o,legendItemKey:a}=this.properties;if(!a&&(!r||r===n)&&(!o||o===n))return[];const{calloutLabelIdx:l,sectorLabelIdx:h,legendItemIdx:c}=this.getProcessedDataIndexes(s),d=this.properties.title?.showInLegend&&this.properties.title.text,u=[];for(let p=0;p<i.data.length;p++){const{datum:e,values:s}=i.data[p],g=[];d&&g.push(d);const m=this.getLabels(e,2*Math.PI,2*Math.PI,!1,null!=l?s[l]:void 0,null!=h?s[h]:void 0,null!=c?s[c]:void 0);if(a&&void 0!==m.legendItem?g.push(m.legendItem.text):r&&r!==n&&void 0!==m.calloutLabel?.text?g.push(m.calloutLabel?.text):o&&o!==n&&void 0!==m.sectorLabel?.text&&g.push(m.sectorLabel?.text),0===g.length)continue;const f=this.getSectorFormat(e,p,!1);u.push({legendType:"category",id:this.id,itemId:p,seriesId:this.id,enabled:t&&this.legendItemEnabled[p],label:{text:g.join(" - ")},symbols:[{marker:{fill:f.fill,stroke:f.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth}}],legendItemName:null!=a?e[a]:void 0})}return u}onLegendItemClick(e){const{enabled:t,itemId:i,series:s,legendItemName:n}=e;s.id===this.id?this.toggleSeriesItem(i,t):null!=n&&this.toggleOtherSeriesItems(n,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.legendItemEnabled[e]=t,this.nodeData[e]&&(this.nodeData[e].enabled=t),this.nodeDataRefresh=!0}setLegendState(e){this.legendItemEnabled=e,this.ctx.updateService.update(4)}toggleOtherSeriesItems(e,t){if(!this.properties.legendItemKey||!this.dataModel)return;const i=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");this.processedData?.data.forEach(((s,n)=>{let{values:r}=s;r[i]===e&&this.toggleSeriesItem(n,t)}))}animateEmptyUpdateReady(e){const{animationManager:t}=this.ctx,i=FT(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);Qm(this.id,"nodes",t,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,((e,t)=>this.getDatumId(t))),Qm(this.id,"innerCircle",t,[this.innerCircleSelection],i.innerCircle),eE(this,"callout",t,this.calloutLabelSelection),eE(this,"sector",t,this.labelSelection),eE(this,"highlight",t,this.highlightLabelSelection),eE(this,"inner",t,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,processedData:s,radiusScale:n,previousRadiusScale:r}=this,{animationManager:o}=this.ctx,a=s?.reduced?.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);const l=0===(a?.moved.size??0),h=(s?.defs.keys.length??0)>0;l&&h&&(s?.reduced?.animationValidation?.uniqueKeys??!0)||this.ctx.animationManager.skipCurrentBatch();const c=FT(!1,this.properties.rotation,n,r);Qm(this.id,"nodes",o,[e,t,i],c.nodes,((e,t)=>this.getDatumId(t)),a),Qm(this.id,"innerCircle",o,[this.innerCircleSelection],c.innerCircle),eE(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),eE(this,"sector",this.ctx.animationManager,this.labelSelection),eE(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),eE(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,radiusScale:s,previousRadiusScale:n}=this,{animationManager:r}=this.ctx,o=FT(!1,this.properties.rotation,s,n);Qm(this.id,"nodes",r,[e,t,i],o.nodes,((e,t)=>this.getDatumId(t))),Qm(this.id,"innerCircle",r,[this.innerCircleSelection],o.innerCircle),tE(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),tE(this,"sector",this.ctx.animationManager,this.labelSelection),tE(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),tE(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){const{calloutLabelKey:t,sectorLabelKey:i,legendItemKey:s}=this.properties;if(this.processedData?.reduced?.animationValidation?.uniqueKeys)return s?e[s]:t?e[t]:i?e[i]:void 0}getDatumId(e){const{index:t}=e,i=this.getDatumIdFromData(e.datum);return null!=i?String(i):`${t}`}onDataChange(){const{data:e,seriesItemEnabled:t,legendItemEnabled:i}=this;this.seriesItemEnabled=e?.map(((e,i)=>t[i]??!0))??[],this.legendItemEnabled=e?.map(((e,t)=>i[t]??!0))??[]}};BT.className="DonutSeries",BT.type="donut";var VT={series:{title:{enabled:!0,fontWeight:"normal",fontSize:14,fontFamily:SI,color:MI,spacing:5},calloutLabel:{enabled:!0,fontSize:12,fontFamily:SI,color:wI,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontWeight:"normal",fontSize:12,fontFamily:SI,color:xI,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:AI,xOffset:3,yOffset:3,blur:5}}},zT=e=>{let{takeColors:t,colorsCount:i}=e;const{fills:s,strokes:n}=t(i);return{fills:s,strokes:n,calloutLine:{colors:n}}},HT={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"donut",moduleFactory:e=>new BT(e),tooltipDefaults:{range:"exact"},themeTemplate:{series:{title:{enabled:!0,fontWeight:"normal",fontSize:14,fontFamily:SI,color:MI,spacing:5},calloutLabel:{enabled:!0,fontSize:12,fontFamily:SI,color:wI,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontWeight:"normal",fontSize:12,fontFamily:SI,color:xI,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:AI,xOffset:3,yOffset:3,blur:5},innerLabels:{fontSize:12,fontFamily:SI,color:wI,spacing:2}}},paletteFactory:zT},WT=class extends $C{constructor(){super(...arguments),this.showInLegend=!1}};op([Ef(kf)],WT.prototype,"showInLegend",2);var jT=class extends XC{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};op([Ef(zf)],jT.prototype,"offset",2),op([Ef(Wf)],jT.prototype,"minAngle",2),op([Ef(zf)],jT.prototype,"minSpacing",2),op([Ef(zf)],jT.prototype,"maxCollisionOffset",2),op([Ef(kf)],jT.prototype,"avoidCollisions",2);var UT=class extends XC{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};op([Ef(Gf)],UT.prototype,"positionOffset",2),op([Ef(Hf)],UT.prototype,"positionRatio",2);var _T=class extends Df{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};op([Ef(Jf,{optional:!0})],_T.prototype,"colors",2),op([Ef(zf)],_T.prototype,"length",2),op([Ef(zf)],_T.prototype,"strokeWidth",2);var KT=class extends gD{constructor(){super(...arguments),this.fills=Object.values(MT),this.strokes=Object.values(DT),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.title=new WT,this.shadow=new nE,this.calloutLabel=new jT,this.sectorLabel=new UT,this.calloutLine=new _T,this.tooltip=new lE}};op([Ef(Of)],KT.prototype,"angleKey",2),op([Ef(Of,{optional:!0})],KT.prototype,"angleName",2),op([Ef(Of,{optional:!0})],KT.prototype,"angleFilterKey",2),op([Ef(Of,{optional:!0})],KT.prototype,"radiusKey",2),op([Ef(Of,{optional:!0})],KT.prototype,"radiusName",2),op([Ef(zf,{optional:!0})],KT.prototype,"radiusMin",2),op([Ef(zf,{optional:!0})],KT.prototype,"radiusMax",2),op([Ef(Of,{optional:!0})],KT.prototype,"calloutLabelKey",2),op([Ef(Of,{optional:!0})],KT.prototype,"calloutLabelName",2),op([Ef(Of,{optional:!0})],KT.prototype,"sectorLabelKey",2),op([Ef(Of,{optional:!0})],KT.prototype,"sectorLabelName",2),op([Ef(Of,{optional:!0})],KT.prototype,"legendItemKey",2),op([Ef(Jf)],KT.prototype,"fills",2),op([Ef(Jf)],KT.prototype,"strokes",2),op([Ef(Hf)],KT.prototype,"fillOpacity",2),op([Ef(Hf)],KT.prototype,"strokeOpacity",2),op([Ef(lv)],KT.prototype,"lineDash",2),op([Ef(zf)],KT.prototype,"lineDashOffset",2),op([Ef(zf)],KT.prototype,"cornerRadius",2),op([Ef(Nf,{optional:!0})],KT.prototype,"itemStyler",2),op([Ef(Wf)],KT.prototype,"rotation",2),op([Ef(Gf)],KT.prototype,"outerRadiusOffset",2),op([Ef(Hf)],KT.prototype,"outerRadiusRatio",2),op([Ef(zf)],KT.prototype,"strokeWidth",2),op([Ef(Gf)],KT.prototype,"sectorSpacing",2),op([Ef(Lf)],KT.prototype,"title",2),op([Ef(Lf)],KT.prototype,"shadow",2),op([Ef(Lf)],KT.prototype,"calloutLabel",2),op([Ef(Lf)],KT.prototype,"sectorLabel",2),op([Ef(Lf)],KT.prototype,"calloutLine",2),op([Ef(Lf)],KT.prototype,"tooltip",2);var $T=class extends bM{constructor(e,t,i,s){super(e,t,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey,this.calloutLabelKey=s.properties.calloutLabelKey,this.sectorLabelKey=s.properties.sectorLabelKey}},YT=class extends OT{constructor(e){super({moduleCtx:e,pickModes:[1,0],useLabelLayer:!0,animationResetFns:{item:kT,label:iE}}),this.properties=new KT,this.phantomNodeData=void 0,this.previousRadiusScale=new ID,this.radiusScale=new ID,this.phantomGroup=this.contentGroup.appendChild(new xy),this.phantomSelection=Ty.select(this.phantomGroup,(()=>this.nodeFactory()),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new xy({name:"pieCalloutLabels"})),this.calloutLabelSelection=new Ty(this.calloutLabelGroup,xy),this.backgroundGroup=this.rootGroup.appendChild(new qC({name:`${this.id}-background`,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new xy({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new _M),this.seriesItemEnabled=[],this.legendItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=$T,this.angleScale=new ID,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map((e=>e+Math.PI/2)),this.phantomGroup.opacity=.2,this.phantomGroup.zIndexSubOrder=[()=>this._declarationOrder,0]}get calloutNodeData(){return this.phantomNodeData??this.nodeData}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",(e=>this.onLegendItemClick(e))))}get visible(){return super.visible&&(0===this.seriesItemEnabled.length||this.seriesItemEnabled.includes(!0))}nodeFactory(){const e=new xT;return e.miterLimit=1e9,e}getSeriesDomain(e){return"x"===e?this.angleScale.domain:this.radiusScale.domain}async processData(e){if(null==this.data||!this.properties.isValid())return;let{data:t}=this;const{visible:i,seriesItemEnabled:s}=this,{angleKey:n,angleFilterKey:r,radiusKey:o,calloutLabelKey:a,sectorLabelKey:l,legendItemKey:h}=this.properties,c=!this.ctx.animationManager.isSkipped(),d=[],u=[];h?d.push(LR(h,"band",{id:"legendItemKey"})):a?d.push(LR(a,"band",{id:"calloutLabelKey"})):l&&d.push(LR(l,"band",{id:"sectorLabelKey"}));const p=this.radiusScale.type,g=this.radiusScale.type;o&&u.push(kR(o,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax}),FR(o,p,{id:"radiusRaw"}),_R("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),a&&u.push(FR(a,"band",{id:"calloutLabelValue"})),l&&u.push(FR(l,"band",{id:"sectorLabelValue"})),h&&u.push(FR(h,"band",{id:"legendItemValue"})),r&&u.push(NR(r,g,{id:"angleFilterValue",onlyPositive:!0}),FR(r,g,{id:"angleFilterRaw"}),_R("angleFilterValue",[0,1],0,0)),c&&this.processedData?.reduced?.animationValidation?.uniqueKeys&&d.length>0&&u.push(XR(this.processedData)),u.push(KR()),t=t.map(((e,t)=>i&&s[t]?e:{...e,[n]:0})),await this.requestDataModel(e,t,{props:[...d,NR(n,g,{id:"angleValue",onlyPositive:!0}),FR(n,g,{id:"angleRaw"}),_R("angleValue",[0,1],0,0),...u]});for(const m of this.processedData?.defs?.values??[]){const{id:e,missing:t,property:i}=m,s=Vx(this,t);"angleRaw"!==e&&s>0&&fp.warnOnce(`no value was found for the key '${String(i)}' on ${s} data element${s>1?"s":""}`)}this.animationState.transition("updateData")}async maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;const{nodeData:e=[],phantomNodeData:t}=await this.createNodeData()??{};this.nodeData=e,this.phantomNodeData=t,this.nodeDataRefresh=!1}getProcessedDataIndexes(e){return{angleIdx:e.resolveProcessedDataIndexById(this,"angleValue"),angleRawIdx:e.resolveProcessedDataIndexById(this,"angleRaw"),angleFilterIdx:null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterValue"):void 0,angleFilterRawIdx:null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterRaw"):void 0,radiusIdx:this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):void 0,radiusRawIdx:this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusRaw"):void 0,calloutLabelIdx:this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):void 0,sectorLabelIdx:this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):void 0,legendItemIdx:this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):void 0}}async createNodeData(){const{id:e,processedData:t,dataModel:i,angleScale:s}=this,{rotation:n}=this.properties;if(!t||!i||"ungrouped"!==t.type)return;const{angleIdx:r,angleRawIdx:o,angleFilterIdx:a,angleFilterRawIdx:l,radiusIdx:h,radiusRawIdx:c,calloutLabelIdx:d,sectorLabelIdx:u,legendItemIdx:p}=this.getProcessedDataIndexes(i),g=null!=l&&t.data.some((e=>{let{values:t}=e;return t[l]>t[o]}));let m=0,f=0;const v=[],y=null!=l?[]:void 0;return t.data.forEach(((e,t)=>{const{datum:i,values:C}=e,S=g?C[a]:C[r],w=null==l||g?1:Math.sqrt(C[l]/C[o]),b=s.convert(m)+Oy(n);m=S,f+=S;const x=s.convert(m)+Oy(n),M=Math.abs(x-b),D=b+M/2,I=C[o],R=(null!=h?C[h]??1:1)*w,E=null!=c?C[c]:void 0,A=null!=p?C[p]:void 0,T=this.getLabels(i,D,M,!0,null!=d?C[d]:void 0,null!=u?C[u]:void 0,A),P=this.getSectorFormat(i,t,!1),L={itemId:t,series:this,datum:i,index:t,angleValue:I,midAngle:D,midCos:Math.cos(D),midSin:Math.sin(D),startAngle:b,endAngle:x,radius:R,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(R),0),sectorFormat:P,radiusValue:E,legendItemValue:A,enabled:this.seriesItemEnabled[t],...T};v.push(L),null!=y&&y.push({...L,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0)})})),this.zerosumOuterRing.visible=0===f,{itemId:e,nodeData:v,labelData:v,phantomNodeData:y}}getLabels(e,t,i,s,n,r,o){const{calloutLabel:a,sectorLabel:l,legendItemKey:h}=this.properties,c=!s||a.enabled?this.properties.calloutLabelKey:void 0,d=!s||l.enabled?this.properties.sectorLabelKey:void 0;if(!c&&!d&&!h)return{};const u={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return c&&i>Oy(a.minAngle)&&(p.calloutLabel={...this.getTextAlignment(t),text:this.getLabelText(a,{...u,value:n}),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),d&&(p.sectorLabel={text:this.getLabelText(l,{...u,value:r})}),null!=h&&null!=o&&(p.legendItem={key:h,text:o}),p}getTextAlignment(e){const t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=ky(e)- -.75*Math.PI;return t[kg(Math.floor(i/(Math.PI/2)),t.length)]}getSectorFormat(e,t,i){const{callbackCache:s}=this.ctx,{angleKey:n,radiusKey:r,calloutLabelKey:o,sectorLabelKey:a,legendItemKey:l,fills:h,strokes:c,itemStyler:d}=this.properties,u=c[t%c.length],{fill:p,fillOpacity:g,stroke:m,strokeWidth:f,strokeOpacity:v,lineDash:y,lineDashOffset:C,cornerRadius:S}=Im(i&&this.properties.highlightStyle.item,{fill:h.length>0?h[t%h.length]:void 0,stroke:u,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties);let w;return d&&(w=s.call(d,{datum:e,angleKey:n,radiusKey:r,calloutLabelKey:o,sectorLabelKey:a,legendItemKey:l,fill:p,strokeOpacity:v,stroke:m,strokeWidth:f,fillOpacity:g,lineDash:y,lineDashOffset:C,cornerRadius:S,highlighted:i,seriesId:this.id})),{fill:w?.fill??p,fillOpacity:w?.fillOpacity??g,stroke:w?.stroke??m,strokeWidth:w?.strokeWidth??f,strokeOpacity:w?.strokeOpacity??v,lineDash:w?.lineDash??y,lineDashOffset:w?.lineDashOffset??C,cornerRadius:w?.cornerRadius??S}}getOuterRadius(){return Math.max(this.radius*this.properties.outerRadiusRatio+this.properties.outerRadiusOffset,0)}updateRadiusScale(e){const t=[0,this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t);const i=e=>({...e,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(e.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){const e=Math.max(0,this.radiusScale.range[1]);if(0===e)return NaN;return-e-(2+(this.properties.title?.spacing??0))-Math.max(0,-e)}async update(e){let{seriesRect:t}=e;const{title:i}=this.properties,s={seriesRectWidth:t?.width,seriesRectHeight:t?.height},n=null!=vC(this.nodeDataDependencies,s);if(n&&(this._nodeDataDependencies=s),await this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(n),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),i){const e=this.getTitleTranslationY();i.node.y=isFinite(e)?e:0;const t=i.node.getBBox();i.node.visible=i.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(t)}this.zerosumOuterRing.fillOpacity=0,this.zerosumOuterRing.stroke=this.properties.calloutLabel.color,this.zerosumOuterRing.strokeWidth=1,this.zerosumOuterRing.strokeOpacity=1,this.updateNodeMidPoint(),await this.updateSelections(),await this.updateNodes(t)}updateTitleNodes(){const{oldTitle:e}=this,{title:t}=this.properties;e!==t&&(e&&this.labelGroup?.removeChild(e.node),t&&(t.node.textBaseline="bottom",this.labelGroup?.appendChild(t.node)),this.oldTitle=t)}updateNodeMidPoint(){const e=e=>{const t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}};this.nodeData.forEach(e),this.phantomNodeData?.forEach(e)}async updateSelections(){await this.updateGroupSelection()}async updateGroupSelection(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,highlightLabelSelection:s,calloutLabelSelection:n,labelSelection:r}=this,o=this.nodeData.map((e=>({...e,sectorFormat:{...e.sectorFormat}}))),a=(e,t)=>{e.update(t,void 0,(e=>this.getDatumId(e))),this.ctx.animationManager.isSkipped()&&e.cleanup()};a(e,this.nodeData),a(t,o),a(i,this.phantomNodeData??[]),n.update(this.calloutNodeData,(e=>{const t=new tC;t.tag=0,t.pointerEvents=1,e.appendChild(t);const i=new lC;i.tag=1,i.pointerEvents=1,e.appendChild(i)})),r.update(this.nodeData),s.update(o)}async updateNodes(e){const t=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.includes(!0);this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&t?.series===this,this.highlightLabel.visible=i&&t?.series===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity();const s=this.ctx.animationManager.isSkipped(),n=(e,t,i,n)=>{const r=this.getSectorFormat(t.datum,t.itemId,n);t.sectorFormat.fill=r.fill,t.sectorFormat.stroke=r.stroke,s&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(n||s)&&(e.fill=r.fill,e.stroke=r.stroke),e.strokeWidth=r.strokeWidth,e.fillOpacity=r.fillOpacity,e.strokeOpacity=r.strokeOpacity,e.lineDash=r.lineDash,e.lineDashOffset=r.lineDashOffset,e.cornerRadius=r.cornerRadius,e.fillShadow=this.properties.shadow;const o=Math.max((this.properties.sectorSpacing+(null!=r.stroke?r.strokeWidth:0))/2,0);e.inset=o,e.lineJoin=this.properties.sectorSpacing>=0||o>0?"miter":"round"};this.itemSelection.each(((e,t,i)=>n(e,t,0,!1))),this.highlightSelection.each(((e,i,s)=>{n(e,i,0,!0),e.visible=i.itemId===t?.itemId})),this.phantomSelection.each(((e,t,i)=>n(e,t,0,!1))),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){const{calloutLine:e}=this.properties,t=e.length,i=e.strokeWidth,s=e.colors??this.properties.strokes,{offset:n}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach(((e,r)=>{const o=e.datum,{calloutLabel:a,outerRadius:l}=o;if(a?.text&&!a.hidden&&0!==l){e.visible=!0,e.strokeWidth=i,e.stroke=s[r%s.length],e.fill=void 0;const h=o.midCos*l,c=o.midSin*l;let d=o.midCos*(l+t),u=o.midSin*(l+t);if((a.collisionTextAlign??0!==a.collisionOffsetY)&&null!=a.box){const e=a.box;let t=d,i=u;d<e.x?t=e.x:d>e.x+e.width&&(t=e.x+e.width),u<e.y?i=e.y:u>e.y+e.height&&(i=e.y+e.height);const s=t-d,r=i-u,o=Math.sqrt(Math.pow(s,2)+Math.pow(r,2)),l=o-n;l>0&&(d+=s*l/o,u+=r*l/o)}e.x1=h,e.y1=c,e.x2=d,e.y2=u}else e.visible=!1}))}getLabelOverflow(e,t,i){const s=i.x-this.centerX,n=i.x+i.width-this.centerX,r=i.y-this.centerY,o=i.y+i.height-this.centerY;let a=1;t.x+1<s?a=(t.x+t.width-s)/t.width:t.x+t.width-1>n&&(a=(n-t.x)/t.width);const l=t.y+1<r||t.y+t.height-1>o;return{textLength:1===a?e.length:Math.floor(e.length*a)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e){const{surroundingRadius:t}=this;if(null==t)return!1;const i=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],s=t**2;return i.some((e=>e.x**2+e.y**2>s))}computeCalloutLabelCollisionOffsets(){const{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:s,minSpacing:n}=t,r=e.convert(0),o=this.calloutNodeData,a=o.filter((e=>{return!(!(t=e).calloutLabel||0===t.outerRadius);var t}));if(a.forEach((e=>{const t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)})),a.length<=1)return;const l=a.filter((e=>e.midCos<0)).sort(((e,t)=>e.midSin-t.midSin)),h=a.filter((e=>e.midCos>=0)).sort(((e,t)=>e.midSin-t.midSin)),c=a.filter((e=>e.midSin<0&&"center"===e.calloutLabel?.textAlign)).sort(((e,t)=>e.midCos-t.midCos)),d=a.filter((e=>e.midSin>=0&&"center"===e.calloutLabel?.textAlign)).sort(((e,t)=>e.midCos-t.midCos)),u=e=>{const t=e.calloutLabel;if(null==t)return Vg.zero.clone();const n=e.outerRadius+i.length+s,r=e.midCos*n,o=e.midSin*n+t.collisionOffsetY,a=t.collisionTextAlign??t.textAlign,l=t.textBaseline;return lC.computeBBox(t.text,r,o,{font:this.properties.calloutLabel,textAlign:a,textBaseline:l})},p=(e,t,i)=>{const s=u(e).grow(n/2),r=u(t).grow(n/2);if(s.x<r.x+r.width&&s.x+s.width>r.x&&("to-top"===i?s.y<r.y+r.height:s.y+s.height>r.y)){const e="to-top"===i?s.y-r.y-r.height:s.y+s.height-r.y;t.calloutLabel.collisionOffsetY=e}},g=e=>{const t=e.slice().sort(((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin)))[0],i=e.indexOf(t);for(let s=i-1;s>=0;s--){const t=e[s+1],i=e[s];p(t,i,"to-top")}for(let s=i+1;s<e.length;s++){const t=e[s-1],i=e[s];p(t,i,"to-bottom")}},m=e=>{const t=a.some((e=>0!==e.calloutLabel.collisionOffsetY)),i=e.map((e=>u(e))),s=i.map((e=>e.clone().grow(n/2)));let l=!1;for(let n=0;n<s.length&&!l;n++){const t=s[n];for(let i=n+1;i<e.length;i++){const e=s[i];if(t.collidesBBox(e)){l=!0;break}}}const h=o.map((e=>{const{startAngle:t,endAngle:i,outerRadius:s}=e;return{startAngle:t,endAngle:i,innerRadius:r,outerRadius:s}})),c=i.some((e=>h.some((t=>fT(e,t)))));(l||t||c)&&e.filter((e=>"center"===e.calloutLabel.textAlign)).forEach((e=>{const t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"}))};g(l),g(h),m(c),m(d)}updateCalloutLabelNodes(e){const{radiusScale:t}=this,{calloutLabel:i,calloutLine:s}=this.properties,n=s.length,{offset:r,color:o}=i,a=new lC;this.calloutLabelSelection.selectByTag(1).forEach((s=>{const{datum:l}=s,h=l.calloutLabel,c=t.convert(l.radius),d=Math.max(0,c);if(!h?.text||0===d||h.hidden)return void(s.visible=!1);const u=d+n+r,p=l.midCos*u,g=l.midSin*u+h.collisionOffsetY,m={textAlign:h.collisionTextAlign??h.textAlign,textBaseline:h.textBaseline};a.text=h.text,a.x=p,a.y=g,a.setFont(this.properties.calloutLabel),a.setAlign(m);const f=a.getBBox();let v=h.text,y=!0;if(i.avoidCollisions){const{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(h.text,f,e);v=h.text.length===t?h.text:`${h.text.substring(0,t)}\u2026`,y=!i}s.text=v,s.x=p,s.y=g,s.setFont(this.properties.calloutLabel),s.setAlign(m),s.fill=o,s.visible=y}))}async computeLabelsBBox(e,t){const{calloutLabel:i,calloutLine:s}=this.properties,n=s.length,{offset:r,maxCollisionOffset:o,minSpacing:a}=i;if(!i.avoidCollisions)return null;await this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],h=new lC;let c;const{title:d}=this.properties;if(d?.text&&d.enabled){const e=this.getTitleTranslationY();isFinite(e)&&(h.text=d.text,h.x=0,h.y=e,h.setFont(d),h.setAlign({textBaseline:"bottom",textAlign:"center"}),c=h.getBBox(),l.push(c))}return this.calloutNodeData.forEach((i=>{const s=i.calloutLabel;if(!s||0===i.outerRadius)return null;const d=i.outerRadius+n+r,u=i.midCos*d,p=i.midSin*d+s.collisionOffsetY;h.text=s.text,h.x=u,h.y=p,h.setFont(this.properties.calloutLabel),h.setAlign({textAlign:s.collisionTextAlign??s.textAlign,textBaseline:s.textBaseline});const g=h.getBBox();if(s.box=g,Math.abs(s.collisionOffsetY)>o)s.hidden=!0;else{if(c){const e=t.y-this.centerY,i=new Vg(c.x-a,e,c.width+2*a,c.y+c.height+a-e);if(g.collidesBBox(i))return void(s.hidden=!0)}if(e.hideWhenNecessary){const{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:n}=this.getLabelOverflow(s.text,g,t),r=s.text.length>2&&e<2;if(i||r||n)return void(s.hidden=!0)}s.hidden=!1,l.push(g)}})),0===l.length?null:Vg.merge(l)}updateSectorLabelNodes(){const{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:s,fontWeight:n,fontFamily:r,positionOffset:o,positionRatio:a,color:l}=this.properties.sectorLabel,h=t>0,c=1===this.seriesItemEnabled.filter(Boolean).length,d=(e,d)=>{const{sectorLabel:u,outerRadius:p,startAngle:g,endAngle:m}=d;let f=!1;if(u&&0!==p){const v=t*(1-a)+p*a+o;e.fill=l,e.fontStyle=s,e.fontWeight=n,e.fontSize=i,e.fontFamily=r,e.text=u.text;!h&&c?(e.x=0,e.y=0):(e.x=d.midCos*v,e.y=d.midSin*v),e.textAlign="center",e.textBaseline="middle";const y=e.getBBox(),C=[[y.x,y.y],[y.x+y.width,y.y],[y.x+y.width,y.y+y.height],[y.x,y.y+y.height]],S={startAngle:g,endAngle:m,innerRadius:t,outerRadius:p};C.every((e=>{let[t,i]=e;return gT(t,i,S)}))&&(f=!0)}e.visible=f};this.labelSelection.each(d),this.highlightLabelSelection.each(d)}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius()}getDatumLegendName(e){const{angleKey:t,calloutLabelKey:i,sectorLabelKey:s,legendItemKey:n}=this.properties,{sectorLabel:r,calloutLabel:o,legendItem:a}=e;return n&&void 0!==a?a.text:i&&i!==t&&void 0!==o?.text?o.text:s&&s!==t&&void 0!==r?.text?r.text:void 0}pickNodeClosestDatum(e){return NT(this,e)}getTooltipHtml(e){if(!this.properties.isValid())return WC;const{datum:t,angleValue:i,sectorFormat:{fill:s},itemId:n}=e,r=fR(this.properties.title?.text),o=ym(i)?Fg(i):String(i),a=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:r??a,content:r&&a?`${a}: ${o}`:o,backgroundColor:s},{datum:t,itemId:n,title:r,color:s,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){const{visible:t,processedData:i,dataModel:s}=this;if(!s||!i?.data.length||"category"!==e)return[];const{angleKey:n,calloutLabelKey:r,sectorLabelKey:o,legendItemKey:a}=this.properties;if(!a&&(!r||r===n)&&(!o||o===n))return[];const{calloutLabelIdx:l,sectorLabelIdx:h,legendItemIdx:c}=this.getProcessedDataIndexes(s),d=this.properties.title?.showInLegend&&this.properties.title.text,u=[];for(let p=0;p<i.data.length;p++){const{datum:e,values:s}=i.data[p],g=[];d&&g.push(d);const m=this.getLabels(e,2*Math.PI,2*Math.PI,!1,null!=l?s[l]:void 0,null!=h?s[h]:void 0,null!=c?s[c]:void 0);if(a&&void 0!==m.legendItem?g.push(m.legendItem.text):r&&r!==n&&void 0!==m.calloutLabel?.text?g.push(m.calloutLabel?.text):o&&o!==n&&void 0!==m.sectorLabel?.text&&g.push(m.sectorLabel?.text),0===g.length)continue;const f=this.getSectorFormat(e,p,!1);u.push({legendType:"category",id:this.id,itemId:p,seriesId:this.id,enabled:t&&this.legendItemEnabled[p],label:{text:g.join(" - ")},symbols:[{marker:{fill:f.fill,stroke:f.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth}}],legendItemName:null!=a?e[a]:void 0})}return u}onLegendItemClick(e){const{enabled:t,itemId:i,series:s,legendItemName:n}=e;s.id===this.id?this.toggleSeriesItem(i,t):null!=n&&this.toggleOtherSeriesItems(n,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.legendItemEnabled[e]=t,this.nodeData[e]&&(this.nodeData[e].enabled=t),this.nodeDataRefresh=!0}setLegendState(e){this.legendItemEnabled=e,this.ctx.updateService.update(4)}toggleOtherSeriesItems(e,t){if(!this.properties.legendItemKey||!this.dataModel)return;const i=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");this.processedData?.data.forEach(((s,n)=>{let{values:r}=s;r[i]===e&&this.toggleSeriesItem(n,t)}))}animateEmptyUpdateReady(e){const{animationManager:t}=this.ctx,i=FT(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);Qm(this.id,"nodes",t,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,((e,t)=>this.getDatumId(t))),eE(this,"callout",t,this.calloutLabelSelection),eE(this,"sector",t,this.labelSelection),eE(this,"highlight",t,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,processedData:s,radiusScale:n,previousRadiusScale:r}=this,{animationManager:o}=this.ctx,a=s?.reduced?.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);const l=0===(a?.moved.size??0),h=(s?.defs.keys.length??0)>0;l&&h&&(s?.reduced?.animationValidation?.uniqueKeys??!0)||this.ctx.animationManager.skipCurrentBatch();const c=FT(!1,this.properties.rotation,n,r);Qm(this.id,"nodes",o,[e,t,i],c.nodes,((e,t)=>this.getDatumId(t)),a),eE(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),eE(this,"sector",this.ctx.animationManager,this.labelSelection),eE(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:e,highlightSelection:t,phantomSelection:i,radiusScale:s,previousRadiusScale:n}=this,{animationManager:r}=this.ctx,o=FT(!1,this.properties.rotation,s,n);Qm(this.id,"nodes",r,[e,t,i],o.nodes,((e,t)=>this.getDatumId(t))),tE(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),tE(this,"sector",this.ctx.animationManager,this.labelSelection),tE(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){const{calloutLabelKey:t,sectorLabelKey:i,legendItemKey:s}=this.properties;if(this.processedData?.reduced?.animationValidation?.uniqueKeys)return s?e[s]:t?e[t]:i?e[i]:void 0}getDatumId(e){const{index:t}=e,i=this.getDatumIdFromData(e.datum);return null!=i?String(i):`${t}`}onDataChange(){const{data:e,seriesItemEnabled:t,legendItemEnabled:i}=this;this.seriesItemEnabled=e?.map(((e,i)=>t[i]??!0))??[],this.legendItemEnabled=e?.map(((e,t)=>i[t]??!0))??[]}};YT.className="PieSeries",YT.type="pie";var ZT={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",moduleFactory:e=>new YT(e),tooltipDefaults:{range:"exact"},themeTemplate:VT,paletteFactory:zT},qT={add:function(e,t){if("number"===typeof t)return{x:e.x+t,y:e.y+t};return{x:e.x+t.x,y:e.y+t.y}},angle:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:0,y:0};return Math.atan2(e.y,e.x)-Math.atan2(t.y,t.x)},apply:function(e,t){return e.x=t.x,e.y=t.y,e},equal:function(e,t){return e.x===t.x&&e.y===t.y},distance:function(e,t){const i=QT(e,t);return Math.sqrt(i.x*i.x+i.y*i.y)},distanceSquared:function(e,t){const i=QT(e,t);return i.x*i.x+i.y*i.y},from:function(e,t){if("number"===typeof e)return{x:e,y:t};if("regionOffsetX"in e)return{x:e.regionOffsetX,y:e.regionOffsetY};if("offsetWidth"in e)return{x:e.offsetWidth,y:e.offsetHeight};if("width"in e)return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y+e.height}];if("x1"in e)return[{x:e.x1,y:e.y1},{x:e.x2,y:e.y2}];throw new Error(`Values can not be converted into a vector: [${e}] [${t}]`)},gradient:function(e,t,i){const s=t.x-e.x;return(null==i?t.y-e.y:i-t.y-(i-e.y))/s},intercept:function(e,t,i){return(null==i?e.y:i-e.y)-t*e.x},intersectAtX:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3?arguments[3]:void 0;const n=e===1/0?1/0:e*i+t;return{x:i,y:null==s?n:s-n}},intersectAtY:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3?arguments[3]:void 0;return{x:e===1/0?1/0:(i-t)/e,y:null==s?i:s-i}},length:XT,lengthSquared:function(e){return e.x*e.x+e.y*e.y},multiply:function(e,t){if("number"===typeof t)return{x:e.x*t,y:e.y*t};return{x:e.x*t.x,y:e.y*t.y}},normalized:function(e){const t=XT(e);return{x:e.x/t,y:e.y/t}},origin:JT,required:function(e){return{x:e?.x??0,y:e?.y??0}},rotate:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const s=XT(e);return{x:i.x+s*Math.cos(t),y:i.y+s*Math.sin(t)}},round:function(e){return{x:Math.round(e.x),y:Math.round(e.y)}},sub:QT};function QT(e,t){return"number"===typeof t?{x:e.x-t,y:e.y-t}:{x:e.x-t.x,y:e.y-t.y}}function XT(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function JT(){return{x:0,y:0}}var eP=class extends Df{constructor(e,t){super(),this.onChange=e,this.onButtonsChange=t,this.align="start",this.position="top",this.size="normal",this.buttonOverrides=new Map}buttonConfigurations(){const e=[...this.buttons??[]];return this.draggable&&e.unshift({icon:"drag-handle",tooltip:"toolbarAnnotationsDragHandle",value:"drag",id:"drag"}),e?.map((e=>{const t=e.id??e.value,i=this.buttonOverrides.get(t);return null!=i?{...e,...i}:e}))??[]}buttonsChanged(e){this.onButtonsChange(this.buttonConfigurations(),e)}overrideButtonConfiguration(e,t){let i=this.buttonOverrides.get(e);null==i&&(i=Object.create(null),this.buttonOverrides.set(e,i));for(const s in t){const e=t[s];null==e?delete i[s]:i[s]=e}this.buttonsChanged(!0)}};op([EC((e=>{e.onChange(e.enabled)})),Ef(kf)],eP.prototype,"enabled",2),op([EC((e=>{e.onChange(e.enabled)})),Ef(Sv([...Cx]),{optional:!0})],eP.prototype,"align",2),op([EC((e=>{e.onChange(e.enabled)})),Ef(Sv(xx),{optional:!0})],eP.prototype,"position",2),op([Ef(kf)],eP.prototype,"draggable",2),op([EC((e=>{e.onChange(e.enabled)})),Ef(Sv(["small","normal"]),{optional:!0})],eP.prototype,"size",2),op([EC((e=>{for(const t of e.buttons??[])null!=t.icon&&hp.includes(t.icon)&&fp.warnOnce(`Icon '${t.icon}' is deprecated, use another icon instead.`),"toolbarAnnotationsColor"===t.ariaLabel&&fp.warnOnce(`Aria label '${t.ariaLabel}' is deprecated, use 'toolbarAnnotationsLineColor' instead.`);e.buttonsChanged(!1)})),Ef(Uf,{optional:!0})],eP.prototype,"buttons",2);var tP="ag-charts-toolbar",iP="ag-charts-toolbar__align",sP="ag-charts-toolbar__section",nP="ag-charts-toolbar__button",rP="ag-charts-toolbar__icon",oP="ag-charts-toolbar__label",aP={top:"ag-charts-toolbar--top",right:"ag-charts-toolbar--right",bottom:"ag-charts-toolbar--bottom",left:"ag-charts-toolbar--left",floating:"ag-charts-toolbar--floating","floating-top":"ag-charts-toolbar--floating-top","floating-bottom":"ag-charts-toolbar--floating-bottom",small:"ag-charts-toolbar--small",normal:"ag-charts-toolbar--normal",hidden:"ag-charts-toolbar--hidden",preventFlash:"ag-charts-toolbar--prevent-flash",floatingHidden:"ag-charts-toolbar--floating-hidden",align:{start:"ag-charts-toolbar__align--start",center:"ag-charts-toolbar__align--center",end:"ag-charts-toolbar__align--end"},button:{first:"ag-charts-toolbar__button--first",last:"ag-charts-toolbar__button--last",active:"ag-charts-toolbar__button--active",hiddenValue:"ag-charts-toolbar__button--hidden-value",hiddenToggled:"ag-charts-toolbar__button--hidden-toggled",fillVisible:"ag-charts-toolbar__button--fill-visible",strokeWidthVisible:"ag-charts-toolbar__button--stroke-width-visible",withTransition:"ag-charts-toolbar__button--with-transition",dragHandle:"ag-charts-toolbar__button--drag-handle",dragging:"ag-charts-toolbar__button--dragging"}},lP=class extends uw{constructor(e){super(),this.ctx=e,this.enabled=!0,this.seriesType=new eP(this.onGroupChanged.bind(this,"seriesType"),this.onGroupButtonsChanged.bind(this,"seriesType")),this.annotations=new eP(this.onGroupChanged.bind(this,"annotations"),this.onGroupButtonsChanged.bind(this,"annotations")),this.annotationOptions=new eP(this.onGroupChanged.bind(this,"annotationOptions"),this.onGroupButtonsChanged.bind(this,"annotationOptions")),this.ranges=new eP(this.onGroupChanged.bind(this,"ranges"),this.onGroupButtonsChanged.bind(this,"ranges")),this.zoom=new eP(this.onGroupChanged.bind(this,"zoom"),this.onGroupButtonsChanged.bind(this,"zoom")),this.dragState={client:{x:0,y:0},position:{x:0,y:0},detached:!1},this.horizontalSpacing=10,this.verticalSpacing=10,this.floatingDetectionRange=38,this.positions={top:new Set,left:new Set,right:new Set,bottom:new Set,floating:new Set,"floating-top":new Set,"floating-bottom":new Set},this.positionAlignments={top:{},left:{},right:{},bottom:{},floating:{},"floating-top":{},"floating-bottom":{}},this.groupCallers={seriesType:new Set,annotations:new Set,annotationOptions:new Set,ranges:new Set,zoom:new Set},this.groupButtons={seriesType:[],annotations:[],annotationOptions:[],ranges:[],zoom:[]},this.ariaToolbars=[{groups:["seriesType","annotations"],destroyFns:[],resetListeners:()=>{}},{groups:["annotationOptions"],destroyFns:[],resetListeners:()=>{}},{groups:["ranges"],destroyFns:[],resetListeners:()=>{}},{groups:["zoom"],destroyFns:[],resetListeners:()=>{}}],this.pendingButtonToggledEvents=[],this.groupProxied=new Map,this.hasNewLocale=!0,this.elements={};for(const i of xx)this.elements[i]=e.domManager.addChild("canvas-overlay",`toolbar-${i}`),this.elements[i].role="presentation",this.renderToolbar(i);this.toggleVisibilities();const t=e.regionManager.getRegion("series");this.destroyFns.push(e.interactionManager.addListener("hover",this.onHover.bind(this),63),e.interactionManager.addListener("leave",this.onLeave.bind(this),63),t.addListener("drag-start",this.toggleNoPointerEvents.bind(this,!0),40),t.addListener("drag-end",this.toggleNoPointerEvents.bind(this,!1),63),e.toolbarManager.addListener("button-toggled",this.onButtonToggled.bind(this)),e.toolbarManager.addListener("button-updated",this.onButtonUpdated.bind(this)),e.toolbarManager.addListener("group-toggled",this.onGroupToggled.bind(this)),e.toolbarManager.addListener("group-updated",this.onGroupUpdated.bind(this)),e.toolbarManager.addListener("floating-anchor-changed",this.onFloatingAnchorChanged.bind(this)),e.toolbarManager.addListener("proxy-group-options",this.onProxyGroupOptions.bind(this)),e.layoutManager.registerElement(2,this.onLayoutStart.bind(this)),e.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)),e.updateService.addListener("pre-dom-update",this.onPreDomUpdate.bind(this)),e.updateService.addListener("update-complete",this.onUpdateComplete.bind(this)),e.localeManager.addListener("locale-changed",(()=>{this.hasNewLocale=!0})),(()=>this.destroyElements()))}destroyElements(){this.ctx.domManager.removeStyles(tP);for(const e of Object.keys(this.elements))this.ctx.domManager.removeChild("canvas-overlay",`toolbar-${e}`)}onHover(e){const{enabled:t,elements:i,floatingDetectionRange:s,ctx:{scene:n}}=this,{offsetY:r,sourceEvent:{target:o}}=e,{FloatingBottom:a,FloatingTop:l}=bx;if(!t)return;const h=i[a],c=i[l],d=r>h.offsetTop-s&&r<n.canvas.element.offsetHeight||o===h,u=c.offsetTop+c.offsetHeight+s,p=r>0&&r<u||o===c;this.translateFloatingElements(a,d),this.translateFloatingElements(l,p)}onLeave(e){const{enabled:t,ctx:{scene:i}}=this,{relatedElement:s,targetElement:n}=e,{FloatingBottom:r,FloatingTop:o}=bx;if(!t||n!==i.canvas.element)return;Sx.some((e=>this.groupButtons[e].some((e=>e===s))))||(this.translateFloatingElements(r,!1),this.translateFloatingElements(o,!1))}toggleNoPointerEvents(e){this.groupButtons.annotationOptions.forEach((t=>t.classList.toggle("ag-charts-toolbar__no-pointer-events",e)))}onGroupChanged(e){null==this[e]||this.groupProxied.has(e)||(this.createGroup(e),this.toggleVisibilities())}onGroupButtonsChanged(e,t,i){if(this.enabled&&!this.groupProxied.has(e)){if(i)for(const t of this[e].buttonConfigurations())this.refreshButtonContent(e,t);else this.createGroupButtons(e,t);this.toggleVisibilities()}}onLayoutComplete(e){for(const t of xx)this.elements[t].classList.remove(aP.preventFlash);this.enabled&&this.refreshInnerLayout(e.series.rect)}toggleButtonsTransition(e){const t=aP.button.withTransition;for(const i of Object.values(this.groupButtons).flat())e&&!i.classList.contains(t)&&i.getBoundingClientRect(),i.classList.toggle(t,e)}onPreDomUpdate(){this.toggleButtonsTransition(!1)}onUpdateComplete(){this.toggleButtonsTransition(!0)}onButtonUpdated(e){const{type:t,group:i,id:s,...n}=e;this[i].overrideButtonConfiguration(s,n)}setButtonActive(e,t){e.classList.toggle(aP.button.active,t)}setButtonChecked(e,t){"switch"===e.role&&(e.ariaChecked=t.toString())}setButtonGroupFirstLast(e){const t=Array.from(e.childNodes??[]),i=(e,t,i)=>{const s=!t.classList.contains(aP.button.hiddenToggled);return t.classList.toggle(i,s&&e),!s&&e};let s=!0;t.forEach((e=>s=i(s,e,aP.button.first)));let n=!0;t.toReversed().forEach((e=>n=i(n,e,aP.button.last)))}onButtonToggled(e){const{group:t,id:i,active:s,enabled:n,visible:r,checked:o}=e;if(0===this.groupButtons[t].length)return void this.pendingButtonToggledEvents.push(e);const a=this.groupButtons[t].find((e=>e.dataset.toolbarId===`${i}`));null!=a&&(a.ariaDisabled=`${!n}`,a.classList.toggle(aP.button.hiddenToggled,!r),this.setButtonActive(a,s),this.setButtonChecked(a,o),this.setButtonGroupFirstLast(a.parentNode))}onGroupToggled(e){const{caller:t,group:i,active:s,visible:n}=e;this.toggleGroup(t,i,s,n),this.toggleVisibilities()}onGroupUpdated(e){const{group:t}=e;for(const i of this.ariaToolbars)if(i.groups.includes(t))return void i.resetListeners()}onFloatingAnchorChanged(e){const{elements:t,positions:i,horizontalSpacing:s,verticalSpacing:n}=this,{group:r,anchor:o}=e,a=t.floating;if(this.dragState.detached||a.classList.contains(aP.hidden))return;if(this.dragState.detached=!1,!i.floating.has(r))return;const l=o.position??"above",{offsetWidth:h,offsetHeight:c}=a;let d=o.y-c-n,u=o.x-h/2;"below"===l?d=o.y+n:"right"===l?(d=o.y-c/2,u=o.x+s):"above-left"===l&&(u=o.x);const p=new Vg(u,d,h,c);this.positionGroup(a,r,p)}positionGroup(e,t,i){const{ctx:{domManager:s}}=this,n=s.getBoundingClientRect();i.x=Ig(0,i.x,n.width-i.width),i.y=Ig(0,i.y,n.height-i.height);const r=`${Math.floor(i.x)}px`,o=`${Math.floor(i.y)}px`;(e.style.getPropertyValue("left")!==r||e.style.getPropertyValue("top")!==o)&&(e.style.setProperty("left",r),e.style.setProperty("top",o),this.onGroupMoved(t,i))}onGroupMoved(e,t){const{groupButtons:i,ctx:{toolbarManager:s}}=this;for(const n of i[e]){if(n.classList.contains(aP.button.hiddenToggled))continue;const i=n.offsetParent;s.buttonMoved(e,n.dataset.toolbarId,new Vg(n.offsetLeft+(i?.offsetLeft??0),n.offsetTop+(i?.offsetTop??0),n.offsetWidth,n.offsetHeight),t)}}buttonRect(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.ctx.domManager.getBoundingClientRect();const i=e.getBoundingClientRect();return new Vg(i.left-t.left,i.top-t.top,i.width,i.height)}onProxyGroupOptions(e){if(!this.enabled)return;const{caller:t,group:i,options:s}=e;this.groupProxied.set(i,s),this[i].set(s),this.toggleGroup(t,i,void 0,s.enabled),this.createGroup(i,s.enabled,s.position),s.enabled&&this.createGroupButtons(i,s.buttons)}createGroup(e,t,i){t??(t=this[e].enabled),i??(i=this[e].position);for(const s of xx)t&&i===s?this.positions[s].add(e):this.positions[s].delete(e)}createGroupButtons(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(const c of this.groupButtons[e])c.remove();if(this.groupButtons[e]=[],0===t.length)return;const{align:i,position:s}=this[e],n=this.positionAlignments[s][i];if(!n)return;const r=t=>{const i=Array.from(n.children),s="data-group",r="data-section";let o=i.find((i=>i.getAttribute(s)===e&&i.getAttribute(r)===(t??"")));if(!o){o=vg("div"),o.role="presentation",o.setAttribute(s,e),o.setAttribute(r,t??"");const a=wx[e],l=i.find((e=>{const t=e.getAttribute(s);return wx[t]>a}));null!=l?n.insertBefore(o,l):n.appendChild(o),this.destroyFns.push((()=>o.remove()))}return o.classList.add(sP,aP[this[e].size]),o};let o=t.at(0)?.section,a=r(o);for(const c of t){o!==c.section&&(this.setButtonGroupFirstLast(a),a=r(c.section)),o=c.section;const t=this.createButtonElement(e,c);a.appendChild(t),this.groupButtons[e].push(t)}this.setButtonGroupFirstLast(a);let l,h;Mx(s)&&(l=()=>this.translateFloatingElements(s,!0),h=()=>this.translateFloatingElements(s,!1)),this.createAriaToolbar(e,n,l,h,(()=>{this.ctx.toolbarManager.cancel(e)}))}createAriaToolbar(e,t,i,s,n){const r=this.computeAriaOrientation(this[e].position),o=this.getAriaToolbar(e);o.resetListeners=()=>{const e=o.groups.map((e=>this.groupButtons[e])).flat().filter((e=>!e.classList.contains(aP.button.hiddenToggled)&&!e.classList.contains(aP.button.dragHandle)));o.destroyFns.forEach((e=>e())),o.destroyFns=jw({orientation:r,toolbar:t,buttons:e,onEscape:n,onFocus:i,onBlur:s})},o.resetListeners(),this.updateToolbarAriaLabel(e,t)}computeAriaOrientation(e){return{top:"horizontal",right:"vertical",bottom:"horizontal",left:"vertical",floating:"horizontal","floating-top":"horizontal","floating-bottom":"horizontal"}[e]}toggleGroup(e,t,i,s){if(!0===s?this.groupCallers[t].add(e):!1===s&&this.groupCallers[t].delete(e),null!=i)for(const n of this.groupButtons[t])this.setButtonActive(n,i)}processPendingEvents(){const e=(this.pendingButtonToggledEvents??[]).slice();for(const t of e)this.onButtonToggled(t);this.pendingButtonToggledEvents=[]}onLayoutStart(e){this.enabled&&(this.refreshOuterLayout(e.layoutBox),this.refreshLocale())}refreshOuterLayout(e){const{elements:t,horizontalSpacing:i,verticalSpacing:s}=this;t.top.classList.contains(aP.hidden)||e.shrink(t.top.offsetHeight+s,"top"),t.right.classList.contains(aP.hidden)||e.shrink(t.right.offsetWidth+i,"right"),t.bottom.classList.contains(aP.hidden)||(e.shrink(t.bottom.offsetHeight+s,"bottom"),t.bottom.style.top=`${e.y+e.height+s}px`),t.left.classList.contains(aP.hidden)||e.shrink(t.left.offsetWidth+i,"left")}refreshLocale(){const{hasNewLocale:e}=this;if(e){for(const e of Sx){const t=this[e].buttonConfigurations();for(const i of t)this.refreshButtonContent(e,i);this.updateToolbarAriaLabel(e)}this.hasNewLocale=!1}}refreshInnerLayout(e){const{elements:t,verticalSpacing:i}=this,{FloatingBottom:s,FloatingTop:n}=bx;t.top.style.top=e.y-t.top.offsetHeight-i+"px",t.top.style.left=`${e.x}px`,t.top.style.width=`${e.width}px`,t.bottom.style.left=`${e.x}px`,t.bottom.style.width=`${e.width}px`,t.right.style.top=`${e.y}px`,t.right.style.right="0px",t.right.style.height=`${e.height}px`,t.left.style.top=`${e.y}px`,t.left.style.left="0px",t.left.style.height=`${e.height}px`,t[n].style.top=`${e.y}px`,t[s].style.top=e.y+e.height-t[s].offsetHeight+"px"}refreshButtonContent(e,t){const i=this.buttonId(t),s=this.groupProxied.get(e)?.buttons?.find((e=>this.buttonId(e)===i))??t,n=this.groupButtons[e].find((e=>e.getAttribute("data-toolbar-id")===i));null!=n&&this.updateButton(n,s)}toggleVisibilities(){if(null==this.elements)return;const e=e=>this[e].enabled&&this.groupCallers[e].size>0,t=e=>t=>{const i=this.buttonId(t);return null==i||i===e.dataset.toolbarId};for(const i of xx){const t=this.enabled&&Array.from(this.positions[i].values()).some(e);"floating"!==i||t||(this.dragState.detached=!1),this.elements[i].classList.toggle(aP.hidden,!t)}for(const i of Sx){if(null==this[i])continue;const s=e(i);for(const e of this.groupButtons[i]){const n=s&&this[i].buttonConfigurations().some(t(e));e.classList.toggle(aP.button.hiddenValue,!n)}}}translateFloatingElements(e,t){const{elements:i,verticalSpacing:s,positionAlignments:n}=this,r=i[e],o=Object.values(n[e]);r.classList.toggle(aP.floatingHidden,!t);const a="floating-bottom"===e?1:-1;for(const l of o)l.style.transform=t&&""!==l.style.transform?"translateY(0)":`translateY(${(r.offsetHeight+s)
2*a}px)`}renderToolbar(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"top";const t=this.elements[e];t.classList.add(tP,aP[e],aP.preventFlash),Mx(e)&&t.classList.add(aP.floatingHidden);for(const i of Cx){const s=vg("div");s.role="presentation",s.classList.add(iP,aP.align[i]),t.appendChild(s),this.positionAlignments[e][i]=s}}createButtonElement(e,t){const i=vg("button");return i.classList.add(nP),i.dataset.toolbarGroup=e,NC(i,"tabindex",-1),t.haspopup&&OC(i,{"aria-haspopup":!0,"aria-expanded":!1}),i.dataset.toolbarId=this.buttonId(t),i.addEventListener("click",$w(i,(s=>this.onButtonPress(s,i,e,t.id,t.value)))),"drag"===t.value&&(i.addEventListener("mousedown",$w(i,(t=>this.onDragStart(t,i,e)))),i.classList.add(aP.button.dragHandle)),"switch"===t.role&&OC(i,{role:t.role,"aria-checked":!1}),this.updateButton(i,t),this.destroyFns.push((()=>i.remove())),i}getAriaToolbar(e){for(const t of this.ariaToolbars)if(t.groups.includes(e))return t;throw new Error(`AG Charts - cannot find aria-toolbar of '${e}'`)}updateToolbarAriaLabel(e,t){if(!t){const{align:i,position:s}=this[e];if(!(t=this.positionAlignments[s][i]))return}t.ariaLabel=this.ctx.localeManager.t({seriesType:"ariaLabelFinancialCharts",annotations:"ariaLabelFinancialCharts",annotationOptions:"ariaLabelAnnotationOptionsToolbar",ranges:"ariaLabelRangesToolbar",zoom:"ariaLabelZoomToolbar"}[e])}expandButtonConfig(e,t){return"switch"!==t.role||"true"!==e.ariaChecked||void 0===t.checkedOverrides?t:{icon:t.checkedOverrides.icon??t.icon,label:t.checkedOverrides.label??t.label,ariaLabel:t.checkedOverrides.ariaLabel??t.ariaLabel,tooltip:t.checkedOverrides.tooltip??t.tooltip}}updateButton(e,t){const{domManager:i,localeManager:s}=this.ctx,{icon:n,label:r,ariaLabel:o,tooltip:a}=this.expandButtonConfig(e,t);a&&(e.title=s.t(a));let l="";if(null!=n&&(l=`<span class="${i.getIconClassNames(n)} ${rP}"></span>`),null!=r){const e=s.t(r);l=`${l}<span class="${oP}">${e}</span>`}e.innerHTML=l,e.classList.toggle(aP.button.fillVisible,null!=t.fill),e.style.setProperty("--fill",t.fill??null);const h=null!=t.strokeWidth;e.classList.toggle(aP.button.strokeWidthVisible,h),e.style.setProperty("--strokeWidth",h?`${t.strokeWidth}px`:null);NC(e,"aria-label",o?this.ctx.localeManager.t(o):void 0)}onButtonPress(e,t,i,s,n){this.ctx.toolbarManager.pressButton(i,this.buttonId({id:s,value:n}),n,this.buttonRect(t),e)}onDragStart(e,t,i){const s=this.elements.floating;e.preventDefault(),e.stopPropagation(),this.dragState={client:qT.from(e.clientX,e.clientY),position:qT.from(Number(s.style.getPropertyValue("left").replace("px","")),Number(s.style.getPropertyValue("top").replace("px",""))),detached:!0},t.classList.toggle(aP.button.dragging,!0);const n=e=>this.onDrag(e,i),r=fg();r.addEventListener("mousemove",n),r.addEventListener("mouseup",(()=>{t.classList.toggle(aP.button.dragging,!1),r.removeEventListener("mousemove",n)}),{once:!0}),this.ctx.toolbarManager.groupMoved(i)}onDrag(e,t){const{elements:i,dragState:s}=this,n=i.floating,{offsetWidth:r,offsetHeight:o}=n,a=qT.sub(qT.from(e.clientX,e.clientY),s.client),l=qT.add(s.position,a),h=new Vg(l.x,l.y,r,o);this.positionGroup(n,t,h)}buttonId(e){const{id:t,value:i,label:s}=e;return null!=t?t:null!=i&&"object"!==typeof i?String(i):s??""}};op([EC((e=>{e.processPendingEvents(),e.toggleVisibilities()})),Ef(kf)],lP.prototype,"enabled",2);var hP=2592e6,cP={type:"root",optionsKey:"toolbar",packageType:"community",chartTypes:["cartesian"],moduleFactory:e=>new lP(e),themeTemplate:{toolbar:{enabled:!0,seriesType:{enabled:!1,position:"left",align:"start",buttons:[{tooltip:"toolbarSeriesTypeDropdown",value:"type",haspopup:!0}]},annotations:{enabled:!0,position:"left",align:"start",buttons:[{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu",section:"line-annotations",haspopup:!0},{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu",section:"text-annotations",haspopup:!0},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu",section:"shape-annotations",haspopup:!0},{icon:"measurer-drawing",tooltip:"toolbarAnnotationsMeasurerAnnotations",value:"measurer-menu",section:"measure-annotations",haspopup:!0},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear",section:"tools"}]},annotationOptions:{enabled:!0,position:"floating",align:"start",draggable:!0,buttons:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextColor",value:"text-color",haspopup:!0},{icon:"line-color",tooltip:"toolbarAnnotationsLineColor",value:"line-color",haspopup:!0},{icon:"fill-color",tooltip:"toolbarAnnotationsFillColor",value:"fill-color",haspopup:!0},{tooltip:"toolbarAnnotationsTextSize",value:"text-size",haspopup:!0},{tooltip:"toolbarAnnotationsLineStrokeWidth",value:"line-stroke-width",haspopup:!0},{icon:"line-style-solid",tooltip:"toolbarAnnotationsLineStyle",value:"line-style-type",haspopup:!0},{icon:"settings",tooltip:"toolbarAnnotationsSettings",value:"settings",haspopup:!0},{role:"switch",icon:"unlocked",tooltip:"toolbarAnnotationsLock",ariaLabel:"toolbarAnnotationsLock",checkedOverrides:{icon:"locked",tooltip:"toolbarAnnotationsUnlock"},value:"lock"},{icon:"delete",tooltip:"toolbarAnnotationsDelete",value:"delete"}]},ranges:{enabled:!1,position:dR,align:"start",buttons:[{label:"toolbarRange1Month",ariaLabel:"toolbarRange1MonthAria",value:hP},{label:"toolbarRange3Months",ariaLabel:"toolbarRange3MonthsAria",value:7776e6},{label:"toolbarRange6Months",ariaLabel:"toolbarRange6MonthsAria",value:15552e6},{label:"toolbarRangeYearToDate",ariaLabel:"toolbarRangeYearToDateAria",value:(e,t)=>
vendor: 42,019 bytes, line 2
2[new Date(`${new Date(t).getFullYear()}-01-01`).getTime(),t],id:"year-to-date"},{label:"toolbarRange1Year",ariaLabel:"toolbarRange1YearAria",value:31536e6},{label:"toolbarRangeAll",ariaLabel:"toolbarRangeAllAria",value:(e,t)=>[e,t],id:"all"}]},zoom:{enabled:!0,position:"top",align:"end",buttons:[{icon:"zoom-out",tooltip:"toolbarZoomZoomOut",value:"zoom-out"},{icon:"zoom-in",tooltip:"toolbarZoomZoomIn",value:"zoom-in"},{icon:"pan-left",tooltip:"toolbarZoomPanLeft",value:"pan-left"},{icon:"pan-right",tooltip:"toolbarZoomPanRight",value:"pan-right"},{icon:"pan-start",tooltip:"toolbarZoomPanStart",value:"pan-start"},{icon:"pan-end",tooltip:"toolbarZoomPanEnd",value:"pan-end"},{icon:"reset",tooltip:"toolbarZoomReset",value:"reset"}]}}}};function dP(){gw.register(BD,sI,DD,lI,cP,RA,ZA,tT,aT,dT,HT,ZT,nT);for(const e of[ED,JS,PD,dw,TD])Kx.register(e.type,{moduleFactory:t=>new e(t),hidden:e===dw})}function uP(){for(const e of gw.modules){if("enterprise"!==e.packageType||Zx(e)||fp.errorOnce("Unexpected enterprise module registered: "+e.identifier),"root"===e.type&&e.themeTemplate)for(const t of e.chartTypes)tM.set(t,e.themeTemplate);if("series"===e.type){if(e.chartTypes.length>1)throw new Error(`AG Charts - Module definition error: ${e.identifier}`);iM.register(e.identifier,e)}if("series-option"===e.type&&e.themeTemplate)for(const t of e.seriesTypes)iM.setThemeTemplate(t,e.themeTemplate);if("axis-option"===e.type&&e.themeTemplate)for(const t of e.axisTypes){const i=Kx.getThemeTemplate(t),s=Im(e.themeTemplate,i);Kx.setThemeTemplate(t,s)}"axis"===e.type&&Kx.register(e.identifier,e),"legend"===e.type&&qx.register(e.identifier,e)}if(gw.hasEnterpriseModules()){const e=$x.filter((e=>{let{useCount:t}=e;return null==t||0===t}));e.length>0&&fp.errorOnce("Enterprise modules expected but not registered: ",e)}}var pP=class extends OM{getChartType(){return"flow-proportion"}async updateData(){await super.updateData();const{nodes:e}=this.getOptions();this.series.forEach((t=>{(function(e){return"sankey"===e.type||"chord"===e.type})(t)&&t.setChartNodes(e)}))}performLayout(e){const{seriesRoot:t,annotationRoot:i,highlightRoot:s}=this,{layoutBox:n}=e,r=n.clone();n.shrink(this.seriesArea.padding.toJson()),this.seriesRect=n,this.animationRect=n,t.visible=this.series.some((e=>e.visible));for(const o of[t,i,s])o.translationX=Math.floor(n.x),o.translationY=Math.floor(n.y),o.setClipRect(r.clone());this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:t.visible,rect:r,paddedRect:n}})}};pP.className="FlowProportionChart",pP.type="flow-proportion";var gP=class extends YS{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}computeLabelsBBox(e,t){return null}computeRange(){}getAxisLinePoints(){}};op([Ef(Sv(["polygon","circle"],"a polar axis shape"))],gP.prototype,"shape",2),op([Ef(Hf)],gP.prototype,"innerRadiusRatio",2);var mP=class extends OM{getChartType(){return"gauge"}updateRadialGauge(e,t){const i=this.axes.find((e=>"x"===e.direction));if(!(i instanceof gP))return;i.computeRange();const s=e.x,n=s+e.width,r=e.y,o=r+e.height,[a,l]=i.range,h=Fy(l-a)>Math.PI,c=h||Ny(1.5*Math.PI,a,l),d=h||Ny(0*Math.PI,a,l),u=h||Ny(.5*Math.PI,a,l),p=h||Ny(1*Math.PI,a,l);let g,m;g=p&&!d?"right":!p&&d?"left":"center",m=c&&!u?"bottom":!c&&u?"top":"middle";const f=pT({startAngle:a,endAngle:l,innerRadius:0,outerRadius:.5}),v=2*-(f.x+f.width/2),y=2*-(f.y+f.height/2),{minimumRadius:C=0,maximumRadius:S}=t,w=Math.max(.5*Math.min(e.width/f.width,e.height/f.height),0);let b=Math.min(S??1/0,Math.max(w,C??0));for(let x=0;x<8;x+=1){const t=b<=C||7===x,a=e.x+e.width/2+v*b,l=e.y+e.height/2+y*b;i.translation.x=a,i.translation.y=l,i.gridLength=b,i.calculateLayout();const h=i.computeLabelsBBox({hideWhenNecessary:t},e);if(t)break;let c=0;if(null!=h){const e=h.x+a,t=e+h.width,i=h.y+l,d=i+h.height;c=Math.max(r-i,s-e,d-o,t-n,0)}if(!(c>0))break;b=Math.max(b-c,C)}i.translation.x=e.x+e.width/2+v*b,i.translation.y=e.y+e.height/2+y*b,t.centerX=e.width/2+v*b,t.centerY=e.height/2+y*b,t.radius=b,t.textAlign=g,t.verticalAlign=m,(0===b||b>w)&&fp.warnOnce("There was insufficient space to display the Radial Gauge.")}updateLinearGauge(e,t){const i=this.axes.find((e=>"x"===e.direction)),s=this.axes.find((e=>"y"===e.direction));if(!(i instanceof QS))return e;if(!(s instanceof QS))return e;const{horizontal:n,thickness:r}=t;let o=0,a=0;const l=new ID;l.domain=[0,100],l.range=n?i.range:s.range;const h=l.ticks();n?o=t.computeInset("x",h):a=t.computeInset("y",h);const c=e.width-Math.abs(o),d=e.height-Math.abs(a),u=Math.max(n?c:r,0),p=Math.max(n?r:d,0),g=e.x+(c-u)/2+Math.max(o,0),m=e.y+(d-p)/2-Math.min(a,0);i.range=[0,u],i.gridLength=u,i.calculateLayout(),i.translation.x=g,i.translation.y=m+("bottom"===i.position?r:0),s.range=[0,p],s.gridLength=p,s.calculateLayout(),s.translation.x=g+("right"===s.position?r:0),s.translation.y=m,t.originX=g-e.x,t.originY=m-e.y,0!==u&&0!==p||fp.warnOnce("There was insufficient space to display the Linear Gauge.")}performLayout(e){const{seriesRoot:t,annotationRoot:i,highlightRoot:s,series:n,seriesArea:r}=this,{layoutBox:o}=e,a=o.clone();o.shrink(r.padding.toJson());const l=this.series[0];!function(e){return"radial-gauge"===e.type}(l)?function(e){return"linear-gauge"===e.type}(l)&&this.updateLinearGauge(o,l):this.updateRadialGauge(o,l),this.axes.forEach((e=>e.update())),this.seriesRect=a.clone().translate(a.x-o.x,a.y-o.y),this.animationRect=o,t.visible=n.some((e=>e.visible));for(const h of[t,i,s])h.translationX=Math.floor(o.x),h.translationY=Math.floor(o.y);this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:t.visible,rect:a,paddedRect:o}})}getAriaLabel(){const e=[],t=this.getCaptionText();0!==t.length&&e.push(t);for(const s of this.series)e.push(s.getCaptionText());const i=e.join(". ");return this.ctx.localeManager.t("ariaAnnounceGaugeChart",{caption:i})}};mP.className="GaugeChart",mP.type="gauge";var fP=class extends OM{constructor(e,t){super(e,t)}getChartType(){return"hierarchy"}performLayout(e){const{seriesRoot:t,annotationRoot:i,highlightRoot:s}=this,{layoutBox:n}=e,r=n.clone();n.shrink(this.seriesArea.padding.toJson()),this.seriesRect=n,this.animationRect=n;for(const o of[t,i,s])o.translationX=Math.floor(n.x),o.translationY=Math.floor(n.y);t.visible=this.series[0].visible,t.setClipRect(n.clone()),this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:r,paddedRect:n}})}getAriaLabel(){const e=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:e})}};fP.className="HierarchyChart",fP.type="hierarchy";var vP=class extends OM{constructor(e,t){super(e,t),this.padding=new yw(40),this.ctx.axisManager.axisGroup.zIndex=6}getChartType(){return"polar"}async performLayout(e){const{layoutBox:t}=e,i=t.clone();t.shrink(this.seriesArea.padding.toJson()),this.seriesRect=t,this.animationRect=t,await this.computeCircle(t),this.axes.forEach((e=>e.update())),this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:i,paddedRect:t}})}updateAxes(e,t,i){const s=this.axes.find((e=>"x"===e.direction)),n=this.axes.find((e=>"y"===e.direction));if(!(s instanceof gP)||!(n instanceof gP))return;const r=s.scale,o=n.innerRadiusRatio;s.innerRadiusRatio=o,s.computeRange(),s.gridLength=i,n.gridAngles=r.ticks?.().map((e=>r.convert(e))),n.gridRange=s.range,n.range=[i,i*o],[s,n].forEach((i=>{i.translation.x=e,i.translation.y=t,i.calculateLayout()}))}async computeCircle(e){var t=this;const i=this.series.filter(yP),s=this.axes.filter(CP),n=(e,t,s)=>{this.updateAxes(e,t,s),i.forEach((i=>{i.centerX=e,i.centerY=t,i.radius=s}));const n=i.filter((e=>"donut"===e.type||"pie"===e.type));if(n.length>1){const e=n.map((e=>{const t=e.getInnerRadius();return{series:e,innerRadius:t}})).sort(((e,t)=>e.innerRadius-t.innerRadius));e.at(-1).series.surroundingRadius=void 0;for(let t=0;t<e.length-1;t++)e[t].series.surroundingRadius=e[t+1].innerRadius}},r=e.x+e.width/2,o=e.y+e.height/2,a=Math.max(0,Math.min(e.width,e.height)/2);let l=a;n(r,o,l);const h=async function(){let{hideWhenNecessary:h=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=[];for(const t of lg(s,i)){const i=await t.computeLabelsBBox({hideWhenNecessary:h},e);i&&c.push(i)}if(0===c.length)return void n(r,o,a);const d=Vg.merge(c),u=t.refineCircle(d,l,e);n(u.centerX,u.centerY,u.radius),l=u.radius};await h(),await h(),await h(),await h({hideWhenNecessary:!0}),await h({hideWhenNecessary:!0});for(const c of lg(s,i))await c.computeLabelsBBox({hideWhenNecessary:!0},e);return{radius:l,centerX:r,centerY:o}}refineCircle(e,t,i){const s=-t,n=-t,r=t,o=t;let a=Math.max(0,s-e.x),l=Math.max(0,n-e.y),h=Math.max(0,e.x+e.width-r),c=Math.max(0,e.y+e.height-o);a=h=Math.max(a,h),l=c=Math.max(l,c);const d=i.width-a-h,u=i.height-l-c;let p=Math.min(d,u)/2;const g=.5*i.width/2,m=.5*i.height/2,f=Math.min(g,m);if(p<f){p=f;const e=a+h;if(2*p+(l+c)>i.height){const e=i.height-2*p;2*Math.min(l,c)>e?(l=e/2,c=e/2):l>c?l=e-c:c=e-l}if(2*p+e>i.width){const e=i.width-2*p;2*Math.min(a,h)>e?(a=e/2,h=e/2):a>h?a=e-h:h=e-a}}const v=a+2*p+h,y=l+2*p+c;return{centerX:i.x+(i.width-v)/2+a+p,centerY:i.y+(i.height-y)/2+l+p,radius:p}}};function yP(e){return e instanceof OT}function CP(e){return e instanceof gP}vP.className="PolarChart",vP.type="polar";var SP=class extends OM{constructor(e,t){super(e,t)}getChartType(){return"standalone"}performLayout(e){const{seriesRoot:t,annotationRoot:i,highlightRoot:s}=this,{layoutBox:n}=e,r=n.clone();n.shrink(this.seriesArea.padding.toJson()),this.seriesRect=n,this.animationRect=n;for(const o of[t,i,s])o.translationX=Math.floor(n.x),o.translationY=Math.floor(n.y);t.visible=this.series[0].visible,this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:r,paddedRect:n}})}getAriaLabel(){const e=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:e})}};SP.className="StandaloneChart",SP.type="standalone";var wP=Math.PI/180,bP=e=>e*wP,xP=e=>-Math.log(Math.tan(.25*Math.PI+e*wP*.5)),MP=e=>e/wP,DP=e=>(Math.atan(Math.exp(-e))-.25*Math.PI)/(.5*wP),IP=class e{constructor(t,i){this.domain=t,this.range=i,this.type="mercator",this.bounds=e.bounds(t)}static bounds(e){const[[t,i],[s,n]]=e,r=bP(t),o=xP(i),a=bP(s),l=xP(n);return new Vg(Math.min(r,a),Math.min(o,l),Math.abs(a-r),Math.abs(l-o))}static fixedScale(){return new e([[MP(0),DP(0)],[MP(1),DP(1)]],[[0,0],[1,1]])}convert(e){let[t,i]=e;const[[s,n],[r,o]]=this.range,a=(r-s)/this.bounds.width,l=(o-n)/this.bounds.height;return[(bP(t)-this.bounds.x)*a+s,(xP(i)-this.bounds.y)*l+n]}invert(e){let[t,i]=e;const[[s,n],[r,o]]=this.range,a=(r-s)/this.bounds.width,l=(o-n)/this.bounds.height;return[MP((t-s)/a+this.bounds.x),DP((i-n)/l+this.bounds.y)]}};function RP(e){return"map-shape"===e.type||"map-line"===e.type||"map-marker"===e.type||"map-shape-background"===e.type||"map-line-background"===e.type}var EP=class extends OM{constructor(e,t){super(e,t),this.xAxis=new ED(this.getModuleContext()),this.xAxis.position="bottom",this.yAxis=new ED(this.getModuleContext()),this.yAxis.position="left",this.ctx.zoomManager.updateAxes([this.xAxis,this.yAxis])}getChartType(){return"topology"}async updateData(){await super.updateData();const{topology:e}=this.getOptions();this.series.forEach((t=>{RP(t)&&t.setChartTopology(e)}))}performLayout(e){const{seriesRoot:t,annotationRoot:i,highlightRoot:s}=this,{layoutBox:n}=e,r=n.clone();n.shrink(this.seriesArea.padding.toJson()),this.seriesRect=n,this.animationRect=n;const o=this.series.filter(RP),a=o.reduce(((e,t)=>{if(!t.visible)return e;const i=t.topologyBounds;return null==i?e:null==e?i:(e.merge(i),e)}),void 0);let l;if(null!=a){const{lon0:e,lat0:t,lon1:i,lat1:s}=a,r=[[e,t],[i,s]],o=IP.bounds(r),{width:h,height:c}=n,d=Math.min(h/o.width,c/o.height),u=o.width*d,p=o.height*d,g=(h-u)/2,m=(c-p)/2,f=g,v=m,y=g+u,C=m+p,S=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),w=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),b=(y-f)/(S.max-S.min),x=f-b*S.min,M=(C-v)/(1-w.min-(1-w.max)),D=v-M*(1-w.max);l=new IP(r,[[x,D],[x+b,D+M]])}o.forEach((e=>{e.scale=l}));const h=this.series.some((e=>e.visible));t.visible=h;for(const c of[t,i,s])c.translationX=Math.floor(n.x),c.translationY=Math.floor(n.y),c.setClipRect(n.clone());this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:h,rect:r,paddedRect:n}})}};EP.className="TopologyChart",EP.type="topology";var AP=Symbol("IGNORED_PROP");function TP(e,t){const i={};for(const s in t){const n=t[s];n!==AP&&Object.hasOwn(e,s)&&(i[s]=n)}return i}function PP(e,t){if(null==t)return e;const{targets:i,...s}=t;return null!=(e=Im(e,s)).targets&&null!=i&&(e.targets=Rm(e.targets,i)),e}function LP(e,t){if(pm(e))return t(e)}var FP=["ohlc","line","step-line","hlc","high-low","candlestick","hollow-candlestick"];var kP="range-area";function NP(e,t){return{fill:LP(t,(t=>t.overrides?.[e]?.series?.fill)),stroke:LP(t,(t=>t.overrides?.[e]?.series?.stroke))}}var OP={line:{enabled:!1},title:{enabled:!1},label:{enabled:!1},crosshair:{enabled:!1,strokeOpacity:.25,lineDash:[0],label:{enabled:!1}}},GP={...OP,nice:!1},BP={bottom:{crosshair:{enabled:CI}}},VP={category:BP,number:BP,log:BP,time:BP},zP={position:{type:"sparkline"}},HP={overrides:{common:{animation:{enabled:!1},padding:{top:0,right:0,bottom:0,left:0},axes:{number:{...GP,interval:{values:[0]}},log:{...GP},time:{...GP},category:{...OP,gridLine:{enabled:!1}}}},bar:{series:{sparklineMode:!0},tooltip:{range:"nearest"}},line:{seriesArea:{padding:{top:2,right:2,bottom:2,left:2}},axes:VP,series:{strokeWidth:1,marker:{enabled:!1,size:3},tooltip:zP}},area:{seriesArea:{padding:{top:1,right:0,bottom:1,left:0}},axes:VP,series:{strokeWidth:1,fillOpacity:.4,tooltip:zP}}}};function WP(e,t){return"string"===typeof e?{...t,baseTheme:e}:null!=e?{...e,baseTheme:WP(e.baseTheme,t)}:t}var jP={"price-volume":function(e,t,i){const{xKey:s,dateKey:n=s??"date",highKey:r="high",openKey:o="open",lowKey:a="low",closeKey:l="close",volumeKey:h="volume",chartType:c="candlestick",navigator:d=!1,volume:u=!0,rangeToolbar:p,rangeButtons:g=p??!0,statusBar:m=!0,annotations:f,toolbar:v=f??!0,zoom:y=!0,theme:C,data:S,...w}=e;null!=s&&fp.warnOnce("Property [xKey] is deprecated, use [dateKey] instead."),null!=p&&fp.warnOnce("Property [rangeToolbar] is deprecated, use [rangeButtons] instead."),null!=f&&fp.warnOnce("Property [annotations] is deprecated, use [toolbar] instead.");const b=function(e,t,i,s,n,r,o){t===kP&&(fp.warnOnce(`type '${t}' is deprecated, use 'hlc' chart type instead`),t="hlc");const a={xKey:i,openKey:r,closeKey:o,highKey:s,lowKey:n},l={xKey:i,yKey:o},h={pickOutsideVisibleMinorAxis:!0};switch(t??"candlestick"){case"ohlc":return[{type:"ohlc",focusPriority:0,...h,...a}];case"line":return[{type:"line",focusPriority:0,...h,...l,stroke:LP(e,(e=>e.overrides?.line?.series?.stroke))??BI,marker:LP(e,(e=>e.overrides?.line?.series?.marker))??{enabled:!1}}];case"step-line":return[{type:"line",focusPriority:0,...h,...l,stroke:LP(e,(e=>e.overrides?.line?.series?.stroke))??BI,interpolation:LP(e,(e=>e.overrides?.line?.series?.interpolation))??{type:"step"},marker:LP(e,(e=>e.overrides?.line?.series?.marker))??{enabled:!1}}];case"hlc":{const t=NP(kP,e);return[{type:kP,focusPriority:0,...h,xKey:i,yHighKey:s,yLowKey:o,fill:t.fill??OI,stroke:t.stroke??kI,fillOpacity:LP(e,(e=>e.overrides?.["range-area"]?.series?.fillOpacity))??.3,strokeWidth:LP(e,(e=>e.overrides?.["range-area"]?.series?.strokeWidth))??2},{type:kP,focusPriority:0,...h,xKey:i,yHighKey:o,yLowKey:n,fill:t.fill??GI,stroke:t.stroke??NI,fillOpacity:LP(e,(e=>e.overrides?.["range-area"]?.series?.fillOpacity))??.3,strokeWidth:LP(e,(e=>e.overrides?.["range-area"]?.series?.strokeWidth))??2},{type:"line",...h,...l,stroke:LP(e,(e=>e.overrides?.line?.series?.stroke))??_I,strokeWidth:LP(e,(e=>e.overrides?.line?.series?.strokeWidth))??2,marker:LP(e,(e=>e.overrides?.line?.series?.marker))??{enabled:!1}}]}case"high-low":{const t=NP("range-bar",e);return[{type:"range-bar",focusPriority:0,...h,xKey:i,yHighKey:s,yLowKey:n,fill:t.fill??VI,stroke:t.stroke??BI,tooltip:{range:"nearest"}}]}case"candlestick":return[{type:"candlestick",focusPriority:0,...h,...a}];case"hollow-candlestick":{const t=LP(e,(e=>e.overrides?.candlestick?.series?.item));return[{type:"candlestick",focusPriority:0,...h,...a,item:{up:{fill:t?.up?.fill??"transparent"}}}]}default:return fp.warnOnce(`unknown chart type: ${t}; expected one of: ${FP.join(", ")}`),[{type:"candlestick",focusPriority:0,...h,...a}]}}(C,c,n,r,a,o,l),x=function(e,t,i,s,n,r){if(!n)return[];const o=LP(e,(e=>e.overrides?.bar?.series?.fill)),a=o?{fill:o}:{itemStyler(e){let{datum:n}=e;const{up:r,down:o}=t().palette;return{fill:n[i]<n[s]?r?.fill:o?.fill}}};return[{type:"bar",xKey:"date",yKey:r,focusPriority:1,tooltip:{enabled:!1},highlight:{enabled:!1},fillOpacity:LP(e,(e=>e.overrides?.bar?.series?.fillOpacity))??.5,...a}]}(C,i,o,l,u,h),M={navigator:{enabled:d,...u?{miniChart:{enabled:d,series:[{type:"line",xKey:n,yKey:h,marker:{enabled:!1}}]}}:null}},D={annotations:{enabled:v,data:S,xKey:n,volumeKey:u?h:void 0}},I=m?{statusBar:{enabled:!0,data:S,highKey:r,openKey:o,lowKey:a,closeKey:l,volumeKey:u?h:void 0}}:null,R={zoom:{enabled:y,enableIndependentAxes:!0}},E={chartToolbar:{enabled:!0},toolbar:{seriesType:{enabled:v},annotationOptions:{enabled:v},annotations:{enabled:v},ranges:{enabled:g}}},A=u?[{type:"number",position:"left",keys:[h],label:{enabled:!1},crosshair:{enabled:!1},gridLine:{enabled:!1},nice:!1,layoutConstraints:{stacked:!1,width:20,unit:"percentage",align:"end"}}]:[];return{theme:{baseTheme:"string"===typeof C?C:"ag-financial",...Im("object"===typeof C?C:null,{overrides:{common:{title:{padding:4},padding:{top:6,right:8,bottom:5}}}})},animation:{enabled:!1},legend:{enabled:!1},series:[...x,...b],axes:[{type:"number",position:"right",keys:[o,l,r,a],interval:{maxSpacing:LP(C,(e=>e.overrides?.common?.axes?.number?.interval?.maxSpacing))??45},label:{format:LP(C,(e=>e.overrides?.common?.axes?.number?.label?.format))??".2f"},crosshair:{enabled:!0,snap:!1},layoutConstraints:{stacked:!1,width:100,unit:"percentage",align:"start"}},...A,{type:"ordinal-time",position:"bottom",line:{enabled:!1},label:{enabled:!0},crosshair:{enabled:!0}}],tooltip:{enabled:!1},data:S,...D,...M,...I,...R,...E,...w}},gauge:function(e,t){if(function(e){return"radial-gauge"===e.type}(e)){return function(e){const{animation:t,background:i,container:s,contextMenu:n,footnote:r,height:o,listeners:a,locale:l,minHeight:h,minWidth:c,padding:d,subtitle:u,theme:p,title:g,width:m,type:f,cursor:v,nodeClickRange:y,tooltip:C,value:S,scale:w={},startAngle:b,endAngle:x,highlightStyle:M,segmentation:D,bar:I,needle:R,targets:E,outerRadius:A,innerRadius:T,outerRadiusRatio:P,innerRadiusRatio:L,cornerRadius:F,cornerMode:k,label:N,secondaryLabel:O,spacing:G,...B}=e,{fills:V,fillMode:z,fill:H,fillOpacity:W,stroke:j,strokeWidth:U,strokeOpacity:_,lineDash:K,lineDashOffset:$,min:Y=0,max:Z=1,interval:q={},label:Q={},...X}=w,J=TP(e,{animation:t,background:i,container:s,contextMenu:n,footnote:r,height:o,listeners:a,locale:l,minHeight:h,minWidth:c,padding:d,subtitle:u,theme:p,title:g,width:m}),ee=TP(w,{fills:V,fillMode:z,fill:H,fillOpacity:W,stroke:j,strokeWidth:U,strokeOpacity:_,lineDash:K,lineDashOffset:$});return{...J,series:[TP(e,{startAngle:AP,endAngle:AP,needle:null!=R?{enabled:!0,...R}:AP,scale:ee,type:f,cursor:v,nodeClickRange:y,listeners:a,tooltip:C,value:S,highlightStyle:M,segmentation:D,bar:I,targets:E,outerRadius:A,innerRadius:T,outerRadiusRatio:P,innerRadiusRatio:L,cornerRadius:F,cornerMode:k,label:N,secondaryLabel:O,spacing:G,...B})],axes:[{type:"angle-number",min:Y,max:Z,startAngle:b,endAngle:x,interval:q??{},label:Q??{}},{type:"radius-number"}]}}(PP(e,t))}if(function(e){return"linear-gauge"===e.type}(e)){return function(e){const{animation:t,background:i,container:s,contextMenu:n,footnote:r,height:o,listeners:a,locale:l,minHeight:h,minWidth:c,padding:d,subtitle:u,theme:p,title:g,width:m,type:f,cursor:v,nodeClickRange:y,tooltip:C,value:S,scale:w={},direction:b="vertical",thickness:x,highlightStyle:M,segmentation:D,bar:I,targets:R,cornerRadius:E,cornerMode:A,label:T,...P}=e,{fills:L,fillMode:F,fill:k,fillOpacity:N,stroke:O,strokeWidth:G,strokeOpacity:B,lineDash:V,lineDashOffset:z,min:H=0,max:W=1,interval:j={},label:U={},..._}=w,K=TP(e,{animation:t,background:i,container:s,contextMenu:n,footnote:r,height:o,listeners:a,locale:l,minHeight:h,minWidth:c,padding:d,subtitle:u,theme:p,title:g,width:m}),$=TP(w,{fills:L,fillMode:F,fill:k,fillOpacity:N,stroke:O,strokeWidth:G,strokeOpacity:B,lineDash:V,lineDashOffset:z}),Y=TP(e,{scale:$,type:f,cursor:v,nodeClickRange:y,listeners:a,tooltip:C,value:S,direction:b,thickness:x,highlightStyle:M,segmentation:D,bar:I,targets:R,cornerRadius:E,cornerMode:A,label:T,...P}),{placement:Z,...q}=U;let Q,X;const J="horizontal"===b;J?(Q="before"===Z?"top":"bottom",X="left"):(Q="after"===Z?"right":"left",X="bottom");const ee={type:"number",position:Q,min:H,max:W,reverse:!J,interval:j,label:q,nice:!1},te={type:"number",position:X,min:0,max:1,label:{enabled:!1}};return{...K,series:[Y],axes:J?[ee,te]:[te,ee]}}(PP(e,t))}const{animation:i,background:s,container:n,contextMenu:r,footnote:o,height:a,listeners:l,locale:h,minHeight:c,minWidth:d,padding:u,subtitle:p,theme:g,title:m,width:f}=e;return TP(e,{animation:i,background:s,container:n,contextMenu:r,footnote:o,height:a,listeners:l,locale:h,minHeight:c,minWidth:d,padding:u,subtitle:p,theme:g,title:m,width:f})},sparkline:function(e){const{background:t,container:i,height:s,listeners:n,locale:r,minHeight:o,minWidth:a,padding:l,width:h,theme:c,data:d,xAxis:u,yAxis:p,...g}=e,m=g,f="bar"!==m.type||"horizontal"!==m.direction,v=TP(e,{background:t,container:i,height:s,listeners:n,locale:r,minHeight:o,minWidth:a,padding:l,width:h,data:d,xAxis:AP,yAxis:AP,theme:AP});return v.theme=WP(c,HP),v.series=[m],v.axes=f?[{type:"number",...p,position:"left"},{type:"category",...u,position:"bottom"}]:[{type:"category",...u,position:"left"},{type:"number",...p,position:"bottom"}],v}};function UP(e,t){let i=[];const s=mM(e),n=lM(e),r=n?Jx.get(n):"unknown";for(const{type:o,chartTypes:a,optionsKey:l,optionsInnerKey:h,identifier:c}of $x)if("unknown"===r||a.includes(r))if("root"===o||"legend"===o){const t=e[l];if(null==t)continue;h?t[h]&&(i.push(`${l}.${h}`),delete t[h]):(i.push(l),delete e[l])}else if("axis"===o){if(!("axes"in e)||!e.axes?.some((e=>e.type===c)))continue;i.push(`axis[type=${c}]`),e.axes=e.axes.filter((e=>e.type!==c))}else if("axis-option"===o){if(!("axes"in e)||!e.axes?.some((e=>e[l])))continue;i.push(`axis.${l}`),e.axes.forEach((e=>{e[l]&&delete e[l]}))}else if("series"===o){if(!e.series?.some((e=>e.type===c)))continue;i.push(`series[type=${c}]`),e.series=e.series.filter((e=>e.type!==c))}else if("series-option"===o){if(!e.series?.some((e=>e[l])))continue;i.push(`series.${l}`),e.series.forEach((e=>{e[l]&&delete e[l]}))}if(i.length&&!t){s&&(i=["AgCharts.createGauge"]);let t="ag-charts-enterprise",n="https://ag-grid.com/charts/javascript/installation/";"integrated"===e.mode&&(t="ag-grid-charts-enterprise' or 'ag-grid-enterprise/charts-enterprise",n="https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/"),fp.warnOnce([`unable to use these enterprise features as '${t}' has not been loaded:`,"",...i,"",`See: ${n}`].join("\n"))}}var _P=Symbol("description"),KP=Symbol("required");function $P(e,t,i){const{errors:s}=ZP(e,t,i);for(const{message:n}of s)fp.warn(n);return 0===s.length}function YP(e,t,i){const s=fm(i)?i:i[_P],n=s?`; expecting ${s}`:"";return`${e?`Option \`${e}\``:"Value"} cannot be set to \`${function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;switch(typeof e){case"undefined":return"undefined";case"number":if(isNaN(e))return"NaN";if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";default:return(e=JSON.stringify(e)).length>t?`${e.slice(0,t)}... (+${e.length-t} characters)`:e}}(t)}\`${n}, ignoring.`}function ZP(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!pm(e))return{valid:null,errors:[{path:i,value:e,message:YP(i,e,"an object")}]};const s=new Set(Object.keys(e)),n=[],r={};function o(e){return am(t)?`${i}[${e}]`:i?`${i}.${e}`:e}for(const[a,l]of Object.entries(t)){s.delete(a);const t=e[a];if(l[KP]||"undefined"!==typeof t)if(um(l))l(t)?r[a]=t:n.push({key:a,path:i,value:t,message:YP(o(a),t,l)});else{const e=ZP(t,l,o(a));r[a]=e.valid,n.push(...e.errors)}}for(const a of s)n.push({key:a,path:i,unknown:!0,message:`Unknown option \`${o(a)}\`, ignoring.`});return{valid:r,errors:n}}function qP(e,t){return Object.assign((t=>e(t)),{[_P]:t})}qP(am,"an array"),qP(lm,"a boolean"),qP(um,"a function"),qP(ym,"a number");var QP=qP(pm,"an object"),XP=qP(fm,"a string"),JP=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return qP((i=>ym(i)&&(i>e||t&&i===e)),`a number greater than ${t?"or equal to ":""}${e}`)},eL=(e,t)=>qP((i=>ym(i)&&i>=e&&i<=t),`a number between ${e} and ${t} inclusive`),tL=(JP(0),JP(1),eL(0,1),eL(0,360),(e,t)=>qP((t=>am(t)&&t.every(e)),t??`${e[_P]} array`));function iL(e){return e?.up||e?.down||e?.neutral?"user-full":e?.fills||e?.strokes?"user-indexed":"inbuilt"}var sL="white",nL={get cartesian(){return{seriesTypes:Jx.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:Jx.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:Jx.hierarchyTypes,commonOptions:[]}},get topology(){return{seriesTypes:Jx.topologyTypes,commonOptions:[]}},get"flow-proportion"(){return{seriesTypes:Jx.flowProportionTypes,commonOptions:[]}},get standalone(){return{seriesTypes:Jx.standaloneTypes,commonOptions:[]}},get gauge(){return{seriesTypes:Jx.gaugeTypes,commonOptions:[]}}},rL={"radial-gauge":!0,"linear-gauge":!0};function oL(e){return!0===rL[e]}var aL=Object.values(nL).reduce(((e,t)=>{let{commonOptions:i}=t;return e.concat(i)}),[]),lL=class e{static getAxisDefaults(e){return Im(e,{title:{enabled:!1,text:"Axis Title",spacing:25,fontWeight:"normal",fontSize:13,fontFamily:SI,color:wI},label:{fontSize:12,fontFamily:SI,padding:5,color:wI,avoidCollisions:!0},line:{enabled:!0,width:1,stroke:II},tick:{enabled:!1,width:1,stroke:II},gridLine:{enabled:!0,style:[{stroke:DI,lineDash:[]}]},crossLines:{enabled:!1,fill:RI,stroke:RI,fillOpacity:.1,strokeWidth:1,label:{enabled:!1,fontSize:12,fontFamily:SI,padding:5,color:wI}},crosshair:{enabled:!0}})}getChartDefaults(){return{minHeight:300,minWidth:300,background:{visible:!0,fill:EI},padding:{top:PI,right:PI,bottom:PI,left:PI},keyboard:{enabled:!0},title:{enabled:!1,text:"Title",fontWeight:"normal",fontSize:17,fontFamily:SI,color:wI,wrapping:"hyphenate",layoutStyle:LI,textAlign:FI},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontSize:13,fontFamily:SI,color:MI,wrapping:"hyphenate",layoutStyle:LI,textAlign:FI},footnote:{enabled:!1,text:"Footnote",spacing:20,fontSize:13,fontFamily:SI,color:"rgb(140, 140, 140)",wrapping:"hyphenate",layoutStyle:LI,textAlign:FI},legend:{position:"bottom",spacing:30,listeners:{},toggleSeries:!0,item:{paddingX:16,paddingY:8,marker:{size:15,padding:8},showSeriesStroke:!0,label:{color:wI,fontSize:12,fontFamily:SI}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:wI},inactiveStyle:{fill:MI},highlightStyle:{fill:wI},label:{color:wI}}},tooltip:{enabled:!0,darkTheme:vI,delay:0},overlays:{darkTheme:vI},listeners:{}}}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{overrides:t,palette:i}=yC(e),s=this.createChartConfigPerChartType(this.getDefaults()),n={};t&&this.mergeOverrides(s,n,t);const{fills:r,strokes:o,...a}=this.getDefaultColors();this.palette=Im(i,{fills:Object.values(r),strokes:Object.values(o),...a}),this.paletteType=iL(i),this.config=Object.freeze(this.templateTheme(s)),this.presets=n}mergeOverrides(e,t,i){for(const{seriesTypes:s,commonOptions:n}of Object.values(nL)){const t={...i.common};for(const e of aL)n.includes(e)||delete t[e];if(t)for(const i of s){const s=i;oL(s)||(e[s]=Im(t,e[s]))}}Jx.seriesTypes.forEach((s=>{const n=s,r=i[n];oL(n)?t[n]=r:e[n]=Im(r,e[n])}))}createChartConfigPerChartType(e){for(const[t,{seriesTypes:i}]of Object.entries(nL)){const s=tM.get(t);for(const t of i)e[t]||(e[t]=yC(s))}return e}getDefaults(){const t=(t,i)=>{const s={},n={axes:{},...qx.getThemeTemplates(),...this.getChartDefaults(),...tM.get(t)};for(const r of i){s[r]=Im(iM.getThemeTemplate(r),s[r]??yC(n));const{axes:t}=s[r];for(const i of Kx.keys())t[i]=Im(t[i],Kx.getThemeTemplate(i),e.cartesianAxisDefault[i])}return s};return Im(t("cartesian",Jx.cartesianTypes),t("polar",Jx.polarTypes),t("hierarchy",Jx.hierarchyTypes),t("topology",Jx.topologyTypes),t("flow-proportion",Jx.flowProportionTypes),t("standalone",Jx.standaloneTypes),t("gauge",Jx.gaugeTypes))}templateTheme(e){const t=yC(e),i=this.getTemplateParameters();return SC(t,(e=>{if(am(e))for(let t=0;t<e.length;t++){const s=e[t];i.has(s)&&(e[t]=i.get(s))}else for(const[t,s]of Object.entries(e))i.has(s)&&(e[t]=i.get(s))})),yC(t)}getDefaultColors(){return{fills:MT,strokes:DT,up:{fill:MT.GREEN,stroke:DT.GREEN},down:{fill:MT.RED,stroke:DT.RED},neutral:{fill:MT.GRAY,stroke:DT.GRAY},altUp:{fill:MT.BLUE,stroke:DT.BLUE},altDown:{fill:MT.ORANGE,stroke:DT.ORANGE},altNeutral:{fill:MT.GRAY,stroke:DT.GRAY}}}getTemplateParameters(){const{isEnterprise:e}=kC,t=new Map;t.set(vI,!1),t.set(CI,e),t.set(yI,!e),t.set(SI,"Verdana, sans-serif"),t.set(wI,"rgb(70, 70, 70)"),t.set(bI,"white"),t.set(MI,"rgb(140, 140, 140)"),t.set(DI,"rgb(224,234,241)"),t.set(II,"rgb(195, 195, 195)"),t.set(RI,"rgb(70, 70, 70)"),t.set(xI,sL),t.set(EI,sL),t.set(AI,"rgba(0, 0, 0, 0.5)"),t.set($I,[MT.ORANGE,MT.YELLOW,MT.GREEN]),t.set(YI,[MT.GREEN,MT.YELLOW,MT.RED]),t.set(ZI,["#5090dc","#629be0","#73a6e3","#85b1e7","#96bcea","#a8c8ee","#b9d3f1","#cbdef5"]),t.set(PI,20),t.set(LI,"block"),t.set(FI,"center"),t.set(qI,["#ffffff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"]),t.set(QI,["#ffffff","#c5cbd1","#a4b1bd","#8498a9","#648096"]),t.set(KI,sL),t.set(XI,MT.BLUE),t.set(JI,MT.BLUE),t.set(eR,MT.BLUE),t.set(tR,sL),t.set(iR,"#fafafa"),t.set(sR,"#dddddd"),t.set(nR,"#000000"),t.set(rR,"#181d1f"),t.set(oR,"#e35c5c"),t.set(aR,"#e35c5c"),t.set(lR,"#fafafa"),t.set(hR,"#dddddd"),t.set(cR,"#000000"),t.set(dR,"top"),t.set(uR,!1);const i=this.getDefaultColors();return t.set(kI,this.palette.up?.stroke??i.up.stroke),t.set(OI,this.palette.up?.fill??i.up.fill),t.set(NI,this.palette.down?.stroke??i.down.stroke),t.set(GI,this.palette.down?.fill??i.down.fill),t.set(BI,this.palette.neutral?.stroke??i.neutral.stroke),t.set(VI,this.palette.neutral?.fill??i.neutral.fill),t.set(zI,this.palette.altUp?.stroke??i.up.stroke),t.set(WI,this.palette.altUp?.fill??i.up.fill),t.set(HI,this.palette.altDown?.stroke??i.down.stroke),t.set(jI,this.palette.altDown?.fill??i.down.fill),t.set(UI,this.palette.altNeutral?.fill??i.altNeutral.fill),t.set(_I,this.palette.altNeutral?.stroke??i.altNeutral.stroke),t}};lL.cartesianAxisDefault={number:lL.getAxisDefaults({line:{enabled:!1}}),log:lL.getAxisDefaults({base:10,line:{enabled:!1},interval:{minSpacing:NaN}}),category:lL.getAxisDefaults({groupPaddingInner:.1,label:{autoRotate:!0},gridLine:{enabled:uR},crosshair:{enabled:!1}}),time:lL.getAxisDefaults({gridLine:{enabled:uR}}),"ordinal-time":lL.getAxisDefaults({groupPaddingInner:0,label:{autoRotate:!1},gridLine:{enabled:uR}}),"angle-category":lL.getAxisDefaults({gridLine:{enabled:uR}}),"angle-number":lL.getAxisDefaults({gridLine:{enabled:uR}}),"radius-category":lL.getAxisDefaults({line:{enabled:!1}}),"radius-number":lL.getAxisDefaults({line:{enabled:!1}}),"grouped-category":lL.getAxisDefaults({tick:{enabled:!0}})};var hL=lL,cL="#192232",dL={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},uL={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},pL=class extends hL{getDefaultColors(){return{fills:dL,strokes:uL,up:{fill:dL.GREEN,stroke:uL.GREEN},down:{fill:dL.RED,stroke:uL.RED},neutral:{fill:dL.GRAY,stroke:uL.GRAY},altUp:{fill:dL.BLUE,stroke:uL.BLUE},altDown:{fill:dL.ORANGE,stroke:uL.ORANGE},altNeutral:{fill:dL.GRAY,stroke:uL.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set(vI,!0),e.set(KI,cL),e.set(wI,"white"),e.set(MI,"#7D91A0"),e.set(DI,"#545A6E"),e.set(RI,"white"),e.set($I,[dL.ORANGE,dL.YELLOW,dL.GREEN]),e.set(YI,[dL.GREEN,dL.YELLOW,dL.RED]),e.set(ZI,["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"]),e.set(qI,["#192834","#253746","#324859","#3f596c","#4d6a80"]),e.set(QI,["#192834","#3b5164","#496275","#577287","#668399"]),e.set(EI,cL),e.set(xI,cL),e.set(XI,dL.BLUE),e.set(JI,"white"),e.set(eR,dL.BLUE),e.set(tR,cL),e.set(iR,"#28313e"),e.set(sR,"#4b525d"),e.set(nR,"#ffffff"),e.set(rR,"#ffffff"),e.set(lR,"#28313e"),e.set(hR,"#4b525d"),e.set(cR,"#ffffff"),e}constructor(e){super(e)}},gL={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},mL={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},fL=class extends pL{getDefaultColors(){return{fills:{...gL},strokes:{...mL},up:{fill:gL.GREEN,stroke:mL.GREEN},down:{fill:gL.RED,stroke:mL.RED},neutral:{fill:gL.BLUE,stroke:mL.BLUE},altUp:{fill:gL.GREEN,stroke:mL.GREEN},altDown:{fill:gL.RED,stroke:mL.RED},altNeutral:{fill:gL.GRAY,stroke:mL.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($I,[gL.GREEN,gL.BLUE,gL.RED]),e.set(XI,gL.BLUE),e.set(eR,gL.BLUE),e.set(DI,"#343A4E"),e.set(PI,0),e.set(LI,"overlay"),e.set(FI,"left"),e.set(dR,"bottom"),e.set(uR,!0),e}},vL={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},yL={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},CL=class extends hL{getDefaultColors(){return{fills:{...vL},strokes:{...yL},up:{fill:vL.GREEN,stroke:yL.GREEN},down:{fill:vL.RED,stroke:yL.RED},neutral:{fill:vL.BLUE,stroke:yL.BLUE},altUp:{fill:vL.GREEN,stroke:yL.GREEN},altDown:{fill:vL.RED,stroke:yL.RED},altNeutral:{fill:vL.GRAY,stroke:yL.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($I,[vL.GREEN,vL.BLUE,vL.RED]),e.set(XI,vL.BLUE),e.set(eR,vL.BLUE),e.set(DI,"#F2F3F3"),e.set(PI,0),e.set(LI,"overlay"),e.set(FI,"left"),e.set(dR,"bottom"),e.set(uR,!0),e}},SL={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},wL={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},bL=class extends pL{getDefaultColors(){return{fills:SL,strokes:wL,up:{fill:SL.GREEN,stroke:wL.GREEN},down:{fill:SL.RED,stroke:wL.RED},neutral:{fill:SL.GRAY,stroke:wL.GRAY},altUp:{fill:SL.BLUE,stroke:wL.BLUE},altDown:{fill:SL.RED,stroke:wL.RED},altNeutral:{fill:SL.GRAY,stroke:wL.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($I,[SL.ORANGE,SL.YELLOW,SL.GREEN]),e.set(ZI,["#2196f3","#208FEC","#1E88E5","#1C7FDC","#1976d2","#176EC9","#1565c0"]),e.set(YI,[SL.GREEN,SL.YELLOW,SL.RED]),e.set(XI,SL.BLUE),e.set(eR,SL.BLUE),e}},xL={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},ML={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},DL=class extends hL{getDefaultColors(){return{fills:xL,strokes:ML,up:{fill:xL.GREEN,stroke:ML.GREEN},down:{fill:xL.RED,stroke:ML.RED},neutral:{fill:xL.GRAY,stroke:ML.GRAY},altUp:{fill:xL.BLUE,stroke:ML.BLUE},altDown:{fill:xL.RED,stroke:ML.RED},altNeutral:{fill:xL.GRAY,stroke:ML.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($I,[xL.ORANGE,xL.YELLOW,xL.GREEN]),e.set(ZI,["#2196f3","#329EF4","#42a5f5","#53ADF6","#64b5f6","#7AC0F8","#90caf9"]),e.set(YI,[xL.GREEN,xL.YELLOW,xL.RED]),e.set(XI,xL.BLUE),e.set(eR,xL.BLUE),e}},IL={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},RL={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff",GRAY:"#eeeeee"},EL=class extends pL{getDefaultColors(){return{fills:IL,strokes:RL,up:{fill:IL.GREEN,stroke:RL.GREEN},down:{fill:IL.RED,stroke:RL.RED},neutral:{fill:IL.GRAY,stroke:RL.GRAY},altUp:{fill:IL.BLUE,stroke:RL.BLUE},altDown:{fill:IL.RED,stroke:RL.RED},altNeutral:{fill:IL.GRAY,stroke:RL.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($I,[IL.BLUE,IL.RED]),e.set(ZI,[IL.BLUE,IL.PURPLE,IL.MAGENTA,IL.PINK,IL.RED,IL.ORANGE,IL.YELLOW,IL.GREEN]),e.set(YI,[IL.BLUE,IL.RED]),e.set(XI,IL.BLUE),e.set(eR,IL.BLUE),e}},AL={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},TL={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb",GRAY:"#888888"},PL=class extends hL{getDefaultColors(){return{fills:AL,strokes:TL,up:{fill:AL.GREEN,stroke:TL.GREEN},down:{fill:AL.RED,stroke:TL.RED},neutral:{fill:AL.GRAY,stroke:TL.GRAY},altUp:{fill:AL.BLUE,stroke:TL.BLUE},altDown:{fill:AL.RED,stroke:TL.RED},altNeutral:{fill:AL.GRAY,stroke:TL.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($I,[AL.BLUE,AL.RED]),e.set(ZI,[AL.BLUE,AL.PURPLE,AL.MAGENTA,AL.PINK,AL.RED,AL.ORANGE,AL.YELLOW,AL.GREEN]),e.set(YI,[AL.BLUE,AL.RED]),e.set(XI,AL.BLUE),e.set(eR,AL.BLUE),e}},LL={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},FL={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},kL=class extends pL{getDefaultColors(){return{fills:{...LL,RED:LL.ORANGE},strokes:{...FL,RED:FL.ORANGE},up:{fill:LL.GREEN,stroke:FL.GREEN},down:{fill:LL.ORANGE,stroke:FL.ORANGE},neutral:{fill:LL.GRAY,stroke:FL.GRAY},altUp:{fill:LL.BLUE,stroke:FL.BLUE},altDown:{fill:LL.ORANGE,stroke:FL.ORANGE},altNeutral:{fill:LL.GRAY,stroke:FL.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($I,[LL.ORANGE,LL.YELLOW,LL.GREEN]),e.set(YI,[LL.GREEN,LL.YELLOW,LL.ORANGE]),e.set(XI,LL.BLUE),e.set(eR,LL.BLUE),e}},NL={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},OL={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},GL=class extends hL{getDefaultColors(){return{fills:{...NL,RED:NL.ORANGE},strokes:{...OL,RED:OL.ORANGE},up:{fill:NL.GREEN,stroke:OL.GREEN},down:{fill:NL.ORANGE,stroke:OL.ORANGE},neutral:{fill:OL.GRAY,stroke:OL.GRAY},altUp:{fill:NL.BLUE,stroke:OL.BLUE},altDown:{fill:NL.ORANGE,stroke:OL.ORANGE},altNeutral:{fill:NL.GRAY,stroke:OL.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($I,[NL.ORANGE,NL.YELLOW,NL.GREEN]),e.set(YI,[NL.GREEN,NL.YELLOW,NL.ORANGE]),e.set(XI,NL.BLUE),e.set(eR,NL.BLUE),e}},BL={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},VL={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#fff653",YELLOW:"#c18aff",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},zL=class extends pL{getDefaultColors(){return{fills:BL,strokes:VL,up:{fill:BL.GREEN,stroke:VL.GREEN},down:{fill:BL.RED,stroke:VL.RED},neutral:{fill:BL.GRAY,stroke:VL.GRAY},altUp:{fill:BL.BLUE,stroke:VL.BLUE},altDown:{fill:BL.ORANGE,stroke:VL.ORANGE},altNeutral:{fill:BL.GRAY,stroke:VL.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($I,[BL.ORANGE,BL.YELLOW,BL.GREEN]),e.set(ZI,["#0083ff","#0076e6","#0069cc","#005cb3","#004f99","#004280","#003466","#00274c"]),e.set(YI,[BL.GREEN,BL.YELLOW,BL.RED]),e.set(XI,BL.BLUE),e.set(eR,BL.BLUE),e}},HL={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},WL={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},jL=class extends hL{getDefaultColors(){return{fills:HL,strokes:WL,up:{fill:HL.GREEN,stroke:WL.GREEN},down:{fill:HL.RED,stroke:WL.RED},neutral:{fill:HL.GRAY,stroke:WL.GRAY},altUp:{fill:HL.BLUE,stroke:WL.BLUE},altDown:{fill:HL.ORANGE,stroke:WL.ORANGE},altNeutral:{fill:HL.GRAY,stroke:WL.GRAY}}}getTemplateParameters(){const e=super.getTemplateParameters();return e.set($I,[HL.ORANGE,HL.YELLOW,HL.GREEN]),e.set(ZI,["#0083ff","#1a8fff","#339cff","#4da8ff","#66b5ff","#80c1ff","#99cdff","#b3daff"]),e.set(YI,[HL.GREEN,HL.YELLOW,HL.RED]),e.set(XI,HL.BLUE),e.set(eR,HL.BLUE),e}},UL=()=>new hL,_L={"ag-default-dark":()=>new pL,"ag-sheets-dark":()=>new kL,"ag-polychroma-dark":()=>new EL,"ag-vivid-dark":()=>new zL,"ag-material-dark":()=>new bL,"ag-financial-dark":()=>new fL,null:UL,undefined:UL,"ag-default":UL,"ag-sheets":()=>new GL,"ag-polychroma":()=>new PL,"ag-vivid":()=>new jL,"ag-material":()=>new DL,"ag-financial":()=>new CL};function KL(e){if(e instanceof hL)return e;if(null==e||"string"===typeof e){const t=_L[e];return t?t():(fp.warnOnce(`the theme [${e}
2] is invalid, using [ag-default] instead.`),UL())}if($P(e,$L,"theme")){const t=function(e){let t,i=e;const s=[];for(;"object"===typeof i;)t??(t=i.palette),i.overrides&&s.push(i.overrides),i=i.baseTheme;return{baseTheme:i,overrides:Im(...s),palette:t}}(e);return new((t.baseTheme?KL(t.baseTheme):UL()).constructor)(t)}return UL()}var $L={baseTheme:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return qP((e=>t.some((t=>t(e)))),t.map((e=>e[_P])).filter(Boolean).join(" or "))}(XP,QP),overrides:QP,palette:{fills:tL(XP),strokes:tL(XP),up:{fill:XP,stroke:XP},down:{fill:XP,stroke:XP},neutral:{fill:XP,stroke:XP}}},YL=new Set(["map-shape-background","map-line-background"]),ZL=class{constructor(e,t,i,s){var n;this.debug=Ay.create(!0,"opts"),this.optionMetadata=s??{},this.processedOverrides=t??{};const r={shallow:["data"]};this.userOptions=yC(e,r);let o=yC(e,r);const{presetType:a}=this.optionMetadata;if(null!=a){const e=jP[a],t=o,i=o.type,s=null!=i?KL(o.theme).presets[i]:void 0;this.debug(">>> AgCharts.createOrUpdate() - applying preset",t),o=e?.(t,s,(()=>this.activeTheme))??o}kC.isEnterprise||UP(o),this.activeTheme=KL(o.theme),a&&(o=this.activeTheme.templateTheme(o)),this.sanityCheckAndCleanup(o),this.defaultAxes=this.getDefaultAxes(o),this.specialOverrides=this.specialOverridesDefaults({...i});const l=this.optionsType(o),{axes:h={},annotations:{axesButtons:c=null,...d}={},series:u,...p}=this.getSeriesThemeConfig(l);this.processedOptions=yC(Im(t,o,null!=c?{annotations:{axesButtons:c}}:{},p,this.defaultAxes),r),this.processAxesOptions(this.processedOptions,h),this.processSeriesOptions(this.processedOptions),this.processMiniChartSeriesOptions(this.processedOptions),this.annotationThemes=d,(hM(this.processedOptions)||function(e){const t=lM(e);return cM(e)&&"pie"!==t&&"donut"!==t}(this.processedOptions))&&null==this.processedOptions.legend?.enabled&&((n=this.processedOptions).legend??(n.legend={}),this.processedOptions.legend.enabled=this.processedOptions.series.length>1),this.enableConfiguredOptions(this.processedOptions,o),kC.isEnterprise||UP(this.processedOptions,!0)}getOptions(){return this.processedOptions??{}}diffOptions(e){return vC(e,this.processedOptions)}getSeriesThemeConfig(e){const t=yC(this.activeTheme?.config[e]??{});return this.removeLeftoverSymbols(t),t}getDefaultAxes(e){const t=this.optionsType(e),i=e.series?.find((e=>(e.type??"line")===t))??{};return iM.cloneDefaultAxes(t,i)}optionsType(e){return e.series?.[0]?.type??"line"}sanityCheckAndCleanup(e){this.deprecationWarnings(e),this.axesTypeIntegrity(e),this.seriesTypeIntegrity(e),this.soloSeriesIntegrity(e),this.removeDisabledOptions(e),this.removeLeftoverSymbols(e),e.series?.some((e=>"bullet"===e.type))&&null!=e.sync&&!1!==e.sync.enabled&&(fp.warnOnce("bullet series cannot be synced, disabling synchronization."),delete e.sync)}processAxesOptions(e,t){"axes"in e&&(e.axes=e.axes.map((e=>{const{crossLines:i,...s}=Im(t[e.type]?.[e.position],t[e.type]);e.crossLines&&(e.crossLines=Rm(e.crossLines,i));const n=s.gridLine?.style;e.gridLine?.style&&n?.length&&(e.gridLine.style=e.gridLine.style.map(((e,t)=>null!=e.stroke||null!=e.lineDash?Im(e,n.at(t%n.length)):e)));const{top:r,right:o,bottom:a,left:l,...h}=Im(e,s);return h})))}processSeriesOptions(e){const t=this.getTooltipPositionDefaults(e),i=pm(e.theme)?iL(e.theme?.palette):"inbuilt",s={colourIndex:0,userPalette:i},n=e.series?.map((n=>{n.type??(n.type=this.getDefaultSeriesType(e));const{innerLabels:r,...o}=this.getSeriesThemeConfig(n.type).series??{},a=YL.has(n.type)?{colourIndex:0,userPalette:i}:s,l=this.getSeriesPalette(n.type,a),h=this.getTooltipRangeDefaults(e,n.type),c=Im(this.getSeriesGroupingOptions(n),n,t,h,o,l,{visible:!0});return c.innerLabels&&(c.innerLabels=Rm(c.innerLabels,r)),this.activeTheme.templateTheme(c)}));e.series=this.setSeriesGroupingOptions(n??[])}processMiniChartSeriesOptions(e){let t=e.navigator?.miniChart?.series;if(null==t)return;const i={colourIndex:0,userPalette:pm(e.theme)?iL(e.theme.palette):"inbuilt"};t=t.map((e=>{e.type??(e.type="line");const{innerLabels:t,...s}=this.getSeriesThemeConfig(e.type).series??{}
vendor: 41,666 bytes, line 2
2,n=Im(this.getSeriesGroupingOptions(e),e,s,this.getSeriesPalette(e.type,i));return this.activeTheme.templateTheme(n)})),e.navigator.miniChart.series=this.setSeriesGroupingOptions(t)}getSeriesPalette(e,t){const i=iM.getPaletteFactory(e),{colourIndex:s,userPalette:n}=t,{fills:r=[],strokes:o=[]}=this.activeTheme.palette;return i?.({userPalette:n,colorsCount:Math.max(r.length,o.length),themeTemplateParameters:this.activeTheme.getTemplateParameters(),palette:this.activeTheme.palette,takeColors:e=>(t.colourIndex+=e,{fills:cf(r,e,s),strokes:cf(o,e,s)})})}getSeriesGroupingOptions(e){const t=iM.isGroupable(e.type),i=iM.isStackable(e.type),s=iM.isStackedByDefault(e.type);e.grouped&&!t&&fp.warnOnce(`unsupported grouping of series type "${e.type}".`),!e.stacked&&!e.stackGroup||i||fp.warnOnce(`unsupported stacking of series type "${e.type}".`);let{grouped:n,stacked:r}=e;return r??(r=(s||null!=e.stackGroup)&&!(t&&n)),n??(n=!0),{stacked:i&&r,grouped:t&&n&&!(i&&r)}}setSeriesGroupingOptions(e){const t=this.getSeriesGrouping(e);this.debug("setSeriesGroupingOptions() - series grouping: ",t);const i={},s=t.reduce(((e,t)=>{var i;return"default"===t.groupType||(e[i=t.seriesType]??(e[i]=0),e[t.seriesType]+="stack"===t.groupType?1:t.series.length),e}),{});return t.flatMap((e=>{var t;switch(i[t=e.seriesType]??(i[t]=0),e.groupType){case"stack":{const t=i[e.seriesType]++;return e.series.map(((i,n)=>Object.assign(i,{seriesGrouping:{groupId:e.groupId,groupIndex:t,groupCount:s[e.seriesType],stackIndex:n,stackCount:e.series.length}})))}case"group":return e.series.map((t=>Object.assign(t,{seriesGrouping:{groupId:e.groupId,groupIndex:i[e.seriesType]++,groupCount:s[e.seriesType],stackIndex:0,stackCount:0}})))}return e.series})).map((e=>{let{stacked:t,grouped:i,...s}=e;return s}))}getSeriesGroupId(e){return[e.type,e.xKey,e.stacked?e.stackGroup??"stacked":"grouped"].filter(Boolean).join("-")}getSeriesGrouping(e){const t=new Map;return e.reduce(((e,i)=>{const s=i.type;if(i.stacked||i.grouped){const n=this.getSeriesGroupId(i);if(!t.has(n)){const r={groupType:i.stacked?"stack":"group",seriesType:s,series:[],groupId:n};t.set(n,r),e.push(r)}t.get(n).series.push(i)}else e.push({groupType:"default",seriesType:s,series:[i],groupId:"__default__"});return e}),[])}getDefaultSeriesType(e){if(hM(e))return"line";if(cM(e))return"pie";if(dM(e))return"treemap";if(uM(e))return"map-shape";if(pM(e))return"sankey";if(gM(e))return"pyramid";if(mM(e))return"radial-gauge";throw new Error("Invalid chart options type detected.")}getTooltipPositionDefaults(e){const t=e.tooltip?.position;if(!mm(t))return;const{type:i,xOffset:s,yOffset:n}=t,r={};return fm(i)&&wm(cp,i)&&(r.type=i),ym(s)&&(r.xOffset=s),ym(n)&&(r.yOffset=n),{tooltip:{position:r}}}getTooltipRangeDefaults(e,t){return{tooltip:{range:e.tooltip?.range??iM.getTooltipDefauls(t)?.range}}}deprecationWarnings(e){Object.entries({yKeys:"yKey",yNames:"yName"}).forEach((t=>{let[i,s]=t;e.series?.some((e=>null!=e[i]))&&fp.warnOnce(`Property [series.${i}] is deprecated, please use [series.${s}] and multiple series instead.`)}))}axesTypeIntegrity(e){if("axes"in e){const i=e.axes??[];for(const{type:s}of i)if(null==(t=s)||!Kx.has(t)){delete e.axes;const t=Kx.publicKeys().join(", ");fp.warnOnce(`unknown axis type: ${s}; expected one of: ${t}`)}}var t}seriesTypeIntegrity(e){e.series=e.series?.filter((e=>{let{type:t}=e;if(null==t||null!=(i=t)&&Jx.has(i)||function(e){return $x.some((t=>"series"===t.type&&t.identifier===e))}(t))return!0;var i;fp.warnOnce(`unknown series type: ${t}; expected one of: ${eM.seriesTypes.join(", ")}`)}))}soloSeriesIntegrity(e){const t=e.series;if(t&&t.length>1&&t.some((e=>iM.isSolo(e.type)))){const i=this.optionsType(e);if(iM.isSolo(i))fp.warn(`series[0] of type '${i}' is incompatible with other series types. Only processing series[0]`),e.series=t.slice(0,1);else{const{solo:i,nonSolo:s}=hf(t,(e=>iM.isSolo(e.type)?"solo":"nonSolo")),n=lf(i.map((e=>e.type))).join(", ");fp.warn(`Unable to mix these series types with the lead series type: ${n}`),e.series=s}}}enableConfiguredOptions(e,t){SC(t,((e,t)=>{t&&"enabled"in t&&!t._enabledFromTheme&&null==e.enabled&&(t.enabled=!0)}),{skip:["data","theme"]},e),SC(e,(e=>{null!=e._enabledFromTheme&&delete e._enabledFromTheme}),{skip:["data","theme"]})}removeDisabledOptions(e){SC(e,(e=>{"enabled"in e&&!1===e.enabled&&Object.keys(e).forEach((t=>{"enabled"!==t&&delete e[t]}))}),{skip:["data","theme"]})}removeLeftoverSymbols(e){SC(e,(e=>{if(e&&pm(e))for(const[t,i]of Object.entries(e))bm(i)&&delete e[t]}),{skip:["data"]})}specialOverridesDefaults(e){if(null!=e.window?wg(e.window):"undefined"!==typeof window?e.window=window:"undefined"!==typeof global&&(e.window=global.window),null!=e.document?Sg(e.document):"undefined"!==typeof document?e.document=document:"undefined"!==typeof global&&(e.document=global.document),null==e.window)throw new Error("AG Charts - unable to resolve global window");if(null==e.document)throw new Error("AG Charts - unable to resolve global document");return e}},qL=Ay.create(!0,"opts");function QL(e){if(hM(e))return"cartesian";if(cM(e))return"polar";if(dM(e))return"hierarchy";if(uM(e))return"topology";if(pM(e))return"flow-proportion";if(gM(e))return"standalone";if(mM(e))return"gauge";throw new Error(`AG Chart - unknown type of chart for options with type: ${e.type}`)}var XL=class{static licenseCheck(e){this.licenseChecked||(this.licenseManager=kC.licenseManager?.(e),this.licenseManager?.setLicenseKey(this.licenseKey,this.gridContext),this.licenseManager?.validateLicense(),this.licenseChecked=!0)}static setLicenseKey(e){this.licenseKey=e}static setGridContext(e){this.gridContext=e}static getLicenseDetails(e){return kC.licenseManager?.({}).getLicenseDetails(e)}static getInstance(e){return eF.getInstance(e)}static create(e,t){this.licenseCheck(e);const i=eF.createOrUpdate({userOptions:e,licenseManager:this.licenseManager,styles:null!=kC.styles?[["ag-charts-enterprise",kC.styles]]:[],optionsMetadata:t});return this.licenseManager?.isDisplayWatermark()&&this.licenseManager&&kC.injectWatermark?.(i.chart.ctx.domManager,this.licenseManager.getWatermarkMessage()),i}static createFinancialChart(e){return this.create(e,{presetType:"price-volume"})}static createGauge(e){return this.create(e,{presetType:"gauge"})}static __createSparkline(e){return this.create(e,{presetType:"sparkline"})}};XL.licenseChecked=!1,XL.gridContext=!1;var JL=class e{static getInstance(e){const t=OM.getInstance(e);return t?xD.chartInstances.get(t):void 0}static initialiseModules(){e.initialised||(dP(),uP(),e.initialised=!0)}static createOrUpdate(t){let{proxy:i}=t;const{userOptions:s,licenseManager:n,styles:r,processedOverrides:o=i?.chart.chartOptions.processedOverrides??{},specialOverrides:a=i?.chart.chartOptions.specialOverrides??{},optionsMetadata:l=i?.chart.chartOptions.optionMetadata??{}}=t,{presetType:h}=l;e.initialiseModules(),qL(">>> AgCharts.createOrUpdate() user options",s);let c=s;XL.optionsMutationFn&&(c=XL.optionsMutationFn(c,h),qL(">>> AgCharts.createOrUpdate() MUTATED user options",c));const{overrideDevicePixelRatio:d,document:u,window:p,styleContainer:g,...m}=c,f=new ZL(m,o,{...a,document:u,window:p,overrideDevicePixelRatio:d,styleContainer:g},l);let v=i?.chart;return null!=v&&QL(f.processedOptions)===QL(v?.chartOptions.processedOptions)||(v=e.createChartInstance(f,v),r?.forEach((e=>{let[t,i]=e;v?.ctx.domManager.addStyles(t,i)}))),null==i?i=new xD(v,e.callbackApi,n):i.chart=v,qL.check()&&"undefined"!==typeof window&&(window.agChartInstances??(window.agChartInstances={}),window.agChartInstances[v.id]=v),v.queuedUserOptions.push(s),v.requestFactoryUpdate((e=>{e.applyOptions(f);const t=e.queuedUserOptions.indexOf(s)+1;e.queuedUserOptions.splice(0,t)})),i}static updateUserDelta(t,i){SC(i=yC(i,{shallow:["data"]}),(e=>{if("object"===typeof e)for(const[t,i]of Object.entries(e))"undefined"===typeof i&&Object.assign(e,{[t]:Symbol("UNSET")})}),{skip:["data"]});const{chart:s}=t,n=s.getOptions(),r=Im(i,n);qL(">>> AgCharts.updateUserDelta() user delta",i),qL("AgCharts.updateUserDelta() - base options",n),e.createOrUpdate({userOptions:r,proxy:t})}static createChartInstance(t,i){const s=i?.destroy({keepTransferableResources:!0});return new(e.getChartByOptions(t.processedOptions))(t,s)}static getChartByOptions(e){if(hM(e))return wD;if(dM(e))return fP;if(cM(e))return vP;if(uM(e))return EP;if(pM(e))return pP;if(gM(e))return SP;if(mM(e))return mP;throw new Error("AG Charts - couldn't apply configuration, check options are correctly structured and series types are specified")}};JL.caretaker=new Fw(Tw),JL.initialised=!1,JL.callbackApi={caretaker:JL.caretaker,create:(e,t,i,s)=>JL.createOrUpdate({userOptions:e,processedOverrides:t,specialOverrides:i,optionsMetadata:s}),update:(e,t)=>JL.createOrUpdate({userOptions:e,proxy:t}),updateUserDelta:(e,t)=>JL.updateUserDelta(e,t)};var eF=JL;function tF(){return dP(),{AgCharts:XL,version:Tw}}var iF={};rp(iF,{Arc:()=>sF,ArrowDown:()=>dF,ArrowUp:()=>cF,BBox:()=>Vg,BandScale:()=>Mf,Caption:()=>$C,ChangeDetectableProperties:()=>sE,Circle:()=>_M,ConicGradient:()=>nF,ContinuousScale:()=>sf,Diamond:()=>ZM,DropShadow:()=>nE,ExtendedPath2D:()=>ub,Gradient:()=>qy,Group:()=>xy,HdpiCanvas:()=>Db,Image:()=>WD,Label:()=>XC,Layer:()=>ZC,Line:()=>tC,LinearGradient:()=>Qy,LinearScale:()=>ID,Marker:()=>UM,Node:()=>_g,OrdinalTimeScale:()=>ry,Path:()=>gb,PointerEvents:()=>jg,RadialColumnShape:()=>oF,Rect:()=>OD,RedrawType:()=>zg,Rotatable:()=>yy,RotatableGroup:()=>Dy,RotatableText:()=>hC,Scalable:()=>Cy,ScalableGroup:()=>My,Scene:()=>Gb,SceneChangeDetection:()=>Hg,ScenePathChangeDetection:()=>pb,Sector:()=>xT,SectorBox:()=>uT,Selection:()=>Ty,Shape:()=>eC,Square:()=>eD,SvgPath:()=>lF,Text:()=>lC,Tooltip:()=>KC,Transformable:()=>wy,TransformableText:()=>cC,Translatable:()=>Sy,TranslatableGroup:()=>Iy,TranslatableLayer:()=>qC,Triangle:()=>sD,calculateDerivativeExtrema:()=>cb,calculateDerivativeExtremaXY:()=>db,drawCorner:()=>LD,easing:()=>km,evaluateBezier:()=>ab,getFont:()=>pF,getMarker:()=>aD,getRadialColumnWidth:()=>aF,motion:()=>uF,sectorBox:()=>pT,solveBezier:()=>lb,splitBezier:()=>hb,toRadians:()=>Oy,toTooltipHtml:()=>UC});var sF=class extends gb{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!1,this.type=0,this.restoreOwnStyles()}get fullPie(){return Tg(Ly(this.startAngle),Ly(this.endAngle))}updatePath(){const e=this.path;e.clear(),e.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),1===this.type?e.closePath():2!==this.type||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())}computeBBox(){return new Vg(this.centerX-this.radius,this.centerY-this.radius,2*this.radius,2*this.radius)}isPointInPath(e,t){const i=this.getBBox();return 0!==this.type&&i.containsPoint(e,t)&&this.path.isPointInPath(e,t)}};sF.className="Arc",sF.defaultStyles={...eC.defaultStyles,lineWidth:1,fillStyle:null},op([pb()],sF.prototype,"centerX",2),op([pb()],sF.prototype,"centerY",2),op([pb()],sF.prototype,"radius",2),op([pb()],sF.prototype,"startAngle",2),op([pb()],sF.prototype,"endAngle",2),op([pb()],sF.prototype,"counterClockwise",2),op([pb()],sF.prototype,"type",2);var nF=class extends qy{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;super(e,t,arguments.length>3?arguments[3]:void 0),this.angle=i}createCanvasGradient(e,t){const{colorSpace:i,stops:s,angle:n}=this,r=Ly(Oy(n+90));if(!("createConicGradient"in e)){return new Qy(i,s,n).createCanvasGradient(e,t)}const o=t.x+.5*t.width,a=t.y+.5*t.height;return e.createConicGradient(r,o,a)}};function rF(e,t,i){const s=Math.sqrt(e**2+t**2),n=Math.atan2(t,e)+i;return{x:Math.cos(n)*s,y:Math.sin(n)*s}}var oF=class extends gb{constructor(){super(...arguments),this.isBeveled=!0,this.columnWidth=0,this.startAngle=0,this.endAngle=0,this.outerRadius=0,this.innerRadius=0,this.axisInnerRadius=0,this.axisOuterRadius=0,this.isRadiusAxisReversed=!1}set cornerRadius(e){}computeBBox(){const{innerRadius:e,outerRadius:t,columnWidth:i}=this,s=this.getRotation(),n=-i/2,r=i/2,o=-t,a=-e;let l=1/0,h=1/0,c=-1/0,d=-1/0;for(let u=0;u<4;u+=1){const{x:e,y:t}=rF(u%2===0?n:r,u<2?o:a,s);l=Math.min(e,l),h=Math.min(t,h),c=Math.max(e,c),d=Math.max(t,d)}return new Vg(l,h,c-l,d-h)}getRotation(){const{startAngle:e,endAngle:t}=this;return Ly(e+Vy(e,t)/2+Math.PI/2)}updatePath(){const{isBeveled:e}=this;e?this.updateBeveledPath():this.updateRectangularPath(),this.checkPathDirty()}updateRectangularPath(){const{columnWidth:e,innerRadius:t,outerRadius:i,path:s}=this,n=-e/2,r=e/2,o=-i,a=-t,l=this.getRotation(),h=[[n,a],[n,o],[r,o],[r,a]].map((e=>{let[t,i]=e;return rF(t,i,l)}));s.clear(!0),s.moveTo(h[0].x,h[0].y),s.lineTo(h[1].x,h[1].y),s.lineTo(h[2].x,h[2].y),s.lineTo(h[3].x,h[3].y),s.closePath()}updateBeveledPath(){const{columnWidth:e,path:t,outerRadius:i,innerRadius:s,axisInnerRadius:n,axisOuterRadius:r,isRadiusAxisReversed:o}=this,a=Tg(s,n),l=Math.asin(e/2/s),h=this.getRotation(),c=(e,t)=>rF(e,t,h),d=(e,t)=>Math.sqrt(e**2+t**2),u=(e,t)=>t>e?0:Math.sqrt(e**2-t**2),p=(e,t,i)=>i?e<t:e>t,g=a&&!isNaN(l)&&l<Math.PI/6;let m=-e/2,f=e/2;const v=-i,y=-s*(g?Math.cos(l):1),C=p(r,d(s,e/2),!o);if(C){const e=u(r,s);m=-e,f=e}t.clear(!0);const S=c(m,y);t.moveTo(S.x,S.y);const w=Tg(s,i),b=p(r,d(i,e/2),!o);if(w&&g)t.arc(0,0,s,Ly(-l-Math.PI/2)+h,Ly(l-Math.PI/2)+h,!1);else if(b){const s=-u(r,e/2),n=u(r,i);if(!C){const e=c(m,s);t.lineTo(e.x,e.y)}if(t.arc(0,0,r,Math.atan2(s,m)+h,Math.atan2(v,-n)+h,!1),!Tg(n,0)){const e=c(n,v);t.lineTo(e.x,e.y)}t.arc(0,0,r,Math.atan2(v,n)+h,Math.atan2(s,f)+h,!1)}else{const e=c(m,v),i=c(f,v);t.lineTo(e.x,e.y),t.lineTo(i.x,i.y)}const x=c(f,y);if(t.lineTo(x.x,x.y),g)t.arc(0,0,s,Ly(l-Math.PI/2)+h,Ly(-l-Math.PI/2)+h,!0);else{const e=c(m,y);t.lineTo(e.x,e.y)}t.closePath()}};function aF(e,t,i,s,n){const r=Vy(e,t),o=r*(1-s)/2;if(e+=o,t-=o,r<.001)return 2*i*n;if(r>=2*Math.PI){const i=e+r/2;e=i-Math.PI,t=i+Math.PI}const a=i*Math.cos(e),l=i*Math.sin(e),h=i*Math.cos(t),c=i*Math.sin(t),d=Math.floor(Math.sqrt((a-h)**2+(l-c)**2)),u=2*i*n;return Math.max(1,Math.min(u,d))}oF.className="RadialColumnShape",op([pb()],oF.prototype,"isBeveled",2),op([pb()],oF.prototype,"columnWidth",2),op([pb()],oF.prototype,"startAngle",2),op([pb()],oF.prototype,"endAngle",2),op([pb()],oF.prototype,"outerRadius",2),op([pb()],oF.prototype,"innerRadius",2),op([pb()],oF.prototype,"axisInnerRadius",2),op([pb()],oF.prototype,"axisOuterRadius",2),op([pb()],oF.prototype,"isRadiusAxisReversed",2);var lF=class extends gb{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";super(),this.x=0,this.y=0,this.commands=[],this._d="",this.d=e}get d(){return this._d}set d(e){if(e!==this._d){this._d=e,this.commands.length=0;for(const[t,i,s]of e.matchAll(/([A-Z])([0-9. ]*)/g)){const e=s.split(/\s+/g).map(Number);this.commands.push([i,e])}this.checkPathDirty()}}updatePath(){const{path:e,x:t,y:i}=this;e.clear();let s=t,n=i;for(const[r,o]of this.commands)switch(r){case"M":e.moveTo(t+o[0],i+o[1]),s=t+o[0];break;case"C":e.cubicCurveTo(t+o[0],i+o[1],t+o[2],i+o[3],t+o[4],i+o[5]),s=t+o[4],n=i+o[5];break;case"H":e.lineTo(t+o[0],n),s=i+o[0];break;case"L":e.lineTo(t+o[0],i+o[1]),s=t+o[0],n=i+o[1];break;case"V":e.lineTo(s,i+o[0]),n=i+o[0];break;case"Z":e.closePath();break;default:throw new Error(`Could not translate command '${r}' with '${o.join(" ")}'`)}e.closePath()}};op([pb()],lF.prototype,"x",2),op([pb()],lF.prototype,"y",2);var hF=class e extends UM{updatePath(){const t=this.size/2;super.applyPath(t,e.moves)}};hF.className="ArrowUp",hF.moves=[{x:0,y:0,t:"move"},{x:1,y:1.2},{x:-.5,y:0},{x:0,y:.8},{x:-1,y:0},{x:0,y:-.8},{x:-.5,y:0}];var cF=hF,dF=class extends UM{updatePath(){const e=this.size/2;super.applyPath(e,cF.moves.map((e=>({x:-1*e.x,y:-1*e.y}))))}};dF.className="ArrowDown";var uF={...sg,...Av},pF=rC.toFontString,gF={};rp(gF,{CARTESIAN_AXIS_TYPE:()=>gI,CARTESIAN_POSITION:()=>pI,ChartTheme:()=>hL,DEFAULT_ANNOTATION_BACKGROUND_FILL:()=>eR,DEFAULT_ANNOTATION_COLOR:()=>XI,DEFAULT_ANNOTATION_HANDLE_FILL:()=>tR,DEFAULT_ANNOTATION_STATISTICS_COLOR:()=>nR,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:()=>rR,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:()=>oR,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:()=>aR,DEFAULT_ANNOTATION_STATISTICS_FILL:()=>iR,DEFAULT_ANNOTATION_STATISTICS_STROKE:()=>sR,DEFAULT_AXIS_GRID_COLOUR:()=>DI,DEFAULT_AXIS_LINE_COLOUR:()=>II,DEFAULT_BACKGROUND_COLOUR:()=>EI,DEFAULT_CAPTION_ALIGNMENT:()=>FI,DEFAULT_CAPTION_LAYOUT_STYLE:()=>LI,DEFAULT_COLOURS:()=>TI,DEFAULT_CROSS_LINES_COLOUR:()=>RI,DEFAULT_DIVERGING_SERIES_COLOR_RANGE:()=>$I,DEFAULT_FONT_FAMILY:()=>SI,DEFAULT_FUNNEL_SERIES_COLOR_RANGE:()=>ZI,DEFAULT_GAUGE_SERIES_COLOR_RANGE:()=>YI,DEFAULT_GRIDLINE_ENABLED:()=>uR,DEFAULT_HIERARCHY_FILLS:()=>qI,DEFAULT_HIERARCHY_STROKES:()=>QI,DEFAULT_INSIDE_SERIES_LABEL_COLOUR:()=>xI,DEFAULT_INVERTED_LABEL_COLOUR:()=>bI,DEFAULT_LABEL_COLOUR:()=>wI,DEFAULT_MUTED_LABEL_COLOUR:()=>MI,DEFAULT_PADDING:()=>PI,DEFAULT_POLAR_SERIES_STROKE:()=>KI,DEFAULT_SHADOW_COLOUR:()=>AI,DEFAULT_TEXTBOX_COLOR:()=>cR,DEFAULT_TEXTBOX_FILL:()=>lR,DEFAULT_TEXTBOX_STROKE:()=>hR,DEFAULT_TEXT_ANNOTATION_COLOR:()=>JI,DEFAULT_TOOLBAR_POSITION:()=>dR,FONT_SIZE:()=>dI,FONT_WEIGHT:()=>uI,IS_COMMUNITY:()=>yI,IS_DARK_THEME:()=>vI,IS_ENTERPRISE:()=>CI,PALETTE_ALT_DOWN_FILL:()=>jI,PALETTE_ALT_DOWN_STROKE:()=>HI,PALETTE_ALT_NEUTRAL_FILL:()=>UI,PALETTE_ALT_NEUTRAL_STROKE:()=>_I,PALETTE_ALT_UP_FILL:()=>WI,PALETTE_ALT_UP_STROKE:()=>zI,PALETTE_DOWN_FILL:()=>GI,PALETTE_DOWN_STROKE:()=>NI,PALETTE_NEUTRAL_FILL:()=>VI,PALETTE_NEUTRAL_STROKE:()=>BI,PALETTE_UP_FILL:()=>OI,PALETTE_UP_STROKE:()=>kI,POLAR_AXIS_SHAPE:()=>fI,POLAR_AXIS_TYPE:()=>mI,getChartTheme:()=>KL,markerPaletteFactory:()=>cI,singleSeriesPaletteFactory:()=>hI,swapAxisCondition:()=>EA,themes:()=>mF});var mF=Em(_L,(e=>e?.())),fF={};rp(fF,{BandScale:()=>Mf,ColorScale:()=>Zy,ContinuousScale:()=>sf,Invalidating:()=>ef,LinearScale:()=>ID,OrdinalTimeScale:()=>ry,TimeScale:()=>iy});var vF={};rp(vF,{Color:()=>qg,Debug:()=>Ay,Logger:()=>fp,Padding:()=>yw,TimeInterval:()=>vp,angleBetween:()=>Vy,angleDiff:()=>By,arcDistanceSquared:()=>_y,areArrayNumbersEqual:()=>mC,checkDatum:()=>aS,clamp:()=>Ig,clampArray:()=>Rg,clockwiseAngle:()=>Hy,clockwiseAngles:()=>Wy,countFractionDigits:()=>Ng,createId:()=>og,day:()=>Gp,deepClone:()=>yC,displacePointFromVector:()=>zy,extent:()=>nf,findMinMax:()=>Eg,findRangeExtent:()=>Ag,formatNormalizedPercentage:()=>Og,formatPercentage:()=>Gg,friday:()=>_p,generateUUID:()=>ag,getAttribute:()=>GC,hour:()=>Np,interpolateColor:()=>Xg,interpolateNumber:()=>Qg,isBetweenAngles:()=>Ny,isContinuous:()=>oS,isDate:()=>cm,isDenseInterval:()=>Jv,isEqual:()=>Tg,isNegative:()=>Pg,isNumber:()=>ym,isNumberEqual:()=>Tg,isNumberObject:()=>rS,isString:()=>fm,isStringObject:()=>nS,jsonApply:()=>wC,jsonDiff:()=>vC,jsonWalk:()=>SC,lineDistanceSquared:()=>Uy,millisecond:()=>Cp,minute:()=>Lp,mod:()=>kg,monday:()=>Hp,month:()=>Yp,normalisedExtentWithMetadata:()=>rf,normalizeAngle180:()=>ky,normalizeAngle360:()=>Ly,normalizeAngle360Inclusive:()=>Fy,range:()=>Xv,resetIds:()=>rg,round:()=>Lg,sanitizeHtml:()=>fR,saturday:()=>Kp,second:()=>Ap,setAttribute:()=>NC,setAttributes:()=>OC,setElementStyle:()=>BC,shallowClone:()=>CC,sunday:()=>zp,thursday:()=>Up,tickFormat:()=>Qv,tickStep:()=>Zv,ticks:()=>$v,toDegrees:()=>Gy,toFixed:()=>Fg,toRadians:()=>Oy,transformIntegratedCategoryValue:()=>lS,tuesday:()=>Wp,utcDay:()=>eg,utcHour:()=>Jp,utcMinute:()=>Xp,utcMonth:()=>tg,utcYear:()=>ig,wednesday:()=>jp,year:()=>qp});var yF={};function CF(){return(e,t)=>{const i=[`Property [${e}] is deprecated.`,t].filter(Boolean).join(" ");fp.warnOnce(i)}}function SF(e,t){const i=CF(),s=t?.default;return im(((t,n,r)=>(r!==s&&i(n.toString(),e),r)))}function wF(e,t){const i=CF();return im(((s,n,r)=>(r!==s[e]&&(i(n.toString(),`Use [${e}] instead.`),Lm(s,e,t?t(r):r)),Jg)),((t,s)=>(i(s.toString(),`Use [${e}] instead.`),Tm(t,e))))}function bF(e,t,i){if(e>t)return;let s;for(;t>=e;){const n=Math.floor((t+e)/2),r=i(n);null==r?t=n-1:(s=r,e=n+1)}return s}rp(yF,{AND:()=>Tf,ARRAY:()=>Uf,ARRAY_OF:()=>_f,AbstractBarSeries:()=>LA,AbstractBarSeriesProperties:()=>PA,ActionOnSet:()=>RC,Animation:()=>Zm,AnimationManager:()=>tx,Axis:()=>YS,AxisInterval:()=>FS,AxisLabel:()=>kS,AxisTick:()=>OS,AxisTicks:()=>TF,BOOLEAN:()=>kf,BOOLEAN_ARRAY:()=>ev,Background:()=>GD,BackgroundModule:()=>BD,BaseModuleInstance:()=>uw,BaseProperties:()=>Df,COLOR_STRING:()=>Xf,COLOR_STRING_ARRAY:()=>Jf,CachedTextMeasurer:()=>nC,CachedTextMeasurerPool:()=>sC,CartesianAxis:()=>QS,CartesianSeries:()=>CD,CartesianSeriesNodeEvent:()=>vD,CartesianSeriesProperties:()=>yD,CategoryAxis:()=>JS,ChartAxisDirection:()=>Rv,ChartEventManager:()=>ix,ChartOptions:()=>ZL,ChartUpdateType:()=>Tx,ContextMenuRegistry:()=>sx,Cursor:()=>rx,CursorManager:()=>ox,DATE:()=>Zf,DATE_ARRAY:()=>sv,DATE_OR_DATETIME_MS:()=>qf,DEFAULT_CARTESIAN_DIRECTION_KEYS:()=>mD,DEFAULT_CARTESIAN_DIRECTION_NAMES:()=>fD,DEFAULT_TOOLTIP_CLASS:()=>zC,DEFAULT_TOOLTIP_DARK_CLASS:()=>HC,DEGREE:()=>Wf,DIRECTION:()=>fv,DOMManager:()=>tb,DRAG_INTERACTION_TYPES:()=>_b,DataController:()=>_x,DataModel:()=>jx,DataModelSeries:()=>lD,DataService:()=>Hb,Default:()=>PS,Deprecated:()=>SF,DeprecatedAndRenamedTo:()=>wF,EMPTY_TOOLTIP_CONTENT:()=>WC,FONT_STYLE:()=>cv,FONT_WEIGHT:()=>dv,FUNCTION:()=>Nf,GREATER_THAN:()=>Yf,GestureDetector:()=>lx,GroupedCategoryAxis:()=>dw,HierarchyNode:()=>DF,HierarchySeries:()=>IF,HierarchySeriesProperties:()=>RF,HighlightManager:()=>hx,HighlightProperties:()=>uD,HighlightStyle:()=>pD,INTERACTION_RANGE:()=>yv,INTERPOLATION_STEP_POSITION:()=>cE,INTERPOLATION_TYPE:()=>hE,InteractionManager:()=>Jb,InteractionState:()=>Rw,InterpolationProperties:()=>dE,KeyNavManager:()=>cx,LABEL_PLACEMENT:()=>Cv,LARGEST_KEY_INTERVAL:()=>zR,LESS_THAN:()=>$f,LINE_CAP:()=>rv,LINE_DASH:()=>lv,LINE_JOIN:()=>ov,LINE_STYLE:()=>av,LayoutElement:()=>ww,LayoutManager:()=>bw,LonLatBBox:()=>EF,MARKER_SHAPE:()=>rE,MATCHING_CROSSLINE_TYPE:()=>hS,MAX_SPACING:()=>bv,MIN_SPACING:()=>wv,MercatorScale:()=>IP,ModuleRegistry:()=>pw,Motion:()=>km,NAN:()=>Vf,NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>qm,NUMBER:()=>Gf,NUMBER_ARRAY:()=>tv,NUMBER_OR_NAN:()=>jf,Navigator:()=>aI,NavigatorModule:()=>lI,NodeRegionBBoxProvider:()=>ux,OBJECT:()=>Lf,OBJECT_ARRAY:()=>nv,OR:()=>Pf,OVERFLOW_STRATEGY:()=>mv,ObserveChanges:()=>EC,PHASE_METADATA:()=>_m,PHASE_ORDER:()=>Um,PLACEMENT:()=>vv,PLAIN_OBJECT:()=>Ff,POINTER_INTERACTION_TYPES:()=>Kb,POSITION:()=>hv,POSITION_TOP_COORDINATES:()=>mS,POSITIVE_NUMBER:()=>zf,PolarAxis:()=>gP,PolarSeries:()=>OT,PropertiesArray:()=>If,ProxyOnWrite:()=>DC,ProxyProperty:()=>MC,ProxyPropertyOnWrite:()=>IC,QUICK_TRANSITION:()=>jm,RATIO:()=>Hf,REAL_NUMBER:()=>Bf,REGIONS:()=>dx,RegionManager:()=>yx,RepeatType:()=>Km,SKIP_JS_BUILTINS:()=>Pm,SMALLEST_KEY_INTERVAL:()=>VR,SORT_DOMAIN_GROUPS:()=>HR,STRING:()=>Of,STRING_ARRAY:()=>iv,Series:()=>MM,SeriesGroupingChangedEvent:()=>xM,SeriesItemHighlightStyle:()=>hD,SeriesMarker:()=>oE,SeriesNodeEvent:()=>bM,SeriesNodePickMode:()=>wM,SeriesProperties:()=>gD,SeriesTooltip:()=>lE,SimpleRegionBBoxProvider:()=>px,SimpleTextMeasurer:()=>oC,StateMachine:()=>LC,TEXT_ALIGN:()=>pv,TEXT_WRAP:()=>uv,TICK_INTERVAL:()=>LS,TOOLBAR_ALIGNMENTS:()=>Cx,TOOLBAR_GROUPS:()=>Sx,TOOLBAR_GROUP_ORDERING:()=>wx,TOOLBAR_POSITIONS:()=>xx,TextUtils:()=>rC,TextWrapper:()=>FC,ToolbarManager:()=>Dx,ToolbarPosition:()=>bx,Tooltip:()=>KC,TooltipManager:()=>Ix,TooltipPosition:()=>_C,UNION:()=>Sv,UpdateService:()=>Px,VERTICAL_ALIGN:()=>gv,Validate:()=>Ef,Vec2:()=>qT,Vec4:()=>xF,ZIndexMap:()=>sS,ZoomManager:()=>Rx,__FORCE_MODULE_DETECTION:()=>PF,accumulateGroup:()=>ZR,accumulateStack:()=>QR,accumulatedValue:()=>IR,accumulativeValueProperty:()=>NR,addHitTestersToQuadtree:()=>AA,adjustLabelPlacement:()=>KA,animationValidation:()=>KR,area:()=>DR,arraysEqual:()=>of,backfillPathPointData:()=>GE,buildFormatter:()=>Cf,buildResetPathFn:()=>KE,calculateDefaultTimeTickFormat:()=>bf,calculateLabelChartPadding:()=>gS,calculateLabelTranslation:()=>pS,calculatePlacement:()=>VC,checkCrisp:()=>GA,circularSliceArray:()=>cf,clamp:()=>Ig,clampArray:()=>Rg,collapsedStartingBarPosition:()=>VA,computeBarFocusBounds:()=>jA,computeMarkerFocusBounds:()=>LE,convertValuesToScaleByDefs:()=>IM,countFractionDigits:()=>Ng,createButton:()=>LF,createCheckbox:()=>FF,createDatumId:()=>JR,createDeprecationWarning:()=>CF,createElement:()=>vg,createElementId:()=>Dg,createElementNS:()=>yg,createIcon:()=>OF,createSelect:()=>kF,createTextArea:()=>NF,dateToNumber:()=>Sf,deconstructSelectionsOrNodes:()=>$m,deepClone:()=>yC,deepMerge:()=>Dm,defaultTimeTickFormat:()=>wf,determinePathStatus:()=>aA,diff:()=>XR,downloadUrl:()=>Cg,enterpriseModule:()=>kC,excludesType:()=>xm,extent:()=>nf,extractDecoratedProperties:()=>rm,findMaxValue:()=>bF,findMinMax:()=>Eg,findQuadtreeMatch:()=>TA,findRangeExtent:()=>Ag,fixNumericExtent:()=>Bx,focusCursorAtEnd:()=>xg,formatNormalizedPercentage:()=>Og,formatPercentage:()=>Gg,formatValue:()=>gR,fromToMotion:()=>Qm,getDocument:()=>mg,getLastFocus:()=>Zw,getMissCount:()=>Vx,getPath:()=>Tm,getPathComponents:()=>Hx,getRectConfig:()=>OA,getWindow:()=>fg,groupAccumulativeValueProperty:()=>GR,groupAverage:()=>MR,groupBy:()=>hf,groupCount:()=>xR,groupStackValueProperty:()=>BR,groupSum:()=>wR,initMenuKeyNav:()=>Kw,initRovingTabIndex:()=>Uw,initToolbarKeyNav:()=>jw,isAnimatingFloatingPosition:()=>Mx,isArray:()=>am,isBoolean:()=>lm,isButtonClickEvent:()=>Yw,isDate:()=>hm,isDecoratedObject:()=>sm,isDefined:()=>om,isEnumKey:()=>Sm,isEnumValue:()=>wm,isEqual:()=>Tg,isFiniteNumber:()=>ym,isFunction:()=>um,isHtmlElement:()=>Cm,isNegative:()=>Pg,isNumber:()=>vm,isObject:()=>pm,isObjectLike:()=>gm,isPlainObject:()=>mm,isProperties:()=>Rf,isRegExp:()=>dm,isString:()=>fm,isSymbol:()=>bm,isValidDate:()=>cm,jsonApply:()=>wC,jsonDiff:()=>vC,jsonWalk:()=>SC,keyProperty:()=>LR,labelDirectionHandling:()=>xS,listDecoratedProperties:()=>nm,makeAccessibleClickListener:()=>$w,mapValues:()=>Em,markerFadeInAnimation:()=>IE,markerPaletteFactory:()=>cI,markerScaleInAnimation:()=>RE,markerSwipeScaleInAnimation:()=>EE,mergeArrayDefaults:()=>Rm,mergeDefaults:()=>Im,midpointStartingBarPosition:()=>zA,minMax:()=>kE,mod:()=>kg,moduleRegistry:()=>gw,nearestSquared:()=>ug,nearestSquaredInContainer:()=>pg,normaliseGroupTo:()=>jR,normalisePropertyTo:()=>_R,normalisedExtentWithMetadata:()=>rf,objectEqualWith:()=>Mm,pairCategoryData:()=>oA,pairContinuousData:()=>rA,partialAssign:()=>Fm,pathFadeInAnimation:()=>UE,pathFadeOutAnimation:()=>_E,pathRangePoints:()=>eA,pathRangePointsReverse:()=>tA,pathRanges:()=>JE,pathSwipeInAnimation:()=>jE,pickByMatchingAngle:()=>NT,pickNode:()=>RM,plotPath:()=>zE,predicateWithMessage:()=>xv,prepareAreaPathAnimation:()=>DA,prepareAxisAnimationContext:()=>BS,prepareAxisAnimationFunctions:()=>HS,prepareBarAnimationFunctions:()=>HA,prepareLinePathAnimation:()=>cA,prepareLinePathAnimationFns:()=>hA,prepareLinePathPropertyAnimation:()=>lA,prepareMarkerAnimation:()=>PE,preparePieSeriesAnimationFunctions:()=>FT,range:()=>bR,rangedValueProperty:()=>kR,renderPartialPath:()=>WE,resetAxisGroupFn:()=>WS,resetAxisLabelSelectionFn:()=>US,resetAxisLineSelectionFn:()=>_S,resetAxisSelectionFn:()=>jS,resetBarSelectionsFn:()=>WA,resetIds:()=>rg,resetLabelFn:()=>iE,resetMarkerFn:()=>AE,resetMarkerPositionFn:()=>TE,resetMotion:()=>Tv,resetPieSelectionsFn:()=>kT,round:()=>Lg,scale:()=>iA,seriesLabelFadeInAnimation:()=>eE,seriesLabelFadeOutAnimation:()=>tE,setDocument:()=>Sg,setElementBBox:()=>bg,setPath:()=>Lm,setWindow:()=>wg,shallowClone:()=>CC,singleSeriesPaletteFactory:()=>hI,sortBasedOnArray:()=>df,splitPairData:()=>HE,staticFromToMotion:()=>Xm,stopPageScrolling:()=>qw,stringify:()=>Iv,sum:()=>SR,sumValues:()=>CR,toArray:()=>af,toFixed:()=>Fg,toTooltipHtml:()=>UC,trailingAccumulatedValue:()=>RR,trailingAccumulatedValueProperty:()=>OR,unique:()=>lf,updateClipPath:()=>$E,updateLabelNode:()=>UA,updateRect:()=>NA,validateCrossLineValues:()=>cS,valueProperty:()=>FR,without:()=>Am});var xF={bottomCenter:function(e){return{x:(e.x1+e.x2)/2,y:Math.max(e.y1,e.y2)}},center:function(e){return{x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2}},clone:function(e){return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},end:function(e){return{x:e.x2,y:e.y2}},from:function(e,t,i,s){if("number"===typeof e)return{x1:e,y1:t,x2:i,y2:s};if("width"in e)return{x1:e.x,y1:e.y,x2:e.x+e.width,y2:e.y+e.height};throw new Error(`Values can not be converted into a vector4: [${e}] [${t}] [${i}] [${s}]`)},height:function(e){return Math.abs(e.y2-e.y1)},round:function(e){return{x1:Math.round(e.x1),y1:Math.round(e.y1),x2:Math.round(e.x2),y2:Math.round(e.y2)}},start:function(e){return{x:e.x1,y:e.y1}},topCenter:function(e){return{x:(e.x1+e.x2)/2,y:Math.min(e.y1,e.y2)}},origin:function(){return{x1:0,y1:0,x2:0,y2:0}},width:function(e){return Math.abs(e.x2-e.x1)}};var MF=class e{constructor(e,t,i,s,n,r,o,a,l,h,c){this.series=e,this.index=t,this.datum=i,this.size=s,this.colorValue=n,this.fill=r,this.stroke=o,this.sumSize=a,this.depth=l,this.parent=h,this.children=c,this.midPoint={x:0,y:0}}contains(e){let t=e;for(;null!=t&&t.index>=this.index;){if(t===this)return!0;t=t.parent}return!1}walk(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.Walk.PreOrder;i===e.Walk.PreOrder&&t(this),this.children.forEach((e=>{e.walk(t,i)})),i===e.Walk.PostOrder&&t(this)}*[Symbol.iterator](){yield this;for(const e of this.children)yield*e}};MF.Walk={PreOrder:0,PostOrder:1};var DF=MF,IF=class extends MM{constructor(e){super({moduleCtx:e,pickModes:[1,0],contentGroupVirtual:!1}),this.rootNode=new DF(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.colorDomain=[0,0],this.maxDepth=0,this.focusPath=[],this.animationState=new LC("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},(()=>this.checkProcessedDataAnimatable()))}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}async processData(){const{childrenKey:e,sizeKey:t,colorKey:i,fills:s,strokes:n,colorRange:r}=this.properties;let o=0;let a=0,l=1/0,h=-1/0;const c=new Array((this.data?.length??0)+1).fill(void 0),d=(s,n)=>{const r=(o+=1,o),d=null!=n.depth?n.depth+1:0,p=null!=e?s[e]:void 0,g=null==p||0===p.length;let m=null!=t?s[t]:void 0;m=Number.isFinite(m)?Math.max(m,0):g?1:0;const f=m;a=Math.max(a,d);const v=null!=i?s[i]:void 0;return"number"===typeof v&&(c[r]=v,l=Math.min(l,v),h=Math.max(h,v)),u(new DF(this,r,s,m,v,void 0,void 0,f,d,n,[]),p)},u=(e,t)=>(t?.forEach((t=>{const i=d(t,e);e.children.push(i),e.sumSize+=i.sumSize})),e),p=u(new DF(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.data),g=[l,h];let m;null!=r&&Number.isFinite(l)&&Number.isFinite(h)&&(m=new Zy,m.domain=g,m.range=r,m.update()),p.children.forEach(((e,t)=>{e.walk((e=>{let i;const r=c[e.index];null!=r&&(i=m?.convert(r)),i??(i=s?.[t%s.length]),e.fill=i,e.stroke=null==m?n?.[t%n.length]:"rgba(0, 0, 0, 0.2)"}))})),this.rootNode=p,this.maxDepth=a,this.colorDomain=g,this.focusPath=[{nodeDatum:this.rootNode,childIndex:0}]}async update(e){let{seriesRect:t}=e;await this.updateSelections(),await this.updateNodes();const i=this.getAnimationData();this.checkResize(t)&&this.animationState.transition("resize",i),this.animationState.transition("update",i)}resetAllAnimation(e){const t=this.animationResetFns?.datum;this.ctx.animationManager.stopByAnimationGroupId(this.id),null!=t&&Tv(e.datumSelections,t)}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){const t=this.animationResetFns?.datum;null!=t&&Tv([e],t)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(){return{datumSelections:[this.groupSelection]}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getLabelData(){return[]}getSeriesDomain(){return[NaN,NaN]}getLegendData(e){const{colorKey:t,colorName:i,colorRange:s,visible:n}=this.properties;return"gradient"===e&&null!=t&&null!=s?[{legendType:"gradient",enabled:n,seriesId:this.id,colorName:i,colorRange:s,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(e){return`${e.index}`}getDatumId(e){return this.getDatumIdFromData(e)}pickFocus(e){if(0===this.rootNode.children.length)return;0===this.focusPath.length&&fp.error("this.focusPath should not be empty");const{datumIndexDelta:t,otherIndexDelta:i}=e,{focusPath:s}=this,n=s.length-2;if(0!==i||1===s.length){const e=Math.max(0,n+i);if(void 0!==s[e+1])return s.length=e+2,this.computeFocusOutputs(s[e+1]);{let t=s[s.length-1];for(;t.nodeDatum.children.length>0&&(t.nodeDatum.depth??-1)<e;){const e={nodeDatum:t.nodeDatum.children[0],childIndex:0};s.push(e),t=e}return this.computeFocusOutputs(t)}}if(0===t)return this.computeFocusOutputs(s[s.length-1]);{const e=s[n+1].childIndex+t,i=s[n].nodeDatum,r=i?.children?.length;if(void 0!==r){const t=Ig(0,e,r-1),o={nodeDatum:i.children[t],childIndex:t};return s[n+1]=o,s.length=n+2,this.computeFocusOutputs(o)}}}getDatumAriaText(e,t){if(e instanceof DF)return this.ctx.localeManager.t("ariaAnnounceHierarchyDatum",{level:(e.depth??-1)+1,count:e.children.length,description:t});fp.error(`datum is not HierarchyNode: ${e}`)}computeFocusOutputs(e){let{nodeDatum:t,childIndex:i}=e;const s=this.computeFocusBounds(t);if(s)return{datum:t,datumIndex:i,otherIndex:t.depth,bounds:s,showFocusBox:!0}}},RF=class extends gD{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(MT),this.strokes=Object.values(DT)}};op([Ef(Of)],RF.prototype,"childrenKey",2),op([Ef(Of,{optional:!0})],RF.prototype,"sizeKey",2),op([Ef(Of,{optional:!0})],RF.prototype,"colorKey",2),op([Ef(Of,{optional:!0})],RF.prototype,"colorName",2),op([Ef(Jf)],RF.prototype,"fills",2),op([Ef(Jf)],RF.prototype,"strokes",2),op([Ef(Jf,{optional:!0})],RF.prototype,"colorRange",2);var EF=class{constructor(e,t,i,s){this.lon0=e,this.lat0=t,this.lon1=i,this.lat1=s}merge(e){this.lon0=Math.min(this.lon0,e.lon0),this.lat0=Math.min(this.lat0,e.lat0),this.lon1=Math.max(this.lon1,e.lon1),this.lat1=Math.max(this.lat1,e.lat1)}};var AF=class e{constructor(){this.id=og(this),this.axisGroup=new Iy({name:`${this.id}-AxisTicks`,zIndex:2}),this.labelSelection=Ty.select(this.axisGroup,lC),this.interval=new FS,this.label=new kS,this.scale=new ID,this.position="bottom",this.translationX=0,this.translationY=0,this.padding=0}attachAxis(e){e.appendChild(this.axisGroup)}calculateLayout(){this.scale.interval=this.interval.step;const e=[],t=this.generateTicks(),{translationX:i,translationY:s}=this;return this.labelSelection.update(t.ticks.map((e=>this.createLabelDatum(e))),void 0,(e=>e.tickId)),this.labelSelection.each(((t,i)=>{t.setProperties(i),i.visible&&e.push(t.getBBox())})),this.axisGroup.setProperties({translationX:i,translationY:s}),Vg.merge(e)}getLabelParams(e){const{padding:t}=this,{translate:i}=e;switch(this.position){case"top":case"bottom":return{x:i,y:t,textAlign:"center",textBaseline:"top"};case"left":case"right":return{x:t,y:i,textAlign:"start",textBaseline:"middle"}}}inRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.001;const[i,s]=Eg(this.scale.range);return e>=i-t&&e<=s+t}createLabelDatum(e){const{x:t,y:i,textBaseline:s,textAlign:n}=this.getLabelParams(e);return{visible:Boolean(e.tickLabel),tickId:e.tickId,fill:this.label.color,fontFamily:this.label.fontFamily,fontSize:this.label.fontSize,fontStyle:this.label.fontStyle,fontWeight:this.label.fontWeight,rotation:0,rotationCenterX:0,text:e.tickLabel,textAlign:n,textBaseline:s,x:t,y:i}}generateTicks(){const{minSpacing:t,maxSpacing:i}=this.interval,s=Lg(Ag(this.scale.range),2),{maxTickCount:n,minTickCount:r,tickCount:o}=function(e,t,i,s,n){n=Math.max(n,e/(s+1)),isNaN(t)&&(t=n),isNaN(i)&&(i=e),t>i&&(t===n?t=i:i=t);const r=Ig(1,Math.floor(e/t),Math.min(Math.floor(e),100)),o=Math.min(r,Math.ceil(e/i));return{minTickCount:o,maxTickCount:r,tickCount:Ig(o,s,r)}}(s,t,i,e.DefaultTickCount,e.DefaultMinSpacing);o&&(this.scale.tickCount=o,this.scale.minTickCount=r,this.scale.maxTickCount=n);const a=this.getTicksData();if("bottom"===this.position||"top"===this.position){const e=sC.getMeasurer({font:this.label}),t=this.scale.getDomain(),i=t[0]>t[1]?-1:1;let s=-1/0*i;a.ticks=a.ticks.filter((t=>Math.sign(t.translate-s)===i&&(s=t.translate+e.textWidth(t.tickLabel,!0)*i,!0)))}return a}getTicksData(){const e=[],t=this.scale.ticks(),i=t.reduce(((e,t)=>Math.max(e,"number"===typeof t?Ng(t):0)),0),s=function(){const e=new Map;return t=>{const i=e.get(t);return i?(e.set(t,i+1),`${t}${i}`):(e.set(t,1),t)}}(),n=this.label.format?this.scale.tickFormat({ticks:t,specifier:this.label.format}):e=>vm(e)?e.toFixed(i):String(e);for(let r=0;r<t.length;r++){const o=t[r],a=this.scale.convert(o);if(!this.inRange(a))continue;const l=this.label.formatter?.({value:o,index:r,fractionDigits:i})??n(o),h=s(l);e.push({tick:o,tickId:h,tickLabel:l,translate:a})}return{rawTicks:t,fractionDigits:i,ticks:e}}};AF.DefaultTickCount=5,AF.DefaultMinSpacing=50;var TF=AF,PF=0;function LF(e,t){const i=vg("button",GF("ag-charts-input ag-charts-button",t));return void 0!==e.label?i.append(e.label):(i.append(OF(e.icon)),i.ariaLabel=e.altText),i.addEventListener("click",e.onPress),OC(i,t),i}function FF(e,t){const i=vg("input",GF("ag-charts-input ag-charts-checkbox",t));return i.type="checkbox",i.checked=e.checked,i.addEventListener("change",(t=>e.onChange(i.checked,t))),i.addEventListener("keydown",(e=>{Yw(e)&&(e.preventDefault(),i.click())})),OC(i,t),i}function kF(e,t){const i=vg("select",GF("ag-charts-input ag-charts-select",t));return i.append(...e.options.map((e=>{const t=vg("option");return t.value=e.value,t.textContent=e.label,t}))),NC(i,"data-preventdefault",!1),i.value=e.value,i.addEventListener("change",(t=>e.onChange(i.value,t))),OC(i,t),i}function NF(e,t){const i=vg("textarea",GF("ag-charts-input ag-charts-textarea",t));return i.value=e.value,i.addEventListener("input",(t=>e.onChange(i.value,t))),OC(i,t),i}function OF(e){const t=vg("span",`ag-charts-icon ag-charts-icon-${e}`);return NC(t,"aria-hidden",!0),t}function GF(e,t){return null==t?e:`${e} ${t.class}`}var BF=Object.defineProperty,VF=Object.getOwnPropertyDescriptor,zF=Object.getOwnPropertyNames,HF=Object.prototype.hasOwnProperty,WF=(e,t)=>{for(var i in t)BF(e,i,{get:t[i],enumerable:!0})},jF=(e,t,i,s)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let n of zF(t))HF.call(e,n)||n===i||BF(e,n,{get:()=>t[n],enumerable:!(s=VF(t,n))||s.enumerable});return e},UF=(e,t,i)=>(jF(e,t,"default"),i&&jF(i,t,"default")),_F={};WF(_F,{AdvancedFilterModule:()=>hN,AgDialog:()=>vk,AgGroupComponent:()=>tk,AgGroupComponentSelector:()=>nk,AgMenuItemComponent:()=>Sk,AgMenuItemRenderer:()=>JF,AgMenuList:()=>yk,AgMenuPanel:()=>Ck,AgPanel:()=>fk,AgPrimaryCols:()=>Jz,AgRichSelect:()=>uk,ClipboardModule:()=>BV,ColumnsToolPanelModule:()=>tH,EnterpriseCoreModule:()=>ek,ExcelExportModule:()=>ij,FiltersToolPanelModule:()=>aj,GridChartsModule:()=>AV,GroupCellRenderer:()=>Dk,GroupCellRendererCtrl:()=>Mk,LicenseManager:()=>XF,MasterDetailModule:()=>pj,MenuModule:()=>Ej,MultiFilter:()=>Aj,MultiFilterModule:()=>Fj,PillDragComp:()=>pk,PillDropZonePanel:()=>gk,PivotDropZonePanel:()=>qV,RangeSelectionModule:()=>CN,RichSelectModule:()=>Nj,RowGroupDropZonePanel:()=>QV,RowGroupingModule:()=>xz,ServerSideRowModelModule:()=>Yj,SetFilter:()=>oU,SetFilterModule:()=>pU,SideBarModule:()=>Uz,SparklinesModule:()=>u_,StatusBarModule:()=>C_,TabbedLayout:()=>xk,ToolPanelColDefService:()=>Az,ValuesDropZonePanel:()=>Mz,ViewportRowModelModule:()=>S_,VirtualList:()=>lk,VirtualListDragFeature:()=>bk,agCharts:()=>TV,exportMultipleSheetsAsExcel:()=>QW,getMultipleSheetsAsExcel:()=>qW});var KF=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")}md5cycle(e,t){let i=e[0],s=e[1],n=e[2],r=e[3];i=this.ff(i,s,n,r,t[0],7,-680876936),r=this.ff(r,i,s,n,t[1],12,-389564586),n=this.ff(n,r,i,s,t[2],17,606105819),s=this.ff(s,n,r,i,t[3],22,-1044525330),i=this.ff(i,s,n,r,t[4],7,-176418897),r=this.ff(r,i,s,n,t[5],12,1200080426),n=this.ff(n,r,i,s,t[6],17,-1473231341),s=this.ff(s,n,r,i,t[7],22,-45705983),i=this.ff(i,s,n,r,t[8],7,1770035416),r=this.ff(r,i,s,n,t[9],12,-1958414417),n=this.ff(n,r,i,s,t[10],17,-42063),s=this.ff(s,n,r,i,t[11],22,-1990404162),i=this.ff(i,s,n,r,t[12],7,1804603682),r=this.ff(r,i,s,n,t[13],12,-40341101),n=this.ff(n,r,i,s,t[14],17,-1502002290),s=this.ff(s,n,r,i,t[15],22,1236535329),i=this.gg(i,s,n,r,t[1],5,-165796510),r=this.gg(r,i,s,n,t[6],9,-1069501632),n=this.gg(n,r,i,s,t[11],14,643717713),s=this.gg(s,n,r,i,t[0],20,-373897302),i=this.gg(i,s,n,r,t[5],5,-701558691),r=this.gg(r,i,s,n,t[10],9,38016083),n=this.gg(n,r,i,s,t[15],14,-660478335),s=this.gg(s,n,r,i,t[4],20,-405537848),i=this.gg(i,s,n,r,t[9],5,568446438),r=this.gg(r,i,s,n,t[14],9,-1019803690),n=this.gg(n,r,i,s,t[3],14,-187363961),s=this.gg(s,n,r,i,t[8],20,1163531501),i=this.gg(i,s,n,r,t[13],5,-1444681467),r
2=this.gg(r,i,s,n,t[2],9,-51403784),n=this.gg(n,r,i,s,t[7],14,1735328473),s=this.gg(s,n,r,i,t[12],20,-1926607734),i=this.hh(i,s,n,r,t[5],4,-378558),r=this.hh(r,i,s,n,t[8],11,-2022574463),n=this.hh(n,r,i,s,t[11],16,1839030562),s=this.hh(s,n,r,i,t[14],23,-35309556),i=this.hh(i,s,n,r,t[1],4,-1530992060),r=this.hh(r,i,s,n,t[4],11,1272893353),n=this.hh(n,r,i,s,t[7],16,-155497632),s=this.hh(s,n,r,i,t[10],23,-1094730640),i=this.hh(i,s,n,r,t[13],4,681279174),r=this.hh(r,i,s,n,t[0],11,-358537222),n=this.hh(n,r,i,s,t[3],16,-722521979),s=this.hh(s,n,r,i,t[6],23,76029189),i=this.hh(i,s,n,r,t[9],4,-640364487),r=this.hh(r,i,s,n,t[12],11,-421815835),n=this.hh(n,r,i,s,t[15],16,530742520),s=this.hh(s,n,r,i,t[2],23,-995338651),i=this.ii(i,s,n,r,t[0],6,-198630844),r=this.ii(r,i,s,n,t[7],10,1126891415),n=this.ii(n,r,i,s,t[14],15,-1416354905),s=this.ii(s,n,r,i,t[5],21,-57434055),i=this.ii(i,s,n,r,t[12],6,1700485571),r=this.ii(r,i,s,n,t[3],10,-1894986606),n=this.ii(n,r,i,s,t[10],15,-1051523),s=this.ii(s,n,r,i,t[1],21,-2054922799),i=this.ii(i,s,n,r,t[8],6,1873313359),r=this.ii(r,i,s,n,t[15],10,-30611744),n=this.ii(n,r,i,s,t[6],15,-1560198380),s=this.ii(s,n,r,i,t[13],21,1309151649),i=this.ii(i,s,n,r,t[4],6,-145523070),r=this.ii(r,i,s,n,t[11],10,-1120210379),n=this.ii(n,r,i,s,t[2],15,718787259),s=this.ii(s,n,r,i,t[9],21,-343485551),e[0]=this.add32(i,e[0]),e[1]=this.add32(s,e[1]),e[2]=this.add32(n,e[2]),e[3]=this.add32(r,e[3])}cmn(e,t,i,s,n,r){return t=this.add32(this.add32(t,e),this.add32(s,r)),this.add32(t<<n|t>>>32-n,i)}ff(e,t,i,s,n,r,o){return this.cmn(t&i|~t&s,e,t,n,r,o)}gg(e,t,i,s,n,r,o){return this.cmn(t&s|i&~s,e,t,n,r,o)}hh(e,t,i,s,n,r,o){return this.cmn(t^i^s,e,t,n,r,o)}ii(e,t,i,s,n,r,o){return this.cmn(i^(t|~s),e,t,n,r,o)}md51(e){const t=e.length,i=[1732584193,-271733879,-1732584194,271733878];let s;for(s=64;s<=e.length;s+=64)this.md5cycle(i,this.md5blk(e.substring(s-64,s)));e=e.substring(s-64);const n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(s=0;s<e.length;s++)n[s>>2]|=e.charCodeAt(s)<<(s%4<<3);if(n[s>>2]|=128<<(s%4<<3),s>55)for(this.md5cycle(i,n),s=0;s<16;s++)n[s]=0;return n[14]=8*t,this.md5cycle(i,n),i}md5blk(e){const t=[];for(let i=0;i<64;i+=4)t[i>>2]=e.charCodeAt(i)+(e.charCodeAt(i+1)<<8)+(e.charCodeAt(i+2)<<16)+(e.charCodeAt(i+3)<<24);return t}rhex(e){const t="0123456789abcdef".split("");let i="",s=0;for(;s<4;s++)i+=t[e>>8*s+4&15]+t[e>>8*s&15];return i}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}},$F={"01":"GRID","02":"CHARTS","0102":"BOTH"},YF="https://ag-grid.com/licensing/",ZF=class e{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new KF,this.md5.init()}validateLicense(){const t=this.getLicenseDetails(e.licenseKey),i=`AG Grid ${"BOTH"===t.currentLicenseType?"and AG Charts ":""}Enterprise`,s=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(i);else if(t.expired){const n=e.getGridReleaseDate(),r=e.formatDate(n);this.outputExpiredKey(t.expiry,r,i,s)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,i,s):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,i,s)}static extractExpiry(t){const i=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(e.decode(i),10))}static extractLicenseComponents(t){let i=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};const s=i.length-32,n=i.substring(s),r=i.substring(0,s),[o,a,l]=e.extractBracketedInformation(i);return{md5:n,license:r,version:o,isTrial:a,type:l}}getLicenseDetails(t){const i=e.chartsLicenseManager?"BOTH":"GRID";if(x(t))return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:i};const s=e.getGridReleaseDate(),{md5:n,license:r,version:o,isTrial:a,type:l}=e.extractLicenseComponents(t);let h,c,d,u=n===this.md5.md5(r)&&-1===t.indexOf("For_Trialing_ag-Grid_Only"),p=null,g=!1;function m(){h=p<new Date,c=void 0}if(u&&(p=e.extractExpiry(r),u=!isNaN(p.getTime()),u))switch(c=s>p,o){case"legacy":case"2":a&&m();break;case"3":x(l)?u=!1:(d=l,l!==$F["01"]&&l!==$F["0102"]||"BOTH"===i&&"BOTH"!==d?(u=!1,g=!0):a&&m())}return u?{licenseKey:t,valid:u,expiry:e.formatDate(p),expired:c,version:o,isTrial:a,trialExpired:h,incorrectLicenseType:g,currentLicenseType:i,suppliedLicenseType:d}:{licenseKey:t,valid:u,incorrectLicenseType:g,currentLicenseType:i,suppliedLicenseType:d}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!x(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){const e=(this.document.defaultView||window).location,{hostname:t=""}=e;return t}isForceWatermark(){const e=(this.document.defaultView||window).location,{pathname:t}=e;return!!t&&-1!==t.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){const t=e.getDate(),i=e.getMonth(),s=e.getFullYear();return t+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][i]+" "+s}static getGridReleaseDate(){return new Date(parseInt(e.decode(e.RELEASE_INFORMATION),10))}static decode(t){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2+/=";let s,n,r,o,a,l,h,c="",d=0;const u=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;d<u.length;)o=i.indexOf(u.charAt(d++)),a=i.indexOf(u.charAt(d++)),l=i.indexOf(u.charAt(d++)),h=i.indexOf(u.charAt(d++)),s=o<<2|a>>4,n=(15&a)<<4|l>>2,r=(3&l)<<6|h,c+=String.fromCharCode(s),64!=l&&(c+=String.fromCharCode(n)),64!=h&&(c+=String.fromCharCode(r));return c=e.utf8_decode(c),c}static utf8_decode(e){e=e.replace(/rn/g,"n");let t="";for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);s<128?t+=String.fromCharCode(s):s>127&&s<2048?(t+=String.fromCharCode(s>>6|192),t+=String.fromCharCode(63&s|128)):(t+=String.fromCharCode(s>>12|224),t+=String.fromCharCode(s>>6&63|128),t+=String.fromCharCode(63&s|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];const t=e.match(/\[(.*?)\]/g).map((e=>e.replace("[","").replace("]","")));if(!t||0===t.length)return["legacy",!1,void 0];const i=1===t.filter((e=>"TRIAL"===e)).length,s=t.filter((e=>0===e.indexOf("v")))[0];return[s?s.replace("v",""):"legacy",i,$F[t.filter((e=>$F[e]))[0]]]}centerPadAndOutput(e){const t=this.totalMessageLength-e.length;console.error(e.padStart(t/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";console.error(e.padEnd(this.totalMessageLength-i.length,t)+i)}outputInvalidLicenseKey(e,t,i){e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${i} only and does not cover you for ${t}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${YF}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${YF}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,t,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${i} 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,i,s){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${s} released before ${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"}};ZF.RELEASE_INFORMATION="MTczMTQzMDQwMzMxOQ==";var qF=ZF,QF={selector:"AG-WATERMARK",component:class extends Rs{constructor(){super('<div class="ag-watermark">\n                <div data-ref="eLicenseTextRef" class="ag-watermark-text"></div>\n            </div>'),this.eLicenseTextRef=Is}wireBeans(e){this.licenseManager=e.licenseManager}postConstruct(){const 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()}}},XF=class extends ze{constructor(){super(...arguments),this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){this.licenseManager=new qF(j(this.gos)),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new qF(null).getLicenseDetails(e)}getWatermarkSelector(){return QF}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){qF.setLicenseKey(e)}static setChartsLicenseManager(e){qF.setChartsLicenseManager(e)}},JF=class extends Rs{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;const e=hs(`<span data-ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`),{checked:t,icon:i}=this.params;t?e.appendChild(Ps("check",this.gos)):i&&(vs(i)?e.appendChild(i):"string"===typeof i?e.innerHTML=i:h("menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){const e=hs(`<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;const e=hs(`<span data-ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){const e=hs(`<span data-ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){const i=this.gos.get("enableRtl")?"smallLeft":"smallRight";Ci(t,!1),e.appendChild(Ps(i,this.gos))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},ek={version:"32.3.3",moduleName:r.EnterpriseCoreModule,beans:[XF],userComponents:[{name:"agMenuItem",classImp:JF}]};var tk=class extends Rs{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(function(e){const t=e.cssIdentifier||"default";return`\n        <div class="ag-group ag-${t}-group" role="presentation">\n            <div data-ref="eToolbar" class="ag-group-toolbar ag-${t}-group-toolbar">\n                <ag-checkbox data-ref="cbGroupEnabled"></ag-checkbox>\n            </div>\n            <div data-ref="eContainer" class="ag-group-container ag-group-container-${e.direction||"vertical"} ag-${t}-group-container"></div>\n        </div>\n    `}(e),[Ys]),this.params=e,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1,this.eToolbar=Is,this.cbGroupEnabled=Is,this.eContainer=Is;const{enabled:t,items:i,suppressEnabledCheckbox:s,expanded:n,suppressToggleExpandOnEnableChange:r,useToggle:o}=e;this.cssIdentifier=e.cssIdentifier||"default",this.enabled=null==t||t,this.items=i||[],this.useToggle=o??!1,this.alignItems=e.alignItems||"center",this.expanded=null==n||n,null!=s&&(this.suppressEnabledCheckbox=s),null!=r&&(this.suppressToggleExpandOnEnableChange=r)}postConstruct(){if(this.setupTitleBar(),this.items.length){const e=this.items;this.items=[],this.addItems(e)}const e=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);const{onEnableChange:t,onExpandedChange:i,suppressOpenCloseIcons:s}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(s??!1),this.refreshChildDisplay(),Ki(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange((e=>{this.setEnabled(e,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(e)})),null!=t&&this.onEnableChange(t),null!=i&&this.onExpandedChange(i)}refreshChildDisplay(){Ki(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),this.eTitleBar?.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(e){this.alignItems!==e&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=e;const t=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(t),this}toggleGroupExpand(e,t){if(this.eTitleBar?.isSuppressCollapse()&&!this.useToggle)e=!0,t=!0;else if(e=null!=e?e:!this.expanded,this.expanded===e)return this;return this.expanded=e,this.refreshChildDisplay(),Ki(this.eContainer,e),t||this.dispatchLocalEvent({type:e?"expanded":"collapsed"}),this}addItems(e){e.forEach((e=>this.addItem(e)))}prependItem(e){this.insertItem(e,!0)}addItem(e){this.insertItem(e,!1)}insertItem(e,t){const i=this.eContainer,s=e instanceof Rs?e.getGui():e;s.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),t?(i.insertAdjacentElement("afterbegin",s),this.items.unshift(s)):(i.appendChild(s),this.items.push(s))}hideItem(e,t){Ki(this.items[t],!e)}getItemIndex(e){const t=e instanceof Rs?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)}
2dispatchEnableChangeEvent(e){const t={type:"enableChange",enabled:e};this.dispatchLocalEvent(t)}setEnabled(e,t,i){return this.enabled=e,this.refreshDisabledStyles(),i||this.toggleGroupExpand(e),t||(this.cbGroupEnabled.setValue(e),this.eToggle?.setValue(e)),this}isEnabled(){return this.enabled}onEnableChange(e){return this.addManagedListeners(this,{enableChange:t=>e(t.enabled)}),this}onExpandedChange(e){return this.addManagedListeners(this,{expanded:()=>e(!0),collapsed:()=>e(!1)}),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){return this.eTitleBar?.hideOpenCloseIcons(e),this}refreshDisabledStyles(){const e=!this.enabled;this.eContainer.classList.toggle("ag-disabled",e),this.eTitleBar?.refreshDisabledStyles(this.suppressEnabledCheckbox&&e),this.eContainer.classList.toggle("ag-disabled-group-container",e)}setupTitleBar(){const e=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",e.getGui())}createDefaultTitleBar(){const e=this.createManagedBean(new sk(this.params));return this.eTitleBar=e,e.refreshOnExpand(this.expanded),this.addManagedListeners(e,{expandedChanged:e=>this.toggleGroupExpand(e.expanded)}),e}createToggleTitleBar(){const e=this.createManagedBean(new Tl({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}},ik="ag-disabled-group-title-bar";var sk=class extends Rs{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(function(e){const t=e.cssIdentifier??"default";return`\n        <div class="ag-group-title-bar ag-${t}-group-title-bar ag-unselectable" role="${e.suppressKeyboardNavigation?"presentation":"role"}">\n            <span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" data-ref="eGroupOpenedIcon" role="presentation"></span>\n            <span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" data-ref="eGroupClosedIcon" role="presentation"></span>\n            <span data-ref="eTitle" class="ag-group-title ag-${t}-group-title"></span>\n        </div>\n    `}(e)),this.suppressOpenCloseIcons=!1,this.suppressKeyboardNavigation=!1,this.eGroupOpenedIcon=Is,this.eGroupClosedIcon=Is,this.eTitle=Is;const{title:t,suppressOpenCloseIcons:i,suppressKeyboardNavigation:s}=e;t&&t.length>0&&(this.title=t),null!=i&&(this.suppressOpenCloseIcons=i),this.suppressKeyboardNavigation=s??!1}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild(Ts("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(Ts("columnSelectOpen",this.gos,null)),this.addManagedElementListeners(this.getGui(),{click:()=>this.dispatchExpandChanged(),keydown:e=>{switch(e.key){case js.ENTER:case js.SPACE:e.preventDefault(),this.dispatchExpandChanged();break;case js.RIGHT:case js.LEFT:e.preventDefault(),this.dispatchExpandChanged(e.key===js.RIGHT)}}})}refreshOnExpand(e){this.refreshAriaStatus(e),this.refreshOpenCloseIcons(e)}refreshAriaStatus(e){this.suppressOpenCloseIcons||Ci(this.getGui(),e)}refreshOpenCloseIcons(e){const t=!this.suppressOpenCloseIcons;Ki(this.eGroupOpenedIcon,t&&e),Ki(this.eGroupClosedIcon,t&&!e)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(e){const t={type:"expandedChanged",expanded:e};this.dispatchLocalEvent(t)}setTitle(e){const t=this.getGui(),i=!!e&&e.length>0;e=i?e:void 0,this.eTitle.textContent=e??"",Ki(t,i),e!==this.title&&(this.title=e);const s=t.classList.contains(ik);return this.refreshDisabledStyles(s),this}addWidget(e){return this.getGui().appendChild(e),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(e){const t=this.getGui();e?(t.classList.add(ik),t.removeAttribute("tabindex")):(t.classList.remove(ik),"string"!==typeof this.title||this.suppressKeyboardNavigation?t.removeAttribute("tabindex"):t.setAttribute("tabindex","0"))}},nk={selector:"AG-GROUP-COMPONENT",component:tk},rk=class extends Rs{constructor(e){super('\n            <div class="ag-pill" role="option">
2\n                <span class="ag-pill-text" data-ref="eText"></span>\n                <span class="ag-button ag-pill-button" data-ref="eButton" role="presentation"></span>\n            </div>\n        '),this.config=e,this.eText=Is,this.eButton=Is}postConstruct(){const{config:e,eButton:t}=this,{onKeyDown:i,onButtonClick:s}=e;this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),this.addGuiEventListener("focus",(()=>{this.eButton.focus()})),i&&this.addGuiEventListener("keydown",i),s&&this.addManagedElementListeners(t,{click:s})}toggleCloseButtonClass(e,t){this.eButton.classList.toggle(e,t)}setText(e){this.eText.textContent=e}getText(){return this.eText.textContent}},ok=class extends Rs{constructor(){super('\n            <div class="ag-pill-container" role="listbox"></div>\n            '),this.pills=[]}wireBeans(e){this.focusService=e.focusService}init(e){this.params=e,this.refresh()}refresh(){this.clearPills();const{params:e,onPillKeyDown:t}=this,i=e.getValue();if(!Array.isArray(i))return;const s=i.length;for(let n=0;n<s;n++){const r=i[n],o=this.createBean(new rk({onButtonClick:()=>this.onPillButtonClick(o),onKeyDown:t.bind(this)})),a=o.getGui();bi(a,n+1),wi(a,s),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(a),this.pills.push(o)}}onNavigationKeyDown(e){const{key:t}=e;if(!this.pills.length||t!==js.LEFT&&t!==js.RIGHT)return;e.preventDefault();const i=K(this.gos),s=this.getGui(),{params:n,focusService:r}=this;if(s.contains(i)){const e=r.findNextFocusableElement(s,!1,t===js.LEFT);e?e.focus():n.eWrapper&&n.eWrapper.focus()}else{const e=r.findFocusableElements(s);e.length>0&&e[t===js.RIGHT?0:e.length-1].focus()}}clearPills(){const e=this.getGui();e.contains(K(this.gos))&&this.params.eWrapper&&this.params.eWrapper.focus(),rs(e),this.destroyBeans(this.pills),this.pills=[]}onPillButtonClick(e){this.deletePill(e)}onPillKeyDown(e){const t=e.key;if(t!==js.DELETE&&t!==js.BACKSPACE)return;e.preventDefault();const i=j(this.gos),s=this.pills.findIndex((e=>e.getGui().contains(i.activeElement)));if(-1===s)return;const n=this.pills[s];n&&this.deletePill(n,s)}deletePill(e,t){const i=e.getText(),s=(this.params.getValue()||[]).filter((e=>e!==i));if(this.params.setValue(s),!s.length&&this.params.eWrapper)this.params.eWrapper.focus();else if(null!=t){const e=this.pills[Math.min(t,this.pills.length-1)];e&&e.getFocusableElement().focus()}}destroy(){this.clearPills(),super.destroy()}},ak=class extends Rs{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="";const{params:i}=this;i.valueFormatter&&(t=i.valueFormatter(e));this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}highlightString(e){const{parsedValue:t}=this;if(this.params.cellRenderer||!w(t))return;let i=w(e);if(i){const s=t?.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){const i=s+e.length,n=At(t.slice(0,s),!0),r=At(t.slice(s,i),!0),o=At(t.slice(i));this.renderValueWithoutRenderer(`${n}<span class="ag-rich-select-row-text-highlight">${r}</span>${o}`)}else i=!1}i||this.renderValueWithoutRenderer(t)}updateSelected(e){Ti(this.getGui().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){const i=j(this.gos),s=this.getGui(),n=i.
2createElement("span");n.style.overflow="hidden",n.style.textOverflow="ellipsis";const r=At(w(t)?t:e,!0);this.parsedValue=w(r)?r:null,s.appendChild(n),this.renderValueWithoutRenderer(r),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>n.scrollWidth>n.clientWidth})}renderValueWithoutRenderer(e){const t=this.getGui().querySelector("span");t&&(t.innerHTML=w(e)?e:"&nbsp;")}populateWithRenderer(e,t){let i,s;if(this.params.cellRenderer){const i=this.getParentComponent()?.getParentComponent();s=this.userComponentFactory.getEditorRendererDetails(this.params,{value:e,valueFormatted:t,getValue:()=>i?.getValue(),setValue:e=>{i?.setValue(e,!0)},setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})}return s&&(i=s.newAgStackInstance()),i&&Ss(i,this.getGui()),!!i&&(i.then((e=>{this.addDestroyFunc((()=>{this.destroyBean(e)}))})),!0)}};var lk=class extends Nl{constructor(e){super(function(e){return`<div class="ag-virtual-list-viewport ag-${e}-virtual-list-viewport" role="presentation">\n            <div class="ag-virtual-list-container ag-${e}-virtual-list-container" data-ref="eContainer"></div>\n        </div>`}(e?.cssIdentifier||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=Is,this.awaitStableCallbacks=[];const{cssIdentifier:t="default",ariaRole:i="listbox",listName:s}=e||{};this.cssIdentifier=t,this.ariaRole=i,this.listName=s}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(){const e=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),t=this.eContainer;ci(t,this.ariaRole),di(t,e)}addResizeObserver(){const 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){const t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=parseInt(t.getAttribute("aria-posinset"),10)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){switch(e.key){case js.UP:case js.DOWN:this.navigate(e.key===js.UP)&&e.preventDefault();break;case js.PAGE_HOME:case js.PAGE_END:case js.PAGE_UP:case js.PAGE_DOWN:null!==this.navigateToPage(e.key)&&e.preventDefault()}}onTabKeyDown(e){Ne(e),this.forceFocusOutOfContainer(e.shiftKey)}navigate(e){if(null==this.lastFocusedRowIndex)return!1;const t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount())&&(this.focusRow(t),!0)}navigateToPage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"focused",i=!1;"focused"===t&&(t=this.getLastFocusedRow(),i=!0);const s=this.model.getRowCount()-1;let n=-1;return e===js.PAGE_HOME?n=0:e===js.PAGE_END?n=s:e===js.PAGE_DOWN?n=Math.min(t+this.pageSize,s):e===js.PAGE_UP&&(n=Math.max(t-this.pageSize,0)),-1===n?null:(i?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;const t=this.renderedRows.get(e);t&&t.eDiv.focus()})))}getComponentAt(e){const t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach(((t,i)=>e(t.rowComponent,i)))}getItemHeight(){return this.isHeightFromTheme?this.environment.getDefaultListItemHeight():this.rowHeight}ensureIndexVisible(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=this.model.getRowCount();if("number"!==typeof e||e<0||e>=i)return h("invalid row index for ensureIndexVisible: ",e),!1;const s=e*this.rowHeight,n=s+this.rowHeight,r=this.getGui(),o=r.scrollTop,a=r.offsetHeight,l=o+a,c=t?0:this.rowHeight,d=l<n-c;
2if(o>s+c)return r.scrollTop=s,!0;if(d){const e=n-a;return r.scrollTop=e,!0}return!1}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(null==this.model||!this.isAlive())return;const 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;const t=this.model.getRowCount();y((()=>this.eContainer.clientHeight>=t*this.rowHeight),(()=>{const e=this.awaitStableCallbacks;this.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;const t=this.getGui(),i=t.scrollTop,s=i+t.offsetHeight,n=Math.floor(i/this.rowHeight),r=Math.floor(s/this.rowHeight);this.pageSize=Math.floor((s-i)/this.rowHeight),this.ensureRowsRendered(n,r,e)}ensureRowsRendered(e,t,i){this.renderedRows.forEach(((i,s)=>{(s<e||s>t)&&s!==this.lastFocusedRowIndex&&this.removeRow(s)})),i&&this.refreshRows();for(let s=e;s<=t;s++)this.renderedRows.has(s)||s<this.model.getRowCount()&&this.insertRow(s)}insertRow(e){const t=this.model.getRow(e),i=document.createElement("div");i.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),ci(i,"tree"===this.ariaRole?"treeitem":"option"),wi(i,this.model.getRowCount()),bi(i,e+1),i.setAttribute("tabindex","-1"),i.style.height=`${this.rowHeight}px`,i.style.top=this.rowHeight*e+"px";const s=this.componentCreator(t,i);s.addGuiEventListener("focusin",(()=>this.lastFocusedRowIndex=e)),i.appendChild(s.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",i):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",i):this.eContainer.appendChild(i),this.renderedRows.set(e,{rowComponent:s,eDiv:i,value:t})}removeRow(e){const t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){const e=this.model.getRowCount();this.renderedRows.forEach(((t,i)=>{if(i>=e)this.removeRow(i);else{const e=this.model.getRow(i);this.model.areRowsEqual?.(t.value,e)?this.componentUpdater(e,t.rowComponent):this.removeRow(i)}}))}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())}},hk="ag-rich-select-list",ck="ag-rich-select-row",dk=class extends lk{constructor(e,t,i){super({cssIdentifier:"rich-select"}),this.params=e,this.richSelectWrapper=t,this.getSearchString=i,this.lastRowHovered=-1,this.selectedItems=new Set,this.params=e,this.setComponentCreator(this.createRowComponent.bind(this)),this.setComponentUpdater((()=>{}))}postConstruct(){super.postConstruct(),this.createLoadingElement();const{cellRowHeight:e,pickerAriaLabelKey:t,pickerAriaLabelValue:i}=this.params;e&&this.setRowHeight(e);const s=this.getGui(),n=this.getAriaElement();this.addManagedListeners(s,{mousemove:this.onMouseMove.bind(this),mouseout:this.onMouseOut.bind(this),mousedown:this.onMouseDown.bind(this),click:this.onClick.bind(this)}),s.classList.add(hk);const r=`${hk}-${this.getCompId()}`;n.setAttribute("id",r);di(n,this.localeService.getLocaleTextFunc()(t,i)),Pi(this.richSelectWrapper,n)}navigateToPage(e){const 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((()=>
2{if(!this.currentList||!this.isAlive())return;const i=this.currentList.length,s=this.lastRowHovered,n=e===js.DOWN?1:-1,r=Math.min(Math.max(-1===s?0:s+n,0),i-1);this.highlightIndex(r),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;const t=this.getIndicesForValues(e),i=t.length>0;return i&&(this.refresh(),this.ensureIndexVisible(t[0]),this.refresh(!0)),this.selectListItems(Array.isArray(e)?e:[e]),i}selectListItems(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.selectedItems.clear();for(let t=0;t<e.length;t++){const i=e[t];this.selectedItems.has(i)||this.selectedItems.add(i)}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){if(this.currentList){if(e<0||e>=this.currentList.length)this.lastRowHovered=-1;else{this.lastRowHovered=e;this.ensureIndexVisible(e,!t)&&!t&&this.refresh(!0)}this.forEachRenderedRow(((t,i)=>{const s=e===i;if(t.toggleHighlighted(s),s){const e=`${ck}-${t.getCompId()}`;yi(this.richSelectWrapper,e),this.richSelectWrapper.setAttribute("data-active-option",e)}}))}}getIndicesForValues(e){const{currentList:t}=this;if(!t||0===t.length||null==e)return[];if(Array.isArray(e)||(e=[e]),0===e.length)return[];const i=[];for(let s=0;s<e.length;s++){const n=t.indexOf(e[s]);n>=0&&i.push(n)}return i}toggleListItemSelection(e){this.selectedItems.has(e)?this.selectedItems.delete(e):this.selectedItems.add(e),this.refreshSelectedItems(),this.dispatchValueSelected()}refreshSelectedItems(){this.forEachRenderedRow((e=>{const t=this.selectedItems.has(e.getValue());e.updateSelected(t)}))}createLoadingElement(){const e=j(this.gos),t=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=t("loadingOoo","Loading..."),this.eLoading=i}createRowComponent(e,t){const i=new ak(this.params);t.setAttribute("id",`${ck}-${i.getCompId()}`),i.setParentComponent(this),this.createBean(i),i.setState(e);const{highlightMatch:s,searchType:n="fuzzy"}=this.params;return s&&"fuzzy"!==n&&i.highlightString(this.getSearchString()),i}getRowForMouseEvent(e){const t=this.getGui().getBoundingClientRect(),i=this.getScrollTop(),s=e.clientY-t.top+i;return Math.floor(s/this.getRowHeight())}onMouseMove(e){const 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){const{multiSelect:t}=this.params;if(!this.currentList)return;const i=this.getRowForMouseEvent(e),s=this.currentList[i];t?this.toggleListItemSelection(s):(this.selectListItems([s]),this.dispatchValueSelected())}dispatchValueSelected(){this.dispatchLocalEvent({type:"richSelectListRowSelected",fromEnterKey:!1,value:this.selectedItems})}destroy(){super.destroy(),this.eLoading=void 0}},uk=class extends lr{constructor(e){super({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:e?.template??'\n            <div class="ag-picker-field" role="presentation">\n                <div data-ref="eLabel"></div>\n                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">\n                    <span data-ref="eDisplayField" class="ag-picker-field-display"></span>\n                    <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n                    <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>\n                    <span data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></span>\n                </div>\n            </div>',agComponents:[vr],modalPicker:!1,...e,maxPickerHeight:e?.maxPickerHeight??"calc(var(--ag-row-height) * 6.5)"}),this.searchString="",this.searchStringCreator=null,this.eInput=Is,this.eDeselect=Is,this.skipWrapperAnnouncement=!1;const{value:t,valueList:i,searchStringCreator:s}=e||{};void 0!==t&&(this.value=t),null!=i&&(this.values=i),s&&(this.searchStringCreator=s)}wireBeans(e){super.wireBeans(e),this.userComponentFactory=e.userComponentFactory,this.ariaAnnouncementService=e.ariaAnnouncementService}
2postConstruct(){super.postConstruct(),this.createListComponent(),this.eDeselect.appendChild(Ps("cancel",this.gos));const{allowTyping:e,placeholder:t,suppressDeselectAll:i}=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();const{searchDebounceDelay:s=300}=this.config;this.clearSearchString=f(this.clearSearchString,s),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)}),i||this.addManagedElementListeners(this.eDeselect,{mousedown:this.onDeselectAllMouseDown.bind(this),click:this.onDeselectAllClick.bind(this)})}setupAriaProperties(){const{eWrapper:e,gos:t,localeService:i}=this;e.tabIndex=t.get("tabIndex");const s=i.getLocaleTextFunc();this.ariaDeleteSelection=s("ariaLabelRichSelectDeleteSelection","Press DELETE to deselect item"),this.ariaDeselectAllItems=s("ariaLabelRichSelectDeselectAllItems","Press DELETE to deselect all items"),this.ariaToggleSelection=s("ariaLabelRichSelectToggleSelection","Press SPACE to toggle selection")}createListComponent(){this.listComponent=this.createBean(new dk(this.config,this.eWrapper,(()=>this.searchString))),this.listComponent.setParentComponent(this),this.addManagedListeners(this.listComponent,{richSelectListRowSelected:e=>{this.onListValueSelected(e.value,e.fromEnterKey)}})}renderSelectedValue(){const{value:e,eDisplayField:t,config:i}=this,{allowTyping:s,cellRenderer:n,initialInputValue:r,multiSelect:o,suppressDeselectAll:a,suppressMultiSelectPillRenderer:l}=i,h=this.config.valueFormatter?this.config.valueFormatter(e):e;if(s)return void this.eInput.setValue(r??h);if(o&&!a){const t=null==e||Array.isArray(e)&&0===e.length;this.eDeselect.classList.toggle("ag-hidden",t)}let c,d;if(!o||l)if(n&&(c=this.userComponentFactory.getEditorRendererDetails(i,{value:e,valueFormatted:h,getValue:()=>this.getValue(),setValue:e=>{this.setValue(e,!0)},setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})),c&&(d=c.newAgStackInstance()),d)rs(t),Ss(d,t),d.then((e=>{this.addDestroyFunc((()=>this.destroyBean(e)))}));else{if(w(this.value))t.innerText=h,t.classList.remove("ag-display-as-placeholder");else{const{placeholder:e}=i;w(e)?(t.innerHTML=`${At(e)}`,t.classList.add("ag-display-as-placeholder")):rs(t)}this.setTooltip({newTooltipText:h??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}else this.createOrUpdatePillContainer(t)}createPickerComponent(){const{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){const{valueList:t,refresh:i}=e;if(this.listComponent&&this.listComponent.getCurrentList()!==t&&(this.listComponent.setCurrentList(t),i)){if(this.values)this.listComponent.refresh(!0);else if(this.values=t,this.isPickerDisplayed){this.listComponent.selectValue(this.value)||this.listComponent.refresh()}this.alignPickerToComponent()}}showPicker(){super.showPicker();const{listComponent:e,value:t}=this;if(!e)return;let i=null;null!=this.value&&(e.selectValue(this.value),i=e.getIndicesForValues(Array.isArray(t)?t:[t])[0]),null!=i?e.highlightIndex(i):e.refresh(),this.displayOrHidePicker()}beforeHidePicker(){super.beforeHidePicker()}createOrUpdatePillContainer(e){if(!this.pillContainer){const t=this.pillContainer=this.createBean(new ok);this.addDestroyFunc((()=>{this.destroyBean(this.pillContainer),this.pillContainer=null})),rs(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(){const{eInput:e,config:t}=this,{allowTyping:i,multiSelect:s,suppressDeselectAll:n}=t;if(i){const t=e.getFocusableElement();t.focus(),t.select()}else!s||n||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===js.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!gr(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){const{valueFormatter:t=e=>e}=this.config;let i;return"number"===typeof e[0]||"string"===typeof e[0]?i=e.map((e=>t(e))):"object"===typeof e[0]&&this.searchStringCreator&&(i=this.searchStringCreator(e)),i}filterListModel(e){const{filterList:t}=this.config;t&&this.setValueList({valueList:e,refresh:!0})}runSearch(){if(!this.listComponent)return;const{values:e}=this,t=this.buildSearchStrings(e);if(!t)return void this.listComponent.highlightIndex(-1);const{suggestions:i,filteredValues:s}=this.getSuggestionsAndFilteredValues(this.searchString,t),{filterList:n,highlightMatch:r,searchType:o="fuzzy"}=this.config,a=s.length,l=!(!n||""===this.searchString);if(this.filterListModel(l?s:e),i.length){const e=l?0:t.indexOf(i[0]);this.listComponent?.highlightIndex(e)}else if(this.listComponent?.highlightIndex(-1),!l||a)this.listComponent?.ensureIndexVisible(0);else if(l){this.getAriaElement().removeAttribute("data-active-option");const e=this.listComponent?.getAriaElement();e&&yi(e,null)}r&&"fuzzy"!==o&&this.listComponent?.highlightFilterMatch(this.searchString),this.displayOrHidePicker()}getSuggestionsAndFilteredValues(e,t){let i=[];const s=[];if(!e.length)return{suggestions:i,filteredValues:s};const{searchType:n="fuzzy",filterList:r}=this.config;if("fuzzy"===n){const n=nn({inputValue:e,allSuggestions:t,hideIrrelevant:!0,addSequentialWeight:!0});i=n.values;const o=n.indices;if(r&&o.length)for(let e=0;e<o.length;e++)s.push(this.values[o[e]])}else i=t.filter(((e,t)=>{const i=e.toLocaleLowerCase(),o=this.searchString.toLocaleLowerCase(),a="match"===n?i.startsWith(o):-1!==i.indexOf(o);return r&&a&&s.push(this.values[t]),a}));return{suggestions:i,filteredValues:s}}displayOrHidePicker(){if(!this.listComponent)return;const e=this.listComponent.getGui(),t=this.listComponent.getCurrentList(),i=!!t&&0===t.length;e.classList.toggle("ag-hidden",i)}clearSearchString(){this.searchString=""}setValue(e,t,i,s){if(this.value===e)return this;const n=Array.isArray(e);if(null!=e){if(!n){const t=this.listComponent?.getCurrentList();if(-1===(t?t.indexOf(e):-1))return this}i||this.listComponent?.selectValue(e)}return super.setValue(e,t),s||this.renderSelectedValue(),this}onNavigationKeyDown(e,t,i){e.preventDefault();const s=t===js.DOWN;this.isPickerDisplayed||!s?this.listComponent?.onNavigationKeyDown(t,i):this.showPicker()}
2onEnterKeyDown(e){if(this.isPickerDisplayed&&(e.preventDefault(),this.listComponent?.getCurrentList())){const e=this.listComponent.getLastItemHovered();this.config.multiSelect||!e?this.dispatchPickerEventAndHidePicker(this.value,!0):this.onListValueSelected(new Set([e]),!0)}}onDeleteKeyDown(e){const{eWrapper:t,gos:i}=this;K(i)===t&&(e.preventDefault(),this.setValue([],!0))}onTabKeyDown(){const{config:e,isPickerDisplayed:t,listComponent:i}=this,{multiSelect:s}=e;if(t&&i){if(s){const e=this.getValueFromSet(i.getSelectedItems());e&&this.setValue(e,!1,!0,!0)}else this.setValue(i.getLastItemHovered(),!1,!0);this.hidePicker()}}getValueFromSet(e){const{multiSelect:t}=this.config;let i=null;for(const s of e){if(1===e.size&&!t){i=s;break}i||(i=[]),i.push(s)}return Array.isArray(i)&&i.sort(),i}onListValueSelected(e,t){const i=this.getValueFromSet(e);this.setValue(i,!1,!0),this.config.multiSelect||this.dispatchPickerEventAndHidePicker(i,t)}dispatchPickerEventAndHidePicker(e,t){const i={type:"fieldPickerValueSelected",fromEnterKey:t,value:e};this.dispatchLocalEvent(i),this.hidePicker()}getFocusableElement(){const{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(e){const{key:t}=e,{isPickerDisplayed:i,config:s,listComponent:n,pickerComponent:r}=this,{allowTyping:o,multiSelect:a,suppressDeselectAll:l}=s;switch(t){case js.LEFT:case js.RIGHT:o&&!this.pillContainer||(e.preventDefault(),this.pillContainer&&(this.listComponent?.highlightIndex(-1),this.pillContainer.onNavigationKeyDown(e)));break;case js.PAGE_HOME:case js.PAGE_END:if(o){e.preventDefault();const i=this.eInput.getInputElement(),s=t===js.PAGE_HOME?0:i.value.length;i.setSelectionRange(s,s);break}case js.PAGE_UP:case js.PAGE_DOWN:e.preventDefault(),r&&n?.navigateToPage(t);break;case js.DOWN:case js.UP:this.onNavigationKeyDown(e,t,(()=>{a&&(this.doWhileBlockingAnnouncement((()=>this.eWrapper.focus())),this.announceAriaValue(this.ariaToggleSelection))}));break;case js.ESCAPE:i&&(ls(this.listComponent.getGui())&&(e.preventDefault(),Ne(e)),this.hidePicker());break;case js.ENTER:this.onEnterKeyDown(e);break;case js.SPACE:if(i&&a&&n){e.preventDefault();const t=n.getLastItemHovered();t&&n.toggleListItemSelection(t)}break;case js.TAB:this.onTabKeyDown();break;case js.DELETE:a&&!l&&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()}},pk=class extends Rs{constructor(e,t,i,s,n){super(),this.dragSourceDropTarget=e,this.ghost=t,this.horizontal=i,this.template=s,this.agComponents=n,this.eText=Is,this.eDragHandle=Is,this.eButton=Is}wireBeans(e){this.dragAndDropService=e.dragAndDropService}postConstruct(){this.setTemplate(this.template??'\n            <span role="option">\n              <span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n              <span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n              <span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n            </span>',this.agComponents);const 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(Ps("columnDrag",this.gos)),this.eButton.appendChild(Ps("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(){const e=this.localeService.getLocaleTextFunc(),t=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(t,e),di(this.getGui(),t.join(". "))}addAdditionalAriaInstructions(e,t){if(this.isRemovable()){const i=t("ariaDropZoneColumnComponentDescription","Press DELETE to remove");e.push(i)}}setupTooltip(){const e=()=>{const e=this.getTooltip();this.setTooltip({newTooltipText:e})};e(),this.addManagedEventListeners({newColumnsLoaded:e})}getDragSourceId(){}getDefaultIconName(){return"notAllowed"}addDragSource(){const{dragAndDropService:e,eDragHandle:t}=this,i=this.createGetDragItem(),s=this.getDefaultIconName(),n={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:t,getDefaultIconName:()=>s,getDragItem:i,dragItemName:this.getDisplayName()};e.addDragSource(n,!0),this.addDestroyFunc((()=>e.removeDragSource(n)))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){Ki(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();const e={type:"columnRemove"};this.addGuiEventListener("keydown",(e=>this.onKeyDown(e))),this.addManagedElementListeners(this.eButton,{click:t=>{this.dispatchLocalEvent(e),t.stopPropagation()}});const t=new ks(this.eButton);this.addManagedListeners(t,{tap:()=>this.dispatchLocalEvent(e)}),this.addDestroyFunc(t.destroy.bind(t))}onKeyDown(e){e.key===js.DELETE&&this.isRemovable()&&(e.preventDefault(),this.dispatchLocalEvent({type:"columnRemove"}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){const e=At(this.getDisplayValue());this.eText.innerHTML=e}
2addElementClasses(e,t){t=t?`-${t}`:"";const i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop-cell${t}`,`ag-column-drop-${i}-cell${t}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}},gk=class extends Rs{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"),ci(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){const{dropZoneTarget:t,dragSource:i}=e;return t.contains(i.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach((e=>e())),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,rs(this.getGui()),rs(this.ePillDropList)}init(e){this.params=e??{},this.createManagedBean(new tr(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.onKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new Jn(this.getGui()),this.createManagedBean(this.positionableFeature),this.refreshGui(),di(this.ePillDropList,this.getAriaLabel())}onTabKeyDown(e){const t=this.focusService.findFocusableElements(this.getFocusableElement(),null,!0),i=t.length;if(0===i)return;const{shiftKey:s}=e,n=K(this.gos),r=n===t[0],o=n===Se(t);1===i||r&&s||o&&!s||t[s?0:i-1].focus()}onKeyDown(e){const{key:t}=e,i=!this.horizontal;let s=t===js.DOWN,n=t===js.UP;if(!i){const e=this.gos.get("enableRtl");s=!e&&t===js.RIGHT||e&&t===js.LEFT,n=!e&&t===js.LEFT||e&&t===js.RIGHT}if(!s&&!n)return;const r=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,n);r&&(e.preventDefault(),r.focus())}addElementClasses(e,t){t=t?`-${t}`:"";const i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop${t}`,`ag-column-drop-${i}${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){const t=this.getNewInsertIndex(e);if(t<0)return!1;const i=this.minimumAllowedNewInsertIndex(),s=Math.max(i,t),n=s!==this.insertIndex;return n&&(this.insertIndex=s),n}getNewInsertIndex(e){const t=e.event,i=this.horizontal?t.clientX:t.clientY,s=this.childPillComponents.map((e=>e.getGui().getBoundingClientRect())),n=s.findIndex((e=>this.horizontal?e.right>i&&e.left<i:e.top<i&&e.bottom>i));if(-1===n){const e=this.gos.get("enableRtl");if(s.every((e=>i>(this.horizontal?e.right:e.bottom))))return e&&this.horizontal?0:this.childPillComponents.length;return s.every((e=>i<(this.horizontal?e.left:e.top)))?e&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=n?n+1:n}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){const t=this.getItems(e.dragSource.getDragItem());this.state="newItemsIn";const i=t.filter((t=>this.isItemDroppable(t,e))),s=i.every((e=>-1!==this.childPillComponents.map((e=>e.getItem())).indexOf(e)));0!==i.length&&(this.potentialDndItems=i,s?this.state="notDragging":(this.handleDragEnterEnd(e),this.checkInsertIndex(e),this.refreshGui()))}isPotentialDndItems(){return Ce(this.potentialDndItems)}handleDragLeaveEnd(e){}onDragLeave(e){if("rearrangeItems"===this.state){const 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){const t=this.getExistingItems().filter((t=>!Ee(e,t)));this.updateItems(t)}addItems(e){if(!e)return;const t=this.getExistingItems().slice(),i=e.filter((e=>t.indexOf(e)<0));Ie(t,i,this.insertIndex),this.updateItems(t)}addItem(e){this.insertIndex=this.getExistingItems().length,this.addItems([e]),this.refreshGui()}rearrangeItems(e){const t=this.getNonGhostItems().slice();return Ie(t,e,this.insertIndex),!we(t,this.getExistingItems())&&(this.updateItems(t),!0)}refreshGui(){const e=this.ePillDropList.scrollTop,t=this.resizeEnabled,i=this.getFocusedItem();let s=this.focusService.findNextFocusableElement();s||(s=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(i,s)}getFocusedItem(){const e=this.getGui(),t=K(this.gos);if(!e.contains(t))return-1;return Array.from(e.querySelectorAll(".ag-column-drop-cell")).indexOf(t)}restoreFocus(e,t){const i=this.getGui(),s=Array.from(i.querySelectorAll(".ag-column-drop-cell"));if(-1===e)return;
20===s.length&&t.focus();const n=s[Math.min(s.length-1,e)];n&&n.focus()}focusList(e){const t=e?this.childPillComponents.length-1:0;this.restoreFocus(t,this.getFocusableElement())}getNonGhostItems(){const e=this.getExistingItems();return this.isPotentialDndItems()?e.filter((e=>!Ee(this.potentialDndItems,e))):e}addItemsToGui(){const e=this.getNonGhostItems().map((e=>this.createItemComponent(e,!1)));if(this.isPotentialDndItems()){const 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()}addAriaLabelsToComponents(){this.childPillComponents.forEach(((e,t)=>{const i=e.getGui();bi(i,t+1),wi(i,this.childPillComponents.length)}))}createItemComponent(e,t){const i=this.createPillComponent(e,this.dropTarget,t,this.horizontal);return i.addEventListener("columnRemove",this.removeItems.bind(this,[e])),this.createBean(i),this.guiDestroyFunctions.push((()=>this.destroyBean(i))),t||this.childPillComponents.push(i),i}addIconAndTitleToGui(){const{title:e,icon:t}=this.params;if(!e||!t)return;const i=document.createElement("div");if(vi(i,!0),this.addElementClasses(i,"title-bar"),this.addElementClasses(t,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),i.appendChild(t),!this.horizontal){const t=document.createElement("span");this.addElementClasses(t,"title"),t.innerHTML=e,i.appendChild(t)}this.appendChild(i)}isExistingItemsEmpty(){return 0===this.getExistingItems().length}addEmptyMessageToGui(){const{emptyMessage:e}=this.params;if(!e||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;const t=document.createElement("span");t.innerHTML=e,this.addElementClasses(t,"empty-message"),this.ePillDropList.appendChild(t)}addArrow(e){if(this.horizontal){const t=Ps(this.gos.get("enableRtl")?"smallLeft":"smallRight",this.gos);this.addElementClasses(t,"cell-separator"),e.appendChild(t)}}};var mk=class e extends Rs{constructor(e){super(function(e){const t=e.cssIdentifier||"default";return`<div class="ag-panel ag-${t}-panel" tabindex="-1">\n        <div data-ref="eTitleBar" class="ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable">\n            <span data-ref="eTitle" class="ag-panel-title-bar-title ag-${t}-panel-title-bar-title"></span>\n            <div data-ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons"></div>\n        </div>\n        <div data-ref="eContentWrapper" class="ag-panel-content-wrapper ag-${t}-panel-content-wrapper"></div>\n    </div>`}(e)),this.config=e,this.closable=!0,this.eContentWrapper=Is,this.eTitleBar=Is,this.eTitleBarButtons=Is,this.eTitle=Is}postConstruct(){const{component:e,closable:t,hideTitleBar:i,title:s,minWidth:n=250,width:r,minHeight:o=250,height:a,centered:l,popup:h,x:c,y:d}=this.config;this.positionableFeature=new Jn(this.getGui(),{minWidth:n,width:r,minHeight:o,height:a,centered:l,x:c,y:d,popup:h,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const u=this.getGui();e&&this.setBodyComponent(e),i?Ki(this.eTitleBar,!1):(s&&this.setTitle(s),this.setClosable(null!=t?t:this.closable)),this.addManagedElementListeners(this.eTitleBar,{mousedown:e=>{if(u.contains(e.relatedTarget)||u.contains(K(this.gos))||this.eTitleBarButtons.contains(e.target))return void e.preventDefault();const t=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");t&&t.focus()}}),h&&this.positionableFeature.isPositioned()||(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){const e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(t){if(t!==this.closable&&(this.closable=t),t){const t=this.closeButtonComp=new Rs(e.CLOSE_BTN_TEMPLATE);this.createBean(t);const i=t.getGui(),s=Ps("close",this.gos);s.classList.add("ag-panel-title-bar-button-icon"),i.appendChild(s),this.addTitleBarButton(t),t.addManagedElementListeners(i,{click:this.onBtClose.bind(this)})}else if(this.closeButtonComp){const 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){const i=this.eTitleBarButtons,s=i.children,n=s.length;null==t&&(t=n),t=Math.max(0,Math.min(t,n)),e.addCssClass("ag-panel-title-bar-button");const r=e.getGui();0===t?i.insertAdjacentElement("afterbegin",r):t===n?i.insertAdjacentElement("beforeend",r):s[t-1].insertAdjacentElement("afterend",r),e.setParentComponent(this)}getBodyHeight(){return Qi(this.eContentWrapper)}getBodyWidth(){return Xi(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const e=this.getGui();e&&ls(e)&&this.close(),super.destroy()}};mk.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>';var fk=mk,vk=class extends fk{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(){const e=this.getGui(),{movable:t,resizable:i,maximizable:s,modal:n,postProcessPopupParams:r}=this.config;if(this.addCssClass("ag-dialog"),super.postConstruct(),r){const{type:t,eventSource:i,column:s,mouseEvent:n,rowNode:o}=r;this.popupService.callPostProcessPopup(t,e,i,n,s,o)}if(this.tabGuardFeature=this.createManagedBean(new kl(this)),this.tabGuardFeature.initialiseTabGuard({isFocusableContainer:!0,onFocusIn:()=>{this.popupService.bringPopupToFront(e)},onTabKeyDown:t=>{if(n)return;const i=t.shiftKey,s=this.focusService.findNextFocusableElement(e,!1,i);s&&!this.tabGuardFeature.getTabGuardCtrl().isTabGuard(s)||this.focusService.focusNextGridCoreContainer(i)&&t.preventDefault()}}),t&&this.setMovable(t),s&&this.setMaximizable(s),i&&this.setResizable(i),!this.config.modal){const{focusService:e}=this;e.addFocusableContainer(this),this.addDestroyFunc((()=>e.removeFocusableContainer(this)))}}setAllowFocus(e){this.tabGuardFeature.getTabGuardCtrl().setAllowFocus(e)}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:i,title:s,afterGuiAttached:n}=this.config,r=this.localeService.getLocaleTextFunc(),o=this.popupService.addPopup({modal:i,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:s||r("ariaLabelDialog","Dialog"),afterGuiAttached:n});o&&(this.close=o.hideFunc)}onClosed(e){this.destroy(),this.config.closedCallback?.(e)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:e,y:t,width:i,height:s}=this.lastPosition;this.setWidth(i),this.setHeight(s),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(){Ki(this.maximizeIcon,!this.isMaximized),Ki(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEac
2h((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)return this.clearMaximizebleListeners(),void(this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0));const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const i=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),i.addManagedElementListeners(i.getGui(),{click:this.toggleMaximize.bind(this)}),this.addTitleBarButton(i,0),this.maximizeListeners.push(...this.addManagedElementListeners(t,{dblclick:this.toggleMaximize.bind(this)})),[this.resizeListenerDestroy]=this.addManagedListeners(this.positionableFeature,{resize:()=>{this.isMaximized=!1,this.refreshMaximizeIcon()}})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new Rs('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=Ps("maximize",this.gos),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=Ps("minimize",this.gos),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}},yk=class extends Nl{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;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){const t=this.getParentComponent(),i=t&&t.getGui();i&&i.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case js.UP:case js.RIGHT:case js.DOWN:case js.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case js.ESCAPE:this.closeIfIsChild()&&Ne(e)}}handleFocusIn(e){const t=e.relatedTarget;(this.tabGuardFeature.getTabGuardCtrl().isTabGuard(t)||!this.getGui().contains(t)&&!this.activeMenuItem?.getSubMenuGui()?.contains(t))&&(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){const t=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(t)||this.activeMenuItem.getSubMenuGui()?.contains(t)||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){null!=e&&an.all(e.map((e=>"separator"===e?an.resolve({eGui:this.createSeparator()}):"string"===typeof e?(h(`unrecognised menu item ${e}`),an.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){const t=this.createManagedBean(new Sk);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(){const e=this.menuItems.filter((e=>!e.isDisabled()))[0];e&&e.activate()}createSeparator(){return hs('\n            <div class="ag-menu-separator" aria-hidden="true">\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n            </div>')}handleNavKey(e){switch(e){case js.UP:case js.DOWN:{const t=this.findNextItem(e===js.UP);return void(t&&t!==this.activeMenuItem&&t.activate())}}e===(this.gos.get("enableRtl")?js.RIGHT:js.LEFT)?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();return!!(t&&t instanceof Sk)&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0)}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=this.menuItems.filter((e=>!e.isDisabled()));if(!t.length)return;if(!this.activeMenuItem)return e?Se(t):t[0];let i;e&&t.reverse();let s=!1;for(let n=0;n<t.length;n++){const e=t[n];if(s){i=e;break}e===this.activeMenuItem&&(s=!0)}return s&&!i?t[0]:i||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}}
2,Ck=class extends Nl{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===js.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout((()=>e.getGui().focus()),0)}},Sk=class extends ze{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){const{menuItemDef:t,isAnotherSubMenuOpen:i,level:s,childComponent:n,contextParams:r}=e;this.params=e.menuItemDef,this.level=s,this.isAnotherSubMenuOpen=i,this.childComponent=n,this.contextParams=r,this.cssClassPrefix=this.params.menuItemParams?.cssClassPrefix??"ag-menu-option";return this.userComponentFactory.getMenuItemCompDetails(this.params,{...t,level:s,isAnotherSubMenuOpen:i,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;const 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!==js.ENTER&&e.key!==js.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(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const i=hs('<div class="ag-menu" role="presentation"></div>');let s;this.eSubMenuGui=i;let n=()=>{this.subMenuIsOpening=!1};if(this.childComponent){const e=this.createBean(new Ck(this.childComponent));e.setParentComponent(this);const t=e.getGui(),r="mouseenter",o=()=>this.cancelDeactivate();t.addEventListener(r,o),s=()=>t.removeEventListener(r,o),i.appendChild(t),this.childComponent.afterGuiAttached&&(n=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){const t=this.createBean(new yk(this.level+1,this.contextParams));t.setParentComponent(this),t.addMenuItems(this.params.subMenu),i.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})}const{popupService:r}=this,o=this.localeService.getLocaleTextFunc(),a=r.addPopup({modal:!0,eChild:i,positionCallback:()=>{const e=this.eGui;r.positionPopupForMenu({eventSource:e,ePopup:i});const{column:s,node:n}=this.contextParams;r.callPostProcessPopup("subMenu",i,e,t instanceof MouseEvent?t:void 0,s,n)},anchorToElement:this.eGui,ariaLabel:o("ariaLabelSubMenu","SubMenu"),afterGuiAttached:n});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{a&&a.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),s(),this.menuItemComp.setExpanded?.(!1),this.eSubMenuGui=void 0},this.menuItemComp.setExpanded?.(!0)}setAriaExpanded(e){this.suppressAria||Ci(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){const t={type:"closeMenu"};e&&(e instanceof MouseEvent?t.mouseEvent=e:t.keyboardEvent=e),this.dispatchLocalEvent(t)}onItemActivated(){const e={type:"menuItemActivated",menuItem:this};this.dispatchLocalEvent(e)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout((()=>this.activate(!0)),this.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout((()=>this.deactivate()),this.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){if(!this.menuItemComp)return void setTimeout((()=>this.configureDefaults(e)));let t=this.menuItemComp.getGui();const i=this.menuItemComp.getRootElement?.();i&&(e?.suppressRootStyles||t.classList.add("ag-menu-option-custom"),t=i),this.eGui=t,this.suppressRootStyles=!!e?.suppressRootStyles,this.suppressRootStyles||(t.classList.add(this.cssClassPrefix),this.params.cssClasse
2s?.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||(ci(t,"treeitem"),mi(t,this.level+1),this.params.disabled&&fi(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 Ms({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t})))}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.menuItemComp?.destroy?.(),super.destroy()}},wk="ag-list-item-hovered",bk=class extends ze{constructor(e,t,i){super(),this.comp=e,this.virtualList=t,this.params=i,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(){const e={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()};this.dragAndDropService.addDropTarget(e)}createAutoScrollService(){const e=this.virtualList.getGui();this.autoScrollService=new Vn({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const t=this.getListDragItem(e),i=this.virtualList.getComponentAt(t.rowIndex);if(!i)return;const s=i.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,ji(s,wk),ji(s,`ag-item-highlight-${t.position}`))}getListDragItem(e){const t=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(t).paddingTop),s=this.virtualList.getRowHeight(),n=this.virtualList.getScrollTop(),r=Math.max(0,(e.y-i+n)/s),o=this.params.getNumRows(this.comp)-1,a=0|Math.min(o,r);return{rowIndex:a,position:Math.round(r)>r||r>o?"bottom":"top",component:this.virtualList.getComponentAt(a)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearDragProperties())}onDragCancel(){this.clearDragProperties()}onDragLeave(){this.clearDragProperties()}clearDragProperties(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${wk}`).forEach((e=>{[wk,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach((t=>{e.classList.remove(t)}))})),this.lastHoveredListItem=null}};var xk=class extends Nl{constructor(e){var t;super(`<div class="ag-tabs ${t=e.cssClass}">\n        <div data-ref="eHeader"></div>\n        <div data-ref="eBody" role="presentation" class="ag-tabs-body ${t?`${t}-body`:""}"></div>\n    </div>`),this.eHeader=Is,this.eBody=Is,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(){const{enableCloseButton:e,cssClass:t}=this.params,i=(e,i)=>{e.classList.add(`ag-tabs-${i}`),t&&e.classList.add(`${t}-${i}`)};e?(this.setupCloseButton(i),this.eTabHeader=j(this.gos).createElement("div"),i(this.eHeader,"header-wrapper"),ci(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,ci(this.eTabHeader,"tablist"),i(this.eTabHeader,"header")}setupCloseButton(e){const t=j(this.gos),i=t.createElement("button");e(i,"close-button");const s=Ps("close",this.gos,void 0,!0);di(i,this.params.closeButtonAriaLabel),i.appendChild(s),this.addManagedElementListeners(i,{click:()=>this.params.onCloseClicked?.()});const n=t.createElement("div");e(n,"close-button-wrapper"),ci(n,"presentation"),n.appendChild(i),this.eHeader.appendChild(n),this.eCloseButton=i}
2handleKeyDown(e){switch(e.key){case js.RIGHT:case js.LEFT:{if(!this.eTabHeader.contains(K(this.gos)))return;const t=e.key===js.RIGHT,i=this.gos.get("enableRtl"),s=this.items.indexOf(this.activeItem),n=t!==i?Math.min(s+1,this.items.length-1):Math.max(s-1,0);if(s===n)return;e.preventDefault();const r=this.items[n];this.showItemWrapper(r),r.eHeaderButton.focus();break}case js.UP:case js.DOWN:e.stopPropagation()}}onTabKeyDown(e){if(e.defaultPrevented)return;const{focusService:t,eHeader:i,eBody:s,activeItem:n,params:r}=this,{suppressTrapFocus:o,enableCloseButton:a}=r,l=K(this.gos),h=e.target,c=e.shiftKey;if(i.contains(l))return e.preventDefault(),void(a&&c&&!this.eCloseButton?.contains(l)?this.eCloseButton?.focus():o&&c?this.focusService.findFocusableElementBeforeTabGuard(j(this.gos).body,h)?.focus():this.focusBody(e.shiftKey));let d=null;t.isTargetUnderManagedComponent(s,h)&&(c&&(d=this.focusService.findFocusableElementBeforeTabGuard(s,h)),d||o||(d=n.eHeaderButton)),d||!s.contains(l)||(d=t.findNextFocusableElement(s,!1,c),d)?d&&(e.preventDefault(),d.focus()):o&&!c?this.forceFocusOutOfContainer(c):a&&!c?(e.preventDefault(),this.eCloseButton?.focus()):(e.preventDefault(),this.focusHeader())}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){const t=document.createElement("span");ci(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eTabHeader.appendChild(t),di(t,e.titleLabel);const i={tabbedItem:e,eHeaderButton:t};this.items.push(i),t.addEventListener("click",this.showItemWrapper.bind(this,i))}showItem(e){const t=this.items.find((t=>t.tabbedItem===e));t&&this.showItemWrapper(t)}showItemWrapper(e){const{tabbedItem:t,eHeaderButton:i}=e;this.params.onItemClicked?.({item:t}),this.activeItem!==e?(this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),rs(this.eBody),t.bodyPromise.then((e=>{this.eBody.appendChild(e);const i=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,i),t.afterAttachedCallback&&t.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const i=t.getScrollableContainer&&t.getScrollableContainer()||e;[this.lastScrollListener]=this.addManagedElementListeners(i,{scroll:()=>{this.tabbedItemScrollMap.set(t.name,i.scrollTop)}});const s=this.tabbedItemScrollMap.get(t.name);void 0!==s&&setTimeout((()=>{i.scrollTop=s}),0)}})),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),this.activeItem.tabbedItem.afterDetachedCallback?.()),i.classList.add("ag-tab-selected"),this.activeItem=e):this.params.onActiveItemClicked?.()}},Mk=class extends ze{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,i,s,n,r,o){this.params=o,this.eGui=t,this.eCheckbox=i,this.eExpanded=s,this.eContracted=n,this.comp=e,this.compClass=r;const{node:a,colDef:l}=o,h=this.isTopLevelFooter();if(!h){if(this.isEmbeddedRowMismatch())return;if(a.footer&&this.gos.get("groupHideOpenParents")){if((l&&l.showRowGroup)!==(a.rowGroupColumn&&a.rowGroupColumn.getColId()))return}}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!h){const e=o.node.footer&&o.node.rowGroupIndex===this.funcColsService.getRowGroupColumns().findIndex((e=>e.getColId()===o.colDef?.showRowGroup)),t="multipleColumns"!=this.gos.get("groupDisplayType")||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!o.node.footer&&(!o.node.group||null!=o.node.rowGroupIndex&&o.node.rowGroupIndex>this.funcColsService.getRowGroupColumns().findIndex((e=>e.getColId()===o.colDef?.showRowGroup))),i=!a.group&&(this.params.colDef?.field||this.params.colDef?.valueGetter),s=this.isExpandable(),n=this.columnModel.isPivotMode()&&a.leafGroup&&a.rowGroupColumn?.getColId()===o.column?.getColDef().showRowGroup;if(!this.showingValueForOpenedParent&&!s&&!i&&!t&&!e&&!n)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}getCellAriaRole(){const e=this.params.colDef?.cellAriaRole,t=this.params.column?.getColDef().cellAriaRole;return e||t||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){const{node:e,eGridCell:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable())return void Si(t);const i=()=>{Ci(t,this.showingValueForOpenedParent||!!e.expanded)};[this.expandListener]=this.addManagedListeners(e,{expandedChanged:i})||null,i()}
2isTopLevelFooter(){if(!X(this.gos))return!1;if(null!=this.params.value||-1!=this.params.node.level)return!1;const e=this.params.colDef;if(null==e)return!0;if(!0===e.showRowGroup)return!0;const t=this.funcColsService.getRowGroupColumns();if(!t||0===t.length)return!0;return t[0].getId()===e.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;const e="left"===this.params.pinned,t="right"===this.params.pinned,i=!e&&!t;return this.gos.get("enableRtl")?this.visibleColsService.isPinningLeft()?!t:!i:this.visibleColsService.isPinningLeft()?!e:!i}findDisplayedGroupNode(){const e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let i=t.parent;for(;null!=i;){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break}i=i.parent}}b(this.displayedGroupNode)&&(this.displayedGroupNode=t)}setupShowingValueForOpenedParent(){const e=this.params.node,t=this.params.column;if(!this.gos.get("groupHideOpenParents"))return void(this.showingValueForOpenedParent=!1);if(!e.groupData)return void(this.showingValueForOpenedParent=!1);if(null!=e.rowGroupColumn){const i=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(i))return void(this.showingValueForOpenedParent=!1)}const i=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=i}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){const e=this.adjustParamsWithDetailsFromRelatedColumn(),t=this.getInnerCompDetails(e),{valueFormatted:i,value:s}=e;let n=i;if(null==n){const e=this.displayedGroupNode.rowGroupColumn&&this.params.column?.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId());if(""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&e){n=this.localeService.getLocaleTextFunc()("blanks","(Blanks)")}else n=s??null}this.comp.setInnerRenderer(t,n)}adjustParamsWithDetailsFromRelatedColumn(){const e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(null!=t){if(!t.isRowGroupDisplayed(e.getId()))return this.params}const i=this.params,{value:s,node:n}=this.params;return{...i,valueFormatted:this.valueService.formatValue(e,n,s)}}addFooterValue(){let e=this.params.totalValueGetter;if(!e){const t=this.params.footerValueGetter;t&&(e=t,h("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let t="";if(e){const i=tt(this.params);i.value=this.params.value,"function"===typeof e?t=e(i):"string"===typeof e?t=this.expressionService.evaluate(e,i):h("footerValueGetter should be either a function or a string (expression)")}else{t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(null!=this.params.value?this.params.value:"")}const i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,t)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);const t=this.userComponentFactory.getInnerRendererDetails(e,e),i=e=>e&&e.componentClass==this.compClass;if(t&&!i(t))return t;const s=this.displayedGroupNode.rowGroupColumn,n=s?s.getColDef():void 0;if(!n)return;const r=this.userComponentFactory.getCellRendererDetails(n,e);if(r&&!i(r))return r;if(i(r)&&n.cellRendererParams&&n.cellRendererParams.innerRenderer){return this.userComponentFactory.getInnerRendererDetails(n.cellRendererParams,e)}}addChildCount(){this.params.suppressCount||(this.addManagedListeners(this.displayedGroupNode,{allChildrenCountChanged:this.updateChildCount.bind(this)}),this.updateChildCount())}updateChildCount(){const e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?`(${e})`:"";this.comp.setChildCount(t)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;const e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;const t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())}addExpandAndContract(){const e=this.params,t=(e,t)=>{const i=Ps(e,this.gos,null);i&&(t.appendChild(i),this.addDestroyFunc((()=>t.removeChild(i))))};t("groupExpanded",this.eExpanded),t("groupContracted",this.eContracted);const i=e.eGridCell;this.params.column?.isCellEditable(e.node)&&this.gos.get("enableGroupEdit")||!this.isExpandable()||e.suppressDoubleClickExpand||this.addManagedListeners(i,{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(i,{keydown:this.onKeyDown.bind(this)}),this.addManagedListeners(e.node,{expandedChanged:this.showExpandAndContractIcons.bind(this)}),this.showExpandAndContractIcons();const s=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListeners(this.displayedGroupNode,{allChildrenCountChanged:s,masterChanged:s,groupChanged:s,hasChildrenChanged:s})}onExpandClicked(e){Oe(e)||(Ne(e),this.onExpandOrContract(e))}onExpandOrContract(e){const t=this.displayedGroupNode,i=!t.expanded;!i&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(i,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature
2().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;const e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;const i=this.params.column;if(null!=i&&"string"===typeof i.getColDef().showRowGroup){return this.isShowRowGroupForThisRow()}return!0}showExpandAndContractIcons(){const{params:e,displayedGroupNode:t,columnModel:i}=this,{node:s}=e,n=this.isExpandable();if(n){const e=!!this.showingValueForOpenedParent||s.expanded;this.comp.setExpandedDisplayed(e),this.comp.setContractedDisplayed(!e)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);const r=i.isPivotMode(),o=r&&t.leafGroup,a=n&&!o,l=s.footer&&-1===s.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",a),this.comp.addOrRemoveCssClass("ag-row-group",a),r?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",!!o):l||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!a)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){const e=this.params.node;this.params.suppressPadding||(this.addManagedListeners(e,{uiLevelChanged:this.setIndent.bind(this)}),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;const e=this.params,t=e.node,i=!!e.colDef,s=this.gos.get("treeData"),n=!i||s||!0===e.colDef.showRowGroup?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+n,this.comp.addOrRemoveCssClass(this.indentClass,!0),this.eGui.style.setProperty("--ag-indentation-level",String(n))}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;const e=new Wn((()=>this.params.value),this.params.node);this.createManagedBean(e),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){const e=this.params.checkbox;return"function"===typeof e||!0===e}addCheckboxIfNeeded(){const e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){const e=new ea;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){if(!(e.key===js.ENTER)||this.params.suppressEnterExpand)return;this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){if(Oe(e))return;Ve(this.eExpanded,e)||Ve(this.eContracted,e)||this.onExpandOrContract(e)}},Dk=class extends Rs{constructor(){super('<span class="ag-cell-wrapper">\n        <span class="ag-group-expanded" data-ref="eExpanded"></span>\n        <span class="ag-group-contracted" data-ref="eContracted"></span>\n        <span class="ag-group-checkbox ag-invisible" data-ref="eCheckbox"></span>\n        <span class="ag-group-value" data-ref="eValue"></span>\n        <span class="ag-group-child-count" data-ref="eChildCount"></span>\n    </span>'),this.eExpanded=Is,this.eContracted=Is,this.eCheckbox=Is,this.eValue=Is,this.eChildCount=Is}init(e){const t={setInnerRenderer:(e,t)=>this.setRenderDetails(e,t),setChildCount:e=>this.eChildCount.textContent=e,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setContractedDisplayed:e=>Ki(this.eContracted,e),setExpandedDisplayed:e=>Ki(this.eExpanded,e),setCheckboxVisible:e=>this.eCheckbox.classList.toggle("ag-invisible",!e)},i=this.createManagedBean(new Mk),s=!e.colDef,n=this.getGui();i.init(t,n,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),s&&ci(n,i.getCellAriaRole())}setRenderDetails(e,t){if(e){const t=e.newAgStackInstance();if(null==t)return;t.then((e=>{if(!e)return;const 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}};var Ik={ariaAdvancedFilterBuilderItem:e=>`${e[0]}. Level ${e[1]}. Press ENTER to edit`,ariaAdvancedFilterBuilderItemValidation:e=>`${e[0]}. Level ${e[1]}. ${e[2]} Press ENTER to edit`,ariaAdvancedFilterBuilderList:"Advanced Filter Builder List",ariaAdvancedFilterBuilderFilterItem:"Filter Condition",ariaAdvancedFilterBuilderGroupItem:"Filter Group",ariaAdvancedFilterBuilderColumn:"Column",ariaAdvancedFilterBuilderOption:"Option",ariaAdvancedFilterBuilderValue:"Value",ariaAdvancedFilterBuilderJoinOperator:"Join Operator",ariaAdvancedFilterInput:"Advanced Filter Input",ariaLabelAdvancedFilterAutocomplete:"Advanced Filter Autocomplete",advancedFilterContains:"contains",advancedFilterNotContains:"does not contain",advancedFilterTextEquals:"equals",advancedFilterTextNotEqual:"does not equal",advancedFilterStartsWith:"begins with",advancedFilterEndsWith:"ends with",advancedFilterBlank:"is blank",advancedFilterNotBlank:"is not blank",advancedFilterEquals:"=",advancedFilterNotEqual:"!=",advancedFilterGreaterThan:">",advancedFilterGreaterThanOrEqual:">=",advancedFilterLessThan:"<",advancedFilterLessThanOrEqual:"<=",advancedFilterTrue:"is true",advancedFilterFalse:"is false",advancedFilterAnd:"AND",advancedFilterOr:"OR",advancedFilterApply:"Apply",advancedFilterBuilder:"Builder",advancedFilterValidationMissingColumn:"Column is missing",advancedFilterValidationMissingOption:"Option is missing",advancedFilterValidationMissingValue:"Value is missing",advancedFilterValidationInvalidColumn:"Column not found",advancedFilterValidationInvalidOption:"Option not found",advancedFilterValidationMissingQuote:"Value is missing an end quote",advancedFilterValidationNotANumber:"Value is not a number",advancedFilterValidationInvalidDate:"Value is not a valid date",advancedFilterValidationMissingCondition:"Condition is missing",advancedFilterValidationJoinOperatorMismatch:"Join operators within a condition must be the same",advancedFilterValidationInvalidJoinOperator:"Join operator not found",advancedFilterValidationMissingEndBracket:"Missing end bracket",advancedFilterValidationExtraEndBracket:"Too many end brackets",advancedFilterValidationMessage:e=>`Expression has an error. ${e[0]} - ${e[1]}.`,advancedFilterValidationMessageAtEnd:e=>`Expression has an error. ${e[0]} at end of expression.`,advancedFilterBuilderTitle:"Advanced Filter",advancedFilterBuilderApply:"Apply",advancedFilterBuilderCancel:"Cancel",advancedFilterBuilderAddButtonTooltip:"Add Filter or Group",advancedFilterBuilderRemoveButtonTooltip:"Remove",advancedFilterBuilderMoveUpButtonTooltip:"Move Up",advancedFilterBuilderMoveDownButtonTooltip:"Move Down",advancedFilterBuilderAddJoin:"Add Group",advancedFilterBuilderAddCondition:"Add Filter",advancedFilterBuilderSelectColumn:"Select a column",advancedFilterBuilderSelectOption:"Select an option",advancedFilterBuilderEnterValue:"Enter a value...",advancedFilterBuilderValidationAlreadyApplied:"Current filter already applied.",advancedFilterBuilderValidationIncomplete:"Not all c
2onditions are complete.",advancedFilterBuilderValidationSelectColumn:"Must select a column.",advancedFilterBuilderValidationSelectOption:"Must select an option.",advancedFilterBuilderValidationEnterValue:"Must enter a value."};function Rk(e,t,i){if(!e)return"";const s=i-t;return s?e.slice(0,e.length-s):e}function Ek(e,t,i,s,n,r,o){const a=i+(!e.length||o?0:1);let l=0;n&&(" "===e[a]?l=1:(s+=" ",r&&(s+='"')));return{updatedValue:e.slice(0,t)+s+e.slice(a),updatedPosition:t+s.length+l}}function Ak(e,t,i,s){let n=t,r=!1;for(;n<e.length;){const t=e[n];if("("===t){s&&" "===e[n-1]?r=!0:n-=1;break}if(" "===t||i&&")"===t){n-=1;break}n++}return{endPosition:n,isEmpty:r}}function Tk(e,t,i,s){i!==t&&(e.expression=Ek(e.expression,s-t.length+1,s,i).updatedValue)}var Pk=class{constructor(e,t){this.params=e,this.startPosition=t,this.type="column",this.valid=!0,this.hasStartChar=!1,this.hasEndChar=!1,this.colName=""}parse(e,t){if(e!==kk.COL_START_CHAR||this.colName)if(e===kk.COL_END_CHAR&&this.hasStartChar){if(this.parseColumn(!1,t))return this.hasEndChar=!0,!1;this.colName+=e}else this.colName+=e;else this.hasStartChar=!0}getDisplayValue(){return(this.hasStartChar?kk.COL_START_CHAR:"")+this.colName+(this.hasEndChar?kk.COL_END_CHAR:"")}getColId(){return this.colId}complete(e){this.parseColumn(!0,e)}getValidationError(){return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidColumn"),startPosition:this.startPosition,endPosition:this.endPosition??this.params.expression.length-1}}parseColumn(e,t){this.endPosition=t;const i=this.params.advancedFilterExpressionService.getColId(this.colName);return i&&this.hasStartChar&&(this.colId=i.colId,Tk(this.params,this.colName,i.columnName,t-1),this.colName=i.columnName,this.column=this.params.columnModel.getColDefCol(this.colId),this.column)?(this.baseCellDataType=this.params.dataTypeService?.getBaseDataType(this.column)??"text",!0):(e&&(this.valid=!1),this.baseCellDataType="text",!1)}},Lk=class{constructor(e,t,i){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.type="operator",this.valid=!0,this.expectedNumOperands=0,this.operator=""}parse(e,t){if(" "===e||")"===e){if(this.parseOperator(!1,t-1))return!0;this.operator+=e}else this.operator+=e}complete(e){this.parseOperator(!0,e)}getValidationError(){return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidOption"),startPosition:this.startPosition,endPosition:this.endPosition??this.params.expression.length-1}}getDisplayValue(){return this.operator}getOperatorKey(){return this.parsedOperator}parseOperator(e,t){const i=this.params.advancedFilterExpressionService.getDataTypeExpressionOperator(this.baseCellDataType),s=i.findOperator(this.operator);if(this.endPosition=t,s){this.parsedOperator=s;const e=i.operators[s];this.expectedNumOperands=e.numOperands;const n=e.displayValue;return Tk(this.params,this.operator,n,t),this.operator=n,!0}return!e&&null===s||(this.valid=!1),!1}},Fk=class{constructor(e,t,i,s){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.column=s,this.type="operand",this.valid=!0,this.operand="",this.validationMessage=null}parse(e,t){if(" "===e){if(!this.quotes)return this.parseOperand(!1,t),!0;this.operand+=e}else if(")"===e){if("number"===this.baseCellDataType||!this.quotes)return this.parseOperand(!1,t-1),!0;this.operand+=e}else if(this.operand||this.quotes||"'"!==e&&'"'!==e){if(this.quotes&&e===this.quotes)return this.parseOperand(!1,t),!1;this.operand+=e}else this.quotes=e}complete(e){this.parseOperand(!0,e)}getValidationError(){return this.validationMessage?{message:this.validationMessage,startPosition:this.startPosition,endPosition:this.endPosition??this.params.expression.length-1}:null}getRawValue(){return this.operand}getModelValue(){return this.modelValue}parseOperand(e,t){const{advancedFilterExpressionService:i}=this.params;if(this.endPosition=t,this.modelValue=this.operand,e&&this.quotes)this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationMissingQuote");else if(""===this.modelValue)this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationMissingValue");else{const e=i.getOperandModelValue(this.operand,this.baseCellDataType,this.column);switch(null!=e&&(this.modelValue=e),this.baseCellDataType){case"number":(this.quotes||isNaN(this.modelValue))&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationNotANumber"));break;case"date":case"dateString":null==e&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationInvalidDate"))}}}},kk=class{constructor(e,t){this.params=e,this.startPosition=t,this.isAwaiting=!0}parseExpression(){let e=this.startPosition;const{expression:t}=this.params;for(;e<t.length;){const i=t[e];if(" "===i&&this.isAwaiting);else{if(this.isAwaiting=!1,!this.parser){let t;this.columnParser?this.operatorParser?(this.operandParser=new Fk(this.params,e,this.columnParser.baseCellDataType,this.columnParser.column),t=this.operandParser):(this.operatorParser=new Lk(this.params,e,this.columnParser.baseCellDataType),t=this.operatorParser):(this.columnParser=new Pk(this.params,e),t=this.columnParser),this.parser=t}const t=this.parser.parse(i,e);if(null!=t){if(this.isComplete())return this.returnEndPosition(t?e-1:e,!0);this.parser=void 0,this.isAwaiting=!0}}e++}return this.parser?.complete?.(e-1),this.returnEndPosition(e)}isValid(){return this.isComplete()&&this.columnParser.valid&&this.operatorParser.valid&&(!this.operandParser||this.operandParser.valid)}getValidationError(){const e=this.columnParser?.getValidationError()??this.operatorParser?.getValidationError()??this.operandParser?.getValidationError();if(e)return e;const t=this.params.expression.length;let i;return this.columnParser?this.operatorParser?this.operatorParser.expectedNumOperands&&!this.operandParser&&(i="advancedFilterValidationMissingValue"):i="advancedFilterValidationMissingOption":i="advancedFilterValidationMissingColumn",i?{message:this.params.advancedFilterExpressionService.translate(i),startPosition:t,endPosition:t}:null}getFunctionString(e){return this.getFunctionCommon(e,((e,t,i,s)=>`params.operators[${t}].evaluator(expressionProxy.getValue('${i.replace(/(['"])/,"\\$1")}', node), node, params.evaluatorParams[${s}]${null==e?"":`, params.operands[${e}]`})`))}getFunctionParsed(e){return this.getFunctionCommon(e,((e,t,i,s)=>(n,r,o)=>
2o.operators[t].evaluator(n.getValue(i,r),r,o.evaluatorParams[s],null==e?void 0:o.operands[e])))}getAutocompleteListParams(e){return this.isColumnPosition(e)?this.getColumnAutocompleteListParams(e):this.isOperatorPosition(e)?this.getOperatorAutocompleteListParams(e):this.isBeyondEndPosition(e)?void 0:{enabled:!1}}updateExpression(e,t,i){const{expression:s}=this.params;if(this.isColumnPosition(e))return Ek(this.params.expression,this.startPosition,this.columnParser?.getColId()?this.columnParser.endPosition:Ak(s,e).endPosition,this.params.advancedFilterExpressionService.getColumnValue(t),!0);if(this.isOperatorPosition(e)){const n=this.getBaseCellDataTypeFromOperatorAutocompleteType(i),r=this.hasOperand(n,t.key),o=r&&this.doesOperandNeedQuotes(n);let a;if(null!=this.operatorParser?.startPosition&&e<this.operatorParser.startPosition)a=Ek(s,e,e,t.displayValue??t.key,r,o);else{let i,n=!1;if(this.operatorParser?.getOperatorKey())i=this.operatorParser.endPosition;else{const{endPosition:t,isEmpty:r}=Ak(s,e,!0,!0);i=t,n=r}a=Ek(s,function(e,t,i){let s=t;for(;s<i&&" "===e[s];)s++;return s}(s,this.columnParser.endPosition+1,i),i,t.displayValue??t.key,r,o,n)}return{...a,hideAutocomplete:!r}}return null}getModel(){const e=this.columnParser.getColId(),t={filterType:this.columnParser.baseCellDataType,colId:e,type:this.operatorParser.getOperatorKey()};return this.operatorParser.expectedNumOperands&&(t.filter=this.operandParser.getModelValue()),t}getFunctionCommon(e,t){const i=this.columnParser.getColId(),s=this.operatorParser?.getOperatorKey(),{operators:n,evaluatorParams:r,operands:o}=e,a=this.params.advancedFilterExpressionService.getExpressionOperator(this.columnParser.baseCellDataType,s),l=this.addToListAndGetIndex(n,a),h=this.params.advancedFilterExpressionService.getExpressionEvaluatorParams(i),c=this.addToListAndGetIndex(r,h);return t(0===this.operatorParser?.expectedNumOperands?void 0:this.addToListAndGetIndex(o,this.getOperandValue()),l,i,c)}getOperandValue(){let e=this.operandParser.getRawValue();const{baseCellDataType:t,column:i}=this.columnParser;switch(t){case"number":e=Number(e);break;case"date":case"dateString":e=this.params.valueService.parseValue(i,null,e,void 0)}if("dateString"===t){const{dataTypeService:t}=this.params;return t?t.getDateParserFunction(i)(e):e}return e}isComplete(){return!(!this.operatorParser||!(!this.operatorParser.expectedNumOperands||this.operatorParser.expectedNumOperands&&this.operandParser))}isColumnPosition(e){return!this.columnParser||null==this.columnParser.endPosition||e<=this.columnParser.endPosition+1}isOperatorPosition(e){return!this.operatorParser||null==this.operatorParser.endPosition||e<=this.operatorParser.endPosition+1}isBeyondEndPosition(e){return this.isComplete()&&null!=this.endPosition&&e>this.endPosition+1&&this.endPosition+1<this.params.expression.length}returnEndPosition(e,t){return this.endPosition=t?e:e-1,e}getColumnAutocompleteListParams(e){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column",this.getColumnSearchString(e))}getColumnSearchString(e){const t=this.columnParser?.getDisplayValue()??"",i=Rk(t,e,null==this.columnParser?.endPosition?this.params.expression.length:this.columnParser.endPosition+1),s=this.columnParser?.hasStartChar&&i.length>0,n=this.columnParser?.hasEndChar&&i.length===t.length+2;return s?i.slice(1,n?-1:void 0):i}getOperatorAutocompleteListParams(e){const t=this.columnParser?.column;if(!t)return{enabled:!1};const i=this.columnParser.baseCellDataType,s=null!=this.operatorParser?.startPosition&&e<this.operatorParser.startPosition?"":Rk(this.operatorParser?.getDisplayValue()??"",e,null==this.operatorParser?.endPosition?this.params.expression.length:this.operatorParser.endPosition+1);return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getOperatorAutocompleteEntries(t,i),`operator-${i}`,s)}getBaseCellDataTypeFromOperatorAutocompleteType(e){return e?.replace("operator-","")}hasOperand(e,t){return!e||!t||(this.params.advancedFilterExpressionService.getExpressionOperator(e,t)?.numOperands??0)>0}doesOperandNeedQuotes(e){return"number"!==e}addToListAndGetIndex(e,t){const i=e.length;return e.push(t),i}};function Nk(e,t,i){let s=!1;const n=e.toLocaleLowerCase(),r=n+" ",o=Object.entries(t).find((e=>{let[,t]=e;const o=i(t).toLocaleLowerCase();return o.startsWith(r)&&(s=!0),o===n}));return o?o[0]:s?null:void 0}function Ok(e,t){return(t??Object.keys(e)).map((t=>({key:t,displayValue:e[t].displayValue})))}kk.COL_START_CHAR="[",kk.COL_END_CHAR="]";var Gk=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return Ok(this.operators,e)}findOperator(e){return Nk(e,this.operators,(e=>{let{displayValue:t}=e;return t}))}initOperators(){const{translate:e}=this.params;this.operators={contains:{displayValue:e("advancedFilterContains"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!1,((e,t)=>e.includes(t))),numOperands:1},notContains:{displayValue:e("advancedFilterNotContains"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!0,((e,t)=>!e.includes(t))),numOperands:1},equals:{displayValue:e("advancedFilterTextEquals"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!1,((e,t)=>e===t)),numOperands:1},notEqual:{displayValue:e("advancedFilterTextNotEqual"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!0,((e,t)=>e!=t)),numOperands:1},startsWith:{displayValue:e("advancedFilterStartsWith"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!1,((e,t)=>e.startsWith(t))),numOperands:1},endsWith:{displayValue:e("advancedFilterEndsWith"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!1,((e,t)=>e.endsWith(t))),numOperands:1},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e||"string"===typeof e&&0===e.trim().length,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e&&("string"!==typeof e||e.trim().length>0),numOperands:0}}}evaluateExpression(e,t,i,s,n,r){return null==e?n:i.caseSensitive?r(i.valueConverter(e,t),s):r(i.valueConverter(e,t).toLocaleLowerCase(),s.toLocaleLowerCase())}},Bk=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return Ok(this.operators,e)}findOperator(e){return Nk(e,this.operators,(e=>{let{displayValue:t}=e;return t}))}initOperators(){const{translate:e,equals:t}=this.params;this.operators={equals:{displayValue:e("advancedFilterEquals"),evaluator:(e,i,s,n)=>this.evaluateSingleOperandExpression(e,i,s,n,!!s.includeBlanksInEquals,t),numOperands:1},notEqual:{displayValue:e("advancedFilterNotEqual"),evaluator:(e,i,s,n)=>this.evaluateSingleOperandExpression(e,i,s,n,!!s.includeBlanksInEquals,((e,i)=>!t(e,i))),numOperands:1},greaterThan:{displayValue:e("advancedFilterGreaterThan"),evaluator:(e,t,i,s)=>this.evaluateSingleOperandExpression(e,t,i,s,!!i.includeBlanksInGreaterThan,((e,t)=>e>t)),numOperands:1},greaterThanOrEqual:{displayValue:e("advancedFilterGreaterThanOrEqual"),evaluator:(e,t,i,s)=>this.evaluateSingleOperandExpression(e,t,i,s,!!i.includeBlanksInGreaterThan,((e,t)=>e>=t)),numOperands:1},lessThan:{displayValue:e("advancedFilterLessThan"),evaluator:(e,t,i,s)=>this.evaluateSingleOperandExpression(e,t,i,s,!!i.includeBlanksInLessThan,((e,t)=>e<t)),numOperands:1},lessThanOrEqual:{displayValue:e("advancedFilterLessThanOrEqual"),evaluator:(e,t,i,s)=>this.evaluateSingleOperandExpression(e,t,i,s,!!i.includeBlanksInLessThan,((e,t)=>e<=t)),numOperands:1},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e,numOperands:0}}}evaluateSingleOperandExpression(e,t,i,s,n,r){return null==e?n:r(i.valueConverter(e,t),s)}},Vk=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return Ok(this.operators,e)}findOperator(e){return Nk(e,this.operators,(e=>{let{displayValue:t}=e;return t}))}initOperators(){const{translate:e}=this.params;this.operators={true:{displayValue:e("advancedFilterTrue"),evaluator:e=>!!e,numOperands:0},false:{displayValue:e("advancedFilterFalse"),evaluator:e=>!1===e,numOperands:0},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e,numOperands:0}}}},zk=class extends Rs{constructor(){super('\n        <div class="ag-autocomplete-row" role="presentation">\n            <div class="ag-autocomplete-row-label"></div>\n        </div>'),this.hasHighlighting=!1}setState(e,t){this.value=e,this.render(),this.updateSelected(t)}updateSelected(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)}setSearchString(e){let t=!1;if(w(e)){const i=this.value?.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(i>=0){t=!0,this.hasHighlighting=!0;const s=i+e.length,n=At(this.value.slice(0,i)),r=At(this.value.slice(i,s)),o=At(this.value.slice(s));this.getGui().lastElementChild.innerHTML=`${n}<b>${r}</b>${o}`}}
2!t&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){this.getGui().lastElementChild.innerHTML=At(this.value)??"&nbsp;"}},Hk=class extends tn{constructor(e){super('<div class="ag-autocomplete-list-popup">\n            <div data-ref="eList" class="ag-autocomplete-list"></div>\n        <div>'),this.params=e,this.eList=Is,this.searchString=""}destroy(){super.destroy()}postConstruct(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new lk({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:e=>this.autocompleteEntries[e]});const e=this.virtualList.getGui();this.addManagedListeners(e,{click:()=>this.params.onConfirmed(),mousemove:this.onMouseMove.bind(this),mousedown:e=>e.preventDefault()}),this.setSelectedValue(0)}onNavigationKeyDown(e,t){e.preventDefault();const i=this.autocompleteEntries.indexOf(this.selectedValue),s=t===js.UP?i-1:i+1;this.checkSetSelectedValue(s)}setSearch(e){this.searchString=e,w(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(e,t){let i,s=!1;const n=e.toLocaleLowerCase(),r=t.filter((e=>{const t=e.toLocaleLowerCase().indexOf(n),r=0===t,o=t>=0;return o&&(!i||!s&&r||s===r&&e.length<i.length)&&(i=e,s=r),o}));return!i&&r.length&&(i=r[0]),{topMatch:i,allMatches:r}}runSearch(){const{autocompleteEntries:e}=this.params,t=e.map((e=>e.displayValue??e.key));let i,s;if(this.params.useFuzzySearch)i=nn({inputValue:this.searchString,allSuggestions:t,hideIrrelevant:!0,addSequentialWeight:!0}).values,s=i.length?i[0]:void 0;else{const e=this.runContainsSearch(this.searchString,t);i=e.allMatches,s=e.topMatch}let n=e.filter((e=>{let{key:t,displayValue:s}=e;return i.includes(s??t)}));if(!n.length&&this.selectedValue&&this.params?.forceLastSelection?.(this.selectedValue,this.searchString)&&(n=[this.selectedValue]),this.autocompleteEntries=n,this.virtualList.refresh(),!s)return;const r=i.indexOf(s);this.checkSetSelectedValue(r)}updateSearchInList(){this.virtualList.forEachRenderedRow((e=>e.setSearchString(this.searchString)))}checkSetSelectedValue(e){e>=0&&e<this.autocompleteEntries.length&&this.setSelectedValue(e)}setSelectedValue(e){const t=this.autocompleteEntries[e];this.selectedValue!==t&&(this.selectedValue=t,this.virtualList.ensureIndexVisible(e),this.virtualList.forEachRenderedRow(((t,i)=>{t.updateSelected(e===i)})))}createRowComponent(e){const t=new zk;return this.createBean(t),t.setState(e.displayValue??e.key,e===this.selectedValue),t}onMouseMove(e){const t=this.virtualList.getGui().getBoundingClientRect(),i=this.virtualList.getScrollTop(),s=e.clientY-t.top+i,n=Math.floor(s/this.virtualList.getRowHeight());this.checkSetSelectedValue(n)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){return this.autocompleteEntries.length?this.selectedValue??null:null}},Wk={selector:"AG-AUTOCOMPLETE",component:class extends Rs{constructor(){super('\n            <div class="ag-autocomplete" role="presentation">\n                <ag-input-text-field data-ref="eAutocompleteInput"></ag-input-text-field>\n            </div>',[vr]),this.eAutocompleteInput=Is,this.isListOpen=!1,this.lastPosition=0,this.valid=!0}wireBeans(e){this.popupService=e.popupService}postConstruct(){this.eAutocompleteInput.onValueChange((e=>this.onValueChanged(e))),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc((()=>{this.destroyBean(this.autocompleteList)})),this.addGuiEventListener("focusout",(()=>this.onFocusOut()))}onValueChanged(e){const t=S(e);this.updateValue(t),this.updateAutocompleteList(t)}updateValue(e){this.updateLastPosition(),this.dispatchLocalEvent({type:"eventValueChanged",value:e}),this.validate(e)}updateAutocompleteList(e){const t=this.listGenerator?.(e,this.lastPosition)??{enabled:!1};if(t.type&&t.type===this.autocompleteListParams?.type||this.isListOpen&&this.closeList(),this.autocompleteListParams=t,this.autocompleteListParams?.enabled){this.isListOpen||this.openList();const{searchString:e}=this.autocompleteListParams;this.autocompleteList.setSearch(e??"")}else this.isListOpen&&this.closeList()}onKeyDown(e){const t=e.key;switch(this.updateLastPosition(),t){case js.ENTER:this.onEnterKeyD
2own(e);break;case js.TAB:this.onTabKeyDown(e);break;case js.DOWN:case js.UP:this.onUpDownKeyDown(e,t);break;case js.LEFT:case js.RIGHT:case js.PAGE_HOME:case js.PAGE_END:setTimeout((()=>{this.updatePositionAndList()}));break;case js.ESCAPE:this.onEscapeKeyDown(e);break;case js.SPACE:e.ctrlKey&&!this.isListOpen&&(e.preventDefault(),this.forceOpenList())}}confirmSelection(){const e=this.autocompleteList?.getSelectedValue();e&&(this.closeList(),this.dispatchLocalEvent({type:"eventOptionSelected",value:this.getValue(),position:this.lastPosition,updateEntry:e,autocompleteType:this.autocompleteListParams.type}))}onTabKeyDown(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.confirmSelection())}onEnterKeyDown(e){e.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()}onUpDownKeyDown(e,t){e.preventDefault(),this.isListOpen?this.autocompleteList?.onNavigationKeyDown(e,t):this.forceOpenList()}onEscapeKeyDown(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))}onFocusOut(){this.isListOpen&&this.closeList()}updatePositionAndList(){this.updateLastPosition(),this.updateAutocompleteList(this.eAutocompleteInput.getValue()??null)}setCaret(e,t){t&&$(this.gos)&&this.eAutocompleteInput.getFocusableElement().focus();const i=this.eAutocompleteInput.getInputElement();i.setSelectionRange(e,e),e===i.value.length&&(i.scrollLeft=i.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){this.lastPosition=this.eAutocompleteInput.getInputElement().selectionStart??0}validate(e){this.validator&&(this.validationMessage=this.validator(e),this.eAutocompleteInput.getInputElement().setCustomValidity(this.validationMessage??""),this.valid=!this.validationMessage,this.dispatchLocalEvent({type:"eventValidChanged",isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new Hk({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:()=>this.confirmSelection(),forceLastSelection:this.forceLastSelection}));const e=this.autocompleteList.getGui(),t={ePopup:e,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},i=this.popupService.addPopup({eChild:e,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(t),ariaLabel:this.listAriaLabel});this.hidePopup=i.hideFunc,this.autocompleteList.afterGuiAttached()}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchLocalEvent({type:"eventValueConfirmed",value:this.getValue(),isValid:this.isValid()})}getValue(){return S(this.eAutocompleteInput.getValue())}setInputPlaceholder(e){return this.eAutocompleteInput.setInputPlaceholder(e),this}setInputAriaLabel(e){return this.eAutocompleteInput.setInputAriaLabel(e),this}setListAriaLabel(e){return this.listAriaLabel=e,this}setListGenerator(e){return this.listGenerator=e,this}setValidator(e){return this.validator=e,this}isValid(){return this.valid}setValue(e){const{value:t,position:i,silent:s,updateListOnlyIfOpen:n,restoreFocus:r}=e;this.eAutocompleteInput.setValue(t,!0),this.setCaret(i??this.lastPosition,r),s||this.updateValue(t),n&&!this.isListOpen||this.updateAutocompleteList(t)}setForceLastSelection(e){return this.forceLastSelection=e,this}setInputDisabled(e){return this.eAutocompleteInput.setDisabled(e),this}}},jk=class extends Rs{constructor(){super('\n            <div class="ag-advanced-filter" role="presentation" tabindex="-1">\n                <ag-autocomplete data-ref="eAutocomplete"></ag-autocomplete>\n                <button class="ag-button ag-standard-button ag-advanced-filter-apply-button" data-ref="eApplyFilterButton"></button>\n                <button class="ag-advanced-filter-builder-button" data-ref="eBuilderFilterButton">\n                    <span data-ref="eBuilderFilterButtonIcon" aria-hidden="true"></span>
2\n                    <span class="ag-advanced-filter-builder-button-label" data-ref="eBuilderFilterButtonLabel"></span>\n                </button>\n            </div>',[Wk]),this.eAutocomplete=Is,this.eApplyFilterButton=Is,this.eBuilderFilterButton=Is,this.eBuilderFilterButtonIcon=Is,this.eBuilderFilterButtonLabel=Is,this.expressionParser=null,this.isApplyDisabled=!0,this.builderOpen=!1}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService,this.advancedFilterService=e.advancedFilterService,this.filterManager=e.filterManager}postConstruct(){this.eAutocomplete.setListGenerator(((e,t)=>this.generateAutocompleteListParams(t))).setValidator((()=>this.validateValue())).setForceLastSelection(((e,t)=>this.forceLastSelection(e,t))).setInputAriaLabel(this.advancedFilterExpressionService.translate("ariaAdvancedFilterInput")).setListAriaLabel(this.advancedFilterExpressionService.translate("ariaLabelAdvancedFilterAutocomplete")),this.refresh(),this.addManagedListeners(this.eAutocomplete,{eventValueChanged:e=>{let{value:t}=e;return this.onValueChanged(t)},eventValueConfirmed:e=>{let{isValid:t}=e;return this.onValueConfirmed(t)},eventOptionSelected:e=>{let{position:t,updateEntry:i,autocompleteType:s}=e;return this.onOptionSelected(t,i,s)},eventValidChanged:e=>{let{isValid:t,validationMessage:i}=e;return this.onValidChanged(t,i)}}),this.setupApplyButton(),this.setupBuilderButton()}refresh(){const e=this.advancedFilterService.getExpressionDisplayValue();this.eAutocomplete.setValue({value:e??"",position:e?.length,updateListOnlyIfOpen:!0})}setInputDisabled(e){this.eAutocomplete.setInputDisabled(e),Yi(this.eApplyFilterButton,e||this.isApplyDisabled)}getTooltipParams(){const e=super.getTooltipParams();return e.location="advancedFilter",e}setupApplyButton(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedElementListeners(this.eApplyFilterButton,{click:()=>this.onValueConfirmed(this.eAutocomplete.isValid())}),Yi(this.eApplyFilterButton,this.isApplyDisabled)}setupBuilderButton(){this.eBuilderFilterButtonIcon.appendChild(Ps("advancedFilterBuilder",this.gos)),this.eBuilderFilterButtonLabel.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilder"),this.activateTabIndex([this.eBuilderFilterButton]),this.addManagedElementListeners(this.eBuilderFilterButton,{click:()=>this.openBuilder()}),this.addManagedListeners(this.advancedFilterService.getCtrl(),{advancedFilterBuilderClosed:()=>this.closeBuilder()})}onValueChanged(e){e=S(e),this.advancedFilterService.setExpressionDisplayValue(e),this.expressionParser=this.advancedFilterService.createExpressionParser(e);const t=this.expressionParser?.parseExpression();t&&t!==e&&this.eAutocomplete.setValue({value:t,silent:!0,restoreFocus:!0})}onValueConfirmed(e){e&&!this.isApplyDisabled&&(Yi(this.eApplyFilterButton,!0),this.advancedFilterService.applyExpression(),this.filterManager?.onFilterChanged({source:"advancedFilter"}))}onOptionSelected(e,t,i){const{updatedValue:s,updatedPosition:n,hideAutocomplete:r}=this.updateExpression(e,t,i);this.eAutocomplete.setValue({value:s,position:n,updateListOnlyIfOpen:r,restoreFocus:!0})}validateValue(){return this.expressionParser?.isValid()?null:this.expressionParser?.getValidationMessage()??null}onValidChanged(e,t){this.isApplyDisabled=!e||this.advancedFilterService.isCurrentExpressionApplied(),Yi(this.eApplyFilterButton,this.isApplyDisabled),this.setTooltip({newTooltipText:t,showDelayOverride:1e3})}generateAutocompleteListParams(e){return this.expressionParser?this.expressionParser.getAutocompleteListParams(e):this.advancedFilterExpressionService.getDefaultAutocompleteListParams("")}updateExpression(e,t,i){return this.advancedFilterExpressionService.updateAutocompleteCache(t,i),this.expressionParser?.updateExpression(e,t,i)??this.advancedFilterService.getDefaultExpression(t)}forceLastSelection(e,t){let{key:i,displayValue:s}=e;return!!t.toLocaleLowerCase().match(`^${(s??i).toLocaleLowerCase()}\\s*$`)}openBuilder(){this.builderOpen||(this.builderOpen=!0,Yi(this.eBuilderFilterButton,!0),this.advancedFilterService.getCtrl().toggleFilterBuilder({source:"ui",eventSource:this.eBuilderFilterButton}))}
2closeBuilder(){this.builderOpen&&(this.builderOpen=!1,Yi(this.eBuilderFilterButton,!1),this.eBuilderFilterButton.focus())}},Uk=class extends Rs{constructor(e){super('\n            <div class="ag-advanced-filter-header" role="row">\n            </div>'),this.enabled=e}wireBeans(e){this.columnModel=e.columnModel,this.focusService=e.focusService,this.headerNavigationService=e.headerNavigationService}postConstruct(){this.setupAdvancedFilter(this.enabled),this.addDestroyFunc((()=>this.destroyBean(this.eAdvancedFilter)));const e=()=>{this.enabled&&this.setEnabledHeight()};this.addManagedEventListeners({gridColumnsChanged:()=>this.onGridColumnsChanged(),columnHeaderHeightChanged:e,gridStylesChanged:e}),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addGuiEventListener("keydown",(e=>this.onKeyDown(e))),this.addGuiEventListener("focusout",(e=>{this.getFocusableElement().contains(e.relatedTarget)||this.focusService.clearAdvancedFilterColumn()}))}getFocusableElement(){return this.eAdvancedFilter?.getGui()??this.getGui()}setEnabled(e){e!==this.enabled&&this.setupAdvancedFilter(e)}refresh(){this.eAdvancedFilter?.refresh()}getHeight(){return this.height}setInputDisabled(e){this.eAdvancedFilter?.setInputDisabled(e)}setupAdvancedFilter(e){const t=this.getGui();if(e){this.eAdvancedFilter=this.createBean(new jk);const e=this.eAdvancedFilter.getGui();this.eAdvancedFilter.addCssClass("ag-advanced-filter-header-cell"),this.setEnabledHeight(),this.setAriaRowIndex(),ci(e,"gridcell"),Ii(e,1),this.setAriaColumnCount(e),t.appendChild(e)}else rs(t),this.destroyBean(this.eAdvancedFilter),this.height=0;Ki(t,e),this.enabled=e}setEnabledHeight(){const e=this.getGui();this.height=this.columnModel.getFloatingFiltersHeight();const t=`${this.height}px`;e.style.height=t,e.style.minHeight=t}setAriaColumnCount(e){Ri(e,this.columnModel.getCols().length)}setAriaRowIndex(){Mi(this.getGui(),this.headerNavigationService.getHeaderRowCount())}onGridColumnsChanged(){this.eAdvancedFilter&&(this.setAriaColumnCount(this.eAdvancedFilter.getGui()),this.setAriaRowIndex())}onKeyDown(e){switch(e.key){case js.ENTER:this.hasFocus()&&this.focusService.focusInto(this.getFocusableElement())&&e.preventDefault();break;case js.ESCAPE:this.hasFocus()||this.getFocusableElement().focus();break;case js.UP:this.navigateUpDown(!0,e);break;case js.DOWN:this.navigateUpDown(!1,e);break;case js.TAB:if(this.hasFocus())this.navigateLeftRight(e);else{const t=this.focusService.findNextFocusableElement(this.getFocusableElement(),null,e.shiftKey);t?(e.preventDefault(),t.focus()):this.navigateLeftRight(e)}}}navigateUpDown(e,t){this.hasFocus()&&this.focusService.focusNextFromAdvancedFilter(e)&&t.preventDefault()}navigateLeftRight(e){(e.shiftKey?this.focusService.focusLastHeader():this.focusService.focusNextFromAdvancedFilter(!1,!0))&&e.preventDefault()}hasFocus(){return K(this.gos)===this.getFocusableElement()}},_k=class extends ze{constructor(e,t){super(),this.comp=e,this.virtualList=t}postConstruct(){this.createManagedBean(new bk(this.comp,this.virtualList,{dragSourceType:Gn.AdvancedFilterBuilder,listItemDragStartEvent:"advancedFilterBuilderDragStarted",listItemDragEndEvent:"advancedFilterBuilderDragEnded",eventSource:this,getCurrentDragValue:e=>this.getCurrentDragValue(e),isMoveBlocked:()=>!1,getNumRows:e=>e.getNumItems(),moveItem:(e,t)=>this.moveItem(e,t)}))}getCurrentDragValue(e){return e.item}moveItem(e,t){this.comp.moveItem(e,t)}},Kk=class extends uk{constructor(e){super({...e,template:'\n                <div class="ag-picker-field" role="presentation">\n                    <div data-ref="eLabel"></div>\n                    <div data-ref="eWrapper" class="ag-wrapper ag-picker-collapsed">\n                        <div data-ref="eDisplayField" class="ag-picker-field-display"></div>\n                        <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n                        <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>\n                        <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n                    </div>\n                </div>',agComponents:[vr]}),this.params=e}showPicker(){setTimeout((()=>super.showPicker()))}hidePicker(){setTimeout((()=>super.hidePicker()))}
2postConstruct(){super.postConstruct();const{wrapperClassName:e,ariaLabel:t}=this.params;Ki(this.eDisplayField,!1),e&&this.eWrapper.classList.add(e),ui(this.eWrapper,""),di(this.eWrapper,t)}onEnterKeyDown(e){Ne(e),this.isPickerDisplayed?super.onEnterKeyDown(e):(e.preventDefault(),this.showPicker())}},$k=class extends ze{constructor(e,t,i){super(),this.eGui=e,this.focusWrapper=t,this.eFocusableComp=i}postConstruct(){this.addManagedElementListeners(this.eGui,{keydown:e=>{switch(e.key){case js.TAB:e.defaultPrevented||Ne(e);break;case js.UP:case js.DOWN:Ne(e);break;case js.ESCAPE:if(Oe(e))return;this.eGui.contains(K(this.gos))&&(e.preventDefault(),Ne(e),this.focusWrapper.focus())}}});const e="ag-advanced-filter-builder-virtual-list-item-highlight";this.addManagedListeners(this.focusWrapper,{keydown:e=>{if(e.key===js.ENTER){if(Oe(e))return;K(this.gos)===this.focusWrapper&&(e.preventDefault(),Ne(e),this.eFocusableComp.getFocusableElement().focus())}},focusin:()=>{this.focusWrapper.classList.add(e)},focusout:t=>{this.focusWrapper.contains(t.relatedTarget)||this.focusWrapper.classList.remove(e)}})}};function Yk(e,t){return{pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderAddField",pickerAriaLabelValue:"Advanced Filter Builder Add Field",pickerType:"ag-list",valueList:[{key:"condition",displayValue:e("advancedFilterBuilderAddCondition")},{key:"join",displayValue:e("advancedFilterBuilderAddJoin")}],valueFormatter:e=>null==e?null:e.displayValue??e.key,pickerIcon:"advancedFilterBuilderAdd",maxPickerWidth:`${t??120}px`,wrapperClassName:"ag-advanced-filter-builder-item-button",ariaLabel:e("advancedFilterBuilderAddButtonTooltip")}}var Zk=class extends Rs{constructor(e,t){super('\n            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">\n                <div data-ref="eItem" class="ag-advanced-filter-builder-item" role="presentation">\n                    <div class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true">\n                        <div class="ag-advanced-filter-builder-item-tree-line-vertical-top ag-advanced-filter-builder-item-tree-line-horizontal"></div>\n                    </div>\n                </div>\n            </div>\n        '),this.item=e,this.focusWrapper=t,this.eItem=Is}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){mi(this.focusWrapper,2);const e=Yk((e=>this.advancedFilterExpressionService.translate(e)),this.gos.get("advancedFilterBuilderParams")?.addSelectWidth),t=this.createManagedBean(new Kk(e));this.addManagedListeners(t,{fieldPickerValueSelected:e=>{let{value:t}=e;this.dispatchLocalEvent({type:"advancedFilterBuilderAdded",item:this.item,isJoin:"join"===t.key})}}),this.eItem.appendChild(t.getGui()),this.createManagedBean(new Ms({getGui:()=>t.getGui(),getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")})),this.createManagedBean(new $k(this.getGui(),this.focusWrapper,t)),di(this.focusWrapper,this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip"),`${this.item.level+1}`]))}afterAdd(){}},qk=class extends Rs{constructor(){super('\n            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>\n        '),this.validationMessage=null}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}init(e){const{item:t,createPill:i}=e;this.item=t,this.createPill=i,this.filterModel=t.filterModel,this.setupColumnCondition(this.filterModel),this.validate(),this.addDestroyFunc((()=>this.destroyBeans([this.eColumnPill,this.eOperatorPill,this.eOperandPill])))}getDragName(){return this.filterModel.colId?this.advancedFilterExpressionService.parseColumnFilterModel(this.filterModel):this.getDefaultColumnDisplayValue()}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderFilterItem")} ${this.getDragName()}`}getValidationMessage(){return this.validationMessage}getFocusableElement(){return this.eColumnPill.getFocusableElement()}setupColumnCondition(e){const t=this.advancedFilterExpressionService.getColumnDetails(e.colId);this.baseCellDataType=t.baseCellDataType,this.column=t.column,this.numOperands=this.getNumOperands(this.getOperatorKey()),this.eColumnPill=this.createPill({key:this.getColumnKey(),displayValue:this.getColumnDisplayValue()??this.getDefaultColumnDisplayValue(),cssClass:"ag-advanced-filter-builder
2-column-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getColumnAutocompleteEntries()}),update:e=>this.setColumnKey(e),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderColumnSelectField",pickerAriaLabelValue:"Advanced Filter Builder Column Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderColumn")}),this.getGui().appendChild(this.eColumnPill.getGui()),w(this.getColumnKey())&&(this.createOperatorPill(),this.hasOperand()&&this.createOperandPill())}createOperatorPill(){this.eOperatorPill=this.createPill({key:this.getOperatorKey(),displayValue:this.getOperatorDisplayValue()??this.getDefaultOptionSelectValue(),cssClass:"ag-advanced-filter-builder-option-pill",isSelect:!0,getEditorParams:()=>({values:this.getOperatorAutocompleteEntries()}),update:e=>this.setOperatorKey(e),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderOptionSelectField",pickerAriaLabelValue:"Advanced Filter Builder Option Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderOption")}),this.eColumnPill.getGui().insertAdjacentElement("afterend",this.eOperatorPill.getGui())}createOperandPill(){const e=this.getOperandDisplayValue()??"";this.eOperandPill=this.createPill({key:e,displayValue:e,baseCellDataType:this.baseCellDataType,cssClass:"ag-advanced-filter-builder-value-pill",isSelect:!1,update:e=>this.setOperand(e),ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderValue")}),this.getGui().appendChild(this.eOperandPill.getGui())}getColumnKey(){return this.filterModel.colId}getColumnDisplayValue(){return this.advancedFilterExpressionService.getColumnDisplayValue(this.filterModel)}getOperatorKey(){return this.filterModel.type}getOperatorDisplayValue(){return this.advancedFilterExpressionService.getOperatorDisplayValue(this.filterModel)}getOperandDisplayValue(){return this.advancedFilterExpressionService.getOperandDisplayValue(this.filterModel,!0)}hasOperand(){return this.numOperands>0}getOperatorAutocompleteEntries(){return this.column?this.advancedFilterExpressionService.getOperatorAutocompleteEntries(this.column,this.baseCellDataType):[]}setColumnKey(e){this.eOperatorPill||this.createOperatorPill();const t=this.advancedFilterExpressionService.getColumnDetails(e);this.column=t.column;const i=t.baseCellDataType;this.baseCellDataType!==i&&(this.baseCellDataType=i,this.setOperatorKey(void 0),this.eOperatorPill&&(os(this.eOperatorPill.getGui()),this.destroyBean(this.eOperatorPill),this.createOperatorPill()),this.validate()),this.filterModel.colId=e,this.filterModel.filterType=this.baseCellDataType}setOperatorKey(e){const t=this.getNumOperands(e);t!==this.numOperands&&(this.numOperands=t,0===t?this.destroyOperandPill():(this.createOperandPill(),"number"!==this.baseCellDataType&&this.setOperand(""))),this.filterModel.type=e,this.validate()}setOperand(e){let t=e;this.column&&(t=this.advancedFilterExpressionService.getOperandModelValue(e,this.baseCellDataType,this.column)??""),this.filterModel.filter=t,this.validate()}getNumOperands(e){return this.advancedFilterExpressionService.getExpressionOperator(this.baseCellDataType,e)?.numOperands??0}destroyOperandPill(){delete this.filterModel.filter,this.getGui().removeChild(this.eOperandPill.getGui()),this.destroyBean(this.eOperandPill),this.eOperandPill=void 0}validate(){let e=null;w(this.getColumnKey())?w(this.getOperatorKey())?this.numOperands>0&&!w(this.getOperandDisplayValue())&&(e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationEnterValue")):e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectOption"):e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectColumn"),this.item.valid=!e,e!==this.validationMessage&&(this.validationMessage=e,this.dispatchLocalEvent({type:"advancedFilterBuilderValidChanged"}))}getDefaultColumnDisplayValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectColumn")}getDefaultOptionSelectValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectOption")}},Qk=class extends Rs{constructor(e){super('\n            <div class="ag-advanced-filter-builder
2-pill-wrapper" role="presentation">\n                <div data-ref="ePill" class="ag-advanced-filter-builder-pill" role="button">\n                    <span data-ref="eLabel" class="ag-advanced-filter-builder-pill-display"></span>\n                </div>\n            </div>\n        '),this.params=e,this.ePill=Is,this.eLabel=Is,this.value=e.value}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){const{cssClass:e,ariaLabel:t}=this.params;this.ePill.classList.add(e),this.activateTabIndex([this.ePill]),this.eLabel.id=`${this.getCompId()}`,pi(this.ePill,this.eLabel.id),di(this.ePill,t),this.renderValue(),this.addManagedListeners(this.ePill,{click:e=>{e.preventDefault(),this.showEditor()},keydown:e=>{if(e.key===js.ENTER)e.preventDefault(),Ne(e),this.showEditor()}}),this.addDestroyFunc((()=>this.destroyBean(this.eEditor)))}getFocusableElement(){return this.ePill}showEditor(){if(this.eEditor)return;Ki(this.ePill,!1),this.eEditor=this.createEditorComp(this.params.type),this.eEditor.setValue(this.value);const e=this.eEditor.getGui();this.eEditor.addManagedElementListeners(e,{keydown:e=>{switch(e.key){case js.ENTER:e.preventDefault(),Ne(e),this.updateValue(!0);break;case js.ESCAPE:e.preventDefault(),Ne(e),this.hideEditor(!0)}},focusout:()=>this.updateValue(!1)}),this.getGui().appendChild(e),this.eEditor.getFocusableElement().focus()}createEditorComp(e){let t;switch(e){case"text":t=new fr;break;case"number":t=new yr;break;case"date":t=new ol}return this.createBean(t)}hideEditor(e){const{eEditor:t}=this;t&&(this.eEditor=void 0,this.getGui().removeChild(t.getGui()),this.destroyBean(t),Ki(this.ePill,!0),e&&this.ePill.focus())}renderValue(){let e;this.eLabel.classList.remove("ag-advanced-filter-builder-value-empty","ag-advanced-filter-builder-value-number","ag-advanced-filter-builder-value-text"),w(this.value)?"number"===this.params.type?(e=this.value,this.eLabel.classList.add("ag-advanced-filter-builder-value-number")):(e=`"${this.value}"`,this.eLabel.classList.add("ag-advanced-filter-builder-value-text")):(e=this.advancedFilterExpressionService.translate("advancedFilterBuilderEnterValue"),this.eLabel.classList.add("ag-advanced-filter-builder-value-empty")),this.eLabel.innerText=e}updateValue(e){if(!this.eEditor)return;const t=this.eEditor.getValue()??"";this.dispatchLocalEvent({type:"fieldValueChanged",value:t}),this.value=t,this.renderValue(),this.hideEditor(e)}},Xk=class extends Rs{wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}constructor(){super('\n            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>\n        ')}init(e){const{item:t,createPill:i}=e,s=t.filterModel;this.filterModel=s,this.ePill=i({key:s.type,displayValue:this.advancedFilterExpressionService.parseJoinOperator(s),cssClass:"ag-advanced-filter-builder-join-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries()}),update:e=>s.type=e,pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderJoinSelectField",pickerAriaLabelValue:"Advanced Filter Builder Join Operator Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderJoinOperator")}),this.getGui().appendChild(this.ePill.getGui()),this.addDestroyFunc((()=>this.destroyBean(this.ePill)))}getDragName(){return this.advancedFilterExpressionService.parseJoinOperator(this.filterModel)}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderGroupItem")} ${this.getDragName()}`}getValidationMessage(){return null}getFocusableElement(){return this.ePill.getFocusableElement()}},Jk=class extends uk{constructor(e){super({...e,template:'\n                <div class="ag-picker-field ag-advanced-filter-builder-pill-wrapper" role="presentation">\n                    <div data-ref="eLabel"></div>\n                    <div data-ref="eWrapper" class="ag-wrapper ag-advanced-filter-builder-pill ag-picker-collapsed">\n                        <div data-ref="eDisplayField" class="ag-picker-field-display ag-advanced-filter-builder
2-pill-display"></div>\n                        <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n                        <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>\n                        <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n                    </div>\n                </div>',agComponents:[vr]}),this.params=e}getFocusableElement(){return this.eWrapper}showPicker(){setTimeout((()=>super.showPicker()))}hidePicker(){setTimeout((()=>super.hidePicker()))}postConstruct(){super.postConstruct();const{wrapperClassName:e,ariaLabel:t}=this.params;this.eWrapper.classList.add(e),ui(this.eWrapper,""),di(this.eWrapper,t)}createPickerComponent(){if(!this.values){const{values:e}=this.params.getEditorParams();this.values=e;const t=this.value.key,i=e.find((e=>e.key===t))??{key:t,displayValue:this.value.displayValue};this.value=i}return super.createPickerComponent()}onEnterKeyDown(e){Ne(e),this.isPickerDisplayed?super.onEnterKeyDown(e):(e.preventDefault(),this.showPicker())}},eN=class extends Nl{constructor(e,t,i){super('\n            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">\n                <div class="ag-advanced-filter-builder-item" role="presentation">\n                    <div data-ref="eTreeLines" class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true"></div>\n                    <span data-ref="eDragHandle" class="ag-drag-handle" aria-hidden="true"></span>\n                    <span data-ref="eValidation" class="ag-advanced-filter-builder-item-button ag-advanced-filter-builder-invalid" aria-hidden="true"></span>\n                </div>\n                <div data-ref="eButtons" class="ag-advanced-filter-builder-item-buttons">\n                    <span data-ref="eMoveUpButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                    <span data-ref="eMoveDownButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                    <div data-ref="eAddButton" role="presentation"></div>\n                    <span data-ref="eRemoveButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                </div>\n            </div>\n        '),this.item=e,this.dragFeature=t,this.focusWrapper=i,this.eTreeLines=Is,this.eDragHandle=Is,this.eButtons=Is,this.eValidation=Is,this.eMoveUpButton=Is,this.eMoveDownButton=Is,this.eAddButton=Is,this.eRemoveButton=Is,this.moveUpDisabled=!1,this.moveDownDisabled=!1}wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){const{filterModel:e,level:t,showMove:i}=this.item,s="join"===e.filterType;if(this.ePillWrapper=this.createManagedBean(s?new Xk:new qk),this.ePillWrapper.init({item:this.item,createPill:e=>this.createPill(e)}),this.eDragHandle.insertAdjacentElement("afterend",this.ePillWrapper.getGui()),0===t){const e=document.createElement("div");e.classList.add("ag-advanced-filter-builder-item-tree-line-vertical-bottom"),e.classList.add("ag-advanced-filter-builder-item-tree-line-root"),this.eTreeLines.appendChild(e),Ki(this.eDragHandle,!1),Ki(this.eButtons,!1),Ci(this.focusWrapper,!0)}else this.setupTreeLines(t),this.eDragHandle.appendChild(Ps("advancedFilterBuilderDrag",this.gos)),this.setupValidation(),this.setupMoveButtons(i),this.setupAddButton(),this.setupRemoveButton(),this.setupDragging(),this.updateAriaExpanded();mi(this.focusWrapper,t+1),this.initialiseTabGuard({}),this.createManagedBean(new $k(this.getGui(),this.focusWrapper,this.ePillWrapper)),this.updateAriaLabel(),this.addManagedListeners(this.ePillWrapper,{advancedFilterBuilderValueChanged:()=>this.dispatchLocalEvent({type:"advancedFilterBuilderValueChanged"}),advancedFilterBuilderValidChanged:()=>this.updateValidity()})}setState(e){const{level:t}=this.item;if(0===t)return;const{showMove:i}=this.item,{disableMoveUp:s,disableMoveDown:n,treeLines:r,showStartTreeLine:o}=e;this.updateTreeLines(r,o),this.updateAriaExpanded(),i&&(this.moveUpDisabled=!!s,this.moveDownDisabled=!!n,this.eMoveUpButton.classList.toggle("ag-advanced-filter-builder
2-item-button-disabled",s),this.eMoveDownButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",n),fi(this.eMoveUpButton,!!s),fi(this.eMoveDownButton,!!n),this.moveUpTooltipFeature.refreshToolTip(),this.moveDownTooltipFeature.refreshToolTip())}focusMoveButton(e){(e?this.eMoveUpButton:this.eMoveDownButton).focus()}afterAdd(){this.ePillWrapper.getFocusableElement().focus()}setupTreeLines(e){for(let t=0;t<e;t++){const e=document.createElement("div");this.eTreeLines.appendChild(e)}}updateTreeLines(e,t){const i=e.length-1,{children:s}=this.eTreeLines;for(let r=0;r<i;r++){const t=s.item(r);t&&t.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!e[r])}const n=s.item(i);if(n){n.classList.add("ag-advanced-filter-builder-item-tree-line-horizontal");const t=e[i];n.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-top",t),n.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!t)}this.eDragHandle.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-bottom",t)}setupValidation(){this.eValidation.appendChild(Ps("advancedFilterBuilderInvalid",this.gos)),this.validationTooltipFeature=this.createManagedBean(new Ms({getGui:()=>this.eValidation,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.ePillWrapper.getValidationMessage(),getTooltipShowDelayOverride:()=>1e3})),this.updateValidity()}setupAddButton(){const e=Yk((e=>this.advancedFilterExpressionService.translate(e)),this.gos.get("advancedFilterBuilderParams")?.addSelectWidth),t=this.createManagedBean(new Kk(e));this.addManagedListeners(t,{fieldPickerValueSelected:e=>{let{value:t}=e;return this.dispatchLocalEvent({type:"advancedFilterBuilderAdded",item:this.item,isJoin:"join"===t.key})}}),this.eAddButton.appendChild(t.getGui()),this.createManagedBean(new Ms({getGui:()=>this.eAddButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")}))}setupRemoveButton(){this.eRemoveButton.appendChild(Ps("advancedFilterBuilderRemove",this.gos)),this.addManagedListeners(this.eRemoveButton,{click:()=>this.removeItem(),keydown:e=>{if(e.key===js.ENTER)e.preventDefault(),Ne(e),this.removeItem()}}),this.createManagedBean(new Ms({getGui:()=>this.eRemoveButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")})),di(this.eRemoveButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")),this.activateTabIndex([this.eRemoveButton])}setupMoveButtons(e){e?(this.eMoveUpButton.appendChild(Ps("advancedFilterBuilderMoveUp",this.gos)),this.addManagedListeners(this.eMoveUpButton,{click:()=>this.moveItem(!0),keydown:e=>{if(e.key===js.ENTER)e.preventDefault(),Ne(e),this.moveItem(!0)}}),this.moveUpTooltipFeature=this.createManagedBean(new Ms({getGui:()=>this.eMoveUpButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveUpDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")})),di(this.eMoveUpButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")),this.eMoveDownButton.appendChild(Ps("advancedFilterBuilderMoveDown",this.gos)),this.addManagedListeners(this.eMoveDownButton,{click:()=>this.moveItem(!1),keydown:e=>{if(e.key===js.ENTER)e.preventDefault(),Ne(e),this.moveItem(!1)}}),this.moveDownTooltipFeature=this.createManagedBean(new Ms({getGui:()=>this.eMoveDownButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveDownDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")})),di(this.eMoveDownButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")),this.activateTabIndex([this.eMoveUpButton,this.eMoveDownButton])):(Ki(this.eMoveUpButton,!1),Ki(this.eMoveDownButton,!1))}
2updateValidity(){$i(this.eValidation,!this.item.valid),this.validationTooltipFeature.refreshToolTip(),this.updateAriaLabel()}createPill(e){const{key:t,displayValue:i,cssClass:s,update:n,ariaLabel:r}=e,o=e=>{null!=e&&(n(e),this.dispatchLocalEvent({type:"advancedFilterBuilderValueChanged"}))};if(e.isSelect){const{getEditorParams:n,pickerAriaLabelKey:a,pickerAriaLabelValue:l}=e,h=this.gos.get("advancedFilterBuilderParams"),c=`${h?.pillSelectMinWidth??140}px`,d=`${h?.pillSelectMaxWidth??200}px`,u=this.createBean(new Jk({pickerAriaLabelKey:a,pickerAriaLabelValue:l,pickerType:"ag-list",value:{key:t,displayValue:i},valueFormatter:e=>null==e?null:e.displayValue??e.key,variableWidth:!0,minPickerWidth:c,maxPickerWidth:d,getEditorParams:n,wrapperClassName:s,ariaLabel:r}));return this.addManagedListeners(u,{fieldPickerValueSelected:e=>{let{value:t}=e;return o(t?.key)}}),u}{const t=this.createBean(new Qk({value:i,cssClass:s,type:this.getInputType(e.baseCellDataType),ariaLabel:r}));return this.addManagedListeners(t,{fieldValueChanged:e=>{let{value:t}=e;return o(t)}}),t}}getInputType(e){switch(e){case"text":case"object":case"boolean":return"text";case"number":return"number";case"date":case"dateString":return"date"}}setupDragging(){const e={type:Gn.AdvancedFilterBuilder,eElement:this.eDragHandle,dragItemName:()=>this.ePillWrapper.getDragName(),getDefaultIconName:()=>"notAllowed",getDragItem:()=>({}),onDragStarted:()=>this.dragFeature.dispatchLocalEvent({type:"advancedFilterBuilderDragStarted",item:this.item}),onDragStopped:()=>this.dragFeature.dispatchLocalEvent({type:"advancedFilterBuilderDragEnded"})};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc((()=>this.dragAndDropService.removeDragSource(e)))}updateAriaLabel(){const e=this.ePillWrapper.getAriaLabel(),t=`${this.item.level+1}`,i=this.ePillWrapper.getValidationMessage();let s;s=i?this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItemValidation",[e,t,i]):this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[e,t]),di(this.focusWrapper,s)}updateAriaExpanded(){Si(this.focusWrapper);const{filterModel:e}=this.item;"join"===e?.filterType&&e.conditions.length&&Ci(this.focusWrapper,!0)}removeItem(){this.dispatchLocalEvent({type:"advancedFilterBuilderRemoved",item:this.item})}moveItem(e){this.dispatchLocalEvent({type:"advancedFilterBuilderMoved",item:this.item,backwards:e})}},tN=class extends Rs{constructor(){super('\n            <div role="presentation" class="ag-advanced-filter-builder" tabindex="-1">\n                <div role="presentation" class="ag-advanced-filter-builder-list" data-ref="eList"></div>\n                <div role="presentation" class="ag-advanced-filter-builder-button-panel">\n                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-apply-button" data-ref="eApplyFilterButton"></button>\n                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-cancel-button" data-ref="eCancelFilterButton"></button>\n                </div>\n            </div>'),this.eList=Is,this.eApplyFilterButton=Is,this.eCancelFilterButton=Is,this.validationMessage=null}wireBeans(e){this.filterManager=e.filterManager,this.advancedFilterService=e.advancedFilterService,this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){const{showMoveButtons:e}=this.gos.get("advancedFilterBuilderParams")??{};this.showMove=!!e,this.addManagedPropertyListener("advancedFilterBuilderParams",(e=>{let{currentValue:t}=e;this.showMove=!!t?.showMoveButtons,this.refreshList(!1)})),this.filterModel=this.setupFilterModel(),this.setupVirtualList(),this.dragFeature=this.createManagedBean(new _k(this,this.virtualList)),this.setupButtons()}refresh(){let e=this.virtualList.getLastFocusedRow();this.setupFilterModel(),this.validateItems(),this.refreshList(!1),null!=e&&(this.virtualList.getComponentAt(e)||(e=0),this.virtualList.focusRow(e))}getNumItems(){return this.items.length}moveItem(e,t){t&&e&&this.moveItemToIndex(e,t.rowIndex,t.position)}afterGuiAttached(){this.virtualList.awaitStable((()=>this.virtualList.focusRow(0)))}setupVirtualList(){this.virtualList=this.createManagedBean(new lk({cssIdentifier:"advanced-filter-builder",ariaRole:"tree",listName:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderList")})),this.virtualList.setComponentCreator(this.createItemComponent.bind(this)),this.virtualList.setComponentUpdater(this.updateItemComponent.bind(this)),this.virtualList.setRowHeight(40),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.items.length,getRow:e=>this.items[e],areRowsEqual:(e,t)=>e===t}),this.buildList(),this.virtualList.refresh()}setupButtons(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedElementListeners(this.eApplyFilterButton,{click:()=>{this.advancedFilterService.setModel(this.filterModel),this.filterManager?.onFilterChanged({source:"advancedFilter"}),this.close()}}),this.validationTooltipFeature=this.createManagedBean(new Ms({getGui:()=>this.eApplyFilterButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.validationMessage,getTooltipShowDelayOverride:()=>1e3})),this.validate();const e=e=>
2this.addOrRemoveCssClass("ag-advanced-filter-builder-validation",e);this.addManagedListeners(this.eApplyFilterButton,{mouseenter:()=>e(!0),mouseleave:()=>e(!1)}),this.eCancelFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderCancel"),this.activateTabIndex([this.eCancelFilterButton]),this.addManagedElementListeners(this.eCancelFilterButton,{click:()=>this.close()})}removeItemFromParent(e){const t=e.parent.conditions.indexOf(e.filterModel);return e.parent.conditions.splice(t,1),t}moveItemToIndex(e,t,i){const s=this.items[t],n="join"===s.filterModel?.filterType&&"bottom"===i,r=n?s.filterModel:s.parent;if(!r)return;if(this.isChildOrSelf(r,e.filterModel)||s===e)return;let o;this.removeItemFromParent(e),n?o=0:(o=r.conditions.indexOf(s.filterModel),-1===o?o=r.conditions.length:"bottom"===i&&(o+=1)),r.conditions.splice(o,0,e.filterModel),this.refreshList(!1)}isChildOrSelf(e,t){return e===t||"join"===t.filterType&&t.conditions.some((t=>this.isChildOrSelf(e,t)))}setupFilterModel(){const e=this.formatFilterModel(this.advancedFilterService.getModel());return this.stringifiedModel=JSON.stringify(e),e}formatFilterModel(e){return"join"!==(e=e??{filterType:"join",type:"AND",conditions:[]}).filterType&&(e={filterType:"join",type:"AND",conditions:[e]}),e}buildList(){const e=(t,i,s,n)=>{i.push({filterModel:t,level:s,parent:n,valid:!0,showMove:this.showMove}),"join"===t.filterType&&(t.conditions.forEach((n=>e(n,i,s+1,t))),0===s&&i.push({filterModel:null,level:s+1,parent:t,valid:!0}))};this.items=[],e(this.filterModel,this.items,0)}refreshList(e){if(!e){const e=[];this.items.forEach((t=>{t.valid||e.push(t.filterModel)})),this.buildList(),e.length&&this.items.forEach((t=>{t.filterModel&&e.includes(t.filterModel)&&(t.valid=!1)}))}this.virtualList.refresh(e),this.validate()}updateItemComponent(e,t){const i=this.items.indexOf(e),s=(e,t)=>{const i=this.items.find((t=>t.filterModel===e)),n=i?.parent;if(n){const{conditions:i}=n;s(n,t),t.push(i[i.length-1]===e)}},n=[],{filterModel:r}=e;r&&(s(r,n),n[0]=!1);const o="join"===r?.filterType&&!!r.conditions.length;t.setState({disableMoveUp:1===i,disableMoveDown:!this.canMoveDown(e,i),treeLines:n,showStartTreeLine:o})}createItemComponent(e,t){const i=this.createBean(e.filterModel?new eN(e,this.dragFeature,t):new Zk(e,t));return i.addManagedListeners(i,{advancedFilterBuilderRemoved:e=>{let{item:t}=e;return this.removeItem(t)},advancedFilterBuilderValueChanged:()=>this.validate(),advancedFilterBuilderAdded:e=>{let{item:t,isJoin:i}=e;return this.addItem(t,i)},advancedFilterBuilderMoved:e=>{let{item:t,backwards:i}=e;return this.moveItemUpDown(t,i)}}),i instanceof eN&&this.updateItemComponent(e,i),i}addItem(e,t){const{parent:i,level:s,filterModel:n}=e,r="join"===n?.filterType,o=t?{filterType:"join",type:"AND",conditions:[]}:{},a=r?n:i;let l=r?0:a.conditions.indexOf(n);l>=0?(r||(l+=1),a.conditions.splice(l,0,o)):a.conditions.push(o);let h=this.items.indexOf(e);const c=h>=0;if(c){e.filterModel&&h++;const i=[{filterModel:o,level:r?s+1:s,parent:a,valid:t,showMove:this.showMove}];this.items.splice(h,0,...i)}this.refreshList(c),c&&this.virtualList.getComponentAt(h)?.afterAdd()}removeItem(e){const t=e.parent,{filterModel:i}=e,s=t.conditions.indexOf(i);t.conditions.splice(s,1);const n="join"===e.filterModel?.filterType,r=this.items.indexOf(e),o=!n&&r>=0;o&&this.items.splice(r,1),this.refreshList(o),r>=0&&this.virtualList.focusRow(r)}moveItemUpDown(e,t){const i=this.items.indexOf(e),s=t?i-1:i+1;if(0===s||!t&&!this.canMoveDown(e,i))return;const n=this.items[s],r=this.removeItemFromParent(e),{level:o,filterModel:a,parent:l}=e,{level:h,filterModel:c,parent:d}=n;if(t)if(h===o&&"join"===c.filterType)c.conditions.push(a);else if(h<=o){const e=d.conditions.indexOf(c);d.conditions.splice(e,0,a)}else{l.conditions[r-1].conditions.push(a)}else if(h===o)if("join"===c.filterType)c.conditions.splice(0,0,a);else{const e=d.conditions.indexOf(c);d.conditions.splice(e+1,0,a)}else if(r<l.conditions.length)l.conditions.splice(r+1,0,a);else{const e=this.items.find((e=>e.filterModel===l)),t=e.parent.conditions.indexOf(e.filterModel)+1;e.parent.conditions.splice(t,0,a)}this.refreshList(!1);const u=this.items.findIndex((e=>{let{filterModel:t}=e;return t===a}));if(u>=0){const e=this.virtualList.getComponentAt(u);e instanceof eN&&e.focusMoveButton(t)}}canMoveDown(e,t){return!(1===e.level&&t===this.items.length-2||1===e.level&&e.parent.conditions[e.parent.conditions.length-1]===e.filterModel)}close(){this.advancedFilterService.getCtrl().toggleFilterBuilder({source:"ui"})}validate(){let e=!this.items.every((e=>{let{valid:t}=e;return t}));e?this.validationMessage=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationIncomplete"):(e=JSON.stringify(this.filterModel)===this.stringifiedModel,this.validationMessage=e?this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationAlreadyApplied"):null),Yi(this.eApplyFilterButton,e),this.validationTooltipFeature.refreshToolTip()}validateItems(){const e=e=>{e.type=void 0},t=e=>{delete e.filter};
2this.items.forEach((i=>{if(!i.valid||!i.filterModel||"join"===i.filterModel.filterType)return;const{filterModel:s}=i,{colId:n}=s,r=this.advancedFilterExpressionService.getColumnAutocompleteEntries().find((e=>{let{key:t}=e;return t===n})),o=this.advancedFilterExpressionService.getColumnDetails(s.colId);if(!r||!o.column)return i.valid=!1,s.colId=void 0,e(s),void t(s);const a=this.advancedFilterExpressionService.getDataTypeExpressionOperator(o.baseCellDataType).operators[s.type];if(!a)return i.valid=!1,e(s),void t(s);a.numOperands>0&&!w(s.filter)&&(i.valid=!1)}))}},iN=class extends ze{constructor(e){super(),this.enabled=e}wireBeans(e){this.ctrlsService=e.ctrlsService,this.popupService=e.popupService,this.advancedFilterExpressionService=e.advancedFilterExpressionService,this.environment=e.environment}postConstruct(){this.hasAdvancedFilterParent=!!this.gos.get("advancedFilterParent"),this.ctrlsService.whenReady(this,(()=>this.setAdvancedFilterComp())),this.addManagedEventListeners({advancedFilterEnabledChanged:e=>{let{enabled:t}=e;return this.onEnabledChanged(t)}}),this.addManagedPropertyListener("advancedFilterParent",(()=>this.updateComps())),this.addDestroyFunc((()=>{this.destroyAdvancedFilterComp(),this.destroyBean(this.eBuilderComp),this.eBuilderDialog&&this.eBuilderDialog.isAlive()&&this.destroyBean(this.eBuilderDialog)}))}setupHeaderComp(e){this.eHeaderComp&&(this.eHeaderComp?.getGui().remove(),this.destroyBean(this.eHeaderComp)),this.eHeaderComp=this.createManagedBean(new Uk(this.enabled&&!this.hasAdvancedFilterParent)),e.insertAdjacentElement("beforebegin",this.eHeaderComp.getGui())}focusHeaderComp(){return!!this.eHeaderComp&&(this.eHeaderComp.getFocusableElement().focus(),!0)}refreshComp(){this.eFilterComp?.refresh(),this.eHeaderComp?.refresh()}refreshBuilderComp(){this.eBuilderComp?.refresh()}getHeaderHeight(){return this.eHeaderComp?.getHeight()??0}setInputDisabled(e){this.eFilterComp?.setInputDisabled(e),this.eHeaderComp?.setInputDisabled(e)}toggleFilterBuilder(e){const{source:t,force:i,eventSource:s}=e;if(i&&this.eBuilderDialog||!1===i&&!this.eBuilderDialog)return;if(this.eBuilderDialog)return this.builderDestroySource=t,void this.destroyBean(this.eBuilderDialog);this.setInputDisabled(!0);const{width:n,height:r,minWidth:o}=this.getBuilderDialogSize();this.eBuilderComp=this.createBean(new tN),this.eBuilderDialog=this.createBean(new vk({title:this.advancedFilterExpressionService.translate("advancedFilterBuilderTitle"),component:this.eBuilderComp,width:n,height:r,resizable:!0,movable:!0,maximizable:!0,centered:!0,closable:!0,minWidth:o,afterGuiAttached:()=>this.eBuilderComp?.afterGuiAttached(),postProcessPopupParams:{type:"advancedFilterBuilder",eventSource:s}})),this.dispatchFilterBuilderVisibleChangedEvent(t,!0),this.eBuilderDialog.addEventListener("destroyed",(()=>{this.destroyBean(this.eBuilderComp),this.eBuilderComp=void 0,this.eBuilderDialog=void 0,this.setInputDisabled(!1),this.dispatchLocalEvent({type:"advancedFilterBuilderClosed"}),this.dispatchFilterBuilderVisibleChangedEvent(this.builderDestroySource??"ui",!1),this.builderDestroySource=void 0}))}dispatchFilterBuilderVisibleChangedEvent(e,t){this.eventService.dispatchEvent({type:"advancedFilterBuilderVisibleChanged",source:e,visible:t})}getBuilderDialogSize(){const e=this.gos.get("advancedFilterBuilderParams")?.minWidth??500,t=this.popupService.getPopupParent(),i=Math.round(es(t))-2,s=Math.round(.75*Ji(t))-2;return{width:Math.min(Math.max(600,e),i),height:Math.min(600,s),minWidth:e}}onEnabledChanged(e){this.enabled=e,this.updateComps()}updateComps(){this.setAdvancedFilterComp(),this.setHeaderCompEnabled(),this.eventService.dispatchEvent({type:"headerHeightChanged"})}setAdvancedFilterComp(){if(this.destroyAdvancedFilterComp(),!this.enabled)return;const e=this.gos.get("advancedFilterParent");
2if(this.hasAdvancedFilterParent=!!e,e){const t=this.createBean(new jk),i=t.getGui();this.environment.applyThemeClasses(i),i.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),e.appendChild(i),this.eFilterComp=t}}setHeaderCompEnabled(){this.eHeaderComp?.setEnabled(this.enabled&&!this.hasAdvancedFilterParent)}destroyAdvancedFilterComp(){this.eFilterComp&&(os(this.eFilterComp.getGui()),this.destroyBean(this.eFilterComp))}},sN=class{constructor(e){this.params=e,this.operators=[],this.operatorStartPositions=[],this.operatorEndPositions=[],this.activeOperator=0,this.validationError=null}parseExpression(e){this.operators.push(""),this.operatorStartPositions.push(e),this.operatorEndPositions.push(void 0);const{expression:t}=this.params;for(;e<t.length;){const i=t[e];if(" "===i){if(this.parseOperator(e-1))return this.activeOperator++,e-1;this.operators[this.activeOperator]+=i}else this.operators[this.activeOperator]+=i;e++}return this.parseOperator(e-1),e}isValid(){return!this.validationError&&(!this.operators.length||!!this.parsedOperator)}getValidationError(){return this.validationError}getFunction(){return"OR"===this.parsedOperator?"||":"&&"}getModel(){return"OR"===this.parsedOperator?"OR":"AND"}getAutocompleteListParams(e,t){let i;if(null==t)i="";else{const s=this.operators[t],n=this.operatorEndPositions[t];i=Rk(s,e,null==n?this.params.expression.length:n+1)}let s=this.params.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries();return(t||null==t&&this.activeOperator)&&(s=s.filter((e=>{let{key:t}=e;return t===this.parsedOperator}))),this.params.advancedFilterExpressionService.generateAutocompleteListParams(s,"join",i)}updateExpression(e,t,i){let{expression:s}=this.params;const n=t.displayValue??t.key;if(0===i)for(let r=this.operatorEndPositions.length-1;r>0;r--){const e=this.operatorEndPositions[r];null!=e&&(s=Ek(s,this.operatorStartPositions[r],e,n).updatedValue)}return Ek(s,this.operatorStartPositions.length>i?this.operatorStartPositions[i]:e,(this.operatorEndPositions.length>i?this.operatorEndPositions[i]:void 0)??Ak(s,e,!0).endPosition,n,!0)}getNumOperators(){return this.operators.length}getLastOperatorEndPosition(){return this.operatorEndPositions[this.operatorEndPositions.length-1]}parseOperator(e){const t=this.operators.length>this.activeOperator?this.operators[this.activeOperator]:"",i=this.params.advancedFilterExpressionService.getExpressionJoinOperators(),s=Nk(t,i,(e=>e));if(s){this.operatorEndPositions[this.activeOperator]=e;const n=i[s];if(this.activeOperator){if(s!==this.parsedOperator)return this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationJoinOperatorMismatch"),startPosition:e-t.length+1,endPosition:e}),!1}else this.parsedOperator=s;return t!==n&&(Tk(this.params,t,n,e),this.operators[this.activeOperator]=n),!0}return null!==s&&(this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidJoinOperator"),startPosition:e-t.length+1,endPosition:e}),!0)}},nN=class e{constructor(e,t){this.params=e,this.startPosition=t,this.expectingExpression=!0,this.expectingOperator=!1,this.expressionParsers=[],this.operatorParser=new sN(this.params),this.missingEndBracket=!1,this.extraEndBracket=!1}parseExpression(){let t=this.startPosition;const{expression:i}=this.params;for(;t<i.length;){const s=i[t];if("("!==s||this.expectingOperator){if(")"===s)return this.endPosition=t-1,0===this.startPosition&&(this.extraEndBracket=!0),t;if(" "===s);else if(this.expectingExpression){const e=new kk(this.params,t);t=e.parseExpression(),this.expressionParsers.push(e),this.expectingExpression=!1,this.expectingOperator=!0}else this.expectingOperator&&(t=this.operatorParser.parseExpression(t),this.expectingOperator=!1,this.expectingExpression=!0)}else{const i=new e(this.params,t+1);t=i.parseExpression(),this.expressionParsers.push(i),this.expectingExpression=!1,this.expectingOperator=!0}t++}return this.startPosition>0&&(this.missingEndBracket=!0),t}isValid(){return!this.missingEndBracket&&!this.extraEndBracket&&this.expressionParsers.length===this.operatorParser.getNumOperators()+1&&this.operatorParser.isValid()&&this.expressionParsers.every((e=>e.isValid()))}getValidationError(){const e=this.operatorParser.getValidationError();for(let i=0;i<this.expressionParsers.length;i++){const t=this.expressionParsers[i].getValidationError();if(t)return e&&e.startPosition<t.startPosition?e:t}if(e)return e;if(this.extraEndBracket)return{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationExtraEndBracket"),startPosition:this.endPosition+1,endPosition:this.endPosition+1};let t;return this.expressionParsers.length===this.operatorParser.getNumOperators()?t="advancedFilterValidationMissingCondition":this.missingEndBracket&&(t="advancedFilterValidationMissingEndBracket"),t?{message:this.params.advancedFilterExpressionService.translate(t),startPosition:this.params.expression.length,endPosition:this.params.expression.length}:null}getFunctionString(e){const t=this.expressionParsers.length>1,i=this.expressionParsers.map((t=>t.getFunctionString(e))).join(` ${this.operatorParser.getFunction()} `);return t?`(${i})`:i}getFunctionParsed(e){const t=this.operatorParser.getFunction(),i=this.expressionParsers.map((t=>t.getFunctionParsed(e))),s="&&"===t?"every":"some";return(e,t,n)=>i[s]((i=>i(e,t,n)))}getAutocompleteListParams(e){if(null!=this.endPosition&&e>this.endPosition+1)return;if(!this.expressionParsers.length)return this.getColumnAutocompleteListParams();const t=this.getExpressionParserIndex(e);if(null==t)return"("===this.params.expression[e]?{enabled:!1}:this.getColumnAutocompleteListParams();const i=this.expressionParsers[t].getAutocompleteListParams(e);if(!i){if(t<this.expressionParsers.length-1)return this.operatorParser.getAutocompleteListParams(e,t);if(this.expressionParsers.length===this.operatorParser.getNumOperators()){const t=this.operatorParser.getLastOperatorEndPosition();return null==t||e<=t+1?this.operatorParser.getAutocompleteListParams(e,this.operatorParser.getNumOperators()-1):this.getColumnAutocompleteListParams()}return")"===this.params.expression[e-1]?{enabled:!1}:this.operatorParser.getAutocompleteListParams(e)}return i}updateExpression(e,t,i){const s=this.params.expression,n=this.getExpressionParserIndex(e);if(null==n){const e="column"===i?this.params.advancedFilterExpressionService.getColumnValue(t):t.displayValue??t.key;return Ek(s,this.startPosition,this.startPosition,e,!0)}const r=this.expressionParsers[n].updateExpression(e,t,i);
2return null==r?"column"===i?Ek(s,e,s.length-1,this.params.advancedFilterExpressionService.getColumnValue(t),!0):null!=this.endPosition&&e>this.endPosition+1?null:this.operatorParser.updateExpression(e,t,n):r}getModel(){return this.expressionParsers.length>1?{filterType:"join",type:this.operatorParser.getModel(),conditions:this.expressionParsers.map((e=>e.getModel()))}:this.expressionParsers[0].getModel()}getColumnAutocompleteListParams(){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column","")}getExpressionParserIndex(e){let t;for(let i=0;i<this.expressionParsers.length;i++){if(this.expressionParsers[i].startPosition>e)break;t=i}return t}},rN=class{constructor(e){this.params=e,this.valid=!1}parseExpression(){this.joinExpressionParser=new nN(this.params,0);const e=this.joinExpressionParser.parseExpression();return this.valid=e>=this.params.expression.length-1&&this.joinExpressionParser.isValid(),this.params.expression}isValid(){return this.valid}getValidationMessage(){const e=this.joinExpressionParser.getValidationError();if(!e)return null;const{message:t,startPosition:i,endPosition:s}=e;return i<this.params.expression.length?this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessage",[t,this.params.expression.slice(i,s+1).trim()]):this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessageAtEnd",[t])}getFunctionString(){const e=this.createFunctionParams();return{functionString:`return ${this.joinExpressionParser.getFunctionString(e)};`,params:e}}getFunctionParsed(){const e=this.createFunctionParams();return{expressionFunction:this.joinExpressionParser.getFunctionParsed(e),params:e}}getAutocompleteListParams(e){return this.joinExpressionParser.getAutocompleteListParams(e)??{enabled:!1}}updateExpression(e,t,i){return this.joinExpressionParser.updateExpression(e,t,i)}getModel(){return this.isValid()?this.joinExpressionParser.getModel():null}createFunctionParams(){return{operands:[],operators:[],evaluatorParams:[]}}},oN="32.3.3",aN={version:oN,moduleName:`${r.AdvancedFilterModule}-core`,beans:[class extends ze{constructor(){super(...arguments),this.beanName="advancedFilterService",this.appliedExpression=null,this.expression=null,this.isValid=!0}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.dataTypeService=e.dataTypeService,this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){this.setEnabled(this.gos.get("enableAdvancedFilter"),!0),this.ctrl=this.createManagedBean(new iN(this.enabled)),this.expressionProxy={getValue:(e,t)=>{const i=this.columnModel.getColDefCol(e);return i?this.valueService.getValue(i,t,!0):void 0}},this.addManagedPropertyListener("enableAdvancedFilter",(e=>this.setEnabled(!!e.currentValue))),this.addManagedEventListeners({newColumnsLoaded:e=>this.onNewColumnsLoaded(e)}),this.addManagedPropertyListener("includeHiddenColumnsInAdvancedFilter",(()=>this.updateValidity()))}isEnabled(){return this.enabled}isFilterPresent(){return!!this.expressionFunction}doesFilterPass(e){return this.expressionFunction(this.expressionProxy,e,this.expressionParams)}getModel(){const e=this.createExpressionParser(this.appliedExpression);return e?.parseExpression(),e?.getModel()??null}setModel(e){const t=(e,i)=>{if("join"===e.filterType){const s=this.advancedFilterExpressionService.parseJoinOperator(e),n=e.conditions.map((e=>t(e))).filter((e=>w(e))).join(` ${s} `);return i||e.conditions.length<=1?n:`(${n})`}return this.advancedFilterExpressionService.parseColumnFilterModel(e)},i=e?t(e,!0):null;this.setExpressionDisplayValue(i),this.applyExpression(),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp()}getExpressionDisplayValue(){return this.expression}setExpressionDisplayValue(e){this.expression=e}isCurrentExpressionApplied(){return this.appliedExpression===this.expression}createExpressionParser(e){return e?new rN({expression:e,columnModel:this.columnModel,dataTypeService:this.dataTypeService,valueService:this.valueService,advancedFilterExpressionService:this.advancedFilterExpressionService}):null}getDefaultExpression(e){const t=this.advancedFilterExpressionService.getColumnValue(e)+" ";return{updatedValue:t,updatedPosition:t.length}}isHeaderActive(){return!this.gos.get("advancedFilterParent")}getCtrl(){return this.ctrl}setEnabled(e,t){const i=this.enabled,s=L(this.gos)||F(this.gos);e&&!s&&h("Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model."),this.enabled=e&&s,t||this.enabled===i||this.eventService.dispatchEvent({type:"advancedFilterEnabledChanged",enabled:this.enabled})}applyExpression(){const e=this.createExpressionParser(this.expression);e?.parseExpression(),this.applyExpressionFromParser(e)}
2applyExpressionFromParser(e){if(this.isValid=!e||e.isValid(),!e||!this.isValid)return this.expressionFunction=null,this.expressionParams=null,void(this.appliedExpression=null);const{expressionFunction:t,params:i}=this.getFunction(e);this.expressionFunction=t,this.expressionParams=i,this.appliedExpression=this.expression}getFunction(e){if(this.gos.get("suppressAdvancedFilterEval"))return e.getFunctionParsed();{const{functionString:t,params:i}=e.getFunctionString();return{expressionFunction:new Function("expressionProxy","node","params",t),params:i}}}updateValidity(){this.advancedFilterExpressionService.resetColumnCaches();const e=this.createExpressionParser(this.expression);e?.parseExpression();const t=(!e||e.isValid())!==this.isValid;return this.applyExpressionFromParser(e),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp(),t}onNewColumnsLoaded(e){if("gridInitializing"!==e.source||!this.dataTypeService?.isPendingInference())return;this.ctrl.setInputDisabled(!0);const[t]=this.addManagedEventListeners({dataTypesInferred:()=>{t?.(),this.ctrl.setInputDisabled(!1)}})}},class extends ze{constructor(){super(...arguments),this.beanName="advancedFilterExpressionService",this.columnNameToIdMap={},this.columnAutocompleteEntries=null,this.expressionEvaluatorParams={}}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.dataTypeService=e.dataTypeService}postConstruct(){this.expressionJoinOperators=this.generateExpressionJoinOperators(),this.expressionOperators=this.generateExpressionOperators()}parseJoinOperator(e){const{type:t}=e;return this.expressionJoinOperators[t]??t}getColumnDisplayValue(e){const{colId:t}=e,i=this.getColumnAutocompleteEntries().find((e=>{let{key:i}=e;return i===t}));let s;return i?(s=i.displayValue,this.columnNameToIdMap[s.toLocaleUpperCase()]={colId:t,columnName:s}):s=t,s}getOperatorDisplayValue(e){return this.getExpressionOperator(e.filterType,e.type)?.displayValue??e.type}getOperandModelValue(e,t,i){switch(t){case"number":return w(e)?Number(e):null;case"date":return Pr(this.valueService.parseValue(i,null,e,void 0),!1);case"dateString":{const t=this.valueService.parseValue(i,null,e,void 0);return this.dataTypeService?Pr(this.dataTypeService.getDateParserFunction(i)(t)??null,!1):t}}return e}getOperandDisplayValue(e,t){const{colId:i,filter:s}=e,n=this.columnModel.getColDefCol(i);let r="";if(null!=s){let i;switch(e.filterType){case"number":i=M(s)??"";break;case"date":{const e=kr(s);i=n?this.valueService.formatValue(n,null,e):null;break}case"dateString":{let e;if(this.dataTypeService){const t=kr(s);e=n?this.dataTypeService?.getDateFormatterFunction(n)(t??void 0):null}else e=s;i=n?this.valueService.formatValue(n,null,e):null;break}}"number"!==e.filterType&&(i=i??M(s)??"",t||(i=`"${i}"`)),r=t?i:` ${i}`}return r}parseColumnFilterModel(e){return`[${this.getColumnDisplayValue(e)??""}] ${this.getOperatorDisplayValue(e)??""}${this.getOperandDisplayValue(e)}`}updateAutocompleteCache(e,t){if("column"===t){const{key:t,displayValue:i}=e;this.columnNameToIdMap[e.displayValue.toLocaleUpperCase()]={colId:t,columnName:i}}}translate(e,t){let i=Ik[e];return"function"===typeof i&&(i=i(t)),this.localeService.getLocaleTextFunc()(e,i,t)}generateAutocompleteListParams(e,t,i){return{enabled:!0,type:t,searchString:i,entries:e}}getColumnAutocompleteEntries(){if(this.columnAutocompleteEntries)return this.columnAutocompleteEntries;const e=this.columnModel.getColDefCols()??[],t=[],i=this.gos.get("includeHiddenColumnsInAdvancedFilter");return e.forEach((e=>{e.getColDef().filter&&(i||e.isVisible()||e.isRowGroupActive())&&t.push({key:e.getColId(),displayValue:this.columnNameService.getDisplayNameForColumn(e,"advancedFilter")})})),t.sort(((e,t)=>{const i=e.displayValue??"",s=t.displayValue??"";return i<s?-1:s>i?1:0})),t}getOperatorAutocompleteEntries(e,t){const i=this.getActiveOperators(e);return this.getDataTypeExpressionOperator(t).getEntries(i)}getJoinOperatorAutocompleteEntries(){return Object.entries(this.expressionJoinOperators).map((e=>{let[t,i]=e;return{key:t,displayValue:i}}
2))}getDefaultAutocompleteListParams(e){return this.generateAutocompleteListParams(this.getColumnAutocompleteEntries(),"column",e)}getDataTypeExpressionOperator(e){return this.expressionOperators[e]}getExpressionOperator(e,t){return this.getDataTypeExpressionOperator(e)?.operators?.[t]}getExpressionJoinOperators(){return this.expressionJoinOperators}getColId(e){const t=e.toLocaleUpperCase(),i=this.columnNameToIdMap[t];if(i)return i;const s=this.getColumnAutocompleteEntries().find((e=>{let{displayValue:i}=e;return i.toLocaleUpperCase()===t}));if(s){const{key:e,displayValue:i}=s,n={colId:e,columnName:i};return this.columnNameToIdMap[t]=n,n}return null}getExpressionEvaluatorParams(e){let t=this.expressionEvaluatorParams[e];if(t)return t;const i=this.columnModel.getColDefCol(e);if(!i)return{valueConverter:e=>e};const s=this.dataTypeService?.getBaseDataType(i);switch(s){case"dateString":t={valueConverter:this.dataTypeService?.getDateParserFunction(i)??(e=>e)};break;case"object":t=i.getColDef().filterValueGetter?{valueConverter:e=>e}:{valueConverter:(e,t)=>this.valueService.formatValue(i,t,e)??("function"===typeof e.toString?e.toString():"")};break;case"text":case void 0:t={valueConverter:e=>M(e)};break;default:t={valueConverter:e=>e}}const{filterParams:n}=i.getColDef();return n&&["caseSensitive","includeBlanksInEquals","includeBlanksInLessThan","includeBlanksInGreaterThan"].forEach((e=>{const i=n[e];i&&(t[e]=i)})),this.expressionEvaluatorParams[e]=t,t}getColumnDetails(e){const t=this.columnModel.getColDefCol(e)??void 0;return{column:t,baseCellDataType:(t?this.dataTypeService?.getBaseDataType(t):void 0)??"text"}}generateExpressionOperators(){const e=(e,t)=>this.translate(e,t);return{text:new Gk({translate:e}),boolean:new Vk({translate:e}),object:new Gk({translate:e}),number:new Bk({translate:e,equals:(e,t)=>e===t}),date:new Bk({translate:e,equals:(e,t)=>e.getTime()===t.getTime()}),dateString:new Bk({translate:e,equals:(e,t)=>e.getTime()===t.getTime()})}}getColumnValue(e){let{displayValue:t}=e;return`${kk.COL_START_CHAR}${t}${kk.COL_END_CHAR}`}generateExpressionJoinOperators(){return{AND:this.translate("advancedFilterAnd"),OR:this.translate("advancedFilterOr")}}getActiveOperators(e){const t=e.getColDef().filterParams?.filterOptions;if(!t)return;return t.every((e=>"string"===typeof e))?t:void 0}resetColumnCaches(){this.columnAutocompleteEntries=null,this.columnNameToIdMap={},this.expressionEvaluatorParams={}}}],dependantModules:[ek,io]},lN={version:oN,moduleName:`${r.AdvancedFilterModule}-api`,apiFunctions:{getAdvancedFilterModel:function(e){return e.filterManager?.getAdvancedFilterModel()??null},setAdvancedFilterModel:function(e,t){e.filterManager?.setAdvancedFilterModel(t)},showAdvancedFilterBuilder:function(e){e.filterManager?.toggleAdvancedFilterBuilder(!0,"api")},hideAdvancedFilterBuilder:function(e){e.filterManager?.toggleAdvancedFilterBuilder(!1,"api")}},dependantModules:[aN]},hN={version:oN,moduleName:r.AdvancedFilterModule,dependantModules:[aN,lN]},cN={};function dN(e){e.rangeService?.removeAllCellRanges()}WF(cN,{GridChartsModule:()=>AV,agCharts:()=>TV});var uN=class extends Rs{constructor(){super(...arguments),this.changedCalculatedValues=!1,this.dragging=!1,this.shouldDestroyOnEndDragging=!1}wireBeans(e){this.dragService=e.dragService,this.rangeService=e.rangeService,this.mouseEventService=e.mouseEventService,this.rowPositionUtils=e.rowPositionUtils,this.cellPositionUtils=e.cellPositionUtils,this.ctrlsService=e.ctrlsService}postConstruct(){this.dragService.addDragSource({dragStartPixels:0,eElement:this.getGui(),onDragStart:this.onDragStart.bind(this),onDragging:e=>{this.dragging=!0,this.rangeService.autoScrollService.check(e),this.changedCalculatedValues&&(this.onDrag(e),this.changedCalculatedValues=!1)},onDragStop:e=>{this.dragging=!1,this.onDragEnd(e),this.clearDragProperties(),this.shouldDestroyOnEndDragging&&this.destroy()},onDragCancel:()=>{this.dragging=!1,this.onDragCancel(),this.clearDragProperties()}}),this.addManagedElementListeners(this.getGui(),{mousedown:this.preventRangeExtension.bind(this)})}isDragging(){return this.dragging}getCellCtrl(){return this.cellCtrl}
2setCellCtrl(e){this.cellCtrl=e}getCellRange(){return this.cellRange}setCellRange(e){this.cellRange=e}getRangeStartRow(){return this.rangeStartRow}setRangeStartRow(e){this.rangeStartRow=e}getRangeEndRow(){return this.rangeEndRow}setRangeEndRow(e){this.rangeEndRow=e}getLastCellHovered(){return this.lastCellHovered}preventRangeExtension(e){e.stopPropagation()}onDragStart(e){[this.cellHoverListener]=this.addManagedElementListeners(this.ctrlsService.get("gridCtrl").getGui(),{mousemove:this.updateValuesOnMove.bind(this)}),document.body.classList.add(this.getDraggingCssClass())}getDraggingCssClass(){return`ag-dragging-${this.type===oa.FILL?"fill":"range"}-handle`}updateValuesOnMove(e){const t=this.mouseEventService.getCellPositionForEvent(e);!t||this.lastCellHovered&&this.cellPositionUtils.equals(t,this.lastCellHovered)||(this.lastCellHovered=t,this.changedCalculatedValues=!0)}clearDragProperties(){this.clearValues(),this.rangeService.autoScrollService.ensureCleared(),document.body.classList.remove(this.getDraggingCssClass())}getType(){return this.type}refresh(e){const t=this.getCellCtrl(),i=this.getGui(),s=Se(this.rangeService.getCellRanges()),n=s.startRow,r=s.endRow;if(n&&r){this.rowPositionUtils.before(r,n)?(this.setRangeStartRow(r),this.setRangeEndRow(n)):(this.setRangeStartRow(n),this.setRangeEndRow(r))}if(t!==e||!ls(i)){this.setCellCtrl(e);const t=e.getComp().getParentOfValue();t&&t.appendChild(i)}this.setCellRange(s)}clearValues(){this.lastCellHovered=void 0,this.removeListeners()}removeListeners(){this.cellHoverListener&&(this.cellHoverListener(),this.cellHoverListener=void 0)}destroy(){if(!this.shouldDestroyOnEndDragging&&this.isDragging())return Ki(this.getGui(),!1),void(this.shouldDestroyOnEndDragging=!0);this.shouldDestroyOnEndDragging=!1,super.destroy(),this.removeListeners();const e=this.getGui();e.parentElement&&e.parentElement.removeChild(e)}};function pN(e){const t=e.length;let i=0;if(t<=1)return e;for(let d=0;d<e.length;d++){const t=e[d],s=t.toString().split("e-");s.length>1?i=Math.max(i,parseInt(s[1],10)):Math.floor(t)!==t&&(i=Math.max(i,t.toString().split(".")[1].length))}let s=0,n=0,r=0,o=0,a=0;for(let d=0;d<t;d++)a=e[d],s+=d,n+=a,o+=d*d,r+=d*a;const l=(t*r-s*n)/(t*o-s*s),h=n/t-l*s/t,c=[];for(let d=0;d<=t;d++)c.push(parseFloat((d*l+h).toFixed(i)));return c}var gN=class extends uN{constructor(){super('<div class="ag-fill-handle"></div>'),this.markedCells=[],this.cellValues=[],this.isUp=!1,this.isLeft=!1,this.isReduce=!1,this.type=oa.FILL}wireBeans(e){super.wireBeans(e),this.valueService=e.valueService,this.navigationService=e.navigationService,this.cellNavigationService=e.cellNavigationService,this.visibleColsService=e.visibleColsService}updateValuesOnMove(e){super.updateValuesOnMove(e),this.initialXY||(this.initialXY=this.mouseEventService.getNormalisedPosition(e));const{x:t,y:i}=this.initialXY,{x:s,y:n}=this.mouseEventService.getNormalisedPosition(e),r=Math.abs(t-s),o=Math.abs(i-n),a=this.getFillHandleDirection();let l;l="xy"===a?r>o?"x":"y":a,l!==this.dragAxis&&(this.dragAxis=l,this.changedCalculatedValues=!0)}onDrag(e){if(!this.initialPosition){const e=this.getCellCtrl();if(!e)return;this.initialPosition=e.getCellPosition()}const t=this.getLastCellHovered();t&&this.markPathFrom(this.initialPosition,t)}onDragEnd(e){if(this.initialXY=null,!this.markedCells.length)return;const t="x"===this.dragAxis,i=this.getCellRange(),s=i.columns.length,n=this.getRangeStartRow(),r=this.getRangeEndRow();let o;if(this.isUp||this.isLeft){const e=t?n:this.lastCellMarked;o=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:e.rowIndex,rowStartPinned:e.rowPinned,columnStart:t?this.lastCellMarked.column:i.columns[0],rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnEnd:i.columns[s-1]})}else o=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,columnStart:i.columns[0],rowEndIndex:t?r.rowIndex:this.lastCellMarked.rowIndex,rowEndPinned:t?r.rowPinned:this.lastCellMarked.rowPinned,columnEnd:t?this.lastCellMarked.column:i.columns[s-1]});o&&(this.eventService.dispatchEvent({type:"fillStart"}),this.handleValueChanged(i,o,e),this.rangeService.setCellRanges([o]),this.eventService.dispatchEvent({type:"fillEnd",initialRange:i,finalRange:o}))}onDragCancel(){this.initialXY=null,this.markedCells.length&&this.clearMarkedPath()}getFillHandleDirection(){const e=ce(this.gos)?.direction;return e?"x"!==e&&"y"!==e&&"xy"!==e?(h("valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'."),"xy"):e:"xy"}handleValueChanged(e,t,i){const s=this.rangeService.getRangeEndRow(e),n=this.rangeService.getRangeStartRow(e),r=this.rangeService.getRangeEndRow(t),o=this.rangeService.getRangeStartRow(t),a="y"===this.dragAxis;if(this.isReduce&&!ce(this.gos)?.suppressClearOnFillReduction){const i=a?e.columns:e.columns.filter((e=>t.columns.indexOf(e)<0)),n=a?this.cellNavigationService.getRowBelow(r):o;return void(n&&this.clearCellsInRange(n,s,i))}const l=[],h=[],c=[],d=[];let u=!0,p=0;const g=()=>{l.length=0,h.length=0,c.length=0,d.length=0,p=0},m=(t,i)=>{let h=this.isUp?s:n,c=!1;for(a&&(u=!0,g());!c&&h;){const d=this.rowPositionUtils.getRowNode(h);if(!d)break;a&&t?f(l,t,d,(()=>!this.rowPositionUtils.sameRow(h,this.isUp?n:s))):i&&(u=!0,g(),i.forEac
2h((t=>f(l,t,d,(()=>t!==(this.isLeft?e.columns[0]:Se(e.columns))))))),c=this.rowPositionUtils.sameRow(h,this.isUp?o:r),h=this.isUp?this.cellNavigationService.getRowAbove(h):this.cellNavigationService.getRowBelow(h)}},f=(e,t,s,n)=>{let r,o=!1;if(u)r=this.valueService.getValue(t,s),h.push(r),c.push(this.valueService.getValue(t,s,void 0,!0)),d.push(this.valueService.formatValue(t,s,r)),u=n();else{const{value:n,fromUserFunction:a,sourceCol:l,sourceRowNode:u}=this.processValues({event:i,values:e,initialValues:h,initialNonAggregatedValues:c,initialFormattedValues:d,col:t,rowNode:s,idx:p++});if(r=n,t.isCellEditable(s)){const e=this.valueService.getValue(t,s);a||(l&&!1!==l.getColDef()?.useValueFormatterForExport&&(r=this.valueService.formatValue(l,u,r)??r),!1!==t.getColDef().useValueParserForImport&&(r=this.valueService.parseValue(t,s,l?r:M(r),e))),a&&e===r?o=!0:s.setDataValue(t,r,"rangeService")}}o||e.push({value:r,column:t,rowNode:s})};if(a)e.columns.forEach((e=>{m(e)}));else{const e=this.isLeft?[...t.columns].reverse():t.columns;m(void 0,e)}}clearCellsInRange(e,t,i){const s={startRow:e,endRow:t,columns:i,startColumn:i[0]};this.rangeService.clearCellRangeCellValues({cellRanges:[s]})}processValues(e){const{event:t,values:i,initialValues:s,initialNonAggregatedValues:n,initialFormattedValues:r,col:o,rowNode:a,idx:l}=e,h=ce(this.gos)?.setFillValue;let c;if(c="y"===this.dragAxis?this.isUp?"up":"down":this.isLeft?"left":"right",h){const e=h(this.gos.addGridCommonParams({event:t,values:i.map((e=>{let{value:t}=e;return t})),initialValues:s,initialNonAggregatedValues:n,initialFormattedValues:r,currentIndex:l,currentCellValue:this.valueService.getValue(o,a),direction:c,column:o,rowNode:a}));if(!1!==e)return{value:e,fromUserFunction:!0}}const d=!i.some((e=>{let{value:t}=e;const i=parseFloat(t);return isNaN(i)||i.toString()!==t.toString()}));if(t.altKey||!d){if(d&&1===s.length){const e=this.isUp||this.isLeft?-1:1;return{value:parseFloat(Se(i).value)+1*e,fromUserFunction:!1}}const{value:e,column:t,rowNode:n}=i[l%i.length];return{value:e,fromUserFunction:!1,sourceCol:t,sourceRowNode:n}}return{value:Se(pN(i.map((e=>{let{value:t}=e;return Number(t)})))),fromUserFunction:!1}}clearValues(){this.clearMarkedPath(),this.clearCellValues(),this.lastCellMarked=void 0,super.clearValues()}clearMarkedPath(){this.markedCells.forEach((e=>{if(!e.isAlive())return;const t=e.getComp();t.addOrRemoveCssClass("ag-selection-fill-top",!1),t.addOrRemoveCssClass("ag-selection-fill-right",!1),t.addOrRemoveCssClass("ag-selection-fill-bottom",!1),t.addOrRemoveCssClass("ag-selection-fill-left",!1)})),this.markedCells.length=0,this.isUp=!1,this.isLeft=!1,this.isReduce=!1}clearCellValues(){this.cellValues.length=0}markPathFrom(e,t){if(this.clearMarkedPath(),this.clearCellValues(),"y"===this.dragAxis){if(this.rowPositionUtils.sameRow(t,e))return;const i=this.rowPositionUtils.before(t,e),s=this.getRangeStartRow(),n=this.getRangeEndRow();i&&(t.rowPinned==s.rowPinned&&t.rowIndex>=s.rowIndex||s.rowPinned!=n.rowPinned&&t.rowPinned==n.rowPinned&&t.rowIndex<=n.rowIndex)?(this.reduceVertical(e,t),this.isReduce=!0):(this.extendVertical(e,t,i),this.isReduce=!1)}else{const i=e.column,s=t.column;if(i===s)return;const n=this.visibleColsService.getAllCols(),r=n.indexOf(i),o=n.indexOf(s);o<=r&&o>=n.indexOf(this.getCellRange().columns[0])?(this.reduceHorizontal(e,t),this.isReduce=!0):(this.extendHorizontal(e,t,o<r),this.isReduce=!1)}this.lastCellMarked=t}extendVertical(e,t,i){const{navigationService:s,rangeService:n}=this;let r=e;do{const o=this.getCellRange(),a=o.columns.length;for(let l=0;l<a;l++){const h=o.columns[l],c={...{rowIndex:r.rowIndex,rowPinned:r.rowPinned},column:h},d=n.isCellInSpecificRange(c,o),u=this.rowPositionUtils.sameRow(r,e);if(i&&(this.isUp=!0),!u){const e=s.getCellByPosition(c);if(e){this.markedCells.push(e);const s=e.getComp();d||(s.addOrRemoveCssClass("ag-selection-fill-left",0===l),s.addOrRemoveCssClass("ag-selection-fill-right",l===a-1)),s.addOrRemoveCssClass(i?"ag-selection-fill-top":"ag-selection-fill-bottom",this.rowPositionUtils.sameRow(r,t))}}}if(this.rowPositionUtils.sameRow(r,t))break}while(r=i?this.cellNavigationService.getRowAbove(r):this.cellNavigationService.getRowBelow(r))}reduceVertical(e,t){let i=e;do{const e=this.getCellRange(),s=e.columns.length,n=this.rowPositionUtils.sameRow(i,t);for(let r=0;r<s;r++){const s={...{rowIndex:i.rowIndex,rowPinned:i.rowPinned},column:e.columns[r]},n=this.navigationService.getCellByPosition(s);if(n){this.markedCells.push(n);n.getComp().addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(i,t))}}if(n)break}while(i=this.cellNavigationService.getRowAbove(i))}extendHorizontal(e,t,i){const s=this.visibleColsService.getAllCols(),n=s.indexOf(i?t.column:e.column),r=s.indexOf(i?this.getCellRange().columns[0]:t.column),o=i?0:1,a=s.slice(n+o,r+o),l=this.getRangeStartRow(),h=this.getRangeEndRow();a.forEach((e=>{let t=l,s=!1;do{s=this.rowPositionUtils.sameRow(t,h);const n=this.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});if(n){this.markedCells.push(n);const s=n.getComp();s.addOrRemoveCssClass("ag-selection-fill-top",this.rowPositionUtils.sameRow(t,l)),s.addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(t,h)),i?(this.isLeft=!0,s.addOrRemoveCssClass("ag-selection-fill-left",e===a[0])):s.addOrRemoveCssClass("ag-selection-fill-right",e===Se(a))}t=this.cellNavigationService.getRowBelow(t)}while(!s)}))}reduceHorizontal(e,t){const i=this.visibleColsService.getAllCols(),s=i.indexOf(t.column),n=i.indexOf(e.column),r=i.slice(s,n),o=this.getRangeStartRow(),a=this.getRangeEndRow();r.forEach((e=>
2{let t=o,i=!1;do{i=this.rowPositionUtils.sameRow(t,a);const s=this.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});if(s){this.markedCells.push(s);s.getComp().addOrRemoveCssClass("ag-selection-fill-right",e===r[0])}t=this.cellNavigationService.getRowBelow(t)}while(!i)}))}refresh(e){const t=this.rangeService.getCellRanges()[0];t.startRow&&t.endRow?super.refresh(e):this.destroy()}},mN=class extends uN{constructor(){super('<div class="ag-range-handle"></div>'),this.type=oa.RANGE,this.rangeFixed=!1}onDrag(e){const t=this.getLastCellHovered();if(!t)return;const i=this.rangeService.getCellRanges(),s=Se(i);if(this.rangeFixed||(this.fixRangeStartEnd(s),this.rangeFixed=!0),this.endPosition={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column},2===i.length&&i[0].type===aa.DIMENSION&&s.type===aa.VALUE){!this.rowPositionUtils.sameRow(this.endPosition,this.rangeService.getRangeEndRow(s))&&this.rangeService.updateRangeEnd(i[0],{...this.endPosition,column:i[0].columns[0]},!0)}this.rangeService.extendLatestRangeToCell(this.endPosition)}onDragEnd(e){const t=Se(this.rangeService.getCellRanges());this.fixRangeStartEnd(t),this.rangeFixed=!1}onDragCancel(){this.rangeFixed=!1}fixRangeStartEnd(e){const t=this.rangeService.getRangeStartRow(e),i=this.rangeService.getRangeEndRow(e),s=e.columns[0];e.startRow=t,e.endRow=i,e.startColumn=s}},fN="32.3.3",vN={version:fN,moduleName:`${r.RangeSelectionModule}-core`,beans:[class extends ze{constructor(){super(...arguments),this.beanName="rangeService",this.cellRanges=[],this.bodyScrollListener=this.onBodyScroll.bind(this),this.dragging=!1,this.intersectionRange=!1}wireBeans(e){this.rowModel=e.rowModel,this.dragService=e.dragService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.cellNavigationService=e.cellNavigationService,this.pinnedRowModel=e.pinnedRowModel,this.rowPositionUtils=e.rowPositionUtils,this.cellPositionUtils=e.cellPositionUtils,this.ctrlsService=e.ctrlsService,this.valueService=e.valueService}postConstruct(){const e=this.onColumnsChanged.bind(this),t=()=>this.removeAllCellRanges(),i=this.refreshLastRangeStart.bind(this);this.addManagedEventListeners({newColumnsLoaded:e,columnVisible:e,columnValueChanged:e,columnPivotModeChanged:t,columnRowGroupChanged:t,columnPivotChanged:t,columnGroupOpened:i,columnMoved:i,columnPinned:i}),this.ctrlsService.whenReady(this,(e=>{const t=e.gridBodyCtrl;this.autoScrollService=new Vn({scrollContainer:t.getBodyViewportElement(),scrollAxis:"xy",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),getHorizontalPosition:()=>t.getScrollFeature().getHScrollPosition().left,setHorizontalPosition:e=>t.getScrollFeature().setHorizontalScrollPosition(e),shouldSkipVerticalScroll:()=>!k(this.gos,"normal"),shouldSkipHorizontalScroll:()=>!t.getScrollFeature().isHorizontalScrollShowing()})}))}onColumnsChanged(){this.refreshLastRangeStart();const e=this.visibleColsService.getAllCols();
2this.cellRanges.forEach((t=>{const i=t.columns;t.columns=t.columns.filter((t=>t.isVisible()&&-1!==e.indexOf(t)));!we(i,t.columns)&&this.dispatchChangedEvent(!1,!0,t.id)}));const t=this.cellRanges.length;this.cellRanges=this.cellRanges.filter((e=>e.columns.length>0)),t>this.cellRanges.length&&this.dispatchChangedEvent(!1,!0)}refreshLastRangeStart(){const e=Se(this.cellRanges);e&&this.refreshRangeStart(e)}isContiguousRange(e){const t=e.columns;if(!t.length)return!1;const i=this.visibleColsService.getAllCols(),s=t.map((e=>i.indexOf(e))).sort(((e,t)=>e-t));return Se(s)-s[0]+1===t.length}getRangeStartRow(e){if(e.startRow&&e.endRow)return this.rowPositionUtils.before(e.startRow,e.endRow)?e.startRow:e.endRow;return{rowIndex:0,rowPinned:this.pinnedRowModel.getPinnedTopRowCount()>0?"top":null}}getRangeEndRow(e){if(e.startRow&&e.endRow)return this.rowPositionUtils.before(e.startRow,e.endRow)?e.endRow:e.startRow;const t=this.pinnedRowModel.getPinnedBottomRowCount();return t>0?{rowIndex:t-1,rowPinned:"bottom"}:{rowIndex:this.rowModel.getRowCount()-1,rowPinned:null}}setRangeToCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!le(this.gos))return;const i=this.calculateColumnsBetween(e.column,e.column);if(!i)return;(ae(this.gos)||!t||b(this.cellRanges))&&this.removeAllCellRanges(!0);const s={rowIndex:e.rowIndex,rowPinned:e.rowPinned},n={startRow:s,endRow:s,columns:i,startColumn:e.column};this.cellRanges.push(n),this.setNewestRangeStartCell(e),this.onDragStop(),this.dispatchChangedEvent(!0,!0)}extendLatestRangeToCell(e){if(this.isEmpty()||!this.newestRangeStartCell)return;const t=Se(this.cellRanges);this.updateRangeEnd(t,e)}updateRangeEnd(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=t.column,n=this.calculateColumnsBetween(e.startColumn,s);n&&!this.isLastCellOfRange(e,t)&&(e.columns=n,e.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},i||this.dispatchChangedEvent(!0,!0,e.id))}refreshRangeStart(e){const{startColumn:t,columns:i}=e,s=(t,i)=>{const s=e.columns.filter((e=>e!==t));t?(e.startColumn=t,e.columns=i?[t,...s]:[...s,t]):e.columns=s},{left:n,right:r}=this.getRangeEdgeColumns(e);if(t===i[0]&&t!==n)return void s(n,!0);t===Se(i)&&t===r&&s(r,!1)}getRangeEdgeColumns(e){const t=this.visibleColsService.getAllCols(),i=e.columns.map((e=>t.indexOf(e))).filter((e=>e>-1)).sort(((e,t)=>e-t));return{left:t[i[0]],right:t[Se(i)]}}extendLatestRangeInDirection(e){if(this.isEmpty()||!this.newestRangeStartCell)return;const t=e.key,i=e.ctrlKey||e.metaKey,s=Se(this.cellRanges),n=this.newestRangeStartCell,r=s.columns[0],o=Se(s.columns),a=s.endRow.rowIndex,l=s.endRow.rowPinned,h={column:n.column===r?o:r,rowIndex:a,rowPinned:l},c=this.cellNavigationService.getNextCellToFocus(t,h,i);return c?(this.setCellRange({rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:c.rowIndex,rowEndPinned:c.rowPinned,columnStart:n.column,columnEnd:c.column}),c):void 0}setCellRange(e){le(this.gos)&&(this.removeAllCellRanges(!0),this.addCellRange(e))}setCellRanges(e){be(this.cellRanges,e)||(this.removeAllCellRanges(!0),e.forEach((e=>{e.columns&&e.startRow&&this.setNewestRangeStartCell({rowIndex:e.startRow.rowIndex,rowPinned:e.startRow.rowPinned,column:e.columns[0]}),this.cellRanges.push(e)})),this.dispatchChangedEvent(!1,!0))}setNewestRangeStartCell(e){this.newestRangeStartCell=e}clearCellRangeCellValues(e){let{cellRanges:t}=e;const{cellEventSource:i="rangeService",dispatchWrapperEvents:s,wrapperEventSource:n="deleteKey"}=e;s&&(this.eventService.dispatchEvent({type:"cellSelectionDeleteStart",source:n}),this.eventService.dispatchEvent({type:"rangeDeleteStart",source:n})),t||(t=this.cellRanges),t.forEach((e=>{this.forEachRowInRange(e,(t=>{const s=this.rowPositionUtils.getRowNode(t);if(s)for(let n=0;n<e.columns.length;n++){const t=this.columnModel.getCol(e.columns[n]);if(!t||!t.isCellEditable(s))continue;const r=this.valueService.getDeleteValue(t,s);s.setDataValue(t,r,i)}}))})),s&&(this.eventService.dispatchEvent({type:"cellSelectionDeleteEnd",source:n}),this.eventService.dispatchEvent({type:"rangeDeleteEnd",source:n}))}
2createCellRangeFromCellRangeParams(e){return this.createPartialCellRangeFromRangeParams(e,!1)}createPartialCellRangeFromRangeParams(e,t){let i,s=!1;if(e.columns)i=e.columns.map((e=>this.columnModel.getCol(e))).filter((e=>e));else{const t=this.columnModel.getCol(e.columnStart),n=this.columnModel.getCol(e.columnEnd);if(!t||!n)return;i=this.calculateColumnsBetween(t,n),i&&i.length&&(s=i[0]!==t)}if(!i||!t&&0===i.length)return;return{startRow:null!=e.rowStartIndex?{rowIndex:e.rowStartIndex,rowPinned:e.rowStartPinned||null}:void 0,endRow:null!=e.rowEndIndex?{rowIndex:e.rowEndIndex,rowPinned:e.rowEndPinned||null}:void 0,columns:i,startColumn:s?Se(i):i[0]}}addCellRange(e){const t=this.gos;if(!le(t))return;if(oe(t)&&ae(t)&&this.cellRanges.length>0)return h("cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`");const i=this.createCellRangeFromCellRangeParams(e);i&&(i.startRow&&this.setNewestRangeStartCell({rowIndex:i.startRow.rowIndex,rowPinned:i.startRow.rowPinned,column:i.startColumn}),this.cellRanges.push(i),this.dispatchChangedEvent(!1,!0,i.id))}getCellRanges(){return this.cellRanges}isEmpty(){return 0===this.cellRanges.length}isMoreThanOneCell(){const e=this.cellRanges.length;if(0===e)return!1;if(e>1)return!0;const t=this.cellRanges[0],i=this.getRangeStartRow(t),s=this.getRangeEndRow(t);return i.rowPinned!==s.rowPinned||i.rowIndex!==s.rowIndex||1!==t.columns.length}areAllRangesAbleToMerge(){const e=new Map;if(this.cellRanges.length<=1)return!0;let t;
2this.cellRanges.forEach((t=>{this.forEachRowInRange(t,(i=>{const s=`${i.rowPinned||"normal"}_${i.rowIndex}`,n=e.get(s),r=t.columns.map((e=>e.getId()));if(n){const e=r.filter((e=>-1===n.indexOf(e)));n.push(...e)}else e.set(s,r)}))}));for(const i of e.values()){const e=i.sort().join();if(void 0!==t){if(t!==e)return!1}else t=e}return!0}forEachRowInRange(e,t){const i=this.getRangeStartRow(e),s=this.getRangeEndRow(e);let n=i;for(;n&&(t(n),!this.rowPositionUtils.sameRow(n,s));)n=this.cellNavigationService.getRowBelow(n)}removeAllCellRanges(e){this.isEmpty()||(this.onDragStop(),this.cellRanges.length=0,e||this.dispatchChangedEvent(!1,!0))}onBodyScroll(){this.dragging&&this.lastMouseEvent&&this.onDragging(this.lastMouseEvent)}isCellInAnyRange(e){return this.getCellRangeCount(e)>0}isCellInSpecificRange(e,t){const i=null!==t.columns&&Ee(t.columns,e.column),s=this.isRowInRange(e.rowIndex,e.rowPinned,t);return i&&s}isLastCellOfRange(e,t){const{startRow:i,endRow:s}=e,n=this.rowPositionUtils.before(i,s)?s:i,r=t.rowIndex===n.rowIndex&&t.rowPinned===n.rowPinned,o=e.columns[0],a=Se(e.columns),l=e.startColumn===o?a:o;return t.column===l&&r}isBottomRightCell(e,t){const i=this.visibleColsService.getAllCols(),s=e.columns.map((e=>i.indexOf(e))).sort(((e,t)=>e-t)),{startRow:n,endRow:r}=e,o=this.rowPositionUtils.before(n,r)?r:n,a=i.indexOf(t.column)===Se(s),l=t.rowIndex===o.rowIndex&&S(t.rowPinned)===S(o.rowPinned);return a&&l}getCellRangeCount(e){return this.isEmpty()?0:this.cellRanges.filter((t=>this.isCellInSpecificRange(e,t))).length}isRowInRange(e,t,i){const s=this.getRangeStartRow(i),n=this.getRangeEndRow(i),r={rowIndex:e,rowPinned:t||null},o=r.rowIndex===s.rowIndex&&r.rowPinned==s.rowPinned,a=r.rowIndex===n.rowIndex&&r.rowPinned==n.rowPinned;if(o||a)return!0;const l=!this.rowPositionUtils.before(r,s),h=this.rowPositionUtils.before(r,n);return l&&h}getDraggingRange(){return this.draggingRange}onDragStart(e){if(!le(this.gos))return;const{ctrlKey:t,metaKey:i,shiftKey:s}=e,n=t||i,r=!!!ae(this.gos)&&n,o=s&&Ce(this.cellRanges);r||o&&!w(Se(this.cellRanges).type)||this.removeAllCellRanges(!0);const a=this.dragService.getStartTarget();if(a&&this.updateValuesOnMove(a),this.lastCellHovered){if(this.dragging=!0,this.lastMouseEvent=e,this.intersectionRange=r&&this.getCellRangeCount(this.lastCellHovered)>1,o||this.setNewestRangeStartCell(this.lastCellHovered),this.cellRanges.length>0)this.draggingRange=Se(this.cellRanges);else{const e={rowIndex:this.lastCellHovered.rowIndex,rowPinned:this.lastCellHovered.rowPinned};this.draggingRange={startRow:e,endRow:e,columns:[this.lastCellHovered.column],startColumn:this.newestRangeStartCell.column},this.cellRanges.push(this.draggingRange)}this.ctrlsService.getGridBodyCtrl().addScrollEventListener(this.bodyScrollListener),this.dispatchChangedEvent(!0,!1,this.draggingRange.id)}}intersectLastRange(e){if(e&&this.dragging)return;if(ae(this.gos))return;if(this.isEmpty())return;const t=this.rowPositionUtils,i=Se(this.cellRanges),s=this.getRangeStartRow(i),n=this.getRangeEndRow(i),r=[];this.cellRanges.slice(0,-1).forEach((e=>{const o=this.getRangeStartRow(e),a=this.getRangeEndRow(e),l=e.columns,h=l.filter((e=>-1===i.columns.indexOf(e)));if(h.length===l.length)return void r.push(e);if(t.before(n,o)||t.before(a,s))return void r.push(e);const c=r.length;if(t.before(o,s)){const e={columns:[...l],startColumn:i.startColumn,startRow:{...o},endRow:this.cellNavigationService.getRowAbove(s)};r.push(e)}if(h.length>0){const e={columns:h,startColumn:Ee(h,i.startColumn)?i.startColumn:h[0],startRow:this.rowMax([{...s},{...o}]),endRow:this.rowMin([{...n},{...a}])};r.push(e)}t.before(n,a)&&r.push({columns:[...l],startColumn:i.startColumn,startRow:this.cellNavigationService.getRowBelow(n),endRow:{...a}}),r.length-c===1&&(r[r.length-1].id=e.id)})),this.cellRanges=r,e&&this.dispatchChangedEvent(!1,!0)}rowMax(e){let t;return e.forEach((e=>{(void 0===t||this.rowPositionUtils.before(t,e))&&(t=e)})),t}rowMin(e){let t;return e.forEach((e=>{(void 0===t||this.rowPositionUtils.before(e,t))&&(t=e)})),t}updateValuesOnMove(e){const t=Be(this.gos,e,ua.DOM_DATA_KEY_CELL_CTRL),i=t?.getCellPosition();this.cellHasChanged=!1,!i||this.lastCellHovered&&this.cellPositionUtils.equals(i,this.lastCellHovered)||(t?.isEditing()?this.dragService.cancelDrag(e):(this.lastCellHovered&&(this.cellHasChanged=!0),this.lastCellHovered=i))}onDragging(e){if(!this.dragging||!e)return;
2this.updateValuesOnMove(e.target),this.lastMouseEvent=e;const t=this.lastCellHovered,i=e=>t&&t.rowPinned===e&&this.newestRangeStartCell.rowPinned===e,s=i("top")||i("bottom");if(this.autoScrollService.check(e,s),!this.cellHasChanged)return;const n=this.calculateColumnsBetween(this.newestRangeStartCell.column,t.column);n&&(this.draggingRange.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},this.draggingRange.columns=n,this.dispatchChangedEvent(!1,!1,this.draggingRange.id))}onDragStop(){if(!this.dragging)return;const{id:e}=this.draggingRange;this.autoScrollService.ensureCleared(),this.ctrlsService.getGridBodyCtrl().removeScrollEventListener(this.bodyScrollListener),this.lastMouseEvent=null,this.dragging=!1,this.draggingRange=void 0,this.lastCellHovered=void 0,this.intersectionRange&&(this.intersectionRange=!1,this.intersectLastRange()),this.dispatchChangedEvent(!1,!0,e)}dispatchChangedEvent(e,t,i){this.eventService.dispatchEvent({type:"cellSelectionChanged",started:e,finished:t,id:i}),this.eventService.dispatchEvent({type:"rangeSelectionChanged",started:e,finished:t,id:i})}calculateColumnsBetween(e,t){const i=this.visibleColsService.getAllCols(),s=e===t,n=i.indexOf(e),r=e=>h(`column ${e.getId()} is not visible`);if(n<0)return void r(e);const o=s?n:i.indexOf(t);if(o<0)return void r(t);if(s)return[e];const a=Math.min(n,o),l=a===n?o:n,c=[];for(let h=a;h<=l;h++)c.push(i[h]);return c}},class extends ze{constructor(){super(...arguments),this.beanName="selectionHandleFactory"}createSelectionHandle(e){return this.createBean(e===oa.RANGE?new mN:new gN)}}],dependantModules:[ek]},yN={version:fN,moduleName:`${r.RangeSelectionModule}-api`,apiFunctions:{getCellRanges:function(e){return e.rangeService?.getCellRanges()??null},addCellRange:function(e,t){e.rangeService?.addCellRange(t)},clearRangeSelection:dN,clearCellSelection:dN},dependantModules:[vN]},CN={version:fN,moduleName:r.RangeSelectionModule,dependantModules:[vN,yN]};UF(cN,e);var SN={area:{isCartesian:!0,canInvert:!0},bar:{isCartesian:!0,canInvert:!0},histogram:{isCartesian:!0},line:{isCartesian:!0,canInvert:!0},pie:{isPie:!0},donut:{isPie:!0,canInvert:!0},scatter:{isCartesian:!0},bubble:{isCartesian:!0},"radial-column":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radial-bar":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radar-line":{isPolar:!0,isEnterprise:!0,canInvert:!0},"radar-area":{isPolar:!0,isEnterprise:!0,canInvert:!0},nightingale:{isPolar:!0,isEnterprise:!0,canInvert:!0},"range-bar":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0}
2,"range-area":{isCartesian:!0,isEnterprise:!0},"box-plot":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0},treemap:{isEnterprise:!0,isHierarchical:!0},sunburst:{isEnterprise:!0,isHierarchical:!0},heatmap:{isCartesian:!0,isEnterprise:!0},waterfall:{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0}};function wN(e){return Pc.COMBO_CHART_TYPES.includes(e)}function bN(e,t){return!!SN[e]?.[t]}var xN=new Set(["stackedColumn","normalizedColumn","stackedBar","normalizedBar"]);function MN(e){return bN(e,"isCartesian")}function DN(e){return bN(e,"isPolar")}function IN(e){return bN(e,"isHierarchical")}function RN(e){return"doughnut"===e?"donut":e}function EN(e){return Pc.CHART_TYPE_TO_SERIES_TYPE[e]}function AN(e){return EN(e)??"line"}function TN(e){return bN(e,"isPie")}function PN(e){return IN(AN(e))?void 0:1}function LN(e){return IN(AN(e))?2:function(e){return"pie"===e||"waterfall"===e||"histogram"===e}(e)?1:void 0}function FN(e){return!wN(e)&&bN(AN(e),"canInvert")}function kN(e){switch(e){case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":case"stackedArea":case"normalizedArea":return`${e}Full`;case"doughnut":return"donut";case"areaColumnCombo":return"AreaColumnCombo";default:return e}}var NN=class extends ze{constructor(e,t,i,s){super(),this.chartController=e,this.eGui=t,this.cssClass=i,this.createPanels=s,this.panels=[]}postConstruct(){this.addManagedListeners(this.chartController,{chartUpdated:()=>this.refreshPanels(!0),chartApiUpdate:()=>this.refreshPanels(!1)})}addComponent(e){this.createBean(e),this.panels.push(e),e.addCssClass(this.cssClass),this.eGui.appendChild(e.getGui())}refreshPanels(e){const t=this.chartController.getChartType(),i=this.chartController.isGrouping(),s=AN(t);e&&t===this.chartType&&i===this.isGrouping||(this.destroyPanels(),this.createPanels(t,s),this.chartType=t,this.isGrouping=i)}destroyPanels(){this.panels.forEach((e=>{os(e.getGui()),this.destroyBean(e)})),this.panels=[]}destroy(){this.destroyPanels(),super.destroy()}},ON=class extends Rs{constructor(e){super(),this.chartMenuParamsFactory=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e=this.chartMenuParamsFactory.addEnableParams("animation.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("animation"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuParamsFactory.getDefaultNumberInputParams("animation.duration","durationMillis",{min:0});this.setTemplate('<div>\n            <ag-group-component data-ref="animationGroup">\n                <ag-input-number-field data-ref="animationHeightInput"></ag-input>\n            </ag-group-component>\n        </div>',[nk,Cr],{animationGroup:e,animationHeightInput:t})}},GN={selector:"AG-COLOR-INPUT",component:class extends fr{constructor(){super({template:'\n            <div role="presentation" class="ag-color-input">\n                <div data-ref="eLabel" class="ag-input-field-label"></div>\n                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n                    <input data-ref="eInput" class="ag-input-field-input">\n                    <div data-ref="eColor" class="ag-color-input-color"></div>\n                </div>\n            </div>'}),this.eColor=Is}wireBeans(e){this.chartTranslationService=e.chartTranslationService}setColor(e){const t=e.toRgbaString();this.setValue(vF.Color.fromString(t).toHexString().toUpperCase(),!0),this.eColor.style.backgroundColor=t}setValue(e,t){const i=vF.Color.validColorString(e??"");return this.eInput.setCustomValidity(i?"":this.chartTranslationService.translate("invalidColor")),super.setValue(e,t),i&&!t&&this.dispatchLocalEvent({type:"colorChanged"}),this}onColorChanged(e){this.addManagedListeners(this,{colorChanged:()=>e(vF.Color.fromString(this.value))})}}},BN=class e extends Rs{constructor(e){super('<div class="ag-color-panel" tabindex="-1">\n            <div data-ref="spectrumColor" class="ag-spectrum-color">\n                <div class="ag-spectrum-sat ag-spectrum-fill">\n                    <div data-ref="spectrumVal" class="ag-spectrum-val ag-spectrum-fill">\n                        <div data-ref="spectrumDragger" class="ag-spectrum-dragger"></div>\n                    </div>\n                </div>\n            </div>\n            <div class="ag-spectrum-tools">\n                <div data-ref="spectrumHue" class="ag-spectrum-hue ag-spectrum-tool">\n                    <div class="ag-spectrum-hue-background"></div>\n                    <div data-ref="spectrumHueSlider" class="ag-spectrum-slider"></div>\n                </div>
2\n                <div data-ref="spectrumAlpha" class="ag-spectrum-alpha ag-spectrum-tool">\n                    <div class="ag-spectrum-alpha-background"></div>\n                    <div data-ref="spectrumAlphaSlider" class="ag-spectrum-slider"></div>\n                </div>\n                <ag-color-input data-ref="colorInput"></ag-color-input>\n                <div data-ref="recentColors" class="ag-recent-colors"></div>\n            </div>\n        </div>',[GN]),this.H=1,this.S=1,this.B=1,this.A=1,this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1,this.colorChanged=!1,this.spectrumColor=Is,this.spectrumVal=Is,this.spectrumDragger=Is,this.spectrumHue=Is,this.spectrumHueSlider=Is,this.spectrumAlpha=Is,this.spectrumAlphaSlider=Is,this.colorInput=Is,this.recentColors=Is,this.picker=e.picker}postConstruct(){this.initTabIndex(),this.initRecentColors(),this.addGuiEventListener("focus",(()=>this.spectrumColor.focus())),this.addGuiEventListener("keydown",(e=>{e.key!==js.ENTER||e.defaultPrevented||this.destroy()})),this.addManagedListeners(this.spectrumColor,{keydown:e=>this.moveDragger(e)}),this.addManagedListeners(this.spectrumAlphaSlider,{keydown:e=>this.moveAlphaSlider(e)}
2),this.addManagedListeners(this.spectrumHueSlider,{keydown:e=>this.moveHueSlider(e)}),this.addManagedListeners(this.spectrumVal,{mousedown:this.onSpectrumDraggerDown.bind(this)}),this.addManagedListeners(this.spectrumHue,{mousedown:this.onSpectrumHueDown.bind(this)}),this.addManagedListeners(this.spectrumAlpha,{mousedown:this.onSpectrumAlphaDown.bind(this)}),this.addGuiEventListener("mousemove",(e=>{this.onSpectrumDraggerMove(e),this.onSpectrumHueMove(e),this.onSpectrumAlphaMove(e)})),this.addManagedListeners(document,{mouseup:this.onMouseUp.bind(this)}),this.colorInput.onColorChanged(this.setColor.bind(this)),this.addManagedListeners(this.recentColors,{click:this.onRecentColorClick.bind(this),keydown:e=>{e.key!==js.ENTER&&e.key!==js.SPACE||(e.preventDefault(),this.onRecentColorClick(e))}})}initTabIndex(){const e=this.tabIndex=this.gos.get("tabIndex").toString();this.spectrumColor.setAttribute("tabindex",e),this.spectrumHueSlider.setAttribute("tabindex",e),this.spectrumAlphaSlider.setAttribute("tabindex",e)}refreshSpectrumRect(){return this.spectrumValRect=this.spectrumVal.getBoundingClientRect()}refreshHueRect(){return this.spectrumHueRect=this.spectrumHue.getBoundingClientRect()}refreshAlphaRect(){return this.spectrumAlphaRect=this.spectrumAlpha.getBoundingClientRect()}onSpectrumDraggerDown(e){e.preventDefault(),this.refreshSpectrumRect(),this.isSpectrumDragging=!0,this.moveDragger(e)}onSpectrumDraggerMove(e){this.isSpectrumDragging&&this.moveDragger(e)}onSpectrumHueDown(e){this.refreshHueRect(),this.isSpectrumHueDragging=!0,this.moveHueSlider(e)}onSpectrumHueMove(e){this.isSpectrumHueDragging&&this.moveHueSlider(e)}onSpectrumAlphaDown(e){this.refreshAlphaRect(),this.isSpectrumAlphaDragging=!0,this.moveAlphaSlider(e)}onSpectrumAlphaMove(e){this.isSpectrumAlphaDragging&&this.moveAlphaSlider(e)}onMouseUp(){this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1}moveDragger(e){const t=this.spectrumValRect;if(!t)return;let i,s;if(e instanceof MouseEvent)i=e.clientX-t.left,s=e.clientY-t.top;else{const t=e.key===js.LEFT,n=e.key===js.RIGHT,r=e.key===js.UP,o=e.key===js.DOWN,a=r||o,l=t||n;if(!a&&!l)return;e.preventDefault();const{x:h,y:c}=this.getSpectrumValue();i=h+(l?t?-5:5:0),s=c+(a?r?-5:5:0)}i=Math.max(i,0),i=Math.min(i,t.width),s=Math.max(s,0),s=Math.min(s,t.height),this.setSpectrumValue(i/t.width,1-s/t.height)}moveHueSlider(e){const t=this.spectrumHueRect;if(!t)return;const i=this.moveSlider(this.spectrumHueSlider,e);null!=i&&(this.H=1-i/t.width,this.update())}moveAlphaSlider(e){const t=this.spectrumAlphaRect;if(!t)return;const i=this.moveSlider(this.spectrumAlphaSlider,e);null!=i&&(this.A=i/t.width,this.update())}moveSlider(e,t){const i=e.getBoundingClientRect(),s=e.parentElement?.getBoundingClientRect();if(!e||!s)return null;const n=i.width/2;let r;if(t instanceof MouseEvent)r=Math.floor(t.clientX-s.left);else{const i=t.key===js.LEFT,s=t.key===js.RIGHT;if(!i&&!s)return null;t.preventDefault();const o=i?-5:5;r=parseFloat(e.style.left)+n+o}return r=Math.max(r,0),r=Math.min(r,s.width),e.style.left=r-n+"px",r}update(e){const t=360*this.H,i=vF.Color.fromHSB(t,this.S,this.B,this.A),s=i.toRgbaString(),n=vF.Color.fromHSB(t,this.S,this.B).toRgbaString(),r=vF.Color.fromHSB(t,1,1).toRgbaString(),o=this.picker;vF.Color.fromString(o.getValue()).toRgbaString()!==s&&(this.colorChanged=!0),o.setValue(s),this.spectrumColor.style.backgroundColor=r,this.spectrumDragger.style.backgroundColor=n,this.spectrumHueSlider.style.backgroundColor=r,this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color-from",vF.Color.fromHSB(t,this.S,this.B,0).toRgbaString()),this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color-to",n),this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color",s),e||this.colorInput.setColor(i)}setSpectrumValue(e,t,i){const s=this.spectrumValRect||this.refreshSpectrumRect();if(null==s)return;const n=this.spectrumDragger,r=n.getBoundingClientRect();e=Math.max(0,e),e=Math.min(1,e),t=Math.max(0,t),t=Math.min(1,t),this.S=e,this.B=t,n.style.left=e*s.width-r.width/2+"px",n.style.top=(1-t)*s.height-r.height/2+"px",this.update(i)}getSpectrumValue(){const e=this.spectrumDragger,t=e.getBoundingClientRect();return{x:parseFloat(e.style.left)+t.width/2,y:parseFloat(e.style.top)+t.height/2}}initRecentColors(){const t=e.recentColors,i=t.map(((e,t)=>`<div class="ag-recent-color" id=${t} style="background-color: ${e}; width: 15px; height: 15px;" recent-color="${e}" tabIndex="${this.tabIndex}"></div>`));this.recentColors.innerHTML=i.join(""),Ki(this.recentColors,!!t.length)}setValue(e){const t=vF.Color.fromString(e);this.setColor(t,!0)}setColor(e,t){const[i,s,n]=e.toHSB();this.H=(isNaN(i)?0:i)/360,this.A=e.a;const r=this.spectrumHueRect||this.refreshHueRect(),o=this.spectrumAlp
2haRect||this.refreshAlphaRect();this.spectrumHueSlider.style.left=(this.H-1)*-r.width-this.spectrumHueSlider.getBoundingClientRect().width/2+"px",this.spectrumAlphaSlider.style.left=this.A*o.width-this.spectrumAlphaSlider.getBoundingClientRect().width/2+"px",this.setSpectrumValue(s,n,!t)}onRecentColorClick(t){const i=t.target;if(!w(i.id))return;const s=parseInt(i.id,10);this.setValue(e.recentColors[s]),this.destroy()}addRecentColor(){const t=vF.Color.fromHSB(360*this.H,this.S,this.B,this.A).toRgbaString();let i=e.recentColors;this.colorChanged&&i[0]!==t&&(i=i.filter((e=>e!=t)),i=[t].concat(i),i.length>e.maxRecentColors&&(i=i.slice(0,e.maxRecentColors)),e.recentColors=i)}destroy(){this.addRecentColor(),super.destroy()}};BN.maxRecentColors=8,BN.recentColors=[];var VN=BN,zN=class extends lr{constructor(e){super({pickerAriaLabelKey:"ariaLabelColorPicker",pickerAriaLabelValue:"Color Picker",pickerType:"ag-list",className:"ag-color-picker",pickerIcon:"smallDown",...e})}postConstruct(){const e=j(this.gos);this.eDisplayFieldColor=e.createElement("span"),this.eDisplayFieldColor.classList.add("ag-color-picker-color"),this.eDisplayFieldText=e.createElement("span"),this.eDisplayFieldText.classList.add("ag-color-picker-value"),this.eDisplayField.appendChild(this.eDisplayFieldColor),this.eDisplayField.appendChild(this.eDisplayFieldText),super.postConstruct(),this.value&&this.setValue(this.value)}createPickerComponent(){const e=this.eWrapper.getBoundingClientRect(),t=this.popupService.getParentRect();return this.createBean(new vk({closable:!1,modal:!0,hideTitleBar:!0,minWidth:190,width:190,height:250,x:e.right-t.left-190,y:e.top-t.top-250-(this.config.pickerGap??0),postProcessPopupParams:{type:"colorPicker",eventSource:this.eWrapper}}))}renderAndPositionPicker(){const e=this.pickerComponent,t=this.createBean(new VN({picker:this}));return e.addCssClass("ag-color-dialog"),t.addDestroyFunc((()=>{e.isAlive()&&this.destroyBean(e)})),e.setParentComponent(this),e.setBodyComponent(t),t.setValue(this.getValue()),t.getGui().focus(),e.addDestroyFunc((()=>{this.isDestroyingPicker?this.isDestroyingPicker=!1:(this.beforeHidePicker(),this.isDestroyingPicker=!0,t.isAlive()&&this.destroyBean(t),this.isAlive()&&this.getFocusableElement().focus())})),()=>this.pickerComponent?.close()}setValue(e){return this.value===e?this:(this.eDisplayFieldColor.style.backgroundColor=e,this.eDisplayFieldText.textContent=vF.Color.fromString(e).toHexString().toUpperCase(),super.setValue(e))}getValue(){return this.value}},HN={selector:"AG-COLOR-PICKER",component:zN},WN=class extends Rs{constructor(e){super(),this.chartMenuParamsFactory=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e=this.chartMenuParamsFactory.addEnableParams("crosshair.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("crosshair"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.label.enabled","crosshairLabel"),i=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.snap","crosshairSnap"),s=this.chartMenuParamsFactory.getDefaultColorPickerParams("crosshair.stroke","color");this.setTemplate('<div>\n            <ag-group-component data-ref="crosshairGroup">\n                <ag-checkbox data-ref="crosshairLabelCheckbox"></ag-checkbox>\n                <ag-checkbox data-ref="crosshairSnapCheckbox"></ag-checkbox>\n                <ag-color-picker data-ref="crosshairStrokeColorPicker"></ag-color-picker>\n            </ag-group-component>\n        </div>',[nk,Ys,HN],{crosshairGroup:e,crosshairLabelCheckbox:t,crosshairSnapCheckbox:i,crosshairStrokeColorPicker:s})}},jN={selector:"AG-INPUT-RANGE",component:class extends Ks{constructor(e){super(e,"ag-range-field","range")}postConstruct(){super.postConstruct();const{min:e,max:t,step:i}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),this.setStep(i||1)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input
2:e=>{const t=e.target.value;this.setValue(t)}})}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}setStep(e){return this.eInput.setAttribute("step",e.toString()),this}setValue(e,t){null!=this.min&&(e=Math.max(parseFloat(e),this.min).toString()),null!=this.max&&(e=Math.min(parseFloat(e),this.max).toString());const i=super.setValue(e,t);return this.eInput.value=e,i}}},UN=class extends Us{constructor(e){super(e,'<div class="ag-slider">\n            <label data-ref="eLabel"></label>\n            <div class="ag-wrapper ag-slider-wrapper">\n                <ag-input-range data-ref="eSlider"></ag-input-range>\n                <ag-input-number-field data-ref="eText"></ag-input-number-field>\n            </div>\n        </div>',[jN,Cr]),this.eLabel=Is,this.eSlider=Is,this.eText=Is,this.labelAlignment="top"}postConstruct(){super.postConstruct(),this.eSlider.addCssClass("ag-slider-field");const{minValue:e,maxValue:t,textFieldWidth:i,step:s,value:n,onValueChange:r}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),null!=i&&this.setTextFieldWidth(i),null!=s&&this.setStep(s),null!=n&&this.setValue(n),null!=r&&this.onValueChange(r)}onValueChange(e){return this.addManagedListeners(this.eText,{fieldValueChanged:()=>{const t=parseFloat(this.eText.getValue());this.eSlider.setValue(t.toString(),!0),e(t||0)}}),this.addManagedListeners(this.eSlider,{fieldValueChanged:()=>{const t=this.eSlider.getValue();this.eText.setValue(t,!0),e(parseFloat(t))}}),this}setSliderWidth(e){return this.eSlider.setWidth(e),this}setTextFieldWidth(e){return this.eText.setWidth(e),this}setMinValue(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this}setMaxValue(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this}getValue(){return this.eText.getValue()}setValue(e,t){return this.getValue()===e||(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),t||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}setStep(e){return this.eSlider.setStep(e),this.eText.setStep(e),this}},_N={selector:"AG-SLIDER",component:UN},KN=class extends Rs{constructor(e){super(),this.chartMenuParamsFactory=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e=this.chartMenuParamsFactory.addEnableParams("navigator.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("navigator"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuParamsFactory.getDefaultSliderParams("navigator.height","height",60);t.minValue=10;const i=this.chartMenuParamsFactory.getDefaultCheckboxParams("navigator.miniChart.enabled","miniChart");this.setTemplate('<div>\n            <ag-group-component data-ref="navigatorGroup">\n                <ag-slider data-ref="navigatorHeightSlider"></ag-slider>\n                <ag-checkbox data-ref="navigatorMiniChartCheckbox"></ag-checkbox>\n            </ag-group-component>\n        </div>',[nk,_N,Ys],{navigatorGroup:e,navigatorHeightSlider:t,navigatorMiniChartCheckbox:i})}},$N=class extends Rs{constructor(e){super(),this.chartMenuParamsFactory=e,this.zoomScrollingStepInput=Is}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e=this.chartMenuParamsFactory.addEnableParams("zoom.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("zoom"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableScrolling","scrollingZoom"),i=this.chartMenuParamsFactory.getDefaultSliderParams("zoom.scrollingStep","scrollingStep",1);i.step=.01,i.minValue=i.step;const s=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableSelecting","selectingZoom");t.onValueChange=(e=>t=>{e&&(e(t),this.zoomScrollingStepInput.setDisabled(!t))})(t.onValueChange),this.setTemplate('<div>\n            <ag-group-component data-ref="zoomGroup">\n                <ag-checkbox data-ref="zoomSelectingCheckbox"></ag-checkbox>\n                <ag-checkbox data-ref="zoomScrollingCheckbox"></ag-checkbox>\n                <ag-slider data-ref="zoomScrollingStepInput"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,Ys,_N],{zoomGroup:e,zoomScrollingCheckbox:t,zoomScrollingStepInput:i,zoomSelectingCheckbox:s}),this.zoomScrollingStepInput.setDisabled(!t.value)}},YN=["navigator","zoom","animation","crosshair"],ZN=class extends Rs{constructor(e){super('<div class="ag-chart-advanced-settings-wrapper"></div>'),this.chartMenuContext=e}postConstruct(){this.chartPanelFeature=this.createManagedBean(new NN(this.chartMenuContext.chartController,this.getGui(),"ag-chart-advanced-settings-section",((e,t)=>
2this.createPanels(e,t)))),this.chartPanelFeature.refreshPanels()}createPanels(e,t){YN.forEach((e=>{if(!this.isGroupPanelShownForSeries(e,t))return;const i=this.createPanel(e);this.chartPanelFeature.addComponent(i)}))}isGroupPanelShownForSeries(e,t){return"animation"===e||MN(t)}createPanel(e){const{chartMenuParamsFactory:t,chartAxisMenuParamsFactory:i}=this.chartMenuContext;switch(e){case"navigator":return new KN(t);case"zoom":return new $N(t);case"animation":return new ON(t);case"crosshair":return new WN(i)}}},qN=class extends Nl{constructor(e){super('<div class="ag-chart-advanced-settings"></div>'),this.chartMenuContext=e}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.advancedSettingsPanel=this.createManagedBean(new ZN(this.chartMenuContext)),this.getGui().appendChild(this.advancedSettingsPanel.getGui()),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),focusTrapActive:!0})}onTabKeyDown(e){if(e.defaultPrevented)return;e.preventDefault();const t=e.shiftKey,i=this.advancedSettingsPanel.getGui(),s=this.focusService.findNextFocusableElement(i,!1,t);if(s)s.focus();else{const e=this.focusService.findFocusableElements(i);e.length&&e[t?e.length-1:0].focus()}}},QN=class extends Rs{constructor(e){super('\n            <div data-ref="eChartsMenu" role="presentation" class="ag-menu ag-chart-menu-popup"></div>\n        '),this.menuItems=e,this.eChartsMenu=Is}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.mainMenuList=this.createManagedBean(new yk(0)),this.mainMenuList.addMenuItems(this.menuItems),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eChartsMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(){this.hidePopupFunc?.()}afterGuiAttached(e){let{hidePopup:t}=e;t&&(this.hidePopupFunc=t,this.addDestroyFunc(t)),this.focusService.focusInto(this.mainMenuList.getGui())}},XN=["chartUnlink","chartLink","chartDownload","chartMenu"],JN={settings:"chartSettings",data:"chartData",format:"chartFormat"},eO=class e extends ze{constructor(){super(...arguments),this.beanName="chartTranslationService"}translate(t){return this.localeService.getLocaleTextFunc()(t,e.DEFAULT_TRANSLATIONS[t])}};eO.DEFAULT_TRANSLATIONS={pivotChartTitle:"Pivot Chart",rangeChartTitle:"Range Chart",settings:"Chart",data:"Set Up",format:"Customize",categories:"Categories",defaultCategory:"(None)",series:"Series",switchCategorySeries:"Switch Category / Series",categoryValues:"Category Values",seriesLabels:"Series Labels",aggregate:"Aggregate",xyValues:"X Y Values",paired:"Paired Mode",axis:"Axis",xAxis:"Horizontal Axis",yAxis:"Vertical Axis",polarAxis:"Polar Axis",radiusAxis:"Radius Axis",navigator:"Navigator",zoom:"Zoom",animation:"Animation",crosshair:"Crosshair",color:"Color",thickness:"Thickness",preferredLength:"Preferred Length",xType:"X Type",axisType:"Axis Type",automatic:"Automatic",category:"Category",number:"Number",time:"Time",timeFormat:"Time Format",autoRotate:"Auto Rotate",labelRotation:"Rotation",circle:"Circle",polygon:"Polygon",square:"Square",cross:"Cross",diamond:"Diamond",plus:"Plus",triangle:"Triangle",heart:"Heart",orientation:"Orientation",fixed:"Fixed",parallel:"Parallel",perpendicular:"Perpendicular",radiusAxisPosition:"Position",ticks:"Ticks",gridLines:"Grid Lines",width:"Width",height:"Height",length:"Length",padding:"Padding",spacing:"Spacing",chartStyle:"Chart Style",title:"Title",chartTitles:"Titles",chartTitle:"Chart Title",chartSubtitle:"Subtitle",horizontalAxisTitle:"Horizontal Axis Title",verticalAxisTitle:"Vertical Axis Title",polarAxisTitle:"Polar Axis Title",titlePlaceholder:"Chart Title",background:"Backgroun
2d",font:"Font",weight:"Weight",top:"Top",right:"Right",bottom:"Bottom",left:"Left",labels:"Labels",calloutLabels:"Callout Labels",sectorLabels:"Sector Labels",positionRatio:"Position Ratio",size:"Size",shape:"Shape",minSize:"Minimum Size",maxSize:"Maximum Size",legend:"Legend",position:"Position",markerSize:"Marker Size",markerStroke:"Marker Stroke",markerPadding:"Marker Padding",itemSpacing:"Item Spacing",itemPaddingX:"Item Padding X",itemPaddingY:"Item Padding Y",layoutHorizontalSpacing:"Horizontal Spacing",layoutVerticalSpacing:"Vertical Spacing",strokeWidth:"Stroke Width",offset:"Offset",offsets:"Offsets",tooltips:"Tooltips",callout:"Callout",markers:"Markers",shadow:"Shadow",blur:"Blur",xOffset:"X Offset",yOffset:"Y Offset",lineWidth:"Line Width",lineDash:"Line Dash",lineDashOffset:"Dash Offset",scrollingZoom:"Scrolling",scrollingStep:"Scrolling Step",selectingZoom:"Selecting",durationMillis:"Duration (ms)",crosshairLabel:"Label",crosshairSnap:"Snap to Node",normal:"Normal",bold:"Bold",italic:"Italic",boldItalic:"Bold Italic",predefined:"Predefined",fillOpacity:"Fill Opacity",strokeColor:"Line Color",strokeOpacity:"Line Opacity",miniChart:"Mini-Chart",histogramBinCount:"Bin count",connectorLine:"Connector Line",seriesItems:"Series Items",seriesItemType:"Item Type",seriesItemPositive:"Positive",seriesItemNegative:"Negative",seriesItemLabels:"Item Labels",columnGroup:"Column",barGroup:"Bar",pieGroup:"Pie",lineGroup:"Line",scatterGroup:"X Y (Scatter)",areaGroup:"Area",polarGroup:"Polar",statisticalGroup:"Statistical",hierarchicalGroup:"Hierarchical",specializedGroup:"Specialized",combinationGroup:"Combination",groupedColumnTooltip:"Grouped",stackedColumnTooltip:"Stacked",normalizedColumnTooltip:"100% Stacked",groupedBarTooltip:"Grouped",stackedBarTooltip:"Stacked",normalizedBarTooltip:"100% Stacked",pieTooltip:"Pie",donutTooltip:"Donut",lineTooltip:"Line",groupedAreaTooltip:"Area",stackedAreaTooltip:"Stacked",normalizedAreaTooltip:"100% Stacked",scatterTooltip:"Scatter",bubbleTooltip:"Bubble",histogramTooltip:"Histogram",radialColumnTooltip:"Radial Column",radialBarTooltip:"Radial Bar",radarLineTooltip:"Radar Line",radarAreaTooltip:"Radar Area",nightingaleTooltip:"Nightingale",rangeBarTooltip:"Range Bar",rangeAreaTooltip:"Range Area",boxPlotTooltip:"Box Plot",treemapTooltip:"Treemap",sunburstTooltip:"Sunburst",waterfallTooltip:"Waterfall",heatmapTooltip:"Heatmap",columnLineComboTooltip:"Column & Line",areaColumnComboTooltip:"Area & Column",customComboTooltip:"Custom Combination",innerRadius:"Inner Radius",startAngle:"Start Angle",endAngle:"End Angle",reverseDirection:"Reverse Direction",groupPadding:"Group Padding",seriesPadding:"Series Padding",tile:"Tile",whisker:"Whisker",cap:"Cap",capLengthRatio:"Length Ratio",labelPlacement:"Placement",inside:"Inside",outside:"Outside",noDataToChart:"No data available to be charted.",pivotChartRequiresPivotMode:"Pivot Chart requires Pivot Mode enabled.",chartSettingsToolbarTooltip:"Menu",chartLinkToolbarTooltip:"Linked to Grid",chartUnlinkToolbarTooltip:"Unlinked from Grid",chartDownloadToolbarTooltip:"Download Chart",chartMenuToolbarTooltip:"Menu",chartEdit:"Edit Chart",chartAdvancedSettings:"Advanced Settings",chartLink:"Link to Grid",chartUnlink:"Unlink from Grid",chartDownload:"Download Chart",histogramFrequency:"Frequency",seriesChartType:"Series Chart Type",seriesType:"Series Type",secondaryAxis:"Secondary Axis",seriesAdd:"Add a series",categoryAdd:"Add a category",bar:"Bar",column:"Column",histogram:"Histogram",advancedSettings:"Advanced Settings",direction:"Direction",horizontal:"Horizontal",vertical:"Vertical",seriesGroupType:"Group Type",groupedSeriesGroupType:"Grouped",stackedSeriesGroupType:"Stacked",normalizedSeriesGroupType:"100% Stacked",legendEnabled:"Enabled",invalidColor:"Color value is invalid",groupedColumnFull:"Grouped Column",stackedColumnFull:"Stacked Column",normalizedColumnFull:"100% Stacked Column",groupedBarFull:"Grouped Bar",stackedBarFull:"Stacked Bar",normalizedBarFull:"100% Stacked Bar",stackedAreaFull:"Stacked Area",normalizedAreaFull:"100% Stacked Area",customCombo:"Custom Combination",groupedColumn:"Grouped",stackedColumn:"Stacked",pie:"Pie",donut:"Donut",line:"Line",scatter:"Scatter",bubble:"Bubble",area:"Area",stackedArea:"Stacked",radarLine:"Radar Line",radarArea:"Radar Area",nightingale:"Nightingale",radialColumn:"Radial Column",radialBar:"Radial Bar",boxPlot:"Box Plot",rangeBar:"Range Bar",rangeArea:"Range Area",treemap:"Treemap",sunburst:"Sunburst",waterfall:"Waterfall",heatmap:"Heatmap",columnLineCombo:"Column & Line",AreaColumnCombo:"Area & Column",ariaChartMenuClose:"Close Chart Edit Menu",ariaChartSelected:"Selected",group:"Group",timeFormatSlashesDDMMYYYY:"DD/MM/YYYY",timeFormatSlashesMMDDYYYY:"MM/DD/YYYY",timeFormatSlashesDDMMYY:"DD/MM/YY",timeFormatSlashesMMDDYY:"MM/DD/YY",timeFormatDotsDDMYY:"DD.M.YY",timeFormatDotsMDDYY:"M.DD.YY",timeFormatDashesYYYYMMDD:"YYYY-MM-DD",timeFormatSpacesDDMMMMYYYY:"DD MMMM YYYY",timeFormatHHMMSS:"HH:MM:SS",timeFormatHHMMSSAmPm:"HH:MM:SS AM/PM",sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"};var tO=eO,iO="32.3.3",sO=["number","category","grouped-category","log","time"];function nO(e,t,i){if(null==e)return i;const s=t.split(".");let n=e;for(;s.length>1;)if(n=n[s.shift()],null==n)return i;const r=n[s[0]];return null!=r?r:i}function rO(e,t,i,s,n){const{chartOptionsToRestore:r,chartPaletteToRestore:o,chartThemeToRestore:a}=e,l=function(e){let t=e.getChartThemeName();const i=e.getChartThemes();Ee(i,t)||(t=i[0]);return t}(e),h=oO(l),c=h?{baseTheme:l}:hO(e,l)??{},d=e.getGridOptionsChartThemeOverrides(),u=e.apiChartThemeOverrides,p=AN(e.chartType),g=e.crossFiltering?function(e,t,i){const s={listeners:{legendItemClick:t=>
2{e.getChart().series.forEach((e=>{e.toggleSeriesItem(t.itemId,t.enabled),e.toggleSeriesItem(`${t.itemId}-filtered-out`,t.enabled)}))}}};return{[i]:{tooltip:{delay:500},legend:s,listeners:{click:e=>t.crossFilterCallback(e,!0)}}}}(t,e,p):void 0,m=[h?lO(e,i,(()=>{const e=e=>!!e&&Object.keys(e).some((t=>nO(e[t],"title.enabled",!1)));return e(d)||e(u)})()):void 0,{pie:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}},donut:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}}},s,g,d,u,{...r??{}},n].filter((e=>!!e)).reduce(((e,t)=>({baseTheme:e,overrides:t})),c);if(o&&l===a){(function(e,t){const i=(e,t)=>e===t||e?.length===t?.length&&(e?.every(((e,i)=>e===t?.[i]))??!1);return i(e.fills,t.fills)&&i(e.strokes,t.strokes)})(o,gF.getChartTheme(c).palette)||(m.palette=o)}return m}function oO(e){return Ee(Object.keys(gF.themes),e)}var aO=sO.reduce(((e,t)=>({...e,[t]:{title:{_enabledFromTheme:!0}}})),{});function lO(e,t,i){const s=e.getExtraPaddingDirections();return{common:{...t?{animation:{duration:500}}:void 0,axes:aO,padding:{top:!i&&s.includes("top")?40:20,right:s.includes("right")?30:20,bottom:s.includes("bottom")?40:20,left:s.includes("left")?30:20}}}}function hO(e,t){const{customChartThemes:i}=e,s=i&&i[t];return s||h(`no stock theme exists with the name '${t}' and no custom chart theme with that name was supplied to 'customChartThemes'`),s}var cO=class e extends ze{wireBeans(e){this.sortController=e.sortController,this.gridRowModel=e.rowModel,this.columnModel=e.columnModel,this.valueService=e.valueService,this.pivotResultColsService=e.pivotResultColsService,this.rowNodeSorter=e.rowNodeSorter,this.aggregationStage=e.aggregationStage}getData(e){if(e.crossFiltering){if(e.grouping)return h("crossing filtering with row grouping is not supported."),{chartData:[],columnNames:{}};if(!L(this.gos))return h("crossing filtering is only supported in the client side row model."),{chartData:[],columnNames:{}}}F(this.gos)&&e.pivoting&&this.updatePivotKeysForSSRM();const t=this.extractRowsFromGridRowModel(e);return t.chartData=this.aggregateRowsByDimension(e,t.chartData),t}extractRowsFromGridRowModel(t){const{crossFiltering:i,startRow:s,endRow:n,valueCols:r,dimensionCols:o,grouping:a}=t;let l=[];const h={},c={},d={};let u,p={},g=[];if(i)p=this.getFilteredRowNodes(),g=this.getAllRowNodes(),u=g.length;else{const e=this.gridRowModel.getRowCount()-1;if(s===n&&0===s&&0===o.length&&0===r.length)u=0;else{u=(n>=0?Math.min(n,e):e)-s+1}}u>0&&r.forEach((e=>{let t=[];const i=e.getColDef().pivotKeys;i&&(t=i.slice());const s=e.getColDef().headerName;s&&t.push(s),t.length>0&&(h[e.getId()]=t)}));let m,f=0,v=0;for(let y=0;y<u;y++){const n=i?g[y]:this.gridRowModel.getRow(y+s);if(n.footer||n.detail){f++;continue}const h={};o.forEach((t=>{const i=t.colId,s=this.columnModel.getCol(i);if(s){const t=this.valueService.getValue(s,n);if(a){const s=t?.toString?String(t.toString()):"",r=e.getGroupLabels(n,s);h[i]={labels:r,id:v++,toString:function(){return this.labels.filter((e=>!!e)).reverse().join(" - ")}},n.group&&(c[r.toString()]=y-f);const o=r.slice(1,r.length).toString();o&&(d[o]=c[o])}else h[i]=t}else h[mO.DEFAULT_CATEGORY]=y+1})),r.forEach((e=>{const s=e.getColId();if(i){const i=s+"-filtered-out",r=this.valueService.getValue(e,n),o=null!=r&&"function"===typeof r.toNumber?r.toNumber():r;p[n.id]?(h[s]=o,h[i]=t.aggFunc||t.isScatter?void 0:0):(h[s]=t.aggFunc||t.isScatter?void 0:0,h[i]=o)}else{let t=this.valueService.getValue(e,n);t&&Object.prototype.hasOwnProperty.call(t,"toString")&&(t=parseFloat(t.toString())),h[s]=null!=t&&"function"===typeof t.toNumber?t.toNumber():t}})),l.push(h)}if(a){const e=T(d),t=l;l=[],m=[];for(let i=0;i<t.length;i++)(Ee(e,i)?m:l).push(t[i])}return{chartData:l,columnNames:h,groupChartData:m}}aggregateRowsByDimension(e,t){const i=e.dimensionCols;if(!e.aggFunc||0===i.length)return t;const s=Se(i),n=s&&s.colId,o={},a=[];if(t.forEach((e=>{let t=o;i.forEach((s=>{const r=s.colId,o=e[r];if(r===n){let s=t[o];s||(s={__children:[]}
2,i.forEach((t=>{const i=t.colId;s[i]=e[i]})),t[o]=s,a.push(s)),s.__children.push(e)}else t[o]||(t[o]={}),t=t[o]}))})),this.gos.assertModuleRegistered(r.RowGroupingModule,"Charting Aggregation")){const t=this.aggregationStage;a.forEach((i=>e.valueCols.forEach((s=>{if(e.crossFiltering)e.valueCols.forEach((s=>{const n=s.getColId(),r=i.__children.filter((e=>"undefined"!==typeof e[n])).map((e=>e[n])),o=t.aggregateValues(r,e.aggFunc);i[s.getId()]=o&&"undefined"!==typeof o.value?o.value:o;const a=`${n}-filtered-out`,l=i.__children.filter((e=>"undefined"!==typeof e[a])).map((e=>e[a])),h=t.aggregateValues(l,e.aggFunc);i[a]=h&&"undefined"!==typeof h.value?h.value:h}));else{const n=i.__children.map((e=>e[s.getId()])),r=t.aggregateValues(n,e.aggFunc);i[s.getId()]=r&&"undefined"!==typeof r.value?r.value:r}}))))}return a}updatePivotKeysForSSRM(){const e=this.pivotResultColsService.getPivotResultCols()?.list;if(!e)return;const t=this.extractPivotKeySeparator(e);e.forEach((e=>{if(""===t)e.getColDef().pivotKeys=[];else{const i=e.getColId().split(t);e.getColDef().pivotKeys=i.slice(0,i.length-1)}}))}extractPivotKeySeparator(e){if(0===e.length)return"";const t=(e,i)=>{const s=e.getGroupId();return e.getParent()?t(e.getParent(),s):i.split(s)[1][0]},i=e[0];return null==i.getParent()?"":t(i.getParent(),i.getColId())}static getGroupLabels(e,t){const i=[t];for(;e&&0!==e.level;)(e=e.parent)&&i.push(e.key);return i}getFilteredRowNodes(){const e={};return this.gridRowModel.forEachNodeAfterFilterAndSort((t=>{e[t.id]=t})),e}getAllRowNodes(){const e=[];return this.gridRowModel.forEachNode((t=>{e.push(t)})),this.sortRowNodes(e)}sortRowNodes(e){const t=this.sortController.getSortOptions();return!t||0==t.length?e:this.rowNodeSorter.doFullSort(e,t)}},dO=class extends ze{constructor(){super(...arguments),this.beanName="chartColumnService",this.valueColsWithoutSeriesType=new Set}wireBeans(e){this.columnModel=e.columnModel,this.showRowGroupColsService=e.showRowGroupColsService,this.columnNameService=e.columnNameService,this.visibleColsService=e.visibleColsService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.rowPositionUtils=e.rowPositionUtils}postConstruct(){const e=()=>this.valueColsWithoutSeriesType.clear();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e})}getColumn(e){return this.columnModel.getColDefCol(e)}getAllDisplayedColumns(){return this.visibleColsService.getAllCols()}getColDisplayName(e,t){const i="chart",s=this.columnNameService.getDisplayNameForColumn(e,i);if(t){const t=[s],n=e=>{if(!e)return;const s=this.columnNameService.getDisplayNameForColumnGroup(e,i);x(s)||(t.unshift(s),n(e.getParent()))};return n(e.getParent()),t.join(" - ")}return s}getRowGroupColumns(){return this.funcColsService.getRowGroupColumns()}getGroupDisplayColumns(){return this.showRowGroupColsService?.getShowRowGroupCols()??[]}isPivotMode(){return this.columnModel.isPivotMode()}isPivotActive(){return this.columnModel.isPivotActive()}getChartColumns(){const e=this.columnModel.getCols(),t=new Set,i=new Set;return e.forEach((e=>{const s=e.getColDef(),n=s.chartDataType;if(n)switch(n){case"category":case"time":return void t.add(e);case"series":return void i.add(e);case"excluded":return;default:h(`unexpected chartDataType value '${n}' supplied, instead use 'category', 'series' or 'excluded'`)}"ag-Grid-AutoColumn"!==s.colId?e.isPrimary()?(this.isInferredValueCol(e)?i:t).add(e):i.add(e):t.add(e)})),{dimensionCols:t,valueCols:i}}isInferredValueCol(e){const t=e.getColId();if("ag-Grid-AutoColumn"===t)return!1;const i=this.rowPositionUtils.getRowNode({rowIndex:0,rowPinned:null});if(!i)return this.valueColsWithoutSeriesType.has(t);let s=this.valueService.getValue(e,i);null==s&&(s=this.extractLeafData(i,e)),null!=s&&"function"===typeof s.toNumber&&(s=s.toNumber());const n="number"===typeof s;return n&&this.valueColsWithoutSeriesType.add(t),n}extractLeafData(e,t){if(!e.allLeafChildren)return null;for(let i=0;i<e.allLeafChildren.length;i++){const s=e.allLeafChildren[i],n=this.valueService.getValue(t,s);if(null!=n)return n}return null}destroy(){this.valueColsWithoutSeriesType.clear(),super.destroy()}},uO=class e extends ze{constructor(e){super(),this.suppressComboChartWarnings=!1,this.chartDataModel=e,this.seriesChartTypes=e.params.seriesChartTypes??[]}postConstruct(){this.initComboCharts()}update(e){this.seriesChartTypes=e??this.seriesChartTypes,this.initComboCharts(),this.updateSeriesChartTypes()}initComboCharts(){const e=this.seriesChartTypes&&this.seriesChartTypes.length>0;("customCombo"===this.chartDataModel.chartType||e)&&(this.chartDataModel.chartType="customCombo",this.savedCustomSeriesChartTypes=this.seriesChartTypes||[])}updateSeriesChartTypes(){this.chartDataModel.isComboChart()&&(this.seriesChartTypes=this.seriesChartTypes.map((e=>{const t=["groupedColumn","stackedColumn","stackedArea"].includes(e.chartType);return e.secondaryAxis=!t&&e.secondaryAxis,e})),"customCombo"!==this.chartDataModel.chartType?this.updateChartSeriesTypesForBuiltInCombos():this.updateSeriesChartTypesForCustomCombo())}updateSeriesChartTypesForCustomCombo(){this.seriesChartTypes&&this.seriesChartTypes.length>0||this.suppressComboChartWarnings||h("'seriesChartTypes' are required when the 'customCombo' chart type is specified."),this.seriesChartTypes=this.seriesChartTypes.map((t=>(e.SUPPORTED_COMBO_CHART_TYPES.includes(t.chartType)||(h(`invali
2d chartType '${t.chartType}' supplied in 'seriesChartTypes', converting to 'line' instead.`),t.chartType="line"),t)));const t=this.chartDataModel.valueColState.map((e=>{this.savedCustomSeriesChartTypes&&0!==this.savedCustomSeriesChartTypes.length||(this.savedCustomSeriesChartTypes=this.seriesChartTypes);const t=this.savedCustomSeriesChartTypes.find((t=>t.colId===e.colId));return t||(e.selected&&!this.suppressComboChartWarnings&&h(`no 'seriesChartType' found for colId = '${e.colId}', defaulting to 'line'.`),{colId:e.colId,chartType:"line",secondaryAxis:!1})}));this.seriesChartTypes=t,this.savedCustomSeriesChartTypes=t,this.suppressComboChartWarnings=!0}updateChartSeriesTypesForBuiltInCombos(){const{chartType:e,valueColState:t}=this.chartDataModel,i="columnLineCombo"===e?"groupedColumn":"stackedArea",s="columnLineCombo"===e?"line":"groupedColumn",n=t.filter((e=>e.selected)),r=Math.ceil(n.length/2);this.seriesChartTypes=n.map(((e,t)=>{const n=t>=r?s:i;return{colId:e.colId,chartType:n,secondaryAxis:!1}}))}};uO.SUPPORTED_COMBO_CHART_TYPES=["line","groupedColumn","stackedColumn","area","stackedArea"];var pO=uO,gO=class e extends ze{constructor(e){super(),this.unlinked=!1,this.chartData=[],this.valueColState=[],this.dimensionColState=[],this.columnNames={},this.crossFiltering=!1,this.grouping=!1,this.params=e,this.chartId=e.chartId,this.setParams(e)}wireBeans(e){this.rangeService=e.rangeService,this.chartTranslationService=e.chartTranslationService}setParams(e){const{chartType:t,pivotChart:i,chartThemeName:s,switchCategorySeries:n,aggFunc:r,cellRange:o,suppressChartRanges:a,unlinkChart:l,crossFiltering:h,seriesGroupType:c}=e;this.chartType=t,this.pivotChart=i??!1,this.chartThemeName=s,this.switchCategorySeries=!!n,this.aggFunc=r,this.referenceCellRange=o,this.suppliedCellRange=o,this.suppressChartRanges=a??!1,this.unlinked=!!l,this.crossFiltering=!!h,this.seriesGroupType=c}postConstruct(){this.datasource=this.createManagedBean(new cO),this.chartColumnService=this.createManagedBean(new dO),this.comboChartModel=this.createManagedBean(new pO(this)),this.updateCellRanges({setColsFromRange:!0}),this.updateData()}updateModel(e){const{cellRange:t,seriesChartTypes:i}=e;t!==this.suppliedCellRange&&(this.dimensionCellRange=void 0,this.valueCellRange=void 0),this.setParams(e),this.updateSelectedDimensions(t?.columns),this.updateCellRanges({setColsFromRange:!0});(this.isComboChart()||i)&&this.comboChartModel.update(i),this.unlinked||this.updateData()}updateCellRanges(e){const{updatedColState:t,resetOrder:i,maintainColState:s,setColsFromRange:n}=e??{};this.valueCellRange&&(this.referenceCellRange=this.valueCellRange);const{dimensionCols:r,valueCols:o}=this.chartColumnService.getChartColumns(),a=this.getAllColumnsFromRanges();t&&this.updateColumnState(t,i),this.setDimensionCellRange(r,a,t),this.setValueCellRange(o,a,n),t||s||(this.resetColumnState(),this.syncDimensionCellRange()),this.comboChartModel.updateSeriesChartTypes()}updateData(){const{startRow:e,endRow:t}=this.getRowIndexes();this.pivotChart&&this.resetColumnState(),this.grouping=this.isGrouping();const i={aggFunc:this.aggFunc,dimensionCols:this.getSelectedDimensions(),grouping:this.grouping,pivoting:this.isPivotActive(),crossFiltering:this.crossFiltering,valueCols:this.getSelectedValueCols(),startRow:e,endRow:t,isScatter:Ee(["scatter","bubble"],this.chartType)},{chartData:s,columnNames:n,groupChartData:r}=this.datasource.getData(i);this.chartData=s,this.groupChartData=r,this.columnNames=n,this.categoryAxisType=void 0}isGrouping(){const e=this.gos.get("treeData"),t=e?null:this.chartColumnService.getRowGroupColumns(),i=e||t&&t.length>0,s=this.getSelectedDimensions().map((e=>{let{colId:t}=e;return t})),n=this.chartColumnService.getGroupDisplayColumns().map((e=>e.getColId())).some((e=>s.includes(e)));return!!i&&n}getSelectedValueCols(){return this.valueColState.filter((e=>e.selected)).map((e=>e.column))}getSelectedDimensions(){return this.dimensionColState.filter((e=>e.selected))}getColDisplayName(e,t){return this.chartColumnService.getColDisplayName(e,t)}isPivotMode(){return this.chartColumnService.isPivotMode()}getChartDataType(e){const t=this.chartColumnService.getColumn(e);return t?t.getColDef().chartDataType:void 0}isPivotActive(){return this.chartColumnService.isPivotActive()}createCellRange(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return{id:this.chartId,startRow:this.referenceCellRange.startRow,endRow:this.referenceCellRange.endRow,columns:i,startColumn:e===aa.DIMENSION||null==this.referenceCellRange.startColumn?i[0]:this.referenceCellRange.startColumn,type:e}}getAllColumnsFromRanges(){if(this.pivotChart)return new Set(this.chartColumnService.getAllDisplayedColumns());const e=this.dimensionCellRange||this.valueCellRange?[]:this.referenceCellRange.columns;return this.dimensionCellRange&&e.push(...this.dimensionCellRange.columns),this.valueCellRange&&e.push(...this.valueCellRange.columns),new Set(e)}getRowIndexes(){let e=0,t=0;const{rangeService:i,valueCellRange:s,dimensionCellRange:n}=this,r=s||n;if(i&&r){e=i.getRangeStartRow(r).rowIndex;const s=i.getRangeEndRow(r);t="bottom"===s.rowPinned?-1:s.rowIndex}return{startRow:e,endRow:t}}resetColumnState(){const{dimensionCols:t,valueCols:i}=this.chartColumnService.getChartColumns(),s=this.getAllColumnsFromRanges(),n=this.valueColState.length<1;this.dimensionColState=[],this.valueColState=[];const r=IN(AN(this.chartType));let o=!1,a=1;const l=this.suppliedCellRange.columns[0];t.forEach((e=>{const t="ag-Grid-AutoColumn"===e.getColId();let i=!1;this.crossFiltering&&this.aggFunc?l.getColId()===e.getColId()&&(i=!0):i=!!t||(!o||r)&&s.has(e),this.dimensionColState.push({column:e,colId:e.getColId(),displayName:this.getColDisplayName(e),selected:i,order:a++}),i&&(o=!0)}));const h={colId:e.DEFAULT_CATEGORY,displayName:this.chartTranslationService.translate("defaultCategory"),selected:!o,order:0};this.dimensionColState.unshift(h);const c=this.referenceCellRange.columns.filter((e=>i.has(e)));
2i.forEach((e=>{n&&Ee(this.referenceCellRange.columns,e)&&(e=c.shift()),this.valueColState.push({column:e,colId:e.getColId(),displayName:this.getColDisplayName(e),selected:s.has(e),order:a++})}))}updateColumnState(e,t){const i=t=>t.colId===e.colId,{dimensionColState:s,valueColState:n}=this,r=s.find(i),o=n.find(i);if(r){if(IN(AN(this.chartType)))r.selected=e.selected;else{const t=e.selected?r:s.filter((e=>e!==r)).find((e=>{let{selected:t}=e;return t}));s.forEach((e=>e.selected=e===t))}}else o&&(o.selected=e.selected);const a=[...s,...n],l=[];t||(a.forEach(((t,i)=>{i===e.order&&l.push(e.colId),t.colId!==e.colId&&l.push(t.colId)})),a.forEach((e=>{const t=l.indexOf(e.colId);e.order=t>=0?l.indexOf(e.colId):a.length-1}))),this.reorderColState()}reorderColState(){const e=(e,t)=>e.order-t.order;this.dimensionColState.sort(e),this.valueColState.sort(e)}setDimensionCellRange(t,i,s){this.dimensionCellRange=void 0;const n=IN(AN(this.chartType));if(!s&&!this.dimensionColState.length){const e=new Array;return t.forEach((t=>{e.length>0&&!n||!i.has(t)||e.push(t)})),void(e.length>0&&(this.dimensionCellRange=this.createCellRange(aa.DIMENSION,...e)))}let r=s?[s]:[];if(this.crossFiltering&&this.aggFunc){const e=this.suppliedCellRange.columns[0];r=this.dimensionColState.filter((t=>t.colId===e.getColId()))}else(n||0===r.length||r.some((e=>{let{column:i}=e;return!i||!t.has(i)})))&&(r=this.dimensionColState.filter((e=>e.selected)));const o=1===r.length&&r[0].colId===e.DEFAULT_CATEGORY,a=r.map((e=>{let{column:t}=e;return t})).filter((e=>null!=e));a.length>0&&!o&&(this.dimensionCellRange=this.createCellRange(aa.DIMENSION,...a))}setValueCellRange(e,t,i){this.valueCellRange=void 0;const s=[],n=LN(this.chartType);let r=0;if(e.forEach((e=>{i?(null==n||r<n)&&t.has(e)&&(s.push(e),r++):this.valueColState.some((t=>t.selected&&t.colId===e.getColId()))&&s.push(e)})),s.length>0){let e=[];this.valueColState.length>0?e=this.valueColState.map((e=>e.colId)):t.forEach((t=>e.push(t.getColId()))),s.sort(((t,i)=>e.indexOf(t.getColId())-e.indexOf(i.getColId()))),this.valueCellRange=this.createCellRange(aa.VALUE,...s)}}resetCellRanges(e,t){if(!e&&!t)return;const{dimensionCols:i,valueCols:s}=this.chartColumnService.getChartColumns(),n=this.getAllColumnsFromRanges();e&&this.setDimensionCellRange(i,n),t&&this.setValueCellRange(s,n)}updateSelectedDimensions(e){const t=new Set(e.map((e=>e.getColId())));if(IN(AN(this.chartType))){const e=this.dimensionColState.filter((e=>t.has(e.colId))),i=new Set(e.map((e=>e.colId)));this.dimensionColState=this.dimensionColState.map((e=>({...e,selected:i.has(e.colId)})))}else{const e=(this.dimensionColState.find((e=>t.has(e.colId)))||this.dimensionColState[0]).colId;this.dimensionColState=this.dimensionColState.map((t=>({...t,selected:t.colId===e})))}}syncDimensionCellRange(){const e=this.getSelectedDimensions();if(0===e.length)return;const t=e.map((e=>{let{column:t}=e;return t})).filter((e=>null!=e));t.length>0&&(this.dimensionCellRange=this.createCellRange(aa.DIMENSION,...t))}isComboChart(e){return wN(e??this.chartType)}};gO.DEFAULT_CATEGORY="AG-GRID-DEFAULT-CATEGORY";var mO=gO,fO=e=>t=>void 0==t||e(t),vO=e=>"string"===typeof e,yO=e=>"boolean"===typeof e,CO=e=>"object"===typeof e,SO=(e,t)=>i=>`AG Grid - unable to update chart as invalid params supplied:  \`${e}: ${i}\`, expected ${t}.`,wO=e=>`${e} is not supported in AG Charts Community (either 'ag-grid-charts-enterprise' or '@ag-grid-enterprise/charts-enterprise' hasn't been loaded). See https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/ for more details.`,bO=class e{static isEnterprise(){return yF.enterpriseModule.isEnterprise}static isValidChartType(e){return!!EN(e)||wN(e)}static isLegacyChartType(t){return e.legacyChartTypes.includes(t)}static validateUpdateParams(t){switch(t.type){case"rangeChartUpdate":return e.validateUpdateRangeChartParams(t);case"pivotChartUpdate":return e.validateUpdatePivotChartParams(t);case"crossFilterChartUpdate":return e.validateUpdateCrossFilterChartParams(t);default:return h(`Invalid value supplied for 'type': ${t.type}. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.`),!1}}static validateCreateParams(t){return MO(t,[e.enterpriseChartTypeValidation,e.switchCategorySeriesValidation])}static validateUpdateRangeChartParams(t){return MO(t,[...e.commonUpdateValidations,e.enterpriseChartTypeValidation,...e.cellRangeValidations,{property:"seriesChartTypes",validationFn:e=>void 0===e||Array.isArray(e)&&e.every(CO),warnMessage:SO("seriesChartTypes","Array of SeriesChartType")}],[...e.baseUpdateChartParams,"cellRange","suppressChartRanges","switchCategorySeries","aggFunc","seriesChartTypes","seriesGroupType"],"UpdateRangeChartParams")}static validateUpdatePivotChartParams(t){return MO(t,[...e.commonUpdateValidations],[...e.baseUpdateChartParams],"Upd
2atePivotChartParams")}static validateUpdateCrossFilterChartParams(t){return MO(t,[...e.commonUpdateValidations,...e.cellRangeValidations],[...e.baseUpdateChartParams,"cellRange","suppressChartRanges","aggFunc"],"UpdateCrossFilterChartParams")}};bO.legacyChartTypes=["doughnut"],bO.baseUpdateChartParams=["type","chartId","chartType","chartThemeName","chartThemeOverrides","unlinkChart"],bO.validateChartType=fO((e=>{if(bO.isValidChartType(e))return!0;if(bO.isLegacyChartType(e)){const t=RN(e);return h(`The chart type '${e}' has been deprecated. Please use '${t}' instead.`),t}return!1})),bO.validateAgChartThemeOverrides=fO((e=>"object"===typeof e)),bO.validateChartParamsCellRange=fO((e=>"object"===typeof e)),bO.validateAggFunc=fO((e=>"string"===typeof e||"function"===typeof e)),bO.enterpriseChartTypeValidation={property:"chartType",validationFn:fO((e=>bO.isEnterprise()||!e||!function(e){return bN(AN(e),"isEnterprise")}(e))),warnMessage:e=>wO(`The '${e}' chart type`)},bO.switchCategorySeriesValidation={property:"switchCategorySeries",validationFn:fO((e=>{if(!e||bO.isEnterprise())return!0})),warnMessage:()=>wO("'switchCategorySeries' has been ignored as it"),warnIfFixed:!0},bO.commonUpdateValidations=[{property:"chartId",validationFn:vO,warnMessage:SO("chartId","string")},{property:"chartType",validationFn:bO.validateChartType,warnMessage:SO("chartType","ChartType")},{property:"chartThemeName",validationFn:vO,warnMessage:SO("chartThemeName","string")},{property:"chartThemeOverrides",validationFn:bO.validateAgChartThemeOverrides,warnMessage:SO("chartThemeOverrides","AgChartThemeOverrides")},{property:"unlinkChart",validationFn:yO,warnMessage:SO("unlinkChart","boolean")}],bO.cellRangeValidations=[{property:"cellRange",validationFn:bO.validateChartParamsCellRange,warnMessage:SO("cellRange","ChartParamsCellRange")},{property:"suppressChartRanges",validationFn:yO,warnMessage:SO("suppressChartRanges","boolean")},{property:"aggFunc",validationFn:bO.validateAggFunc,warnMessage:SO("aggFunc","string or IAggFunc")},bO.switchCategorySeriesValidation];var xO=bO;function MO(e,t,i,s){let n;for(const r of t){const{property:t,validationFn:i,warnMessage:s,warnIfFixed:o}=r;if(t in e){const r=e[t],a=i(r);if(!0===a)continue;if(!1===a)return h(s(r)),!1;n=n||{...e},n[t]=a,o&&h(s(r))}}if(i)for(const r in e)if(!i.includes(r))return h(`Unexpected property supplied. ${s} does not contain: \`${r}\`.`),!1;return n||!0}var DO=["ag-default","ag-material","ag-sheets","ag-polychroma","ag-vivid"],IO=class extends ze{constructor(e){super(),this.model=e,this.isEnterprise=()=>yF.enterpriseModule.isEnterprise}wireBeans(e){this.rangeService=e.rangeService}postConstruct(){this.setChartRange(),this.model.unlinked&&this.rangeService&&this.rangeService.setCellRanges([]);const e=this.updateForGridChange.bind(this,{});this.addManagedEventListeners({cellSelectionChanged:e=>{e.id&&e.id===this.model.chartId&&this.updateForRangeChange()},columnMoved:e,columnPinned:e,columnVisible:e,columnRowGroupChanged:e,modelUpdated:e,cellValueChanged:this.updateForDataChange.bind(this)})}update(e){if(!this.validUpdateType(e))return!1;const t=xO.validateUpdateParams(e);if(!t)return!1;const i=!0===t?e:t;return this.applyValidatedChartParams(i),!0}applyValidatedChartParams(e){const{chartId:t,chartType:i,chartThemeName:s,unlinkChart:n}=e,r={...{chartId:t,pivotChart:this.model.pivotChart,chartType:i??this.model.chartType,chartThemeName:s??this.model.chartThemeName,unlinkChart:n??this.model.unlinked,cellRange:this.model.suppliedCellRange,switchCategorySeries:this.model.switchCategorySeries,aggFunc:this.model.aggFunc,seriesChartTypes:void 0,suppressChartRanges:!1,crossFiltering:!1}};switch(e.type){case"rangeChartUpdate":r.cellRange=this.createCellRange(e)??this.model.suppliedCellRange,r.switchCategorySeries=e.switchCategorySeries??this.model.switchCategorySeries,r.aggFunc=e.aggFunc??this.model.aggFunc,r.seriesChartTypes=e.seriesChartTypes,r.suppressChartRanges=e.suppressChartRanges??this.model.suppressChartRanges,r.seriesGroupType=e.seriesGroupType??this.model.seriesGroupType;break;case"crossFilterChartUpdate":r.cellRange=this.createCellRange(e)??this.model.suppliedCellRange,r.switchCategorySeries=!1,r.aggFunc=e.aggFunc??this.model.aggFunc,r.crossFiltering=!0,r.suppressChartRanges=e.suppressChartRanges??this.model.suppressChartRanges;break;case"pivotChartUpdate":r.switchCategorySeries=!1}this.model.updateModel(r);r.unlinkChart||r.suppressChartRanges?this.rangeService?.setCellRanges([]):this.setChartRange()}updateForGridChange(e){if(this.model.unlinked)return;const{maintainColState:t,setColsFromRange:i}=e??{};this.model.updateCellRanges({maintainColState:t,setColsFromRange:i}),this.model.updateData(),this.setChartRange()}updateForDataChange(){this.model.unlinked||(this.model.updateData(),this.raiseChartModelUpdateEvent())}updateForRangeChange(){this.updateForGridChange({setColsFromRange:!0}),this.raiseChartRangeSelectionChangedEvent()}updateForPanelChange(e){this.model.updateCellRanges(e),this.model.updateData(),e.skipAnimation&&this.getChartProxy().getChartRef().skipAnimations(),this.setChartRange(),this.raiseChartRangeSelectionChangedEvent()}updateThemeOverrides(e){this.chartProxy.updateThemeOverrides(e)}getChartUpdateParams(e){const t=this.getSelectedValueColState().map((e=>({colId:e.colId,displayName:e.displayName}))),i=this.getChartData(),s=this.getSelectedDimensions(),n={data:i,groupData:this.model.groupChartData,grouping:this.isGrouping(),categories:s.map((e=>({id:e.colId,name:e.displayName,chartDataType:this.model.categoryAxisType??this.model.getChartDataType(e.colId)}))),fields:t,chartId:this.getChartId(),getCrossFilteringContext:()=>({lastSelectedChartId:"xxx"}),seriesChartTypes:this.getSeriesChartTypes(),updatedOverrides:e,seriesGroupType:this.model.seriesGroupType};return this.isCategorySeriesSwitched()?this.invertCategorySeriesParams(n):n}invertCategorySeriesParams(e){const[t]=e.categories,i=[{id:mO.DEFAULT_CATEGORY,name:""}],s=e.data.map(((e,i)=>{const s=`${t.id}:${i}`,n=e[t.id];return{colId:s,displayName:null==n?"":String(n)}})),n=e.fields.map((i=>{const s={[mO.DEFAULT_CATEGORY]:i.displayName};for(const[n,r]of e.data.entries()){const e=`${t.id}:${n}`,o=r[i.colId];s[e]=o}return s}));return{...e,categories:i,fields:s,data:n}}getChartModel(){const e=this.model.pivotChart?"pivot":"range",t=this.isComboChart()?this.model.comboChartModel.seriesChartTypes:void 0;return{modelType:e,chartId:this.model.chartId,chartType:this.model.chartType,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides(),chartPalette:this.chartProxy.getChartPalette(),cellRange:this.getCellRangeParams(),switchCategorySeries:this.model.switchCategorySeries,suppressChartRanges:this.model.suppressChartRanges,aggFunc:this.model.aggFunc,unlinkChart:this.model.unlinked,seriesChartTypes:t,seriesGroupType:this.model.seriesGroupType}}getChartId(){return this.model.chartId}getChartData(){return this.model.chartData}getChartType(){return this.model.chartType}setChartType(e){this.updateMultiSeriesAndCategory(this.model.chartType,e),this.model.chartType=e,this.model.comboChartModel.updateSeriesChartTypes(),this.model.switchCategorySeries=!1,this.model.categoryAxisType=void 0,this.model.seriesGroupType=void 0,this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent()}isCategorySeriesSwitched(){return this.model.switchCategorySeries&&!this.model.isGrouping()}switchCategorySeries(e){FN(this.getChartType())&&(this.model.switchCategorySeries=e,this.raiseChartModelUpdateEvent())}getAggFunc(){return this.model.aggFunc}setAggFunc(e,t){this.model.aggFunc!==e&&(this.model.aggFunc=e,t||(this.model.updateData(),this.raiseChartModelUpdateEvent()))}updateMultiSeriesAndCategory(e,t){const i=(e,t)=>{let i=0;for(const s of e)s.selected&&(i>=t?s.selected=!1:i++);0===i&&(e[0].selected=!0)},s=PN(t),n=LN(t),r=null!=s&&(PN(e)??100)>(s??100),o=null!=n&&(LN(e)??100)>(n??100);r&&i(this.model.dimensionColState,s),o&&i(this.model.valueColState,n),(r||o)&&(this.model.resetCellRanges(r,o),this.setChartRange(!0))}setChartThemeName(e,t){this.model.chartThemeName=e,t||(this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent())}getChartThemeName(){return this.model.chartThemeName}
2isPivotChart(){return this.model.pivotChart}isPivotMode(){return this.model.isPivotMode()}isGrouping(){return this.model.isGrouping()}isCrossFilterChart(){return this.model.crossFiltering}getThemeNames(){return this.gos.get("chartThemes")||DO}getThemes(){return this.getThemeNames().map((e=>{const t=oO(e)?e:this.chartProxy.lookupCustomChartTheme(e);return gF.getChartTheme(t)}))}getPalettes(){return this.getThemes().map((e=>e.palette))}getThemeTemplateParameters(){return this.getThemes().map((e=>e.getTemplateParameters()))}getValueColState(){return this.model.valueColState.map(this.displayNameMapper.bind(this))}getSelectedValueColState(){return this.getValueColState().filter((e=>e.selected))}getSelectedDimensions(){return this.model.getSelectedDimensions()}displayNameMapper(e){const{column:t}=e;if(t)e.displayName=this.model.getColDisplayName(t,this.model.isPivotMode());else{const i=this.model.columnNames[e.colId];e.displayName=i?i.join(" - "):this.model.getColDisplayName(t)}return e}getColStateForMenu(){return{dimensionCols:this.model.dimensionColState,valueCols:this.getValueColState()}}setChartRange(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!this.rangeService||this.model.suppressChartRanges||this.model.unlinked||this.rangeService.setCellRanges(this.getCellRanges()),e||this.raiseChartModelUpdateEvent()}detachChartRange(){this.model.unlinked=!this.model.unlinked,this.model.unlinked?this.rangeService&&this.rangeService.setCellRanges([]):this.updateForGridChange(),this.dispatchLocalEvent({type:"chartLinkedChanged"})}setChartProxy(e){this.chartProxy=e}getChartProxy(){return this.chartProxy}isActiveXYChart(){return["scatter","bubble"].includes(this.getChartType())}isChartLinked(){return!this.model.unlinked}customComboExists(){const e=this.model.comboChartModel.savedCustomSeriesChartTypes;return e&&e.length>0}getSeriesChartTypes(){return this.model.comboChartModel.seriesChartTypes}isComboChart(e){return this.model.isComboChart(e)}updateSeriesChartType(e,t,i){const s=this.model.comboChartModel.seriesChartTypes.find((t=>t.colId===e));if(s){const e="customCombo"!==this.model.chartType;e&&(this.model.chartType="customCombo");const n=s.chartType;null!=t&&(s.chartType=t),null!=i&&(s.secondaryAxis=i),this.model.comboChartModel.savedCustomSeriesChartTypes=this.model.comboChartModel.seriesChartTypes,this.model.comboChartModel.updateSeriesChartTypes(),this.updateForDataChange(),e&&this.dispatchLocalEvent({type:"chartTypeChanged"}),n!==t&&this.dispatchLocalEvent({type:"chartSeriesChartTypeChanged"}),this.raiseChartOptionsChangedEvent()}}getActiveSeriesChartTypes(){const e=this.getSelectedValueColState().map((e=>e.colId));return this.getSeriesChartTypes().filter((t=>e.includes(t.colId)))}getChartSeriesTypes(e){const t=e??this.getChartType();return this.isComboChart(t)?["line","bar","area"]:[AN(t)]}getChartSeriesType(){const e=this.getSeriesChartTypes();if(0===e.length)return"bar";const t=e[0].chartType;return"columnLineCombo"===t?"bar":"areaColumnCombo"===t?"area":AN(t)}getCellRanges(){return[this.model.dimensionCellRange,this.model.valueCellRange].filter((e=>e))}createCellRange(e){return e.cellRange&&this.rangeService?.createPartialCellRangeFromRangeParams(e.cellRange,!0)}validUpdateType(e){if(!e.type)return h("Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'."),!1;const t={"Range Chart":()=>!this.isPivotChart()&&!this.isCrossFilterChart(),"Pivot Chart":()=>this.isPivotChart(),"Cross Filter Chart":()=>this.isCrossFilterChart()},i=Object.keys(t).find((e=>t[e]()))??"Range Chart",s=e.type===`${i[0].toLowerCase()}${i.slice(1).replace(/ /g,"")}Update`;return s||h(`Unable to update chart as a '${e.type}' update type is not permitted on a ${i}.`),s}getCellRangeParams(){const e=this.getCellRanges(),t=e[0],i=t&&t.startRow||null,s=t&&t.endRow||null;return{rowStartIndex:i&&i.rowIndex,rowStartPinned:i&&i.rowPinned,rowEndIndex:s&&s.rowIndex,rowEndPinned:s&&s.rowPinned,columns:e.reduce(((e,t)=>e.concat(t.columns.map((e=>e.getId())))),[])}}setCategoryAxisType(e){this.model.categoryAxisType=e,this.raiseChartModelUpdateEvent()}getSeriesGroupType(){return this.model.seriesGroupType??this.chartProxy.getSeriesGroupType()}setSeriesGroupType(e){this.model.seriesGroupType=e,this.raiseChartModelUpdateEvent()}raiseChartModelUpdateEvent(){this.dispatchLocalEvent({type:"chartModelUpdate"})}raiseChartUpdatedEvent(){this.dispatchLocalEvent({type:"chartUpdated"})}raiseChartApiUpdateEvent(){this.dispatchLocalEvent({type:"chartApiUpdate"})}raiseChartOptionsChangedEvent(){const{chartId:e,chartType:t}=this.getChartModel();this.eventService.dispatchEvent({type:"chartOptionsChanged",chartId:e,chartType:t,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides()})}raiseChartRangeSelectionChangedEvent(){this.eventService.dispatchEvent({type:"chartRangeSelectionChanged",id:this.model.chartId,chartId:this.model.chartId,cellRange:this.getCellRangeParams()})}destroy(){super.destroy(),this.rangeService&&this.rangeService.setCellRanges([])}};function RO(e){return null!=e.chart?e.chart:e}var EO=class{constructor(e){this.chartProxyParams=e,this.clearThemeOverrides=!1,this.isEnterpriseCharts=yF.enterpriseModule.isEnterprise,this.chart=e.chartInstance,this.chartType=e.chartType,this.crossFiltering=e.crossFiltering,this.crossFilterCallback=e.crossFilterCallback,this.standaloneChartType=AN(this.chartType),null==this.chart?this.chart=XL.create(this.getCommonChartOptions()):this.clearThemeOverrides=!0}crossFilteringReset(){}update(e){this.getChartRef().update(this.getUpdateOptions(e,this.getCommonChartOptions(e.updatedOverrides)))}updateThemeOverrides(e){this.getChartRef().updateDelta({theme:{overrides:e}})}getChart(){return RO(this.chart)}getChartRef(){return this.chart}downloadChart(e,t,i){const{chart:s}=this,n=RO(s),r=t||(n.title?n.title.text:"chart"),{width:o,height:a}=e||{};s.download({width:o,height:a,fileName:r,fileFormat:i})}getChartImageDataURL(e){return this.getChart().getCanvasDataURL(e)}getChartOptions(){return this.chart.getOptions()}getChartThemeOverrides(){return this.getChartOptions().theme.overrides??{}}getChartPalette(){return gF.getChartTheme(this.getChartOptions().theme).palette}setPaired(e){const t=AN(this.chartProxyParams.chartType);this.chart.updateDelta({theme:{overrides:{[t]:{paired:e}}}})}isPaired(){const e=AN(this.chartProxyParams.chartType);return nO(this.getChartThemeOverrides(),`${e}.paired`,!0)}lookupCustomChartTheme(e){return hO(this.chartProxyParams,e)}getSeriesGroupType(){}transformCategoryData(e,t){return e.map(((e,i)=>{const s=e[t],n=s&&s.toString?s.toString():"",r={...e};return r[t]={id:i,value:s,toString:()=>n},r}))}getCommonChartOptions(e){const t=this.clearThemeOverrides?{}:this.chart?.getOptions()??{},i=null!=this.chart?this.getActiveFormattingPanelOverrides():void 0;this.clearThemeOverrides=!1;const s=rO(this.chartProxyParams,this,this.isEnterpriseCharts,this.getChartThemeDefaults(),e??i),n={...t,mode:"integrated"};return n.theme=s,n.container=this.chartProxyParams.parentElement,n}getChartThemeDefaults(){const e=this.getSeriesChartThemeDefaults(),t=e?{[this.standaloneChartType]:e}:{},i={enabled:!0,snap:!0,label:{enabled:!1}},s=this.isEnterpriseCharts?{zoom:{enabled:!0},animation:{enabled:!0,duration:500},axes:{number:{crosshair:i},category:{crosshair:i},log:{crosshair:i},time:{crosshair:i}}}:{};return s.minHeight=0,s.minWidth=0,s.navigator={enabled:!1},{common:s,...t}}getSeriesChartThemeDefaults(){}getActiveFormattingPanelOverrides(){if(this.clearThemeOverrides)return{};const e=this.chart?.getOptions().theme;return e?.overrides??{}}destroy(){let{keepChartInstance:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e)return this.chart.resetAnimations(),this.chart;this.destroyChart()}destroyChart(){this.chart&&(this.chart.destroy(),this.chart=void 0)}}
2,AO=class extends EO{constructor(e){super(e),this.crossFilteringAllPoints=new Set,this.crossFilteringSelectedPoints=[]}getUpdateOptions(e,t){const i=this.getAxes(e,t);return{...t,data:this.getData(e,i),axes:i,series:this.getSeries(e)}}getData(e,t){const i=["area","line"].includes(this.standaloneChartType);return this.crossFiltering&&i?this.getCrossFilterData(e):this.getDataTransformedData(e,t)}getDataTransformedData(e,t){const i=t[0].type,{categories:s,data:n}=e,[r]=s;switch(i){case"category":return this.transformCategoryData(n,r.id);case"time":return this.transformTimeData(n,r.id);default:return n}}getXAxisType(e){return e.grouping?"grouped-category":this.isXAxisOfType(e,"time",(e=>e instanceof Date))?"time":this.isXAxisOfType(e,"number")?"number":"category"}isXAxisOfType(e,t,i){const[s]=e.categories;if(s?.chartDataType)return s.chartDataType===t;if(!i)return!1;const n=e.data[0];return!!n&&i(n[s.id])}transformTimeData(e,t){const i=e[0]?.[t];return i instanceof Date?e:e.map((e=>{const i=e[t];return"string"===typeof i?{...e,[t]:new Date(i)}:e}))}crossFilteringReset(){this.crossFilteringSelectedPoints=[],this.crossFilteringAllPoints.clear()}crossFilteringPointSelected(e){return 0==this.crossFilteringSelectedPoints.length||this.crossFilteringSelectedPoints.includes(e)}crossFilteringDeselectedPoints(){return this.crossFilteringSelectedPoints.length>0&&this.crossFilteringAllPoints.size!==this.crossFilteringSelectedPoints.length}extractLineAreaCrossFilterSeries(e,t){const[i]=t.categories,s=e=>{if("area"===this.standaloneChartType){return t.getCrossFilteringContext().lastSelectedChartId===t.chartId?e+"-total":e}return e+"-total"};return e.map((e=>(e.yKey=s(e.yKey),e.listeners={nodeClick:t=>{const i=t.datum[e.xKey],s=t.event.metaKey||t.event.ctrlKey;this.crossFilteringAddSelectedPoint(s,i),this.crossFilterCallback(t)}},e.marker={itemStyler:e=>{const t=e.datum[i.id];return{fill:e.highlighted?"yellow":e.fill,size:e.highlighted?14:this.crossFilteringPointSelected(t)?8:0}}},"area"===this.standaloneChartType&&(e.fillOpacity=this.crossFilteringDeselectedPoints()?.3:1),"line"===this.standaloneChartType&&(e.strokeOpacity=this.crossFilteringDeselectedPoints()?.3:1),e)))}getCrossFilterData(e){this.crossFilteringAllPoints.clear();const[t]=e.categories,i=e.fields[0].colId,s=`${i}-filtered-out`,n=e.getCrossFilteringContext().lastSelectedChartId;return e.data.map((r=>{const o=r[t.id];this.crossFilteringAllPoints.add(o);const a=this.crossFilteringPointSelected(o);return"area"===this.standaloneChartType&&n===e.chartId&&(r[`${i}-total`]=a?r[i]:r[i]+r[s]),"line"===this.standaloneChartType&&(r[`${i}-total`]=a?r[i]:r[i]+r[s]),r}))}crossFilteringAddSelectedPoint(e,t){e?this.crossFilteringSelectedPoints.push(t):this.crossFilteringSelectedPoints=[t]}isHorizontal(e){const t=this.standaloneChartType;if("waterfall"!==t&&"box-plot"!==t&&"range-bar"!==t)return!1;const i=e.theme,s=e=>{const i=e?.overrides?.[t]?.series?.direction;return null!=i?"horizontal"===i:"object"===typeof e?.baseTheme&&s(e.baseTheme)};return s(i)}},TO=class extends AO{constructor(e){super(e)}getAxes(e){const t=[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}];if(this.isNormalised()){const e=t[1];e.label={...e.label,formatter:e=>Math.round(e.value)+"%"}}return t}getSeries(e){const[t]=e.categories,i=e.fields.map((e=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName,normalizedTo:"normalizedArea"===this.chartType?100:void 0,stacked:["normalizedArea","stackedArea"].includes(this.chartType)})));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i}isNormalised(){return!this.crossFiltering&&"normalizedArea"===this.chartType}};function PO(e,t){const i=parseInt(e.slice(1,3),16),s=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return t?`rgba(${i}, ${s}, ${n}, ${t})`:`rgba(${i}, ${s}, ${n})`}function LO(e,t){return e.map((e=>{const i=vF.Color.fromString(e);return new vF.Color(i.r,i.g,i.b,t).toHexString()}))}var FO=new Set(["bar","groupedBar","stackedBar","normalizedBar"]),kO=class extends AO{constructor(e){super(e)}getAxes(e){const t=[{type:this.getXAxisType(e),position:this.isHorizontal()?"left":"bottom"},{type:"number",position:this.isHorizontal()?"bottom":"left"}];if(this.isNormalised()){const e=t[1];e.label={...e.label,formatter:e=>Math.round(e.value)+"%"}}return t}getSeries(e){const[t]=e.categories,i=e.fields.map((e=>{return{type:this.standaloneChartType,direction:this.isHorizontal()?"horizontal":"vertical",stacked:this.crossFiltering||(i=this.chartType,xN.has(i)),normalizedTo:this.isNormalised()?100:void 0,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName};var i}));return this.crossFiltering?this.extractCrossFilterSeries(i):i}extractCrossFilterSeries(e){const t=this.getChartPalette(),i=(e,i)=>({...e,highlightStyle:{item:{fill:void 0}},fill:t?.fills?.[i],stroke:t?.strokes?.[i],listeners:{nodeClick:this.crossFilterCallback}}),s=e=>{const t=e.yKey+"-filtered-out";return{...e,yKey:t,fill:PO(e.fill,"0.3"),stroke:PO(e.stroke,"0.3"),showInLegend:!1}},n=[];for(let r=0;r<e.length;r++){const t=e[r];n.push(i(t,r)),n.push(s(i(t,r)))}return n}isNormalised(){return!this.crossFiltering&&Ee(["normalizedColumn","normalizedBar"],this.chartType)}isHorizontal(){return FO.has(this.chartType)}},NO=class extends AO{constructor(e){super(e)}getSeries(e){const t=e.fields[0];return[{type:this.standaloneChartType,xKey:t.colId,xName:t.displayName,yName:this.chartProxyParams.translate("histogramFrequency"),areaPlot:!1}]}getAxes(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}},OO=class extends AO{constructor(e){super(e)}getAxes(e){return[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}]}getSeries(e){const[t]=e.categories,i=e.fields.map((e=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName})));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i}},GO=class extends AO{constructor(e){super(e)}getAxes(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}getSeries(e){const[t]=e.categories,i=this.isPaired(),s=this.getSeriesDefinitions(e.fields,i),n=t.id===mO.DEFAULT_CATEGORY?void 0:t,r=s.map((e=>{if(e?.sizeField){return{type:"bubble",xKey:e.xField.colId,xName:e.xField.displayName??void 0,yKey:e.yField.colId,yName:e.yField.displayName??void 0,title:`${e.yField.displayName} vs ${e.xField.displayName}`,sizeKey:e.sizeField.colId,sizeName:e.sizeField.displayName??"",labelKey:n?n.id:e.yField.colId,labelName:n?n.name:void 0}}return{type:"scatter",xKey:e.xField.colId,xName:e.xField.displayName??void 0,yKey:e.yField.colId,yName:e.yField.displayName??void 0,title:`${e.yField.displayName} vs ${e.xField.displayName}`,labelKey:n?n.id:e.yField.colId,labelName:n?n.name:void 0}}));return this.crossFiltering?this.extractCrossFilterSeries(r,e):r}extractCrossFilterSeries(e,t){const{data:i}=t,s=this.getChartPalette(),n=e=>`${e}-filtered-out`,r=e.map(((e,t)=>{const r=s?.fills?.[t],o=s?.strokes?.[t];let a;if("bubble"===e.type){const{sizeKey:t}=e;a=((e,t)=>{const i=[1/0,-1/0];if(null!=t)for(const s of e){const e=s[t]??s[n(t)];e<i[0]&&(i[0]=e),e>i[1]&&(i[1]=e)}if(i[0]<=i[1])return i})(i,t)}return{...e,fill:r,stroke:o,domain:a,highlightStyle:{item:{fill:"yellow"}},listeners:{...e.listeners,nodeClick:this.crossFilterCallback}}}));return[...r,...r.map((e=>{const{yKey:t,xKey:i}=e;let s={};return"bubble"===e.type&&(s={sizeKey:n(e.sizeKey)}),{...e,...s,yKey:n(t),xKey:n(i),fillOpacity:.3,strokeOpacity:.3,showInLegend:!1,listeners:{...e.listeners,nodeClick:e=>{const t=e.datum[n(i)],s={...e,xKey:i,datum:{...e.datum,[i]:t}};this.crossFilterCallback(s)}}}}))]}getSeriesDefinitions(e,t){if(e.length<2)return[];const i="bubble"===this.chartType;if(t)return i?e.map(((t,i)=>
2i%3===0?{xField:t,yField:e[i+1],sizeField:e[i+2]}:null)).filter((e=>e&&e.yField&&e.sizeField)):e.map(((t,i)=>i%2===0?{xField:t,yField:e[i+1]}:null)).filter((e=>e&&e.yField));const s=e[0];return i?e.map(((t,i)=>i%2===1?{xField:s,yField:t,sizeField:e[i+1]}:null)).filter((e=>e&&e.sizeField)):e.filter(((e,t)=>t>0)).map((e=>({xField:s,yField:e})))}},BO=class extends AO{constructor(e){super(e)}getAxes(e,t){return[{type:this.getXAxisType(e),position:this.isHorizontal(t)?"left":"bottom"},{type:"number",position:this.isHorizontal(t)?"bottom":"left"}]}getSeries(e){const[t]=e.categories,[i]=e.fields;return[{type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:i.colId,yName:i.displayName??void 0}]}},VO=class extends AO{constructor(e){super(e)}getAxes(e){const t=e?e.fields:[],i=new Map(t.map((e=>[e.colId,e]))),{primaryYKeys:s,secondaryYKeys:n}=this.getYKeys(t,e.seriesChartTypes),r=[{type:this.getXAxisType(e),position:"bottom"}];return s.length>0&&r.push({type:"number",keys:s,position:"left"}),n.length>0&&n.forEach((e=>{const t=i.get(e);if(!(t&&t.colId===e))return;const s={type:"number",keys:[e],position:"right"};r.push(s)})),r}getSeries(e){const{fields:t,seriesChartTypes:i}=e,[s]=e.categories;return t.map((e=>{const t=i.find((t=>t.colId===e.colId));if(t){const i=t.chartType,n=["groupedColumn","groupedBar"].includes(i)?{grouped:!0}:{};return{type:AN(i),xKey:s.id,yKey:e.colId,yName:e.displayName,stacked:["stackedArea","stackedColumn"].includes(i),...n}}}))}getYKeys(e,t){const i=[],s=[];return e.forEach((e=>{const n=e.colId,r=t.find((e=>e.colId===n));r&&(r.secondaryAxis?s.push(n):i.push(n))})),{primaryYKeys:i,secondaryYKeys:s}}},zO="AG-GRID-DEFAULT-LABEL-KEY";function HO(e,t){return WO(jO(e,(function(e){return t.length}),(function(e,i){const s=t[i];return n=e[s],null==n?null:String(n);var n})))}function WO(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;const{depth:s,rootValues:n,value:r,children:o}=e;if(n)return n.map((e=>({[zO]:t,...e})));if(0===s)return[{[zO]:t,...r}];const a=[];for(const[l,h]of o.entries())a.push(...WO(h,l,!0));return i?[{[zO]:t,children:a,...r??{}}]:a}function jO(e,t,i){const s={depth:0,children:new Map};return e.forEach((e=>{n(e,t(e),i,0,s)})),s;function n(e,t,i,s,r){if(s===t)return 0===s?(r.rootValues||(r.rootValues=[]),r.rootValues.push(e)):r.value=e,r;{const o=i(e,s),a=n(e,t,i,s+1,r.children.get(o)||{depth:0,children:new Map});return r.children.set(o,a),r.depth=Math.max(1+a.depth,r.depth),r}}}var UO=class extends EO{constructor(e){super(e)}getUpdateOptions(e,t){const{fields:i}=e,[s,n]=i;return{...t,series:this.getSeries(s,n),data:this.getData(e,s,n)}}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}}}}getSeries(e,t){return[{type:this.standaloneChartType,labelKey:zO,sizeKey:e?.colId,sizeName:e?.displayName??void 0,colorKey:t?.colId,colorName:t?.displayName??void 0}]}getData(e,t,i){const{categories:s,data:n,groupData:r,grouping:o}=e;if(o){return function(e,t){return WO(jO(e,(function(e){return t(e)?.length??0}),(function(e,i){const s=t(e);if(!s)return null;return s[s.length-1-i]})))}(i?n.concat(r?.map((e=>{const i={...e};return delete i[t.colId],i}))??[]):n,(e=>e[_e]?.labels??null))}return HO(n,s.map((e=>{let{id:t}=e;return t})))}};var _O=class extends EO{constructor(e){super(e)}getUpdateOptions(e,t){return{...t,data:this.crossFiltering?this.getCrossFilterData(e):e.data,series:this.getSeries(e)}}getSeries(e){const[t]=e.categories,i=e.fields.length,s={currentOffset:0,offsetAmount:i>1?20:40},n=this.getFields(e).map((e=>{const n={type:this.standaloneChartType,angleKey:e.colId,angleName:e.displayName,sectorLabelKey:e.colId,calloutLabelName:t.name,calloutLabelKey:t.id};if("donut"===this.chartType||"doughnut"===this.chartType){const{outerRadiusOffset:t,innerRadiusOffset:r}=function(e){const t=e.currentOffset;e.currentOffset-=e.offsetAmount;const i=e.currentOffset;return e.currentOffset-=e.offsetAmount,{outerRadiusOffset:t,innerRadiusOffset:i}}(s),o=e.displayName?{title:{text:e.displayName,showInLegend:i>1}}:void 0;return{...n,type:"donut",outerRadiusOffset:t,innerRadiusOffset:r,...o,calloutLine:{colors:this.getChartPalette()?.strokes}}}return n}));return this.crossFiltering?this.extractCrossFilterSeries(n):n}getCrossFilterData(e){const t=e.fields[0].colId,i=`${t}-filtered-out`;return e.data.map((e=>{const s=e[t]+e[i];return e[`${t}-total`]=s,e[i]=1,e[t]=e[t]/s,e}))}extractCrossFilterSeries(e){const t=this.getChartPalette(),i=e=>({...e,legendItemKey:e.calloutLabelKey,calloutLabel:{enabled:!1},highlightStyle:{item:{fill:void 0}}
2,radiusKey:e.angleKey,angleKey:e.angleKey+"-total",radiusMin:0,radiusMax:1,listeners:{nodeClick:this.crossFilterCallback}}),s=e[0],n=s.angleKey,r=i(s);return[(o=i(s),a=n,{...r,radiusKey:a+"-filtered-out",fills:LO(o.fills??t?.fills??[],.3),strokes:LO(o.strokes??t?.strokes??[],.3),showInLegend:!1}),r];var o,a}getFields(e){return"pie"===this.chartType?e.fields.slice(0,1):e.fields}},KO=class extends EO{constructor(e){super(e)}getAxes(e){const t="radial-bar"===this.standaloneChartType;return[{type:t?"angle-number":"angle-category"},{type:t?"radius-category":"radius-number"}]}getSeries(e){const{fields:t,categories:i,seriesGroupType:s}=e,[n]=i,r="radial-bar"===this.standaloneChartType,o=this.getSeriesGroupTypeOptions(s);return t.map((e=>({type:this.standaloneChartType,angleKey:r?e.colId:n.id,angleName:r?e.displayName??void 0:n.name,radiusKey:r?n.id:e.colId,radiusName:r?n.name:e.displayName??void 0,...o})))}getSeriesGroupType(){const e=this.standaloneChartType;if(!["nightingale","radial-bar","radial-column"].includes(e))return;const t=this.getChart().series?.[0]?.properties.toJson(),i=()=>t.normalizedTo?"normalized":"stacked";return"nightingale"===e?t.grouped?"grouped":i():t.stacked?i():"grouped"}getUpdateOptions(e,t){const i=this.getAxes(e);return{...t,data:this.getData(e,i),axes:i,series:this.getSeries(e)}}getData(e,t){if(t.some((e=>"angle-category"===e.type||"radius-category"===e.type))){const[t]=e.categories;return this.transformCategoryData(e.data,t.id)}return e.data}getSeriesGroupTypeOptions(e){return e?{grouped:"grouped"===e||void 0,stacked:"grouped"!==e||void 0,normalizedTo:"normalized"===e?100:void 0}:{}}};var $O=class extends EO{constructor(e){super(e)}getUpdateOptions(e,t){const i="AG-GRID-DEFAULT-HEATMAP-SERIES-KEY",s="AG-GRID-DEFAULT-HEATMAP-VALUE-KEY",n="AG-GRID-DEFAULT-HEATMAP-CATEGORY-KEY";return{...t,series:this.getSeries(e,i,s,n),data:this.getData(e,i,s,n)}}getSeries(e,t,i,s){const[n]=e.categories;return[{type:this.standaloneChartType,yKey:s,xKey:t,colorKey:i,yName:n.name,xName:void 0,colorName:void 0}]}getData(e,t,i,s){const[n]=e.categories;return r=e.data,o=(r,o)=>{const a=r[n.id],l=null==a?"":String(a),h={id:o,value:a,toString:()=>l};return e.fields.map((e=>{let{colId:n,displayName:o}=e;return{...r,[t]:o,[i]:r[n],[s]:h}}))},r.reduce(((e,t,i,s)=>e.concat(o(t,i,s))),new Array);var r,o}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}},series:{tooltip:{renderer:YO}}}}};function YO(e){const{xKey:t,yKey:i,colorKey:s,yName:n,datum:r}=e;return{title:"",content:[{label:n,value:r[i]},{label:r[t],value:s&&r[s]}].map((e=>{let{label:t,value:i}=e;return`<b>${ZO(String(t))}:</b> ${ZO(String(i))}`})).join("<br>")}}function ZO(e){const t={"&":"&amp;","<":"&lt;",">":"&gt;"},i=`[${Object.keys(t).join("")}]`,s=new RegExp(i,"g");return e.replace(s,(e=>t[e]))}var qO=class extends AO{constructor(e){super(e)}getAxes(e,t){return[{type:this.getXAxisType(e),position:this.isHorizontal(t)?"left":"bottom"},{type:"number",position:this.isHorizontal(t)?"bottom":"left"}]}computeSeriesStatistics(e,t){const{data:i,fields:s}=e,[n]=e.categories,r=n.id||mO.DEFAULT_CATEGORY,o=this.groupDataByCategory(r,i);return Array.from(o).map((e=>{let[i,r]=e;const o={[n.id]:i};return s.forEach(((e,i)=>{const s=r.map((t=>t[e.colId])).filter((e=>"number"===typeof e&&!isNaN(e)));Object.entries(t(s)).forEach((e=>{let[t,n]=e;o[`${t}:${i}`]=s.length>0?n:null}))})),o}))}groupDataByCategory(e,t){return t.reduce(((t,i)=>{const s=(t=>{if(e===mO.DEFAULT_CATEGORY)return 1;const i=t[e];return null===i||void 0===i?"":i instanceof Date?i.getTime():i})(i),n=t.get(s);return n?n.push(i):t.set(s,[i]),t}),new Map)}},QO=class extends qO{constructor(e){super(e)}getSeries(e){const[t]=e.categories;return e.fields.map(((e,i)=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yName:e.displayName??void 0,minName:"Min",q1Name:"Q1",medianName:"Median",q3Name:"Q3",maxName:"Max",minKey:`min:${i}`,q1Key:`q1:${i}`,medianKey:`median:${i}`,q3Key:`q3:${i}`,maxKey:`max:${i}`})))}getData(e){return this.computeSeriesStatistics(e,(e=>{const t=e.sort(((e,t)=>e-t));return{min:t[0],q1:this.quantile(t,.25),median:this.quantile(t,.5),q3:this.quantile(t,.75),max:t[t.length-1]}}))}quantile(e,t){const i=(e.length-1)*t,s=Math.floor(i),n=i-s;return void 0!==e[s+1]?e[s]+n*(e[s+1]-e[s]):e[s]}},XO=class extends qO{constructor(e){super(e)}getSeries(e){const[t]=e.categories;return e.fields.map(((e,i)=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yName:e.displayName??void 0,yLowName:"Min",yHighName:"Max",yLowKey:`min:${i}`,yHighKey:`max:${i}`})))}getData(e){return this.computeSeriesStatistics(e,(e=>({min:Math.min(...e),max:Math.max(...e)})))}},JO=class extends Rs{constructor(){super('<div class="ag-chart-menu" data-ref="eMenu"></div>'),this.eMenu=Is,this.buttonListenersDestroyFuncs=[]}wireBeans(e){this.chartTranslationService=e.chartTranslationService}updateParams(e){const{buttons:t}=e;this.createButtons(t)}createButtons(e){this.buttonListenersDestroyFuncs.forEach((e=>e?.())),this.buttonListenersDestroyFuncs=[];const t=this.eMenu;rs(t),e.forEach((e=>{const{buttonName:i,iconName:s,callback:n}=e,r=this.createButton(s),o=this.chartTranslationService.translate(i+"ToolbarTooltip");o&&r instanceof HTMLElement&&(r.title=o),this.buttonListenersDestroyFuncs.push(...this.addManagedElementListeners(r,{click:e=>n(e.currentTarget)})),t.appendChild(r)}))}createButton(e){const t=Ps(e,this.gos,void 0,!0);t.classList.add("ag-chart-menu-icon");const i=j(this.gos).createElement("button");return i.appendChild(t),i.classList.add("ag-chart-menu-toolbar-button"),i}destroy(){this.buttonListenersDestroyFuncs=[],super.destroy()}},eG=class extends Rs{constructor(e){super('<div class="ag-pill-select" role="presentation"></div>'),this.config=e??{};const{selectedValueList:t,valueFormatter:i,valueList:s}=this.config;this.selectedValues=t??[],this.valueList=s??[],this.valueFormatter=i??(e=>At(e))}postConstruct(){const{ariaLabel:e,onValuesChange:t,dragSourceId:i}=this.config;this.dropZonePanel=this.createManagedBean(new iG({getValues:()=>this.selectedValues,setValues:e=>
2this.updateValues(e),isDraggable:()=>this.selectedValues.length>1},(e=>this.valueFormatter(e)),e,i));this.getGui().appendChild(this.dropZonePanel.getGui()),this.initSelect(),null!=t&&(this.onValuesChange=t)}setValues(e,t){const{added:i,removed:s,updated:n}=this.getChanges(this.valueList,e);let r=!1;return(i.length||s.length||n.length)&&(r=!0),this.valueList=e,this.updateValues(t,r,!0),this}setValueFormatter(e){return this.valueFormatter=e,this}initSelect(){const e=this.createSelectOptions();if(!e.length)return!1;const{selectPlaceholder:t}=this.config;return this.eSelect=this.createBean(new hr({options:e,placeholder:t,onValueChange:e=>this.addValue(e),pickerIcon:"chartsMenuAdd"})),this.getGui().appendChild(this.eSelect.getGui()),!0}createSelectOptions(){const e=[],{maxSelection:t}=this.config;return t&&this.selectedValues.length>=t||this.valueList.forEach((t=>{this.selectedValues.includes(t)||e.push({value:t,text:this.valueFormatter(t)})})),e}addValue(e){this.dropZonePanel.addItem(e)}updateValues(e,t,i){const s=this.selectedValues;this.selectedValues=e;const n=this.getChanges(s,e),r=t||n.added.length||n.removed.length,o=K(this.gos),a=this.eSelect?.getGui().contains(o),l=this.dropZonePanel?.getGui().contains(o);i||this.onValuesChange?.(n);const h=!!r&&!this.refreshSelect();this.dropZonePanel.refreshGui(),r&&a&&(h?this.dropZonePanel.focusList(!0):this.eSelect?.getFocusableElement().focus()),l&&!e.length&&this.eSelect?.getFocusableElement().focus()}getChanges(e,t){return{added:t.filter((t=>!e.includes(t))),removed:e.filter((e=>!t.includes(e))),updated:t.filter(((t,i)=>e[i]!==t)),selected:t}}refreshSelect(){if(!this.eSelect)return this.initSelect();const e=this.createSelectOptions();return e.length?(this.eSelect.clearOptions().addOptions(e).setValue(void 0,!0),!0):(os(this.eSelect.getGui()),this.eSelect=this.destroyBean(this.eSelect),!1)}destroy(){this.destroyBean(this.eSelect),super.destroy()}},tG=class extends pk{constructor(e,t,i,s,n,r){super(t,i,!1),this.value=e,this.valueFormatter=s,this.draggable=n,this.sourceId=r}getItem(){return this.value}getDisplayName(){return this.valueFormatter(this.value)}getAriaDisplayName(){return this.getDisplayName()}getTooltip(){}createGetDragItem(){return()=>({value:this.value})}getDragSourceType(){return Gn.ChartPanel}getDragSourceId(){return this.sourceId}isDraggable(){return this.draggable}},iG=class extends gk{constructor(e,t,i,s){super(!1),this.model=e,this.valueFormatter=t,this.ariaLabel=i,this.sourceId=s}postConstruct(){super.init()}isItemDroppable(e,t){return this.isSourceEventFromTarget(t)||null!=this.sourceId&&this.sourceId===t.dragSource.sourceId}updateItems(e){this.model.setValues(e)}getExistingItems(){return this.model.getValues()}getIconName(){return this.isPotentialDndItems()?"move":"notAllowed"}getAriaLabel(){return this.ariaLabel}createPillComponent(e,t,i){return new tG(e,t,i,this.valueFormatter,this.model.isDraggable(),this.sourceId)}getItems(e){return[e.value]}isInterestedIn(e){return e===Gn.ChartPanel}},sG=class extends Rs{constructor(e,t,i,s){super(s),this.chartController=e,this.allowMultipleSelection=t,this.maxSelection=i}wireBeans(e){this.chartTranslationService=e.chartTranslationService}addItem(e){this.groupComp.addItem(e)}createGroup(e,t,i,s,n){if(this.allowMultipleSelection){const n=e.filter((e=>e.selected));this.valuePillSelect=this.groupComp.createManagedBean(new eG({valueList:e,selectedValueList:n,valueFormatter:t,selectPlaceholder:this.chartTranslationService.translate(i),dragSourceId:s,onValuesChange:e=>this.onValueChange(e),maxSelection:this.maxSelection})),this.groupComp.addItem(this.valuePillSelect)}else{const t=this.createValueSelectParams(e);t.onValueChange=t=>{e.forEach((e=>{e.selected=!1})),t.selected=!0,t.colId===mO.DEFAULT_CATEGORY&&this.chartController.setAggFunc(void 0,!0),this.chartController.updateForPanelChange({updatedColState:t,skipAnimation:n?.()})},this.valueSelect=this.groupComp.createManagedBean(new hr(t)),this.groupComp.addItem(this.valueSelect)}}refreshValueSelect(e){if(!this.valueSelect)return;const{options:t,value:i}=this.createValueSelectParams(e);this.valueSelect.clearOptions().addOptions(t).setValue(i,!0)}createValueSelectParams(e){let t;return{options:e.map((e=>{const i=e.displayName??"";return e.selected&&(t=e),{value:e,text:i}})),value:t}}onValueChange(e){let t,i,{added:s,updated:n,removed:r,selected:o}=e;const a=()=>{o.forEach(((e,t)=>{e.order=t})),i=!0};s.length?(t=s[0],t.selected=!0,a()):r.length?(t=r[0],t.selected=!1):n.length&&(a(),t=n[0]),t&&this.chartController.updateForPanelChange({updatedColState:t,resetOrder:i})}destroy(){this.valuePillSelect=void 0,this.valueSelect=void 0,super.destroy()}},nG=class extends sG{constructor(e,t,i,s,n){super(e,i,void 0,'<div id="categoriesGroup"></div>'),this.title=t,this.dimensionCols=s,this.isOpen=n}postConstruct(){this.groupComp=this.createBean(new tk({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.createGroup(this.dimensionCols,(e=>e.displayName??""),"categoryAdd","categorySelect",(()=>!this.chartController.getAggFunc())),this.createAggFuncControls(this.dimensionCols),this.getGui().appendChild(this.groupComp.getGui())}refresh(e){this.valuePillSelect?.setValues(e,e.filter((e=>
2e.selected))),this.refreshValueSelect(e),this.refreshAggFuncControls(e,this.chartController.getAggFunc())}createAggFuncControls(e){const t=this.chartController.getAggFunc();this.groupComp.addItem(this.aggFuncToggle=this.createBean(new Tl({label:this.chartTranslationService.translate("aggregate"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:void 0!=t,onValueChange:e=>{const t=e?"sum":void 0;this.chartController.setAggFunc(t),this.aggFuncSelect?.setValue(t,!0),this.aggFuncSelect?.setDisplayed(void 0!=t)}}))),this.groupComp.addItem(this.aggFuncSelect=this.createBean(new hr({options:[{value:"sum",text:this.chartTranslationService.translate("sum")},{value:"first",text:this.chartTranslationService.translate("first")},{value:"last",text:this.chartTranslationService.translate("last")},{value:"min",text:this.chartTranslationService.translate("min")},{value:"max",text:this.chartTranslationService.translate("max")},{value:"count",text:this.chartTranslationService.translate("count")},{value:"avg",text:this.chartTranslationService.translate("avg")}],value:"string"===typeof t?t:void 0,onValueChange:e=>{this.chartController.setAggFunc(e)}}))),this.refreshAggFuncControls(e,t)}refreshAggFuncControls(e,t){const i=e.filter((e=>e.selected)).some((e=>e.colId!==mO.DEFAULT_CATEGORY));this.aggFuncToggle?.setValue(void 0!=t),this.aggFuncSelect?.setValue("string"===typeof t?t:void 0,!0),this.aggFuncToggle?.setDisplayed(i),this.aggFuncSelect?.setDisplayed(i&&void 0!=t)}clearAggFuncControls(){this.aggFuncToggle=this.destroyBean(this.aggFuncToggle),this.aggFuncSelect=this.destroyBean(this.aggFuncSelect)}destroy(){this.clearAggFuncControls(),this.groupComp=this.destroyBean(this.groupComp),super.destroy()}},rG=class extends ze{constructor(e){super(),this.chartOptionsProxy=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}getDefaultColorPickerParams(e,t,i){return this.addValueParams(e,{label:this.chartTranslationService.translate(t??"color"),labelWidth:"flex",inputWidth:"flex",labelAlignment:"top",pickerGap:6},i)}getDefaultNumberInputParams(e,t,i){return this.addValueParams(e,{label:this.chartTranslationService.translate(t),labelAlignment:"top",labelWidth:"flex",inputWidth:"flex",precision:i?.precision,step:i?.step,min:i?.min,max:i?.max},{parseInputValue:e=>{const t=Number(e);return isNaN(t)?void 0:t},formatInputValue:e=>null==e?"":`${e}`})}getDefaultSliderParams(e,t,i,s){let n=this.chartOptionsProxy.getValue(e)??0;s&&Array.isArray(n)&&(n=n[0]);const r=this.getDefaultSliderParamsWithoutValueParams(n,t,i);return r.onValueChange=t=>this.chartOptionsProxy.setValue(e,s?[t]:t),r}getDefaultSliderParamsWithoutValueParams(e,t,i){return{label:this.chartTranslationService.translate(t),minValue:0,maxValue:Math.max(e,i),textFieldWidth:45,value:`${e}`}}getDefaultCheckboxParams(e,t,i){const s=this.chartOptionsProxy.getValue(e),n={label:this.chartTranslationService.translate(t),value:s,readOnly:i?.readOnly,passive:i?.passive};return n.onValueChange=t=>{this.chartOptionsProxy.setValue(e,"boolean"===typeof t?t:void 0)},n}getDefaultSelectParams(e,t,i){return this.getDefaultSelectParamsWithoutValueParams(t,i,this.chartOptionsProxy.getValue(e),(t=>{this.chartOptionsProxy.setValue(e,t)}))}getDefaultSelectParamsWithoutValueParams(e,t,i,s){return{label:this.chartTranslationService.translate(e),labelAlignment:"top",options:t,pickerGap:6,value:i,onValueChange:s}}getDefaultFontPanelParams(e,t){const i=t=>`${e}.${t}`;return this.addEnableParams(i("enabled"),{name:this.chartTranslationService.translate(t),suppressEnabledCheckbox:!1,chartMenuParamsFactory:this,keyMapper:i})}addValueParams(e,t,i){const s=this.chartOptionsProxy.getValue(e);return t.value=i?.formatInputValue?i.formatInputValue(s):s,t.onValueChange=t=>{const s=i?.parseInputValue?i.parseInputValue(t):t;this.chartOptionsProxy.setValue(e,s)},t}addEnableParams(e,t){return t.enabled=this.chartOptionsProxy.getValue(e)??!1,t.onEnableChange=t=>this.chartOptionsProxy.setValue(e,t),t}getChartOptions(){return this.chartOptionsProxy}},oG=class extends Rs{constructor(e,t){super(),this.chartMenuContext=e,this.isOpen=t,this.chartSpecificGroup=Is,this.hasContent=!1}wireBeans(e){this.chartTranslationService=e.chartTranslationService,this.chartService=e.chartService}
2postConstruct(){const e={title:this.getTitle(),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen,items:[...this.createDirectionSelect(),this.createGroupTypeSelect()]};this.setTemplate('\n            <div id="chartSpecificGroup">\n                <ag-group-component data-ref="chartSpecificGroup"></ag-group-component>\n            </div>',[nk],{chartSpecificGroup:e}),this.setDisplayed(this.hasContent)}refresh(){this.hasContent=!1,this.chartSpecificGroup.setTitle(this.getTitle()),this.updateDirectionSelect(),this.updateGroupTypeSelect(),this.setDisplayed(this.hasContent)}getTitle(){const e=this.chartMenuContext.chartController.getChartType();return this.chartTranslationService.translate(kN(e))}createDirectionSelect(){if(!this.chartService.isEnterprise())return[];const{chartOptionsService:e,chartController:t}=this.chartMenuContext,i=e.getSeriesOptionsProxy((()=>AN(t.getChartType()))),s=this.createManagedBean(new rG(i)),n=["horizontal","vertical"].map((e=>({value:e,text:this.chartTranslationService.translate(e)}))),r=s.getDefaultSelectParams("direction","direction",n),o=r.onValueChange;return r.onValueChange=e=>{o(e),t.raiseChartModelUpdateEvent()},this.directionSelect=this.createManagedBean(new hr(r)),this.updateDirectionSelect(),[this.directionSelect]}updateDirectionSelect(){const e=bN(AN(this.chartMenuContext.chartController.getChartType()),"canSwitchDirection");this.updateDisplayed(this.directionSelect,e)}createGroupTypeSelect(){const{chartController:e,chartMenuParamsFactory:t}=this.chartMenuContext;return this.groupTypeSelect=this.createManagedBean(new hr(t.getDefaultSelectParamsWithoutValueParams("seriesGroupType",Pc.SERIES_GROUP_TYPES.map((e=>({value:e,text:this.chartTranslationService.translate(`${e}SeriesGroupType`)}))),e.getSeriesGroupType(),(t=>e.setSeriesGroupType(t))))),this.updateGroupTypeSelect(),this.groupTypeSelect}updateGroupTypeSelect(){const e=["radialColumn","radialBar","nightingale"].includes(this.chartMenuContext.chartController.getChartType());this.updateDisplayed(this.groupTypeSelect,e)}updateDisplayed(e,t){e?.setDisplayed(t),e&&(this.hasContent=this.hasContent||t)}},aG=class extends Rs{constructor(e,t,i){super('<div id="seriesChartTypeGroup"></div>'),this.chartController=e,this.columns=t,this.isOpen=i,this.selectedColIds=[],this.chartTypeComps=new Map,this.secondaryAxisComps=new Map}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.createSeriesChartTypeGroup(this.columns)}refresh(e){we(this.getValidColIds(e),this.selectedColIds)?this.refreshComps():this.recreate(e)}recreate(e){this.isOpen=this.seriesChartTypeGroupComp.isExpanded(),rs(this.getGui()),this.destroyBean(this.seriesChartTypeGroupComp),this.columns=e,this.selectedColIds=[],this.clearComps(),this.postConstruct()}getValidColIds(e){const t=this.chartController.getSeriesChartTypes();return e.filter((e=>e.selected&&!!t.filter((t=>t.colId===e.colId))[0])).map((e=>{let{colId:t}=e;return t}))}createSeriesChartTypeGroup(e){this.seriesChartTypeGroupComp=this.createBean(new tk({title:this.chartTranslationService.translate("seriesChartType"),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen}));const t=this.chartController.getSeriesChartTypes();e.forEach((e=>{if(!e.selected)return;const i=t.filter((t=>t.colId===e.colId))[0];if(!i)return;this.selectedColIds.push(e.colId);const s=this.seriesChartTypeGroupComp.createManagedBean(new tk({title:e.displayName,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-format-sub-level"})),n=this.seriesChartTypeGroupComp.createManagedBean(new $s({label:this.chartTranslationService.translate("secondaryAxis"),labelWidth:"flex",disabled:(r=i.chartType,["groupedColumn","stackedColumn","stackedArea"].includes(r)),value:!!i.secondaryAxis,onValueChange:t=>this.chartController.updateSeriesChartType(e.colId,void 0,t)}));var r;s.addItem(n);const o=["line","area","stackedArea","groupedColumn","stackedColumn"].map((e=>({value:e,text:this.chartTranslationService.translate(kN(e))}))),a=s.createManagedBean(new hr({options:o,value:i.chartType,onValueChange:t=>this.chartController.updateSeriesChartType(e.colId,t)}));s.addItem(a),this.seriesChartTypeGroupComp.addItem(s),this.chartTypeComps.set(e.colId,a),this.secondaryAxisComps.set(e.colId,n)})),this.getGui().appendChild(this.seriesChartTypeGroupComp.getGui())}refreshComps(){const e=this.chartController.getSeriesChartTypes();this.selectedColIds.forEach((t=>{const i=e.find((e=>e.colId===t));if(!i)return;const s=this.chartTypeComps.get(t),n=this.secondaryAxisComps.get(t);s?.setValue(i.chartType),n?.setValue(!!i.secondaryAxis),n?.setDisabled(this.isSecondaryAxisDisabled(i.chartType))}))}clearComps(){this.chartTypeComps.clear(),this.secondaryAxisComps.clear()}isSecondaryAxisDisabled(e){return["groupedColumn","stackedColumn","stackedArea"].includes(e)}destroy(){this.clearComps(),this.seriesChartTypeGroupComp=this.destroyBean(this.seriesChartTypeGroupComp),super.destroy()}},lG=class extends sG{constructor(e,t,i,s,n,r,o){super(e,s,n,'<div id="seriesGroup"></div>'),this.chartOptionsService=t,this.title=i,this.valueCols=r,this.isOpen=o}postConstruct(){if(this.groupComp=this.createBean(new tk({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.chartController.isActiveXYChart()){const e=this.groupComp.createManagedBean(new Tl({label:this.chartTranslationService.translate("paired"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.chartOptionsService.getPairedMode(),onValueChange:e=>{this.chartOptionsService.setPairedMode(!!e),this.chartController.updateForGridChange({maintainColState:!0})}}));this.groupComp.addItem(e)}this.createGroup(this.valueCols,this.generateGetSeriesLabel(this.valueCols),"seriesAdd","seriesSelect"),this.getGui().appendChild(this.groupComp.getGui())}refresh(e){this.valuePillSelect?.setValueFormatter(this.generateGetSeriesLabel(e)),this.valuePillSelect?.setValues(e,e.filter((e=>e.selected))),this.refreshValueSelect(e)}generateGetSeriesLabel(e){if(!this.chartController.isActiveXYChart())return e=>e.displayName??"";const t=e.filter((e=>e.selected)),i="bubble"===this.chartController.getChartType(),s=this.chartOptionsService.getPairedMode(),n=new Map;return n.set(0,"X"),n.set(1,"Y"),n.set(2,"size"),e=>{const r=e.displayName??"";if(!e.selected)return r;const o=t.indexOf(e);if(-1===o)return r;let a;return a=s?n.get(o%(i?3:2)):0===o?"X":i&&o%2===0?"size":"Y",`${r} (${a})`}}destroy(){this.groupComp=this.destroyBean(this.groupComp),super.destroy()}},hG={groups:[{type:"categories",isOpen:!0},{type:"series",isOpen:!0},{type:"seriesChartType",isOpen:!0},{type:"chartSpecific",isOpen:!0}]},cG=class extends Rs{constructor(e){super('<div class="ag-chart-data-wrapper ag-scrollable-container"></div>'),this.chartMenuContext=e,this.isSwitchCategorySeriesToggled=!1,this.restoreSwitchCategorySeriesToggleFocus=!1,this.panels=[],this.chartController=e.chartController}wireBeans(e){this.chartTranslationService=e.chartTranslationService,this.chartService=e.chartService}postConstruct(){this.createSwitchCategorySeriesToggle(),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched(),this.updatePanels();const e=this.updatePanels.bind(this);this.addManagedListeners(this.chartController,{chartModelUpdate:e,chartApiUpdate:e})}destroy(){this.clearPanelComponents(),super.destroy()}updatePanels(){const e=this.chartType,t=this.isSwitchCategorySeriesToggled,{dimensionCols:i,valueCols:s}=this.chartController.getColStateForMenu();this.chartType=this.chartController.getChartType(),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched();const n=this.isSwitchCategorySeriesToggled!==t;this.canRefresh(e,this.chartType)&&!n?(this.categoriesDataPanel?.refresh(i),this.seriesDataPanel?.refresh(s),this.seriesChartTypePanel?.refresh(s),this.chartSpecificPanel?.refresh()):this.recreatePanels(i,s);const r=FN(this.chartType)&&this.chartService.isEnterprise()&&!this.chartController.isGrouping();Ki(this.switchCategorySeriesToggle.getGui(),r),n&&this.switchCategorySeriesToggle?.setValue(this.chartController.isCategorySeriesSwitched()),this.restoreSwitchCategorySeriesToggleFocus&&(this.restoreSwitchCategorySeriesToggleFocus=!1,r&&this.switchCategorySeriesToggle.getFocusableElement().focus())}canRefresh(e,t){if(void 0===e)return!1;if(e===t)return!0;const i=e=>["columnLineCombo","areaColumnCombo","customCombo"].includes(e);return!(!i(e)||!i(t))}recreatePanels(e,t){this.clearPanelComponents();const{chartType:i}=this;if(!i)return;const s=this.chartController.isCategorySeriesSwitched();this.getDataPanelDef().groups?.forEach((n=>{let{type:r,isOpen:o}=n;r===(s?"series":"categories")?(this.categoriesDataPanel=this.createBean(new nG(this.chartController,this.getCategoryGroupTitle(s),this.getCategoryGroupMultipleSelect(i,s),e,o)),this.panels.push(this.categoriesDataPanel)):r===(s?"categories":"series")?(this.seriesDataPanel=this.createBean(new lG(this.chartController,this.chartMenuContext.chartOptionsService,this.get
2SeriesGroupTitle(s),this.getSeriesGroupMultipleSelect(i,s),this.getSeriesGroupMaxSelection(i,s),t,o)),this.panels.push(this.seriesDataPanel)):"seriesChartType"===r?this.chartController.isComboChart()&&(this.seriesChartTypePanel=this.createBean(new aG(this.chartController,t,o)),this.panels.push(this.seriesChartTypePanel)):"chartSpecific"===r?(this.chartSpecificPanel=this.createBean(new oG(this.chartMenuContext,o)),this.panels.push(this.chartSpecificPanel)):h(`Invalid charts data panel group name supplied: '${r}'`)})),(s?this.categoriesDataPanel:this.seriesDataPanel)?.addItem(this.switchCategorySeriesToggle.getGui()),this.addPanelComponents()}addPanelComponents(){if(!this.panels.length)return;const e=j(this.gos).createDocumentFragment();for(const t of this.panels)t.addCssClass("ag-chart-data-section"),e.appendChild(t.getGui());this.getGui().appendChild(e)}clearPanelComponents(){const e=this.getGui();this.panels.forEach((t=>{e.removeChild(t.getGui()),this.destroyBean(t)})),this.panels=[]}getDataPanelDef(){return this.gos.get("chartToolPanelsDef")?.dataPanel??hG}getCategoryGroupTitle(e){return e?this.chartTranslationService.translate("seriesLabels"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"labels":"categories")}getCategoryGroupMultipleSelect(e,t){return!t&&1!==PN(e)}getSeriesGroupTitle(e){return e?this.chartTranslationService.translate("categoryValues"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"xyValues":"series")}getSeriesGroupMultipleSelect(e,t){return 1!==this.getSeriesGroupMaxSelection(e,t)}getSeriesGroupMaxSelection(e,t){if(!t)return LN(e)}createSwitchCategorySeriesToggle(){this.switchCategorySeriesToggle=this.createManagedBean(new Tl({label:this.chartTranslationService.translate("switchCategorySeries"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.chartController.isCategorySeriesSwitched(),onValueChange:e=>{this.restoreSwitchCategorySeriesToggleFocus=!0,this.chartController.switchCategorySeries(e)}}))}},dG=class extends Us{constructor(e){super(e,'<div class="ag-angle-select">\n            <div data-ref="eLabel"></div>\n            <div class="ag-wrapper ag-angle-select-wrapper">\n                <div class="ag-angle-select-field">\n                    <div data-ref="eParentCircle" class="ag-angle-select-parent-circle">\n                        <div data-ref="eChildCircle" class="ag-angle-select-child-circle"></div>\n                    </div>\n                </div>\n                <ag-input-number-field data-ref="eAngleValue"></ag-input-number-field>\n            </div>\n        </div>',[Cr]),this.eLabel=Is,this.eParentCircle=Is,this.eChildCircle=Is,this.eAngleValue=Is,this.radius=0,this.offsetX=0,this.offsetY=0}wireBeans(e){this.dragService=e.dragService}postConstruct(){super.postConstruct();const{value:e,onValueChange:t}=this.config;null!=e&&this.setValue(e,void 0,!0),null!=t&&this.onValueChange(t),this.dragListener={eElement:this.eParentCircle,dragStartPixels:0,onDragStart:()=>{this.parentCircleRect=this.eParentCircle.getBoundingClientRect()},onDragging:e=>this.calculateAngleDrag(e),onDragStop:()=>{}},this.dragService.addDragSource(this.dragListener),this.eAngleValue.setLabel("").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue(`${this.degrees}`).onValueChange((e=>{null!=e&&""!==e||(e="0"),e=this.eAngleValue.normalizeValue(e);let t=parseFloat(e);t>180&&(t-=360),this.setValue(t)})),this.updateNumberInput(),w(this.getValue())&&this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString()),this.addManagedListeners(this,{fieldValueChanged:()=>{this.eAngleValue.getInputElement().contains(K(this.gos))||this.updateNumberInput()}})}updateNumberInput(){const e=this.normalizeNegativeValue(this.getValue());this.eAngleValue.setValue(e.toString())}positionChildCircle(e){const t=this.parentCircleRect||{width:24,height:24},i=this.eChildCircle,s=t.width/2,n=t.height/2;i.style.left=`${s+8*Math.cos(e)}px`,i.style.top=`${n+8*Math.sin(e)}px`}calculatePolar(){const e=this.offsetX,t=this.offsetY,i=Math.atan2(t,e);this.degrees=this.toDegrees(i),this.radius=Math.sqrt(e*e+t*t),this.positionChildCircle(i)}calculateCartesian(){const e=this.toRadians(this.getValue()),t=this.getRadius();this.setOffsetX(Math.cos(e)*t).setOffsetY(Math.sin(e)*t)}setOffsetX(e){return this.offsetX!==e&&(this.offsetX=e,this.calculatePolar()),this}setOffsetY(e){return this.offsetY!==e&&(this.offsetY=e,this.calculatePolar()),this}calculateAngleDrag(e){const t=this.parentCircleRect,i=t.width/2,s=t.height/2,n=e.clientX-t.left-i,r=e.clientY-t.top-s,o=Math.atan2(r,n);this.setValue(o,!0)}toDegrees(e){return e/Math.PI*180}toRadians(e){return e/180*Math.PI}normalizeNegativeValue(e){return e<0?360+e:e}normalizeAngle180(e){return(e%=2*Math.PI)<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e}getRadius(){return this.radius}setRadius(e){return this.radius===e||(this.radius=e,this.calculateCartesian()),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>{e(this.degrees)}}),this}getValue(e){return e?this.toRadians(this.degrees):this.degrees}setValue(e,t,i){let s;return s=t?e:this.normalizeAngle180(this.toRadians(e)),e=this.toDegrees(s),this.degrees!==e&&(this.degrees=Math.floor(e),this.calculateCartesian(),this.positionChildCircle(s),i||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}setWidth(e){return gs(this.getGui(),e),this}setDisabled(e){return super.setDisabled(e),this.eAngleValue.setDisabled(e),this}destroy(){this.dragService.removeDragSource(this.dragListener),super.destroy()}},uG=class extends Rs{constructor(e){super(),this.params=e,this.fontGroup=Is,this.activeComps=[],this.chartOptions=e.chartMenuParamsFactory.getChartOptions()}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const{cssIdentifier:e="charts-format-sub-level",name:t,enabled:i,onEnableChange:s,suppressEnabledCheckbox:n,chartMenuParamsFactory:r,keyM
2apper:o}=this.params,a={cssIdentifier:e,direction:"vertical",suppressOpenCloseIcons:!0,title:t,enabled:i,suppressEnabledCheckbox:!0,onEnableChange:e=>{s&&s(e)},useToggle:!n};this.setTemplate('<div class="ag-font-panel">\n        <ag-group-component data-ref="fontGroup">\n            <ag-select data-ref="familySelect"></ag-select>\n            <ag-select data-ref="weightStyleSelect"></ag-select>\n            <div class="ag-charts-font-size-color">\n                <ag-select data-ref="sizeSelect"></ag-select>\n                <ag-color-picker data-ref="colorPicker"></ag-color-picker>\n            </div>\n        </ag-group-component>\n    </div>',[nk,cr,HN],{fontGroup:a,familySelect:this.getFamilySelectParams(),weightStyleSelect:this.getWeightStyleSelectParams(),sizeSelect:this.getSizeSelectParams(),colorPicker:r.getDefaultColorPickerParams(o("color"))}),this.addOrRemoveCssClass("ag-font-panel-no-header",!t)}addItem(e,t){t?this.fontGroup.prependItem(e):this.fontGroup.addItem(e),this.activeComps.push(e)}setEnabled(e){this.fontGroup.setEnabled(e)}getFamilySelectParams(){const e=["Arial, sans-serif","Aria Black, sans-serif","Book Antiqua,  serif","Charcoal, sans-serif","Comic Sans MS, cursive","Courier, monospace","Courier New, monospace","Gadget, sans-serif","Geneva, sans-serif","Helvetica, sans-serif","Impact, sans-serif","Lucida Console, monospace","Lucida Grande, sans-serif","Lucida Sans Unicode,  sans-serif","Monaco, monospace","Palatino Linotype, serif","Palatino, serif","Times New Roman, serif","Times, serif","Verdana, sans-serif"],t=this.getInitialFontValue("fontFamily");let i=e[0];if(t){const n=e.map((e=>e.toLowerCase())).indexOf(t.toLowerCase());if(n>=0)i=e[n];else{const n=(s=t)[0].toUpperCase()+s.substring(1).toLowerCase();e.push(n),i=n}}var s;const n=e.sort().map((e=>({value:e,text:e})));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("font",n,`${i}`,(e=>this.setFont({fontFamily:e})))}getSizeSelectParams(){const e=[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36],t=this.getInitialFontValue("fontSize");Ee(e,t)||e.push(t);const i=e.sort(((e,t)=>e-t)).map((e=>({value:`${e}`,text:`${e}`})));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("size",i,`${t}`,(e=>this.setFont({fontSize:parseInt(e,10)})))}getWeightStyleSelectParams(){const e=this.getInitialFontValue("fontWeight")??"normal",t=this.getInitialFontValue("fontStyle")??"normal",i=[{name:"normal",weight:"normal",style:"normal"},{name:"bold",weight:"bold",style:"normal"},{name:"italic",weight:"normal",style:"italic"},{name:"boldItalic",weight:"bold",style:"italic"}];let s=i.find((i=>i.weight===e&&i.style===t));s||(s={name:"predefined",weight:e,style:t},i.unshift(s));const n=i.map((e=>({value:e.name,text:this.chartTranslationService.translate(e.name)})));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("weight",n,s.name,(e=>{const t=i.find((t=>t.name===e));this.setFont({fontWeight:t.weight,fontStyle:t.style})}))}destroyActiveComps(){this.activeComps.forEach((e=>{os(e.getGui()),this.destroyBean(e)}))}destroy(){this.destroyActiveComps(),super.destroy()}setFont(e){const{keyMapper:t}=this.params;Object.entries(e).forEach((e=>{let[i,s]=e;s&&this.chartOptions.setValue(t(i),s)}))}getInitialFontValue(e){const{keyMapper:t}=this.params;return this.chartOptions.getValue(t(e))}},pG=class extends Rs{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const{chartMenuUtils:e}=this,t=e.addEnableParams("tick.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("ticks"),suppressEnabledCheckbox:!0,useToggle:!0}),i=e.getDefaultColorPickerParams("tick.stroke"),s=e.getDefaultSliderParams("tick.width","width",10),n=e.getDefaultSliderParams("tick.size","length",30);this.setTemplate('<div>\n            <ag-group-component data-ref="axisTicksGroup">\n                <ag-color-picker data-ref="axisTicksColorPicker"></ag-color-picker>\n                <ag-slider data-ref="axisTicksWidthSlider"></ag-slider>\n                <ag-slider data-ref="axisTicksSizeSlider"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,HN,_N],{axisTicksGroup:t,axisTicksColorPicker:i,axisTicksWidthSlider:s,axisTicksSizeSlider:n})}},gG=class extends Rs{constructor(e){super(),this.chartMenuUtils=e,this.chartOptions=e.getChartOptions()}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e=this.chartMenuUtils.addEnableParams("gridLine.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("gridLines"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.getGridLineColorPickerParams("color"),i=this.getGridLineWidthSliderParams("thickness"),s=this.getGridLineDashSliderParams("lineDash");this.setTemplate('<div>\n            <ag-group-component data-ref="gridLineGroup">\n                <ag-color-picker data-ref="gridLineColorPicker"></ag-color-picker>\n                <ag-slider data-ref="gridLineWidthSlider"></ag-slider>\n                <ag-slider data-ref="gridLineLineDashSlider"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,HN,_N],{gridLineGroup:e,gridLineColorPicker:t,gridLineWidthSlider:i,gridLineLineDashSlider:s})}getGridLineColorPickerParams(e){return this.chartMenuUtils.getDefaultColorPickerParams("gridLine.style",e,{formatInputValue:e=>e?.[0]?.stroke,parseInputValue:e=>{const t=this.chartOptions.getValue("gridLine.style")??[];return 0===t.length?[{stroke:e,lineDash:[]}]:[{...t[0],stroke:e}]}})}getGridLineWidthSliderParams(e){return this.chartMenuUtils.getDefaultSliderParams("gridLine.width",e,10)}getGridLineDashSliderParams(e){const t=this.chartOptions.getValue("gridLine.style"),i=t?.[0]?.lineDash?.[0],s=this.chartMenuUtils.getDefaultSliderParamsWithoutValueParams(i??0,e,30);return s.onValueChange=e=>{const t=this.chartOptions.getValue("gridLine.style.0.stroke");this.chartOptions.setValue("gridLine.style",[{lineDash:[e],stroke:t}])},s}},mG=class extends Rs{constructor(e,t){super(),this.axisType=e,this.options=t,this.axisGroup=Is,this.axisTypeSelect=Is,this.axisPositionSelect=Is,this.axisTimeFormatSelect=Is,this.activePanels=[],this.axisLabelUpdateFuncs=[];const{chartOptionsService:i,seriesType:s}=t;this.chartOptionsSeriesProxy=i.getSeriesOptionsProxy((()=>s))}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const{isExpandedOnInit:e,chartOptionsService:t,chartController:i,registerGroupComponent:s}=this.options,n=this.axisType,r={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate(n),expanded:e,suppressEnabledCheckbox:!0},o=t.getCartesianAxisOptionsProxy(this.axisType),a=this.createManagedBean(new rG(o)),l=this.createManagedBean(new rG(t.getCartesianAxisThemeOverridesProxy(this.axisType))),h=this.getAxisTypeSelectParams(a,t.getCartesianAxisAppliedThemeOverridesProxy(this.axisType)),c=this.getAxisPositionSelectParams(a),d=this.getAxisTimeFormatSelectParams(a),u=this.getAxisColorInputParams(l),p=this.getAxisLineWi
2dthSliderParams(l);this.setTemplate('<div>\n            <ag-group-component data-ref="axisGroup">\n                <ag-select data-ref="axisTypeSelect"></ag-select>\n                <ag-select data-ref="axisTimeFormatSelect"></ag-select>\n                <ag-select data-ref="axisPositionSelect"></ag-select>\n                <ag-color-picker data-ref="axisColorInput"></ag-color-picker>\n                <ag-slider data-ref="axisLineWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,cr,HN,_N],{axisGroup:r,axisTypeSelect:h??void 0,axisPositionSelect:c??void 0,axisTimeFormatSelect:d??void 0,axisColorInput:u,axisLineWidthSlider:p}),s(this.axisGroup),this.axisTypeSelect.setDisplayed(!!h.options?.length),c||this.removeTemplateComponent(this.axisPositionSelect);const g=()=>{const e="time"===o.getValue("type");Ki(this.axisTimeFormatSelect.getGui(),e)};d?(g(),this.addManagedEventListeners({chartOptionsChanged:()=>{g()}})):this.removeTemplateComponent(this.axisTimeFormatSelect),this.initGridLines(l),this.initAxisTicks(l),this.initAxisLabels(l);this.addManagedListeners(i,{chartUpdated:()=>this.axisLabelUpdateFuncs.forEach((e=>e())),chartModelUpdate:()=>setTimeout((()=>{this.isAlive()&&(this.refreshAxisTypeSelect(a),g())}))})}getAxisTypeSelectParams(e,t){const i=e.getChartOptions(),s=this.getAxisTypeSelectOptions(),n=e.getDefaultSelectParams("type","axisType",s);return n.onValueChange=e=>{const s=i.getValue("type");if(e===s)return;const n=t.getValue("*"),r="time"===e,o="time"===s!==r?r?"%d %B %Y":void 0:null;if(this.options.chartOptionsService.setCartesianCategoryAxisType(this.axisType,e),null!==o){const e=i.getValue("label")??{};i.setValue("label",{...e,format:o})}t.setValue("*",n)},n}refreshAxisTypeSelect(e){const t=this.getAxisTypeSelectOptions(),i=!!t.length;this.axisTypeSelect.setDisplayed(i),i&&this.axisTypeSelect.clearOptions().addOptions(t).setValue(e.getChartOptions().getValue("type"))}getAxisTypeSelectOptions(){const{chartController:e}=this.options,t=e.getChartType();return["heatmap","histogram","boxPlot","rangeBar","scatter","bubble"].includes(t)||e.isGrouping()||!this.isCategoryAxis()||e.isCategorySeriesSwitched()||!(()=>{const t=e.getChartData()[0];return!!t&&e.getSelectedDimensions().every((e=>!isNaN(parseFloat(t[e.colId]))))})()?[]:["category","number","time"].map((e=>({value:e,text:this.translate(e)})))}isCategoryAxis(){const e="horizontal"===this.chartOptionsSeriesProxy.getValue("direction");return e&&"yAxis"===this.axisType||!e&&"xAxis"===this.axisType}getAxisPositionSelectParams(e){const t=((e,t)=>{if("heatmap"===e)return null;switch(t){case"xAxis":return[{value:"top",text:this.translate("top")},{value:"bottom",text:this.translate("bottom")}];case"yAxis":return[{value:"left",text:this.translate("left")},{value:"right",text:this.translate("right")}]}})(this.options.chartController.getChartType(),this.axisType);return t?e.getDefaultSelectParams("position","position",t):null}getAxisTimeFormatSelectParams(e){if(!this.isCategoryAxis())return null;const t=[{value:"%d/%m/%Y",text:this.translate("timeFormatSlashesDDMMYYYY")},{value:"%m/%d/%Y",text:this.translate("timeFormatSlashesMMDDYYYY")},{value:"%d/%m/%y",text:this.translate("timeFormatSlashesDDMMYY")},{value:"%m/%d/%y",text:this.translate("timeFormatSlashesMMDDYY")},{value:"%d.%e.%y",text:this.translate("timeFormatDotsDDMYY")},{value:"%e.%d.%y",text:this.translate("timeFormatDotsMDDYY")},{value:"%Y-%m-%d",text:this.translate("timeFormatDashesYYYYMMDD")},{value:"%d %B %Y",text:this.translate("timeFormatSpacesDDMMMMYYYY")},{value:"%H:%M:%S",text:this.translate("timeFormatHHMMSS")},{value:"%I:%M:%S %p",text:this.translate("timeFormatHHMMSSAmPm")}];return e.getDefaultSelectParams("label.format","timeFormat",t)}getAxisColorInputParams(e){return e.getDefaultColorPickerParams("line.stroke")}getAxisLineWidthSliderParams(e){const t=e.getChartOptions(),i=e.getDefaultSliderParamsWithoutValueParams((t.getValue("line.enabled")?t.getValue("line.width"):null)??0,"thickness",10);return i.onValueChange=e=>{var i;i=0===e?null:e,t.setValues([{expression:"line.enabled",value:null!=i},{expression:"line.width",value:i??0}])},i}initGridLines(e){if("heatmap"===this.options.chartController.getChartType())return;const t=this.createBean(new gG(e));this.axisGroup.addItem(t),this.activePanels.push(t)}initAxisTicks(e){if(!this.hasConfigurableAxisTicks())return;const t=this.createBean(new pG(e));this.axisGroup.addItem(t),this.activePanels.push(t)}hasConfigurableAxisTicks(){switch(this.options.chartController.getChartType()){case"radarLine":case"radarArea":case"rangeBar":case"boxPlot":case"waterfall":return!1;default:return!0}}initAxisLabels(e){const t={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:e,keyMapper:e=>`label.${e}`},i=this.createBean(new uG(t));this.axisGroup.addItem(i),this.activePanels.push(i),this.addAdditionalLabelComps(i,e)}addAdditionalLabelComps(e,t){this.addLabelPadding(e,t);const i=this.createRotationWidget("labelRotation",t),s=this.initLabelRotation(i,t);e.addItem(s),e.addItem(i)}initLabelRotation(e,t){const i=t.getChartOptions(),s=()=>i.getValue("label.rotation"),n="number"!==typeof s()&&i.getValue("label.autoRotate"),r=this.createBean(new $s({label:this.translate("autoRotate"),value:n,onValueChange:t=>{t&&(this.prevRotation=s()),i.setValues([{expression:"label.autoRotate",value:t},{expression:"label.rotation",value:t?void 0:this.prevRotation}]),e.setDisplayed(!t)}}));return e.setDisplayed(!n),r}createRotationWidget(e,t){const i=t.getChartOptions(),s=()=>i.getValue("label.rotation"),n=String.fromCharCode(176),r=`${this.chartTranslationService.translate(e)} ${n}`,o=new dG({label:r,labelWidth:"flex",value:s()??0,onValueChange:e=>i.setValue("label.rotation",e)});return this.axisLabelUpdateFuncs.push((()=>{o.setValue(s()??0)})),this.createBean(o)}addLabelPadding(e,t){const i=this.createBean(new UN(t.getDefaultSliderParams("label.padding","padding",3
20)));e.addItem(i)}translate(e){return this.chartTranslationService.translate(e)}removeTemplateComponent(e){os(e.getGui()),this.destroyBean(e)}destroyActivePanels(){this.activePanels.forEach((e=>{os(e.getGui()),this.destroyBean(e)}))}destroy(){this.destroyActivePanels(),super.destroy()}},fG=class extends Rs{constructor(e){super(),this.options=e,this.axisGroup=Is}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const{isExpandedOnInit:e,chartAxisMenuParamsFactory:t,registerGroupComponent:i}=this.options,s={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("polarAxis"),expanded:e,suppressEnabledCheckbox:!0},n=t.getDefaultColorPickerParams("line.stroke"),r=t.getDefaultSliderParams("line.width","thickness",10);this.setTemplate('<div>\n            <ag-group-component data-ref="axisGroup">\n                <ag-color-picker data-ref="axisColorInput"></ag-color-picker>\n                <ag-slider data-ref="axisLineWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,HN,_N],{axisGroup:s,axisColorInput:n,axisLineWidthSlider:r}),i(this.axisGroup),this.initAxis(),this.initAxisLabels(),this.initRadiusAxis()}initAxis(){const e=this.options.chartController.getChartType();if(["radarLine","radarArea"].includes(e)){const e=[{value:"circle",text:this.translate("circle")},{value:"polygon",text:this.translate("polygon")}];this.axisGroup.addItem(this.createSelect({labelKey:"shape",options:e,property:"shape"}))}"pie"!==e&&this.axisGroup.addItem(this.createSlider({labelKey:"innerRadius",defaultMaxValue:1,property:"innerRadiusRatio"}))}initAxisLabels(){const e={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:this.options.chartAxisMenuParamsFactory,keyMapper:e=>`label.${e}`},t=this.createManagedBean(new uG(e)),i=this.createOrientationWidget();t.addItem(i),this.axisGroup.addItem(t)}createOrientationWidget(){const e=[{value:"fixed",text:this.translate("fixed")},{value:"parallel",text:this.translate("parallel")},{value:"perpendicular",text:this.translate("perpendicular")}];return this.createSelect({labelKey:"orientation",options:e,property:"label.orientation"})}initRadiusAxis(){const e=AN(this.options.chartController.getChartType());if(!bN(e,"isRadial"))return;const t=[this.createSlider({labelKey:"groupPadding",defaultMaxValue:1,property:"paddingInner"}),this.createSlider({labelKey:"seriesPadding",defaultMaxValue:1,property:"groupPaddingInner"})],i=this.createManagedBean(new tk({cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,enabled:!0,suppressEnabledCheckbox:!0,title:this.translate("padding"),items:t})).hideEnabledCheckbox(!0).hideOpenCloseIcons(!0);this.axisGroup.addItem(i)}createSlider(e){const{labelKey:t,defaultMaxValue:i,step:s=.05,property:n}=e,r=this.options.chartAxisMenuParamsFactory.getDefaultSliderParams(n,t,i);return r.step=s,this.createManagedBean(new UN(r))}createSelect(e){const{labelKey:t,options:i,property:s}=e;return this.createManagedBean(new hr(this.options.chartAxisMenuParamsFactory.getDefaultSelectParams(s,t,i)))}translate(e){return this.chartTranslationService.translate(e)}},vG=class extends Rs{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e=this.chartMenuUtils.addEnableParams("background.visible",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("background"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuUtils.getDefaultColorPickerParams("background.fill");this.setTemplate('<div>\n            <ag-group-component data-ref="chartBackgroundGroup">\n                <ag-color-picker data-ref="colorPicker"></ag-color-picker>\n            </ag-group-component>\n        <div>',[nk,HN],{chartBackgroundGroup:e,colorPicker:t})}},yG=class extends Rs{constructor(e,t){super(),this.chartMenuUtils=e,this.chartController=t,this.paddingTopSlider=Is}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("padding"),suppressEnabledCheckbox:!0},t=e=>this.chartMenuUtils.getDefaultSliderParams("padding."+e,e,200);this.setTemplate('<div>\n            <ag-group-component data-ref="chartPaddingGroup">\n                <ag-slider data-ref="paddingTopSlider"></ag-slider>\n                <ag-slider data-ref="paddingRightSlider"></ag-slider>\n                <ag-slider data-ref="paddingBottomSlider"></ag-slider>\n                <ag-slider data-ref="paddingLeftSlider"></ag-slider>\n            </ag-group-component>\n        <div>',[nk,_N],{chartPaddingGroup:e,paddingTopSlider:t("top"),paddingRightSlider:t("right"),paddingBottomSlider:t("bottom"),paddingLeftSlider:t("left")}),this.addManagedEventListeners({chartOptionsChanged:e=>{this.updateTopPadding(e.chartOptions)}})}updateTopPadding(e){const t=[...this.chartController.getChartSeriesTypes(),"common"].map((t=>e[t]?.padding?.top)).find((e=>null!=e));null!=t&&this.paddingTopSlider.setValue(`${t}`)}},CG=class extends Rs{constructor(e){super(),this.options=e,this.chartGroup=Is}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const{chartController:e,chartMenuParamsFactory:t,isExpandedOnInit:i,registerGroupComponent:s}=this.options,n={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("chartStyle"),expanded:i,suppressEnabledCheckbox:!0,items:[this.createManagedBean(new yG(t,e)),this.createManagedBean(new vG(t))]};this.setTemplate('<div>\n            <ag-group-component data-ref="chartGroup"></ag-group-component>\n        </div>',[nk],{chartGroup:n}),s(this.chartGroup)}},SG=class extends ze{constructor(e){super(),this.groupContainer=e,this.id=0,this.groupComponents=new Map}addGroupComponent(e){const t=this.id++;this.groupComponents.set(t,e),e.isExpanded()&&(this.expandedGroupComponent=t),e.onExpandedChange((i=>{if(i){const i=this.expandedGroupComponent;if(this.expandedGroupComponent=t,null!=i){const t=e.getGui(),s=t.offsetTop-this.groupContainer.parentElement.scrollTop;this.groupComponents.get(i)?.toggleGroupExpand(!1,!0);let n=t.offsetTop-s;n<0&&(n=0),n!==this.groupContainer.parentElement.scrollTop&&(this.groupContainer.parentElement.scrollTop=n)}}else this.expandedGroupComponent=void 0}))}destroy(){this.groupComponents.clear(),super.destroy()}},wG=class extends Rs{constructor(e){super(),this.options=e,this.legendGroup=Is,this.isGradient=["treemap","sunburst","heatmap"].includes(e.seriesType),this.key=this.isGradient?"gradientLegend":"legend"}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const{chartMenuParamsFactory:e,isExpandedOnInit:t,registerGroupComponent:i}=this.options,s=this.createManagedBean(new hr(e.getDefaultSelectParams(`${this.key}.position`,"position",["top","right","bottom","left"].map((e=>({value:e,text:this.chartTranslationService.translate(e)}
vendor: 4,796 bytes, line 2
2)))))),n=this.createManagedBean(new tk(e.addEnableParams(`${this.key}.enabled`,{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("legendEnabled"),suppressEnabledCheckbox:!0,useToggle:!0,items:[this.createLabelPanel(e),s,...this.getItems(e)]}))),r={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("legend"),suppressEnabledCheckbox:!0,expanded:t,items:[n]};this.setTemplate('<div>\n            <ag-group-component data-ref="legendGroup">\n            </ag-group-component>\n        </div>',[nk],{legendGroup:r}),i(this.legendGroup)}getItems(e){const t=(t,i,s)=>this.createManagedBean(new UN(e.getDefaultSliderParams(`${this.key}.${t}`,i,s)));return this.isGradient?[this.createManagedBean(new $s(e.addValueParams("gradientLegend.reverseOrder",{label:this.chartTranslationService.translate("reverseDirection"),labelWidth:"flex"}))),t("gradient.thickness","thickness",40),t("gradient.preferredLength","preferredLength",300),t("spacing","spacing",200)]:[t("spacing","spacing",200),t("item.marker.size","markerSize",40),t("item.marker.strokeWidth","markerStroke",10),t("item.marker.padding","itemSpacing",20),t("item.paddingX","layoutHorizontalSpacing",50),t("item.paddingY","layoutVerticalSpacing",50)]}createLabelPanel(e){const t=this.isGradient?"gradientLegend.scale.label":"legend.item.label",i={enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:e,keyMapper:e=>`${t}.${e}`,cssIdentifier:"charts-format-sub-level-no-header"};return this.createManagedBean(new uG(i))}},bG=class extends Rs{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("callout"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate('<div>\n            <ag-group-component data-ref="calloutGroup">\n                <ag-slider data-ref="calloutLengthSlider"></ag-slider>\n                <ag-slider data-ref="calloutStrokeWidthSlider"></ag-slider>\n                <ag-slider data-ref="labelOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,_N],{calloutGroup:e,calloutLengthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.length","length",40),calloutStrokeWidthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.strokeWidth","strokeWidth",10),labelOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLabel.offset","offset",30)})}},xG=class extends Rs{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("cap"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0},t=this.chartMenuUtils.getDefaultSliderParams("cap.lengthRatio","capLengthRatio",1);t.step=.05,this.setTemplate('<div>\n            <ag-group-component data-ref="capsGroup">\n                <ag-slider data-ref="capLengthRatioSlider"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,_N],{capsGroup:e,capLengthRatioSlider:t})}},MG=class extends Rs{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("connectorLine"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate('<div>\n            <ag-group-component data-ref="lineGroup">\n                <ag-color-picker data-ref="lineColorPicker"></ag-color-picker>\n                <ag-slider data-ref="lineStrokeWidthSlider"></ag-slider>\n                <ag-slider data-ref="lineOpacitySlider"></ag-slider>\n                <ag-slider data-ref="lineDashSlider"></ag-slider>                \n            </ag-group-component>\n        </div>',[nk,HN,_N],{lineGroup:e,lineColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("line.stroke"),lineStrokeWidthSlider:this.getSliderParams("strokeWidth",10,"line.strokeWidth"),lineDashSlider:this.getSliderParams("lineDash",30,"line.lineDash",1,!0),lineOpacitySlider:this.getSliderParams("strokeOpacity",1,"line.strokeOpacity",.05)})}getSliderParams(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const r=this.chartMenuUtils.getDefaultSliderParams(i,e,t,n);return r.step=s,r}};function DG(e){return["square","circle","cross","diamond","plus","triangle","heart"].map((t=>({value:t,text:e.translate(t)}
2)))}var IG=class extends Rs{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e=this.chartMenuUtils.addEnableParams("marker.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("markers"),suppressEnabledCheckbox:!0,useToggle:!0,suppressOpenCloseIcons:!0});this.setTemplate('<div>\n            <ag-group-component data-ref="seriesMarkersGroup">\n                <ag-select data-ref="seriesMarkerShapeSelect"></ag-select>\n                <ag-slider data-ref="seriesMarkerSizeSlider"></ag-slider>\n                <ag-slider data-ref="seriesMarkerStrokeWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,cr,_N],{seriesMarkersGroup:e,seriesMarkerShapeSelect:this.chartMenuUtils.getDefaultSelectParams("marker.shape","shape",DG(this.chartTranslationService)),seriesMarkerSizeSlider:this.chartMenuUtils.getDefaultSliderParams("marker.size","size",60),seriesMarkerStrokeWidthSlider:this.chartMenuUtils.getDefaultSliderParams("marker.strokeWidth","strokeWidth",10)})}},RG=class extends Rs{constructor(e){super(),this.chartMenuUtils=e,this.seriesItemsGroup=Is,this.activePanels=[]}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("seriesItems"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate('<div>\n            <ag-group-component data-ref="seriesItemsGroup">\n                <ag-select data-ref="seriesItemSelect"></ag-select>\n            </ag-group-component>\n        </div>',[nk,cr],{seriesItemsGroup:e,seriesItemSelect:this.getSeriesItemsParams()}),this.initSeriesControls()}getSeriesItemsParams(){const e=[{value:"positive",text:this.chartTranslationService.translate("seriesItemPositive")},{value:"negative",text:this.chartTranslationService.translate("seriesItemNegative")}];return this.chartMenuUtils.getDefaultSelectParamsWithoutValueParams("seriesItemType",e,"positive",(e=>{this.destroyActivePanels(),this.initSeriesControls(e)}))}initSeriesControls(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"positive";this.initSlider("strokeWidth",10,`item.${e}.strokeWidth`),this.initSlider("lineDash",30,`item.${e}.lineDash`,1,!0),this.initSlider("strokeOpacity",1,`item.${e}.strokeOpacity`,.05,!1),this.initSlider("fillOpacity",1,`item.${e}.fillOpacity`,.05,!1),this.initItemLabels(e)}initSlider(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const r=this.chartMenuUtils.getDefaultSliderParams(i,e,t,n);r.step=s;const o=this.seriesItemsGroup.createManagedBean(new UN(r));this.seriesItemsGroup.addItem(o),this.activePanels.push(o)}initItemLabels(e){const t=this.chartMenuUtils.getDefaultFontPanelParams(`item.${e}.label`,"seriesItemLabels"),i=this.createBean(new uG(t));this.seriesItemsGroup.addItem(i),this.activePanels.push(i)}destroyActivePanels(){this.activePanels.forEach((e=>{os(e.getGui()),this.destroyBean(e)}))}destroy(){this.destroyActivePanels(),super.destroy()}},EG=class extends Rs{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"shadow";super(),this.chartMenuUtils=e,this.propertyKey=t}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e=this.propertyKey,t=this.chartMenuUtils.addEnableParams(`${e}.enabled`,{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("shadow"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuUtils.getDefaultColorPickerParams(`${e}.color`);this.setTemplate('<div>\n            <ag-group-component data-ref="shadowGroup">\n                <ag-color-picker data-ref="shadowColorPicker"></ag-color-picker>\n                <ag-slider data-ref="shadowBlurSlider"></ag-slider>\n                <ag-slider data-ref="shadowXOffsetSlider"></ag-slider>\n                <ag-slider data-ref="shadowYOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,HN,_N],{shadowGroup:t,shadowColorPicker:i,shadowBlurSlider:this.getSliderParams("blur",0,20),shadowXOffsetSlider:this.getSliderParams("xOffset",-10,10),shadowYOffsetSlider:this.getSliderParams("yOffset",-10,10)})}getSliderParams(e,t,i){const s=`${this.propertyKey}.${e}`,n=this.chartMenuUtils.getDefaultSliderParams(s,e,i);return n.minValue=t,n}},AG=class extends Rs{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e={cssIdentifier:"charts-format-sub-level",direction:"vertical",enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate('<div>\n            <ag-group-component data-ref="groupSpacing">\n                <ag-slider data-ref="groupPaddingSlider"></ag-slider>\n                <ag-slider data-ref="groupSpacingSlider"></ag-slider>\n            </ag-group-component>\n            <ag-group-component data-ref="tileSpacing">\n                <ag-slider data-ref="tilePaddingSlider"></ag-slider>\n                <ag-slider data-ref="tileSpacingSlider"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,_N],{groupSpacing:{...e,title:this.chartTranslationService.translate("group")},tileSpacing:{...e,title:this.chartTranslationService.translate("tile")},groupPaddingSlider:this.getSliderParams("padding","group.padding"),groupSpacingSlider:this.getSliderParams("spacing","group.gap"),tilePaddingSlider:this.getSliderParams("padding","tile.padding"),tileSpacingSlider:this.getSliderParams("spacing","t
2ile.gap")})}getSliderParams(e,t){return this.chartMenuUtils.getDefaultSliderParams(t,e,10)}},TG=class extends Rs{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("whisker"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate('<div>\n            <ag-group-component data-ref="whiskersGroup">\n                <ag-color-picker data-ref="whiskerColorPicker"></ag-color-picker>\n                <ag-slider data-ref="whiskerThicknessSlider"></ag-slider>\n                <ag-slider data-ref="whiskerOpacitySlider"></ag-slider>\n                <ag-slider data-ref="whiskerLineDashSlider"></ag-slider>\n                <ag-slider data-ref="whiskerLineDashOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',[nk,HN,_N],{whiskersGroup:e,whiskerColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("whisker.stroke"),whiskerThicknessSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeWidth","strokeWidth",10),whiskerOpacitySlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeOpacity","strokeOpacity",1),whiskerLineDashSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDash","lineDash",30,!0),whiskerLineDashOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDashOffset","lineDashOffset",30)})}},PG="tooltips",LG="strokeWidth",FG="lineDash",kG="lineOpacity",NG="fillOpacity",OG="labels",GG="shadow",BG=class extends Rs{constructor(e){super(),this.options=e,this.seriesGroup=Is,this.activePanels=[],this.widgetFuncs={lineWidth:()=>this.initStrokeWidth("lineWidth"),[LG]:()=>this.initStrokeWidth("strokeWidth"),lineColor:()=>this.initLineColor(),[FG]:()=>this.initLineDash(),[kG]:()=>this.initOpacity("strokeOpacity"),[NG]:()=>this.initOpacity("fillOpacity"),markers:()=>new IG(this.chartMenuUtils),[OG]:()=>this.initLabels(),sectorLabels:()=>this.initSectorLabels(),[GG]:()=>new EG(this.chartMenuUtils),[PG]:()=>this.initTooltips(),bins:()=>this.initBins(),whiskers:()=>new TG(this.chartMenuUtils),caps:()=>new xG(this.chartMenuUtils),connectorLine:()=>new MG(this.chartMenuUtils),seriesItems:()=>new RG(this.chartMenuUtils),tileSpacing:()=>new AG(this.chartMenuUtils),shape:()=>this.initShape(),size:()=>this.initSize("size","size"),minSize:()=>this.initSize("size","minSize"),maxSize:()=>this.initSize("maxSize","maxSize")},this.seriesWidgetMappings={bar:[PG,LG,FG,kG,NG,OG,GG],pie:[PG,LG,kG,NG,OG,"sectorLabels",GG],donut:[PG,LG,kG,NG,OG,"sectorLabels",GG],line:[PG,"lineWidth",FG,kG,"markers",OG],scatter:[PG,"shape","size",LG,OG],bubble:[PG,"shape","minSize","maxSize",LG,OG],area:[PG,"lineWidth",FG,kG,NG,"markers",OG,GG],histogram:[PG,"bins",LG,FG,kG,NG,OG,GG],"radial-column":[PG,LG,FG,kG,NG,OG],"radial-bar":[PG,LG,FG,kG,NG,OG],"radar-line":[PG,LG,FG,kG,"markers",OG],"radar-area":[PG,LG,FG,kG,NG,"markers",OG],nightingale:[PG,LG,FG,kG,NG,OG],"box-plot":[PG,LG,FG,kG,NG,"whiskers","caps"],"range-bar":[PG,LG,FG,kG,NG,OG],"range-area":[PG,"lineWidth",FG,kG,NG,"markers",OG,GG],treemap:[PG,"tileSpacing"],sunburst:[PG],heatmap:[PG,OG,"lineColor","lineWidth",kG],waterfall:[PG,"connectorLine","seriesItems"]},this.seriesType=e.seriesType}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const{isExpandedOnInit:e,chartOptionsService:t,chartController:i,registerGroupComponent:s}=this.options,n={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("series"),expanded:e,suppressEnabledCheckbox:!0};this.setTemplate('<div>\n            <ag-group-component data-ref="seriesGroup">\n            </ag-group-component>\n        </div>',[nk],{seriesGroup:n}),s(this.seriesGroup),this.chartMenuUtils=this.createManagedBean(new rG(t.getSeriesOptionsProxy((()=>this.seriesType)))),this.addManagedListeners(i,{chartSeriesChartTypeChanged:this.refreshWidgets.bind(this)}),this.refreshWidgets()}refreshWidgets(){const{chartController:e}=this.options;this.destroyActivePanels();e.getChartProxy().getChart().waitForUpdate().then((()=>{!this.isAlive()||(e.isComboChart()&&(this.updateSeriesType(),this.initSeriesSelect()),(this.seriesWidgetMappings[this.seriesType]??[]).forEac
vendor: 6,918 bytes, line 2
2h((e=>{const t=this.widgetFuncs[e]();let i;if(Array.isArray(t)){const e=this.createBean(t[0]);i=e,t[1](e)}else i=this.createBean(t);this.seriesGroup.addItem(i),this.activePanels.push(i)})))})).catch((e=>c("chart rendering failed",e)))}initSeriesSelect(){const e=this.createBean(new hr(this.chartMenuUtils.getDefaultSelectParamsWithoutValueParams("seriesType",this.getSeriesSelectOptions(),`${this.seriesType}`,(e=>{this.seriesType=e,this.refreshWidgets()}))));this.seriesGroup.addItem(e),this.activePanels.push(e)}initTooltips(){return new Tl(this.chartMenuUtils.addValueParams("tooltip.enabled",{label:this.translate("tooltips"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex"}))}initLineColor(){return new zN(this.chartMenuUtils.getDefaultColorPickerParams("stroke","strokeColor"))}initStrokeWidth(e){return new UN(this.chartMenuUtils.getDefaultSliderParams("strokeWidth",e,10))}initLineDash(){return new UN(this.chartMenuUtils.getDefaultSliderParams("lineDash","lineDash",30,!0))}initOpacity(e){const t=this.chartMenuUtils.getDefaultSliderParams(e,e,1);return t.step=.05,new UN(t)}initLabels(){const e=TN(this.seriesType),t=e?"calloutLabel":"label",i=e?"calloutLabels":"labels",s=this.chartMenuUtils.getDefaultFontPanelParams(t,i);return[new uG(s),t=>{if(e){const e=t.createManagedBean(new bG(this.chartMenuUtils));t.addItem(e),this.activePanels.push(e)}if("range-bar"===this.seriesType){const e=[{value:"inside",text:this.translate("inside")},{value:"outside",text:this.translate("outside")}],i=t.createManagedBean(new hr(this.chartMenuUtils.getDefaultSelectParams("label.placement","labelPlacement",e)));t.addItem(i),this.activePanels.push(i);const s=t.createManagedBean(new UN(this.chartMenuUtils.getDefaultSliderParams("label.padding","padding",200)));t.addItem(s),this.activePanels.push(s)}}]}initSectorLabels(){const e=this.chartMenuUtils.getDefaultFontPanelParams("sectorLabel","sectorLabels");return[new uG(e),e=>{const t=this.chartMenuUtils.getDefaultSliderParams("sectorLabel.positionRatio","positionRatio",1);t.step=.05;const i=e.createManagedBean(new UN(t));e.addItem(i)}]}initBins(){const e=this.chartMenuUtils.getDefaultSliderParams("binCount","histogramBinCount",20),t=this.chartMenuUtils.getChartOptions(),i=(t.getValue("bins")??t.getValue("calculatedBins",!0)).length;return e.value=`${i}`,e.maxValue=Math.max(i,20),new UN(e)}initShape(){return new hr(this.chartMenuUtils.getDefaultSelectParams("shape","shape",DG(this.chartTranslationService)))}initSize(e,t){return new UN(this.chartMenuUtils.getDefaultSliderParams(e,t,60))}getSeriesSelectOptions(){const e=this.getActiveSeriesTypes();return["area","bar","line"].filter((t=>e.includes(t))).map((e=>({value:e,text:this.translate(e)})))}updateSeriesType(){const e=this.getActiveSeriesTypes();!e.includes(this.seriesType)&&e.length>0&&(this.seriesType=e[0])}getActiveSeriesTypes(){return this.options.chartController.getActiveSeriesChartTypes().map((e=>AN(e.chartType)))}translate(e){return this.chartTranslationService.translate(e)}destroyActivePanels(){this.activePanels.forEach((e=>{os(e.getGui()),this.destroyBean(e)}))}destroy(){this.destroyActivePanels(),super.destroy()}},VG=class extends Rs{constructor(e,t,i){super("<div></div>"),this.chartMenuUtils=e,this.name=t,this.key=i,this.chartOptions=e.getChartOptions()}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.initFontPanel()}hasTitle(){const e=this.chartOptions.getValue(this.key);return e&&e.enabled&&e.text&&e.text.length>0}initFontPanel(){const e=this.hasTitle(),t={name:this.chartTranslationService.translate(this.name),enabled:e,suppressEnabledCheckbox:!1,chartMenuParamsFactory:this.chartMenuUtils,keyMapper:e=>`${this.key}.${e}`,onEnableChange:e=>this.onEnableChange(e)};this.fontPanel=this.createManagedBean(new uG(t)),this.fontPanel.addItem(this.createBean(new fr(this.getTextInputParams())),!0),this.fontPanel.addItem(this.createBean(new UN(this.getSpacingSliderParams()))),this.getGui().appendChild(this.fontPanel.getGui())}getTextInputParams(){return this.chartMenuUtils.addValueParams(`${this.key}.text`,{label:this.chartTranslationService.translate("title"),labelAlignment:"top"})}getSpacingSliderParams(){return this.chartMenuUtils.getDefaultSliderParams(`${this.key}.spacing`,"spacing",100)}onEnableChange(e){this.chartOptions.setValue(`${this.key}.enabled`,e)}},zG=class extends VG{wireBeans(e){super.wireBeans(e),this.chartMenuService=e.chartMenuService}postConstruct(){this.titlePlaceholder=this.chartTranslationService.translate("titlePlaceholder"),super.postConstruct(),this.addManagedEventListeners({chartTitleEdit:()=>{this.fontPanel.setEnabled(this.hasTitle())}})}getTextInputParams(){const e=super.getTextInputParams();return this.shouldOverrideTextWithPlaceholder(e.value)&&(e.value=this.titlePlaceholder),e}getSpacingSliderParams(){const e=super.getSpacingSliderParams();return e.value="10",e}onEnableChange(e){if(this.chartMenuService.doesChartToolbarExist()){const t=this.chartOptions.getValue("padding.top");this.chartOptions.setValue("padding.top",e?t-20:t+20)}this.chartOptions.setValue(`${this.key}.enabled`,e);const t=this.chartOptions.getValue(`${this.key}.text`);e&&this.shouldOverrideTextWithPlaceholder(t)&&this.chartOptions.setValue(`${this.key}.text`,this.titlePlaceholder)}shouldOverrideTextWithPlaceholder(e){return"Title"===e||0===e?.trim().length}},HG=class extends Rs{constructor(e){super(),this.options=e,this.titleGroup=Is}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){const{chartMenuParamsFactory:e,chartAxisMenuParamsFactory:t,chartOptionsService:i,seriesType:s,isExpandedOnInit:n=!1,registerGroupComponent:r}=this.options,o=[];if(MN(s)){const e=e=>this.createManagedBean(new rG(i.getCartesianAxisThemeOverridesProxy(e)));o.push(this.createManagedBean(new VG(e("xAxis"),"horizontalAxisTitle","title"))),o.push(this.createManagedBean(new VG(e("yAxis"),"verticalAxisTitle","title")))}else DN(s)&&o.push(this.createManagedBean(new VG(t,"polarAxisTitle","title")));const a={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("chartTitles"),expanded:n,suppressEnabledCheckbox:!0,items:[this.createManagedBean(new zG(e,"chartTitle","title")),this.createManagedBean(new VG(e,"chartSubtitle","subtitle")),...o]};this.setTemplate('<div>\n            <ag-group-component data-ref="titleGroup"></ag-group-component>\n        </div>',[nk],{titleGroup:a}),r(this.titleGroup)}},WG={groups:[{type:"chart"},{type:"titles"},{type:"legend"},{type:"series"},{type:"axis"}]},jG=class extends Rs{constructor(e){super('<div class="ag-chart-format-wrapper"></div>'),this.chartMenuContext=e}postConstruct(){this.groupExpansionFeature=this.createManagedBean(new SG(this.getGui())),this.chartPanelFeature=this.createManagedBean(new NN(this.chartMenuContext.chartController,this.getGui(),"ag-chart-format-section",((e,t)=>
2this.createPanels(t)))),this.chartPanelFeature.refreshPanels()}createPanels(e){let t=!1;this.getFormatPanelDef().groups?.forEach((i=>{let{type:s,isOpen:n=!1}=i;if(!this.isGroupPanelShownInSeries(s,e))return;n&&(t&&h(`As of v32, only one charts customize panel group can be expanded at a time. '${s}' will not be expanded.`),t=!0);const r={...this.chartMenuContext,isExpandedOnInit:n,seriesType:e,registerGroupComponent:e=>this.groupExpansionFeature.addGroupComponent(e)};switch(s){case"chart":this.chartPanelFeature.addComponent(new CG(r));break;case"titles":this.chartPanelFeature.addComponent(new HG(r));break;case"legend":this.chartPanelFeature.addComponent(new wG(r));break;case"axis":DN(e)?this.chartPanelFeature.addComponent(new fG(r)):MN(e)&&(this.chartPanelFeature.addComponent(new mG("xAxis",r)),this.chartPanelFeature.addComponent(new mG("yAxis",r)));break;case"horizontalAxis":this.chartPanelFeature.addComponent(new mG("xAxis",r));break;case"verticalAxis":this.chartPanelFeature.addComponent(new mG("yAxis",r));break;case"series":this.chartPanelFeature.addComponent(new BG(r));break;case"navigator":h("'navigator' is now displayed in the charts advanced settings instead of the customize panel, and this setting will be ignored.");break;default:h(`Invalid charts customize panel group name supplied: '${s}'`)}}))}getFormatPanelDef(){const e=this.gos.get("chartToolPanelsDef")?.formatPanel;return e||WG}isGroupPanelShownInSeries(e,t){return["chart","titles","legend","series"].includes(e)||MN(t)&&["axis","horizontalAxis","verticalAxis"].includes(e)||DN(t)&&"axis"===e}};function UG(e){const{stacked:t,size:i,padding:s,xScalePadding:n,xScaleDomain:r,yScaleDomain:o}=e,a=new iF.BandScale;a.domain=r,a.range=[s,i-s],a.paddingInner=n,a.paddingOuter=n;const l=new iF.LinearScale;l.domain=o,l.range=[i-s,s];const h=(e,t,i)=>e.map(((e,s)=>{const n=i.convert(e),r=new iF.Rect;return r.x=t.convert(s),r.y=n,r.width=t.bandwidth,r.height=i.convert(0)-n,r.strokeWidth=0,r.crisp=!0,r}));return t?e.data.map((e=>h(e,a,l))):h(e.data,a,l)}function _G(e,t,i,s){const n=new iF.LinearScale;n.domain=[0,4],n.range=[s,i-s];const r=new iF.LinearScale;r.domain=[0,10],r.range=[i-s,s];const o=t.map((e=>{const t=new iF.Path;return t.strokeWidth=3,t.lineCap="round",t.fill=void 0,e.forEach(((e,i)=>{t.path[i>0?"lineTo":"moveTo"](n.convert(i),r.convert(e))})),t})),a=new iF.Group;return a.setClipRect(new iF.BBox(s,s,i-2*s,i-2*s)),a.append(o),e.append(a),o}function KG(e,t,i,s,n){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;const o=new iF.LinearScale;o.domain=[0,7],o.range=[-Math.PI,Math.PI].map((e=>e+Math.PI/2));const a=new iF.LinearScale;a.domain=[0,10],a.range=[s,n];const l=[],h=i/2,c=t.map((e=>{const t=new iF.Path;return t.strokeWidth=1,t.strokeOpacity=.5,t.lineCap="round",t.fill=void 0,t.fillOpacity=.8,e.forEach(((e,i)=>{const c=o.convert(i),d=s+n-a.convert(e),u=d*Math.cos(c)+h,p=d*Math.sin(c)+h;if(t.path[i>0?"lineTo":"moveTo"](u,p),r>0){const e=new iF.Circle;e.x=u,e.y=p,e.size=r,l.push(e)}})),t.path.closePath(),t})),d=new iF.Group;return d.append([...c,...l]),e.append(d),{paths:c,markers:l}}function $G(e){let[t,i]=[1/0,-1/0];return{processedData:e.reduce(((e,s,n)=>{const r=n>0?e[n-1]:void 0;e[n]??(e[n]=[]);const o=e[n];return s.forEach(((e,s)=>{r&&(e+=r[s]),o[s]=e,o[s]<t&&(t=o[s]),o[s]>i&&(i=o[s])})),e}),[]),min:t,max:i}}var YG=class extends Rs{constructor(e,t){super(),this.tooltipName=t,this.size=58,this.padding=5,this.root=new iF.Group;const i=new iF.Scene({width:this.size,height:this.size});i.canvas.element.classList.add("ag-chart-mini-thumbnail-canvas"),i.setRoot(this.root),i.setContainer(e),this.scene=i}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.scene.canvas.element.title=this.chartTranslationService.translate(this.tooltipName),this.scene.render().catch((e=>{c("AG Grid - chart update failed",e)}))}},ZG=class extends YG{constructor(e,t){super(e,t),this.stroke="gray",this.axisOvershoot=3}postConstruct(){const e=this.size,t=this.padding,i=new iF.Line;i.x1=t,i.y1=t,i.x2=t,i.y2=e-t+this.axisOvershoot,i.stroke=this.stroke;const s=new iF.Line;s.x1=t-this.axisOvershoot+1,s.y1=e-t,s.x2=e-t+1,s.y2=e-t,s.stroke=this.stroke;const n=this.root;n.append(i),n.append(s),super.postConstruct()}},qG=class extends ZG{constructor(e,t,i){super(e,"groupedColumnTooltip"),this.columnData=[2,3,4];const{root:s,columnData:n,size:r,padding:o}=this;this.columns=UG({stacked:!1,root:s,data:n,size:r,padding:o,xScaleDomain:[0,1,2],yScaleDomain:[0,4],xScalePadding:.3}),s.append(this.columns),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach(((i,s)=>{i.fill=e[s],i.stroke=t[s]}))}};qG.chartType="groupedColumn";var QG=class e extends ZG{constructor(t,i,s,n,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.data,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[0,16];super(t,arguments.length>7&&void 0!==arguments[7]?arguments[7]:"stackedColumnTooltip");const{root:l,size:h,padding:c}=this;this.stackedColumns=UG({stacked:!0,root:l,data:o,size:h,padding:c,xScaleDomain:[0,1,2],yScaleDomain:a,xScalePadding:.3}),l.append([].concat.apply([],this.stackedColumns)),this.updateColors(i,s)}updateColors(e,t){this.stackedColumns.forEach(((i,s)=>i.forEach((i=>{i.fill=e[s],i.stroke=t[s]}))))}};QG.chartType="stackedColumn",QG.data=[[8,12,16],[6,9,12],[2,3,4]];var XG=QG,JG=class e extends XG{constructor(t,i,s,n,r){super(t,i,s,n,r,e.data,[0,10],"normalizedColumnTooltip")}};JG.chartType="normalizedColumn",JG.data=[[10,10,10],[6,7,8],[2,4,6]];var eB=JG,tB=class extends ZG{constructor(e,t,i){super(e,"groupedBarTooltip");const s=this.padding,n=this.size,r=new iF.BandScale;r.domain=[0,1,2],r.range=[s,n-s],r.paddingInner=.3,r.paddingOuter=.3;const o=new iF.LinearScale;o.domain=[0,4],o.range=[n-s,s];const a=o.convert(0),l=r.bandwidth;this.bars=[2,3,4].map(((e,t)=>{const i=new iF.Rect;return i.x=s,i.y=r.convert(t),i.width=a-o.convert(e),i.height=l,i.strokeWidth=0,i.crisp=!0,i})),this.updateColors(t,i),this.root.append(this.bars)}
2updateColors(e,t){this.bars.forEach(((i,s)=>{i.fill=e[s],i.stroke=t[s]}))}};tB.chartType="groupedBar";var iB=class e extends ZG{constructor(t,i,s,n,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.data,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[0,16];super(t,arguments.length>7&&void 0!==arguments[7]?arguments[7]:"stackedBarTooltip");const l=this.size,h=this.padding,c=new iF.BandScale;c.domain=[0,1,2],c.range=[h,l-h],c.paddingInner=.3,c.paddingOuter=.3;const d=new iF.LinearScale;d.domain=a,d.range=[l-h,h];const u=d.convert(0),p=c.bandwidth;this.bars=o.map((e=>e.map(((e,t)=>{const i=new iF.Rect;return i.x=h,i.y=c.convert(t),i.width=u-d.convert(e),i.height=p,i.strokeWidth=0,i.crisp=!0,i})))),this.updateColors(i,s),this.root.append([].concat.apply([],this.bars))}updateColors(e,t){this.bars.forEach(((i,s)=>i.forEach((i=>{i.fill=e[s],i.stroke=t[s]}))))}};iB.chartType="stackedBar",iB.data=[[8,12,16],[6,9,12],[2,3,4]];var sB=iB,nB=class e extends sB{constructor(t,i,s,n,r){super(t,i,s,n,r,e.data,[0,10],"normalizedBarTooltip")}};nB.chartType="normalizedBar",nB.data=[[10,10,10],[6,7,8],[2,4,6]];var rB=nB,oB=iF.toRadians,aB=class extends YG{constructor(e,t,i,s,n){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:.6;super(e,arguments.length>6&&void 0!==arguments[6]?arguments[6]:"donutTooltip");const o=(this.size-2*this.padding)/2,a=o+this.padding,l=[[oB(-90),oB(30)],[oB(30),oB(120)],[oB(120),oB(180)],[oB(180),oB(210)],[oB(210),oB(240)],[oB(240),oB(270)]];this.sectors=l.map((e=>{let[t,i]=e;const s=new iF.Sector;return s.centerX=a,s.centerY=a,s.innerRadius=o*r,s.outerRadius=o,s.startAngle=t,s.endAngle=i,s.stroke=void 0,s.strokeWidth=0,s.inset=.75,s})),this.updateColors(t,i),this.root.append(this.sectors)}updateColors(e,t){this.sectors.forEach(((i,s)=>{i.fill=e[s%e.length],i.stroke=t[s%t.length]}))}};aB.chartType="donut";var lB=class extends aB{constructor(e,t,i,s,n){super(e,t,i,s,n,0,"pieTooltip")}};lB.chartType="pie";var hB=class extends ZG{constructor(e,t,i){super(e,"lineTooltip"),this.data=[[9,7,8,5,6],[5,6,3,4,1],[1,3,4,8,7]],this.lines=_G(this.root,this.data,this.size,this.padding),this.updateColors(t,i)}updateColors(e,t){this.lines.forEach(((t,i)=>{t.stroke=e[i]}))}};hB.chartType="line";var cB=class extends ZG{constructor(e,t,i){super(e,"scatterTooltip");const s=this.size,n=this.padding,r=new iF.LinearScale;r.domain=[-.5,4],r.range=[2*n,s-n];const o=new iF.LinearScale;o.domain=[-.5,3.5],o.range=[s-n,n];const a=[];[[[.3,3],[1.1,.9],[2,.4],[3.4,2.4]],[[0,.3],[1,2],[2.4,1.4],[3,0]]].forEach((e=>{e.forEach((e=>{let[t,i]=e;const s=new iF.Arc;s.strokeWidth=0,s.centerX=r.convert(t),s.centerY=o.convert(i),s.radius=2.5,a.push(s)}))})),this.points=a,this.updateColors(t,i);const l=new iF.Group;l.setClipRect(new iF.BBox(n,n,s-2*n,s-2*n)),l.append(this.points),this.root.append(l)}updateColors(e,t){this.points.forEach(((i,s)=>{i.stroke=t[s%t.length],i.fill=e[s%e.length]}))}};cB.chartType="scatter";var dB=class extends ZG{constructor(e,t,i){super(e,"bubbleTooltip");const s=this.size,n=this.padding,r=new iF.LinearScale;r.domain=[0,1],r.range=[2*n,s-n];const o=new iF.LinearScale;o.domain=[0,1],o.range=[s-n,n];const a=[];[[[.1,.3,5],[.5,.4,7],[.2,.8,7]],[[.8,.7,5],[.7,.3,9]]].forEach((e=>{e.forEach((e=>{let[t,i,s]=e;const n=new iF.Arc;n.strokeWidth=0,n.centerX=r.convert(t),n.centerY=o.convert(i),n.radius=s,n.fillOpacity=.7,a.push(n)}))})),this.points=a,this.updateColors(t,i);const l=new iF.Group;l.setClipRect(new iF.BBox(n,n,s-2*n,s-2*n)),l.append(this.points),this.root.append(l)}updateColors(e,t){this.points.forEach(((i,s)=>{i.stroke=t[s%t.length],i.fill=e[s%e.length]}))}};dB.chartType="bubble";var uB=class e extends ZG{constructor(t,i,s,n,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.data;super(t,"groupedAreaTooltip");const a=this.size,l=this.padding,h=new iF.BandScale;h.domain=[0,1,2],h.paddingInner=1,h.paddingOuter=0,h.range=[l+.5,a-l-.5];const c=new iF.LinearScale;c.domain=[0,6],c.range=[a-l+.5,l];const d=2*o.length-1,u=[],p=c.convert(0);o.forEach(((e,t)=>{const i=h.convert(t);e.forEach(((e,s)=>{const n=c.convert(e),r=u[s]||(u[s]=[]);r[t]={x:i,y:n},r[d-t]={x:i,y:p}}))})),this.areas=u.reverse().map((e=>{const t=new iF.Path;t.strokeWidth=1,t.strokeOpacity=.75,t.fillOpacity=.7;const i=t.path;return i.clear(),e.forEach(((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y))),i.closePath(),t})),this.updateColors(i,s),this.root.append(this.areas)}updateColors(e,t){this.areas.forEach(((i,s)=>{i.fill=e[s],i.stroke=t[s]}))}};uB.chartType="area",uB.data=[[1,3,5],[2,6,4],[5,3,1]];var pB=uB,gB=class e extends ZG{constructor(t,i,s,n,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.data;super(t,arguments.length>6&&void 0!==arguments[6]?arguments[6]:"stackedAreaTooltip");const a=this.size,l=this.padding,h=new iF.BandScale;h.domain=[0,1,2],h.paddingInner=1,h.paddingOuter=0,h.range=[l+.5,a-l-.5];const c=new iF.LinearScale;c.domain=[0,16],c.range=[a-l+.5,l+.5];const d=2*o.length-1,u=[];o.forEach(((e,t)=>{const i=h.convert(t);let s=0;e.forEach(((e,n)=>{const r=c.convert(s+e),o=u[n]||(u[n]=[]);o[t]={x:i,y:r},o[d-t]={x:i,y:c.convert(s)},s+=e}))})),this.areas=u.map((e=>{const t=new iF.Path;t.strokeWidth=0;const i=t.path;return i.clear(),e.forEach(((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y))),i.closePath(),t})),this.updateColors(i,s),this.root.append(this.areas)}updateColors(e,t){this.areas.forEach(((i,s)=>{i.fill=e[s],i.stroke=t[s]}))}};gB.chartType="stackedArea",gB.data=[[2,3,2],[3,6,5],[6,2,2]];var mB=gB,fB=class e extends mB{constructor(t,i,s,n,r){super(t,i,s,n,r,arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.data,"normalizedAreaTooltip")}};fB.chartType="normalizedArea",fB.data=mB.data.map((e=>{const t=e.reduce(((e,t)=>e+t),0);return e.map((e=>e/t*16))}));var vB=fB,yB=class extends ZG{constructor(e,t,i){super(e,"histogramTooltip");const s=this.padding,n=this.size,r=[2,5,11,13,10,6,1],o=new iF.LinearScale;o.domain=[0,r.length],o.range=[s,n-s];const a=new iF.LinearScale;a.domain=[0,r.reduce(((e,t)=>Math.max(e,t)),0)],a.range=[n-s,s];const l=a.convert(0);this.bars=r.map(((e,t)=>{const i=a.convert(e),s=o.convert(t),n=o.convert(t+1),r=new iF.Rect;
2return r.x=s,r.y=i,r.width=n-s,r.height=l-i,r.strokeWidth=1,r.strokeOpacity=.75,r.crisp=!0,r})),this.updateColors(t,i),this.root.append(this.bars)}updateColors(e,t){let[i]=e,[s]=t;this.bars.forEach((e=>{e.fill=i,e.stroke=s}))}};yB.chartType="histogram";var CB=class extends YG{constructor(e,t){super(e,t),this.stroke="gray",this.showRadiusAxisLine=!0,this.showAngleAxisLines=!0}postConstruct(){const e=this.size,t=this.padding,i=(e-2*t)/2,s=this.showAngleAxisLines?[i,.8*i,.6*i,.4*i]:[],n=new iF.Line;n.x1=e/2,n.y1=t,n.x2=e/2,n.y2=e-t-i-s[s.length-1],n.stroke=this.stroke,n.strokeOpacity=.5,n.fill=void 0,n.visible=this.showRadiusAxisLine;const r=t+i;this.gridLines=s.map(((e,t)=>{const i=new iF.Path;return i.path.arc(r,r,e,0,2*Math.PI),i.strokeWidth=1,i.stroke=this.stroke,i.strokeOpacity=0===t?.5:.2,i.fill=void 0,i}));const o=this.root;o.append(n),this.gridLines.length>0&&o.append(this.gridLines),super.postConstruct()}},SB=class extends CB{constructor(e,t,i){super(e,"radialColumnTooltip"),this.data=[[6,8,10,2,6,5],[4,4,3,6,4,4],[5,4,2,9,8,9]],this.showRadiusAxisLine=!1;const{padding:s,size:n,data:r}=this,o=(n-2*s)/2,a=.4*o,l=new iF.BandScale;l.domain=r[0].map(((e,t)=>t)),l.range=[0,2*Math.PI],l.paddingInner=0,l.paddingOuter=0;const h=.7*l.bandwidth,{processedData:c,max:d}=$G(r),u=new iF.LinearScale;u.domain=[0,d],u.range=[a,o];const p=this.size/2;this.series=c.map(((e,t)=>{const i=0===t?void 0:c[t-1],s=new iF.TranslatableGroup({zIndex:1e6}),n=e.map(((e,t)=>{const s=i?.[t],n=u.convert(e),r=u.convert(s??0),c=l.convert(t),d=c+h,p=iF.getRadialColumnWidth(c,d,o,.5,.5),g=new iF.RadialColumnShape;return g.columnWidth=p,g.innerRadius=r,g.outerRadius=n,g.startAngle=c,g.endAngle=d,g.isBeveled=!0,g.axisInnerRadius=a,g.axisOuterRadius=o,g.stroke=void 0,g.strokeWidth=0,g}));return s.append(n),s.translationX=p,s.translationY=p,s})),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach(((i,s)=>{for(const n of i.children())n.fill=e[s%e.length],n.stroke=t[s%t.length]}))}};SB.chartType="radialColumn";var wB=class extends CB{constructor(e,t,i){super(e,"radialBarTooltip"),this.data=[[6,8,10],[4,4,3],[5,4,2]],this.showRadiusAxisLine=!1;const s=(this.size-this.padding)/2,n=.4*s,r=new iF.BandScale;r.domain=this.data[0].map(((e,t)=>t)),r.range=[n,s],r.paddingInner=.5,r.paddingOuter=0;const o=r.bandwidth,{processedData:a,max:l}=$G(this.data),h=new iF.LinearScale;h.domain=[0,Math.ceil(1.5*l)];const c=1.5*Math.PI,d=c+2*Math.PI;h.range=[c,d];const u=this.size/2;this.series=a.map(((e,t)=>{const i=t<0?void 0:a[t-1],s=new iF.Group({zIndex:1e6}),n=e.map(((e,t)=>{const s=i?.[t]??0,n=r.convert(t),a=n-o,l=h.convert(s),c=h.convert(e),d=new iF.Sector;return d.centerX=u,d.centerY=u,d.innerRadius=a,d.outerRadius=n,d.startAngle=l,d.endAngle=c,d.stroke=void 0,d.strokeWidth=0,d}));return s.append(n),s})),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach(((i,s)=>{for(const n of i.children())n.fill=e[s%e.length],n.stroke=t[s%t.length]}))}};wB.chartType="radialBar";var bB=class extends CB{constructor(e,t,i){super(e,"radarLineTooltip"),this.markerSize=4,this.data=[[8,7,8,7,8,8,7,8],[6,8,5,10,6,7,4,6],[0,3,3,5,4,4,2,0]],this.showRadiusAxisLine=!1;const s=(this.size-2*this.padding)/2,{paths:n,markers:r}=KG(this.root,this.data,this.size,s,0,this.markerSize);this.lines=n,this.markers=r,this.updateColors(t,i)}updateColors(e,t){this.lines.forEach(((i,s)=>{const n=this.data[s].length;i.stroke=e[s];const r=s*n,o=r+n;this.markers.slice(r,o).forEach((i=>{i.stroke=t[s],i.fill=e[s]}))}))}};bB.chartType="radarLine";var xB=class extends CB{constructor(e,t,i){super(e,"radarAreaTooltip"),this.data=[[8,10,5,7,4,1,5,8],[1,1,2,7,7,8,10,1],[4,5,9,9,4,2,3,4]],this.showRadiusAxisLine=!1;const s=(this.size-2*this.padding)/2,n=s-.3*this.size;this.areas=KG(this.root,this.data,this.size,s,n).paths,this.updateColors(t,i)}updateColors(e,t){this.areas.forEach(((i,s)=>{i.fill=e[s],i.stroke=t[s]}))}};xB.chartType="radarArea";var MB=class extends CB{constructor(e,t,i){super(e,"nightingaleTooltip"),this.data=[[6,10,9,8,7,8],[4,6,5,4,5,5],[3,5,4,3,4,7]],this.showRadiusAxisLine=!1;const s=(this.size-2*this.padding)/2,n=new iF.BandScale;n.domain=this.data[0].map(((e,t)=>t)),n.range=[-Math.PI,Math.PI],n.paddingInner=0,n.paddingOuter=0;const r=.7*n.bandwidth,{processedData:o,max:a}=$G(this.data),l=new iF.LinearScale;l.domain=[0,a],l.range=[0,s];const h=this.size/2;this.series=o.map(((e,t)=>{const i=t<0?void 0:o[t-1],s=new iF.Group({zIndex:1e6}),a=e.map(((e,t)=>{const s=i?.[t],o=l.convert(e),a=l.convert(s??0),c=n.convert(t),d=c+r,u=new iF.Sector;return u.centerX=h,u.centerY=h,u.innerRadius=a,u.outerRadius=o,u.startAngle=c,u.endAngle=d,u.stroke=void 0,u.strokeWidth=0,u}));return s.append(a),s})),this.root.append(this.series),this.updateColors(t,i)}
2updateColors(e,t){this.series.forEach(((i,s)=>{for(const n of i.children())n.fill=e[s%e.length],n.stroke=t[s%t.length]}))}};MB.chartType="nightingale";var DB=class extends ZG{constructor(e,t,i){super(e,"rangeBarTooltip");this.bars=this.createRangeBar(this.root,[3,3.5,3],this.size,this.padding,"vertical"),this.updateColors(t,i)}updateColors(e,t){this.bars.forEach(((i,s)=>{i.fill=e[s],i.stroke=t[s]}))}createRangeBar(e,t,i,s,n){const r="horizontal"===n,o=2*s,a=new iF.BandScale;a.domain=t.map(((e,t)=>t)),a.range=[s,i-s],a.paddingInner=.3,a.paddingOuter=.3;const l=new iF.LinearScale;l.domain=[.7*t.reduce(((e,t)=>Math.min(e,t)),1/0),1.3*t.reduce(((e,t)=>Math.max(e,t)),0)],l.range=[o,i-o];const h=a.bandwidth,c=t.map(((e,t)=>{const[i,s]=[.7*e,1.3*e],n=a.convert(t),o=l.convert(i),c=l.convert(s)-o,d=new iF.Rect;return d.x=r?o:n,d.y=r?n:o,d.width=r?c:h,d.height=r?h:c,d.strokeWidth=0,d.crisp=!0,d}));return e.append(c),c}};DB.chartType="rangeBar";var IB=class extends ZG{constructor(e,t,i){super(e,"rangeAreaTooltip");const s=[RB({offset:1.5,length:4,pattern:{low:3,high:5,period:4}}),RB({offset:1.5,length:4,pattern:{low:2.25,high:4.25,period:4}}),RB({offset:3,length:4,pattern:{low:2.5,high:4.5,period:4}})],n=s.map((e=>e.map((e=>{let[t,i]=e;return{x:t,low:i-.875,high:i+.875}})))),{lines:r,areas:o}=this.createRangeArea(this.root,n,this.size,this.padding);this.lines=r,this.areas=o,this.updateColors(t,i)}updateColors(e,t){e=AB(e,1,2),t=AB(t,1,2),this.lines.forEach(((e,i)=>{let[s,n]=e;s.fill=void 0,s.stroke=t[i],n.fill=void 0,n.stroke=t[i]})),this.areas.forEach(((t,i)=>{t.fill=e[i]}))}createRangeArea(e,t,i,s){const n=t.reduce(((e,t)=>t.reduce(((e,t)=>{let{x:i}=t;return Math.min(e,i)}),e)),1/0),r=t.reduce(((e,t)=>t.reduce(((e,t)=>{let{x:i}=t;return Math.max(e,i)}),e)),-1/0),o=t.reduce(((e,t)=>t.reduce(((e,t)=>{let{low:i}=t;return Math.min(e,i)}),e)),1/0),a=t.reduce(((e,t)=>t.reduce(((e,t)=>{let{high:i}=t;return Math.max(e,i)}),e)),-1/0),l=new iF.LinearScale;l.domain=[n,r],l.range=[s,i-s];const h=2*s,c=new iF.LinearScale;c.domain=[o,a],c.range=[i-h,h];const d=[],u=[];return t.map((e=>{const t=new iF.Path,i=new iF.Path,s=new iF.Path;return d.push([t,i]),u.push(s),t.strokeWidth=0,i.strokeWidth=0,s.strokeWidth=0,s.fillOpacity=.8,t.path.clear(),i.path.clear(),s.path.clear(),e.map(((e,n)=>{const{x:r,low:o,high:a}=e,h=l.convert(r),d=c.convert(o),u=c.convert(a),p=n>0?"lineTo":"moveTo";return t.path[p](h,u),i.path[p](h,d),s.path[p](h,u),[h,d]}))})).forEach(((e,t)=>{const i=e.length-1,s=u[t];for(let n=i;n>=0;n--){const[t,i]=e[n];s.path.lineTo(t,i)}})),e.append(u.concat(...d)),{lines:d,areas:u}}};function RB(e){const{offset:t,length:i,pattern:s}=e,n=function(e,t,i){const{period:s}=i,n=e/s,r=[0,.5].map((e=>e-n)).map(EB).sort(((e,t)=>e-t));return Array.from({length:Math.floor(r.length*(s/t))},((e,t)=>r[t%r.length]+Math.floor(t/r.length))).map((e=>e*s)).map((t=>o(t,e,i)))}(t,i,s),r=i;return 0!==n.length&&0===n[0][0]||n.unshift(o(0,t,s)),n[n.length-1][0]!==r&&n.push(o(r,t,s)),n;function o(e,t,i){return[e,a(t+e,i)]}function a(e,t){const{low:i,high:s,period:n}=t,r=EB(e/n);return i+(s-i)*(r>.5?1-2*(r-.5):2*r)}}function EB(e){const t=e%1;return t<0?t+1:t}function AB(e,t,i){const s=[...e],n=s[t];return s[t]=s[i],s[i]=n,s}IB.chartType="rangeArea";var TB=class extends ZG{constructor(e,t,i,s,n){super(e,"boxPlotTooltip");const r=this.padding,o=this.size,a=[11,11.5,10.5],l=new iF.LinearScale;l.domain=[.8*a.reduce(((e,t)=>Math.min(e,t)),1/0),1.2*a.reduce(((e,t)=>Math.max(e,t)),0)],l.range=[o-1.5*r,r];const h=new iF.BandScale;h.domain=a.map(((e,t)=>t)),h.range=[r,o-r],h.paddingInner=.4,h.paddingOuter=.2;const c=Math.round(h.bandwidth),d=Math.round(h.bandwidth/2);this.boxPlotGroups=a.map(((e,t)=>{const[i,s,n,r]=[.8*e,.9*e,1.1*e,1.2*e],o=Math.round(l.convert(n)),a=Math.round(h.convert(t)),u=Math.round(a+c),p=Math.round(l.convert(s)),g=Math.round(l.convert(i)),m=Math.round(l.convert(e)),f=Math.round(l.convert(r)),v=a+d,y=new iF.Group,C=new iF.Rect,S=new iF.Line,w=new iF.Line,b=new iF.Line,x=new iF.Line,M=new iF.Line;return C.x=a,C.y=o,C.width=c,C.height=p-o,C.strokeWidth=1,C.strokeOpacity=.75,C.crisp=!0,this.setLineProperties(S,a,u,m,m),this.setLineProperties(w,v,v,f,o),this.setLineProperties(b,v,v,g,p),this.setLineProperties(x,a,u,f,f),this.setLineProperties(M,a,u,g,g),y.append([C,S,w,b,x,M]),y})),this.updateColors(t,i,s,n),this.root.append(this.boxPlotGroups)}updateColors(e,t,i,s){const n=i?.get(gF.DEFAULT_BACKGROUND_COLOUR),r=(Array.isArray(n)?n[0]:n)??"white";this.boxPlotGroups.forEach(((i,n)=>{for(const o of i.children()){const i=e[n%e.length];o.fill=s?i:vF.interpolateColor(i,r)(.7),o.stroke=t[n%t.length]}}))}setLineProperties(e,t,i,s,n){e.x1=t,e.x2=i,e.y1=s,e.y2=n,e.strokeOpacity=.75}};TB.chartType="boxPlot";var PB=class extends YG{constructor(e,t,i,s,n){super(e,"treemapTooltip");const{size:r,padding:o}=this,a=[[1,1],[3,2,1]],l=a.length%2===0?.3:.2,h=[o,r-o],c=a.length,d=c*(c+1)/2,u=l/(c-1),p=h[1]-h[0],g=p-l;let m=h[0];this.rects=a.reduce(((e,t,i)=>{e??(e=[]);const s=g*((c-i)/d),n=t.length,r=t.reduce(((e,t)=>e+t),0),o=l/(n-1||1),a=n>1?p-l:p;let f=h[0];const v=t.map((e=>{const t=new iF.Rect,i=a*e/r;
2return t.x=m,t.y=f,t.width=s,t.height=i,t.strokeWidth=.75,t.crisp=!0,f+=i+o,t}));return m+=s+u,e.push(...v),e}),[]),this.updateColors(t,i,s,n);const f=new iF.Group;f.setClipRect(new iF.BBox(o,o,r-o,r-o)),f.append(this.rects),this.root.append(f)}updateColors(e,t,i,s){const n=i?.get(gF.DEFAULT_BACKGROUND_COLOUR),r=(Array.isArray(n)?n[0]:n)??"white";this.rects.forEach(((i,n)=>{i.fill=e[n%t.length],i.stroke=s?t[n%t.length]:r}))}};PB.chartType="treemap";var LB=class extends CB{constructor(e,t,i){super(e,"sunburstTooltip"),this.data=[[[],[]],[[],[]],[[],[]]],this.angleOffset=-Math.PI/2,this.innerRadiusRatio=0,this.showRadiusAxisLine=!1,this.showAngleAxisLines=!1;const{data:s,size:n,padding:r,angleOffset:o,innerRadiusRatio:a}=this,l=(n-2*r)/2,h=[o+0,o+2*Math.PI],c=Math.abs(h[1]-h[0]),d=[l*a,l],u=Math.abs(d[1]-d[0]);let p=0;const g=(e,t)=>{e.forEach((e=>{const i=t+1;p=Math.max(p,i),g(e,i)}))};g(s,0);const m=u/p,f=this.size/2,v=h[0];this.series=[];const y=(e,t,i,s,n)=>{if(!Array.isArray(e))return;const r=t+1;let o=i;e.forEach(((e,i,a)=>{let l=n;l||(l=new iF.Group,this.series.push(l));const h=d[0]+t*m,c=d[0]+r*m,u=1/a.length,p=o,g=p+s*u,v=new iF.Sector;v.centerX=f,v.centerY=f,v.innerRadius=h,v.outerRadius=c,v.startAngle=p,v.endAngle=g,v.stroke=void 0,v.strokeWidth=0,v.inset=.75,o=g,l.append(v),y(e,r,p,Math.abs(g-p),l)}))};y(s,0,v,c),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach(((i,s)=>{for(const n of i.children())n.fill=e[s%e.length],n.stroke=t[s%t.length]}))}};LB.chartType="sunburst";var FB=class extends YG{constructor(e,t,i,s,n){super(e,"heatmapTooltip");const{size:r,padding:o}=this,a=Array.from({length:3},((e,t)=>Array.from({length:3},((e,t)=>t)))),l=a.map(((e,t)=>t)),h=new iF.BandScale;h.domain=l,h.range=[o,r-o],h.paddingInner=.01,h.paddingOuter=.1;const c=new iF.BandScale;c.domain=l,c.range=[o,r-o],c.paddingInner=.01,c.paddingOuter=.1;const d=h.bandwidth??0,u=c.bandwidth??0;this.rects=a.reduce(((e,t,i)=>{e??(e=[]);const s=t.map(((e,t)=>{const s=new iF.Rect;return s.x=h.convert(i),s.y=c.convert(t),s.width=d,s.height=u,s.strokeWidth=0,s.crisp=!0,s}));return e.push(...s),e}),[]),this.updateColors(t,i,s,n);const p=new iF.Group;p.setClipRect(new iF.BBox(o,o,r-o,r-o)),p.append(this.rects),this.root.append(p)}updateColors(e,t,i,s){const n=i?.get(gF.DEFAULT_DIVERGING_SERIES_COLOR_RANGE),r=i?.get(gF.DEFAULT_BACKGROUND_COLOUR),o=(Array.isArray(r)?r[0]:r)??"white",a=s?[e[0],e[1]]:n,l=s?t[0]:o,h=vF.interpolateColor(a[0],a[1]);this.rects.forEach(((e,t)=>{e.fill=h(.2*t),e.stroke=l}))}};FB.chartType="heatmap";var kB=class extends ZG{constructor(e,t,i,s,n){super(e,"waterfallTooltip"),this.data=[4,3,-3,6,-3],this.bars=this.createWaterfall(this.root,this.data,this.size,this.padding,"vertical").bars,this.updateColors(t,i,s,n)}updateColors(e,t,i,s){const{data:n}=this,r={fill:s?e[0]:i?.get(gF.PALETTE_ALT_UP_FILL),stroke:s?t[0]:i?.get(gF.PALETTE_ALT_UP_STROKE)},o={fill:s?e[1]:i?.get(gF.PALETTE_ALT_DOWN_FILL),stroke:s?t[1]:i?.get(gF.PALETTE_ALT_DOWN_STROKE)};this.bars.forEach(((e,t)=>{const i=n[t]>=0;e.fill=i?r.fill:o.fill,e.stroke=i?r.stroke:o.stroke}))}createWaterfall(e,t,i,s,n){const r=2*s,{processedData:o,min:a,max:l}=$G(t.map((e=>[e]))),h=o.reduce(((e,t)=>e.concat(t)),[]),c=new iF.LinearScale;c.domain=[Math.min(a,0),l],c.range=[i-r,r];const d=new iF.BandScale;d.domain=t.map(((e,t)=>t)),d.range=[s,i-s],d.paddingInner=.2,d.paddingOuter=.3;const u=d.bandwidth,p=new iF.Path;p.stroke="#575757",p.strokeWidth=0;const g=Math.floor(p.strokeWidth)%2/2,m=p.path;m.clear();const f="horizontal"===n,v=h.map(((e,i)=>{const s=i>0?h[i-1]:0,n=t[i]>0,r=Math.round(c.convert(e)),o=Math.round(c.convert(s)),a=(n?r:o)-g,l=(n?o:r)+g,p=Math.abs(l-a),v=d.convert(i),y=new iF.Rect;y.x=f?a:v,y.y=f?v:a,y.width=f?p:u,y.height=f?u:p,y.strokeWidth=0,y.crisp=!0;const C=r+g,S=o+g;if(i>0){const e=f?S:y.x,t=f?y.y:S;m.lineTo(e,t)}const w=f?C:y.x,b=f?y.y:C;return m.moveTo(w,b),y}));return e.append([p,...v]),{bars:v}}};kB.chartType="waterfall";var NB=class extends ZG{constructor(e,t,i){super(e,"columnLineComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];const{root:s,columnData:n,lineData:r,size:o,padding:a}=this;this.columns=UG({stacked:!1,root:s,data:n,size:o,padding:a,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),s.append(this.columns),this.lines=_G(s,r,o,a),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach(((i,s)=>{i.fill=e[s],i.stroke=t[s]}
2)),this.lines.forEach(((t,i)=>{t.stroke=e[i+2]}))}};NB.chartType="columnLineCombo";var OB=class extends ZG{constructor(e,t,i){super(e,"areaColumnComboTooltip"),this.columnData=[3,4.5],this.areaData=[[5,4,6,5,4]];const{root:s,columnData:n,areaData:r,size:o,padding:a}=this;this.columns=UG({stacked:!1,root:s,data:n,size:o,padding:a,xScaleDomain:[0,1],yScaleDomain:[0,6],xScalePadding:.5});const l=new iF.BandScale;l.range=[a,o-a],l.domain=[0,1,2,3,4],l.paddingInner=1,l.paddingOuter=0;const h=new iF.LinearScale;h.range=[o-a,a],h.domain=[0,6];const c=[],d=h.convert(0),u=l.convert(0);r.forEach(((e,t)=>{const i=c[t]||(c[t]=[]);e.forEach(((e,t)=>{const s=e,n=t,r=l.convert(n),o=h.convert(s);i[t]={x:r,y:o}}));const s=l.convert(e.length-1);c[t].push({x:s,y:d},{x:u,y:d})})),this.areas=c.map((e=>{const t=new iF.Path;t.strokeWidth=0,t.fillOpacity=.8;const i=t.path;return e.forEach(((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y))),t})),s.append(this.areas),s.append([].concat.apply([],this.columns)),this.updateColors(t,i)}updateColors(e,t){this.areas.forEach(((i,s)=>{i.fill=e[s],i.stroke=t[s]})),this.columns.forEach(((i,s)=>{i.fill=e[s+1],i.stroke=t[s+1]}))}};OB.chartType="areaColumnCombo";var GB=class extends YG{constructor(e,t,i){super(e,"customComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];const{root:s,columnData:n,lineData:r,size:o,padding:a}=this;this.columns=UG({stacked:!1,root:s,data:n,size:o,padding:a,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),s.append(this.columns),this.lines=_G(s,r,o,a);const l="grey",h=new iF.Line;h.x1=a,h.y1=a,h.x2=a,h.y2=o-a+3,h.stroke=l;
2const c=new iF.Line;c.x1=a-3+1,c.y1=o-a,c.x2=o-a+1,c.y2=o-a,c.stroke=l;const d=new iF.Path;this.buildPenIconPath(d),d.fill="whitesmoke",d.stroke="darkslategrey",d.strokeWidth=1,s.append([c,h,d]),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach(((i,s)=>{i.fill=e[s],i.stroke=t[s]})),this.lines.forEach(((t,i)=>{t.stroke=e[i+2]}))}buildPenIconPath(e){const{path:t}=e;t.moveTo(25.76,43.46),t.lineTo(31.27,48.53),t.moveTo(49.86,22),t.lineTo(49.86,22),t.cubicCurveTo(49.01994659053345,21.317514933510974,47.89593834348529,21.09645997825817,46.86,21.41),t.lineTo(46.86,21.41),t.cubicCurveTo(45.55460035985361,21.77260167850787,44.38777081121966,22.517979360321792,43.51,23.55),t.lineTo(25.51,43.8),t.lineTo(25.43,43.89),t.lineTo(23.01,51.89),t.lineTo(22.83,52.46),t.lineTo(31.02,48.86),t.lineTo(49.02,28.52),t.lineTo(49.02,28.52),t.cubicCurveTo(49.940716461596224,27.521914221246085,50.54302631059587,26.2720342455763,50.75,24.93),t.lineTo(50.75,24.93),t.cubicCurveTo(50.95363374988308,23.866379846512814,50.62080640232334,22.77066734274871,49.86,22),t.closePath(),t.moveTo(41.76,25.5),t.lineTo(47.34,30.5),t.moveTo(40.74,26.65),t.lineTo(46.25,31.71)}};GB.chartType="customCombo";var BB={columnGroup:{column:{range:!0,pivot:!0,enterprise:!1,icon:qG},stackedColumn:{range:!0,pivot:!0,enterprise:!1,icon:XG},normalizedColumn:{range:!0,pivot:!0,enterprise:!1,icon:eB}},barGroup:{bar:{range:!0,pivot:!0,enterprise:!1,icon:tB},stackedBar:{range:!0,pivot:!0,enterprise:!1,icon:sB},normalizedBar:{range:!0,pivot:!0,enterprise:!1,icon:rB}},pieGroup:{pie:{range:!0,pivot:!0,enterprise:!1,icon:lB},donut:{range:!0,pivot:!0,enterprise:!1,icon:aB},doughnut:{range:!0,pivot:!0,enterprise:!1,icon:aB}},lineGroup:{line:{range:!0,pivot:!0,enterprise:!1,icon:hB}},scatterGroup:{scatter:{range:!0,pivot:!0,enterprise:!1,icon:cB},bubble:{range:!0,pivot:!0,enterprise:!1,icon:dB}},areaGroup:{area:{range:!0,pivot:!0,enterprise:!1,icon:pB},stackedArea:{range:!0,pivot:!0,enterprise:!1,icon:mB},normalizedArea:{range:!0,pivot:!0,enterprise:!1,icon:vB}},polarGroup:{radarLine:{range:!0,pivot:!1,enterprise:!0,icon:bB},radarArea:{range:!0,pivot:!1,enterprise:!0,icon:xB},nightingale:{range:!0,pivot:!1,enterprise:!0,icon:MB},radialColumn:{range:!0,pivot:!1,enterprise:!0,icon:SB},radialBar:{range:!0,pivot:!1,enterprise:!0,icon:wB}},statisticalGroup:{boxPlot:{range:!0,pivot:!1,enterprise:!0,icon:TB},histogram:{range:!0,pivot:!1,enterprise:!1,icon:yB},rangeBar:{range:!0,pivot:!1,enterprise:!0,icon:DB},rangeArea:{range:!0,pivot:!1,enterprise:!0,icon:IB}},hierarchicalGroup:{treemap:{range:!0,pivot:!0,enterprise:!0,icon:PB},sunburst:{range:!0,pivot:!0,enterprise:!0,icon:LB}},specializedGroup:{heatmap:{range:!0,pivot:!1,enterprise:!0,icon:FB},waterfall:{range:!0,pivot:!1,enterprise:!0,icon:kB}},combinationGroup:{columnLineCombo:{range:!0,pivot:!0,enterprise:!1,icon:NB},areaColumnCombo:{range:!0,pivot:!0,enterprise:!1,icon:OB},customCombo:{range:!0,pivot:!0,enterprise:!1,icon:GB}}},VB={columnGroup:["column","stackedColumn","normalizedColumn"],barGroup:["bar","stackedBar","normalizedBar"],pieGroup:["pie","donut"],lineGroup:["line"],scatterGroup:["scatter","bubble"],areaGroup:["area","stackedArea","normalizedArea"],polarGroup:["radarLine","radarArea","nightingale","radialColumn","radialBar"],statisticalGroup:["boxPlot","histogram","rangeBar","rangeArea"],hierarchicalGroup:["treemap","sunburst"],specializedGroup:["heatmap","waterfall"],combinationGroup:["columnLineCombo","areaColumnCombo","customCombo"]},zB=class extends Rs{constructor(e,t,i,s,n){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:VB;super('<div class="ag-chart-settings-mini-wrapper"></div>'),this.wrappers=new Map,this.chartController=e,this.fills=t,this.strokes=i,this.themeTemplateParameters=s,this.isCustomTheme=n,this.chartGroups={...r}}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){!this.chartController.customComboExists()&&this.chartGroups.combinationGroup&&(this.chartGroups.combinationGroup=this.chartGroups.combinationGroup.filter((e=>"customCombo"!==e)));const e=this.getGui(),t=this.chartController.isEnterprise(),i=this.chartController.isPivotChart(),s=!i,n=Object.keys(this.chartGroups).map((e=>{const n=e in BB?BB[e]:void 0;
2if(!n)return h(`invalid chartGroupsDef config '${e}'`),null;const r=(this.chartGroups[e]??[]).map((r=>{const o=r in n?n[r]:void 0;return o?!t&&o.enterprise?null:s&&o.range||i&&o.pivot?o:null:(h(`invalid chartGroupsDef config '${e}.${r}'`),null)})).filter((e=>null!=e));return 0===r.length?null:{label:this.chartTranslationService.translate(e),items:r}})).filter((e=>null!=e));for(const{label:r,items:o}of n){const t=this.createBean(new tk({title:r,suppressEnabledCheckbox:!0,enabled:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-settings",direction:"horizontal",suppressKeyboardNavigation:!0}));for(const e of o){const i=e.icon,s=document.createElement("div");s.classList.add("ag-chart-mini-thumbnail"),s.setAttribute("tabindex","0"),s.setAttribute("role","button");const n=i.chartType,r=()=>{this.chartController.setChartType(n),this.updateSelectedMiniChart()};this.addManagedListeners(s,{click:r,keydown:e=>{e.key!=js.ENTER&&e.key!==js.SPACE||(e.preventDefault(),r())}}),this.wrappers.set(n,s),this.createBean(new i(s,this.fills,this.strokes,this.themeTemplateParameters,this.isCustomTheme)),t.addItem(s)}e.appendChild(t.getGui())}this.updateSelectedMiniChart()}updateSelectedMiniChart(){const e=this.chartController.getChartType();this.wrappers.forEach(((t,i)=>{const s=i===e;t.classList.toggle("ag-selected",s);const n=this.chartTranslationService.translate(kN(i));di(t,s?`${n}. ${this.chartTranslationService.translate("ariaChartSelected")}`:n)}))}destroy(){this.wrappers.clear(),super.destroy()}},HB=class extends Rs{constructor(e){super('<div class="ag-chart-settings-wrapper">\n            <div data-ref="eMiniChartsContainer" class="ag-chart-settings-mini-charts-container ag-scrollable-container"></div>\n            <div data-ref="eNavBar" class="ag-chart-settings-nav-bar">\n                <div data-ref="ePrevBtn" class="ag-chart-settings-prev">\n                    <button type="button" class="ag-button ag-chart-settings-prev-button"></button>\n                </div>\n                <div data-ref="eCardSelector" class="ag-chart-settings-card-selector"></div>\n                <div data-ref="eNextBtn" class="ag-chart-settings-next">\n                    <button type="button" class="ag-button ag-chart-settings-next-button"></button>\n                </div>\n            </div>\n        </div>'),this.chartController=e,this.eMiniChartsContainer=Is,this.eNavBar=Is,this.eCardSelector=Is,this.ePrevBtn=Is,this.eNextBtn=Is,this.miniChartsContainers=[],this.cardItems=[],this.activePaletteIndex=0,this.palettes=[],this.themes=[]}postConstruct(){this.resetPalettes(),this.ePrevBtn.insertAdjacentElement("afterbegin",Ps("previous",this.gos)),this.eNextBtn.insertAdjacentElement("afterbegin",Ps("next",this.gos)),this.addManagedElementListeners(this.ePrevBtn,{click:()=>this.setActivePalette(this.getPrev(),"left")}),this.addManagedElementListeners(this.eNextBtn,{click:()=>this.setActivePalette(this.getNext(),"right")});const e=()=>this.resetPalettes(!0);this.addManagedListeners(this.chartController,{chartTypeChanged:e,chartApiUpdate:e}),this.scrollSelectedIntoView()}scrollSelectedIntoView(){setTimeout((()=>{const e=this.miniChartsContainers.find((e=>!e.getGui().classList.contains("ag-hidden"))).getGui().querySelector(".ag-selected");if(e){const t=e.offsetParent;t&&this.eMiniChartsContainer.scrollTo(0,t.offsetTop)}}),250)}resetPalettes(e){const t=this.chartController.getPalettes(),i=this.chartController.getThemeTemplateParameters(),s=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;if(be(t,this.palettes)&&!e||this.isAnimating)return;this.palettes=t,this.themes=this.chartController.getThemeNames(),this.activePaletteIndex=this.themes.findIndex((e=>e===this.chartController.getChartThemeName())),this.cardItems=[],rs(this.eCardSelector),this.destroyMiniCharts();const{themes:n}=this;this.palettes.forEach(((e,t)=>{const r=this.activePaletteIndex===t,{fills:o=[],strokes:a=[]}=e,l=!oO(n[t]),h=this.createBean(new zB(this.chartController,o,a,i[t],l,s));this.miniChartsContainers.push(h),this.eMiniChartsContainer.appendChild(h.getGui()),this.addCardLink(t),r?h.updateSelectedMiniChart():h.setDisplayed(!1)})),Ki(this.eNavBar,this.palettes.length>1),ji(this.cardItems[this.activePaletteIndex],"ag-selected","ag-not-selected")}addCardLink(e){const t=document.createElement("div");t.classList.add("ag-chart-settings-card-item"),this.addManagedElementListeners(t,{click:()=>
2{this.setActivePalette(e,e<this.activePaletteIndex?"left":"right")}}),this.eCardSelector.appendChild(t),this.cardItems.push(t)}getPrev(){let e=this.activePaletteIndex-1;return e<0&&(e=this.palettes.length-1),e}getNext(){let e=this.activePaletteIndex+1;return e>=this.palettes.length&&(e=0),e}setActivePalette(e,t){if(this.isAnimating||this.activePaletteIndex===e)return;ji(this.cardItems[e],"ag-selected","ag-not-selected");const i=this.miniChartsContainers[this.activePaletteIndex],s=i.getGui(),n=this.miniChartsContainers[e],r=n.getGui();i.updateSelectedMiniChart(),n.updateSelectedMiniChart();const o="left"===t?-1:1,a=r.style.left=es(this.getGui())*o+"px";this.activePaletteIndex=e,this.isAnimating=!0;const l="ag-animating";n.setDisplayed(!0),i.addCssClass(l),n.addCssClass(l),this.chartController.setChartThemeName(this.themes[e]),window.setTimeout((()=>{s.style.left=-parseFloat(a)+"px",r.style.left="0px"}),0),window.setTimeout((()=>{this.isAnimating=!1,i.removeCssClass(l),n.removeCssClass(l),i.setDisplayed(!1)}),300)}destroyMiniCharts(){rs(this.eMiniChartsContainer),this.miniChartsContainers=this.destroyBeans(this.miniChartsContainers)}destroy(){this.destroyMiniCharts(),super.destroy()}},WB=class e extends Rs{constructor(e,t){super(),this.panels=e,this.chartMenuContext=t,this.tabs=[]}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.panels.forEach((e=>{const t=e.replace("chart","").toLowerCase(),i=this.createPanel(t),s=this.createTab(e,t,i);this.tabs.push(s),this.addDestroyFunc((()=>this.destroyBean(i)))})),this.tabbedLayout=new xk({items:this.tabs,cssClass:"ag-chart-tabbed-menu",keepScrollPosition:!0,suppressFocusBodyOnOpen:!0,suppressTrapFocus:!0,enableCloseButton:!0,closeButtonAriaLabel:this.chartTranslationService.translate("ariaChartMenuClose"),onCloseClicked:()=>{this.eventSource?.focus({preventScroll:!0}),this.dispatchLocalEvent({type:"closed"})}}),this.createBean(this.tabbedLayout)}createTab(e,t,i){const s=document.createElement("div");s.classList.add("ag-chart-tab",`ag-chart-${t}`),this.createBean(i),s.appendChild(i.getGui());const n=document.createElement("div"),r=this.chartTranslationService.translate(t);return n.innerText=r,{title:n,titleLabel:r,bodyPromise:an.resolve(s),getScrollableContainer:()=>s.querySelector(".ag-scrollable-container")||s,name:e}}showTab(e){const t=this.tabs[e];this.tabbedLayout.showItem(t)}getGui(){return this.tabbedLayout&&this.tabbedLayout.getGui()}showMenu(e,t){this.eventSource=e,t||this.tabbedLayout?.focusHeader(!0)}destroy(){this.parentComponent&&this.parentComponent.isAlive()&&this.destroyBean(this.parentComponent),super.destroy()}createPanel(t){switch(t){case e.TAB_DATA:return new cG(this.chartMenuContext);case e.TAB_FORMAT:return new jG(this.chartMenuContext);default:return new HB(this.chartMenuContext.chartController)}}};WB.TAB_DATA="data",WB.TAB_FORMAT="format";var jB=WB,UB=class extends Rs{constructor(e,t,i){super('<div class="ag-chart-menu-wrapper"></div>'),this.eChartContainer=e,this.eMenuPanelContainer=t,this.chartMenuContext=i,this.buttons={chartLink:{iconName:"linked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartUnlink:{iconName:"unlinked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartDownload:{iconName:"save",callback:()=>this.chartMenuService.downloadChart(this.chartMenuContext)},chartMenu:{iconName:"menuAlt",callback:e=>this.showMenuList(e)}},this.panels=[],this.menuVisible=!1,this.chartController=i.chartController}wireBeans(e){this.chartMenuService=e.chartMenuService,this.chartMenuListFactory=e.chartMenuListFactory,this.environment=e.environment}postConstruct(){this.chartToolbar=this.createManagedBean(new JO),this.getGui().appendChild(this.chartToolbar.getGui()),this.refreshToolbarAndPanels(),this.addManagedEventListeners({chartCreated:e=>{if(e.chartId===this.chartController.getChartId()){Boolean(this.gos.get("chartToolPanelsDef")?.defaultToolPanel)&&this.showMenu({panel:this.defaultPanel,suppressFocus:!0})}}}),this.addManagedListeners(this.chartController,{chartLinkedChanged:this.refreshToolbarAndPanels.bind(this)}),this.refreshMenuClasses(),this.addManagedListeners(this.chartController,{chartApiUpdate:this.refreshToolbarAndPanels.bind(this)})}isVisible(){return this.menuVisible}getExtraPaddingDirections(){return["chartMenu","chartLink","chartUnlink","chartDownload"].some((e=>this.chartToolbarOptions.includes(e)))?["top"]:[]}refreshToolbarAndPanels(){this.initToolbarOptionsAndPanels(),this.updateToolbar()}initToolbarOptionsAndPanels(){const{panels:e,defaultPanel:t}=this.chartMenuService.getChartToolPanels(this.chartController);this.panels=e,this.defaultPanel=t,this.chartToolbarOptions=this.chartMenuService.getChartToolbarOptions()}updateToolbar(){const e=this.chartToolbarOptions.map((e=>{const{iconName:t,callback:i}=this.buttons[e];return{buttonName:e,iconName:t,callback:i}}));this.chartToolbar.updateParams({buttons:e})}createMenuPanel(e){const t=this.menuPanel=this.createBean(new fk({height:"100%",closable:!0,hideTitleBar:!0,cssIdentifier:"chart-menu"}));return t.setParentComponent(this),this.eMenuPanelContainer.appendChild(t.getGui()),this.tabbedMenu=this.createBean(new jB(this.panels,this.chartMenuContext)),this.addManagedListeners(this.tabbedMenu,{closed:()=>{this.hideMenu()}}),this.addManagedListeners(t,{destroyed:()=>this.destroyBean(this.tabbedMenu)}),new an((i=>{window.setTimeout((()=>{t.setBodyComponent(this.tabbedMenu),this.tabbedMenu.showTab(e),i(t)}),100)}))}showContainer(e,t){this.menuPanel&&(this.menuVisible=!0,this.refreshMenuClasses(),this.tabbedMenu.showMenu(e,t))}showMenu(e){const{panel:t,eventSource:i,suppressFocus:s}=e??{};if(this.menuPanel&&!t)this.showContainer(i,s);else{const e=t||this.defaultPanel;let n=this.panels.indexOf(e);n<0&&(h(`'${t}' is not a valid Chart Tool Panel name`),n=this.panels.indexOf(this.defaultPanel)),this.menuPanel?(this.tabbedMenu.showTab(n),this.showContainer(i,s)):this.createMenuPanel(n).then((()=>this.showContainer(i,s)))}}hideMenu(){this.menuVisible=!1,this.refreshMenuClasses()}refreshMenuClasses(){this.eChartContainer.classList.toggle("ag-chart-menu-visible",this.menuVisible),this.eChartContainer.classList.toggle("ag-chart-menu-hidden",!this.menuVisible)}showMenuList(e){this.chartMenuListFactory.showMenuList({eventSource:e,showMenu:()=>this.showMenu({eventSource:e}),chartMenuContext:this.chartMenuContext})}destroy(){super.destroy(),this.menuPanel&&this.menuPanel.isAlive()&&this.destroyBean(this.menuPanel),this.tabbedMenu&&this.tabbedMenu.isAlive()&&this.destroyBean(this.tabbedMenu)}},_B=["number","category","time","grouped-category"],KB=[..._B,"angle-category","angle-number","radius-category","radius-number"],$B=class extends ze{constructor(e){super(),this.chartController=e}getChartThemeOverridesProxy(){return{getValue:e=>this.getChartOption(e),setValue:(e,t)=>
2this.setChartThemeOverrides([{expression:e,value:t}]),setValues:e=>this.setChartThemeOverrides(e)}}getAxisThemeOverridesProxy(){return{getValue:e=>this.getAxisProperty(e),setValue:(e,t)=>this.setAxisThemeOverrides([{expression:e,value:t}]),setValues:e=>this.setAxisThemeOverrides(e)}}getCartesianAxisOptionsProxy(e){return{getValue:t=>this.getCartesianAxisProperty(e,t),setValue:(t,i)=>this.setCartesianAxisOptions(e,[{expression:t,value:i}]),setValues:t=>this.setCartesianAxisOptions(e,t)}}getCartesianAxisThemeOverridesProxy(e){return{getValue:t=>this.getCartesianAxisProperty(e,t),setValue:(t,i)=>this.setCartesianAxisThemeOverrides(e,[{expression:t,value:i}]),setValues:t=>this.setCartesianAxisThemeOverrides(e,t)}}getCartesianAxisAppliedThemeOverridesProxy(e){return{getValue:t=>this.getCartesianAxisThemeOverride(e,"*"===t?null:t),setValue:(t,i)=>this.setCartesianAxisThemeOverrides(e,[{expression:"*"===t?null:t,value:i}]),setValues:t=>this.setCartesianAxisThemeOverrides(e,t)}}getSeriesOptionsProxy(e){return{getValue:(t,i)=>this.getSeriesOption(e(),t,i),setValue:(t,i)=>this.setSeriesOptions(e(),[{expression:t,value:i}]),setValues:t=>this.setSeriesOptions(e(),t)}}getPersistedChartThemeOverrides(e,t,i,s){const n=this.getRetainedChartThemeOverrideKeys(i,s),r=this.getRetainedChartAxisThemeOverrideKeys(null,i,s),o=this.createChartOptions();for(const a of n){const t=this.retrieveChartOptionsThemeOverride(e,i,a);void 0!==t&&this.assignChartOptionsThemeOverride(o,s,a,t)}return t&&this.assignPersistedAxisOverrides({existingAxes:t,retainedChartAxisThemeOverrideKeys:r,existingChartOptions:e,targetChartOptions:o,existingChartType:i,targetChartType:s}),o.theme.overrides}assignPersistedAxisOverrides(e){const{existingAxes:t,retainedChartAxisThemeOverrideKeys:i,existingChartOptions:s,targetChartOptions:n,existingChartType:r,targetChartType:o}=e;for(const{expression:a,targetAxisTypes:l}of i)for(const e of t.map((e=>e.type))){const t=this.retrieveChartOptionsThemeOverride(s,r,["axes",e,a].join("."));if(void 0!==t)for(const e of l)this.assignChartOptionsThemeOverride(n,o,["axes",e,a].join("."),t)}}getRetainedChartThemeOverrideKeys(e,t){const i=["zoom","navigator"];return["animation",...((e,t)=>{const s=new Array;return MN(AN(e))&&MN(AN(t))&&s.push(...i),s})(e,t)]}getRetainedChartAxisThemeOverrideKeys(e,t,i){if(MN(AN(t))&&MN(AN(i))){return this.getRetainedCartesianAxisThemeOverrideKeys(e).map((e=>({expression:e,targetAxisTypes:_B})))}return[]}getRetainedCartesianAxisThemeOverrideKeys(e){const t="xAxis"===e?["",".top",".bottom"]:"yAxis"===e?["",".left",".right"]:["",".left",".right",".top",".bottom"],i=["crosshair"],s=new Array;for(const n of i)for(const e of t)s.push(`${n}${e}`);return s}getChartOption(e){return nO(this.getChart(),e,void 0)}setChartThemeOverrides(e){const t=this.getChartType(),i=this.createChartOptions();for(const{expression:s,value:n}of e)this.assignChartOptionsThemeOverride(i,t,s,n);this.applyChartOptions(i)}applyChartOptions(e,t){if(0===Object.keys(e).length)return;this.updateChart(e);!t?.silent&&this.raiseChartOptionsChangedEvent()}awaitChartOptionUpdate(e){this.chartController.getChartProxy().getChart().waitForUpdate().then((()=>e())).catch((e=>c("chart update failed",e)))}getAxisProperty(e){return nO(this.getChart().axes?.[0],e,void 0)}setAxisThemeOverrides(e){const t=this.getChart(),i=this.getChartType(),s=this.createChartOptions();for(const{expression:n,value:r}of e){const e=t.axes?.filter((e=>{const t=n.split(".");let i=e;for(const s of t){if(!(s in i))return!1;i=i[s]}return!0}));if(e)for(const t of e)this.isValidAxisType(t)&&this.assignChartAxisThemeOverride(s,i,t.type,null,n,r)}this.applyChartOptions(s)}getCartesianAxisProperty(e,t){const i=this.getChartAxes();return nO(this.getCartesianAxis(i,e),t,void 0)}getCartesianAxisThemeOverride(e,t){const i=this.getChartAxes(),s=this.getCartesianAxis(i,e);if(!s||!this.isValidAxisType(s))return;const n=this.getChartType(),r=this.getChart().getOptions();return this.retrieveChartAxisThemeOverride(r,n,s.type,"yAxis"===e?["left","right"]:["bottom","top"],t)}setCartesianAxisThemeOverrides(e,t){const i=this.getChartAxes(),s=this.getCartesianAxis(i,e);if(!s||!this.isValidAxisType(s))return;const n=this.getChartType(),r=this.createChartOptions();for(const{expression:o,value:a}of t)this.assignChartAxisThemeOverride(r,n,s.type,"yAxis"===e?["left","right"]:["bottom","top"],o,a);this.applyChartOptions(r)}setCartesianAxisOptions(e,t){this.updateCartesianAxisOptions(e,((e,i,s)=>{const n=i.indexOf(s);for(const{expression:r,value:o}of t)this.assignChartOption(e,`axes.${n}.${r}`,o)}))}updateCartesianAxisOptions(e,t){const i=this.getChart().getOptions(),s="axes"in i?i.axes:void 0;if(!i||!s)return;const n=this.getChartAxes(),r=this.getCartesianAxis(n,e);if(!r)return;const o=this.createChartOptions();o.axes=s,t(o,n,r,i),this.applyChartOptions(o)}setCartesianCategoryAxisType(e,t){this.updateCartesianAxisOptions(e,((i,s,n,r)=>{const o=this.getChartType();this.assignPersistedAxisOverrides({existingAxes:[n],retainedChartAxisThemeOverrideKeys:this.getRetainedChartAxisThemeOverrideKeys(e,o,o),existingChartOptions:r,targetChartOptions:i,existingChartType:o,targetChartType:o}),this.assignChartOption(i,"axes.0.type",t),this.chartController.setCategoryAxisType(t)}))}getCartesianAxis(e,t){if(!(e.length<2))switch(t){case"xAxis":return"x"===e[0].direction?e[0]:e[1];case"yAxis":return"y"===e[1].direction?e[1]:e[0]}}getSeriesOption(e,t,i){const s=this.getChart().series.find((t=>function(e,t){return function(e){return!!SN[e]}(e)&&t.type===e}(e,t)));return nO(i?s:s?.properties.toJson(),t,void 0)}setSeriesOptions(e,t){const i=this.createChartOptions();for(const{expression:s,value:n}of t)this.assignChartOptionsSeriesThemeOverride(i,e,`series.${s}`,n);this.applyChartOptions(i)}getPairedMode(){return this.chartController.getChartProxy().isPaired()}setPairedMode(e){this.chartController.getChartProxy().setPaired(e)}getChartAxes(){return this.getChart().axes??[]}
2retrieveChartAxisThemeOverride(e,t,i,s,n){if(!s)return this.retrieveChartOptionsThemeOverride(e,t,["axes",i,...n?[n]:[]].join("."));for(const r of s){const s=this.retrieveChartOptionsThemeOverride(e,t,["axes",i,r,...n?[n]:[]].join("."));if(void 0!==s)return s}}assignChartAxisThemeOverride(e,t,i,s,n,r){if(s)for(const o of s)this.assignChartOptionsThemeOverride(e,t,["axes",i,o,...n?[n]:[]].join("."),r);else this.assignChartOptionsThemeOverride(e,t,["axes",i,...n?[n]:[]].join("."),r)}isValidAxisType(e){return KB.includes(e.type)}getChartType(){return this.chartController.getChartType()}getChart(){return this.chartController.getChartProxy().getChart()}updateChart(e){const t=this.chartController.getChartProxy().getChartRef();t.skipAnimations(),t.updateDelta(e)}createChartOptions(){return{theme:{overrides:{}}}}retrieveChartOptionsThemeOverride(e,t,i){const s=this.getChartThemeOverridesSeriesTypeKeys(t);for(const n of s){const t=this.retrieveChartOptionsSeriesThemeOverride(e,n,i);if(void 0!==t)return t}}assignChartOptionsThemeOverride(e,t,i,s){const n=this.getChartThemeOverridesSeriesTypeKeys(t);for(const r of n)this.assignChartOptionsSeriesThemeOverride(e,r,i,s)}retrieveChartOptionsSeriesThemeOverride(e,t,i){return this.retrieveChartOption(e,["theme","overrides",t,...i?[i]:[]].join("."))}assignChartOptionsSeriesThemeOverride(e,t,i,s){this.assignChartOption(e,["theme","overrides",t,...i?[i]:[]].join("."),s)}getChartThemeOverridesSeriesTypeKeys(e){const t=this.chartController.getChartSeriesTypes(e);return this.chartController.isComboChart()&&t.push("common"),t}retrieveChartOption(e,t){return nO(e,t,void 0)}assignChartOption(e,t,i){!function(e,t,i){if(null==e)return;const s=t.split(".");let n=e;s.forEach(((e,t)=>{n[e]||(n[e]={}),t<s.length-1&&(n=n[e])})),n[s[s.length-1]]=i}(e,t,i)}raiseChartOptionsChangedEvent(){const e=this.chartController.getChartModel();this.eventService.dispatchEvent({type:"chartOptionsChanged",chartId:e.chartId,chartType:e.chartType,chartThemeName:this.chartController.getChartThemeName(),chartOptions:e.chartOptions})}destroy(){super.destroy()}};var YB=class e extends Rs{constructor(e){super('<div class="ag-chart">\n            <div data-ref="eChartContainer" class="ag-chart-components-wrapper ag-chart-menu-hidden">\n                <div data-ref="eChart" class="ag-chart-canvas-wrapper"></div>\n                <div data-ref="eEmpty" class="ag-chart-empty-text ag-unselectable"></div>\n            </div>\n            <div data-ref="eMenuContainer" class="ag-chart-docked-container"></div>\n            </div>'),this.eChart=Is,this.eChartContainer=Is,this.eMenuContainer=Is,this.eEmpty=Is,this.params=e}wireBeans(e){this.crossFilterService=e.chartCrossFilterService,this.chartTranslationService=e.chartTranslationService,this.chartMenuService=e.chartMenuService,this.focusService=e.focusService,this.popupService=e.popupService}postConstruct(){const e={...this.params,chartType:RN(this.params.chartType),chartThemeName:this.getThemeName()},t=this.gos.get("enableRtl");this.addCssClass(t?"ag-rtl":"ag-ltr");const i=this.createBean(new mO(e));this.chartController=this.createManagedBean(new IO(i)),this.chartOptionsService=this.createManagedBean(new $B(this.chartController)),this.validateCustomThemes(),this.createChart(),this.params.insideDialog&&this.addDialog(),this.addMenu(),this.addManagedElementListeners(this.getGui(),{focusin:this.setActiveChartCellRange.bind(this)}),this.addManagedListeners(this.chartController,{chartModelUpdate:this.update.bind(this)}),this.addManagedPropertyListeners(["chartThemeOverrides","chartThemes"],this.reactivePropertyUpdate.bind(this)),this.update(),this.raiseChartCreatedEvent()}createChart(){let t;this.chartProxy&&(t=this.chartProxy.destroy({keepChartInstance:!0}));const i=this.chartController.getChartType(),s={chartType:i,chartInstance:t,getChartThemeName:this.getChartThemeName.bind(this),getChartThemes:this.getChartThemes.bind(this),customChartThemes:this.gos.get("customChartThemes"),getGridOptionsChartThemeOverrides:()=>this.getGridOptionsChartThemeOverrides(),getExtraPaddingDirections:()=>this.chartMenu?.getExtraPaddingDirections()??[],apiChartThemeOverrides:this.params.chartThemeOverrides,crossFiltering:this.params.crossFiltering??!1,crossFilterCallback:(e,t)=>{this.params.crossFilteringContext.lastSelectedChartId=t?"":this.chartController.getChartId(),t&&this.params.crossFilteringResetCallback(),this.crossFilterService.filter(e,t)},parentElement:this.eChart,grouping:this.chartController.isGrouping(),chartThemeToRestore:this.params.chartThemeName,chartOptionsToRestore:this.params.chartOptionsToRestore,chartPaletteToRestore:this.params.chartPaletteToRestore,seriesChartTypes:this.chartController.getSeriesChartTypes(),translate:e=>this.chartTranslationService.translate(e)};this.params.chartOptionsToRestore=void 0,this.chartType=i,this.chartProxy=e.createChartProxy(s),this.chartProxy?(this.chartController.setChartProxy(this.chartProxy),this.createMenuContext()):h("invalid chart type supplied: "+s.chartType)}createMenuContext(){if(this.chartMenuContext)return;const e=this.createManagedBean(new rG(this.chartOptionsService.getChartThemeOverridesProxy())),t=this.createManagedBean(new rG(this.chartOptionsService.getAxisThemeOverridesProxy()));this.chartMenuContext={chartController:this.chartController,chartOptionsService:this.chartOptionsService,chartMenuParamsFactory:e,chartAxisMenuParamsFactory:t}}getChartThemeName(){return this.chartController.getChartThemeName()}getChartThemes(){return this.chartController.getThemeNames()}getGridOptionsChartThemeOverrides(){return this.gos.get("chartThemeOverrides")}static createChartProxy(e){switch(e.chartType){case"column":case"bar":case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":return new kO(e);case"pie":case"donut":case"doughnut":return new _O(e);case"area":case"stackedArea":case"normalizedArea":return new TO(e);case"line":return new OO(e);case"scatter":case"bubble":return new GO(e);case"histogram":return new NO(e);case"radarLine":case"radarArea":case"nightingale":case"radialColumn":case"radialBar":return new KO(e);case"rangeBar":case"rangeArea":return new XO(e);case"boxPlot":return new QO(e);case"treemap":case"sunburst":return new UO(e);case"heatmap":return new $O(e);case"waterfall":return new BO(e);case"columnLineCombo":case"areaColumnCombo":case"customCombo":return new VO(e);
2default:throw`AG Grid: Unable to create chart as an invalid chartType = '${e.chartType}' was supplied.`}}addDialog(){const e=this.chartTranslationService.translate(this.params.pivotChart?"pivotChartTitle":"rangeChartTitle"),{width:t,height:i}=this.getBestDialogSize(),s=this.params.focusDialogOnOpen?()=>setTimeout((()=>this.focusService.focusInto(this.getGui()))):void 0;this.chartDialog=new vk({resizable:!0,movable:!0,maximizable:!0,title:e,width:t,height:i,component:this,centered:!0,closable:!0,afterGuiAttached:s,postProcessPopupParams:{type:"chart"}}),this.createBean(this.chartDialog),this.chartDialog.addEventListener("destroyed",(()=>{this.destroy(),this.chartMenuService.hideAdvancedSettings();const e=this.focusService.getFocusedCell();setTimeout((()=>{this.focusService.isAlive()&&(e?this.focusService.setFocusedCell({...e,forceBrowserFocus:!0}):this.focusService.focusGridInnerElement())}))}))}getBestDialogSize(){const e=this.popupService.getPopupParent(),t=.75*es(e),i=.75*Ji(e),s=this.chartProxy.getChart();let n=this.params.insideDialog?850:s.width,r=this.params.insideDialog?470:s.height;return(n>t||r>i)&&(n=Math.min(n,t),r=Math.round(.553*n),r>i&&(r=i,n=Math.min(n,Math.round(r/.553)))),{width:n,height:r}}addMenu(){this.params.crossFiltering||(this.chartMenu=this.createBean(new UB(this.eChartContainer,this.eMenuContainer,this.chartMenuContext)),this.eChartContainer.appendChild(this.chartMenu.getGui()))}update(e){if(e?.chartId){if(!this.chartController.update(e))return}const t=this.chartTypeChanged(e),i=t||this.chartEmpty?(e=>{const t=this.chartType,i=e,s=this.chartProxy.getChart(),n=s?.getOptions(),r=s?.axes;return this.chartOptionsService.getPersistedChartThemeOverrides(n,r,t,i??t)})(t):void 0;t&&this.createChart(),i&&e?.chartThemeOverrides&&nt(i,e.chartThemeOverrides);const s=i??e?.chartThemeOverrides;this.updateChart(s),e?.chartId&&this.chartProxy.getChart().waitForUpdate().then((()=>{this.chartController.raiseChartApiUpdateEvent()}))}updateChart(e){const{chartProxy:t}=this,i=this.chartController.getSelectedValueColState(),s=this.chartController.getChartData(),n=this.handleEmptyChart(s,i.length);if(this.chartEmpty=n,n)return void(e&&this.chartController.updateThemeOverrides(e));const r=this.chartController.getChartUpdateParams(e);t.update(r),this.chartProxy.getChart().waitForUpdate().then((()=>{this.chartController.raiseChartUpdatedEvent()}))}chartTypeChanged(e){const[t,i]=[this.chartController.getChartType(),e?.chartType],s=i?RN(i):void 0;return this.chartType!==t?s??t:s&&t!==s?s:null}getChartModel(){return this.chartController.getChartModel()}getChartImageDataURL(e){return this.chartProxy.getChartImageDataURL(e)}handleEmptyChart(e,t){const i=this.chartController.isPivotChart()&&!this.chartController.isPivotMode(),s=this.chartController.getChartType();let n=1;this.chartController.isActiveXYChart()?n="bubble"===s?3:2:IN(AN(s))&&(n=0);const r=t<n||0===e.length;if(this.eChart){const e=i||r;Ki(this.eChart,!e),Ki(this.eEmpty,e)}return i?(this.eEmpty.innerText=this.chartTranslationService.translate("pivotChartRequiresPivotMode"),!0):!!r&&(this.eEmpty.innerText=this.chartTranslationService.translate("noDataToChart"),!0)}downloadChart(e,t,i){this.chartProxy.downloadChart(e,t,i)}openChartToolPanel(e){const t=e?JN[e]:e;this.chartMenu.showMenu({panel:t})}closeChartToolPanel(){this.chartMenu.hideMenu()}getChartId(){return this.chartController.getChartId()}getUnderlyingChart(){return this.chartProxy.getChartRef()}crossFilteringReset(){this.chartProxy.crossFilteringReset()}setActiveChartCellRange(e){this.getGui().contains(e.relatedTarget)||(this.chartController.setChartRange(!0),this.focusService.clearFocusedCell())}getThemeName(){const e=this.gos.get("chartThemes")||DO;if(0===e.length)throw new Error("Cannot create chart: no chart themes available.");const{chartThemeName:t}=this.params;return Ee(e,t)?t:e[0]}getAllKeysInObjects(e){const t={};return e.filter((e=>null!=e)).forEach((e=>{Object.keys(e).forEach((e=>t[e]=null))})),Object.keys(t)}validateCustomThemes(){const e=this.getChartThemes(),t=this.gos.get("customChartThemes");
2t&&this.getAllKeysInObjects([t]).forEach((t=>{Ee(e,t)||h("a custom chart theme with the name '"+t+"' has been supplied but not added to the 'chartThemes' list")}))}reactivePropertyUpdate(){this.chartController.setChartThemeName(this.getThemeName(),!0);const e=this.getChartId(),t=this.chartController.isCrossFilterChart()?"crossFilter":this.getChartModel().modelType,i=this.gos.get("chartThemeOverrides")||{};this.update({type:`${t}ChartUpdate`,chartId:e,chartThemeOverrides:i})}raiseChartCreatedEvent(){this.chartProxy.getChart().waitForUpdate().then((()=>{this.eventService.dispatchEvent({type:"chartCreated",chartId:this.chartController.getChartId()})}))}raiseChartDestroyedEvent(){this.eventService.dispatchEvent({type:"chartDestroyed",chartId:this.chartController.getChartId()})}destroy(){super.destroy(),this.chartProxy&&this.chartProxy.destroy(),this.destroyBean(this.chartMenu),this.chartDialog&&this.chartDialog.isAlive()&&this.destroyBean(this.chartDialog),this.onDestroyColorSchemeChangeListener?.();const e=this.getGui();rs(e),os(e),this.raiseChartDestroyedEvent()}},ZB=!1;function qB(e){e.version;return null==e.version&&(e.version=function(e){const t=e;if(null!=e.version)return e.version;const i=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return Object.keys(e||{}).some((e=>i.includes(e)))},s=t.chartOptions,n=i(s,"seriesDefaults")?s?.seriesDefaults:s?.[Object.keys(s)[0]],r={"27.0.0":i(t,"seriesChartTypes"),"26.2.0":!i(s,"seriesDefaults"),"26.1.0":i(n?.highlightStyle,"item"),"26.0.0":i(n?.highlightStyle,"series"),"25.1.0":i(n?.label,"minAngle"),"25.0.0":i(t,"modelType","aggFunc","unlinkChart","suppressChartRanges")||i(n,"lineDash","lineDashOffset"),"24.0.0":i(t,"chartThemeName","chart")||i(s,"series"),"23.2.0":i(s,"navigator"),"23.0.0":i(s?.legend?.item?.marker,"shape"),"22.1.0":i(t,"chartPalette","chartType")},o="27.1.0",a=Object.entries(r).filter((e=>{let[t,i]=e;return i}));ZB;const[l=o]=a[0];ZB;return l}(e)),e=dV("23.0.0",e,QB),e=dV("24.0.0",e,XB),e=dV("25.1.0",e,JB),e=dV("26.0.0",e,eV),e=dV("26.1.0",e,tV),e=dV("26.2.0",e,iV),e=dV("28.0.0",e,sV),e=dV("28.2.0",e,nV),e=dV("29.0.0",e,rV),e=dV("29.1.0",e,oV),e=dV("29.2.0",e,aV),e=dV("30.0.0",e,lV),e=dV("31.0.0",e,hV),e=function(e){return e=CV("chartOptions.*.width",e),e=CV("chartOptions.*.height",e),e=gV("chartOptions.*.axes.category.label.autoRotate",!0,e),e}(e=dV("32.0.0",e,cV)),e=dV(iO,e,(e=>e))}function QB(e){return e=yV("chartOptions.legend.item.marker.type","shape",e),e=yV("chartOptions.seriesDefaults.marker.type","shape",e),e=yV("chartOptions.legend.padding","spacing",e)}function XB(e){e=CV("chartOptions.seriesDefaults.marker.minSize",e);const{chartType:t,chartPalette:i,chartOptions:{xAxis:s,yAxis:n,...r},...o}=e,a=function(e){switch(e){case"bar":case"stackedBar":case"normalizedBar":return["number","category"];case"groupedBar":return["number","grouped-category"];case"column":case"stackedColumn":case"normalizedColumn":case"line":case"area":case"stackedArea":case"normalizedArea":case"histogram":return["category","number"];case"groupedColumn":return["grouped-category","number"];case"scatter":case"bubble":return["number","number"];default:return}}(t),l=a?.map(((e,t)=>({type:e,...0===t?s:n})));return{chartType:t,chartThemeName:{borneo:"ag-default",material:"ag-material",bright:"ag-vivid"}[i]??"ag-default",chartOptions:{...r,axes:l,xAxis:s,yAxis:n},...o}}function JB(e){return e=yV("chartOptions.seriesDefaults.label.minRequiredA
2ngle","minAngle",e)}function eV(e){return e=CV("chart",e=wV("chartOptions.seriesDefaults.highlightStyle",e,(e=>{let{dimOpacity:t,...i}=e;return{...i,...null!=t?{series:{dimOpacity:t}}:{}}}))),e=CV("chartOptions.seriesDefaults.tooltipClass",e),e=pV("chartOptions.axes[].label.rotation",0,e=CV("chartOptions.seriesDefaults.tooltipTracking",e)),e=pV("chartOptions.axes[].label.rotation",335,e)}function tV(e){const t=e=>{let{item:t,series:i,...s}=e;return{item:{...s,...t},...i?{series:i}:{}}};return e=wV("chartOptions.seriesDefaults.highlightStyle",e,t),e=wV("chartOptions.series[].highlightStyle",e,t)}function iV(e){e=fV("chartOptions.seriesDefaults.fill.opacity","chartOptions.seriesDefaults.fillOpacity",e),e=fV("chartOptions.seriesDefaults.stroke.opacity","chartOptions.seriesDefaults.strokeOpacity",e),e=CV("chartOptions.seriesDefaults.fill",e=fV("chartOptions.seriesDefaults.stroke.width","chartOptions.seriesDefaults.strokeWidth",e)),e=CV("chartOptions.seriesDefaults.stroke",e),e=CV("chartOptions.seriesDefaults.callout.colors",e),e=CV("chartOptions.xAxis",e),e=CV("chartOptions.yAxis",e);const{chartType:t,chartOptions:{axes:i,series:s,seriesDefaults:n,...r},...o}=e,a=RN(t),l=AN(a),h=[l],c={};if(!TN(l)){const e={top:{},bottom:{},left:{},right:{}},t=i.map((t=>{let{type:i,...s}=t;return{[i]:{...e,...s}}})).reduce(bV,{});sO.filter((e=>null==t[e])).forEach((i=>{t[i]={...e}})),c.axes=t}return e={...o,chartType:a,chartOptions:h.map((e=>({[e]:{...c,series:n,...r}}))).reduce(bV,{})}}function sV(e){return e=CV("chartOptions.*.title.padding",e),e=CV("chartOptions.*.subtitle.padding",e),e=gV("chartOptions.*.axes.*.title.enabled",!1,e=CV("chartOptions.*.axes.*.title.padding",e))}function nV(e){return e=yV("chartOptions.pie.series.callout","calloutLine",e),e=yV("chartOptions.pie.series.label","calloutLabel",e),e=yV("chartOptions.pie.series.labelKey","sectorLabelKey",e),e=yV("chartOptions.pie.series.labelName","sectorLabelName",e),e=yV("chartOptions.donut.series.callout","calloutLine",e),e=yV("chartOptions.donut.series.label","calloutLabel",e),e=yV("chartOptions.donut.series.labelKey","sectorLabelKey",e),e=yV("chartOptions.donut.series.labelName","sectorLabelName",e)}function rV(e){return e=vV("chartOptions.scatter.series.fill","chartOptions.scatter.series.marker.fill",e),e=vV("chartOptions.scatter.series.fillOpacity","chartOptions.scatter.series.marker.fillOpacity",e),e=vV("chartOptions.scatter.series.stroke","chartOptions.scatter.series.marker.stroke",e),e=vV("chartOptions.scatter.series.strokeOpacity","chartOptions.scatter.series.marker.strokeOpacity",e),e=fV("chartOptions.scatter.series.paired","chartOptions.scatter.paired",e=vV("chartOptions.scatter.series.strokeWidth","chartOptions.scatter.series.marker.strokeWidth",e))}function oV(e){return e=CV("chartOptions.axes[].tick.count",e)}function aV(e){return e=wV("chartOptions.*.tooltip",e,(e=>{let{tracking:t,...i}=e;const s={...i};return!1===t?(s.position??(s.position={type:"pointer"}),s.range??(s.range="nearest")):!0===t&&(s.position??(s.position={type:"node"}),s.range??(s.range="nearest")),s}))}function lV(e){return e=yV("chartOptions.pie.series.labelKey","sectorLabelKey",e),e=gV("chartOptions.common.legend.position","right",e=mV("chartOptions.common.legend.enabled",!0,e=CV("chartOptions.*.series.flipXY",e=aV(e=oV(e=yV("chartOptions.pie.series.labelName","sectorLabelName",e))))))}function hV(e){const t=yV("chartOptions.column","bar",e),i={"ag-pastel":"ag-sheets","ag-solar":"ag-polychroma"}[t.chartThemeName]||t.chartThemeName;return{...t,chartThemeName:i}}function cV(e){return e=SV("chartOptions.*.autoSize",!0,e,((e,t)=>{!0===e[t]||!1===e[t]&&(e.minHeight=600,e.minWidth=300),delete e[t]}))}function dV(e,t,i){if(uV(e)>uV(t.version)){ZB;const s=i(t);return s.version=e,s}return t}function uV(e){const{major:t,minor:i,patch:s}=function(e){const t="string"===typeof e?e.split(".").map((e=>Number(e))):[];if(3!==t.length||t.some((e=>isNaN(e))))throw new Error("AG Grid - Illegal version string: "+e);return{major:t[0],minor:t[1],patch:t[2]}}(e);return 1e4*t+100*i+s}function pV(e,t,i){return SV(e,!0,i,((e,i)=>{e[i]===t&&delete e[i]}))}function gV(e,t,i){return SV(e,!1,i,((e,i)=>{null==e[i]&&(e[i]=t)}))}function mV(e,t,i){"string"===typeof e&&(e=e.split("."));const s=e[0];e.length>1&&(i[s]=mV(e.slice(1),t,i[s]??{}));return Object.keys(i).includes(s)||(i[s]=t),i}function fV(e,t,i){let s,n=!1;return i=SV(e,!0,i,((e,t)=>{n=!0,s=e[t],delete e[t]})),n?SV(t,!1,i,((e,t)=>{e[t]=s})):i}function vV(e,t,i){let s,n=!1;return i=SV(e,!0,i,((e,t)=>{n=!0,s=e[t],delete e[t]})),n?SV(t,!1,i,((e,t)=>{void 0===e[t]&&(e[t]=s)})):i}function yV(e,t,i){return SV(e,!0,i,((e,i)=>{e[t]=e[i],delete e[i]}))}function CV(e,t){return SV(e,!0,t,((e,t)=>
2delete e[t]))}function SV(e,t,i,s){const n=e instanceof Array?e:e.split("."),r=n.slice(0,n.length-1),o=n[n.length-1];return wV(r,i,(e=>{const i=Object.keys(e).includes(o);if(t&&!i)return e;const n={...e};return s(n,o),n}))}function wV(e,t,i){const s=e instanceof Array?e:e.split(".");if(t={...t},0===s.length)return i(t);if(s[0].startsWith("{")){const e=s[0].substring(1,s[0].lastIndexOf("}")).split(",");for(const n of e)null!=t[n]&&(t[n]=wV(s.slice(1),t[n],i))}else if(s[0].endsWith("[]")){const n=s[0].substring(0,e[0].indexOf("["));t[n]instanceof Array&&(t[n]=t[n].map((e=>wV(s.slice(1),e,i))))}else if("*"===s[0])for(const n in t)t[n]=wV(s.slice(1),t[n],i);else null!=t[s[0]]&&(t[s[0]]=wV(s.slice(1),t[s[0]],i));return t}var bV=(e,t)=>({...e,...t}),xV=class extends ze{constructor(){super(...arguments),this.beanName="chartService",this.activeCharts=new Set,this.activeChartComps=new Set,this.crossFilteringContext={lastSelectedChartId:""},this.isEnterprise=()=>yF.enterpriseModule.isEnterprise}wireBeans(e){this.visibleColsService=e.visibleColsService,this.rangeService=e.rangeService,this.environment=e.environment,this.focusService=e.focusService}updateChart(e){if(0===this.activeChartComps.size)return void h("No active charts to update.");const t=[...this.activeChartComps].find((t=>t.getChartId()===e.chartId));t?t.update(e):h(`Unable to update chart. No active chart found with ID: ${e.chartId}.`)}getChartModels(){const e=[];return this.activeChartComps.forEach((t=>e.push((e=>({...e,version:iO}))(t.getChartModel())))),e}getChartRef(e){let t;return this.activeCharts.forEach((i=>{i.chartId===e&&(t=i)})),t}getChartComp(e){let t;return this.activeChartComps.forEach((i=>{i.getChartId()===e&&(t=i)})),t}getChartImageDataURL(e){let t;return this.activeChartComps.forEach((i=>{i.getChartId()===e.chartId&&(t=i.getChartImageDataURL(e.fileFormat))})),t}downloadChart(e){const t=Array.from(this.activeChartComps).find((t=>t.getChartId()===e.chartId));t?.downloadChart(e.dimensions,e.fileName,e.fileFormat)}openChartToolPanel(e){const t=Array.from(this.activeChartComps).find((t=>t.getChartId()===e.chartId));t?.openChartToolPanel(e.panel)}closeChartToolPanel(e){const t=Array.from(this.activeChartComps).find((t=>t.getChartId()===e));t?.closeChartToolPanel()}createChartFromCurrentRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"groupedColumn",t=arguments.length>1?arguments[1]:void 0;const i=this.getSelectedRange();return this.createChart({cellRange:i,chartType:e,focusDialogOnOpen:!t})}restoreChart(e,t){if(!e)return void h("unable to restore chart as no chart model is provided");let i,s,n,r;return e.version!==iO&&(e=qB(e)),"pivot"===e.modelType?(this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"}),i=this.createCellRange(void 0,!0),s=!0,n=!0):(i=this.createCellRange(e.cellRange),r=e.chartPalette,n=e.suppressChartRanges),i?this.createChart({...e,cellRange:i,pivotChart:s,suppressChartRanges:n,chartContainer:t,chartOptionsToRestore:e.chartOptions,chartPaletteToRestore:r}):void 0}createRangeChart(e,t){const i=this.createCellRange(e.cellRange);if(i)return this.createChart({...e,cellRange:i,focusDialogOnOpen:!t})}createPivotChart(e,t){this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"});const i=this.createCellRange(void 0,!0);if(i)return this.createChart({...e,cellRange:i,pivotChart:!0,suppressChartRanges:!0,focusDialogOnOpen:!t})}createCrossFilterChart(e,t){const i=this.createCellRange(e.cellRange);if(!i)return;const s=!("undefined"!==typeof e.suppressChartRanges&&null!==e.suppressChartRanges)||e.suppressChartRanges;return this.createChart({...e,cellRange:i,suppressChartRanges:s,crossFiltering:!0,focusDialogOnOpen:!t})}createChart(e){const t=xO.validateCreateParams(e);if(!t)return;e=!0===t?e:t;const{chartType:i,chartContainer:s}=e,n=this.gos.getCallback("createChartContainer"),r={...e,chartId:this.generateId(),chartType:RN(i),insideDialog:!(s||n),crossFilteringContext:this.crossFilteringContext,crossFilteringResetCallback:()=>this.activeChartComps.forEach((e=>e.crossFilteringReset()))},o=new YB(r);this.createBean(o);const a=this.createChartRef(o);return s?(s.appendChild(o.getGui()),this.environment.applyThemeClasses(s)):n?n(a):o.addEventListener("destroyed",(()=>{this.activeChartComps.delete(o),this.activeCharts.delete(a)})),a}createChartRef(e){const t={destroyChart:()=>{this.activeCharts.has(t)&&(this.destroyBean(e),this.activeChartComps.delete(e),this.activeCharts.delete(t))},focusChart:()=>{this.focusService.focusInto(e.getGui())},chartElement:e.getGui(),chart:e.getUnderlyingChart(),chartId:e.getChartModel().chartId};return this.activeCharts.add(t),this.activeChartComps.add(e),t}getSelectedRange(){const e=this.rangeService?.getCellRanges()??[];return e.length>0?e[0]:{columns:[]}}generateId(){return`id-${Math.random().toString(36).substring(2,18)}`}createCellRange(e,t){const i=t?{rowStartIndex:null,rowStartPinned:void 0,rowEndIndex:null,rowEndPinned:void 0,columns:this.visibleColsService.getAllCols().map((e=>e.getColId()))}
2:e,s=i&&this.rangeService?.createPartialCellRangeFromRangeParams(i,!0);return s||h(`unable to create chart as ${t?"there are no columns in the grid":"no range is selected"}.`),s}destroy(){this.activeCharts.forEach((e=>e.destroyChart())),super.destroy()}};xV.CHARTS_VERSION=Tw;function MV(e){return e&&e.match(/\d+\.\d+\.\d+/)}function DV(e){let{type:t,gridVersion:i,chartsVersion:s}=e;const n="AG Grid: AG Grid version is incompatible. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.";if(!i)return n;const r=function(e){if(!e||!MV(e))return;const[t,i]=e.split(".")||[],s=`${t}.${i}.x`,n=parseInt(t,10)-28+6;if(n<0)return;return{gridMajorMinor:s,chartsMajorMinor:`${n}.${i}.x`}}(i);if(!r)return n;const{gridMajorMinor:o,chartsMajorMinor:a}=r;return"incompatible"===t?`AG Grid version ${i} and AG Charts version ${s} is not supported. AG Grid version ${o} should be used with AG Chart ${a}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:"invalidCharts"===t?`AG Grid version ${o} should be used with AG Chart ${a}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:n}function IV(e){let{gridVersion:t,chartsVersion:i}=e;if(!MV(i))return{isValid:!1,message:DV({type:"invalidCharts",gridVersion:t,chartsVersion:i})};if(!MV(t))return{isValid:!1,message:DV({type:"invalidGrid",gridVersion:t,chartsVersion:i})};const[s,n]=t.split(".")||[],[r,o,a]=i.split(".")||[],l=function(e){let{gridMajorVersion:t,chartsMajorVersion:i}=e;const s=parseInt(t,10)-28;return s===parseInt(i,10)-6&&s>=0}({gridMajorVersion:s,chartsMajorVersion:r});return l&&n===o||a.includes("beta")?{isValid:!0}:l&&n===o?{isValid:!1,message:DV({type:"invalid",gridVersion:t,chartsVersion:i})}:{isValid:!1,message:DV({type:"incompatible",gridVersion:t,chartsVersion:i})}}var RV={version:iO,validate:()=>IV({gridVersion:iO,chartsVersion:xV.CHARTS_VERSION}),moduleName:`${r.GridChartsModule}-core`,beans:[xV,tO,class e extends ze{constructor(){super(...arguments),this.beanName="chartCrossFilterService"}wireBeans(e){this.columnModel=e.columnModel,this.valueService=e.valueService,this.filterManager=e.filterManager,L(this.gos)&&(this.clientSideRowModel=e.rowModel)}filter(t){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const s=this.filterManager?.getFilterModel()??{};if(i)return void this.resetFilters(s);const n=e.extractFilterColId(t);this.isValidColumnFilter(n)?this.updateFilters(s,t,n):h("cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: '"+n+"'")}resetFilters(e){Object.keys(e).length>0&&(this.filterManager?.setFilterModel(null),this.filterManager?.onFilterChanged({source:"api"}))}updateFilters(t,i,s){const n=e.extractFilterColId(i),r=i.datum[n];if(void 0===r)return;const o=r.toString();if(i.event.metaKey||i.event.ctrlKey){const e=this.getCurrentGridValuesForCategory(s);let i;Ee(e,o)?i=e.filter((e=>e!==o)):(i=e,i.push(o)),t[s]=this.getUpdatedFilterModel(s,i)}else{const e=[o];t={[s]:this.getUpdatedFilterModel(s,e)}}this.filterManager?.setFilterModel(t)}getUpdatedFilterModel(e,t){return"agMultiColumnFilter"===this.getColumnFilterType(e)?{filterType:"multi",filterModels:[null,{filterType:"set",values:t}]}:{filterType:"set",values:t}}getCurrentGridValuesForCategory(e){const t=[],i=this.getColumnById(e);return this.clientSideRowModel?.forEachNodeAfterFilter((e=>{if(i&&!e.group){const s=this.valueService.getValue(i,e)+"";t.includes(s)||t.push(s)}})),t}static extractFilterColId(e){return e.xKey||e.calloutLabelKey}isValidColumnFilter(e){e.indexOf("-filtered-out")&&(e=e.replace("-filtered-out",""));const t=this.getColumnFilterType(e);return"boolean"===typeof t?t:Ee(["agSetColumnFilter","agMultiColumnFilter"],t)}getColumnFilterType(e){const t=this.getColumnById(e);if(t){return t.getColDef().filter}}getColumnById(e){return this.columnModel.getCol(e)}},class extends ze{constructor(){super(...arguments),this.beanName="chartMenuListFactory"}wireBeans(e){this.popupService=e.popupService,this.chartMenuService=e.chartMenuService,this.chartTranslationService=e.chartTranslationService}showMenuList(e){const{eventSource:t,showMenu:i,chartMenuContext:s}=e,n=this.chartMenuService.doChartToolPanelsExist(s.chartController),r=this.mapWithStockItems(this.getMenuItems(s.chartController,n),s,i,t,n);if(!r.length)return;const o=this.createBean(new QN(r));this.activeChartMenuList=o;let a=-1,l="left";this.gos.get("enableRtl")&&(a=1,l="right");const h=o.getGui();
2this.popupService.addPopup({modal:!0,eChild:h,closeOnEsc:!0,closedCallback:()=>{this.destroyBean(o),this.activeChartMenuList=void 0,$(this.gos)&&t.focus({preventScroll:!0})},afterGuiAttached:e=>o.afterGuiAttached(e),positionCallback:()=>{this.popupService.positionPopupByComponent({type:"chartMenu",eventSource:t,ePopup:h,alignSide:l,nudgeX:4*a,nudgeY:4,position:"under",keepWithinBounds:!0})},ariaLabel:"Chart Menu"})}getMenuItems(e,t){const i=[...t?["chartEdit"]:[],...e.isEnterprise()?["chartAdvancedSettings"]:[],e.isChartLinked()?"chartUnlink":"chartLink","chartDownload"],s=this.gos.get("chartMenuItems");return s?Array.isArray(s)?s:s(this.gos.addGridCommonParams({defaultItems:i})):i}mapWithStockItems(e,t,i,s,n){if(!e)return[];const r=[];return e.forEach((e=>{let o;if(o="string"===typeof e?this.getStockMenuItem(e,t,i,s,n):{...e},!o)return;const{subMenu:a}=o;Array.isArray(a)&&(o.subMenu=this.mapWithStockItems(a,t,i,s,n)),r.push(o)})),r}getStockMenuItem(e,t,i,s,n){switch(e){case"chartEdit":return n?this.createMenuItem(this.chartTranslationService.translate("chartEdit"),"chartsMenuEdit",i):null;case"chartAdvancedSettings":return this.createMenuItem(this.chartTranslationService.translate("chartAdvancedSettings"),"chartsMenuAdvancedSettings",(()=>this.chartMenuService.openAdvancedSettings(t,s)));case"chartUnlink":return t.chartController.isChartLinked()?this.createMenuItem(this.chartTranslationService.translate("chartUnlink"),"unlinked",(()=>this.chartMenuService.toggleLinked(t))):null;case"chartLink":return t.chartController.isChartLinked()?null:this.createMenuItem(this.chartTranslationService.translate("chartLink"),"linked",(()=>this.chartMenuService.toggleLinked(t)));case"chartDownload":return this.createMenuItem(this.chartTranslationService.translate("chartDownload"),"save",(()=>this.chartMenuService.downloadChart(t)))}return null}createMenuItem(e,t,i){return{name:e,icon:Ps(t,this.gos,null),action:i}}destroy(){this.destroyBean(this.activeChartMenuList),super.destroy()}},class extends ze{constructor(){super(...arguments),this.beanName="chartMenuService"}wireBeans(e){this.advancedSettingsMenuFactory=e.advancedSettingsMenuFactory}downloadChart(e,t,i,s){e.chartController.getChartProxy().downloadChart(t,i,s)}toggleLinked(e){e.chartController.detachChartRange()}openAdvancedSettings(e,t){this.advancedSettingsMenuFactory.showMenu(e,t)}hideAdvancedSettings(){this.advancedSettingsMenuFactory.hideMenu()}getChartToolbarOptions(){const e=["chartMenu"],t=this.gos.getCallback("getChartToolbarItems");return t?t({defaultItems:e}).filter((e=>!!XN.includes(e)||(h(`'${e}' is not a valid Chart Toolbar Option`),!1))):e}getChartToolPanels(e){const t=this.gos.get("chartToolPanelsDef"),i=t?.panels?.map((e=>{const t=JN[e];return t||h(`Invalid panel in chartToolPanelsDef.panels: '${e}'`),t})).filter((e=>Boolean(e)));let s=i??Object.values(JN);e.isPivotChart()&&(s=s.filter((e=>"chartData"!==e)));const n=t?.defaultToolPanel;return{panels:s,defaultPanel:n&&JN[n]||s[0]}}doesChartToolbarExist(){return this.getChartToolbarOptions().length>0}doChartToolPanelsExist(e){const{panels:t}=this.getChartToolPanels(e);return t.length>0}},class extends ze{constructor(){super(...arguments),this.beanName="advancedSettingsMenuFactory"}wireBeans(e){this.focusService=e.focusService,this.chartTranslationService=e.chartTranslationService}showMenu(e,t){this.hideMenu();const i=this.createBean(new qN(e));this.activeDialog=this.createBean(new vk({title:this.chartTranslationService.translate("advancedSettings"),component:i,width:300,height:400,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{this.focusService.findFocusableElements(i.getGui())[0]?.focus()},closedCallback:()=>{this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=void 0,t?.focus({preventScroll:!0})}})),this.activeMenu=i}hideMenu(){this.activeDialog&&this.destroyBean(this.activeDialog)}destroy(){this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=this.destroyBean(this.activeDialog),super.destroy()}}],userComponents:[{name:"agMenuItem",classImp:JF}],dependantModules:[CN,ek]},EV={version:iO,moduleName:`${r.GridChartsModule}-api`,apiFunctions:{getChartModels:function(e){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.getChartModels()))},getChartRef:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.getChartRef(t)))},getChartImageDataURL:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.getChartImageDataURL(t)))},downloadChart:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.downloadChart(t)))},openChartToolPanel:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.openChartToolPanel(t)))},closeChartToolPanel:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.closeChartToolPanel(t.chartId)))},createRangeChart:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.createRangeChart(t,!0)))},createPivotChart:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.createPivotChart(t,!0)))},createCrossFilterChart:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.createCrossFilterChart(t,!0)))},updateChart:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.updateChart(t)))},restoreChart:function(e,t,i){return e.frameworkOverrides.wrapIncoming((()=>e.chartService?.restoreChart(t,i)))}},dependantModules:[RV]},AV={version:iO,moduleName:r.GridChartsModule,dependantModules:[RV,EV]},TV={time:dp,AgCharts:XL};var PV="paste",LV="dragCopy",FV="clipboard",kV=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,NV="32.3.3",OV={version:NV,moduleName:`${r.ClipboardModule}-core`,beans:[class e extends ze{constructor(){super(...arguments),this.beanName="
2clipboardService",this.lastPasteOperationTime=0,this.navigatorApiFailed=!1}wireBeans(e){this.csvCreator=e.csvCreator,this.selectionService=e.selectionService,this.rowModel=e.rowModel,this.ctrlsService=e.ctrlsService,this.valueService=e.valueService,this.focusService=e.focusService,this.rowRenderer=e.rowRenderer,this.visibleColsService=e.visibleColsService,this.funcColsService=e.funcColsService,this.cellNavigationService=e.cellNavigationService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.rangeService=e.rangeService}postConstruct(){L(this.gos)&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(this,(e=>{this.gridCtrl=e.gridCtrl}))}pasteFromClipboard(){!this.gos.get("suppressClipboardApi")&&!this.navigatorApiFailed&&navigator.clipboard&&navigator.clipboard.readText?navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch((e=>{h(`${e}\n${kV("readText")}`),this.navigatorApiFailed=!0,this.pasteFromClipboardLegacy()})):this.pasteFromClipboardLegacy()}pasteFromClipboardLegacy(){let e=!1;const t=t=>{const i=(new Date).getTime();i-this.lastPasteOperationTime<50&&(e=!0,t.preventDefault()),this.lastPasteOperationTime=i};this.executeOnTempElement((e=>{e.addEventListener("paste",t),e.focus({preventScroll:!0})}),(i=>{const s=i.value;e?this.refocusLastFocusedCell():this.processClipboardData(s),i.removeEventListener("paste",t)}))}refocusLastFocusedCell(){const e=this.focusService.getFocusedCell();e&&this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0})}getClipboardDelimiter(){const e=this.gos.get("clipboardDelimiter");return w(e)?e:"\t"}processClipboardData(t){if(null==t)return;let i=e.stringToArray(t,this.getClipboardDelimiter());const s=this.gos.getCallback("processDataFromClipboard");if(s&&(i=s({data:i})),null==i)return;this.gos.get("suppressLastEmptyLineOnPaste")&&this.removeLastLineIfBlank(i);this.doPasteOperation(((e,t,s,n)=>{const r=this.rangeService?.isMoreThanOneCell();r&&!this.hasOnlyOneValueToPaste(i)?this.pasteIntoActiveRange(this.rangeService,i,e,t,n):this.pasteStartingFromFocusedCell(i,e,t,s,n)}))}static stringToArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";const i=[],s=e=>"\r"===e||"\n"===e;let n=!1;if(""===e)return[[""]];for(let r=0,o=0,a=0;a<e.length;a++){const l=e[a-1],h=e[a],c=e[a+1],d=()=>{i[r]||(i[r]=[]),i[r][o]||(i[r][o]="")};if(d(),'"'===h&&(n?'"'===c?(i[r][o]+='"',a++):n=!1:(void 0===l||l===t||s(l))&&(n=!0)),!n&&'"'!==h){if(h===t){o++,d();continue}if(s(h)){o=0,r++,d(),"\r"===h&&"\n"===c&&a++;continue}}i[r][o]+=h}return i}doPasteOperation(e){const t="clipboard";let i;if(this.eventService.dispatchEvent({type:"pasteStart",source:t}),this.clientSideRowModel){const e=this.gos.get("aggregateOnlyChangedColumns");i=new pc(e,this.clientSideRowModel.getRootNode())}const s={},n=[];e(s,n,this.focusService.getFocusedCell(),i);const r=[...n];i&&(this.clientSideRowModel.doAggregate(i),i.forEachChangedNodeDepthFirst((e=>{r.push(e)}))),this.rowRenderer.refreshCells({rowNodes:r}),this.dispatchFlashCells(s),this.fireRowChanged(n),this.refocusLastFocusedCell(),this.eventService.dispatchEvent({type:"pasteEnd",source:t})}pasteIntoActiveRange(e,t,i,s,n){const r=this.getRangeSize(e)%t.length!=0;let o=0,a=0;this.iterateActiveRanges(!1,((e,l,h,c)=>{if(c-o>=t.length){if(r)return;o+=a,a=0}const d=t[c-o];s.push(l);const u=this.gos.getCallback("processCellFromClipboard");h.forEach(((t,s)=>{if(!t.isCellEditable(l)||t.isSuppressPaste(l))return;s>=d.length&&(s%=d.length);const r=this.processCell(l,t,d[s],LV,u,!0);l.setDataValue(t,r,PV),n&&n.addParentNode(l.parent,[t]);const{rowIndex:o,rowPinned:a}=e,h=this.cellPositionUtils.createIdFromValues({rowIndex:o,column:t,rowPinned:a});i[h]=!0})),a++}))}getDisplayedColumnsStartingAt(e){let t=e;const i=[];for(;null!=t;)i.push(t),t=this.visibleColsService.getColAfter(t);return i}pasteStartingFromFocusedCell(e,t,i,s,n){if(!s)return;const r={rowIndex:s.rowIndex,rowPinned:s.rowPinned},o=this.getDisplayedColumnsStartingAt(s.column);this.isPasteSingleValueIntoRange(e)?this.pasteSingleValueIntoRange(e,i,t,n):this.pasteMultipleValues(e,r,i,o,t,FV,n)}isPasteSingleValueIntoRange(e){return this.hasOnlyOneValueToPaste(e)&&null!=this.rangeService&&!this.rangeService.isEmpty()}pasteSingleValueIntoRange(e,t,i,s){const n=e[0][0];this.iterateActiveRanges(!1,((e,r,o)=>{t.push(r),o.forEach((e=>this.updateCellValue(r,e,n,i,FV,s)))}))}hasOnlyOneValueToPaste(e){return 1===e.length&&1===e[0].length}copyRangeDown(){if(!this.rangeService||this.rangeService.isEmpty())return;const e=[];this.doPasteOperation(((t,i,s,n)=>{const r=this.gos.getCallback("processCellForClipboard"),o=this.gos.getCallback("processCellFromClipboard");this.iterateActiveRanges(!0,((s,a,l)=>{e.length?(i.push(a),l.forEach(((i,r)=>{if(!i.isCellEditable(a)||i.isSuppressPaste(a))return;const l=this.processCell(a,i,e[r],LV,o,!0);a.setDataValue(i,l,PV),n&&n.addParentNode(a.parent,[i]);const{rowIndex:h,rowPinned:c}=s,d=this.cellPositionUtils.createIdFromValues({rowIndex:h,column:i,rowPinned:c});t[d]=!0}))):l.forEach((t=>{const i=this.processCell(a,t,this.valueService.getValue(t,a),LV,r,!1,!0);e.push(i)}))}))}))}removeLastLineIfBlank(e){const t=Se(e);if(t&&1===t.length&&""===t[0]){if(1===e.length)return;Me(e,t)}}fireRowChanged(e){"fullRow"===this.gos.get("editType")&&e.forEach((e=>{this.eventService.dispatchEvent({type:"rowValueChanged",node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}))}pasteMultipleValues(e,t,i,s,n,r,o){let a=t;const l=null!=this.clientSideRowModel&&!this.gos.get("enableGroupEdit")&&!this.gos.get("treeData"),h=()=>{for(;;){if(!a)return null;const e=this.rowPositionUtils.getRowNode(a);if(a=this.cellNavigationService.getRowBelow({rowPinned:a.rowPinned,rowIndex:a.rowIndex}),null==e)return null;if(!(e.detail||e.footer||l&&e.group))return e}};e.forEach((e=>{const t=h();t&&(e.forEach(((e,i)=>this.updateCellValue(t,s[i],e,n,r,o))),i.push(t))}))}updateCellValue(e,t,i,s,n,r){if(!e||!t||!t.isCellEditable(e)||t.isSuppressPaste(e))return;const o=this.processCell(e,t,i,n,this.gos.getCallback("processCellFromClipboard"),!0);e.setDataValue(t,o,PV);const{rowIndex:a,rowPinned:l}=e;s[this.cellPositionUtils.createIdFromValues({rowIndex:a,column:t,rowPinned:l})]=!0,r&&r.addParentNode(e.parent,[t])}copyToClipboard(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.copyOrCutToClipboard(e)}cutToClipboard(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";this.gos.get("suppressCutToClipboard")||(this.eventService.dispatchEvent({type:"cutStart",source:t}),this.copyOrCutToClipboard(e,!0),this.eventService.dispatchEvent({type:"cutEnd",source:t}))}copyOrCutToClipboard(e,t){let{includeHeaders:i,includeGroupHeaders:s}=e;null==i&&(i=this.gos.get("copyHeadersToClipboard")),null==s&&(s=this.gos.get("copyGroupHeadersToClipboard"));const n={includeHeaders:i,includeGroupHeaders:s},r=this.gos.get("rowSelection"),o=this.gos.get("cellSelection");let a=null;this.shouldCopyCells(o,r)?(this.copySelectedRangeToClipboard(n),a=0):this.shouldCopyRows(r)?(this.copySelectedRowsToClipboard(n),a=1):this.focusService.isAnyCellFocused()&&(this.copyFocusedCellToCl
2ipboard(n),a=2),t&&null!==a&&this.clearCellsAfterCopy(a)}shouldCopyCells(e,t){if(!this.rangeService||this.rangeService.isEmpty())return!1;if(e){return!("object"===typeof t&&t.copySelectedRows&&!this.selectionService.isEmpty())}{const e=this.gos.get("suppressCopySingleCellRanges");return!(!this.rangeService.isMoreThanOneCell()&&e)}}shouldCopyRows(e){return!this.selectionService.isEmpty()&&(e&&"string"!==typeof e?e.copySelectedRows??!1:!this.gos.get("suppressCopyRowsToClipboard"))}clearCellsAfterCopy(e){if(this.eventService.dispatchEvent({type:"keyShortcutChangedCellStart"}),0===e)this.rangeService.clearCellRangeCellValues({cellEventSource:"clipboardService"});else if(1===e)this.clearSelectedRows();else{const e=this.focusService.getFocusedCell();if(null==e)return;const t=this.rowPositionUtils.getRowNode(e);t&&this.clearCellValue(t,e.column)}this.eventService.dispatchEvent({type:"keyShortcutChangedCellEnd"})}clearSelectedRows(){const e=this.selectionService.getSelectedNodes(),t=this.visibleColsService.getAllCols();for(const i of e)for(const e of t)this.clearCellValue(i,e)}clearCellValue(e,t){if(!t.isCellEditable(e))return;const i=this.valueService.getDeleteValue(t,e);e.setDataValue(t,i,"clipboardService")}iterateActiveRanges(e,t,i){if(!this.rangeService||this.rangeService.isEmpty())return;const s=this.rangeService.getCellRanges();e?this.iterateActiveRange(s[0],t,i,!0):s.forEach(((e,n)=>this.iterateActiveRange(e,t,i,n===s.length-1)))}iterateActiveRange(e,t,i,s){if(!this.rangeService)return;let n=this.rangeService.getRangeStartRow(e);const r=this.rangeService.getRangeEndRow(e);i&&e.columns&&i(e.columns);let o=0,a=!1;for(;!a&&null!=n;){const i=this.rowPositionUtils.getRowNode(n);a=this.rowPositionUtils.sameRow(n,r),t(n,i,e.columns,o++,a&&s),n=this.cellNavigationService.getRowBelow(n)}}copySelectedRangeToClipboard(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.rangeService||this.rangeService.isEmpty())return;const t=this.rangeService.areAllRangesAbleToMerge(),{data:i,cellsToFlash:s}=t?this.buildDataFromMergedRanges(this.rangeService,e):this.buildDataFromRanges(this.rangeService,e);this.copyDataToClipboard(i),this.dispatchFlashCells(s)}buildDataFromMergedRanges(e,t){const i=new Set,s=e.getCellRanges(),n=new Map,r=[],o={};s.forEach((t=>{t.columns.forEach((e=>i.add(e)));const{rowPositions:s,cellsToFlash:a}=this.getRangeRowPositionsAndCellsToFlash(e,t);s.forEach((e=>{const t=`${e.rowIndex}-${e.rowPinned||"null"}`;n.get(t)||(n.set(t,!0),r.push(e))})),Object.assign(o,a)}));const a=this.visibleColsService.getAllCols(),l=Array.from(i);l.sort(((e,t)=>a.indexOf(e)-a.indexOf(t)));return{data:this.buildExportParams({columns:l,rowPositions:r,includeHeaders:t.includeHeaders,includeGroupHeaders:t.includeGroupHeaders}),cellsToFlash:o}}buildDataFromRanges(e,t){const i=e.getCellRanges(),s=[],n={};return i.forEach((i=>{const{rowPositions:r,cellsToFlash:o}=this.getRangeRowPositionsAndCellsToFlash(e,i);Object.assign(n,o),s.push(this.buildExportParams({columns:i.columns,rowPositions:r,includeHeaders:t.includeHeaders,includeGroupHeaders:t.includeGroupHeaders}))})),{data:s.join("\n"),cellsToFlash:n}}getRangeRowPositionsAndCellsToFlash(e,t){const i=[],s={},n=e.getRangeStartRow(t),r=e.getRangeEndRow(t);let o=n;for(;o&&(i.push(o),t.columns.forEach((e=>{const{rowIndex:t,rowPinned:i}=o,n=this.cellPositionUtils.createIdFromValues({rowIndex:t,column:e,rowPinned:i});s[n]=!0})),!this.rowPositionUtils.sameRow(o,r));)o=this.cellNavigationService.getRowBelow(o);return{rowPositions:i,cellsToFlash:s}}getCellsToFlashFromRowNodes(e){const t=this.visibleColsService.getAllCols(),i={};for(let s=0;s<e.length;s++){const{rowIndex:n,rowPinned:r}=e[s];if(null!=n)for(let e=0;e<t.length;e++){const s=t[e];i[this.cellPositionUtils.createIdFromValues({rowIndex:n,column:s,rowPinned:r})]=!0}}return i}copyFocusedCellToClipboard(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.focusService.getFocusedCell();if(null==t)return;const i=this.cellPositionUtils.createId(t),s={rowPinned:t.rowPinned,rowIndex:t.rowIndex},n=t.column,r=this.buildExportParams({columns:[n],rowPositions:[s],includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders});this.copyDataToClipboard(r),this.dispatchFlashCells({[i]:!0})}copySelectedRowsToClipboard(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{columnKeys:t,includeHeaders:i,includeGroupHeaders:s}=e,n=this.buildExportParams({columns:t,includeHeaders:i,includeGroupHeaders:s});this.copyDataToClipboard(n);const r=this.selectionService.getSelectedNodes()||[];this.dispatchFlashCells(this.getCellsToFlashFromRowNodes(r))}buildExportParams(e){const{columns:t,rowPositions:i,includeHeaders:s=!1,includeGroupHeaders:n=!1}=e,r={columnKeys:t,rowPositions:i,skipColumnHeaders:!s,skipColumnGroupHeaders:!n,suppressQuotes:!0,columnSeparator:this.getClipboardDelimiter(),onlySelected:!i,processCellCallback:this.gos.getCallback("processCellForClipboard"),processRowGroupCallback:e=>this.processRowGroupCallback(e),processHeaderCallback:this.gos.getCallback("processHeaderForClipboard"),processGroupHeaderCallback:this.gos.getCallback("processGroupHeaderForClipboard")};return this.csvCreator.getDataAsCsv(r,!0)}processRowGroupCallback(e){const{node:t,column:i}=e,s=this.gos.get("treeData"),n=this.gos.get("suppressGroupMaintainValueType");let r=(()=>
2{if(s||n||!i)return t.key;const e=t.groupData?.[i.getId()];return e&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport?this.valueService.formatValue(t.rowGroupColumn,t,e)??e:e})();if(e.node.footer){let e="";r&&r.length&&(e=` ${r}`),r=`Total${e}`}const o=this.gos.getCallback("processCellForClipboard");if(o){let e=t.rowGroupColumn;return!e&&t.footer&&-1===t.level&&(e=this.funcColsService.getRowGroupColumns()[0]),o({value:r,node:t,column:e,type:"clipboard",formatValue:i=>this.valueService.formatValue(e,t,i)??i,parseValue:i=>this.valueService.parseValue(e,t,i,this.valueService.getValue(e,t))})}return r}dispatchFlashCells(e){window.setTimeout((()=>{this.eventService.dispatchEvent({type:"flashCells",cells:e})}),0)}processCell(e,t,i,s,n,r,o){if(n){return n({column:t,node:e,value:i,type:s,formatValue:i=>this.valueService.formatValue(t,e??null,i)??i,parseValue:i=>this.valueService.parseValue(t,e??null,i,this.valueService.getValue(t,e))})}return r&&!1!==t.getColDef().useValueParserForImport?this.valueService.parseValue(t,e??null,i,this.valueService.getValue(t,e)):o&&!1!==t.getColDef().useValueFormatterForExport?this.valueService.formatValue(t,e??null,i)??i:i}copyDataToClipboard(e){const t=this.gos.getCallback("sendToClipboard");if(t)return void t({data:e});!this.gos.get("suppressClipboardApi")&&navigator.clipboard?navigator.clipboard.writeText(e).catch((t=>{h(`${t}\n${kV("writeText")}`),this.copyDataToClipboardLegacy(e)})):this.copyDataToClipboardLegacy(e)}copyDataToClipboardLegacy(e){this.executeOnTempElement((t=>{const i=j(this.gos),s=K(this.gos);t.value=e||" ",t.select(),t.focus({preventScroll:!0});i.execCommand("copy")||h("Browser did not allow document.execCommand('copy'). Ensure api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons."),null!=s&&null!=s.focus&&s.focus({preventScroll:!0})}
2))}executeOnTempElement(e,t){const i=j(this.gos),s=i.createElement("textarea");s.style.width="1px",s.style.height="1px",s.style.top=i.documentElement.scrollTop+"px",s.style.left=i.documentElement.scrollLeft+"px",s.style.position="absolute",s.style.opacity="0";const n=this.gridCtrl.getGui();n.appendChild(s);try{e(s)}catch(r){h("Browser does not support document.execCommand('copy') for clipboard operations")}t?window.setTimeout((()=>{t(s),n.removeChild(s)}),100):n.removeChild(s)}getRangeSize(e){const t=e.getCellRanges();let i=0,s=0;return t.length>0&&(i=e.getRangeStartRow(t[0]).rowIndex,s=e.getRangeEndRow(t[0]).rowIndex),i-s+1}}],dependantModules:[ek,Uc]},GV={version:NV,moduleName:`${r.ClipboardModule}-api`,apiFunctions:{copyToClipboard:function(e,t){e.clipboardService?.copyToClipboard(t)},cutToClipboard:function(e,t){e.clipboardService?.cutToClipboard(t)},copySelectedRowsToClipboard:function(e,t){e.clipboardService?.copySelectedRowsToClipboard(t)},copySelectedRangeToClipboard:function(e,t){e.clipboardService?.copySelectedRangeToClipboard(t)},copySelectedRangeDown:function(e){e.clipboardService?.copyRangeDown()},pasteFromClipboard:function(e){e.clipboardService?.pasteFromClipboard()}},dependantModules:[OV]},BV={version:NV,moduleName:r.ClipboardModule,dependantModules:[OV,GV]},VV={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"};function zV(e){const{values:t}=e;let i=null;for(let s=0;s<t.length;s++){const e=t[s];"number"===typeof e?null===i?i=e:i+="number"===typeof i?e:BigInt(e):"bigint"===typeof e&&(i=null===i?e:("bigint"===typeof i?i:BigInt(i))+e)}return i}function HV(e){return e.values.length>0?e.values[0]:null}function WV(e){return e.values.length>0?Se(e.values):null}function jV(e){const{values:t}=e;let i=null;for(let s=0;s<t.length;s++){const e=t[s];"number"!==typeof e&&"bigint"!==typeof e||!(null===i||i>e)||(i=e)}return i}function UV(e){const{values:t}=e;let i=null;for(let s=0;s<t.length;s++){const e=t[s];"number"!==typeof e&&"bigint"!==typeof e||!(null===i||i<e)||(i=e)}return i}function _V(e){const{values:t}=e;let i=0;for(let n=0;n<t.length;n++){const e=t[n];i+=null!=e&&"number"===typeof e.value?e.value:1}const s=e.rowNode?.aggData?.[e.column.getColId()];return s&&s.value===i?s:{value:i,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function KV(e){const{values:t}=e;let i=0,s=0;for(let o=0;o<t.length;o++){const e=t[o];let n=null;"number"===typeof e||"bigint"===typeof e?(n=e,s++):null==e||"number"!==typeof e.value&&"bigint"!==typeof e.value||"number"!==typeof e.count||(n=e.value*("number"===typeof e.value?e.count:BigInt(e.count)),s+=e.count),"number"===typeof n?i+="number"===typeof i?n:BigInt(n):"bigint"===typeof n&&(i=("bigint"===typeof i?i:BigInt(i))+n)}let n=null;s>0&&(n=i/("number"===typeof i?s:BigInt(s)));const r=e.rowNode?.aggData?.[e.column?.getColId()];return r&&r.count===s&&r.value===n?r:{count:s,value:n,toString:function(){return"number"===typeof this.value||"bigint"===typeof this.value?this.value.toString():""},toNumber:function(){return this.value}}}var $V=class extends pk{constructor(e,t,i,s,n){super(t,i,n,'\n                <span role="option">\n                    <span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n                    <span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n                    <ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>\n                    <span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n                </span>\n            ',[Bs]),this.column=e,this.dropZonePurpose=s,this.eSortIndicator=Is,this.popupShowing=!1}wireBeans(e){super.wireBeans(e),this.popupService=e.popupService,this.sortController=e.sortController,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.aggFuncService=e.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",(()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()}))}
2getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(e,t){const i=this.gos.get("rowGroupPanelSuppressSort"),s=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!s){const i=t("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");e.push(i)}if(this.isGroupingZone()&&this.column.isSortable()&&!i){const i=t("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");e.push(i)}super.addAdditionalAriaInstructions(e,t)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const e=this.localeService.getLocaleTextFunc(),{name:t,aggFuncName:i}=this.getColumnAndAggFuncName(),s=e("ariaDropZoneColumnComponentAggFuncSeparator"," of "),n={asc:e("ariaDropZoneColumnComponentSortAscending","ascending"),desc:e("ariaDropZoneColumnComponentSortDescending","descending")},r=this.column.getSort(),o=this.gos.get("rowGroupPanelSuppressSort");return[i&&`${i}${s}`,t,this.isGroupingZone()&&!o&&r&&`, ${n[r]}`].filter((e=>!!e)).join("")}getColumnAndAggFuncName(){const e=this.displayName;let t="";if(this.isAggregationZone()){const e=this.column.getAggFunc(),i="string"===typeof e?e:"agg";t=this.localeService.getLocaleTextFunc()(i,i)}return{name:e,aggFuncName:t}}setupSort(){const e=this.column.isSortable(),t=this.isGroupingZone();if(e&&t&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const e=e=>{e.preventDefault();const t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.sortController.progressSort(this.column,t,"uiColumnSorted")};this.addGuiEventListener("click",e),this.addGuiEventListener("keydown",(t=>{t.key===js.ENTER&&this.isGroupingZone()&&e(t)}))}}getDefaultIconName(){return"hide"}createGetDragItem(){const{column:e}=this;return()=>{const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(e){super.onKeyDown(e);e.key===js.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(e.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:e,aggFuncName:t}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${t}(${e})`:e}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const e=new lk({cssIdentifier:"select-agg-func"}),t=this.aggFuncService.getFuncNames(this.column),i=this.getGui(),s=e.getGui();e.setModel({getRow:function(e){return t[e]},getRowCount:function(){return t.length}}),this.createBean(e);const n=hs('<div class="ag-select-agg-func-popup"></div>');n.style.top="0px",n.style.left="0px",n.appendChild(s),n.style.width=`${i.clientWidth}px`;const[r]=this.addManagedElementListeners(n,{focusout:e=>{!n.contains(e.relatedTarget)&&a&&a.hideFunc()}}),o=this.localeService.getLocaleTextFunc(),a=this.popupService.addPopup({modal:!0,eChild:n,closeOnEsc:!0,closedCallback:t=>{this.destroyBean(e),this.popupShowing=!1,"Escape"===t?.key&&i.focus(),r&&r()},ariaLabel:o("ariaLabelAggregationFunction","Aggregation Function")});a&&e.setComponentCreator(this.createAggSelect.bind(this,a.hideFunc)),e.addGuiEventListener("keydown",(t=>{if(t.key===js.ENTER||t.key===js.SPACE){const t=e.getLastFocusedRow();if(null==t)return;const i=e.getComponentAt(t);i&&i.selectItem()}})),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:i,ePopup:n,keepWithinBounds:!0,column:this.column,position:"under"}),e.refresh();let l=t.findIndex((e=>e===this.column.getAggFunc()));-1===l&&(l=0),e.focusRow(l)}createAggSelect(e,t){const i=this.localeService.getLocaleTextFunc(),s=t.toString(),n=i(s,s);return new YV((()=>{e(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,t,"toolPanelDragAndDrop")}),n)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return"aggregation"===this.dropZonePurpose}isGroupingZone(){return"rowGroup"===this.dropZonePurpose}getDragSourceType(){return Gn.ToolPanel}destroy(){super.destroy(),this.column=null}},YV=class extends Rs{constructor(e,t){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=e,this.getGui().innerText=t,this.addGuiEventListener("click",this.selectItem)}},ZV=class extends gk{constructor(e,t){super(e),this.dropZonePurpose=t}wireBeans(e){super.wireBeans(e),this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}init(e){super.init(e),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(e){return e.columns??[]}isInterestedIn(e){return e===Gn.HeaderCell||e===Gn.ToolPanel}minimumAllowedNewInsertIndex(){const e=this.gos.get("groupLockGroupColumns"),t=this.funcColsService.getRowGroupColumns().length;return-1===e?t:Math.min(e,t)}showOrHideColumnOnExit(e){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!e.fromNudge}handleDragEnterEnd(e){if(this.showOrHideColumnOnExit(e)){const t=e.dragSource.getDragItem().columns;this.setColumnsVisible(t,!1,"uiColumnDragged")}}handleDragLeaveEnd(e){if(this.showOrHideColumnOnExit(e)){const t=e.dragSource.getDragItem();this.setColumnsVisible(t.columns,!0,"uiColumnDragged")}}setColumnsVisible(e,t,i){if(e){const s=e.filter((e=>!e.getColDef().lockVisible));this.columnModel.setColsVisible(s,t,i)}}isRowGroupPanel(){return"rowGroup"===this.dropZonePurpose}createPillComponent(e,t,i,s){return new $V(e,t,i,this.dropZonePurpose,s)}},qV=class extends ZV{constructor(e){super(e,"pivot")}postConstruct(){const e=this.localeService.getLocaleTextFunc(),t=e("pivotColumnsEmptyMessage","Drag here to set column labels"),i=e("pivots","Column Labels");super.init({icon:Ps("pivotPanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const e=super.getTooltipParams();return e.location="pivotColumnsList",e}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const e=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(e);break;case"onlyWhenPivoting":{const t=this.columnModel.isPivotActive();this.setDisplayed(e&&t);break}default:this.setDisplayed(!1)}else this.setDisplayed(e)}isItemDroppable(e,t){return!(this.gos.get("functionsReadOnly")||!e.isPrimary())&&(e.isAllowPivot()&&(!e.isPivotActive()||this.isSourceEventFromTarget(t)))}updateItems(e){this.funcColsService.setPivotColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},QV=class extends ZV{constructor(e){super(e,"rowGroup")}postConstruct(){const e=this.localeService.getLocaleTextFunc(),t=e("rowGroupColumnsEmptyMessage","Drag here to set row groups"),i=e("groups","Row Groups");super.init({icon:Ps("rowGroupPanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const e=super.getTooltipParams();return e.location="rowGroupColumnsList",e}isItemDroppable(e,t){return!(this.gos.get("functionsReadOnly")||!e.isPrimary())&&(e.isAllowRowGroup()&&(!e.isRowGroupActive()||this.isSourceEventFromTarget(t)))}updateItems(e){this.funcColsService.setRowGroupColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},XV={selector:"AG-GRID-HEADER-DROP-ZONES",component:class extends Rs{wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());const e=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedPropertyListener("rowGroupPanelShow",e),this.addManagedPropertyListener("pivotPanelShow",(()=>this.onPivotPanelShow())),this.onRowGroupChanged()}createNorthPanel(){const e=document.createElement("div");e.classList.add("ag-column-drop-wrapper"),ci(e,"presentation"),this.rowGroupComp=new QV(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new qV(!0),this.createManagedBean(this.pivotComp),e.appendChild(this.rowGroupComp.getGui()),e.appendChild(this.pivotComp.getGui());const t=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:t}),this.addManagedListeners(this.pivotComp,{displayChanged:t}),this.onDropPanelVisible(),e}onDropPanelVisible(){const e=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),t="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(t,e),this.pivotComp.addOrRemoveCssClass(t,e)}onRowGroupChanged(){if(!this.rowGroupComp)return;const e=this.gos.get("rowGroupPanelShow");if("always"===e)this.rowGroupComp.setDisplayed(!0);else if("onlyWhenGrouping"===e){const e=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const e=this.gos.get("pivotPanelShow");if("always"===e)this.pivotComp.setDisplayed(!0);else if("onlyWhenPivoting"===e){const e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}}},JV=class{constructor(){this.allSets={},this.allParents=[]}
2removeFromChildrenAfterGroup(e,t){this.getSet(e).removeFromChildrenAfterGroup[t.id]=!0}isRemoveFromAllLeafChildren(e,t){return!!this.getSet(e).removeFromAllLeafChildren[t.id]}preventRemoveFromAllLeafChildren(e,t){delete this.getSet(e).removeFromAllLeafChildren[t.id]}removeFromAllLeafChildren(e,t){this.getSet(e).removeFromAllLeafChildren[t.id]=!0}getSet(e){return this.allSets[e.id]||(this.allSets[e.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(e)),this.allSets[e.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach((e=>{const t=this.allSets[e.id];e.childrenAfterGroup=e.childrenAfterGroup.filter((e=>!t.removeFromChildrenAfterGroup[e.id])),e.allLeafChildren=e.allLeafChildren?.filter((e=>!t.removeFromAllLeafChildren[e.id]))??null,e.updateHasChildren();const i=e.sibling;i&&(i.childrenAfterGroup=e.childrenAfterGroup,i.allLeafChildren=e.allLeafChildren)})),this.allSets={},this.allParents.length=0}};function ez(e,t){const i=e.sourceRowIndex,s=t.sourceRowIndex,n=i>=0,r=s>=0;return n&&r?i-s:!n&&!r?e.__objectId-t.__objectId:n?1:-1}var tz=class extends ze{wireBeans(e){this.beans=e,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.selectionService=e.selectionService,this.showRowGroupColsService=e.showRowGroupColsService}execute(e){const t=this.createGroupingDetails(e);if(t.transactions)this.handleTransaction(t);else{const i=!0===e.afterColumnsChanged;this.shotgunResetEverything(t,i)}this.positionLeafsAndGroups(e.changedPath),this.orderGroups(t)}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst((e=>{if(e.childrenAfterGroup){const t=[],i=[];let s;e.childrenAfterGroup.forEach((e=>{e.childrenAfterGroup?.length?""!==e.key||s?i.push(e):s=e:t.push(e)})),s&&i.push(s),e.childrenAfterGroup=[...t,...i]}}),!1)}createGroupingDetails(e){const{rowNode:t,changedPath:i,rowNodeTransactions:s,rowNodesOrderChanged:n}=e,r=this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:r,rootNode:t,pivotMode:this.columnModel.isPivotMode(),groupedColCount:r?.length??0,transactions:s,rowNodesOrderChanged:!!n,changedPath:i,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),keyCreators:r?.map((e=>e.getColDef().keyCreator))??[]}}handleTransaction(e){e.transactions.forEach((t=>{const i=new JV;Ce(t.remove)&&this.removeNodes(t.remove,e,i),Ce(t.update)&&this.moveNodesInWrongPath(t.update,e,i),Ce(t.add)&&this.insertNodes(t.add,e);const s=i.getAllParents().slice();i.flush(),this.removeEmptyGroups(s,e)})),e.rowNodesOrderChanged&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst((t=>{(function(e){if(!e)return!1;const t=e.length;if(t<2)return!1;let i=!1;for(let s=1;s<t;s++)if(ez(e[s-1],e[s])>0){i=!0;break}return!!i&&(e.sort(ez),!0)})(t.childrenAfterGroup)&&e.changedPath.addParentNode(t)}),!1,!0)}orderGroups(e){const t=e.initialGroupOrderComparator;w(t)&&function e(i){w(i.childrenAfterGroup)&&!i.leafGroup&&(i.childrenAfterGroup.sort(((e,i)=>t({nodeA:e,nodeB:i}))),i.childrenAfterGroup.forEach((t=>e(t))))}(e.rootNode)}getExistingPathForNode(e,t){const i=[];let s=e.parent;for(;s&&s!==t.rootNode;)i.push({key:s.key,rowGroupColumn:s.rowGroupColumn,field:s.field}),s=s.parent;return i.reverse(),i}moveNodesInWrongPath(e,t,i){e.forEach((e=>{t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent);const s=e=>e.key;we(this.getExistingPathForNode(e,t).map(s),this.getGroupInfo(e,t).map(s))||this.moveNode(e,t,i)}))}moveNode(e,t,i){if(this.removeNodesFromParents([e],t,i),this.insertOneNode(e,t,i),e.setData(e.data),t.changedPath.isActive()){const i=e.parent;t.changedPath.addParentNode(i)}}removeNodes(e,t,i){this.removeNodesFromParents(e,t,i),t.changedPath.isActive()&&e.forEach((e=>t.changedPath.addParentNode(e.parent)))}forEachParentGroup(e,t,i){let s=t;for(;s&&s!==e.rootNode;)i(s),s=s.parent}removeNodesFromParents(e,t,i){const s=null==i,n=i||new JV;e.forEach((e=>{this.removeFromParent(e,n),this.forEachParentGroup(t,e.parent,(t=>{n.removeFromAllLeafChildren(t,e)}))}
2)),s&&n.flush()}removeEmptyGroups(e,t){let i=!0;const s=e=>{const t=this.getChildrenMappedKey(e.key,e.rowGroupColumn),i=e.parent;return!(!i?.childrenMapped||!i.childrenMapped[t])&&(!!e.group&&0===(e.childrenAfterGroup?.length??0))};for(;i;){i=!1;const n=new JV;e.forEach((e=>{this.forEachParentGroup(t,e,(e=>{s(e)&&(i=!0,this.removeFromParent(e,n),e.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))}))})),n.flush()}}removeFromParent(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(Me(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent?.childrenMapped&&delete e.parent.childrenMapped[i],e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t?.childrenMapped&&t.childrenMapped[i]!==e&&(t.childrenMapped[i]=e,t.childrenAfterGroup.push(e),t.setGroup(!0))}areGroupColsEqual(e,t){return null!=e&&null!=t&&e.pivotMode===t.pivotMode&&(we(e.groupedCols,t.groupedCols)&&we(e.keyCreators,t.keyCreators))}checkAllGroupDataAfterColsChanged(e){const t=i=>{i&&i.forEach((i=>{if(!i.group)return;const s={field:i.field,key:i.key,rowGroupColumn:i.rowGroupColumn,leafNode:i.allLeafChildren?.[0]};this.setGroupData(i,s,e),t(i.childrenAfterGroup)}))};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionService.filterFromSelection((e=>e&&!e.group));const{groupedCols:i}=e,s=e.rootNode;s.leafGroup=0===i.length,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren();const n=s.sibling;n&&(n.childrenAfterGroup=s.childrenAfterGroup,n.childrenMapped=s.childrenMapped),this.insertNodes(s.allLeafChildren,e)}noChangeInGroupingColumns(e,t){let i=!1;const s=this.showRowGroupColsService.getShowRowGroupCols(),n=s?s.map((e=>e.getId())).join("-"):"";return t&&(i=this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==n&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=n,i}insertNodes(e,t){e.forEach((e=>{this.insertOneNode(e,t),t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent)}))}insertOneNode(e,t,i){const s=this.getGroupInfo(e,t),n=this.findParentForNode(e,s,t,i);n.group||h("duplicate group keys for row data, keys should be unique",[n.data,e.data]),e.parent=n,e.level=s.length,n.childrenAfterGroup.push(e),n.updateHasChildren()}findParentForNode(e,t,i,s){let n=i.rootNode;return t.forEach(((t,r)=>{n=this.getOrCreateNextNode(n,t,r,i),s?.isRemoveFromAllLeafChildren(n,e)?s?.preventRemoveFromAllLeafChildren(n,e):n.allLeafChildren.push(e)})),n}getOrCreateNextNode(e,t,i,s){const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);let r=e?.childrenMapped?.[n];return r||(r=this.createGroup(t,e,i,s),this.addToParent(r,e)),r}createGroup(e,t,i,s){const n=new Yn(this.beans);return n.group=!0,n.field=e.field,n.rowGroupColumn=e.rowGroupColumn,this.setGroupData(n,e,s),n.key=e.key,n.id=this.createGroupId(n,t,i),n.level=i,n.leafGroup=i===s.groupedColCount-1,n.allLeafChildren=[],n.setAllChildrenCount(0),n.rowGroupIndex=i,n.childrenAfterGroup=[],n.childrenMapped={},n.updateHasChildren(),n.parent=t,this.setExpandedInitialValue(s,n),n}createGroupId(e,t,i){const s=(e,t)=>{if(!e.rowGroupColumn)return null;const i=t?s(t,t.parent,0):null;return`${null==i?"":i+"-"}${e.rowGroupColumn.getColId()}-${e.key}`};return Yn.ID_PREFIX_ROW_GROUP+s(e,t,i)}setGroupData(e,t,i){e.groupData={};this.showRowGroupColsService.getShowRowGroupCols().forEach((s=>{const n=e.rowGroupColumn;null!==n&&s.isRowGroupDisplayed(n.getId())&&(i.suppressGroupMaintainValueType?e.groupData[s.getColId()]=t.key:e.groupData[s.getColId()]=this.valueService.getValue(n,t.leafNode))}))}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup)return void(t.expanded=!1);const i=e.isGroupOpenByDefault;if(i){const e={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=1==i(e)}else-1!==e.expandByDefault?t.expanded=t.level<e.expandByDefault:t.expanded=!0}getGroupInfo(e,t){const i=[];
2return t.groupedCols.forEach((s=>{let n=this.valueService.getKeyForNode(s,e),r=null!==n&&void 0!==n&&""!==n;if((t.pivotMode||!t.groupAllowUnbalanced)&&!r&&(n="",r=!0),r){const t={key:n,field:s.getColDef().field,rowGroupColumn:s,leafNode:e};i.push(t)}})),i}},iz=(e,t)=>e.treeNode.oldSourceRowIndex-t.treeNode.oldSourceRowIndex,sz=Object.freeze([]),nz=sz.values(),rz=(e,t)=>{e.parent=null,e.treeNode=null,t?e.childrenAfterGroup=[]:(e.level=0,e.childrenAfterGroup=null,e.allLeafChildren=null)},oz=class e{constructor(e,t,i){this.parent=e,this.key=t,this.level=i,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=sz,this.allLeafChildren=sz,this.childrenChanged=!1,this.leafChildrenChanged=!1,this.oldSourceRowIndex=-1}isEmptyFillerNode(){return!this.row?.data&&!this.children?.size}hasChildren(){return!!this.children?.size}enumChildren(){return this.children?.values()??nz}upsertKey(t){"string"!==typeof t&&(t=String(t));let i=this.children?.get(t);return i||(i=new e(this,t,this.level+1),(this.children??(this.children=new Map))?.set(i.key,i)),i}destroy(){const{row:e,parent:t}=this;null!==t&&(t?.children?.delete(this.key),null!==e&&rz(e,!0),this.parent=null)}setRow(e){const{level:t,row:i,childrenAfterGroup:s}=this;if(t<0)null!==i&&i!==e&&rz(i,!0);else{if(i===e)return!1;null!==i?(e.allLeafChildren=i.allLeafChildren??this.allLeafChildren??sz,rz(i,!1)):e.allLeafChildren=this.allLeafChildren??sz}return e.level=t,e.childrenAfterGroup=s,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:t,row:i,duplicateRows:s,childrenAfterGroup:n}=this;if(i===e){const e=this.popDuplicateRow();e?(this.row=e,e.childrenAfterGroup=n,t>=0&&(e.allLeafChildren=i.allLeafChildren??this.allLeafChildren??sz)):this.row=null}else{if(!s?.delete(e))return!1;0===s.size&&(this.duplicateRows=null)}return rz(e,t<0),!0}addDuplicateRow(e){const{level:t}=this;let i=this.duplicateRows;if(null===i)i=new Set,this.duplicateRows=i;else if(i.has(e))return!1;return i.add(e),e.treeNode=this,e.level=t,t>=0&&(e.allLeafChildren=sz),e.childrenAfterGroup=sz,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,t=this.row;if(!t||!e)return t;let i=t;for(const s of e)s.sourceRowIndex<i.sourceRowIndex&&(i=s);return i!==t&&(i.childrenAfterGroup=this.childrenAfterGroup,i.allLeafChildren=t.allLeafChildren??this.allLeafChildren??sz,t.childrenAfterGroup=sz,t.allLeafChildren=sz,e.delete(i),e.add(t),this.row=i),i}popDuplicateRow(){let e=null;const t=this.duplicateRows;return null!==t&&(e=t.values().next().value,null!==e&&t.delete(e)&&0===t.size&&(this.duplicateRows=null)),e}dequeueInvalidated(){const e=this.invalidatedHead;return null!==e&&(this.invalidatedHead=e.invalidatedNext??null,e.invalidatedNext=void 0),e}invalidate(){let e=this,t=this.parent;for(;null!==t&&void 0===e.invalidatedNext;)e.invalidatedNext=t.invalidatedHead,t.invalidatedHead=e,e=t,t=e.parent}invalidateOrder(){const e=this.parent;null===e||e.childrenChanged||!((this.children?.size??0)>1)&&e.row?.data||(e.childrenChanged=!0,e.invalidate())}getRowPosition(){const e=this.row;return e?.data?e.sourceRowIndex:this.childrenAfterGroup[0]?.treeNode?.oldSourceRowIndex??this.oldSourceRowIndex}updateChildrenAfterGroup(){this.childrenChanged=!1;const e=this.children?.size??0;if(0===e)return 0!==this.childrenAfterGroup.length&&(this.leafChildrenChanged=!0,this.childrenAfterGroup=sz,this.row.childrenAfterGroup=sz,!0);let t=!1,i=this.childrenAfterGroup;i===sz?(i=new Array(e),this.childrenAfterGroup=i,this.row.childrenAfterGroup=i,t=!0):i.length!==e&&(i.length=e,t=!0);let s=0,n=-1,r=!1;for(const o of this.enumChildren()){const e=o.getRowPosition();e<n&&(r=!0),n=e,o.oldSourceRowIndex=e;const a=o.row;i[s]!==a&&(i[s]=a,t=!0),++s}return t&&(this.leafChildrenChanged=!0),r&&this.reorderChildrenList(i),t||r}reorderChildrenList(e){const t=e.length,i=this.children;e.sort(iz),i.clear();for(let s=0;s<t;++s){const t=e[s].treeNode;i.set(t.key,t)}}updateAllLeafChildren(){const{parent:e,row:t,childrenAfterGroup:i}=this;this.leafChildrenChanged=!1;let s=!1;const n=i.length;if(0===n)s=0!==t.allLeafChildren?.length,t.allLeafChildren=sz,this.allLeafChildren=sz;else if(1===n&&i[0].allLeafChildren?.length)t.allLeafChildren=i[0].allLeafChildren,this.allLeafChildren=null,s=!0;else{let e=this.allLeafChildren;e!==sz&&null!==e||(e=[],this.allLeafChildren=e);const r=e.length;let o=0;for(let t=0;t<n;++t){const n=i[t],a=n.allLeafChildren,l=a.length;if(l)for(let t=0;t<l;++t){const i=a[t];(o>=r||e[o]!==i)&&(e[o]=i,s=!0),++o}else(o>=r||e[o]!==n)&&n&&(e[o]=n,s=!0),++o}r!==o&&(e.length=o,s=!0),t.allLeafChildren!==e&&(t.allLeafChildren=e,s=!0)}s&&e&&(e.leafChildrenChanged=!0)}},az=e=>0!==(1&e.treeNodeFlags),lz=e=>0!==(2&e.treeNodeFlags),hz=e=>0!==(4&e.treeNodeFlags),cz=e=>0!==(16&e.treeNodeFlags),dz=(e,t)=>
2{t?e.treeNodeFlags|=2:e.treeNodeFlags&=-3},uz=e=>{e.treeNodeFlags|=16},pz=e=>{e.treeNodeFlags=1|-29&e.treeNodeFlags},gz=e=>{e.treeNodeFlags=0},mz=class extends ze{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new oz(null,"",-1)}wireBeans(e){this.beans=e,this.showRowGroupColsService=e.showRowGroupColsService}destroy(){const e=this.root.row;null!==e&&(this.root.removeRow(e),gz(e)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(e){const{rowNodeTransactions:t,rowNodesOrderChanged:i,changedPath:s}=e,n=e.rowNode,r=this.gos,o={changedPath:s,expandByDefault:r.get("groupDefaultExpanded"),suppressGroupMaintainValueType:r.get("suppressGroupMaintainValueType"),getDataPath:r.get("getDataPath"),isGroupOpenByDefault:r.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:r.getCallback("initialGroupOrderComparator")};this.root.setRow(n),n.leafGroup=!1;const a=n.sibling;a&&(a.childrenAfterGroup=n.childrenAfterGroup,a.childrenMapped=n.childrenMapped),t?this.handleTransaction(o,t,i):this.handleRowData(o,n,!0===e.afterColumnsChanged)}handleRowData(e,t,i){const s=this.root;if(i||void 0===this.oldGroupDisplayColIds){const e=this.showRowGroupColsService?.getShowRowGroupCols()?.map((e=>e.getId())).join("-")??"";if(i)return void(this.oldGroupDisplayColIds!==e&&this.checkAllGroupDataAfterColsChanged(s.row?.childrenAfterGroup));this.oldGroupDisplayColIds=e}this.clearTree(s),this.addOrUpdateRows(e,t.allLeafChildren,!1),this.commitTree(e)}handleTransaction(e,t,i){for(const{remove:s,update:n,add:r}of t)this.removeRows(s),this.addOrUpdateRows(e,n,!0),this.addOrUpdateRows(e,r,!1);i&&this.handleRowNodesOrderChanged(),this.commitTree(e)}handleRowNodesOrderChanged(){const e=this.root.row?.allLeafChildren;if(e)for(let t=0,i=e.length;t<i;++t){const i=e[t].treeNode;i&&i.oldSourceRowIndex!==t&&i.invalidateOrder()}}checkAllGroupDataAfterColsChanged(e){for(let t=0,i=e?.length??0;t<i;++t){const i=e[t];this.setGroupData(i,i.treeNode?.key??i.key),this.checkAllGroupDataAfterColsChanged(i.childrenAfterGroup)}}addOrUpdateRows(e,t,i){for(let s=0,n=t?.length??0;s<n;++s){const n=t[s],r=this.upsertPath(this.getDataPath(e,n));r&&this.addOrUpdateRow(r,n,i)}}removeRows(e){for(let t=0,i=e?.length??0;t<i;++t){const i=e[t],s=i.treeNode;null!==s&&this.removeRow(s,i)}}getDataPath(e,t){let{getDataPath:i}=e,{data:s}=t;const n=i?.(s)||sz;return n.length||h("getDataPath() should not return an empty path",[s]),n}upsertPath(e){let t=this.root;const i=e.length-1;for(let s=0;s<=i;++s){const n=t.upsertKey(e[s]);if(s>=i)return n.invalidate(),n;t=n}return null}addOrUpdateRow(e,t,i){const{level:s,row:n}=e;if(s<0)return;let r=!1;if(n!==t){const i=t.treeNode;null!==i&&i!==e&&(i.removeRow(t),i.invalidate()),null===n?(e.setRow(t),r=!0):n.data?e.addDuplicateRow(t)&&(r=!0):(e.setRow(t),this.destroyRow(n,!0),r=!0)}i&&!hz(t)&&((e=>{const t=e.treeNodeFlags;0!==(1&t)&&(e.treeNodeFlags=4|t)})(t),r=!0),r&&e.invalidate(),this.rowsPendingDestruction?.delete(t)}removeRow(e,t){const{parent:i,level:s}=e;if(s<0)return;let n=!1;e.removeRow(t)&&(n=!0,i&&(i.childrenChanged=!0),this.destroyRow(t,!t.data)),n&&e.invalidate()}commitTree(e){const t=this.root;this.commitInvalidatedChildren(e,t);const i=t.row;t.childrenChanged&&t.updateChildrenAfterGroup()&&uz(i),i.updateHasChildren(),cz(i)&&e.changedPath?.isActive()&&e.changedPath.addParentNode(i),pz(i),this.commitDestroyedRows()}commitInvalidatedChildren(e,t){for(;;){const i=t.dequeueInvalidated();if(null===i)break;i.parent===t&&this.commitChild(e,t,i)}}commitChild(e,t,i){i.isEmptyFillerNode()?this.clearTree(i):(this.commitNodePreOrder(t,i),this.commitInvalidatedChildren(e,i),this.commitNodePostOrder(e,t,i))}commitNodePreOrder(e,t){let i=t.row;if(null===i?(i=this.createFillerRow(t),t.setRow(i)):(i=t.sortFirstDuplicateRow(),void 0===i.allChildrenCount&&(i.allChildrenCount=null)),i.parent=e.row,t.oldRow!==i)for(const n of t.enumChildren()){const e=n.row;null!==e&&(e.parent=i)}const s=t.key;i.key!==s?(i.key=s,(e=>{const t=e.treeNodeFlags;0!==(1&t)&&(e.treeNodeFlags=12|t)})(i),this.setGroupData(i,s)):i.groupData||this.setGroupData(i,s)}commitNodePostOrder(e,t,i){const s=i.row,n=i.oldRow;if(i.isEmptyFillerNode())return void this.clearTree(i);i.childrenChanged&&i.updateChildrenAfterGroup()&&uz(s),i.leafChildrenChanged&&i.updateAllLeafChildren();const r=i.getRowPosition();i.oldSourceRowIndex!==r&&(i.oldSourceRowIndex=r,t.childrenChanged=!0);const o=!!s.childrenAfterGroup?.length,a=o||!s.data,l=s.group;l!==a?(uz(s),s.setGroup(a),a||s.expanded||dz(s,!1)):s.hasChildren()!==o&&(uz(s),s.updateHasChildren()),s.group&&!lz(s)&&(n!==s&&null!==n&&n.group&&lz(n)&&!e.isGroupOpenByDefault?s.expanded=n.expanded:s.expanded=this.getExpandedInitialValue(e,s),dz(s,!0)),hz(s)&&(uz(t.row),(e=>0!==(8&e.treeNodeFlags))(s)&&s.setData(s.data)),n!==s&&(i.oldRow=s,null!==n&&(l||i.hasChildren())&&uz(s),t.childrenChanged=!0,uz(t.row)),cz(s)?e.changedPath?.isActive()&&e.changedPath.addParentNode(s):az(s)||(s.childrenAfterFilter||(s.childrenAfterFilter=s.childrenAfterGroup.slice()),s.childrenAfterAggFilter||(s.childrenAfterAggFilter=s.childrenAfterFilter.slice()),s.childrenAfterSort||(s.childrenAfterSort=s.childrenAfterAggFilter.slice())),pz(s),i.duplicateRows?.size&&!i.duplicateRowsWarned&&(i.duplicateRowsWarned=!0,h("duplicate group keys for row data, keys should be unique",[s.id,s.data,...Array.from(i.duplicateRows).map((e=>e.data))]))}createFillerRow(e){const t=new Yn(this.beans);
2t.key=e.key,t.group=!0,t.field=null,t.leafGroup=!1,t.rowGroupIndex=null,t.allChildrenCount=null;let i=e.level+"-"+e.key,s=e.parent;for(;null!==s;){const e=s.parent;if(null===e)break;i=`${s.level}-${s.key}-${i}`,s=e}return t.id=Yn.ID_PREFIX_ROW_GROUP+i,t}setGroupData(e,t){const i={};e.groupData=i;const s=this.showRowGroupColsService?.getShowRowGroupCols();if(s)for(const n of s)i[n.getColId()]=t}getExpandedInitialValue(e,t){const i=e.isGroupOpenByDefault;return i?1==i({rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn}):-1===e.expandByDefault||t.level<e.expandByDefault}clearTree(e){const{parent:t,oldRow:i,row:s,level:n}=e;if(null!==t&&null!==i&&(t.childrenChanged=!0,null!==t.row&&uz(t.row)),null!==s&&n>=0){let t=e.row;for(;null!==t&&e.removeRow(t);)this.destroyRow(t,!t.data),t=e.row}for(const r of e.enumChildren())this.clearTree(r);e.destroy()}destroyTree(e){const{row:t,level:i,duplicateRows:s}=e;if(t&&(i>=0&&!t.data?this.destroyRow(t,!0):gz(t)),s)for(const n of s)i>=0&&!n.data?this.destroyRow(n,!0):gz(n);for(const n of e.enumChildren())this.destroyTree(n);
2e.destroy()}destroyRow(e,t){az(e)?t?(gz(e),e.setRowIndex(null),e.setRowTop(null),!e.data&&e.isSelected()&&e.setSelectedParams({newValue:!1,source:"rowGroupChanged"})):(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(e):gz(e)}commitDestroyedRows(){const{rowsPendingDestruction:e}=this;if(null!==e){this.rowsPendingDestruction=null;for(const t of e)this.destroyRow(t,!0)}}},fz="PivotRowTotal_",vz="Exceeded maximum allowed pivot column count.";var yz="32.3.3",Cz={version:yz,moduleName:`${r.RowGroupingModule}-core`,beans:[class extends ze{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(e){this.columnModel=e.columnModel,this.aggFuncService=e.aggFuncService,this.funcColsService=e.funcColsService,this.pivotResultColsService=e.pivotResultColsService,this.valueService=e.valueService}execute(e){const t=x(this.funcColsService.getValueColumns()),i=!this.gos.getCallback("getGroupRowAgg"),s=e.changedPath&&e.changedPath.isActive();if(t&&i&&s)return;const n=this.createAggDetails(e);this.recursivelyCreateAggData(n)}createAggDetails(e){const t=this.columnModel.isPivotActive(),i=this.funcColsService.getValueColumns(),s=t?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!X(this.gos),changedPath:e.changedPath,valueColumns:i,pivotColumns:s,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return void 0!==Q(this.gos)||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){e.changedPath.forEachChangedNodeDepthFirst((t=>{if(!t.hasChildren())return void(t.aggData&&t.setAggData(null));if(-1===t.level&&!e.groupIncludeTotalFooter){const i=!this.columnModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&i)return void t.setAggData(null)}this.aggregateRowNode(t,e)}),!0)}aggregateRowNode(e,t){const i=0===t.valueColumns.length,s=0===t.pivotColumns.length;let n;n=t.userAggFunc?t.userAggFunc({nodes:e.childrenAfterFilter}):i?null:s?this.aggregateRowNodeUsingValuesOnly(e,t):this.aggregateRowNodeUsingValuesAndPivot(e),e.setAggData(n),e.sibling&&e.sibling.setAggData(n)}aggregateRowNodeUsingValuesAndPivot(e){const t={},i=this.pivotResultColsService.getPivotResultCols()?.list??[];let s=!0;for(let n=0;n<i.length;n++){const r=i[n],o=r.getColDef();if(null!=o.pivotTotalColumnIds){s=!1;continue}const a=o.pivotKeys??[];let l;l=e.leafGroup?this.getValuesFromMappedSet(e.childrenMapped,a,o.pivotValueColumn):this.getValuesPivotNonLeaf(e,o.colId),t[o.colId]=this.aggregateValues(l,o.pivotValueColumn.getAggFunc(),o.pivotValueColumn,e,r)}if(!s)for(let n=0;n<i.length;n++){const s=i[n],r=s.getColDef();if(null==r.pivotTotalColumnIds||!r.pivotTotalColumnIds.length)continue;const o=r.pivotTotalColumnIds.map((e=>t[e]));t[r.colId]=this.aggregateValues(o,r.pivotValueColumn.getAggFunc(),r.pivotValueColumn,e,s)}return t}aggregateRowNodeUsingValuesOnly(e,t){const i={},s=t.changedPath.isActive()?t.changedPath.getValueColumnsForNode(e,t.valueColumns):t.valueColumns,n=t.changedPath.isActive()?t.changedPath.getNotValueColumnsForNode(e,t.valueColumns):null,r=this.getValuesNormal(e,s,t.filteredOnly),o=e.aggData;return s.forEach(((t,s)=>{i[t.getId()]=this.aggregateValues(r[s],t.getAggFunc(),t,e)})),n&&o&&n.forEach((e=>{i[e.getId()]=o[e.getId()]})),i}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map((e=>e.aggData[t]))}getValuesFromMappedSet(e,t,i){let s=e;for(let n=0;n<t.length;n++){const e=t[n];s=s?s[e]:null}return s?s.map((e=>this.valueService.getValue(i,e))):[]}getValuesNormal(e,t,i){const s=[];t.forEach((()=>s.push([])));const n=t.length,r=i?e.childrenAfterFilter:e.childrenAfterGroup,o=r.length;for(let a=0;a<o;a++){const e=r[a];for(let i=0;i<n;i++){const n=t[i],r=this.valueService.getValue(n,e);s[i].push(r)}}return s}aggregateValues(e,t,i,s,n){const r="string"===typeof t?this.aggFuncService.getAggFunc(t):t;if("function"!==typeof r)return c(`unrecognised aggregation function ${t}`),null;return r(this.gos.addGridCommonParams({values:e,column:i,colDef:i?i.getColDef():void 0,pivotResultColumn:n,rowNode:s,data:s?s.data:void 0}))}},class extends ze{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(e){this.filterManager=e.filterManager,this.columnModel=e.columnModel}execute(e){var t=this;const i=this.columnModel.isPivotMode(),s=this.filterManager?.isAggregateFilterPresent()||this.filterManager?.isAggregateQuickFilterPresent(),n=Q(this.gos)||(i?e=>e.node.leafGroup:e=>!e.node.group),{changedPath:r}=e,o=function(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.childrenAfterFilter&&(e.childrenAfterAggFilter=e.childrenAfterFilter,i&&e.childrenAfterAggFilter.forEach((e=>o(e,i))),t.setAllChildrenCount(e)),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)};r.forEachChangedNodeDepthFirst(s?e=>{e.childrenAfterAggFilter=e.childrenAfterFilter?.filter((e=>{if(n({node:e}
2)){if(this.filterManager.doesRowPassAggregateFilters({rowNode:e}))return o(e,!0),!0}const t=e.childrenAfterAggFilter?.length;return t}))||null,this.setAllChildrenCount(e),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)}:o,!0)}setAllChildrenCountTreeData(e){const t=e.childrenAfterAggFilter;let i=0;if(t){const e=t.length;i=e;for(let s=0;s<e;++s)i+=t[s].allChildrenCount??0}e.setAllChildrenCount(0===i&&e.level>=0?null:i)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach((e=>{e.group?t+=e.allChildrenCount:t++})),e.setAllChildrenCount(t)}setAllChildrenCount(e){e.hasChildren()?this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e):e.setAllChildrenCount(null)}},class extends ze{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(e){this.selectableService=e.selectableService}execute(e){const t=this.gos.get("treeData")?mz:tz;let i=this.strategy;i?.constructor!==t&&(this.destroyBean(i),i=this.createManagedBean(new t),this.strategy=i),i.execute(e),this.selectableService.updateSelectableAfterGrouping()}destroy(){this.destroyBean(this.strategy),this.strategy=void 0,super.destroy()}},class extends ze{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.columnNameService=e.columnNameService}postConstruct(){const e=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",(()=>{this.fieldSeparator=e()}));const t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",(()=>{this.pivotDefaultExpanded=t()}))}createPivotColumnDefs(e){const t=this.createPivotColumnsFromUniqueValues(e);const i=function e(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((t=>{void 0!==t.children?e(t.children,i):i.push(t)})),i}(t);this.addRowGroupTotals(t,i),this.addExpandablePivotGroups(t,i),this.addPivotTotalsToGroups(t,i);return{pivotColumnGroupDefs:t,pivotColumnDefs:i.map((e=>tt(e)))}}createPivotColumnsFromUniqueValues(e){const t=this.funcColsService.getPivotColumns(),i=t.length;return this.recursivelyBuildGroup(0,e,[],i,t)}recursivelyBuildGroup(e,t,i,s,n){const r=this.funcColsService.getValueColumns();if(e>=s)return this.buildMeasureCols(i);const o=n[e].getColDef(),a=this.headerNameComparator.bind(this,o.pivotComparator);if(1===r.length&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===s-1){const e=[];return et(t,(t=>{const s=[...i,t],n=this.createColDef(r[0],t,s);n.columnGroupShow="open",e.push(n)})),e.sort(a),e}const l=[];return et(t,((t,r)=>{const o=-1===this.pivotDefaultExpanded||e<this.pivotDefaultExpanded,a=[...i,t];l.push({children:this.recursivelyBuildGroup(e+1,r,a,s,n),headerName:t,pivotKeys:a,columnGroupShow:"open",openByDefault:o,groupId:this.generateColumnGroupId(a)})})),l.sort(a),l}buildMeasureCols(e){const t=this.funcColsService.getValueColumns();return 0===t.length?[this.createColDef(null,"-",e)]:t.map((t=>{const i=this.columnNameService.getDisplayNameForColumn(t,"header");return{...this.createColDef(t,i,e),columnGroupShow:"open"}}))}addExpandablePivotGroups(e,t){const i=this.gos.get("suppressExpandablePivotGroups");
2if(i||this.gos.get("pivotColumnGroupTotals"))return;const s=(e,t,n)=>{if("children"in e){const r=new Map;e.children.forEach((e=>{s(e,t,r)}));const o=!e.children.some((e=>e.children));return this.funcColsService.getValueColumns().forEach((s=>{const n=this.columnNameService.getDisplayNameForColumn(s,"header"),a=this.createColDef(s,n,e.pivotKeys);if(a.pivotTotalColumnIds=r.get(s.getColId()),a.columnGroupShow=i?"open":"closed",a.aggFunc=s.getAggFunc(),!o){e.children.push(a),t.push(a)}})),void this.merge(n,r)}if(!e.pivotValueColumn)return;const r=e.pivotValueColumn.getColId();if(n.has(r)){n.get(r).push(e.colId)}else n.set(r,[e.colId])};e.forEach((e=>{s(e,t,new Map)}))}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;const i="after"===this.gos.get("pivotColumnGroupTotals"),s=this.funcColsService.getValueColumns(),n=s.map((e=>e.getAggFunc()));if(!n||n.length<1||!this.sameAggFuncs(n))return;const r=s[0];e.forEach((e=>{this.recursivelyAddPivotTotal(e,t,r,i)}))}recursivelyAddPivotTotal(e,t,i,s){const n=e;if(!n.children){const t=e;return t.colId?[t.colId]:null}let r=[];if(n.children.forEach((e=>{const n=this.recursivelyAddPivotTotal(e,t,i,s);n&&(r=r.concat(n))})),n.children.length>1){const n=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),o=this.createColDef(i,n,e.pivotKeys,!0);o.pivotTotalColumnIds=r,o.aggFunc=i.getAggFunc(),o.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const a=e.children;s?a.push(o):a.unshift(o),t.push(o)}return r}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;const i="after"===this.gos.get("pivotRowTotals"),s=this.funcColsService.getValueColumns().slice();i||s.reverse();const n=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let r=0;r<s.length;r++){const o=s[r],a=this.columnNameService.getDisplayNameForColumn(o,"header"),l=this.createColDef(o,a,[]),h=[];for(let e=0;e<t.length;e++){const i=t[e];i.pivotValueColumn===o&&h.push(i.colId)}l.pivotTotalColumnIds=h,l.colId=fz+l.colId;const c=n?{children:[l],pivotKeys:[],groupId:`${fz}_pivotGroup_${o.getColId()}`}:l;t.push(l),i?e.push(c):e.unshift(c)}}createColDef(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n={};if(e){const t=e.getColDef();Object.assign(n,t),n.hide=!1}return n.headerName=t,n.colId=this.generateColumnId(i||[],e&&!s?e.getColId():""),n.field=n.colId,n.valueGetter=e=>e.data?.[e.colDef.field],n.pivotKeys=i,n.pivotValueColumn=e,!0===n.filter&&(n.filter="agNumberColumnFilter"),n}sameAggFuncs(e){if(1==e.length)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}headerNameComparator(e,t,i){return e?e(t.headerName,i.headerName):t.headerName&&!i.headerName?1:!t.headerName&&i.headerName?-1:t.headerName&&i.headerName?t.headerName<i.headerName?-1:t.headerName>i.headerName?1:0:0}merge(e,t){t.forEach(((t,i)=>{const s=[...e.has(i)?e.get(i):[],...t];e.set(i,s)}))}generateColumnGroupId(e){return`pivotGroup_${this.funcColsService.getPivotColumns().map((e=>e.getColId())).join("-")}_${e.join("-")}`}generateColumnId(e,t){return`pivot_${this.funcColsService.getPivotColumns().map((e=>e.getColId())).join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){const t={};for(let n=0;n<e.length;n++){const i=e[n].split(this.fieldSeparator);let s=t;for(let e=0;e<i.length;e++){const t=i[e];null==s[t]&&(s[t]={}),s=s[t]}}const i=(e,t,s,n)=>{const r=[];for(const o in s){const t=s[o],a=i(`${e}${this.fieldSeparator}${o}`,o,t,n+1);
2r.push(a)}if(0===r.length){const i=this.columnModel.getColDefCol(t);if(i){const s=this.columnNameService.getDisplayNameForColumn(i,"header")??t,n=this.createColDef(i,s,void 0,!1);return n.colId=e,n.aggFunc=i.getAggFunc(),n.valueGetter=t=>t.data?.[e],n}return{colId:e,headerName:t,valueGetter:t=>t.data?.[e]}}if(this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===r.length&&"colId"in r[0])return r[0].headerName=t,r[0];return{openByDefault:-1===this.pivotDefaultExpanded||n<this.pivotDefaultExpanded,groupId:e,headerName:t,children:r}},s=[];for(const n in t){const e=i(n,n,t[n],0);s.push(e)}return s}},class extends ze{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.pivotResultColsService=e.pivotResultColsService,this.funcColsService=e.funcColsService,this.pivotColDefService=e.pivotColDefService}execute(e){const t=e.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(t):this.executePivotOff(t)}executePivotOff(e){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),e&&e.setInactive())}executePivotOn(e){const t=this.funcColsService.getValueColumns().length??1,i=this.gos.get("pivotMaxGeneratedColumns");let s;this.maxUniqueValues=-1===i?-1:i/t;try{s=this.bucketUpRowNodes(e)}catch(v){if(v.message===vz)return this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:v.message}),void(this.lastTimeFailed=!0);throw v}const n=this.setUniqueValues(s),r=this.funcColsService.getValueColumns(),o=r.map((e=>`${e.getId()}-${e.getColDef().headerName}`)).join("#"),a=r.map((e=>e.getAggFunc().toString())).join("#"),l=this.aggregationColumnsHashLastTime!==o,h=this.aggregationFuncsHashLastTime!==a;this.aggregationColumnsHashLastTime=o,this.aggregationFuncsHashLastTime=a;const c=this.funcColsService.getRowGroupColumns().map((e=>e.getId())).join("#"),d=c!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=c;const u=this.gos.get("pivotRowTotals"),p=this.gos.get("pivotColumnGroupTotals"),g=this.gos.get("suppressExpandablePivotGroups"),m=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),f=u!==this.pivotRowTotalsLastTime||p!==this.pivotColumnGroupTotalsLastTime||g!==this.suppressExpandablePivotGroupsLastTime||m!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=u,this.pivotColumnGroupTotalsLastTime=p,this.suppressExpandablePivotGroupsLastTime=g,this.removePivotHeaderRowWhenSingleValueColumnLastTime=m,this.lastTimeFailed||n||l||d||h||f){const{pivotColumnGroupDefs:t,pivotColumnDefs:i}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=i,this.pivotResultColsService.setPivotResultCols(t,"rowModelUpdated"),e&&e.setInactive()}this.lastTimeFailed=!1}setUniqueValues(e){return!!(JSON.stringify(e)!==JSON.stringify(this.uniqueValues))&&(this.uniqueValues=e,!0)}bucketUpRowNodes(e){this.currentUniqueCount=0;const t={};e.forEachChangedNodeDepthFirst((e=>{e.leafGroup&&(e.childrenMapped=null)}));const i=e=>{e.leafGroup?this.bucketRowNode(e,t):e.childrenAfterFilter?.forEach(i)};return e.executeFromRootNode(i),t}bucketRowNode(e,t){const i=this.funcColsService.getPivotColumns();0===i.length?e.childrenMapped=null:e.childrenMapped=this.bucketChildren(e.childrenAfterFilter,i,0,t),e.sibling&&(e.sibling.childrenMapped=e.childrenMapped)}bucketChildren(e,t,i,s){const n={},r=t[i];if(e.forEach((e=>{let t=this.valueService.getKeyForNode(r,e);if(b(t)&&(t=""),!s[t]){this.currentUniqueCount+=1,s[t]={};const e=-1!==this.maxUniqueValues,i=this.currentUniqueCount>this.maxUniqueValues;if(e&&i)throw Error(vz)}n[t]||(n[t]=[]),n[t].push(e)})),i===t.length-1)return n;{const e={};return et(n,((n,r)=>{e[n]=this.bucketChildren(r,t,i+1,s[n])})),e}}getPivotColumnDefs(){return this.pivotColumnDefs}},class extends ze{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const e=this.aggFuncsMap;e.sum=zV,e.first=HV,e.last=WV,e.min=jV,e.max=UV,e.count=_V,e.avg=KV,this.initialised=!0}isAggFuncPossible(e,t){const i=Ee(this.getFuncNames(e),t),s=w(this.aggFuncsMap[t]);return i&&s}getDefaultFuncLabel(e){return VV[e]??e}getDefaultAggFunc(e){const t=e.getColDef().defaultAggFunc;if(w(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,"sum"))return"sum";const i=this.getFuncNames(e);return Ce(i)?i[0]:null}addAggFuncs(e){this.init(),et(e,((e,t)=>
2{this.aggFuncsMap[e]=t}))}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){const t=e.getColDef().allowedAggFuncs;return null==t?Object.keys(this.aggFuncsMap).sort():t}clear(){this.aggFuncsMap={}}},class extends ze{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.columnFactory=e.columnFactory}createAutoCols(e){const t=[],i=this.gos.get("treeData");let s=ee(this.gos);return i&&s&&(h('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),s=!1),s?e.forEach(((e,i)=>{t.push(this.createOneAutoCol(e,i))})):t.push(this.createOneAutoCol()),t}updateAutoCols(e,t){e.forEach(((e,i)=>this.updateOneAutoCol(e,i,t)))}createOneAutoCol(e,t){let i;i=e?`${_e}-${e.getId()}`:_e;const s=this.createAutoColDef(i,e,t);s.colId=i;const n=new dt(s,null,i,!0);return this.createBean(n),n}updateOneAutoCol(e,t,i){const s=e.getColDef(),n="string"==typeof s.showRowGroup?s.showRowGroup:void 0,r=null!=n?this.columnModel.getColDefCol(n):void 0,o=this.createAutoColDef(e.getId(),r??void 0,t);e.setColDef(o,null,i),this.columnFactory.applyColumnState(e,o,i)}createAutoColDef(e,t,i){let s=this.createBaseColDef(t);if(nt(s,this.gos.get("autoGroupColumnDef")),s=this.columnFactory.addColumnDefaultAndTypes(s,e),!this.gos.get("treeData")){b(s.field)&&b(s.valueGetter)&&b(s.filterValueGetter)&&"agGroupColumnFilter"!==s.filter&&(s.filter=!1)}i&&i>0&&(s.headerCheckboxSelection=!1);const n=q(this.gos),r=s.valueGetter||null!=s.field;return n&&!r&&(s.sortIndex=void 0,s.initialSort=void 0),s}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),i={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer"),e){const t=e.getColDef();Object.assign(i,{headerName:this.columnNameService.getDisplayNameForColumn(e,"header"),headerValueGetter:t.headerValueGetter}),t.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:t.cellRenderer,innerRendererParams:t.cellRendererParams}}),i.showRowGroup=e.getColId()}else i.showRowGroup=!0;return i}},class extends ze{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach((e=>{const t=e.getColDef().showRowGroup,i="string"===typeof t;if(i||!0===t)if(this.showRowGroupCols.push(e),i)this.showRowGroupColsMap[t]=e;else{this.funcColsService.getRowGroupColumns().forEach((t=>{this.showRowGroupColsMap[t.getId()]=e}))}}))}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(e){return this.showRowGroupColsMap[e]}},class extends ze{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return XV}}],userComponents:[{name:"agGroupRowRenderer",classImp:Dk},{name:"agGroupCellRenderer",classImp:Dk}],controllers:[{name:"groupCellRendererCtrl",classImp:Mk}],dependantModules:[ek]},Sz={version:yz,moduleName:`${r.RowGroupingModule}-api`,apiFunctions:{addAggFunc:function(e,t,i){e.aggFuncService&&e.aggFuncService.addAggFuncs({key:i})},addAggFuncs:function(e,t){e.aggFuncService&&e.aggFuncService.addAggFuncs(t)},clearAggFuncs:function(e){e.aggFuncService&&e.aggFuncService.clear()},setColumnAggFunc:function(e,t,i){e.funcColsService.setColumnAggFunc(t,i,"api")},isPivotMode:function(e){return e.columnModel.isPivotMode()},getPivotResultColumn:function(e,t,i){return e.pivotResultColsService.lookupPivotResultCol(t,i)},setValueColumns:function(e,t){e.funcColsService.setValueColumns(t,"api")},getValueColumns:function(e){return e.funcColsService.getValueColumns()},removeValueColumn:function(e,t){e.funcColsService.removeValueColumns([t],"api")},removeValueColumns:function(e,t){e.funcColsService.removeValueColumns(t,"api")},addValueColumn:function(e,t){e.funcColsService.addValueColumns([t],"api")},addValueColumns:function(e,t){e.funcColsService.addValueColumns(t,"api")},setRowGroupColumns:function(e,t){e.funcColsService.setRowGroupColumns(t,"api")},removeRowGroupColumn:function(e,t){e.funcColsService.removeRowGroupColumns([t],"api")},removeRowGroupColumns:function(e,t){e.funcColsService.removeRowGroupColumns(t,"api")},addRowGroupColumn:function(e,t){e.funcColsService.addRowGroupColumns([t],"api")},addRowGroupColumns:function(e,t){e.funcColsService.addRowGroupColumns(t,"api")},getRowGroupColumns:function(e){return e.funcColsService.getRowGroupColumns()},moveRowGroupColumn:function(e,t,i){e.funcColsService.moveRowGroupColumn(t,i,"api")},setPivotColumns:function(e,t){e.funcColsService.setPivotColumns(t,"api")},removePivotColumn:function(e,t){e.funcColsService.removePivotColumns([t],"api")},removePivotColumns:function(e,t){e.funcColsService.removePivotColumns(t,"api")},addPivotColumn:function(e,t){e.funcColsService.addPivotColumns([t],"api")},addPivotColumns:function(e,t){e.funcColsService.addPivotColumns(t,"api")},getPivotColumns:function(e){return e.funcColsService.getPivotColumns()},setPivotResultColumns:function(e,t){e.pivotResultColsService.setPivotResultCols(t,"api")},getPivotResultColumns:function(e){const t=e.pivotResultColsService.getPivotResultCols();return t?t.list:null}},dependantModules:[Cz]},wz={version:yz,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:class extends Nl{c
2onstructor(){super('\n            <div class="ag-group-filter">\n                <div data-ref="eGroupField"></div>\n                <div data-ref="eUnderlyingFilter"></div>\n            </div>\n        '),this.eGroupField=Is,this.eUnderlyingFilter=Is}wireBeans(e){this.filterManager=e.filterManager,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService}postConstruct(){this.initialiseTabGuard({})}init(e){return this.updateParams(e).then((()=>{this.addManagedEventListeners({columnRowGroupChanged:()=>this.onColumnRowGroupChanged(),filterDestroyed:e=>this.onFilterDestroyed(e)})}))}refresh(e){return this.updateParams(e),!0}updateParams(e){return this.params=e,this.validateParams(),this.updateGroups()}validateParams(){const{colDef:e}=this.params;e.field&&h('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),e.filterValueGetter&&h('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),e.filterParams&&h('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){const e=this.updateGroupField();return this.getUnderlyingFilters(e)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return h("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];const e=this.funcColsService.getSourceColumnsForGroupColumn(this.groupColumn);return e||(h("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){rs(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);const e=this.getSourceColumns(),t=e.filter((e=>e.isFilterAllowed()));return t.length?(1===e.length?(this.selectedColumn=t[0],Ki(this.eGroupField,!1)):(this.selectedColumn&&t.some((e=>e.getId()===this.selectedColumn.getId()))||(this.selectedColumn=t[0]),this.createGroupFieldSelectElement(t),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(hs('<div class="ag-filter-separator"></div>')),Ki(this.eGroupField,!0)),t):(this.selectedColumn=void 0,Ki(this.eGroupField,!1),null)}createGroupFieldSelectElement(e){this.eGroupFieldSelect=this.createManagedBean(new hr);const t=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(t("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(e.map((e=>({value:e.getId(),text:this.columnNameService.getDisplayNameForColumn(e,"groupFilter",!1)??void 0})))),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange((e=>this.updateSelectedColumn(e))),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),1===e.length&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(e){if(!e)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),an.resolve();const t=[],i=[];return e.forEach((e=>{const s=this.filterManager.getOrCreateFilterWrapper(e);s?.filterPromise&&t.push(s.filterPromise.then((t=>
2(t&&i.push({filter:t,column:e}),e.getId()===this.selectedColumn.getId()&&(this.selectedFilter=t??void 0),t))))})),an.all(t).then((()=>{this.filterColumnPairs=i,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")}))}addUnderlyingFilterElement(){if(rs(this.eUnderlyingFilter),!this.selectedColumn)return an.resolve();const e=this.createManagedBean(new Zn(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=e,e.hasFilter()?(this.eUnderlyingFilter.appendChild(e.getGui()),e.getFilter()?.then((()=>{e.afterGuiAttached?.(this.afterGuiAttachedParams),this.afterGuiAttachedParams?.suppressFocus||!this.eGroupFieldSelect||this.eGroupFieldSelect.isDisabled()||this.eGroupFieldSelect.getFocusableElement().focus()}))??an.resolve()):an.resolve()}updateSelectedColumn(e){if(!e)return;this.filterWrapperComp?.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);const t=this.getFilterColumnPair(e);this.selectedColumn=t?.column,this.selectedFilter=t?.filter,this.dispatchLocalEvent({type:"selectedColumnChanged"}),this.addUnderlyingFilterElement()}isFilterActive(){return!!this.filterColumnPairs?.some((e=>{let{filter:t}=e;return t.isFilterActive()}))}doesFilterPass(){return!0}getModel(){return null}setModel(){return an.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.addUnderlyingFilterElement()}afterGuiDetached(){rs(this.eUnderlyingFilter),this.selectedFilter?.afterGuiDetached?.()}onColumnRowGroupChanged(){this.updateGroups().then((()=>{this.dispatchLocalEvent({type:"columnRowGroupChanged"})}))}onFilterDestroyed(e){let{column:t,source:i}=e;if("gridDestroyed"===i)return;const s=t.getColId();this.filterColumnPairs?.some((e=>{let{column:t}=e;return t.getColId()===s}))&&setTimeout((()=>{this.isAlive()&&this.updateGroups()}))}getFilterColumnPair(e){if(e)return this.filterColumnPairs?.find((t=>{let{column:i}=t;return i.getId()===e}))}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}}}],dependantModules:[Cz,no]},bz={version:yz,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:class extends Rs{constructor(){super('\n            <div data-ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>\n        '),this.eFloatingFilter=Is,this.haveAddedColumnListeners=!1}wireBeans(e){this.columnNameService=e.columnNameService,this.filterManager=e.filterManager}init(e){this.params=e;const t="multipleColumns"===this.gos.get("groupDisplayType");return new an((e=>{this.params.parentFilterInstance((i=>{this.parentFilterInstance=i,t?this.setupUnderlyingFloatingFilterElement().then((()=>e())):(this.setupReadOnlyFloatingFilterElement(),e())}))})).then((()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})}))}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams()}setParams(){const e=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),t=this.localeService.getLocaleTextFunc();this.eFloatingFilterText?.setInputAriaLabel(`${e} ${t("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new fr),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",(()=>this.params.showParentFilter())),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,rs(this.eFloatingFilter);const e=this.parentFilterInstance.getSelectedColumn();if(e&&!e.isVisible()){const t=this.filterManager.getFloatingFilterCompDetails(e,this.params.showParentFilter);if(t)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(e,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),t.newAgStackInstance().then((e=>{this.underlyingFloatingFilter=e,this.underlyingFloatingFilter?.onParentModelChanged(this.parentFilterInstance.getSelectedFilter()?.getModel()),this.appendChild(e.getGui()),this.showingUnderlyingFloatingFilter=!0}))}return this.setupReadOnlyFloatingFilterElement(),an.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(e){if(!e.column)return;
2const t=this.filterManager.getFloatingFilterCompDetails(e.column,this.params.showParentFilter);t&&(this.underlyingFloatingFilter?.refresh?this.underlyingFloatingFilter.refresh(t.params):this.underlyingFloatingFilter?.onParamsUpdated?.(t.params))}onParentModelChanged(e,t){this.showingUnderlyingFloatingFilter?this.underlyingFloatingFilter?.onParentModelChanged(this.parentFilterInstance.getSelectedFilter()?.getModel(),t):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const e=this.parentFilterInstance.getSelectedFilter();if(!e)return this.eFloatingFilterText.setValue(""),void this.eFloatingFilterText.setDisplayed(!1);if(this.eFloatingFilterText.setDisplayed(!0),e.getModelAsString){const t=e.getModel();this.eFloatingFilterText.setValue(null==t?"":e.getModelAsString(t))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}}}],dependantModules:[wz,ao]},xz={version:yz,moduleName:r.RowGroupingModule,dependantModules:[Cz,Sz,wz,bz]},Mz=class extends ZV{constructor(e){super(e,"aggregation")}postConstruct(){const e=this.localeService.getLocaleTextFunc(),t=e("valueColumnsEmptyMessage","Drag here to aggregate"),i=e("values","Values");super.init({icon:Ps("valuePanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const e=super.getTooltipParams();return e.location="valueColumnsList",e}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(e,t){return!(this.gos.get("functionsReadOnly")||!e.isPrimary())&&(e.isAllowValue()&&(!e.isValueActive()||this.isSourceEventFromTarget(t)))}updateItems(e){this.funcColsService.setValueColumns(e,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}};function Dz(e){return!!e&&"undefined"!==typeof e.children}function Iz(e){return Dz(e)?e.groupId:e.colId}function Rz(e,t,i){if(!Dz(e))return!0;const s=e,n=i;
2if(((e,t)=>{const i=Ee(e.children.map(Iz),Iz(t)),s=Se(e.children),n=s&&Iz(s)!==Iz(t);return i&&n})(s,n))return s.children.push(n),!0;if(s.groupId===t){if(!Ee(s.children.map(Iz),Iz(n)))return s.children.push(n),!0}for(let r=s.children.length-1;r>=0&&!Rz(s.children[r],t,i);r--);return!1}function Ez(e){const t=(e,i)=>{if(!Dz(i))return e;const s=e,n=i;if(n.children&&n.groupId){if(Rz(s,n.groupId,n.children[0]))return s}return n.children.forEach((e=>t(s,e))),s},i=[];for(let r=1;r<=e.length;r++){const o=e[r-1],a=e[r];n=a,Dz(s=o)&&Dz(n)&&Iz(s)===Iz(n)?e[r]=t(o,a):i.push(o)}var s,n;return i}var Az=class extends ze{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(e){this.columnModel=e.columnModel}createColumnTree(e){const t=[],i=(e,s)=>{if(Dz(e)){const t=e,n="undefined"!==typeof t.groupId?t.groupId:t.headerName,r=new We(t,n,!1,s),o=[];return t.children.forEach((e=>{const t=i(e,s+1);t&&o.push(t)})),r.setChildren(o),r}{const i=e,s=i.colId?i.colId:i.field,n=this.columnModel.getColDefCol(s);return n||t.push(i),n}},s=[];return e.forEach((e=>{const t=i(e,0);t&&s.push(t)})),t.length>0&&h("unable to find grid columns for the supplied colDef(s):",t),s}syncLayoutWithGrid(e){e(Ez(this.getLeafPathTrees()))}getLeafPathTrees(){const e=(t,i)=>{let s;if(He(t))if(t.isPadding())s=i;else{const e=Object.assign({},t.getColGroupDef());e.groupId=t.getGroupId(),e.children=[i],s=e}else{const e=Object.assign({},t.getColDef());e.colId=t.getColId(),s=e}const n=t.getOriginalParent();return n?e(n,s):s};return this.columnModel.getCols().filter((e=>{const t=e.getColDef();return e.isPrimary()&&!t.showRowGroup})).map((t=>e(t,t.getColDef())))}};var Tz=class extends Rs{constructor(e){super(),this.eToggleButton=Is,this.eIconWrapper=Is,this.eLabel=Is,this.toolPanelDef=e}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const e=this.createTemplate();this.setTemplate(e,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return'<div class="ag-side-button" role="presentation">\n                <button type="button" data-ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">\n                    <div data-ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>\n                    <span data-ref="eLabel" class="ag-side-button-label"></span>\n                </button>\n            </div>'}setLabel(){const e=this.localeService.getLocaleTextFunc(),t=this.toolPanelDef,i=e(t.labelKey,t.labelDefault);this.eLabel.innerText=i}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",Ps(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(e){this.addOrRemoveCssClass("ag-selected",e),Ci(this.eToggleButton,e)}getButtonElement(){return this.eToggleButton}},Pz={selector:"AG-SIDE-BAR-BUTTONS",component:class extends Rs{constructor(){super('<div class="ag-side-buttons" role="tablist"></div>'),this.buttonComps=[]}wireBeans(e){this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}postConstruct(){this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){e.key===js.TAB&&e.shiftKey&&(this.focusService.focusNextGridCoreContainer(!0)?e.preventDefault():Ne(e))}setActiveButton(e){this.buttonComps.forEach((t=>{t.setSelected(e===t.getToolPanelId())}))}addButtonComp(e){const t=this.createBean(new Tz(e));return this.buttonComps.push(t),this.appendChild(t),t.addEventListener("toggleButtonClicked",(()=>{this.dispatchLocalEvent({type:"sideBarButtonClicked",toolPanelId:e.id})})),t}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),rs(this.getGui()),super.destroy()}destroy(){this.clearButtons(),super.destroy()}}},Lz={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},Fz={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},kz={columns:Lz,filters:Fz};function Nz(e){if(!e)return;if(!0===e)return{toolPanels:[Lz,Fz],defaultToolPanel:"columns"};if("string"===typeof e)return Nz([e]);if(Array.isArray(e)){const t=[];if(e.forEach((e=>{const i=kz[e];i?t.push(i):Oz(e)})),0===t.length)return;return{toolPanels:t,defaultToolPanel:t[0].id}}return{toolPanels:Gz(e.toolPanels),defaultToolPanel:e.defaultToolPanel,hiddenByDefault:e.hiddenByDefault,position:e.position}}function Oz(e){h(`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(kz).join(",")}`)}function Gz(e){const t=[];return e?(e.forEach((e=>{let i=null;if("string"===typeof e){const t=kz[e];if(!t)return void Oz(e);i=t}else i=e;t.push(i)})),t):t}var Bz=class extends Rs{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}wireBeans(e){this.horizontalResizeService=e.horizontalResizeService}setElementToResize(e){this.elementToResize=e}postConstruct(){const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(e),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(e,t,i){this.eventService.dispatchEvent({type:"toolPanelSizeChanged",width:i,started:e,ended:t})}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(e){return this.onResizing(e,!0)}onResizing(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.inverted?-1:1;let s=Math.max(this.minWidth,Math.floor(this.startingWidth-e*i));null!=this.maxWidth&&(s=Math.min(this.maxWidth,s)),this.elementToResize.style.width=`${s}px`,this.dispatchResizeEvent(!1,t,s)}setInverted(e){this.inverted=e}setMaxWidth(e){this.maxWidth=e}setMinWidth(e){this.minWidth=null!=e?e:100}},Vz=class extends Rs{wireBeans(e){this.userComponentFactory=e.userComponentFactory}constructor(){super('<div class="ag-tool-panel-wrapper" role="tabpanel"/>')}postConstruct(){const e=this.getGui(),t=this.resizeBar=this.createManagedBean(new Bz);e.setAttribute("id",`ag-${this.getCompId()}`),t.setElementToResize(e),this.appendChild(t)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(e,t){const{id:i,minWidth:s,maxWidth:n,width:r}=e;this.toolPanelId=i,this.width=r;
2const o=this.userComponentFactory.getToolPanelCompDetails(e,t),a=o.newAgStackInstance();this.params=o.params,null!=a?(a.then(this.setToolPanelComponent.bind(this)),null!=s&&this.resizeBar.setMinWidth(s),null!=n&&this.resizeBar.setMaxWidth(n)):h(`error processing tool panel component ${i}. You need to specify 'toolPanel'`)}setToolPanelComponent(e){this.toolPanelCompInstance=e,this.appendChild(e.getGui()),this.addDestroyFunc((()=>{this.destroyBean(e)})),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(e){const t="left"===e,i=this.gos.get("enableRtl")?t:!t;this.resizeBar.setInverted(i)}refresh(){this.toolPanelCompInstance?.refresh(this.params)}},zz={selector:"AG-SIDE-BAR",component:class extends Rs{constructor(){super('<div class="ag-side-bar ag-unselectable">\n            <ag-side-bar-buttons data-ref="sideBarButtons"></ag-side-bar-buttons>\n        </div>',[Pz]),this.sideBarButtons=Is,this.toolPanelWrappers=[]}wireBeans(e){this.focusService=e.focusService,this.filterManager=e.filterManager,this.sideBarService=e.sideBarService}postConstruct(){this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));const{sideBar:e}=this.gos.get("initialState")??{};this.setSideBarDef({sideBarDef:Nz(this.gos.get("sideBar")),sideBarState:e}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const t=this.getFocusableElement();this.createManagedBean(new tr(t,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),Lh(this,t,this.focusService)}onTabKeyDown(e){if(e.defaultPrevented)return;const{focusService:t,sideBarButtons:i}=this,s=this.getGui(),n=i.getGui(),r=K(this.gos),o=s.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),a=e.target;if(!o)return t.focusNextGridCoreContainer(e.shiftKey,!0);if(n.contains(r))return void(t.focusInto(o,e.shiftKey)&&e.preventDefault());if(!e.shiftKey)return;let l=null;o.contains(r)?l=this.focusService.findNextFocusableElement(o,void 0,!0):t.isTargetUnderManagedComponent(o,a)&&e.shiftKey&&(l=this.focusService.findFocusableElementBeforeTabGuard(o,a)),l||(l=n.querySelector(".ag-selected button")),l&&l!==e.target&&(e.preventDefault(),l.focus())}handleKeyDown(e){const t=K(this.gos);if(!this.sideBarButtons.getGui().contains(t))return;const i=this.sideBarButtons.getGui(),s=Array.prototype.slice.call(i.querySelectorAll(".ag-side-button")),n=s.findIndex((e=>e.contains(t)));let r=null;switch(e.key){case js.LEFT:case js.UP:r=Math.max(0,n-1);break;case js.RIGHT:case js.DOWN:r=Math.min(n+1,s.length-1)}if(null===r)return;const o=s[r].querySelector("button");o&&(o.focus(),e.preventDefault())}onToolPanelButtonClicked(e){const t=e.toolPanelId;this.openedItem()===t?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(t,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef(e){let{sideBarDef:t,sideBarState:i,existingToolPanelWrappers:s}=e;if(this.setDisplayed(!1),this.sideBar=t,this.sideBar&&this.sideBar.toolPanels){const e=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(e,i,s),!this.toolPanelWrappers.length)return;const t=i?i.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(t),this.setSideBarPosition(i?i.position:this.sideBar.position),t)if(i){const{openToolPanel:e}=i;e&&this.openToolPanel(e,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(e){e||(e="right"),this.position=e;const t="left"===e,i=t?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",t),this.addOrRemoveCssClass("ag-side-bar-right",!t),this.toolPanelWrappers.forEach((e=>{e.setResizerSizerSide(i)})),this.dispatchSideBarUpdated(),this}setDisplayed(e,t){super.setDisplayed(e,t),this.dispatchSideBarUpdated()}getState(){const e={};return this.toolPanelWrappers.forEach((t=>{e[t.getToolPanelId()]=t.getToolPanelInstance()?.getState?.()})),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:e}}createToolPanelsAndSideButtons(e,t,i){for(const s of e)this.createToolPanelAndSideButton(s,t?.toolPanels?.[s.id],i?.[s.id])}validateDef(e){if(null==e.id)return h("please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if("agColumnsToolPanel"===e.toolPanel){if(!this.gos.assertModuleRegistered(r.ColumnsToolPanelModule,"Column Tool Panel"))return!1}if("agFiltersToolPanel"===e.toolPanel){if(!this.gos.assertModuleRegistered(r.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if(this.filterManager?.isAdvancedFilterEnabled())return h("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(e,t,i){if(!this.validateDef(e))return;const s=this.sideBarButtons.addButtonComp(e);let n;i?n=i:(n=this.createBean(new Vz),n.setToolPanelDef(e,{initialState:t,onStateUpdated:()=>this.dispatchSideBarUpdated()})),n.setDisplayed(!1);const r=n.getGui();this.appendChild(r),this.toolPanelWrappers.push(n),Pi(s.getButtonElement(),r)}
2refresh(){this.toolPanelWrappers.forEach((e=>e.refresh()))}openToolPanel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";const i=this.openedItem();if(i===e)return;this.toolPanelWrappers.forEach((t=>{const i=e===t.getToolPanelId();t.setDisplayed(i)}));i!==this.openedItem()&&(this.sideBarButtons.setActiveButton(e),this.raiseToolPanelVisibleEvent(e,i??void 0,t))}getToolPanelInstance(e){const t=this.toolPanelWrappers.filter((t=>t.getToolPanelId()===e))[0];if(t)return t.getToolPanelInstance();h(`unable to lookup Tool Panel as invalid key supplied: ${e}`)}raiseToolPanelVisibleEvent(e,t,i){const s=!!e&&!!t;t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:i,key:t,visible:!1,switchingToolPanel:s}),e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:i,key:e,visible:!0,switchingToolPanel:s})}close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"api";this.openToolPanel(void 0,e)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let e=null;return this.toolPanelWrappers.forEach((t=>{t.isDisplayed()&&(e=t.getToolPanelId())})),e}onSideBarUpdated(){const e=Nz(this.gos.get("sideBar")),t={};e&&this.sideBar&&e.toolPanels?.forEach((e=>{const{id:i}=e;if(!i)return;const s=this.sideBar.toolPanels?.find((e=>e.id===i));if(!s||e.toolPanel!==s.toolPanel)return;const n=this.toolPanelWrappers.find((e=>e.getToolPanelId()===i));if(!n)return;const r=this.gos.addGridCommonParams({...e.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()}),o=n.getToolPanelInstance()?.refresh(r);!0===o&&(this.toolPanelWrappers=this.toolPanelWrappers.filter((e=>e!==n)),os(n.getGui()),t[i]=n)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:e,existingToolPanelWrappers:t})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach((e=>{os(e.getGui()),this.destroyBean(e)})),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}}},Hz="32.3.3",Wz={version:Hz,moduleName:`${r.SideBarModule}-core`,beans:[Az,class extends ze{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(e){this.sideBarComp=e}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return zz}}],dependantModules:[ek]},jz={version:Hz,moduleName:`${r.SideBarModule}-api`,apiFunctions:{isSideBarVisible:function(e){return e.sideBarService?.getSideBarComp().isDisplayed()??!1},setSideBarVisible:function(e,t){e.sideBarService?.getSideBarComp().setDisplayed(t)},setSideBarPosition:function(e,t){e.sideBarService?.getSideBarComp().setSideBarPosition(t)},openToolPanel:function(e,t){e.sideBarService?.getSideBarComp().openToolPanel(t,"api")},closeToolPanel:function(e){e.sideBarService?.getSideBarComp().close("api")},getOpenedToolPanel:function(e){return e.sideBarService?.getSideBarComp().openedItem()??null},refreshToolPanel:function(e){e.sideBarService?.getSideBarComp().refresh()},isToolPanelShowing:function(e){return e.sideBarService?.getSideBarComp().isToolPanelShowing()??!1},getToolPanelInstance:function(e,t){const i=e.sideBarService?.getSideBarComp().getToolPanelInstance(t);return Tn(i)},getSideBar:function(e){return e.sideBarService?.getSideBarComp().getDef()}},dependantModules:[Wz]},Uz={version:Hz,moduleName:r.SideBarModule,dependantModules:[Wz,jz]},_z={selector:"AG-PRIMARY-COLS-HEADER",component:class extends Rs{constructor(){super('<div class="ag-column-select-header" role="presentation">\n            <div data-ref="eExpand" class="ag-column-select-header-icon"></div>\n            <ag-checkbox data-ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>\n            <ag-input-text-field class="ag-column-select-header-filter-wrapper" data-ref="eFilterTextField"></ag-input-text-field>\n        </div>',[Ys,vr]),this.eExpand=Is,this.eSelect=Is,this.eFilterTextField=Is}wireBeans(e){this.columnModel=e.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===js.SPACE&&(e.preventDefault(),this.onExpandClicked())}}
2),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",(()=>this.onFunctionsReadOnlyPropChanged())),this.eFilterTextField.setAutoComplete(!1).onValueChange((()=>this.onFilterTextChanged())),this.addManagedElementListeners(this.eFilterTextField.getInputElement(),{keydown:this.onMiniFilterKeyDown.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});const e=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(e("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)}init(e){this.params=e;const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=Ps("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=Ps("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=Ps("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){const e=!this.params.suppressColumnFilter,t=!this.params.suppressColumnSelectAll,i=!this.params.suppressColumnExpandAll,s=this.columnModel.isProvidedColGroupsPresent(),n=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(n("searchOoo","Search...")),Ki(this.eFilterTextField.getGui(),e),Ki(this.eSelect.getGui(),t),Ki(this.eExpand,i&&s)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=f((()=>{const e=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:e})}),300)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(e){e.key===js.ENTER&&setTimeout((()=>this.onSelectClicked()),300)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:0===this.expandState?"collapseAll":"expandAll"})}setExpandState(e){this.expandState=e,Ki(this.eExpandChecked,0===this.expandState),Ki(this.eExpandUnchecked,1===this.expandState),Ki(this.eExpandIndeterminate,2===this.expandState)}setSelectionState(e){this.selectState=e,this.eSelect.setValue(this.selectState)}}},Kz=class{constructor(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4?arguments[4]:void 0;this.localEventService=new n,this.displayName=e,this.dept=i,this.group=s,s?(this.columnGroup=t,this.expanded=r,this.children=[]):this.column=t}isGroup(){return this.group}getDisplayName(){return this.displayName}getColumnGroup(){return this.columnGroup}getColumn(){return this.column}getDept(){return this.dept}isExpanded(){return!!this.expanded}getChildren(){return this.children}isPassesFilter(){return this.passesFilter}setExpanded(e){e!==this.expanded&&(this.expanded=e,this.localEventService.dispatchEvent({type:"expandedChanged"}))}setPassesFilter(e){this.passesFilter=e}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}},$z=class extends Rs{constructor(e,t,i){super('<div class="ag-menu"></div>'),this.column=e,this.mouseEvent=t,this.parentEl=i,this.displayName=null}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.popupService=e.popupService,this.focusService=e.focusService}postConstruct(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),ct(this.column)?this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();const e=this.getMappedMenuItems();if(0===e.length)return;this.displayContextMenu(e)}}initializeProperties(e){He(e)?this.columns=e.getLeafColumns():this.columns=[e],this.allowGrouping=this.columns.some((e=>e.isPrimary()&&e.isAllowRowGroup())),this.allowValues=this.columns.some((e=>e.isPrimary()&&e.isAllowValue())),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some((e=>e.isPrimary()&&e.isAllowPivot()))}buildMenuItemMap(){const e=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:e=>
2e.isPrimary()&&e.isAllowRowGroup()&&!this.columnModel.isColGroupLocked(e),activeFunction:e=>e.isRowGroupActive(),activateLabel:()=>`${e("groupBy","Group by")} ${this.displayName}`,deactivateLabel:()=>`${e("ungroupBy","Un-Group by")} ${this.displayName}`,activateFunction:()=>{const e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:e=>e.isPrimary()&&e.isAllowValue(),activeFunction:e=>e.isValueActive(),activateLabel:()=>e("addToValues",`Add ${this.displayName} to values`,[this.displayName]),deactivateLabel:()=>e("removeFromValues",`Remove ${this.displayName} from values`,[this.displayName]),activateFunction:()=>{const e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:e=>this.columnModel.isPivotMode()&&e.isPrimary()&&e.isAllowPivot(),activeFunction:e=>e.isPivotActive(),activateLabel:()=>e("addToLabels",`Add ${this.displayName} to labels`,[this.displayName]),deactivateLabel:()=>e("removeFromLabels",`Remove ${this.displayName} from labels`,[this.displayName]),activateFunction:()=>{const e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(e){return[...e].concat(this.columns.filter((t=>-1===e.indexOf(t))))}removeColumnsFromList(e){return e.filter((e=>-1===this.columns.indexOf(e)))}displayContextMenu(e){const t=this.getGui(),i=this.createBean(new yk),s=this.localeService.getLocaleTextFunc();let n=()=>{};t.appendChild(i.getGui()),i.addMenuItems(e),i.addManagedListeners(i,{closeMenu:()=>{this.parentEl.focus(),n()}});const r=this.popupService.addPopup({modal:!0,eChild:t,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(i.getGui()),ariaLabel:s("ariaLabelContextMenu","Context Menu"),closedCallback:e=>{e instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(i)}});r&&(n=r.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:t})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const e=[];for(const t of this.menuItemMap.values()){const i=this.columns.some((e=>t.allowedFunction(e)&&!t.activeFunction(e))),s=this.columns.some((e=>t.allowedFunction(e)&&t.activeFunction(e)));i&&e.push({name:t.activateLabel(this.displayName),icon:Ps(t.addIcon,this.gos,null),action:()=>t.activateFunction()}),s&&e.push({name:t.deactivateLabel(this.displayName),icon:Ps(t.removeIcon,this.gos,null),action:()=>t.deActivateFunction()})}return e}},Yz=class extends Rs{constructor(e,t,i,s){super(),this.modelItem=e,this.allowDragging=t,this.eventType=i,this.focusWrapper=s,this.cbSelect=Is,this.eLabel=Is,this.eGroupOpenedIcon=Is,this.eGroupClosedIcon=Is,this.eColumnGroupIcons=Is,this.processingColumnStateChange=!1,this.modelItem=e,this.columnGroup=e.getColumnGroup(),this.columnDept=e.getDept(),this.displayName=e.getDisplayName(),this.allowDragging=t}wireBeans(e){this.columnModel=e.columnModel,this.dragAndDropService=e.dragAndDropService,this.modelItemUtils=e.modelItemUtils}postConstruct(){this.setTemplate('<div class="ag-column-select-column-group">\n                <span class="ag-column-group-icons" data-ref="eColumnGroupIcons" >\n                    <span class="ag-column-group-closed-icon" data-ref="eGroupClosedIcon"></span>
2\n                    <span class="ag-column-group-opened-icon" data-ref="eGroupOpenedIcon"></span>\n                </span>\n                <ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n                <span class="ag-column-select-column-label" data-ref="eLabel"></span>\n            </div>',[Ys]),this.eDragHandle=Ps("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const e=this.cbSelect.getGui(),t=this.cbSelect.getInputElement();e.insertAdjacentElement("afterend",this.eDragHandle),t.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.getGui().style.setProperty("--ag-indentation-level",String(this.columnDept)),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(this.modelItem,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip();Hr(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach((e=>this.addOrRemoveCssClass(e,!0)))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const e=this.columnGroup.getColGroupDef();if(!e)return;let t;"whenTruncated"===this.gos.get("tooltipShowMode")&&(t=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const i=()=>{const i=e.headerTooltip;this.setTooltip({newTooltipText:i,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:t})};i(),this.addManagedEventListeners({newColumnsLoaded:i})}getTooltipParams(){const e=super.getTooltipParams();return e.location="columnToolPanelColumnGroup",e}handleKeyDown(e){switch(e.key){case js.LEFT:e.preventDefault(),this.modelItem.setExpanded(!1);break;case js.RIGHT:e.preventDefault(),this.modelItem.setExpanded(!0);break;case js.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected())}}onContextMenu(e){const{columnGroup:t,gos:i}=this;if(i.get("functionsReadOnly"))return;const s=this.createBean(new $z(t,e,this.focusWrapper));this.addDestroyFunc((()=>{s.isAlive()&&this.destroyBean(s)}))}addVisibilityListenersToAllChildren(){const e=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach((t=>{this.addManagedListeners(t,{visibleChanged:e,columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e})}))}setupDragging(){if(!this.allowDragging)return void Ki(this.eDragHandle,!1);let e=!this.gos.get("suppressDragLeaveHidesColumns");const t={type:Gn.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>e?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{e=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:t=>{e&&this.modelItemUtils.updateColumns({columns:this.columnGroup.getLeafColumns(),visibleState:t?.visibleState,pivotState:t?.pivotState,eventType:this.eventType})},onGridExit:()=>{e&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc((()=>this.dragAndDropService.removeDragSource(t)))}createDragItem(){const e=this.columnGroup.getLeafColumns(),t={},i={};return e.forEach((e=>{const s=e.getId();t[s]=e.isVisible(),i[s]=this.modelItemUtils.createPivotState(e)})),{columns:e,visibleState:t,pivotState:i}}setupExpandContract(){this.eGroupClosedIcon.appendChild(Ts("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(Ts("columnSelectOpen",this.gos,null));const e=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:e}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:e});const t=new ks(this.eColumnGroupIcons,!0);this.addManagedListeners(t,{tap:e}),this.addDestroyFunc(t.destroy.bind(t))}onLabelClicked(){const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}getVisibleLeafColumns(){const e=[],t=i=>
2{i.forEach((i=>{i.isPassesFilter()&&(i.isGroup()?t(i.getChildren()):e.push(i.getColumn()))}))};return t(this.modelItem.getChildren()),e}onChangeCommon(e){this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),e,this.eventType)}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),i=this.cbSelect.getValue(),s=void 0===i?e("ariaIndeterminate","indeterminate"):i?e("ariaVisible","visible"):e("ariaHidden","hidden"),n=e("ariaToggleVisibility","Press SPACE to toggle visibility");di(this.focusWrapper,`${this.displayName} ${t}`),this.cbSelect.setInputAriaLabel(`${n} (${s})`),pi(this.focusWrapper,this.cbSelect.getInputElement().id)}onColumnStateChanged(){const e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(e),this.cbSelect.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1}workOutSelectedValue(){const e=this.columnModel.isPivotMode(),t=this.getVisibleLeafColumns();let i=0,s=0;if(t.forEach((t=>{!e&&t.getColDef().lockVisible||(this.isColumnChecked(t,e)?i++:s++)})),!(i>0&&s>0))return i>0}workOutReadOnlyValue(){const e=this.columnModel.isPivotMode();let t=0;return this.columnGroup.getLeafColumns().forEach((i=>{e?i.isAnyFunctionAllowed()&&t++:i.getColDef().lockVisible||t++})),0===t}isColumnChecked(e,t){if(t){const t=e.isPivotActive(),i=e.isRowGroupActive(),s=e.isValueActive();return t||i||s}return e.isVisible()}onExpandOrContractClicked(){const e=this.modelItem.isExpanded();this.modelItem.setExpanded(!e)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const e=this.modelItem.isExpanded();Ki(this.eGroupClosedIcon,!e),Ki(this.eGroupOpenedIcon,e)}refreshAriaExpanded(){Ci(this.focusWrapper,this.modelItem.isExpanded())}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(e&&!t||!e&&t)&&this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(e){this.cbSelect.setValue(e,!0)}},Zz=class extends ze{constructor(e,t){super(),this.comp=e,this.virtualList=t}wireBeans(e){this.columnMoveService=e.columnMoveService,this.columnModel=e.columnModel}postConstruct(){this.createManagedBean(new bk(this.comp,this.virtualList,{dragSourceType:Gn.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:this.eventService,getCurrentDragValue:e=>this.getCurrentDragValue(e),isMoveBlocked:e=>this.isMoveBlocked(e),getNumRows:e=>e.getDisplayedColsList().length,moveItem:(e,t)=>this.moveItem(this.getCurrentColumnsBeingMoved(e),t)}))}getCurrentDragValue(e){return e.column}getCurrentColumnsBeingMoved(e){return He(e)?e.getLeafColumns():e?[e]:[]}isMoveBlocked(e){if(this.gos.get("suppressMovableColumns"))return!0;return!!this.getCurrentColumnsBeingMoved(e).find((e=>{const t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition}))}moveItem(e,t){if(!t)return;const{component:i}=t;let s=null,n="top"===t.position;if(i instanceof Yz){s=i.getColumns()[0],n=!0}else i&&(s=i.getColumn());if(!s)return;const r=this.getMoveTargetIndex({currentColumns:e,lastHoveredColumn:s,isBefore:n});null!=r&&this.columnMoveService.moveColumns(e,r,"toolPanelUi")}getMoveTargetIndex(e){const{currentColumns:t,lastHoveredColumn:i,isBefore:s}=e;if(!i||!t)return null;const n=this.columnModel.getCols().indexOf(i),r=s?n:n+1;return r-this.getMoveDiff(t,r)}getMoveDiff(e,t){const i=this.columnModel.getCols();if(!e)return 0;const s=e[0],n=e.length;return i.indexOf(s)<t?n:0}},qz=class extends Rs{constructor(e,t,i,s){super(),this.allowDragging=t,this.groupsExist=i,this.focusWrapper=s,this.eLabel=Is,this.cbSelect=Is,this.processingColumnStateChange=!1,this.column=e.getColumn(),this.columnDept=e.getDept(),this.displayName=e.getDisplayName()}wireBeans(e){this.columnModel=e.columnModel,this.dragAndDropService=e.dragAndDropService,this.modelItemUtils=e.modelItemUtils}postConstruct(){this.setTemplate('<div class="ag-column-select-column">\n                <ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
2\n                <span class="ag-column-select-column-label" data-ref="eLabel"></span>\n            </div>',[Ys]),this.eDragHandle=Ps("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const e=this.cbSelect.getGui(),t=this.cbSelect.getInputElement();e.insertAdjacentElement("afterend",this.eDragHandle),t.setAttribute("tabindex","-1");const i=At(this.displayName);this.eLabel.innerHTML=i;const s=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${s}`),this.getGui().style.setProperty("--ag-indentation-level",String(s)),this.setupDragging();const n=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:n}),this.addManagedListeners(this.column,{columnValueChanged:n,columnPivotChanged:n,columnRowGroupChanged:n,visibleChanged:n}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip();Hr(this.column.getColDef(),this.gos,this.column,null).forEach((e=>this.addOrRemoveCssClass(e,!0)))}getColumn(){return this.column}setupTooltip(){let e;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const t=()=>{const t=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:t,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};t(),this.addManagedEventListeners({newColumnsLoaded:t})}getTooltipParams(){const e=super.getTooltipParams();return e.location="columnToolPanelColumn",e.colDef=this.column.getColDef(),e}onContextMenu(e){const{column:t,gos:i}=this;if(i.get("functionsReadOnly"))return;const s=this.createBean(new $z(t,e,this.focusWrapper));this.addDestroyFunc((()=>{s.isAlive()&&this.destroyBean(s)}))}handleKeyDown(e){e.key===js.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}onChangeCommon(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.setColumn(this.column,e,"toolPanelUi"))}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaColumn","Column"),i=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),s=e("ariaToggleVisibility","Press SPACE to toggle visibility");di(this.focusWrapper,`${this.displayName} ${t}`),this.cbSelect.setInputAriaLabel(`${s} (${i})`),pi(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging)return void Ki(this.eDragHandle,!1);let e=!this.gos.get("suppressDragLeaveHidesColumns");const t={type:Gn.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>e?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{e=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:t=>{e&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:t?.visibleState,pivotState:t?.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{e&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc((()=>this.dragAndDropService.removeDragSource(t)))}createDragItem(){const e=this.column.getColId(),t={[e]:this.column.isVisible()},i={[e]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:t,pivotState:i}}onColumnStateChanged(){this.processingColumnStateChange=!0;const e=this.columnModel.isPivotMode();if(e){const e=this.column.isAnyFunctionActive();this.cbSelect.setValue(e)}else this.cbSelect.setValue(this.column.isVisible());let t=!0,i=!0;if(e){const e=this.gos.get("functionsReadOnly"),s=!this.column.isAnyFunctionAllowed();t=!e&&!s,i=t}else{const{enableRowGroup:e,enableValue:s,lockPosition:n,suppressMovable:r,lockVisible:o}=this.column.getColDef();t=!o,i=!!e||!!s||!(!!n||!!r)}this.cbSelect.setReadOnly(!t),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!i),this.addOrRemoveCssClass("ag-column-select-column-readonly",!i&&!t),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(e){e!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle(
2))}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(e){h("can not expand a column item that does not represent a column group header")}},Qz=class{constructor(e){this.items=e}getRowCount(){return this.items.length}getRow(e){return this.items[e]}},Xz={selector:"AG-PRIMARY-COLS-LIST",component:class extends Rs{constructor(){super('<div class="ag-column-select-list" role="presentation"></div>'),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.colDefService=e.toolPanelColDefService,this.modelItemUtils=e.modelItemUtils}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach((e=>e())),this.destroyColumnItemFuncs=[]}init(e,t,i){this.params=e,this.allowDragging=t,this.eventType=i,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const s=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:s,columnPivotModeChanged:s,columnRowGroupChanged:s,columnValueChanged:s,columnVisible:s,newColumnsLoaded:s}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new lk({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator(((e,t)=>(mi(t,e.getDept()+1),this.createComponentFromItem(e,t)))),this.columnModel.isReady()&&this.onColumnsChanged(),this.params.suppressColumnMove||this.createManagedBean(new Zz(this,this.virtualList))}createComponentFromItem(e,t){if(e.isGroup()){const i=new Yz(e,this.allowDragging,this.eventType,t);return this.createBean(i),i}const i=new qz(e,this.allowDragging,this.groupsExist,t);return this.createBean(i),i}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const e=this.getExpandedStates(),t=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!t?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const e={};if(this.isInitialState){const{expandedGroupIds:t}=this.params.initialState;return t.forEach((t=>{e[t]=!0})),e}return this.allColsTree?(this.forEachItem((t=>{if(!t.isGroup())return;const i=t.getColumnGroup();i&&(e[i.getId()]=t.isExpanded())})),e):{}}setExpandedStates(e){if(!this.allColsTree)return;const{isInitialState:t}=this;this.forEachItem((i=>{if(!i.isGroup())return;const s=i.getColumnGroup();if(s){const n=e[s.getId()];(null!=n||t)&&i.setExpanded(!!n)}}))}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(e){const t=this.colDefService.createColumnTree(e);this.buildListModel(t),this.groupsExist=e.some((e=>e&&"undefined"!==typeof e.children)),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getColDefColTree()),this.groupsExist=this.columnModel.isProvidedColGroupsPresent()}buildListModel(e){const t=this.onColumnExpanded.bind(this),i=e=>{e.addEventListener("expandedChanged",t);const i=e.removeEventListener.bind(e,"expandedChanged",t);this.destroyColumnItemFuncs.push(i)},s=(e,t,i)=>{e.forEach((e=>{He(e)?n(e,t,i):r(e,t,i)}))},n=(e,t,n)=>{const r=e.getColGroupDef();if(r&&r.suppressColumnsToolPanel)return;if(e.isPadding())return void s(e.getChildren(),t,n);const o=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),a=new Kz(o,e,t,!0,this.expandGroupsByDefault);n.push(a),i(a),s(e.getChildren(),t+1,a.getChildren())},r=(e,t,i)=>{if(e.getColDef()&&e.getColDef().suppressColumnsToolPanel)return;const s=this.columnNameService.getDisplayNameForColumn(e,"columnToolPanel");i.push(new Kz(s,e,t))};this.destroyColumnTree(),s(e,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const e=t=>{t.isPassesFilter()&&(this.displayedColsList.push(t),t.isGroup()&&t.isExpanded()&&t.getChildren().forEac
2h(e))};this.allColsTree.forEach(e),this.virtualList.setModel(new Qz(this.displayedColsList));const t=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=t&&this.focusRowIfAlive(t),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),i=e("columns","Columns"),s=this.displayedColsList.length;di(this.virtualList.getAriaElement(),`${t} ${s} ${i}`)}focusRowIfAlive(e){window.setTimeout((()=>{this.isAlive()&&this.virtualList.focusRow(e)}),0)}forEachItem(e){const t=i=>{i.forEach((i=>{e(i),i.isGroup()&&t(i.getChildren())}))};this.allColsTree&&t(this.allColsTree)}doSetExpandedAll(e){this.forEachItem((t=>{t.isGroup()&&t.setExpanded(e)}))}setGroupsExpanded(e,t){if(!t)return void this.doSetExpandedAll(e);const i=[];this.forEachItem((s=>{if(!s.isGroup())return;const n=s.getColumnGroup().getId();t.indexOf(n)>=0&&(s.setExpanded(e),i.push(n))}));const s=t.filter((e=>!Ee(i,e)));s.length>0&&h("unable to find group(s) for supplied groupIds:",s)}getExpandState(){let e=0,t=0;return this.forEachItem((i=>{i.isGroup()&&(i.isExpanded()?e++:t++)})),e>0&&t>0?2:t>0?1:0}doSetSelectedAll(e){this.modelItemUtils.selectAllChildren(this.allColsTree,e,this.eventType)}getSelectionState(){let e=0,t=0;const i=this.columnModel.isPivotMode();if(this.forEachItem((s=>{if(s.isGroup())return;if(!s.isPassesFilter())return;const n=s.getColumn(),r=n.getColDef();let o;
2if(i){if(!n.isAllowPivot()&&!n.isAllowRowGroup()&&!n.isAllowValue())return;o=n.isValueActive()||n.isPivotActive()||n.isRowGroupActive()}else{if(r.lockVisible)return;o=n.isVisible()}o?e++:t++})),!(e>0&&t>0))return!(0===e||t>0)}setFilterText(e){this.filterText=w(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const e=e=>{if(!w(this.filterText))return!0;const t=e.getDisplayName();return null==t||-1!==t.toLowerCase().indexOf(this.filterText)},t=(i,s)=>{let n=!1;if(i.isGroup()){const r=e(i);i.getChildren().forEach((e=>{const i=t(e,r||s);i&&(n=i)}))}const r=!(!s&&!n)||e(i);return i.setPassesFilter(r),r};this.allColsTree.forEach((e=>t(e,!1)))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const e=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:e})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const e=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:e})}getExpandedGroups(){const e=[];return this.allColsTree?(this.forEachItem((t=>{t.isGroup()&&t.isExpanded()&&e.push(t.getColumnGroup().getId())})),e):e}}},Jz=class extends Rs{constructor(){super('<div class="ag-column-select">\n            <ag-primary-cols-header data-ref="primaryColsHeaderPanel"></ag-primary-cols-header>\n            <ag-primary-cols-list data-ref="primaryColsListPanel"></ag-primary-cols-list>\n        </div>',[_z,Xz]),this.primaryColsHeaderPanel=Is,this.primaryColsListPanel=Is}init(e,t,i){this.allowDragging=e,this.params=t,this.eventType=i,this.primaryColsHeaderPanel.init(this.params);const s=this.params.suppressColumnFilter,n=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&s&&n&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListeners(this.primaryColsListPanel,{groupExpanded:this.onGroupExpanded.bind(this),selectionChanged:this.onSelectionChange.bind(this)}),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListeners(this.primaryColsHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),selectAll:this.onSelectAll.bind(this),unselectAll:this.onUnselectAll.bind(this),filterChanged:this.onFilterChanged.bind(this)}),this.positionableFeature=new Jn(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)}toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0})}onExpandAll(){this.primaryColsListPanel.doSetExpandedAll(!0)}onCollapseAll(){this.primaryColsListPanel.doSetExpandedAll(!1)}expandGroups(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)}collapseGroups(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)}setColumnLayout(e){this.primaryColsListPanel.setColumnLayout(e)}onFilterChanged(e){this.primaryColsListPanel.setFilterText(e.filterText)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}onSelectAll(){this.primaryColsListPanel.doSetSelectedAll(!0)}onUnselectAll(){this.primaryColsListPanel.doSetSelectedAll(!1)}onGroupExpanded(e){this.primaryColsHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()}onSelectionChange(e){this.primaryColsHeaderPanel.setSelectionState(e.state)}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},eH=class extends Rs{constructor(){super(...arguments),this.cbPivotMode=Is}wireBeans(e){this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}createTemplate(){return'<div class="ag-pivot-mode-panel">\n                <ag-toggle-button data-ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>\n            </div>'}postConstruct(){this.setTemplate(this.createTemplate(),[Pl]),this.cbPivotMode.setValue(this.columnModel.isPivotMode());const e=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListeners(this.cbPivotMode,{fieldValueChanged:this.onBtPivotMode.bind(this)});const t=this.onPivotModeChanged.bind(this);this.addManagedEventListeners({newColumnsLoaded:t,columnPivotModeChanged:t})}onBtPivotMode(){const e=!!this.cbPivotMode.getValue();e!==this.columnModel.isPivotMode()&&(this.gos.updateGridOptions({options:{pivotMode:e},source:"toolPanelUi"}
2),this.ctrlsService.getHeaderRowContainerCtrls().forEach((e=>e.refresh())))}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)}},tH={version:"32.3.3",moduleName:r.ColumnsToolPanelModule,beans:[class extends ze{constructor(){super(...arguments),this.beanName="modelItemUtils"}wireBeans(e){this.aggFuncService=e.aggFuncService,this.columnModel=e.columnModel,this.columnApplyStateService=e.columnApplyStateService}selectAllChildren(e,t,i){const s=this.extractAllLeafColumns(e);this.setAllColumns(s,t,i)}setColumn(e,t,i){this.setAllColumns([e],t,i)}setAllColumns(e,t,i){this.columnModel.isPivotMode()?this.setAllPivot(e,t,i):this.setAllVisible(e,t,i)}extractAllLeafColumns(e){const t=[],i=e=>{e.forEach((e=>{e.isPassesFilter()&&(e.isGroup()?i(e.getChildren()):t.push(e.getColumn()))}))};return i(e),t}setAllVisible(e,t,i){const s=[];e.forEach((e=>{e.getColDef().lockVisible||e.isVisible()!=t&&s.push({colId:e.getId(),hide:!t})})),s.length>0&&this.columnApplyStateService.applyColumnState({state:s},i)}setAllPivot(e,t,i){this.setAllPivotActive(e,t,i)}setAllPivotActive(e,t,i){const s=[],n=t?e=>{if(!e.isAnyFunctionActive())if(e.isAllowValue()){const t="string"===typeof e.getAggFunc()?e.getAggFunc():this.aggFuncService?.getDefaultAggFunc(e);s.push({colId:e.getId(),aggFunc:t})}else e.isAllowRowGroup()?s.push({colId:e.getId(),rowGroup:!0}):e.isAllowPivot()&&s.push({colId:e.getId(),pivot:!0})}:e=>{(e.isPivotActive()||e.isRowGroupActive()||e.isValueActive())&&s.push({colId:e.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};e.forEach(n),s.length>0&&this.columnApplyStateService.applyColumnState({state:s},i)}updateColumns(e){const{columns:t,visibleState:i,pivotState:s,eventType:n}=e,r=t.map((e=>{const t=e.getColId();if(this.columnModel.isPivotMode()){const e=s?.[t];return{colId:t,pivot:e?.pivot,rowGroup:e?.rowGroup,aggFunc:e?.aggFunc}}return{colId:t,hide:!i?.[t]}}));this.columnApplyStateService.applyColumnState({state:r},n)}createPivotState(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}}}],userComponents:[{name:"agColumnsToolPanel",classImp:class extends Rs{constructor(){super('<div class="ag-column-panel"></div>'),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}init(e){const t=this.gos.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params={...t,...e},this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new eH),this.childDestroyFuncs.push((()=>this.destroyBean(this.pivotModePanel))),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new Jz),this.childDestroyFuncs.push((()=>this.destroyBean(this.primaryColsPanel))),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new QV(!1)),this.childDestroyFuncs.push((()=>this.destroyBean(this.rowGroupDropZonePanel))),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new Mz(!1)),this.childDestroyFuncs.push((()=>this.destroyBean(this.valuesDropZonePanel))),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new qV(!1)),this.childDestroyFuncs.push((()=>this.destroyBean(this.pivotDropZonePanel))),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();const[e]=this.addManagedEventListeners({columnPivotModeChanged:()=>{this.resetChildrenHeight(),this.setLastVisible()}});this.childDestroyFuncs.push((()=>e()))}this.initialised=!0}setPivotModeSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new eH),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push((()=>this.destroyBean(this.pivotModePanel)))),this.setLastVisible())}setRowGroupsSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new QV(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new Mz(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new qV(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach((e=>{if(!e)return;const t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))}))}setLastVisible(){const e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEac
2h((e=>e.classList.remove("ag-last-column-drop")));const t=Se(e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"));t&&t.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){const e=this.getGui().children;for(let t=0;t<e.length;t++){const i=e[t];i.style.removeProperty("height"),i.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return this.gos.assertModuleRegistered(r.RowGroupingModule,"Row Grouping")}expandColumnGroups(e){this.primaryColsPanel.expandGroups(e)}collapseColumnGroups(e){this.primaryColsPanel.collapseGroups(e)}setColumnLayout(e){this.primaryColsPanel.setColumnLayout(e)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach((e=>e())),this.childDestroyFuncs.length=0,rs(this.getGui())}refresh(e){return this.destroyChildren(),this.init(e),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}}},{name:"agMenuItem",classImp:JF}],dependantModules:[ek,xz,Uz]},iH={0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49},sH=e=>Math.ceil(9525*e),nH=(e,t)=>{if(!t)return;let i;if("number"===typeof t)i=t;else{i=t({rowIndex:e})}return i},rH=(e,t)=>{const i=$c.createHeader({encoding:"UTF-8",standalone:"yes"}),s=$c.createXml(e);return t?s:`${i}${s}`},oH=e=>{const t=String.fromCharCode,i=Math.floor(e/26),s=e%26;return i&&26!==e?s?i<26?t(65+i-1)+t(65+s-1):oH(i)+t(65+s-1):oH(i-1)+"Z":t(65+e-1)},aH=e=>{if(null==e)return null;let t="";for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=0&&s<=31&&10!==s){t+=`_x${s.toString(16).toUpperCase().padStart(4,"0")}_`}else t+=e[i]}return t},lH=e=>{const t=[];for(const i of e.keys()){const e=i.toString(),s={name:"t",textNode:At(aH(e),!1)};e.trim().length!==e.length&&(s.properties={rawMap:{"xml:space":"preserve"}}),t.push({name:"si",children:[s]})}return t},hH={getTemplate(e){const{name:t,ContentType:i,Extension:s,PartName:n}=e;return{name:t,properties:{rawMap:{Extension:s,PartName:n,ContentType:i}}}}},cH=e=>"jpg"===e?"jpeg":e,dH={getTemplate(e){const t=new Array(e).fill(void 0).map(((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",PartName:`/xl/worksheets/sheet${t+1}.xml`}))),i=UW.worksheetImages.size,s=UW.worksheetHeaderFooterImages.size,n=UW.worksheetDataTables.size,r={};UW.workbookImageIds.forEach((e=>{r[cH(e.type)]=!0}));const o=new Array(i).fill(void 0).map(((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml",PartName:`/xl/drawings/drawing${t+1}.xml`}))),a=new Array(n).fill(void 0).map(((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",PartName:`/xl/tables/${UW.getTableNameFromIndex(t)}.xml`}))),l=Object.keys(r).map((e=>({name:"Default",ContentType:`image/${e}`,Extension:e})));s&&l.push({name:"Default",Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"});return{name:"Types",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"}},children:[...l,{name:"Default",Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"},{name:"Default",ContentType:"application/xml",Extension:"xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",PartName:"/xl/workbook.xml"},...t,{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml",PartName:"/xl/theme/theme1.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",PartName:"/xl/styles.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",PartName:"/xl/sharedStrings.xml"},...o,...a,{name:"Override",ContentType:"application/vnd.openxmlformats-package.core-properties+xml",PartName:"/docProps/core.xml"}].map((e=>hH.getTemplate(e)))}}},uH={getTemplate(e){const t=(new Date).toJSON();return{name:"cp:coreProperties",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"}}]},children:[{name:"dc:creator",textNode:e},{name:"dc:title",textNode:"Workbook"},{name:"dcterms:created",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t},{name:"dcterms:modified",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t}]}}},pH=(e,t)=>({name:`xdr:${e}`,children:[{name:"xdr:col",textNode:t.col.toString()},{name:"xdr:colOff",textNode:t.offsetX.toString()},{name:"xdr:row",textNode:t.row.toString()},{name:"xdr:rowOff",textNode:t.offsetY.toString()}]}),gH=e=>{const t=[{name:"a:ext",properties:{rawMap:{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}},children:[{name:"a16:creationId",properties:{rawMap:{id:"{822E6D20-D7BC-2841-A643-D49A6EF008A2}","xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main"}}}]}];switch(e.recolor&&e.recolor.toLowerCase()){case"grayscale":case"sepia":case"washout":t.push({name:"a:ext",properties:{rawMap:{uri:"{C183D7F6-B498-43B3-948B-1728B52AA6E4}"}},children:[{name:"adec:decorative",properties:{rawMap:{val:"0","xmlns:adec":"http://schemas.microsoft.com/office/drawing/2017/decorative"}}
2}]})}return{name:"a:extLst",children:t}},mH=(e,t)=>({name:"xdr:nvPicPr",children:[{name:"xdr:cNvPr",properties:{rawMap:{id:t,name:e.id,descr:null!=e.altText?e.altText:void 0}},children:[gH(e)]},{name:"xdr:cNvPicPr",properties:{rawMap:{preferRelativeResize:"0"}},children:[{name:"a:picLocks"}]}]}),fH=e=>{if(!e.saturation&&!e.tint)return;const t=[];return e.saturation&&t.push({name:"a:satMod",properties:{rawMap:{val:1e3*e.saturation}}}),e.tint&&t.push({name:"a:tint",properties:{rawMap:{val:1e3*e.tint}}}),t},vH=(e,t)=>{let i;if(e.transparency){const t=Math.min(Math.max(e.transparency,0),100);i=[{name:"a:alphaModFix",properties:{rawMap:{amt:1e5-Math.round(1e3*t)}}}]}if(e.recolor)switch(i||(i=[]),e.recolor.toLocaleLowerCase()){case"grayscale":i.push({name:"a:grayscl"});break;case"sepia":i.push((n={color:"D9C3A5",tint:50,saturation:180},{name:"a:duotone",children:[{name:"a:prstClr",properties:{rawMap:{val:(s={color:"black"}).color}},children:fH(s)},{name:"a:srgbClr",properties:{rawMap:{val:n.color}},children:fH(n)}]}));break;case"washout":i.push({name:"a:lum",properties:{rawMap:{bright:"70000",contrast:"-70000"}}})}var s,n;return{name:"xdr:blipFill",children:[{name:"a:blip",properties:{rawMap:{cstate:"print","r:embed":`rId${t}`,"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}},children:i},{name:"a:stretch",children:[{name:"a:fillRect"}]}]}},yH=(e,t)=>{const i={name:"a:xfrm",children:[{name:"a:off",properties:{rawMap:{x:0,y:0}}},{name:"a:ext",properties:{rawMap:{cx:t.width,cy:t.height}}}]};if(e.rotation){const t=e.rotation;i.properties={rawMap:{rot:6e4*Math.min(Math.max(t,0),360)}}}return{name:"xdr:spPr",children:[i,{name:"a:prstGeom",properties:{rawMap:{prst:"rect"}},children:[{name:"a:avLst"}]}]}},CH=(e,t,i,s)=>({name:"xdr:pic",children:[mH(e,t+1),vH(e,i+1),yH(e,s)]}),SH={getTemplate(e){const{sheetIndex:t}=e,i=UW.worksheetImages.get(t),s=UW.worksheetImageIds.get(t);return{name:"xdr:wsDr",properties:{rawMap:{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"}},children:i.map(((e,t)=>{const i=(e=>{e.fitCell=!!e.fitCell||!e.width||!e.height;const{position:t={},fitCell:i,width:s=0,height:n=0,totalHeight:r,totalWidth:o}=e,{offsetX:a=0,offsetY:l=0,row:h=1,rowSpan:c=1,column:d=1,colSpan:u=1}=t;return{from:{row:h-1,col:d-1,offsetX:sH(a),offsetY:sH(l)},to:{row:h-1+(i?1:c-1),col:d-1+(i?1:u-1),offsetX:sH(s+a),offsetY:sH(n+l)},height:sH(r||n),width:sH(o||s)}})(e);return{name:"xdr:twoCellAnchor",properties:{rawMap:{editAs:"absolute"}},children:[pH("from",i.from),pH("to",i.to),CH(e,t,s.get(e.id).index,i),{name:"xdr:clientData"}]}}))}}},wH={getTemplate(e){const{Id:t,Type:i,Target:s}=e;return{name:"Relationship",properties:{rawMap:{Id:t,Type:i,Target:s}}}}},bH={getTemplate:e=>({name:"Relationships",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}},children:e.map((e=>wH.getTemplate(e)))})},xH={getTemplate:e=>({name:"sst",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:e.size,uniqueCount:e.size}},children:lH(e)})},MH={None:"None",Dot:"Dotted",Dash:"Dashed",Double:"Double",DashDot:"DashDot",DashDotDot:"DashDotDot",SlantDashDot:"SlantDashDot",Continuous:"Continuous"},DH=["Dashed","DashDot","DashDotDot"],IH={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinDiagStripe:"lightUp",ThinHorzCross:"lightGrid",ThinDiagCross:"lightTrellis",Gray125:"gray125",Gray0625:"gray0625"},RH={Automatic:"general",Left:"left",Center:"center",Right:"right",Fill:"fill",Justify:"justify",CenterAcrossSelection:"centerContinuous",Distributed:"distributed",JustifyDistributed:"justify"},EH={Automatic:void 0,Top:"top",Bottom:"bottom",Center:"center",Justify:"justify",Distributed:"distributed",JustifyDistributed:"justify"},AH=e=>void 0==e?e:("#"===e.charAt(0)&&(e=e.substring(1)),6===e.length?"FF"+e:e),TH=(e,t)=>{if(!e)return"thin";const i=(e=>{switch(e){case 1:return"thin";case 2:return"medium";case 3:return"thick";default:return"hair"}})(t);if("Continuous"===e)return i;const s=MH[e];return"medium"===i&&DH.some((e=>e===s))?`medium${s}`:`${s.charAt(0).toLowerCase()}${s.substring(1)}`},PH=e=>RH[e]||"general",LH=e=>EH[e]||void 0,FH=e=>({name:"color",properties:{rawMap:{rgb:AH(e||"#000000")}}}),kH={getTemplate(e){const{left:t,right:i,top:s,bottom:n,diagonal:r}=e,o=t?[FH(t.color)]:void 0,a=i?[FH(i.color)]:void 0,l=s?[FH(s.color)]:void 0,h=n?[FH(n.color)]:void 0,c=r?[FH(r.color)]:void 0;return{name:"border",children:[{name:"left",properties:{rawMap:{style:t&&t.style}},children:o},{name:"right",properties:{rawMap:{style:i&&i.style}},children:a},{name:"top",properties:{rawMap:{style:s&&s.style}},children:l},{name:"bottom",properties:{rawMap:{style:n&&n.style}},children:h},{name:"diagonal",properties:{rawMap:{style:r&&r.style}},children:c}]}}},NH={getTemplate:e=>({name:"borders",properties:{rawMap:{count:e.length}},children:e.map((e=>kH.getTemplate(e)))})},OH=e=>{const t=["Context","LeftToRight","RightToLeft"].indexOf(e);return Math.max(t,0)},GH={getTemplate(e){const{horizontal:t,indent:i,readingOrder:s,rotate:n,shrinkToFit:r,vertical:o,wrapText:a}=e;return{name:"alignment",properties:{rawMap:{horizontal:t&&PH(t),indent:i,readingOrder:s&&OH(s),textRotation:n,shrinkToFit:r,vertical:o&&LH(o),wrapText:a}}}}},BH={getTemplate(e){const t=!1===e.protected?0:1;return{name:"protection",properties:{rawMap:{hidden:!0===e.hideFormula?1:0,locked:t}}}}},VH={getTemplate(e){const{alignment:t,borderId:i,fillId:s,fontId:n,numFmtId:r,protection:o,quotePrefix:a,xfId:l}=e,h=[];return t&&h.push(GH.getTemplate(t)),o&&h.push(BH.getTemplate(o)),{name:"xf",properties:{rawMap:{applyAlignment:t?1:void 0,applyProtection:o?1:void 0,applyBorder:i?1:void 0,applyFill:s?1:void 0,borderId:i,fillId:s,applyFont:n?1:void 0,fontId:n,applyNumberFormat:r?1:void 0,numFmtId:r,quotePrefix:a?1:void 0,xfId:l}},children:h.length?h:void 0}}},zH={getTemplate:e=>({name:"cellStyleXfs",properties:{rawMap:{count:e.length}},children:e.map((e=>VH.getTemplate(e)))})},HH={getTemplate(e){const{builtinId:t,name:i,xfId:s}=e;return{name:"cellStyle",properties:{rawMap:{builtinId:t,name:i,xfId:s}}}}},WH={getTemplate:e=>({name:"cellStyles",properties:{rawMap:{count:e.length}},children:e.map((e=>HH.getTemplate(e)))})},jH={getTemplate:e=>({name:"cellXfs",properties:{rawMap:{count:e.length}},children:e.map((e=>VH.getTemplate(e)))})},UH={getTemplate(e){const{patternType:t,fgTheme:i,fgTint:s,fgRgb:n,bgRgb:r,bgIndexed:o}=e,a={name:"patternFill",properties:{rawMap:{patternType:t}}};return(i||s||n)&&(a.children=[{name:"fgColor",properties:{rawMap:{theme:i,tint:s,rgb:n}}}]),(o||r)&&(a.children||(a.children=[]),a.children.push({name:"bgColor",properties:{rawMap:{indexed:o,rgb:r}}})),{name:"fill",children:[a]}}},_H={getTemplate:e=>({name:"fills",properties:{rawMap:{count:e.length}},children:e.map((e=>UH.getTemplate(e)))})},KH={getTemplate(e){const{size:t,colorTheme:i,color:s="FF000000",fontName:n="Calibri",family:r,scheme:o,italic:a,bold:l,strikeThrough:h,outline:c,shadow:d,underline:u,verticalAlign:p}=e,g=[{name:"sz",properties:{rawMap:{val:t}}},{name:"color",properties:{rawMap:{theme:i,rgb:s}}},{name:"name",properties:{rawMap:{val:n}}}];return r&&g.push({name:"family",properties:{rawMap:{val:r}}}),o&&g.push({name:"scheme",properties:{rawMap:{val:o}}}),a&&g.push({name:"i"}),l&&g.push({name:"b"}),h&&g.push({name:"strike"}),c&&g.push({name:"outline"}),d&&g.push({name:"shadow"}),u&&g.push({name:"u",properties:{rawMap:{val:u}}}),p&&g.push({name:"vertAlign",properties:{rawMap:{val:p}}}),{name:"font",children:g}}},$H={getTemplate:e=>({name:"fonts",properties:{rawMap:{count:e.length}},children:e.map((e=>KH.getTemplate(e)))})};var YH,ZH,qH,QH,XH,JH,eW,tW,iW,sW={getTemplate(e){let{formatCode:t,numFmtId:i}=e;return t.length&&(t=function(e){const t=e.split(/(\[[^\]]*\])/);for(let i=0;i<t.length;i++){let e=t[i];e.length&&(e.startsWith("[")||(e=e.replace(/\$/g,'"$"')),t[i]=At(e))}return t.join("")}(t)),{name:"numFmt",properties:{rawMap:{formatCode:t,numFmtId:i}}}}},nW={getTemplate:e=>({name:"numFmts",properties:{rawMap:{count:e.length}},children:e.map((e=>sW.getTemplate(e)))})},rW=(e,t)=>(-1!==e.indexOf("mixedStyle")&&t>1&&(e+=`_${t}`),e),oW=()=>{YH={base:0},ZH=[],qH=[{fontName:"Calibri",colorTheme:"1",family:"2",scheme:"minor"}],QH=[{patternType:"none"},{patternType:"gray125"}],XH=[{left:void 0,right:void 0,top:void 0,bottom:void 0,diagonal:void 0}],JH=[{borderId:0,fillId:0,fontId:0,numFmtId:0}],eW=[{borderId:0,fillId:0,fontId:0,numFmtId:0,xfId:0}],tW=[{builtinId:0,name:"Normal",xfId:0}]},aW=e=>{const t=(i=e.pattern)?IH[i]||i:"none";var i;const s=AH(e.color),n=AH(e.patternColor);let r=QH.findIndex((e=>{const{patternType:i,fgRgb:r,bgRgb:o}=e;return i==t&&r==s&&o==n}));return-1===r&&(r=QH.length,QH.push({patternType:t,fgRgb:s,bgRgb:n})),r},lW=e=>{const{fontName:t="Calibri",color:i,size:s,bold:n,italic:r,outline:o,shadow:a,strikeThrough:l,underline:h,family:c,verticalAlign:d}=e,u=AH(i),p=(e=>{if(void 0===e)return;const t=["Automatic","Roman","Swiss","Modern","Script","Decorative"].indexOf(e||"Automatic");return Math.max(t,0)})(c),g=h?h.toLocaleLowerCase():void 0,m=d?d.toLocaleLowerCase():void 0;let f=qH.findIndex((e=>e.fontName==t&&e.color==u&&e.size==s&&e.bold==n&&e.italic==r&&e.outline==o&&e.shadow==a&&e.strikeThrough==l&&e.underline==g&&e.verticalAlign==m&&e.family==p));return-1===f&&(f=qH.length,qH.push({fontName:t,color:u,size:s,bold:n,italic:r,outline:o,shadow:a,strikeThrough:l,underline:g,verticalAlign:m,family:null!=p?p.toString():void 0})),f},hW=e=>{const{alignment:t,borders:i,font:s,interior:n,numberFormat:r,protection:o,quotePrefix:a}=e;let{id:l}=e,h=0,c=0,d=0,u=0;l&&(l=rW(l,iW),void 0==YH[l]&&(n&&(h=aW(n)),i&&(c=(e=>{const{borderBottom:t,borderTop:i,borderLeft:s,borderRight:n}=e;let r,o,a,l,h,c,d,u;s&&(a=TH(s.lineStyle,s.weight),d=AH(s.color)),n&&(l=TH(n.lineStyle,n.weight),u=AH(n.color)),t&&(r=TH(t.lineStyle,t.weight),h=AH(t.color)),i&&(o=TH(i.lineStyle,i.weight),c=AH(i.color));let p=XH.findIndex((e=>{const{left:t,right:i,top:s,bottom:n}=e;if(!t&&(a||d))return!1;if(!i&&(l||u))return!1;if(!s&&(o||c))return!1;if(!n&&(r||h))return!1;const{style:p,color:g}=t||{},{style:m,color:f}=i||{},{style:v,color:y}=s||{},{style:C,color:S}=n||{};return p==a&&g==d&&m==l&&f==u&&v==o&&y==c&&C==r&&S==h}));return-1===p&&(p=XH.length,XH.push({left:{style:a,color:d},right:{style:l,color:u},top:{style:o,color:c},bottom:{style:r,color:h},diagonal:{style:void 0,color:void 0}})),p})(i)),s&&(d=lW(s)),r&&(u=(e=>{if(iH[e])return iH[e];let t=ZH.findIndex((t=>t.formatCode===e));return-1===t?(t=ZH.length+164,ZH.push({formatCode:e,numFmtId:t})):t=ZH[t].numFmtId,t}
2)(r.format)),YH[l]=eW.length,eW.push({alignment:t,borderId:c||0,fillId:h||0,fontId:d||0,numFmtId:u||0,protection:o,quotePrefix:a,xfId:0})))},cW=(e,t)=>YH[rW(e,t)]||0,dW={getTemplate(e){const t=nW.getTemplate(ZH),i=$H.getTemplate(qH.map((t=>({...t,size:null!=t.size?t.size:e})))),s=_H.getTemplate(QH),n=NH.getTemplate(XH),r=zH.getTemplate(JH),o=jH.getTemplate(eW),a=WH.getTemplate(tW);return oW(),{name:"styleSheet",properties:{rawMap:{"mc:Ignorable":"x14ac x16r2 xr",xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision"}},children:[t,i,s,n,r,o,a,{name:"tableStyles",properties:{rawMap:{count:0,defaultPivotStyle:"PivotStyleLight16",defaultTableStyle:"TableStyleMedium2"}}}]}}},uW={getTemplate(e,t){const{name:i,columns:s,rowCount:n,displayName:r,headerRowIndex:o,showRowStripes:a,showColumnStripes:l,showFilterButtons:h,highlightFirstColumn:c,highlightLastColumn:d}=e||{};if(!e||!i||!Array.isArray(s)||!s.length||!n)return{name:"table"};const u=s.map(((e,t)=>({name:"filterColumn",properties:{rawMap:{colId:t.toString(),hiddenButton:h[t]?0:1}}}))),p=o+1,g=(t+1).toString(),m=`${`A${p}`}:${`${String.fromCharCode(64+s.length)}${p+n}`}`;return{name:"table",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",name:i,displayName:t?`${r}_${t+1}`:r,ref:m,totalsRowShown:0,id:g}},children:[{name:"autoFilter",properties:{rawMap:{ref:m}},children:u},{name:"tableColumns",properties:{rawMap:{count:s.length}},children:s.map(((e,t)=>({name:"tableColumn",properties:{rawMap:{id:(t+1).toString(),name:e,dataCellStyle:"Normal"}}})))},{name:"tableStyleInfo",properties:{rawMap:{name:"TableStyleLight1",showFirstColumn:c?1:0,showLastColumn:d?1:0,showRowStripes:a?1:0,showColumnStripes:l?1:0}}}]}}},pW=e=>{const[t,i,s,n]=e;return{name:`a:${t}`,children:[{name:`a:${i}`,properties:{rawMap:{val:s,lastClr:n}}}]}},gW={getTemplate:()=>({name:"a:clrScheme",properties:{rawMap:{name:"Office"}},children:[pW(["dk1","sysClr","windowText","000000"]),pW(["lt1","sysClr","window","FFFFFF"]),pW(["dk2","srgbClr","44546A"]),pW(["lt2","srgbClr","E7E6E6"]),pW(["accent1","srgbClr","4472C4"]),pW(["accent2","srgbClr","ED7D31"]),pW(["accent3","srgbClr","A5A5A5"]),pW(["accent4","srgbClr","FFC000"]),pW(["accent5","srgbClr","5B9BD5"]),pW(["accent6","srgbClr","70AD47"]),pW(["hlink","srgbClr","0563C1"]),pW(["folHlink","srgbClr","954F72"])]})},mW=e=>{const[t,i,s,n]=e;return{name:`a:${t}`,properties:{rawMap:{script:s,typeface:i,panose:n}}}},fW={getTemplate:()=>({name:"a:fontScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:majorFont",children:[mW(["latin","Calibri Light",void 0,"020F0302020204030204"]),mW(["ea",""]),mW(["cs",""]),mW(["font","\u6e38\u30b4\u30b7\u30c3\u30af Light","Jpan"]),mW(["font","\ub9d1\uc740 \uace0\ub515","Hang"]),mW(["font","\u7b49\u7ebf Light","Hans"]),mW(["font","\u65b0\u7d30\u660e\u9ad4","Hant"]),mW(["font","Times New Roman","Arab"]),mW(["font","Times New Roman","Hebr"]),mW(["font","Tahoma","Thai"]),mW(["font","Nyala","Ethi"]),mW(["font","Vrinda","Beng"]),mW(["font","Shruti","Gujr"]),mW(["font","MoolBoran","Khmr"]),mW(["font","Tunga","Knda"]),mW(["font","Raavi","Guru"]),mW(["font","Euphemia","Cans"]),mW(["font","Plantagenet Cherokee","Cher"]),mW(["font","Microsoft Yi Baiti","Yiii"]),mW(["font","Microsoft Himalaya","Tibt"]),mW(["font","MV Boli","Thaa"]),mW(["font","Mangal","Deva"]),mW(["font","Gautami","Telu"]),mW(["font","Latha","Taml"]),mW(["font","Estrangelo Edessa","Syrc"]),mW(["font","Kalinga","Orya"]),mW(["font","Kartika","Mlym"]),mW(["font","DokChampa","Laoo"]),mW(["font","Iskoola Pota","Sinh"]),mW(["font","Mongolian Baiti","Mong"]),mW(["font","Times New Roman","Viet"]),mW(["font","Microsoft Uighur","Uigh"]),mW(["font","Sylfaen","Geor"]),mW(["font","Arial","Armn"]),mW(["font","Leelawadee UI","Bugi"]),mW(["font","Microsoft JhengHei","Bopo"]),mW(["font","Javanese Text","Java"]),mW(["font","Segoe UI","Lisu"]),mW(["font","Myanmar Text","Mymr"]),mW(["font","Ebrima","Nkoo"]),mW(["font","Nirmala UI","Olck"]),mW(["font","Ebrima","Osma"]),mW(["font","Phagspa","Phag"]),mW(["font","Estrangelo Edessa","Syrn"]),mW(["font","Estrangelo Edessa","Syrj"]),mW(["font","Estrangelo Edessa","Syre"]),mW(["font","Nirmala UI","Sora"]),mW(["font","Microsoft Tai Le","Tale"]),mW(["font","Microsoft New Tai Lue","Talu"]),mW(["font","Ebrima","Tfng"])]},{name:"a:minorFont",children:[mW(["latin","Calibri",void 0,"020F0502020204030204"]),mW(["ea",""]),mW(["cs",""]),mW(["font","\u6e38\u30b4\u30b7\u30c3\u30af","Jpan"]),mW(["font","\ub9d1\uc740 \uace0\ub515","Hang"]),mW(["font","\u7b49\u7ebf","Hans"]),mW(["font","\u65b0\u7d30\u660e\u9ad4","Hant"]),mW(["font","Arial","Arab"]),mW(["font","Arial","Hebr"]),mW(["font","Tahoma","Thai"]),mW(["font","Nyala","Ethi"]),mW(["font","Vrinda","Beng"]),mW(["font","Shruti","Gujr"]),mW(["font","DaunPenh","Khmr"]),mW(["font","Tunga","Knda"]),mW(["font","Raavi","Guru"]),mW(["font","Euphemia","Cans"]),mW(["font","Plantagenet Cherokee","Cher"]),mW(["font","Microsoft Yi Baiti","Yiii"]),mW(["font","Microsoft Himalaya","Tibt"]),mW(["font","MV Boli","Thaa"]),mW(["font","Mangal","Deva"]),mW(["font","Gautami","Telu"]),mW(["font","Latha","Taml"]),mW(["font","Estrangelo Edessa","Syrc"]),mW(["font","Kalinga","Or
2ya"]),mW(["font","Kartika","Mlym"]),mW(["font","DokChampa","Laoo"]),mW(["font","Iskoola Pota","Sinh"]),mW(["font","Mongolian Baiti","Mong"]),mW(["font","Arial","Viet"]),mW(["font","Microsoft Uighur","Uigh"]),mW(["font","Sylfaen","Geor"]),mW(["font","Arial","Armn"]),mW(["font","Leelawadee UI","Bugi"]),mW(["font","Microsoft JhengHei","Bopo"]),mW(["font","Javanese Text","Java"]),mW(["font","Segoe UI","Lisu"]),mW(["font","Myanmar Text","Mymr"]),mW(["font","Ebrima","Nkoo"]),mW(["font","Nirmala UI","Olck"]),mW(["font","Ebrima","Osma"]),mW(["font","Phagspa","Phag"]),mW(["font","Estrangelo Edessa","Syrn"]),mW(["font","Estrangelo Edessa","Syrj"]),mW(["font","Estrangelo Edessa","Syre"]),mW(["font","Nirmala UI","Sora"]),mW(["font","Microsoft Tai Le","Tale"]),mW(["font","Microsoft New Tai Lue","Talu"]),mW(["font","Ebrima","Tfng"])]}]})},vW=(e,t,i)=>({name:`a:${e}`,properties:{rawMap:{val:t}},children:i}),yW=e=>{const[t,i,s,n,r,o]=e,a=[];return a.push(vW("satMod",s)),n&&a.push(vW("lumMod",n)),r&&a.push(vW("tint",r)),o&&a.push(vW("shade",o)),{name:"a:gs",properties:{rawMap:{pos:t}},children:[{name:"a:schemeClr",properties:{rawMap:{val:i}},children:a}]}},CW=(e,t)=>({name:"a:solidFill",children:[vW("schemeClr",e,t)]}),SW=e=>{const[t,i,s,n,r]=e,[o,a]=r;return{name:"a:gradFill",properties:{rawMap:{rotWithShape:t}},children:[{name:"a:gsLst",children:[yW(i),yW(s),yW(n)]},{name:"a:lin",properties:{rawMap:{ang:o,scaled:a}}}]}},wW=e=>{const[t,i,s,n]=e;return{name:"a:ln",properties:{rawMap:{w:t,cap:i,cmpd:s,algn:n}},children:[CW("phClr"),vW("prstDash","solid"),{name:"a:miter",properties:{rawMap:{lim:"800000"}}}]}},bW=e=>{const t=[];if(e){const[i,s,n,r,o]=e;t.push({name:"a:outerShdw",properties:{rawMap:{blurRad:i,dist:s,dir:n,algn:r,rotWithShape:o}},children:[vW("srgbClr","000000",[vW("alpha","63000")])]})}return{name:"a:effectStyle",children:[Object.assign({},{name:"a:effectLst"},t.length?{children:t}:{})]}},xW={getTemplate:()=>({name:"a:fmtScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:fillStyleLst",children:[CW("phClr"),SW(["1",["0","phClr","105000","110000","67000"],["50000","phClr","103000","105000","73000"],["100000","phClr","109000","105000","81000"],["5400000","0"]]),SW(["1",["0","phClr","103000","102000","94000"],["50000","phClr","110000","100000",void 0,"100000"],["100000","phClr","120000","99000",void 0,"78000"],["5400000","0"]])]},{name:"a:lnStyleLst",children:[wW(["6350","flat","sng","ctr"]),wW(["12700","flat","sng","ctr"]),wW(["19050","flat","sng","ctr"])]},{name:"a:effectStyleLst",children:[bW(),bW(),bW(["57150","19050","5400000","ctr","0"])]},{name:"a:bgFillStyleLst",children:[CW("phClr"),CW("phClr",[vW("tint","95000"),vW("satMod","170000")]),SW(["1",["0","phClr","150000","102000","93000","98000"],["50000","phClr","130000","103000","98000","90000"],["100000","phClr","120000",void 0,void 0,"63000"],["5400000","0"]])]}]})},MW={getTemplate:()=>({name:"a:themeElements",children:[gW.getTemplate(),fW.getTemplate(),xW.getTemplate()]})},DW={getTemplate:()=>({name:"a:theme",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{a:"http://schemas.openxmlformats.org/drawingml/2006/main"}}],rawMap:{name:"Office Theme"}},children:[MW.getTemplate(),{name:"a:objectDefaults"},{name:"a:extraClrSchemeLst"}]})},IW=e=>{const{aspectratio:t,rotation:i}=e||{},s={};return t&&(s.aspectratio="t"),i&&(s.rotation="t"),{name:"o:lock",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:s}}};var RW=(e,t)=>{let i;const{recolor:s,brightness:n,contrast:r,id:o}=e;if(s&&(i={},"Washout"!==s&&"Grayscale"!==s||(i.gain="19661f",i.blacklevel="22938f"),"Black & White"!==s&&"Grayscale"!==s||(i.grayscale="t","Black & White"===s&&(i.bilevel="t"))),!s||"Grayscale"===s){if(i||(i={}),null!=r&&50!==r){let e="1";r>=0&&(r<50?e=String(r/50):r<100?e=String(50/(100-r)):100===r&&(e="2147483647f")),i.gain=e}null!=n&&50!==n&&(i.blacklevel=(a=n,l=0,h=100,c=-.5,d=.5,(a-l)/(h-l)*(d-c)+c).toString())}var a,l,h,c,d;return{name:"v:imagedata",properties:{prefixedAttributes:[{prefix:"o:",map:{relid:`rId${t}`,title:o}}],rawMap:i}}},EW=e=>Math.floor(.74999943307122*(e??0)),AW={getTemplate(e){const t=UW.worksheetHeaderFooterImages.get(e.sheetIndex)||[];var i;return{name:"xml",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{v:"urn:schemas-microsoft-com:vml",o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel"}}]},children:[{name:"o:shapelayout",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}]},children:[{name:"o:idmap",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:{data:"1"}}}]},{name:"v:shapetype",properties:{prefixedAttributes:[{prefix:"o:",map:{spt:"75",preferrelative:"t"}}],rawMap:{coordsize:"21600,21600",filled:"f",id:"_x0000_t75",path:"m@4@5l@4@11@9@11@9@5xe",stroked:"f"}},children:[{name:"v:stroke",properties:{rawMap:{joinstyle:"miter"}}},(i=["if lineDrawn pixelLineWidth 0","sum @0 1 0","sum 0 0 @1","prod @2 1 2","prod @3 21600 pixelWidth","prod @3 21600 pixelHeight","sum @0 0 1","prod @6 1 2","prod @7 21600 pixelWidth","sum @8 21600 0","prod @7 21600 pixelHeight","sum @10 21600 0"],{name:"v:formulas",children:i.map((e=>({name:"v:f",properties:{rawMap:{eqn:e}}}
2)))}),{name:"v:path",properties:{prefixedAttributes:[{prefix:"o:",map:{connecttype:"rect",extrusionok:"f"}}],rawMap:{gradientshapeok:"t"}}},IW({aspectratio:!0})]},...t.map(((e,t)=>((e,t)=>{const{width:i=0,height:s=0,altText:n}=e,r=EW(i),o=EW(s);return{name:"v:shape",properties:{rawMap:{id:e.headerFooterPosition,"o:spid":"_x0000_s1025",style:`position: absolute; margin-left: 0; margin-top: 10in; margin-bottom: 0; margin-right: 0; width: ${r}pt; height: ${o}pt; z-index: ${t+1}`,type:"#_x0000_t75",alt:n}},children:[RW(e,t+1),IW({rotation:!0})]}})(e,t)))]}}},TW={getTemplate(e,t){const i=(t+1).toString();return{name:"sheet",properties:{rawMap:{name:e,sheetId:i,"r:id":`rId${i}`}}}}},PW={getTemplate:e=>({name:"sheets",children:e.map(((e,t)=>TW.getTemplate(e,t)))})},LW={getTemplate:(e,t)=>({name:"workbook",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:[{name:"bookViews",children:[{name:"workbookView",properties:{rawMap:{activeTab:t}}}]},PW.getTemplate(e)]})},FW={getTemplate(e){const{min:t,max:i,outlineLevel:s,s:n,width:r,hidden:o,bestFit:a}=e;let l=1,h="0";return r>1&&(l=(e=>Math.ceil((e-12)/7+1))(r),h="1"),{name:"col",properties:{rawMap:{min:t,max:i,outlineLevel:null!=s?s:void 0,width:l,style:n,hidden:o?"1":"0",bestFit:a?"1":"0",customWidth:h}}}}},kW={getTemplate:e=>({name:"mergeCell",properties:{rawMap:{ref:e}}})},NW={getTemplate(e,t,i){const{ref:s,data:n,styleId:r}=e,{type:o,value:a}=n||{type:"empty",value:null};let l=o;"f"===o?l="str":o.charAt(0)===o.charAt(0).toUpperCase()&&(l=(e=>{const t=e.charAt(0).toLowerCase();return"s"===t?"inlineStr":t})(o));const h={name:"c",properties:{rawMap:{r:s,t:"empty"===l?void 0:l,s:r?cW(r,i):void 0}}};if("empty"===l)return h;let c;return c="str"===l&&"f"===o?[{name:"f",textNode:At(aH(a),!1)}]:"inlineStr"===l?[{name:"is",children:[{name:"t",textNode:At(aH(a),!1)}]}]:[{name:"v",textNode:a}],Object.assign({},h,{children:c})}},OW=e=>""!==e.data?.value||void 0!==e.styleId,GW={getTemplate(e,t,i){const{collapsed:s,hidden:n,height:r,outlineLevel:o,cells:a=[]}=e;((e,t)=>{const i=[];let s=0;for(let n=0;n<e.length;n++){const t=e[n];t.mergeAcross&&(i.push({pos:n,excelPos:s}),s+=t.mergeAcross),s++}if(i.length)for(let n=i.length-1;n>=0;n--){const s=[],r=e[i[n].pos];for(let e=1;e<=r.mergeAcross;e++)s.push({ref:`${oH(i[n].excelPos+1+e)}${t+1}`,styleId:r.styleId,data:{type:"empty",value:null}});s.length&&e.splice(i[n].pos+1,0,...s)}})(a,t);return{name:"row",properties:{rawMap:{r:t+1,collapsed:s?"1":"0",hidden:n?"1":"0",ht:r,customHeight:null!=r?"1":"0",spans:"1:1",outlineLevel:o||void 0}},children:a.filter(OW).map(((e,t)=>NW.getTemplate(e,t,i)))}}},BW=e=>{if(null==e)return 1;const t=["Letter","Letter Small","Tabloid","Ledger","Legal","Statement","Executive","A3","A4","A4 Small","A5","A6","B4","B5","Folio","Envelope","Envelope DL","Envelope C5","Envelope B5","Envelope C3","Envelope C4","Envelope C6","Envelope Monarch","Japanese Postcard","Japanese Double Postcard"].indexOf(e);return-1===t?1:t+1},VW=(e,t,i)=>e.reduce(((e,s,n)=>{const r="Center"===(o=s.position)?"C":"Right"===o?"R":"L";var o;const a=(l=`${e}&amp;${r}`,(h=s.font)?(l+="&amp;&quot;",l+=h.fontName||"Calibri",h.bold!==h.italic?l+=h.bold?",Bold":",Italic":h.bold?l+=",Bold Italic":l+=",Regular",l+="&quot;",h.size&&(l+=`&amp;${h.size}`),h.strikeThrough&&(l+="&amp;S"),h.underline&&(l+="&amp;"+("Double"===h.underline?"E":"U")),h.color&&(l+=`&amp;K${h.color.replace("#","").toUpperCase()}`),l):l);var l,h;const c=["Left","Center","Right"];s.position||(s.position=c[n]);const{image:d}=s;if("&[Picture]"===s.value&&d){const e=`${r}${t}${i}`;UW.addHeaderFooterImageToMap(d,e)}return`${a}${At((u=s.value,et({"&[Page]":"&P","&[Pages]":"&N","&[Date]":"&D","&[Time]":"&T","&[Tab]":"&A","&[Path]":"&Z","&[File]":"&F","&[Picture]":"&G"},((e,t)=>{u=u.replace(e,t)})),u))}`;var u}),""),zW=e=>{const t=[];return["all","first","even"].forEach((i=>{const s=e[i],n="all"===i?"odd":i;if(s)for(const[e,r]of Object.entries(s)){const s=`${e.charAt(0).toUpperCase()}${e.slice(1)}`,o=e[0].toUpperCase();if(r){const e="all"===i?"":i.toUpperCase();t.push({name:`${n}${s}`,properties:{rawMap:{"xml:space":"preserve"}},textNode:VW(r,o,e)})}}})),t},HW=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=e>0||t>0;return i?[{name:"pane",properties:{rawMap:{state:i?"frozen":void 0,topLeftCell:i?`${oH(e+1)}${t+1}`:void 0,xSplit:0===e?void 0:e,ySplit:0===t?void 0:t}}}]:void 0},WW={getTemplate(e){const{worksheet:t,currentSheet:i,config:s}=e,{margins:n={},pageSetup:r,headerFooterConfig:o,suppressColumnOutline:a,rightToLeft:l,frozenRowCount:h,frozenColumnCount:c}=s,{table:d}=t,{rows:u,columns:p}=d,g=p&&p.length?((e,t,i)=>{const s=[],n=[];e.forEach(((e,i)=>{const r=e.cells;let o,a=0;r.forEach(((e,r)=>{const l=r+a+1,h=oH(l),c=i+1;if(e.mergeAcross){a+=e.mergeAcross;const t=oH(r+a+1);s.push(`${h}${c}:${t}${c}`)}t[l-1]||(t[l-1]={});const{collapsibleRanges:d}=e;d&&d.forEach((e=>{n.push([l+e[0],l+e[1]])})),o=t[l-1],o.min=l,o.max=l,e.ref=`${h}${c}`}))})),n.sort(((e,t)=>e[0]!==t[0]?e[0]-t[0]:t[1]-e[1]));const r=new Map,o=new Map;return n.filter((e=>{const t=e.toString();return!r.get(t)&&(r.set(t,!0),!0)}
2)).forEach((e=>{const s=t.find((t=>t.min==e[0]&&t.max==e[1])),n=o.get(e[0]);t.push({min:e[0],max:e[1],outlineLevel:i?void 0:n||1,width:(s||{width:100}).width}),o.set(e[0],(n||0)+1)})),s})(u,p,!!a):[],{worksheetDataTables:m}=UW,f=m.get(i),v=C((e=>(e.children.push({name:"sheetPr",children:[{name:"outlinePr",properties:{rawMap:{summaryBelow:0}}}]}),e)),function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;return s=>(s.children.push({name:"sheetViews",children:[{name:"sheetView",properties:{rawMap:{rightToLeft:!0===e?"1":"0",workbookViewId:"0"}},children:HW(t,i)}]}),s)}(l,c,h),(e=>t=>{const i=e.reduce(((e,t)=>t.outlineLevel&&t.outlineLevel>e?t.outlineLevel:e),0);return t.children.push({name:"sheetFormatPr",properties:{rawMap:{baseColWidth:10,defaultRowHeight:16,outlineLevelRow:i||void 0}}}),t})(u),(e=>t=>(e.length&&t.children.push({name:"cols",children:e.map((e=>FW.getTemplate(e)))}),t))(p),((e,t)=>i=>(e.length&&i.children.push({name:"sheetData",children:e.map(((e,i)=>GW.getTemplate(e,i,t)))}),i))(u,i+1),(S=g,e=>(S.length&&e.children.push({name:"mergeCells",properties:{rawMap:{count:S.length}},children:S.map((e=>kW.getTemplate(e)))}),e)),(e=>t=>{const{top:i=.75,right:s=.7,bottom:n=.75,left:r=.7,header:o=.3,footer:a=.3}=e;return t.children.push({name:"pageMargins",properties:{rawMap:{bottom:n,footer:a,header:o,left:r,right:s,top:i}}}),t})(n),(e=>t=>{var i;return e&&t.children.push({name:"pageSetup",properties:{rawMap:{horizontalDpi:0,verticalDpi:0,orientation:(i=e.orientation,!i||"Portrait"!==i&&"Landscape"!==i?"portrait":i.toLocaleLowerCase()),paperSize:BW(e.pageSize)}}}),t})(r),(e=>t=>{if(!e)return t;const i=null!=e.first?1:0,s=null!=e.even?1:0;return t.children.push({name:"headerFooter",properties:{rawMap:{differentFirst:i,differentOddEven:s}},children:zW(e)}),t})(o),(e=>t=>{const i=UW.worksheetImages.get(e);return i?.length&&t.children.push({name:"drawing",properties:{rawMap:{"r:id":"rId"+ ++t.rIdCounter}}}),t})(i),(e=>t=>(UW.worksheetHeaderFooterImages.get(e)&&t.children.push({name:"legacyDrawingHF",properties:{rawMap:{"r:id":"rId"+ ++t.rIdCounter}}}),t))(i),(y=f,e=>(y&&e.children.push({name:"tableParts",properties:{rawMap:{count:"1"}},children:[{name:"tablePart",properties:{rawMap:{"r:id":"rId"+ ++e.rIdCounter}}}]}),e)));var y,S;const{children:w}=v({children:[],rIdCounter:0});return{name:"worksheet",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:w}}},jW=class e{static createExcel(e,t,i){this.addSheetName(t),((e,t)=>{1===(iW=t)&&oW(),e.forEach(hW)})(e,this.sheetNames.length);const s=Object.assign({},i);return i.exportAsExcelTable&&(i.columnModel.isPivotActive()&&(this.showExcelTableNonCompatibleFeaturesWarning("pivot mode"),s.exportAsExcelTable=!1),i.gos.get("masterDetail")&&(this.showExcelTableNonCompatibleFeaturesWarning("master/detail"),s.exportAsExcelTable=!1)),this.processTableConfig(t,s),this.createWorksheet(t,s)}static showExcelTableNonCompatibleFeaturesWarning(e){h(`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.\nPlease turn off ${e} to enable Excel table exports.`)}static getTableNameFromIndex(e){return`table${e+1}`}static getSanitizedTableName(e){return e.replace(/^[^a-zA-Z_]+/,"_").replace(/\s/g,"_").replace(/[^a-zA-Z0-9_]/g,"_")}static addTableToSheet(e,t){this.worksheetDataTables.has(e)?h("Unable to add data table to Excel sheet: A table already exists."):this.worksheetDataTables.set(e,t)}static processTableConfig(t,i){if(!i.exportAsExcelTable)return;const s="boolean"===typeof i.exportAsExcelTable?{}:i.exportAsExcelTable,{name:n,showColumnStripes:r,showRowStripes:o,showFilterButton:a,highlightFirstColumn:l,highlightLastColumn:c}=s,d=this.getSanitizedTableName(n||e.defaultTableDisplayName),u=this.sheetNames.length-1,{table:p}=t,{rows:g,columns:m}=p,f=i.columnModel.getHeaderRowCount(),v=f-1,y=g.length,C=m.length,S=[],w=[];for(let e=0;e<C;e++){const t=m[e];S.push(t.displayName||""),w.push("match"===a||void 0===a?t.filterAllowed??!1:a)}S&&S.length&&y&&d?this.addTableToSheet(u,{name:this.getTableNameFromIndex(u),displayName:d,columns:S,showFilterButtons:w,headerRowIndex:v,rowCount:y-f,showRowStripes:o??!0,showColumnStripes:r??!1,highlightFirstColumn:l??!1,highlightLastColumn:c??!1}):h("Unable to add data table to Excel sheet: Missing required parameters.")}static addHeaderFooterImageToMap(e,t){const i=this.sheetNames.length-1,s=e;s.headerFooterPosition=t,this.buildImageMap({imageToAdd:s,idx:i});let n=this.worksheetHeaderFooterImages.get(i);
2n||(n=[],this.worksheetHeaderFooterImages.set(i,n)),n.find((t=>t.id===e.id))||n.push(e)}static addBodyImageToMap(e,t,i,s,n){const r=this.sheetNames.length,{row:o,column:a}=e.position||{},l=e;s&&(null==t||null==i||o&&a||(e.position||(e.position={}),e.position=Object.assign({},e.position,{row:t,column:s.indexOf(i)+1})),((e,t)=>{const{colSpan:i,column:s}=e.position;if(e.width)if(i){const n=t.slice(s-1,s+i-1);let r=0;for(let t=0;t<n.length;t++){const i=n[t].getActualWidth();if(e.width<r+i){e.position.colSpan=t+1,e.totalWidth=e.width,e.width=e.totalWidth-r;break}r+=i}}else e.totalWidth=e.width})(l,s),((e,t)=>{const{rowSpan:i,row:s}=e.position;var n;if(e.height)if(i){let r=0,o=0;for(let a=s;a<s+i;a++){const i=(n=nH(a,t)||20,Math.round(96*n/72));if(e.height<r+i){e.position.rowSpan=o+1,e.totalHeight=e.height,e.height=e.totalHeight-r;break}r+=i,o++}}else e.totalHeight=e.height})(l,n)),this.buildImageMap({imageToAdd:l,idx:r});let h=this.worksheetImageIds.get(r);h||(h=new Map,this.worksheetImageIds.set(r,h));const c=this.worksheetImages.get(r);c?c.push(l):this.worksheetImages.set(r,[l]),h.get(e.id)||h.set(e.id,{index:h.size,type:e.imageType})}static buildImageMap(e){const{imageToAdd:t,idx:i}=e,s=this.images.get(t.id);if(s){const e=s.find((e=>e.sheetId===i));e?e.image.push(t):s.push({sheetId:i,image:[t]})}else this.images.set(t.id,[{sheetId:i,image:[t]}]),this.workbookImageIds.set(t.id,{type:t.imageType,index:this.workbookImageIds.size})}static addSheetName(e){const t=At(e.name)||"";let i="";for(;-1!==this.sheetNames.indexOf(`${t}${i}`);)if(""===i)i="_1";else{const e=parseInt(i.slice(1),10);i=`_${e+1}`}e.name=`${t}${i}`,this.sheetNames.push(e.name)}static getStringPosition(e){return this.sharedStrings.has(e)?this.sharedStrings.get(e):(this.sharedStrings.set(e,this.sharedStrings.size),this.sharedStrings.size-1)}static resetFactory(){this.sharedStrings=new Map,this.images=new Map,this.worksheetImages=new Map,this.worksheetHeaderFooterImages=new Map,this.workbookImageIds=new Map,this.worksheetImageIds=new Map,this.worksheetDataTables=new Map,this.sheetNames=[],this.factoryMode=Nn.SINGLE_SHEET}static createWorkbook(e){return rH(LW.getTemplate(this.sheetNames,e))}static createStylesheet(e){return rH(dW.getTemplate(e))}static createSharedStrings(){return rH(xH.getTemplate(this.sharedStrings))}static createCore(e){return rH(uH.getTemplate(e))}static createContentTypes(e){return rH(dH.getTemplate(e))}static createRels(){const e=bH.getTemplate([{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Target:"xl/workbook.xml"},{Id:"rId2",Type:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Target:"docProps/core.xml"}]);return rH(e)}static createTheme(){return rH(DW.getTemplate())}static createTable(e,t){return rH(uW.getTemplate(e,t))}static createWorkbookRels(e){const t=new Array(e).fill(void 0).map(((e,t)=>({Id:`rId${t+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:`worksheets/sheet${t+1}.xml`}))),i=bH.getTemplate([...t,{Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"},{Id:`rId${e+2}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"},{Id:`rId${e+3}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"}]);return rH(i)}static createDrawing(e){return rH(SH.getTemplate({sheetIndex:e}))}static createDrawingRel(e){const t=this.worksheetImageIds.get(e)||[],i=[];for(const[s,n]of t){const{index:e,type:t}=n;i.push({Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${this.workbookImageIds.get(s).index+1}.${cH(t)}`})}return rH(bH.getTemplate(i))}static createVmlDrawing(e){return rH(AW.getTemplate({sheetIndex:e}),!0)}static createVmlDrawingRel(e){const t=this.worksheetHeaderFooterImages.get(e)||[],i=[];for(let s=0;s<t.length;s++){const e=t[s],n=this.workbookImageIds.get(e.id);if(!n)continue;const{index:r,type:o}=n;i.push({Id:`rId${s+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${r+1}.${cH(o)}`})}return rH(bH.getTemplate(i))}static createRelationships(){let{drawingIndex:e,vmlDrawingIndex:t,tableIndex:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e&&void 0===t&&void 0===i)return"";const s=[];null!=e&&s.push({Id:`rId${s.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/drawing${e+1}.xml`}),null!=t&&s.push({Id:`rId${s.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Target:`../drawings/vmlDrawing${t+1}.vml`}),null!=i&&s.push({Id:`rId${s.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",Target:`../tables/${this.getTableNameFromIndex(i)}.xml`});const n=bH.getTemplate(s);return rH(n)}static createWorksheet(e,t){return rH(WW.getTemplate({worksheet:e,currentSheet:this.sheetNames.length-1,config:t}))}};jW.sharedStrings=new Map,jW.sheetNames=[],jW.images=new Map,jW.worksheetImages=new Map,jW.worksheetHeaderFooterImages=new Map,jW.workbookImageIds=new Map,jW.worksheetImageIds=new Map,jW.worksheetDataTables=new Map,jW.defaultTableDisplayName="AG-GRID-TABLE",jW.factoryMo
2de=Nn.SINGLE_SHEET;var UW=jW,_W=class extends Bc{constructor(e){super(e),this.mixedStyles={},this.mixedStyleCounter=0,this.rows=[],this.frozenRowCount=0,this.skipFrozenRows=!1,this.frozenColumnCount=0,this.skipFrozenColumns=!1,this.config=Object.assign({},e),this.stylesByIds={},this.config.baseExcelStyles.forEach((e=>{this.stylesByIds[e.id]=e})),this.excelStyles=[...this.config.baseExcelStyles,{id:"_quotePrefix",quotePrefix:1}]}addCustomContent(e){e.forEach((e=>{const t=this.rows.length+1;let i;this.config.suppressRowOutline||null==e.outlineLevel||(i=e.outlineLevel);const s={height:nH(t,e.height||this.config.rowHeight),cells:(e.cells||[]).map(((e,i)=>{const s=this.addImage(t,this.columnsToExport[i],e.data?.value);let n=null;e.styleId&&(n="string"===typeof e.styleId?[e.styleId]:e.styleId);const r=this.getStyleId(n);if(s)return this.createCell(r,this.getDataTypeForValue(s.value),null==s.value?"":s.value);const o=e.data?.value??"",a=this.getDataTypeForValue(o);return e.mergeAcross?this.createMergedCell(r,a,o,e.mergeAcross):this.createCell(r,a,o)})),outlineLevel:i};null!=e.collapsed&&(s.collapsed=e.collapsed),null!=e.hidden&&(s.hidden=e.hidden),this.rows.push(s)}))}onNewHeaderGroupingRow(){const e=[],{freezeRows:t,headerRowHeight:i}=this.config;return this.rows.push({cells:e,height:nH(this.rows.length+1,i)}),t&&this.frozenRowCount++,{onColumn:(t,i,s,n,r)=>{const o=this.config.styleLinker({rowType:Hc.HEADER_GROUPING,rowIndex:1,value:`grouping-${i}`,columnGroup:t});e.push({...this.createMergedCell(this.getStyleId(o),this.getDataTypeForValue("string"),i,n),collapsibleRanges:r})}}}onNewHeaderRow(){const{freezeRows:e,headerRowHeight:t}=this.config;return e&&this.frozenRowCount++,this.onNewRow(this.onNewHeaderColumn,t)}onNewBodyRow(e){const{freezeRows:t,rowHeight:i}=this.config;this.skipFrozenRows||("headersAndPinnedRows"===t&&"top"===e?.rowPinned||"function"===typeof t&&t({...this.gos.getGridCommonParams(),node:e})?this.frozenRowCount++:this.skipFrozenRows=!0);const s=this.onNewRow(this.onNewBodyColumn,i);return e&&this.addRowOutlineIfNecessary(e),s}prepare(e){super.prepare(e),this.columnsToExport=[...e],this.cols=e.map(((e,t)=>this.convertColumnToExcel(e,t)))}parse(){const e=this.rows.reduce(((e,t)=>Math.max(e,t.cells.length)),0);for(;this.cols.length<e;)this.cols.push(this.convertColumnToExcel(null,this.cols.length+1));const{config:t}=this;let i;if(null!=t.sheetName){const{sheetName:e}=t,s="function"===typeof e?e(this.gos.getGridCommonParams()):e;i=String(s).substring(0,31)}else i="ag-grid";const s={name:i,table:{columns:this.cols,rows:this.rows}};return this.createExcel(s)}addRowOutlineIfNecessary(e){const{gos:t,suppressRowOutline:i,rowGroupExpandState:s="expanded"}=this.config;if(t.get("groupHideOpenParents")||i||null==e.level)return;const n=e.footer?1:0,r=Se(this.rows),o=Math.min(e.level+n,7);if(r.outlineLevel=o,"expanded"===s)return;const a="collapsed"===s;if(e.isExpandable()){const t=!a&&e.expanded;r.collapsed=!t}r.hidden=!!e.parent&&-1!==e.parent.level&&(a||this.isAnyParentCollapsed(e.parent))}isAnyParentCollapsed(e){for(;e&&-1!==e.level;){if(!e.expanded)return!0;e=e.parent}return!1}convertColumnToExcel(e,t){const i=this.config.columnWidth,s=(e?this.extractHeaderValue(e):void 0)??"",n=!!e&&e.isFilterAllowed();if(i)return"number"===typeof i?{width:i,displayName:s,filterAllowed:n}:{width:i({column:e,index:t}),displayName:s,filterAllowed:n};if(e){const t=75;return{width:Math.max(e.getActualWidth(),t),displayName:s,filterAllowed:n}}return{displayName:s,filterAllowed:n}}onNewHeaderColumn(e,t){return i=>{const s=this.extractHeaderValue(i),n=this.config.styleLinker({rowType:Hc.HEADER,rowIndex:e,value:s,column:i});t.push(this.createCell(this.getStyleId(n),this.getDataTypeForValue("string"),s))}}onNewBodyColumn(e,t){let i=0;const{freezeColumns:s,rightToLeft:n}=this.config;return(r,o,a)=>{if(i>0)return void(i-=1);if(!this.skipFrozenColumns){const e=r.getPinned();"pinned"===s&&e&&(!0===e||"left"===e)!==n||"function"===typeof s&&s({...this.gos.getGridCommonParams(),column:r})?this.frozenColumnCount++:this.skipFrozenColumns=!0}const{value:l,valueFormatted:h}=this.extractRowCellValue(r,o,e,"excel",a),c=this.config.styleLinker({rowType:Hc.BODY,rowIndex:e,value:l,column:r,node:a}),d=this.getStyleId(c),u=r.getColSpan(a),p=this.addImage(e,r,l);p?t.push(this.createCell(d,this.getDataTypeForValue(p.value),null==p.value?"":p.value)):u>1?(i=u-1,t.push(this.createMergedCell(d,this.getDataTypeForValue(l),l,u-1))):t.push(this.createCell(d,this.getDataTypeForValue(l),l,h))}}onNewRow(e,t){const i=[];return this.rows.push({cells:i,height:nH(this.rows.length+1,t)}),{onColumn:e.bind(this,this.rows.length,i)()}}createExcel(e){const{excelStyles:t,config:i}=this;return this.frozenColumnCount&&(i.frozenColumnCount=this.frozenColumnCount),this.frozenRowCount&&(i.frozenRowCount=this.frozenRowCount),UW.createExcel(t,e,i)}getDataTypeForValue(e){return void 0===e?"empty":this.isNumerical(e)?"n":"s"}getTypeFromStyle(e,t){if(this.isFormula(t))return"f";if(e&&e.dataType)switch(e.dataType.toLocaleLowerCase()){case"formula":return"f";case"string":return"s";case"number":return"n";case"datetime":return"d";case"error":return"e";case"boolean":return"b";default:h(`Unrecognized data type for excel export [${e.id}.dataType=${e.dataType}]`)}return null}addImage(e,t,i){if(!this.config.addImageToCell)return;const s=this.config.addImageToCell(e,t,i);return s?(UW.addBodyImageToMap(s.image,e,t,this.columnsToExport,this.config.rowHeight),s):void 0}createCell(e,t,i,s){const n=this.getStyleById(e);!n?.dataType&&"s"===t&&s&&(i=s);const r=this.getTypeFromStyle(n,i)||t,{value:o,escaped:a}=this.getCellValue(r,i),l=[];return n&&l.push(e),a&&l.push("_quotePrefix"),{styleId:e=this.getStyleId(l)||void 0,data:{type:r,value:o}}}createMergedCell(e,t,i,s){const n=null==i?"":i;return{styleId:this.getStyleById(e)?e:void 0,data:{type:t,value:"s"===t?UW.getStringPosition(n).toString():i},mergeAcross:s}}getCellValue(e,t){let i=!1;if(null==t||"s"===e&&""===t)return{value:"",escaped:!1};if("s"===e)t&&"'"===t[0]&&(i=!0,t=t.slice(1)),t=UW.getStringPosition(t).toString();else if("f"===e)t=t.slice(1);else if("n"===e){const e=Number(t);isNaN(e)?t="":""!==t&&(t=e.toString())}return{value:t,escaped:i}}getStyleId(e){if(!e||!e.length)return null;if(1===e.length)return e[0];const t=e.join("-");return this.mixedStyles[t]||this.addNewMixedStyle(e),this.mixedStyles[t].excelID}deepCloneObject(e){return JSON.parse(JSON.stringify(e))}addNewMixedStyle(e){this.mixedStyleCounter+=1;const t=`mixedStyle${this.mixedStyleCounter}`,i={};for(const n of e)for(const e of this.excelStyles)e.id===n&&nt(i,this.deepCloneObject(e));i.id=t,i.name=t;const s=e.join("-");this.mixedStyles[s]={excelID:t,key:s,result:i},this.excelStyles.push(i),this.stylesByIds[t]=i}isFormula(e){return null!=e&&(this.config.autoConvertFormulas&&e.toString().startsWith("="))}isNumerical(e){return"bigint"===typeof e||isFinite(e)&&""!==e&&!isNaN(parseFloat(e))}getStyleById(e){return null==e?null:this.stylesByIds[e]||null}},KW=(e,t)=>
2{const i="xl/drawings",s=`${i}/drawing${t+1}.xml`,n=`${i}/_rels/drawing${t+1}.xml.rels`;sd.addFile(n,UW.createDrawingRel(e)),sd.addFile(s,UW.createDrawing(e))},$W=(e,t)=>{const i="xl/drawings",s=`${i}/vmlDrawing${t+1}.vml`,n=`${i}/_rels/vmlDrawing${t+1}.vml.rels`;sd.addFile(s,UW.createVmlDrawing(e)),sd.addFile(n,UW.createVmlDrawingRel(e))},YW=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||0===e.length)return h("Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty."),UW.resetFactory(),!1;const{fontSize:i=11,author:s="AG Grid",activeTab:n=0}=t,r=e.length,o=Math.max(Math.min(n,r-1),0);return(()=>{sd.addFolders(["_rels/","docProps/","xl/","xl/theme/","xl/_rels/","xl/worksheets/"]);const{images:e}=UW;if(!e.size)return;sd.addFolders(["xl/worksheets/_rels","xl/drawings/","xl/drawings/_rels","xl/media/"]);let t=0;e.forEach((e=>{const i=e[0].image[0],{base64:s,imageType:n}=i;sd.addFile(`xl/media/image${++t}.${cH(n)}`,s,!0)}))})(),(()=>{const{worksheetDataTables:e}=UW,t=e,i=Array.from(t.keys());for(let s=0;s<i.length;s++){const e=i[s],n=t.get(e);n&&sd.addFile(`xl/tables/${n.name}.xml`,UW.createTable(n,s))}})(),(e=>{let t=0,i=0,s=0;const{images:n,worksheetDataTables:r,worksheetImages:o,worksheetHeaderFooterImages:a}=UW;for(let l=0;l<e.length;l++){const h=e[l];sd.addFile(`xl/worksheets/sheet${l+1}.xml`,h,!1);const c=n.size>0&&o.has(l),d=r.size>0&&r.has(l),u=n.size&&a.has(l);if(!c&&!d&&!u)continue;let p,g,m;c&&(KW(l,t),g=t,t++),u&&($W(l,i),m=i,i++),d&&(p=s++);const f=`xl/worksheets/_rels/sheet${l+1}.xml.rels`;sd.addFile(f,UW.createRelationships({tableIndex:p,drawingIndex:g,vmlDrawingIndex:m}))}})(e),((e,t,i,s)=>{sd.addFile("xl/workbook.xml",UW.createWorkbook(s)),sd.addFile("xl/styles.xml",UW.createStylesheet(e)),sd.addFile("xl/sharedStrings.xml",UW.createSharedStrings()),sd.addFile("xl/theme/theme1.xml",UW.createTheme()),sd.addFile("xl/_rels/workbook.xml.rels",UW.createWorkbookRels(i)),sd.addFile("docProps/core.xml",UW.createCore(t)),sd.addFile("[Content_Types].xml",UW.createContentTypes(i)),sd.addFile("_rels/.rels",UW.createRels())})(i,s,r,o),UW.resetFactory(),!0},ZW=e=>{const{data:t,fontSize:i,author:s,activeSheetIndex:n}=e,r=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";return YW(t,{author:s,fontSize:i,activeTab:n})?sd.getZipFile(r):Promise.resolve(void 0)},qW=e=>{const{data:t,fontSize:i,author:s,activeSheetIndex:n}=e,r=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";if(YW(t,{author:s,fontSize:i,activeTab:n}))return sd.getUncompressedZipFile(r)},QW=e=>{const{fileName:t="export.xlsx"}=e;ZW(e).then((e=>{if(e){const i="function"===typeof t?t():t;Vc.download(i,e)}}))};function XW(e){return e.excelCreator?.getFactoryMode()!==Nn.MULTI_SHEET||(h("The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1)}var JW="32.3.3",ej={version:JW,moduleName:`${r.ExcelExportModule}-core`,beans:[class extends Gc{constructor(){super(...arguments),this.beanName="excelCreator"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.stylingService=e.stylingService,this.gridSerializer=e.gridSerializer,this.gos=e.gos}postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){const t=this.gos.get("defaultExcelExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed())return void h("Export cancelled. Export is not allowed as per your configuration.");const t=this.getMergedParams(e),i={data:[this.getData(t)],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};this.packageCompressedFile(i).then((e=>{if(e){const{fileName:i}=t,s="function"===typeof i?i(this.gos.getGridCommonParams()):i;Vc.download(this.getFileName(s),e)}}))}exportDataAsExcel(e){this.export(e)}getDataAsExcel(e){const t=this.getMergedParams(e),i={data:[this.getData(t)],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};return this.packageFile(i)}
2setFactoryMode(e){UW.factoryMode=e}getFactoryMode(){return UW.factoryMode}getSheetDataForExcel(e){const t=this.getMergedParams(e);return this.getData(t)}getMultipleSheetsAsExcel(e){return qW(e)}exportMultipleSheetsAsExcel(e){QW(e)}getDefaultFileExtension(){return"xlsx"}createSerializingSession(e){const{columnModel:t,columnNameService:i,funcColsService:s,valueService:n,gos:r}=this,o={...e,columnModel:t,columnNameService:i,funcColsService:s,valueService:n,gos:r,suppressRowOutline:e.suppressRowOutline||e.skipRowGroups,headerRowHeight:e.headerRowHeight||e.rowHeight,baseExcelStyles:this.gos.get("excelStyles")||[],rightToLeft:e.rightToLeft??this.gos.get("enableRtl"),styleLinker:this.styleLinker.bind(this)};return new _W(o)}styleLinker(e){const{rowType:t,rowIndex:i,value:s,column:n,columnGroup:r,node:o}=e,a=t===Hc.HEADER,l=t===Hc.HEADER_GROUPING,h=a?n:r;let c=[];if(a||l)return c.push("header"),l&&c.push("headerGroup"),h&&(c=c.concat(zr(h.getDefinition(),this.gos,n||null,r||null))),c;const d=this.gos.get("excelStyles"),u=["cell"];if(!d||!d.length)return u;const p=d.map((e=>e.id)),g=n.getDefinition();return this.stylingService.processAllCellClasses(g,this.gos.addGridCommonParams({value:s,data:o.data,node:o,colDef:g,column:n,rowIndex:i}),(e=>{p.indexOf(e)>-1&&u.push(e)})),u.sort(((e,t)=>p.indexOf(e)<p.indexOf(t)?-1:1))}isExportSuppressed(){return this.gos.get("suppressExcelExport")}packageCompressedFile(e){return ZW(e)}packageFile(e){return qW(e)}}],dependantModules:[jc,ek]},tj={version:JW,moduleName:`${r.ExcelExportModule}-api`,apiFunctions:{getDataAsExcel:function(e,t){if(XW(e))return e.excelCreator?.getDataAsExcel(t)},exportDataAsExcel:function(e,t){XW(e)&&e.excelCreator?.exportDataAsExcel(t)},getSheetDataForExcel:function(e,t){return e.excelCreator?.setFactoryMode(Nn.MULTI_SHEET),e.excelCreator?.getSheetDataForExcel(t)},getMultipleSheetsAsExcel:function(e,t){return e.excelCreator?.getMultipleSheetsAsExcel(t)},exportMultipleSheetsAsExcel:function(e,t){e.excelCreator?.exportMultipleSheetsAsExcel(t)}},dependantModules:[ej]},ij={version:JW,moduleName:r.ExcelExportModule,dependantModules:[ej,tj]},sj={selector:"AG-FILTERS-TOOL-PANEL-HEADER",component:class extends Rs{constructor(){super(...arguments),this.eExpand=Is,this.eFilterTextField=Is}wireBeans(e){this.columnModel=e.columnModel}postConstruct(){this.setTemplate('<div class="ag-filter-toolpanel-search" role="presentation">\n                <div data-ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n                <ag-input-text-field data-ref="eFilterTextField" class="ag-filter-toolpanel-search-input"></ag-input-text-field>\n            </div>',[vr]);const e=this.localeService.getLocaleTextFunc();this.eFilterTextField.setAutoComplete(!1).setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")).onValueChange(this.onSearchTextChanged.bind(this)),this.createExpandIcons(),this.setExpandState(0),this.addManagedElementListeners(this.eExpand,{click:this.onExpandClicked.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)})}init(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=Ps("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=Ps("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=Ps("columnSelectIndeterminate",this.gos))}showOrHideOptions(){const e=!this.params.suppressFilterSearch,t=!this.params.suppressExpandAll,i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search..."));const s=this.columnModel.getCols().some((e=>e.getOriginalParent()&&e.isFilterAllowed()));Ki(this.eFilterTextField.getGui(),e),Ki(this.eExpand,t&&s)}onSearchTextChanged(){this.onSearchTextChangedDebounced||(this.onSearchTextChangedDebounced=f((()=>{this.dispatchLocalEvent({type:"searchChanged",searchText:this.eFilterTextField.getValue()})}),300)),this.onSearchTextChangedDebounced()}onExpandClicked(){const e=0===this.currentExpandState?{type:"collapseAll"}
2:{type:"expandAll"};this.dispatchLocalEvent(e)}setExpandState(e){this.currentExpandState=e,Ki(this.eExpandChecked,0===this.currentExpandState),Ki(this.eExpandUnchecked,1===this.currentExpandState),Ki(this.eExpandIndeterminate,2===this.currentExpandState)}}},nj=class extends Rs{constructor(e,t){super('\n            <div class="ag-filter-toolpanel-instance">\n                <div class="ag-filter-toolpanel-header ag-filter-toolpanel-instance-header" data-ref="eFilterToolPanelHeader" role="button" aria-expanded="false">\n                    <div data-ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n                    <span data-ref="eFilterName" class="ag-header-cell-text"></span>\n                    <span data-ref="eFilterIcon" class="ag-header-icon ag-filter-icon ag-filter-toolpanel-instance-header-icon" aria-hidden="true"></span>\n                </div>\n                <div class="ag-filter-toolpanel-instance-body ag-filter" data-ref="agFilterToolPanelBody"></div>\n            </div>'),this.expandedCallback=t,this.eFilterToolPanelHeader=Is,this.eFilterName=Is,this.agFilterToolPanelBody=Is,this.eFilterIcon=Is,this.eExpand=Is,this.expanded=!1,this.hideHeader=e}wireBeans(e){this.filterManager=e.filterManager,this.columnNameService=e.columnNameService}postConstruct(){this.eExpandChecked=Ps("columnSelectOpen",this.gos),this.eExpandUnchecked=Ps("columnSelectClosed",this.gos),this.eExpand.appendChild(this.eExpandChecked),this.eExpand.appendChild(this.eExpandUnchecked)}setColumn(e){this.column=e,this.eFilterName.innerText=this.columnNameService.getDisplayNameForColumn(this.column,"filterToolPanel",!1)||"",this.addManagedListeners(this.eFilterToolPanelHeader,{click:this.toggleExpanded.bind(this),keydown:this.onKeyDown.bind(this)}),this.addManagedEventListeners({filterOpened:this.onFilterOpened.bind(this)}),this.addInIcon("filter",this.eFilterIcon,this.column),Ki(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),Ki(this.eExpandChecked,!1),this.hideHeader?(Ki(this.eFilterToolPanelHeader,!1),this.eFilterToolPanelHeader.removeAttribute("tabindex")):this.eFilterToolPanelHeader.setAttribute("tabindex","0"),this.addManagedListeners(this.column,{filterChanged:this.onFilterChanged.bind(this)})}onKeyDown(e){const{key:t}=e,{ENTER:i,SPACE:s,LEFT:n,RIGHT:r}=js;t!==i&&t!==s&&t!==n&&t!==r||(e.preventDefault(),t===i||t===s?this.toggleExpanded():t===js.LEFT?this.collapse():this.expand())}getColumn(){return this.column}getColumnFilterName(){return this.columnNameService.getDisplayNameForColumn(this.column,"filterToolPanel",!1)}addCssClassToTitleBar(e){this.eFilterToolPanelHeader.classList.add(e)}addInIcon(e,t,i){if(null==t)return;const s=Ps(e,this.gos,i);t.appendChild(s)}isFilterActive(){return!!this.filterManager?.isFilterActive(this.column)}onFilterChanged(){Ki(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),this.dispatchLocalEvent({type:"filterChanged"})}toggleExpanded(){this.expanded?this.collapse():this.expand()}expand(){this.expanded||(this.expanded=!0,Ci(this.eFilterToolPanelHeader,!0),Ki(this.eExpandChecked,!0),Ki(this.eExpandUnchecked,!1),this.addFilterElement(),this.expandedCallback())}addFilterElement(e){const t=hs('<div class="ag-filter-toolpanel-instance-filter"></div>'),i=this.createManagedBean(new Zn(this.column,"TOOLBAR"));this.filterWrapperComp=i,i.hasFilter()&&i.getFilter()?.then((s=>{this.underlyingFilter=s,s&&(t.appendChild(i.getGui()),this.agFilterToolPanelBody.appendChild(t),i.afterGuiAttached({container:"toolPanel",suppressFocus:e}))}))}collapse(){this.expanded&&(this.expanded=!1,Ci(this.eFilterToolPanelHeader,!1),this.removeFilterElement(),Ki(this.eExpandChecked,!1),Ki(this.eExpandUnchecked,!0),this.filterWrapperComp?.afterGuiDetached(),this.destroyBean(this.filterWrapperComp),this.expandedCallback())}removeFilterElement(){rs(this.agFilterToolPanelBody)}isExpanded(){return this.expanded}refreshFilter(e){if(!this.expanded)return;const t=this.underlyingFilter;t&&(e?"function"===typeof t.refreshVirtualList&&t.refreshVirtualList():t.afterGuiDetached?.())}onFilterOpened(e){"COLUMN_MENU"===e.source&&e.column===this.column&&this.expanded&&this.collapse()}},rj=class e extends Rs{constructor(e,t,i,s,n){super(),this.filterGroupComp=Is,this.columnGroup=e,this.childFilterComps=t,this.depth=s,this.expandedCallback=i,this.showingColumn=n}wireBeans(e){this.columnNameService=e.columnNameService}postConstruct(){this.setTemplate('<div class="ag-filter-toolpanel-group-wrapper">\n            <ag-group-component data-ref="filterGroupComp"></ag-group-component>\n        </div>',[nk],{filterGroupComp:{cssIdentifier:"filter-toolpanel",direction:"vertical"}}),this.setGroupTitle(),this.filterGroupComp.setAlignItems("stretch"),this.filterGroupComp.addCssClass(`ag-filter-toolpanel-group-level-${this.depth}`),this.filterGroupComp.getGui().style.setProperty("--ag-indentation-level",String(this.depth)),this.filterGroupComp.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth}-header`),this.childFilterComps.forEach((e=>{this.filterGroupComp.addItem(e),e.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth+1}-header`),e.getGui().style.setProperty("--ag-indentation-level",String(this.depth+1))})),this.refreshFilterClass(),this.addExpandCollapseListeners(),this.addFilterChangedListeners(),this.setupTooltip(),this.addInIcon("filter")}setupTooltip(){if(!this.showingColumn)return;let e;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>{const e=this.filterGroupComp.getGui().querySelector(".ag-group-title");return!e||e.scrollWidth>e.clientWidth}
2);const t=()=>{const t=this.columnGroup.getColDef().headerTooltip;this.setTooltip({newTooltipText:t,location:"filterToolPanelColumnGroup",shouldDisplayTooltip:e})};t(),this.addManagedEventListeners({newColumnsLoaded:t})}getTooltipParams(){const e=super.getTooltipParams();return e.location="filterToolPanelColumnGroup",e}addCssClassToTitleBar(e){this.filterGroupComp.addCssClassToTitleBar(e)}refreshFilters(t){this.childFilterComps.forEach((i=>{i instanceof e?i.refreshFilters(t):i.refreshFilter(t)}))}isColumnGroup(){return He(this.columnGroup)}isExpanded(){return this.filterGroupComp.isExpanded()}getChildren(){return this.childFilterComps}getFilterGroupName(){return this.filterGroupName?this.filterGroupName:""}getFilterGroupId(){return this.columnGroup.getId()}hideGroupItem(e,t){this.filterGroupComp.hideItem(e,t)}hideGroup(e){this.setDisplayed(!e)}addInIcon(e){const t=Ps(e,this.gos);t&&t.classList.add("ag-filter-toolpanel-group-instance-header-icon"),this.filterGroupComp.addTitleBarWidget(t)}forEachToolPanelFilterChild(e){this.childFilterComps.forEach((t=>{t instanceof nj&&e(t)}))}addExpandCollapseListeners(){const e=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild((e=>e.expand())),t=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild((e=>e.collapse()));this.addManagedListeners(this.filterGroupComp,{expanded:e,collapsed:t})}getColumns(){return He(this.columnGroup)?this.columnGroup.getLeafColumns():[this.columnGroup]}addFilterChangedListeners(){this.getColumns().forEach((e=>{this.addManagedListeners(e,{filterChanged:()=>this.refreshFilterClass()})})),He(this.columnGroup)||this.addManagedEventListeners({filterOpened:this.onFilterOpened.bind(this)})}refreshFilterClass(){const e=this.getColumns();this.filterGroupComp.addOrRemoveCssClass("ag-has-filter",e.some((e=>e.isFilterActive())))}onFilterOpened(e){"COLUMN_MENU"===e.source&&e.column===this.columnGroup&&this.isExpanded()&&this.collapse()}expand(){this.filterGroupComp.toggleGroupExpand(!0)}collapse(){this.filterGroupComp.toggleGroupExpand(!1)}setGroupTitle(){this.filterGroupName=He(this.columnGroup)?this.getColumnGroupName(this.columnGroup):this.getColumnName(this.columnGroup),this.filterGroupComp.setTitle(this.filterGroupName||"")}getColumnGroupName(e){return this.columnNameService.getDisplayNameForProvidedColumnGroup(null,e,"filterToolPanel")}getColumnName(e){return this.columnNameService.getDisplayNameForColumn(e,"filterToolPanel",!1)}destroyFilters(){this.childFilterComps=this.destroyBeans(this.childFilterComps),rs(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}},oj={selector:"AG-FILTERS-TOOL-PANEL-LIST",component:class extends Rs{constructor(){super('<div class="ag-filter-list-panel"></div>'),this.initialised=!1,this.hasLoadedInitialState=!1,this.isInitialState=!1,this.filterGroupComps=[],this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending=!1}wireBeans(e){this.toolPanelColDefService=e.toolPanelColDefService,this.columnModel=e.columnModel}init(e){this.initialised=!0;const t=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});nt(t,e),this.params=t,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:()=>this.onColumnsChanged()}),this.addManagedEventListeners({newColumnsLoaded:()=>this.onColumnsChanged(),toolPanelVisibleChanged:e=>{"filters"===e.key&&this.refreshFilters(e.visible)},dragStarted:()=>{this.suppressOnColumnsChanged=!0},dragStopped:()=>{this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending&&(this.onColumnsChangedPending=!1,this.onColumnsChanged())}}),this.columnModel.isReady()&&this.onColumnsChanged()}onColumnsChanged(){if(this.suppressOnColumnsChanged)return void(this.onColumnsChangedPending=!0);const e=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!e?this.syncFilterLayout():this.buildTreeFromProvidedColumnDefs(),this.refreshAriaLabel()}syncFilterLayout(){this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this)),this.refreshAriaLabel()}buildTreeFromProvidedColumnDefs(){const e=this.columnModel.getColDefColTree();this.recreateFilters(e)}setFiltersLayout(e){const t=this.toolPanelColDefService.createColumnTree(e);this.recreateFilters(t)}recreateFilters(e){const t=K(this.gos);this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const i=this.getExpansionState();this.destroyFilters(),this.filterGroupComps=this.recursivelyAddComps(e,0,i);const s=this.filterGroupComps.length;
2s&&(this.filterGroupComps.forEach((e=>this.appendChild(e))),this.setFirstAndLastVisible(0,s-1)),w(this.searchFilterText)&&this.searchFilters(this.searchFilterText),this.fireExpandedEvent(),this.getGui().contains(t)&&t.focus(),this.isInitialState=!1,this.refreshAriaLabel()}recursivelyAddComps(e,t,i){return Ae(e.map((e=>{if(He(e))return Ae(this.recursivelyAddFilterGroupComps(e,t,i));const s=e;if(!this.shouldDisplayFilter(s))return[];const n=new nj(0===t,(()=>this.onFilterExpanded()));if(this.createBean(n),n.setColumn(s),i.get(s.getId())&&n.expand(),t>0)return n;const r=this.createBean(new rj(s,[n],this.onGroupExpanded.bind(this),t,!0));return r.addCssClassToTitleBar("ag-filter-toolpanel-header"),i.get(r.getFilterGroupId())||r.collapse(),r})))}refreshAriaLabel(){const e=this.localeService.getLocaleTextFunc(),t=e("ariaFilterPanelList","Filter List"),i=e("filters","Filters"),s=this.getGui().querySelectorAll(".ag-filter-toolpanel-group-item:not(.ag-filter-toolpanel-group-wrapper, .ag-hidden)").length;di(this.getAriaElement(),`${t} ${s} ${i}`)}recursivelyAddFilterGroupComps(e,t,i){if(!this.filtersExistInChildren(e.getChildren()))return;const s=e.getColGroupDef();if(s&&s.suppressFiltersToolPanel)return[];const n=e.isPadding()?t:t+1,r=Ae(this.recursivelyAddComps(e.getChildren(),n,i));if(e.isPadding())return r;const o=new rj(e,r,this.onGroupExpanded.bind(this),t,!1);this.createBean(o),o.addCssClassToTitleBar("ag-filter-toolpanel-header");const a=i.get(o.getFilterGroupId());return(this.isInitialState&&!a||!1===a)&&o.collapse(),[o]}filtersExistInChildren(e){return e.some((e=>He(e)?this.filtersExistInChildren(e.getChildren()):this.shouldDisplayFilter(e)))}shouldDisplayFilter(e){const t=e.getColDef()&&e.getColDef().suppressFiltersToolPanel;return e.isFilterAllowed()&&!t}getExpansionState(){const e=new Map;if(this.isInitialState){const{expandedColIds:t,expandedGroupIds:i}=this.params.initialState;return t.forEach((t=>e.set(t,!0))),i.forEach((t=>e.set(t,!0))),e}const t=i=>{e.set(i.getFilterGroupId(),i.isExpanded()),i.getChildren().forEac
2h((i=>{i instanceof rj?t(i):e.set(i.getColumn().getId(),i.isExpanded())}))};return this.filterGroupComps.forEach(t),e}refresh(){}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}expandFilterGroups(e,t){const i=[],s=n=>{const r=n.getFilterGroupId();(!t||Ee(t,r))&&(e&&n.isColumnGroup()?n.expand():n.collapse(),i.push(r)),n.getChildren().forEach((e=>{e instanceof rj&&s(e)}))};if(this.filterGroupComps.forEach(s),this.onGroupExpanded(),t){const e=t.filter((e=>i.indexOf(e)<0));e.length>0&&h("unable to find groups for these supplied groupIds:",e)}}expandFilters(e,t){const i=[],s=n=>{if(n instanceof rj){let t=!1;return n.getChildren().forEach((i=>{s(i)&&(e?(n.expand(),t=!0):n.isColumnGroup()||n.collapse())})),t}const r=n.getColumn().getColId(),o=!t||Ee(t,r);return o&&(e?n.expand():n.collapse(),i.push(r)),o};if(this.filterGroupComps.forEach(s),this.onGroupExpanded(),t){const e=t.filter((e=>i.indexOf(e)<0));e.length>0&&h("unable to find columns for these supplied colIds:"+e)}}onGroupExpanded(){this.fireExpandedEvent()}onFilterExpanded(){this.dispatchLocalEvent({type:"filterExpanded"})}fireExpandedEvent(){let e=0,t=0;const i=s=>{s.isColumnGroup()&&(s.isExpanded()?e++:t++,s.getChildren().forEac
2h((e=>{e instanceof rj&&i(e)})))};let s;this.filterGroupComps.forEach(i),s=e>0&&t>0?2:t>0?1:0,this.dispatchLocalEvent({type:"groupExpanded",state:s})}performFilterSearch(e){this.searchFilterText=w(e)?e.toLowerCase():null,this.searchFilters(this.searchFilterText)}searchFilters(e){const t=t=>!w(e)||-1!==t.toLowerCase().indexOf(e),i=(e,s)=>{if(!(e instanceof rj))return t(e.getColumnFilterName()||"");const n=e.getChildren(),r=t(e.getFilterGroupName()),o=s||r;if(o){e.hideGroup(!1);for(let t=0;t<n.length;t++)i(n[t],o),e.hideGroupItem(!1,t);return!0}let a=!1;return n.forEach(((t,n)=>{const r=i(t,s);e.hideGroupItem(!r,n),r&&(a=!0)})),e.hideGroup(!a),a};let s,n;this.filterGroupComps.forEach(((e,t)=>{i(e,!1),void 0===s?e.containsCssClass("ag-hidden")||(s=t,n=t):e.containsCssClass("ag-hidden")||n===t||(n=t)})),this.setFirstAndLastVisible(s,n),this.refreshAriaLabel()}setFirstAndLastVisible(e,t){this.filterGroupComps.forEach(((i,s)=>{i.removeCssClass("ag-first-group-visible"),i.removeCssClass("ag-last-group-visible"),s===e&&i.addCssClass("ag-first-group-visible"),s===t&&i.addCssClass("ag-last-group-visible")}))}refreshFilters(e){this.filterGroupComps.forEach((t=>t.refreshFilters(e)))}getExpandedFiltersAndGroups(){const e=[],t=new Set,i=s=>
2{if(s instanceof rj){s.getChildren().forEach((e=>i(e)));const n=s.getFilterGroupId();s.isExpanded()&&!t.has(n)&&e.push(n)}else s.isExpanded()&&t.add(s.getColumn().getColId())};return this.filterGroupComps.forEach(i),{expandedGroupIds:e,expandedColIds:Array.from(t)}}destroyFilters(){this.filterGroupComps=this.destroyBeans(this.filterGroupComps),rs(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}}},aj={version:"32.3.3",moduleName:r.FiltersToolPanelModule,beans:[],userComponents:[{name:"agFiltersToolPanel",classImp:class extends Rs{constructor(){super('<div class="ag-filter-toolpanel">\n            <ag-filters-tool-panel-header data-ref="filtersToolPanelHeaderPanel"></ag-filters-tool-panel-header>\n            <ag-filters-tool-panel-list data-ref="filtersToolPanelListPanel"></ag-filters-tool-panel-list>\n         </div>',[sj,oj]),this.filtersToolPanelHeaderPanel=Is,this.filtersToolPanelListPanel=Is,this.initialised=!1,this.listenerDestroyFuncs=[]}init(e){this.initialised&&(this.listenerDestroyFuncs.forEach((e=>e())),this.listenerDestroyFuncs=[]),this.initialised=!0;const t=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});this.params={...t,...e},this.filtersToolPanelHeaderPanel.init(this.params),this.filtersToolPanelListPanel.init(this.params);const i=this.params.suppressExpandAll,s=this.params.suppressFilterSearch;i&&s&&this.filtersToolPanelHeaderPanel.setDisplayed(!1),this.listenerDestroyFuncs.push(...this.addManagedListeners(this.filtersToolPanelHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),searchChanged:this.onSearchChanged.bind(this)}),...this.addManagedListeners(this.filtersToolPanelListPanel,{filterExpanded:this.onFilterExpanded.bind(this),groupExpanded:this.onGroupExpanded.bind(this)}))}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}onExpandAll(){this.filtersToolPanelListPanel.expandFilterGroups(!0)}onCollapseAll(){this.filtersToolPanelListPanel.expandFilterGroups(!1)}onSearchChanged(e){this.filtersToolPanelListPanel.performFilterSearch(e.searchText)}setFilterLayout(e){this.filtersToolPanelListPanel.setFiltersLayout(e)}onFilterExpanded(){this.params.onStateUpdated()}onGroupExpanded(e){this.filtersToolPanelHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()}expandFilterGroups(e){this.filtersToolPanelListPanel.expandFilterGroups(!0,e)}collapseFilterGroups(e){this.filtersToolPanelListPanel.expandFilterGroups(!1,e)}expandFilters(e){this.filtersToolPanelListPanel.expandFilters(!0,e)}collapseFilters(e){this.filtersToolPanelListPanel.expandFilters(!1,e)}syncLayoutWithGrid(){this.filtersToolPanelListPanel.syncFilterLayout()}refresh(e){return this.init(e),!0}getState(){return this.filtersToolPanelListPanel.getExpandedFiltersAndGroups()}destroy(){super.destroy()}}}],dependantModules:[Uz,ek,no]},lj=class extends ze{constructor(){super(...arguments),this.loadRowDataVersion=0}wireBeans(e){this.focusService=e.focusService,this.rowPositionUtils=e.rowPositionUtils,this.environment=e.environment}init(e,t){this.params=t,this.comp=e;null!=t.pinned||(this.setAutoHeightClasses(),this.setupRefreshStrategy(),this.addThemeToDetailGrid(),this.createDetailGrid(),this.loadRowData(),this.addManagedEventListeners({fullWidthRowFocused:this.onFullWidthRowFocused.bind(this)}))}onFullWidthRowFocused(e){const t=this.params,i={rowIndex:t.node.rowIndex,rowPinned:t.node.rowPinned},s={rowIndex:e.rowIndex,rowPinned:e.rowPinned};this.rowPositionUtils.sameRow(i,s)&&this.focusService.focusInto(this.comp.getGui(),e.fromBelow)}setAutoHeightClasses(){const e=this.gos.get("detailRowAutoHeight"),t=e?"ag-details-row-auto-height":"ag-details-row-fixed-height",i=e?"ag-details-grid-auto-height":"ag-details-grid-fixed-height";this.comp.addOrRemoveCssClass(t,!0),this.comp.addOrRemoveDetailGridCssClass(i,!0)}setupRefreshStrategy(){const e=this.params.refreshStrategy;"everything"==e||"nothing"==e||"rows"==e?this.refreshStrategy=e:(null!=e&&h("invalid cellRendererParams.refreshStrategy = '"+e+"' supplied, defaulting to refreshStrategy = 'rows'."),this.refreshStrategy="rows")}addThemeToDetailGrid(){for(const e of this.environment.getThemeClasses())this.comp.addOrRemoveDetailGridCssClass(e,!0)}createDetailGrid(){if(b(this.params.detailGridOptions))return void h("could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions");const e={...this.params.detailGridOptions};this.gos.get("detailRowAutoHeight")&&(e.domLayout="autoHeight"),e.theme||(e.theme=this.gos.get("theme")),this.comp.setDetailGrid(e)}registerDetailWithMaster(e){const t=this.params.node.id,i=this.params.api,s={id:t,api:e},n=this.params.node;i.isDestroyed()||(i.addDetailGridInfo(t,s),n.detailGridInfo=s,this.addDestroyFunc((()=>{n.detailGridInfo===s&&(i.isDestroyed()||i.removeDetailGridInfo(t),n.detailGridInfo=null)})))}loadRowData(){this.loadRowDataVersion++;const e=this.loadRowDataVersion;if("serverSide"===this.params.detailGridOptions?.rowModelType){const e=this.params.node;return void e.detailGridInfo?.api?.refreshServerSide({purge:!0})}const t=this.params.getDetailRowData;if(!t)return void h("could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData");t({node:this.params.node,data:this.params.node.data,successCallback:t=>{this.loadRowDataVersion===e&&this.comp.setRowData(t)},context:this.gos.getGridCommonParams().context})}refresh(){const e=!0;switch(this.refreshStrategy){case"nothing":return e;case"everything":return false}return this.loadRowData(),e}},hj=class{constructor(e){this.parentWrapper=e}wrap(e,t,i,s){return this.parentWrapper.wrap(e,t,i,s)}};var cj="32.3.3",dj={version:cj,moduleName:`${r.MasterDetailModule}-core`,userComponents:[{name:"agGroupRowRenderer",classImp:Dk},{name:"agGroupCellRenderer",classImp:Dk},{name:"agDetailCellRenderer",classImp:class extends Rs{constructor(){super(...arguments),this.eDetailGrid=Is}wireBeans(e){this.context=e.context}init(e){this.params=e,this.selectAndSetTemplate();const t={addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveDetailGridCssClass:(e,t)=>this.eDetailGrid.classList.toggle(e,t),setDetailGrid:e=>this.setDetailGrid(e),setRowData:e=>this.setRowData(e),getGui:()=>this.eDetailGrid};this.ctrl=this.createManagedBean(new lj),this.ctrl.init(t,e)}refresh(){return this.ctrl&&this.ctrl.refresh()}destroy(){super.destroy()}selectAndSetTemplate(){if(this.params.pinned)return void this.setTemplate('<div class="ag-details-row"></div>');const e=()=>{this.setTemplate('<div class="ag-details-row" role="gridcell">\n                <div data-ref="eDetailGrid" class="ag-details-grid" role="presentation"></div>\n            </div>')};if(b(this.params.template))e();else if("string"===typeof this.params.template)this.setTemplate(this.params.template,[]);else if("function"===typeof this.params.template){const e=(0,this.params.template)(this.params);this.setTemplate(e,[])}else h("detailCellRendererParams.template should be function or string"),e();null==this.eDetailGrid&&h('Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.')}setDetailGrid(e){if(!this.eDetailGrid)return;const t=this.context.getBean("frameworkComponentWrapper"),i=new hj(t),s=this.getFrameworkOverrides(),n=function(e,t,i){if(!t)return c("No gridOptions provided to createGrid"),{};const s=(new Ic).create(e,t,(t=>{const i=new Sh(e);t.createBean(i)}),void 0,i);if(!Object.isFrozen(t)&&!i?.frameworkOverrides){const e="https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api";
2Object.defineProperty(t,"api",{get:()=>{c(`gridOptions.api is no longer supported. See ${e}.`)},configurable:!0})}return s}(this.eDetailGrid,e,{frameworkOverrides:s,providedBeanInstances:{frameworkComponentWrapper:i},modules:Ln.__getGridRegisteredModules(this.params.api.getGridId())});this.detailApi=n,this.ctrl.registerDetailWithMaster(n),this.addDestroyFunc((()=>{n?.destroy()}))}setRowData(e){this.detailApi&&this.detailApi.setGridOption("rowData",e)}}}],controllers:[{name:"detailCellRenderer",classImp:lj},{name:"groupCellRendererCtrl",classImp:Mk}],dependantModules:[ek]},uj={version:cj,moduleName:`${r.MasterDetailModule}-api`,beans:[class extends ze{constructor(){super(...arguments),this.beanName="detailGridApiService",this.detailGridInfoMap={}}addDetailGridInfo(e,t){this.detailGridInfoMap[e]=t}removeDetailGridInfo(e){delete this.detailGridInfoMap[e]}getDetailGridInfo(e){return this.detailGridInfoMap[e]}forEachDetailGridInfo(e){let t=0;et(this.detailGridInfoMap,((i,s)=>{w(s)&&(e(s,t),t++)}))}destroy(){this.detailGridInfoMap={},super.destroy()}}],apiFunctions:{addDetailGridInfo:function(e,t,i){e.detailGridApiService?.addDetailGridInfo(t,i)},removeDetailGridInfo:function(e,t){e.detailGridApiService?.removeDetailGridInfo(t)},getDetailGridInfo:function(e,t){return e.detailGridApiService?.getDetailGridInfo(t)},forEachDetailGridInfo:function(e,t){e.detailGridApiService?.forEachDetailGridInfo(t)}},dependantModules:[dj]},pj={version:cj,moduleName:r.MasterDetailModule,dependantModules:[dj,uj]},gj=class{constructor(e,t,i){this.gos=e,this.chartService=t,this.localeService=i}getMenuItem(){var e=this;const t=this.localeService.getLocaleTextFunc(),i=function(i,s,n,r){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return{name:t(i,s),action:()=>e.chartService.createPivotChart({chartType:n}),_key:r,_enterprise:o}};return{name:t("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:t("columnChart","Column"),subMenu:[i("groupedColumn","Grouped&lrm;","groupedColumn","pivotGroupedColumn"),i("stackedColumn","Stacked&lrm;","stackedColumn","pivotStackedColumn"),i("normalizedColumn","100% Stacked&lrm;","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:t("barChart","Bar"),subMenu:[i("groupedBar","Grouped&lrm;","groupedBar","pivotGroupedBar"),i("stackedBar","Stacked&lrm;","stackedBar","pivotStackedBar"),i("normalizedBar","100% Stacked&lrm;","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:t("pieChart","Pie"),subMenu:[i("pie","Pie&lrm;","pie","pivotPie"),i("donut","Donut&lrm;","donut","pivotDonut")]},i("line","Line&lrm;","line","pivotLineChart"),{_key:"pivotXYChart",name:t("xyChart","X Y (Scatter)"),subMenu:[i("scatter","Scatter&lrm;","scatter","pivotScatter"),i("bubble","Bubble&lrm;","bubble","pivotBubble")]},{_key:"pivotAreaChart",name:t("areaChart","Area"),subMenu:[i("area","Area&lrm;","area","pivotArea"),i("stackedArea","Stacked&lrm;","stackedArea","pivotStackedArea"),i("normalizedArea","100% Stacked&lrm;","normalizedArea","pivotNormalizedArea")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:t("statisticalChart","Statistical"),subMenu:[i("histogramChart","Histogram&lrm;","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:t("hierarchicalChart","Hierarchical"),subMenu:[i("treemapChart","Treemap&lrm;","treemap","pivotTreemap",!0),i("sunburstChart","Sunburst&lrm;","sunburst","pivotSunburst",!0)]},{_key:"pivotCombinationChart",name:t("combinationChart","Combination"),subMenu:[i("columnLineCombo","Column & Line&lrm;","columnLineCombo","pivotColumnLineCombo"),i("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","pivotAreaColumnCombo")]}],icon:Ps("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},polarGroup:null,specializedGroup:null}}},mj=class{constructor(e,t,i){this.gos=e,this.chartService=t,this.localeService=i}getMenuItem(){var e=this;const t=this.localeService.getLocaleTextFunc(),i=function(i,s,n,r){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return{name:t(i,s),action:()=>e.chartService.createChartFromCurrentRange(n),_key:r,_enterprise:o}};return{name:t("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:t("columnChart","Column"),subMenu:[i("groupedColumn","Grouped&lrm;","groupedColumn","rangeGroupedColumn"),i("stackedColumn","Stacked&lrm;","stackedColumn","rangeStackedColumn"),i("normalizedColumn","100% Stacked&lrm;","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:t("barChart","Bar"),subMenu:[i("groupedBar","Grouped&lrm;","groupedBar","rangeGroupedBar"),i("stackedBar","Stacked&lrm;","stackedBar","rangeStackedBar"),i("normalizedBar","100% Stacked&lrm;","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:t("pieChart","Pie"),subMenu:[i("pie","Pie&lrm;","pie","rangePie"),i("donut","Donut&lrm;","donut","rangeDonut")],_key:"rangePieChart"},i("line","Line&lrm;","line","rangeLineChart"),{name:t("xyChart","X Y (Scatter)"),subMenu:[i("scatter","Scatter&lrm;","scatter","rangeScatter"),i("bubble","Bubble&lrm;","bubble","rangeBubble")],_key:"rangeXYChart"},{name:t("areaChart","Area"),subMenu:[i("area","Area&lrm;","area","rangeArea"),i("stackedArea","Stacked&lrm;","stackedArea","rangeStackedArea"),i("normalizedArea","100% Stacked&lrm;","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:t("polarChart","Polar"),subMenu:[i("radarLine","Radar Line&lrm;","radarLine","rangeRadarLine"),i("radarArea","Radar Area&lrm;","radarArea","rangeRadarArea"),i("nightingale","Nightingale&lrm;","nightingale","rangeNightingale"),i("radialColumn","Radial Column&lrm;","radialColumn","rangeRadialColumn"),i("radialBar","Radial Bar&lrm;","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:t("statisticalChart","Statistical"),subMenu:[i("boxPlot","Box Plot&lrm;","boxPlot","rangeBoxPlot",!0),i("histogramChart","Histogram&lrm;","histogram","rangeHistogram",!1),i("rangeBar","Range Bar&lrm;","rangeBar","rangeRangeBar",!0),i("rangeArea","Range Area&lrm;","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:t("hierarchicalChart","Hierarchical"),subMenu:[i("treemap","Treemap&lrm;","treemap","rangeTreemap"),i("sunburst","Sunburst&lrm;","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:t("specializedChart","Specialized"),subMenu:[i("heatmap","Heatmap&lrm;","heatmap","rangeHeatmap"),i("waterfall","Waterfall&lrm;","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0},{name:t("combinationChart","Combination"),subMenu:[i("columnLineCombo","Column & Line&lrm;","columnLineCombo","rangeColumnLineCombo"),i("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:Ps("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},fj="separator",vj="ag-context-menu-open",yj=class extends Rs{constructor(e,t,i,s){super('<div class="ag-menu" role="presentation"></div>'),this.menuItems=e,this.column=t,this.node=i,this.value=s,this.menuList=null,this.focusedCell=null}wireBeans(e){this.focusService=e.focusService,this.menuItemMapper=e.menuItemMapper,this.cellPositionUtils=e.cellPositionUtils}postConstruct(){const e=this.createManagedBean(new yk(0,{column:this.column,node:this.node,value:this.value})),t=this.menuItemMapper.mapWithStockItems(this.menuItems,null,(()=>this.getGui()),"contextMenu");e.addMenuItems(t),this.appendChild(e),this.menuList=e,e.addEventListener("closeMenu",(e=>this.dispatchLocalEvent(e)))}afterGuiAttached(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())}restoreFocusedCell(){const e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){const{rowIndex:e,rowPinned:t,column:i}=this.focusedCell;$(this.gos)&&this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!this.focusService.isKeyboardMode()})}}destroy(){this.restoreFocusedCell(),super.destroy()}},Cj="filterMenuTab",Sj="generalMenuTab",wj="columnsMenuTab",bj=[Sj,Cj,wj],xj=class extends ze{constructor(e,t,i,s,n){super(),this.column=e,this.restoreFocusParams=t,this.initialSelection=i,this.restrictTo=s,this.sourceElement=n,this.tabFactories={},this.includeChecks={},this.tabFactories[Sj]=this.createMainPanel.bind(this),this.tabFactories[Cj]=this.createFilterPanel.bind(this),this.tabFactories[wj]=this.createColumnsPanel.bind(this),this.includeChecks[Sj]=()=>!0,this.includeChecks[Cj]=()=>
2!!e&&!!this.filterManager?.isFilterAllowed(e),this.includeChecks[wj]=()=>!0}wireBeans(e){this.filterManager=e.filterManager,this.columnChooserFactory=e.columnChooserFactory,this.columnMenuFactory=e.columnMenuFactory,this.menuUtils=e.menuUtils}postConstruct(){const e=this.getTabsToCreate().map((e=>this.createTab(e)));this.tabbedLayout=new xk({items:e,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout),this.addDestroyFunc((()=>this.destroyBean(this.tabbedLayout)))}getTabsToCreate(){return this.restrictTo?this.restrictTo:(this.column?.getColDef().menuTabs??bj).filter((e=>this.isValidMenuTabItem(e))).filter((e=>this.isNotSuppressed(e))).filter((e=>this.isModuleLoaded(e)))}isModuleLoaded(e){return e!==wj||this.gos.isModuleRegistered(r.ColumnsToolPanelModule)}isValidMenuTabItem(e){let t=!0,i=bj;return null!=this.restrictTo&&(t=this.restrictTo.indexOf(e)>-1,i=this.restrictTo),t=t&&bj.indexOf(e)>-1,t||h(`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of [${i}]`),t}isNotSuppressed(e){return this.includeChecks[e]()}createTab(e){return this.tabFactories[e]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(e){this.tabItemColumns&&e===wj?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===Cj?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===Sj?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()}onTabItemClicked(e){let t=null;switch(e.item){case this.tabItemColumns:t=wj;break;case this.tabItemFilter:t=Cj;break;case this.tabItemGeneral:t=Sj}t&&this.activateTab(t)}activateTab(e){const t={type:"tabSelected",key:e};this.dispatchLocalEvent(t)}createMainPanel(){return this.mainMenuList=this.columnMenuFactory.createMenu(this,this.columnMenuFactory.getMenuItems(this.column),this.column,(()=>this.sourceElement??this.getGui())),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.tabItemGeneral={title:Ps("menu",this.gos,this.column),titleLabel:Sj.replace("MenuTab",""),bodyPromise:an.resolve(this.mainMenuList.getGui()),name:Sj},this.tabItemGeneral}onHidePopup(e){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}createFilterPanel(){const e=this.column?this.createBean(new Zn(this.column,"COLUMN_MENU")):null;if(this.filterComp=e,!e?.hasFilter())throw new Error("AG Grid - Unable to instantiate filter");return this.tabItemFilter={title:Ps("filter",this.gos,this.column),titleLabel:Cj.replace("MenuTab",""),bodyPromise:an.resolve(e?.getGui()),afterAttachedCallback:t=>e.afterGuiAttached(t),afterDetachedCallback:()=>e.afterGuiDetached(),name:Cj},this.tabItemFilter}createColumnsPanel(){const e=document.createElement("div");e.classList.add("ag-menu-column-select-wrapper");const t=this.columnChooserFactory.createColumnSelectPanel(this,this.column).getGui();return t.classList.add("ag-menu-column-select"),e.appendChild(t),this.tabItemColumns={title:Ps("columns",this.gos,this.column),titleLabel:wj.replace("MenuTab",""),bodyPromise:an.resolve(e),name:wj},this.tabItemColumns}afterGuiAttached(e){const{container:t,hidePopup:i}=e;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:i}),i&&(this.hidePopupFunc=i,this.addDestroyFunc(i))}getGui(){return this.tabbedLayout.getGui()}destroy(){super.destroy(),this.destroyBean(this.filterComp)}},Mj=class extends Rs{constructor(e,t,i,s){super('\n            <div data-ref="eColumnMenu" role="presentation" class="ag-menu ag-column-menu"></div>\n        '),this.menuItems=e,this.column=t,this.restoreFocusParams=i,this.sourceElement=s,this.eColumnMenu=Is}wireBeans(e){this.columnMenuFactory=e.columnMenuFactory,this.menuUtils=e.menuUtils,this.focusService=e.focusService}postConstruct(){this.mainMenuList=this.columnMenuFactory.createMenu(this,this.menuItems,this.column,(()=>this.sourceElement??this.getGui())),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(e){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}afterGuiAttached(e){let{hidePopup:t}=e;t&&(this.hidePopupFunc=t,this.addDestroyFunc(t)),this.focusService.focusInto(this.mainMenuList.getGui())}};var Dj="32.3.3",Ij={version:Dj,moduleName:`${r.MenuModule}-core`,beans:[class extends ze{constructor(){super(...arguments),this.beanName="enterpriseMenuFactory"}wireBeans(e){this.popupService=e.popupService,this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.visibleColsService=e.visibleColsService,this.filterManager=e.filterManager,this.menuUtils=e.menuUtils,this.menuService=e.menuService,this.columnMenuFactory=e.columnMenuFactory}hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(e,t,i,s){const{column:n,columnGroup:r}=this.splitColumnOrGroup(e),o=s?"filterMenuTab":void 0;this.showMenu(n,r,(e=>{const s=e.getGui();this.popupService.positionPopupUnderMouseEvent({type:i,column:n,mouseEvent:t,ePopup:s}),o&&e.showTab?.(o),this.dispatchVisibleChangedEvent(!0,!1,n,r,o)}),i,o,void 0,t.target)}splitColumnOrGroup(e){const t=e&&ct(e);return{column:t?e:void 0,columnGroup:t?void 0:e}}showMenuAfterButtonClick(e,t,i,s){let n=-1,r="left";this.gos.get("enableRtl")&&(n=1,r="right");const o=s?"filterMenuTab":void 0,a=o?[o]:void 0,l=this.menuService.isLegacyMenuEnabled(),h=(l?9:4)*n,c=l?-23:4,{column:d,columnGroup:u}=this.splitColumnOrGroup(e);this.showMenu(d,u,(e=>{const s=e.getGui();this.popupService.positionPopupByComponent({type:i,column:d,eventSource:t,ePopup:s,alignSide:r,nudgeX:h,nudgeY:c,position:"under",keepWithinBounds:!0}),o&&e.showTab?.(o),this.dispatchVisibleChangedEvent(!0,!1,d,u,o)}),i,o,a,t)}showMenu(e,t,i,s,n,r,o){const a=this.getMenuParams(e,t,r,o);if(!a)return;const{menu:l,eMenuGui:h,anchorToElement:c,restoreFocusParams:d}=a,u=[];u.push((t=>{const i=l.getGui();this.destroyBean(l),e&&(e.setMenuVisible(!1,"contextMenu"),this.menuUtils.restoreFocusOnClose(d,i,t))}));const p=this.localeService.getLocaleTextFunc();
2if(this.popupService.addPopup({modal:!0,eChild:h,closeOnEsc:!0,closedCallback:i=>{u.forEach((e=>e(i))),this.dispatchVisibleChangedEvent(!1,!1,e,t,n)},afterGuiAttached:e=>l.afterGuiAttached(Object.assign({},{container:s},e)),positionCallback:n?()=>i(l):void 0,ariaLabel:p("ariaLabelColumnMenu","Column Menu")}),n||(l.showTabBasedOnPreviousSelection?.(),i(l)),this.menuService.isColumnMenuAnchoringEnabled()){const t=this.popupService.setPopupPositionRelatedToElement(h,c);t&&e&&this.addStopAnchoring(t,e,u)}l.addEventListener("tabSelected",(t=>{this.dispatchVisibleChangedEvent(!1,!0,e),this.lastSelectedTab=t.key,this.dispatchVisibleChangedEvent(!0,!0,e)})),e?.setMenuVisible(!0,"contextMenu"),this.activeMenu=l,l.addEventListener("destroyed",(()=>{this.activeMenu===l&&(this.activeMenu=null)}))}addStopAnchoring(e,t,i){e.then((e=>{t.addEventListener("leftChanged",e),t.addEventListener("visibleChanged",e),i.push((()=>{t.removeEventListener("leftChanged",e),t.removeEventListener("visibleChanged",e)}))}))}getMenuParams(e,t,i,s){const n={column:e,headerPosition:this.focusService.getFocusedHeader(),columnIndex:this.visibleColsService.getAllCols().indexOf(e),eventSource:s},r=this.createMenu(e,t,n,i,s);return r?{menu:r,eMenuGui:r.getGui(),anchorToElement:s||this.ctrlsService.getGridBodyCtrl().getGui(),restoreFocusParams:n}:void 0}createMenu(e,t,i,s,n){if(this.menuService.isLegacyMenuEnabled())return this.createBean(new xj(e,i,this.lastSelectedTab,s,n));{const s=this.columnMenuFactory.getMenuItems(e,t);return s.length?this.createBean(new Mj(s,e,i,n)):void 0}}dispatchVisibleChangedEvent(e,t,i,s,n){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:t,key:this.lastSelectedTab??n??(this.menuService.isLegacyMenuEnabled()?Sj:"columnMenu"),column:i??null,columnGroup:s??null})}isMenuEnabled(e){if(!this.menuService.isLegacyMenuEnabled())return!0;const t=!this.filterManager?.isFilterAllowed(e),i=e.getColDef().menuTabs??bj;return(t&&i.includes(Cj)?i.length-1:i.length)>0}showMenuAfterContextMenuEvent(e,t,i){this.menuUtils.onContextMenu(t,i,(t=>(this.showMenuAfterMouseEvent(e,t,"columnMenu"),!0)))}},class extends ze{constructor(){super(...arguments),this.beanName="contextMenuFactory"}wireBeans(e){this.popupService=e.popupService,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.menuUtils=e.menuUtils,this.rangeService=e.rangeService,this.focusService=e.focusService}hideActiveMenu(){this.destroyBean(this.activeMenu)}getMenuItems(e,t,i){const s=[];if(w(e)&&this.gos.isModuleRegistered(r.ClipboardModule)&&t&&(this.gos.get("suppressCutToClipboard")||s.push("cut"),s.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator")),this.gos.get("enableCharts")&&this.gos.isModuleRegistered(r.GridChartsModule)&&(this.columnModel.isPivotMode()&&s.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&s.push("chartRange")),w(e)){const e=!this.gos.isModuleRegistered(r.CsvExportModule),t=!this.gos.isModuleRegistered(r.ExcelExportModule),i=this.gos.get("suppressExcelExport")||t,n=this.gos.get("suppressCsvExport")||e;!Bi()&&(!i||!n)&&s.push("export")}const n=s.length?s:void 0,o=t?.getColDef().contextMenuItems;if(Array.isArray(o))return o;if("function"===typeof o)return o(this.gos.addGridCommonParams({column:t,node:e,value:i,defaultItems:n}));const a=this.gos.getCallback("getContextMenuItems");return a?a({column:t,node:e,value:i,defaultItems:n}):s}onContextMenu(e,t,i,s,n,r){this.menuUtils.onContextMenu(e,t,(e=>this.showMenu(i,s,n,e,r)))}showMenu(e,t,i,s,n){const r=this.getMenuItems(e,t,i),o=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===r||x(r))return!1;const a=new yj(r,t,e,i);this.createBean(a);const l=a.getGui();t||this.focusService.clearFocusedCell();const h={column:t,rowNode:e,type:"contextMenu",mouseEvent:s,ePopup:l,nudgeY:1},c=this.localeService.getLocaleTextFunc(),d=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:e=>{o.classList.remove(vj),this.destroyBean(a),this.dispatchVisibleChangedEvent(!1,void 0===e?"api":"ui")},click:s,positionCallback:()=>{const e=this.gos.get("enableRtl");this.popupService.positionPopupUnderMouseEvent({...h,nudgeX:e?-1*(l.offsetWidth+1):1})},anchorToElement:n,ariaLabel:c("ariaLabelContextMenu","Context Menu")});d&&(o.classList.add(vj),a.afterGuiAttached({container:"contextMenu",hidePopup:d.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=a,a.addEventListener("destroyed",(()=>{this.activeMenu===a&&(this.activeMenu=null)})),d&&a.addEventListener("closeMenu",(e=>d.hideFunc({mouseEvent:e.mouseEvent??void 0,keyboardEvent:e.keyboardEvent??void 0,forceHide:!0})));const u=s&&s instanceof MouseEvent&&"mousedown"===s.type;return this.dispatchVisibleChangedEvent(!0,u?"api":"ui"),!0}
2dispatchVisibleChangedEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ui";this.eventService.dispatchEvent({type:"contextMenuVisibleChanged",visible:e,source:t})}},class extends ze{constructor(){super(...arguments),this.beanName="menuItemMapper"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.columnApplyStateService=e.columnApplyStateService,this.funcColsService=e.funcColsService,this.focusService=e.focusService,this.rowPositionUtils=e.rowPositionUtils,this.chartMenuItemMapper=e.chartMenuItemMapper,this.menuService=e.menuService,this.sortController=e.sortController,this.columnAutosizeService=e.columnAutosizeService,this.expansionService=e.expansionService,this.clipboardService=e.clipboardService,this.aggFuncService=e.aggFuncService,this.csvCreator=e.csvCreator,this.excelCreator=e.excelCreator}mapWithStockItems(e,t,i,s){if(!e)return[];const n=[];return e.forEach((e=>{let r;if(r="string"===typeof e?this.getStockMenuItem(e,t,i,s):{...e},!r)return;const o=r,{subMenu:a}=o;a&&a instanceof Array&&(o.subMenu=this.mapWithStockItems(a,t,i,s)),null!=r&&n.push(r)})),n}getStockMenuItem(e,t,i,s){const n=this.localeService.getLocaleTextFunc(),o=this.gos.get("skipHeaderOnAutoSize");switch(e){case"pinSubMenu":return{name:n("pinColumn","Pin Column"),icon:Ps("menuPin",this.gos,null),subMenu:["clearPinned","pinLeft","pinRight"]};case"pinLeft":return{name:n("pinLeft","Pin Left"),action:()=>this.columnModel.setColsPinned([t],"left",s),checked:!!t&&t.isPinnedLeft()};case"pinRight":return{name:n("pinRight","Pin Right"),action:()=>this.columnModel.setColsPinned([t],"right",s),checked:!!t&&t.isPinnedRight()};case"clearPinned":return{name:n("noPin","No Pin"),action:()=>this.columnModel.setColsPinned([t],null,s),checked:!!t&&!t.isPinned()};case"valueAggSubMenu":return this.gos.assertModuleRegistered(r.RowGroupingModule,"Aggregation from Menu")&&(t?.isPrimary()||t?.getColDef().pivotValueColumn)?{name:n("valueAggregation","Value Aggregation"),icon:Ps("menuValue",this.gos,null),subMenu:this.createAggregationSubMenu(t,this.aggFuncService),disabled:this.gos.get("functionsReadOnly")}:null;case"autoSizeThis":return{name:n("autosizeThisColumn","Autosize This Column"),action:()=>this.columnAutosizeService.autoSizeColumn(t,s,o)};case"autoSizeAll":return{name:n("autosizeAllColumns","Autosize All Columns"),action:()=>this.columnAutosizeService.autoSizeAllColumns(s,o)};case"rowGroup":return{name:n("groupBy","Group by")+" "+At(this.columnNameService.getDisplayNameForColumn(t,"header")),disabled:this.gos.get("functionsReadOnly")||t?.isRowGroupActive()||!t?.getColDef().enableRowGroup,action:()=>this.funcColsService.addRowGroupColumns([t],s),icon:Ps("menuAddRowGroup",this.gos,null)};case"rowUnGroup":{const e=Ps("menuRemoveRowGroup",this.gos,null),i=t?.getColDef().showRowGroup,r=this.gos.get("groupLockGroupColumns");if(!0===i)return{name:n("ungroupAll","Un-Group All"),disabled:this.gos.get("functionsReadOnly")||-1===r||r>=this.funcColsService.getRowGroupColumns().length,action:()=>this.funcColsService.setRowGroupColumns(this.funcColsService.getRowGroupColumns().slice(0,r),s),icon:e};if("string"===typeof i){const t=this.columnModel.getColDefCol(i),r=null!=t?At(this.columnNameService.getDisplayNameForColumn(t,"header")):i;return{name:n("ungroupBy","Un-Group by")+" "+r,disabled:this.gos.get("functionsReadOnly")||null!=t&&this.columnModel.isColGroupLocked(t),action:()=>this.funcColsService.removeRowGroupColumns([i],s),icon:e}}return{name:n("ungroupBy","Un-Group by")+" "+At(this.columnNameService.getDisplayNameForColumn(t,"header")),disabled:this.gos.get("functionsReadOnly")||!t?.isRowGroupActive()||!t?.getColDef().enableRowGroup||this.columnModel.isColGroupLocked(t),action:()=>this.funcColsService.removeRowGroupColumns([t],s),icon:e}}case"resetColumns":return{name:n("resetColumns","Reset Columns"),action:()=>this.columnApplyStateService.resetColumnState(s)};case"expandAll":return{name:n("expandAll","Expand All Row Groups"),action:()=>this.expansionService.expandAll(!0)};case"contractAll":return{name:n("collapseAll","Collapse All Row Groups"),action:()=>this.expansionService.expandAll(!1)};case"copy":return this.gos.assertModuleRegistered(r.ClipboardModule,"Copy from Menu")?{name:n("copy","Copy"),shortcut:n("ctrlC","Ctrl+C"),icon:Ps("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard()}:null;case"copyWithHeaders":return this.gos.assertModuleRegistered(r.ClipboardModule,"Copy with Headers from Menu")?{name:n("copyWithHeaders","Copy with Headers"),icon:Ps("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0})}:null;case"copyWithGroupHeaders":return this.gos.assertModuleRegistered(r.ClipboardModule,"Copy with Group Headers from Menu")?{name:n("copyWithGroupHeaders","Copy with Group Headers"),icon:Ps("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}:null;case"cut":if(this.gos.assertModuleRegistered(r.ClipboardModule,"Cut from Menu")){const e=this.focusService.getFocusedCell(),t=e?this.rowPositionUtils.getRowNode(e):null,i=!!t&&e?.column.isCellEditable(t);return{name:n("cut","Cut"),shortcut:n("ctrlX","Ctrl+X"),icon:Ps("clipboardCut",this.gos,null),disabled:!i||this.gos.get("suppressCutToClipboard"),action:()=>this.clipboardService.cutToClipboard(void 0,"contextMenu")}}return null;case"paste":return this.gos.assertModuleRegistered(r.ClipboardModule,"Paste from Clipboard")?{name:n("paste","Paste"),shortcut:n("ctrlV","Ctrl+V"),disabled:!0,icon:Ps("clipboardPaste",this.gos,null),action:()=>this.clipboardService.pasteFromClipboard()}:null;case"export":{const e=[],t=this.gos.isModuleRegistered(r.CsvExportModule),i=this.gos.isModuleRegistered(r.ExcelExportModule);return!this.gos.get("suppressCsvExport")&&t&&e.push("csvExport"),!this.gos.get("suppressExcelExport")&&i&&e.push("excelExport"),{name:n("export","Export"),subMenu:e,icon:Ps("save",this.gos,null)}}case"csvExport":return{name:n("csvExport","CSV Export"),icon:Ps("csvExport",this.gos,null),action:()=>this.csvCreator?.exportDataAsCsv()};case"excelExport":return{name:n("excelExport","Excel Export"),icon:Ps("excelExport",this.gos,null),action:()=>this.excelCreator?.exportDataAsExcel()};case"separator":return"separator";case"pivotChart":case"chartRange":return this.chartMenuItemMapper.getChartItems(e)??null;case"columnFilter":return t?{name:n("columnFilter","Column Filter"),icon:Ps("filter",this.gos,null),action:()=>this.menuService.showFilterMenu({column:t,buttonElement:i(),containerType:"columnFilter",positionBy:"button"})}:null;case"columnChooser":return this.gos.isModuleRegistered(r.ColumnsToolPanelModule)?{name:n("columnChooser","Choose Columns"),icon:Ps("columns",this.gos,null),action:()=>this.menuService.showColumnChooser({column:t,eventSource:i()})}:null;case"sortAscending":return{name:n("sortAscending","Sort Ascending"),icon:Ps("sortAscending",this.gos,null),action:()=>this.sortController.setSortForColumn(t,"asc",!1,s)};case"sortDescending":return{name:n("sortDescending","Sort Descending"),icon:Ps("sortDescending",this.gos,null),action:()=>this.sortController.setSortForColumn(t,"desc",!1,s)};case"sortUnSort":return{name:n("sortUnSort","Clear Sort"),icon:Ps("sortUnSort",this.gos,null),action:()=>this.sortController.setSortForColumn(t,null,!1,s)};default:return h(`unknown menu item type ${e}`),null}}createAggregationSubMenu(e,t){const i=this.localeService.getLocaleTextFunc();let s;if(e.isPrimary())s=e;else{const t=e.getColDef().pivotValueColumn;s=w(t)?t:void 0}const n=[];if(s){const e=s.isValueActive(),r=t.getFuncNames(s);n.push({name:i("noAggregation","None"),action:()=>{this.funcColsService.removeValueColumns([s],"contextMenu"),this.funcColsService.setColumnAggFu
2nc(s,void 0,"contextMenu")},checked:!e}),r.forEach((r=>{n.push({name:i(r,t.getDefaultFuncLabel(r)),action:()=>{this.funcColsService.setColumnAggFunc(s,r,"contextMenu"),this.funcColsService.addValueColumns([s],"contextMenu")},checked:e&&s.getAggFunc()===r})}))}return n}},class e extends ze{constructor(){super(...arguments),this.beanName="chartMenuItemMapper"}wireBeans(e){this.chartService=e.chartService}getChartItems(t){if(!this.chartService)return void this.gos.assertModuleRegistered(r.GridChartsModule,`the Context Menu key "${t}"`);const i="pivotChart"===t?new gj(this.gos,this.chartService,this.localeService):new mj(this.gos,this.chartService,this.localeService),s=this.chartService.isEnterprise();let n=i.getMenuItem();if(n&&n.subMenu&&!s){const e=t=>({...t,subMenu:t.subMenu?.filter((e=>!e._enterprise)).map((t=>e(t)))});n=e(n)}const o=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;return o&&(n=e.filterAndOrderChartMenu(n,o,i.getConfigLookup())),this.cleanInternals(n)}cleanInternals(e){if(!e)return e;const t=e=>(delete e?._key,delete e?._enterprise,e?.subMenu?.forEach((e=>t(e))),e);return t(e)}static buildLookup(e){const t={},i=e=>{t[e._key]=e,e.subMenu&&e.subMenu.forEach((e=>i(e)))};return i(e),t}static filterAndOrderChartMenu(e,t,i){const s=this.buildLookup(e),n={...e,subMenu:[]};if(Object.entries(t).forEach((e=>{let[t,r]=e;const o=i[t];if(null===o)return;if(void 0==o)return void h(`invalid chartGroupsDef config '${t}'`);const a=s[o._key];if(a)if(a.subMenu){const e=r.map((e=>{const i=o[e];if(void 0!=i)return s[i];h(`invalid chartGroupsDef config '${t}.${e}'`)})).filter((e=>void 0!==e));e.length>0&&(a.subMenu=e,n.subMenu?.push(a))}else n.subMenu?.push(a)})),0!=n.subMenu?.length)return n}},class extends ze{constructor(){super(...arguments),this.beanName="columnChooserFactory"}wireBeans(e){this.focusService=e.focusService,this.menuUtils=e.menuUtils,this.visibleColsService=e.visibleColsService}createColumnSelectPanel(e,t,i,s){const n=e.createManagedBean(new Jz),r=s??t?.getColDef().columnChooserParams??t?.getColDef().columnsMenuParams??{},{contractColumnSelection:o,suppressColumnExpandAll:a,suppressColumnFilter:l,suppressColumnSelectAll:h,suppressSyncLayoutWithGrid:c,columnLayout:d}=r;return n.init(!!i,this.gos.addGridCommonParams({suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!o,suppressColumnExpandAll:!!a,suppressColumnFilter:!!l,suppressColumnSelectAll:!!h,suppressSyncLayoutWithGrid:!!d||!!c,onStateUpdated:()=>{}}),"columnMenu"),d&&n.setColumnLayout(d),n}showColumnChooser(e){let{column:t,chooserParams:i,eventSource:s}=e;this.hideActiveColumnChooser();const n=this.createColumnSelectPanel(this,t,!0,i),r=this.localeService.getLocaleTextFunc(),o=this.visibleColsService.getAllCols().indexOf(t),a=t?this.focusService.getFocusedHeader():null;this.activeColumnChooserDialog=this.createBean(new vk({title:r("chooseColumns","Choose Columns"),component:n,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{this.focusService.findNextFocusableElement(n.getGui())?.focus({preventScroll:!0}),this.dispatchVisibleChangedEvent(!0,t)},closedCallback:e=>{const i=this.activeColumnChooser.getGui();this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,t),t&&this.menuUtils.restoreFocusOnClose({column:t,headerPosition:a,columnIndex:o,eventSource:s},i,e,!0)},postProcessPopupParams:{type:"columnChooser",column:t,eventSource:s}})),this.activeColumnChooser=n}hideActiveColumnChooser(){this.activeColumnChooserDialog&&this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(e,t){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:"columnChooser",column:t??null})}},class extends ze{constructor(){super(...arguments),this.beanName="columnMenuFactory"}wireBeans(e){this.menuItemMapper=e.menuItemMapper,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.menuService=e.menuService}createMenu(e,t,i,s){const n=e.createManagedBean(new yk(0,{column:i??null,node:null,value:null})),r=this.menuItemMapper.mapWithStockItems(t,i??null,s,"columnMenu");return n.addMenuItems(r),n}getMenuItems(e,t){const i=this.getDefaultMenuOptions(e);let s;const n=e?.getColDef().mainMenuItems;if(Array.isArray(n))s=n;else if("function"===typeof n)s=n(this.gos.addGridCommonParams({column:e,defaultItems:i}));else{const t=this.gos.getCallback("getMainMenuItems");s=t&&e?t({column:e,defaultItems:i}):i}return function(e,t){if(e)for(let i=e.length-2;i>=0;i--){const s=e[i]===t,n=e[i+1]===t;s&&n&&e.splice(i+1,1)}}(s,fj),s}getDefaultMenuOptions(e){const t=[],i=this.menuService.isLegacyMenuEnabled();
2if(!e)return i||t.push("columnChooser"),t.push("resetColumns"),t;const s=!e.getColDef().lockPinned,n=this.funcColsService.getRowGroupColumns().length,r=n>0,o=e.isAllowValue(),a=e.isAllowRowGroup(),l=e.isPrimary(),h=this.columnModel.isPivotMode(),c=L(this.gos),d=this.gos.get("treeData"),u=l&&r&&o||!l;if(!i&&e.isSortable()){const i=e.getSort();"asc"!==i&&t.push("sortAscending"),"desc"!==i&&t.push("sortDescending"),i&&t.push("sortUnSort"),t.push(fj)}this.menuService.isFilterMenuItemEnabled(e)&&(t.push("columnFilter"),t.push(fj)),s&&t.push("pinSubMenu"),u&&t.push("valueAggSubMenu"),(s||u)&&t.push(fj),t.push("autoSizeThis"),t.push("autoSizeAll"),t.push(fj);if(e.getColDef().showRowGroup)t.push("rowUnGroup");else if(a&&e.isPrimary())if(e.isRowGroupActive()){this.columnModel.isColGroupLocked(e)||t.push("rowUnGroup")}else t.push("rowGroup");t.push(fj),i||t.push("columnChooser"),t.push("resetColumns");return c&&(d||n>(h?1:0))&&(t.push("expandAll"),t.push("contractAll")),t}},class extends ze{constructor(){super(...arguments),this.beanName="menuUtils"}wireBeans(e){this.focusService=e.focusService,this.headerNavigationService=e.headerNavigationService,this.visibleColsService=e.visibleColsService}restoreFocusOnClose(e,t,i,s){const{eventSource:n}=e,r=i instanceof KeyboardEvent;if(!s&&!r||!n)return;const o=K(this.gos);(t.contains(o)||$(this.gos))&&this.focusHeaderCell(e)}closePopupAndRestoreFocusOnSelect(e,t,i){let s;i&&i.keyboardEvent&&(s=i.keyboardEvent),e(s&&{keyboardEvent:s});const n=this.focusService.getFocusedCell();if($(this.gos))if(n){const{rowIndex:e,rowPinned:t,column:i}=n;this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(t)}onContextMenu(e,t,i){if(!this.gos.get("allowContextMenuWithControlKey")&&e&&(e.ctrlKey||e.metaKey))return;if(e&&this.blockMiddleClickScrollsIfNeeded(e),this.gos.get("suppressContextMenu"))return;if(i(e??t.touches[0])){const i=e??t;i&&i.cancelable&&i.preventDefault()}}async focusHeaderCell(e){const{column:t,columnIndex:i,headerPosition:s,eventSource:n}=e,r=await this.visibleColsService.getAllCols().some((e=>e===t));if(!t||t.isAlive())if(r&&n&&ls(n)){const e=this.focusService.findTabbableParent(n);e&&(t&&this.headerNavigationService.scrollToColumn(t),e.focus())}else if(s&&-1!==i){const e=this.visibleColsService.getAllCols(),t=e[i]||Se(e);t&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:s.headerRowIndex,column:t}})}}blockMiddleClickScrollsIfNeeded(e){this.gos.get("suppressMiddleClickScrolls")&&2===e.which&&e.preventDefault()}}],dependantModules:[ek],userComponents:[{name:"agMenuItem",classImp:JF}]},Rj={version:Dj,moduleName:`${r.MenuModule}-api`,apiFunctions:{showContextMenu:function(e,t){const{rowNode:i,column:s,value:n,x:r,y:o}=t||{};let{x:a,y:l}=e.menuService.getContextMenuPosition(i,s);null!=r&&(a=r),null!=o&&(l=o),e.menuService.showContextMenu({mouseEvent:new MouseEvent("mousedown",{clientX:a,clientY:l}),rowNode:i,column:s,value:n})},showColumnChooser:function(e,t){e.menuService.showColumnChooser({chooserParams:t})},hideColumnChooser:function(e){e.menuService.hideColumnChooser()}},dependantModules:[Ij,Rh]},Ej={version:Dj,moduleName:r.MenuModule,dependantModules:[Ij,Rj]},Aj=class e extends Nl{constructor(){super('<div class="ag-multi-filter ag-menu-list-compact"></div>'),this.filterDefs=[],this.filters=[],this.guiDestroyFuncs=[],this.filterGuis=[],this.activeFilterIndices=[],this.lastActivatedMenuItem=null,this.afterFiltersReadyFuncs=[]}wireBeans(e){this.filterManager=e.filterManager,this.userComponentFactory=e.userComponentFactory,this.focusService=e.focusService}postConstruct(){this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e)})}static getFilterDefs(e){const{filters:t}=e;return t&&t.length>0?t:[{filter:"agTextColumnFilter"},{filter:"agSetColumnFilter"}]}init(t){this.params=t,this.filterDefs=e.getFilterDefs(t);const{column:i,filterChangedCallback:s}=t;this.column=i,this.filterChangedCallback=s;const n=[];return this.filterDefs.forEach(((e,t)=>{const i=this.createFilter(e,t);null!=i&&n.push(i)})),new an((e=>{an.all(n).then((t=>{this.filters=t,this.refreshGui("columnMenu").then((()=>{e()}))}))})).then((()=>{this.afterFiltersReadyFuncs.forEach((e=>e())),this.afterFiltersReadyFuncs.length=0}))}refreshGui(e){return e===this.lastOpenedInContainer?an.resolve():(this.tabGuardFeature.removeAllChildrenExceptTabGuards(),this.destroyChildren(),an.all(this.filters.map(((t,i)=>{const s=this.filterDefs[i],n=this.getFilterTitle(t,s);let r;if("subMenu"===s.display&&"toolPanel"!==e)r=this.insertFilterMenu(t,n).then((e=>e.getGui()));else if("subMenu"===s.display||"accordion"===s.display){const e=this.insertFilterGroup(t,n);r=an.resolve(e.getGui())}else r=an.resolve(t.getGui());return r}))).then((t=>{t.forEach(((e,t)=>{t>0&&this.appendChild(hs('<div class="ag-filter-separator"></div>')),this.appendChild(e)})),this.filterGuis=t,this.lastOpenedInContainer=e})))}getFilterTitle(e,t){return null!=t.title?t.title:e instanceof rr?e.getFilterTitle():"Filter"}destroyChildren(){this.guiDestroyFuncs.forEach((e=>e())),this.guiDestroyFuncs.length=0,this.filterGuis.length=0}insertFilterMenu(e,t){const i=this.createBean(new Sk);
2return i.init({menuItemDef:{name:t,subMenu:[],cssClasses:["ag-multi-filter-menu-item"],menuItem:JF,menuItemParams:{cssClassPrefix:"ag-compact-menu-option",isCompact:!0}},level:0,isAnotherSubMenuOpen:()=>!1,childComponent:e,contextParams:{column:null,node:null,value:null}}).then((()=>{i.setParentComponent(this),this.guiDestroyFuncs.push((()=>this.destroyBean(i))),this.addManagedListeners(i,{menuItemActivated:e=>{this.lastActivatedMenuItem&&this.lastActivatedMenuItem!==e.menuItem&&this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=e.menuItem}});const e=i.getGui();return i.addManagedElementListeners(e,{keydown:e=>{const{key:t}=e;switch(t){case js.UP:case js.RIGHT:case js.DOWN:case js.LEFT:e.preventDefault(),t===js.RIGHT&&i.openSubMenu(!0)}},focusin:()=>i.activate(),focusout:()=>{i.isSubMenuOpen()||i.isSubMenuOpening()||i.deactivate()}}),i}))}insertFilterGroup(e,t){const i=this.createBean(new tk({title:t,cssIdentifier:"multi-filter"}));return this.guiDestroyFuncs.push((()=>this.destroyBean(i))),i.addItem(e.getGui()),i.toggleGroupExpand(!1),e.afterGuiAttached&&i.addManagedListeners(i,{expanded:()=>e.afterGuiAttached({container:this.lastOpenedInContainer,suppressFocus:!0,hidePopup:this.hidePopup})}),i}isFilterActive(){return this.filters.some((e=>e.isFilterActive()))}getLastActiveFilterIndex(){return this.activeFilterIndices.length>0?this.activeFilterIndices[this.activeFilterIndices.length-1]:null}doesFilterPass(e,t){let i=!0;return this.filters.forEach((s=>{i&&s!==t&&s.isFilterActive()&&(i=s.doesFilterPass(e))})),i}getFilterType(){return"multi"}getModelFromUi(){return{filterType:this.getFilterType(),filterModels:this.filters.map((e=>{const t=e;return"function"===typeof t.getModelFromUi?t.getModelFromUi():null}))}}getModel(){if(!this.isFilterActive())return null;return{filterType:this.getFilterType(),filterModels:this.filters.map((e=>e.isFilterActive()?e.getModel():null))}}setModel(e){const t=(e,t)=>new an((i=>{const s=e.setModel(t);s?s.then((()=>i())):i()}));let i=[];return null==e?i=this.filters.map(((e,i)=>t(e,null).then((()=>{this.updateActiveList(i)})))):this.filters.forEach(((s,n)=>{const r=e.filterModels.length>n?e.filterModels[n]:null,o=t(s,r).then((()=>{this.updateActiveList(n)}));i.push(o)})),an.all(i).then((()=>{}))}applyModel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"api",t=!1;return this.filters.forEach((i=>{i instanceof rr&&(t=i.applyModel(e)||t)})),t}getChildFilterInstance(e){return this.filters[e]}afterGuiAttached(e){let t;e?(this.hidePopup=e.hidePopup,t=this.refreshGui(e.container)):(this.hidePopup=void 0,t=an.resolve());const i=e?.suppressFocus;t.then((()=>{const{filterDefs:t}=this;let s=!!i;t&&Pe(t,((t,n)=>{const r=0===n,o=t.display&&"inline"!==t.display,a=i||!r||o,l={...e??{},suppressFocus:a},h=this.filters?.[n];if(h&&(this.executeFunctionIfExistsOnFilter(h,"afterGuiAttached",l),r&&!a&&(s=!0)),!i&&r&&o){const e=this.filterGuis[n];e&&(this.focusService.focusInto(e)||e.focus(),s=!0)}}));const n=K(this.gos);s||!$(this.gos)&&!this.getGui().contains(n)||this.forceFocusOutOfContainer(!0)}))}afterGuiDetached(){this.executeFunctionIfExists("afterGuiDetached")}onAnyFilterChanged(){this.executeFunctionIfExists("onAnyFilterChanged")}onNewRowsLoaded(){this.executeFunctionIfExists("onNewRowsLoaded")}destroy(){this.filters.forEach((e=>this.destroyBean(e))),this.filters.length=0,this.destroyChildren(),this.hidePopup=void 0,super.destroy()}executeFunctionIfExists(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];Pe(this.filters,(t=>{this.executeFunctionIfExistsOnFilter(t,e,i)}))}executeFunctionIfExistsOnFilter(e,t){const i=e[t];if("function"===typeof i){for(var s=arguments.length,n=new Array(s>2?s-2:0),r=2;r<s;r++)n[r-2]=arguments[r];i.apply(e,n)}}createFilter(e,t){const{filterModifiedCallback:i,doesRowPassOtherFilter:s}=this.params;let n;const r={...this.filterManager.createFilterParams(this.column,this.column.getColDef()),filterModifiedCallback:i,filterChangedCallback:e=>{this.executeWhenAllFiltersReady((()=>this.filterChanged(t,e)))},doesRowPassOtherFilter:e=>s(e)&&this.doesFilterPass({node:e,data:e.data},n)},o=this.userComponentFactory.getFilterDetails(e,r,"agTextColumnFilter");if(!o)return null;const a=o.newAgStackInstance();return a&&a.then((e=>n=e)),a}executeWhenAllFiltersReady(e){this.filters&&this.filters.length>0?e():this.afterFiltersReadyFuncs.push(e)}updateActiveList(e){const t=this.filters[e];Me(this.activeFilterIndices,e),t.isFilterActive()&&this.activeFilterIndices.push(e)}filterChanged(e,t){this.updateActiveList(e),this.filterChangedCallback(t);const i=this.filters[e];
2this.filters.forEach((e=>{e!==i&&"function"===typeof e.onAnyFilterChanged&&e.onAnyFilterChanged()}))}onFocusIn(e){null==this.lastActivatedMenuItem||this.lastActivatedMenuItem.getGui().contains(e.target)||(this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=null)}getModelAsString(e){if(!this.filters||!e?.filterModels?.length)return"";const t=this.getLastActiveFilterIndex()??0,i=this.filters[t];return i.getModelAsString?.(e.filterModels[t])??""}},Tj="32.3.3",Pj={version:Tj,moduleName:`${r.MultiFilterModule}-core`,userComponents:[{name:"agMultiColumnFilter",classImp:Aj},{name:"agMenuItem",classImp:JF}],dependantModules:[ek,no]},Lj={version:Tj,moduleName:"@ag-grid-enterprise/multi-floating-filter",userComponents:[{name:"agMultiColumnFloatingFilter",classImp:class extends Rs{constructor(){super('<div class="ag-multi-floating-filter ag-floating-filter-input"></div>'),this.floatingFilters=[],this.compDetailsList=[]}wireBeans(e){this.userComponentFactory=e.userComponentFactory,this.filterManager=e.filterManager}init(e){this.params=e;const{compDetailsList:t}=this.getCompDetailsList(e);return this.setParams(t)}setParams(e){const t=[];return e.forEach((e=>{const i=e?.newAgStackInstance();null!=i&&(this.compDetailsList.push(e),t.push(i))})),an.all(t).then((e=>{e.forEach(((e,t)=>{this.floatingFilters.push(e);const i=e.getGui();this.appendChild(i),t>0&&Ki(i,!1)}))}))}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e;const{compDetailsList:t,floatingFilterParamsList:i}=this.getCompDetailsList(e);t.length===this.compDetailsList.length&&t.every(((e,t)=>!this.filterManager?.areFilterCompsDifferent(this.compDetailsList[t],e)))?i.forEach(((e,t)=>{const i=this.floatingFilters[t];let s=!1;if(i.refresh){null!==i.refresh(e)&&(s=!0)}s||i.onParamsUpdated?.(e)})):(rs(this.getGui()),this.destroyBeans(this.floatingFilters),this.floatingFilters=[],this.compDetailsList=[],this.setParams(t))}getCompDetailsList(e){const t=[],i=[],s=e.filterParams;return Aj.getFilterDefs(s).forEach(((s,n)=>{const r={...e,parentFilterInstance:e=>{this.parentMultiFilterInstance((t=>{const i=t.getChildFilterInstance(n);null!=i&&e(i)}))}};nt(r.filterParams,s.filterParams);const o=this.getCompDetails(s,r);o&&(t.push(o),i.push(r))})),{compDetailsList:t,floatingFilterParamsList:i}}onParentModelChanged(e,t){t&&t.afterFloatingFilter||this.parentMultiFilterInstance((i=>{if(null==e)this.floatingFilters.forEach(((e,i)=>{e.onParentModelChanged(null,t),Ki(e.getGui(),0===i)}));else{const s=i.getLastActiveFilterIndex();this.floatingFilters.forEach(((i,n)=>{const r=e.filterModels.length>n?e.filterModels[n]:null;i.onParentModelChanged(r,t);const o=null==s?0===n:n===s;Ki(i.getGui(),o)}))}}))}destroy(){this.destroyBeans(this.floatingFilters),this.floatingFilters.length=0,super.destroy()}getCompDetails(e,t){const i=Zr(this.frameworkOverrides,e,(()=>this.filterManager.getDefaultFloatingFilter(this.params.column)))??"agReadOnlyFloatingFilter";return this.userComponentFactory.getFloatingFilterCompDetails(e,t,i)}parentMultiFilterInstance(e){this.params.parentFilterInstance((t=>{if(!(t instanceof Aj))throw new Error("AG Grid - MultiFloatingFilterComp expects MultiFilter as its parent");e(t)}))}}}],dependantModules:[Pj,lo]},Fj={version:Tj,moduleName:r.MultiFilterModule,dependantModules:[Pj,Lj]},kj=class extends tn{constructor(){super('<div class="ag-cell-edit-wrapper"></div>')}init(e){this.params=e;const{cellStartedEdit:t,values:i}=e;b(i)&&h("agRichSelectCellEditor requires cellEditorParams.values to be set");const{params:s,valuesPromise:n}=this.buildRichSelectParams();this.richSelect=this.createManagedBean(new uk(s)),this.richSelect.addCssClass("ag-cell-editor"),this.appendChild(this.richSelect),n&&n.then((e=>{this.richSelect.setValueList({valueList:e,refresh:!0});const t=this.getSearchStringCallback(e);t&&this.richSelect.setSearchStringCreator(t)})),this.addManagedListeners(this.richSelect,{fieldPickerValueSelected:this.onEditorPickerValueSelected.bind(this)}),this.focusAfterAttached=t}onEditorPickerValueSelected(e){setTimeout((()=>this.params.stopEditing(!e.fromEnterKey)))}buildRichSelectParams(){const{cellRenderer:e,cellHeight:t,value:i,values:s,formatValue:n,searchDebounceDelay:r,valueListGap:o,valueListMaxHeight:a,valueListMaxWidth:l,allowTyping:c,filterList:d,searchType:u,highlightMatch:p,valuePlaceholder:g,eventKe
2y:m,multiSelect:f,suppressDeselectAll:v,suppressMultiSelectPillRenderer:y}=this.params,C={value:i,cellRenderer:e,cellRowHeight:t,searchDebounceDelay:r,valueFormatter:n,pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"virtual-list",pickerGap:o,allowTyping:c,filterList:d,searchType:u,highlightMatch:p,maxPickerHeight:a,maxPickerWidth:l,placeholder:g,initialInputValue:1===m?.length?m:void 0,multiSelect:f,suppressDeselectAll:v,suppressMultiSelectPillRenderer:y};let S,w;return S="function"===typeof s?s(this.params):s??[],Array.isArray(S)?(C.valueList=S,C.searchStringCreator=this.getSearchStringCallback(S)):w=S,f&&c&&(this.params.allowTyping=C.allowTyping=!1,h("agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.")),{params:C,valuesPromise:w}}getSearchStringCallback(e){const{colDef:t}=this.params;if("object"===typeof e[0]&&t.keyCreator)return e=>e.map((e=>{const i=this.gos.addGridCommonParams({value:e,colDef:this.params.colDef,column:this.params.column,node:this.params.node,data:this.params.data});return t.keyCreator(i)}))}afterGuiAttached(){const{focusAfterAttached:e,params:t}=this;setTimeout((()=>{if(!this.isAlive())return;if(e){const e=this.richSelect.getFocusableElement();e.focus();const{allowTyping:t,eventKey:i}=this.params;!t||i&&1===i.length||e.select()}this.richSelect.showPicker();const{eventKey:i}=t;i&&1===i?.length&&this.richSelect.searchTextFromString(i)}))}focusIn(){this.richSelect.getFocusableElement().focus()}getValue(){return this.richSelect.getValue()}isPopup(){return!1}},Nj={version:"32.3.3",moduleName:r.RichSelectModule,beans:[],userComponents:[{name:"agRichSelect",classImp:kj},{name:"agRichSelectCellEditor",classImp:kj}],dependantModules:[ek,ml]},Oj=class extends Il{constructor(e,t,i){super(0),this.nodeIdSequence=new ws,this.info={},this.ssrmParams=e,this.parentRowNode=i,this.level=i.level+1,this.groupLevel=e.rowGroupCols?this.level<e.rowGroupCols.length:void 0,this.leafGroup=!!e.rowGroupCols&&this.level===e.rowGroupCols.length-1}wireBeans(e){this.storeUtils=e.ssrmStoreUtils,this.blockUtils=e.ssrmBlockUtils,this.funcColsService=e.funcColsService,this.rowNodeBlockLoader=e.rowNodeBlockLoader,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController,this.selectionService=e.selectionService,this.nodeManager=e.ssrmNodeManager,this.filterManager=e.filterManager,this.transactionManager=e.ssrmTransactionManager,this.serverSideRowModel=e.rowModel}postConstruct(){if(this.usingTreeData=this.gos.get("treeData"),this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),!this.usingTreeData&&this.groupLevel){const e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.funcColsService.getRowGroupColumns()[this.level]}let e=1;const t=-1===this.parentRowNode.level,i=this.storeUtils.getServerSideInitialRowCount();t&&null!=i&&(e=i),this.initialiseRowNodes(e),this.rowNodeBlockLoader.addBlock(this),this.addDestroyFunc((()=>this.rowNodeBlockLoader.removeBlock(this))),this.postSortFunc=this.gos.getCallback("postSortRows"),null!=i&&this.eventService.dispatchEventOnce({type:"rowCountReady"})}destroy(){this.destroyRowNodes(),super.destroy()}destroyRowNodes(){this.blockUtils.destroyRowNodes(this.allRowNodes),this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={}}initialiseRowNodes(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.destroyRowNodes();for(let i=0;i<e;i++){const e=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});t&&(e.failedLoad=!0),this.allRowNodes.push(e),this.nodesAfterFilter.push(e),this.nodesAfterSort.push(e)}}getBlockStateJson(){return{id:this.nodeIdPrefix?this.nodeIdPrefix:"",state:this.getState()}}loadFromDatasource(){this.storeUtils.loadFromDatasource({startRow:void 0,endRow:void 0,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,success:this.success.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})}getStartRow(){return 0}getEndRow(){return this.nodesAfterSort.length}createDataNode(e,t){const i=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});null!=t?De(this.allRowNodes,i,t):this.allRowNodes.push(i);const s=this.prefixId(this.nodeIdSequence.next());return this.blockUtils.setDataIntoRowNode(i,e,s,void 0),this.nodeManager.addRowNode(i),this.blockUtils.checkOpenByDefault(i),this.allNodesMap[i.id]=i,i}prefixId(e){return this.nodeIdPrefix?this.nodeIdPrefix+"-"+e:e.toString()}processServerFail(){this.initialiseRowNodes(1,!0),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}processServerResult(e){if(!this.isAlive())return;const t=e.groupLevelInfo;t&&Object.assign(this.info,t),e.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(e.pivotResultFields);const i=this.allRowNodes.length>0?this.allNodesMap:void 0;this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={},e.rowData||h('"params.data" is missing from Server-Side Row Model success() callback. Please use the "data" attribute. If no data is returned, set an empty list.'),this.createOrRecycleNodes(i,e.rowData),i&&this.blockUtils.destroyRowNodes(st(i)),0===this.level&&this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.filterAndSortNodes(),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}createOrRecycleNodes(e,t){if(!t)return;const i=t=>{if(!e)return;const i=ie(this.gos);if(!i)return;const s=this.parentRowNode.getRoute()??[],n=this.level,r=i({data:t,parentKeys:s.length>0?s:void 0,level:n}),o=e[r];return o?(delete e[r],o):void 0},s=(e,t)=>{this.allNodesMap[e.id]=e,this.blockUtils.updateDataIntoRowNode(e,t),this.allRowNodes.push(e)};t.forEach((e=>{const t=i(e);t?s(t,e):this.createDataNode(e)}))}flushAsyncTransactions(){window.setTimeout((()=>this.transactionManager.flushAsyncTransactions()),0)}filterAndSortNodes(){this.filterRowNodes(),this.sortRowNodes()}sortRowNodes(){const e=this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerSideSortOnServer(),t=this.sortController.getSortOptions(),i=!t||0==t.length;if(e||i)this.nodesAfterSort=this.nodesAfterFilter;else if(this.nodesAfterSort=this.rowNodeSorter.doFullSort(this.nodesAfterFilter,t),this.postSortFunc){const e={nodes:this.nodesAfterSort};this.postSortFunc(e)}}filterRowNodes(){const e=!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerSideFilterOnServer(),t=this.groupLevel;this.nodesAfterFilter=e||t?this.allRowNodes:this.filterManager?this.allRowNodes.filter((e=>this.filterManager.doesRowPassFilter({rowNode:e}))):this.allRowNodes}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.allRowNodes.forEac
2h((e=>this.blockUtils.clearDisplayIndex(e)))}getDisplayIndexEnd(){return this.displayIndexEnd}isDisplayIndexInStore(e){return 0!==this.getRowCount()&&(e>=this.displayIndexStart&&e<this.displayIndexEnd)}setDisplayIndexes(e,t,i){this.displayIndexStart=e.peek(),this.topPx=t.value;const s={};this.nodesAfterSort.forEach((n=>{this.blockUtils.setDisplayIndex(n,e,t,i),s[n.id]=!0})),this.allRowNodes.forEach((e=>{s[e.id]||this.blockUtils.clearDisplayIndex(e)})),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx}forEachStoreDeep(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ws;e(this,t.next()),this.allRowNodes.forEach((i=>{const s=i.childStore;s&&s.forEachStoreDeep(e,t)}))}forEachNodeDeep(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ws;this.allRowNodes.forEach((i=>{e(i,t.next());const s=i.childStore;s&&s.forEachNodeDeep(e,t)}))}forEachNodeDeepAfterFilterAndSort(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ws,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.nodesAfterSort.forEach((s=>{e(s,t.next());const n=s.childStore;n&&n.forEachNodeDeepAfterFilterAndSort(e,t,i)})),i&&this.parentRowNode.sibling&&e(this.parentRowNode.sibling,t.next())}getRowUsingDisplayIndex(e){if(!this.isDisplayIndexInStore(e))return;return this.blockUtils.binarySearchForDisplayIndex(e,this.nodesAfterSort)}getRowBounds(e){for(let t=0;t<this.nodesAfterSort.length;t++){const i=this.nodesAfterSort[t],s=this.blockUtils.extractRowBounds(i,e);if(s)return s}return null}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<=this.topPx){return this.nodesAfterSort[0].rowIndex}if(e>=this.topPx+this.heightPx){const t=this.nodesAfterSort[this.nodesAfterSort.length-1];if(!t)return null;const i=t.rowTop+t.rowHeight;if(e>=i&&t.expanded){if(t.childStore&&t.childStore.getRowCount()>0)return t.childStore.getRowIndexAtPixel(e);if(t.detailNode)return t.detailNode.rowIndex}return t.rowIndex}let t=null;this.nodesAfterSort.forEach((i=>{const s=this.blockUtils.getIndexAtPixel(i,e);null!=s&&(t=s)}));return null==t?this.displayIndexEnd-1:t}getChildStore(e){return this.storeUtils.getChildStore(e,this,(e=>this.allRowNodes.find((t=>t.key==e))))}forEachChildStoreShallow(e){this.allRowNodes.forEach((t=>{const i=t.childStore;i&&e(i)}))}refreshAfterFilter(e){const t=this.storeUtils.isServerSideFilterOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||t&&i)return this.refreshStore(!0),void this.sortRowNodes();this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow((t=>t.refreshAfterFilter(e)))}refreshAfterSort(e){const t=this.storeUtils.isServerSideSortOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(this.storeUtils.isServerSideSortAllLevels()||t&&i)return this.refreshStore(!0),void this.filterRowNodes();this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow((t=>t.refreshAfterSort(e)))}applyTransaction(e){switch(this.getState()){case"failed":return{status:Dl.StoreLoadingFailed};case"loading":return{status:Dl.StoreLoading};case"needsLoading":return{status:Dl.StoreWaitingToLoad}}const t=this.gos.getCallback("isApplyServerSideTransaction");if(t){if(!t({transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info}))return{status:Dl.Cancelled}}const i={status:Dl.Applied,remove:[],update:[],add:[]},s=[];return this.executeAdd(e,i),this.executeRemove(e,i,s),this.executeUpdate(e,i,s),this.filterAndSortNodes(),this.updateSelection(s),i}updateSelection(e){e.length>0&&(this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,clearSelection:!1,source:"rowDataChanged"}),this.eventService.dispatchEvent({type:"selectionChanged",source:"rowDataChanged"}))}executeAdd(e,t){const{add:i,addIndex:s}=e;if(x(i))return;"number"===typeof s&&s>=0?i.reverse().forEach((e=>{const i=this.createDataNode(e,s);t.add.push(i)})):i.forEach((e=>{const i=this.createDataNode(e);t.add.push(i)}))}executeRemove(e,t,i){const{remove:s}=e;if(null==s)return;const n={};
2s.forEach((e=>{const s=this.lookupRowNode(e);s&&(s.isSelected()&&i.push(s),s.clearRowTopAndRowIndex(),n[s.id]=!0,delete this.allNodesMap[s.id],t.remove.push(s),this.nodeManager.removeNode(s))})),this.allRowNodes=this.allRowNodes.filter((e=>!n[e.id]))}executeUpdate(e,t,i){const{update:s}=e;null!=s&&s.forEach((e=>{const s=this.lookupRowNode(e);s&&(this.blockUtils.updateDataIntoRowNode(s,e),!s.selectable&&s.isSelected()&&i.push(s),t.update.push(s))}))}lookupRowNode(e){const t=ie(this.gos);if(null!=t){const i=this.parentRowNode.getRoute()??[],s=t({data:e,parentKeys:i.length>0?i:void 0,level:this.level}),n=this.allNodesMap[s];return n||(c(`could not find row id=${s}, data item was not found for this id`),null)}{const t=this.allRowNodes.find((t=>t.data===e));return t||(c("could not find data item as object was not found",e),null)}}addStoreStates(e){e.push({suppressInfiniteScroll:!0,route:this.parentRowNode.getRoute()??[],rowCount:this.allRowNodes.length,info:this.info}),this.forEachChildStoreShallow((t=>t.addStoreStates(e)))}refreshStore(e){if(e){const e=this.nodesAfterSort?this.nodesAfterSort.length:1;this.initialiseRowNodes(e)}this.scheduleLoad(),this.fireStoreUpdatedEvent()}retryLoads(){"failed"===this.getState()&&(this.initialiseRowNodes(1),this.scheduleLoad()),this.forEachChildStoreShallow((e=>e.retryLoads()))}scheduleLoad(){this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad()}fireStoreUpdatedEvent(){this.eventService.dispatchEvent({type:"storeUpdated"})}getRowCount(){return this.nodesAfterSort.length}getTopLevelRowDisplayedIndex(e){return this.nodesAfterSort[e].rowIndex}isLastRowIndexKnown(){return"loaded"==this.getState()}getRowNodesInRange(e,t){const i=[];let s=!1;b(e)&&(s=!0),this.nodesAfterSort.forEach((n=>{const r=n===e||n===t;(s||r)&&i.push(n),r&&(s=!s)}));return s?[]:i}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}},Gj=class extends ze{constructor(){super(...arguments),this.beanName="lazyBlockLoadingService",this.cacheLoadingNodesMap=new Map,this.isCheckQueued=!1,this.nextBlockToLoad=void 0}wireBeans(e){this.rowNodeBlockLoader=e.rowNodeBlockLoader,this.rowRenderer=e.rowRenderer,this.rowModel=e.rowModel}postConstruct(){this.addManagedListeners(this.rowNodeBlockLoader,{blockLoaded:()=>this.queueLoadCheck()})}subscribe(e){this.cacheLoadingNodesMap.set(e,new Set)}unsubscribe(e){this.cacheLoadingNodesMap.delete(e)}queueLoadCheck(){this.isCheckQueued||(this.isCheckQueued=!0,window.queueMicrotask((()=>{this.queueLoadAction(),this.isCheckQueued=!1})))}queueLoadAction(){const e=this.getBlockToLoad();if(!e)return;const t=this.nextBlockToLoad&&this.nextBlockToLoad.cache===e.cache&&this.nextBlockToLoad.index===e.index;if(!t&&(!this.nextBlockToLoad||!t)){this.nextBlockToLoad=e,window.clearTimeout(this.loaderTimeout);const t=Number(this.nextBlockToLoad.index),i=this.nextBlockToLoad.cache,s=e.index+e.cache.getBlockSize();this.loaderTimeout=window.setTimeout((()=>{i.isAlive()&&(this.loaderTimeout=void 0,this.attemptLoad(i,t,s),this.nextBlockToLoad=void 0)}),this.gos.get("blockLoadDebounceMillis"))}}attemptLoad(e,t,i){const s=this.rowNodeBlockLoader.getAvailableLoadingCount();null!=s&&0===s||(this.rowNodeBlockLoader.registerLoads(1),this.executeLoad(e,t,i),this.queueLoadCheck())}executeLoad(e,t,i){const s=e.getSsrmParams(),n={startRow:t,endRow:i,rowGroupCols:s.rowGroupCols,valueCols:s.valueCols,pivotCols:s.pivotCols,pivotMode:s.pivotMode,groupKeys:e.store.getParentNode().getRoute()??[],filterModel:s.filterModel,sortModel:s.sortModel},r=this.cacheLoadingNodesMap.get(e),o=()=>{for(let e=0;e<i-t;e++)r.delete(t+e)},a=this.gos.addGridCommonParams({request:n,success:s=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadSuccess(t,i-t,s),o()},fail:()=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadFailed(t,i-t),o()},parentNode:e.store.getParentNode()});(()=>{for(let e=0;e<i-t;e++)r.add(t+e)})(),e.getSsrmParams().datasource?.getRows(a)}getBlockToLoad(){const e=this.rowRenderer.getFirstVirtualRenderedRow(),t=this.rowRenderer.getLastVirtualRenderedRow();for(let a=e;a<=t;a++){const e=this.rowModel.getRow(a);if(!e)continue;const t=e.parent&&e.parent.childStore;if(!t||!(t instanceof zj))continue;const i=t.getCache(),s=i.getNodes().getBy("node",e);if(!s)continue;const n=this.cacheLoadingNodesMap.get(i);if(!n?.has(s.index)&&(e.__needsRefreshWhenVisible||e.stub&&!e.failedLoad))return{cache:i,index:i.getBlockStartIndex(s.index)}}let i=null,s=null,n=Number.MAX_SAFE_INTEGER;for(const a of this.cacheLoadingNodesMap.keys()){a.getNodesToRefresh().forEac
2h((r=>{if(null==r.rowIndex)return s=r,void(i=a);const o=a.getNodes().getBy("node",r);if(!o)return;const l=this.cacheLoadingNodesMap.get(a);if(l?.has(o.index))return;const h=Math.abs(e-r.rowIndex),c=Math.abs(r.rowIndex-t);h<n&&(s=r,n=h,i=a),c<n&&(s=r,n=c,i=a)}))}if(!i)return;const r=i,o=r.getNodes().getBy("node",s)?.index;return null==o?void 0:{cache:r,index:r.getBlockStartIndex(o)}}isRowLoading(e,t){return this.cacheLoadingNodesMap.get(e)?.has(t)??!1}};Gj.DEFAULT_BLOCK_SIZE=100;var Bj=class{constructor(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t.length<1)throw new Error("AG Grid: At least one index must be provided.");this.indexes=t,this.maps=new Map(this.indexes.map((e=>[e,new Map])))}getSize(){return this.maps.get(this.indexes[0]).size}getBy(e,t){const i=this.maps.get(e);if(!i)throw new Error(`AG Grid: ${String(e)} not found`);return i.get(t)}set(e){this.indexes.forEach((t=>{const i=this.maps.get(t);if(!i)throw new Error(`AG Grid: ${String(t)} not found`);i.set(e[t],e)}))}delete(e){this.indexes.forEach((t=>{const i=this.maps.get(t);if(!i)throw new Error(`AG Grid: ${String(t)} not found`);i.delete(e[t])}))}clear(){this.maps.forEach((e=>e.clear()))}getIterator(e){const t=this.maps.get(e);if(!t)throw new Error(`AG Grid: ${String(e)} not found`);return t.values()}forEach(e){const t=this.getIterator(this.indexes[0]);let i;for(;(i=t.next())&&!i.done;)e(i.value)}find(e){const t=this.getIterator(this.indexes[0]);let i;for(;(i=t.next())&&!i.done;)if(e(i.value))return i.value}filter(e){const t=this.getIterator(this.indexes[0]);let i;const s=[];for(;(i=t.next())&&!i.done;)e(i.value)&&s.push(i.value);return s}},Vj=class extends ze{constructor(e,t,i,s){super(),this.live=!0,this.removedNodeCache=new Map,this.store=e,this.numberOfRows=t,this.isLastRowKnown=i,this.storeParams=s}wireBeans(e){this.rowRenderer=e.rowRenderer,this.blockUtils=e.ssrmBlockUtils,this.focusService=e.focusService,this.nodeManager=e.ssrmNodeManager,this.serverSideRowModel=e.rowModel,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController,this.lazyBlockLoadingService=e.lazyBlockLoadingService}postConstruct(){this.lazyBlockLoadingService.subscribe(this),this.nodeMap=new Bj("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.getRowIdFunc=ie(this.gos),this.isMasterDetail=this.gos.get("masterDetail")}destroy(){this.lazyBlockLoadingService.unsubscribe(this),this.numberOfRows=0,this.nodeMap.forEac
2h((e=>this.blockUtils.destroyRowNode(e.node))),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1,super.destroy()}getRowByDisplayIndex(e){if(!this.store.isDisplayIndexInStore(e))return;const t=this.nodeDisplayIndexMap.get(e);if(t)return(t.stub||t.__needsRefreshWhenVisible)&&this.lazyBlockLoadingService.queueLoadCheck(),t;if(this.gos.get("groupHideOpenParents")||this.gos.get("groupAllowUnbalanced")){const t=this.nodeMap.find((t=>!!t.node.childStore?.isDisplayIndexInStore(e)));if(t)return t.node.childStore?.getRowUsingDisplayIndex(e)}if(e===this.store.getDisplayIndexStart())return this.createStubNode(0,e);const i=this.nodeDisplayIndexMap.get(e-1);if(i){if(this.isMasterDetail&&i.master&&i.expanded)return i.detailNode;if(i.expanded&&i.childStore?.isDisplayIndexInStore(e))return i.childStore?.getRowUsingDisplayIndex(e);const t=this.nodeMap.getBy("node",i);return this.createStubNode(t.index+1,e)}const s=this.getSurroundingNodesByDisplayIndex(e);if(null==s){const t=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(t,e)}const{previousNode:n,nextNode:r}=s;if(n&&n.node.expanded&&n.node.childStore?.isDisplayIndexInStore(e))return n.node.childStore?.getRowUsingDisplayIndex(e);if(r){const t=r.node.rowIndex-e,i=r.index-t;return this.createStubNode(i,e)}const o=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(o,e)}createStubNode(e,t){const i=this.store.getRowBounds(t),s=this.createRowAtIndex(e,null,(e=>{e.setRowIndex(t),e.setRowTop(i.rowTop),this.nodeDisplayIndexMap.set(t,e)}));if(0===e&&this.gos.get("groupHideOpenParents")){const e=this.store.getParentNode().groupData;for(const t in e)s.setGroupValue(t,e[t])}return this.lazyBlockLoadingService.queueLoadCheck(),s}getRowByStoreIndex(e){return this.nodeMap.getBy("index",e)?.node}skipDisplayIndexes(e,t,i){if(0===e)return;const s=V(this.gos);t.skip(e),i.value+=e*s}setDisplayIndexes(e,t,i){this.nodeDisplayIndexMap.clear();const s={};
2this.nodeMap.forEach((e=>{s[e.index]=e.node}));let n=-1;for(const o in s){const r=s[o],a=Number(o),l=a-1-n;this.skipDisplayIndexes(l,e,t);const h=0===a;if(r.setFirstChild(h),h&&this.gos.get("groupHideOpenParents")){const e=this.store.getParentNode().groupData;for(const t in e)r.setGroupValue(t,h?e[t]:void 0)}this.blockUtils.setDisplayIndex(r,e,t,i),null!=r.rowIndex&&this.nodeDisplayIndexMap.set(r.rowIndex,r),n=a}const r=this.numberOfRows-1-n;this.skipDisplayIndexes(r,e,t),this.purgeExcessRows()}getRowCount(){return this.numberOfRows}setRowCount(e,t){if(e<0)throw new Error("AG Grid: setRowCount can only accept a positive row count.");this.numberOfRows=e,null!=t&&(this.isLastRowKnown=t,!1===t&&(this.numberOfRows+=1)),this.fireStoreUpdatedEvent()}getNodes(){return this.nodeMap}getNodeCachedByDisplayIndex(e){return this.nodeDisplayIndexMap.get(e)??null}getNodesToRefresh(){return this.nodesToRefresh}getSurroundingNodesByDisplayIndex(e){let t,i;return this.nodeMap.forEach((s=>{e>s.node.rowIndex?(null==i||i.node.rowIndex<s.node.rowIndex)&&(i=s):(null==t||t.node.rowIndex>s.node.rowIndex)&&(t=s)})),i||t?{previousNode:i,nextNode:t}:null}getDisplayIndexFromStoreIndex(e){const t=this.nodeMap.getBy("index",e);if(t)return t.node.rowIndex;let i,s;
2if(this.nodeMap.forEach((t=>{e>t.index?(null==s||s.index<t.index)&&(s=t):(null==i||i.index>t.index)&&(i=t)})),!i)return this.store.getDisplayIndexEnd()-(this.numberOfRows-e);if(!s)return this.store.getDisplayIndexStart()+e;const n=e-s.index;return(s.node.childStore?.getDisplayIndexEnd()??s.node.rowIndex)+n}createRowAtIndex(e,t,i){const s=this.nodeMap.getBy("index",e);if(s){const{node:i}=s;if(i.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,i))return this.blockUtils.updateDataIntoRowNode(i,t),this.nodesToRefresh.delete(i),i;if(null==this.getRowIdFunc&&i.hasChildren()&&i.expanded)return this.nodesToRefresh.delete(i),i;this.destroyRowAtIndex(e)}if(t&&null!=this.getRowIdFunc){const i=this.getRowId(t),s=i&&this.removedNodeCache?.get(i);if(s)return this.removedNodeCache?.delete(i),this.blockUtils.updateDataIntoRowNode(s,t),this.nodeMap.set({id:s.id,node:s,index:e}),this.nodesToRefresh.delete(s),s.__needsRefreshWhenVisible=!1,s;const n=this.nodeMap.getBy("id",i);if(n){this.nodeMap.delete(n);const{node:i,index:s}=n;return this.blockUtils.updateDataIntoRowNode(i,t),this.nodeMap.set({id:i.id,node:i,index:e}),this.nodesToRefresh.delete(i),i.__needsRefreshWhenVisible=!1,this.getBlockStartIndex(s)===this.getBlockStartIndex(e)?i:(this.markBlockForVerify(s),i)}}const n=this.blockUtils.createRowNode(this.store.getRowDetails());if(null!=t){const e=this.getPrefixedId(this.store.getIdSequence().next());this.blockUtils.setDataIntoRowNode(n,t,e,void 0),this.serverSideRowModel.setPaused(!0),this.blockUtils.checkOpenByDefault(n),this.serverSideRowModel.setPaused(!1),this.nodeManager.addRowNode(n)}return this.nodeMap.set({id:n.id,node:n,index:e}),i&&i(n),n}getBlockStates(){const e={},t={};
2this.nodeMap.forEach((i=>{let{node:s,index:n}=i;const r=this.getBlockStartIndex(n);s.stub||s.failedLoad||(e[r]=(e[r]??0)+1);let o="loaded";s.failedLoad?o="failed":this.lazyBlockLoadingService.isRowLoading(this,r)?o="loading":(this.nodesToRefresh.has(s)||s.stub)&&(o="needsLoading"),t[r]||(t[r]=new Set),t[r].add(o)}));const i={loading:4,failed:3,needsLoading:2,loaded:1},s=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),n={};return Object.entries(t).forEach((t=>{let[r,o]=t;const a=[...o].sort(((e,t)=>(i[e]??0)-(i[t]??0)))[0],l=Number(r)/this.getBlockSize(),h=s?`${s}-${l}`:String(l);n[h]={blockNumber:l,startRow:Number(r),endRow:Number(r)+this.getBlockSize(),pageStatus:a,loadedRowCount:e[r]??0}})),n}destroyRowAtIndex(e){const t=this.nodeMap.getBy("index",e);t&&(this.nodeMap.delete(t),this.nodeDisplayIndexMap.delete(t.node.rowIndex),this.nodesToRefresh.size>0?this.removedNodeCache.set(t.node.id,t.node):this.blockUtils.destroyRowNode(t.node),this.nodesToRefresh.delete(t.node))}getSsrmParams(){return this.store.getSsrmParams()}getPrefixedId(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()}markBlockForVerify(e){const[t,i]=this.getBlockBounds(e);this.nodeMap.filter((e=>e.index>=t&&e.index<i)).forEach((e=>{let{node:t}=e;t.__needsRefreshWhenVisible=!0}))}doesNodeMatch(e,t){if(t.stub)return!1;const i=this.getRowId(e);return null===i?t.data===e:t.id===i}purgeStubsOutsideOfViewport(){const e=this.rowRenderer.getFirstVirtualRenderedRow(),t=this.rowRenderer.getLastVirtualRenderedRow(),i=this.getBlockStartIndex(e),[,s]=this.getBlockBounds(t);
2this.nodeMap.forEach((e=>{this.lazyBlockLoadingService.isRowLoading(this,e.index)||e.node.failedLoad||e.node.stub&&(e.index<i||e.index>s)&&this.destroyRowAtIndex(e.index)}))}getBlocksDistanceFromRow(e,t){const i={};return e.forEach((e=>{let{node:s,index:n}=e;const[r,o]=this.getBlockBounds(n);if(r in i)return;const a=Math.abs(s.rowIndex-t);let l;const h=this.nodeMap.getBy("index",[o-1]);h&&(l=Math.abs(h.node.rowIndex-t));const c=null==l||a<l?a:l;i[r]=c})),Object.entries(i)}purgeExcessRows(){if(this.purgeStubsOutsideOfViewport(),null==this.store.getDisplayIndexEnd()||null==this.storeParams.maxBlocksInCache)return;const e=this.rowRenderer.getFirstVirtualRenderedRow(),t=this.rowRenderer.getLastVirtualRenderedRow(),i=new Set,s=new Set;this.nodeMap.forEach((n=>{let{index:r,node:o}=n;const a=this.getBlockStartIndex(r);i.add(a);o.rowIndex>=e&&o.rowIndex<=t&&s.add(a)}));const n=Math.max(s.size,this.storeParams.maxBlocksInCache??0),r=i.size-n;if(r<=0)return;let o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;s.forEach((e=>{o>e&&(o=e),a<e&&(a=e)}));const l=this.nodeMap.filter((e=>{let{node:t,index:i}=e;const s=this.getBlockStartIndex(i);return!(s>=o&&s<=a)&&!this.isNodeCached(t)}));if(0===l.length)return;const h=e+(t-e)/2,c=this.getBlocksDistanceFromRow(l,h),d=this.getBlockSize();c.sort(((e,t)=>Math.sign(t[1]-e[1])));for(let u=0;u<Math.min(r,c.length);u++){const e=Number(c[u][0]);for(let t=e;t<e+d;t++){const e=this.nodeMap.getBy("index",t);e&&!this.isNodeCached(e.node)&&this.destroyRowAtIndex(t)}}}isNodeFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;return t.rowIndex===e.rowIndex}isNodeCached(e){const t=this.gos.get("groupAllowUnbalanced")&&""===e.key;return e.isExpandable()&&e.expanded||this.isNodeFocused(e)||t}extractDuplicateIds(e){if(null==this.getRowIdFunc)return[];const t=new Set,i=new Set;return e.forEach((e=>{const s=this.getRowId(e);t.has(s)?i.add(s):t.add(s)})),[...i]}onLoadSuccess(e,t,i){if(!this.live)return;const s=i.groupLevelInfo;if(this.store.setStoreInfo(s),null!=this.getRowIdFunc){const s=this.extractDuplicateIds(i.rowData);if(s.length>0){return h(`Unable to display rows as duplicate row ids (${s.join(", ")}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`),void this.onLoadFailed(e,t)}}i.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(i.pivotResultFields);const n=this.nodesToRefresh.size>0;if(i.rowData.forEach(((t,i)=>{const s=e+i,n=this.nodeMap.getBy("index",s);if(!n?.node?.stub)return n&&this.doesNodeMatch(t,n.node)?(this.blockUtils.updateDataIntoRowNode(n.node,t),this.nodesToRefresh.delete(n.node),void(n.node.__needsRefreshWhenVisible=!1)):void this.createRowAtIndex(s,t);this.createRowAtIndex(s,t)})),void 0!=i.rowCount&&-1!==i.rowCount)this.numberOfRows=i.rowCount,this.isLastRowKnown=!0;else if(t>i.rowData.length)this.numberOfRows=e+i.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){const t=e+i.rowData.length+1;t>this.numberOfRows&&(this.numberOfRows=t)}if(this.isLastRowKnown){this.nodeMap.filter((e=>e.index>=this.numberOfRows)).forEach((e=>this.destroyRowAtIndex(e.index)))}this.fireStoreUpdatedEvent();const r=0===this.nodesToRefresh.size;n&&r&&this.fireRefreshFinishedEvent()}fireRefreshFinishedEvent(){0===this.nodesToRefresh.size&&(this.removedNodeCache.forEach((e=>{this.blockUtils.destroyRowNode(e)})),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())}isStoreFullyLoaded(){const e=this.isLastRowKnown,t=this.nodeMap.getSize()===this.numberOfRows;if(!e||!t)return;if(this.nodesToRefresh.size>0)return;let i=-1;return null==this.nodeMap.find((e=>(i+=1,e.index!==i||(!!e.node.__needsRefreshWhenVisible||!!e.node.stub))))}isLastRowIndexKnown(){return this.isLastRowKnown}onLoadFailed(e,t){if(!this.live)return;const i=this.nodesToRefresh.size>0;for(let n=e;n<e+t&&n<this.getRowCount();n++){let{node:e}=this.nodeMap.getBy("index",n)??{};e&&this.nodesToRefresh.delete(e),e&&e.stub||(e&&!e.stub&&this.destroyRowAtIndex(n),e=this.createRowAtIndex(n)),e.__needsRefreshWhenVisible=!1,e.failedLoad=!0}const s=0===this.nodesToRefresh.size;i&&s&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}
2markNodesForRefresh(){this.nodeMap.forEach((e=>{e.node.stub&&!e.node.failedLoad||this.nodesToRefresh.add(e.node)})),this.lazyBlockLoadingService.queueLoadCheck(),this.isLastRowKnown&&0===this.numberOfRows&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())}isNodeInCache(e){return!!this.nodeMap.getBy("id",e)}fireStoreUpdatedEvent(){this.live&&this.store.fireStoreUpdatedEvent()}getRowId(e){if(null==this.getRowIdFunc)return null;const{level:t}=this.store.getRowDetails(),i=this.store.getParentNode().getRoute()??[];return this.getRowIdFunc({data:e,parentKeys:i.length>0?i:void 0,level:t})}getOrderedNodeMap(){const e={};return this.nodeMap.forEach((t=>e[t.index]=t)),e}clearDisplayIndexes(){this.nodeDisplayIndexMap.clear()}clientSideSortRows(){const e=this.sortController.getSortOptions();if(!e.some((e=>null!=e.sort)))return;const t=new Array(this.nodeMap.getSize());this.nodeMap.forEach((e=>t[e.index]=e.node)),this.nodeMap.clear();this.rowNodeSorter.doFullSort(t,e).forEach(((e,t)=>{this.nodeMap.set({id:e.id,node:e,index:t})}))}updateRowNodes(e){if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");const t=[];return e.forEach((e=>{const i=this.getRowId(e),s=this.nodeMap.getBy("id",i);s&&(this.blockUtils.updateDataIntoRowNode(s.node,e),t.push(s.node))})),t}insertRowNodes(e,t){const i=this.store.getRowCount()-(this.store.getParentNode().sibling?1:0),s=null==t&&this.isLastRowKnown?i:t;if(null==s||i<s)return[];if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");const n={};e.forEach((e=>{const t=this.getRowId(e);t&&this.isNodeInCache(t)||(n[t]=e)}));const r=Object.values(n),o=r.length;if(0===o)return[];const a=this.nodeMap.filter((e=>e.index>=s));return a.forEach((e=>this.nodeMap.delete(e))),a.forEach((e=>{this.nodeMap.set({node:e.node,index:e.index+o,id:e.id})})),this.numberOfRows+=o,r.map(((e,t)=>this.createRowAtIndex(s+t,e)))}removeRowNodes(e){if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");const t=[],i=[];let s=0;const n=[...e],r=this.getOrderedNodeMap();let o=-1;for(const a in r){o+=1;const e=r[a],l=n.findIndex((t=>t===e.id));if(-1!==l){n.splice(l,1),this.destroyRowAtIndex(Number(a)),t.push(e.node),s+=1;continue}if(0===s)continue;const h=Number(a);o!==h&&i.push(e.node),this.nodeMap.delete(r[a]),this.nodeMap.set({id:e.id,node:e.node,index:h-s})}return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:s,n.length>0&&i.length>0&&(i.forEach((e=>e.__needsRefreshWhenVisible=!0)),this.lazyBlockLoadingService.queueLoadCheck()),t}getBlockSize(){return this.storeParams.cacheBlockSize||Gj.DEFAULT_BLOCK_SIZE}getBlockStartIndex(e){return e-e%this.getBlockSize()}getBlockBounds(e){const t=this.getBlockStartIndex(e);return[t,t+this.getBlockSize()]}},zj=class extends ze{constructor(e,t,i){super(),this.idSequence=new ws,this.ssrmParams=e,this.parentRowNode=i,this.storeParams=t,this.level=i.level+1,this.group=!!e.rowGroupCols&&this.level<e.rowGroupCols.length,this.leafGroup=!!e.rowGroupCols&&this.level===e.rowGroupCols.length-1,this.info={}}wireBeans(e){this.blockUtils=e.ssrmBlockUtils,this.storeUtils=e.ssrmStoreUtils,this.selectionService=e.selectionService,this.funcColsService=e.funcColsService}postConstruct(){let e=1;0===this.level&&(e=this.storeUtils.getServerSideInitialRowCount()??1,this.eventService.dispatchEventOnce({type:"rowCountReady"})),this.cache=this.createManagedBean(new Vj(this,e,!1,this.storeParams));if(!this.gos.get("treeData")&&this.group){const e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.funcColsService.getRowGroupColumns()[this.level]}}destroy(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache),super.destroy()}applyRowData(e,t,i){this.cache.onLoadSuccess(t,i,e)}applyTransaction(e){const t=ie(this.gos);if(!t)return h("getRowId callback must be implemented for transactions to work. Transaction was ignored."),{status:Dl.Cancelled};const i=this.gos.getCallback("isApplyServerSideTransaction");if(i){if(!i({transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info}))return{status:Dl.Cancelled}}const s=this.cache.isStoreFullyLoaded();let n,r,o;
2if(e.update?.length&&(n=this.cache.updateRowNodes(e.update)),e.add?.length){let t=e.addIndex;null!=t&&t<0&&(t=void 0),r=this.cache.insertRowNodes(e.add,t)}if(e.remove?.length){const i=e.remove.map((e=>t({level:this.level,parentKeys:this.parentRowNode.getRoute()??[],data:e}))),s=[...new Set(i)];o=this.cache.removeRowNodes(s)}const a=this.gos.get("serverSideEnableClientSideSort");return s&&a&&(n?.length||r?.length)&&this.cache.clientSideSortRows(),this.updateSelectionAfterTransaction(n,o),{status:Dl.Applied,update:n,add:r,remove:o}}updateSelectionAfterTransaction(e,t){const i=[];e?.forEach((e=>{e.isSelected()&&!e.selectable&&i.push(e)})),t?.forEach((e=>{e.isSelected()&&i.push(e)})),i.length&&this.selectionService.setNodesSelected({newValue:!1,clearSelection:!1,nodes:i,source:"rowDataChanged"})}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEach((e=>this.blockUtils.clearDisplayIndex(e.node))),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()}getDisplayIndexStart(){return this.displayIndexStart}getDisplayIndexEnd(){return this.displayIndexEnd}getRowCount(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()}setRowCount(e,t){this.cache.setRowCount(e,t)}isDisplayIndexInStore(e){return 0!==this.cache.getRowCount()&&(this.displayIndexStart<=e&&e<this.getDisplayIndexEnd())}setDisplayIndexes(e,t,i){this.displayIndexStart=e.peek(),this.topPx=t.value;const s=this.parentRowNode.level>-1&&J(this.gos)({node:this.parentRowNode});s||this.parentRowNode.destroyFooter(),"top"===s&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,i)),this.cache.setDisplayIndexes(e,t,i),"bottom"===s&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,i)),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx}forEachStoreDeep(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ws;e(this,t.next()),this.cache.getNodes().forEach((i=>{const s=i.node.childStore;s&&s.forEachStoreDeep(e,t)}))}forEachNodeDeep(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ws;this.cache.getNodes().forEach((i=>{e(i.node,t.next());const s=i.node.childStore;s&&s.forEachNodeDeep(e,t)}))}forEachNodeDeepAfterFilterAndSort(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ws,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.parentRowNode.level>-1&&J(this.gos)({node:this.parentRowNode});"top"===s&&e(this.parentRowNode.sibling,t.next());const n=this.cache.getOrderedNodeMap();for(const r in n){const s=n[r];e(s.node,t.next());const o=s.node.childStore;o&&o.forEachNodeDeepAfterFilterAndSort(e,t,i)}"bottom"===s&&e(this.parentRowNode.sibling,t.next())}retryLoads(){this.cache.getNodes().forEach((e=>{let{node:t}=e;t.failedLoad&&(t.failedLoad=!1,t.__needsRefreshWhenVisible=!0,t.stub=!0)})),this.forEachChildStoreShallow((e=>e.retryLoads())),this.fireStoreUpdatedEvent()}getRowUsingDisplayIndex(e){return this.parentRowNode.sibling&&e===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(e)}getRowBounds(e){if(!this.isDisplayIndexInStore(e))return null;const t=this.cache.getNodeCachedByDisplayIndex(e);if(t){const i=this.blockUtils.extractRowBounds(t,e);if(i)return i}const{previousNode:i,nextNode:s}=this.cache.getSurroundingNodesByDisplayIndex(e)??{};if(i){const t=this.blockUtils.extractRowBounds(i.node,e);if(null!=t)return t}const n=V(this.gos);if(s){const t=(s.node.rowIndex-e)*n;return{rowTop:s.node.rowTop-t,rowHeight:n}}return{rowTop:this.topPx+this.heightPx-(this.getDisplayIndexEnd()-e)*n,rowHeight:n}}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;if(this.parentRowNode.sibling&&e>this.parentRowNode.sibling.rowTop&&e<this.parentRowNode.sibling.rowTop+this.parentRowNode.sibling.rowHeight)return this.parentRowNode.sibling.rowIndex;let t=Number.MAX_SAFE_INTEGER,i=null,s=Number.MAX_SAFE_INTEGER,n=null;
2if(this.cache.getNodes().forEach((r=>{let{node:o}=r;const a=Math.abs(e-o.rowTop);o.rowTop<e?a<t&&(t=a,i=o):a<s&&(s=a,n=o)})),i){const t=this.blockUtils.getIndexAtPixel(i,e);if(null!=t)return t}const r=V(this.gos);if(n){const t=n.rowTop,i=Math.ceil((t-e)/r);return n.rowIndex-i}const o=this.topPx+this.heightPx,a=Math.floor((o-e)/r);return this.getDisplayIndexEnd()-a}getChildStore(e){return this.storeUtils.getChildStore(e,this,(e=>{const t=this.cache.getNodes().find((t=>t.node.key==e));return t?t.node:null}))}forEachChildStoreShallow(e){this.cache.getNodes().forEach((t=>{let{node:i}=t;i.childStore&&e(i.childStore)}))}refreshAfterSort(e){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){const e=this.cache.isStoreFullyLoaded(),t=this.gos.get("serverSideEnableClientSideSort");if(!(e&&t)){const e=this.cache.getRowCount(),t=this.cache.isLastRowIndexKnown();return this.destroyBean(this.cache),void(this.cache=this.createManagedBean(new Vj(this,e,t,this.storeParams)))}this.cache.clientSideSortRows()}this.forEachChildStoreShallow((t=>t.refreshAfterSort(e)))}refreshAfterFilter(e){!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)?this.refreshStore(!0):this.forEachChildStoreShallow((t=>t.refreshAfterFilter(e)))}refreshStore(e){if(e)return this.destroyBean(this.cache),this.cache=this.createManagedBean(new Vj(this,1,!1,this.storeParams)),void this.fireStoreUpdatedEvent();this.cache.markNodesForRefresh()}getTopLevelRowDisplayedIndex(e){return this.cache.getDisplayIndexFromStoreIndex(e)??e}isLastRowIndexKnown(){return this.cache.isLastRowIndexKnown()}getRowNodesInRange(e,t){return this.cache.getNodes().filter((i=>{let{node:s}=i;return s.rowIndex>=e.rowIndex&&s.rowIndex<=t.rowIndex})).map((e=>{let{node:t}=e;return t}))}addStoreStates(e){e.push({suppressInfiniteScroll:!1,route:this.parentRowNode.getRoute()??[],rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow((t=>t.addStoreStates(e)))}getIdSequence(){return this.idSequence}getParentNode(){return this.parentRowNode}getRowDetails(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}}getSsrmParams(){return this.ssrmParams}setStoreInfo(e){e&&Object.assign(this.info,e)}fireStoreUpdatedEvent(){this.eventService.dispatchEvent({type:"storeUpdated"})}fireRefreshFinishedEvent(){this.eventService.dispatchEvent({type:"storeRefreshed",route:this.parentRowNode.getRoute()})}getBlockStates(){return this.cache.getBlockStates()}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}getCache(){return this.cache}};var Hj=class{constructor(){this.root=null,this.end=null,this.cachedRange=[]}init(e){this.rowModel=e}reset(){this.root=null,this.end=null,this.cachedRange.length=0}setRoot(e){this.root=e,this.end=null,this.cachedRange.length=0}setEndRange(e){this.end=e,this.cachedRange.length=0}getRoot(){return this.root}getRange(){if(0===this.cachedRange.length){const e=this.root?this.rowModel.getRowNode(this.root):void 0,t=this.end?this.rowModel.getRowNode(this.end):void 0;if(null==e||null==t)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)}return this.cachedRange}isInRange(e){return null!==this.root&&this.getRange().some((t=>t.id===e))}truncate(e){const t=this.getRange();if(0===t.length)return{keep:[],discard:[]};const i=t[0].id===this.root,s=t.findIndex((t=>t.id===e));if(s>-1){const n=t.slice(0,s),r=t.slice(s+1);return this.setEndRange(e),i?{keep:n,discard:r}:{keep:r,discard:n}}return{keep:t,discard:[]}}extend(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==this.root){const i=this.getRange().slice(),s=this.rowModel.getRowNode(e);return s&&(t&&s.depthFirstSearch((e=>!e.group&&i.push(e))),i.push(s)),this.setRoot(e),{keep:i,discard:[]}}const i=this.rowModel.getRowNode(e),s=this.rowModel.getRowNode(this.root);if(null==i)return{keep:this.getRange(),discard:[]};if(null==s)return{keep:this.getRange().concat(i),discard:[]};if(this.rowModel.getNodesInRangeForSelection(s,i).find((e=>e.id===this.end)))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const t=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:t}}}},Wj=class extends ze{constructor(){super(...arguments),this.selectionCtx=new Hj,this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectAllUsed=!1,this.selectedNodes={}}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.selectionCtx.init(this.rowModel)}getSelectedState(){return{selectAll:this.selectedState.selectAll,toggledNodes:[...this.selectedState.toggledNodes]}}setSelectedState(e){const t={selectAll:!1,toggledNodes:new Set};if("object"!==typeof e)return c("The provided selection state should be an object.");if(!("selectAll"in e))return c("Invalid selection state. The state must conform to `IServerSideSelectionState`.");if("boolean"!==typeof e.selectAll)return c("selectAll must be of boolean type.");if(t.selectAll=e.selectAll,!("toggledNodes"in e)||!Array.isArray(e.toggledNodes))return h("`toggledNodes` must be an array of str
2ing ids.");e.toggledNodes.forEach((e=>{"string"===typeof e?t.toggledNodes.add(e):h(`Provided ids must be of string type. Invalid id provided: ${e}`)}));const i=t.selectAll||t.toggledNodes.size>1;if(re(this.gos)&&!me(this.gos)&&i)return h("cannot multi select unless selection mode is 'multiRow'");this.selectedState=t}deleteSelectionStateFromParent(e,t){if(0===this.selectedState.toggledNodes.size)return!1;let i=!1;return t.forEach((e=>{this.selectedState.toggledNodes.delete(e)&&(i=!0)})),i}overrideSelectionValue(e,t){if(!qh(t))return e;const i=this.selectionCtx.getRoot(),s=i?this.rowModel.getRowNode(i):null;return!s||(s.isSelected()??!1)}setNodesSelected(e){var t=this;const{nodes:i,clearSelection:s,newValue:n,rangeSelect:r,source:o}=e;if(0===i.length)return 0;const a=s&&n&&!r;if(!me(this.gos)||a){if(i.length>1)throw new Error("AG Grid: cannot select multiple rows when rowSelection.mode is set to 'singleRow'");const e=i[0];return n&&e.selectable?(this.selectedNodes={[e.id]:e},this.selectedState={selectAll:!1,toggledNodes:new Set([e.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),e.selectable&&this.selectionCtx.setRoot(e.id),1}const l=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;i&&e.selectable?t.selectedNodes[e.id]=e:delete t.selectedNodes[e.id];i===t.selectedState.selectAll||!e.selectable?t.selectedState.toggledNodes.delete(e.id):t.selectedState.toggledNodes.add(e.id)};if(r){if(i.length>1)throw new Error("AG Grid: cannot select multiple rows when using rangeSelect");const e=i[0],t=this.overrideSelectionValue(n,o);if(this.selectionCtx.isInRange(e.id)){const i=this.selectionCtx.truncate(e.id);t&&i.discard.forEach((e=>l(e,!1))),i.keep.forEach((e=>l(e,t)))}else{if(this.selectionCtx.getRoot()!==e.id){const i=this.selectionCtx.extend(e.id);t&&i.discard.forEach((e=>l(e,!1))),i.keep.forEach((e=>l(e,t)))}}return 1}return i.forEach((e=>l(e))),this.selectionCtx.setRoot(Se(i).id),1}processNewRow(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)}isNodeSelected(e){const t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t}getSelectedNodes(){return this.selectAllUsed&&h("getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model.\n                Use `api.getServerSideSelectionState()` instead."),Object.values(this.selectedNodes)}getSelectedRows(){return this.getSelectedNodes().map((e=>e.data))}getSelectionCount(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size}clearOtherNodes(e,t){const i=this.selectedState.selectAll?1:this.selectedState.toggledNodes.size-1;return this.selectedState={selectAll:!1,toggledNodes:new Set([e.id])},this.rowModel.forEachNode((i=>{i!==e&&i.selectThisNode(!1,void 0,t)})),this.eventService.dispatchEvent({type:"selectionChanged",source:t}),i}isEmpty(){return!this.selectedState.selectAll&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.selectedState={selectAll:!0,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed=!0,this.selectionCtx.reset()}deselectAllRowNodes(){this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectedNodes={},this.selectionCtx.reset()}getSelectAllState(){return this.selectedState.selectAll?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null}},jj=class extends ze{constructor(){super(...arguments),this.selectionCtx=new Hj,this.selectedState={selectAllChildren:!1,toggledNodes:new Map}}wireBeans(e){this.rowModel=e.rowModel,this.funcColsService=e.funcColsService,this.filterManager=e.filterManager,this.selectionService=e.selectionService}postConstruct(){this.addManagedEventListeners({modelUpdated:()=>this.removeRedundantState(),columnRowGroupChanged:()=>this.selectionService.reset("rowGroupChanged")}),this.selectionCtx.init(this.rowModel)}getSelectedState(){const e=this.gos.get("treeData"),t=(i,s,n)=>{const r={nodeId:n};if((e||s<=this.funcColsService.getRowGroupColumns().length)&&(r.selectAllChildren=i.selectAllChildren),i.toggledNodes.size){const e=[];
2i.toggledNodes.forEach(((i,n)=>{const r=t(i,s+1,n);e.push(r)})),r.toggledNodes=e}return r};return t(this.selectedState,0)}setSelectedState(e){if("selectAll"in e)return c("Invalid selection state. When `groupSelectsChildren` is enabled, the state must conform to `IServerSideGroupSelectionState`.");const t=(e,i)=>{if("object"!==typeof e)throw new Error("Each provided state object must be an object.");if("selectAllChildren"in e&&"boolean"!==typeof e.selectAllChildren)throw new Error("`selectAllChildren` must be a boolean value or undefined.");if("toggledNodes"in e){if(!Array.isArray(e.toggledNodes))throw new Error("`toggledNodes` must be an array.");if(!e.toggledNodes.every((e=>"object"===typeof e&&"nodeId"in e&&"string"===typeof e.nodeId)))throw new Error("Every `toggledNode` requires an associated string id.")}const s=e.selectAllChildren??!i,n=e.toggledNodes?.map((e=>[e.nodeId,t(e,s)])),r=n?.some((e=>{let[,t]=e;return s===t.selectAllChildren&&0===t.toggledNodes.size}));if(r)throw new Error("\n                    Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.\n                    Please rebuild the selection state and reapply it.\n                ");return{selectAllChildren:s,toggledNodes:new Map(n)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch(i){c(i.message)}}deleteSelectionStateFromParent(e,t){let i=this.selectedState;const s=[...e];for(;i&&s.length;)i=i.toggledNodes.get(s.pop());if(!i)return!1;let n=!1;return t.forEach((e=>{i?.toggledNodes.delete(e)&&(n=!0)})),n&&this.removeRedundantState(),n}overrideSelectionValue(e,t){if(!qh(t))return e;const i=this.selectionCtx.getRoot(),s=i?this.rowModel.getRowNode(i):null;return!s||(s.isSelected()??!1)}setNodesSelected(e){let{nodes:t,newValue:i,rangeSelect:s,clearSelection:n,source:r}=e;if(0===t.length)return 0;if(s){if(t.length>1)throw new Error("AG Grid: cannot select multiple rows when using rangeSelect");const e=t[0],s=this.overrideSelectionValue(i,r);if(this.selectionCtx.isInRange(e.id)){const t=this.selectionCtx.truncate(e.id);return s&&this.selectRange(t.discard,!1),this.selectRange(t.keep,s),1}if(this.selectionCtx.getRoot()!==e.id){const t=this.selectionCtx.extend(e.id,!0);return s&&this.selectRange(t.discard,!1),this.selectRange(t.keep,s),1}return 1}const o=n&&i&&!s;if(!me(this.gos)||o){if(t.length>1)throw new Error("AG Grid: cannot select multiple rows when rowSelection.mode is set to 'singleRow'");this.deselectAllRowNodes()}return t.forEach((e=>{const t=this.getRouteToNode(e);this.recursivelySelectNode(t,this.selectedState,i)})),this.removeRedundantState(),this.selectionCtx.setRoot(Se(t).id),1}selectRange(e,t){const i=e.map(this.getRouteToNode).sort(((e,t)=>t.length-e.length)),s=new Set;i.forEach((e=>{s.has(Se(e))||(e.forEach((e=>s.add(e))),this.recursivelySelectNode(e,this.selectedState,t))})),this.removeRedundantState()}isNodeSelected(e){const t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)}isNodePathSelected(e,t){let[i,...s]=e;if(0===s.length){const e=t.toggledNodes.has(i.id);if(i.hasChildren()){const e=t.toggledNodes.get(i.id);if(e&&e.toggledNodes.size)return}return t.selectAllChildren?!e:e}if(t.toggledNodes.has(i.id)){const e=t.toggledNodes.get(i.id);if(e)return this.isNodePathSelected(s,e)}return t.selectAllChildren}getRouteToNode(e){const t=[];let i=e;for(;i.parent;)t.push(i),i=i.parent;return t.reverse()}removeRedundantState(){var e=this;if(this.filterManager?.isAnyFilterPresent())return;const t=function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.selectedState,s=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(i.toggledNodes.forEach(((e,s)=>{t(e,s,i)})),s){const t=e.rowModel.getRowNode(s),n=t?.childStore,r=n?.isLastRowIndexKnown();if(r){if(i.toggledNodes.size>=n.getRowCount()){for(const t of i.toggledNodes.entries()){const[i,s]=t;if(s.toggledNodes.size>0)return;if(!e.rowModel.getRowNode(i))return}i.selectAllChildren=!i.selectAllChildren,i.toggledNodes.clear()}}}const r=0===i.toggledNodes.size,o=n?.selectAllChildren===i.selectAllChildren;r&&o&&n?.toggledNodes.delete(s)};t()}recursivelySelectNode(e,t,i){let[s,...n]=e;if(!s)return;if(!n.length){const e=s.selectable;if(t.selectAllChildren===i||!e)return void t.toggledNodes.delete(s.id);const n={selectAllChildren:i,toggledNodes:new Map};return void t.toggledNodes.set(s.id,n)}const r=t.toggledNodes.has(s.id),o=t.toggledNodes.get(s.id)??{selectAllChildren:t.selectAllChildren,toggledNodes:new Map};r||t.toggledNodes.set(s.id,o),this.recursivelySelectNode(n,o,i),t.selectAllChildren===o.selectAllChildren&&0===o.toggledNodes.size&&t.toggledNodes.delete(s.id)}getSelectedNodes(){h("`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model.\n            Use `api.getServerSideSelectionState()` instead.");const e=[];return this.rowModel.forEachNode((t=>{t.isSelected()&&e.push(t)})),e}processNewRow(){}
2getSelectedRows(){return this.getSelectedNodes().map((e=>e.data))}getSelectionCount(){return-1}isEmpty(){return!this.selectedState.selectAllChildren&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.selectedState={selectAllChildren:!0,toggledNodes:new Map},this.selectionCtx.reset()}deselectAllRowNodes(){this.selectedState={selectAllChildren:!1,toggledNodes:new Map},this.selectionCtx.reset()}getSelectAllState(){return this.selectedState.selectAllChildren?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null}};function Uj(e){let{justCurrentPage:t,justFiltered:i}=e;(t||i)&&h(`selecting just ${t?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`)}var _j="32.3.3",Kj={version:_j,moduleName:`${r.ServerSideRowModelModule}-core`,rowModel:"serverSide",beans:[class extends ze{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=f(this.onRowHeightChanged.bind(this),100),this.pauseStoreUpdateListening=!1,this.started=!1,this.managingPivotResultColumns=!1}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.pivotResultColsService=e.pivotResultColsService,this.funcColsService=e.funcColsService,this.filterManager=e.filterManager,this.sortController=e.sortController,this.rowRenderer=e.rowRenderer,this.nodeManager=e.ssrmNodeManager,this.storeFactory=e.ssrmStoreFactory,this.beans=e,this.pivotColDefService=e.pivotColDefService}ensureRowHeightsValid(){return!1}start(){this.started=!0,this.updateDatasource()}destroyDatasource(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)}postConstruct(){const e=this.resetRootStore.bind(this);this.addManagedEventListeners({newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onStoreUpdated.bind(this),columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e,columnPivotModeChanged:e}),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","suppressServerSideInfiniteScroll","cacheBlockSize"],e),this.addManagedPropertyListener("groupAllowUnbalanced",(()=>this.onStoreUpdated())),this.addManagedPropertyListener("rowHeight",(()=>this.resetRowHeights())),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",(()=>this.updateDatasource()))}updateDatasource(){const e=this.gos.get("serverSideDatasource");e&&this.setDatasource(e)}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&h("initialGroupOrderComparator cannot be used with Server Side Row Model."),N(this.gos)&&!this.gos.exists("getRowId")&&h("getRowId callback must be provided for Server Side Row Model selection to work correctly.")}setDatasource(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())}applyRowData(e,t,i){const s=this.getRootStore();if(!s)return;const n=s.getChildStore(i);n&&(n instanceof zj?n.applyRowData(e,t,e.rowData.length):n instanceof Oj&&n.processServerResult(e))}isLastRowIndexKnown(){const e=this.getRootStore();return!!e&&e.isLastRowIndexKnown()}onColumnEverything(){if(!this.storeParams)return void this.resetRootStore();const e=this.columnsToValueObjects(this.funcColsService.getRowGroupColumns()),t=this.columnsToValueObjects(this.funcColsService.getValueColumns()),i=this.columnsToValueObjects(this.funcColsService.getPivotColumns()),s=e=>{const t={};e.oldCols.forEach((e=>t[e.id]=e));const i=e.newCols.every((e=>{const i=t[e.id];return i&&delete t[e.id],i&&i.field===e.field&&i.aggFunc===e.aggFunc})),s=!e.allowRemovedColumns&&!!Object.values(t).length;return i&&!s},n=!E(this.storeParams.sortModel,this.sortController.getSortModel()),r=!s({oldCols:this.storeParams.rowGroupCols,newCols:e}),o=!s({oldCols:this.storeParams.pivotCols,newCols:i}),a=!!e?.length&&!s({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0});if(n||r||o||a)this.resetRootStore();else{const e=this.createStoreParams();this.storeParams.rowGroupCols=e.rowGroupCols,this.storeParams.pivotCols=e.pivotCols,this.storeParams.valueCols=e.valueCols}}destroyRootStore(){this.rootNode&&this.rootNode.childStore&&(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())}refreshAfterSort(e,t){this.storeParams&&(this.storeParams.sortModel=e);const i=this.getRootStore();i&&(i.refreshAfterSort(t),this.onStoreUpdated())}generateSecondaryColumns(e){if(!this.pivotColDefService)return void this.gos.assertModuleRegistered(r.RowGroupingModule,"pivotResultFields");const t=this.pivotColDefService.createColDefsFromFields(e);this.managingPivotResultColumns=!0,this.pivotResultColsService.setPivotResultCols(t,"rowModelUpdated")}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes(),t=B(this.gos,this.rootNode);
2if(this.rootNode.setRowHeight(t.height,t.estimated),this.rootNode.sibling){const e=B(this.gos,this.rootNode.sibling);this.rootNode.sibling.setRowHeight(e.height,e.estimated)}e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode((t=>{const i=B(this.gos,t);t.setRowHeight(i.height,i.estimated);const s=t.detailNode;if(s){const e=B(this.gos,s);s.setRowHeight(e.height,e.estimated)}if(t.sibling){const e=B(this.gos,t.sibling);s.setRowHeight(e.height,e.estimated)}e=!0})),e}resetRootStore(){this.destroyRootStore(),this.rootNode=new Yn(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds()),this.managingPivotResultColumns&&(this.pivotResultColsService.setPivotResultCols(null,"api"),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)}columnsToValueObjects(e){return e.map((e=>({id:e.getId(),aggFunc:e.getAggFunc(),displayName:this.columnNameService.getDisplayNameForColumn(e,"model"),field:e.getColDef().field})))}createStoreParams(){const e=this.columnsToValueObjects(this.funcColsService.getRowGroupColumns()),t=this.columnsToValueObjects(this.funcColsService.getValueColumns()),i=this.columnsToValueObjects(this.funcColsService.getPivotColumns()),s=G(this.gos);return{valueCols:t,rowGroupCols:e,pivotCols:i,pivotMode:this.columnModel.isPivotMode(),filterModel:this.filterManager?.isAdvancedFilterEnabled()?this.filterManager?.getAdvancedFilterModel():this.filterManager?.getFilterModel()??{},sortModel:this.sortController.getSortModel(),datasource:this.datasource,lastAccessedSequence:new ws,dynamicRowHeight:s}}getParams(){return this.storeParams}dispatchModelUpdated(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.eventService.dispatchEvent({type:"modelUpdated",animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1})}onStoreUpdated(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}onRowHeightChanged(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()}updateRowIndexesAndBounds(){const e=this.getRootStore();e&&e.setDisplayIndexes(new ws,{value:0},0)}retryLoads(){const e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())}getRow(e){const t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)}setPaused(e){this.pauseStoreUpdateListening=e}expandAll(e){this.pauseStoreUpdateListening=!0,this.forEachNode((t=>{t.stub||t.hasChildren()&&t.setExpanded(e)})),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()}refreshAfterFilter(e,t){this.storeParams&&(this.storeParams.filterModel=e);const i=this.getRootStore();i&&(i.refreshAfterFilter(t),this.onStoreUpdated())}getRootStore(){if(this.rootNode&&this.rootNode.childStore)return this.rootNode.childStore}getRowCount(){const e=this.getRootStore();return e?e.getDisplayIndexEnd():0}getTopLevelRowCount(){const e=this.getRootStore();return e?e.getRowCount():1}getTopLevelRowDisplayedIndex(e){const t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e}getRowBounds(e){const t=this.getRootStore();if(!t){return{rowTop:0,rowHeight:V(this.gos)}}return t.getRowBounds(e)}getBlockStates(){const e=this.getRootStore();if(!e)return;const t={};return e.forEachStoreDeep((e=>{if(e instanceof Oj){const{id:i,state:s}=e.getBlockStateJson();t[i]=s}else{if(!(e instanceof zj))throw new Error("AG Grid: Unsupported store type");Object.entries(e.getBlockStates()).forEach((e=>{let[i,s]=e;t[i]=s}))}})),t}getRowIndexAtPixel(e){const t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)}isEmpty(){return!1}isRowsToRender(){return null!=this.getRootStore()&&this.getRowCount()>0}getType(){return"serverSide"}forEachNode(e){const t=this.getRootStore();t&&t.forEachNodeDeep(e)}forEachNodeAfterFilterAndSort(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.getRootStore();i&&i.forEachNodeDeepAfterFilterAndSort(e,void 0,t)}executeOnStore(e,t){if(!this.started)return!1;const i=this.getRootStore();if(!i)return!0;const s=i.getChildStore(e);return s&&t(s),!0}refreshStore(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.route?e.route:[];this.executeOnStore(t,(t=>t.refreshStore(1==e.purge)))}getStoreState(){const e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e}getNodesInRangeForSelection(e,t){const i=e.rowIndex,s=t.rowIndex;if(null===i&&null===s)return[];if(null===s)return e?[e]:[];if(null===i)return[t];const n=[],[r,o]=[i,s].sort(((e,t)=>e-t));return this.forEachNode((e=>{const t=e.rowIndex;null==t||e.stub||t>=r&&t<=o&&n.push(e)})),n.length!==o-r+1?e?[e,t]:[]:n}getRowNode(e){let t;return this.forEachNode((i=>{i.id===e&&(t=i),i.detailNode&&i.detailNode.id===e&&(t=i.detailNode)})),t}isRowPresent(e){return!!this.getRowNode(e.id)}setRowCount(e,t){const i=this.getRootStore();if(i){if(i instanceof zj)return void i.setRowCount(e,t);c("Infinite scrolling must be enabled in order to set the row count.")}}destroy(){this.destroyDatasource(),this.destroyRootStore(),super.destroy()}},class extends ze{constructor(){super(...arguments),this.beanName="ssrmExpandListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory,this.beans=e}postConstruct(){F(this.gos)&&this.addManagedEventListeners({rowGroupOpened:this.onRowGroupOpened.bind(this)})}onRowGroupOpened(e){const t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(b(t.childStore)){const e=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(e,t))}}else this.gos.get("purgeClosedRowNodes")&&w(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));this.eventService.dispatchEvent({type:"storeUpdated"})}createDetailNode(e){if(w(e.detailNode))return e.detailNode;const t=new Yn(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,w(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;const i=B(this.gos,t).height;return t.rowHeight=i||200,e.detailNode=t,t}},class extends ze{constructor(){super(...arguments),this.beanName="ssrmSortService"}wireBeans(e){this.sortController=e.sortController,this.serverSideRowModel=e.rowModel,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){F(this.gos)&&this.addManagedEventListeners({sortChanged:this.onSortChanged.bind(this)})}onSortChanged(){const e=this.serverSideRowModel.getParams();if(!e)return;const t=this.sortController.getSortModel(),i=e.sortModel,s=this.findChangedColumnsInSort(t,i),n={valueColChanged:this.listenerUtils.isSortingWithValueColumn(s),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(s),changedColumns:s};this.serverSideRowModel.refreshAfterSort(t,n)}findChangedColumnsInSort(e,t){let i=[];[e,t].forEach((e=>{if(e){const t=e.map((e=>e.colId));i=i.concat(t)}}));return i.filter((i=>{const s=t.find((e=>e.colId===i)),n=e.find((e=>e.colId===i));return((e,t)=>(e?e.sort:null)!==(t?t.sort:null))(s,n)||((i,s)=>(i?t.indexOf(i):-1)!==(s?e.indexOf(s):-1))(s,n)}))}},class extends ze{constructor(){super(...arguments),this.beanName="ssrmStoreUtils"}wireBeans(e){this.columnModel=e.columnModel,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}loadFromDatasource(e){const{storeParams:t,parentBlock:i,parentNode:s}=e,n=s.getRoute()??[];if(!t.datasource)return;const r={startRow:e.startRow,endRow:e.endRow,rowGroupCols:t.rowGroupCols,valueCols:t.valueCols,pivotCols:t.pivotCols,pivotMode:t.pivotMode,groupKeys:n,filterModel:t.filterModel,sortModel:t.sortModel},o=this.gos.addGridCommonParams({success:e.success,fail:e.fail,request:r,parentNode:e.parentNode});window.setTimeout((()=>{t.datasource&&i.isAlive()?t.datasource.getRows(o):e.fail()}),0)}getChildStore(e,t,i){if(x(e))return t;const s=i(e[0]);if(s){if(1===e.length&&!s.childStore){const e=this.serverSideRowModel.getParams();s.childStore=this.createBean(this.storeFactory.createStore(e,s))}const t=e.slice(1,e.length),i=s.childStore;return i?i.getChildStore(t):null}return null}isServerRefreshNeeded(e,t,i){if(i.valueColChanged||i.secondaryColChanged)return!0;const s=e.level+1;if(!(s<t.length))return!0;const n=t[s].id;if(i.changedColumns.indexOf(n)>-1)return!0;return this.columnModel.getCols().filter((e=>e.getColDef().showRowGroup&&i.changedColumns.includes(e.getId()))).map((e=>e.getColDef().showRowGroup)).some((e=>!0===e||e===n))}getServerSideInitialRowCount(){return this.gos.get("serverSideInitialRowCount")}assertRowModelIsServerSide(e){return!!F(this.gos)||(h(`The '${e}' property can only be used with the Server Side Row Model.`),!1)}
2assertNotTreeData(e){return!this.gos.get("treeData")||(h(`The '${e}' property cannot be used while using tree data.`),!1)}isServerSideSortAllLevels(){return this.gos.get("serverSideSortAllLevels")&&this.assertRowModelIsServerSide("serverSideSortAllLevels")}isServerSideOnlyRefreshFilteredGroups(){return this.gos.get("serverSideOnlyRefreshFilteredGroups")&&this.assertRowModelIsServerSide("serverSideOnlyRefreshFilteredGroups")}isServerSideSortOnServer(){return this.gos.get("serverSideSortOnServer")&&this.assertRowModelIsServerSide("serverSideSortOnServer")&&this.assertNotTreeData("serverSideSortOnServer")}isServerSideFilterOnServer(){return this.gos.get("serverSideFilterOnServer")&&this.assertRowModelIsServerSide("serverSideFilterOnServer")&&this.assertNotTreeData("serverSideFilterOnServer")}},class extends ze{constructor(){super(...arguments),this.beanName="ssrmBlockUtils"}wireBeans(e){this.valueService=e.valueService,this.showRowGroupColsService=e.showRowGroupColsService,this.nodeManager=e.ssrmNodeManager,this.beans=e,this.expansionService=e.expansionService,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}createRowNode(e){const t=new Yn(this.beans),i=null!=e.rowHeight?e.rowHeight:V(this.gos);return t.setRowHeight(i),t.group=e.group,t.leafGroup=e.leafGroup,t.level=e.level,t.uiLevel=e.level,t.parent=e.parent,t.stub=!0,t.__needsRefreshWhenVisible=!1,t.group&&(t.expanded=!1,t.field=e.field,t.rowGroupColumn=e.rowGroupColumn),t}destroyRowNodes(e){e&&e.forEach((e=>this.destroyRowNode(e)))}destroyRowNode(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.childStore&&!t&&(this.destroyBean(e.childStore),e.childStore=null),e.sibling&&!e.footer&&this.destroyRowNode(e.sibling,!1),e.clearRowTopAndRowIndex(),null!=e.id&&this.nodeManager.removeNode(e)}setTreeGroupInfo(e){e.updateHasChildren();const t=this.gos.get("getServerSideGroupKey");e.hasChildren()&&null!=t&&(e.key=t(e.data)),e.hasChildren()||null==e.childStore||(this.destroyBean(e.childStore),e.childStore=null,e.expanded=!1)}setRowGroupInfo(e){e.key=this.valueService.getValue(e.rowGroupColumn,e),null!==e.key&&void 0!==e.ke
2y||a((()=>{h("null and undefined values are not allowed for server side row model keys"),e.rowGroupColumn&&h(`column = ${e.rowGroupColumn.getId()}`),h("data is "+e.data)}),"ServerSideBlock-CannotHaveNullOrUndefinedForKey");if(this.gos.get("groupAllowUnbalanced")&&""===e.key){const t=this.serverSideRowModel.getParams();e.childStore=this.createBean(this.storeFactory.createStore(t,e))}J(this.beans.gos)({node:e})&&(e.createFooter(),e.sibling&&(e.sibling.uiLevel=e.uiLevel+1))}setMasterDetailInfo(e){const t=this.gos.get("isRowMaster");e.master=null==t||t(e.data)}updateDataIntoRowNode(e,t){if(e.updateData(t),this.gos.get("treeData"))this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e);else if(e.group){if(this.setChildCountIntoRowNode(e),!e.footer){J(this.beans.gos)({node:e})?e.sibling?e.sibling.updateData(t):e.createFooter():e.sibling&&e.destroyFooter()}}else this.gos.get("masterDetail")}setDataIntoRowNode(e,t,i,s){e.stub=!1;const n=this.gos.get("treeData");w(t)?(e.setDataAndId(t,i),n?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.gos.get("masterDetail")&&this.setMasterDetailInfo(e)):(e.setDataAndId(void 0,void 0),e.key=null),(n||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),w(t)&&(e.setRowHeight(B(this.gos,e,!1,s).height),e.sibling?.setRowHeight(B(this.gos,e.sibling,!1,s).height))}setChildCountIntoRowNode(e){const t=this.gos.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))}setGroupDataIntoRowNode(e){const t=this.showRowGroupColsService?.getShowRowGroupCols()??[],i=this.gos.get("treeData");t.forEach((t=>{if(null==e.groupData&&(e.groupData={}),i)e.groupData[t.getColId()]=e.key;else if(t.isRowGroupDisplayed(e.rowGroupColumn.getId())){const i=this.valueService.getValue(e.rowGroupColumn,e);e.groupData[t.getColId()]=i}}))}clearDisplayIndex(e){e.clearRowTopAndRowIndex();if(e.hasChildren()&&w(e.childStore)){e.childStore.clearDisplayIndexes()}e.master&&e.detailNode&&e.detailNode.clearRowTopAndRowIndex()}setDisplayIndex(e,t,i,s){const n=this.gos.get("groupAllowUnbalanced")&&e.group&&""===e.key;if(this.gos.get("groupHideOpenParents")&&e.group&&e.expanded||n?(e.setRowIndex(null),e.setRowTop(null)):(e.setRowIndex(t.next()),e.setRowTop(i.value),i.value+=e.rowHeight),e.setUiLevel(s),e.footer)return;e.master&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.next()),e.detailNode.setRowTop(i.value),i.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex());if(e.hasChildren()&&w(e.childStore)){const r=e.childStore;e.expanded||n?r.setDisplayIndexes(t,i,n?s:s+1):r.clearDisplayIndexes()}}binarySearchForDisplayIndex(e,t){let i=0,s=t.length-1;if(b(s)||b(i))h(`error: topPointer = ${s}, bottomPointer = ${i}`);else for(;;){const n=Math.floor((i+s)/2),r=t[n];if(r.rowIndex===e)return r;const o=r.master&&r.expanded,a=r.detailNode;if(o&&a&&a.rowIndex===e)return r.detailNode;const l=r.childStore;if(r.expanded&&l&&l.isDisplayIndexInStore(e))return l.getRowUsingDisplayIndex(e);if(r.rowIndex<e)i=n+1;else{if(!(r.rowIndex>e))return void h(`error: unable to locate rowIndex = ${e} in cache`);s=n-1}}}extractRowBounds(e,t){const i=e=>({rowHeight:e.rowHeight,rowTop:e.rowTop});if(e.rowIndex===t)return i(e);if(e.hasChildren()&&e.expanded&&w(e.childStore)){const i=e.childStore;if(i.isDisplayIndexInStore(t))return i.getRowBounds(t)}else if(e.master&&e.expanded&&w(e.detailNode)&&e.detailNode.rowIndex===t)return i(e.detailNode)}isPixelInNodeRange(e,t){return!(!w(e.rowTop)||!w(e.rowHeight))&&(t>=e.rowTop&&t<e.rowTop+e.rowHeight)}getIndexAtPixel(e,t){if(this.isPixelInNodeRange(e,t))return e.rowIndex;const i=e.master&&e.expanded,s=e.detailNode;if(i&&s&&this.isPixelInNodeRange(s,t))return e.detailNode.rowIndex;if(e.hasChildren()&&e.expanded&&w(e.childStore)){const i=e.childStore;if(i.isPixelInRange(t))return i.getRowIndexAtPixel(t)}return null}createNodeIdPrefix(e){const t=[];let i=e;for(;i&&i.level>=0;)""===i.key?t.push("ag-Grid-MissingKey"):t.push(i.key),i=i.parent;if(t.length>0)return t.reverse().join("-")}checkOpenByDefault(e){return this.expansionService.checkOpenByDefault(e)}},class extends ze{constructor(){super(...arguments),this.beanName="ssrmNodeManager",this.rowNodes={}}addRowNode(e){const t=e.id;this.rowNodes[t]&&(h(`Duplicate node id ${e.id}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`),h("first instance",this.rowNodes[t].data),h("second instance",e.data)),this.rowNodes[t]=e}removeNode(e){const t=e.id;this.rowNodes[t]&&(this.rowNodes[t]=void 0)}destroy(){this.clear(),super.destroy()}clear(){this.rowNodes={},super.destroy()}},class extends ze{constructor(){super(...arguments),this.beanName="ssrmTransactionManager",this.asyncTransactions=[]}wireBeans(e){this.valueCache=e.valueCache,this.serverSideRowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){F(this.gos)}applyTransactionAsync(e,t){null==this.asyncTransactionsTimeout&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})}scheduleExecuteAsync(){const e=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimeout=window.setTimeout((()=>{this.executeAsyncTransactions()}),e)}executeAsyncTransactions(){if(!this.asyncTransactions)return;const e=[],t=[],i=[];let s=!1;this.asyncTransactions.forEach((n=>{let r;this.serverSideRowModel.executeOnStore(n.transaction.route,(e=>{r=e.applyTransaction(n.transaction)}))?void 0==r&&(r={status:Dl.StoreNotFound}):r={status:Dl.StoreNotStarted},t.push(r);r.status==Dl.StoreLoading?i.push(n):(n.callback&&e.push((()=>n.callback(r))),r.status===Dl.Applied&&(s=!0))})),e.length>0&&window.setTimeout((()=>{e.forEach((e=>e()))}),0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=i,s&&(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:"storeUpdated"})),t.length>0&&this.eventService.dispatchEvent({type:"asyncTransactionsFlushed",results:t})}flushAsyncTransactions(){null!=this.asyncTransactionsTimeout&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()}applyTransaction(e){let t;if(this.serverSideRowModel.executeOnStore(e.route,(i=>{t=i.applyTransaction(e)}))){if(t){if(this.valueCache.onDataChanged(),t.remove){const i=t.remove.map((e=>e.id));this.selectionService.deleteSelectionStateFromParent(e.route||[],i)}return this.eventService.dispatchEvent({type:"storeUpdated"}),t}return{status:Dl.StoreNotFound}}return{status:Dl.StoreNotStarted}}},class extends ze{constructor(){super(...arguments),this.beanName="ssrmFilterListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.filterManager=e.filterManager,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){F(this.gos)&&this.addManagedEventListeners({advancedFilterEnabledChanged:()=>this.onFilterChanged(!0),filterChanged:()=>this.onFilterChanged()})}onFilterChanged(e){const t=this.serverSideRowModel.getParams();if(!t)return;const i=t.filterModel;let s,n;if(this.filterManager?.isAdvancedFilterEnabled()){s=this.filterManager.getAdvancedFilterModel();const t=e?Object.keys(i??{}):this.getAdvancedFilterColumns(i),r=this.getAdvancedFilterColumns(s);t.forEach((e=>r.add(e))),n=Array.from(r)}else if(s=this.filterManager?.getFilterModel()??{},e){const e=this.getAdvancedFilterColumns(i);
2Object.keys(s).forEach((t=>e.add(t))),n=Array.from(e)}else n=this.findChangedColumns(i,s);const r={valueColChanged:this.listenerUtils.isSortingWithValueColumn(n),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(n),changedColumns:n};this.serverSideRowModel.refreshAfterFilter(s,r)}findChangedColumns(e,t){const i={};Object.keys(e).forEach((e=>i[e]=!0)),Object.keys(t).forEach((e=>i[e]=!0));const s=[];return Object.keys(i).forEach((i=>{JSON.stringify(e[i])!=JSON.stringify(t[i])&&s.push(i)})),s}getAdvancedFilterColumns(e){const t=new Set;if(!e)return t;const i=e=>{"join"===e.filterType?e.conditions.forEach((e=>i(e))):t.add(e.colId)};return i(e),t}},class extends ze{constructor(){super(...arguments),this.beanName="ssrmStoreFactory"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}createStore(e,t){const i=this.getStoreParams(e,t);return new(i.suppressInfiniteScroll?Oj:zj)(e,i,t)}getStoreParams(e,t){const i=this.getLevelSpecificParams(t),s=this.isInfiniteScroll(i);return{suppressInfiniteScroll:!s,cacheBlockSize:this.getBlockSize(s,i),maxBlocksInCache:this.getMaxBlocksInCache(s,e,i)}}getMaxBlocksInCache(e,t,i){if(!e)return;const s=i&&null!=i.maxBlocksInCache?i.maxBlocksInCache:this.gos.get("maxBlocksInCache");if(null!=s&&s>=0)if(t.dynamicRowHeight){h("Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.")}else{if(!this.columnModel.isAutoRowHeightActive())return s;h("Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.")}}getBlockSize(e,t){if(!e)return;const i=t&&null!=t.cacheBlockSize?t.cacheBlockSize:this.gos.get("cacheBlockSize");return null!=i&&i>0?i:100}getLevelSpecificParams(e){const t=this.gos.getCallback("getServerSideGroupLevelParams");if(!t)return;return t({level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.funcColsService.getRowGroupColumns(),pivotColumns:this.funcColsService.getPivotColumns(),pivotMode:this.columnModel.isPivotMode()})}isInfiniteScroll(e){return!(e&&null!=e.suppressInfiniteScroll?e.suppressInfiniteScroll:this.isSuppressServerSideInfiniteScroll())}isSuppressServerSideInfiniteScroll(){return this.gos.get("suppressServerSideInfiniteScroll")}},class extends ze{constructor(){super(...arguments),this.beanName="ssrmListenerUtils"}wireBeans(e){this.pivotResultColsService=e.pivotResultColsService,this.funcColsService=e.funcColsService}isSortingWithValueColumn(e){const t=this.funcColsService.getValueColumns().map((e=>e.getColId()));for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return!0;return!1}isSortingWithSecondaryColumn(e){const t=this.pivotResultColsService.getPivotResultCols();if(!t)return!1;const i=t.list.map((e=>e.getColId()));for(let s=0;s<e.length;s++)if(i.indexOf(e[s])>-1)return!0;return!1}},class extends ze{constructor(){super(...arguments),this.beanName="selectionService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],(()=>{const e=ve(this.gos),t=e&&this.selectionStrategy instanceof Wj?jj:!e&&this.selectionStrategy instanceof jj?Wj:void 0;t&&(this.destroyBean(this.selectionStrategy),this.selectionStrategy=this.createManagedBean(new t),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))})),this.addManagedPropertyListeners(["rowSelection"],(()=>{const e=ge(this.gos);e!==this.selectionMode&&(this.selectionMode=e,this.deselectAllRowNodes({source:"api"}))})),this.selectionMode=ge(this.gos);const e=ve(this.gos)?jj:Wj;this.selectionStrategy=this.createManagedBean(new e)}getSelectionState(){return this.selectionStrategy.getSelectedState()}setSelectionState(e,t){Array.isArray(e)||(this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged(t))}setNodesSelected(e){const{nodes:t,...i}=e;if(t.length>1&&"multiRow"!==this.selectionMode)return h("cannot multi select unless selection mode is 'multiRow'"),0;if(t.length>1&&e.rangeSelect)return h("cannot use range selection when multi selecting rows"),0;const s={nodes:t.filter((e=>e.selectable)),...i};if(!s.nodes.length)return 0;const n=this.selectionStrategy.setNodesSelected(s);
2return this.shotgunResetNodeSelectionState(s.source),this.dispatchSelectionChanged(s.source),n}deleteSelectionStateFromParent(e,t){this.selectionStrategy.deleteSelectionStateFromParent(e,t)&&(this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}shotgunResetNodeSelectionState(e){this.rowModel.forEachNode((t=>{if(t.stub)return;const i=this.selectionStrategy.isNodeSelected(t);i!==t.isSelected()&&t.selectThisNode(i,void 0,e)}))}getSelectedNodes(){return this.selectionStrategy.getSelectedNodes()}getSelectedRows(){return this.selectionStrategy.getSelectedRows()}getSelectionCount(){return this.selectionStrategy.getSelectionCount()}syncInRowNode(e){this.selectionStrategy.processNewRow(e);const t=this.selectionStrategy.isNodeSelected(e);if(0!=t&&!e.selectable)return this.selectionStrategy.setNodesSelected({nodes:[e],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState(),void this.dispatchSelectionChanged("api");e.setSelectedInitialValue(t)}reset(){this.selectionStrategy.deselectAllRowNodes({source:"api"})}isEmpty(){return this.selectionStrategy.isEmpty()}hasNodesToSelect(){return!0}selectAllRowNodes(e){if(Uj(e),re(this.gos)&&"multiRow"!==ge(this.gos))return h("cannot multi select unless selection mode is 'multiRow'");this.selectionStrategy.selectAllRowNodes(e),this.rowModel.forEachNode((t=>{t.stub||t.selectThisNode(!0,void 0,e.source)})),this.dispatchSelectionChanged(e.source)}deselectAllRowNodes(e){Uj(e),this.selectionStrategy.deselectAllRowNodes(e),this.rowModel.forEachNode((t=>{t.stub||t.selectThisNode(!1,void 0,e.source)})),this.dispatchSelectionChanged(e.source)}getSelectAllState(e,t){return this.selectionStrategy.getSelectAllState(e,t)}updateGroupsFromChildrenSelections(){return!1}getBestCostNodeSelection(){h("calling gridApi.getBestCostNodeSelection() is only possible when using rowModelType=`clientSide`.")}filterFromSelection(){}dispatchSelectionChanged(e){this.eventService.dispatchEvent({type:"selectionChanged",source:e})}},class extends Xa{constructor(){super(...arguments),this.beanName="expansionService",this.queuedRowIds=new Set}wireBeans(e){super.wireBeans(e),this.serverSideRowModel=e.rowModel}postConstruct(){super.postConstruct(),this.addManagedEventListeners({columnRowGroupChanged:()=>{this.queuedRowIds.clear()}})}checkOpenByDefault(e){if(!e.isExpandable())return;if(this.queuedRowIds.has(e.id))return this.queuedRowIds.delete(e.id),void e.setExpanded(!0);const t=this.gos.getCallback("isServerSideGroupOpenByDefault");if(!t)return;t({data:e.data,rowNode:e})&&e.setExpanded(!0)}expandRows(e){e.forEach((e=>{const t=this.serverSideRowModel.getRowNode(e);t?t.setExpanded(!0):this.queuedRowIds.add(e)}))}expandAll(e){this.serverSideRowModel.expandAll(e)}onGroupExpandedOrCollapsed(){}},Gj],dependantModules:[ek,Rl]},$j={version:_j,moduleName:`${r.ServerSideRowModelModule}-api`,beans:[Rc],apiFunctions:{getServerSideSelectionState:function(e){return e.selectionService.getSelectionState()},setServerSideSelectionState:function(e,t){e.selectionService.setSelectionState(t,"api")},applyServerSideTransaction:function(e,t){return e.ssrmTransactionManager?.applyTransaction(t)},applyServerSideTransactionAsync:function(e,t,i){return e.ssrmTransactionManager?.applyTransactionAsync(t,i)},applyServerSideRowData:function(e,t){const i=t.startRow??0,s=t.route??[];i<0?h(`invalid value ${t.startRow} for startRow, the value should be >= 0`):e.rowModelHelperService?.getServerSideRowModel()?.applyRowData(t.successParams,i,s)},retryServerSideLoads:function(e){e.rowModelHelperService?.getServerSideRowModel()?.retryLoads()},flushServerSideAsyncTransactions:function(e){return e.ssrmTransactionManager?.flushAsyncTransactions()},refreshServerSide:function(e,t){e.rowModelHelperService?.getServerSideRowModel()?.refreshStore(t)},getServerSideGroupLevelState:function(e){return e.rowModelHelperService?.getServerSideRowModel()?.getStoreState()??[]}},dependantModules:[Kj,Ec,Ac]},Yj={version:_j,moduleName:r.ServerSideRowModelModule,dependantModules:[Kj,$j]},Zj=class{};Zj.SELECT_ALL="__AG_SELECT_ALL__",Zj.ADD_SELECTION_TO_FILTER="__AG_ADD_SELECTION_TO_FILTER__";var qj={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noM
2atches:"No matches."},Qj=class extends Rs{constructor(e){super(e.isGroup?'\n            <div class="ag-set-filter-item" aria-hidden="true">\n                <span class="ag-set-filter-group-icons">\n                    <span class="ag-set-filter-group-closed-icon" data-ref="eGroupClosedIcon"></span>\n                    <span class="ag-set-filter-group-opened-icon" data-ref="eGroupOpenedIcon"></span>\n                    <span class="ag-set-filter-group-indeterminate-icon" data-ref="eGroupIndeterminateIcon"></span>\n                </span>\n                <ag-checkbox data-ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>\n            </div>':'\n            <div class="ag-set-filter-item">\n                <ag-checkbox data-ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>\n            </div>',[Ys]),this.eCheckbox=Is,this.eGroupOpenedIcon=Is,this.eGroupClosedIcon=Is,this.eGroupIndeterminateIcon=Is,this.focusWrapper=e.focusWrapper,this.value=e.value,this.params=e.params,this.translate=e.translate,this.valueFormatter=e.valueFormatter,this.item=e.item,this.isSelected=e.isSelected,this.isTree=e.isTree,this.depth=e.depth??0,this.isGroup=e.isGroup,this.groupsExist=e.groupsExist,this.isExpanded=e.isExpanded,this.hasIndeterminateExpandState=e.hasIndeterminateExpandState}wireBeans(e){this.valueService=e.valueService,this.userComponentFactory=e.userComponentFactory}postConstruct(){this.addDestroyFunc((()=>this.destroyCellRendererComponent?.())),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&(this.addCssClass("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth))),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),mi(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),this.params.readOnly||this.eCheckbox.onValueChange((e=>this.onCheckboxChanged(!!e)))}getFocusableElement(){return this.focusWrapper}setupExpansion(){this.eGroupClosedIcon.appendChild(Ts("setFilterGroupClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(Ts("setFilterGroupOpen",this.gos,null));const e=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:e}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:e}),this.hasIndeterminateExpandState&&(this.eGroupIndeterminateIcon.appendChild(Ts("setFilterGroupIndeterminate",this.gos,null)),this.addManagedElementListeners(this.eGroupIndeterminateIcon,{click:e})),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(e,t){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;const i={type:"expandedChanged",isExpanded:!!e,item:this.item};t||this.dispatchLocalEvent(i),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){Ki(this.eGroupClosedIcon,this.hasIndeterminateExpandState?!1===this.isExpanded:!this.isExpanded),Ki(this.eGroupOpenedIcon,!0===this.isExpanded),this.hasIndeterminateExpandState&&Ki(this.eGroupIndeterminateIcon,void 0===this.isExpanded)}onCheckboxChanged(e){this.isSelected=e;const t={type:"selectionChanged",isSelected:e,item:this.item};this.dispatchLocalEvent(t),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;const e=this.localeService.getLocaleTextFunc(),t=this.eCheckbox.getValue(),i=void 0===t?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),s=e("ariaToggleVisibility","Press SPACE to toggle visibility");ui(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${s} (${i})`)}setupFixedAriaLabels(e){if(!this.isTree)return;const t=this.localeService.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();di(i,`${e} ${t}`),pi(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){const e=this.getAriaElement();var t,i;t=e,i=this.eCheckbox.getValue(),ai(t,"checked",void 0===i?"mixed":i)}refreshAriaExpanded(){Ci(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,i){if(this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(i,!0),this.valueFunction){const e=this.valueFunction();this.setTooltipAndCellRendererParams(e,e),this.cellRendererComponent||this.renderCellWithoutCellRenderer()}if(this.cellRendererComponent){const e=this.cellRendererComponent.refresh?.(this.cellRendererParams);if(!e){const e=this.cellRendererComponent;this.renderCell(),this.destroyBean(e)}}}render(){const{params:{column:e}}=this;let{value:t}=this,i=null;"function"===typeof t?(this.valueFunction=t,i=this.valueFunction(),t=i):i=this.isTree?M(t):this.getFormattedValue(e,t),this.setTooltipAndCellRendererParams(t,i),this.renderCell()}setTooltipAndCellRendererParams(e,t){const i="whenTruncated"===this.gos.get("tooltipShowMode");if(this.params.showTooltips&&(!i||!this.params.cellRenderer)){const s=null!=t?t:M(e);let n;i&&(n=()=>{const e=this.eCheckbox.getGui().querySelector(".ag-label");return!e||e.scrollWidth>e.clientWidth}
2),this.setTooltip({newTooltipText:s,location:"setFilterValue",getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,shouldDisplayTooltip:n})}this.cellRendererParams=this.gos.addGridCommonParams({value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,location:"setFilterValue",shouldDisplayTooltip:t})}})}getTooltipParams(){const e=super.getTooltipParams();return e.location="setFilterValue",e.colDef=this.getComponentHolder(),this.isTree&&(e.level=this.depth),e}getFormattedValue(e,t){return this.valueService.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){const e=this.userComponentFactory.getSetFilterCellRendererDetails(this.params,this.cellRendererParams),t=e?e.newAgStackInstance():void 0;null!=t?t.then((e=>{e&&(this.cellRendererComponent=e,this.eCheckbox.setLabel(e.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(e))})):this.renderCellWithoutCellRenderer()}renderCellWithoutCellRenderer(){let e=(null==this.cellRendererParams.valueFormatted?this.cellRendererParams.value:this.cellRendererParams.valueFormatted)??this.translate("blanks");"string"!==typeof e&&(h(`Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects. See ${this.getFrameworkOverrides().getDocLink("filter-set-filter-list/#filter-value-types")}`),e=""),this.eCheckbox.setLabel(e),this.setupFixedAriaLabels(e)}getComponentHolder(){return this.params.column.getColDef()}},Xj=class{getModelAsString(e,t){const{values:i}=e||t.getModel()||{},s=t.getValueModel();if(null==i||null==s)return"";const n=i.filter((e=>s.isKeyAvailable(e))),r=n.length;return`(${r}) ${n.slice(0,10).map((e=>t.getFormattedValue(e))).join(",")}${r>10?",...":""}`}};function Jj(e,t,i){let s=e;return s?(s=s.map((e=>M(S(e)))),!t&&i&&s.some((e=>null==e))?null==Se(s)?null:s.filter((e=>null!=e)):s):null}var eU=class{constructor(e,t,i,s,n,r,o,a,l,h,c){this.rowModel=e,this.filterParams=t,this.createKey=i,this.caseFormat=s,this.funcColsService=n,this.valueService=r,this.treeDataOrGrouping=o,this.treeData=a,this.getDataPath=l,this.groupAllowUnbalanced=h,this.addManagedEventListeners=c}extractUniqueValuesAsync(e,t){return new an((i=>{if(this.rowModel.isRowDataLoaded())i(this.extractUniqueValues(e,t));else{const[s]=this.addManagedEventListeners({rowCountReady:()=>{s?.(),i(this.extractUniqueValues(e,t))}})}}))}extractUniqueValues(e,t){const i=new Map,s=this.extractExistingFormattedKeys(t),n=new Set,r=this.treeData&&!!this.getDataPath,o=this.funcColsService.getRowGroupColumns(),a=(e,r)=>{const o=this.caseFormat(e);if(!n.has(o)){n.add(o);let a=e,l=S(r);const h=s?.get(o);null!=h&&(a=h,l=t.get(h)),i.set(a,l)}};return this.rowModel.forEachLeafNode((t=>{if(!t.data||!e(t))return;if(this.treeDataOrGrouping)return void this.addValueForTreeDataOrGrouping(t,r,o,a);const i=this.getValue(t);null!=i&&Array.isArray(i)?(i.forEach((e=>{a(this.createKey(e,t),e)})),0===i.length&&a(null,null)):a(this.createKey(i,t),i)})),i}addValueForTreeDataOrGrouping(e,t,i,s){let n;if(t){if(e.childrenAfterGroup?.length)return;n=this.getDataPath(e.data)}else n=i.map((t=>this.valueService.getKeyForNode(t,e))),n.push(this.getValue(e));const r=Jj(n,t,this.groupAllowUnbalanced);s(this.createKey(r),r)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;const t=new Map;return e.forEach(((e,i)=>{t.set(this.caseFormat(i),i)})),t}},tU=class{constructor(e){let{caseFormat:t}=e;this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=t}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}noAppliedFilteringKeys(){return this.hasNoAppliedFilteringKeys}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||0===this.filteringKeys.size,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach((e=>this.filteringKeysCaseFormatted.add(this.caseFormat(e))))}addFilteringKey(e){null==this.filteringKeys&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},iU=class{constructor(e,t,i,s){this.valueService=e,this.valueFormatter=t,this.formatter=i,this.column=s,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,i){this.displayedKeys=Array.from(i)}updateDisplayedValuesToMatchMiniFilter(e,t,i,s,n){this.displayedKeys=[];for(const r of i)if(null==r)n&&this.displayedKeys.push(r);else{const t=e(r),i=this.valueService.formatValue(this.column,null,t,this.valueFormatter,!1);s(this.formatter(i))&&this.displayedKeys.push(r)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return Zj.SELECT_ALL}getAddSelectionToFilterItem(){return Zj.ADD_SELECTION_TO_FILTER}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},sU=e=>e?[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())]:null,nU=class{constructor(e,t,i,s){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=i,this.treeDataOrGrouping=s,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasse
2s:!0,available:!0,treeKey:Zj.SELECT_ALL,children:this.allDisplayedItemsTree,expanded:!0,key:Zj.SELECT_ALL,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:Zj.ADD_SELECTION_TO_FILTER,expanded:!0,key:Zj.ADD_SELECTION_TO_FILTER,parentTreeKeys:[]}}updateOnParamsChange(e){this.treeListFormatter=e}updateDisplayedValuesToAllAvailable(e,t,i,s){"reload"===s?this.generateItemTree(e,t,i):"otherFilter"===s?(this.updateAvailable(i),this.updateExpandAll()):"miniFilter"===s&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,i,s,n,r){"reload"===r?this.generateItemTree(e,t,i):"otherFilter"===r&&this.updateAvailable(i),this.updateFilter(s,n),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,i){this.allDisplayedItemsTree=[],this.groupsExist=!1;const s=this.getTreeListPathGetter(e,i);for(const n of t){const t=s(e(n))??[null];t.length>1&&(this.groupsExist=!0);const r=i.has(n);let o,a=this.allDisplayedItemsTree,l=[];t.forEach(((e,i)=>{a||(a=[],o.children=a),o=a.find((t=>t.treeKey?.toUpperCase()===e?.toUpperCase())),o||(o={treeKey:e,depth:i,filterPasses:!0,expanded:!1,available:r,parentTreeKeys:l},i===t.length-1&&(o.key=n),a.push(o)),a=o.children,l=[...l,e]}))}this.updateAvailable(i),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(e,t){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return e=>e;let i=!1;for(const s of t){const t=e(s);if(t instanceof Date){i=!0;break}if(null!=t)break}return i?sU:(h("property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date."),e=>[String(e)])}flattenItems(){this.activeDisplayedItemsFlat=[];const e=t=>{t.forEach((t=>{t.filterPasses&&t.available&&(this.activeDisplayedItemsFlat.push(t),t.children&&t.expanded&&e(t.children))}))};e(this.allDisplayedItemsTree)}resetFilter(){const e=t=>{t.children&&t.children.forEach((t=>{e(t)})),t.filterPasses=!0};this.allDisplayedItemsTree.forEach((t=>e(t)))}updateFilter(e,t){const i=i=>!!i.available&&(null==i.treeKey?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)));this.allDisplayedItemsTree.forEach((e=>this.recursiveItemCheck(e,!1,i,"filterPasses")))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){const e=[];return this.forEachDisplayedKey((t=>e.push(t))),e}forEachDisplayedKey(e){const t=(i,s)=>{i.children?i.expanded&&s||i.children.forEach((e=>{e.filterPasses&&t(e,!1)})):e(i.key)};this.activeDisplayedItemsFlat.forEach((e=>t(e,!0)))}someDisplayedKey(e){const t=(i,s)=>i.children?(!i.expanded||!s)&&i.children.some((e=>!!e.filterPasses&&t(e,!1))):e(i.key);return this.activeDisplayedItemsFlat.some((e=>t(e,!0)))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){const e=(t,i,s)=>{for(const n of t){if(!n.filterPasses||!n.available||!n.children)continue;if(i=i||!!n.expanded,s=s||!n.expanded,i&&s)return;const t=e(n.children,i,s);if(void 0===t)return;t?i=!0:s=!0}return i&&s?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,i,s){let n=!1;e.children&&e.children.forEach((r=>{const o=this.recursiveItemCheck(r,t||i(e),i,s);n=n||o}));const r=t||n||i(e);return e[s]=r,r}updateAvailable(e){const t=t=>e.has(t.key);this.allDisplayedItemsTree.forEach((e=>this.recursiveItemCheck(e,!1,t,"available")))}},rU=class{constructor(e){this.localEventService=new n,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;const{usingComplexObjects:t,funcColsService:i,valueService:s,treeDataTreeList:r,groupingTreeList:o,filterParams:a,gos:l,valueFormatter:h,addManagedEventListeners:c}=e,{column:d,colDef:u,textFormatter:p,doesRowPassOtherFilter:g,suppressSorting:m,comparator:f,rowModel:v,values:y,caseSensitive:C,treeList:S,treeListPathGetter:w,treeListFormatter:b}=a;this.filterParams=a,this.gos=l,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=p??(e=>e??null),this.doesRowPassOtherFilters=g,this.suppressSorting=m||!1,this.filteringKeys=new tU({caseFormat:this.caseFormat});const x=f??u.comparator,M=!!r||!!o;this.compareByValue=!!(t&&x||M||S&&!w),this.entryComparator=M&&!x?this.createTreeDataOrGroupingComparator():!S||w||x?(e,t)=>{let[i,s]=e,[n,r]=t;return x(s,r)}:(e,t)=>{let[i,s]=e,[n,r]=t;return A(s,r)},this.keyComparator=x??A,this.caseSensitive=!!C;const D=l.get("getDataPath"),I=l.get("groupAllowUnbalanced");L(l)&&(this.clientSideValuesExtractor=new eU(v,this.filterParams,this.createKey,this.caseFormat,i,s,M,!!r,D,I,c)),null==y?this.valuesType=2:(this.valuesType=Array.isArray(y)?0:1,this.providedValues=y),this.displayValueModel=S?new nU(this.formatter,w,b,r||o):new iU(s,h,this.formatter,d),this.updateAllValues().then((e=>this.resetSelectionState(e||[])))}addEventListener(e,t,i){this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService.removeEventListener(e,t,i)}updateOnParamsChange(e){return new an((t=>{const{values:i,textFormatter:s,suppressSorting:n,treeListFormatter:r}=e,o=this.providedValues,a=this.suppressSorting;if(this.filterParams=e,this.formatter=s??(e=>e??null),this.suppressSorting=n||!1,this.providedValues=i??null,this.displayValueModel instanceof nU&&this.displayValueModel.updateOnParamsChange(r),this.providedValues!==o||this.suppressSorting!==a){i&&0!==i.length?this.valuesType=Array.isArray(i)?0:1:(this.valuesType=2,this.providedValues=null);const e=this.getModel();this.updateAllValues().then((()=>{this.setModel(e).then((()=>t()))}))}else t()}))}refreshValues(){return new an((e=>{this.allValuesPromise.then((()=>{const t=this.getModel();this.updateAllValues(),this.setModel(t).then((()=>e()))}))}))}overrideValues(e){return new an((t=>{this.allValuesPromise.then((()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then((()=>t()))}))}))}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then((e=>(this.updateAvailableKeys(e??[],"otherFilter"),!0))):an.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new an((e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then((t=>e(this.processAllValues(t))));break;case 0:e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break;case 1:{this.setIsLoading(!0);const t=this.providedValues,{column:i,colDef:s}=this.filterParams,n=this.gos.addGridCommonParams({success:t=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(t))))},colDef:s,column:i});window.setTimeout((()=>t(n)),0);break}default:throw new Error("Unrecognised valuesType")}})),this.allValuesPromise.then((e=>this.updateAvailableKeys(e||[],"reload"))).then((()=>this.initialised=!0)),this.allValuesPromise}processAllValues(e){const t=this.sortKeys(e);return this.allValues=e??new Map,t}
2validateProvidedValues(e){if(this.usingComplexObjects&&e?.length){const t=e[0];if(t&&"object"!==typeof t&&"function"!==typeof t){h(null==this.createKey(t)?"Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types":"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?")}}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return 2===this.valuesType}updateAvailableKeys(e,t){const i=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):e;this.availableKeys=new Set(i),this.localEventService.dispatchEvent({type:"availableValuesChanged"}),this.updateDisplayedValues(t,e)}sortKeys(e){const t=e??new Map;if(this.suppressSorting)return Array.from(t.keys());let i;return i=this.compareByValue?Array.from(t.entries()).sort(this.entryComparator).map((e=>{let[t]=e;return t})):Array.from(t.keys()).sort(this.keyComparator),this.filterParams.excelMode&&t.has(null)&&(i=i.filter((e=>null!=e)),i.push(null)),i}getParamsForValuesFromRows(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.clientSideValuesExtractor)return c("Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values"),null;return{predicate:t=>!e||this.doesRowPassOtherFilters(t),existingValues:e&&!this.caseSensitive?this.allValues:void 0}}getValuesFromRows(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingV
2alues):null}getValuesFromRowsAsync(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):an.resolve(null)}setMiniFilter(e){return e=S(e),this.miniFilterText!==e&&(null===e&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if("expansion"===e)return void this.displayValueModel.refresh();if(null==this.miniFilterText)return void this.displayValueModel.updateDisplayedValuesToAllAvailable((e=>this.getValue(e)),t,this.availableKeys,e);const i=this.caseFormat(this.formatter(this.miniFilterText)||""),s=e=>null!=e&&this.caseFormat(e).indexOf(i)>=0,n=!!this.filterParams.excelMode&&s(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter((e=>this.getValue(e)),t,this.availableKeys,s,n,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return"windows"===this.filterParams.excelMode}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&w(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null==this.miniFilterText?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey((e=>this.selectedKeys.add(e))))}deselectAllMatchingMiniFilter(){null==this.miniFilterText?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey((e=>this.selectedKeys.delete(e)))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey((e=>!this.isKeySelected(e)))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey((e=>this.isKeySelected(e)))}getModel(){if(!this.hasSelections())return null;const e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(e&&e.size>0){if(this.selectedKeys){const t=new Set([...Array.from(e),...Array.from(this.selectedKeys).filter((t=>!e.has(t)))]);return Array.from(t)}return Array.from(e)}return Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then((t=>{if(null==e)this.resetSelectionState(t??[]);else{this.selectedKeys.clear();const t=new Map;this.allValues.forEach(((e,i)=>{t.set(this.caseFormat(i),i)})),e.forEach((e=>{const i=this.caseFormat(S(e)),s=t.get(i);void 0!==s&&this.selectKey(s)}))}}))}uniqueValues(e){const t=new Map,i=new Set;return(e??[]).forEach((e=>{const s=S(e),n=this.createKey(s),r=this.caseFormat(n);i.has(r)||(i.add(r),t.set(n,s))})),t}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return(e,t)=>{let[i,s]=e,[n,r]=t;if(null==s)return null==r?0:-1;if(null==r)return 1;for(let o=0;o<s.length;o++){if(o>=r.length)return 1;const e=A(s[o],r[o]);if(0!==e)return e}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.noAppliedFilteringKeys()}},oU=class extends rr{constructor(){super("setFilter"),this.eMiniFilter=Is,this.eFilterLoading=Is,this.eSetFilterList=Is,this.eFilterNoMatches=Is,this.valueModel=null,this.setFilterParams=null,this.virtualList=null,this.caseSensitive=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new Xj,this.updateSetFilterOnParamsChange=e=>{this.setFilterParams=e,this.caseSensitive=!!e.caseSensitive;const t=e.keyCreator??e.colDef.keyCreator;this.setValueFormatter(e.valueFormatter,t,!!e.treeList,!!e.colDef.refData);const i=e.column.getId().startsWith(_e);this.treeDataTreeList=this.gos.get("treeData")&&!!e.treeList&&i,this.getDataPath=this.gos.get("getDataPath"),this.groupingTreeList=!!this.funcColsService.getRowGroupColumns().length&&!!e.treeList&&i,this.createKey=this.generateCreateKey(t,this.treeDataTreeList||this.groupingTreeList)}}wireBeans(e){super.wireBeans(e),this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.dataTypeService=e.dataTypeService}
2postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return`\n            <div class="ag-set-filter">\n                <div data-ref="eFilterLoading" class="ag-filter-loading ag-hidden">${this.translateForSetFilter("loadingOoo")}</div>\n                <ag-input-text-field class="ag-mini-filter" data-ref="eMiniFilter"></ag-input-text-field>\n                <div data-ref="eFilterNoMatches" class="ag-filter-no-matches ag-hidden">${this.translateForSetFilter("noMatches")}</div>\n                <div data-ref="eSetFilterList" class="ag-set-filter-list" role="presentation"></div>\n            </div>`}getAgComponents(){return[vr]}handleKeyDown(e){if(super.handleKeyDown(e),!e.defaultPrevented)switch(e.key){case js.SPACE:this.handleKeySpace(e);break;case js.ENTER:this.handleKeyEnter(e);break;case js.LEFT:this.handleKeyLeft(e);break;case js.RIGHT:this.handleKeyRight(e)}}handleKeySpace(e){this.getComponentForKeyEvent(e)?.toggleSelected()}handleKeyEnter(e){if(!this.setFilterParams)return;const{excelMode:t,readOnly:i}=this.setFilterParams||{};t&&!i&&(e.preventDefault(),this.onBtApply(!1,!1,e),"mac"===this.setFilterParams.excelMode&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(e){this.getComponentForKeyEvent(e)?.setExpanded(!1)}handleKeyRight(e){this.getComponentForKeyEvent(e)?.setExpanded(!0)}getComponentForKeyEvent(e){if(!this.eSetFilterList.contains(K(this.gos))||!this.virtualList)return;const t=this.virtualList.getLastFocusedRow();if(null==t)return;const i=this.virtualList.getComponentAt(t);if(null==i)return;e.preventDefault();const{readOnly:s}=this.setFilterParams??{};return s?void 0:i}getCssIdentifier(){return"set-filter"}setModel(e){return null==e&&null==this.valueModel?.getModel()?(this.setMiniFilter(null),an.resolve()):super.setModel(e)}refresh(e){if(this.applyExcelModeOptions(e),!super.refresh(e))return!1;const t=this.setFilterParams;return!["treeList","treeListPathGetter","caseSensitive","comparator","excelMode"].some((i=>e[i]!==t?.[i]))&&(!this.haveColDefParamsChanged(e)&&(super.updateParams(e),this.updateSetFilterOnParamsChange(e),this.updateMiniFilter(),e.suppressSelectAll!==t?.suppressSelectAll&&this.createVirtualListModel(e),this.valueModel?.updateOnParamsChange(e).then((()=>{this.refreshFilterValues()})),!0))}haveColDefParamsChanged(e){const{colDef:t,keyCreator:i}=e,{colDef:s,keyCreator:n}=this.setFilterParams??{},r=i??t.keyCreator,o=n??s?.keyCreator,a=t.filterValueGetter!==s?.filterValueGetter,l=r!==o,h=!!this.dataTypeService&&!!r&&this.dataTypeService.getFormatValue(t.cellDataType)===r&&t.valueFormatter!==s?.valueFormatter;return a||l||h}setModelAndRefresh(e){return this.valueModel?this.valueModel.setModel(e).then((()=>{this.isAlive()&&this.checkAndRefreshVirtualList()})):an.resolve()}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(e){this.setMiniFilter(null);const t=null==e?null:e.values;return this.setModelAndRefresh(t)}getModelFromUi(){if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.valueModel.getModel();return e?{values:e,filterType:this.getFilterType()}:null}getFilterType(){return"set"}getValueModel(){return this.valueModel}areModelsEqual(e,t){return null==e&&null==t||null!=e&&null!=t&&we(e.values,t.values)}setParams(e){this.applyExcelModeOptions(e),super.setParams(e),this.updateSetFilterOnParamsChange(e);const t=e.keyCreator??e.colDef.keyCreator;this.valueModel=new rU({filterParams:e,setIsLoading:e=>this.setIsLoading(e),translate:e=>this.translateForSetFilter(e),caseFormat:e=>this.caseFormat(e),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!t,gos:this.gos,funcColsService:this.funcColsService,valueService:this.valueService,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedEventListeners:e=>this.addManagedEventListeners(e)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setAddCurrentSelectionToFilter(e)}setValueFormatter(e,t,i,s){let n=e;if(!n){if(t&&!i)throw new Error("AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator");this.noValueFormatterSupplied=!0,s||(n=e=>M(e.value))}this.valueFormatter=n}generateCreateKey(e,t){var i=this;if(t&&!e)throw new Error("AG Grid: Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.");return e?function(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=i.getKeyCreatorParams(t,s);return S(e(n))}:e=>S(M(e))}getFormattedValue(e){let t=this.valueModel.getValue(e);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(t)&&(t=Se(t));const i=this.valueService.formatValue(this.setFilterParams.column,null,t,this.valueFormatter,!1);return(null==i?M(t):i)??this.translateForSetFilter("blanks")}applyExcelModeOptions(e){"windows"===e.excelMode?(e.buttons||(e.buttons=["apply","cancel"]),null==e.closeOnApply&&
2(e.closeOnApply=!0)):"mac"===e.excelMode&&(e.buttons||(e.buttons=["reset"]),null==e.applyMiniFilterWhileTyping&&(e.applyMiniFilterWhileTyping=!0),null==e.debounceMs&&(e.debounceMs=500)),e.excelMode&&e.defaultToNothingSelected&&(e.defaultToNothingSelected=!1,h('The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.'))}addEventListenersForDataChanges(){this.isValuesTakenFromGrid()&&(this.addManagedEventListeners({cellValueChanged:e=>{this.setFilterParams&&e.column===this.setFilterParams.column&&this.syncAfterDataChange()}}),this.addManagedPropertyListeners(["treeData","getDataPath","groupAllowUnbalanced"],(()=>{this.syncAfterDataChange()})))}syncAfterDataChange(){if(!this.valueModel)throw new Error("Value model has not been created.");return this.valueModel.refreshValues().then((()=>{this.checkAndRefreshVirtualList(),this.applyActive&&!this.areModelsEqual(this.getModel(),this.getModelFromUi())||this.onBtApply(!1,!0)}))}setIsLoading(e){Ki(this.eFilterLoading,e),e||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter()}initVirtualList(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const e=this.localeService.getLocaleTextFunc()("ariaFilterList","Filter List"),t=!!this.setFilterParams.treeList,i=this.virtualList=this.createBean(new lk({cssIdentifier:"filter",ariaRole:t?"tree":"listbox",listName:e})),s=this.eSetFilterList;t&&s.classList.add("ag-set-filter-tree-list"),s&&s.appendChild(i.getGui());const{cellHeight:n}=this.setFilterParams;null!=n&&i.setRowHeight(n);i.setComponentCreator(((e,i)=>this.createSetListItem(e,t,i)));i.setComponentUpdater(((e,t)=>this.updateSetListItem(e,t))),this.createVirtualListModel(this.setFilterParams)}createVirtualListModel(e){if(!this.valueModel)return;let t;t=e.suppressSelectAll?new aU(this.valueModel):new lU(this.valueModel,(()=>this.isSelectAllSelected())),e.treeList&&(t=new hU(t)),this.virtualList?.setModel(t)}getSelectAllLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const e=null!=this.valueModel.getMiniFilter()&&this.setFilterParams.excelMode?"selectAllSearchResults":"selectAll";return this.translateForSetFilter(e)}getAddSelectionToFilterLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(e,t,i){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const s=this.valueModel.hasGroups(),{isSelected:n,isExpanded:r}=this.isSelectedExpanded(e),{value:o,depth:a,isGroup:l,hasIndeterminateExpandState:h,selectedListener:c,expandedListener:d}=this.newSetListItemAttributes(e),u={focusWrapper:i,value:o,params:this.setFilterParams,translate:e=>this.translateForSetFilter(e),valueFormatter:this.valueFormatter,item:e,isSelected:n,isTree:t,depth:a,groupsExist:s,isGroup:l,isExpanded:r,hasIndeterminateExpandState:h},p=this.createBean(new Qj(u));return p.addEventListener("selectionChanged",c),d&&p.addEventListener("expandedChanged",d),p}newSetTreeItemAttributes(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const t=this.valueModel.hasGroups();return e.key===Zj.SELECT_ALL?{value:()=>this.getSelectAllLabel(),isGroup:t,depth:e.depth,hasIndeterminateExpandState:!0,selectedListener:e=>this.onSelectAll(e.isSelected),expandedListener:e=>this.onExpandAll(e.item,e.isExpanded)}:e.key===Zj.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),depth:e.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:e.children?{value:this.setFilterParams.treeListFormatter?.(e.treeKey,e.depth,e.parentTreeKeys)??e.treeKey,depth:e.depth,isGroup:!0,selectedListener:e=>this.onGroupItemSelected(e.item,e.isSelected),expandedListener:e=>this.onExpandedChanged(e.item,e.isExpanded)}:{value:this.setFilterParams.treeListFormatter?.(e.treeKey,e.depth,e.parentTreeKeys)??e.treeKey,depth:e.depth,selectedListener:e=>this.onItemSelected(e.item.key,e.isSelected)}}newSetListItemAttributes(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.isSetFilterModelTreeItem(e)?this.newSetTreeItemAttributes(e):e===Zj.SELECT_ALL?{value:()=>this.getSelectAllLabel(),selectedListener:e=>this.onSelectAll(e.isSelected)}:e===Zj.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:{value:this.valueModel.getValue(e),selectedListener:e=>this.onItemSelected(e.item,e.isSelected)}}updateSetListItem(e,t){const{isSelected:i,isExpanded:s}=this.isSelectedExpanded(e);t.refresh(e,i,s)}isSelectedExpanded(e){let t,i;return this.isSetFilterModelTreeItem(e)?(i=e.expanded,t=e.key===Zj.SELECT_ALL?this.isSelectAllSelected():e.key===Zj.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():e.children?this.areAllChildrenSelected(e):this.valueModel.isKeySelected(e.key)):t=e===Zj.SELECT_ALL?this.isSelectAllSelected():e===Zj.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():this.valueModel.isKeySelected(e),{isSelected:t,isExpanded:i}}isSetFilterModelTreeItem(e){return void 0!==e?.treeKey}initMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{eMiniFilter:e,localeService:t}=this,i=t.getLocaleTextFunc();e.setDisplayed(!this.setFilterParams.suppressMiniFilter),e.setValue(this.valueModel.getMiniFilter()),e.onValueChange((()=>this.onMiniFilterInput())),e.setInputAriaLabel(i("ariaSearchFilterValues","Search f
2ilter values")),this.addManagedElementListeners(e.getInputElement(),{keydown:e=>this.onMiniFilterKeyDown(e)})}updateMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{eMiniFilter:e}=this;e.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&e.setDisplayed(!this.setFilterParams.suppressMiniFilter);const t=this.valueModel.getMiniFilter();e.getValue()!==t&&e.setValue(t)}afterGuiAttached(e){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");super.afterGuiAttached(e),this.resetExpansion(),this.refreshVirtualList();const{eMiniFilter:t}=this;t.setInputPlaceholder(this.translateForSetFilter("searchOoo")),e&&e.suppressFocus||(t.isDisplayed()?t.getFocusableElement().focus():this.virtualList?.awaitStable((()=>this.virtualList?.focusRow(0))))}afterGuiDetached(){super.afterGuiDetached(),this.setFilterParams?.excelMode&&this.resetMiniFilter();const e=this.getModel();!this.setFilterParams?.excelMode&&this.areModelsEqual(e,this.getModelFromUi())||(this.resetUiToActiveModel(e),this.showOrHideResults())}applyModel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"api";if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");this.setFilterParams.excelMode&&"rowDataUpdated"!==e&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();const t=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(t&&!this.getModel())return!1;const i=super.applyModel(e),s=this.getModel();return s?(t||this.valueModel.setAppliedModelKeys(new Set),s.values.forEach((e=>{this.valueModel.addToAppliedModelKeys(e)}))):t||this.valueModel.setAppliedModelKeys(null),i}isModelValid(e){return!this.setFilterParams||!this.setFilterParams.excelMode||(null==e||e.values.length>0)}doesFilterPass(e){if(!this.setFilterParams||!this.valueModel||!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;const{node:t,data:i}=e;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(t,i);if(this.groupingTreeList)return this.doesFilterPassForGrouping(t);const s=this.getValueFromNode(t);return null!=s&&Array.isArray(s)?0===s.length?this.valueModel.hasAppliedModelKey(null):s.some((e=>this.isInAppliedModel(this.createKey(e,t)))):this.isInAppliedModel(this.createKey(s,t))}doesFilterPassForTreeData(e,t){return!e.childrenAfterGroup?.length&&this.isInAppliedModel(this.createKey(Jj(this.getDataPath(t),!0,this.gos.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(e){const t=this.funcColsService.getRowGroupColumns().map((t=>this.valueService.getKeyForNode(t,e)));return t.push(this.getValueFromNode(e)),this.isInAppliedModel(this.createKey(Jj(t,!1,this.gos.get("groupAllowUnbalanced"))))}isInAppliedModel(e){return this.valueModel.hasAppliedModelKey(e)}getValueFromNode(e){return this.setFilterParams.getValue(e)}getKeyCreatorParams(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{value:e,colDef:this.setFilterParams.colDef,column:this.setFilterParams.column,node:t,data:t?.data,api:this.setFilterParams.api,context:this.setFilterParams.context}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){if(!this.valueModel)return!1;return 2===this.valueModel.getValuesType()}setFilterValues(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.overrideValues(e).then((()=>{this.checkAndRefreshVirtualList(),this.onUiChanged()}))}resetFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.isInitialised()&&this.valueModel.refreshValues().then((()=>{this.hardRefreshVirtualList=!0,this.checkAndRefreshVirtualList(),this.onUiChanged()}))}onAnyFilterChanged(){setTimeout((()=>
2{if(this.isAlive()){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.refreshAfterAnyFilterChanged().then((e=>{e&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())}))}}),0)}onMiniFilterInput(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;const{applyMiniFilterWhileTyping:e,readOnly:t}=this.setFilterParams||{};!t&&e?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");const{excelMode:e,readOnly:t}=this.setFilterParams||{};null==e||t?this.checkAndRefreshVirtualList():null==this.valueModel.getMiniFilter()?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){if(!this.valueModel)throw new Error("Value model has not been created.");const e=null!=this.valueModel.getMiniFilter()&&this.valueModel.getDisplayedValueCount()<1;Ki(this.eFilterNoMatches,e),Ki(this.eSetFilterList,!e)}resetMiniFilter(){this.eMiniFilter.setValue(null,!0),this.valueModel?.setMiniFilter(null)}resetUiToActiveModel(e,t){this.setModelAndRefresh(null==e?null:e.values).then((()=>{this.onUiChanged(!1,"prevent"),t?.()}))}handleCancelEnd(e){this.setMiniFilter(null),super.handleCancelEnd(e)}onMiniFilterKeyDown(e){const{excelMode:t,readOnly:i}=this.setFilterParams||{};e.key!==js.ENTER||t||i||this.filterOnAllVisibleValues()}filterOnAllVisibleValues(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{readOnly:t}=this.setFilterParams||{};if(!this.valueModel)throw new Error("Value model has not been created.");if(t)throw new Error("Unable to filter in readOnly mode.");this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,e?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(e){null!=e&&window.setTimeout((()=>{if(!this.virtualList)throw new Error("Virtual list has not been created.");this.isAlive()&&this.virtualList.focusRow(e)}),0)}onSelectAll(e){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");e?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(e,t){const i=e=>{e.children?e.children.forEach((e=>i(e))):this.selectItem(e.key,t)};i(e),this.refreshAfterSelection()}onItemSelected(e,t){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");this.selectItem(e,t),this.refreshAfterSelection()}selectItem(e,t){t?this.valueModel.selectKey(e):this.valueModel.deselectKey(e)}onExpandAll(e,t){const i=e=>{e.filterPasses&&e.available&&e.children&&(e.children.forEach((e=>i(e))),e.expanded=t)};i(e),this.refreshAfterExpansion()}onExpandedChanged(e,t){e.expanded=t,this.refreshAfterExpansion()}refreshAfterExpansion(){const e=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(e)}refreshAfterSelection(){const e=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(e)}setMiniFilter(e){this.eMiniFilter.setValue(e),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel?this.valueModel.getMiniFilter():null}checkAndRefreshVirtualList(){if(!this.virtualList)throw new Error("Virtual list has not been created.");this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel?this.valueModel.getKeys():[]}getFilterValues(){return this.valueModel?this.valueModel.getValues():[]}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams&&this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(e){return this.localeService.getLocaleTextFunc()(e,qj[e])}isSelectAllSelected(){if(!this.setFilterParams||!this.valueModel)return!1;if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;
2if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(e){const t=e=>{if(e.children){let i=!1,s=!1;return e.children.some((e=>{if(!e.filterPasses||!e.available)return!1;const n=t(e);return void 0===n||(n?i=!0:s=!0,i&&s)}))?void 0:i}return this.valueModel.isKeySelected(e.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&t(e):t(e)}destroy(){null!=this.virtualList&&(this.virtualList.destroy(),this.virtualList=null),super.destroy()}caseFormat(e){return null==e||"string"!==typeof e||this.caseSensitive?e:e.toUpperCase()}resetExpansion(){if(!this.setFilterParams?.treeList)return;const e=this.valueModel?.getSelectAllItem();if(this.isSetFilterModelTreeItem(e)){const t=e=>{e.children&&(e.children.forEach((e=>t(e))),e.expanded=!1)};t(e),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e,this)}getPositionableElement(){return this.eSetFilterList}},aU=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},lU=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){const e=this.model.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+e}getRow(e){if(0===e)return this.model.getSelectAllItem();const t=this.model.showAddCurrentSelectionToFilter(),i=t?2:1;return 1===e&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-i)}areRowsEqual(e,t){return e===t}},hU=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return null==e&&null==t||null!=e&&null!=t&&e.treeKey===t.treeKey&&e.depth===t.depth}},cU="32.3.3",dU={version:cU,moduleName:`${r.SetFilterModule}-core`,userComponents:[{name:"agSetColumnFilter",classImp:oU}],dependantModules:[ek,no]},uU={version:cU,moduleName:"@ag-grid-enterprise/set-floating-filter",userComponents:[{name:"agSetColumnFloatingFilter",classImp:class extends Rs{constructor(){super('\n            <div class="ag-floating-filter-input ag-set-floating-filter-input" role="presentation">\n                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>\n            </div>',[vr]),this.eFloatingFilterText=Is,this.availableValuesListenerAdded=!1,this.filterModelFormatter=new Xj}wireBeans(e){this.columnNameService=e.columnNameService}destroy(){super.destroy()}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",(()=>this.params.showParentFilter())),this.setParams(e)}setParams(e){const t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance((t=>{if(!(t instanceof oU))throw new Error("AG Grid - SetFloatingFilter expects SetFilter as its parent");e(t)}))}addAvailableValuesListener(){this.parentSetFilterInstance((e=>{const t=e.getValueModel();t&&this.addManagedListeners(t,{availableValuesChanged:()=>this.updateFloatingFilterText()})})),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance((t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))}))}}}],dependantModules:[dU,ao]},pU={version:cU,moduleName:r.SetFilterModule,dependantModules:[dU,uU]};function gU(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"solid";const i={solid:[],dash:[4,3],dot:[1,3],dashDot:[4,3,1,3],dashDotDot:[4,3,1,3,1,3],shortDot:[1,1],shortDash:[3,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],longDash:[8,3],longDashDot:[8,3,1,3],longDashDotDot:[8,3,1,3,1,3]},s={solid:[],dash:[3,3],dot:[0,3],dashDot:[3,3,0,3],dashDotDot:[3,3,0,3,0,3],shortDot:[0,2],shortDash:[2,2],shortDashDot:[2,2,0,2],shortDashDotDot:[2,2,0,2,0,2],longDash:[7,3],longDashDot:[7,3,0,3],longDashDotDot:[7,3,0,3,0,3]};return"round"===e||"square"===e?void 0==s[t]?(mU(t),s.solid):s[t]:void 0==i[t]?(mU(t),i.solid):i[t]}function mU(e){h(`'${e}' is not a valid 'lineDash' option.`)}function fU(e){switch(e){case"circle":default:return iF.Circle;case"square":return iF.Square;case"diamond":return iF.Diamond}}var{extent:vU,isNumber:yU,isString:CU,isStringObject:SU,isDate:wU,createId:bU,Padding:xU}=vF,{LinearScale:MU,BandScale:DU,TimeScale:IU}=fF,{Transformable:RU}=iF,EU=class{constructor(){this.type="category",this.stroke="rgb(204, 214, 235)",this.strokeWidth=1}},AU=class e{constructor(){this.id=bU(this),this.seriesRect={x:0,y:0,width:0,height:0},this._context=void 0,this._container=void 0,this._data=void 0,this.padding=new xU(3),this.xKey="x",this.yKey="y",this.dataType=void 0,this.xData=[],this.yData=[],this.min=void 0,this.max=void 0,this.yScale=new MU,this.axis=new EU,this.highlightStyle={size:6,fill:"yellow",stroke:"silver",strokeWidth:1},this._width=100,this._height=100,this.smallestInterval=void 0,this.layoutId=0,this.defaultDateFormatter=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),this._onMouseMove=this.onMouseMove.bind(this),this._onMouseOut=this.onMouseOut.bind(this);const t=new iF.TranslatableGroup;this.rootGroup=t;const i=document.createElement("div");i.setAttribute("class","ag-sparkline-wrapper");const s=new iF.Scene({});this.scene=s,this.canvasElement=s.canvas.element,s.setRoot(t),s.setContainer(i),this.resizeAndSetDimensions(this.width,this.height),e.tooltipDocuments.includes(document)||this.initialiseTooltipStyles(),this.setupDomEventListeners(this.canvasElement)}set context(e){this._context!==e&&(this._context=e)}get context(){return this._context}set container(e){if(this._container!==e){const{parentNode:t}=this.canvasElement;null!=t&&t.removeChild(this.canvasElement),e&&e.appendChild(this.canvasElement),this._container=e}}get container(){return this._container}set data(e){this._data!==e&&(this._data=e,this.processData(),this.mouseMoveEvent&&this.highlightedDatum&&this.updateHitPoint(this.mouseMoveEvent))}get data(){return this._data}resizeAndSetDimensions(e,t){this.scene.resize(e,t),this.seriesRect.width=e,this.seriesRect.height=t}initialiseTooltipStyles(){const t=document.createElement("style");t.innerHTML="\n.ag-sparkline-tooltip-wrapper {\n    position: absolute;\n    user-select: none;\n    pointer-events: none;\n}\n\n.ag-sparkline-tooltip {\n    position: relative;\n    font: 12px arial,sans-serif;\n    border-radius: 2px;\n    box-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 1px 1px rgb(0 0 0 / 14%);\n    line-height: 1.7em;\n    overflow: hidden;\n    white-space: nowrap;\n    z-index: 99999;\n    background-color: rgb(255, 255, 255);\n    color: rgba(0,0,0, 0.67);\n}\n\n.ag-sparkline-tooltip-content {\n    padding: 0 7px;\n    opacity: 1;\n}\n\n.ag-sparkline-tooltip-title {\n    padding-left: 7px;\n    opacity: 1;\n}\n\n.ag-sparkline-tooltip-wrapper-hidden {\n    top: -10000px !important;\n}\n\n.ag-sparkline-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n",document.head.insertBefore(t,document.head.querySelector("style")),e.tooltipDocuments.push(document)}set width(e){this._width!==e&&(this._width=e,this.scene.resize(e,this.height),this.scheduleLayout())}get width(){return this._width}set height(e){this._height!==e&&(this._height=e,this.scene.resize(this.width,e),this.scheduleLayout())}get height(){return this._height}update(){}updateYScale(){this.updateYScaleRange(),this.updateYScaleDomain()}updateYScaleDomain(){}updateYScaleRange(){const{yScale:e,seriesRect:t}=this;e.range=[t.height,0]}updateXScale(){const{type:e}=this.axis;this.xScale=this.getXScale(e),this.updateXScaleRange(),this.updateXScaleDomain()}updateXScaleRange(){this.xScale.range=[0,this.seriesRect.width]}updateXScaleDomain(){const{xData:e,xScale:t}=this;let i;(t instanceof MU||t instanceof IU)&&(i=vU(e)),this.xScale.domain=i?i.slice():e}getXScale(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"category"){case"number":return new MU;case"time":return new IU;default:return new DU}}updateAxisLine(){}updateAxes(){this.updateYScale(),this.updateXScale(),this.updateAxisLine()}updateCrosshairs(){this.updateXCrosshairLine(),this.updateYCrosshairLine()}generateNodeData(){return[]}getNodeData(){return[]}updateNodes(){}updateXCrosshairLine(){}updateYCrosshairLine(){}highlightDatum(e){this.updateNodes()}dehighlightDatum(){this.highlightedDatum=void 0,this.updateNodes(),this.updateCrosshairs()}onMouseMove(e){this.mouseMoveEvent=e,this.updateHitPoint(e)}renderScene(){this.scene.render().catch((e=>c("chart rendering failed",e)))}
2updateHitPoint(e){const t=this.pickClosestSeriesNodeDatum(e.offsetX,e.offsetY);if(!t)return;const i=this.highlightedDatum;this.highlightedDatum=t,(this.highlightedDatum&&!i||this.highlightedDatum&&i&&this.highlightedDatum!==i)&&(this.highlightDatum(t),this.updateCrosshairs(),this.renderScene());(this.processedOptions?.tooltip?.enabled??!0)&&this.handleTooltip(e,t)}onMouseOut(e){this.dehighlightDatum(),this.tooltip.toggle(!1),this.renderScene()}processData(){const{data:e,yData:t,xData:i}=this;if(!e||this.invalidData(this.data))return;t.length=0,i.length=0;const s=e.length,n=this.getDataType(e);this.dataType=n;const{type:r}=this.axis,o="number"!==r&&"time"!==r?"category":r,a="number"===o||"time"===o,l=(e,t)=>{void 0==this.smallestInterval&&(this.smallestInterval={x:1/0,y:1/0});const{x:i}=this.smallestInterval,s=Math.abs(e-t);s>0&&s<i&&(this.smallestInterval.x=s)};let h;if("number"===n)for(let c=0;c<s;c++){const s=c,n=e[c],r=this.getDatum(s,o),d=this.getDatum(n,"number");a&&l(r,h),i.push(r),t.push(d),h=r}else if("array"===n)for(let c=0;c<s;c++){const s=e[c];if(Array.isArray(s)){const e=s[0],n=s[1],r=this.getDatum(e,o),c=this.getDatum(n,"number");if(void 0==r)continue;a&&l(r,h),i.push(r),t.push(c),h=r}}else if("object"===n){const{yKey:n,xKey:r}=this;for(let c=0;c<s;c++){const s=e[c];if("object"===typeof s&&!Array.isArray(s)){const e=s[r],c=s[n],d=this.getDatum(e,o),u=this.getDatum(c,"number");if(void 0==d)continue;a&&l(d,h),i.push(d),t.push(u),h=d}}}this.updateAxes(),this.immediateLayout()}getDataType(e){for(const t of e)if(void 0!=t){if(yU(t))return"number";if(Array.isArray(t))return"array";if("object"===typeof t)return"object"}}getDatum(e,t){if("number"===t&&yU(e)||"time"===t&&(yU(e)||wU(e)))return e;if("category"===t){if(CU(e)||wU(e)||yU(e))return{toString:()=>String(e)};if(SU(e))return e}}get layoutScheduled(){return!!this.layoutId}scheduleLayout(){this.layoutId&&cancelAnimationFrame(this.layoutId),this.layoutId=requestAnimationFrame((()=>{this.immediateLayout(),this.layoutId=0}))}immediateLayout(){this.setSparklineDimensions(),this.invalidData(this.data)||(this.updateXScaleRange(),this.updateYScaleRange(),this.updateAxisLine(),this.update(),this.renderScene())}setSparklineDimensions(){const{width:e,height:t,padding:i,seriesRect:s,rootGroup:n}=this,r=e-i.left-i.right,o=t-i.top-i.bottom;s.width=r,s.height=o,s.x=i.left,s.y=i.top,n.translationX=s.x,n.translationY=s.y}pickClosestSeriesNodeDatum(e,t){let i,s=1/0;const n=RU.fromCanvasPoint(this.rootGroup,e,t),r=this.getNodeData();for(let o=0;o<r.length;o++){const e=r[o];if(!e.point)return;const t=this.getDistance(n,e.point);t<=s&&(s=t,i=e)}return i}getDistance(e,t){return Math.abs(e.x-t.x)}handleTooltip(e,t){const{seriesDatum:i}=t,{canvasElement:s}=this,{clientX:n,clientY:r}=e,o=this.processedOptions?.tooltip,a={pageX:n,pageY:r,position:{xOffset:o?.xOffset,yOffset:o?.yOffset},container:o?.container};void 0==a.container&&(a.container=s);const l=i.y,h=i.x;let c=o?.enabled??!0;const d=o?.renderer;if(d){const e=d({context:this.context,datum:i,yValue:l,xValue:h});c="string"!==typeof e&&void 0!==e.enabled?e.enabled:c}const u=c&&void 0!==i.y&&this.getTooltipHtml(t);u&&this.tooltip.show(a,u)}formatNumericDatum(e){return String(Math.round(10*e)/10)}formatDatum(e){const t=this.axis.type||"category";return"number"===t&&"number"===typeof e?this.formatNumericDatum(e):"time"===t&&(e instanceof Date||yU(e))?this.defaultDateFormatter.format(e):String(e)}setupDomEventListeners(e){e.addEventListener("mousemove",this._onMouseMove),e.addEventListener("mouseout",this._onMouseOut)}cleanupDomEventListeners(e){e.removeEventListener("mousemove",this._onMouseMove),e.removeEventListener("mouseout",this._onMouseOut)}invalidData(e){return!e||!Array.isArray(e)}destroy(){this.cleanupDomEventListeners(this.canvasElement),this.scene.destroy(),this.container=void 0}};AU.tooltipDocuments=[];var TU=AU;function PU(e,t){if("string"===typeof e)return e;t=t??{};const{content:i=t.content??"",title:s=t.title??void 0,color:n=t.color,backgroundColor:r=t.backgroundColor,opacity:o=t.opacity??1}=e;let a,l;n?(a=s?`<span class="${LU}-title"; style="color: ${n}">${s}</span>`:"",l=`<span class="${LU}-content" style="color: ${n}">${i}</span>`):(a=s?`<span class="${LU}-title">${s}</span>`:"",l=`<span class="${LU}-content">${i}</span>`);let h=`opacity: ${o}`;return r&&(h+=`; background-color: ${r.toLowerCase()}`),`<div class="${LU}" style="${h}">\n                ${a}\n                ${l}\n            </div>`}var LU="ag-sparkline-tooltip",FU=class{constructor(){this.created=!1,this.element=document.createElement("div")}isVisible(){const{element:e}=this;if(e.classList)return!e.classList.contains(`${LU}-wrapper-hidden`);const t=e.getAttribute("class");return!!t&&t.split(" ").indexOf(`${LU}-wrapper-hidden`)<0}updateClass(e){if(!this.created){document.body.appendChild(this.element),this.created=!0}const t=[`${LU}-wrapper`];!0!==e&&t.push(`${LU}-wrapper-hidden`),this.element.setAttribute("class",t.join(" "))}show(e,t){this.toggle(!1);const{element:i}=this;if(void 0!==t)i.innerHTML=t;else if(!i.innerHTML)return;const s=e.position?.xOffset??10,n=e.position?.yOffset??0;let r=e.pageX+s,o=e.pageY+n;const a=i.getBoundingClientRect();let l=window.innerWidth-a.width;if(e.container){const t=e.container.getBoundingClientRect();l=t.left+(t.width-a.width)}r>
2l&&(r=e.pageX-i.clientWidth-s),"undefined"!==typeof scrollX&&(r+=scrollX),"undefined"!==typeof scrollY&&(o+=scrollY),i.style.left=`${Math.round(r)}px`,i.style.top=`${Math.round(o)}px`,this.toggle(!0)}toggle(e){this.updateClass(e)}destroy(){const{parentNode:e}=this.element;e&&e.removeChild(this.element)}},{extent:kU}=vF,{BandScale:NU}=fF,OU=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},GU=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},BU=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},VU=class extends TU{constructor(){super(),this.fill="rgba(124, 181, 236, 0.25)",this.strokePath=new iF.Path,this.fillPath=new iF.Path,this.xCrosshairLine=new iF.Line,this.yCrosshairLine=new iF.Line,this.areaSparklineGroup=new iF.Group,this.xAxisLine=new iF.Line,this.markers=new iF.Group,this.markerSelection=iF.Selection.select(this.markers,(()=>this.markerFactory())),this.markerSelectionData=[],this.marker=new OU,this.line=new GU,this.crosshairs=new BU,this.rootGroup.append(this.areaSparklineGroup),this.xAxisLine.zIndex=500,this.fillPath.zIndex=50,this.strokePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.areaSparklineGroup.append([this.fillPath,this.xAxisLine,this.strokePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}markerFactory(){const{shape:e}=this.marker;return new(fU(e))}getNodeData(){return this.markerSelectionData}update(){const e=this.generateNodeData();if(!e)return;const{nodeData:t,fillData:i,strokeData:s}=e;this.markerSelectionData=t,this.updateSelection(t),this.updateNodes(),this.updateStroke(s),this.updateFill(i)}updateYScaleDomain(){const{yData:e,yScale:t}=this,i=kU(e);let s=0,n=1;null!=i&&(s=this.min=i[0],n=this.max=i[1]),s=s<0?s:0,n=n<0?0:n,t.domain=[s,n]}generateNodeData(){const{data:e,yData:t,xData:i,xScale:s,yScale:n}=this;if(!e)return;const r=!(s instanceof NU),o=r?0:s.bandwidth/2,a=t.length,l=[],h=[],c=[];let d,u,p,g;const m=n.convert(0);for(let f=0;f<a;f++){const e=t[f],v=i[f],y=s.convert(r?s.toDomain(v):v)+o,C=void 0===e?NaN:n.convert(e);f+1<a&&(g=s.convert(r?s.toDomain(i[f+1]):i[f+1])+o),c.push({seriesDatum:{x:v,y:e},point:{x:y,y:C}}),void 0===e&&void 0!==p?(h.push({seriesDatum:void 0,point:{x:p,y:m}}),void 0!==g&&h.push({seriesDatum:void 0,point:{x:g,y:m}})):void 0!==e&&(h.push({seriesDatum:{x:v,y:e},point:{x:y,y:C}}),l.push({seriesDatum:{x:v,y:e},point:{x:y,y:C}}),d=void 0!==d?d:y,u=y),p=y}return h.push({seriesDatum:void 0,point:{x:u,y:m}},{seriesDatum:void 0,point:{x:d,y:m}}),{nodeData:l,fillData:h,strokeData:c}}updateAxisLine(){const{xScale:e,yScale:t,axis:{stroke:i,strokeWidth:s},xAxisLine:n}=this,r=t.convert(0);n.x1=e.range[0],n.x2=e.range[1],n.y1=n.y2=r,n.stroke=i,n.strokeWidth=s}updateSelection(e){this.markerSelection.update(e)}updateNodes(){const{highlightedDatum:e,highlightStyle:t,marker:i}=this,{size:s,fill:n,stroke:r,strokeWidth:o}=t,a=i.formatter;this.markerSelection.each(((t,l,h)=>{const{point:c,seriesDatum:d}=l;if(!c)return;const u=l===e,p=u&&void 0!==n?n:i.fill,g=u&&void 0!==r?r:i.stroke,m=u&&void 0!==o?o:i.strokeWidth,f=u&&void 0!==s?s:i.size;let v;if(a){const e=0===h,t=h===this.markerSelectionData.length-1,i=d.y===this.min,s=d.y===this.max;v=a({datum:l,xValue:d.x,yValue:d.y,min:i,max:s,first:e,last:t,fill:p,stroke:g,strokeWidth:m,size:f,highlighted:u})}t.size=v&&void 0!=v.size?v.size:f,t.fill=v&&void 0!=v.fill?v.fill:p,t.stroke=v&&void 0!=v.stroke?v.stroke:g,t.strokeWidth=v&&void 0!=v.strokeWidth?v.strokeWidth:m,t.translationX=c.x,t.translationY=c.y,t.visible=v&&void 0!=v.enabled?v.enabled:i.enabled&&t.size>0}))}updateStroke(e){const{strokePath:t,yData:i,line:s}=this,n=t.path;if(n.clear(),i.length<2)return;const r=e.length;let o=!0;for(let a=0;a<r;a++){const{point:t,seriesDatum:i}=e[a],s=t.x,r=t.y;void 0==i.y?o=!0:o?(n.moveTo(s,r),o=!1):n.lineTo(s,r)}t.lineJoin=t.lineCap="round",t.fill=void 0,t.stroke=s.stroke,t.strokeWidth=s.strokeWidth}updateFill(e){const{fillPath:t,yData:i,fill:s}=this,n=t.path,r=e.length;if(n.clear(),!(i.length<2)){for(let t=0;t<r;t++){const{point:i}=e[t],s=i.x,r=i.y;t>0?n.lineTo(s,r):n.moveTo(s,r)}n.closePath(),t.lineJoin="round",t.stroke=void 0,t.fill=s}}updateXCrosshairLine(){const{yScale:e,xCrosshairLine:t,highlightedDatum:i,crosshairs:{xLine:s}}=this;if(!s.enabled||void 0==i)return void(t.strokeWidth=0);t.y1=e.range[0],t.y2=e.range[1],t.x1=t.x2=i.point.x,t.stroke=s.stroke,t.strokeWidth=s.strokeWidth??1,t.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:n}=s;t.lineDash=Array.isArray(n)?n:gU(t.lineCap,s.lineDash)}updateYCrosshairLine(){const{xScale:e,yCrosshairLine:t,highlightedDatum:i,crosshairs:{yLine:s}}=this;if(!s.enabled||void 0==i)return void(t.strokeWidth=0);t.x1=e.range[0],t.x2=e.range[1],t.y1=t.y2=i.point.y,t.stroke=s.stroke,t.strokeWidth=s.strokeWidth??1,t.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:n}=s;t.lineDash=Array.isArray(n)?n:gU(t.lineCap,s.lineDash)}getTooltipHtml(e){const{dataType:t}=this,{seriesDatum:i}=e,s=i.y,n=i.x,r={content:this.formatNumericDatum(s),title:"array"===t||"object"===t?this.formatDatum(n):void 0},o=this.processedOptions?.tooltip?.renderer;return o?PU(o({context:this.context,datum:i,yValue:s,xValue:n}),r):PU(r)}},zU=class{constructor(){this.enabled=!0,this.fontSize=8,this.fontFamily="Verdana, sans-serif",this.fontStyle=void 0,this.fontWeight=void 0,this.color="rgba(70, 70, 70, 1)"}},{extent:HU}=vF,WU=class extends zU{constructor(){super(...arguments),this.formatter=void 0,this.placement="insideEnd"}},jU=class extends TU{constructor(){super(),this.fill="rgb(124, 181, 236)",this.stroke="silver",this.strokeWidth=0,this.paddingInner=.1,this.paddingOuter=.2,this.valueAxisDomain=void 0,this.formatter=void 0,this.axisLine=new iF.Line,this.bandWidth=0,this.sparklineGroup=new iF.Group,this.rectGroup=new iF.Group,this.labelGroup=new iF.Group,this.rectSelection=iF.Selection.select(this.rectGroup,iF.Rect),this.labelSelection=iF.Selection.select(this.labelGroup,iF.Text),this.nodeSelectionData=[],this.label=new WU,this.rootGroup.append(this.sparklineGroup),this.rectGroup.zIndex=50,this.axisLine.zIndex=500,this.labelGroup.zIndex=1500,this.sparklineGroup.append([this.rectGroup,this.axisLine,this.labelGroup]),this.axisLine.lineCap="round",this.label.enabled=!1}getNodeData(){return this.nodeSelectionData}update(){this.updateSelections(),this.updateNodes()}updateSelections(){const e=this.generateNodeData();e&&(this.nodeSelectionData=e,this.updateRectSelection(e),this.updateLabelSelection(e))}updateNodes(){this.updateRectNodes(),this.updateLabelNodes()}calculateStep(e){const{xScale:t,paddingInner:i,paddingOuter:s,smallestInterval:n}=this,r=(t.domain[1]-t.domain[0])/(n?.x??1)+1,o=Math.min(r,50),a=o-1;return e/Math.max(1,2*s+a*i+o)}updateYScaleDomain(){const{yScale:e,yData:t,valueAxisDomain:i}=this,s=HU(t);let n=0,r=1;null!=s&&(n=this.min=s[0],r=this.max=s[1]),n=n<0?n:0,r=r<0?0:r,i&&(i[1]<r&&(i[1]=r),i[0]>n&&(i[0]=n)),e.domain=i||[n,r]}updateRectSelection(e){this.rectSelection.update(e)}updateRectNodes(){const{highlightedDatum:e,formatter:t,fill:i,stroke:s,strokeWidth:n}=this,{fill:r,stroke:o,strokeWidth:a}=this.highlightStyle;this.rectSelection.each(((l,h,c)=>{const d=h===e,u=d&&void 0!==r?r:i,p=d&&void 0!==o?o:s,g=d&&void 0!==a?a:n;let m;const{x:f,y:v,width:y,height:C,seriesDatum:S}=h;if(t){const e=0===c,i=c===this.nodeSelectionData.length-1,s=S.y===this.min,n=S.y===this.max;m=t({datum:h,xValue:S.x,yValue:S.y,width:y,height:C,min:s,max:n,first:e,last:i,fill:u,stroke:p,strokeWidth:g,highlighted:d})}l.fill=m&&m.fill||u,l.stroke=m&&m.stroke||p,l.strokeWidth=m&&m.strokeWidth||g,l.x=f,l.y=v,l.width=y,l.height=C,l.visible=l.height>0}))}updateLabelSelection(e){this.labelSelection.update(e,(e=>{e.tag=1,e.pointerEvents=iF.PointerEvents.None}))}updateLabelNodes(){const{label:{enabled:e,fontStyle:t,fontWeight:i,fontSize:s,fontFamily:n,color:r}}=this;this.labelSelection.each(((o,a)=>{const l=a.label;l&&e?(o.fontStyle=t,o.fontWeight=i,o.fontSize=s,o.fontFamily=n,o.textAlign=l.textAlign,o.textBaseline=l.textBaseline,o.text=l.text,o.x=l.x,o.y=l.y,o.fill=r,o.visible=!0):o.visible=!1}))}getTooltipHtml(e){const{dataType:t}=this,{seriesDatum:i}=e,s=i.y,n=i.x,r={content:this.formatNumericDatum(s),title:"array"===t||"object"===t?this.formatDatum(n):void 0},o=this.processedOptions?.tooltip?.renderer;return o?PU(o({context:this.context,datum:i,yValue:s,xValue:n}),r):PU(r)}formatLabelValue(e){return e%1!==0?e.toFixed(1):e.toFixed(0)}},{isNumber:UU}=vF,{BandScale:_U}=fF,KU=class extends jU{updateYScaleRange(){const{seriesRect:e,yScale:t}=this;t.range=[0,e.width]}updateXScaleRange(){const{xScale:e,seriesRect:t,paddingOuter:i,paddingInner:s}=this;if(e instanceof _U)e.range=[0,t.height],e.paddingInner=s,e.paddingOuter=i;else{const n=this.calculateStep(t.height),r=n*i;this.bandWidth=n*(1-s),e.range=[r,t.height-r-this.bandWidth]}}updateAxisLine(){const{yScale:e,axis:{stroke:t,strokeWidth:i}
2,axisLine:s,seriesRect:n}=this,r=e.convert(0);s.x1=s.x2=r,s.y1=0,s.y2=n.height,s.stroke=t,s.strokeWidth=i+(i%2===1?1:0)}generateNodeData(){const{data:e,yData:t,xData:i,xScale:s,yScale:n,fill:r,stroke:o,strokeWidth:a,label:l}=this;if(!e)return;const{fontStyle:h,fontWeight:c,fontSize:d,fontFamily:u,color:p,formatter:g,placement:m}=l,f=[],v=n.convert(0),y=!(s instanceof _U);for(let C=0,S=t.length;C<S;C++){let e=t[C];const l=i[C],S=void 0===e;S&&(e=0);const w=s.convert(y?s.toDomain(l):l),b=Math.min(void 0===e?NaN:n.convert(e),v),x=Math.max(void 0===e?NaN:n.convert(e),v),M=y?this.bandWidth:s.bandwidth,D=x-b,I={x:v,y:w};let R;R=g?g({value:e}):void 0!==e&&UU(e)?this.formatLabelValue(e):"";const E=w+M/2;let A;const T="middle";let P;const L=void 0!==e&&e>=0,F=4;if("center"===m)A=b+D/2,P="center";else if("outsideEnd"===m)A=b+(L?D+F:-F),P=L?"start":"end";else if("insideEnd"===m){A=b+(L?D-F:F),P=L?"end":"start";const e=yF.CachedTextMeasurerPool.measureText(R,{font:u}).width||20;(L&&A<v+e||!L&&A>v-e)&&(A=v+F*(L?1:-1),P=L?"start":"end")}else A=v+F*(L?1:-1),P=L?"start":"end";f.push({x:b,y:w,width:D,height:M,fill:r,stroke:o,strokeWidth:a,seriesDatum:{x:l,y:S?void 0:e},point:I,label:{x:A,y:E,text:R,fontStyle:h,fontWeight:c,fontSize:d,fontFamily:u,textAlign:P,textBaseline:T,fill:p}})}return f}getDistance(e,t){return Math.abs(e.y-t.y)}},{isNumber:$U}=vF,{BandScale:YU}=fF,ZU=class extends jU{updateYScaleRange(){const{seriesRect:e,yScale:t}=this;t.range=[e.height,0]}updateXScaleRange(){const{xScale:e,seriesRect:t,paddingOuter:i,paddingInner:s}=this;if(e instanceof YU)e.range=[0,t.width],e.paddingInner=s,e.paddingOuter=i;else{const n=this.calculateStep(t.width),r=n*i;this.bandWidth=n*(1-s),e.range=[r,t.width-r-this.bandWidth]}}updateAxisLine(){const{yScale:e,axis:{stroke:t,strokeWidth:i},axisLine:s,seriesRect:n}=this,r=e.convert(0);s.x1=0,s.x2=n.width,s.y1=s.y2=r,s.stroke=t,s.strokeWidth=i+(i%2===1?1:0)}generateNodeData(){const{data:e,yData:t,xData:i,xScale:s,yScale:n,fill:r,stroke:o,strokeWidth:a,label:l}=this;if(!e)return;const{fontStyle:h,fontWeight:c,fontSize:d,fontFamily:u,color:p,formatter:g,placement:m}=l,f=[],v=n.convert(0),y=!(s instanceof YU);for(let C=0,S=t.length;C<S;C++){let e=t[C];const l=i[C],S=void 0===e;S&&(e=0);const w=Math.min(void 0===e?NaN:n.convert(e),v),b=s.convert(y?s.toDomain(l):l),x=Math.max(void 0===e?NaN:n.convert(e),v),M=y?this.bandWidth:s.bandwidth,D=x-w,I={x:b+M/2,y:v};let R;R=g?g({value:e}):void 0!==e&&$U(e)?this.formatLabelValue(e):"";const E=b+M/2;let A;const T="center";let P;const L=void 0!==e&&e>=0,F=2;if("center"===m)A=w+D/2,P="middle";else if("outsideEnd"===m)A=w+(L?-F:D+F),P=L?"bottom":"top";else if("insideEnd"===m){A=w+(L?F:D-F),P=L?"top":"bottom";const e=yF.CachedTextMeasurerPool.measureText(R,{font:u}).height||10;(L&&A>v-e||!L&&A<v+e)&&(A=v+F*(L?-1:1),P=L?"bottom":"top")}else A=v+F*(L?-1:1),P=L?"bottom":"top";f.push({x:b,y:w,width:M,height:D,fill:r,stroke:o,strokeWidth:a,seriesDatum:{x:l,y:S?void 0:e},point:I,label:{x:E,y:A,text:R,fontStyle:h,fontWeight:c,fontSize:d,fontFamily:u,textAlign:T,textBaseline:P,fill:p}})}return f}},{extent:qU}=vF,{BandScale:QU}=fF,XU=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},JU=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},e_=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},t_=class extends TU{constructor(){super(),this.linePath=new iF.Path,this.xCrosshairLine=new iF.Line,this.yCrosshairLine=new iF.Line,this.lineSparklineGroup=new iF.Group,this.markers=new iF.Group,this.markerSelection=iF.Selection.select(this.markers,(()=>this.markerFactory())),this.markerSelectionData=[],this.marker=new XU,this.line=new JU,this.crosshairs=new e_,this.rootGroup.append(this.lineSparklineGroup),this.linePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.lineSparklineGroup.append([this.linePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}getNodeData(){return this.markerSelectionData}markerFactory(){const{shape:e}=this.marker;return new(fU(e))}onMarkerShapeChange(){this.markerSelection=this.markerSelection.clear(),this.scheduleLayout()}update(){const e=this.generateNodeData();e&&(this.markerSelectionData=e,this.updateSelection(e),this.updateNodes(),this.updateLine()
2)}updateYScaleDomain(){const{yData:e,yScale:t}=this,i=qU(e);let s=0,n=1;if(null!=i&&(s=this.min=i[0],n=this.max=i[1]),s===n){const e=Math.abs(.01*s);s-=e,n+=e}t.domain=[s,n]}generateNodeData(){const{data:e,yData:t,xData:i,xScale:s,yScale:n}=this;if(!e)return;const r=!(s instanceof QU),o=r?0:s.bandwidth/2,a=[];for(let l=0;l<t.length;l++){const e=t[l],h=i[l];if(void 0==e)continue;const c=s.convert(r?s.toDomain(h):h)+o,d=void 0===e?NaN:n.convert(e);a.push({seriesDatum:{x:h,y:e},point:{x:c,y:d}})}return a}updateSelection(e){this.markerSelection.update(e)}updateNodes(){const{highlightedDatum:e,highlightStyle:t,marker:i}=this,{size:s,fill:n,stroke:r,strokeWidth:o}=t,a=i.formatter;this.markerSelection.each(((t,l,h)=>{const c=l===e,d=c&&void 0!==n?n:i.fill,u=c&&void 0!==r?r:i.stroke,p=c&&void 0!==o?o:i.strokeWidth,g=c&&void 0!==s?s:i.size;let m;const{seriesDatum:f,point:v}=l;if(a){const e=0===h,t=h===this.markerSelectionData.length-1,i=f.y===this.min,s=f.y===this.max;m=a({datum:l,xValue:f.x,yValue:f.y,min:i,max:s,first:e,last:t,fill:d,stroke:u,strokeWidth:p,size:g,highlighted:c})}t.size=m&&void 0!=m.size?m.size:g,t.fill=m&&void 0!=m.fill?m.fill:d,t.stroke=m&&void 0!=m.stroke?m.stroke:u,t.strokeWidth=m&&void 0!=m.strokeWidth?m.strokeWidth:p,t.translationX=v.x,t.translationY=v.y,t.visible=m&&void 0!=m.enabled?m.enabled:i.enabled&&t.size>0}))}updateLine(){const{linePath:e,yData:t,xData:i,xScale:s,yScale:n,line:r}=this,o=e.path;if(o.clear(),t.length<2)return;const a=!(s instanceof QU),l=t.length,h=a?0:s.bandwidth/2;let c=!0;for(let d=0;d<l;d++){const e=i[d],r=t[d],l=s.convert(a?s.toDomain(e):e)+h,u=void 0===r?NaN:n.convert(r);void 0==r?c=!0:c?(o.moveTo(l,u),c=!1):o.lineTo(l,u)}e.fill=void 0,e.stroke=r.stroke,e.strokeWidth=r.strokeWidth}updateXCrosshairLine(){const{yScale:e,xCrosshairLine:t,highlightedDatum:i,crosshairs:{xLine:s}}=this;if(!s.enabled||void 0==i)return void(t.strokeWidth=0);t.y1=e.range[0],t.y2=e.range[1],t.x1=t.x2=i.point.x,t.stroke=s.stroke,t.strokeWidth=s.strokeWidth??1,t.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:n}=s;t.lineDash=Array.isArray(n)?n:gU(t.lineCap,s.lineDash)}updateYCrosshairLine(){const{xScale:e,yCrosshairLine:t,highlightedDatum:i,crosshairs:{yLine:s}}=this;if(!s.enabled||void 0==i)return void(t.strokeWidth=0);t.x1=e.range[0],t.x2=e.range[1],t.y1=t.y2=i.point.y,t.stroke=s.stroke,t.strokeWidth=s.strokeWidth??1,t.lineCap="round"===s.lineCap||"square"===s.lineCap?s.lineCap:void 0;const{lineDash:n}=s;t.lineDash=Array.isArray(n)?n:gU(t.lineCap,s.lineDash)}getTooltipHtml(e){const{dataType:t}=this,{seriesDatum:i}=e,s=i.y,n=i.x,r={content:this.formatNumericDatum(s),title:"array"===t||"object"===t?this.formatDatum(n):void 0},o=this.processedOptions?.tooltip?.renderer;return o?PU(o({context:this.context,datum:i,yValue:s,xValue:n}),r):PU(r)}},{isNumber:i_}=vF,s_=class{static create(e,t){const i=function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"line"){case"column":return new ZU;case"bar":return new KU;case"area":return new VU;default:return new t_}}((e=vF.deepClone(e)).type);return t&&(i.tooltip=t),function(e,t){d_(e,"context",t.context,t),d_(e,"width",t.width,t),d_(e,"height",t.height,t),d_(e,"container",t.container,t),d_(e,"xKey",t.xKey,t),d_(e,"yKey",t.yKey,t),t.padding&&function(e,t){d_(e,"top",t.top,t),d_(e,"right",t.right,t),d_(e,"bottom",t.bottom,t),d_(e,"left",t.left,t)}(e.padding,t.padding);t.axis&&function(e,t){d_(e,"type",t.type,t),d_(e,"stroke",t.stroke,t),d_(e,"strokeWidth",t.strokeWidth,t)}(e.axis,t.axis);t.highlightStyle&&function(e,t){d_(e,"fill",t.fill,t),d_(e,"size",t.size,t),d_(e,"stroke",t.stroke,t),d_(e,"strokeWidth",t.strokeWidth,t)}(e.highlightStyle,t.highlightStyle)}(i,e),function(e,t){switch(t.type){case"bar":case"column":n_(e,t);break;case"area":!function(e,t){d_(e,"fill",t.fill,t),t.marker&&r_(e.marker,t.marker);t.line&&o_(e.line,t.line);t.crosshairs&&a_(e.crosshairs,t.crosshairs)}(e,t);break;default:!function(e,t){t.marker&&r_(e.marker,t.marker);t.line&&o_(e.line,t.line);t.crosshairs&&a_(e.crosshairs,t.crosshairs)}(e,t)}}(i,e),e.data&&(i.data=e.data),i.processedOptions=e,i}};function n_(e,t){d_(e,"valueAxisDomain",t.valueAxisDomain,t),d_(e,"fill",t.fill,t),d_(e,"stroke",t.stroke,t),d_(e,"strokeWidth",t.strokeWidth,t),d_(e,"paddingInner",t.paddingInner,t),d_(e,"paddingOuter",t.paddingOuter,t),d_(e,"formatter",t.formatter,t),t.label&&function(e,t){d_(e,"enabled",t.enabled,t),d_(e,"fontStyle",t.fontStyle,t),d_(e,"fontWeight",t.fontWeight,t),d_(e,"fontSize",t.fontSize,t),d_(e,"fontFamily",t.fontFamily,t),d_(e,"textAlign",t.textAlign,t),d_(e,"textBaseline",t.textBaseline,t),d_(e,"color",t.color,t),d_(e,"formatter",t.formatter,t),d_(e,"placement",t.placement,t)}(e.label,t.label)}function r_(e,t){d_(e,"enabled",t.enabled,t),d_(e,"size",t.size,t),d_(e,"shape",t.shape,t),d_(e,"fill",t.fill,t),d_(e,"stroke",t.stroke,t),d_(e,"strokeWidth",t.strokeWidth,t),d_(e,"formatter",t.formatter,t)}function o_(e,t){d_(e,"stroke",t.stroke,t),d_(e,"strokeWidth",t.strokeWidth,t)}function a_(e,t){e.xLine&&t.xLine&&l_(e.xLine,t.xLine),e.yLine&&t.yLine&&l_(e.yLine,t.yLine)}function l_(e,t){d_(e,"enabled",t.enabled,t),d_(e,"stroke",t.stroke,t),d_(e,"strokeWidth",t.strokeWidth,t),d_(e,"lineDash",t.lineDash,t),d_(e,"lineCap",t.lineCap,t)}var h_=(e,t,i)=>!!i_(t)||(h(`${e} must be a number, the value you provided is not a valid number. Using the default of ${i}px.`),!1),c_={xOffset:h_,yOffset:h_};function d_(e,t,i,s){if(t in s)if(t in e){const s=c_[t];(!s||s(t,i,e[t]))&&e[t]!==i&&(e[t]=i)}else h(`Property ${t} does not exist on the target object.`)}
2var u_={version:"32.3.3",moduleName:r.SparklinesModule,beans:[class extends ze{constructor(){super(...arguments),this.beanName="sparklineTooltipSingleton"}postConstruct(){this.tooltip=new FU}getSparklineTooltip(){return this.tooltip}destroy(){this.tooltip&&this.tooltip.destroy(),super.destroy()}}],userComponents:[{name:"agSparklineCellRenderer",classImp:class extends Rs{constructor(){super('<div class="ag-sparkline-wrapper">\n            <span data-ref="eSparkline"></span>\n        </div>'),this.eSparkline=Is}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.sparklineTooltipSingleton=e.sparklineTooltipSingleton}init(e){let t=!0;const i=this.resizeObserverService.observeResize(this.getGui(),(()=>{const{clientWidth:i,clientHeight:s}=this.getGui();if(0!==i&&0!==s)if(t){const n={data:e.value,width:i,height:s,context:{data:e.data},...e.sparklineOptions};this.sparkline=s_.create(n,this.sparklineTooltipSingleton.getSparklineTooltip()),this.eSparkline.appendChild(this.sparkline.canvasElement),t=!1}else this.sparkline.width=i,this.sparkline.height=s}));this.addDestroyFunc((()=>i()))}refresh(e){return!!this.sparkline&&(this.sparkline.data=e.value,this.sparkline.context={data:e.data},!0)}destroy(){this.sparkline&&this.sparkline.destroy(),super.destroy()}}}],dependantModules:[ek]},p_=class extends Rs{constructor(){super('<div class="ag-status-name-value">\n            <span data-ref="eLabel"></span>:&nbsp;\n            <span data-ref="eValue" class="ag-status-name-value-value"></span>\n        </div>'),this.eLabel=Is,this.eValue=Is}setLabel(e,t){this.setDisplayed(!1);const i=this.localeService.getLocaleTextFunc();this.eLabel.innerHTML=i(e,t)}setValue(e){this.eValue.innerHTML=e}},g_={selector:"AG-NAME-VALUE",component:p_};var m_={selector:"AG-STATUS-BAR",component:class extends Rs{constructor(){super('<div class="ag-status-bar">\n            <div data-ref="eStatusBarLeft" class="ag-status-bar-left" role="status"></div>\n            <div data-ref="eStatusBarCenter" class="ag-status-bar-center" role="status"></div>\n            <div data-ref="eStatusBarRight" class="ag-status-bar-right" role="status"></div>\n        </div>'),this.updateQueued=!1,this.panelsPromise=an.resolve(),this.eStatusBarLeft=Is,this.eStatusBarCenter=Is,this.eStatusBarRight=Is,this.compDestroyFunctions={}}wireBeans(e){this.userComponentFactory=e.userComponentFactory,this.statusBarService=e.statusBarService}postConstruct(){this.processStatusPanels(new Map),this.addManagedPropertyListeners(["statusBar"],this.handleStatusBarChanged.bind(this))}processStatusPanels(e){const t=this.gos.get("statusBar")?.statusPanels;if(t){const i=t.filter((e=>"left"===e.align)),s=t.filter((e=>"center"===e.align)),n=t.filter((e=>!e.align||"right"===e.align));this.panelsPromise=an.all([this.createAndRenderComponents(i,this.eStatusBarLeft,e),this.createAndRenderComponents(s,this.eStatusBarCenter,e),this.createAndRenderComponents(n,this.eStatusBarRight,e)])}else this.setDisplayed(!1)}handleStatusBarChanged(){this.updateQueued||(this.updateQueued=!0,this.panelsPromise.then((()=>{this.updateStatusBar(),this.updateQueued=!1})))}updateStatusBar(){const e=this.gos.get("statusBar")?.statusPanels,t=Array.isArray(e)&&e.length>0;this.setDisplayed(t);const i=new Map;t&&e.forEach((e=>{const t=e.key??e.statusPanel,s=this.statusBarService.getStatusPanel(t);if(s?.refresh){const n=this.gos.addGridCommonParams(e.statusPanelParams??{});s.refresh(n)&&(i.set(t,s),delete this.compDestroyFunctions[t],os(s.getGui()))}})),this.resetStatusBar(),t&&this.processStatusPanels(i)}resetStatusBar(){this.eStatusBarLeft.innerHTML="",this.eStatusBarCenter.innerHTML="",this.eStatusBarRight.innerHTML="",this.destroyComponents(),this.statusBarService.unregisterAllComponents()}destroy(){this.destroyComponents(),super.destroy()}destroyComponents(){Object.values(this.compDestroyFunctions).forEach((e=>e())),this.compDestroyFunctions={}}createAndRenderComponents(e,t,i){const s=[];return e.forEach((e=>{const t=e.key||e.statusPanel,n=i.get(t);let r;if(n)r=an.resolve(n);else{const t={};
2if(r=this.userComponentFactory.getStatusPanelCompDetails(e,t).newAgStackInstance(),null==r)return}s.push({key:t,promise:r})})),an.all(s.map((e=>e.promise))).then((()=>{s.forEach((e=>{e.promise.then((i=>{const s=()=>{this.destroyBean(i)};this.isAlive()?(this.statusBarService.registerStatusPanel(e.key,i),t.appendChild(i.getGui()),this.compDestroyFunctions[e.key]=s):s()}))}))}))}}},f_="32.3.3",v_={version:f_,moduleName:`${r.StatusBarModule}-core`,beans:[class extends ze{constructor(){super(),this.beanName="statusBarService",this.allComponents=new Map}registerStatusPanel(e,t){this.allComponents.set(e,t)}unregisterStatusPanel(e){this.allComponents.delete(e)}unregisterAllComponents(){this.allComponents.clear()}getStatusPanel(e){return this.allComponents.get(e)}getStatusPanelSelector(){return m_}destroy(){this.unregisterAllComponents(),super.destroy()}}],userComponents:[{name:"agAggregationComponent",classImp:class extends Rs{constructor(){super('<div class="ag-status-panel ag-status-panel-aggregations">\n            <ag-name-value data-ref="avgAggregationComp"></ag-name-value>\n            <ag-name-value data-ref="countAggregationComp"></ag-name-value>\n            <ag-name-value data-ref="minAggregationComp"></ag-name-value>\n            <ag-name-value data-ref="maxAggregationComp"></ag-name-value>\n            <ag-name-value data-ref="sumAggregationComp"></ag-name-value>\n        </div>',[g_]),this.sumAggregationComp=Is,this.countAggregationComp=Is,this.minAggregationComp=Is,this.maxAggregationComp=Is,this.avgAggregationComp=Is}wireBeans(e){this.valueService=e.valueService,this.cellNavigationService=e.cellNavigationService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.rangeService=e.rangeService}destroy(){super.destroy()}postConstruct(){L(this.gos)||F(this.gos)?(this.avgAggregationComp.setLabel("avg","Average"),this.countAggregationComp.setLabel("count","Count"),this.minAggregationComp.setLabel("min","Min"),this.maxAggregationComp.setLabel("max","Max"),this.sumAggregationComp.setLabel("sum","Sum"),this.addManagedEventListeners({cellSelectionChanged:this.onCellSelectionChanged.bind(this),modelUpdated:this.onCellSelectionChanged.bind(this)})):h("agAggregationComponent should only be used with the client and server side row model.")}init(e){this.refresh(e)}refresh(e){return this.params=e,this.onCellSelectionChanged(),!0}setAggregationComponentValue(e,t,i){const s=this.getAllowedAggregationValueComponent(e);if(w(s)&&s){const e=this.localeService.getLocaleTextFunc(),n=e("thousandSeparator",","),r=e("decimalSeparator",".");s.setValue(function(e,t,i){return"number"!==typeof e?"":Tr(Math.round(100*e)/100,t,i)}(t,n,r)),s.setDisplayed(i)}else this.getAggregationValueComponent(e)?.setDisplayed(!1)}getAllowedAggregationValueComponent(e){const{aggFuncs:t}=this.params;return!t||t.includes(e)?this.getAggregationValueComponent(e):null}getAggregationValueComponent(e){return this[`${e}AggregationComp`]}onCellSelectionChanged(){const e=this.rangeService?.getCellRanges();let t=0,i=0,s=0,n=null,r=null;const o={};if(e&&!x(e)&&this.rangeService)for(let h=0;h<e.length;h++){const a=e[h];let l=this.rangeService.getRangeStartRow(a);const c=this.rangeService.getRangeEndRow(a);for(;;){if(b(l)||!l||this.rowPositionUtils.before(c,l)||!l||!a.columns)break;a.columns.forEach((e=>{if(null===l)return;const a=this.cellPositionUtils.createId({rowPinned:l.rowPinned,column:e,rowIndex:l.rowIndex});if(o[a])return;o[a]=!0;const h=this.rowPositionUtils.getRowNode(l);if(b(h))return;let c=this.valueService.getValue(e,h);b(c)||""===c||(i++,"object"===typeof c&&"value"in c&&(c=c.value,""===c)||("string"===typeof c&&(c=Number(c)),"number"!==typeof c||isNaN(c)||(t+=c,(null===r||c>r)&&(r=c),(null===n||c<n)&&(n=c),s++)))})),l=this.cellNavigationService.getRowBelow(l)}}const a=i>1,l=s>1;this.setAggregationComponentValue("count",i,a),this.setAggregationComponentValue("sum",t,l),this.setAggregationComponentValue("min",n,l),this.setAggregationComponentValue("max",r,l),this.setAggregationComponentValue("avg",t/s,l)}}},{name:"agSelectedRowCountComponent",classImp:class extends p_{wireBeans(e){this.selectionService=e.selectionService}postConstruct(){if(!L(this.gos)&&!F(this.gos))return void h("agSelectedRowCountComponent should only be used with the client and server side row model.");this.setLabel("selectedRows","Selected"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-selected-row-count"),this.onRowSelectionChanged();const e=this.onRowSelectionChanged.bind(this);this.addManagedEventListeners({modelUpdated:e,selectionChanged:e})}onRowSelectionChanged(){const e=this.selectionService.getSelectionCount();if(e<0)return this.setValue("?"),void this.setDisplayed(!0);const t=this.localeService.getLocaleTextFunc(),i=t("thousandSeparator",","),s=t("decimalSeparator",".");this.setValue(Tr(e,i,s)),this.setDisplayed(e>0)}init(){}refresh(){return!0}destroy(){super.destroy()}}},{name:"agTotalRowCountComponent",classImp:class extends p_{wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.setLabel("totalRows","Total Rows"),L(this.gos)?(this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedEventListeners({modelUpdated:this.onDataChanged.bind(this)}),this.onDataChanged()):h("agTotalRowCountComponent should only be used with the client side row model.")}onDataChanged(){const e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator",".");this.setValue(Tr(this.getRowCountValue(),t,i))}getRowCountValue(){let e=0;return this.rowModel.forEachLeafNode((()=>e+=1)),e}init(){}refresh(){return!0}destroy(){super.destroy()}}},{name:"agFilteredRowCountComponent",classImp:class extends p_{wireBeans(e){this.rowModel=e.rowModel}postConstruct(){if(this.setLabel("filteredRows","Filtered"),!L(this.gos))return void h("agFilteredRowCountComponent should only be used with the client side row model.");this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);const e=this.onDataChanged.bind(this);this.addManagedEventListeners({modelUpdated:e}),e()}onDataChanged(){const e=this.getTotalRowCountValue(),t=this.getFilteredRowCountValue(),i=this.localeService.getLocaleTextFunc(),s=i("thousandSeparator",","),n=i("decimalSeparator",".");this.setValue(Tr(t,s,n)),this.setDisplayed(e!==t)}getTotalRowCountValue(){let e=0;return this.rowModel.forEachNode((()=>e+=1)),e}getFilteredRowCountValue(){let e=0;return this.rowModel.forEachNodeAfterFilter((t=>{t.group||(e+=1)})),e}init(){}refresh(){return!0}destroy(){super.destroy()}}},{name:"agTotalAndFilteredRowCountComponent",classImp:class extends p_{wireBeans(e){this.rowModel=e.rowModel}postConstruct(){L(this.gos)?(this.setLabel("totalAndFilteredRows","Rows"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedEventListeners({modelUpdated:this.onDataChanged.bind(this)}),this.onDataChanged()):h("agTotalAndFilteredRowCountComponent should only be used with the client side row model.")}onDataChanged(){const e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator","."),s=Tr(this.getFilteredRowCountValue(),t,i),n=Tr(this.getTotalRowCount(),t,i);if(s===n)this.setValue(s);else{const e=this.localeService.getLocaleTextFunc();this.setValue(`${s} ${e("of","of")} ${n}`)}}getFilteredRowCountValue(){let e=0;return this.rowModel.forEachNodeAfterFilter((t=>{t.group||e++})),e}getTotalRowCount(){let e=0;return this.rowModel.forEachNode((t=>{t.group||e++})),e}init(){}refresh(){return!0}destroy(){super.destroy()}}}],dependantModules:[ek]},y_={version:f_,moduleName:`${r.StatusBarModule}-api`,apiFunctions:{getStatusPanel:function(e,t){return Tn(e.statusBarService.getStatusPanel(t))}},dependantModules:[v_]},C_={version:f_,moduleName:r.StatusBarModule,dependantModules:[v_,y_]},S_={version:"32.3.3",moduleName:r.ViewportRowModelModule,rowModel:"viewport",beans:[class extends ze{constructor(){super(...arguments),this.beanName="rowModel",this.firstRow=-1,this.lastRow=-1,this.rowCount=-1,this.rowNodesByIndex={}}wireBeans(e){this.rowRenderer=e.rowRenderer,this.focusService=e.focusService,this.beans=e}ensureRowHeightsValid(e,t,i,s){return!1}postConstruct(){this.rowHeight=V(this.gos),this.addManagedEventListeners({viewportChanged:this.onViewportChanged.bind(this)}),this.addManagedPropertyListener("viewportDatasource",(()=>this.updateDatasource())),this.addManagedPropertyListener("rowHeight",(()=>{this.rowHeight=V(this.gos),this.updateRowHeights()}))}start(){this.updateDatasource()}isLastRowIndexKnown(){return!0}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)}updateDatasource(){const e=this.gos.get("viewportDatasource");e&&this.setViewportDatasource(e)}getViewportRowModelPageSize(){return this.gos.get("viewportRowModelPageSize")}getViewportRowModelBufferSize(){return this.gos.get("viewportRowModelBufferSize")}calculateFirstRow(e){const t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize(),s=e-t;return s<0?0:Math.floor(s/i)*i}calculateLastRow(e){if(-1===e)return e;const t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize(),s=e+t,n=Math.ceil(s/i)*i,r=this.rowCount-1;return Math.min(n,r)}onViewportChanged(e){const t=this.calculateFirstRow(e.firstRow),i=this.calculateLastRow(e.lastRow);this.firstRow===t&&this.lastRow===i||(this.firstRow=t,this.lastRow=i,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))}purgeRowsNotInViewport(){Object.keys(this.rowNodesByIndex).forEac
2h((e=>{const t=parseInt(e,10);if(t<this.firstRow||t>this.lastRow){if(this.isRowFocused(t))return;delete this.rowNodesByIndex[t]}}))}isRowFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;return t.rowIndex===e}setViewportDatasource(e){this.destroyDatasource(),this.viewportDatasource=e,this.rowCount=-1,e.init?e.init({setRowCount:this.setRowCount.bind(this),setRowData:this.setRowData.bind(this),getRow:this.getRow.bind(this)}):h("viewport is missing init method.")}getType(){return"viewport"}getRow(e){return this.rowNodesByIndex[e]||(this.rowNodesByIndex[e]=this.createBlankRowNode(e)),this.rowNodesByIndex[e]}getRowNode(e){let t;return this.forEachNode((i=>{i.id===e&&(t=i)})),t}getRowCount(){return-1===this.rowCount?0:this.rowCount}getRowIndexAtPixel(e){return 0!==this.rowHeight?Math.floor(e/this.rowHeight):0}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}updateRowHeights(){this.forEachNode((e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)})),this.eventService.dispatchEvent({type:"modelUpdated",newData:!1,newPage:!1,keepRenderedRows:!0,animate:!1})}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}isEmpty(){return this.rowCount>0}isRowsToRender(){return this.rowCount>0}getNodesInRangeForSelection(e,t){const i=e.rowIndex,s=t.rowIndex,n=i<this.firstRow||i>this.lastRow,r=s<this.firstRow||s>this.lastRow;if(n||r)return[];const o=[],a=i<=s?s:i;for(let l=i<=s?i:s;l<=a;l++)o.push(this.rowNodesByIndex[l]);return o}forEachNode(e){let t=0;Object.keys(this.rowNodesByIndex).forEach((i=>{const s=parseInt(i,10),n=this.rowNodesByIndex[s];e(n,t),t++}))}setRowData(e){et(e,((e,t)=>{const i=parseInt(e,10);if(i>=this.firstRow&&i<=this.lastRow){let e=this.rowNodesByIndex[i];b(e)&&(e=this.createBlankRowNode(i),this.rowNodesByIndex[i]=e),e.setDataAndId(t,i.toString())}}))}createBlankRowNode(e){const t=new Yn(this.beans);return t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*e),t.setRowIndex(e),t}setRowCount(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e!==this.rowCount&&(this.rowCount=e,this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.eventService.dispatchEvent({type:"modelUpdated",newData:!1,newPage:!1,keepRenderedRows:t,animate:!1}))}isRowPresent(e){return!!this.getRowNode(e.id)}}],dependantModules:[ek]};UF(_F,cN),Ln.__registerModules([$h,Oc,ld,Uc,hN,AV,BV,tH,ij,aj,pj,Ej,Fj,CN,Nj,xz,Yj,pU,Uz,u_,C_,S_],!1,void 0);const w_=JSON.parse('{"performances":[{"model":"Claude-3.5-Sonnet-20240620","Size":"\ud83d\udd12","User Interface&Experience":"88.9/2.2","Development&Programming":"77.3/13.6","Specialized Computing":"74.2/18.0","Tools, Environments, and Practices":"81.4/11.9","Emerging Technologies&Applications":"78.9/10.5","Miscellaneous and General Inquiry":"71.4/28.6","Databases&Data Handling":"63.6/4.5","Avg":"77.8/12.5","group1":"Proprietary LLMs","group2":"200B+"},{"model":"Claude-3.5-Sonnet-20241022","Size":"\ud83d\udd12","User Interface&Experience":"82.2/6.7","Development&Programming":"75.8/12.9","Specialized Computing":"76.4/16.9","Tools, Environments, and Practices":"84.7/10.2","Emerging Technologies&Applications":"84.2/13.2","Miscellaneous and General Inquiry":"57.1/28.6","Databases&Data Handling":"68.2/22.7","Avg":"78.1/13.5","group1":"Proprietary LLMs","group2":"200B+"},{"model":"GPT-3.5-turbo-0125","Size":"\ud83d\udd12","User Interface&Experience":"17.8/24.4","Development&Programming":"11.4/20.5","Specialized Computing":"4.5/19.1","Tools, Environments, and Practices":"11.9/18.6","Emerging Technologies&Applications":"10.5/21.1","Miscellaneous and General Inquiry":"13.6/9.1","Databases&Data Handling":"0.0/14.3","Avg":"10.5/19.6","group1":"Proprietary LLMs","group2":"200B+"},{"model":"GPT-4o-mini-2024-07-18","Size":"\ud83d\udd12","User Interface&Experience":"71.1/13.3","Development&Programming":"62.1/17.4","Specialized Computing":"50.0/13.6","Tools, Environments, and Practices":"65.2/14.6","Emerging Technologies&Applications":"72.9/13.6","Miscellaneous and General Inquiry":"71.1/18.4","Databases&Data Handling":"71.4/14.3","Avg":"65.8/15.6","group1":"Proprietary LLMs","group2":"200B+"},{"model":"GPT-4o-2024-08-06","Size":"\ud83d\udd12","User Interface&Experience":"66.7/17.8","Development&Programming":"72.7/19.7","Specialized Computing":"62.9/19.1","Tools, Environments, and Practices":"69.5/15.3","Emerging Technologies&Applications":"76.3/13.2","Miscellaneous and General Inquiry":"85.7/14.3","Databases&Data Handling":"59.1/22.7","Avg":"69.1/18.1","group1":"Proprietary LLMs","group2":"200B+"},{"model":"o1-mini","Size":"\ud83d\udd12","User Interface&Experience":"93.3/4.4","Development&Programming":"94.7/2.6","Specialized Computing":"84.1/7.6","Tools, Environments, and Practices":"91.0/5.6","Emerging Technologies&Applications":"88.1/3.4","Miscellaneous and General Inquiry":"95.5/0.0","Databases&Data Handling":"100.0/0.0","Avg":"89.3/5.1","group1":"Proprietary LLMs","group2":"200B+"},{"model":"o1-preview","Size":"\ud83d\udd12","User Interface&Experience":"93.3/2.2","Development&Programming":"81.8/7.6","Specialized Computing":"85.4/7.9","Tools, Environments, and Practices":"78.0/6.8","Emerging Technologies&Applications":"92.1/2.6","Miscellaneous and General Inquiry":"77.3/4.5","Databases&Data Handling":"71.4/28.6","Avg":"83.9/6.6","group1":"Proprietary LLMs","group2":"200B+"},{"model":"Yi-lightning","Size":"\ud83d\udd12","User Interface&Experience":"62.2/15.6","Development&Programming":"60.0
2/11.5","Specialized Computing":"57.9/5.3","Tools, Environments, and Practices":"49.4/16.9","Emerging Technologies&Applications":"71.2/11.9","Miscellaneous and General Inquiry":"54.5/13.6","Databases&Data Handling":"85.7/0.0","Avg":"59.5/12.6","group1":"Proprietary LLMs","group2":"200B+"},{"model":"Qwen-Max","Size":"\ud83d\udd12","User Interface&Experience":"75.6/17.8","Development&Programming":"74.2/13.6","Specialized Computing":"59.6/24.7","Tools, Environments, and Practices":"78.0/6.8","Emerging Technologies&Applications":"68.4/23.7","Miscellaneous and General Inquiry":"100.0/0.0","Databases&Data Handling":"81.8/4.5","Avg":"71.9/15.8","group1":"Proprietary LLMs","group2":"200B+"},{"model":"Doubao-Pro","Size":"\ud83d\udd12","User Interface&Experience":"51.1/20.0","Development&Programming":"40.8/18.5","Specialized Computing":"55.3/26.3","Tools, Environments, and Practices":"38.2/19.1","Emerging Technologies&Applications":"47.5/22.0","Miscellaneous and General Inquiry":"36.4/31.8","Databases&Data Handling":"42.9/57.1","Avg":"43.6/21.5","group1":"Proprietary LLMs","group2":"200B+"},{"model":"Qwen2.5-0.5B-Instruct","Size":"0.5B","User Interface&Experience":"2.2/4.4","Development&Programming":"4.6/4.6","Specialized Computing":"5.3/10.5","Tools, Environments, and Practices":"2.2/4.5","Emerging Technologies&Applications":"3.4/5.1","Miscellaneous and General Inquiry":"4.5/9.1","Databases&Data Handling":"0.0/14.3","Avg":"3.6/5.6","group1":"Open-source LLMs","group2":"0.5B+"},{"model":"Qwen2.5-Coder-0.5B-Instruct","Size":"0.5B","User Interface&Experience":"2.2/2.2","Development&Programming":"4.6/6.9","Specialized Computing":"2.6/5.3","Tools, Environments, and Practices":"4.5/2.2","Emerging Technologies&Applications":"3.4/5.1","Miscellaneous and General Inquiry":"4.5/0.0","Databases&Data Handling":"28.6/14.3","Avg":"4.4/4.6","group1":"Open-source LLMs","group2":"0.5B+"},{"model":"DS-Coder-1.3B-Instruct","Size":"1.3B","User Interface&Experience":"66.7/2.2","Development&Programming":"2.3/5.4","Specialized Computing":"2.6/10.5","Tools, Environments, and Practices":"1.7/6.8","Emerging Technologies&Applications":"0.0/9.1","Miscellaneous and General Inquiry":"2.2/3.4","Databases&Data Handling":"0.0/14.3","Avg":"2.6/5.6","group1":"Open-source LLMs","group2":"1B+"},{"model":"Yi-Coder-1.5B-Chat","Size":"1.5B","User Interface&Experience":"11.1/2.2","Development&Programming":"5.1/3.4","Specialized Computing":"5.4/4.6","Tools, Environments, and Practices":"2.6/5.3","Emerging Technologies&Applications":"2.2/5.6","Miscellaneous and General Inquiry":"4.5/4.5","Databases&Data Handling":"14.3/14.3","Avg":"7.4/5.1","group1":"Open-source LLMs","group2":"1B+"},{"model":"Qwen2.5-Coder-1.5B-Instruct","Size":"1.5B","User Interface&Experience":"11.1/4.4","Development&Programming":"15.9/9.1","Specialized Computing":"9.0/16.9","Tools, Environments, and Practices":"13.6/11.9","Emerging Technologies&Applications":"13.2/5.3","Miscellaneous and General Inquiry":"14.3/42.9","Databases&Data Handling":"18.2/4.5","Avg":"13.2/10.7","group1":"Open-source LLMs","group2":"1B+"},{"model":"OpenCoder-1.5B-Instruct","Size":"1.5B","User Interface&Experience":"11.1/4.4","Development&Programming":"3.8/5.4","Specialized Computing":"0.0/5.3","Tools, Environments, and Practices":"2.2/4.5","Emerging Technologies&Applications":"3.4/8.5","Miscellaneous and General Inquiry":"4.5/9.1","Databases&Data Handling":"0.0/0.0","Avg":"6.7/3.8","group1":"Open-source LLMs","group2":"1B+"},{"model":"Qwen2.5-Coder-3B-Instruct","Size":"3B","User Interface&Experience":"35.6/11.1","Development&Programming":"29.5/10.6","Specialized Computing":"27.0/15.7","Tools, Environments, and Practices":"20.3/18.6","Emerging Technologies&Applications":"28.9/10.5","Miscellaneous and General Inquiry":"42.9/14.3","Databases&Data Handling":"27.3/13.6","Avg":"28.3/13.3","group1":"Open-source LLMs","group2":"3B+"},{"model":"CodeLlama-7B-Instruct","Size":"7B","User Interface&Experience":"33.3/8.9","Development&Programming":"28.8/18.6","Specialized Computing":"23.8/13.8","Tools, Environments, and Practices":"18.2/9.1","Emerging Technologies&Applications":"31.6/5.3","Miscellaneous and General Inquiry":"29.2/14.6","Databases&Data Handling":"71.4/0.0","Avg":"28.2/12.8","group1":"Open-source LLMs","group2":"6B+"},{"model":"Llama3-8B-Instruct","Size":"7B","User Interface&Experience":"20.0/17.8","Development&Programming":"14.6/11.5","Specialized Computing":"15.8/2.6","Tools, Environments, and Practices":"13.5/9.0","Emerging Technologies&Applications":"16.9/11.9","Miscellaneous and General Inquiry":"22.7/0.0","Databases&Data Handling":"57.1/14.3","Avg":"16.7/10.3","group1":"Open-source LLMs","group2":"6B+"},{"model":"Llama3.1-8B-Instruct","Size":"7B","User Interface&Experience":"2.2/8.9","Development&Programming":"4.5/10.1","Specialized Computing":"3.8/6.2","Tools, Environments, and Practices":"3.4/6.8","Emerging Technologies&Applications":"5.3/2.6","Miscellaneous and General Inquiry":"9.1/9.1","Databases&Data Handling":"14.3/0.0","Avg":"7.9/4.4","group1":"Open-source LLMs","group2":"6B+"},{"model":"DS-Coder-6.7B-Instruct","Size":"6.7B","User Interface&Experience":"11.1/17.8","Development&Programming":"13.1/13.8","Specialized Computing":"13.6/8.5","Tools, Environments, and Practices":"13.2/7.9","Emerging Technologies&Applications":"9.0/7.9","Miscellaneous and General Inquiry":"13.6/4.5","Databases&Data Handling":"28.6/0.0","Avg":"12.3/10.8","group1":"Open-source LLMs","group2":"6B+"},{"model":"CodeQwen1.5-7B-Chat","Size":"7B","User Interface&Experience":"17.8/15.6","Development&Programming":"13.8/12.3","Specialized Computing":"15.8/0.0","Tools, Environments, and Practices":"15.7/9.0","Emerging Technologies&Applications":"15.3/15.3","Miscellaneous and General Inquiry":"18.2/13.6","Databases&Data Handling":"14.3/42.9","Avg":"15.4/11.8","group1":"Open-source LLMs","group2":"6B+"},{"model":"Yi-Coder-9B-Chat","Size":"9B","User Interface&Experience":"15.6/17.8","Development&Programming":"15.4/9.2","Specialized Computing":"15.8/7.9","Tools, Environments, and Practices":"13.5/13.5","Emerging Technologies&Applications":"10.2/20.3","Miscellaneous and General Inquiry":"18.2/13.6","Databases&Data Handling":"28.6/28.6","Avg":"14.6/13.3","group1":"Open-source LLMs","group2":"6B+"},{"model":"DS-Coder-V2-Lite-Instruct","Size":"2.4/16B","User Interface&Experience":"42.2/20.0","Development&Programming":"33.3/17.4","Specialized Computing":"31.5/16.9","Tools, Environments, and Practices":"35.6/20.3","Emerging Technologies&Applications":"39.5/21.1","Miscellaneous and General Inquiry":"71.4/14.3","Databases&Data Handling":"31.8/22.7","Avg":"35.5/18.6","group1":"Open-source LLMs","group2":"6B+"},{"model":"Qwen2.5-Coder-7B-Instruct","Size":"7B","User Interface&Experience":"40.0/22.2","Development&Programming":"46.2/19.7","Specialized Computing":"43.8/15.7","Tools, Environments, and Practices":"40.7/20.3","Emerging Technologies&Applications":"34.2/15.8","Miscellaneous and General Inquiry":"71.4/0.0","Databases&Data Handling":"40.9/22.7","Avg":"43.1/18.6","group1":"Open-source LLMs","group2":"6B+"},{"model":"OpenCoder-8B-Instruct","Size":"8B","User Interface&Experience":"24.4/8.9","Development&Programming":"14.6/8.5","Specialized Computing":"10.5/7.9","Tools, Environments, and Practices":"9.0/4.5","Emerging Technologies&Applications":"13.6/6.8","Miscellaneous and General Inquiry":"18.2/9.1","Databases&Data Handling":"14.3/0.0","Avg":"14.1/7.1","group1":"Open-source LLMs","group2":"6B+"},{"model":"CodeLlama-13B-Instruct","Size":"13B","User Interface&Experience":"13.3/4.4","Development&Programming":"7.9/6.7","Specialized Computing":"6.8/8.5","Tools, Environments, and Practices":"7.7/6.2","Emerging Technologies&Applications":"4.5/4.5","Miscellaneous and General Inquiry":"5.3/5.3","Databases&Data Handling":"14.3/14.3","Avg":"11.2/7.9","group1":"Open-source LLMs","group2":"13B+"},{"model":"Starcoder2-15B-Instruct-v0.1","Size":"15B","User Interface&Experience":"6.7/6.7","Development&Programming":"6.8/12.9","Specialized Computing":"4.5/15.7","Tools, Environments, and Practices":"6.8/6.8","Emerging Technologies&Applications":"5.3/13.2","Miscellaneous and General Inquiry":"13.6/13.6","Databases&Data Handling":"0.0/14.3","Avg":"6.4/12.0","group1":"Open-source LLMs","group2":"13B+"},{"model":"Qwen2.5-Coder-14B-Instruct","Size":"14B","User Interface&Experience":"51.1/24.4","Development&Programming":"53.0/17.4","Specialized Computing":"52.8/16.9","Tools, Environments, and Practices":"50.8/18.6","Emerging Technologies&Applications":"57.9/7.9","Miscellaneous and General Inquiry":"28.6/28.6","Databases&Data Handling":"36.4/27.3","Avg":"60.6/51.5","group1":"Open-source LLMs","group2":"13B+"},{"model":"CodeLlama-34B-Instruct","Size":"34B","User Interface&Experience":"11.1/6.7","Development&Programming":"2.6/2.6","Specialized Computing":"6.9/2.3","Tools, Environments, and Practices":"8.5/6.8","Emerging Technologies&Applications":"7.9/10.1","Miscellaneous and General Inquiry":"9.1/9.1","Databases&Data Handling":"14.3/0.0","Avg":"7.7/5.6","group1":"Open-source LLMs","group2":"20B+"},{"model":"CodeStral-22B-v0.1","Size":"22B","User Interface&Experience":"17.8/22.2","Development&Programming":"27.3/13.6","Specialized Computing":"14.6/14.6","Tools, Environments, and Practices":"25.4/10.2","Emerging Technologies&Applications":"18.4/10.5","Miscellaneous and General Inquiry":"14.3/42.9","Databases&Data Handling":"22.7/22.7","Avg":"21.7/15.8","group1":"Open-source LLMs","group2":"20B+"},{"model":"DS-Coder-33B-Instruct","Size":"33B","User Interface&Experience":"13.3/11.1","Development&Programming":"22.0/9.8","Specialized Computing":"12.4/12.4","Tools, Environments, and Practices":"13.6/6.8","Emerging Technologies&Applications":"13.2/18.4","Miscellaneous and General Inquiry":"28.6/42.9","Databases&Data Handling":"22.7/18.2","Avg":"16.8/12.0","group1":"Open-source LLMs","group2":"20B+"},{"model":"CodeLlama-70B-Instruct","Size":"70B","User Interface&Experience":"11.1/22.2","Development&Programming":"9.2/10.0","Specialized Computing":"10.5/5.3","Tools, Environments, and Practices":"9.0/6.7","Emerging Technologies&Applications":"16.9/8.5","Miscellaneous and General Inquiry":"9.1/13.6","Databases&Data Handling":"0.0/0.0","Avg":"15.5/10.5","group1":"Open-source LLMs","group2":"20B+"},{"model":"DS-Coder-V2-Instruct","Size":"21/236B","User Interface&Experience":"55.6/11.1","Development&Programming":"62.1/18.2","Specialized Computing":"60.7/14.6","Tools, Environments, and Practices":"50.8/18.6","Emerging Technologies&Applications":"52.6/2
21.1","Miscellaneous and General Inquiry":"71.4/14.3","Databases&Data Handling":"40.9/31.8","Avg":"57.4/17.6","group1":"Open-source LLMs","group2":"20B+"},{"model":"DS-V2.5","Size":"21/236B","User Interface&Experience":"77.8/11.1","Development&Programming":"72.0/12.9","Specialized Computing":"71.9/13.5","Tools, Environments, and Practices":"71.2/8.5","Emerging Technologies&Applications":"73.7/10.5","Miscellaneous and General Inquiry":"100.0/0.0","Databases&Data Handling":"68.2/13.6","Avg":"73.0/11.7","group1":"Open-source LLMs","group2":"20B+"},{"model":"Llama3-70B-Instruct","Size":"7B","User Interface&Experience":"35.6/20.0","Development&Programming":"26.2/26.2","Specialized Computing":"25.4/22.0","Tools, Environments, and Practices":"34.2/15.8","Emerging Technologies&Applications":"23.6/14.6","Miscellaneous and General Inquiry":"36.4/4.5","Databases&Data Handling":"14.3/57.1","Avg":"27.7/20.5","group1":"Open-source LLMs","group2":"20B+"},{"model":"Llama3.1-70B-Instruct","Size":"7B","User Interface&Experience":"48.9/24.4","Development&Programming":"43.8/20.0","Specialized Computing":"34.2/26.3","Tools, Environments, and Practices":"40.4/22.5","Emerging Technologies&Applications":"54.2/20.3","Miscellaneous and General Inquiry":"45.5/9.1","Databases&Data Handling":"71.4/14.3","Avg":"44.9/21.0","group1":"Open-source LLMs","group2":"20B+"},{"model":"Qwen2.5-Coder-32B-Instruct","Size":"32B","User Interface&Experience":"71.1/13.3","Development&Programming":"66.7/15.9","Specialized Computing":"67.4/16.9","Tools, Environments, and Practices":"74.6/13.6","Emerging Technologies&Applications":"65.8/18.4","Miscellaneous and General Inquiry":"100.0/0.0","Databases&Data Handling":"63.6/18.2","Avg":"68.9/15.6","group1":"Open-source LLMs","group2":"20B+"},{"model":"Qwen2.5-32B-Instruct","Size":"32B","User Interface&Experience":"62.2/15.6","Development&Programming":"52.3/15.4","Specialized Computing":"57.9/18.4","Tools, Environments, and Practices":"50.6/23.6","Emerging Technologies&Applications":"54.2/13.6","Miscellaneous and General Inquiry":"50.0/13.6","Databases&Data Handling":"71.4/14.3","Avg":"54.1/17.1","group1":"Open-source LLMs","group2":"20B+"},{"model":"Qwen2.5-72B-Instruct","Size":"72B","User Interface&Experience":"82.2/6.7","Development&Programming":"71.5/14.6","Specialized Computing":"76.3/13.2","Tools, Environments, and Practices":"75.3/15.7","Emerging Technologies&Applications":"71.2/18.6","Miscellaneous and General Inquiry":"63.6/13.6","Databases&Data Handling":"85.7/14.3","Avg":"73.8/14.4","group1":"Open-source LLMs","group2":"20B+"},{"model":"QwQ-32B-Preview","Size":"32B","User Interface&Experience":"53.3/15.6","Development&Programming":"56.8/16.7","Specialized Computing":"50.6/16.9","Tools, Environments, and Practices":"64.4/5.1","Emerging Technologies&Applications":"52.6/21.1","Miscellaneous and General Inquiry":"85.7/0.0","Databases&Data Handling":"63.6/9.1","Avg":"56.6/14.5","group1":"Open-source LLMs","group2":"20B+"},{"model":"Qwen2.5-SynCoder","Size":"32B","User Interface&Experience":"55.6/26.7","Development&Programming":"49.2/20.8","Specialized Computing":"36.8/36.8","Tools, Environments, and Practices":"50.6/2
20.2","Emerging Technologies&Applications":"52.5/20.3","Miscellaneous and General Inquiry":"40.9/18.2","Databases&Data Handling":"57.1/0.0","Avg":"49.2/22.3","group1":"Open-source LLMs","group2":"20B+"}],"models":[{"model_name":"Claude-3.5-Sonnet-20240620"},{"model_name":"Claude-3.5-Sonnet-20241022"},{"model_name":"GPT-3.5-turbo-0125"},{"model_name":"GPT-4o-mini-2024-07-18"},{"model_name":"GPT-4o-2024-08-06"},{"model_name":"o1-mini"},{"model_name":"o1-preview"},{"model_name":"Yi-lightning"},{"model_name":"Qwen-Max"},{"model_name":"Doubao-Pro"},{"model_name":"Qwen2.5-0.5B-Instruct"},{"model_name":"Qwen2.5-Coder-0.5B-Instruct"},{"model_name":"DS-Coder-1.3B-Instruct"},{"model_name":"Yi-Coder-1.5B-Chat"},{"model_name":"Qwen2.5-Coder-1.5B-Instruct"},{"model_name":"OpenCoder-1.5B-Instruct"},{"model_name":"Qwen2.5-Coder-3B-Instruct"},{"model_name":"CodeLlama-7B-Instruct"},{"model_name":"Llama3-8B-Instruct"},{"model_name":"Llama3.1-8B-Instruct"},{"model_name":"DS-Coder-6.7B-Instruct"},{"model_name":"CodeQwen1.5-7B-Chat"},{"model_name":"Yi-Coder-9B-Chat"},{"model_name":"DS-Coder-V2-Lite-Instruct"},{"model_name":"Qwen2.5-Coder-7B-Instruct"},{"model_name":"OpenCoder-8B-Instruct"},{"model_name":"CodeLlama-13B-Instruct"},{"model_name":"Starcoder2-15B-Instruct-v0.1"},{"model_name":"Qwen2.5-Coder-14B-Instruct"},{"model_name":"CodeLlama-34B-Instruct"},{"model_name":"CodeStral-22B-v0.1"},{"model_name":"DS-Coder-33B-Instruct"},{"model_name":"CodeLlama-70B-Instruct"},{"model_name":"DS-Coder-V2-Instruct"},{"model_name":"DS-V2.5"},{"model_name":"Llama3-70B-Instruct"},{"model_name":"Llama3.1-70B-Instruct"},{"model_name":"Qwen2.5-Coder-32B-Instruct"},{"model_name":"Qwen2.5-32B-Instruct"},{"model_name":"Qwen2.5-72B-Instruct"},{"model_name":"QwQ-32B-Preview"},{"model_name":"Qwen2.5-SynCoder"}],"date_marks":[1682892000000,1685570400000,1688162400000,1690840800000,1698793200000,1693519200000,1696111200000,1698793200000,1701385200000,1704063600000,1706742000000,1706742000000,1709247600000,1711922400000,1682892000000,1685570400000,1688162400000,1690840800000,1693519200000,1696111200000,1698793200000,1701385200000,1704063600000,1706742000000,1709247600000,1711922400000,1682892000000,1685570400000,1688162400000,1690840800000,1693519200000,1696111200000,1698793200000,1704063600000,1696111200000,1682892000000,1685570400000,1690840800000,1688162400000,1688162400000,1688162400000]}');function b_(e){var t,i,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(i=b_(e[t]))&&(s&&(s+=" "),s+=i)}else for(i in e)e[i]&&(s&&(s+=" "),s+=i);return s}const x_=function(){for(var e,t,i=0,s="",n=arguments.length;i<n;i++)(e=arguments[i])&&(t=b_(e))&&(s&&(s+=" "),s+=t);return s};function M_(e,t){const i=(0,pu.A)({},t);return Object.keys(e).forEach((s=>{if(s.toString().match(/^(components|slots)$/))i[s]=(0,pu.A)({},e[s],i[s]);else if(s.toString().match(/^(componentsProps|slotProps)$/)){const n=e[s]||{},r=t[s];i[s]={},r&&Object.keys(r)?n&&Object.keys(n)?(i[s]=(0,pu.A)({},r),Object.keys(n).forEach((e=>{i[s][e]=M_(n[e],r[e])}))):i[s]=r:i[s]=n}else void 0===i[s]&&(i[s]=e[s])})),i}function D_(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const s={};return Object.keys(e).forEach((n=>{s[n]=e[n].reduce(((e,s)=>{if(s){const n=t(s);""!==n&&e.push(n),i&&i[s]&&e.push(i[s])}return e}),[]).join(" ")})),s}var I_=i(52);const R_=Zu();const E_=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e},A_=e=>E_(e)&&"classes"!==e,T_=(0,I_.Ay)({themeId:"$$material",defaultTheme:R_,rootShouldForwardProp:A_}),P_=t.createContext(void 0);function L_(e){let{props:i,name:s}=e;return function(e){const{theme:t,name:i,props:s}=e;if(!t||!t.components||!t.components[i])return s;const n=t.components[i];return n.defaultProps?M_(n.defaultProps,s):n.styleOverrides||n.variants?s:M_(n,s)}({props:i,name:s,theme:{components:t.useContext(P_)}})}function F_(e){return L_(e)}const k_=function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return t.useMemo((()=>i.every((e=>null==e))?null:e=>
2{i.forEach((t=>{!function(e,t){"function"===typeof e?e(t):e&&(e.current=t)}(t,e)}))}),i)},N_="undefined"!==typeof window?t.useLayoutEffect:t.useEffect;const O_=function(e){const i=t.useRef(e);return N_((()=>{i.current=e})),t.useRef((function(){return(0,i.current)(...arguments)})).current},G_={};const B_=[];class V_{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new V_}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function z_(){const e=function(e,i){const s=t.useRef(G_);return s.current===G_&&(s.current=e(i)),s}(V_.create).current;var i;return i=e.disposeEffect,t.useEffect(i,B_),e}let H_=!0,W_=!1;const j_=new V_,U_={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function __(e){e.metaKey||e.altKey||e.ctrlKey||(H_=!0)}function K_(){H_=!1}function $_(){"hidden"===this.visibilityState&&W_&&(H_=!0)}function Y_(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(i){}return H_||function(e){const{type:t,tagName:i}=e;return!("INPUT"!==i||!U_[t]||e.readOnly)||"TEXTAREA"===i&&!e.readOnly||!!e.isContentEditable}(t)}const Z_=function(){const e=t.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",__,!0),t.addEventListener("mousedown",K_,!0),t.addEventListener("pointerdown",K_,!0),t.addEventListener("touchstart",K_,!0),t.addEventListener("visibilitychange",$_,!0))}),[]),i=t.useRef(!1);return{isFocusVisibleRef:i,onFocus:function(e){return!!Y_(e)&&(i.current=!0,!0)},onBlur:function(){return!!i.current&&(W_=!0,j_.start(100,(()=>{W_=!1})),i.current=!1,!0)},ref:e}};function q_(e,t){return q_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q_(e,t)}const Q_=t.createContext(null);function X_(e,i){var s=Object.create(null);return e&&t.Children.map(e,(function(e){return e})).forEach((function(e){s[e.key]=function(e){return i&&(0,t.isValidElement)(e)?i(e):e}(e)})),s}function J_(e,t,i){return null!=i[t]?i[t]:e.props[t]}function eK(e,i,s){var n=X_(e.children),r=function(e,t){function i(i){return i in t?t[i]:e[i]}e=e||{},t=t||{};var s,n=Object.create(null),r=[];for(var o in e)o in t?r.length&&(n[o]=r,r=[]):r.push(o);var a={};for(var l in t){if(n[l])for(s=0;s<n[l].length;s++){var h=n[l][s];a[n[l][s]]=i(h)}a[l]=i(l)}for(s=0;s<r.length;s++)a[r[s]]=i(r[s]);return a}(i,n);return Object.keys(r).forEach((function(o){var a=r[o];if((0,t.isValidElement)(a)){var l=o in i,h=o in n,c=i[o],d=(0,t.isValidElement)(c)&&!c.props.in;!h||l&&!d?h||!l||d?h&&l&&(0,t.isValidElement)(c)&&(r[o]=(0,t.cloneElement)(a,{onExited:s.bind(null,a),in:c.props.in,exit:J_(a,"exit",e),enter:J_(a,"enter",e)})):r[o]=(0,t.cloneElement)(a,{in:!1}):r[o]=(0,t.cloneElement)(a,{onExited:s.bind(null,a),in:!0,exit:J_(a,"exit",e),enter:J_(a,"enter",e)})}})),r}var tK=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},iK=function(e){var i,s;function n(t,i){var s,n=(s=e.call(this,t,i)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s));return s.state={contextValue:{isMounting:!0},handleExited:n,firstRender:!0},s}s=e,(i=n).prototype=Object.create(s.prototype),i.prototype.constructor=i,q_(i,s);var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(e,i){var s,n,r=i.children,o=i.handleExited;return{children:i.firstRender?(s=e,n=o,X_(s.children,(function(e){return(0,t.cloneElement)(e,{onExited:n.bind(null,e),in:!0,appear:J_(e,"appear",s),enter:J_(e,"enter",s),exit:J_(e,"exit",s)})}))):eK(e,r,o),firstRender:!1}},r.handleExited=function(e,t){var i=X_(this.props.children);e.key in i||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var i=(0,pu.A)({},t.children);return delete i[e.key],{children:i}})))},r.render=function(){var e=this.props,i=e.component,s=e.childFactory,n=(0,gu.A)(e,["component","childFactory"]),r=this.state.contextValue,o=tK(this.state.children).map(s);
2return delete n.appear,delete n.enter,delete n.exit,null===i?t.createElement(Q_.Provider,{value:r},o):t.createElement(Q_.Provider,{value:r},t.createElement(i,n,o))},n}(t.Component);iK.propTypes={},iK.defaultProps={component:"div",childFactory:function(e){return e}};const sK=iK;var nK=i(290);const rK=function(e){const{className:i,classes:s,pulsate:n=!1,rippleX:r,rippleY:o,rippleSize:a,in:l,onExited:h,timeout:c}=e,[d,u]=t.useState(!1),p=x_(i,s.ripple,s.rippleVisible,n&&s.ripplePulsate),g={width:a,height:a,top:-a/2+o,left:-a/2+r},m=x_(s.child,d&&s.childLeaving,n&&s.childPulsate);return l||d||u(!0),t.useEffect((()=>{if(!l&&null!=h){const e=setTimeout(h,c);return()=>{clearTimeout(e)}}}),[h,l,c]),(0,ep.jsx)("span",{className:p,style:g,children:(0,ep.jsx)("span",{className:m})})},oK=e=>e,aK=(()=>{let e=oK;return{configure(t){e=t},generate:t=>e(t),reset(){e=oK}}})(),lK={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function hK(e,t){const i=lK[t];return i?`${arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui"}-${i}`:`${aK.generate(e)}-${t}`}function cK(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const s={};return t.forEach((t=>{s[t]=hK(e,t,i)})),s}const dK=cK("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),uK=["center","classes","className"];let pK,gK,mK,fK,vK=e=>e;const yK=(0,nK.i7)(pK||(pK=vK`
3  0% {
4    transform: scale(0);
5    opacity: 0.1;
6  }
7
8  100% {
9    transform: scale(1);
10    opacity: 0.3;
11  }
12`)),CK=(0,nK.i7)(gK||(gK=vK`
13  0% {
14    opacity: 1;
15  }
16
17  100% {
18    opacity: 0;
19  }
20`)),SK=(0,nK.i7)(mK||(mK=vK`
21  0% {
22    transform: scale(1);
23  }
24
25  50% {
26    transform: scale(0.92);
27  }
28
29  100% {
30    transform: scale(1);
31  }
32`)),wK=T_("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),bK=T_(rK,{name:"MuiTouchRipple",slot:"Ripple"})(fK||(fK=vK`
33  opacity: 0;
34  position: absolute;
35
36  &.${0} {
37    opacity: 0.3;
38    transform: scale(1);
39    animation-name: ${0};
40    animation-duration: ${0}ms;
41    animation-timing-function: ${0};
42  }
43
44  &.${0} {
45    animation-duration: ${0}ms;
46  }
47
48  & .${0} {
49    opacity: 1;
50    display: block;
51    width: 100%;
52    height: 100%;
53    border-radius: 50%;
54    background-color: currentColor;
55  }
56
57  & .${0} {
58    opacity: 0;
59    animation-name: ${0};
60    animation-duration: ${0}ms;
61    animation-timing-function: ${0};
62  }
63
64  & .${0} {
65    position: absolute;
66    /* @noflip */
67    left: 0px;
68    top: 0;
69    animation-name: ${0};
70    animation-duration: 2500ms;
71    animation-timing-function: ${0};
72    animation-iteration-count: infinite;
73    animation-delay: 200ms;
74  }
75`),dK.rippleVisible,yK,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),dK.ripplePulsate,(e=>{let{theme:t}=e;return t.transitions.duration.shorter}),dK.child,dK.childLeaving,CK,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),dK.childPulsate,SK,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut})),xK=t.forwardRef((function(e,i){const s=F_({props:e,name:"MuiTouchRipple"}),{center:n=!1,classes:r={},className:o}=s,a=(0,gu.A)(s,uK),[l,h]=t.useState([]),c=t.useRef(0),d=t.useRef(null);t.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const u=t.useRef(!1),p=z_(),g=t.useRef(null),m=t.useRef(null),f=t.useCallback((e=>{const{pulsate:t,rippleX:i,rippleY:s,rippleSize:n,cb:o}=e;h((e=>[...e,(0,ep.jsx)(bK,{classes:{ripple:x_(r.ripple,dK.ripple),rippleVisible:x_(r.rippleVisible,dK.rippleVisible),ripplePulsate:x_(r.ripplePulsate,dK.ripplePulsate),child:x_(r.child,dK.child),childLeaving:x_(r.childLeaving,dK.childLeaving),childPulsate:x_(r.childPulsate,dK.childPulsate)},timeout:550,pulsate:t,rippleX:i,rippleY:s,rippleSize:n},c.current)])),c.current+=1,d.current=o}),[r]),v=t.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:s=!1,center:r=n||t.pulsate,fakeElement:o=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&u.current)return void(u.current=!1);"touchstart"===(null==e?void 0:e.type)&&(u.current=!0);const a=o?null:m.current,l=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let h,c,d;if(r||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)h=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:i}=e.touches&&e.touches.length>0?e.touches[0]:e;h=Math.round(t-l.left),c=Math.round(i-l.top)}if(r)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-h),h)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-c),c)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===g.current&&(g.current=()=>{f({pulsate:s,rippleX:h,rippleY:c,rippleSize:d,cb:i})},p.start(80,(()=>{g.current&&(g.current(),g.current=null)}))):f({pulsate:s,rippleX:h,rippleY:c,rippleSize:d,cb:i})}),[n,f,p]),y=t.useCallback((()=>{v({},{pulsate:!0})}),[v]),C=t.useCallback(((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&g.current)return g.current(),g.current=null,void p.start(0,(()=>{C(e,t)}));g.current=null,h((e=>e.length>0?e.slice(1):e)),d.current=t}),[p]);return t.useImperativeHandle(i,(()=>({pulsate:y,start:v,stop:C})),[y,v,C]),(0,ep.jsx)(wK,(0,pu.A)({className:x_(dK.root,r.root,o),ref:m},a,{children:(0,ep.jsx)(sK,{component:null,exit:!0,children:l})}))}));function MK(e){return hK("MuiButtonBase",e)}const DK=cK("MuiButtonBase",["root","disabled","focusVisible"]),IK=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onF
75ocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],RK=T_("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${DK.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),EK=t.forwardRef((function(e,i){const s=F_({props:e,name:"MuiButtonBase"}),{action:n,centerRipple:r=!1,children:o,className:a,component:l="button",disabled:h=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:u=!1,LinkComponent:p="a",onBlur:g,onClick:m,onContextMenu:f,onDragLeave:v,onFocus:y,onFocusVisible:C,onKeyDown:S,onKeyUp:w,onMouseDown:b,onMouseLeave:x,onMouseUp:M,onTouchEnd:D,onTouchMove:I,onTouchStart:R,tabIndex:E=0,TouchRippleProps:A,touchRippleRef:T,type:P}=s,L=(0,gu.A)(s,IK),F=t.useRef(null),k=t.useRef(null),N=k_(k,T),{isFocusVisibleRef:O,onFocus:G,onBlur:B,ref:V}=Z_(),[z,H]=t.useState(!1);h&&z&&H(!1),t.useImperativeHandle(n,(()=>({focusVisible:()=>{H(!0),F.current.focus()}})),[]);const[W,j]=t.useState(!1);t.useEffect((()=>{j(!0)}),[]);const U=W&&!c&&!h;function _(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;return O_((s=>{t&&t(s);return!i&&k.current&&k.current[e](s),!0}))}t.useEffect((()=>{z&&u&&!c&&W&&k.current.pulsate()}),[c,u,z,W]);const K=_("start",b),$=_("stop",f),Y=_("stop",v),Z=_("stop",M),q=_("stop",(e=>{z&&e.preventDefault(),x&&x(e)})),Q=_("start",R),X=_("stop",D),J=_("stop",I),ee=_("stop",(e=>{B(e),!1===O.current&&H(!1),g&&g(e)}),!1),te=O_((e=>{F.current||(F.current=e.currentTarget),G(e),!0===O.current&&(H(!0),C&&C(e)),y&&y(e)})),ie=()=>{const e=F.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},se=t.useRef(!1),ne=O_((e=>{u&&!se.current&&z&&k.current&&" "===e.key&&(se.current=!0,k.current.stop(e,(()=>{k.current.start(e)}))),e.target===e.currentTarget&&ie()&&" "===e.key&&e.preventDefault(),S&&S(e),e.target===e.currentTarget&&ie()&&"Enter"===e.key&&!h&&(e.preventDefault(),m&&m(e))})),re=O_((e=>{u&&" "===e.key&&k.current&&z&&!e.defaultPrevented&&(se.current=!1,k.current.stop(e,(()=>{k.current.pulsate(e)}))),w&&w(e),m&&e.target===e.currentTarget&&ie()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let oe=l;"button"===oe&&(L.href||L.to)&&(oe=p);const ae={};"button"===oe?(ae.type=void 0===P?"button":P,ae.disabled=h):(L.href||L.to||(ae.role="button"),h&&(ae["aria-disabled"]=h));const le=k_(i,V,F);const he=(0,pu.A)({},s,{centerRipple:r,component:l,disabled:h,disableRipple:c,disableTouchRipple:d,focusRipple:u,tabIndex:E,focusVisible:z}),ce=(e=>{const{disabled:t,focusVisible:i,focusVisibleClassName:s,classes:n}=e,r=D_({root:["root",t&&"disabled",i&&"focusVisible"]},MK,n);return i&&s&&(r.root+=` ${s}`),r})(he);return(0,ep.jsxs)(RK,(0,pu.A)({as:oe,className:x_(ce.root,a),ownerState:he,onBlur:ee,onClick:m,onContextMenu:$,onFocus:te,onKeyDown:ne,onKeyUp:re,onMouseDown:K,onMouseLeave:q,onMouseUp:Z,onDragLeave:Y,onTouchEnd:X,onTouchMove:J,onTouchStart:Q,ref:le,tabIndex:h?-1:E,type:P},ae,L,{children:[o,U?(0,ep.jsx)(xK,(0,pu.A)({ref:N,center:r},A)):null]}))}));const AK=i(598).A;function TK(e){return hK("MuiButton",e)}const PK=cK("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const LK=t.createContext({});const FK=t.createContext(void 0),kK=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],NK=e=>(0,pu.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),OK=T_(EK,{shouldForwardProp:e=>A_(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:i}=e;return[t.root,t[i.variant],t[`${i.variant}${AK(i.color)}`],t[`size${AK(i.size)}`],t[`${i.variant}Size${AK(i.size)}`],"inherit"===i.color&&t.colorInherit,i.disableElevation&&t.disableElevation,i.fullWidth&&t.fullWidth]}})((e=>{let{theme:t,ownerState:i}=e;var s,n;const r="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],o="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,pu.A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,pu.A)({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,Su.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===i.variant&&"inherit"!==i.color&&{backgroundColor:t.vars?`rgba(${t.vars.palette[i.color].mainCh
75annel} / ${t.vars.palette.action.hoverOpacity})`:(0,Su.X4)(t.palette[i.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===i.variant&&"inherit"!==i.color&&{border:`1px solid ${(t.vars||t).palette[i.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[i.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,Su.X4)(t.palette[i.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===i.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===i.variant&&"inherit"!==i.color&&{backgroundColor:(t.vars||t).palette[i.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[i.color].main}}),"&:active":(0,pu.A)({},"contained"===i.variant&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${PK.focusVisible}`]:(0,pu.A)({},"contained"===i.variant&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${PK.disabled}`]:(0,pu.A)({color:(t.vars||t).palette.action.disabled},"outlined"===i.variant&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"contained"===i.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===i.variant&&{padding:"6px 8px"},"text"===i.variant&&"inherit"!==i.color&&{color:(t.vars||t).palette[i.color].main},"outlined"===i.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===i.variant&&"inherit"!==i.color&&{color:(t.vars||t).palette[i.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[i.color].mainChannel} / 0.5)`:`1px solid ${(0,Su.X4)(t.palette[i.color].main,.5)}`},"contained"===i.variant&&{color:t.vars?t.vars.palette.text.primary:null==(s=(n=t.palette).getContrastText)?void 0:s.call(n,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:r,boxShadow:(t.vars||t).shadows[2]},"contained"===i.variant&&"inherit"!==i.color&&{color:(t.vars||t).palette[i.color].contrastText,backgroundColor:(t.vars||t).palette[i.color].main},"inherit"===i.color&&{color:"inherit",borderColor:"currentColor"},"small"===i.size&&"text"===i.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===i.size&&"text"===i.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===i.size&&"outlined"===i.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===i.size&&"outlined"===i.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===i.size&&"contained"===i.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===i.size&&"contained"===i.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},i.fullWidth&&{width:"100%"})}),(e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${PK.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${PK.disabled}`]:{boxShadow:"none"}}})),GK=T_("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:i}=e;return[t.startIcon,t[`iconSize${AK(i.size)}`]]}})((e=>{let{ownerState:t}=e;return(0,pu.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},NK(t))})),BK=T_("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:i}=e;return[t.endIcon,t[`iconSize${AK(i.size)}`]]}})((e=>{let{ownerState:t}=e;return(0,pu.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},NK(t))})),VK=t.forwardRef((function(e,i){const s=t.useContext(LK),n=t.useContext(FK),r=F_({props:M_(s,e),name:"MuiButton"}),{children:o,color:a="primary",component:l="button",className:h,disabled:c=!1,disableElevation:d=!1,disableFocusRipple:u=!1,endIcon:p,focusVisibleClassName:g,fullWidth:m=!1,size:f="medium",startIcon:v,type:y,variant:C="text"}=r,S=(0,gu.A)(r,kK),w=(0,pu.A)({},r,{color:a,component:l,disabled:c,disableElevation:d,disableFocusRipple:u,fullWidth:m,size:f,type:y,variant:C}),b=(e=>{const{color:t,disableElevation:i,fullWidth:s,size:n,variant:r,classes:o}=e,a=D_({root:["root",r,`${r}${AK(t)}`,`size${AK(n)}`,`${r}Size${AK(n)}`,`color${AK(t)}`,i&&"disableElevation",s&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${AK(n)}`],endIcon:["icon","endIcon",`iconSize${AK(n)}`]},TK,o);return(0,pu.A)({},o,a)})(w),x=v&&(0,ep.jsx)(GK,{className:b.startIcon,ownerState:w,children:v}),M=p&&(0,ep.jsx)(BK,{className:b.endIcon,ownerState:w,children:p}),D=n||"";return(0,ep.jsxs)(OK,(0,pu.A)({ownerState:w,className:x_(s.className,b.root,h,D),component:l,disabled:c,focusRipple:!u,focusVisibleClassName:x_(b.focusVisible,g),ref:i,type:y},S,{classes:b,children:[x,o,M]}))}));var zK=i(713);const HK=["ownerState"],WK=["variants"],jK=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function UK(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const _K=(0,Cu.A)(),KK=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function $K(e){let{defaultTheme:t,theme:i,themeId:s}=e;return n=i,0===Object.keys(n).length?t:i[s]||i;var n}function YK(e){return e?(t,i)=>i[e]:null}function ZK(e,t){let{ownerState:i}=t,s=(0,gu.A)(t,HK);const n="function"===typeof e?e((0,pu.A)({ownerState:i},s)):e;if(Array.isArray(n))return n.flatMap((e=>ZK(e,(0,pu.A)({ownerState:i},s))));
75if(n&&"object"===typeof n&&Array.isArray(n.variants)){const{variants:e=[]}=n;let t=(0,gu.A)(n,WK);return e.forEach((e=>{let n=!0;"function"===typeof e.props?n=e.props((0,pu.A)({ownerState:i},s,i)):Object.keys(e.props).forEach((t=>{(null==i?void 0:i[t])!==e.props[t]&&s[t]!==e.props[t]&&(n=!1)})),n&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,pu.A)({ownerState:i},s,i)):e.style))})),t}return n}const qK=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:i=_K,rootShouldForwardProp:s=UK,slotShouldForwardProp:n=UK}=e,r=e=>(0,yu.A)((0,pu.A)({},e,{theme:$K((0,pu.A)({},e,{defaultTheme:i,themeId:t}))}));return r.__mui_systemSx=!0,function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,zK.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:a,slot:l,skipVariantsResolver:h,skipSx:c,overridesResolver:d=YK(KK(l))}=o,u=(0,gu.A)(o,jK),p=void 0!==h?h:l&&"Root"!==l&&"root"!==l||!1,g=c||!1;let m=UK;"Root"===l||"root"===l?m=s:l?m=n:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const f=(0,zK.default)(e,(0,pu.A)({shouldForwardProp:m,label:undefined},u)),v=e=>"function"===typeof e&&e.__emotion_real!==e||(0,fu.Q)(e)?s=>ZK(e,(0,pu.A)({},s,{theme:$K({theme:s.theme,defaultTheme:i,themeId:t})})):e,y=function(s){let n=v(s);for(var o=arguments.length,l=new Array(o>1?o-1:0),h=1;h<o;h++)l[h-1]=arguments[h];const c=l?l.map(v):[];a&&d&&c.push((e=>{const s=$K((0,pu.A)({},e,{defaultTheme:i,themeId:t}));if(!s.components||!s.components[a]||!s.components[a].styleOverrides)return null;const n=s.components[a].styleOverrides,r={};return Object.entries(n).forEach((t=>{let[i,n]=t;r[i]=ZK(n,(0,pu.A)({},e,{theme:s}))})),d(e,r)})),a&&!p&&c.push((e=>{var s;const n=$K((0,pu.A)({},e,{defaultTheme:i,themeId:t}));return ZK({variants:null==n||null==(s=n.components)||null==(s=s[a])?void 0:s.variants},(0,pu.A)({},e,{theme:n}))})),g||c.push(r);const u=c.length-l.length;if(Array.isArray(s)&&u>0){const e=new Array(u).fill("");n=[...s,...e],n.raw=[...s.raw,...e]}const m=f(n,...c);return e.muiName&&(m.muiName=e.muiName),m};return f.withConfig&&(y.withConfig=f.withConfig),y}}();var QK=i(575);const XK=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const i=t.useContext(QK.T);return i&&(s=i,0!==Object.keys(s).length)?i:e;var s},JK=(0,Cu.A)();const e$=function(){return XK(arguments.length>0&&void 0!==arguments[0]?arguments[0]:JK)};function t$(e){let{props:t,name:i,defaultTheme:s,themeId:n}=e,r=e$(s);n&&(r=r[n]||r);const o=function(e){const{theme:t,name:i,props:s}=e;return t&&t.components&&t.components[i]&&t.components[i].defaultProps?M_(t.components[i].defaultProps,s):s}({theme:r,name:i,props:t});return o}var i$=i(698),s$=i(751),n$=i(604);const r$=["component","direction","spacing","divider","children","className","useFlexGap"],o$=(0,Cu.A)(),a$=qK("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function l$(e){return t$({props:e,name:"MuiStack",defaultTheme:o$})}function h$(e,i){const s=t.Children.toArray(e).filter(Boolean);return s.reduce(((e,n,r)=>(e.push(n),r<s.length-1&&e.push(t.cloneElement(i,{key:`separator-${r}`})),e)),[])}const c$=e=>{let{ownerState:t,theme:i}=e,s=(0,pu.A)({display:"flex",flexDirection:"column"},(0,s$.NI)({theme:i},(0,s$.kW)({values:t.direction,breakpoints:i.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,n$.LX)(i),n=Object.keys(i.breakpoints.values).reduce(((e,i)=>(("object"===typeof t.spacing&&null!=t.spacing[i]||"object"===typeof t.direction&&null!=t.direction[i])&&(e[i]=!0),e)),{}),r=(0,s$.kW)({values:t.direction,base:n}),o=(0,s$.kW)({values:t.spacing,base:n});"object"===typeof r&&Object.keys(r).forEach(((e,t,i)=>{if(!r[e]){const s=t>0?r[i[t-1]]:"column";r[e]=s}}));const a=(i,s)=>{return t.useFlexGap?{gap:(0,n$._W)(e,i)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${n=s?r[s]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[n]}`]:(0,n$._W)(e,i)}};var n};s=(0,fu.A)(s,(0,s$.NI)({theme:i},o,a))}return s=(0,s$.iZ)(i.breakpoints,s),s};const d$=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:i=a$,useThemeProps:s=l$,componentName:n="MuiStack"}=e,r=i(c$);return t.forwardRef((function(e,t){const i=s(e),o=(0,i$.A)(i),{component:a="div",direction:l="column",spacing:h=0,divider:c,children:d,className:u,useFlexGap:p=!1}=o,g=(0,gu.A)(o,r$),m={direction:l,spacing:h,useFlexGap:p},f=D_({root:["root"]},(e=>hK(n,e)),{});return(0,ep.jsx)(r,(0,pu.A)({as:a,ownerState:m,ref:t,className:x_(f.root,u)},g,{children:c?h$(d,c):d}))}))}({createStyledComponent:T_("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>F_({props:e,name:"MuiStack"})}),u$=()=>{const[e,i]=(0,t.useState)("tab1"),[s,n]=(0,t.useState)(window.innerWidth<768),[r,o]=(0,t.useState)(!0),[a,l]=(0,t.useState)("Show in group?");(0,t.useEffect)((()=>{const e=()=>{n(window.innerWidth<768)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);return(0,ep.jsxs)("div",{className:"tabs-container",children:[(0,ep.jsx)(d$,{direction:"row",spacing:2,children:(0,ep.jsx)(VK,{variant:"contained",onClick:()=>{o(!r),l(r?"Show in lines?":"Show in groups?")},children:a})}),(0,ep.jsx)("div",{className:"tab-content",children:(()=>
75{if("tab1"===e)switch(r){case!0:return(0,ep.jsx)(ip,{theme:{base:"light"},args:[w_,"lines"]});case!1:return(0,ep.jsx)(ip,{theme:{base:"light"},args:[w_,"groups"]})}return(0,ep.jsx)("div",{children:"Select a tab"})})()})]})};s.render((0,ep.jsx)(t.StrictMode,{children:(0,ep.jsx)("section",{className:"hero",children:(0,ep.jsx)("div",{className:"hero-body",children:(0,ep.jsx)("div",{className:"container is-fluid",children:(0,ep.jsx)("div",{className:"columns  is-fullwidth is-fullheight",children:(0,ep.jsxs)("div",{style:{backgroundColor:"lightorange",width:"100%",height:"100%"},children:[(0,ep.jsxs)("div",{className:"column has-text-centered is-fullwidth",children:[(0,ep.jsx)("h1",{className:"title publication-title",style:{fontSize:"2.5rem"},children:"\u2694\ufe0fCodeArenaEval"}),(0,ep.jsx)("h2",{className:"title is-3 publication-title",children:"Real-world Coding Tasks"}),(0,ep.jsx)("h2",{className:"title is-3 publication-title",children:"Aligning Human Preferences and Model Generation"}),(0,ep.jsxs)("div",{className:"is-4 publication-authors",children:[(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("a",{href:"",children:"Jian Yang"}),(0,ep.jsx)("sup",{children:"1"}),","]}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("a",{href:"",children:"Jiaxi Yang"}),(0,ep.jsx)("sup",{children:"2,3"}),","]}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("a",{href:"",children:"Ke Jin"}),(0,ep.jsx)("sup",{}),","]}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("a",{href:"",children:"Yibo Miao"}),(0,ep.jsx)("sup",{children:"4"}),","]}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("a",{href:"",children:"Lei Zhang"}),(0,ep.jsx)("sup",{children:"2,3"}),","]}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("a",{href:"",children:"Liqun Yang"}),(0,ep.jsx)("sup",{}),","]}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("a",{href:"",children:"Zeyu Cui"}),(0,ep.jsx)("sup",{children:"1"}),","]}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("a",{href:"",children:"Yichang Zhang"}),(0,ep.jsx)("sup",{children:"1"}),","]}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("a",{href:"",children:"Binyuan Hui"}),(0,ep.jsx)("sup",{children:"1"}),","]}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("a",{href:"",children:"Junyang Lin"}),(0,ep.jsx)("sup",{children:"1"}),","]})]}),(0,ep.jsxs)("div",{className:"is-4 publication-authors",children:[(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("sup",{children:"1"}),"Alibaba Group;"]}),(0,ep.jsx)("br",{}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("sup",{children:"2"}),"Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences;"]}),(0,ep.jsx)("br",{}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("sup",{children:"3"}),"University of Chinese Academy of Sciences;"]}),(0,ep.jsx)("br",{}),(0,ep.jsxs)("span",{className:"is-4 publication-title-Cinzel",children:[(0,ep.jsx)("sup",{children:"4"}),"Shanghai Jiao Tong University;"]})]}),(0,ep.jsx)("div",{className:"column has-text-centered",children:(0,ep.jsxs)("div",{className:"publication-links",children:[(0,ep.jsx)("span",{className:"link-block",children:(0,ep.jsxs)("a",{href:"https://arxiv.org/abs/2412.05210",className:"external-link button is-large is-rounded is-dark",children:[(0,ep.jsx)("span",{className:"icon",children:(0,ep.jsx)("i",{className:"fas fa-file-pdf "})}),(0,ep.jsx)("span",{className:"publication-title-Cinzel",children:"Paper"})]})}),(0,ep.jsx)("span",{className:"spacer"}),(0,ep.jsx)("span",{className:"link-block",children:(0,ep.jsxs)("a",{href:"https://github.com/QwenLM/Qwen2.5-Coder/tree/main/qwencoder-eval/instruct/CodeArena",className:"external-link button is-large is-rounded is-dark",children:[(0,ep.jsx)("span",{className:"icon",children:(0,ep.jsx)("i",{className:"fab fa-github"})}),(0,ep.jsx)("span",{className:"publication-title-Cinzel",children:"Code"})]})}),(0,ep.jsx)("span",{className:"spacer"}),(0,ep.jsx)("span",{className:"link-block",children:(0,ep.jsxs)("a",{href:"https://huggingface.co/datasets/CSJianYang/CodeArena",className:"external-link button is-large is-rounded is-dark",children:[(0,ep.jsx)("span",{className:"icon",children:(0,ep.jsx)("i",{className:"far fa-images"})}),(0,ep.jsx)("span",{className:"publication-title-Cinzel",children:"Evaluation Data"})]})}),(0,ep.jsx)("span",{className:"spacer"}),(0,ep.jsx)("span",{className:"link-block",children:(0,ep.jsxs)("a",{href:"https://ali-codearena.github.io/Ali-CodeArena/",className:"external-link button is-large is-rounded is-dark",children:[(0,ep.jsx)("span",{className:"icon",children:(0,ep.jsx)("i",{className:"fas fa-home"})}),(0,ep.jsx)("span",{className:"publication-title-Cinzel",children:"Home"})]})})]})})]}),(0,ep.jsx)("div",{className:"column has-text-centered is-fullheight",style:{display:"flex",flexDirection:"column",justifyContent:"center"},children:(0,ep.jsx)(u$,{})})]})})})})})}),document.getElementById("root"))})()})();
76//# sourceMappingURL=main.21514e5d.js.map

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